From 4d07ef511643e00abdf79c1d15eedc659da6988f Mon Sep 17 00:00:00 2001 From: chenos Date: Thu, 24 Dec 2020 07:35:53 +0800 Subject: [PATCH] chore: allow specific build package --- .fatherrc.ts | 14 +++++++++++++- packages/database/src/model.ts | 1 - 2 files changed, 13 insertions(+), 2 deletions(-) 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({