edge-functions 4.7.0 → 4.8.0-stage.2

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,17 @@
1
+ ## [4.8.0-stage.2](https://github.com/aziontech/bundler/compare/v4.8.0-stage.1...v4.8.0-stage.2) (2025-03-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * enhance Dispatcher to support dynamic entry path configuration ([#445](https://github.com/aziontech/bundler/issues/445)) ([79e8ef5](https://github.com/aziontech/bundler/commit/79e8ef50dc664e6b15b6e90fb828677c5fb06853))
7
+
8
+ ## [4.8.0-stage.1](https://github.com/aziontech/bundler/compare/v4.7.0...v4.8.0-stage.1) (2025-02-10)
9
+
10
+
11
+ ### Features
12
+
13
+ * new preset for preact ssg ([#435](https://github.com/aziontech/bundler/issues/435)) ([daf8d48](https://github.com/aziontech/bundler/commit/daf8d48ba4598635a117c75f96b36dd6955a8146))
14
+
1
15
  ## [4.7.0](https://github.com/aziontech/bundler/compare/v4.6.1...v4.7.0) (2025-02-10)
2
16
 
3
17
 
@@ -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.7.0",
4
+ "version": "4.8.0-stage.2",
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": {