edgeone 1.0.29 → 1.0.31
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/edgeone-dist/cli.js +10 -3
- package/package.json +1 -1
package/edgeone-dist/cli.js
CHANGED
|
@@ -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.
|
|
142952
|
+
version: "1.0.31",
|
|
142953
142953
|
description: "Command-line interface for TencentCloud Pages Functions",
|
|
142954
142954
|
bin: {
|
|
142955
142955
|
edgeone: "./edgeone-bin/edgeone.js"
|
|
@@ -152211,6 +152211,7 @@ var BuildFunctionGenerator = class {
|
|
|
152211
152211
|
let routeParams = {};
|
|
152212
152212
|
let pagesFunctionResponse = null;
|
|
152213
152213
|
const request = context.request;
|
|
152214
|
+
const waitUntil = context.waitUntil;
|
|
152214
152215
|
const urlInfo = new URL(request.url);
|
|
152215
152216
|
|
|
152216
152217
|
if (urlInfo.pathname !== '/' && urlInfo.pathname.endsWith('/')) {
|
|
@@ -152249,8 +152250,8 @@ var BuildFunctionGenerator = class {
|
|
|
152249
152250
|
});
|
|
152250
152251
|
}
|
|
152251
152252
|
}
|
|
152252
|
-
return pagesFunctionResponse({request, params, env: ${this.env ? JSON.stringify(this.env) : "{}"} });
|
|
152253
|
-
}addEventListener('fetch',event=>{return event.respondWith(handleRequest({request:event.request,params: {}, env: ${this.env ? JSON.stringify(this.env) : "{}"} }))});`;
|
|
152253
|
+
return pagesFunctionResponse({request, params, env: ${this.env ? JSON.stringify(this.env) : "{}"}, waitUntil });
|
|
152254
|
+
}addEventListener('fetch',event=>{return event.respondWith(handleRequest({request:event.request,params: {}, env: ${this.env ? JSON.stringify(this.env) : "{}"}, waitUntil: event.waitUntil }))});`;
|
|
152254
152255
|
writeFileSync(OUTPUTPATH, this.bundleText);
|
|
152255
152256
|
normalLog("\u2728Compiled pages functions successfully");
|
|
152256
152257
|
}
|
|
@@ -154029,6 +154030,12 @@ var deployFolderOrZipToEdgeOne = async (localPath, env3 = "Production") => {
|
|
|
154029
154030
|
env3
|
|
154030
154031
|
);
|
|
154031
154032
|
okLog(`Deployment to EdgeOne Pages completed successfully! To view your project's live URL, please visit the EdgeOne Pages Console.`);
|
|
154033
|
+
if (process.env.SHOW_URL) {
|
|
154034
|
+
okLog(`Temporary URL: ${structuredResult.url}`);
|
|
154035
|
+
console.log(`EDGEONE_DEPLOY_URL=${structuredResult.url}`);
|
|
154036
|
+
console.log(`EDGEONE_DEPLOY_TYPE=${structuredResult.type}`);
|
|
154037
|
+
console.log(`EDGEONE_PROJECT_ID=${structuredResult.projectId}`);
|
|
154038
|
+
}
|
|
154032
154039
|
return structuredResult;
|
|
154033
154040
|
} catch (error3) {
|
|
154034
154041
|
throw error3;
|