edgeone 1.0.18 → 1.0.20
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 +20 -7
- package/edgeone-bin/edgeone.js +8 -1
- package/edgeone-dist/cli.js +59176 -97857
- package/package.json +11 -6
- package/edgeone-dist/templates/basic.tmpl.js +0 -14
- package/edgeone-dist/templates/basic.tmpl.ts +0 -14
- package/edgeone-dist/templates/package.tmpl.json +0 -9
- package/edgeone-dist/templates/tsconfig.json +0 -6
- package/edgeone-dist/templates/tsconfig.tmpl.json +0 -101
package/README.md
CHANGED
|
@@ -146,23 +146,36 @@ This section provides guidance on integrating EdgeOne CLI into your CI/CD pipeli
|
|
|
146
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.
|
|
147
147
|
|
|
148
148
|
```plaintext
|
|
149
|
-
edgeone pages deploy <directoryOrZip> -t <token>
|
|
149
|
+
edgeone pages deploy <directoryOrZip> -n <projectName> [-t <token>]
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
#### Parameters
|
|
153
153
|
|
|
154
154
|
- `<directoryOrZip>`: Path of folder or ZIP package to deploy (required)
|
|
155
|
-
- `-
|
|
155
|
+
- `-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`)
|
|
156
157
|
- `-e, --env`: Environment to deploy to, choices: 'production' or 'preview' (default: 'production')
|
|
157
158
|
|
|
158
|
-
####
|
|
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:**
|
|
159
172
|
|
|
160
173
|
```plaintext
|
|
161
|
-
# Basic CI deployment to production
|
|
162
|
-
edgeone pages deploy ./dist -t $EDGEONE_API_TOKEN
|
|
174
|
+
# Basic CI deployment to production with API token
|
|
175
|
+
edgeone pages deploy ./dist -n edgeone-pages-project -t $EDGEONE_API_TOKEN
|
|
163
176
|
|
|
164
|
-
# CI deployment to preview environment
|
|
165
|
-
edgeone pages deploy ./build.zip -e preview -t $EDGEONE_API_TOKEN
|
|
177
|
+
# CI deployment to preview environment with API token
|
|
178
|
+
edgeone pages deploy ./build.zip -n edgeone-pages-project -e preview -t $EDGEONE_API_TOKEN
|
|
166
179
|
```
|
|
167
180
|
|
|
168
181
|
#### Obtaining an API Token
|
package/edgeone-bin/edgeone.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
var _a;
|
|
3
|
-
"use strict";
|
|
4
3
|
var __create = Object.create;
|
|
5
4
|
var __defProp = Object.defineProperty;
|
|
6
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -3966,10 +3965,17 @@ var cls_default = cls;
|
|
|
3966
3965
|
|
|
3967
3966
|
// bin/edgeone.ts
|
|
3968
3967
|
function main() {
|
|
3968
|
+
process.removeAllListeners("warning");
|
|
3969
|
+
process.on("warning", (warning) => {
|
|
3970
|
+
if (warning.name !== "DeprecationWarning") {
|
|
3971
|
+
console.warn(warning.message);
|
|
3972
|
+
}
|
|
3973
|
+
});
|
|
3969
3974
|
const cmdProcess = (0, import_child_process.spawn)(
|
|
3970
3975
|
process.execPath,
|
|
3971
3976
|
[
|
|
3972
3977
|
"--no-warnings",
|
|
3978
|
+
"--no-deprecation",
|
|
3973
3979
|
"--experimental-vm-modules",
|
|
3974
3980
|
...process.execArgv,
|
|
3975
3981
|
import_path.default.join(__dirname, "../edgeone-dist/cli.js"),
|
|
@@ -4004,3 +4010,4 @@ function main() {
|
|
|
4004
4010
|
});
|
|
4005
4011
|
}
|
|
4006
4012
|
void main();
|
|
4013
|
+
//# sourceMappingURL=edgeone.js.map
|