edgeone 1.2.29 → 1.3.0-beta.1
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 +4 -4
- package/edgeone-dist/cli.js +387 -387
- package/edgeone-dist/pages/dev/runner-worker.js +229 -229
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ After successful login, execute the initialization command to initialize the bas
|
|
|
56
56
|
edgeone pages init
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
After initialization, an `edge-functions` or `
|
|
59
|
+
After initialization, an `edge-functions` or `cloud-functions` folder and sample functions will be generated in the root directory of the project. You can continue to add and develop functions in this folder.
|
|
60
60
|
|
|
61
61
|
### 4. Local Development
|
|
62
62
|
|
|
@@ -68,10 +68,10 @@ edgeone pages dev
|
|
|
68
68
|
|
|
69
69
|
The run command by default creates a service locally on port 8088. Both the Pages Function service and the Pages project service run on the same port, with no need for additional proxying.
|
|
70
70
|
|
|
71
|
-
You can access the front-end page via `http://localhost:8088/`. In the front-end project, use the Fetch API directly, where the access path is the path of function files in folder `edge-functions` or `
|
|
71
|
+
You can access the front-end page via `http://localhost:8088/`. In the front-end project, use the Fetch API directly, where the access path is the path of function files in folder `edge-functions` or `cloud-functions`.
|
|
72
72
|
|
|
73
73
|
```javascript
|
|
74
|
-
// ./
|
|
74
|
+
// ./cloud-functions/api/my-functions.js
|
|
75
75
|
fetch('/api/my-functions', {
|
|
76
76
|
method: 'POST',
|
|
77
77
|
body: JSON.stringify({ data: 'example' }),
|
|
@@ -154,7 +154,7 @@ edgeone pages deploy [<directoryOrZip>] -n <projectName> -t <token> [-e <env>]
|
|
|
154
154
|
- `-t, --token`: API Token for CI/CD pipelines (required for automated deployments)
|
|
155
155
|
|
|
156
156
|
Note:
|
|
157
|
-
- By default, when executing deploy, the CLI automatically builds and packages frontend code, `node-functions
|
|
157
|
+
- By default, when executing deploy, the CLI automatically builds and packages frontend code, `cloud-functions` (or `node-functions` for legacy projects), and `edge-functions` into the `.edgeone` folder and deploy to Pages.
|
|
158
158
|
- If you choose to build the project manually, you need to manually copy the Pages Functions related folder and `package.json` to dist (suppose the output directory is dist), then rerun `edgeone pages deploy ./dist`.
|
|
159
159
|
|
|
160
160
|
#### CI/CD Pipeline Examples
|