Skip to content

Commit

Permalink
Skip models folder validation for default model
Browse files Browse the repository at this point in the history
  • Loading branch information
thekevinscott committed Sep 14, 2023
1 parent bb087f1 commit b4a300e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion internals/cli/src/commands/scaffold/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ export const scaffoldModels = async (modelPackageDirectoryNames: string[]) => {
export default (program: Command) => program.command('model')
.description('Scaffold Model')
.argument('<model...>', 'The model package to build. Must be a valid model in the /models folder')
.action(async (models) => scaffoldModels(await validateModels(models)));
.option('-s, --skip-validate-models-folder', 'Whether to validate the existence of the models folder', false)
.action(async (models, { skipValidateModelsFolder }) => scaffoldModels(await validateModels(models, !skipValidateModelsFolder)));

2 changes: 1 addition & 1 deletion internals/cli/src/commands/update/npm-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const exec = (cmd: string, opts: ExecOptions) => new Promise<void>((resolve, rej
spawnedProcess.stdout?.pipe(process.stdout);
}
});
const getOutput = async (cmd: string, { ...opts }: ExecOptions = {}) => new Promise<string>((resolve, reject) => {
const getOutput = (cmd: string, { ...opts }: ExecOptions = {}) => new Promise<string>((resolve, reject) => {
let output = '';
const spawnedProcess = _exec(cmd, opts, (error) => {
if (error) {
Expand Down
2 changes: 1 addition & 1 deletion models/default-model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"scripts": {
"scaffold": "pnpm cli scaffold model default-model",
"lint:fix": "pnpm lint --fix",
"lint": "pnpm scaffold && eslint -c ../.eslintrc.js src --ext .ts",
"lint": "pnpm scaffold -s && eslint -c ../.eslintrc.js src --ext .ts",
"prepublishOnly": "pnpm lint && pnpm build && pnpm validate",
"validate": "pnpm cli validate models/default-model",
"build": "pnpm cli build model default-model -o cjs -o esm -o umd",
Expand Down

0 comments on commit b4a300e

Please sign in to comment.