Skip to content

Commit 7e57864

Browse files
authored
fix: misc fixes addressing PR comments (#438)
* fix: misc fixes addressing PR comments * update
1 parent 60717a3 commit 7e57864

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

packages/cli/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
"@zenstackhq/typescript-config": "workspace:*",
5454
"@zenstackhq/vitest-config": "workspace:*",
5555
"better-sqlite3": "catalog:",
56-
"tmp": "catalog:",
57-
"prisma": "catalog:"
56+
"tmp": "catalog:"
5857
}
5958
}

packages/cli/src/actions/action-utils.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,15 @@ export function getPkgJsonConfig(startPath: string) {
9898

9999
if (pkgJson.zenstack && typeof pkgJson.zenstack === 'object') {
100100
result.schema =
101-
pkgJson.zenstack.schema &&
102-
typeof pkgJson.zenstack.schema === 'string' &&
103-
path.resolve(path.dirname(pkgJsonFile), pkgJson.zenstack.schema);
101+
pkgJson.zenstack.schema && typeof pkgJson.zenstack.schema === 'string'
102+
? path.resolve(path.dirname(pkgJsonFile), pkgJson.zenstack.schema)
103+
: undefined;
104104
result.output =
105-
pkgJson.zenstack.output &&
106-
typeof pkgJson.zenstack.output === 'string' &&
107-
path.resolve(path.dirname(pkgJsonFile), pkgJson.zenstack.output);
108-
result.seed = typeof pkgJson.zenstack.seed === 'string' && pkgJson.zenstack.seed;
105+
pkgJson.zenstack.output && typeof pkgJson.zenstack.output === 'string'
106+
? path.resolve(path.dirname(pkgJsonFile), pkgJson.zenstack.output)
107+
: undefined;
108+
result.seed =
109+
typeof pkgJson.zenstack.seed === 'string' && pkgJson.zenstack.seed ? pkgJson.zenstack.seed : undefined;
109110
}
110111

111112
return result;

packages/cli/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ E.g.:
150150
"zenstack": {
151151
"seed": "ts-node ./zenstack/seed.ts"
152152
}
153-
}
153+
}
154154
155155
Arguments following -- are passed to the seed script. E.g.: "zen db seed -- --users 10"`,
156156
)

0 commit comments

Comments
 (0)