@lwrjs/config 0.17.2-alpha.2 → 0.17.2-alpha.20
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.
|
@@ -101,7 +101,7 @@ var RUNTIME_CONFIGS = {
|
|
|
101
101
|
function getServerModeConfig(serverMode) {
|
|
102
102
|
const selectedMode = RUNTIME_CONFIGS[serverMode];
|
|
103
103
|
if (!selectedMode) {
|
|
104
|
-
throw new import_diagnostics.
|
|
104
|
+
throw new import_diagnostics.LwrInvalidError(import_diagnostics.descriptions.INVALID.INVALID_MODE(serverMode));
|
|
105
105
|
}
|
|
106
106
|
return selectedMode;
|
|
107
107
|
}
|
|
@@ -4,7 +4,7 @@ export declare const RUNTIME_CONFIGS: Record<string, ServerModeConfig>;
|
|
|
4
4
|
/**
|
|
5
5
|
* Get server mode config by name
|
|
6
6
|
*
|
|
7
|
-
* @throws {
|
|
7
|
+
* @throws {LwrInvalidError} Mode must be supported by LWR.
|
|
8
8
|
*
|
|
9
9
|
* @param {string} serverMode - the name of the server mode
|
|
10
10
|
* @returns {ServerModeConfig} the server mode config
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { descriptions,
|
|
1
|
+
import { descriptions, LwrInvalidError } from '@lwrjs/diagnostics';
|
|
2
2
|
import { getFeatureFlags } from '@lwrjs/shared-utils';
|
|
3
3
|
export const DEFAULT_I18N_CONFIG = {
|
|
4
4
|
defaultLocale: 'en-US',
|
|
@@ -70,7 +70,7 @@ export const RUNTIME_CONFIGS = {
|
|
|
70
70
|
/**
|
|
71
71
|
* Get server mode config by name
|
|
72
72
|
*
|
|
73
|
-
* @throws {
|
|
73
|
+
* @throws {LwrInvalidError} Mode must be supported by LWR.
|
|
74
74
|
*
|
|
75
75
|
* @param {string} serverMode - the name of the server mode
|
|
76
76
|
* @returns {ServerModeConfig} the server mode config
|
|
@@ -78,7 +78,7 @@ export const RUNTIME_CONFIGS = {
|
|
|
78
78
|
export function getServerModeConfig(serverMode) {
|
|
79
79
|
const selectedMode = RUNTIME_CONFIGS[serverMode];
|
|
80
80
|
if (!selectedMode) {
|
|
81
|
-
throw new
|
|
81
|
+
throw new LwrInvalidError(descriptions.INVALID.INVALID_MODE(serverMode));
|
|
82
82
|
}
|
|
83
83
|
return selectedMode;
|
|
84
84
|
}
|
package/package.cjs
CHANGED
|
@@ -21,7 +21,6 @@ if (globalThis.LWC_VERSION) {
|
|
|
21
21
|
const { version: packageVersion } = JSON.parse(fs.readFileSync(packageJsonPath), 'utf-8');
|
|
22
22
|
lwcVersion = packageVersion;
|
|
23
23
|
} catch(err) {
|
|
24
|
-
console.log(`[config] peer dependency lwc was not provided`);
|
|
25
24
|
lwcVersion = 'not-provided';
|
|
26
25
|
}
|
|
27
26
|
}
|
|
@@ -36,7 +35,6 @@ if (globalThis.PWA_KIT_RUNTIME_VERSION) {
|
|
|
36
35
|
const { version: packageVersion } = JSON.parse(fs.readFileSync(packageJsonPath), 'utf-8');
|
|
37
36
|
pwaKitRuntimeVersion = packageVersion;
|
|
38
37
|
} catch(err) {
|
|
39
|
-
console.log(`[config] peer dependency pwa-kit-runtime was not provided`);
|
|
40
38
|
pwaKitRuntimeVersion = 'not-provided';
|
|
41
39
|
}
|
|
42
40
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.17.2-alpha.
|
|
7
|
+
"version": "0.17.2-alpha.20",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -42,17 +42,17 @@
|
|
|
42
42
|
"test": "jest"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@lwrjs/diagnostics": "0.17.2-alpha.
|
|
46
|
-
"@lwrjs/instrumentation": "0.17.2-alpha.
|
|
47
|
-
"@lwrjs/shared-utils": "0.17.2-alpha.
|
|
45
|
+
"@lwrjs/diagnostics": "0.17.2-alpha.20",
|
|
46
|
+
"@lwrjs/instrumentation": "0.17.2-alpha.20",
|
|
47
|
+
"@lwrjs/shared-utils": "0.17.2-alpha.20",
|
|
48
48
|
"fs-extra": "^11.2.0",
|
|
49
49
|
"jsonc-parser": "^3.3.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@lwrjs/types": "0.17.2-alpha.
|
|
53
|
-
"jest": "
|
|
52
|
+
"@lwrjs/types": "0.17.2-alpha.20",
|
|
53
|
+
"jest": "29.7.0",
|
|
54
54
|
"memfs": "^4.13.0",
|
|
55
|
-
"ts-jest": "^
|
|
55
|
+
"ts-jest": "^29.2.5"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@lwc/engine-dom": ">= 2.x",
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
"engines": {
|
|
69
|
-
"node": ">=
|
|
69
|
+
"node": ">=20.0.0"
|
|
70
70
|
},
|
|
71
71
|
"volta": {
|
|
72
72
|
"extends": "../../../package.json"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "871213620dec8ff886be421339f1e90e86dbee96"
|
|
75
75
|
}
|