@lwrjs/shared-utils 0.15.8 → 0.15.10
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/env.cjs +2 -1
- package/build/cjs/urls.cjs +4 -0
- package/build/es/env.js +2 -0
- package/build/es/urls.d.ts +1 -0
- package/build/es/urls.js +9 -0
- package/package.json +4 -4
package/build/cjs/env.cjs
CHANGED
|
@@ -33,7 +33,8 @@ function getFeatureFlags() {
|
|
|
33
33
|
SSR_LOADER_PER_REQUEST: parseBooleanFlag("SSR_LOADER_PER_REQUEST"),
|
|
34
34
|
SSR_WITH_CSR_FALLBACK: parseBooleanFlag("SSR_WITH_CSR_FALLBACK"),
|
|
35
35
|
VIEW_CACHE_SIZE: parseStringFlag("VIEW_CACHE_SIZE"),
|
|
36
|
-
EXPERIMENTAL_ASSET_HEADERS: parseStringFlag("EXPERIMENTAL_ASSET_HEADERS")
|
|
36
|
+
EXPERIMENTAL_ASSET_HEADERS: parseStringFlag("EXPERIMENTAL_ASSET_HEADERS"),
|
|
37
|
+
SSR_TIMEOUT: parseStringFlag("SSR_TIMEOUT")
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
40
|
function parseBooleanFlag(flag) {
|
package/build/cjs/urls.cjs
CHANGED
|
@@ -33,6 +33,7 @@ __export(exports, {
|
|
|
33
33
|
getViewUri: () => getViewUri,
|
|
34
34
|
isModuleOrBundleUrl: () => isModuleOrBundleUrl,
|
|
35
35
|
isURL: () => isURL,
|
|
36
|
+
originToHostname: () => originToHostname,
|
|
36
37
|
removeClientBootstrapConfigurationSuffix: () => removeClientBootstrapConfigurationSuffix
|
|
37
38
|
});
|
|
38
39
|
var import_path_to_regexp = __toModule(require("path-to-regexp"));
|
|
@@ -138,3 +139,6 @@ function crossEnvFileURL(url) {
|
|
|
138
139
|
}
|
|
139
140
|
return url;
|
|
140
141
|
}
|
|
142
|
+
function originToHostname(url) {
|
|
143
|
+
return url.replace(/^https?:\/\//, "").replace(/:(\d+)(?=[/.]|$)/, "");
|
|
144
|
+
}
|
package/build/es/env.js
CHANGED
|
@@ -30,6 +30,8 @@ export function getFeatureFlags() {
|
|
|
30
30
|
// Expected format is `<header_key_1>: <header_value_1>, header_value_2>; <header_key_2>: <header_value_2>`
|
|
31
31
|
// E.g., assetHeadersString Cloudflare-CDN-Cache-Control: max-age=2813308004; Cache-Tag: ABC123;
|
|
32
32
|
EXPERIMENTAL_ASSET_HEADERS: parseStringFlag('EXPERIMENTAL_ASSET_HEADERS'),
|
|
33
|
+
// Sets the timeout for SSR on lambda in ms
|
|
34
|
+
SSR_TIMEOUT: parseStringFlag('SSR_TIMEOUT'),
|
|
33
35
|
};
|
|
34
36
|
}
|
|
35
37
|
/**
|
package/build/es/urls.d.ts
CHANGED
|
@@ -38,4 +38,5 @@ export declare function getViewUri(routePath: string, basePath: string, locale:
|
|
|
38
38
|
*/
|
|
39
39
|
export declare function isURL(uri: string): boolean;
|
|
40
40
|
export declare function crossEnvFileURL(url: string): string;
|
|
41
|
+
export declare function originToHostname(url: string): string;
|
|
41
42
|
//# sourceMappingURL=urls.d.ts.map
|
package/build/es/urls.js
CHANGED
|
@@ -139,4 +139,13 @@ export function crossEnvFileURL(url) {
|
|
|
139
139
|
}
|
|
140
140
|
return url;
|
|
141
141
|
}
|
|
142
|
+
// Remove the protocol and port from a URL origin to create a hostname
|
|
143
|
+
// eg: url = https://developer.mozilla.org:4097
|
|
144
|
+
// protocol = https
|
|
145
|
+
// port = 4097
|
|
146
|
+
// host = developer.mozilla.org:4097
|
|
147
|
+
// hostname = developer.mozilla.org
|
|
148
|
+
export function originToHostname(url) {
|
|
149
|
+
return url.replace(/^https?:\/\//, '').replace(/:(\d+)(?=[/.]|$)/, '');
|
|
150
|
+
}
|
|
142
151
|
//# sourceMappingURL=urls.js.map
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.15.
|
|
7
|
+
"version": "0.15.10",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"build/**/*.d.ts"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@lwrjs/diagnostics": "0.15.
|
|
40
|
+
"@lwrjs/diagnostics": "0.15.10",
|
|
41
41
|
"es-module-lexer": "^1.5.4",
|
|
42
42
|
"fast-json-stable-stringify": "^2.1.0",
|
|
43
43
|
"magic-string": "^0.30.9",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"slugify": "^1.4.5"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@lwrjs/types": "0.15.
|
|
53
|
+
"@lwrjs/types": "0.15.10",
|
|
54
54
|
"@types/mime-types": "2.1.4",
|
|
55
55
|
"@types/path-to-regexp": "^1.7.0",
|
|
56
56
|
"memfs": "^4.13.0"
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">=18.0.0"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "12e49c8525612141767510a2381f82aa0aff2f70"
|
|
62
62
|
}
|