@zenstackhq/cli 3.3.2-beta.1 → 3.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +17 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -1006,9 +1006,23 @@ async function run9(options) {
|
|
|
1006
1006
|
const dialect = createDialect(provider, databaseUrl, outputPath);
|
|
1007
1007
|
const jiti = createJiti2(import.meta.url);
|
|
1008
1008
|
const schemaModule = await jiti.import(path9.join(outputPath, "schema"));
|
|
1009
|
-
const
|
|
1009
|
+
const schema = schemaModule.schema;
|
|
1010
|
+
const omit = {};
|
|
1011
|
+
for (const [modelName, modelDef] of Object.entries(schema.models)) {
|
|
1012
|
+
const computedFields = {};
|
|
1013
|
+
for (const [fieldName, fieldDef] of Object.entries(modelDef.fields)) {
|
|
1014
|
+
if (fieldDef.computed === true) {
|
|
1015
|
+
computedFields[fieldName] = true;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
if (Object.keys(computedFields).length > 0) {
|
|
1019
|
+
omit[modelName] = computedFields;
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
const db = new ZenStackClient(schema, {
|
|
1010
1023
|
dialect,
|
|
1011
|
-
log: log && log.length > 0 ? log : void 0
|
|
1024
|
+
log: log && log.length > 0 ? log : void 0,
|
|
1025
|
+
omit: Object.keys(omit).length > 0 ? omit : void 0
|
|
1012
1026
|
});
|
|
1013
1027
|
try {
|
|
1014
1028
|
await db.$connect();
|
|
@@ -1139,7 +1153,7 @@ import fs13 from "fs";
|
|
|
1139
1153
|
import * as os2 from "os";
|
|
1140
1154
|
|
|
1141
1155
|
// src/constants.ts
|
|
1142
|
-
var TELEMETRY_TRACKING_TOKEN = "
|
|
1156
|
+
var TELEMETRY_TRACKING_TOKEN = "74944eb779d7d3b4ce185be843fde9fc";
|
|
1143
1157
|
|
|
1144
1158
|
// src/utils/is-ci.ts
|
|
1145
1159
|
import { env } from "process";
|