@geekmidas/cli 10.0.0-alpha.78 → 10.0.0-alpha.79

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 (117) hide show
  1. package/dist/{add-BvOICikp.cjs → add-HF9POevk.cjs} +7 -7
  2. package/dist/{add-BvOICikp.cjs.map → add-HF9POevk.cjs.map} +1 -1
  3. package/dist/{add-D2XKszYP.mjs → add-UFiIrlTj.mjs} +2 -2
  4. package/dist/{add-D2XKszYP.mjs.map → add-UFiIrlTj.mjs.map} +1 -1
  5. package/dist/{bundler-CtHzKqnZ.mjs → bundler-C45BuRdY.mjs} +3 -3
  6. package/dist/{bundler-CtHzKqnZ.mjs.map → bundler-C45BuRdY.mjs.map} +1 -1
  7. package/dist/{bundler-C6T-1OLT.cjs → bundler-RAoSRuvp.cjs} +3 -3
  8. package/dist/{bundler-C6T-1OLT.cjs.map → bundler-RAoSRuvp.cjs.map} +1 -1
  9. package/dist/{cli-K6Vj_pPW.cjs → cli-C3hsEwLK.cjs} +4 -4
  10. package/dist/{cli-K6Vj_pPW.cjs.map → cli-C3hsEwLK.cjs.map} +1 -1
  11. package/dist/{cli-BgPyhx1i.mjs → cli-gvc3urUl.mjs} +3 -3
  12. package/dist/{cli-BgPyhx1i.mjs.map → cli-gvc3urUl.mjs.map} +1 -1
  13. package/dist/{compose-DByK353T.mjs → compose-C40Wk9m6.mjs} +36 -8
  14. package/dist/{compose-DByK353T.mjs.map → compose-C40Wk9m6.mjs.map} +1 -1
  15. package/dist/{compose-B7MC19eC.cjs → compose-CtUP07r3.cjs} +88 -60
  16. package/dist/{compose-B7MC19eC.cjs.map → compose-CtUP07r3.cjs.map} +1 -1
  17. package/dist/{config-Bql0AmJt.d.mts → config-L_6NivCp.d.mts} +3 -3
  18. package/dist/{config-Bql0AmJt.d.mts.map → config-L_6NivCp.d.mts.map} +1 -1
  19. package/dist/{config-DlNpHK8p.d.cts → config-Mr4rcXFC.d.cts} +3 -3
  20. package/dist/{config-DlNpHK8p.d.cts.map → config-Mr4rcXFC.d.cts.map} +1 -1
  21. package/dist/config.d.cts +3 -3
  22. package/dist/config.d.mts +3 -3
  23. package/dist/{databases-C2p5LGAp.cjs → databases-BY-pEImp.cjs} +185 -7
  24. package/dist/databases-BY-pEImp.cjs.map +1 -0
  25. package/dist/{databases-hUHTuwhx.mjs → databases-CzszQV0N.mjs} +153 -5
  26. package/dist/databases-CzszQV0N.mjs.map +1 -0
  27. package/dist/deploy/public.cjs +12 -11
  28. package/dist/deploy/public.d.cts +19 -3
  29. package/dist/deploy/public.d.cts.map +1 -1
  30. package/dist/deploy/public.d.mts +19 -3
  31. package/dist/deploy/public.d.mts.map +1 -1
  32. package/dist/deploy/public.mjs +6 -6
  33. package/dist/{deploy-BerP7ppB.mjs → deploy-BjsZpUQ3.mjs} +3 -3
  34. package/dist/{deploy-BerP7ppB.mjs.map → deploy-BjsZpUQ3.mjs.map} +1 -1
  35. package/dist/{deploy-Dt42xiQA.cjs → deploy-DPzauQsm.cjs} +9 -9
  36. package/dist/{deploy-Dt42xiQA.cjs.map → deploy-DPzauQsm.cjs.map} +1 -1
  37. package/dist/{dokploy-ssZQRK2C.mjs → dokploy-BoH0DMyS.mjs} +2 -2
  38. package/dist/{dokploy-ssZQRK2C.mjs.map → dokploy-BoH0DMyS.mjs.map} +1 -1
  39. package/dist/{dokploy-NG9UrVrP.cjs → dokploy-Cj1EHd4Y.cjs} +2 -2
  40. package/dist/{dokploy-NG9UrVrP.cjs.map → dokploy-Cj1EHd4Y.cjs.map} +1 -1
  41. package/dist/{encryption-CbMI24fI.cjs → encryption-D2z16vsS.cjs} +5 -5
  42. package/dist/{encryption-CbMI24fI.cjs.map → encryption-D2z16vsS.cjs.map} +1 -1
  43. package/dist/{encryption-De6MN0O5.mjs → encryption-MeDrE-rZ.mjs} +2 -2
  44. package/dist/{encryption-De6MN0O5.mjs.map → encryption-MeDrE-rZ.mjs.map} +1 -1
  45. package/dist/{engine-DOjGIgl4.mjs → engine-B-Yq0yQu.mjs} +53 -17
  46. package/dist/engine-B-Yq0yQu.mjs.map +1 -0
  47. package/dist/{engine-CoCsNoW_.cjs → engine-C3T39eTO.cjs} +118 -82
  48. package/dist/engine-C3T39eTO.cjs.map +1 -0
  49. package/dist/{github-D9vGqdLk.cjs → github-B8dDa8xf.cjs} +6 -6
  50. package/dist/{github-D9vGqdLk.cjs.map → github-B8dDa8xf.cjs.map} +1 -1
  51. package/dist/{github-CwX9z89E.mjs → github-Dyrjo0xd.mjs} +2 -2
  52. package/dist/{github-CwX9z89E.mjs.map → github-Dyrjo0xd.mjs.map} +1 -1
  53. package/dist/{index-BXO0vlme.d.mts → index-C0UmP_lg.d.mts} +2 -2
  54. package/dist/{index-BXO0vlme.d.mts.map → index-C0UmP_lg.d.mts.map} +1 -1
  55. package/dist/{index-Rs0Fua-q.d.cts → index-DTEPwLml.d.cts} +2 -2
  56. package/dist/{index-Rs0Fua-q.d.cts.map → index-DTEPwLml.d.cts.map} +1 -1
  57. package/dist/index.cjs +114 -114
  58. package/dist/index.cjs.map +1 -1
  59. package/dist/index.mjs +41 -41
  60. package/dist/index.mjs.map +1 -1
  61. package/dist/{migrate-CNKaQl3K.mjs → migrate-A2CLFl9G.mjs} +3 -4
  62. package/dist/{migrate-CNKaQl3K.mjs.map → migrate-A2CLFl9G.mjs.map} +1 -1
  63. package/dist/{migrate-Cgoy58Sh.cjs → migrate-CTqICj1B.cjs} +8 -9
  64. package/dist/{migrate-Cgoy58Sh.cjs.map → migrate-CTqICj1B.cjs.map} +1 -1
  65. package/dist/{migrate-BQ4wVKq_.mjs → migrate-DWUbYY5r.mjs} +2 -2
  66. package/dist/{migrate-BQ4wVKq_.mjs.map → migrate-DWUbYY5r.mjs.map} +1 -1
  67. package/dist/{migrate-B4GBvCNY.cjs → migrate-DvIAITiG.cjs} +4 -4
  68. package/dist/{migrate-B4GBvCNY.cjs.map → migrate-DvIAITiG.cjs.map} +1 -1
  69. package/dist/openapi.d.cts +1 -1
  70. package/dist/openapi.d.mts +1 -1
  71. package/dist/reconcile/public.d.cts +1 -1
  72. package/dist/reconcile/public.d.mts +1 -1
  73. package/dist/{resolve-mvaystiE.mjs → resolve-CHwetPdo.mjs} +3 -3
  74. package/dist/{resolve-mvaystiE.mjs.map → resolve-CHwetPdo.mjs.map} +1 -1
  75. package/dist/{resolve-CEaqRBzY.cjs → resolve-DOXcAOcn.cjs} +3 -3
  76. package/dist/{resolve-CEaqRBzY.cjs.map → resolve-DOXcAOcn.cjs.map} +1 -1
  77. package/dist/{rollback-S2C-Y9pB.mjs → rollback-Cq5s3WnD.mjs} +3 -3
  78. package/dist/{rollback-S2C-Y9pB.mjs.map → rollback-Cq5s3WnD.mjs.map} +1 -1
  79. package/dist/{rollback-F3P-rA-r.cjs → rollback-DUoOaws3.cjs} +5 -5
  80. package/dist/{rollback-F3P-rA-r.cjs.map → rollback-DUoOaws3.cjs.map} +1 -1
  81. package/dist/{runtime-D9AxGzrw.d.cts → runtime-D6A-C6zh.d.cts} +2 -2
  82. package/dist/{runtime-D9AxGzrw.d.cts.map → runtime-D6A-C6zh.d.cts.map} +1 -1
  83. package/dist/{runtime-Dflki3Vs.d.mts → runtime-ekxfPNM-.d.mts} +2 -2
  84. package/dist/{runtime-Dflki3Vs.d.mts.map → runtime-ekxfPNM-.d.mts.map} +1 -1
  85. package/dist/sandbox/migrate-worker.cjs +22 -8
  86. package/dist/sandbox/migrate-worker.cjs.map +1 -1
  87. package/dist/sandbox/migrate-worker.mjs +22 -8
  88. package/dist/sandbox/migrate-worker.mjs.map +1 -1
  89. package/dist/{stale-C5FqIVc8.mjs → seeds-DiXON7R8.mjs} +61 -3
  90. package/dist/seeds-DiXON7R8.mjs.map +1 -0
  91. package/dist/{stale-BsiPJI7Y.cjs → seeds-qX13ubmO.cjs} +78 -2
  92. package/dist/seeds-qX13ubmO.cjs.map +1 -0
  93. package/dist/sniffer-BjG-1mlD.cjs.map +1 -1
  94. package/dist/sniffer-ByWtH28i.mjs.map +1 -1
  95. package/dist/target/public.cjs +1 -1
  96. package/dist/target/public.d.cts +2 -2
  97. package/dist/target/public.d.mts +2 -2
  98. package/dist/target/public.mjs +1 -1
  99. package/dist/{types-DKxkXsKC.d.mts → types-BzCavjGt.d.mts} +29 -2
  100. package/dist/types-BzCavjGt.d.mts.map +1 -0
  101. package/dist/{types-ByY0zi3n.d.cts → types-DZtj9jeI.d.cts} +29 -2
  102. package/dist/types-DZtj9jeI.d.cts.map +1 -0
  103. package/dist/workspace/index.d.cts +2 -2
  104. package/dist/workspace/index.d.mts +2 -2
  105. package/package.json +15 -15
  106. package/dist/databases-C2p5LGAp.cjs.map +0 -1
  107. package/dist/databases-hUHTuwhx.mjs.map +0 -1
  108. package/dist/engine-CoCsNoW_.cjs.map +0 -1
  109. package/dist/engine-DOjGIgl4.mjs.map +0 -1
  110. package/dist/provider-B3Sv_a74.cjs +0 -173
  111. package/dist/provider-B3Sv_a74.cjs.map +0 -1
  112. package/dist/provider-D7rQzzzf.mjs +0 -138
  113. package/dist/provider-D7rQzzzf.mjs.map +0 -1
  114. package/dist/stale-BsiPJI7Y.cjs.map +0 -1
  115. package/dist/stale-C5FqIVc8.mjs.map +0 -1
  116. package/dist/types-ByY0zi3n.d.cts.map +0 -1
  117. package/dist/types-DKxkXsKC.d.mts.map +0 -1
@@ -5,7 +5,7 @@ const require_derive = require("./derive-DAbo49sm.cjs");
5
5
  const require_workspace = require("./workspace-Bp8FEkF-.cjs");
6
6
  const require_config = require("./config.cjs");
7
7
  const require_EndpointGenerator = require("./EndpointGenerator-CP6sBvQV.cjs");
8
- const require_resolve = require("./resolve-CEaqRBzY.cjs");
8
+ const require_resolve = require("./resolve-DOXcAOcn.cjs");
9
9
  const require_SubscriberGenerator = require("./SubscriberGenerator-CajwOa5W.cjs");
10
10
  let node_path = require("node:path");
11
11
  let node_fs = require("node:fs");
@@ -6585,6 +6585,64 @@ function assertNoStaleSecrets(options) {
6585
6585
  if (stale.length > 0) throw new StaleStageSecrets(options.stage, stale);
6586
6586
  }
6587
6587
  //#endregion
6588
+ //#region src/target/seeds.ts
6589
+ /** A seed of a deployed stage failed; the release stopped before any app. */
6590
+ var DeploySeedsFailed = class extends Error {
6591
+ stage;
6592
+ construct;
6593
+ seed;
6594
+ cause;
6595
+ constructor(stage, construct, seed, cause) {
6596
+ super(`Seeding "${stage}" failed, so no app was released: ${construct}'s seed '${seed}' failed — ${causeMessage(cause)}. Its writes were rolled back; the migrations and the seeds before it stay applied. Seeds run on every deploy, so each must be an idempotent upsert: fix it and deploy again.`);
6597
+ this.stage = stage;
6598
+ this.construct = construct;
6599
+ this.seed = seed;
6600
+ this.cause = cause;
6601
+ this.name = "DeploySeedsFailed";
6602
+ }
6603
+ };
6604
+ /**
6605
+ * What went wrong underneath: a `SeedFailed`'s own cause (the database's
6606
+ * error), or — from a sandbox, where errors arrive as data — the same.
6607
+ */
6608
+ function causeMessage(cause) {
6609
+ const message = (value) => value && typeof value === "object" && "message" in value ? String(value.message) : void 0;
6610
+ return (cause && typeof cause === "object" && "cause" in cause ? message(cause.cause) : void 0) ?? message(cause) ?? String(cause);
6611
+ }
6612
+ /**
6613
+ * Say what a deploy's migrations and seeds did: a line per construct with
6614
+ * something applied or run — `🌱 db/database/seeds: ran 2`, then each seed —
6615
+ * and a `migration.applied` or `seed.ran` event beside it.
6616
+ */
6617
+ function reportDatabaseRuns(migrations, seeds, log, emit) {
6618
+ for (const { construct, folder, applied } of migrations) {
6619
+ if (applied.length === 0) continue;
6620
+ log(`🗄️ ${folder}: applied ${applied.length}`);
6621
+ for (const name of applied) log(` ✓ ${name}`);
6622
+ emit({
6623
+ type: "migration.applied",
6624
+ construct,
6625
+ folder,
6626
+ applied: [...applied]
6627
+ });
6628
+ }
6629
+ for (const { construct, folder, seeded } of seeds) {
6630
+ if (seeded.length === 0) continue;
6631
+ log(`🌱 ${folder}: ran ${seeded.length}`);
6632
+ for (const name of seeded) log(` ✓ ${name}`);
6633
+ emit({
6634
+ type: "seed.ran",
6635
+ construct,
6636
+ folder,
6637
+ seeded: [...seeded]
6638
+ });
6639
+ }
6640
+ }
6641
+ /** What a dry run lists: the seeds a deploy would run, construct by construct. */
6642
+ function reportPlannedSeeds(planned, log) {
6643
+ for (const { folder, seeds } of planned) log(`🌱 ${folder}: would run ${seeds.length} (${seeds.join(", ")})`);
6644
+ }
6645
+ //#endregion
6588
6646
  Object.defineProperty(exports, "CronGenerator", {
6589
6647
  enumerable: true,
6590
6648
  get: function() {
@@ -6609,6 +6667,12 @@ Object.defineProperty(exports, "DeployJournal", {
6609
6667
  return DeployJournal;
6610
6668
  }
6611
6669
  });
6670
+ Object.defineProperty(exports, "DeploySeedsFailed", {
6671
+ enumerable: true,
6672
+ get: function() {
6673
+ return DeploySeedsFailed;
6674
+ }
6675
+ });
6612
6676
  Object.defineProperty(exports, "DevServicesNeedServerTarget", {
6613
6677
  enumerable: true,
6614
6678
  get: function() {
@@ -7143,12 +7207,24 @@ Object.defineProperty(exports, "recordRollback", {
7143
7207
  return recordRollback;
7144
7208
  }
7145
7209
  });
7210
+ Object.defineProperty(exports, "reportDatabaseRuns", {
7211
+ enumerable: true,
7212
+ get: function() {
7213
+ return reportDatabaseRuns;
7214
+ }
7215
+ });
7146
7216
  Object.defineProperty(exports, "reportDevServices", {
7147
7217
  enumerable: true,
7148
7218
  get: function() {
7149
7219
  return reportDevServices;
7150
7220
  }
7151
7221
  });
7222
+ Object.defineProperty(exports, "reportPlannedSeeds", {
7223
+ enumerable: true,
7224
+ get: function() {
7225
+ return reportPlannedSeeds;
7226
+ }
7227
+ });
7152
7228
  Object.defineProperty(exports, "requiredStageKeys", {
7153
7229
  enumerable: true,
7154
7230
  get: function() {
@@ -7306,4 +7382,4 @@ Object.defineProperty(exports, "workspace_exports", {
7306
7382
  }
7307
7383
  });
7308
7384
 
7309
- //# sourceMappingURL=stale-BsiPJI7Y.cjs.map
7385
+ //# sourceMappingURL=seeds-qX13ubmO.cjs.map