@aziontech/bundler 1.0.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/dist/index.js ADDED
@@ -0,0 +1,143 @@
1
+ #! /usr/bin/env node
2
+ import { Command as f } from "commander";
3
+ import { satisfies as b } from "semver";
4
+ import { B as r, d as g, e as a } from "./utils-DkUMNTN3.js";
5
+ import { feedback as p } from "@aziontech/utils/node";
6
+ import { createHash as y } from "crypto";
7
+ import { mkdir as h } from "fs/promises";
8
+ const n = new f();
9
+ function x() {
10
+ const e = process.cwd();
11
+ return y("md5").update(e).digest("hex");
12
+ }
13
+ async function v() {
14
+ const e = x(), o = r.TEMP_DIR(e);
15
+ return await h(o, { recursive: !0 }), o;
16
+ }
17
+ function c() {
18
+ return b(process.version, `>= ${r.MIN_NODE_VERSION}`);
19
+ }
20
+ async function w() {
21
+ return {
22
+ root: r.ROOT_PATH,
23
+ package: r.PACKAGE_JSON,
24
+ debug: r.IS_DEBUG,
25
+ version: r.VERSION,
26
+ tempPath: await v(),
27
+ argsPath: r.ARGS_PATH,
28
+ experimental: r.EXPERIMENTAL
29
+ };
30
+ }
31
+ function E() {
32
+ process.on("exit", a), process.on("SIGINT", () => {
33
+ a(), process.exit(0);
34
+ }), process.on("SIGTERM", () => {
35
+ a(), process.exit(0);
36
+ }), process.on("SIGHUP", () => {
37
+ a(), process.exit(0);
38
+ }), process.on("SIGBREAK", () => {
39
+ a(), process.exit(0);
40
+ }), process.on("uncaughtException", (e) => {
41
+ console.error("Uncaught Exception:", e), a(), process.exit(1);
42
+ }), process.on("unhandledRejection", (e) => {
43
+ console.error("Unhandled Promise Rejection:", e), a(), process.exit(1);
44
+ });
45
+ }
46
+ function k() {
47
+ n.version(globalThis.bundler.version), n.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 (e, o) => {
48
+ const { storeCommand: t } = await import("./index-D5_BuqHI.js");
49
+ await t({
50
+ command: e,
51
+ options: o
52
+ });
53
+ }), n.command("build").description("Build your project for edge deployment").option("-e, --entry <entries...>", "Code entrypoint (default: ./main.js or ./main.ts)").option("-p, --preset <type>", "Preset of build target (e.g., vue, next, javascript)").option(
54
+ "--polyfills [boolean]",
55
+ "Use node polyfills in build. Use --polyfills or --polyfills=true to enable, --polyfills=false to disable"
56
+ ).option(
57
+ "-w, --worker [boolean]",
58
+ "Indicates that the constructed code inserts its own worker expression. Use --worker or --worker=true to enable, --worker=false to disable"
59
+ ).option("-d, --dev", "Build in development mode", !1).option("-x, --experimental [boolean]", "Enable experimental features", !1).option("--skip-framework-build", "Skip framework build step", !1).option("--only-generate-config", "Build only generate azion.config", !1).option(
60
+ "--telemetry [format]",
61
+ "Enable telemetry output (console, json, html or both). Defaults to both if flag is present without value."
62
+ ).addHelpText(
63
+ "after",
64
+ `
65
+ Examples:
66
+ $ azbundler build -e ./src/index.js -p javascript
67
+ $ azbundler build --only-generate-config -e index.js -p javascript
68
+ $ azbundler build --preset opennextjs
69
+ $ azbundler build --preset opennextjs --skip-framework-build
70
+ $ azbundler build --telemetry
71
+ $ azbundler build --telemetry json
72
+ `
73
+ ).action(async (e) => {
74
+ const { buildCommand: o, manifestCommand: t } = await import("./index-D5_BuqHI.js"), { dev: i, experimental: l, telemetry: s, ...d } = e;
75
+ if (l && (globalThis.bundler.experimental = !0), s !== void 0) {
76
+ const u = typeof s == "string" ? s : "both";
77
+ process.env.AZ_BUNDLER_TELEMETRY = "true", process.env.AZ_BUNDLER_TELEMETRY_FORMAT = u;
78
+ }
79
+ const { config: m } = await o({
80
+ ...d,
81
+ production: !i
82
+ });
83
+ await t({ action: "generate", config: m });
84
+ }), n.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", !1).option("--skip-framework-build", "Skip framework build step", !1).option("--function-name <name>", "Specify the function name").action(async (e, o) => {
85
+ const { devCommand: t } = await import("./index-D5_BuqHI.js"), { experimental: i } = o;
86
+ i && (globalThis.bundler.experimental = !0), await t({ entry: e, ...o });
87
+ }), n.command("presets <command>").description("Manage presets for Azion projects").argument("[preset]", "Preset name (required for config command)").action(async (e, o) => {
88
+ const { presetsCommand: t } = await import("./index-D5_BuqHI.js");
89
+ await t(e, { preset: o });
90
+ }), n.command("manifest [action]").description("Manage manifest files for Azion").argument(
91
+ "[action]",
92
+ 'Action to perform: "transform" (JSON to JS) or "generate" (config to manifest)'
93
+ ).option("-e, --entry <path>", "Path to the input file or configuration file").option("-o, --output <path>", "Output file/directory path").addHelpText(
94
+ "after",
95
+ `
96
+ Examples:
97
+ $ azbundler manifest transform -e manifest.json -o azion.config.js
98
+ $ azbundler manifest generate -e azion.config.js -o .edge
99
+ $ azbundler manifest -e azion.config.js -o .edge
100
+ `
101
+ ).action(async (e, o, t) => {
102
+ const { manifestCommand: i } = await import("./index-D5_BuqHI.js");
103
+ await i({
104
+ ...o || t,
105
+ action: e
106
+ });
107
+ }), n.command("config <command>").description("Manage azion.config settings").option("-k, --key <key...>", "Property key (e.g., build.preset or applications[0].name)").option("-v, --value <value...>", "Value to be set").option("-a, --all", "Read or delete entire configuration (for read/delete commands)").option("-r, --replacements <replacements>", "JSON string of key-value pairs for replacement").addHelpText(
108
+ "after",
109
+ `
110
+ Examples:
111
+ $ azbundler config create -k "build.preset" -v "typescript"
112
+ $ azbundler config read -a
113
+ $ azbundler config read -k "build.preset"
114
+ $ azbundler config update -k "build.preset" -v "vue"
115
+ $ azbundler config delete -a
116
+ $ azbundler config delete -k "build.preset"
117
+ $ azbundler config replace -k '$EDGE_FUNCTION_NAME' -v "my-func"
118
+ `
119
+ ).action(async (e, o) => {
120
+ const { configCommand: t } = await import("./index-D5_BuqHI.js");
121
+ await t({
122
+ command: e,
123
+ options: o
124
+ });
125
+ }), n.command("telemetry").description("Open the telemetry HTML report in the default browser").option("-p, --path <path>", "Custom path to the telemetry HTML file").addHelpText(
126
+ "after",
127
+ `
128
+ Examples:
129
+ $ azbundler telemetry
130
+ $ azbundler telemetry --path ./custom-report.html
131
+ `
132
+ ).action(async (e) => {
133
+ const { telemetryCommand: o } = await import("./index-D5_BuqHI.js");
134
+ await o(e);
135
+ }), n.parse(process.argv);
136
+ }
137
+ try {
138
+ c() && (globalThis.bundler = await w(), k(), E()), c() || (p.error(
139
+ `Invalid Node version. Node version must be greater than ${r.MIN_NODE_VERSION}.`
140
+ ), process.exit(1));
141
+ } catch (e) {
142
+ p.error("An unknown error occurred."), g.error(e), process.exit(1);
143
+ }
@@ -0,0 +1,329 @@
1
+ import w, { readFileSync as $, unlinkSync as L, constants as C } from "fs";
2
+ import a, { join as u, resolve as z } from "path";
3
+ import T, { access as I, readFile as x, writeFile as k } from "fs/promises";
4
+ import { getAbsoluteDirPath as M, feedback as g } from "@aziontech/utils/node";
5
+ import { tmpdir as B } from "os";
6
+ import "@aziontech/builder/polyfills";
7
+ import "@edge-runtime/primitives/dist/load.js";
8
+ import "chokidar";
9
+ import "@aziontech/bundler-telemetry";
10
+ import { convertJsonConfigToObject as j } from "@aziontech/config";
11
+ import "@aziontech/builder";
12
+ import "lodash";
13
+ import "@aziontech/presets";
14
+ import "@netlify/framework-info";
15
+ import "edge-runtime";
16
+ import H from "prettier";
17
+ import { cosmiconfig as V } from "cosmiconfig";
18
+ import { TypeScriptLoader as y } from "cosmiconfig-typescript-loader";
19
+ const J = {
20
+ OUTPUT_BASE_PATH: ".edge",
21
+ OUTPUT_FUNCTIONS_PATH: u(".edge", "functions"),
22
+ OUTPUT_STORAGE_PATH: u(".edge", "storage"),
23
+ OUTPUT_MANIFEST_PATH: u(".edge", "manifest.json"),
24
+ OUTPUT_ENV_VARS_PATH: u(".edge", ".env"),
25
+ OUTPUT_STORAGE_METADATA_PATH: u(".edge", "storage", "metadata.json"),
26
+ OUTPUT_KV_PATH: u(".edge", "kv")
27
+ }, ge = {
28
+ POLYFILLS: !0,
29
+ WORKER: !1,
30
+ PRODUCTION: !0,
31
+ EXTENSION: "js",
32
+ PRESET: void 0,
33
+ ENTRY: void 0,
34
+ BUNDLER: void 0
35
+ }, me = {
36
+ DEFAULT: "esbuild"
37
+ }, S = {
38
+ NAMESPACE: "bundler",
39
+ EXPERIMENTAL: !1,
40
+ MIN_NODE_VERSION: "18.0.0",
41
+ CONFIG_FILENAME: "azion.config",
42
+ DEFAULT_HANDLER_FILENAME: "handler",
43
+ DEFAULT_DEV_WORKER_FILENAME: "handler.dev",
44
+ DEFAULT_OUTPUT_EXTENSION: "js",
45
+ LIB_DIR: M(import.meta.url, "bundler"),
46
+ ARGS_PATH: "@aziontech/args.json",
47
+ IS_DEBUG: process.env.DEBUG === "true",
48
+ TEMP_DIR: (n) => u(B(), ".azion", n),
49
+ get ROOT_PATH() {
50
+ return z(S.LIB_DIR, ".");
51
+ },
52
+ get PACKAGE_JSON() {
53
+ return JSON.parse($(`${S.ROOT_PATH}/package.json`, "utf8"));
54
+ },
55
+ get VERSION() {
56
+ return S.PACKAGE_JSON.version;
57
+ }
58
+ }, m = `
59
+
60
+ 📚 Need help? Check out our documentation:
61
+ - Azion CLI Documentation: https://www.azion.com/en/documentation/devtools/cli/build/
62
+ - Azion Library on Github: https://github.com/aziontech/lib/tree/main/packages/config/
63
+ - Azion Bundler on GitHub: https://github.com/aziontech/bundler
64
+ `, Ee = {
65
+ ENV_ENABLED: "AZ_BUNDLER_TELEMETRY",
66
+ ENV_FORMAT: "AZ_BUNDLER_TELEMETRY_FORMAT",
67
+ ENV_OUTPUT: "AZ_BUNDLER_TELEMETRY_OUTPUT",
68
+ DEFAULT_FORMAT: "both",
69
+ DEFAULT_OUTPUT_PATH: ".edge/telemetry-report.json",
70
+ DEFAULT_HTML_OUTPUT_PATH: ".edge/telemetry-report.html"
71
+ };
72
+ async function O(n, t = "global") {
73
+ let e;
74
+ switch (t) {
75
+ case "global":
76
+ e = globalThis.bundler.tempPath;
77
+ break;
78
+ case "local":
79
+ e = a.join(process.cwd());
80
+ break;
81
+ default:
82
+ e = t;
83
+ break;
84
+ }
85
+ const i = a.join(e, ".azion-bundler.json");
86
+ try {
87
+ await T.mkdir(e, { recursive: !0 });
88
+ } catch (s) {
89
+ throw c.error(s), g.build.error(
90
+ `An error occurred while creating the ${i} folder.${m}`
91
+ ), s;
92
+ }
93
+ try {
94
+ await T.writeFile(i, JSON.stringify(n, null, 2));
95
+ } catch (s) {
96
+ throw c.error(s), g.build.error(
97
+ `An error occurred while writing the ${i} file.${m}`
98
+ ), s;
99
+ }
100
+ }
101
+ async function U(n = "global") {
102
+ let t;
103
+ switch (n) {
104
+ case "global":
105
+ t = globalThis.bundler.tempPath;
106
+ break;
107
+ case "local":
108
+ t = a.join(process.cwd());
109
+ break;
110
+ default:
111
+ t = n;
112
+ break;
113
+ }
114
+ if (!t) return {};
115
+ const e = a.join(t, ".azion-bundler.json");
116
+ try {
117
+ await T.access(e);
118
+ const i = await T.readFile(e, "utf8");
119
+ return JSON.parse(i);
120
+ } catch {
121
+ return {};
122
+ }
123
+ }
124
+ function G(n, t) {
125
+ if (n.message.includes("ERR_MODULE_NOT_FOUND")) {
126
+ const e = n.message.match(/'([^']+)'/)?.[1];
127
+ e ? g.build.error(
128
+ `Missing dependency: ${e}. Please install it using 'npm install ${e}' or 'yarn add ${e}'.${m}`
129
+ ) : g.build.error(
130
+ `A required dependency is missing. Please ensure all dependencies are installed.${m}`
131
+ ), c.error(`Failed to load configuration from ${t}. ${n.message}`);
132
+ } else
133
+ throw n;
134
+ }
135
+ async function Y(n) {
136
+ const t = V("azion", {
137
+ searchPlaces: [
138
+ "azion.config.ts",
139
+ "azion.config.mts",
140
+ "azion.config.cts",
141
+ "azion.config.js",
142
+ "azion.config.mjs",
143
+ "azion.config.cjs",
144
+ "azion.config.json"
145
+ ],
146
+ loaders: {
147
+ ".ts": y(),
148
+ ".mts": y(),
149
+ ".cts": y()
150
+ }
151
+ });
152
+ try {
153
+ const e = n ? await t.load(n) : await t.search();
154
+ if (!e) return null;
155
+ const i = e.config, s = e.filepath;
156
+ return a.extname(s) === ".json" ? j(JSON.stringify(i)) : i;
157
+ } catch (e) {
158
+ if (e.message.includes("ERR_MODULE_NOT_FOUND"))
159
+ return G(e, n || "azion.config"), null;
160
+ if (e.message.includes("TypeScriptLoader failed to compile")) {
161
+ const i = e.message.split(`TypeScriptLoader failed to compile TypeScript:
162
+ `)[1]?.trim();
163
+ g.build.error(`${i || e.message}${m}`), process.exit(1);
164
+ }
165
+ e.message.includes("ERR_REQUIRE_CYCLE_MODULE") && (g.build.error(
166
+ `Circular dependency detected while loading configuration file. This usually happens when using ES modules. Please ensure your configuration file doesn't have circular imports.${m}`
167
+ ), process.exit(1)), c.error(e), g.build.error(
168
+ `Failed to load configuration file. For detailed debugging information, run with DEBUG=true environment variable.${m}`
169
+ ), process.exit(1);
170
+ }
171
+ }
172
+ function K() {
173
+ const n = a.join(process.cwd(), "package.json");
174
+ return w.existsSync(n) ? JSON.parse(w.readFileSync(n, "utf8")).type !== "module" : !0;
175
+ }
176
+ async function Z(n, t) {
177
+ const i = K() ? ".cjs" : ".mjs", s = n.build?.preset === "typescript";
178
+ let f = s ? ".ts" : i, p;
179
+ if (t) {
180
+ const o = a.parse(t);
181
+ if ([".js", ".mjs", ".cjs", ".ts"].includes(o.ext))
182
+ p = a.resolve(t), f = o.ext;
183
+ else {
184
+ const r = a.resolve(t);
185
+ try {
186
+ (await T.stat(r)).isFile() ? p = `${r}${f}` : p = a.join(r, `azion.config${f}`);
187
+ } catch {
188
+ t.includes("/") || t.includes("\\") ? p = a.join(r, `azion.config${f}`) : p = `${r}${f}`;
189
+ }
190
+ }
191
+ } else
192
+ p = a.join(process.cwd(), `azion.config${f}`);
193
+ const F = s ? "export default" : f === ".cjs" ? "module.exports =" : "export default", N = `/**
194
+ * This file was automatically generated based on your preset configuration.
195
+ *
196
+ * For better type checking and IntelliSense:
197
+ * 1. Install azion config as dev dependency:
198
+ * npm install -D @aziontech/config
199
+ *
200
+ * 2. Use defineConfig:
201
+ * import { defineConfig } from '@aziontech/config'
202
+ *
203
+ * 3. Replace the configuration with defineConfig:
204
+ * export default defineConfig({
205
+ * // Your configuration here
206
+ * })
207
+ *
208
+ * For more configuration options, visit:
209
+ * https://github.com/aziontech/lib/tree/main/packages/config
210
+ */
211
+
212
+ `;
213
+ function h(o) {
214
+ if (o == null)
215
+ return o;
216
+ if (Array.isArray(o))
217
+ return o.map(h).filter((l) => l !== void 0);
218
+ if (typeof o == "object") {
219
+ const l = {};
220
+ for (const [d, r] of Object.entries(o))
221
+ if (r !== void 0) {
222
+ const E = h(r);
223
+ E !== void 0 && (l[d] = E);
224
+ }
225
+ return l;
226
+ }
227
+ return o;
228
+ }
229
+ function A(o, l = 0) {
230
+ const d = " ".repeat(l);
231
+ if (typeof o == "function")
232
+ return o.toString();
233
+ if (typeof o == "string")
234
+ return `'${o.replaceAll("'", "\\'")}'`;
235
+ if (typeof o == "number" || typeof o == "boolean" || o == null)
236
+ return String(o);
237
+ if (Array.isArray(o)) {
238
+ if (o.length === 0) return "[]";
239
+ const r = o.map((E) => A(E, l + 1));
240
+ return `[
241
+ ${d} ${r.join(`,
242
+ ${d} `)}
243
+ ${d}]`;
244
+ }
245
+ if (typeof o == "object") {
246
+ const r = Object.entries(o).filter(([, _]) => _ !== void 0);
247
+ return r.length === 0 ? "{}" : `{
248
+ ${r.map(([_, P]) => {
249
+ const D = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(_) ? _ : `'${_}'`;
250
+ return `${d} ${D}: ${A(P, l + 1)}`;
251
+ }).join(`,
252
+ `)}
253
+ ${d}}`;
254
+ }
255
+ return String(o);
256
+ }
257
+ const R = h(n), b = A(R), v = await H.format(
258
+ N + `${F} ${b};`,
259
+ {
260
+ parser: "babel",
261
+ semi: !1,
262
+ singleQuote: !0,
263
+ trailingComma: "none"
264
+ }
265
+ );
266
+ await T.writeFile(p, v);
267
+ }
268
+ const Te = {
269
+ writeStore: O,
270
+ readStore: U,
271
+ readAzionConfig: Y,
272
+ writeUserConfig: Z
273
+ };
274
+ async function _e(n) {
275
+ try {
276
+ const t = await U("global"), e = t.tempFiles || [];
277
+ e.includes(n) || (e.push(n), await O({ ...t, tempFiles: e }, "global"));
278
+ } catch {
279
+ c.warn("Failed to register temp file:", n);
280
+ }
281
+ }
282
+ async function he() {
283
+ try {
284
+ const n = await U("global"), t = n.tempFiles || [], e = [];
285
+ t.forEach((i) => {
286
+ try {
287
+ L(i), c.info("Successfully removed temp file:", i);
288
+ } catch {
289
+ c.warn("Failed to remove temp file:", i), e.push(i);
290
+ }
291
+ }), await O({ ...n, tempFiles: e }, "global"), e.length > 0 && c.warn(`${e.length} temp files could not be removed and will be retried later`);
292
+ } catch (n) {
293
+ c.warn("Failed to clean temp files from store:", n);
294
+ }
295
+ }
296
+ const c = {};
297
+ Object.keys(console).forEach((n) => {
298
+ typeof console[n] == "function" && (c[n] = (...t) => {
299
+ process.env.DEBUG === "true" && console[n](...t);
300
+ });
301
+ });
302
+ async function Ae() {
303
+ const n = process.cwd(), t = u(n, ".env"), e = J.OUTPUT_ENV_VARS_PATH;
304
+ try {
305
+ if (await I(t, C.F_OK).then(() => !0).catch(() => !1)) {
306
+ const s = await x(t, "utf-8");
307
+ await k(e, s, "utf-8"), c.info(`Environment file copied to ${e}`);
308
+ }
309
+ } catch {
310
+ c.warn("No .env file found or error copying environment file");
311
+ }
312
+ }
313
+ export {
314
+ S as B,
315
+ J as D,
316
+ me as S,
317
+ Ee as T,
318
+ ge as a,
319
+ m as b,
320
+ Ae as c,
321
+ c as d,
322
+ he as e,
323
+ O as f,
324
+ U as g,
325
+ Te as h,
326
+ _e as m,
327
+ Y as r,
328
+ Z as w
329
+ };
package/package.json ADDED
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "@aziontech/bundler",
3
+ "version": "1.0.0",
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
+ "index": "dist/index.js",
6
+ "module": "dist/index.js",
7
+ "type": "module",
8
+ "bin": {
9
+ "azbundler": "dist/index.js",
10
+ "azion-bundler": "dist/index.js",
11
+ "azb": "dist/index.js"
12
+ },
13
+ "author": "aziontech",
14
+ "license": "MIT",
15
+ "dependencies": {
16
+ "@aziontech/builder": "1.0.1",
17
+ "@aziontech/bundler-telemetry": "1.0.0",
18
+ "@aziontech/config": "1.0.0",
19
+ "@aziontech/utils": "1.0.0",
20
+ "@aziontech/presets": "1.0.0",
21
+ "@edge-runtime/primitives": "4.0.5",
22
+ "@netlify/framework-info": "^9.9.1",
23
+ "chokidar": "^3.5.3",
24
+ "commander": "^10.0.1",
25
+ "cosmiconfig": "^9.0.0",
26
+ "cosmiconfig-typescript-loader": "^6.1.0",
27
+ "edge-runtime": "^2.4.5",
28
+ "lodash": "^4.17.21",
29
+ "prettier": "^3.3.2",
30
+ "semver": "^7.5.2",
31
+ "typescript": "^5.5.3"
32
+ },
33
+ "devDependencies": {
34
+ "@jest/globals": "^29.7.0",
35
+ "@swc/core": "^1.3.96",
36
+ "@swc/jest": "^0.2.29",
37
+ "@types/inquirer": "^9.0.7",
38
+ "@types/jest": "^29.5.14",
39
+ "@types/lodash": "^4.17.16",
40
+ "@types/mock-fs": "^4.13.4",
41
+ "@types/semver": "^7.5.8",
42
+ "@types/tmp": "^0.2.6",
43
+ "conventional-changelog-conventionalcommits": "^4.6.0",
44
+ "globals": "^16.0.0",
45
+ "jest": "^29.7.0",
46
+ "jest-puppeteer": "^9.0.1",
47
+ "markdown-table": "^3.0.3",
48
+ "mock-fs": "^5.2.0",
49
+ "puppeteer": "^24.15.0",
50
+ "supertest": "^6.3.3",
51
+ "tmp": "^0.2.1",
52
+ "ts-jest": "^29.2.6",
53
+ "ts-node": "^10.9.2",
54
+ "vite": "^7.3.1"
55
+ },
56
+ "repository": {
57
+ "type": "git",
58
+ "url": "git+https://github.com/aziontech/bundler.git",
59
+ "directory": "packages/bundler"
60
+ },
61
+ "bugs": {
62
+ "url": "https://github.com/aziontech/bundler/issues"
63
+ },
64
+ "homepage": "https://github.com/aziontech/bundler#readme",
65
+ "files": [
66
+ "dist",
67
+ "package.json",
68
+ "README.md"
69
+ ],
70
+ "scripts": {
71
+ "build": "vite build",
72
+ "task:reports": "node tasks/process-reports-e2e.js",
73
+ "task:reports-nodejs-apis": "node tasks/process-reports-nodejs-apis.js",
74
+ "lint": "eslint .",
75
+ "lint:fix": "eslint --fix .",
76
+ "format": "prettier --write .",
77
+ "test": "jest --clearCache && NODE_OPTIONS='--experimental-vm-modules' jest --maxWorkers 1 -c jest.config.ts",
78
+ "test:watch": "jest lib/ --watch",
79
+ "test:coverage": "jest --clearCache && jest lib/ --coverage",
80
+ "format:check": "prettier . --check",
81
+ "e2e:start": "pnpm submodule:update && tests/scripts/start-e2e-env.sh",
82
+ "e2e:stop": "tests/scripts/stop-e2e-env.sh",
83
+ "e2e:destroy": "tests/scripts/destroy-e2e-env.sh",
84
+ "test:e2e": "pnpm e2e:start && NODE_OPTIONS='--experimental-vm-modules' jest --detectOpenHandles --runInBand --config=./jest-e2e.config.js tests/e2e/ --json --outputFile e2e_results.json && pnpm e2e:stop; pnpm task:reports",
85
+ "test:nodejs-apis": "pnpm e2e:start && NODE_OPTIONS='--experimental-vm-modules' jest --runInBand --config=./jest-e2e.config.js tests/nodejs-apis/ --json --outputFile nodejs_apis_results.json && pnpm e2e:stop && pnpm task:reports-nodejs-apis",
86
+ "submodule:update": "git submodule update --init --recursive && git submodule foreach git pull origin main"
87
+ }
88
+ }