@geekmidas/cli 10.0.0-alpha.35 → 10.0.0-alpha.37

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.
@@ -213,9 +213,10 @@ async function prepareEntryCredentials(options) {
213
213
  credentials.PORT = String(resolvedPort);
214
214
  if (appInfo?.app.type === "mobile") credentials.RCT_METRO_PORT = String(resolvedPort);
215
215
  const declaredKeys = [];
216
+ let reconciled;
216
217
  if (workspace) {
217
218
  const { reconcileWorkspace } = await Promise.resolve().then(() => workspace_exports);
218
- const reconciled = await reconcileWorkspace(workspace, {
219
+ reconciled = await reconcileWorkspace(workspace, {
219
220
  stage: options.reconcileStage ?? workspace.stages.local,
220
221
  start: options.startDocker ?? false
221
222
  });
@@ -235,7 +236,8 @@ async function prepareEntryCredentials(options) {
235
236
  appName,
236
237
  secretsRoot,
237
238
  appInfo,
238
- declaredKeys
239
+ declaredKeys,
240
+ ...reconciled ? { reconciled } : {}
239
241
  };
240
242
  }
241
243
  //#endregion
@@ -1135,7 +1137,7 @@ function workerBroker(plan, ports) {
1135
1137
  */
1136
1138
  function urlFor(resource, plan, ports, project, addresses = {}) {
1137
1139
  if (resource.kind === "secret") return localSecret(project, plan, resource);
1138
- if (resource.kind === "mobile-app") return (0, _geekmidas_manifest.appScheme)((0, _geekmidas_manifest.schemeBase)(project, resource.scheme), plan.stage);
1140
+ if (resource.kind === "mobile-app") return (0, _geekmidas_manifest.schemeBase)(project, resource.scheme);
1139
1141
  if (resource.kind === "credential") return void 0;
1140
1142
  if (resource.kind === "rest-api" || resource.kind === "site") {
1141
1143
  const address = addresses[resource.id];
@@ -2395,6 +2397,13 @@ async function saveState(root, state) {
2395
2397
  await (0, node_fs_promises.mkdir)((0, node_path.dirname)(path), { recursive: true });
2396
2398
  await (0, node_fs_promises.writeFile)(path, `${JSON.stringify(state, null, 2)}\n`);
2397
2399
  }
2400
+ /**
2401
+ * Forget what was applied, so the next reconcile of this stage converges from
2402
+ * nothing — creating again whatever was dropped underneath the record.
2403
+ */
2404
+ async function forgetState(root, stage) {
2405
+ await (0, node_fs_promises.rm)(statePath(root, stage), { force: true });
2406
+ }
2398
2407
  function statePath(root, stage) {
2399
2408
  return (0, node_path.join)(root, STATE_DIR, `${stage}.json`);
2400
2409
  }
@@ -2804,6 +2813,12 @@ Object.defineProperty(exports, "findAvailablePort", {
2804
2813
  return findAvailablePort;
2805
2814
  }
2806
2815
  });
2816
+ Object.defineProperty(exports, "forgetState", {
2817
+ enumerable: true,
2818
+ get: function() {
2819
+ return forgetState;
2820
+ }
2821
+ });
2807
2822
  Object.defineProperty(exports, "isPortAvailable", {
2808
2823
  enumerable: true,
2809
2824
  get: function() {
@@ -2822,18 +2837,36 @@ Object.defineProperty(exports, "loadSecretsForApp", {
2822
2837
  return loadSecretsForApp;
2823
2838
  }
2824
2839
  });
2840
+ Object.defineProperty(exports, "pgClient", {
2841
+ enumerable: true,
2842
+ get: function() {
2843
+ return pgClient;
2844
+ }
2845
+ });
2825
2846
  Object.defineProperty(exports, "prepareEntryCredentials", {
2826
2847
  enumerable: true,
2827
2848
  get: function() {
2828
2849
  return prepareEntryCredentials;
2829
2850
  }
2830
2851
  });
2852
+ Object.defineProperty(exports, "primaryPortKey", {
2853
+ enumerable: true,
2854
+ get: function() {
2855
+ return primaryPortKey;
2856
+ }
2857
+ });
2831
2858
  Object.defineProperty(exports, "providerOf", {
2832
2859
  enumerable: true,
2833
2860
  get: function() {
2834
2861
  return providerOf;
2835
2862
  }
2836
2863
  });
2864
+ Object.defineProperty(exports, "quoteIdentifier", {
2865
+ enumerable: true,
2866
+ get: function() {
2867
+ return quoteIdentifier;
2868
+ }
2869
+ });
2837
2870
  Object.defineProperty(exports, "reconcileWorkspace", {
2838
2871
  enumerable: true,
2839
2872
  get: function() {
@@ -2865,4 +2898,4 @@ Object.defineProperty(exports, "workspace_exports", {
2865
2898
  }
2866
2899
  });
2867
2900
 
2868
- //# sourceMappingURL=workspace-CRjZkCTW.cjs.map
2901
+ //# sourceMappingURL=workspace-DUhLejv4.cjs.map