@supacloud/cli 0.14.4 → 0.14.5

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 (2) hide show
  1. package/dist/index.js +4 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7623,16 +7623,11 @@ Actions: list, deploy, deploy_bundle, config, source, delete, check`, {
7623
7623
  return cr.ok ? `✅ Function ${slug} config updated
7624
7624
  ${JSON.stringify(cr.data, null, 2)}` : `❌ Config update failed (${cr.status}): ${JSON.stringify(cr.data)}`;
7625
7625
  };
7626
- const confirmedDeploymentText = async (successText, responsePayload) => {
7626
+ const deploymentPolicyReceiptText = (successText, responsePayload) => {
7627
7627
  if (!hasFunctionConfig() || confirmedFunctionConfig(responsePayload, functionConfig())) {
7628
7628
  return successText;
7629
7629
  }
7630
- const fallback = await http.patch(`/v1/projects/${ref}/functions/${slug}/config`, functionConfig());
7631
- if (!fallback.ok || !confirmedFunctionConfig(fallback.data, functionConfig())) {
7632
- return `❌ Partial deployment (unsafe): POST succeeded and the code/bundle was deployed, but the function policy was not confirmed; legacy PATCH fallback failed (${fallback.status}): ${JSON.stringify(fallback.data)}`;
7633
- }
7634
- return `${successText}
7635
- ⚠️ Legacy non-atomic compatibility path: policy applied with follow-up PATCH`;
7630
+ return "❌ Unsafe deployment receipt: POST succeeded but did not confirm the requested function policy. No follow-up PATCH was attempted because code and policy must be activated atomically.";
7636
7631
  };
7637
7632
  const checkSyntax = async (sourceCode) => {
7638
7633
  const tmpDir = mkdtempSync(join2(tmpdir(), "supacloud-edge-check-"));
@@ -7688,7 +7683,7 @@ ${deployCheck.err}`;
7688
7683
  text = `❌ Failed (${dr.status}): ${JSON.stringify(dr.data)}`;
7689
7684
  break;
7690
7685
  }
7691
- text = await confirmedDeploymentText(`✅ Function ${slug} deployed`, dr.data);
7686
+ text = deploymentPolicyReceiptText(`✅ Function ${slug} deployed`, dr.data);
7692
7687
  break;
7693
7688
  case "deploy_bundle":
7694
7689
  need("slug", slug);
@@ -7703,7 +7698,7 @@ ${deployCheck.err}`;
7703
7698
  text = `❌ Failed (${br.status}): ${JSON.stringify(br.data)}`;
7704
7699
  break;
7705
7700
  }
7706
- text = await confirmedDeploymentText(`✅ Function ${slug} bundle deployed (${Object.keys(files).length} files)`, br.data);
7701
+ text = deploymentPolicyReceiptText(`✅ Function ${slug} bundle deployed (${Object.keys(files).length} files)`, br.data);
7707
7702
  break;
7708
7703
  case "config":
7709
7704
  text = await updateFunctionConfig();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supacloud/cli",
3
- "version": "0.14.4",
3
+ "version": "0.14.5",
4
4
  "description": "Project-scoped CLI for SupaCloud users",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",