@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.
@@ -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
+ }
@@ -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,
@@ -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,2 @@
1
+ export declare function cookieStringToObject(cookieString: string): Record<string, string>;
2
+ //# sourceMappingURL=cookie.d.ts.map
@@ -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
@@ -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;
@@ -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 = {
@@ -15,4 +15,5 @@ export * from './lwr-app-observer.js';
15
15
  export * from './bundle.js';
16
16
  export * from './localization.js';
17
17
  export * from './launch.js';
18
+ export * from './cookie.js';
18
19
  //# sourceMappingURL=index.d.ts.map
package/build/es/index.js CHANGED
@@ -15,4 +15,5 @@ export * from './lwr-app-observer.js';
15
15
  export * from './bundle.js';
16
16
  export * from './localization.js';
17
17
  export * from './launch.js';
18
+ export * from './cookie.js';
18
19
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.15.0-alpha.11",
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.11",
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.11",
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": "86f6f83ff30c750aab3b29448fa484d58918fb05"
61
+ "gitHead": "687327a328b33a1abc3ac45e1406d72ebe7d37b4"
62
62
  }