diff --git a/.fatherrc.ts b/.fatherrc.ts index 0ce07a5e0b..a5efed149c 100644 --- a/.fatherrc.ts +++ b/.fatherrc.ts @@ -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 { target: 'node', cjs: { type: 'babel', lazy: true }, // disableTypeCheck: true, - pkgs: [...headPkgs, ...otherPkgs, ...tailPkgs], + pkgs, }; diff --git a/packages/database/src/model.ts b/packages/database/src/model.ts index 1d98e29e38..2732ca62aa 100644 --- a/packages/database/src/model.ts +++ b/packages/database/src/model.ts @@ -459,7 +459,6 @@ export abstract class Model extends SequelizeModel { for (const { item, target } of belongsToManyList) { const throughValues = item[throughName]; - console.log({ThroughModel: ThroughModel.options, throughName, item, throughValues}) if (throughValues && typeof throughValues === 'object') { const { foreignKey, sourceKey, otherKey } = association.options; const through = await ThroughModel.findOne({