@sandblocks/cli 0.6.0 → 0.6.2

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/cli.js CHANGED
@@ -13601,7 +13601,7 @@ async function deployUnlocked(args, dependencies) {
13601
13601
  const routes = operation.result?.serviceRoutes ?? [];
13602
13602
  const images = operation.result?.images ?? [];
13603
13603
  if (typeof preview.ssoEnabled === "boolean") {
13604
- await request(context.apiUrl, context.apiKey, `/v1/projects/${encodeURIComponent(context.state.projectId)}/routing-policies/${encodeURIComponent(stack)}/${encodeURIComponent(preview.managedEnvironment)}`, { method: "PUT", body: JSON.stringify({ ssoEnabled: preview.ssoEnabled }) });
13604
+ await request(context.apiUrl, context.apiKey, `/v1/projects/${encodeURIComponent(context.state.projectId)}/routing-policies/${encodeURIComponent(stack)}/${encodeURIComponent(preview.deploymentType)}`, { method: "PUT", body: JSON.stringify({ ssoEnabled: preview.ssoEnabled }) });
13605
13605
  }
13606
13606
  let sandbox = await recordSandbox(context, loaded, preview, routes, operation.result?.healthEvidence ?? [], images, preview.steps.length ? "active" : "available");
13607
13607
  let checkEvidence = [];
@@ -13740,7 +13740,7 @@ async function deployDevelopmentUnlocked(context, loaded, preview) {
13740
13740
  });
13741
13741
  const operation = await wait(context.apiUrl, context.apiKey, submitted.operation.id, 30 * 60000);
13742
13742
  if (typeof preview.ssoEnabled === "boolean") {
13743
- await request(context.apiUrl, context.apiKey, `/v1/projects/${encodeURIComponent(context.state.projectId)}/routing-policies/${encodeURIComponent(stack)}/${encodeURIComponent(preview.managedEnvironment)}`, { method: "PUT", body: JSON.stringify({ ssoEnabled: preview.ssoEnabled }) });
13743
+ await request(context.apiUrl, context.apiKey, `/v1/projects/${encodeURIComponent(context.state.projectId)}/routing-policies/${encodeURIComponent(stack)}/${encodeURIComponent(preview.deploymentType)}`, { method: "PUT", body: JSON.stringify({ ssoEnabled: preview.ssoEnabled }) });
13744
13744
  }
13745
13745
  const sandbox = await recordSandbox(context, loaded, preview, operation.result?.serviceRoutes ?? [], operation.result?.healthEvidence ?? [], operation.result?.images ?? [], "available");
13746
13746
  const previewUrls = sandbox.previewUrls ?? [];
@@ -14311,7 +14311,7 @@ async function loadLocalEnvironment(root) {
14311
14311
  }
14312
14312
  }
14313
14313
  async function applyManagedRoutingPolicy(context, stack, preview) {
14314
- const body = await request(context.apiUrl, context.apiKey, `/v1/projects/${encodeURIComponent(context.state.projectId)}/routing-policies/${encodeURIComponent(stack)}/${encodeURIComponent(preview.managedEnvironment)}`);
14314
+ const body = await request(context.apiUrl, context.apiKey, `/v1/projects/${encodeURIComponent(context.state.projectId)}/routing-policies/${encodeURIComponent(stack)}/${encodeURIComponent(preview.deploymentType)}`);
14315
14315
  const policy = body.policy;
14316
14316
  const primaryDomains = Object.fromEntries(Object.entries(policy.domains ?? {}).flatMap(([service, domains]) => {
14317
14317
  const domain = Array.isArray(domains) ? domains[0] : domains;
@@ -14331,7 +14331,7 @@ function expectedPreviewServiceUrls(sandboxId, deploymentId, stack, preview) {
14331
14331
  const name = service.id.toUpperCase().replace(/[^A-Z0-9]/g, "_");
14332
14332
  const host = resolvedServiceDomain(sandboxId, deploymentId, service.id, preview);
14333
14333
  const configuredStableHosts = preview.stableDomains[service.id];
14334
- const stableHost = (Array.isArray(configuredStableHosts) ? configuredStableHosts[0] : configuredStableHosts) ?? `${preview.managedEnvironment}-${stack}-${service.id}.${preview.baseDomain}`;
14334
+ const stableHost = (Array.isArray(configuredStableHosts) ? configuredStableHosts[0] : configuredStableHosts) ?? `${preview.deploymentType}-${stack}-${service.id}.${preview.baseDomain}`;
14335
14335
  return [
14336
14336
  [`SANDBLOCKS_SERVICE_${name}_URL`, `https://${host}`],
14337
14337
  [`SANDBLOCKS_STABLE_SERVICE_${name}_URL`, `https://${stableHost}`]
@@ -14339,7 +14339,7 @@ function expectedPreviewServiceUrls(sandboxId, deploymentId, stack, preview) {
14339
14339
  }));
14340
14340
  }
14341
14341
  async function managedServiceDomains(context, stack, preview, deploymentId) {
14342
- const body = await request(context.apiUrl, context.apiKey, `/v1/projects/${encodeURIComponent(context.state.projectId)}/routing-policies/${encodeURIComponent(stack)}/${encodeURIComponent(preview.managedEnvironment)}`);
14342
+ const body = await request(context.apiUrl, context.apiKey, `/v1/projects/${encodeURIComponent(context.state.projectId)}/routing-policies/${encodeURIComponent(stack)}/${encodeURIComponent(preview.deploymentType)}`);
14343
14343
  const domains = body.policy.domains ?? {};
14344
14344
  return Object.keys(domains).length ? domains : resolvedServiceDomains(context.state.sandboxId, deploymentId, preview);
14345
14345
  }
@@ -16649,4 +16649,4 @@ export {
16649
16649
  parse2 as parse
16650
16650
  };
16651
16651
 
16652
- //# debugId=B268A7EFF33E724C64756E2164756E21
16652
+ //# debugId=1BF5DC414419B92F64756E2164756E21