@geekmidas/cli 10.0.0-alpha.61 → 10.0.0-alpha.63

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 (202) hide show
  1. package/README.md +2 -0
  2. package/dist/{HostingerProvider-DI_Pr2VE.mjs → HostingerProvider-DBBwpDjn.mjs} +2 -2
  3. package/dist/{HostingerProvider-DI_Pr2VE.mjs.map → HostingerProvider-DBBwpDjn.mjs.map} +1 -1
  4. package/dist/{HostingerProvider-CgDaD8VR.cjs → HostingerProvider-mJ7YruxH.cjs} +2 -2
  5. package/dist/{HostingerProvider-CgDaD8VR.cjs.map → HostingerProvider-mJ7YruxH.cjs.map} +1 -1
  6. package/dist/{LegacyStateStore-JbBVFp_2.cjs → LegacyStateStore-CP7SZwTP.cjs} +2 -2
  7. package/dist/{LegacyStateStore-JbBVFp_2.cjs.map → LegacyStateStore-CP7SZwTP.cjs.map} +1 -1
  8. package/dist/{LegacyStateStore-C7vFAxbu.mjs → LegacyStateStore-Q3GmKOdw.mjs} +2 -2
  9. package/dist/{LegacyStateStore-C7vFAxbu.mjs.map → LegacyStateStore-Q3GmKOdw.mjs.map} +1 -1
  10. package/dist/{LocalStateStore-DfUwQsL8.mjs → LocalStateStore-BGIXcrvX.mjs} +2 -2
  11. package/dist/{LocalStateStore-DfUwQsL8.mjs.map → LocalStateStore-BGIXcrvX.mjs.map} +1 -1
  12. package/dist/{LocalStateStore-DHj_-CQB.cjs → LocalStateStore-sS8mvLeq.cjs} +2 -2
  13. package/dist/{LocalStateStore-DHj_-CQB.cjs.map → LocalStateStore-sS8mvLeq.cjs.map} +1 -1
  14. package/dist/{OpenApiTsGenerator-BSrgw7B0.cjs → OpenApiTsGenerator-CjHWFRDd.cjs} +2 -2
  15. package/dist/{OpenApiTsGenerator-BSrgw7B0.cjs.map → OpenApiTsGenerator-CjHWFRDd.cjs.map} +1 -1
  16. package/dist/{OpenApiTsGenerator-q5B0z8Xg.mjs → OpenApiTsGenerator-CnAwhGxi.mjs} +2 -2
  17. package/dist/{OpenApiTsGenerator-q5B0z8Xg.mjs.map → OpenApiTsGenerator-CnAwhGxi.mjs.map} +1 -1
  18. package/dist/{S3StateStore-xqnpUrzy.cjs → S3StateStore-6jqITH2F.cjs} +2 -2
  19. package/dist/{S3StateStore-xqnpUrzy.cjs.map → S3StateStore-6jqITH2F.cjs.map} +1 -1
  20. package/dist/{S3StateStore-Dq6hHtzY.mjs → S3StateStore-D7l_lWJ3.mjs} +2 -2
  21. package/dist/{S3StateStore-Dq6hHtzY.mjs.map → S3StateStore-D7l_lWJ3.mjs.map} +1 -1
  22. package/dist/{SSMStateStore-5dBRwVlJ.cjs → SSMStateStore-B__F7IJa.cjs} +2 -2
  23. package/dist/{SSMStateStore-5dBRwVlJ.cjs.map → SSMStateStore-B__F7IJa.cjs.map} +1 -1
  24. package/dist/{SSMStateStore-SUmvAbLi.mjs → SSMStateStore-CAQDVpoc.mjs} +2 -2
  25. package/dist/{SSMStateStore-SUmvAbLi.mjs.map → SSMStateStore-CAQDVpoc.mjs.map} +1 -1
  26. package/dist/{bundler-DXATpO1T.cjs → bundler-DLfOn0ls.cjs} +3 -3
  27. package/dist/{bundler-DXATpO1T.cjs.map → bundler-DLfOn0ls.cjs.map} +1 -1
  28. package/dist/{bundler-B5VsKW-_.mjs → bundler-DyWI41Iy.mjs} +2 -2
  29. package/dist/{bundler-B5VsKW-_.mjs.map → bundler-DyWI41Iy.mjs.map} +1 -1
  30. package/dist/{cli-DQdrVkj2.cjs → cli-D-ZM-X2s.cjs} +12 -16
  31. package/dist/cli-D-ZM-X2s.cjs.map +1 -0
  32. package/dist/{cli-DEA_J3Sa.mjs → cli-PkVF28LM.mjs} +10 -14
  33. package/dist/cli-PkVF28LM.mjs.map +1 -0
  34. package/dist/{config-DXnkCEq0.cjs → config-BEJYKd4s.cjs} +132 -18
  35. package/dist/config-BEJYKd4s.cjs.map +1 -0
  36. package/dist/config-C2BUosLm.d.mts +256 -0
  37. package/dist/config-C2BUosLm.d.mts.map +1 -0
  38. package/dist/config-CemHVcIr.d.cts +256 -0
  39. package/dist/config-CemHVcIr.d.cts.map +1 -0
  40. package/dist/{config-C5-EEdmr.mjs → config-LKKCVCnC.mjs} +109 -19
  41. package/dist/config-LKKCVCnC.mjs.map +1 -0
  42. package/dist/config.cjs +6 -2
  43. package/dist/config.d.cts +4 -211
  44. package/dist/config.d.mts +4 -211
  45. package/dist/config.mjs +3 -3
  46. package/dist/define-CHBIEc5j.mjs +94 -0
  47. package/dist/define-CHBIEc5j.mjs.map +1 -0
  48. package/dist/define-Cv_QvDrg.cjs +141 -0
  49. package/dist/define-Cv_QvDrg.cjs.map +1 -0
  50. package/dist/deploy/public.cjs +174 -13
  51. package/dist/deploy/public.cjs.map +1 -0
  52. package/dist/deploy/public.d.cts +200 -292
  53. package/dist/deploy/public.d.cts.map +1 -1
  54. package/dist/deploy/public.d.mts +200 -292
  55. package/dist/deploy/public.d.mts.map +1 -1
  56. package/dist/deploy/public.mjs +136 -3
  57. package/dist/deploy/public.mjs.map +1 -0
  58. package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
  59. package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
  60. package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
  61. package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
  62. package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
  63. package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
  64. package/dist/{deploy-BbJdgQ2b.cjs → deploy-ABBI0lf1.cjs} +169 -561
  65. package/dist/deploy-ABBI0lf1.cjs.map +1 -0
  66. package/dist/deploy-BiMrP9i7.cjs +140 -0
  67. package/dist/deploy-BiMrP9i7.cjs.map +1 -0
  68. package/dist/{deploy-BJcLmVTc.mjs → deploy-CG8bfFij.mjs} +152 -532
  69. package/dist/deploy-CG8bfFij.mjs.map +1 -0
  70. package/dist/deploy-CGW-QY9D.mjs +135 -0
  71. package/dist/deploy-CGW-QY9D.mjs.map +1 -0
  72. package/dist/discover-B6yPpvRV.d.mts +99 -0
  73. package/dist/discover-B6yPpvRV.d.mts.map +1 -0
  74. package/dist/discover-B_IkPukx.d.cts +99 -0
  75. package/dist/discover-B_IkPukx.d.cts.map +1 -0
  76. package/dist/discover-BaT6bpnA.mjs +614 -0
  77. package/dist/discover-BaT6bpnA.mjs.map +1 -0
  78. package/dist/discover-C_6COHEv.cjs +729 -0
  79. package/dist/discover-C_6COHEv.cjs.map +1 -0
  80. package/dist/dokploy-CwdmlyQL.mjs +32 -0
  81. package/dist/dokploy-CwdmlyQL.mjs.map +1 -0
  82. package/dist/dokploy-QJxMhxdf.cjs +32 -0
  83. package/dist/dokploy-QJxMhxdf.cjs.map +1 -0
  84. package/dist/{encryption-DaA9gRXr.mjs → encryption-CbQG_ayW.mjs} +4 -4
  85. package/dist/{encryption-DaA9gRXr.mjs.map → encryption-CbQG_ayW.mjs.map} +1 -1
  86. package/dist/{encryption-ojzUo7-z.cjs → encryption-DXw3jj0c.cjs} +4 -4
  87. package/dist/{encryption-ojzUo7-z.cjs.map → encryption-DXw3jj0c.cjs.map} +1 -1
  88. package/dist/fakes-C9RiT6XG.mjs.map +1 -1
  89. package/dist/fakes-zW-jNAbQ.cjs.map +1 -1
  90. package/dist/{github-Cq57poPj.cjs → github-BH_mETav.cjs} +3 -3
  91. package/dist/{github-Cq57poPj.cjs.map → github-BH_mETav.cjs.map} +1 -1
  92. package/dist/{github-DmCj2u95.mjs → github-ciwbIwVa.mjs} +3 -3
  93. package/dist/{github-DmCj2u95.mjs.map → github-ciwbIwVa.mjs.map} +1 -1
  94. package/dist/{index-UiWCaGzU.d.cts → index-BtXDZQuF.d.cts} +2 -2
  95. package/dist/{index-Da1-oa9W.d.mts.map → index-BtXDZQuF.d.cts.map} +1 -1
  96. package/dist/{index-Da1-oa9W.d.mts → index-DrKzpHl-.d.mts} +2 -2
  97. package/dist/{index-UiWCaGzU.d.cts.map → index-DrKzpHl-.d.mts.map} +1 -1
  98. package/dist/index.cjs +60 -52
  99. package/dist/index.cjs.map +1 -1
  100. package/dist/index.mjs +57 -49
  101. package/dist/index.mjs.map +1 -1
  102. package/dist/{migrate-BScRpCEx.cjs → migrate-6oa9y_f2.cjs} +5 -5
  103. package/dist/{migrate-BScRpCEx.cjs.map → migrate-6oa9y_f2.cjs.map} +1 -1
  104. package/dist/{migrate-5_J5JySj.mjs → migrate-ImBKTBcW.mjs} +5 -5
  105. package/dist/{migrate-5_J5JySj.mjs.map → migrate-ImBKTBcW.mjs.map} +1 -1
  106. package/dist/openapi.cjs +3 -3
  107. package/dist/openapi.d.cts +1 -1
  108. package/dist/openapi.d.mts +1 -1
  109. package/dist/openapi.mjs +3 -3
  110. package/dist/{ready-XlNx-Gbo.cjs → ready-BiG0rt4h.cjs} +3 -3
  111. package/dist/{ready-XlNx-Gbo.cjs.map → ready-BiG0rt4h.cjs.map} +1 -1
  112. package/dist/{ready-DQIy21W5.mjs → ready-Bpdnn2ON.mjs} +3 -3
  113. package/dist/{ready-DQIy21W5.mjs.map → ready-Bpdnn2ON.mjs.map} +1 -1
  114. package/dist/reconcile/public.cjs +1 -1
  115. package/dist/reconcile/public.d.cts +4 -77
  116. package/dist/reconcile/public.d.cts.map +1 -1
  117. package/dist/reconcile/public.d.mts +4 -77
  118. package/dist/reconcile/public.d.mts.map +1 -1
  119. package/dist/reconcile/public.mjs +1 -1
  120. package/dist/resolve-B1T0hUaR.mjs +170 -0
  121. package/dist/resolve-B1T0hUaR.mjs.map +1 -0
  122. package/dist/resolve-xytBTtG4.cjs +217 -0
  123. package/dist/resolve-xytBTtG4.cjs.map +1 -0
  124. package/dist/runtime-CMwtq0AL.cjs +163 -0
  125. package/dist/runtime-CMwtq0AL.cjs.map +1 -0
  126. package/dist/runtime-CXPlkZzs.d.mts +90 -0
  127. package/dist/runtime-CXPlkZzs.d.mts.map +1 -0
  128. package/dist/runtime-DbakJS8u.mjs +134 -0
  129. package/dist/runtime-DbakJS8u.mjs.map +1 -0
  130. package/dist/runtime-Dn_n-29S.d.cts +90 -0
  131. package/dist/runtime-Dn_n-29S.d.cts.map +1 -0
  132. package/dist/sandbox/config-worker.cjs +43 -0
  133. package/dist/sandbox/config-worker.cjs.map +1 -0
  134. package/dist/sandbox/config-worker.d.cts +1 -0
  135. package/dist/sandbox/config-worker.d.mts +1 -0
  136. package/dist/sandbox/config-worker.mjs +44 -0
  137. package/dist/sandbox/config-worker.mjs.map +1 -0
  138. package/dist/sandbox/discover-worker.cjs +44 -0
  139. package/dist/sandbox/discover-worker.cjs.map +1 -0
  140. package/dist/sandbox/discover-worker.d.cts +1 -0
  141. package/dist/sandbox/discover-worker.d.mts +1 -0
  142. package/dist/sandbox/discover-worker.mjs +45 -0
  143. package/dist/sandbox/discover-worker.mjs.map +1 -0
  144. package/dist/sandbox-M8UnLhXE.d.cts +126 -0
  145. package/dist/sandbox-M8UnLhXE.d.cts.map +1 -0
  146. package/dist/sandbox-M8UnLhXE.d.mts +126 -0
  147. package/dist/sandbox-M8UnLhXE.d.mts.map +1 -0
  148. package/dist/{workspace-Bp1xVaOz.mjs → schemas-Ckm_aBnF.cjs} +264 -969
  149. package/dist/schemas-Ckm_aBnF.cjs.map +1 -0
  150. package/dist/{workspace-B64Xk1Mb.cjs → schemas-D2LCF689.mjs} +195 -1155
  151. package/dist/schemas-D2LCF689.mjs.map +1 -0
  152. package/dist/{sniffer-CQmJnNJM.cjs → sniffer-D_SYc_pO.cjs} +379 -214
  153. package/dist/sniffer-D_SYc_pO.cjs.map +1 -0
  154. package/dist/{sniffer-bdleks5l.mjs → sniffer-aO_-s5vq.mjs} +346 -211
  155. package/dist/sniffer-aO_-s5vq.mjs.map +1 -0
  156. package/dist/target/public.cjs +15 -0
  157. package/dist/target/public.d.cts +28 -0
  158. package/dist/target/public.d.cts.map +1 -0
  159. package/dist/target/public.d.mts +28 -0
  160. package/dist/target/public.d.mts.map +1 -0
  161. package/dist/target/public.mjs +4 -0
  162. package/dist/terminal-D0f1u0LG.cjs +576 -0
  163. package/dist/terminal-D0f1u0LG.cjs.map +1 -0
  164. package/dist/terminal-gMxAo9Dj.mjs +517 -0
  165. package/dist/terminal-gMxAo9Dj.mjs.map +1 -0
  166. package/dist/{types-efNLu9xu.d.cts → types-CfLKGfC_.d.mts} +624 -34
  167. package/dist/types-CfLKGfC_.d.mts.map +1 -0
  168. package/dist/{types-Bp1mVxG0.d.mts → types-DIA7Li-J.d.cts} +626 -34
  169. package/dist/types-DIA7Li-J.d.cts.map +1 -0
  170. package/dist/vitest.cjs +2 -2
  171. package/dist/vitest.mjs +2 -2
  172. package/dist/workerRuntime-BXfhbe13.cjs +108 -0
  173. package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
  174. package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
  175. package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
  176. package/dist/workspace/index.cjs +1 -1
  177. package/dist/workspace/index.d.cts +3 -3
  178. package/dist/workspace/index.d.mts +3 -3
  179. package/dist/workspace/index.mjs +1 -1
  180. package/dist/workspace-Dh7rr7l4.mjs +1024 -0
  181. package/dist/workspace-Dh7rr7l4.mjs.map +1 -0
  182. package/dist/workspace-Kl4NG9IH.cjs +1196 -0
  183. package/dist/workspace-Kl4NG9IH.cjs.map +1 -0
  184. package/package.json +23 -13
  185. package/dist/cli-DEA_J3Sa.mjs.map +0 -1
  186. package/dist/cli-DQdrVkj2.cjs.map +0 -1
  187. package/dist/config-C5-EEdmr.mjs.map +0 -1
  188. package/dist/config-DXnkCEq0.cjs.map +0 -1
  189. package/dist/config.d.cts.map +0 -1
  190. package/dist/config.d.mts.map +0 -1
  191. package/dist/deploy-BJcLmVTc.mjs.map +0 -1
  192. package/dist/deploy-BbJdgQ2b.cjs.map +0 -1
  193. package/dist/discover-Bc-4eA_p.cjs +0 -299
  194. package/dist/discover-Bc-4eA_p.cjs.map +0 -1
  195. package/dist/discover-FrYvzkeC.mjs +0 -262
  196. package/dist/discover-FrYvzkeC.mjs.map +0 -1
  197. package/dist/sniffer-CQmJnNJM.cjs.map +0 -1
  198. package/dist/sniffer-bdleks5l.mjs.map +0 -1
  199. package/dist/types-Bp1mVxG0.d.mts.map +0 -1
  200. package/dist/types-efNLu9xu.d.cts.map +0 -1
  201. package/dist/workspace-B64Xk1Mb.cjs.map +0 -1
  202. package/dist/workspace-Bp1xVaOz.mjs.map +0 -1
@@ -0,0 +1,729 @@
1
+ const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
+ const require_schemas = require("./schemas-Ckm_aBnF.cjs");
3
+ const require_workerRuntime = require("./workerRuntime-BXfhbe13.cjs");
4
+ let node_path = require("node:path");
5
+ let node_fs = require("node:fs");
6
+ let node_async_hooks = require("node:async_hooks");
7
+ let node_util = require("node:util");
8
+ let _geekmidas_manifest = require("@geekmidas/manifest");
9
+ let fast_glob = require("fast-glob");
10
+ fast_glob = require_rolldown_runtime.__toESM(fast_glob, 1);
11
+ let lodash_kebabcase = require("lodash.kebabcase");
12
+ lodash_kebabcase = require_rolldown_runtime.__toESM(lodash_kebabcase, 1);
13
+ let node_module = require("node:module");
14
+ let node_url = require("node:url");
15
+ //#region src/output.ts
16
+ /**
17
+ * Where the CLI's progress lines go.
18
+ *
19
+ * Commands write their progress through `output` rather than `console`. Run
20
+ * from the terminal that is the same thing. Run inside `deploy()`, each line
21
+ * goes to the run that wrote it instead — as an event its caller can iterate,
22
+ * and to the logger it was handed — so a deploy embedded in another program
23
+ * does not print over that program's own output.
24
+ *
25
+ * Carried by `AsyncLocalStorage` rather than passed down, because the lines
26
+ * come from everywhere a deploy reaches — the Dockerfile generator, the env
27
+ * sniffer, construct discovery — and two deploys running in one process must
28
+ * not hear each other.
29
+ */
30
+ const current = new node_async_hooks.AsyncLocalStorage();
31
+ /** Runs `fn` with every line written through `output` sent to `sink`. */
32
+ function withOutput(sink, fn) {
33
+ return current.run(sink, fn);
34
+ }
35
+ function write(level, fallback) {
36
+ return (...args) => {
37
+ const sink = current.getStore();
38
+ if (sink) sink(level, (0, node_util.format)(...args));
39
+ else fallback(...args);
40
+ };
41
+ }
42
+ /**
43
+ * `console`, for the methods the CLI logs through — routed to the current
44
+ * run's sink when there is one.
45
+ */
46
+ const output = {
47
+ log: write("info", (...args) => console.log(...args)),
48
+ info: write("info", (...args) => console.info(...args)),
49
+ warn: write("warn", (...args) => console.warn(...args)),
50
+ error: write("error", (...args) => console.error(...args))
51
+ };
52
+ //#endregion
53
+ //#region src/generators/Generator.ts
54
+ /**
55
+ * Zod v4 maintains a process-wide registry of schemas registered via
56
+ * `.meta({ id })`. When we cache-bust user module imports (by appending a
57
+ * `?t=timestamp` query), those modules re-execute and try to register the
58
+ * same ids again, which throws `ID X already exists in the registry`.
59
+ *
60
+ * Clearing the registry in the CLI process is safe: the user's running
61
+ * server lives in a subprocess and has its own isolated registry.
62
+ *
63
+ * Exported for tests.
64
+ */
65
+ function clearZodGlobalRegistry() {
66
+ const registry = globalThis.__zod_globalRegistry;
67
+ if (registry && typeof registry.clear === "function") registry.clear();
68
+ }
69
+ var ConstructGenerator = class {
70
+ static async build(context, outputDir, generator, patterns, options) {
71
+ const constructs = await generator.load(patterns);
72
+ return generator.build(context, constructs, outputDir, options);
73
+ }
74
+ async load(patterns, cwd = process.cwd(), bustCache = false) {
75
+ const logger = console;
76
+ const globPatterns = Array.isArray(patterns) ? patterns : patterns ? [patterns] : [];
77
+ const files = fast_glob.default.stream(globPatterns, {
78
+ cwd,
79
+ absolute: true
80
+ });
81
+ if (bustCache) clearZodGlobalRegistry();
82
+ const constructs = [];
83
+ for await (const f of files) try {
84
+ const file = f.toString();
85
+ const module = await (bustCache ? import(`${file}?t=${Date.now()}`) : import(file));
86
+ for (const [key, construct] of Object.entries(module)) if (this.isConstruct(construct)) constructs.push({
87
+ key,
88
+ name: (0, lodash_kebabcase.default)(key),
89
+ construct,
90
+ path: {
91
+ absolute: file,
92
+ relative: (0, node_path.relative)(process.cwd(), file)
93
+ }
94
+ });
95
+ } catch (error) {
96
+ const err = error;
97
+ logger.error(`Failed to load ${f}: ${err.message}`);
98
+ if (err.stack) logger.error(err.stack);
99
+ throw error;
100
+ }
101
+ return constructs;
102
+ }
103
+ };
104
+ //#endregion
105
+ //#region src/sandbox/sandbox.ts
106
+ /**
107
+ * Where a deploy runs the project's own code.
108
+ *
109
+ * A deploy holds credentials — Dokploy's token, a registry login, an AWS key —
110
+ * and loading `gkm.config.ts`, sniffing an app's environment and building it
111
+ * all execute code from the repository being deployed. On a developer's own
112
+ * laptop that is the developer's code. On a CI job for a fork, or a shared
113
+ * build runner, it is not, and that code should not be able to read the
114
+ * credentials used to deploy it, hang the deploy, or reach outside the
115
+ * checkout.
116
+ *
117
+ * So every step that runs project code goes through a `Sandbox`: one call,
118
+ * with an argument array rather than a shell line, the complete environment
119
+ * the step needs rather than the host's, a timeout it cannot outlive, secrets
120
+ * as files rather than variables, and a working directory inside the project.
121
+ * The steps that need credentials — provisioning, pushing, releasing — are
122
+ * the deploy's own code and never run in one.
123
+ *
124
+ * `LocalSandbox` is the default: a child process on this machine with an
125
+ * allowlisted environment. A host that builds repositories it does not trust
126
+ * passes its own — a container per build, a VM — through `deploy()`'s
127
+ * `sandbox`.
128
+ */
129
+ /** The variable naming the directory a command's secrets are mounted in. */
130
+ const SECRETS_DIR_ENV = "GKM_SECRETS_DIR";
131
+ /** A command was asked to run outside the project. */
132
+ var SandboxCwdEscape = class extends Error {
133
+ cwd;
134
+ root;
135
+ constructor(cwd, root) {
136
+ super(`Refusing to run in '${cwd}': it is outside the project at '${root}'. A sandboxed step only runs inside the project it was given — check the app paths in gkm.config.ts for \`..\` or an absolute path.`);
137
+ this.cwd = cwd;
138
+ this.root = root;
139
+ this.name = "SandboxCwdEscape";
140
+ }
141
+ };
142
+ /** A path with its symlinks resolved where it exists — `/tmp` is `/private/tmp`. */
143
+ function real(path) {
144
+ return (0, node_fs.existsSync)(path) ? (0, node_fs.realpathSync)(path) : path;
145
+ }
146
+ /**
147
+ * `cwd` as an absolute directory inside `root`, or {@link SandboxCwdEscape}.
148
+ *
149
+ * Symlinks are resolved on both sides first, so a link inside the project
150
+ * that points out of it is an escape, and a project reached through a link
151
+ * (`/tmp` on macOS) is still itself. For a sandbox of a host's own to call
152
+ * before it runs anything.
153
+ */
154
+ function confineCwd(root, cwd) {
155
+ const absolute = (0, node_path.resolve)(root, cwd);
156
+ const from = (0, node_path.relative)(real((0, node_path.resolve)(root)), real(absolute));
157
+ if (from === ".." || from.startsWith(`..${node_path.sep}`) || (0, node_path.isAbsolute)(from)) throw new SandboxCwdEscape(cwd, root);
158
+ return absolute;
159
+ }
160
+ /** A secret's file name: one path segment, so it cannot be written elsewhere. */
161
+ var SecretNameInvalid = class extends Error {
162
+ secretName;
163
+ constructor(secretName) {
164
+ super(`'${secretName}' cannot be a secret's name: it becomes a file name in the secrets directory, so it must be one segment of letters, digits, '.', '-' or '_' and not start with '.'.`);
165
+ this.secretName = secretName;
166
+ this.name = "SecretNameInvalid";
167
+ }
168
+ };
169
+ const SECRET_NAME = /^[A-Za-z0-9_-][A-Za-z0-9._-]*$/;
170
+ /** Every secret name, checked before anything is written. */
171
+ function assertSecretNames(secrets) {
172
+ for (const name of Object.keys(secrets ?? {})) if (!SECRET_NAME.test(name)) throw new SecretNameInvalid(name);
173
+ }
174
+ const active = new node_async_hooks.AsyncLocalStorage();
175
+ /**
176
+ * Run `fn` with `sandbox` as the one its steps use.
177
+ *
178
+ * Per run rather than global, as `withOutput` routes a run's lines: two
179
+ * deploys in one host process each build in their own sandbox. A step deep in
180
+ * the engine — discovering constructs, sniffing an app — asks
181
+ * {@link activeSandbox} rather than every function between `deploy()` and it
182
+ * taking one more parameter.
183
+ */
184
+ function withSandbox(sandbox, fn) {
185
+ return active.run({
186
+ sandbox,
187
+ answers: /* @__PURE__ */ new Map()
188
+ }, fn);
189
+ }
190
+ /** The sandbox of the run this is part of, if it was started with one. */
191
+ function activeSandbox() {
192
+ return active.getStore()?.sandbox;
193
+ }
194
+ /**
195
+ * `ask()`'s answer, asked once per run.
196
+ *
197
+ * A deploy loads its config and discovers its constructs from several places
198
+ * — the first load, the engine, the Dockerfile generator — and in a sandbox
199
+ * each was a child process of its own, for the same answer: the checkout does
200
+ * not change while it deploys. Within a run in `sandbox`, the first answer
201
+ * for `key` is the one every later ask gets. Outside one, or for another
202
+ * sandbox, `ask()` runs each time.
203
+ */
204
+ function oncePerRun(sandbox, key, ask) {
205
+ const run = active.getStore();
206
+ if (!run || run.sandbox !== sandbox) return ask();
207
+ let answer = run.answers.get(key);
208
+ if (!answer) {
209
+ answer = ask();
210
+ run.answers.set(key, answer);
211
+ answer.catch(() => run.answers.delete(key));
212
+ }
213
+ return answer;
214
+ }
215
+ //#endregion
216
+ //#region src/owningTsconfigJsx.ts
217
+ const REGISTER = "owning-tsconfig-jsx-register.mjs";
218
+ /** The CLI's `bin/` was not found above the module looking for it. */
219
+ var OwningTsconfigJsxHookMissing = class extends Error {
220
+ from;
221
+ constructor(from) {
222
+ super(`Could not find bin/${REGISTER} in any directory above '${from}'. It ships with @geekmidas/cli beside bin/gkm.mjs; reinstall the package if it is missing.`);
223
+ this.from = from;
224
+ this.name = "OwningTsconfigJsxHookMissing";
225
+ }
226
+ };
227
+ /**
228
+ * The CLI's `bin/owning-tsconfig-jsx-register.mjs`, as a file URL. Searched
229
+ * upward because this module runs from `src/` in the repo and from a chunk in
230
+ * `dist/` once built, and `bin/` sits beside both.
231
+ */
232
+ function registerUrl() {
233
+ const from = (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
234
+ for (let dir = from;; dir = (0, node_path.dirname)(dir)) {
235
+ const candidate = (0, node_path.join)(dir, "bin", REGISTER);
236
+ if ((0, node_fs.existsSync)(candidate)) return (0, node_url.pathToFileURL)(candidate).href;
237
+ if ((0, node_path.dirname)(dir) === dir) throw new OwningTsconfigJsxHookMissing(from);
238
+ }
239
+ }
240
+ /**
241
+ * `NODE_OPTIONS` for a process that runs app code through tsx, with the hook
242
+ * that compiles each `.tsx` with its own tsconfig's JSX settings (see
243
+ * `bin/owning-tsconfig-jsx.mjs`) put in front of every other `--import`, so it
244
+ * is registered before tsx and reads the source on tsx's behalf.
245
+ *
246
+ * `bin/gkm.mjs` already starts the CLI this way, and its children inherit it;
247
+ * this is for those that set `NODE_OPTIONS` themselves, or whose CLI was
248
+ * started with tsx already imported.
249
+ */
250
+ function withOwningTsconfigJsx(nodeOptions = "") {
251
+ if (nodeOptions.includes(REGISTER)) return nodeOptions;
252
+ return [`--import=${registerUrl()}`, nodeOptions].filter(Boolean).join(" ");
253
+ }
254
+ //#endregion
255
+ //#region src/sandbox/worker.ts
256
+ /**
257
+ * Running one of the CLI's own worker scripts inside a sandbox, and reading
258
+ * back the one JSON value it answers with.
259
+ *
260
+ * The worker imports the project's TypeScript — `gkm.config.ts`, construct
261
+ * modules, an app's entry — so it starts with the CLI's own tsx and the two
262
+ * hooks `gkm` itself runs with (JSX by the owning tsconfig, path aliases by
263
+ * the adjacent one). The host process needs none of them loaded: a program
264
+ * calling `deploy()` without `--import tsx` still loads a TypeScript config.
265
+ */
266
+ const here = (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
267
+ /**
268
+ * A worker's file: `dist/sandbox/<name>.mjs` once built — whether this module
269
+ * was bundled into `dist/` or sits beside it — or the `.ts` source under tsx.
270
+ */
271
+ function workerFile(name) {
272
+ return [
273
+ (0, node_path.join)(here, "sandbox", `${name}.mjs`),
274
+ (0, node_path.join)(here, `${name}.mjs`),
275
+ (0, node_path.join)(here, "..", "sandbox", `${name}.mjs`),
276
+ (0, node_path.join)(here, `${name}.ts`)
277
+ ].find((path) => (0, node_fs.existsSync)(path)) ?? (0, node_path.join)(here, `${name}.ts`);
278
+ }
279
+ /** tsx, from the CLI's own dependencies — never the project's. */
280
+ function tsxUrl() {
281
+ return (0, node_url.pathToFileURL)((0, node_module.createRequire)(require("url").pathToFileURL(__filename).href).resolve("tsx")).href;
282
+ }
283
+ /**
284
+ * `node`'s arguments for `script`: the CLI's TypeScript loaders, then any
285
+ * further `imports`, then the script and its `args` — an argument array, so
286
+ * nothing about a path is read by a shell.
287
+ */
288
+ function nodeWithTsx(script, args, imports = []) {
289
+ return [
290
+ ...withOwningTsconfigJsx(`--import=${tsxUrl()}`).split(" "),
291
+ ...imports.map((path) => `--import=${(0, node_url.pathToFileURL)(path).href}`),
292
+ script,
293
+ ...args
294
+ ];
295
+ }
296
+ /** A worker ended without the answer it exists to give. */
297
+ var SandboxWorkerFailed = class extends Error {
298
+ step;
299
+ exitCode;
300
+ stderr;
301
+ constructor(step, exitCode, stderr) {
302
+ super(`The sandboxed ${step} ended (exit code ${exitCode}) without an answer.${stderr.trim() ? `\n${stderr.trim()}` : ""}\nIts output above says why; the sandbox must be able to run \`node\` with the CLI's own files at the paths they have here.`);
303
+ this.step = step;
304
+ this.exitCode = exitCode;
305
+ this.stderr = stderr;
306
+ this.name = "SandboxWorkerFailed";
307
+ }
308
+ };
309
+ /**
310
+ * Run worker `name` in `sandbox`, and parse its answer with `schema`.
311
+ *
312
+ * The answer is the last marked line on stdout. Anything else the project's
313
+ * code printed is ignored, and an answer the schema refuses is a failure
314
+ * rather than data — a worker in an isolating sandbox runs code the host does
315
+ * not trust.
316
+ *
317
+ * Within a run (`withSandbox`), the same worker asked the same question is
318
+ * started once; every ask gets its own copy of the answer, and its stderr, as
319
+ * though it had run again.
320
+ */
321
+ async function runWorker(sandbox, step, options) {
322
+ const answer = await oncePerRun(sandbox, JSON.stringify([
323
+ options.name,
324
+ options.cwd,
325
+ options.args,
326
+ options.env ?? {}
327
+ ]), () => startWorker(sandbox, step, options));
328
+ return structuredClone(answer);
329
+ }
330
+ async function startWorker(sandbox, step, options) {
331
+ const result = await sandbox.exec("node", nodeWithTsx(workerFile(options.name), options.args), {
332
+ cwd: options.cwd,
333
+ env: {
334
+ ...sandbox.env,
335
+ ...options.env
336
+ },
337
+ timeoutMs: options.timeoutMs,
338
+ output: "capture",
339
+ ...options.signal ? { signal: options.signal } : {}
340
+ });
341
+ const line = result.stdout.split("\n").reverse().find((l) => l.startsWith(require_workerRuntime.WORKER_RESULT_MARKER));
342
+ if (line) try {
343
+ const parsed = options.schema.safeParse(JSON.parse(line.slice(require_workerRuntime.WORKER_RESULT_MARKER.length)));
344
+ if (parsed.success) return {
345
+ value: parsed.data,
346
+ stderr: result.stderr
347
+ };
348
+ } catch {}
349
+ throw new SandboxWorkerFailed(step, result.exitCode, result.stderr);
350
+ }
351
+ //#endregion
352
+ //#region src/reconcile/discover.ts
353
+ /**
354
+ * Discovery — one glob, one structural test.
355
+ *
356
+ * A glob per kind is the same specialness the construct model removes, and
357
+ * resources have no kind to be listed under: a declared `ObjectStorage` would
358
+ * never be found by `routes:` or `crons:`. So there is one `constructs` glob,
359
+ * every export of every matching module is inspected, and the per-kind
360
+ * `isConstruct` checks collapse into a single question — does it have an id and
361
+ * can it declare?
362
+ *
363
+ * Structural rather than `instanceof` on purpose. A construct from a different
364
+ * copy of `@geekmidas/constructs` — a linked workspace, two versions in a
365
+ * lockfile — is still a construct, and `instanceof` is exactly the check that
366
+ * says otherwise.
367
+ */
368
+ var discover_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
369
+ ConstructDiscoveryFailed: () => ConstructDiscoveryFailed,
370
+ ConstructsNotSerializable: () => ConstructsNotSerializable,
371
+ DuplicateConstruct: () => DuplicateConstruct,
372
+ LiveConstructsUnavailable: () => LiveConstructsUnavailable,
373
+ discover: () => discover,
374
+ isDeclarable: () => isDeclarable
375
+ });
376
+ /** `console`, or the deploy run discovering the manifest. */
377
+ const logger = output;
378
+ /**
379
+ * Whether a module export is a construct.
380
+ *
381
+ * Deliberately loose about what else it carries — a construct that also has a
382
+ * `service` is still a construct, and requiring one would exclude the kinds that
383
+ * own no address.
384
+ */
385
+ function isDeclarable(value) {
386
+ if (typeof value !== "object" || value === null) return false;
387
+ const candidate = value;
388
+ return typeof candidate.id === "string" && candidate.id.length > 0 && typeof candidate.declare === "function";
389
+ }
390
+ /** What the discovery worker answers. Checked: the worker ran project code. */
391
+ const DiscoverAnswer = require_schemas.discriminatedUnion("reason", [
392
+ require_schemas.object({
393
+ reason: require_schemas.literal("discovered"),
394
+ manifest: require_schemas.record(require_schemas.string(), require_schemas.object({
395
+ id: require_schemas.string(),
396
+ kind: require_schemas.string()
397
+ }).loose()),
398
+ runnables: require_schemas.record(require_schemas.string(), require_schemas.array(require_schemas.string()))
399
+ }),
400
+ require_schemas.object({
401
+ reason: require_schemas.literal("live"),
402
+ paths: require_schemas.array(require_schemas.string())
403
+ }),
404
+ require_schemas.object({
405
+ reason: require_schemas.literal("failed"),
406
+ error: require_schemas.object({
407
+ name: require_schemas.string(),
408
+ message: require_schemas.string(),
409
+ id: require_schemas.string().optional(),
410
+ sources: require_schemas.array(require_schemas.string()).optional()
411
+ }).loose()
412
+ })
413
+ ]);
414
+ /**
415
+ * The manifest, discovered in `sandbox` and handed back as JSON — or
416
+ * `undefined` when it holds something JSON cannot carry and the sandbox is
417
+ * not isolating, for the caller to discover here as before.
418
+ */
419
+ async function discoverInSandbox(sandbox, options) {
420
+ const cwd = options.cwd ?? sandbox.root;
421
+ const patterns = typeof options.patterns === "string" ? [options.patterns] : [...options.patterns];
422
+ const { value, stderr } = await runWorker(sandbox, "construct discovery", {
423
+ name: "discover-worker",
424
+ args: [JSON.stringify({
425
+ patterns,
426
+ cwd
427
+ })],
428
+ cwd,
429
+ timeoutMs: DISCOVER_TIMEOUT_MS,
430
+ schema: DiscoverAnswer
431
+ });
432
+ if (stderr.trim()) logger.warn(stderr.replace(/\n$/, ""));
433
+ switch (value.reason) {
434
+ case "discovered":
435
+ if (options.runnables) for (const [owner, edges] of Object.entries(value.runnables)) options.runnables[owner] = edges;
436
+ return value.manifest;
437
+ case "failed":
438
+ if (value.error.name === "DuplicateConstruct" && value.error.id) throw new DuplicateConstruct(value.error.id, value.error.sources ?? []);
439
+ throw new ConstructDiscoveryFailed(value.error.name, value.error.message);
440
+ case "live":
441
+ if (sandbox.isolating) throw new ConstructsNotSerializable(value.paths);
442
+ return;
443
+ }
444
+ }
445
+ /**
446
+ * A caller asked for the construct objects (`sources`) or a watcher's
447
+ * re-import under an isolating sandbox, where only data comes back.
448
+ */
449
+ var LiveConstructsUnavailable = class extends Error {
450
+ constructor() {
451
+ super("Discovery was asked for the construct objects themselves under an isolating sandbox, which hands back only data. Run this step without one, or ask only for the manifest.");
452
+ this.name = "LiveConstructsUnavailable";
453
+ }
454
+ };
455
+ /** How long discovering a project's constructs may take in a sandbox. */
456
+ const DISCOVER_TIMEOUT_MS = 6e4;
457
+ /** Importing a construct module, or declaring one, threw in the sandbox. */
458
+ var ConstructDiscoveryFailed = class extends Error {
459
+ errorName;
460
+ detail;
461
+ constructor(errorName, detail) {
462
+ super(`Discovering constructs failed (${errorName}): ${detail}`);
463
+ this.errorName = errorName;
464
+ this.detail = detail;
465
+ this.name = "ConstructDiscoveryFailed";
466
+ }
467
+ };
468
+ /**
469
+ * The constructs' declarations hold something that is not data, and the
470
+ * sandbox they were discovered in hands the deploy nothing but data.
471
+ */
472
+ var ConstructsNotSerializable = class extends Error {
473
+ paths;
474
+ constructor(paths) {
475
+ super(`The construct manifest holds values that are not plain data at: ${paths.join(", ")}. Under an isolating sandbox the deploy only receives what JSON can carry; deploy with a sandbox that is not isolating if the host trusts this project.`);
476
+ this.paths = paths;
477
+ this.name = "ConstructsNotSerializable";
478
+ }
479
+ };
480
+ /**
481
+ * Build the construct manifest for a project.
482
+ *
483
+ * Runs the manifest's own validation before returning, so an app is wrong here
484
+ * — where the error names a file — rather than at deploy.
485
+ *
486
+ * @throws {DuplicateConstruct} when two exports claim one id.
487
+ */
488
+ async function discover(options) {
489
+ const sandbox = options.sandbox ?? activeSandbox();
490
+ if (sandbox) {
491
+ if (!options.sources && !options.bustCache) {
492
+ const sandboxed = await discoverInSandbox(sandbox, options);
493
+ if (sandboxed) return sandboxed;
494
+ } else if (sandbox.isolating) throw new LiveConstructsUnavailable();
495
+ }
496
+ const { patterns, cwd = process.cwd(), bustCache = false, sources: out } = options;
497
+ if (bustCache) clearZodGlobalRegistry();
498
+ const manifest = {};
499
+ /** Which file declared each id, for the error when two of them do. */
500
+ const sources = {};
501
+ /**
502
+ * Constructs already seen, by identity.
503
+ *
504
+ * A re-export is the *same object* reached through a second file — ESM
505
+ * bindings are live, so `export * from './database.js'` hands back the
506
+ * binding rather than a copy. Without this, a barrel file made every
507
+ * construct in it appear declared twice, and `constructs/index.ts` is the
508
+ * first thing anyone writes in a shared folder.
509
+ *
510
+ * Identity rather than file is also the more honest rule: what may not
511
+ * happen twice is two *different* constructs claiming one id, and that is
512
+ * still an error below.
513
+ */
514
+ const seen = /* @__PURE__ */ new WeakSet();
515
+ const globs = Array.isArray(patterns) ? [...patterns] : [patterns];
516
+ const files = fast_glob.default.stream(globs, {
517
+ cwd,
518
+ absolute: true
519
+ });
520
+ /** Matched files, for the diagnostic below. */
521
+ let matched = 0;
522
+ for await (const found of files) {
523
+ matched++;
524
+ const file = found.toString();
525
+ const module = await (bustCache ? import(`${file}?t=${Date.now()}`) : import(file));
526
+ for (const [exportName, exported] of Object.entries(module)) {
527
+ if (!isDeclarable(exported)) {
528
+ if (options.runnables) recordRunnable(options.runnables, exported);
529
+ continue;
530
+ }
531
+ if (seen.has(exported)) continue;
532
+ seen.add(exported);
533
+ if (options.runnables && typeof exported.owner === "string") recordRunnable(options.runnables, exported);
534
+ for (const declaration of exported.declare()) {
535
+ const id = (0, _geekmidas_manifest.canonicalId)(declaration.id);
536
+ const source = (0, node_path.relative)(cwd, file);
537
+ const claimed = sources[id];
538
+ if (claimed !== void 0 && claimed !== source) throw new DuplicateConstruct(id, [claimed, source]);
539
+ manifest[id] = {
540
+ ...declaration,
541
+ id
542
+ };
543
+ sources[id] = source;
544
+ if (out) out[id] = {
545
+ file,
546
+ exportName,
547
+ construct: exported
548
+ };
549
+ }
550
+ }
551
+ }
552
+ (0, _geekmidas_manifest.assertDerivations)(manifest);
553
+ warnIfNothingFound(globs, matched, Object.keys(manifest).length);
554
+ return manifest;
555
+ }
556
+ /**
557
+ * Record a runnable's edges under the construct that owns it — the surface an
558
+ * endpoint was built from, or the worker a cron or subscriber was. Anything
559
+ * with no owner, or that is not a runnable at all, is left alone.
560
+ */
561
+ function recordRunnable(runnables, exported) {
562
+ if (typeof exported !== "object" || exported === null) return;
563
+ const runnable = exported;
564
+ const owner = typeof runnable.surface?.id === "string" ? runnable.surface.id : typeof runnable.owner === "string" ? runnable.owner : void 0;
565
+ if (!owner || !Array.isArray(runnable.constructs)) return;
566
+ const key = (0, _geekmidas_manifest.canonicalId)(owner);
567
+ const edges = runnables[key] ?? [];
568
+ runnables[key] = edges;
569
+ for (const id of runnable.constructs) {
570
+ if (typeof id !== "string") continue;
571
+ const target = (0, _geekmidas_manifest.canonicalId)(id);
572
+ if (!edges.includes(target)) edges.push(target);
573
+ }
574
+ }
575
+ /**
576
+ * Say so when a glob was configured and found nothing.
577
+ *
578
+ * The glob is not a filter over declarations already known — it is *how they
579
+ * are found*, by importing what it matches. So a file it misses is a
580
+ * declaration that does not exist, and every symptom of that appears somewhere
581
+ * other than the cause: no container starts, no env key is written, and the
582
+ * application fails on first use against a resource it can see in its own
583
+ * source.
584
+ *
585
+ * Nothing reported it before, because an unmatched file is indistinguishable
586
+ * from a file nobody wrote. These two cases are the ones that are *not*
587
+ * ambiguous — a glob was configured, so something was expected.
588
+ *
589
+ * Silent when no glob is configured at all: that is a project which has not
590
+ * adopted constructs, and has nothing to be missing.
591
+ */
592
+ function warnIfNothingFound(globs, matched, declared) {
593
+ if (globs.length === 0) return;
594
+ if (matched === 0) {
595
+ logger.warn(`\n⚠️ The constructs glob matched no files, so nothing was declared.\n Patterns: ${globs.join(", ")}\n Nothing will be provisioned — no containers, no env keys, no resources.\n A common cause is depth: '*.ts' matches one level, '**/*.ts' matches any.`);
596
+ return;
597
+ }
598
+ if (declared === 0) logger.warn(`\n⚠️ The constructs glob matched ${matched} file(s) but none declared anything.\n Patterns: ${globs.join(", ")}\n Discovery keeps exports with an 'id' that can 'declare()'. A construct that is\n built but never exported is invisible to it.`);
599
+ }
600
+ /** Two constructs claiming one id. */
601
+ var DuplicateConstruct = class extends Error {
602
+ /** The id claimed twice. */
603
+ id;
604
+ /** The files that claimed it. */
605
+ sources;
606
+ constructor(id, sources) {
607
+ super("Two constructs declare the same id");
608
+ this.name = "DuplicateConstruct";
609
+ this.id = id;
610
+ this.sources = sources;
611
+ }
612
+ };
613
+ //#endregion
614
+ Object.defineProperty(exports, "ConstructDiscoveryFailed", {
615
+ enumerable: true,
616
+ get: function() {
617
+ return ConstructDiscoveryFailed;
618
+ }
619
+ });
620
+ Object.defineProperty(exports, "ConstructGenerator", {
621
+ enumerable: true,
622
+ get: function() {
623
+ return ConstructGenerator;
624
+ }
625
+ });
626
+ Object.defineProperty(exports, "ConstructsNotSerializable", {
627
+ enumerable: true,
628
+ get: function() {
629
+ return ConstructsNotSerializable;
630
+ }
631
+ });
632
+ Object.defineProperty(exports, "SECRETS_DIR_ENV", {
633
+ enumerable: true,
634
+ get: function() {
635
+ return SECRETS_DIR_ENV;
636
+ }
637
+ });
638
+ Object.defineProperty(exports, "SandboxCwdEscape", {
639
+ enumerable: true,
640
+ get: function() {
641
+ return SandboxCwdEscape;
642
+ }
643
+ });
644
+ Object.defineProperty(exports, "SandboxWorkerFailed", {
645
+ enumerable: true,
646
+ get: function() {
647
+ return SandboxWorkerFailed;
648
+ }
649
+ });
650
+ Object.defineProperty(exports, "SecretNameInvalid", {
651
+ enumerable: true,
652
+ get: function() {
653
+ return SecretNameInvalid;
654
+ }
655
+ });
656
+ Object.defineProperty(exports, "activeSandbox", {
657
+ enumerable: true,
658
+ get: function() {
659
+ return activeSandbox;
660
+ }
661
+ });
662
+ Object.defineProperty(exports, "assertSecretNames", {
663
+ enumerable: true,
664
+ get: function() {
665
+ return assertSecretNames;
666
+ }
667
+ });
668
+ Object.defineProperty(exports, "confineCwd", {
669
+ enumerable: true,
670
+ get: function() {
671
+ return confineCwd;
672
+ }
673
+ });
674
+ Object.defineProperty(exports, "discover", {
675
+ enumerable: true,
676
+ get: function() {
677
+ return discover;
678
+ }
679
+ });
680
+ Object.defineProperty(exports, "discover_exports", {
681
+ enumerable: true,
682
+ get: function() {
683
+ return discover_exports;
684
+ }
685
+ });
686
+ Object.defineProperty(exports, "isDeclarable", {
687
+ enumerable: true,
688
+ get: function() {
689
+ return isDeclarable;
690
+ }
691
+ });
692
+ Object.defineProperty(exports, "nodeWithTsx", {
693
+ enumerable: true,
694
+ get: function() {
695
+ return nodeWithTsx;
696
+ }
697
+ });
698
+ Object.defineProperty(exports, "output", {
699
+ enumerable: true,
700
+ get: function() {
701
+ return output;
702
+ }
703
+ });
704
+ Object.defineProperty(exports, "runWorker", {
705
+ enumerable: true,
706
+ get: function() {
707
+ return runWorker;
708
+ }
709
+ });
710
+ Object.defineProperty(exports, "withOutput", {
711
+ enumerable: true,
712
+ get: function() {
713
+ return withOutput;
714
+ }
715
+ });
716
+ Object.defineProperty(exports, "withOwningTsconfigJsx", {
717
+ enumerable: true,
718
+ get: function() {
719
+ return withOwningTsconfigJsx;
720
+ }
721
+ });
722
+ Object.defineProperty(exports, "withSandbox", {
723
+ enumerable: true,
724
+ get: function() {
725
+ return withSandbox;
726
+ }
727
+ });
728
+
729
+ //# sourceMappingURL=discover-C_6COHEv.cjs.map