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