edgeone 1.0.33 → 1.0.34

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/edgeone-dist/cli.js +26 -14
  2. package/package.json +1 -1
@@ -164695,7 +164695,7 @@ var yargs_default = Yargs;
164695
164695
  // package.json
164696
164696
  var package_default = {
164697
164697
  name: "edgeone",
164698
- version: "1.0.33",
164698
+ version: "1.0.34",
164699
164699
  description: "Command-line interface for TencentCloud Pages Functions",
164700
164700
  bin: {
164701
164701
  edgeone: "./edgeone-bin/edgeone.js"
@@ -175453,7 +175453,7 @@ var describePagesProjects = async (opts) => {
175453
175453
  };
175454
175454
  }
175455
175455
  };
175456
- var describePagesDeployments = async (projectId) => {
175456
+ var describePagesDeployments = async (projectId, throwOnError = true) => {
175457
175457
  return await callApi({
175458
175458
  action: "DescribePagesDeployments",
175459
175459
  data: {
@@ -175462,7 +175462,8 @@ var describePagesDeployments = async (projectId) => {
175462
175462
  Limit: 50,
175463
175463
  OrderBy: "CreatedOn",
175464
175464
  Order: "Desc"
175465
- }
175465
+ },
175466
+ throwOnError
175466
175467
  });
175467
175468
  };
175468
175469
  var describePagesEncipherToken = async (url2) => {
@@ -175716,18 +175717,29 @@ var pollProjectStatus = async (projectId, deploymentId) => {
175716
175717
  let isProcessing = true;
175717
175718
  let deployment = null;
175718
175719
  while (isProcessing) {
175719
- const deploymentsResult = await describePagesDeployments(projectId);
175720
- deployment = deploymentsResult.Data.Response.Deployments.find(
175721
- (deploy) => deploy.DeploymentId === deploymentId
175722
- );
175723
- if (!deployment) {
175724
- throw new Error(`Deployment with ID ${deploymentId} not found`);
175725
- }
175726
- progressLog(`[pollProjectStatus] Deployment status: ${deployment.Status}`);
175727
- if (deployment.Status !== "Process") {
175728
- isProcessing = false;
175729
- } else {
175720
+ try {
175721
+ const deploymentsResult = await describePagesDeployments(projectId, false);
175722
+ if (deploymentsResult.Code !== 0) {
175723
+ progressLog(`[pollProjectStatus] Polling failed, retrying in 5 seconds...`);
175724
+ await sleep(5e3);
175725
+ continue;
175726
+ }
175727
+ deployment = deploymentsResult.Data.Response.Deployments.find(
175728
+ (deploy) => deploy.DeploymentId === deploymentId
175729
+ );
175730
+ if (!deployment) {
175731
+ throw new Error(`Deployment with ID ${deploymentId} not found`);
175732
+ }
175733
+ progressLog(`[pollProjectStatus] Deployment status: ${deployment.Status}`);
175734
+ if (deployment.Status !== "Process") {
175735
+ isProcessing = false;
175736
+ } else {
175737
+ await sleep(5e3);
175738
+ }
175739
+ } catch (error3) {
175740
+ progressLog(`[pollProjectStatus] Polling failed, retrying in 5 seconds...`);
175730
175741
  await sleep(5e3);
175742
+ continue;
175731
175743
  }
175732
175744
  }
175733
175745
  return deployment;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edgeone",
3
- "version": "1.0.33",
3
+ "version": "1.0.34",
4
4
  "description": "Command-line interface for TencentCloud Pages Functions",
5
5
  "bin": {
6
6
  "edgeone": "./edgeone-bin/edgeone.js"