@zenstackhq/cli 3.0.0-beta.2 → 3.0.0-beta.4

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @zenstackhq/cli@3.0.0-beta.2 build /home/runner/work/zenstack-v3/zenstack-v3/packages/cli
2
+ > @zenstackhq/cli@3.0.0-beta.4 build /home/runner/work/zenstack-v3/zenstack-v3/packages/cli
3
3
  > tsc --noEmit && tsup-node
4
4
 
5
5
  CLI Building entry: {"index":"src/index.ts"}
@@ -10,13 +10,13 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- CJS dist/index.cjs 36.35 KB
14
- CJS dist/index.cjs.map 68.64 KB
15
- CJS ⚡️ Build success in 130ms
16
13
  ESM dist/index.js 32.28 KB
17
14
  ESM dist/index.js.map 68.13 KB
18
- ESM ⚡️ Build success in 144ms
15
+ ESM ⚡️ Build success in 156ms
16
+ CJS dist/index.cjs 36.35 KB
17
+ CJS dist/index.cjs.map 68.64 KB
18
+ CJS ⚡️ Build success in 156ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 3525ms
20
+ DTS ⚡️ Build success in 3474ms
21
21
  DTS dist/index.d.ts 13.00 B
22
22
  DTS dist/index.d.cts 13.00 B
package/dist/index.cjs CHANGED
@@ -670,7 +670,7 @@ var import_node_fs11 = __toESM(require("fs"), 1);
670
670
  var os2 = __toESM(require("os"), 1);
671
671
 
672
672
  // src/constants.ts
673
- var TELEMETRY_TRACKING_TOKEN = "<TELEMETRY_TRACKING_TOKEN>";
673
+ var TELEMETRY_TRACKING_TOKEN = "74944eb779d7d3b4ce185be843fde9fc";
674
674
 
675
675
  // src/utils/is-ci.ts
676
676
  var import_node_process = require("process");
package/dist/index.js CHANGED
@@ -648,7 +648,7 @@ import fs11 from "fs";
648
648
  import * as os2 from "os";
649
649
 
650
650
  // src/constants.ts
651
- var TELEMETRY_TRACKING_TOKEN = "<TELEMETRY_TRACKING_TOKEN>";
651
+ var TELEMETRY_TRACKING_TOKEN = "74944eb779d7d3b4ce185be843fde9fc";
652
652
 
653
653
  // src/utils/is-ci.ts
654
654
  import { env } from "process";
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publisher": "zenstack",
4
4
  "displayName": "ZenStack CLI",
5
5
  "description": "FullStack database toolkit with built-in access control and automatic API generation.",
6
- "version": "3.0.0-beta.2",
6
+ "version": "3.0.0-beta.4",
7
7
  "type": "module",
8
8
  "author": {
9
9
  "name": "ZenStack Team"
@@ -30,9 +30,9 @@
30
30
  "package-manager-detector": "^1.3.0",
31
31
  "semver": "^7.7.2",
32
32
  "ts-pattern": "^5.7.1",
33
- "@zenstackhq/common-helpers": "3.0.0-beta.2",
34
- "@zenstackhq/language": "3.0.0-beta.2",
35
- "@zenstackhq/sdk": "3.0.0-beta.2"
33
+ "@zenstackhq/common-helpers": "3.0.0-beta.4",
34
+ "@zenstackhq/language": "3.0.0-beta.4",
35
+ "@zenstackhq/sdk": "3.0.0-beta.4"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "prisma": "^6.10.0"
@@ -43,11 +43,11 @@
43
43
  "@types/tmp": "^0.2.6",
44
44
  "better-sqlite3": "^12.2.0",
45
45
  "tmp": "^0.2.3",
46
- "@zenstackhq/eslint-config": "3.0.0-beta.2",
47
- "@zenstackhq/runtime": "3.0.0-beta.2",
48
- "@zenstackhq/testtools": "3.0.0-beta.2",
49
- "@zenstackhq/vitest-config": "3.0.0-beta.2",
50
- "@zenstackhq/typescript-config": "3.0.0-beta.2"
46
+ "@zenstackhq/eslint-config": "3.0.0-beta.4",
47
+ "@zenstackhq/typescript-config": "3.0.0-beta.4",
48
+ "@zenstackhq/runtime": "3.0.0-beta.4",
49
+ "@zenstackhq/testtools": "3.0.0-beta.4",
50
+ "@zenstackhq/vitest-config": "3.0.0-beta.4"
51
51
  },
52
52
  "scripts": {
53
53
  "build": "tsc --noEmit && tsup-node",
@@ -0,0 +1,20 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+
5
+ const token = process.env.TELEMETRY_TRACKING_TOKEN ?? '';
6
+
7
+ if (!token) {
8
+ console.warn('TELEMETRY_TRACKING_TOKEN is not set.');
9
+ }
10
+
11
+ const filesToProcess = ['dist/index.js', 'dist/index.cjs'];
12
+ const _dirname = path.dirname(fileURLToPath(import.meta.url));
13
+
14
+ for (const file of filesToProcess) {
15
+ console.log(`Processing ${file} for telemetry token...`);
16
+ const filePath = path.join(_dirname, '..', file);
17
+ const content = fs.readFileSync(filePath, 'utf-8');
18
+ const updatedContent = content.replace('<TELEMETRY_TRACKING_TOKEN>', token);
19
+ fs.writeFileSync(filePath, updatedContent, 'utf-8');
20
+ }
package/tsup.config.ts CHANGED
@@ -1,5 +1,3 @@
1
- import fs from 'node:fs';
2
- import path from 'node:path';
3
1
  import { defineConfig } from 'tsup';
4
2
 
5
3
  export default defineConfig({
@@ -12,19 +10,4 @@ export default defineConfig({
12
10
  clean: true,
13
11
  dts: true,
14
12
  format: ['esm', 'cjs'],
15
- onSuccess: async () => {
16
- if (!process.env['TELEMETRY_TRACKING_TOKEN']) {
17
- return;
18
- }
19
- const filesToProcess = ['dist/index.js', 'dist/index.cjs'];
20
- for (const file of filesToProcess) {
21
- console.log(`Processing ${file} for telemetry token...`);
22
- const content = fs.readFileSync(path.join(__dirname, file), 'utf-8');
23
- const updatedContent = content.replace(
24
- '<TELEMETRY_TRACKING_TOKEN>',
25
- process.env['TELEMETRY_TRACKING_TOKEN'],
26
- );
27
- fs.writeFileSync(file, updatedContent, 'utf-8');
28
- }
29
- },
30
13
  });