@fastly/compute-js-static-publish 8.0.0-beta.0 → 8.0.0-beta.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/cli/util/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/cli/util/config.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,eAAe,EAIrB,MAAM,0CAA0C,CAAC;AAOlD,OAAO,EACL,KAAK,8BAA8B,EAEpC,MAAM,+CAA+C,CAAC;AAOvD,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,gDAAgD,CAAC;AAEtG,qBAAa,eAAgB,SAAQ,KAAK;IACxC,MAAM,EAAE,MAAM,EAAE,CAAC;gBAEL,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;CAIrD;AAED,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,eAAe,CAAC,CA+B1E;AAGD,eAAO,MAAM,0BAA0B,6DAmErC,CAAC;AAEH,wBAAsB,4BAA4B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,8BAA8B,CAAC,CA6B9G;AA4CD,eAAO,MAAM,6BAA6B,4EA8JxC,CAAC;AAEH,eAAO,MAAM,8BAA8B,6EAkIzC,CAAC"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT license. See LICENSE file for details.
|
|
4
4
|
*/
|
|
5
5
|
import path from 'node:path';
|
|
6
|
+
import { pathToFileURL } from 'node:url';
|
|
6
7
|
import globToRegExp from 'glob-to-regexp';
|
|
7
8
|
import { isKvStoreConfigRc, isS3StorageConfigRc, } from '../../models/config/static-publish-rc.js';
|
|
8
9
|
import { getKvStoreConfigFromRc, } from '../../models/config/kv-store-config.js';
|
|
@@ -17,16 +18,20 @@ export class LoadConfigError extends Error {
|
|
|
17
18
|
export async function loadStaticPublisherRcFile() {
|
|
18
19
|
let configRaw;
|
|
19
20
|
const configFile = './static-publish.rc.js';
|
|
21
|
+
const configFilePath = path.resolve(configFile);
|
|
20
22
|
try {
|
|
21
|
-
|
|
22
|
-
configRaw = (await import(filePath)).default;
|
|
23
|
+
configRaw = (await import(pathToFileURL(configFilePath).href)).default;
|
|
23
24
|
}
|
|
24
|
-
catch {
|
|
25
|
-
|
|
25
|
+
catch (ex) {
|
|
26
|
+
throw new LoadConfigError(configFile, [
|
|
27
|
+
`Unable to load ${configFilePath}`,
|
|
28
|
+
String(ex),
|
|
29
|
+
]);
|
|
26
30
|
}
|
|
27
31
|
if (configRaw == null) {
|
|
28
32
|
throw new LoadConfigError(configFile, [
|
|
29
|
-
|
|
33
|
+
`Unable to load ${configFilePath}`,
|
|
34
|
+
`default export does not exist or is null.`
|
|
30
35
|
]);
|
|
31
36
|
}
|
|
32
37
|
const errors = [];
|
|
@@ -97,16 +102,20 @@ export const normalizeStaticPublisherRc = buildNormalizeFunctionForObject((confi
|
|
|
97
102
|
});
|
|
98
103
|
export async function loadPublishContentConfigFile(configFile) {
|
|
99
104
|
let configRaw;
|
|
105
|
+
const configFilePath = path.resolve(configFile);
|
|
100
106
|
try {
|
|
101
|
-
|
|
102
|
-
configRaw = (await import(filePath)).default;
|
|
107
|
+
configRaw = (await import(pathToFileURL(configFilePath).href)).default;
|
|
103
108
|
}
|
|
104
|
-
catch {
|
|
105
|
-
|
|
109
|
+
catch (ex) {
|
|
110
|
+
throw new LoadConfigError(configFile, [
|
|
111
|
+
`Unable to load ${configFilePath}`,
|
|
112
|
+
String(ex),
|
|
113
|
+
]);
|
|
106
114
|
}
|
|
107
115
|
if (configRaw == null) {
|
|
108
116
|
throw new LoadConfigError(configFile, [
|
|
109
|
-
|
|
117
|
+
`Unable to load ${configFilePath}`,
|
|
118
|
+
`default export does not exist or is null.`
|
|
110
119
|
]);
|
|
111
120
|
}
|
|
112
121
|
const errors = [];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fastly/compute-js-static-publish",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "8.0.0-beta.
|
|
4
|
+
"version": "8.0.0-beta.2",
|
|
5
5
|
"description": "Static Publisher for Fastly Compute JavaScript",
|
|
6
6
|
"main": "build/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://github.com/fastly/compute-js-static-publish#readme",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@aws-sdk/client-s3": "
|
|
44
|
-
"@aws-sdk/credential-providers": "
|
|
43
|
+
"@aws-sdk/client-s3": "3.888.0",
|
|
44
|
+
"@aws-sdk/credential-providers": "3.888.0",
|
|
45
45
|
"@fastly/cli": "^11.2.0",
|
|
46
46
|
"command-line-args": "^5.2.1",
|
|
47
47
|
"glob-to-regexp": "^0.4.1",
|