edge-functions 4.8.0-stage.1 → 4.8.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/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ ## [4.8.0](https://github.com/aziontech/bundler/compare/v4.7.0...v4.8.0) (2025-03-13)
2
+
3
+
4
+ ### Features
5
+
6
+ * new preset for preact ssg ([#435](https://github.com/aziontech/bundler/issues/435)) ([daf8d48](https://github.com/aziontech/bundler/commit/daf8d48ba4598635a117c75f96b36dd6955a8146))
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * enhance Dispatcher to support dynamic entry path configuration ([#445](https://github.com/aziontech/bundler/issues/445)) ([79e8ef5](https://github.com/aziontech/bundler/commit/79e8ef50dc664e6b15b6e90fb828677c5fb06853))
12
+
13
+ ## [4.8.0-stage.2](https://github.com/aziontech/bundler/compare/v4.8.0-stage.1...v4.8.0-stage.2) (2025-03-12)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * enhance Dispatcher to support dynamic entry path configuration ([#445](https://github.com/aziontech/bundler/issues/445)) ([79e8ef5](https://github.com/aziontech/bundler/commit/79e8ef50dc664e6b15b6e90fb828677c5fb06853))
19
+
1
20
  ## [4.8.0-stage.1](https://github.com/aziontech/bundler/compare/v4.7.0...v4.8.0-stage.1) (2025-02-10)
2
21
 
3
22
 
@@ -51,7 +51,7 @@ Table:
51
51
  | Fs | ✅ |
52
52
  | Async Hooks | ✅ |
53
53
 
54
- Last test run date: 02/10/25 03:57:00 AM
54
+ Last test run date: 03/13/25 04:00:38 AM
55
55
  #### Docs support
56
56
 
57
57
  See support for the Node.js APIs in the [https://www.azion.com/en/documentation/products/azion-edge-runtime/compatibility/node/](https://www.azion.com/en/documentation/products/azion-edge-runtime/compatibility/node/)
@@ -1,4 +1,4 @@
1
- import { join } from 'path';
1
+ import { dirname, join } from 'path';
2
2
  import lodash from 'lodash';
3
3
  import { readFileSync, existsSync, writeFileSync, rmSync } from 'fs';
4
4
  import { Esbuild, Webpack } from '#bundlers';
@@ -283,7 +283,8 @@ class Dispatcher {
283
283
  * @returns {BuilderConfig} - Returns the configured build object.
284
284
  */
285
285
  static configureBuild(currentConfig, config) {
286
- const { polyfills, worker, preset, localCustom, memoryFS } = currentConfig;
286
+ const { polyfills, worker, preset, localCustom, memoryFS, entry } =
287
+ currentConfig;
287
288
  const buildConfig = { ...config };
288
289
 
289
290
  // include config preset to priority
@@ -298,12 +299,16 @@ class Dispatcher {
298
299
  buildConfig.preset = preset;
299
300
  buildConfig.memoryFS = memoryFS || buildConfig?.memoryFS;
300
301
 
302
+ const folderPath = dirname(entry);
303
+ const folderInsert = folderPath !== '.' ? folderPath : '';
304
+
301
305
  const currentDir = process.cwd();
302
306
  let tempEntryFile = `azion-${generateTimestamp()}.temp.`;
303
307
  tempEntryFile += preset.name === 'typescript' ? 'ts' : 'js';
304
- const tempBuilderEntryPath = join(currentDir, tempEntryFile);
308
+ const tempBuilderEntryPath = join(currentDir, folderInsert, tempEntryFile);
305
309
 
306
310
  buildConfig.entry = tempBuilderEntryPath;
311
+
307
312
  buildConfig.output = globalThis.vulcan?.buildProd
308
313
  ? '.edge/worker.js'
309
314
  : '.edge/worker.dev.js';
@@ -473,6 +478,7 @@ class Dispatcher {
473
478
  polyfills: this.polyfills,
474
479
  worker: this.worker,
475
480
  memoryFS: this.memoryFS,
481
+ entry: this.entry,
476
482
  },
477
483
  config,
478
484
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "edge-functions",
3
3
  "type": "module",
4
- "version": "4.8.0-stage.1",
4
+ "version": "4.8.0",
5
5
  "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.",
6
6
  "main": "lib/main.js",
7
7
  "bin": {