chore: allow specific build package

This commit is contained in:
chenos 2020-12-24 07:35:53 +08:00
parent 57003c6c02
commit 4d07ef5116
2 changed files with 13 additions and 2 deletions

View File

@ -17,9 +17,21 @@ const otherPkgs = readdirSync(join(__dirname, 'packages')).filter(
}, },
); );
let pkgs = [];
if (process.argv.length > 2) {
pkgs = process.argv;
pkgs.shift();
pkgs.shift();
} else {
pkgs = [...headPkgs, ...otherPkgs, ...tailPkgs];
}
console.log(pkgs);
export default { export default {
target: 'node', target: 'node',
cjs: { type: 'babel', lazy: true }, cjs: { type: 'babel', lazy: true },
// disableTypeCheck: true, // disableTypeCheck: true,
pkgs: [...headPkgs, ...otherPkgs, ...tailPkgs], pkgs,
}; };

View File

@ -459,7 +459,6 @@ export abstract class Model extends SequelizeModel {
for (const { item, target } of belongsToManyList) { for (const { item, target } of belongsToManyList) {
const throughValues = item[throughName]; const throughValues = item[throughName];
console.log({ThroughModel: ThroughModel.options, throughName, item, throughValues})
if (throughValues && typeof throughValues === 'object') { if (throughValues && typeof throughValues === 'object') {
const { foreignKey, sourceKey, otherKey } = association.options; const { foreignKey, sourceKey, otherKey } = association.options;
const through = await ThroughModel.findOne({ const through = await ThroughModel.findOne({