@mondaydotcomorg/z2h-cli 0.15.0 → 0.15.2-feat-eitantsh-z2h-admin-panel-package-388aad6

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.
Files changed (115) hide show
  1. package/dist/commands/build.d.ts +0 -1
  2. package/dist/commands/build.d.ts.map +1 -1
  3. package/dist/commands/build.js +0 -3
  4. package/dist/commands/clean.d.ts +1 -4
  5. package/dist/commands/clean.d.ts.map +1 -1
  6. package/dist/commands/clean.js +1 -4
  7. package/dist/commands/create-workspace.d.ts +1 -4
  8. package/dist/commands/create-workspace.d.ts.map +1 -1
  9. package/dist/commands/create-workspace.js +1 -4
  10. package/dist/commands/create.d.ts +0 -1
  11. package/dist/commands/create.d.ts.map +1 -1
  12. package/dist/commands/create.js +0 -3
  13. package/dist/commands/delete.d.ts +0 -1
  14. package/dist/commands/delete.d.ts.map +1 -1
  15. package/dist/commands/delete.js +1 -4
  16. package/dist/commands/deploy.d.ts +0 -1
  17. package/dist/commands/deploy.d.ts.map +1 -1
  18. package/dist/commands/deploy.js +4 -7
  19. package/dist/commands/dev.d.ts +0 -1
  20. package/dist/commands/dev.d.ts.map +1 -1
  21. package/dist/commands/dev.js +0 -3
  22. package/dist/commands/doctor.d.ts +1 -4
  23. package/dist/commands/doctor.d.ts.map +1 -1
  24. package/dist/commands/doctor.js +2 -5
  25. package/dist/commands/edit.d.ts +1 -4
  26. package/dist/commands/edit.d.ts.map +1 -1
  27. package/dist/commands/edit.js +1 -4
  28. package/dist/commands/generate-z2h-token.d.ts +0 -1
  29. package/dist/commands/generate-z2h-token.d.ts.map +1 -1
  30. package/dist/commands/generate-z2h-token.js +0 -3
  31. package/dist/commands/grant.d.ts +1 -5
  32. package/dist/commands/grant.d.ts.map +1 -1
  33. package/dist/commands/grant.js +1 -10
  34. package/dist/commands/migrate.d.ts +0 -1
  35. package/dist/commands/migrate.d.ts.map +1 -1
  36. package/dist/commands/migrate.js +106 -4
  37. package/dist/commands/tag.d.ts +0 -1
  38. package/dist/commands/tag.d.ts.map +1 -1
  39. package/dist/commands/tag.js +1 -4
  40. package/dist/esm/commands/build.d.ts +0 -1
  41. package/dist/esm/commands/build.d.ts.map +1 -1
  42. package/dist/esm/commands/build.mjs +1 -4
  43. package/dist/esm/commands/clean.d.ts +1 -4
  44. package/dist/esm/commands/clean.d.ts.map +1 -1
  45. package/dist/esm/commands/clean.mjs +2 -5
  46. package/dist/esm/commands/create-workspace.d.ts +1 -4
  47. package/dist/esm/commands/create-workspace.d.ts.map +1 -1
  48. package/dist/esm/commands/create-workspace.mjs +2 -5
  49. package/dist/esm/commands/create.d.ts +0 -1
  50. package/dist/esm/commands/create.d.ts.map +1 -1
  51. package/dist/esm/commands/create.mjs +1 -4
  52. package/dist/esm/commands/delete.d.ts +0 -1
  53. package/dist/esm/commands/delete.d.ts.map +1 -1
  54. package/dist/esm/commands/delete.mjs +2 -5
  55. package/dist/esm/commands/deploy.d.ts +0 -1
  56. package/dist/esm/commands/deploy.d.ts.map +1 -1
  57. package/dist/esm/commands/deploy.mjs +5 -8
  58. package/dist/esm/commands/dev.d.ts +0 -1
  59. package/dist/esm/commands/dev.d.ts.map +1 -1
  60. package/dist/esm/commands/dev.mjs +1 -4
  61. package/dist/esm/commands/doctor.d.ts +1 -4
  62. package/dist/esm/commands/doctor.d.ts.map +1 -1
  63. package/dist/esm/commands/doctor.mjs +3 -6
  64. package/dist/esm/commands/edit.d.ts +1 -4
  65. package/dist/esm/commands/edit.d.ts.map +1 -1
  66. package/dist/esm/commands/edit.mjs +2 -5
  67. package/dist/esm/commands/generate-z2h-token.d.ts +0 -1
  68. package/dist/esm/commands/generate-z2h-token.d.ts.map +1 -1
  69. package/dist/esm/commands/generate-z2h-token.mjs +1 -4
  70. package/dist/esm/commands/grant.d.ts +1 -5
  71. package/dist/esm/commands/grant.d.ts.map +1 -1
  72. package/dist/esm/commands/grant.mjs +2 -11
  73. package/dist/esm/commands/migrate.d.ts +0 -1
  74. package/dist/esm/commands/migrate.d.ts.map +1 -1
  75. package/dist/esm/commands/migrate.mjs +101 -5
  76. package/dist/esm/commands/tag.d.ts +0 -1
  77. package/dist/esm/commands/tag.d.ts.map +1 -1
  78. package/dist/esm/commands/tag.mjs +2 -5
  79. package/dist/esm/index.mjs +20 -29
  80. package/dist/esm/util/tracker.d.ts.map +1 -1
  81. package/dist/esm/util/tracker.mjs +4 -1
  82. package/dist/esm/util/workspace.d.ts +3 -0
  83. package/dist/esm/util/workspace.d.ts.map +1 -1
  84. package/dist/esm/util/workspace.mjs +64 -2
  85. package/dist/index.js +19 -28
  86. package/dist/util/tracker.d.ts.map +1 -1
  87. package/dist/util/tracker.js +4 -1
  88. package/dist/util/workspace.d.ts +3 -0
  89. package/dist/util/workspace.d.ts.map +1 -1
  90. package/dist/util/workspace.js +65 -0
  91. package/package.json +1 -1
  92. package/src/commands/__tests__/doctor.test.ts +12 -5
  93. package/src/commands/build.ts +1 -6
  94. package/src/commands/clean.ts +2 -9
  95. package/src/commands/create-workspace.ts +2 -10
  96. package/src/commands/create.ts +1 -6
  97. package/src/commands/delete.ts +2 -7
  98. package/src/commands/deploy.ts +5 -10
  99. package/src/commands/dev.ts +1 -6
  100. package/src/commands/doctor.ts +3 -11
  101. package/src/commands/edit.ts +2 -10
  102. package/src/commands/generate-z2h-token.ts +1 -6
  103. package/src/commands/grant.ts +2 -16
  104. package/src/commands/migrate.ts +139 -6
  105. package/src/commands/tag.ts +2 -7
  106. package/src/index.ts +29 -41
  107. package/src/util/tracker.ts +6 -1
  108. package/src/util/workspace.ts +75 -1
  109. package/dist/esm/migrations/auto-migrate.d.ts +0 -2
  110. package/dist/esm/migrations/auto-migrate.d.ts.map +0 -1
  111. package/dist/esm/migrations/auto-migrate.mjs +0 -169
  112. package/dist/migrations/auto-migrate.d.ts +0 -2
  113. package/dist/migrations/auto-migrate.d.ts.map +0 -1
  114. package/dist/migrations/auto-migrate.js +0 -177
  115. package/src/migrations/auto-migrate.ts +0 -217
@@ -1,5 +1,4 @@
1
1
  export interface BuildOptions {
2
- json?: boolean;
3
2
  publicUrl?: string;
4
3
  }
5
4
  export declare function buildCommand(opts?: BuildOptions): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,wBAAsB,YAAY,CAAC,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoCzE"}
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,wBAAsB,YAAY,CAAC,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgCzE"}
@@ -7,9 +7,6 @@ const shadow_prepare = require('../shadow/prepare.js');
7
7
 
8
8
  // Should be run from the consumer app directory — uses process.cwd() to locate it.
9
9
  async function buildCommand(opts = {}) {
10
- if (opts.json) {
11
- util_logger.setOutputMode('json');
12
- }
13
10
  const ctx = await shadow_prepare.prepareShadow();
14
11
  // Typecheck against the shadow's tsconfig (the consumer dir has none).
15
12
  // Errors fail the build before we waste time on the Trident pipeline.
@@ -1,5 +1,2 @@
1
- export interface CleanOptions {
2
- json?: boolean;
3
- }
4
- export declare function cleanCommand(opts?: CleanOptions): Promise<void>;
1
+ export declare function cleanCommand(): Promise<void>;
5
2
  //# sourceMappingURL=clean.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clean.d.ts","sourceRoot":"","sources":["../../src/commands/clean.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAGD,wBAAsB,YAAY,CAAC,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBzE"}
1
+ {"version":3,"file":"clean.d.ts","sourceRoot":"","sources":["../../src/commands/clean.ts"],"names":[],"mappings":"AAKA,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAclD"}
@@ -5,10 +5,7 @@ const util_logger = require('../util/logger.js');
5
5
  const shadow_paths = require('../shadow/paths.js');
6
6
 
7
7
  // Should be run from the consumer app directory — uses process.cwd() to locate it.
8
- async function cleanCommand(opts = {}) {
9
- if (opts.json) {
10
- util_logger.setOutputMode('json');
11
- }
8
+ async function cleanCommand() {
12
9
  const paths = shadow_paths.resolveConsumerPaths(process.cwd());
13
10
  const existed = await fs.pathExists(paths.shadowDir);
14
11
  if (existed) {
@@ -1,5 +1,2 @@
1
- export interface CreateWorkspaceOptions {
2
- json?: boolean;
3
- }
4
- export declare function createWorkspaceCommand(opts?: CreateWorkspaceOptions): Promise<void>;
1
+ export declare function createWorkspaceCommand(): Promise<void>;
5
2
  //# sourceMappingURL=create-workspace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-workspace.d.ts","sourceRoot":"","sources":["../../src/commands/create-workspace.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,sBAAsB,CAAC,IAAI,GAAE,sBAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CA8C7F"}
1
+ {"version":3,"file":"create-workspace.d.ts","sourceRoot":"","sources":["../../src/commands/create-workspace.ts"],"names":[],"mappings":"AASA,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CA0C5D"}
@@ -13,10 +13,7 @@ const _interopDefault = e => e && e.__esModule ? e : { default: e };
13
13
 
14
14
  const path__default = /*#__PURE__*/_interopDefault(path);
15
15
 
16
- async function createWorkspaceCommand(opts = {}) {
17
- if (opts.json) {
18
- util_logger.setOutputMode('json');
19
- }
16
+ async function createWorkspaceCommand() {
20
17
  const home = util_workspace.getWorkspaceHome();
21
18
  const templatesDir = util_templates.getTemplatesDir();
22
19
  const wsTemplatesDir = path__default.default.join(templatesDir, 'workspace');
@@ -5,7 +5,6 @@ export interface CreateOptions {
5
5
  htmlFile?: string;
6
6
  remote?: RemoteType;
7
7
  repoUrl?: string;
8
- json?: boolean;
9
8
  }
10
9
  export declare function createCommand(appName: string, opts?: CreateOptions): Promise<void>;
11
10
  //# sourceMappingURL=create.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,KAAK,UAAU,EAA2C,MAAM,4BAA4B,CAAC;AAKpH,OAAO,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,CAAC;AAEzC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AA6BD,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkG5F"}
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,KAAK,UAAU,EAA2C,MAAM,4BAA4B,CAAC;AAKpH,OAAO,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,CAAC;AAEzC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AA6BD,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8F5F"}
@@ -43,9 +43,6 @@ async function isDirEmpty(dir) {
43
43
  return entries.length === 0;
44
44
  }
45
45
  async function createCommand(appName, opts = {}) {
46
- if (opts.json) {
47
- util_logger.setOutputMode('json');
48
- }
49
46
  // Validate workspace.
50
47
  const workspace = await util_workspace.assertWorkspace();
51
48
  // Validate app name.
@@ -1,6 +1,5 @@
1
1
  export interface DeleteOptions {
2
2
  yes?: boolean;
3
- json?: boolean;
4
3
  }
5
4
  export declare function deleteCommand(opts?: DeleteOptions): Promise<void>;
6
5
  //# sourceMappingURL=delete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../src/commands/delete.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAkBD,wBAAsB,aAAa,CAAC,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmC3E"}
1
+ {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../src/commands/delete.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAkBD,wBAAsB,aAAa,CAAC,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+B3E"}
@@ -19,9 +19,6 @@ async function confirmByName(appSlug) {
19
19
  }
20
20
  // Should be run from the consumer app directory — uses process.cwd() to locate it.
21
21
  async function deleteCommand(opts = {}) {
22
- if (opts.json) {
23
- util_logger.setOutputMode('json');
24
- }
25
22
  const cwdName = util_appName.getCwdAppName();
26
23
  if (!cwdName) {
27
24
  throw new Error('Run this from inside a consumer app directory (the one with your package.json).');
@@ -30,7 +27,7 @@ async function deleteCommand(opts = {}) {
30
27
  const appName = util_appName.mfAppName(cwdName); // canonical mf- bundle name the backend keys on
31
28
  // Confirmation. --json is always non-interactive, so it requires --yes.
32
29
  if (!opts.yes) {
33
- if (opts.json || !process.stdin.isTTY) {
30
+ if (util_logger.getOutputMode() === 'json' || !process.stdin.isTTY) {
34
31
  throw new Error('Refusing to delete without confirmation — pass --yes to delete non-interactively.');
35
32
  }
36
33
  if (!(await confirmByName(appSlug))) {
@@ -1,7 +1,6 @@
1
1
  import { type RemoteType } from '../util/git/remote-options';
2
2
  export interface DeployOptions {
3
3
  dryRun?: boolean;
4
- json?: boolean;
5
4
  remote?: RemoteType;
6
5
  repoUrl?: string;
7
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,UAAU,EAA2C,MAAM,4BAA4B,CAAC;AAKtG,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAGD,wBAAsB,aAAa,CAAC,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuJ3E"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,UAAU,EAA2C,MAAM,4BAA4B,CAAC;AAKtG,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAGD,wBAAsB,aAAa,CAAC,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmJ3E"}
@@ -27,9 +27,6 @@ const os__default = /*#__PURE__*/_interopDefault(os);
27
27
 
28
28
  // Should be run from the consumer app directory — uses process.cwd() to locate it.
29
29
  async function deployCommand(opts = {}) {
30
- if (opts.json) {
31
- util_logger.setOutputMode('json');
32
- }
33
30
  const paths = shadow_paths.resolveConsumerPaths(process.cwd());
34
31
  const consumerPkg = (await fs.readJson(paths.consumerPkg));
35
32
  if (!consumerPkg.name) {
@@ -77,7 +74,7 @@ async function deployCommand(opts = {}) {
77
74
  const keyPrefix = `${appName}/${nextVersion}`;
78
75
  const url = `${constants.BUCKET_READ_DNS_URL}/${keyPrefix}`;
79
76
  util_logger.info('building');
80
- await commands_build.buildCommand({ json: opts.json, publicUrl: url });
77
+ await commands_build.buildCommand({ publicUrl: url });
81
78
  if (!(await fs.pathExists(paths.shadowBuild))) {
82
79
  throw new Error(`No build output at ${paths.shadowBuild} after build step.`);
83
80
  }
@@ -128,7 +125,7 @@ async function deployCommand(opts = {}) {
128
125
  // The two are separate endpoints, so the CLI picks based on the version it
129
126
  // was handed.
130
127
  if (nextVersion === 1) {
131
- const visibility = await resolveFirstDeployVisibility(appName, opts.json);
128
+ const visibility = await resolveFirstDeployVisibility(appName);
132
129
  util_logger.info(`registering app "${appName}" → v${nextVersion} (${visibility})`);
133
130
  await registerApp(appName, token, nextVersion, entry, visibility, gitRemote);
134
131
  }
@@ -221,8 +218,8 @@ async function updateApp(appName, token, version, entry, gitRemote) {
221
218
  // First deploy only: decide whether the app is born public or private. The
222
219
  // choice is passed to the register endpoint (default private). Non-interactive
223
220
  // runs (--json or no TTY) always default to private.
224
- async function resolveFirstDeployVisibility(appName, json) {
225
- if (json || !process.stdout.isTTY) {
221
+ async function resolveFirstDeployVisibility(appName) {
222
+ if (util_logger.getOutputMode() === 'json' || !process.stdout.isTTY) {
226
223
  return 'private';
227
224
  }
228
225
  const rl = node_readline.createInterface({ input: process.stdin, output: process.stdout });
@@ -1,5 +1,4 @@
1
1
  export interface DevOptions {
2
- json?: boolean;
3
2
  open?: boolean;
4
3
  }
5
4
  export declare function devCommand(opts?: DevOptions): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAKD,wBAAsB,UAAU,CAAC,IAAI,GAAE,UAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA6ErE"}
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAKD,wBAAsB,UAAU,CAAC,IAAI,GAAE,UAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAyErE"}
@@ -19,9 +19,6 @@ const fs__default = /*#__PURE__*/_interopDefault(fs$1);
19
19
  const TRIDENT_READY_PATTERN = /Server started at/i;
20
20
  // Should be run from the consumer app directory — uses process.cwd() to locate it.
21
21
  async function devCommand(opts = {}) {
22
- if (opts.json) {
23
- util_logger.setOutputMode('json');
24
- }
25
22
  const ctx = await shadow_prepare.prepareShadow();
26
23
  const { port } = ctx;
27
24
  const url = `https://bigbrain.me/bigbrain-vibe/${ctx.appName}?zth_local=${port}`;
@@ -1,5 +1,2 @@
1
- export interface DoctorOptions {
2
- json?: boolean;
3
- }
4
- export declare function doctorCommand(opts?: DoctorOptions): Promise<void>;
1
+ export declare function doctorCommand(): Promise<void>;
5
2
  //# sourceMappingURL=doctor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AA4BA,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAiSD,wBAAsB,aAAa,CAAC,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAyE3E"}
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AA2TA,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAqEnD"}
@@ -263,10 +263,7 @@ function renderCheck(c) {
263
263
  process.stdout.write(` ${icon} ${label}${detail}\n`);
264
264
  }
265
265
  // ── command ───────────────────────────────────────────────────────────────────
266
- async function doctorCommand(opts = {}) {
267
- if (opts.json) {
268
- util_logger.setOutputMode('json');
269
- }
266
+ async function doctorCommand() {
270
267
  let pluginsJson = null;
271
268
  try {
272
269
  if (await fs.pathExists(CLAUDE_PLUGINS_JSON)) {
@@ -292,7 +289,7 @@ async function doctorCommand(opts = {}) {
292
289
  ];
293
290
  const allChecks = sections.flatMap(s => s.checks);
294
291
  const issues = allChecks.filter(c => c.status !== 'ok');
295
- if (opts.json) {
292
+ if (util_logger.getOutputMode() === 'json') {
296
293
  util_logger.output('', {
297
294
  ok: issues.filter(c => c.status === 'fail').length === 0,
298
295
  checks: allChecks,
@@ -1,5 +1,2 @@
1
- export interface EditOptions {
2
- json?: boolean;
3
- }
4
- export declare function editCommand(appName: string, opts?: EditOptions): Promise<void>;
1
+ export declare function editCommand(appName: string): Promise<void>;
5
2
  //# sourceMappingURL=edit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../src/commands/edit.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+CxF"}
1
+ {"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../src/commands/edit.ts"],"names":[],"mappings":"AAWA,wBAAsB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA2ChE"}
@@ -15,10 +15,7 @@ const _interopDefault = e => e && e.__esModule ? e : { default: e };
15
15
 
16
16
  const path__default = /*#__PURE__*/_interopDefault(path);
17
17
 
18
- async function editCommand(appName, opts = {}) {
19
- if (opts.json) {
20
- util_logger.setOutputMode('json');
21
- }
18
+ async function editCommand(appName) {
22
19
  const workspace = await util_workspace.assertWorkspace();
23
20
  const mfName = util_appName.mfAppName(appName);
24
21
  const app = await util_broker_app.fetchApp(mfName);
@@ -10,7 +10,6 @@ export interface GenerateZ2HTokenOptions {
10
10
  noBrowser?: boolean;
11
11
  /** Override the page URL — useful when pointing at staging. */
12
12
  url?: string;
13
- json?: boolean;
14
13
  }
15
14
  export declare function generateZ2HTokenCommand(opts?: GenerateZ2HTokenOptions): Promise<void>;
16
15
  //# sourceMappingURL=generate-z2h-token.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-z2h-token.d.ts","sourceRoot":"","sources":["../../src/commands/generate-z2h-token.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,sBAAsB,yDAAyD,CAAC;AAC7F,eAAO,MAAM,mBAAmB,SAAU,CAAC;AAE3C,MAAM,WAAW,uBAAuB;IACtC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,+DAA+D;IAC/D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAwDD,wBAAsB,uBAAuB,CAAC,IAAI,GAAE,uBAA4B,GAAG,OAAO,CAAC,IAAI,CAAC,CA+B/F"}
1
+ {"version":3,"file":"generate-z2h-token.d.ts","sourceRoot":"","sources":["../../src/commands/generate-z2h-token.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,sBAAsB,yDAAyD,CAAC;AAC7F,eAAO,MAAM,mBAAmB,SAAU,CAAC;AAE3C,MAAM,WAAW,uBAAuB;IACtC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,+DAA+D;IAC/D,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAwDD,wBAAsB,uBAAuB,CAAC,IAAI,GAAE,uBAA4B,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B/F"}
@@ -62,9 +62,6 @@ async function runLoopbackFlow(pageUrl) {
62
62
  }
63
63
  }
64
64
  async function generateZ2HTokenCommand(opts = {}) {
65
- if (opts.json) {
66
- util_logger.setOutputMode('json');
67
- }
68
65
  const pageUrl = opts.url ?? process.env.Z2H_TOKEN_PAGE_URL ?? DEFAULT_TOKEN_PAGE_URL;
69
66
  // --no-browser bypasses both auto-open and the loopback round-trip — the
70
67
  // user opens the URL themselves and pastes the token. Useful when the
@@ -1,12 +1,8 @@
1
1
  export interface GrantOptions {
2
2
  public?: boolean;
3
3
  level?: 'owner' | 'editor' | 'viewer';
4
- json?: boolean;
5
4
  }
6
5
  export declare function grantCommand(email: string | undefined, opts: GrantOptions): Promise<void>;
7
6
  export declare function revokeCommand(email: string | undefined, opts: GrantOptions): Promise<void>;
8
- export interface TransferOwnerOptions {
9
- json?: boolean;
10
- }
11
- export declare function transferOwnerCommand(email: string | undefined, opts: TransferOwnerOptions): Promise<void>;
7
+ export declare function transferOwnerCommand(email: string | undefined): Promise<void>;
12
8
  //# sourceMappingURL=grant.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"grant.d.ts","sourceRoot":"","sources":["../../src/commands/grant.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACtC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAkBD,wBAAsB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA+B/F;AAED,wBAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BhG;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB/G"}
1
+ {"version":3,"file":"grant.d.ts","sourceRoot":"","sources":["../../src/commands/grant.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;CACvC;AAkBD,wBAAsB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B/F;AAED,wBAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBhG;AAED,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBnF"}
@@ -17,9 +17,6 @@ async function postGrant(appName, token, body) {
17
17
  }
18
18
  }
19
19
  async function grantCommand(email, opts) {
20
- if (opts.json) {
21
- util_logger.setOutputMode('json');
22
- }
23
20
  if (!opts.public && !email) {
24
21
  throw new Error('Specify what to grant — e.g. --public or provide an email');
25
22
  }
@@ -45,9 +42,6 @@ async function grantCommand(email, opts) {
45
42
  util_logger.output(`[z2h-cli] "${appName}" granted to: ${parts.join(', ')}`, { ok: true, appName, granted: parts });
46
43
  }
47
44
  async function revokeCommand(email, opts) {
48
- if (opts.json) {
49
- util_logger.setOutputMode('json');
50
- }
51
45
  if (!opts.public && !email) {
52
46
  throw new Error('Specify what to revoke — e.g. --public or provide an email');
53
47
  }
@@ -68,10 +62,7 @@ async function revokeCommand(email, opts) {
68
62
  : `[z2h-cli] "${appName}" is now private (owners/admins only)`;
69
63
  util_logger.output(msg, { ok: true, appName, revoked });
70
64
  }
71
- async function transferOwnerCommand(email, opts) {
72
- if (opts.json) {
73
- util_logger.setOutputMode('json');
74
- }
65
+ async function transferOwnerCommand(email) {
75
66
  if (!email) {
76
67
  throw new Error('Specify the new owner — e.g. z2h-cli transfer-owner someone@monday.com');
77
68
  }
@@ -1,6 +1,5 @@
1
1
  export interface MigrateOptions {
2
2
  dryRun?: boolean;
3
- json?: boolean;
4
3
  }
5
4
  export declare function migrateCommand(cliVersion: string, opts?: MigrateOptions): Promise<void>;
6
5
  //# sourceMappingURL=migrate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/commands/migrate.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAMjG"}
1
+ {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/commands/migrate.ts"],"names":[],"mappings":"AA6CA,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkGjG"}
@@ -1,13 +1,115 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
+ const node_module = require('node:module');
4
+ const path = require('node:path');
5
+ const node_url = require('node:url');
6
+ const fs = require('fs-extra');
7
+ const semver = require('semver');
3
8
  const util_logger = require('../util/logger.js');
4
- const migrations_autoMigrate = require('../migrations/auto-migrate.js');
9
+ const util_workspace = require('../util/workspace.js');
5
10
 
11
+ var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
12
+ const _interopDefault = e => e && e.__esModule ? e : { default: e };
13
+
14
+ const path__default = /*#__PURE__*/_interopDefault(path);
15
+ const semver__default = /*#__PURE__*/_interopDefault(semver);
16
+
17
+ const STATE_FILE = '.z2h-migrations-state.json';
18
+ // ─── Helpers ───
19
+ async function readMigrationState(workspaceHome) {
20
+ const statePath = path__default.default.join(workspaceHome, STATE_FILE);
21
+ if (!(await fs.pathExists(statePath))) {
22
+ return null;
23
+ }
24
+ try {
25
+ return (await fs.readJson(statePath));
26
+ }
27
+ catch {
28
+ return null;
29
+ }
30
+ }
31
+ async function writeMigrationState(workspaceHome, state) {
32
+ const statePath = path__default.default.join(workspaceHome, STATE_FILE);
33
+ await fs.writeJson(statePath, state, { spaces: 2 });
34
+ }
6
35
  async function migrateCommand(cliVersion, opts = {}) {
7
- if (opts.json) {
8
- util_logger.setOutputMode('json');
36
+ const workspaceHome = util_workspace.getWorkspaceHome();
37
+ if (!(await util_workspace.isZ2hWorkspace(workspaceHome))) {
38
+ util_logger.warn('no Z2H workspace found');
39
+ return;
40
+ }
41
+ const state = await readMigrationState(workspaceHome);
42
+ const lastVersion = state?.lastMigratedVersion ?? '0.0.0';
43
+ if (!semver__default.default.gt(cliVersion, lastVersion)) {
44
+ util_logger.info('workspace is up to date — no migrations pending');
45
+ return;
46
+ }
47
+ util_logger.info(`migrating workspace from v${lastVersion} → v${cliVersion}...`);
48
+ // migrations.json is at the package root — two dirs up from dist/migrations/
49
+ const thisDir = path__default.default.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('commands/migrate.js', document.baseURI).href))));
50
+ const migrationsJsonPath = path__default.default.resolve(thisDir, '..', '..', 'migrations.json');
51
+ if (!(await fs.pathExists(migrationsJsonPath))) {
52
+ util_logger.warn('migrations.json not found — skipping migrations');
53
+ return;
54
+ }
55
+ const migrationsJson = (await fs.readJson(migrationsJsonPath));
56
+ // Filter to pending migrations (version > lastVersion AND <= cliVersion).
57
+ // CONVENTION: a migration's `version` field must equal the CLI release it
58
+ // ships with (not the feature branch version). This ensures the `gt` check
59
+ // always catches a migration on the exact upgrade that introduces it.
60
+ const pending = Object.entries(migrationsJson.migrations)
61
+ .filter(([, entry]) => semver__default.default.gt(entry.version, lastVersion) && semver__default.default.lte(entry.version, cliVersion))
62
+ .sort(([, a], [, b]) => semver__default.default.compare(a.version, b.version));
63
+ if (opts.dryRun) {
64
+ util_logger.info(`${pending.length} pending migration(s) (dry-run — no changes will be applied):`);
65
+ for (const [, entry] of pending) {
66
+ util_logger.info(` - ${entry.description} (v${entry.version})`);
67
+ }
68
+ return;
69
+ }
70
+ if (pending.length === 0) {
71
+ await writeMigrationState(workspaceHome, { lastMigratedVersion: cliVersion });
72
+ return;
73
+ }
74
+ const nxReady = await util_workspace.ensureWorkspaceNx(workspaceHome);
75
+ if (!nxReady) {
76
+ return;
77
+ }
78
+ util_logger.info(`applying ${pending.length} workspace migration(s)...`);
79
+ // Resolve NX from the workspace's node_modules (not from CLI's own deps)
80
+ const wsRequire = node_module.createRequire(path__default.default.join(workspaceHome, 'package.json'));
81
+ const { FsTree, flushChanges } = wsRequire('nx/src/generators/tree');
82
+ let needsInstall = false;
83
+ for (const [name, entry] of pending) {
84
+ const tree = new FsTree(workspaceHome, false);
85
+ try {
86
+ const factoryPath = path__default.default.resolve(path__default.default.dirname(migrationsJsonPath), entry.migrate);
87
+ const mod = require(factoryPath);
88
+ const fn = mod.default || mod;
89
+ fn(tree);
90
+ const changes = tree.listChanges();
91
+ if (changes.length > 0) {
92
+ if (changes.some(c => c.path.endsWith('package.json'))) {
93
+ needsInstall = true;
94
+ }
95
+ flushChanges(workspaceHome, changes);
96
+ util_logger.info(` ✓ ${entry.description}`);
97
+ }
98
+ else {
99
+ util_logger.info(` ○ ${entry.description} (no changes needed)`);
100
+ }
101
+ }
102
+ catch (err) {
103
+ const errorMessage = `migration "${name}" failed: ${err.message}`;
104
+ util_logger.errorLog(`${errorMessage}\nSkipping remaining migrations — run "z2h-cli migrate" to retry.`);
105
+ throw new Error(errorMessage);
106
+ }
107
+ }
108
+ if (needsInstall) {
109
+ await util_workspace.runYarnInstall(workspaceHome, 'package.json changed');
9
110
  }
10
- await migrations_autoMigrate.autoMigrate(cliVersion, opts.dryRun);
111
+ await writeMigrationState(workspaceHome, { lastMigratedVersion: cliVersion });
112
+ util_logger.info('workspace migrations complete.');
11
113
  }
12
114
 
13
115
  exports.migrateCommand = migrateCommand;
@@ -2,7 +2,6 @@ import { type AppTag, type CatalogEntry } from '../util/tags';
2
2
  export interface TagOptions {
3
3
  /** Repeatable `--tag` — sets the full tag set non-interactively. */
4
4
  tag?: string[];
5
- json?: boolean;
6
5
  }
7
6
  /**
8
7
  * Closed-list prompt: one numbered pick per dimension (app type, team). Enter
@@ -1 +1 @@
1
- {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../src/commands/tag.ts"],"names":[],"mappings":"AAMA,OAAO,EAML,KAAK,MAAM,EACX,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,UAAU;IACzB,oEAAoE;IACpE,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAgCD;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA0ClH;AAED,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAgC5F"}
1
+ {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../src/commands/tag.ts"],"names":[],"mappings":"AAMA,OAAO,EAML,KAAK,MAAM,EACX,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,UAAU;IACzB,oEAAoE;IACpE,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;CAChB;AAgCD;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA0ClH;AAED,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B5F"}
@@ -87,9 +87,6 @@ async function promptForTags(appSlug, catalog, current) {
87
87
  }
88
88
  }
89
89
  async function tagCommand(appArg, opts) {
90
- if (opts.json) {
91
- util_logger.setOutputMode('json');
92
- }
93
90
  const appSlug = await resolveAppSlug(appArg);
94
91
  // Non-interactive write: `--tag` flags set the full set directly.
95
92
  if (opts.tag && opts.tag.length > 0) {
@@ -101,7 +98,7 @@ async function tagCommand(appArg, opts) {
101
98
  // Read-only listing: agents (`--json`) and any non-TTY caller get the catalog
102
99
  // + current tags without a prompt — then they set tags via `--tag`. This also
103
100
  // avoids hanging on `readline` when no human is attached to stdin.
104
- if (opts.json || !process.stdin.isTTY) {
101
+ if (util_logger.getOutputMode() === 'json' || !process.stdin.isTTY) {
105
102
  util_logger.output(`[z2h-cli] "${appSlug}"\n catalog: ${catalog.map(t => `${t.name} (${util_tags.TAG_TYPE_LABELS[t.type]})`).join(', ') || '(none)'}\n current: ${formatTags(current)}`, { ok: true, appName: appSlug, catalog, current });
106
103
  return;
107
104
  }
@@ -1,5 +1,4 @@
1
1
  export interface BuildOptions {
2
- json?: boolean;
3
2
  publicUrl?: string;
4
3
  }
5
4
  export declare function buildCommand(opts?: BuildOptions): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/commands/build.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,wBAAsB,YAAY,CAAC,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoCzE"}
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/commands/build.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,wBAAsB,YAAY,CAAC,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgCzE"}
@@ -1,13 +1,10 @@
1
1
  import { pathExists } from 'fs-extra';
2
2
  import { execa } from 'execa';
3
- import { setOutputMode, info, output } from '../util/logger.mjs';
3
+ import { info, output } from '../util/logger.mjs';
4
4
  import { prepareShadow } from '../shadow/prepare.mjs';
5
5
 
6
6
  // Should be run from the consumer app directory — uses process.cwd() to locate it.
7
7
  async function buildCommand(opts = {}) {
8
- if (opts.json) {
9
- setOutputMode('json');
10
- }
11
8
  const ctx = await prepareShadow();
12
9
  // Typecheck against the shadow's tsconfig (the consumer dir has none).
13
10
  // Errors fail the build before we waste time on the Trident pipeline.
@@ -1,5 +1,2 @@
1
- export interface CleanOptions {
2
- json?: boolean;
3
- }
4
- export declare function cleanCommand(opts?: CleanOptions): Promise<void>;
1
+ export declare function cleanCommand(): Promise<void>;
5
2
  //# sourceMappingURL=clean.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clean.d.ts","sourceRoot":"","sources":["../../../src/commands/clean.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAGD,wBAAsB,YAAY,CAAC,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBzE"}
1
+ {"version":3,"file":"clean.d.ts","sourceRoot":"","sources":["../../../src/commands/clean.ts"],"names":[],"mappings":"AAKA,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAclD"}
@@ -1,12 +1,9 @@
1
1
  import { pathExists, remove } from 'fs-extra';
2
- import { setOutputMode, info, output } from '../util/logger.mjs';
2
+ import { info, output } from '../util/logger.mjs';
3
3
  import { resolveConsumerPaths } from '../shadow/paths.mjs';
4
4
 
5
5
  // Should be run from the consumer app directory — uses process.cwd() to locate it.
6
- async function cleanCommand(opts = {}) {
7
- if (opts.json) {
8
- setOutputMode('json');
9
- }
6
+ async function cleanCommand() {
10
7
  const paths = resolveConsumerPaths(process.cwd());
11
8
  const existed = await pathExists(paths.shadowDir);
12
9
  if (existed) {
@@ -1,5 +1,2 @@
1
- export interface CreateWorkspaceOptions {
2
- json?: boolean;
3
- }
4
- export declare function createWorkspaceCommand(opts?: CreateWorkspaceOptions): Promise<void>;
1
+ export declare function createWorkspaceCommand(): Promise<void>;
5
2
  //# sourceMappingURL=create-workspace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-workspace.d.ts","sourceRoot":"","sources":["../../../src/commands/create-workspace.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,sBAAsB,CAAC,IAAI,GAAE,sBAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CA8C7F"}
1
+ {"version":3,"file":"create-workspace.d.ts","sourceRoot":"","sources":["../../../src/commands/create-workspace.ts"],"names":[],"mappings":"AASA,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CA0C5D"}
@@ -1,16 +1,13 @@
1
1
  import path from 'node:path';
2
2
  import { readFile } from 'node:fs/promises';
3
3
  import { pathExists, readdir, ensureDir, writeFile, copy } from 'fs-extra';
4
- import { setOutputMode, output, info } from '../util/logger.mjs';
4
+ import { output, info } from '../util/logger.mjs';
5
5
  import { getWorkspaceHome } from '../util/workspace.mjs';
6
6
  import { getTemplatesDir } from '../util/templates.mjs';
7
7
  import { runYarnInstall } from '../util/npm/install.mjs';
8
8
  import { workspaceYarnrcContents, workspaceNpmrcContents } from '../util/npm/broker-config.mjs';
9
9
 
10
- async function createWorkspaceCommand(opts = {}) {
11
- if (opts.json) {
12
- setOutputMode('json');
13
- }
10
+ async function createWorkspaceCommand() {
14
11
  const home = getWorkspaceHome();
15
12
  const templatesDir = getTemplatesDir();
16
13
  const wsTemplatesDir = path.join(templatesDir, 'workspace');
@@ -5,7 +5,6 @@ export interface CreateOptions {
5
5
  htmlFile?: string;
6
6
  remote?: RemoteType;
7
7
  repoUrl?: string;
8
- json?: boolean;
9
8
  }
10
9
  export declare function createCommand(appName: string, opts?: CreateOptions): Promise<void>;
11
10
  //# sourceMappingURL=create.d.ts.map