@lwrjs/shared-utils 0.15.0-alpha.11 → 0.15.0-alpha.13
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/cookie.cjs +21 -0
- package/build/cjs/identity.cjs +2 -0
- package/build/cjs/index.cjs +1 -0
- package/build/es/cookie.d.ts +2 -0
- package/build/es/cookie.js +10 -0
- package/build/es/identity.d.ts +1 -0
- package/build/es/identity.js +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", {value: true});
|
|
3
|
+
var __export = (target, all) => {
|
|
4
|
+
for (var name in all)
|
|
5
|
+
__defProp(target, name, {get: all[name], enumerable: true});
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
// packages/@lwrjs/shared-utils/src/cookie.ts
|
|
9
|
+
__markAsModule(exports);
|
|
10
|
+
__export(exports, {
|
|
11
|
+
cookieStringToObject: () => cookieStringToObject
|
|
12
|
+
});
|
|
13
|
+
function cookieStringToObject(cookieString) {
|
|
14
|
+
return cookieString.split(";").reduce((cookies, cookie) => {
|
|
15
|
+
const [name, value] = cookie.trim().split("=");
|
|
16
|
+
if (name && value) {
|
|
17
|
+
cookies[name] = decodeURIComponent(value);
|
|
18
|
+
}
|
|
19
|
+
return cookies;
|
|
20
|
+
}, {});
|
|
21
|
+
}
|
package/build/cjs/identity.cjs
CHANGED
|
@@ -33,6 +33,7 @@ __export(exports, {
|
|
|
33
33
|
IMMUTABLE_ASSET_PREFIX: () => IMMUTABLE_ASSET_PREFIX,
|
|
34
34
|
LATEST_SIGNATURE: () => LATEST_SIGNATURE,
|
|
35
35
|
LOCALE_SIGIL: () => LOCALE_SIGIL,
|
|
36
|
+
SSR_SIGIL: () => SSR_SIGIL,
|
|
36
37
|
VERSION_NOT_PROVIDED: () => VERSION_NOT_PROVIDED,
|
|
37
38
|
VERSION_PREFIX: () => VERSION_PREFIX,
|
|
38
39
|
VERSION_SIGIL: () => VERSION_SIGIL,
|
|
@@ -69,6 +70,7 @@ var DEFAULT_TITLE = "LWR App";
|
|
|
69
70
|
var IMMUTABLE_ASSET_PREFIX = "/_immutable/";
|
|
70
71
|
var ASSETS_CACHE_DIR = "assetsCache";
|
|
71
72
|
var VERSION_NOT_PROVIDED = "version-not-provided";
|
|
73
|
+
var SSR_SIGIL = "ssr";
|
|
72
74
|
var DEFAULT_LOCKER_TRUSTED_CMP = ["@locker/*", "lwr/*", "@lwrjs/*", "lwc", "@lwc/*"];
|
|
73
75
|
var DEFAULT_LWR_LOCKER_CONFIG = {
|
|
74
76
|
enabled: false,
|
package/build/cjs/index.cjs
CHANGED
|
@@ -36,3 +36,4 @@ __exportStar(exports, __toModule(require("./lwr-app-observer.cjs")));
|
|
|
36
36
|
__exportStar(exports, __toModule(require("./bundle.cjs")));
|
|
37
37
|
__exportStar(exports, __toModule(require("./localization.cjs")));
|
|
38
38
|
__exportStar(exports, __toModule(require("./launch.cjs")));
|
|
39
|
+
__exportStar(exports, __toModule(require("./cookie.cjs")));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function cookieStringToObject(cookieString) {
|
|
2
|
+
return cookieString.split(';').reduce((cookies, cookie) => {
|
|
3
|
+
const [name, value] = cookie.trim().split('=');
|
|
4
|
+
if (name && value) {
|
|
5
|
+
cookies[name] = decodeURIComponent(value);
|
|
6
|
+
}
|
|
7
|
+
return cookies;
|
|
8
|
+
}, {});
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=cookie.js.map
|
package/build/es/identity.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare const DEFAULT_TITLE = "LWR App";
|
|
|
10
10
|
export declare const IMMUTABLE_ASSET_PREFIX = "/_immutable/";
|
|
11
11
|
export declare const ASSETS_CACHE_DIR = "assetsCache";
|
|
12
12
|
export declare const VERSION_NOT_PROVIDED = "version-not-provided";
|
|
13
|
+
export declare const SSR_SIGIL = "ssr";
|
|
13
14
|
export declare const DEFAULT_LOCKER_TRUSTED_CMP: string[];
|
|
14
15
|
export declare const DEFAULT_LWR_LOCKER_CONFIG: {
|
|
15
16
|
enabled: boolean;
|
package/build/es/identity.js
CHANGED
|
@@ -10,6 +10,7 @@ export const DEFAULT_TITLE = 'LWR App';
|
|
|
10
10
|
export const IMMUTABLE_ASSET_PREFIX = '/_immutable/';
|
|
11
11
|
export const ASSETS_CACHE_DIR = 'assetsCache';
|
|
12
12
|
export const VERSION_NOT_PROVIDED = 'version-not-provided';
|
|
13
|
+
export const SSR_SIGIL = 'ssr';
|
|
13
14
|
// Locker trusted components
|
|
14
15
|
export const DEFAULT_LOCKER_TRUSTED_CMP = ['@locker/*', 'lwr/*', '@lwrjs/*', 'lwc', '@lwc/*'];
|
|
15
16
|
export const DEFAULT_LWR_LOCKER_CONFIG = {
|
package/build/es/index.d.ts
CHANGED
package/build/es/index.js
CHANGED
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.15.0-alpha.
|
|
7
|
+
"version": "0.15.0-alpha.13",
|
|
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.0-alpha.
|
|
40
|
+
"@lwrjs/diagnostics": "0.15.0-alpha.13",
|
|
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.0-alpha.
|
|
53
|
+
"@lwrjs/types": "0.15.0-alpha.13",
|
|
54
54
|
"@types/mime-types": "2.1.4",
|
|
55
55
|
"@types/path-to-regexp": "^1.7.0",
|
|
56
56
|
"memfs": "^4.9.3"
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">=18.0.0"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "687327a328b33a1abc3ac45e1406d72ebe7d37b4"
|
|
62
62
|
}
|