edgeone 1.0.23 → 1.0.25
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 -5
- 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.25",
|
|
142953
142953
|
description: "Command-line interface for TencentCloud Pages Functions",
|
|
142954
142954
|
bin: {
|
|
142955
142955
|
edgeone: "./edgeone-bin/edgeone.js"
|
|
@@ -152164,7 +152164,12 @@ var BuildFunctionGenerator = class {
|
|
|
152164
152164
|
delete envConfig["TENCENT_SECRET_KEY"];
|
|
152165
152165
|
this.env = envConfig;
|
|
152166
152166
|
} catch (e) {
|
|
152167
|
-
this.env = {
|
|
152167
|
+
this.env = {};
|
|
152168
|
+
for (const [key2, value] of Object.entries(process.env)) {
|
|
152169
|
+
if (/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(key2)) {
|
|
152170
|
+
this.env[key2] = value;
|
|
152171
|
+
}
|
|
152172
|
+
}
|
|
152168
152173
|
}
|
|
152169
152174
|
}
|
|
152170
152175
|
}
|
|
@@ -152445,7 +152450,9 @@ var BuildFunctionGenerator = class {
|
|
|
152445
152450
|
bundleAndGetString(filePath) {
|
|
152446
152451
|
const define2 = {};
|
|
152447
152452
|
for (const k in this.env) {
|
|
152448
|
-
|
|
152453
|
+
if (/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(k)) {
|
|
152454
|
+
define2[`env.${k}`] = JSON.stringify(process.env[k]);
|
|
152455
|
+
}
|
|
152449
152456
|
}
|
|
152450
152457
|
const result = esbuild.buildSync({
|
|
152451
152458
|
entryPoints: [filePath],
|
|
@@ -154235,10 +154242,8 @@ async function PagesLink(yargs) {
|
|
|
154235
154242
|
|
|
154236
154243
|
// src/pages/index.ts
|
|
154237
154244
|
process.on("uncaughtException", function(err2) {
|
|
154238
|
-
console.error("ERROR", err2);
|
|
154239
154245
|
});
|
|
154240
154246
|
process.on("unhandledRejection", function(err2) {
|
|
154241
|
-
console.error("ERROR", err2);
|
|
154242
154247
|
});
|
|
154243
154248
|
var PagesOptions = (yargs) => {
|
|
154244
154249
|
return yargs.positional("command", {
|