@mondaydotcomorg/z2h-cli 0.1.0 → 0.1.1

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 (114) hide show
  1. package/dist/commands/__tests__/create-workspace.test.d.ts +2 -0
  2. package/dist/commands/__tests__/create-workspace.test.d.ts.map +1 -0
  3. package/dist/commands/__tests__/create.test.d.ts +2 -0
  4. package/dist/commands/__tests__/create.test.d.ts.map +1 -0
  5. package/dist/commands/create-workspace.d.ts +5 -0
  6. package/dist/commands/create-workspace.d.ts.map +1 -0
  7. package/dist/commands/create-workspace.js +80 -0
  8. package/dist/commands/create.d.ts +7 -0
  9. package/dist/commands/create.d.ts.map +1 -0
  10. package/dist/commands/create.js +97 -0
  11. package/dist/constants.d.ts +1 -14
  12. package/dist/constants.d.ts.map +1 -1
  13. package/dist/constants.js +11 -34
  14. package/dist/esm/commands/__tests__/create-workspace.test.d.ts +2 -0
  15. package/dist/esm/commands/__tests__/create-workspace.test.d.ts.map +1 -0
  16. package/dist/esm/commands/__tests__/create.test.d.ts +2 -0
  17. package/dist/esm/commands/__tests__/create.test.d.ts.map +1 -0
  18. package/dist/esm/commands/create-workspace.d.ts +5 -0
  19. package/dist/esm/commands/create-workspace.d.ts.map +1 -0
  20. package/dist/esm/commands/create-workspace.mjs +74 -0
  21. package/dist/esm/commands/create.d.ts +7 -0
  22. package/dist/esm/commands/create.d.ts.map +1 -0
  23. package/dist/esm/commands/create.mjs +91 -0
  24. package/dist/esm/constants.d.ts +1 -14
  25. package/dist/esm/constants.d.ts.map +1 -1
  26. package/dist/esm/constants.mjs +11 -32
  27. package/dist/esm/index.mjs +28 -0
  28. package/dist/esm/shadow/__tests__/consumer-pkg.test.d.ts +2 -0
  29. package/dist/esm/shadow/__tests__/consumer-pkg.test.d.ts.map +1 -0
  30. package/dist/esm/shadow/__tests__/merge-package-json.test.d.ts +2 -0
  31. package/dist/esm/shadow/__tests__/merge-package-json.test.d.ts.map +1 -0
  32. package/dist/esm/shadow/consumer-pkg.d.ts +5 -15
  33. package/dist/esm/shadow/consumer-pkg.d.ts.map +1 -1
  34. package/dist/esm/shadow/consumer-pkg.mjs +11 -72
  35. package/dist/esm/shadow/merge-package-json.d.ts +10 -4
  36. package/dist/esm/shadow/merge-package-json.d.ts.map +1 -1
  37. package/dist/esm/shadow/merge-package-json.mjs +12 -11
  38. package/dist/esm/shadow/sync.mjs +2 -2
  39. package/dist/esm/templates/app/claude-settings.mjs +10 -0
  40. package/dist/esm/types.d.ts +0 -1
  41. package/dist/esm/types.d.ts.map +1 -1
  42. package/dist/esm/util/__tests__/templates.test.d.ts +2 -0
  43. package/dist/esm/util/__tests__/templates.test.d.ts.map +1 -0
  44. package/dist/esm/util/__tests__/workspace-templates-shipped.test.d.ts +2 -0
  45. package/dist/esm/util/__tests__/workspace-templates-shipped.test.d.ts.map +1 -0
  46. package/dist/esm/util/__tests__/workspace.test.d.ts +2 -0
  47. package/dist/esm/util/__tests__/workspace.test.d.ts.map +1 -0
  48. package/dist/esm/util/s3/upload.mjs +1 -1
  49. package/dist/esm/util/templates.d.ts +22 -0
  50. package/dist/esm/util/templates.d.ts.map +1 -0
  51. package/dist/esm/util/templates.mjs +36 -0
  52. package/dist/esm/util/workspace.d.ts +20 -0
  53. package/dist/esm/util/workspace.d.ts.map +1 -0
  54. package/dist/esm/util/workspace.mjs +46 -0
  55. package/dist/index.js +28 -0
  56. package/dist/shadow/__tests__/consumer-pkg.test.d.ts +2 -0
  57. package/dist/shadow/__tests__/consumer-pkg.test.d.ts.map +1 -0
  58. package/dist/shadow/__tests__/merge-package-json.test.d.ts +2 -0
  59. package/dist/shadow/__tests__/merge-package-json.test.d.ts.map +1 -0
  60. package/dist/shadow/consumer-pkg.d.ts +5 -15
  61. package/dist/shadow/consumer-pkg.d.ts.map +1 -1
  62. package/dist/shadow/consumer-pkg.js +10 -72
  63. package/dist/shadow/merge-package-json.d.ts +10 -4
  64. package/dist/shadow/merge-package-json.d.ts.map +1 -1
  65. package/dist/shadow/merge-package-json.js +11 -10
  66. package/dist/shadow/sync.js +2 -2
  67. package/dist/templates/app/claude-settings.js +13 -0
  68. package/dist/types.d.ts +0 -1
  69. package/dist/types.d.ts.map +1 -1
  70. package/dist/util/__tests__/templates.test.d.ts +2 -0
  71. package/dist/util/__tests__/templates.test.d.ts.map +1 -0
  72. package/dist/util/__tests__/workspace-templates-shipped.test.d.ts +2 -0
  73. package/dist/util/__tests__/workspace-templates-shipped.test.d.ts.map +1 -0
  74. package/dist/util/__tests__/workspace.test.d.ts +2 -0
  75. package/dist/util/__tests__/workspace.test.d.ts.map +1 -0
  76. package/dist/util/s3/upload.js +1 -1
  77. package/dist/util/templates.d.ts +22 -0
  78. package/dist/util/templates.d.ts.map +1 -0
  79. package/dist/util/templates.js +45 -0
  80. package/dist/util/workspace.d.ts +20 -0
  81. package/dist/util/workspace.d.ts.map +1 -0
  82. package/dist/util/workspace.js +57 -0
  83. package/package.json +5 -3
  84. package/src/commands/__tests__/create-workspace.test.ts +78 -0
  85. package/src/commands/__tests__/create.test.ts +111 -0
  86. package/src/commands/create-workspace.ts +85 -0
  87. package/src/commands/create.ts +113 -0
  88. package/src/constants.ts +11 -34
  89. package/src/index.ts +28 -0
  90. package/src/shadow/__tests__/consumer-pkg.test.ts +56 -0
  91. package/src/shadow/__tests__/merge-package-json.test.ts +44 -0
  92. package/src/shadow/consumer-pkg.ts +10 -88
  93. package/src/shadow/merge-package-json.ts +12 -11
  94. package/src/shadow/sync.ts +2 -2
  95. package/src/templates/app/CLAUDE.md +72 -0
  96. package/src/templates/app/claude-settings.json +7 -0
  97. package/src/templates/app/default-index.tsx.tmpl +21 -0
  98. package/src/templates/app/gitignore +4 -0
  99. package/src/templates/app/html-index.tsx.tmpl +21 -0
  100. package/src/templates/app/package.json.tmpl +13 -0
  101. package/src/templates/workspace/README.md +39 -0
  102. package/src/templates/workspace/gitignore +23 -0
  103. package/src/templates/workspace/npmrc +3 -0
  104. package/src/templates/workspace/nvmrc +1 -0
  105. package/src/templates/workspace/package.json.tmpl +23 -0
  106. package/src/templates/workspace/yarn-releases/yarn-4.5.1.cjs +934 -0
  107. package/src/templates/workspace/yarnrc.yml +7 -0
  108. package/src/types.ts +4 -1
  109. package/src/util/__tests__/templates.test.ts +27 -0
  110. package/src/util/__tests__/workspace-templates-shipped.test.ts +35 -0
  111. package/src/util/__tests__/workspace.test.ts +65 -0
  112. package/src/util/s3/upload.ts +1 -1
  113. package/src/util/templates.ts +37 -0
  114. package/src/util/workspace.ts +52 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consumer-pkg.test.d.ts","sourceRoot":"","sources":["../../../../src/shadow/__tests__/consumer-pkg.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=merge-package-json.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge-package-json.test.d.ts","sourceRoot":"","sources":["../../../../src/shadow/__tests__/merge-package-json.test.ts"],"names":[],"mappings":""}
@@ -1,21 +1,11 @@
1
1
  import type { ConsumerPkg } from '../types';
2
2
  /**
3
- * Return the consumer's `workspaces` field extended with `.zth`. Handles
4
- * all three shapes: missing, array form, or object form (`{ packages }`).
5
- * Always extends — never replaces the user's existing entries.
6
- */
7
- export declare function ensureConsumerWorkspaces(pkg: ConsumerPkg): {
8
- changed: boolean;
9
- workspaces: ConsumerPkg['workspaces'];
10
- };
11
- /**
12
- * Idempotently reshape the consumer's package.json so that:
13
- * - it is marked `"private": true`
14
- * - `.zth` is declared as a yarn workspace member (yarn will hoist)
15
- * - the protected runtime deps are present at compatible versions
16
- * - the protected dev deps are present at compatible versions
3
+ * The consumer pkg is a thin manifest. Z2H apps live inside a yarn
4
+ * workspace at `~/zth-projects/`; runtime and dev deps come from the
5
+ * workspace root, hoisted into a single `node_modules/`.
17
6
  *
18
- * Always extends — never overrides existing fields.
7
+ * The only thing this file enforces today is `private: true` — apps must
8
+ * never accidentally publish to npm.
19
9
  */
20
10
  export declare function ensureConsumerPkg(pkgPath: string, pkg: ConsumerPkg): Promise<{
21
11
  changed: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"consumer-pkg.d.ts","sourceRoot":"","sources":["../../../src/shadow/consumer-pkg.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,WAAW,GAAG;IAC1D,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;CACvC,CAsBA;AAqBD;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,WAAW,GACf,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,WAAW,CAAA;CAAE,CAAC,CAgCjD"}
1
+ {"version":3,"file":"consumer-pkg.d.ts","sourceRoot":"","sources":["../../../src/shadow/consumer-pkg.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,WAAW,GACf,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,WAAW,CAAA;CAAE,CAAC,CAOjD"}
@@ -1,81 +1,20 @@
1
1
  import { writeJson } from 'fs-extra';
2
- import { SHADOW_DIR_NAME, PROTECTED_DEPS, PROTECTED_DEV_DEPS } from '../constants.mjs';
3
2
 
4
3
  /**
5
- * Return the consumer's `workspaces` field extended with `.zth`. Handles
6
- * all three shapes: missing, array form, or object form (`{ packages }`).
7
- * Always extends — never replaces the user's existing entries.
8
- */
9
- function ensureConsumerWorkspaces(pkg) {
10
- const { workspaces } = pkg;
11
- if (Array.isArray(workspaces)) {
12
- if (workspaces.includes(SHADOW_DIR_NAME)) {
13
- return { changed: false, workspaces };
14
- }
15
- return { changed: true, workspaces: [...workspaces, SHADOW_DIR_NAME] };
16
- }
17
- if (workspaces && typeof workspaces === 'object') {
18
- const pkgs = workspaces.packages ?? [];
19
- if (pkgs.includes(SHADOW_DIR_NAME)) {
20
- return { changed: false, workspaces };
21
- }
22
- return {
23
- changed: true,
24
- workspaces: { ...workspaces, packages: [...pkgs, SHADOW_DIR_NAME] },
25
- };
26
- }
27
- return { changed: true, workspaces: [SHADOW_DIR_NAME] };
28
- }
29
- /**
30
- * Extend a deps map with the protected entries; only fills in missing ones,
31
- * never overrides versions the consumer already pinned.
32
- */
33
- function applyProtected(current, protectedMap) {
34
- const next = { ...(current ?? {}) };
35
- let changed = false;
36
- for (const [name, version] of Object.entries(protectedMap)) {
37
- if (!next[name]) {
38
- next[name] = version;
39
- changed = true;
40
- }
41
- }
42
- return { changed, next };
43
- }
44
- /**
45
- * Idempotently reshape the consumer's package.json so that:
46
- * - it is marked `"private": true`
47
- * - `.zth` is declared as a yarn workspace member (yarn will hoist)
48
- * - the protected runtime deps are present at compatible versions
49
- * - the protected dev deps are present at compatible versions
4
+ * The consumer pkg is a thin manifest. Z2H apps live inside a yarn
5
+ * workspace at `~/zth-projects/`; runtime and dev deps come from the
6
+ * workspace root, hoisted into a single `node_modules/`.
50
7
  *
51
- * Always extends — never overrides existing fields.
8
+ * The only thing this file enforces today is `private: true` — apps must
9
+ * never accidentally publish to npm.
52
10
  */
53
11
  async function ensureConsumerPkg(pkgPath, pkg) {
54
- let changed = false;
55
- const next = { ...pkg };
56
- if (next.private !== true) {
57
- next.private = true;
58
- changed = true;
59
- }
60
- const ws = ensureConsumerWorkspaces(next);
61
- if (ws.changed) {
62
- next.workspaces = ws.workspaces;
63
- changed = true;
64
- }
65
- const deps = applyProtected(next.dependencies, PROTECTED_DEPS);
66
- if (deps.changed) {
67
- next.dependencies = deps.next;
68
- changed = true;
69
- }
70
- const devDeps = applyProtected(next.devDependencies, PROTECTED_DEV_DEPS);
71
- if (devDeps.changed) {
72
- next.devDependencies = devDeps.next;
73
- changed = true;
74
- }
75
- if (changed) {
76
- await writeJson(pkgPath, next, { spaces: 2 });
12
+ if (pkg.private === true) {
13
+ return { changed: false, pkg };
77
14
  }
78
- return { changed, pkg: next };
15
+ const next = { ...pkg, private: true };
16
+ await writeJson(pkgPath, next, { spaces: 2 });
17
+ return { changed: true, pkg: next };
79
18
  }
80
19
 
81
- export { ensureConsumerPkg, ensureConsumerWorkspaces };
20
+ export { ensureConsumerPkg };
@@ -1,9 +1,15 @@
1
1
  import type { ConsumerPkg, ShadowPkg } from '../types';
2
2
  /**
3
- * Build the shadow package.json. Declares the shared runtime deps as
4
- * peerDependencies — yarn resolves them from the workspace root (the
5
- * consumer's package.json), guaranteeing a single React instance across
6
- * the wrapper and consumer src.
3
+ * Build the shadow package.json.
4
+ *
5
+ * Runtime deps live at the workspace root (`~/zth-projects/`) and are
6
+ * hoisted in via yarn workspaces — no need to mirror them here. The shadow
7
+ * only declares the toolchain it directly executes (`trident-toolkit`) so
8
+ * yarn berry wires the `trident` bin into the shadow's script PATH.
9
+ *
10
+ * The `@trident/` scope is preserved so trident-toolkit strips it and the
11
+ * emitted bundle becomes `MF-mf-<appName>`, matching the URL the host MF
12
+ * routes to.
7
13
  */
8
14
  export declare function buildShadowPkg(consumerPkg: ConsumerPkg): ShadowPkg;
9
15
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"merge-package-json.d.ts","sourceRoot":"","sources":["../../../src/shadow/merge-package-json.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEvD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,CAalE;AAgBD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,CAW9D;AAED,wBAAsB,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5F"}
1
+ {"version":3,"file":"merge-package-json.d.ts","sourceRoot":"","sources":["../../../src/shadow/merge-package-json.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,CAQlE;AAgBD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,CAW9D;AAED,wBAAsB,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5F"}
@@ -1,26 +1,27 @@
1
1
  import crypto from 'node:crypto';
2
2
  import { writeJson } from 'fs-extra';
3
- import { SHADOW_SCRIPTS, PROTECTED_DEPS, WORKSPACE_DEV_DEPS } from '../constants.mjs';
3
+ import { SHADOW_SCRIPTS, SHADOW_DEV_DEPS } from '../constants.mjs';
4
4
  import { mfAppName } from '../util/app-name.mjs';
5
5
 
6
6
  /**
7
- * Build the shadow package.json. Declares the shared runtime deps as
8
- * peerDependencies — yarn resolves them from the workspace root (the
9
- * consumer's package.json), guaranteeing a single React instance across
10
- * the wrapper and consumer src.
7
+ * Build the shadow package.json.
8
+ *
9
+ * Runtime deps live at the workspace root (`~/zth-projects/`) and are
10
+ * hoisted in via yarn workspaces — no need to mirror them here. The shadow
11
+ * only declares the toolchain it directly executes (`trident-toolkit`) so
12
+ * yarn berry wires the `trident` bin into the shadow's script PATH.
13
+ *
14
+ * The `@trident/` scope is preserved so trident-toolkit strips it and the
15
+ * emitted bundle becomes `MF-mf-<appName>`, matching the URL the host MF
16
+ * routes to.
11
17
  */
12
18
  function buildShadowPkg(consumerPkg) {
13
- // Use the `@trident/` scope so trident-toolkit strips it and the emitted
14
- // bundle becomes `MF-mf-<appName>`, matching the URL the host MF routes to.
15
- // The scope also keeps the shadow's name distinct from the consumer's
16
- // package.json name (same workspace, different identifiers).
17
19
  return {
18
20
  name: `@trident/${mfAppName(consumerPkg.name)}`,
19
21
  version: '0.0.1',
20
22
  private: true,
21
23
  scripts: SHADOW_SCRIPTS,
22
- peerDependencies: { ...PROTECTED_DEPS },
23
- devDependencies: WORKSPACE_DEV_DEPS,
24
+ devDependencies: { ...SHADOW_DEV_DEPS },
24
25
  };
25
26
  }
26
27
  /**
@@ -16,8 +16,8 @@ async function syncShadow(paths, consumerPkg) {
16
16
  const oldHash = (await pathExists(paths.shadowDepsHash)) ? await readFile(paths.shadowDepsHash, 'utf8') : null;
17
17
  if (oldHash !== newHash) {
18
18
  info(oldHash ? 'consumer deps changed — yarn install' : 'first run — yarn install');
19
- // Yarn 4 is cache-first and non-interactive by default
20
- // in non-TTY contexts, so no flags are needed
19
+ // Yarn 4 is cache-first and non-interactive by default in non-TTY
20
+ // contexts, so plain `yarn install` is all we need.
21
21
  await execa('yarn', ['install'], {
22
22
  cwd: paths.consumerDir,
23
23
  stdio: 'inherit',
@@ -0,0 +1,10 @@
1
+ var permissions = {
2
+ allow: [
3
+ "Skill(z2h:*)"
4
+ ]
5
+ };
6
+ const claudeSettings = {
7
+ permissions: permissions
8
+ };
9
+
10
+ export { claudeSettings as default, permissions };
@@ -20,7 +20,6 @@ export interface ShadowPkg {
20
20
  version: string;
21
21
  private: true;
22
22
  scripts: Record<string, string>;
23
- peerDependencies: Record<string, string>;
24
23
  devDependencies: Record<string, string>;
25
24
  }
26
25
  export interface ShadowMetadata {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AAGD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC;AAGD,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAGD,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB;AAGD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,aAAa,CAAC;CACtB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AAOD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC;AAGD,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAGD,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB;AAGD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,aAAa,CAAC;CACtB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=templates.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.test.d.ts","sourceRoot":"","sources":["../../../../src/util/__tests__/templates.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=workspace-templates-shipped.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-templates-shipped.test.d.ts","sourceRoot":"","sources":["../../../../src/util/__tests__/workspace-templates-shipped.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=workspace.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace.test.d.ts","sourceRoot":"","sources":["../../../../src/util/__tests__/workspace.test.ts"],"names":[],"mappings":""}
@@ -1,6 +1,6 @@
1
1
  import path from 'node:path';
2
- import { readFile } from 'fs-extra';
3
2
  import { readdir } from 'node:fs/promises';
3
+ import { readFile } from 'fs-extra';
4
4
  import { lookup } from 'mime-types';
5
5
  import pMap from 'p-map';
6
6
  import { PutObjectCommand } from '@aws-sdk/client-s3';
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Substitute `__PLACEHOLDER__` tokens in `content` with values from `vars`.
3
+ * Values are inserted literally — no regex special-char interpretation —
4
+ * which matters for content like `$1` or `&` that could otherwise be
5
+ * captured by `String.prototype.replace`.
6
+ */
7
+ export declare function renderTemplate(content: string, vars: Record<string, string>): string;
8
+ /**
9
+ * Absolute path to the bundled `templates/` directory under `src/`.
10
+ *
11
+ * The CLI's `package.json` `files` array ships `src/` (so `src/templates/`
12
+ * lands in published packages). The build emits `.ts` files to `dist/`,
13
+ * but raw template assets (`.tmpl`, `.md`, `gitignore`, `.json`) live only
14
+ * under `src/templates/`. Resolving here keeps a single source of truth
15
+ * for both:
16
+ * - dev (vitest, tsx) → `<pkg>/src/util/` + ../../src/templates → `<pkg>/src/templates`
17
+ * - published install (dist/util) → `<pkg>/dist/util/` + ../../src/templates → `<pkg>/src/templates`
18
+ */
19
+ export declare function getTemplatesDir(): string;
20
+ export type AppTemplate = 'default' | 'html-embed';
21
+ export declare const APP_TEMPLATES: AppTemplate[];
22
+ //# sourceMappingURL=templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/util/templates.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAQpF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAGxC;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,YAAY,CAAC;AACnD,eAAO,MAAM,aAAa,EAAE,WAAW,EAA8B,CAAC"}
@@ -0,0 +1,36 @@
1
+ import path from 'node:path';
2
+ import { fileURLToPath } from 'node:url';
3
+
4
+ /**
5
+ * Substitute `__PLACEHOLDER__` tokens in `content` with values from `vars`.
6
+ * Values are inserted literally — no regex special-char interpretation —
7
+ * which matters for content like `$1` or `&` that could otherwise be
8
+ * captured by `String.prototype.replace`.
9
+ */
10
+ function renderTemplate(content, vars) {
11
+ let out = content;
12
+ for (const [key, value] of Object.entries(vars)) {
13
+ // Use split+join (literal pattern) to avoid regex interpretation of
14
+ // special chars in `value`.
15
+ out = out.split(key).join(value);
16
+ }
17
+ return out;
18
+ }
19
+ /**
20
+ * Absolute path to the bundled `templates/` directory under `src/`.
21
+ *
22
+ * The CLI's `package.json` `files` array ships `src/` (so `src/templates/`
23
+ * lands in published packages). The build emits `.ts` files to `dist/`,
24
+ * but raw template assets (`.tmpl`, `.md`, `gitignore`, `.json`) live only
25
+ * under `src/templates/`. Resolving here keeps a single source of truth
26
+ * for both:
27
+ * - dev (vitest, tsx) → `<pkg>/src/util/` + ../../src/templates → `<pkg>/src/templates`
28
+ * - published install (dist/util) → `<pkg>/dist/util/` + ../../src/templates → `<pkg>/src/templates`
29
+ */
30
+ function getTemplatesDir() {
31
+ const here = path.dirname(fileURLToPath(import.meta.url));
32
+ return path.resolve(here, '..', '..', 'src', 'templates');
33
+ }
34
+ const APP_TEMPLATES = ['default', 'html-embed'];
35
+
36
+ export { APP_TEMPLATES, getTemplatesDir, renderTemplate };
@@ -0,0 +1,20 @@
1
+ export declare const WORKSPACE_DIR_NAME = "zth-projects";
2
+ export declare const WORKSPACE_MARKER_FIELD = "z2hWorkspace";
3
+ /**
4
+ * The Z2H workspace home is hardcoded to `~/zth-projects/` for users.
5
+ * Tests override via the `Z2H_WORKSPACE_HOME` env var so they can use a
6
+ * tmp dir without touching the user's real home.
7
+ */
8
+ export declare function getWorkspaceHome(): string;
9
+ /**
10
+ * Returns true iff `<dir>/package.json` exists and has `"z2hWorkspace": true`.
11
+ * Any read or parse error returns false (defensive — callers route to a
12
+ * helpful message via assertWorkspace).
13
+ */
14
+ export declare function isZ2hWorkspace(dir: string): Promise<boolean>;
15
+ /**
16
+ * Resolves to the workspace home path if the marker is present; otherwise
17
+ * throws an Error pointing the user at `z2h-cli create-workspace`.
18
+ */
19
+ export declare function assertWorkspace(): Promise<string>;
20
+ //# sourceMappingURL=workspace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../src/util/workspace.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AACjD,eAAO,MAAM,sBAAsB,iBAAiB,CAAC;AAErD;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAMD;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAWlE;AAED;;;GAGG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CASvD"}
@@ -0,0 +1,46 @@
1
+ import path from 'node:path';
2
+ import os from 'node:os';
3
+ import { pathExists, readJson } from 'fs-extra';
4
+
5
+ const WORKSPACE_DIR_NAME = 'zth-projects';
6
+ const WORKSPACE_MARKER_FIELD = 'z2hWorkspace';
7
+ /**
8
+ * The Z2H workspace home is hardcoded to `~/zth-projects/` for users.
9
+ * Tests override via the `Z2H_WORKSPACE_HOME` env var so they can use a
10
+ * tmp dir without touching the user's real home.
11
+ */
12
+ function getWorkspaceHome() {
13
+ return process.env.Z2H_WORKSPACE_HOME ?? path.join(os.homedir(), WORKSPACE_DIR_NAME);
14
+ }
15
+ /**
16
+ * Returns true iff `<dir>/package.json` exists and has `"z2hWorkspace": true`.
17
+ * Any read or parse error returns false (defensive — callers route to a
18
+ * helpful message via assertWorkspace).
19
+ */
20
+ async function isZ2hWorkspace(dir) {
21
+ const pkgPath = path.join(dir, 'package.json');
22
+ if (!(await pathExists(pkgPath))) {
23
+ return false;
24
+ }
25
+ try {
26
+ const pkg = (await readJson(pkgPath));
27
+ return pkg[WORKSPACE_MARKER_FIELD] === true;
28
+ }
29
+ catch {
30
+ return false;
31
+ }
32
+ }
33
+ /**
34
+ * Resolves to the workspace home path if the marker is present; otherwise
35
+ * throws an Error pointing the user at `z2h-cli create-workspace`.
36
+ */
37
+ async function assertWorkspace() {
38
+ const home = getWorkspaceHome();
39
+ if (await isZ2hWorkspace(home)) {
40
+ return home;
41
+ }
42
+ throw new Error(`No Z2H workspace at ${home}. Run "z2h-cli create-workspace" first ` +
43
+ `(or set Z2H_WORKSPACE_HOME if you keep the workspace elsewhere).`);
44
+ }
45
+
46
+ export { WORKSPACE_DIR_NAME, WORKSPACE_MARKER_FIELD, assertWorkspace, getWorkspaceHome, isZ2hWorkspace };
package/dist/index.js CHANGED
@@ -3,6 +3,8 @@ const commands_dev = require('./commands/dev.js');
3
3
  const commands_build = require('./commands/build.js');
4
4
  const commands_clean = require('./commands/clean.js');
5
5
  const commands_deploy = require('./commands/deploy.js');
6
+ const commands_createWorkspace = require('./commands/create-workspace.js');
7
+ const commands_create = require('./commands/create.js');
6
8
  const util_logger = require('./util/logger.js');
7
9
 
8
10
  async function main() {
@@ -74,6 +76,32 @@ async function main() {
74
76
  util_logger.fail(`deploy failed: ${err.message}`, { command: 'deploy' }, 2);
75
77
  }
76
78
  });
79
+ program
80
+ .command('create-workspace')
81
+ .description('Bootstrap the ~/zth-projects/ yarn workspace (one-time setup)')
82
+ .option('--json', 'emit structured JSON on stdout')
83
+ .action(async (opts) => {
84
+ try {
85
+ await commands_createWorkspace.createWorkspaceCommand(opts);
86
+ }
87
+ catch (err) {
88
+ util_logger.fail(`create-workspace failed: ${err.message}`, { command: 'create-workspace' }, 1);
89
+ }
90
+ });
91
+ program
92
+ .command('create <app-name>')
93
+ .description('Scaffold a new Z2H consumer app inside ~/zth-projects/')
94
+ .option('--template <name>', 'Template name (default | html-embed)')
95
+ .option('--html-file <path>', 'Path to an HTML file to embed (implies --template html-embed)')
96
+ .option('--json', 'emit structured JSON on stdout')
97
+ .action(async (appName, opts) => {
98
+ try {
99
+ await commands_create.createCommand(appName, opts);
100
+ }
101
+ catch (err) {
102
+ util_logger.fail(`create failed: ${err.message}`, { command: 'create' }, 1);
103
+ }
104
+ });
77
105
  await program.parseAsync(process.argv);
78
106
  }
79
107
  void main()
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=consumer-pkg.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consumer-pkg.test.d.ts","sourceRoot":"","sources":["../../../src/shadow/__tests__/consumer-pkg.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=merge-package-json.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge-package-json.test.d.ts","sourceRoot":"","sources":["../../../src/shadow/__tests__/merge-package-json.test.ts"],"names":[],"mappings":""}
@@ -1,21 +1,11 @@
1
1
  import type { ConsumerPkg } from '../types';
2
2
  /**
3
- * Return the consumer's `workspaces` field extended with `.zth`. Handles
4
- * all three shapes: missing, array form, or object form (`{ packages }`).
5
- * Always extends — never replaces the user's existing entries.
6
- */
7
- export declare function ensureConsumerWorkspaces(pkg: ConsumerPkg): {
8
- changed: boolean;
9
- workspaces: ConsumerPkg['workspaces'];
10
- };
11
- /**
12
- * Idempotently reshape the consumer's package.json so that:
13
- * - it is marked `"private": true`
14
- * - `.zth` is declared as a yarn workspace member (yarn will hoist)
15
- * - the protected runtime deps are present at compatible versions
16
- * - the protected dev deps are present at compatible versions
3
+ * The consumer pkg is a thin manifest. Z2H apps live inside a yarn
4
+ * workspace at `~/zth-projects/`; runtime and dev deps come from the
5
+ * workspace root, hoisted into a single `node_modules/`.
17
6
  *
18
- * Always extends — never overrides existing fields.
7
+ * The only thing this file enforces today is `private: true` — apps must
8
+ * never accidentally publish to npm.
19
9
  */
20
10
  export declare function ensureConsumerPkg(pkgPath: string, pkg: ConsumerPkg): Promise<{
21
11
  changed: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"consumer-pkg.d.ts","sourceRoot":"","sources":["../../src/shadow/consumer-pkg.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,WAAW,GAAG;IAC1D,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;CACvC,CAsBA;AAqBD;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,WAAW,GACf,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,WAAW,CAAA;CAAE,CAAC,CAgCjD"}
1
+ {"version":3,"file":"consumer-pkg.d.ts","sourceRoot":"","sources":["../../src/shadow/consumer-pkg.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,WAAW,GACf,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,WAAW,CAAA;CAAE,CAAC,CAOjD"}
@@ -1,84 +1,22 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  const fsExtra = require('fs-extra');
4
- const constants = require('../constants.js');
5
4
 
6
5
  /**
7
- * Return the consumer's `workspaces` field extended with `.zth`. Handles
8
- * all three shapes: missing, array form, or object form (`{ packages }`).
9
- * Always extends — never replaces the user's existing entries.
10
- */
11
- function ensureConsumerWorkspaces(pkg) {
12
- const { workspaces } = pkg;
13
- if (Array.isArray(workspaces)) {
14
- if (workspaces.includes(constants.SHADOW_DIR_NAME)) {
15
- return { changed: false, workspaces };
16
- }
17
- return { changed: true, workspaces: [...workspaces, constants.SHADOW_DIR_NAME] };
18
- }
19
- if (workspaces && typeof workspaces === 'object') {
20
- const pkgs = workspaces.packages ?? [];
21
- if (pkgs.includes(constants.SHADOW_DIR_NAME)) {
22
- return { changed: false, workspaces };
23
- }
24
- return {
25
- changed: true,
26
- workspaces: { ...workspaces, packages: [...pkgs, constants.SHADOW_DIR_NAME] },
27
- };
28
- }
29
- return { changed: true, workspaces: [constants.SHADOW_DIR_NAME] };
30
- }
31
- /**
32
- * Extend a deps map with the protected entries; only fills in missing ones,
33
- * never overrides versions the consumer already pinned.
34
- */
35
- function applyProtected(current, protectedMap) {
36
- const next = { ...(current ?? {}) };
37
- let changed = false;
38
- for (const [name, version] of Object.entries(protectedMap)) {
39
- if (!next[name]) {
40
- next[name] = version;
41
- changed = true;
42
- }
43
- }
44
- return { changed, next };
45
- }
46
- /**
47
- * Idempotently reshape the consumer's package.json so that:
48
- * - it is marked `"private": true`
49
- * - `.zth` is declared as a yarn workspace member (yarn will hoist)
50
- * - the protected runtime deps are present at compatible versions
51
- * - the protected dev deps are present at compatible versions
6
+ * The consumer pkg is a thin manifest. Z2H apps live inside a yarn
7
+ * workspace at `~/zth-projects/`; runtime and dev deps come from the
8
+ * workspace root, hoisted into a single `node_modules/`.
52
9
  *
53
- * Always extends — never overrides existing fields.
10
+ * The only thing this file enforces today is `private: true` — apps must
11
+ * never accidentally publish to npm.
54
12
  */
55
13
  async function ensureConsumerPkg(pkgPath, pkg) {
56
- let changed = false;
57
- const next = { ...pkg };
58
- if (next.private !== true) {
59
- next.private = true;
60
- changed = true;
61
- }
62
- const ws = ensureConsumerWorkspaces(next);
63
- if (ws.changed) {
64
- next.workspaces = ws.workspaces;
65
- changed = true;
66
- }
67
- const deps = applyProtected(next.dependencies, constants.PROTECTED_DEPS);
68
- if (deps.changed) {
69
- next.dependencies = deps.next;
70
- changed = true;
71
- }
72
- const devDeps = applyProtected(next.devDependencies, constants.PROTECTED_DEV_DEPS);
73
- if (devDeps.changed) {
74
- next.devDependencies = devDeps.next;
75
- changed = true;
76
- }
77
- if (changed) {
78
- await fsExtra.writeJson(pkgPath, next, { spaces: 2 });
14
+ if (pkg.private === true) {
15
+ return { changed: false, pkg };
79
16
  }
80
- return { changed, pkg: next };
17
+ const next = { ...pkg, private: true };
18
+ await fsExtra.writeJson(pkgPath, next, { spaces: 2 });
19
+ return { changed: true, pkg: next };
81
20
  }
82
21
 
83
22
  exports.ensureConsumerPkg = ensureConsumerPkg;
84
- exports.ensureConsumerWorkspaces = ensureConsumerWorkspaces;
@@ -1,9 +1,15 @@
1
1
  import type { ConsumerPkg, ShadowPkg } from '../types';
2
2
  /**
3
- * Build the shadow package.json. Declares the shared runtime deps as
4
- * peerDependencies — yarn resolves them from the workspace root (the
5
- * consumer's package.json), guaranteeing a single React instance across
6
- * the wrapper and consumer src.
3
+ * Build the shadow package.json.
4
+ *
5
+ * Runtime deps live at the workspace root (`~/zth-projects/`) and are
6
+ * hoisted in via yarn workspaces — no need to mirror them here. The shadow
7
+ * only declares the toolchain it directly executes (`trident-toolkit`) so
8
+ * yarn berry wires the `trident` bin into the shadow's script PATH.
9
+ *
10
+ * The `@trident/` scope is preserved so trident-toolkit strips it and the
11
+ * emitted bundle becomes `MF-mf-<appName>`, matching the URL the host MF
12
+ * routes to.
7
13
  */
8
14
  export declare function buildShadowPkg(consumerPkg: ConsumerPkg): ShadowPkg;
9
15
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"merge-package-json.d.ts","sourceRoot":"","sources":["../../src/shadow/merge-package-json.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEvD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,CAalE;AAgBD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,CAW9D;AAED,wBAAsB,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5F"}
1
+ {"version":3,"file":"merge-package-json.d.ts","sourceRoot":"","sources":["../../src/shadow/merge-package-json.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,CAQlE;AAgBD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,CAW9D;AAED,wBAAsB,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5F"}