@geekmidas/cli 10.0.0-alpha.62 → 10.0.0-alpha.64

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 (234) hide show
  1. package/README.md +2 -0
  2. package/dist/{HostingerProvider-DyD1Hin8.cjs → HostingerProvider-Bx2lHHvu.cjs} +3 -3
  3. package/dist/{HostingerProvider-DyD1Hin8.cjs.map → HostingerProvider-Bx2lHHvu.cjs.map} +1 -1
  4. package/dist/{HostingerProvider-B92qH4dC.mjs → HostingerProvider-Cd4aS5Kj.mjs} +2 -2
  5. package/dist/{HostingerProvider-B92qH4dC.mjs.map → HostingerProvider-Cd4aS5Kj.mjs.map} +1 -1
  6. package/dist/{LegacyStateStore-UHJEBLdn.cjs → LegacyStateStore-C2abV49N.cjs} +2 -2
  7. package/dist/{LegacyStateStore-UHJEBLdn.cjs.map → LegacyStateStore-C2abV49N.cjs.map} +1 -1
  8. package/dist/{LegacyStateStore-A8d2GdT7.mjs → LegacyStateStore-DIgkGaUP.mjs} +2 -2
  9. package/dist/{LegacyStateStore-A8d2GdT7.mjs.map → LegacyStateStore-DIgkGaUP.mjs.map} +1 -1
  10. package/dist/{LocalStateStore-B51rnfgn.mjs → LocalStateStore-Cy1ZBW7U.mjs} +2 -2
  11. package/dist/{LocalStateStore-B51rnfgn.mjs.map → LocalStateStore-Cy1ZBW7U.mjs.map} +1 -1
  12. package/dist/{LocalStateStore-COW3Ldwa.cjs → LocalStateStore-DiJqKyPy.cjs} +2 -2
  13. package/dist/{LocalStateStore-COW3Ldwa.cjs.map → LocalStateStore-DiJqKyPy.cjs.map} +1 -1
  14. package/dist/{OpenApiTsGenerator-BSrgw7B0.cjs → OpenApiTsGenerator-BWuDRHe9.cjs} +2 -2
  15. package/dist/{OpenApiTsGenerator-BSrgw7B0.cjs.map → OpenApiTsGenerator-BWuDRHe9.cjs.map} +1 -1
  16. package/dist/{OpenApiTsGenerator-q5B0z8Xg.mjs → OpenApiTsGenerator-C6v-IeHt.mjs} +2 -2
  17. package/dist/{OpenApiTsGenerator-q5B0z8Xg.mjs.map → OpenApiTsGenerator-C6v-IeHt.mjs.map} +1 -1
  18. package/dist/{S3StateStore-CJewPhgz.mjs → S3StateStore-D3x6ivBL.mjs} +2 -2
  19. package/dist/{S3StateStore-CJewPhgz.mjs.map → S3StateStore-D3x6ivBL.mjs.map} +1 -1
  20. package/dist/{S3StateStore-WUJGdRNL.cjs → S3StateStore-Ds0V1Lgm.cjs} +2 -2
  21. package/dist/{S3StateStore-WUJGdRNL.cjs.map → S3StateStore-Ds0V1Lgm.cjs.map} +1 -1
  22. package/dist/{SSMStateStore-Zejt42V8.cjs → SSMStateStore-CLipvx47.cjs} +2 -2
  23. package/dist/{SSMStateStore-Zejt42V8.cjs.map → SSMStateStore-CLipvx47.cjs.map} +1 -1
  24. package/dist/{SSMStateStore-iK5UKp9d.mjs → SSMStateStore-DfF174xQ.mjs} +2 -2
  25. package/dist/{SSMStateStore-iK5UKp9d.mjs.map → SSMStateStore-DfF174xQ.mjs.map} +1 -1
  26. package/dist/{bundler-CfH9frOS.cjs → bundler-C8uJf324.cjs} +4 -4
  27. package/dist/{bundler-CfH9frOS.cjs.map → bundler-C8uJf324.cjs.map} +1 -1
  28. package/dist/{bundler-DN5r4x5b.mjs → bundler-DYgm9xsd.mjs} +3 -3
  29. package/dist/{bundler-DN5r4x5b.mjs.map → bundler-DYgm9xsd.mjs.map} +1 -1
  30. package/dist/{cli-DYwxmfsW.mjs → cli-Bogz-zEj.mjs} +5 -4
  31. package/dist/{cli-DYwxmfsW.mjs.map → cli-Bogz-zEj.mjs.map} +1 -1
  32. package/dist/{cli-DOAUp80L.cjs → cli-D3jofJ6j.cjs} +7 -6
  33. package/dist/{cli-DOAUp80L.cjs.map → cli-D3jofJ6j.cjs.map} +1 -1
  34. package/dist/config-Be-4_I6H.d.cts +256 -0
  35. package/dist/config-Be-4_I6H.d.cts.map +1 -0
  36. package/dist/config-DqNRiQOp.d.mts +256 -0
  37. package/dist/config-DqNRiQOp.d.mts.map +1 -0
  38. package/dist/config.cjs +416 -13
  39. package/dist/config.cjs.map +1 -0
  40. package/dist/config.d.cts +4 -211
  41. package/dist/config.d.mts +4 -211
  42. package/dist/config.mjs +402 -3
  43. package/dist/config.mjs.map +1 -0
  44. package/dist/credentials-B70vmLcm.cjs +125 -0
  45. package/dist/credentials-B70vmLcm.cjs.map +1 -0
  46. package/dist/credentials-s0wMeZBU.mjs +108 -0
  47. package/dist/credentials-s0wMeZBU.mjs.map +1 -0
  48. package/dist/{define-CHBIEc5j.mjs → define-CYs0PEfZ.mjs} +2 -3
  49. package/dist/define-CYs0PEfZ.mjs.map +1 -0
  50. package/dist/{define-Cv_QvDrg.cjs → define-zUsP72ym.cjs} +2 -3
  51. package/dist/define-zUsP72ym.cjs.map +1 -0
  52. package/dist/deploy/public.cjs +166 -14
  53. package/dist/deploy/public.cjs.map +1 -0
  54. package/dist/deploy/public.d.cts +224 -3
  55. package/dist/deploy/public.d.cts.map +1 -1
  56. package/dist/deploy/public.d.mts +224 -3
  57. package/dist/deploy/public.d.mts.map +1 -1
  58. package/dist/deploy/public.mjs +141 -10
  59. package/dist/deploy/public.mjs.map +1 -0
  60. package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
  61. package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
  62. package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
  63. package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
  64. package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
  65. package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
  66. package/dist/{deploy-DSaCYvcO.cjs → deploy-55rJkdKz.cjs} +17 -14
  67. package/dist/{deploy-DSaCYvcO.cjs.map → deploy-55rJkdKz.cjs.map} +1 -1
  68. package/dist/{deploy-Cg9fae7a.mjs → deploy-Dc2LBJaK.mjs} +13 -10
  69. package/dist/deploy-Dc2LBJaK.mjs.map +1 -0
  70. package/dist/{deploy-B7jvUORo.mjs → deploy-ZRXIPp1c.mjs} +11 -8
  71. package/dist/{deploy-B7jvUORo.mjs.map → deploy-ZRXIPp1c.mjs.map} +1 -1
  72. package/dist/{deploy-D8Qr-Xto.cjs → deploy-yUcR2OlW.cjs} +15 -12
  73. package/dist/deploy-yUcR2OlW.cjs.map +1 -0
  74. package/dist/derive-B4vDpzgP.mjs +150 -0
  75. package/dist/derive-B4vDpzgP.mjs.map +1 -0
  76. package/dist/derive-DAbo49sm.cjs +161 -0
  77. package/dist/derive-DAbo49sm.cjs.map +1 -0
  78. package/dist/discover-B6yPpvRV.d.mts +99 -0
  79. package/dist/discover-B6yPpvRV.d.mts.map +1 -0
  80. package/dist/discover-B_IkPukx.d.cts +99 -0
  81. package/dist/discover-B_IkPukx.d.cts.map +1 -0
  82. package/dist/{discover-Bc-4eA_p.cjs → discover-DHdECueV.cjs} +280 -1
  83. package/dist/discover-DHdECueV.cjs.map +1 -0
  84. package/dist/{discover-FrYvzkeC.mjs → discover-LMrqsWSU.mjs} +246 -3
  85. package/dist/discover-LMrqsWSU.mjs.map +1 -0
  86. package/dist/{dokploy-CD9PY-3D.mjs → dokploy-CepdXuMl.mjs} +3 -3
  87. package/dist/{dokploy-CD9PY-3D.mjs.map → dokploy-CepdXuMl.mjs.map} +1 -1
  88. package/dist/{dokploy-Ey2foJLv.cjs → dokploy-D1d37rvM.cjs} +3 -3
  89. package/dist/{dokploy-Ey2foJLv.cjs.map → dokploy-D1d37rvM.cjs.map} +1 -1
  90. package/dist/{encryption-ChBk3hTj.cjs → encryption-C9X98u2F.cjs} +5 -5
  91. package/dist/{encryption-ChBk3hTj.cjs.map → encryption-C9X98u2F.cjs.map} +1 -1
  92. package/dist/{encryption-CVwvGbsL.mjs → encryption-CKHjMpCr.mjs} +5 -5
  93. package/dist/{encryption-CVwvGbsL.mjs.map → encryption-CKHjMpCr.mjs.map} +1 -1
  94. package/dist/fakes-C9RiT6XG.mjs.map +1 -1
  95. package/dist/fakes-zW-jNAbQ.cjs.map +1 -1
  96. package/dist/{github-BCB3_LBX.mjs → github-D-byNI7T.mjs} +4 -4
  97. package/dist/{github-BCB3_LBX.mjs.map → github-D-byNI7T.mjs.map} +1 -1
  98. package/dist/{github-OUgPDlqg.cjs → github-Dd3tMa1u.cjs} +4 -4
  99. package/dist/{github-OUgPDlqg.cjs.map → github-Dd3tMa1u.cjs.map} +1 -1
  100. package/dist/{index-BtXDZQuF.d.cts → index-CJ2qsSpp.d.mts} +2 -2
  101. package/dist/{index-BtXDZQuF.d.cts.map → index-CJ2qsSpp.d.mts.map} +1 -1
  102. package/dist/{index-DrKzpHl-.d.mts → index-CfE9Y885.d.cts} +2 -2
  103. package/dist/{index-DrKzpHl-.d.mts.map → index-CfE9Y885.d.cts.map} +1 -1
  104. package/dist/index.cjs +111 -239
  105. package/dist/index.cjs.map +1 -1
  106. package/dist/index.mjs +82 -210
  107. package/dist/index.mjs.map +1 -1
  108. package/dist/local-C7wnrcYK.cjs +586 -0
  109. package/dist/local-C7wnrcYK.cjs.map +1 -0
  110. package/dist/local-Cd8ZYQG3.mjs +473 -0
  111. package/dist/local-Cd8ZYQG3.mjs.map +1 -0
  112. package/dist/{migrate-BoHMqdCu.mjs → migrate-B4gngTLe.mjs} +6 -6
  113. package/dist/{migrate-BoHMqdCu.mjs.map → migrate-B4gngTLe.mjs.map} +1 -1
  114. package/dist/{migrate-dnaFMvOm.cjs → migrate-tx9-P9uz.cjs} +6 -6
  115. package/dist/{migrate-dnaFMvOm.cjs.map → migrate-tx9-P9uz.cjs.map} +1 -1
  116. package/dist/openapi.cjs +3 -3
  117. package/dist/openapi.d.cts +1 -1
  118. package/dist/openapi.d.mts +1 -1
  119. package/dist/openapi.mjs +3 -3
  120. package/dist/{ready-DQIy21W5.mjs → ready-bQfu9GES.mjs} +3 -3
  121. package/dist/{ready-DQIy21W5.mjs.map → ready-bQfu9GES.mjs.map} +1 -1
  122. package/dist/{ready-XlNx-Gbo.cjs → ready-brEhh68f.cjs} +3 -3
  123. package/dist/{ready-XlNx-Gbo.cjs.map → ready-brEhh68f.cjs.map} +1 -1
  124. package/dist/reconcile/public.cjs +1 -1
  125. package/dist/reconcile/public.d.cts +4 -77
  126. package/dist/reconcile/public.d.cts.map +1 -1
  127. package/dist/reconcile/public.d.mts +4 -77
  128. package/dist/reconcile/public.d.mts.map +1 -1
  129. package/dist/reconcile/public.mjs +1 -1
  130. package/dist/{resolve-wbv66HjD.cjs → resolve-BXsNQjMR.cjs} +9 -6
  131. package/dist/resolve-BXsNQjMR.cjs.map +1 -0
  132. package/dist/{resolve-CFCIkm7m.mjs → resolve-DZ2IJ0qY.mjs} +9 -6
  133. package/dist/resolve-DZ2IJ0qY.mjs.map +1 -0
  134. package/dist/{runtime-CMwtq0AL.cjs → runtime-BGNDrHzh.cjs} +2 -2
  135. package/dist/{runtime-CMwtq0AL.cjs.map → runtime-BGNDrHzh.cjs.map} +1 -1
  136. package/dist/{runtime-Dn_n-29S.d.cts → runtime-CJEYK4Gz.d.mts} +2 -2
  137. package/dist/{runtime-CXPlkZzs.d.mts.map → runtime-CJEYK4Gz.d.mts.map} +1 -1
  138. package/dist/{runtime-CXPlkZzs.d.mts → runtime-Cjq1jlVX.d.cts} +2 -2
  139. package/dist/{runtime-Dn_n-29S.d.cts.map → runtime-Cjq1jlVX.d.cts.map} +1 -1
  140. package/dist/{runtime-DbakJS8u.mjs → runtime-Cmn-FeYO.mjs} +2 -2
  141. package/dist/{runtime-DbakJS8u.mjs.map → runtime-Cmn-FeYO.mjs.map} +1 -1
  142. package/dist/sandbox/config-worker.cjs +43 -0
  143. package/dist/sandbox/config-worker.cjs.map +1 -0
  144. package/dist/sandbox/config-worker.d.cts +1 -0
  145. package/dist/sandbox/config-worker.d.mts +1 -0
  146. package/dist/sandbox/config-worker.mjs +44 -0
  147. package/dist/sandbox/config-worker.mjs.map +1 -0
  148. package/dist/sandbox/discover-worker.cjs +44 -0
  149. package/dist/sandbox/discover-worker.cjs.map +1 -0
  150. package/dist/sandbox/discover-worker.d.cts +1 -0
  151. package/dist/sandbox/discover-worker.d.mts +1 -0
  152. package/dist/sandbox/discover-worker.mjs +45 -0
  153. package/dist/sandbox/discover-worker.mjs.map +1 -0
  154. package/dist/sandbox-CL--ZDui.cjs +164 -0
  155. package/dist/sandbox-CL--ZDui.cjs.map +1 -0
  156. package/dist/sandbox-Dm247NGx.mjs +117 -0
  157. package/dist/sandbox-Dm247NGx.mjs.map +1 -0
  158. package/dist/sandbox-M8UnLhXE.d.cts +126 -0
  159. package/dist/sandbox-M8UnLhXE.d.cts.map +1 -0
  160. package/dist/sandbox-M8UnLhXE.d.mts +126 -0
  161. package/dist/sandbox-M8UnLhXE.d.mts.map +1 -0
  162. package/dist/{workspace-BFe57es7.mjs → schemas-Ckm_aBnF.cjs} +71 -982
  163. package/dist/schemas-Ckm_aBnF.cjs.map +1 -0
  164. package/dist/{workspace-B6zQO6RY.cjs → schemas-D2LCF689.mjs} +2 -1168
  165. package/dist/schemas-D2LCF689.mjs.map +1 -0
  166. package/dist/{sniffer-DHE2Nafd.mjs → sniffer-49KPbDgq.mjs} +131 -444
  167. package/dist/sniffer-49KPbDgq.mjs.map +1 -0
  168. package/dist/{sniffer-BsfPa-GA.cjs → sniffer-ByhbEW5A.cjs} +145 -512
  169. package/dist/sniffer-ByhbEW5A.cjs.map +1 -0
  170. package/dist/sst-BdALKEas.cjs +453 -0
  171. package/dist/sst-BdALKEas.cjs.map +1 -0
  172. package/dist/sst-Cper040I.mjs +430 -0
  173. package/dist/sst-Cper040I.mjs.map +1 -0
  174. package/dist/{store-BS8A7NcA.mjs → store-BaaonhkJ.mjs} +2 -2
  175. package/dist/{store-BS8A7NcA.mjs.map → store-BaaonhkJ.mjs.map} +1 -1
  176. package/dist/{store-KvNQwYaB.cjs → store-D_2ByRtW.cjs} +4 -4
  177. package/dist/{store-KvNQwYaB.cjs.map → store-D_2ByRtW.cjs.map} +1 -1
  178. package/dist/target/public.cjs +3 -3
  179. package/dist/target/public.d.cts +3 -3
  180. package/dist/target/public.d.mts +3 -3
  181. package/dist/target/public.mjs +3 -3
  182. package/dist/{terminal-6oL0vANs.cjs → terminal-Bdv--jhY.cjs} +16 -111
  183. package/dist/terminal-Bdv--jhY.cjs.map +1 -0
  184. package/dist/{terminal-ByZNjuig.mjs → terminal-D7Ntz6WE.mjs} +13 -90
  185. package/dist/terminal-D7Ntz6WE.mjs.map +1 -0
  186. package/dist/{types-DIA7Li-J.d.cts → types-B_bEQvb9.d.mts} +42 -7
  187. package/dist/types-B_bEQvb9.d.mts.map +1 -0
  188. package/dist/{types-CfLKGfC_.d.mts → types-DkrDOMxw.d.cts} +43 -6
  189. package/dist/types-DkrDOMxw.d.cts.map +1 -0
  190. package/dist/utils-D2Nk1Nv2.cjs +205 -0
  191. package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
  192. package/dist/utils-D_fxUqvU.mjs +156 -0
  193. package/dist/utils-D_fxUqvU.mjs.map +1 -0
  194. package/dist/vitest.cjs +2 -2
  195. package/dist/vitest.mjs +2 -2
  196. package/dist/workerRuntime-BXfhbe13.cjs +108 -0
  197. package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
  198. package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
  199. package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
  200. package/dist/workspace/index.cjs +1 -1
  201. package/dist/workspace/index.d.cts +2 -2
  202. package/dist/workspace/index.d.mts +2 -2
  203. package/dist/workspace/index.mjs +1 -1
  204. package/dist/workspace-BwgWJK7h.cjs +1196 -0
  205. package/dist/workspace-BwgWJK7h.cjs.map +1 -0
  206. package/dist/workspace-Bwit4q9O.mjs +1024 -0
  207. package/dist/workspace-Bwit4q9O.mjs.map +1 -0
  208. package/package.json +13 -13
  209. package/dist/config-BYh9S0cZ.cjs +0 -534
  210. package/dist/config-BYh9S0cZ.cjs.map +0 -1
  211. package/dist/config-Bf4-bROQ.mjs +0 -457
  212. package/dist/config-Bf4-bROQ.mjs.map +0 -1
  213. package/dist/config.d.cts.map +0 -1
  214. package/dist/config.d.mts.map +0 -1
  215. package/dist/define-CHBIEc5j.mjs.map +0 -1
  216. package/dist/define-Cv_QvDrg.cjs.map +0 -1
  217. package/dist/deploy-Cg9fae7a.mjs.map +0 -1
  218. package/dist/deploy-D8Qr-Xto.cjs.map +0 -1
  219. package/dist/discover-Bc-4eA_p.cjs.map +0 -1
  220. package/dist/discover-FrYvzkeC.mjs.map +0 -1
  221. package/dist/home-DOzBaWaL.cjs +0 -33
  222. package/dist/home-DOzBaWaL.cjs.map +0 -1
  223. package/dist/home-GI7pJl1M.mjs +0 -22
  224. package/dist/home-GI7pJl1M.mjs.map +0 -1
  225. package/dist/resolve-CFCIkm7m.mjs.map +0 -1
  226. package/dist/resolve-wbv66HjD.cjs.map +0 -1
  227. package/dist/sniffer-BsfPa-GA.cjs.map +0 -1
  228. package/dist/sniffer-DHE2Nafd.mjs.map +0 -1
  229. package/dist/terminal-6oL0vANs.cjs.map +0 -1
  230. package/dist/terminal-ByZNjuig.mjs.map +0 -1
  231. package/dist/types-CfLKGfC_.d.mts.map +0 -1
  232. package/dist/types-DIA7Li-J.d.cts.map +0 -1
  233. package/dist/workspace-B6zQO6RY.cjs.map +0 -1
  234. package/dist/workspace-BFe57es7.mjs.map +0 -1
@@ -0,0 +1,156 @@
1
+ import { dirname, join, parse } from "node:path";
2
+ import { existsSync, readFileSync } from "node:fs";
3
+ import fg from "fast-glob";
4
+ import { parse as parse$1 } from "yaml";
5
+ //#region src/init/utils.ts
6
+ /**
7
+ * Detect the package manager being used based on lockfiles or npm_config_user_agent
8
+ */
9
+ function detectPackageManager(cwd = process.cwd()) {
10
+ if (existsSync(join(cwd, "pnpm-lock.yaml"))) return "pnpm";
11
+ if (existsSync(join(cwd, "yarn.lock"))) return "yarn";
12
+ if (existsSync(join(cwd, "bun.lockb"))) return "bun";
13
+ if (existsSync(join(cwd, "package-lock.json"))) return "npm";
14
+ const userAgent = process.env.npm_config_user_agent || "";
15
+ if (userAgent.includes("pnpm")) return "pnpm";
16
+ if (userAgent.includes("yarn")) return "yarn";
17
+ if (userAgent.includes("bun")) return "bun";
18
+ return "npm";
19
+ }
20
+ /** `gkm init`'s flags, which a name can swallow when a space goes missing. */
21
+ const INIT_FLAGS = [
22
+ "yes",
23
+ "name",
24
+ "template",
25
+ "monorepo",
26
+ "api-path",
27
+ "pm",
28
+ "skip-install"
29
+ ];
30
+ /**
31
+ * Validate project name for npm package naming conventions
32
+ */
33
+ function validateProjectName(name) {
34
+ if (!name) return "Project name is required";
35
+ if (!/^[a-z0-9-_@/.]+$/i.test(name)) return "Project name can only contain letters, numbers, hyphens, underscores, @, /, and .";
36
+ const flag = name.match(/--(\w[\w-]*)$/)?.[1];
37
+ if (flag && INIT_FLAGS.includes(flag)) return `"${name}" ends in the --${flag} flag. Did you mean \`${name.slice(0, -(flag.length + 2))} --${flag}\`?`;
38
+ if ([
39
+ "node_modules",
40
+ ".git",
41
+ "package.json",
42
+ "src"
43
+ ].includes(name.toLowerCase())) return `"${name}" is a reserved name`;
44
+ return true;
45
+ }
46
+ /**
47
+ * Check if a directory already exists at the target path
48
+ */
49
+ function checkDirectoryExists(name, cwd = process.cwd()) {
50
+ const targetPath = join(cwd, name);
51
+ if (existsSync(targetPath)) return `Directory "${name}" already exists`;
52
+ return true;
53
+ }
54
+ /**
55
+ * Get the install command for a package manager
56
+ */
57
+ function getInstallCommand(pkgManager) {
58
+ switch (pkgManager) {
59
+ case "pnpm": return "pnpm install";
60
+ case "yarn": return "yarn";
61
+ case "bun": return "bun install";
62
+ default: return "npm install";
63
+ }
64
+ }
65
+ /**
66
+ * Get the dev command for a package manager
67
+ */
68
+ function getRunCommand(pkgManager, script) {
69
+ switch (pkgManager) {
70
+ case "pnpm": return `pnpm ${script}`;
71
+ case "yarn": return `yarn ${script}`;
72
+ case "bun": return `bun run ${script}`;
73
+ default: return `npm run ${script}`;
74
+ }
75
+ }
76
+ /**
77
+ * Run a binary the project installed, through its package manager — so it is
78
+ * the project's own version, not whatever \`npx\` would fetch.
79
+ */
80
+ function getExecCommand(pkgManager, command) {
81
+ switch (pkgManager) {
82
+ case "pnpm": return `pnpm exec ${command}`;
83
+ case "yarn": return `yarn ${command}`;
84
+ case "bun": return `bunx ${command}`;
85
+ default: return `npx --no-install ${command}`;
86
+ }
87
+ }
88
+ const lockfileByPm = {
89
+ pnpm: "pnpm-lock.yaml",
90
+ yarn: "yarn.lock",
91
+ npm: "package-lock.json",
92
+ bun: "bun.lockb"
93
+ };
94
+ /**
95
+ * Find the workspace/project root by walking up from cwd.
96
+ * Checks for PM-specific workspace config, package.json#workspaces,
97
+ * and lockfiles.
98
+ */
99
+ function findWorkspaceRoot(cwd, pm) {
100
+ let dir = cwd;
101
+ const root = parse(dir).root;
102
+ const lockfile = lockfileByPm[pm];
103
+ while (dir !== root) {
104
+ if (pm === "pnpm" && existsSync(join(dir, "pnpm-workspace.yaml"))) return dir;
105
+ const pkgJsonPath = join(dir, "package.json");
106
+ if (existsSync(pkgJsonPath)) try {
107
+ if (JSON.parse(readFileSync(pkgJsonPath, "utf-8")).workspaces) return dir;
108
+ } catch {}
109
+ if (existsSync(join(dir, lockfile))) return dir;
110
+ dir = dirname(dir);
111
+ }
112
+ return cwd;
113
+ }
114
+ /**
115
+ * Get workspace package glob patterns from pnpm-workspace.yaml
116
+ * or package.json#workspaces.
117
+ */
118
+ function getWorkspaceGlobs(root) {
119
+ const pnpmWorkspacePath = join(root, "pnpm-workspace.yaml");
120
+ if (existsSync(pnpmWorkspacePath)) {
121
+ const content = readFileSync(pnpmWorkspacePath, "utf-8");
122
+ return parse$1(content)?.packages ?? [];
123
+ }
124
+ const rootPkgJsonPath = join(root, "package.json");
125
+ if (existsSync(rootPkgJsonPath)) {
126
+ const pkg = JSON.parse(readFileSync(rootPkgJsonPath, "utf-8"));
127
+ if (Array.isArray(pkg.workspaces)) return pkg.workspaces;
128
+ if (pkg.workspaces?.packages) return pkg.workspaces.packages;
129
+ }
130
+ return [];
131
+ }
132
+ /**
133
+ * Find all package.json files across a workspace.
134
+ * Returns the root package.json plus all workspace member package.json paths.
135
+ */
136
+ function findWorkspacePackages(cwd, pm) {
137
+ const workspaceRoot = findWorkspaceRoot(cwd, pm);
138
+ const results = [];
139
+ const rootPkgJson = join(workspaceRoot, "package.json");
140
+ if (existsSync(rootPkgJson)) results.push(rootPkgJson);
141
+ const globs = getWorkspaceGlobs(workspaceRoot);
142
+ for (const glob of globs) {
143
+ const pattern = `${glob}/package.json`;
144
+ const matches = fg.sync(pattern, {
145
+ cwd: workspaceRoot,
146
+ absolute: true,
147
+ ignore: ["**/node_modules/**"]
148
+ });
149
+ results.push(...matches);
150
+ }
151
+ return [...new Set(results)];
152
+ }
153
+ //#endregion
154
+ export { getExecCommand as a, validateProjectName as c, findWorkspaceRoot as i, detectPackageManager as n, getInstallCommand as o, findWorkspacePackages as r, getRunCommand as s, checkDirectoryExists as t };
155
+
156
+ //# sourceMappingURL=utils-D_fxUqvU.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils-D_fxUqvU.mjs","names":["parseYaml"],"sources":["../src/init/utils.ts"],"sourcesContent":["import { existsSync, readFileSync } from 'node:fs';\nimport { dirname, join, parse } from 'node:path';\nimport fg from 'fast-glob';\nimport { parse as parseYaml } from 'yaml';\n\nexport type PackageManager = 'pnpm' | 'npm' | 'yarn' | 'bun';\n\n/**\n * Detect the package manager being used based on lockfiles or npm_config_user_agent\n */\nexport function detectPackageManager(\n\tcwd: string = process.cwd(),\n): PackageManager {\n\t// Check for lockfiles in cwd\n\tif (existsSync(join(cwd, 'pnpm-lock.yaml'))) return 'pnpm';\n\tif (existsSync(join(cwd, 'yarn.lock'))) return 'yarn';\n\tif (existsSync(join(cwd, 'bun.lockb'))) return 'bun';\n\tif (existsSync(join(cwd, 'package-lock.json'))) return 'npm';\n\n\t// Check npm_config_user_agent (set when running via npx/pnpm dlx/etc)\n\tconst userAgent = process.env.npm_config_user_agent || '';\n\tif (userAgent.includes('pnpm')) return 'pnpm';\n\tif (userAgent.includes('yarn')) return 'yarn';\n\tif (userAgent.includes('bun')) return 'bun';\n\n\treturn 'npm';\n}\n\n/** `gkm init`'s flags, which a name can swallow when a space goes missing. */\nconst INIT_FLAGS = [\n\t'yes',\n\t'name',\n\t'template',\n\t'monorepo',\n\t'api-path',\n\t'pm',\n\t'skip-install',\n];\n\n/**\n * Validate project name for npm package naming conventions\n */\nexport function validateProjectName(name: string): boolean | string {\n\tif (!name) {\n\t\treturn 'Project name is required';\n\t}\n\n\t// Check for valid npm package name characters\n\tif (!/^[a-z0-9-_@/.]+$/i.test(name)) {\n\t\treturn 'Project name can only contain letters, numbers, hyphens, underscores, @, /, and .';\n\t}\n\n\t// `init shop--monorepo` is `init shop --monorepo` with the space\n\t// lost, and the flag then ends up in every package scope and physical name.\n\tconst flag = name.match(/--(\\w[\\w-]*)$/)?.[1];\n\tif (flag && INIT_FLAGS.includes(flag)) {\n\t\tconst intended = name.slice(0, -(flag.length + 2));\n\t\treturn `\"${name}\" ends in the --${flag} flag. Did you mean \\`${intended} --${flag}\\`?`;\n\t}\n\n\t// Check for reserved names\n\tconst reserved = ['node_modules', '.git', 'package.json', 'src'];\n\tif (reserved.includes(name.toLowerCase())) {\n\t\treturn `\"${name}\" is a reserved name`;\n\t}\n\n\treturn true;\n}\n\n/**\n * Check if a directory already exists at the target path\n */\nexport function checkDirectoryExists(\n\tname: string,\n\tcwd: string = process.cwd(),\n): boolean | string {\n\tconst targetPath = join(cwd, name);\n\tif (existsSync(targetPath)) {\n\t\treturn `Directory \"${name}\" already exists`;\n\t}\n\treturn true;\n}\n\n/**\n * Get the install command for a package manager\n */\nexport function getInstallCommand(pkgManager: PackageManager): string {\n\tswitch (pkgManager) {\n\t\tcase 'pnpm':\n\t\t\treturn 'pnpm install';\n\t\tcase 'yarn':\n\t\t\treturn 'yarn';\n\t\tcase 'bun':\n\t\t\treturn 'bun install';\n\t\tdefault:\n\t\t\treturn 'npm install';\n\t}\n}\n\n/**\n * Get the dev command for a package manager\n */\nexport function getRunCommand(\n\tpkgManager: PackageManager,\n\tscript: string,\n): string {\n\tswitch (pkgManager) {\n\t\tcase 'pnpm':\n\t\t\treturn `pnpm ${script}`;\n\t\tcase 'yarn':\n\t\t\treturn `yarn ${script}`;\n\t\tcase 'bun':\n\t\t\treturn `bun run ${script}`;\n\t\tdefault:\n\t\t\treturn `npm run ${script}`;\n\t}\n}\n\n/**\n * Run a binary the project installed, through its package manager — so it is\n * the project's own version, not whatever \\`npx\\` would fetch.\n */\nexport function getExecCommand(\n\tpkgManager: PackageManager,\n\tcommand: string,\n): string {\n\tswitch (pkgManager) {\n\t\tcase 'pnpm':\n\t\t\treturn `pnpm exec ${command}`;\n\t\tcase 'yarn':\n\t\t\treturn `yarn ${command}`;\n\t\tcase 'bun':\n\t\t\treturn `bunx ${command}`;\n\t\tdefault:\n\t\t\treturn `npx --no-install ${command}`;\n\t}\n}\n\nconst lockfileByPm: Record<PackageManager, string> = {\n\tpnpm: 'pnpm-lock.yaml',\n\tyarn: 'yarn.lock',\n\tnpm: 'package-lock.json',\n\tbun: 'bun.lockb',\n};\n\n/**\n * Find the workspace/project root by walking up from cwd.\n * Checks for PM-specific workspace config, package.json#workspaces,\n * and lockfiles.\n */\nexport function findWorkspaceRoot(cwd: string, pm: PackageManager): string {\n\tlet dir = cwd;\n\tconst root = parse(dir).root;\n\tconst lockfile = lockfileByPm[pm];\n\n\twhile (dir !== root) {\n\t\tif (pm === 'pnpm' && existsSync(join(dir, 'pnpm-workspace.yaml'))) {\n\t\t\treturn dir;\n\t\t}\n\n\t\tconst pkgJsonPath = join(dir, 'package.json');\n\t\tif (existsSync(pkgJsonPath)) {\n\t\t\ttry {\n\t\t\t\tconst pkg = JSON.parse(readFileSync(pkgJsonPath, 'utf-8'));\n\t\t\t\tif (pkg.workspaces) return dir;\n\t\t\t} catch {\n\t\t\t\t// ignore malformed package.json\n\t\t\t}\n\t\t}\n\n\t\tif (existsSync(join(dir, lockfile))) {\n\t\t\treturn dir;\n\t\t}\n\n\t\tdir = dirname(dir);\n\t}\n\n\treturn cwd;\n}\n\n/**\n * Get workspace package glob patterns from pnpm-workspace.yaml\n * or package.json#workspaces.\n */\nexport function getWorkspaceGlobs(root: string): string[] {\n\tconst pnpmWorkspacePath = join(root, 'pnpm-workspace.yaml');\n\tif (existsSync(pnpmWorkspacePath)) {\n\t\tconst content = readFileSync(pnpmWorkspacePath, 'utf-8');\n\t\tconst parsed = parseYaml(content);\n\t\treturn parsed?.packages ?? [];\n\t}\n\n\tconst rootPkgJsonPath = join(root, 'package.json');\n\tif (existsSync(rootPkgJsonPath)) {\n\t\tconst pkg = JSON.parse(readFileSync(rootPkgJsonPath, 'utf-8'));\n\t\tif (Array.isArray(pkg.workspaces)) {\n\t\t\treturn pkg.workspaces;\n\t\t}\n\t\tif (pkg.workspaces?.packages) {\n\t\t\treturn pkg.workspaces.packages;\n\t\t}\n\t}\n\n\treturn [];\n}\n\n/**\n * Find all package.json files across a workspace.\n * Returns the root package.json plus all workspace member package.json paths.\n */\nexport function findWorkspacePackages(\n\tcwd: string,\n\tpm: PackageManager,\n): string[] {\n\tconst workspaceRoot = findWorkspaceRoot(cwd, pm);\n\tconst results: string[] = [];\n\n\tconst rootPkgJson = join(workspaceRoot, 'package.json');\n\tif (existsSync(rootPkgJson)) {\n\t\tresults.push(rootPkgJson);\n\t}\n\n\tconst globs = getWorkspaceGlobs(workspaceRoot);\n\n\tfor (const glob of globs) {\n\t\tconst pattern = `${glob}/package.json`;\n\t\tconst matches = fg.sync(pattern, {\n\t\t\tcwd: workspaceRoot,\n\t\t\tabsolute: true,\n\t\t\tignore: ['**/node_modules/**'],\n\t\t});\n\t\tresults.push(...matches);\n\t}\n\n\treturn [...new Set(results)];\n}\n"],"mappings":"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"}
package/dist/vitest.cjs CHANGED
@@ -1,8 +1,8 @@
1
- const require_ready = require("./ready-XlNx-Gbo.cjs");
1
+ const require_ready = require("./ready-brEhh68f.cjs");
2
2
  let node_path = require("node:path");
3
3
  let node_fs = require("node:fs");
4
- let node_child_process = require("node:child_process");
5
4
  let node_url = require("node:url");
5
+ let node_child_process = require("node:child_process");
6
6
  //#region src/vitest.ts
7
7
  /**
8
8
  * The Vitest global setup for a gkm project: the test stage, reconciled,
package/dist/vitest.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { i as TEST_MANIFEST_ENV, n as TEST_READY_FILE } from "./ready-DQIy21W5.mjs";
1
+ import { i as TEST_MANIFEST_ENV, n as TEST_READY_FILE } from "./ready-bQfu9GES.mjs";
2
2
  import { dirname, join } from "node:path";
3
3
  import { readFileSync } from "node:fs";
4
- import { execFileSync } from "node:child_process";
5
4
  import { fileURLToPath } from "node:url";
5
+ import { execFileSync } from "node:child_process";
6
6
  //#region src/vitest.ts
7
7
  /**
8
8
  * The Vitest global setup for a gkm project: the test stage, reconciled,
@@ -0,0 +1,108 @@
1
+ let node_path = require("node:path");
2
+ let node_fs = require("node:fs");
3
+ let node_url = require("node:url");
4
+ //#region src/sandbox/workerRuntime.ts
5
+ /**
6
+ * What a worker script needs on its side of the sandbox: to answer, to say
7
+ * what would not cross as data, and to resolve the project's path aliases the
8
+ * way `gkm` does.
9
+ *
10
+ * Kept apart from `worker.ts`, which the host runs, so a worker loads nothing
11
+ * of the host's side.
12
+ */
13
+ /** The line prefix a worker's answer is written after, on stdout. */
14
+ const WORKER_RESULT_MARKER = "@@gkm-worker-result@@";
15
+ /**
16
+ * Write a worker's answer, and end the worker once it is out.
17
+ *
18
+ * Exiting rather than returning: the project's code may have left a server, a
19
+ * timer or a connection open, and the answer is all the deploy waits for. The
20
+ * callback, because a pipe on macOS is written asynchronously and an exit
21
+ * before it drains would cut the answer short.
22
+ */
23
+ function answer(value) {
24
+ process.stdout.write(`${WORKER_RESULT_MARKER}${JSON.stringify(value)}\n`, () => process.exit(0));
25
+ }
26
+ /**
27
+ * Where in `value` something is that JSON cannot carry faithfully: a
28
+ * function, a class instance, a symbol, a bigint, a `Date`, a `Map` — as
29
+ * paths like `state.provider` or `apps.api.hooks[0]`.
30
+ *
31
+ * `JSON.stringify` drops a function silently and turns a store into `{}`, so a
32
+ * config that crossed it would arrive *different* rather than refused.
33
+ */
34
+ function liveValuePaths(value, path = "") {
35
+ if (value === null) return [];
36
+ switch (typeof value) {
37
+ case "string":
38
+ case "boolean":
39
+ case "undefined": return [];
40
+ case "number": return Number.isFinite(value) ? [] : [path || "(root)"];
41
+ case "object": break;
42
+ default: return [path || "(root)"];
43
+ }
44
+ if (Array.isArray(value)) return value.flatMap((item, index) => liveValuePaths(item, `${path}[${index}]`));
45
+ const proto = Object.getPrototypeOf(value);
46
+ if (proto !== Object.prototype && proto !== null) return [path || "(root)"];
47
+ return Object.entries(value).flatMap(([key, item]) => liveValuePaths(item, path ? `${path}.${key}` : key));
48
+ }
49
+ /** An error, as plain data a host can rebuild a message from. */
50
+ function errorData(error) {
51
+ if (!(error instanceof Error)) return {
52
+ name: "Error",
53
+ message: String(error)
54
+ };
55
+ return {
56
+ ...Object.fromEntries(Object.entries(error).filter(([, v]) => liveValuePaths(v).length === 0)),
57
+ name: error.name,
58
+ message: error.message
59
+ };
60
+ }
61
+ /**
62
+ * Resolve each module's path aliases through its own tsconfig, as `gkm` does
63
+ * — the hook ships beside `bin/gkm.mjs`. Without it a construct importing
64
+ * `~/db` resolves in `gkm dev` and not in a deploy.
65
+ */
66
+ async function registerAdjacentTsconfig() {
67
+ for (let dir = (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href)); (0, node_path.dirname)(dir) !== dir; dir = (0, node_path.dirname)(dir)) {
68
+ const hook = (0, node_path.join)(dir, "bin", "adjacent-tsconfig.mjs");
69
+ if ((0, node_fs.existsSync)(hook)) {
70
+ const { registerAdjacentTsconfig: register } = await import((0, node_url.pathToFileURL)(hook).href);
71
+ await register();
72
+ return;
73
+ }
74
+ }
75
+ }
76
+ //#endregion
77
+ Object.defineProperty(exports, "WORKER_RESULT_MARKER", {
78
+ enumerable: true,
79
+ get: function() {
80
+ return WORKER_RESULT_MARKER;
81
+ }
82
+ });
83
+ Object.defineProperty(exports, "answer", {
84
+ enumerable: true,
85
+ get: function() {
86
+ return answer;
87
+ }
88
+ });
89
+ Object.defineProperty(exports, "errorData", {
90
+ enumerable: true,
91
+ get: function() {
92
+ return errorData;
93
+ }
94
+ });
95
+ Object.defineProperty(exports, "liveValuePaths", {
96
+ enumerable: true,
97
+ get: function() {
98
+ return liveValuePaths;
99
+ }
100
+ });
101
+ Object.defineProperty(exports, "registerAdjacentTsconfig", {
102
+ enumerable: true,
103
+ get: function() {
104
+ return registerAdjacentTsconfig;
105
+ }
106
+ });
107
+
108
+ //# sourceMappingURL=workerRuntime-BXfhbe13.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workerRuntime-BXfhbe13.cjs","names":["dirname","fileURLToPath","join","existsSync","pathToFileURL"],"sources":["../src/sandbox/workerRuntime.ts"],"sourcesContent":["/**\n * What a worker script needs on its side of the sandbox: to answer, to say\n * what would not cross as data, and to resolve the project's path aliases the\n * way `gkm` does.\n *\n * Kept apart from `worker.ts`, which the host runs, so a worker loads nothing\n * of the host's side.\n */\n\nimport { existsSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\n\n/** The line prefix a worker's answer is written after, on stdout. */\nexport const WORKER_RESULT_MARKER = '@@gkm-worker-result@@';\n\n/**\n * Write a worker's answer, and end the worker once it is out.\n *\n * Exiting rather than returning: the project's code may have left a server, a\n * timer or a connection open, and the answer is all the deploy waits for. The\n * callback, because a pipe on macOS is written asynchronously and an exit\n * before it drains would cut the answer short.\n */\nexport function answer(value: unknown): void {\n\tprocess.stdout.write(\n\t\t`${WORKER_RESULT_MARKER}${JSON.stringify(value)}\\n`,\n\t\t() => process.exit(0),\n\t);\n}\n\n/**\n * Where in `value` something is that JSON cannot carry faithfully: a\n * function, a class instance, a symbol, a bigint, a `Date`, a `Map` — as\n * paths like `state.provider` or `apps.api.hooks[0]`.\n *\n * `JSON.stringify` drops a function silently and turns a store into `{}`, so a\n * config that crossed it would arrive *different* rather than refused.\n */\nexport function liveValuePaths(value: unknown, path = ''): string[] {\n\tif (value === null) return [];\n\tswitch (typeof value) {\n\t\tcase 'string':\n\t\tcase 'boolean':\n\t\tcase 'undefined':\n\t\t\treturn [];\n\t\tcase 'number':\n\t\t\treturn Number.isFinite(value) ? [] : [path || '(root)'];\n\t\tcase 'object':\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn [path || '(root)'];\n\t}\n\n\tif (Array.isArray(value)) {\n\t\treturn value.flatMap((item, index) =>\n\t\t\tliveValuePaths(item, `${path}[${index}]`),\n\t\t);\n\t}\n\n\tconst proto = Object.getPrototypeOf(value);\n\tif (proto !== Object.prototype && proto !== null) return [path || '(root)'];\n\n\treturn Object.entries(value as Record<string, unknown>).flatMap(\n\t\t([key, item]) => liveValuePaths(item, path ? `${path}.${key}` : key),\n\t);\n}\n\n/** An error, as plain data a host can rebuild a message from. */\nexport function errorData(error: unknown): {\n\tname: string;\n\tmessage: string;\n\t[field: string]: unknown;\n} {\n\tif (!(error instanceof Error))\n\t\treturn { name: 'Error', message: String(error) };\n\tconst fields = Object.fromEntries(\n\t\tObject.entries(error).filter(([, v]) => liveValuePaths(v).length === 0),\n\t);\n\treturn { ...fields, name: error.name, message: error.message };\n}\n\n/**\n * Resolve each module's path aliases through its own tsconfig, as `gkm` does\n * — the hook ships beside `bin/gkm.mjs`. Without it a construct importing\n * `~/db` resolves in `gkm dev` and not in a deploy.\n */\nexport async function registerAdjacentTsconfig(): Promise<void> {\n\tfor (\n\t\tlet dir = dirname(fileURLToPath(import.meta.url));\n\t\tdirname(dir) !== dir;\n\t\tdir = dirname(dir)\n\t) {\n\t\tconst hook = join(dir, 'bin', 'adjacent-tsconfig.mjs');\n\t\tif (existsSync(hook)) {\n\t\t\tconst { registerAdjacentTsconfig: register } = await import(\n\t\t\t\tpathToFileURL(hook).href\n\t\t\t);\n\t\t\tawait register();\n\t\t\treturn;\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAa,uBAAuB;;;;;;;;;AAUpC,SAAgB,OAAO,OAAsB;CAC5C,QAAQ,OAAO,MACd,GAAG,uBAAuB,KAAK,UAAU,KAAK,EAAE,WAC1C,QAAQ,KAAK,CAAC,CACrB;AACD;;;;;;;;;AAUA,SAAgB,eAAe,OAAgB,OAAO,IAAc;CACnE,IAAI,UAAU,MAAM,OAAO,CAAC;CAC5B,QAAQ,OAAO,OAAf;EACC,KAAK;EACL,KAAK;EACL,KAAK,aACJ,OAAO,CAAC;EACT,KAAK,UACJ,OAAO,OAAO,SAAS,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,QAAQ;EACvD,KAAK,UACJ;EACD,SACC,OAAO,CAAC,QAAQ,QAAQ;CAC1B;CAEA,IAAI,MAAM,QAAQ,KAAK,GACtB,OAAO,MAAM,SAAS,MAAM,UAC3B,eAAe,MAAM,GAAG,KAAK,GAAG,MAAM,EAAE,CACzC;CAGD,MAAM,QAAQ,OAAO,eAAe,KAAK;CACzC,IAAI,UAAU,OAAO,aAAa,UAAU,MAAM,OAAO,CAAC,QAAQ,QAAQ;CAE1E,OAAO,OAAO,QAAQ,KAAgC,CAAC,CAAC,SACtD,CAAC,KAAK,UAAU,eAAe,MAAM,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,CACpE;AACD;;AAGA,SAAgB,UAAU,OAIxB;CACD,IAAI,EAAE,iBAAiB,QACtB,OAAO;EAAE,MAAM;EAAS,SAAS,OAAO,KAAK;CAAE;CAIhD,OAAO;EAAE,GAHM,OAAO,YACrB,OAAO,QAAQ,KAAK,CAAC,CAAC,QAAQ,GAAG,OAAO,eAAe,CAAC,CAAC,CAAC,WAAW,CAAC,CAEtD;EAAG,MAAM,MAAM;EAAM,SAAS,MAAM;CAAQ;AAC9D;;;;;;AAOA,eAAsB,2BAA0C;CAC/D,KACC,IAAI,OAAA,GAAMA,UAAAA,QAAAA,EAAAA,GAAQC,SAAAA,cAAAA,CAAAA,QAAAA,KAAAA,CAAAA,CAAAA,cAAAA,UAAAA,CAAAA,CAAAA,IAA6B,CAAC,IAAA,GAChDD,UAAAA,QAAAA,CAAQ,GAAG,MAAM,KACjB,OAAA,GAAMA,UAAAA,QAAAA,CAAQ,GAAG,GAChB;EACD,MAAM,QAAA,GAAOE,UAAAA,KAAAA,CAAK,KAAK,OAAO,uBAAuB;EACrD,KAAA,GAAIC,QAAAA,WAAAA,CAAW,IAAI,GAAG;GACrB,MAAM,EAAE,0BAA0B,aAAa,MAAM,QAAA,GACpDC,SAAAA,cAAAA,CAAc,IAAI,CAAC,CAAC;GAErB,MAAM,SAAS;GACf;EACD;CACD;AACD"}
@@ -0,0 +1,79 @@
1
+ import { dirname, join } from "node:path";
2
+ import { existsSync } from "node:fs";
3
+ import { fileURLToPath, pathToFileURL } from "node:url";
4
+ //#region src/sandbox/workerRuntime.ts
5
+ /**
6
+ * What a worker script needs on its side of the sandbox: to answer, to say
7
+ * what would not cross as data, and to resolve the project's path aliases the
8
+ * way `gkm` does.
9
+ *
10
+ * Kept apart from `worker.ts`, which the host runs, so a worker loads nothing
11
+ * of the host's side.
12
+ */
13
+ /** The line prefix a worker's answer is written after, on stdout. */
14
+ const WORKER_RESULT_MARKER = "@@gkm-worker-result@@";
15
+ /**
16
+ * Write a worker's answer, and end the worker once it is out.
17
+ *
18
+ * Exiting rather than returning: the project's code may have left a server, a
19
+ * timer or a connection open, and the answer is all the deploy waits for. The
20
+ * callback, because a pipe on macOS is written asynchronously and an exit
21
+ * before it drains would cut the answer short.
22
+ */
23
+ function answer(value) {
24
+ process.stdout.write(`${WORKER_RESULT_MARKER}${JSON.stringify(value)}\n`, () => process.exit(0));
25
+ }
26
+ /**
27
+ * Where in `value` something is that JSON cannot carry faithfully: a
28
+ * function, a class instance, a symbol, a bigint, a `Date`, a `Map` — as
29
+ * paths like `state.provider` or `apps.api.hooks[0]`.
30
+ *
31
+ * `JSON.stringify` drops a function silently and turns a store into `{}`, so a
32
+ * config that crossed it would arrive *different* rather than refused.
33
+ */
34
+ function liveValuePaths(value, path = "") {
35
+ if (value === null) return [];
36
+ switch (typeof value) {
37
+ case "string":
38
+ case "boolean":
39
+ case "undefined": return [];
40
+ case "number": return Number.isFinite(value) ? [] : [path || "(root)"];
41
+ case "object": break;
42
+ default: return [path || "(root)"];
43
+ }
44
+ if (Array.isArray(value)) return value.flatMap((item, index) => liveValuePaths(item, `${path}[${index}]`));
45
+ const proto = Object.getPrototypeOf(value);
46
+ if (proto !== Object.prototype && proto !== null) return [path || "(root)"];
47
+ return Object.entries(value).flatMap(([key, item]) => liveValuePaths(item, path ? `${path}.${key}` : key));
48
+ }
49
+ /** An error, as plain data a host can rebuild a message from. */
50
+ function errorData(error) {
51
+ if (!(error instanceof Error)) return {
52
+ name: "Error",
53
+ message: String(error)
54
+ };
55
+ return {
56
+ ...Object.fromEntries(Object.entries(error).filter(([, v]) => liveValuePaths(v).length === 0)),
57
+ name: error.name,
58
+ message: error.message
59
+ };
60
+ }
61
+ /**
62
+ * Resolve each module's path aliases through its own tsconfig, as `gkm` does
63
+ * — the hook ships beside `bin/gkm.mjs`. Without it a construct importing
64
+ * `~/db` resolves in `gkm dev` and not in a deploy.
65
+ */
66
+ async function registerAdjacentTsconfig() {
67
+ for (let dir = dirname(fileURLToPath(import.meta.url)); dirname(dir) !== dir; dir = dirname(dir)) {
68
+ const hook = join(dir, "bin", "adjacent-tsconfig.mjs");
69
+ if (existsSync(hook)) {
70
+ const { registerAdjacentTsconfig: register } = await import(pathToFileURL(hook).href);
71
+ await register();
72
+ return;
73
+ }
74
+ }
75
+ }
76
+ //#endregion
77
+ export { registerAdjacentTsconfig as a, liveValuePaths as i, answer as n, errorData as r, WORKER_RESULT_MARKER as t };
78
+
79
+ //# sourceMappingURL=workerRuntime-CsOyBRx2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workerRuntime-CsOyBRx2.mjs","names":[],"sources":["../src/sandbox/workerRuntime.ts"],"sourcesContent":["/**\n * What a worker script needs on its side of the sandbox: to answer, to say\n * what would not cross as data, and to resolve the project's path aliases the\n * way `gkm` does.\n *\n * Kept apart from `worker.ts`, which the host runs, so a worker loads nothing\n * of the host's side.\n */\n\nimport { existsSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\n\n/** The line prefix a worker's answer is written after, on stdout. */\nexport const WORKER_RESULT_MARKER = '@@gkm-worker-result@@';\n\n/**\n * Write a worker's answer, and end the worker once it is out.\n *\n * Exiting rather than returning: the project's code may have left a server, a\n * timer or a connection open, and the answer is all the deploy waits for. The\n * callback, because a pipe on macOS is written asynchronously and an exit\n * before it drains would cut the answer short.\n */\nexport function answer(value: unknown): void {\n\tprocess.stdout.write(\n\t\t`${WORKER_RESULT_MARKER}${JSON.stringify(value)}\\n`,\n\t\t() => process.exit(0),\n\t);\n}\n\n/**\n * Where in `value` something is that JSON cannot carry faithfully: a\n * function, a class instance, a symbol, a bigint, a `Date`, a `Map` — as\n * paths like `state.provider` or `apps.api.hooks[0]`.\n *\n * `JSON.stringify` drops a function silently and turns a store into `{}`, so a\n * config that crossed it would arrive *different* rather than refused.\n */\nexport function liveValuePaths(value: unknown, path = ''): string[] {\n\tif (value === null) return [];\n\tswitch (typeof value) {\n\t\tcase 'string':\n\t\tcase 'boolean':\n\t\tcase 'undefined':\n\t\t\treturn [];\n\t\tcase 'number':\n\t\t\treturn Number.isFinite(value) ? [] : [path || '(root)'];\n\t\tcase 'object':\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn [path || '(root)'];\n\t}\n\n\tif (Array.isArray(value)) {\n\t\treturn value.flatMap((item, index) =>\n\t\t\tliveValuePaths(item, `${path}[${index}]`),\n\t\t);\n\t}\n\n\tconst proto = Object.getPrototypeOf(value);\n\tif (proto !== Object.prototype && proto !== null) return [path || '(root)'];\n\n\treturn Object.entries(value as Record<string, unknown>).flatMap(\n\t\t([key, item]) => liveValuePaths(item, path ? `${path}.${key}` : key),\n\t);\n}\n\n/** An error, as plain data a host can rebuild a message from. */\nexport function errorData(error: unknown): {\n\tname: string;\n\tmessage: string;\n\t[field: string]: unknown;\n} {\n\tif (!(error instanceof Error))\n\t\treturn { name: 'Error', message: String(error) };\n\tconst fields = Object.fromEntries(\n\t\tObject.entries(error).filter(([, v]) => liveValuePaths(v).length === 0),\n\t);\n\treturn { ...fields, name: error.name, message: error.message };\n}\n\n/**\n * Resolve each module's path aliases through its own tsconfig, as `gkm` does\n * — the hook ships beside `bin/gkm.mjs`. Without it a construct importing\n * `~/db` resolves in `gkm dev` and not in a deploy.\n */\nexport async function registerAdjacentTsconfig(): Promise<void> {\n\tfor (\n\t\tlet dir = dirname(fileURLToPath(import.meta.url));\n\t\tdirname(dir) !== dir;\n\t\tdir = dirname(dir)\n\t) {\n\t\tconst hook = join(dir, 'bin', 'adjacent-tsconfig.mjs');\n\t\tif (existsSync(hook)) {\n\t\t\tconst { registerAdjacentTsconfig: register } = await import(\n\t\t\t\tpathToFileURL(hook).href\n\t\t\t);\n\t\t\tawait register();\n\t\t\treturn;\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAa,uBAAuB;;;;;;;;;AAUpC,SAAgB,OAAO,OAAsB;CAC5C,QAAQ,OAAO,MACd,GAAG,uBAAuB,KAAK,UAAU,KAAK,EAAE,WAC1C,QAAQ,KAAK,CAAC,CACrB;AACD;;;;;;;;;AAUA,SAAgB,eAAe,OAAgB,OAAO,IAAc;CACnE,IAAI,UAAU,MAAM,OAAO,CAAC;CAC5B,QAAQ,OAAO,OAAf;EACC,KAAK;EACL,KAAK;EACL,KAAK,aACJ,OAAO,CAAC;EACT,KAAK,UACJ,OAAO,OAAO,SAAS,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,QAAQ;EACvD,KAAK,UACJ;EACD,SACC,OAAO,CAAC,QAAQ,QAAQ;CAC1B;CAEA,IAAI,MAAM,QAAQ,KAAK,GACtB,OAAO,MAAM,SAAS,MAAM,UAC3B,eAAe,MAAM,GAAG,KAAK,GAAG,MAAM,EAAE,CACzC;CAGD,MAAM,QAAQ,OAAO,eAAe,KAAK;CACzC,IAAI,UAAU,OAAO,aAAa,UAAU,MAAM,OAAO,CAAC,QAAQ,QAAQ;CAE1E,OAAO,OAAO,QAAQ,KAAgC,CAAC,CAAC,SACtD,CAAC,KAAK,UAAU,eAAe,MAAM,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,CACpE;AACD;;AAGA,SAAgB,UAAU,OAIxB;CACD,IAAI,EAAE,iBAAiB,QACtB,OAAO;EAAE,MAAM;EAAS,SAAS,OAAO,KAAK;CAAE;CAIhD,OAAO;EAAE,GAHM,OAAO,YACrB,OAAO,QAAQ,KAAK,CAAC,CAAC,QAAQ,GAAG,OAAO,eAAe,CAAC,CAAC,CAAC,WAAW,CAAC,CAEtD;EAAG,MAAM,MAAM;EAAM,SAAS,MAAM;CAAQ;AAC9D;;;;;;AAOA,eAAsB,2BAA0C;CAC/D,KACC,IAAI,MAAM,QAAQ,cAAc,YAAY,GAAG,CAAC,GAChD,QAAQ,GAAG,MAAM,KACjB,MAAM,QAAQ,GAAG,GAChB;EACD,MAAM,OAAO,KAAK,KAAK,OAAO,uBAAuB;EACrD,IAAI,WAAW,IAAI,GAAG;GACrB,MAAM,EAAE,0BAA0B,aAAa,MAAM,OACpD,cAAc,IAAI,CAAC,CAAC;GAErB,MAAM,SAAS;GACf;EACD;CACD;AACD"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_workspace = require("../workspace-B6zQO6RY.cjs");
2
+ const require_workspace = require("../workspace-BwgWJK7h.cjs");
3
3
  exports.PHASE_2_DEPLOY_TARGETS = require_workspace.PHASE_2_DEPLOY_TARGETS;
4
4
  exports.PUBLIC_ENV_PREFIXES = require_workspace.PUBLIC_ENV_PREFIXES;
5
5
  exports.SUPPORTED_DEPLOY_TARGETS = require_workspace.SUPPORTED_DEPLOY_TARGETS;
@@ -1,3 +1,3 @@
1
- import { A as PHASE_2_DEPLOY_TARGETS, C as WorkspaceConfig, E as BackendFramework, F as isDeployTargetSupported, I as isPhase2DeployTarget, L as safeValidateWorkspaceConfig, M as WorkspaceConfigSchema, N as formatValidationErrors, O as FrontendFramework, P as getDeployTargetError, R as validateWorkspaceConfig, S as SharedConfig, T as isWorkspaceConfig, _ as LoadedConfig, b as NormalizedWorkspace, c as AppInput, d as DeployConfig, f as DeployTargetName, g as InferredWorkspaceConfig, h as InferAppNames, j as SUPPORTED_DEPLOY_TARGETS, k as MobileFramework, l as AppsRecord, m as DokployWorkspaceConfig, o as AppConfig, s as AppConfigInput, u as ConstrainedApps, v as ModelsConfig, w as WorkspaceInput, x as SecretsConfig, y as NormalizedAppConfig } from "../types-DIA7Li-J.cjs";
2
- import { a as getAppBuildOrder, c as normalizeWorkspace, d as wrapSingleAppAsWorkspace, f as PUBLIC_ENV_PREFIXES, i as defineWorkspace, l as processConfig, m as stripPublicPrefix, n as appConstructGlobs, o as getAppGkmConfig, p as getPublicEnvPrefix, r as constructPatterns, s as getEndpointForStage, t as allConstructGlobs, u as workspaceConstructGlobs } from "../index-BtXDZQuF.cjs";
1
+ import { A as PHASE_2_DEPLOY_TARGETS, C as WorkspaceConfig, E as BackendFramework, F as isDeployTargetSupported, I as isPhase2DeployTarget, L as safeValidateWorkspaceConfig, M as WorkspaceConfigSchema, N as formatValidationErrors, O as FrontendFramework, P as getDeployTargetError, R as validateWorkspaceConfig, S as SharedConfig, T as isWorkspaceConfig, _ as LoadedConfig, b as NormalizedWorkspace, c as AppInput, d as DeployConfig, f as DeployTargetName, g as InferredWorkspaceConfig, h as InferAppNames, j as SUPPORTED_DEPLOY_TARGETS, k as MobileFramework, l as AppsRecord, m as DokployWorkspaceConfig, o as AppConfig, s as AppConfigInput, u as ConstrainedApps, v as ModelsConfig, w as WorkspaceInput, x as SecretsConfig, y as NormalizedAppConfig } from "../types-DkrDOMxw.cjs";
2
+ import { a as getAppBuildOrder, c as normalizeWorkspace, d as wrapSingleAppAsWorkspace, f as PUBLIC_ENV_PREFIXES, i as defineWorkspace, l as processConfig, m as stripPublicPrefix, n as appConstructGlobs, o as getAppGkmConfig, p as getPublicEnvPrefix, r as constructPatterns, s as getEndpointForStage, t as allConstructGlobs, u as workspaceConstructGlobs } from "../index-CfE9Y885.cjs";
3
3
  export { type AppConfig, type AppConfigInput, type AppInput, type AppsRecord, type BackendFramework, type ConstrainedApps, type DeployConfig, type DeployTargetName, type DokployWorkspaceConfig, type FrontendFramework, type InferAppNames, type InferredWorkspaceConfig, type LoadedConfig, type MobileFramework, type ModelsConfig, type NormalizedAppConfig, type NormalizedWorkspace, PHASE_2_DEPLOY_TARGETS, PUBLIC_ENV_PREFIXES, SUPPORTED_DEPLOY_TARGETS, type SecretsConfig, type SharedConfig, type WorkspaceConfig, WorkspaceConfigSchema, type WorkspaceInput, allConstructGlobs, appConstructGlobs, constructPatterns, defineWorkspace, formatValidationErrors, getAppBuildOrder, getAppGkmConfig, getDeployTargetError, getEndpointForStage, getPublicEnvPrefix, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, normalizeWorkspace, processConfig, safeValidateWorkspaceConfig, stripPublicPrefix, validateWorkspaceConfig, workspaceConstructGlobs, wrapSingleAppAsWorkspace };
@@ -1,3 +1,3 @@
1
- import { A as PHASE_2_DEPLOY_TARGETS, C as WorkspaceConfig, E as BackendFramework, F as isDeployTargetSupported, I as isPhase2DeployTarget, L as safeValidateWorkspaceConfig, M as WorkspaceConfigSchema, N as formatValidationErrors, O as FrontendFramework, P as getDeployTargetError, R as validateWorkspaceConfig, S as SharedConfig, T as isWorkspaceConfig, _ as LoadedConfig, b as NormalizedWorkspace, c as AppInput, d as DeployConfig, f as DeployTargetName, g as InferredWorkspaceConfig, h as InferAppNames, j as SUPPORTED_DEPLOY_TARGETS, k as MobileFramework, l as AppsRecord, m as DokployWorkspaceConfig, o as AppConfig, s as AppConfigInput, u as ConstrainedApps, v as ModelsConfig, w as WorkspaceInput, x as SecretsConfig, y as NormalizedAppConfig } from "../types-CfLKGfC_.mjs";
2
- import { a as getAppBuildOrder, c as normalizeWorkspace, d as wrapSingleAppAsWorkspace, f as PUBLIC_ENV_PREFIXES, i as defineWorkspace, l as processConfig, m as stripPublicPrefix, n as appConstructGlobs, o as getAppGkmConfig, p as getPublicEnvPrefix, r as constructPatterns, s as getEndpointForStage, t as allConstructGlobs, u as workspaceConstructGlobs } from "../index-DrKzpHl-.mjs";
1
+ import { A as PHASE_2_DEPLOY_TARGETS, C as WorkspaceConfig, E as BackendFramework, F as isDeployTargetSupported, I as isPhase2DeployTarget, L as safeValidateWorkspaceConfig, M as WorkspaceConfigSchema, N as formatValidationErrors, O as FrontendFramework, P as getDeployTargetError, R as validateWorkspaceConfig, S as SharedConfig, T as isWorkspaceConfig, _ as LoadedConfig, b as NormalizedWorkspace, c as AppInput, d as DeployConfig, f as DeployTargetName, g as InferredWorkspaceConfig, h as InferAppNames, j as SUPPORTED_DEPLOY_TARGETS, k as MobileFramework, l as AppsRecord, m as DokployWorkspaceConfig, o as AppConfig, s as AppConfigInput, u as ConstrainedApps, v as ModelsConfig, w as WorkspaceInput, x as SecretsConfig, y as NormalizedAppConfig } from "../types-B_bEQvb9.mjs";
2
+ import { a as getAppBuildOrder, c as normalizeWorkspace, d as wrapSingleAppAsWorkspace, f as PUBLIC_ENV_PREFIXES, i as defineWorkspace, l as processConfig, m as stripPublicPrefix, n as appConstructGlobs, o as getAppGkmConfig, p as getPublicEnvPrefix, r as constructPatterns, s as getEndpointForStage, t as allConstructGlobs, u as workspaceConstructGlobs } from "../index-CJ2qsSpp.mjs";
3
3
  export { type AppConfig, type AppConfigInput, type AppInput, type AppsRecord, type BackendFramework, type ConstrainedApps, type DeployConfig, type DeployTargetName, type DokployWorkspaceConfig, type FrontendFramework, type InferAppNames, type InferredWorkspaceConfig, type LoadedConfig, type MobileFramework, type ModelsConfig, type NormalizedAppConfig, type NormalizedWorkspace, PHASE_2_DEPLOY_TARGETS, PUBLIC_ENV_PREFIXES, SUPPORTED_DEPLOY_TARGETS, type SecretsConfig, type SharedConfig, type WorkspaceConfig, WorkspaceConfigSchema, type WorkspaceInput, allConstructGlobs, appConstructGlobs, constructPatterns, defineWorkspace, formatValidationErrors, getAppBuildOrder, getAppGkmConfig, getDeployTargetError, getEndpointForStage, getPublicEnvPrefix, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, normalizeWorkspace, processConfig, safeValidateWorkspaceConfig, stripPublicPrefix, validateWorkspaceConfig, workspaceConstructGlobs, wrapSingleAppAsWorkspace };
@@ -1,2 +1,2 @@
1
- import { C as safeValidateWorkspaceConfig, S as isPhase2DeployTarget, _ as SUPPORTED_DEPLOY_TARGETS, a as getAppBuildOrder, b as getDeployTargetError, c as normalizeWorkspace, d as wrapSingleAppAsWorkspace, f as PUBLIC_ENV_PREFIXES, g as PHASE_2_DEPLOY_TARGETS, h as isWorkspaceConfig, i as defineWorkspace, l as processConfig, m as stripPublicPrefix, n as appConstructGlobs, o as getAppGkmConfig, p as getPublicEnvPrefix, r as constructPatterns, s as getEndpointForStage, t as allConstructGlobs, u as workspaceConstructGlobs, v as WorkspaceConfigSchema, w as validateWorkspaceConfig, x as isDeployTargetSupported, y as formatValidationErrors } from "../workspace-BFe57es7.mjs";
1
+ import { C as safeValidateWorkspaceConfig, S as isPhase2DeployTarget, _ as SUPPORTED_DEPLOY_TARGETS, a as getAppBuildOrder, b as getDeployTargetError, c as normalizeWorkspace, d as wrapSingleAppAsWorkspace, f as PUBLIC_ENV_PREFIXES, g as PHASE_2_DEPLOY_TARGETS, h as isWorkspaceConfig, i as defineWorkspace, l as processConfig, m as stripPublicPrefix, n as appConstructGlobs, o as getAppGkmConfig, p as getPublicEnvPrefix, r as constructPatterns, s as getEndpointForStage, t as allConstructGlobs, u as workspaceConstructGlobs, v as WorkspaceConfigSchema, w as validateWorkspaceConfig, x as isDeployTargetSupported, y as formatValidationErrors } from "../workspace-Bwit4q9O.mjs";
2
2
  export { PHASE_2_DEPLOY_TARGETS, PUBLIC_ENV_PREFIXES, SUPPORTED_DEPLOY_TARGETS, WorkspaceConfigSchema, allConstructGlobs, appConstructGlobs, constructPatterns, defineWorkspace, formatValidationErrors, getAppBuildOrder, getAppGkmConfig, getDeployTargetError, getEndpointForStage, getPublicEnvPrefix, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, normalizeWorkspace, processConfig, safeValidateWorkspaceConfig, stripPublicPrefix, validateWorkspaceConfig, workspaceConstructGlobs, wrapSingleAppAsWorkspace };