edgeone 1.0.21 → 1.0.23

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/README.md CHANGED
@@ -103,9 +103,33 @@ If you need to use the Key-Value Storage capability or synchronize the environme
103
103
  edgeone pages link
104
104
  ```
105
105
 
106
- ### 6. Submit for Deployment
106
+ ### 6. Deploy
107
107
 
108
- After local development and debugging are completed, push the project code to the Git remote to trigger the CI build and deployment in the Pages backend, completing the entire development process.
108
+ After local development and debugging are completed, you can deploy your project directly using the deploy command:
109
+
110
+ ```plaintext
111
+ edgeone pages deploy <directoryOrZip> -n <projectName>
112
+ ```
113
+
114
+ #### Parameters
115
+
116
+ - `<directoryOrZip>`: Path of folder or ZIP package to deploy (required)
117
+ - `-n, --name`: Project name for deployment (creates new or updates existing project) (required)
118
+ - `-e, --env`: Environment to deploy to, choices: 'production' or 'preview' (default: 'production')
119
+
120
+ #### Usage Examples
121
+
122
+ ```plaintext
123
+ # Deploy build folder to production
124
+ edgeone pages deploy ./dist -n edgeone-pages-project
125
+
126
+ # Deploy ZIP package to preview environment
127
+ edgeone pages deploy ./build.zip -n edgeone-pages-project -e preview
128
+ ```
129
+
130
+ **Alternative: Git-based Deployment**
131
+
132
+ You can also push the project code to the Git remote to trigger the CI build and deployment in the Pages backend, completing the entire development process.
109
133
 
110
134
  ### 7. Switching Accounts
111
135
 
@@ -141,34 +165,22 @@ edgeone pages dev --fePort=8000 // your front dev server port
141
165
 
142
166
  This section provides guidance on integrating EdgeOne CLI into your CI/CD pipelines for automated deployments.
143
167
 
144
- ### Deploy Command for CI Pipelines
168
+ ### Automated Deploy Command
145
169
 
146
- The deploy command allows you to deploy a folder or ZIP package directly to EdgeOne Pages from your CI/CD pipeline without using Git-based deployment.
170
+ For CI/CD pipelines, you can use the same deploy command with an API Token for authentication:
147
171
 
148
172
  ```plaintext
149
- edgeone pages deploy <directoryOrZip> -n <projectName> [-t <token>]
173
+ edgeone pages deploy <directoryOrZip> -n <projectName> -t <token>
150
174
  ```
151
175
 
152
176
  #### Parameters
153
177
 
154
178
  - `<directoryOrZip>`: Path of folder or ZIP package to deploy (required)
155
179
  - `-n, --name`: Project name for deployment (creates new or updates existing project) (required)
156
- - `-t, --token`: API Token for CI/CD pipelines (optional if logged in with `edgeone login`)
157
180
  - `-e, --env`: Environment to deploy to, choices: 'production' or 'preview' (default: 'production')
181
+ - `-t, --token`: API Token for CI/CD pipelines (required for automated deployments)
158
182
 
159
- #### Usage Examples
160
-
161
- **Local Development (after `edgeone login`):**
162
-
163
- ```plaintext
164
- # Deploy using local login credentials
165
- edgeone pages deploy ./dist -n edgeone-pages-project
166
-
167
- # Deploy to preview environment using local login
168
- edgeone pages deploy ./build.zip -n edgeone-pages-project -e preview
169
- ```
170
-
171
- **CI/CD Pipeline Examples:**
183
+ #### CI/CD Pipeline Examples
172
184
 
173
185
  ```plaintext
174
186
  # Basic CI deployment to production with API token
@@ -142949,7 +142949,7 @@ var yargs_default = Yargs;
142949
142949
  // package.json
142950
142950
  var package_default = {
142951
142951
  name: "edgeone",
142952
- version: "1.0.21",
142952
+ version: "1.0.23",
142953
142953
  description: "Command-line interface for TencentCloud Pages Functions",
142954
142954
  bin: {
142955
142955
  edgeone: "./edgeone-bin/edgeone.js"
@@ -153709,11 +153709,12 @@ var createPagesDeployment = async (opts) => {
153709
153709
  Env: env3,
153710
153710
  DistType: isZip ? "Zip" : "Folder",
153711
153711
  TempBucketPath: targetPath
153712
- }
153712
+ },
153713
+ throwOnError: false
153713
153714
  });
153714
153715
  if ((_b2 = (_a3 = data == null ? void 0 : data.Data) == null ? void 0 : _a3.Response) == null ? void 0 : _b2.Error) {
153715
153716
  throw new Error(
153716
- `[createPagesDeployment] Deployment creation failed: ${data.Data.Response.Error.Message}`
153717
+ `[createPagesDeployment] Deployment creation failed: This project type does not support direct folder or zip file deployment`
153717
153718
  );
153718
153719
  }
153719
153720
  return data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edgeone",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "Command-line interface for TencentCloud Pages Functions",
5
5
  "bin": {
6
6
  "edgeone": "./edgeone-bin/edgeone.js"