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

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 (151) hide show
  1. package/dist/{HostingerProvider-DgzKa_Tj.mjs → HostingerProvider-B92qH4dC.mjs} +2 -2
  2. package/dist/{HostingerProvider-DgzKa_Tj.mjs.map → HostingerProvider-B92qH4dC.mjs.map} +1 -1
  3. package/dist/{HostingerProvider-BTZd2u0f.cjs → HostingerProvider-DyD1Hin8.cjs} +2 -2
  4. package/dist/{HostingerProvider-BTZd2u0f.cjs.map → HostingerProvider-DyD1Hin8.cjs.map} +1 -1
  5. package/dist/{LegacyStateStore-CToa2hga.mjs → LegacyStateStore-A8d2GdT7.mjs} +2 -2
  6. package/dist/{LegacyStateStore-CToa2hga.mjs.map → LegacyStateStore-A8d2GdT7.mjs.map} +1 -1
  7. package/dist/{LegacyStateStore-CidlPT0N.cjs → LegacyStateStore-UHJEBLdn.cjs} +2 -2
  8. package/dist/{LegacyStateStore-CidlPT0N.cjs.map → LegacyStateStore-UHJEBLdn.cjs.map} +1 -1
  9. package/dist/{LocalStateStore-BFLiOocU.mjs → LocalStateStore-B51rnfgn.mjs} +2 -2
  10. package/dist/{LocalStateStore-BFLiOocU.mjs.map → LocalStateStore-B51rnfgn.mjs.map} +1 -1
  11. package/dist/{LocalStateStore-Dpuqka1N.cjs → LocalStateStore-COW3Ldwa.cjs} +2 -2
  12. package/dist/{LocalStateStore-Dpuqka1N.cjs.map → LocalStateStore-COW3Ldwa.cjs.map} +1 -1
  13. package/dist/{OpenApiTsGenerator-BTuUumsV.cjs → OpenApiTsGenerator-BSrgw7B0.cjs} +31 -2
  14. package/dist/OpenApiTsGenerator-BSrgw7B0.cjs.map +1 -0
  15. package/dist/{OpenApiTsGenerator-CvVr1Ilz.mjs → OpenApiTsGenerator-q5B0z8Xg.mjs} +31 -2
  16. package/dist/OpenApiTsGenerator-q5B0z8Xg.mjs.map +1 -0
  17. package/dist/{S3StateStore-aaGkjcxO.mjs → S3StateStore-CJewPhgz.mjs} +2 -2
  18. package/dist/{S3StateStore-aaGkjcxO.mjs.map → S3StateStore-CJewPhgz.mjs.map} +1 -1
  19. package/dist/{S3StateStore-cnm813Xn.cjs → S3StateStore-WUJGdRNL.cjs} +2 -2
  20. package/dist/{S3StateStore-cnm813Xn.cjs.map → S3StateStore-WUJGdRNL.cjs.map} +1 -1
  21. package/dist/{SSMStateStore-DwaGprVX.cjs → SSMStateStore-Zejt42V8.cjs} +2 -2
  22. package/dist/{SSMStateStore-DwaGprVX.cjs.map → SSMStateStore-Zejt42V8.cjs.map} +1 -1
  23. package/dist/{SSMStateStore-BllaJKGo.mjs → SSMStateStore-iK5UKp9d.mjs} +2 -2
  24. package/dist/{SSMStateStore-BllaJKGo.mjs.map → SSMStateStore-iK5UKp9d.mjs.map} +1 -1
  25. package/dist/{bundler-CzXZPSBJ.cjs → bundler-CfH9frOS.cjs} +2 -2
  26. package/dist/{bundler-CzXZPSBJ.cjs.map → bundler-CfH9frOS.cjs.map} +1 -1
  27. package/dist/{bundler-DJVR4QlW.mjs → bundler-DN5r4x5b.mjs} +2 -2
  28. package/dist/{bundler-DJVR4QlW.mjs.map → bundler-DN5r4x5b.mjs.map} +1 -1
  29. package/dist/{cli-D_qTl20Z.cjs → cli-DOAUp80L.cjs} +12 -16
  30. package/dist/cli-DOAUp80L.cjs.map +1 -0
  31. package/dist/{cli-DzR1hpum.mjs → cli-DYwxmfsW.mjs} +10 -14
  32. package/dist/cli-DYwxmfsW.mjs.map +1 -0
  33. package/dist/{config-DXnkCEq0.cjs → config-BYh9S0cZ.cjs} +2 -2
  34. package/dist/config-BYh9S0cZ.cjs.map +1 -0
  35. package/dist/{config-C5-EEdmr.mjs → config-Bf4-bROQ.mjs} +2 -2
  36. package/dist/config-Bf4-bROQ.mjs.map +1 -0
  37. package/dist/config.cjs +2 -2
  38. package/dist/config.d.cts +2 -2
  39. package/dist/config.d.mts +2 -2
  40. package/dist/config.mjs +2 -2
  41. package/dist/define-CHBIEc5j.mjs +94 -0
  42. package/dist/define-CHBIEc5j.mjs.map +1 -0
  43. package/dist/define-Cv_QvDrg.cjs +141 -0
  44. package/dist/define-Cv_QvDrg.cjs.map +1 -0
  45. package/dist/deploy/public.cjs +28 -13
  46. package/dist/deploy/public.d.cts +38 -315
  47. package/dist/deploy/public.d.cts.map +1 -1
  48. package/dist/deploy/public.d.mts +38 -315
  49. package/dist/deploy/public.d.mts.map +1 -1
  50. package/dist/deploy/public.mjs +8 -3
  51. package/dist/{deploy-D6Q09OkA.mjs → deploy-B7jvUORo.mjs} +155 -682
  52. package/dist/deploy-B7jvUORo.mjs.map +1 -0
  53. package/dist/deploy-Cg9fae7a.mjs +133 -0
  54. package/dist/deploy-Cg9fae7a.mjs.map +1 -0
  55. package/dist/deploy-D8Qr-Xto.cjs +138 -0
  56. package/dist/deploy-D8Qr-Xto.cjs.map +1 -0
  57. package/dist/{deploy-0fBVeWO-.cjs → deploy-DSaCYvcO.cjs} +182 -727
  58. package/dist/deploy-DSaCYvcO.cjs.map +1 -0
  59. package/dist/dokploy-CD9PY-3D.mjs +32 -0
  60. package/dist/dokploy-CD9PY-3D.mjs.map +1 -0
  61. package/dist/dokploy-Ey2foJLv.cjs +32 -0
  62. package/dist/dokploy-Ey2foJLv.cjs.map +1 -0
  63. package/dist/{encryption-aDA2AzVx.mjs → encryption-CVwvGbsL.mjs} +4 -4
  64. package/dist/{encryption-aDA2AzVx.mjs.map → encryption-CVwvGbsL.mjs.map} +1 -1
  65. package/dist/{encryption-CML4UaPi.cjs → encryption-ChBk3hTj.cjs} +4 -4
  66. package/dist/{encryption-CML4UaPi.cjs.map → encryption-ChBk3hTj.cjs.map} +1 -1
  67. package/dist/{github-DmCj2u95.mjs → github-BCB3_LBX.mjs} +3 -3
  68. package/dist/{github-DmCj2u95.mjs.map → github-BCB3_LBX.mjs.map} +1 -1
  69. package/dist/{github-Cq57poPj.cjs → github-OUgPDlqg.cjs} +3 -3
  70. package/dist/{github-Cq57poPj.cjs.map → github-OUgPDlqg.cjs.map} +1 -1
  71. package/dist/{index-UiWCaGzU.d.cts → index-BtXDZQuF.d.cts} +2 -2
  72. package/dist/{index-Da1-oa9W.d.mts.map → index-BtXDZQuF.d.cts.map} +1 -1
  73. package/dist/{index-Da1-oa9W.d.mts → index-DrKzpHl-.d.mts} +2 -2
  74. package/dist/{index-UiWCaGzU.d.cts.map → index-DrKzpHl-.d.mts.map} +1 -1
  75. package/dist/index.cjs +1728 -146
  76. package/dist/index.cjs.map +1 -1
  77. package/dist/index.mjs +1719 -153
  78. package/dist/index.mjs.map +1 -1
  79. package/dist/migrate-BoHMqdCu.mjs +265 -0
  80. package/dist/migrate-BoHMqdCu.mjs.map +1 -0
  81. package/dist/migrate-dnaFMvOm.cjs +270 -0
  82. package/dist/migrate-dnaFMvOm.cjs.map +1 -0
  83. package/dist/openapi.cjs +2 -2
  84. package/dist/openapi.d.cts +1 -1
  85. package/dist/openapi.d.mts +1 -1
  86. package/dist/openapi.mjs +2 -2
  87. package/dist/{ready-CIHpnUc5.mjs → ready-DQIy21W5.mjs} +2 -2
  88. package/dist/{ready-CIHpnUc5.mjs.map → ready-DQIy21W5.mjs.map} +1 -1
  89. package/dist/{ready-CCLIAkwR.cjs → ready-XlNx-Gbo.cjs} +2 -2
  90. package/dist/{ready-CCLIAkwR.cjs.map → ready-XlNx-Gbo.cjs.map} +1 -1
  91. package/dist/reconcile/public.d.cts +1 -1
  92. package/dist/reconcile/public.d.mts +1 -1
  93. package/dist/resolve-CFCIkm7m.mjs +170 -0
  94. package/dist/resolve-CFCIkm7m.mjs.map +1 -0
  95. package/dist/resolve-wbv66HjD.cjs +217 -0
  96. package/dist/resolve-wbv66HjD.cjs.map +1 -0
  97. package/dist/runtime-CMwtq0AL.cjs +163 -0
  98. package/dist/runtime-CMwtq0AL.cjs.map +1 -0
  99. package/dist/runtime-CXPlkZzs.d.mts +90 -0
  100. package/dist/runtime-CXPlkZzs.d.mts.map +1 -0
  101. package/dist/runtime-DbakJS8u.mjs +134 -0
  102. package/dist/runtime-DbakJS8u.mjs.map +1 -0
  103. package/dist/runtime-Dn_n-29S.d.cts +90 -0
  104. package/dist/runtime-Dn_n-29S.d.cts.map +1 -0
  105. package/dist/{sniffer-DIv12ncU.cjs → sniffer-BsfPa-GA.cjs} +2581 -2170
  106. package/dist/sniffer-BsfPa-GA.cjs.map +1 -0
  107. package/dist/{sniffer-BM8fpCas.mjs → sniffer-DHE2Nafd.mjs} +2428 -2185
  108. package/dist/sniffer-DHE2Nafd.mjs.map +1 -0
  109. package/dist/target/public.cjs +15 -0
  110. package/dist/target/public.d.cts +28 -0
  111. package/dist/target/public.d.cts.map +1 -0
  112. package/dist/target/public.d.mts +28 -0
  113. package/dist/target/public.d.mts.map +1 -0
  114. package/dist/target/public.mjs +4 -0
  115. package/dist/terminal-6oL0vANs.cjs +576 -0
  116. package/dist/terminal-6oL0vANs.cjs.map +1 -0
  117. package/dist/terminal-ByZNjuig.mjs +517 -0
  118. package/dist/terminal-ByZNjuig.mjs.map +1 -0
  119. package/dist/{types-efNLu9xu.d.cts → types-CfLKGfC_.d.mts} +624 -34
  120. package/dist/types-CfLKGfC_.d.mts.map +1 -0
  121. package/dist/{types-Bp1mVxG0.d.mts → types-DIA7Li-J.d.cts} +626 -34
  122. package/dist/types-DIA7Li-J.d.cts.map +1 -0
  123. package/dist/vitest.cjs +1 -1
  124. package/dist/vitest.mjs +1 -1
  125. package/dist/workspace/index.cjs +1 -1
  126. package/dist/workspace/index.d.cts +3 -3
  127. package/dist/workspace/index.d.mts +3 -3
  128. package/dist/workspace/index.mjs +1 -1
  129. package/dist/{workspace-B64Xk1Mb.cjs → workspace-B6zQO6RY.cjs} +229 -23
  130. package/dist/workspace-B6zQO6RY.cjs.map +1 -0
  131. package/dist/{workspace-Bp1xVaOz.mjs → workspace-BFe57es7.mjs} +229 -23
  132. package/dist/workspace-BFe57es7.mjs.map +1 -0
  133. package/package.json +23 -13
  134. package/dist/OpenApiTsGenerator-BTuUumsV.cjs.map +0 -1
  135. package/dist/OpenApiTsGenerator-CvVr1Ilz.mjs.map +0 -1
  136. package/dist/cli-D_qTl20Z.cjs.map +0 -1
  137. package/dist/cli-DzR1hpum.mjs.map +0 -1
  138. package/dist/config-C5-EEdmr.mjs.map +0 -1
  139. package/dist/config-DXnkCEq0.cjs.map +0 -1
  140. package/dist/deploy-0fBVeWO-.cjs.map +0 -1
  141. package/dist/deploy-D6Q09OkA.mjs.map +0 -1
  142. package/dist/migrate-BTqIflwc.cjs +0 -743
  143. package/dist/migrate-BTqIflwc.cjs.map +0 -1
  144. package/dist/migrate-B_6KofUo.mjs +0 -736
  145. package/dist/migrate-B_6KofUo.mjs.map +0 -1
  146. package/dist/sniffer-BM8fpCas.mjs.map +0 -1
  147. package/dist/sniffer-DIv12ncU.cjs.map +0 -1
  148. package/dist/types-Bp1mVxG0.d.mts.map +0 -1
  149. package/dist/types-efNLu9xu.d.cts.map +0 -1
  150. package/dist/workspace-B64Xk1Mb.cjs.map +0 -1
  151. package/dist/workspace-Bp1xVaOz.mjs.map +0 -1
@@ -1,3 +1,4 @@
1
+ const require_define = require("./define-Cv_QvDrg.cjs");
1
2
  let node_path = require("node:path");
2
3
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js
3
4
  function getEnumValues(entries) {
@@ -2395,6 +2396,114 @@ function handleIntersectionResults(result, left, right) {
2395
2396
  result.value = merged.data;
2396
2397
  return result;
2397
2398
  }
2399
+ const $ZodTuple = /*@__PURE__*/ $constructor("$ZodTuple", (inst, def) => {
2400
+ $ZodType.init(inst, def);
2401
+ const items = def.items;
2402
+ const memo = globalConfig.memoizer;
2403
+ memo?.attach(inst);
2404
+ inst._zod.parse = (payload, ctx) => {
2405
+ const input = payload.value;
2406
+ if (!Array.isArray(input)) {
2407
+ payload.issues.push({
2408
+ input,
2409
+ inst,
2410
+ expected: "tuple",
2411
+ code: "invalid_type"
2412
+ });
2413
+ return payload;
2414
+ }
2415
+ payload.value = memo ? memo.alloc(inst, payload, [], ctx) : [];
2416
+ const proms = [];
2417
+ const optinStart = getTupleOptStart(items, "optin");
2418
+ const optoutStart = getTupleOptStart(items, "optout");
2419
+ if (!def.rest) {
2420
+ if (input.length < optinStart) {
2421
+ payload.issues.push({
2422
+ code: "too_small",
2423
+ minimum: optinStart,
2424
+ inclusive: true,
2425
+ input,
2426
+ inst,
2427
+ origin: "array"
2428
+ });
2429
+ return payload;
2430
+ }
2431
+ if (input.length > items.length) payload.issues.push({
2432
+ code: "too_big",
2433
+ maximum: items.length,
2434
+ inclusive: true,
2435
+ input,
2436
+ inst,
2437
+ origin: "array"
2438
+ });
2439
+ }
2440
+ const itemResults = new Array(items.length);
2441
+ const abortEarly = def.rest ? ctx?.abortEarly : void 0;
2442
+ let itemAborted = false;
2443
+ for (let i = 0; i < items.length; i++) {
2444
+ const r = items[i]._zod.run({
2445
+ value: input[i],
2446
+ issues: []
2447
+ }, ctx);
2448
+ if (r instanceof Promise) proms.push(r.then((rr) => {
2449
+ itemResults[i] = rr;
2450
+ }));
2451
+ else {
2452
+ itemResults[i] = r;
2453
+ if (abortEarly && !itemAborted && r.issues.length) itemAborted = aborted(r);
2454
+ }
2455
+ }
2456
+ if (def.rest && !itemAborted) {
2457
+ let i = items.length - 1;
2458
+ const rest = input.slice(items.length);
2459
+ let seen = payload.issues.length;
2460
+ for (const el of rest) {
2461
+ if (abortEarly && payload.issues.length !== seen) {
2462
+ if (aborted(payload, seen)) break;
2463
+ seen = payload.issues.length;
2464
+ }
2465
+ i++;
2466
+ const result = def.rest._zod.run({
2467
+ value: el,
2468
+ issues: []
2469
+ }, ctx);
2470
+ if (result instanceof Promise) proms.push(result.then((r) => handleTupleResult(r, payload, i)));
2471
+ else handleTupleResult(result, payload, i);
2472
+ }
2473
+ }
2474
+ if (proms.length) return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
2475
+ return handleTupleResults(itemResults, payload, items, input, optoutStart);
2476
+ };
2477
+ });
2478
+ function getTupleOptStart(items, key) {
2479
+ for (let i = items.length - 1; i >= 0; i--) if (!(key === "optin" ? items[i]._zod.optin !== void 0 : items[i]._zod.optout === "optional")) return i + 1;
2480
+ return 0;
2481
+ }
2482
+ function handleTupleResult(result, final, index) {
2483
+ if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
2484
+ final.value[index] = result.value;
2485
+ }
2486
+ function handleTupleResults(itemResults, final, items, input, optoutStart) {
2487
+ for (let i = 0; i < items.length; i++) {
2488
+ const r = itemResults[i];
2489
+ const isPresent = i < input.length;
2490
+ if (!isPresent && i >= optoutStart && items[i]._zod.optin === "optional") {
2491
+ final.value.length = i;
2492
+ break;
2493
+ }
2494
+ if (r.issues.length) {
2495
+ if (!isPresent && i >= optoutStart) {
2496
+ final.value.length = i;
2497
+ break;
2498
+ }
2499
+ final.issues.push(...prefixIssues(i, r.issues));
2500
+ }
2501
+ final.value[i] = r.value;
2502
+ }
2503
+ for (let i = final.value.length - 1; i >= input.length; i--) if (items[i]._zod.optout === "optional" && final.value[i] === void 0) final.value.length = i;
2504
+ else break;
2505
+ return final;
2506
+ }
2398
2507
  const $ZodRecord = /*@__PURE__*/ $constructor("$ZodRecord", (inst, def) => {
2399
2508
  $ZodType.init(inst, def);
2400
2509
  const memo = globalConfig.memoizer;
@@ -4426,6 +4535,58 @@ const intersectionProcessor = (schema, ctx, json, params) => {
4426
4535
  json.allOf = allOf;
4427
4536
  ctx.intersections.push(allOf);
4428
4537
  };
4538
+ const tupleProcessor = (schema, ctx, _json, params) => {
4539
+ const json = _json;
4540
+ const def = schema._zod.def;
4541
+ json.type = "array";
4542
+ const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
4543
+ const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
4544
+ const prefixItems = def.items.map((x, i) => processSchema(x, ctx, {
4545
+ ...params,
4546
+ path: [
4547
+ ...params.path,
4548
+ prefixPath,
4549
+ i
4550
+ ]
4551
+ }));
4552
+ const rest = def.rest ? processSchema(def.rest, ctx, {
4553
+ ...params,
4554
+ path: [
4555
+ ...params.path,
4556
+ restPath,
4557
+ ...ctx.target === "openapi-3.0" ? [def.items.length] : []
4558
+ ]
4559
+ }) : null;
4560
+ let minItems = def.items.length;
4561
+ while (minItems > 0) {
4562
+ const item = def.items[minItems - 1];
4563
+ if (!(ctx.io === "input" ? inputOptin(item) !== void 0 : item._zod.optout === "optional")) break;
4564
+ minItems--;
4565
+ }
4566
+ const maxItems = def.items.length;
4567
+ const isClosed = !def.rest;
4568
+ if (ctx.target === "draft-2020-12") {
4569
+ json.prefixItems = prefixItems;
4570
+ if (isClosed) json.items = false;
4571
+ else if (rest) json.items = rest;
4572
+ if (minItems > 0) json.minItems = minItems;
4573
+ if (isClosed) json.maxItems = maxItems;
4574
+ } else if (ctx.target === "openapi-3.0") {
4575
+ json.items = { anyOf: prefixItems };
4576
+ if (rest) json.items.anyOf.push(rest);
4577
+ if (minItems > 0) json.minItems = minItems;
4578
+ if (isClosed) json.maxItems = maxItems;
4579
+ } else {
4580
+ json.items = prefixItems;
4581
+ if (isClosed) json.additionalItems = false;
4582
+ else if (rest) json.additionalItems = rest;
4583
+ if (minItems > 0) json.minItems = minItems;
4584
+ if (isClosed) json.maxItems = maxItems;
4585
+ }
4586
+ const { minimum, maximum } = aggregateChecks(schema);
4587
+ if (typeof minimum === "number") json.minItems = minimum;
4588
+ if (typeof maximum === "number") json.maxItems = maximum;
4589
+ };
4429
4590
  /** JSON object keys are always strings, so a numeric record key schema is re-expressed over the
4430
4591
  * numeric-string form the record parser matches. Deferred to `finalize`, after the flatten: a key
4431
4592
  * behind a wrapper only carries its own `type` before then, and a union key only has its branches.
@@ -5317,6 +5478,39 @@ function intersection(left, right) {
5317
5478
  right
5318
5479
  });
5319
5480
  }
5481
+ const ZodTuple = /*@__PURE__*/ $constructor("ZodTuple", (inst, def) => {
5482
+ _ensureDefaultMemoizer();
5483
+ $ZodTuple.init(inst, def);
5484
+ ZodType.init(inst, def);
5485
+ inst._zod.processJSONSchema = (ctx, json, params) => tupleProcessor(inst, ctx, json, params);
5486
+ }, {
5487
+ rest(rest) {
5488
+ return this.clone({
5489
+ ...this._zod.def,
5490
+ rest
5491
+ });
5492
+ },
5493
+ partial() {
5494
+ const def = this._zod.def;
5495
+ if (def.checks?.length) throw new Error(".partial() cannot be used on tuple schemas containing refinements");
5496
+ return this.clone({
5497
+ ...def,
5498
+ items: def.items.map((item) => new ZodOptional({
5499
+ type: "optional",
5500
+ innerType: item
5501
+ }))
5502
+ });
5503
+ }
5504
+ });
5505
+ function tuple(items, _paramsOrRest, _params) {
5506
+ const hasRest = _paramsOrRest instanceof $ZodType;
5507
+ return new ZodTuple({
5508
+ type: "tuple",
5509
+ items,
5510
+ rest: hasRest ? _paramsOrRest : null,
5511
+ ...normalizeParams(hasRest ? _params : _paramsOrRest)
5512
+ });
5513
+ }
5320
5514
  const ZodRecord = /*@__PURE__*/ $constructor("ZodRecord", (inst, def) => {
5321
5515
  _ensureDefaultMemoizer();
5322
5516
  $ZodRecord.init(inst, def);
@@ -5686,30 +5880,25 @@ const FRONTEND_FRAMEWORKS = [
5686
5880
  /** Mobile framework values, kept in sync with MobileFrameworkSchema. */
5687
5881
  const MOBILE_FRAMEWORKS = ["expo"];
5688
5882
  /**
5689
- * Deploy target schema.
5690
- * 'dokploy' is deployed by `gkm deploy`; 'sst' by `sst deploy`, from the
5691
- * manifest `gkm build` writes.
5692
- * 'vercel' and 'cloudflare' are planned for Phase 2.
5693
- */
5694
- const DeployTargetSchema = _enum([
5695
- "dokploy",
5696
- "sst",
5697
- "vercel",
5698
- "cloudflare"
5699
- ]);
5700
- /**
5701
- * Supported deploy targets (Phase 1).
5883
+ * A deploy target's name. Which names exist is the workspace's to say — the
5884
+ * built-ins and its own `deploy.targets` — so it is checked against both
5885
+ * once the whole config is read.
5702
5886
  */
5703
- const SUPPORTED_DEPLOY_TARGETS = ["dokploy", "sst"];
5887
+ const DeployTargetSchema = string().min(1);
5704
5888
  /**
5705
- * Phase 2 deploy targets (not yet implemented).
5889
+ * The built-in targets a config may name: `dokploy`, deployed by
5890
+ * `gkm deploy`, and `sst`, deployed by `sst deploy` from the manifest
5891
+ * `gkm build` writes.
5706
5892
  */
5707
- const PHASE_2_DEPLOY_TARGETS = ["vercel", "cloudflare"];
5893
+ const SUPPORTED_DEPLOY_TARGETS = require_define.configurableBuiltins();
5894
+ /** Built-in names reserved for targets that do not exist yet. */
5895
+ const PHASE_2_DEPLOY_TARGETS = Object.entries(require_define.BUILTIN_TARGETS).filter(([, target]) => target.status === "planned").map(([name]) => name);
5708
5896
  /**
5709
- * Check if a deploy target is supported.
5897
+ * Whether a config may name `target`: a usable built-in, or one of its own
5898
+ * `deploy.targets`.
5710
5899
  */
5711
- function isDeployTargetSupported(target) {
5712
- return SUPPORTED_DEPLOY_TARGETS.includes(target);
5900
+ function isDeployTargetSupported(target, targets = {}) {
5901
+ return SUPPORTED_DEPLOY_TARGETS.includes(target) || Object.hasOwn(targets, target);
5713
5902
  }
5714
5903
  /**
5715
5904
  * Check if a deploy target is planned for Phase 2.
@@ -5722,9 +5911,18 @@ function isPhase2DeployTarget(target) {
5722
5911
  */
5723
5912
  function getDeployTargetError(target, appName) {
5724
5913
  if (isPhase2DeployTarget(target)) return `Deploy target "${target}"${appName ? ` for app "${appName}"` : ""} is coming in Phase 2. Currently "dokploy" and "sst" are supported.`;
5725
- return `Unknown deploy target: ${target}. Supported: dokploy, sst. Coming in Phase 2: vercel, cloudflare.`;
5914
+ return `Unknown deploy target: ${target}. Built in: ${SUPPORTED_DEPLOY_TARGETS.join(", ")}; any other is named in deploy.targets with the package that provides it. Coming in Phase 2: ${PHASE_2_DEPLOY_TARGETS.join(", ")}.`;
5726
5915
  }
5727
5916
  /**
5917
+ * One `deploy.targets` entry: a package name, a target object, or either
5918
+ * with options.
5919
+ */
5920
+ const DeployTargetEntrySchema = union([
5921
+ string().min(1, "A target package name cannot be empty"),
5922
+ custom((value) => require_define.isDeployTarget(value), { message: "Expected a package name, a target (defineTarget), or [package or target, options]" }),
5923
+ tuple([union([string().min(1), custom((value) => require_define.isDeployTarget(value), { message: "Expected a package name or a target (defineTarget)" })]), unknown()])
5924
+ ]);
5925
+ /**
5728
5926
  * Dokploy workspace configuration schema.
5729
5927
  * Supports either a single endpoint or per-stage endpoints.
5730
5928
  */
@@ -5917,6 +6115,13 @@ const BackupsConfigSchema = object({
5917
6115
  */
5918
6116
  const DeployConfigSchema = object({
5919
6117
  default: DeployTargetSchema.optional(),
6118
+ targets: record(string(), DeployTargetEntrySchema).superRefine((targets, ctx) => {
6119
+ for (const name of Object.keys(targets)) if (require_define.builtinTarget(name)) ctx.addIssue({
6120
+ code: "custom",
6121
+ message: `"${name}" is a built-in target; give this one a name of its own`,
6122
+ path: [name]
6123
+ });
6124
+ }).optional(),
5920
6125
  /** Whose deploy this is, on a target shared with other workspaces. */
5921
6126
  namespace: string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, "deploy.namespace must be lowercase letters and digits with single '-' between them").optional(),
5922
6127
  /** Each deployed stage's base domain (stage name -> domain). */
@@ -6141,7 +6346,8 @@ const WorkspaceConfigSchema = object({
6141
6346
  return true;
6142
6347
  }, { message: "Circular dependencies detected between apps" }).superRefine((data, ctx) => {
6143
6348
  const defaultTarget = data.deploy?.default;
6144
- if (defaultTarget && !isDeployTargetSupported(defaultTarget)) {
6349
+ const ownTargets = data.deploy?.targets ?? {};
6350
+ if (defaultTarget && !isDeployTargetSupported(defaultTarget, ownTargets)) {
6145
6351
  ctx.addIssue({
6146
6352
  code: "custom",
6147
6353
  message: getDeployTargetError(defaultTarget),
@@ -6149,7 +6355,7 @@ const WorkspaceConfigSchema = object({
6149
6355
  });
6150
6356
  return;
6151
6357
  }
6152
- for (const [appName, app] of Object.entries(data.apps ?? {})) if (app.deploy && !isDeployTargetSupported(app.deploy)) {
6358
+ for (const [appName, app] of Object.entries(data.apps ?? {})) if (app.deploy && !isDeployTargetSupported(app.deploy, ownTargets)) {
6153
6359
  ctx.addIssue({
6154
6360
  code: "custom",
6155
6361
  message: getDeployTargetError(app.deploy, appName),
@@ -6716,4 +6922,4 @@ Object.defineProperty(exports, "wrapSingleAppAsWorkspace", {
6716
6922
  }
6717
6923
  });
6718
6924
 
6719
- //# sourceMappingURL=workspace-B64Xk1Mb.cjs.map
6925
+ //# sourceMappingURL=workspace-B6zQO6RY.cjs.map