@lwrjs/config 0.11.0-alpha.14 → 0.11.0-alpha.15
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/build/cjs/defaults.cjs
CHANGED
|
@@ -86,14 +86,6 @@ var SSR_VIEW_TRANSFORM_PLUGIN = "@lwrjs/lwc-ssr/viewTransformer";
|
|
|
86
86
|
var DEFAULT_ASSET_PROVIDERS = ["@lwrjs/fs-asset-provider"];
|
|
87
87
|
var DEFAULT_ASSET_TRANSFORM_PLUGINS = ["@lwrjs/asset-transformer"];
|
|
88
88
|
var DEFAULT_URI_TRANSFORM_PLUGINS = [];
|
|
89
|
-
var DEFAULT_I18N_CONFIG = {
|
|
90
|
-
defaultLocale: "en-US",
|
|
91
|
-
locales: [
|
|
92
|
-
{
|
|
93
|
-
id: "en-US"
|
|
94
|
-
}
|
|
95
|
-
]
|
|
96
|
-
};
|
|
97
89
|
var DEFAULT_AMD_LOADER = "lwr/loader";
|
|
98
90
|
var DEFAULT_AMD_LOADER_LEGACY = "lwr/loaderLegacy";
|
|
99
91
|
var DEFAULT_ESM_LOADER = "lwr/esmLoader";
|
|
@@ -165,5 +157,5 @@ var DEFAULT_LWR_CONFIG = {
|
|
|
165
157
|
serverType: DEFAULT_SERVER_TYPE,
|
|
166
158
|
locker: import_shared_utils.DEFAULT_LWR_LOCKER_CONFIG,
|
|
167
159
|
uriTransformers: DEFAULT_URI_TRANSFORM_PLUGINS,
|
|
168
|
-
i18n: DEFAULT_I18N_CONFIG
|
|
160
|
+
i18n: import_runtime_config.DEFAULT_I18N_CONFIG
|
|
169
161
|
};
|
|
@@ -24,12 +24,21 @@ var __toModule = (module2) => {
|
|
|
24
24
|
// packages/@lwrjs/config/src/runtime-config.ts
|
|
25
25
|
__markAsModule(exports);
|
|
26
26
|
__export(exports, {
|
|
27
|
+
DEFAULT_I18N_CONFIG: () => DEFAULT_I18N_CONFIG,
|
|
27
28
|
RUNTIME_CONFIGS: () => RUNTIME_CONFIGS,
|
|
28
29
|
getRuntimeEnvironment: () => getRuntimeEnvironment,
|
|
29
30
|
getServerModeConfig: () => getServerModeConfig
|
|
30
31
|
});
|
|
31
32
|
var import_diagnostics = __toModule(require("@lwrjs/diagnostics"));
|
|
32
33
|
var import_shared_utils = __toModule(require("@lwrjs/shared-utils"));
|
|
34
|
+
var DEFAULT_I18N_CONFIG = {
|
|
35
|
+
defaultLocale: "en-US",
|
|
36
|
+
locales: [
|
|
37
|
+
{
|
|
38
|
+
id: "en-US"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
};
|
|
33
42
|
var RUNTIME_CONFIGS = {
|
|
34
43
|
dev: {
|
|
35
44
|
bundle: false,
|
|
@@ -38,7 +47,7 @@ var RUNTIME_CONFIGS = {
|
|
|
38
47
|
compat: "0",
|
|
39
48
|
debug: false,
|
|
40
49
|
watchFiles: true,
|
|
41
|
-
|
|
50
|
+
i18n: DEFAULT_I18N_CONFIG,
|
|
42
51
|
hmrEnabled: true,
|
|
43
52
|
immutableAssets: false,
|
|
44
53
|
env: {
|
|
@@ -52,7 +61,7 @@ var RUNTIME_CONFIGS = {
|
|
|
52
61
|
compat: "0",
|
|
53
62
|
debug: false,
|
|
54
63
|
watchFiles: false,
|
|
55
|
-
|
|
64
|
+
i18n: DEFAULT_I18N_CONFIG,
|
|
56
65
|
hmrEnabled: false,
|
|
57
66
|
immutableAssets: true,
|
|
58
67
|
env: {
|
|
@@ -66,7 +75,7 @@ var RUNTIME_CONFIGS = {
|
|
|
66
75
|
compat: "1",
|
|
67
76
|
debug: false,
|
|
68
77
|
watchFiles: true,
|
|
69
|
-
|
|
78
|
+
i18n: DEFAULT_I18N_CONFIG,
|
|
70
79
|
hmrEnabled: false,
|
|
71
80
|
immutableAssets: false,
|
|
72
81
|
env: {
|
|
@@ -80,7 +89,7 @@ var RUNTIME_CONFIGS = {
|
|
|
80
89
|
compat: "1",
|
|
81
90
|
debug: false,
|
|
82
91
|
watchFiles: false,
|
|
83
|
-
|
|
92
|
+
i18n: DEFAULT_I18N_CONFIG,
|
|
84
93
|
hmrEnabled: false,
|
|
85
94
|
immutableAssets: true,
|
|
86
95
|
env: {
|
|
@@ -98,7 +107,6 @@ function getServerModeConfig(serverMode) {
|
|
|
98
107
|
function getRuntimeEnvironment(config) {
|
|
99
108
|
const {serverMode, lwrVersion, apiVersion, basePath, i18n, minify} = config;
|
|
100
109
|
const serverModeConfig = getServerModeConfig(config.serverMode);
|
|
101
|
-
const defaultLocale = i18n.defaultLocale;
|
|
102
110
|
return {
|
|
103
111
|
...serverModeConfig,
|
|
104
112
|
minify: minify !== null ? minify : serverModeConfig.minify,
|
|
@@ -107,7 +115,7 @@ function getRuntimeEnvironment(config) {
|
|
|
107
115
|
lwrVersion,
|
|
108
116
|
apiVersion,
|
|
109
117
|
basePath,
|
|
110
|
-
|
|
118
|
+
i18n,
|
|
111
119
|
defaultAssetPath: ""
|
|
112
120
|
};
|
|
113
121
|
}
|
package/build/es/defaults.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_LWR_LOCKER_CONFIG, getFeatureFlags } from '@lwrjs/shared-utils';
|
|
2
2
|
import { version } from '@lwrjs/config/package';
|
|
3
|
-
import { getServerModeConfig } from './runtime-config.js';
|
|
3
|
+
import { DEFAULT_I18N_CONFIG, getServerModeConfig } from './runtime-config.js';
|
|
4
4
|
const PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : 3000;
|
|
5
5
|
const MODE = process.env.MODE || 'prod';
|
|
6
6
|
const DEFAULT_BASE_PATH = '';
|
|
@@ -46,14 +46,6 @@ export const SSR_VIEW_TRANSFORM_PLUGIN = '@lwrjs/lwc-ssr/viewTransformer';
|
|
|
46
46
|
const DEFAULT_ASSET_PROVIDERS = ['@lwrjs/fs-asset-provider'];
|
|
47
47
|
const DEFAULT_ASSET_TRANSFORM_PLUGINS = ['@lwrjs/asset-transformer'];
|
|
48
48
|
const DEFAULT_URI_TRANSFORM_PLUGINS = [];
|
|
49
|
-
const DEFAULT_I18N_CONFIG = {
|
|
50
|
-
defaultLocale: 'en-US',
|
|
51
|
-
locales: [
|
|
52
|
-
{
|
|
53
|
-
id: 'en-US',
|
|
54
|
-
},
|
|
55
|
-
],
|
|
56
|
-
};
|
|
57
49
|
export const DEFAULT_AMD_LOADER = 'lwr/loader';
|
|
58
50
|
export const DEFAULT_AMD_LOADER_LEGACY = 'lwr/loaderLegacy';
|
|
59
51
|
export const DEFAULT_ESM_LOADER = 'lwr/esmLoader';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { ServerModeConfig, NormalizedLwrGlobalConfig, RuntimeEnvironment } from '@lwrjs/types';
|
|
1
|
+
import type { ServerModeConfig, NormalizedLwrGlobalConfig, RuntimeEnvironment, I18NConfig } from '@lwrjs/types';
|
|
2
|
+
export declare const DEFAULT_I18N_CONFIG: I18NConfig;
|
|
2
3
|
export declare const RUNTIME_CONFIGS: Record<string, ServerModeConfig>;
|
|
3
4
|
/**
|
|
4
5
|
* Get server mode config by name
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { createSingleDiagnosticError, descriptions, LwrServerError } from '@lwrjs/diagnostics';
|
|
2
2
|
import { getFeatureFlags } from '@lwrjs/shared-utils';
|
|
3
|
+
export const DEFAULT_I18N_CONFIG = {
|
|
4
|
+
defaultLocale: 'en-US',
|
|
5
|
+
locales: [
|
|
6
|
+
{
|
|
7
|
+
id: 'en-US',
|
|
8
|
+
},
|
|
9
|
+
],
|
|
10
|
+
};
|
|
3
11
|
export const RUNTIME_CONFIGS = {
|
|
4
12
|
dev: {
|
|
5
13
|
bundle: false,
|
|
@@ -8,7 +16,7 @@ export const RUNTIME_CONFIGS = {
|
|
|
8
16
|
compat: '0',
|
|
9
17
|
debug: false,
|
|
10
18
|
watchFiles: true,
|
|
11
|
-
|
|
19
|
+
i18n: DEFAULT_I18N_CONFIG,
|
|
12
20
|
hmrEnabled: true,
|
|
13
21
|
immutableAssets: false,
|
|
14
22
|
env: {
|
|
@@ -22,7 +30,7 @@ export const RUNTIME_CONFIGS = {
|
|
|
22
30
|
compat: '0',
|
|
23
31
|
debug: false,
|
|
24
32
|
watchFiles: false,
|
|
25
|
-
|
|
33
|
+
i18n: DEFAULT_I18N_CONFIG,
|
|
26
34
|
hmrEnabled: false,
|
|
27
35
|
immutableAssets: true,
|
|
28
36
|
env: {
|
|
@@ -36,7 +44,7 @@ export const RUNTIME_CONFIGS = {
|
|
|
36
44
|
compat: '1',
|
|
37
45
|
debug: false,
|
|
38
46
|
watchFiles: true,
|
|
39
|
-
|
|
47
|
+
i18n: DEFAULT_I18N_CONFIG,
|
|
40
48
|
hmrEnabled: false,
|
|
41
49
|
immutableAssets: false,
|
|
42
50
|
env: {
|
|
@@ -50,7 +58,7 @@ export const RUNTIME_CONFIGS = {
|
|
|
50
58
|
compat: '1',
|
|
51
59
|
debug: false,
|
|
52
60
|
watchFiles: false,
|
|
53
|
-
|
|
61
|
+
i18n: DEFAULT_I18N_CONFIG,
|
|
54
62
|
hmrEnabled: false,
|
|
55
63
|
immutableAssets: true,
|
|
56
64
|
env: {
|
|
@@ -82,7 +90,6 @@ export function getServerModeConfig(serverMode) {
|
|
|
82
90
|
export function getRuntimeEnvironment(config) {
|
|
83
91
|
const { serverMode, lwrVersion, apiVersion, basePath, i18n, minify } = config;
|
|
84
92
|
const serverModeConfig = getServerModeConfig(config.serverMode);
|
|
85
|
-
const defaultLocale = i18n.defaultLocale;
|
|
86
93
|
return {
|
|
87
94
|
...serverModeConfig,
|
|
88
95
|
minify: minify !== null ? minify : serverModeConfig.minify,
|
|
@@ -91,7 +98,7 @@ export function getRuntimeEnvironment(config) {
|
|
|
91
98
|
lwrVersion,
|
|
92
99
|
apiVersion,
|
|
93
100
|
basePath,
|
|
94
|
-
|
|
101
|
+
i18n,
|
|
95
102
|
// By default static assets are supposed to be relative to the app server
|
|
96
103
|
// This will be updated by the lambda when running on MRT.
|
|
97
104
|
defaultAssetPath: '',
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.11.0-alpha.
|
|
7
|
+
"version": "0.11.0-alpha.15",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"test": "jest"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@lwrjs/diagnostics": "0.11.0-alpha.
|
|
45
|
-
"@lwrjs/instrumentation": "0.11.0-alpha.
|
|
46
|
-
"@lwrjs/shared-utils": "0.11.0-alpha.
|
|
44
|
+
"@lwrjs/diagnostics": "0.11.0-alpha.15",
|
|
45
|
+
"@lwrjs/instrumentation": "0.11.0-alpha.15",
|
|
46
|
+
"@lwrjs/shared-utils": "0.11.0-alpha.15",
|
|
47
47
|
"fs-extra": "^11.1.1",
|
|
48
48
|
"jsonc-parser": "^3.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@lwrjs/types": "0.11.0-alpha.
|
|
51
|
+
"@lwrjs/types": "0.11.0-alpha.15",
|
|
52
52
|
"jest": "^26.6.3",
|
|
53
53
|
"ts-jest": "^26.5.6"
|
|
54
54
|
},
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"volta": {
|
|
70
70
|
"extends": "../../../package.json"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "3c6c6d17b2f57a5b67d32e40a1e574abb7d9afea"
|
|
73
73
|
}
|