edge-functions 7.0.0 → 7.1.0-stage.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.
@@ -10,7 +10,8 @@ import {
10
10
  FirewallEventContext,
11
11
  streamContext,
12
12
  cryptoContext,
13
- promisesContext
13
+ promisesContext,
14
+ KVContext
14
15
  } from "azion/bundler/polyfills";
15
16
 
16
17
  // lib/env/edge-vm/edge-vm.ts
@@ -376,15 +377,10 @@ function runtime(code, isFirewallEvent = false) {
376
377
  context.DecompressionStream = DecompressionStream;
377
378
  context.Promise = Promise;
378
379
  context.Promise.withResolvers = promisesContext;
380
+ context.KV_CONTEXT = KVContext;
379
381
  return context;
380
382
  };
381
- const edgeRuntime = new EdgeVM({
382
- extend,
383
- initialCode: code,
384
- codeGeneration: {
385
- strings: true
386
- }
387
- });
383
+ const edgeRuntime = new EdgeVM({ extend, initialCode: code, codeGeneration: { strings: true } });
388
384
  return edgeRuntime;
389
385
  }
390
386
  var runtime_default = runtime;
@@ -7,7 +7,7 @@ import {
7
7
  readAzionConfig,
8
8
  writeStore,
9
9
  writeUserConfig
10
- } from "./chunk-5DDTHW4S.js";
10
+ } from "./chunk-ETKZKHW2.js";
11
11
 
12
12
  // lib/commands/dev/command.ts
13
13
  async function devCommand({
@@ -17,7 +17,7 @@ async function devCommand({
17
17
  functionName
18
18
  }) {
19
19
  const parsedPort = parseInt(port, 10);
20
- const { server } = await import("./env-7SGSBNKG.js");
20
+ const { server } = await import("./env-2YZC5567.js");
21
21
  const entryPoint = entry || null;
22
22
  server(entryPoint, parsedPort, skipFrameworkBuild, functionName);
23
23
  }
@@ -6,7 +6,7 @@ import {
6
6
  server_default,
7
7
  writeStore,
8
8
  writeUserConfig
9
- } from "./chunk-5DDTHW4S.js";
9
+ } from "./chunk-ETKZKHW2.js";
10
10
  export {
11
11
  env_default as default,
12
12
  readAzionConfig,
package/dist/main.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  BUNDLER,
4
4
  debug,
5
5
  executeCleanup
6
- } from "./chunk-5DDTHW4S.js";
6
+ } from "./chunk-ETKZKHW2.js";
7
7
 
8
8
  // lib/main.ts
9
9
  import { Command } from "commander";
@@ -70,7 +70,7 @@ function setupBundlerProcessHandlers() {
70
70
  function startBundler() {
71
71
  AzionBundler.version(globalThis.bundler.version);
72
72
  AzionBundler.command("store <command>").description("Manage store configuration").option("-c, --config <json>", `Configuration in JSON format (e.g., '{"key": "value"}')`).option("-s, --scope <scope>", "Scope of the store (default: global)").action(async (command, options) => {
73
- const { storeCommand } = await import("./commands-DKURPWMO.js");
73
+ const { storeCommand } = await import("./commands-6BHLE6PN.js");
74
74
  await storeCommand({
75
75
  command,
76
76
  options
@@ -92,7 +92,7 @@ Examples:
92
92
  $ ef build --preset opennextjs --skip-framework-build
93
93
  `
94
94
  ).action(async (options) => {
95
- const { buildCommand, manifestCommand } = await import("./commands-DKURPWMO.js");
95
+ const { buildCommand, manifestCommand } = await import("./commands-6BHLE6PN.js");
96
96
  const { dev, experimental, ...buildOptions } = options;
97
97
  if (experimental) globalThis.bundler.experimental = true;
98
98
  const { config } = await buildCommand({
@@ -102,13 +102,13 @@ Examples:
102
102
  await manifestCommand({ action: "generate", config });
103
103
  });
104
104
  AzionBundler.command("dev").description("Start local development environment").argument("[entry]", "Specify the entry file (default: .edge/worker.dev.js)").option("-p, --port <port>", "Specify the port", "3333").option("-x, --experimental [boolean]", "Enable experimental features", false).option("--skip-framework-build", "Skip framework build step", false).option("--function-name <name>", "Specify the function name").action(async (entry, options) => {
105
- const { devCommand } = await import("./commands-DKURPWMO.js");
105
+ const { devCommand } = await import("./commands-6BHLE6PN.js");
106
106
  const { experimental } = options;
107
107
  if (experimental) globalThis.bundler.experimental = true;
108
108
  await devCommand({ entry, ...options });
109
109
  });
110
110
  AzionBundler.command("presets <command>").description("Manage presets for Azion projects").argument("[preset]", "Preset name (required for config command)").action(async (command, preset) => {
111
- const { presetsCommand } = await import("./commands-DKURPWMO.js");
111
+ const { presetsCommand } = await import("./commands-6BHLE6PN.js");
112
112
  await presetsCommand(command, { preset });
113
113
  });
114
114
  AzionBundler.command("manifest [action]").description("Manage manifest files for Azion").argument(
@@ -123,7 +123,7 @@ Examples:
123
123
  $ ef manifest -e azion.config.js -o .edge
124
124
  `
125
125
  ).action(async (action, options, command) => {
126
- const { manifestCommand } = await import("./commands-DKURPWMO.js");
126
+ const { manifestCommand } = await import("./commands-6BHLE6PN.js");
127
127
  const actualOptions = options || command;
128
128
  await manifestCommand({
129
129
  ...actualOptions,
@@ -143,7 +143,7 @@ Examples:
143
143
  $ ef config replace -k '$EDGE_FUNCTION_NAME' -v "my-func"
144
144
  `
145
145
  ).action(async (command, options) => {
146
- const { configCommand } = await import("./commands-DKURPWMO.js");
146
+ const { configCommand } = await import("./commands-6BHLE6PN.js");
147
147
  await configCommand({
148
148
  command,
149
149
  options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edge-functions",
3
- "version": "7.0.0",
3
+ "version": "7.1.0-stage.1",
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",
@@ -44,7 +44,7 @@
44
44
  "dependencies": {
45
45
  "@edge-runtime/primitives": "4.0.5",
46
46
  "@netlify/framework-info": "^9.9.1",
47
- "azion": "~3.0.0",
47
+ "azion": "~3.1.0-stage.1",
48
48
  "chokidar": "^3.5.3",
49
49
  "commander": "^10.0.1",
50
50
  "cosmiconfig": "^9.0.0",