edge-functions 5.0.0 → 5.0.1-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.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  <img src="assets/logo.png" alt="Azion Bundler Logo" width="200"/>
3
3
  </p>
4
4
 
5
- # Azion Bundler - The Edge Developer's Toolkit
5
+ # Azion Bundler - Built for Builders of the Edge
6
6
 
7
7
  [![Version](https://img.shields.io/npm/v/edge-functions.svg)](https://www.npmjs.com/package/edge-functions)
8
8
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md)
@@ -14,7 +14,7 @@ Azion Bundler is a powerful tool designed to build and adapt projects for edge c
14
14
 
15
15
  ## Table of Contents
16
16
 
17
- - [Azion Bundler - The Edge Developer's Toolkit](#azion-bundler---the-edge-developers-toolkit)
17
+ - [Azion Bundler - Built for Builders of the Edge](#azion-bundler---built-for-builders-of-the-edge)
18
18
  - [Table of Contents](#table-of-contents)
19
19
  - [Quick Installation](#quick-installation)
20
20
  - [Getting Started for Development](#getting-started-for-development)
@@ -32,12 +32,22 @@ function getBeautify() {
32
32
  );
33
33
  return presets;
34
34
  }
35
+ function getKeys() {
36
+ const validPresets = Object.keys(azionPresets);
37
+ return validPresets;
38
+ }
35
39
 
36
40
  // lib/commands/presets/command.ts
37
41
  async function presetsCommand(command) {
42
+ const isCleanOutputEnabled = process.env.CLEAN_OUTPUT_MODE === "true";
38
43
  switch (command) {
39
44
  case "ls":
40
- getBeautify().forEach((preset) => feedback.option(preset));
45
+ if (isCleanOutputEnabled) {
46
+ getKeys().forEach((preset) => console.log(preset));
47
+ }
48
+ if (!isCleanOutputEnabled) {
49
+ getBeautify().forEach((preset) => feedback.option(preset));
50
+ }
41
51
  break;
42
52
  default:
43
53
  feedback.error("Invalid argument provided.");
package/dist/main.js CHANGED
@@ -90,7 +90,7 @@ function setupBundlerProcessHandlers() {
90
90
  function startBundler() {
91
91
  AzionBundler.version(BUNDLER_CURRENT_VERSION);
92
92
  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) => {
93
- const { storeCommand } = await import("./commands-TBH7MDI3.js");
93
+ const { storeCommand } = await import("./commands-EYZZKZ57.js");
94
94
  await storeCommand({ command, options });
95
95
  });
96
96
  AzionBundler.command("build").description("Build a project for edge deployment").option(
@@ -106,7 +106,7 @@ function startBundler() {
106
106
  "--worker [boolean]",
107
107
  "Indicates that the constructed code inserts its own worker expression. Use --worker or --worker=true to enable, --worker=false to disable"
108
108
  ).option("--development", "Build in development mode", false).action(async (options) => {
109
- const { buildCommand, manifestCommand } = await import("./commands-TBH7MDI3.js");
109
+ const { buildCommand, manifestCommand } = await import("./commands-EYZZKZ57.js");
110
110
  const { config } = await buildCommand({
111
111
  ...options,
112
112
  production: !options.development
@@ -117,11 +117,11 @@ function startBundler() {
117
117
  "[entry]",
118
118
  "Specify the entry file (default: .edge/worker.dev.js)"
119
119
  ).option("-p, --port <port>", "Specify the port", "3333").action(async (entry, options) => {
120
- const { devCommand } = await import("./commands-TBH7MDI3.js");
120
+ const { devCommand } = await import("./commands-EYZZKZ57.js");
121
121
  await devCommand({ entry, ...options });
122
122
  });
123
123
  AzionBundler.command("presets <command>").description("List <ls> defined project presets for Azion").action(async (command) => {
124
- const { presetsCommand } = await import("./commands-TBH7MDI3.js");
124
+ const { presetsCommand } = await import("./commands-EYZZKZ57.js");
125
125
  await presetsCommand(command);
126
126
  });
127
127
  AzionBundler.command("manifest [action]").description(
@@ -139,7 +139,7 @@ Examples:
139
139
  $ az manifest --entry=azion.config.js --output=.edge
140
140
  `
141
141
  ).action(async (action, options) => {
142
- const { manifestCommand } = await import("./commands-TBH7MDI3.js");
142
+ const { manifestCommand } = await import("./commands-EYZZKZ57.js");
143
143
  await manifestCommand({
144
144
  ...options,
145
145
  action
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edge-functions",
3
- "version": "5.0.0",
3
+ "version": "5.0.1-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",