@base44-preview/cli 0.1.9-pr.601.c76ac1f → 0.1.9-pr.602.2af5b30

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.
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "imports": {
3
- "base44:runtime": "./base44-runtime.ts",
4
- "npm:@base44/sdk": "./vendor/base44-sdk.js"
3
+ "base44:runtime": "./base44-runtime.ts"
5
4
  }
6
5
  }
package/dist/cli/index.js CHANGED
@@ -245663,6 +245663,7 @@ var PublishedUrlResponseSchema = exports_external.object({
245663
245663
  });
245664
245664
  var CreateDeploymentResponseSchema = exports_external.object({
245665
245665
  deployment_id: exports_external.string(),
245666
+ session_id: exports_external.string().optional(),
245666
245667
  asset_uploads: exports_external.object({
245667
245668
  type: exports_external.literal("s3"),
245668
245669
  uploads: exports_external.array(exports_external.object({
@@ -245674,6 +245675,7 @@ var CreateDeploymentResponseSchema = exports_external.object({
245674
245675
  }).nullable().optional()
245675
245676
  }).transform((data) => ({
245676
245677
  deploymentId: data.deployment_id,
245678
+ sessionId: data.session_id,
245677
245679
  assetUploads: data.asset_uploads == null ? null : {
245678
245680
  type: "s3",
245679
245681
  uploads: data.asset_uploads.uploads.map((upload) => ({
@@ -248160,9 +248162,6 @@ function getTemplatesIndexPath() {
248160
248162
  function getBackendRuntimeDir() {
248161
248163
  return join12(ASSETS_DIR, "backend-runtime");
248162
248164
  }
248163
- function getImportMapPath() {
248164
- return join12(getBackendRuntimeDir(), "import-map.json");
248165
- }
248166
248165
  function getDenoWrapperPath() {
248167
248166
  return join12(getBackendRuntimeDir(), "main.ts");
248168
248167
  }
@@ -248316,16 +248315,20 @@ async function createDeployment(request) {
248316
248315
  }
248317
248316
  return result.data;
248318
248317
  }
248319
- async function finalizeStaticDeployment(deploymentId, indexHtml) {
248318
+ async function finalizeStaticDeployment(deploymentId, indexHtml, sessionId) {
248320
248319
  const formData = new FormData;
248321
248320
  formData.append("index.html", new File([indexHtml], "index.html", { type: "text/html" }));
248322
- return await postFinalize(deploymentId, formData);
248321
+ return await postFinalize(deploymentId, formData, sessionId);
248323
248322
  }
248324
- async function postFinalize(deploymentId, formData) {
248323
+ async function postFinalize(deploymentId, formData, sessionId) {
248325
248324
  const appClient = getAppClient();
248326
248325
  let response;
248327
248326
  try {
248328
- response = await appClient.post(`deployments/${encodeURIComponent(deploymentId)}/finalize`, { body: formData, timeout: 180000 });
248327
+ response = await appClient.post(`deployments/${encodeURIComponent(deploymentId)}/finalize`, {
248328
+ body: formData,
248329
+ timeout: 180000,
248330
+ ...sessionId ? { searchParams: { session_id: sessionId } } : {}
248331
+ });
248329
248332
  } catch (error48) {
248330
248333
  throw await ApiError.fromHttpError(error48, "finalizing deployment");
248331
248334
  }
@@ -248615,7 +248618,7 @@ async function deployStaticSite(options) {
248615
248618
  });
248616
248619
  }
248617
248620
  const indexHtml = await readFile4(join16(outputDir, "index.html"));
248618
- const finalized = await finalizeStaticDeployment(created.deploymentId, new Uint8Array(indexHtml));
248621
+ const finalized = await finalizeStaticDeployment(created.deploymentId, new Uint8Array(indexHtml), created.sessionId);
248619
248622
  return { deploymentId: finalized.deploymentId };
248620
248623
  }
248621
248624
  // src/core/project/deploy.ts
@@ -263710,17 +263713,9 @@ async function runScript(options8) {
263710
263713
  const tempWrapper = await $file({ postfix: ".ts" });
263711
263714
  cleanupFns.push(tempWrapper.cleanup);
263712
263715
  copyFileSync(getExecWrapperPath(), tempWrapper.path);
263713
- const importMapPath = getImportMapPath();
263714
263716
  try {
263715
263717
  const exitCode = await new Promise((resolvePromise) => {
263716
- const child = spawn4("deno", [
263717
- "run",
263718
- "--allow-all",
263719
- "--node-modules-dir=auto",
263720
- "--import-map",
263721
- importMapPath,
263722
- tempWrapper.path
263723
- ], {
263718
+ const child = spawn4("deno", ["run", "--allow-all", "--node-modules-dir=auto", tempWrapper.path], {
263724
263719
  env: {
263725
263720
  ...process.env,
263726
263721
  SCRIPT_PATH: scriptPath,
@@ -268219,4 +268214,4 @@ export {
268219
268214
  CLIExitError
268220
268215
  };
268221
268216
 
268222
- //# debugId=E702492ECF74B8D164756E2164756E21
268217
+ //# debugId=30595315C503EB6464756E2164756E21