edge-functions 2.6.2-stage.3 → 2.6.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,20 @@
|
|
|
1
|
+
### [2.6.2](https://github.com/aziontech/vulcan/compare/v2.6.1...v2.6.2) (2024-04-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* copy assets in html preset ([#310](https://github.com/aziontech/vulcan/issues/310)) ([3639fc2](https://github.com/aziontech/vulcan/commit/3639fc2616ada17f809c07d1418565a236ffe40e))
|
|
7
|
+
* emscripten (preset) init ([7962888](https://github.com/aziontech/vulcan/commit/7962888f1a329989b18be3dd603c18acc97da9ae))
|
|
8
|
+
* emscripten <init> reference ([9aa71e8](https://github.com/aziontech/vulcan/commit/9aa71e8bf46b188a2cccba086cb9ac8b0c759e08))
|
|
9
|
+
* rustwasm (preset) init ([2c2a4fd](https://github.com/aziontech/vulcan/commit/2c2a4fd7d86a474ef72d4e5f3e7360dddaaa8cdb))
|
|
10
|
+
|
|
11
|
+
### [2.6.2-stage.4](https://github.com/aziontech/vulcan/compare/v2.6.2-stage.3...v2.6.2-stage.4) (2024-04-22)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* copy assets in html preset ([#310](https://github.com/aziontech/vulcan/issues/310)) ([3639fc2](https://github.com/aziontech/vulcan/commit/3639fc2616ada17f809c07d1418565a236ffe40e))
|
|
17
|
+
|
|
1
18
|
### [2.6.2-stage.3](https://github.com/aziontech/vulcan/compare/v2.6.2-stage.2...v2.6.2-stage.3) (2024-04-19)
|
|
2
19
|
|
|
3
20
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { generateManifest } from '#utils';
|
|
1
|
+
import { generateManifest, copyDirectory } from '#utils';
|
|
2
|
+
import { join } from 'path';
|
|
2
3
|
|
|
3
4
|
const manifest = {
|
|
4
5
|
origin: [
|
|
@@ -27,6 +28,11 @@ const manifest = {
|
|
|
27
28
|
*/
|
|
28
29
|
// eslint-disable-next-line
|
|
29
30
|
async function prebuild(buildContext) {
|
|
31
|
+
const sourceDir = process.cwd();
|
|
32
|
+
const targetDir = join('.', '.edge', 'storage');
|
|
33
|
+
|
|
34
|
+
copyDirectory(sourceDir, targetDir, true);
|
|
35
|
+
|
|
30
36
|
await generateManifest(manifest);
|
|
31
37
|
}
|
|
32
38
|
|
|
@@ -16,6 +16,7 @@ import { Utils } from '#namespaces';
|
|
|
16
16
|
* that would result in the target directory being copied into itself.
|
|
17
17
|
* @param {string} source - The path of the source directory.
|
|
18
18
|
* @param {string} target - The path of the target directory. If the target directory is a
|
|
19
|
+
* @param {boolean} ignoreDefaultFiles - ignore vulcan and azion cli default files (azion, .vulcan, ...)
|
|
19
20
|
* subdirectory of the source directory, this function will avoid copying the target directory into
|
|
20
21
|
* itself.
|
|
21
22
|
* @example
|
|
@@ -26,7 +27,7 @@ import { Utils } from '#namespaces';
|
|
|
26
27
|
* of the source directory, this function will avoid copying the target directory into itself
|
|
27
28
|
* copyDirectory('path/to/source', 'path/to/source/subdirectory');
|
|
28
29
|
*/
|
|
29
|
-
function copyDirectory(source, target) {
|
|
30
|
+
function copyDirectory(source, target, ignoreDefaultFiles = false) {
|
|
30
31
|
const absoluteSource = resolve(source);
|
|
31
32
|
const absoluteTarget = resolve(target);
|
|
32
33
|
|
|
@@ -45,6 +46,20 @@ function copyDirectory(source, target) {
|
|
|
45
46
|
const sourcePath = join(absoluteSource, file);
|
|
46
47
|
const targetPath = join(absoluteTarget, file);
|
|
47
48
|
|
|
49
|
+
if (ignoreDefaultFiles) {
|
|
50
|
+
const DEFAULT_FILES_AND_DIRS = [
|
|
51
|
+
/\/\.vulcan$/,
|
|
52
|
+
/azion\/*$/,
|
|
53
|
+
/vulcan-\d{14}\.temp\.js$/,
|
|
54
|
+
/\/\.edge$/,
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
const skip = DEFAULT_FILES_AND_DIRS.some((regx) => regx.test(sourcePath));
|
|
58
|
+
if (skip) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
48
63
|
// TODO: abstract to configuration file
|
|
49
64
|
if (file === '.git') {
|
|
50
65
|
return;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "edge-functions",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.6.2
|
|
4
|
+
"version": "2.6.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": {
|