@boxes-dev/dvb-runtime 1.0.185 → 1.0.187

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.
package/dist/bin/dvb.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5f4b3c52-97e5-5ed6-a2be-6b87918b5e9c")}catch(e){}}();
3
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e509ee6a-46ba-5ad5-a239-d37fb7278d9d")}catch(e){}}();
4
4
 
5
5
  var __create = Object.create;
6
6
  var __defProp = Object.defineProperty;
@@ -88688,8 +88688,8 @@ var init_otel = __esm({
88688
88688
  return trimmed && trimmed.length > 0 ? trimmed : void 0;
88689
88689
  };
88690
88690
  readBuildMetadata = () => {
88691
- const rawPackageVersion = "1.0.185";
88692
- const rawGitSha = "24b0cb9f6155d3e3e5bcfe1487cbe26125cd2f59";
88691
+ const rawPackageVersion = "1.0.187";
88692
+ const rawGitSha = "3dff5576a81e15a8616c0891e6a6a35661dc9ffe";
88693
88693
  const packageVersion = typeof rawPackageVersion === "string" ? rawPackageVersion : void 0;
88694
88694
  const gitSha = typeof rawGitSha === "string" ? rawGitSha : void 0;
88695
88695
  return { packageVersion, gitSha };
@@ -120881,9 +120881,9 @@ var init_sentry = __esm({
120881
120881
  sentryEnabled = false;
120882
120882
  uncaughtExceptionMonitorInstalled = false;
120883
120883
  readBuildMetadata2 = () => {
120884
- const rawPackageVersion = "1.0.185";
120885
- const rawGitSha = "24b0cb9f6155d3e3e5bcfe1487cbe26125cd2f59";
120886
- const rawSentryRelease = "boxes-dev-dvb@1.0.185+24b0cb9f6155d3e3e5bcfe1487cbe26125cd2f59";
120884
+ const rawPackageVersion = "1.0.187";
120885
+ const rawGitSha = "3dff5576a81e15a8616c0891e6a6a35661dc9ffe";
120886
+ const rawSentryRelease = "boxes-dev-dvb@1.0.187+3dff5576a81e15a8616c0891e6a6a35661dc9ffe";
120887
120887
  const packageVersion = typeof rawPackageVersion === "string" ? rawPackageVersion : void 0;
120888
120888
  const gitSha = typeof rawGitSha === "string" ? rawGitSha : void 0;
120889
120889
  const sentryRelease = typeof rawSentryRelease === "string" ? rawSentryRelease : void 0;
@@ -124880,7 +124880,7 @@ var init_packageVersion = __esm({
124880
124880
  return import_node_path8.default.join(process.cwd(), "dvb");
124881
124881
  };
124882
124882
  readEmbeddedPackageVersion = () => {
124883
- const raw = "1.0.185";
124883
+ const raw = "1.0.187";
124884
124884
  return trimVersion(raw);
124885
124885
  };
124886
124886
  readNearestPackageMetadata = (basePath) => {
@@ -221881,7 +221881,7 @@ var init_resolve = __esm({
221881
221881
  });
221882
221882
 
221883
221883
  // src/devbox/commands/init/provider/modal.ts
221884
- var resolveModalControlPlaneToken, createModalResumeRestoreError, confirmTerminateExistingModalSandbox, runModalProviderInitPhases;
221884
+ var MODAL_TERMINATION_PROPAGATION_TIMEOUT_MS, MODAL_TERMINATION_PROPAGATION_POLL_INTERVAL_MS, sleep3, resolveModalControlPlaneToken, createModalResumeRestoreError, confirmTerminateExistingModalSandbox, provisionModalSandboxAfterTermination, runModalProviderInitPhases;
221885
221885
  var init_modal = __esm({
221886
221886
  "src/devbox/commands/init/provider/modal.ts"() {
221887
221887
  "use strict";
@@ -221892,6 +221892,9 @@ var init_modal = __esm({
221892
221892
  init_logger3();
221893
221893
  init_progress();
221894
221894
  init_sshConfig();
221895
+ MODAL_TERMINATION_PROPAGATION_TIMEOUT_MS = 6e4;
221896
+ MODAL_TERMINATION_PROPAGATION_POLL_INTERVAL_MS = 500;
221897
+ sleep3 = async (ms) => await new Promise((resolve2) => setTimeout(resolve2, ms));
221895
221898
  resolveModalControlPlaneToken = (options) => {
221896
221899
  const raw = options?.credentials?.controlPlaneToken;
221897
221900
  if (typeof raw !== "string") return null;
@@ -221933,6 +221936,44 @@ var init_modal = __esm({
221933
221936
  }
221934
221937
  return true;
221935
221938
  };
221939
+ provisionModalSandboxAfterTermination = async ({
221940
+ alias,
221941
+ modalOperationOptions,
221942
+ timeoutMs = MODAL_TERMINATION_PROPAGATION_TIMEOUT_MS,
221943
+ pollIntervalMs = MODAL_TERMINATION_PROPAGATION_POLL_INTERVAL_MS
221944
+ }) => {
221945
+ const deadline = Date.now() + timeoutMs;
221946
+ let lastSeenSandbox = null;
221947
+ while (true) {
221948
+ try {
221949
+ return await provisionModalSandbox(alias, modalOperationOptions);
221950
+ } catch (error2) {
221951
+ if (!isModalAlreadyExistsError(error2)) {
221952
+ throw error2;
221953
+ }
221954
+ }
221955
+ lastSeenSandbox = await findModalSandbox(
221956
+ { alias, includeFinished: true },
221957
+ modalOperationOptions
221958
+ );
221959
+ const remainingMs = deadline - Date.now();
221960
+ if (remainingMs <= 0) {
221961
+ if (lastSeenSandbox) {
221962
+ throw new Error(
221963
+ `Timed out waiting for modal sandbox alias "${alias}" to become available after termination. Last seen sandbox id "${lastSeenSandbox.sandboxId}" with status "${lastSeenSandbox.status}".`
221964
+ );
221965
+ }
221966
+ throw new Error(
221967
+ `Timed out waiting for modal sandbox alias "${alias}" to become available after termination.`
221968
+ );
221969
+ }
221970
+ await terminateModalSandboxesByAlias(alias, {
221971
+ ...modalOperationOptions,
221972
+ includeFinished: true
221973
+ });
221974
+ await sleep3(Math.min(pollIntervalMs, remainingMs));
221975
+ }
221976
+ };
221936
221977
  runModalProviderInitPhases = async ({
221937
221978
  parsed,
221938
221979
  shouldResume,
@@ -222106,10 +222147,12 @@ var init_modal = __esm({
222106
222147
  `Modal reported ALREADY_EXISTS for alias "${alias}", but no matching sandbox was found to terminate.`
222107
222148
  );
222108
222149
  }
222109
- status.stage("Provisioning in Modal");
222110
- const reprovisioned = await provisionModalSandbox(
222111
- alias,
222112
- modalOperationOptions
222150
+ status.stage("Waiting for Modal to release sandbox name");
222151
+ const reprovisioned = await provisionModalSandboxAfterTermination(
222152
+ {
222153
+ alias,
222154
+ ...modalOperationOptions ? { modalOperationOptions } : {}
222155
+ }
222113
222156
  );
222114
222157
  await recordProvisionedModal(reprovisioned);
222115
222158
  return;
@@ -229743,4 +229786,4 @@ smol-toml/dist/index.js:
229743
229786
  */
229744
229787
  //# sourceMappingURL=dvb.cjs.map
229745
229788
 
229746
- //# debugId=5f4b3c52-97e5-5ed6-a2be-6b87918b5e9c
229789
+ //# debugId=e509ee6a-46ba-5ad5-a239-d37fb7278d9d