edge-functions 5.1.0-stage.4 → 5.1.0
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
|
@@ -302,7 +302,7 @@ Table:
|
|
|
302
302
|
| Next Static | ✅ |
|
|
303
303
|
| Gatsby Static | ✅ |
|
|
304
304
|
| Next Node Pages 12 3 1 Fs | ✅ |
|
|
305
|
-
| Vue Vite Static |
|
|
305
|
+
| Vue Vite Static | ⚠️ |
|
|
306
306
|
| Next 12 Static | ✅ |
|
|
307
307
|
| Astro Static | ✅ |
|
|
308
308
|
| Qwik Static | ✅ |
|
|
@@ -326,7 +326,8 @@ Table:
|
|
|
326
326
|
| Simple Ts Esm | ✅ |
|
|
327
327
|
| Simple Js Esm | ✅ |
|
|
328
328
|
|
|
329
|
-
Last test run date: 04/
|
|
329
|
+
Last test run date: 04/20/25 04:04:26 AM
|
|
330
|
+
|
|
330
331
|
## Contributing
|
|
331
332
|
|
|
332
333
|
Check the [Contributing doc](CONTRIBUTING.md).
|
|
@@ -608,6 +608,17 @@ var setEnvironment = async ({
|
|
|
608
608
|
}
|
|
609
609
|
};
|
|
610
610
|
}
|
|
611
|
+
if (!globalThis.bundler?.experimental) {
|
|
612
|
+
mergedConfig.functions = [];
|
|
613
|
+
const bundlerType = mergedConfig.build?.bundler || "webpack";
|
|
614
|
+
const finalExt = bundlerType === "webpack" ? ".js" : "";
|
|
615
|
+
const outputFileName = ctx.production ? "worker" : "worker.dev";
|
|
616
|
+
const singleOutputPath = `.edge/${outputFileName}${finalExt}`;
|
|
617
|
+
mergedConfig.functions.push({
|
|
618
|
+
name: userConfig?.functions?.[0]?.name || preset.config?.functions?.[0]?.name || "handler",
|
|
619
|
+
path: singleOutputPath
|
|
620
|
+
});
|
|
621
|
+
}
|
|
611
622
|
const hasUserConfig = await env_default.readUserConfig();
|
|
612
623
|
if (!hasUserConfig) await env_default.writeUserConfig(mergedConfig);
|
|
613
624
|
const storeConfig = {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
buildCommand,
|
|
3
3
|
bundler_default,
|
|
4
4
|
writeStore
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TZOFML3T.js";
|
|
6
6
|
import {
|
|
7
7
|
DOCS_MESSAGE,
|
|
8
8
|
debug
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
// lib/commands/dev/command.ts
|
|
12
12
|
async function devCommand({ entry, port }) {
|
|
13
13
|
const parsedPort = parseInt(port, 10);
|
|
14
|
-
const { server } = await import("./env-
|
|
14
|
+
const { server } = await import("./env-EPNKLX2X.js");
|
|
15
15
|
const entryPoint = entry || null;
|
|
16
16
|
server(entryPoint, parsedPort);
|
|
17
17
|
}
|
package/dist/main.js
CHANGED
|
@@ -71,7 +71,7 @@ function startBundler() {
|
|
|
71
71
|
AzionBundler.version(globalThis.bundler.version);
|
|
72
72
|
if (process.argv.length === 2) process.argv.push("build");
|
|
73
73
|
AzionBundler.command("store <command>").description("Manage store configuration (init/destroy)").option("--scope <scope>", "Project scope", "global").option("--preset <string>", "Preset name").option("--entry <string>", "Code entrypoint").option("--bundler <type>", "Bundler type (webpack/esbuild)").option("--polyfills [boolean]", "Use node polyfills in build").option("--worker [boolean]", "Indicates worker expression").action(async (command, options) => {
|
|
74
|
-
const { storeCommand } = await import("./commands-
|
|
74
|
+
const { storeCommand } = await import("./commands-EYXPHROC.js");
|
|
75
75
|
await storeCommand({ command, options });
|
|
76
76
|
});
|
|
77
77
|
AzionBundler.command("build").description("Build a project for edge deployment").option("--entry <entries...>", "Code entrypoint (default: ./main.js or ./main.ts)").option("--preset <type>", "Preset of build target (e.g., vue, next, javascript)").option(
|
|
@@ -81,7 +81,7 @@ function startBundler() {
|
|
|
81
81
|
"--worker [boolean]",
|
|
82
82
|
"Indicates that the constructed code inserts its own worker expression. Use --worker or --worker=true to enable, --worker=false to disable"
|
|
83
83
|
).option("--dev", "Build in development mode", false).option("--experimental [boolean]", "Enable experimental features", false).action(async (options) => {
|
|
84
|
-
const { buildCommand, manifestCommand } = await import("./commands-
|
|
84
|
+
const { buildCommand, manifestCommand } = await import("./commands-EYXPHROC.js");
|
|
85
85
|
const { dev, experimental, ...buildOptions } = options;
|
|
86
86
|
if (experimental) globalThis.bundler.experimental = true;
|
|
87
87
|
const { config } = await buildCommand({
|
|
@@ -91,13 +91,13 @@ function startBundler() {
|
|
|
91
91
|
await manifestCommand({ action: "generate", config });
|
|
92
92
|
});
|
|
93
93
|
AzionBundler.command("dev").description("Start local environment").argument("[entry]", "Specify the entry file (default: .edge/worker.dev.js)").option("-p, --port <port>", "Specify the port", "3333").option("--experimental [boolean]", "Enable experimental features", false).action(async (entry, options) => {
|
|
94
|
-
const { devCommand } = await import("./commands-
|
|
94
|
+
const { devCommand } = await import("./commands-EYXPHROC.js");
|
|
95
95
|
const { experimental } = options;
|
|
96
96
|
if (experimental) globalThis.bundler.experimental = true;
|
|
97
97
|
await devCommand({ entry, ...options });
|
|
98
98
|
});
|
|
99
99
|
AzionBundler.command("presets <command>").description("List <ls> defined project presets for Azion").action(async (command) => {
|
|
100
|
-
const { presetsCommand } = await import("./commands-
|
|
100
|
+
const { presetsCommand } = await import("./commands-EYXPHROC.js");
|
|
101
101
|
await presetsCommand(command);
|
|
102
102
|
});
|
|
103
103
|
AzionBundler.command("manifest [action]").description("Manage manifest files for Azion. Available actions: transform, generate").argument(
|
|
@@ -113,7 +113,7 @@ Examples:
|
|
|
113
113
|
$ ef manifest --entry=azion.config.js --output=.edge
|
|
114
114
|
`
|
|
115
115
|
).action(async (action, options) => {
|
|
116
|
-
const { manifestCommand } = await import("./commands-
|
|
116
|
+
const { manifestCommand } = await import("./commands-EYXPHROC.js");
|
|
117
117
|
await manifestCommand({
|
|
118
118
|
...options,
|
|
119
119
|
action
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "edge-functions",
|
|
3
|
-
"version": "5.1.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "Tool to launch and build JavaScript/Frameworks. This tool automates polyfills for Edge Computing and assists in creating Workers, notably for the Azion platform.",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"module": "dist/main.ts",
|