@lwrjs/shared-utils 0.6.0-alpha.15 → 0.6.0-alpha.16
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/index.cjs +0 -1
- package/build/cjs/urls.cjs +9 -3
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -1
- package/build/es/urls.d.ts +1 -1
- package/build/es/urls.js +9 -2
- package/package.json +4 -4
- package/build/cjs/metrics.cjs +0 -15
- package/build/es/metrics.d.ts +0 -5
- package/build/es/metrics.js +0 -6
package/build/cjs/index.cjs
CHANGED
|
@@ -31,6 +31,5 @@ __exportStar(exports, __toModule(require("./typescript.cjs")));
|
|
|
31
31
|
__exportStar(exports, __toModule(require("./import-metadata.cjs")));
|
|
32
32
|
__exportStar(exports, __toModule(require("./graph.cjs")));
|
|
33
33
|
__exportStar(exports, __toModule(require("./mappings.cjs")));
|
|
34
|
-
__exportStar(exports, __toModule(require("./metrics.cjs")));
|
|
35
34
|
__exportStar(exports, __toModule(require("./urls.cjs")));
|
|
36
35
|
__exportStar(exports, __toModule(require("./env.cjs")));
|
package/build/cjs/urls.cjs
CHANGED
|
@@ -32,10 +32,12 @@ __export(exports, {
|
|
|
32
32
|
});
|
|
33
33
|
var import_path_to_regexp = __toModule(require("path-to-regexp"));
|
|
34
34
|
var CONFIG_SUFFIX = "/config.js";
|
|
35
|
-
|
|
35
|
+
var SIGNATURE_SIGIL = "s";
|
|
36
|
+
function getClientBootstrapConfigurationUri(routeInfo, runtimeEnvironment, runtimeParams, signature) {
|
|
36
37
|
const encodeUrl = encodeURIComponent(routeInfo.url);
|
|
37
38
|
const configUrlPrefix = getClientBootstrapConfigurationUriPrefix(routeInfo, runtimeEnvironment, runtimeParams);
|
|
38
|
-
|
|
39
|
+
const signatureSegment = signature ? `/${SIGNATURE_SIGIL}/${signature}` : "";
|
|
40
|
+
return `${configUrlPrefix}/${encodeUrl}${signatureSegment}${CONFIG_SUFFIX}`;
|
|
39
41
|
}
|
|
40
42
|
function getClientBootstrapConfigurationUriPrefix(routeInfo, runtimeEnvironment, runtimeParams) {
|
|
41
43
|
const {apiVersion, format} = runtimeEnvironment;
|
|
@@ -64,7 +66,11 @@ function getClientBootstrapConfigurationRoutes() {
|
|
|
64
66
|
`/:apiVersion/application/:format/l/:locale/ai/:appId/configuration/ci/:encodedViewPath${CONFIG_SUFFIX}`,
|
|
65
67
|
`/:apiVersion/application/:format/l/:locale/e/:environment/ai/:appId/configuration/ci/:encodedViewPath${CONFIG_SUFFIX}`,
|
|
66
68
|
`/:apiVersion/application/:format/ai/:appId/configuration/ci/:encodedViewPath${CONFIG_SUFFIX}`,
|
|
67
|
-
`/:apiVersion/application/:format/e/:environment/ai/:appId/configuration/ci/:encodedViewPath${CONFIG_SUFFIX}
|
|
69
|
+
`/:apiVersion/application/:format/e/:environment/ai/:appId/configuration/ci/:encodedViewPath${CONFIG_SUFFIX}`,
|
|
70
|
+
`/:apiVersion/application/:format/l/:locale/ai/:appId/configuration/ci/:encodedViewPath/s/:signature${CONFIG_SUFFIX}`,
|
|
71
|
+
`/:apiVersion/application/:format/l/:locale/e/:environment/ai/:appId/configuration/ci/:encodedViewPath/s/:signature${CONFIG_SUFFIX}`,
|
|
72
|
+
`/:apiVersion/application/:format/ai/:appId/configuration/ci/:encodedViewPath/s/:signature${CONFIG_SUFFIX}`,
|
|
73
|
+
`/:apiVersion/application/:format/e/:environment/ai/:appId/configuration/ci/:encodedViewPath/s/:signature${CONFIG_SUFFIX}`
|
|
68
74
|
];
|
|
69
75
|
}
|
|
70
76
|
function extractRequestParams(parameterizedRoute, resolvedUrl, existingParams) {
|
package/build/es/index.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export * from './typescript.js';
|
|
|
10
10
|
export * from './import-metadata.js';
|
|
11
11
|
export * from './graph.js';
|
|
12
12
|
export * from './mappings.js';
|
|
13
|
-
export * from './metrics.js';
|
|
14
13
|
export * from './urls.js';
|
|
15
14
|
export * from './env.js';
|
|
16
15
|
//# sourceMappingURL=index.d.ts.map
|
package/build/es/index.js
CHANGED
|
@@ -10,7 +10,6 @@ export * from './typescript.js';
|
|
|
10
10
|
export * from './import-metadata.js';
|
|
11
11
|
export * from './graph.js';
|
|
12
12
|
export * from './mappings.js';
|
|
13
|
-
export * from './metrics.js';
|
|
14
13
|
export * from './urls.js';
|
|
15
14
|
export * from './env.js';
|
|
16
15
|
//# sourceMappingURL=index.js.map
|
package/build/es/urls.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { RuntimeEnvironment, RuntimeParams } from '@lwrjs/types';
|
|
|
2
2
|
export declare function getClientBootstrapConfigurationUri(routeInfo: {
|
|
3
3
|
id: string;
|
|
4
4
|
url: string;
|
|
5
|
-
}, runtimeEnvironment: Required<Pick<RuntimeEnvironment, 'apiVersion' | 'format'>>, runtimeParams?: RuntimeParams): string;
|
|
5
|
+
}, runtimeEnvironment: Required<Pick<RuntimeEnvironment, 'apiVersion' | 'format'>>, runtimeParams?: RuntimeParams, signature?: string): string;
|
|
6
6
|
export declare function getClientBootstrapConfigurationUriPrefix(routeInfo: {
|
|
7
7
|
id: string;
|
|
8
8
|
}, runtimeEnvironment: Required<Pick<RuntimeEnvironment, 'apiVersion' | 'format'>>, runtimeParams?: RuntimeParams): string;
|
package/build/es/urls.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { pathToRegexp } from 'path-to-regexp';
|
|
2
2
|
const CONFIG_SUFFIX = '/config.js';
|
|
3
|
-
|
|
3
|
+
const SIGNATURE_SIGIL = 's';
|
|
4
|
+
export function getClientBootstrapConfigurationUri(routeInfo, runtimeEnvironment, runtimeParams, signature) {
|
|
4
5
|
const encodeUrl = encodeURIComponent(routeInfo.url);
|
|
5
6
|
const configUrlPrefix = getClientBootstrapConfigurationUriPrefix(routeInfo, runtimeEnvironment, runtimeParams);
|
|
6
|
-
|
|
7
|
+
const signatureSegment = signature ? `/${SIGNATURE_SIGIL}/${signature}` : '';
|
|
8
|
+
return `${configUrlPrefix}/${encodeUrl}${signatureSegment}${CONFIG_SUFFIX}`;
|
|
7
9
|
}
|
|
8
10
|
export function getClientBootstrapConfigurationUriPrefix(routeInfo, runtimeEnvironment, runtimeParams) {
|
|
9
11
|
const { apiVersion, format } = runtimeEnvironment;
|
|
@@ -42,6 +44,11 @@ export function getClientBootstrapConfigurationRoutes() {
|
|
|
42
44
|
`/:apiVersion/application/:format/l/:locale/e/:environment/ai/:appId/configuration/ci/:encodedViewPath${CONFIG_SUFFIX}`,
|
|
43
45
|
`/:apiVersion/application/:format/ai/:appId/configuration/ci/:encodedViewPath${CONFIG_SUFFIX}`,
|
|
44
46
|
`/:apiVersion/application/:format/e/:environment/ai/:appId/configuration/ci/:encodedViewPath${CONFIG_SUFFIX}`,
|
|
47
|
+
// with signature
|
|
48
|
+
`/:apiVersion/application/:format/l/:locale/ai/:appId/configuration/ci/:encodedViewPath/s/:signature${CONFIG_SUFFIX}`,
|
|
49
|
+
`/:apiVersion/application/:format/l/:locale/e/:environment/ai/:appId/configuration/ci/:encodedViewPath/s/:signature${CONFIG_SUFFIX}`,
|
|
50
|
+
`/:apiVersion/application/:format/ai/:appId/configuration/ci/:encodedViewPath/s/:signature${CONFIG_SUFFIX}`,
|
|
51
|
+
`/:apiVersion/application/:format/e/:environment/ai/:appId/configuration/ci/:encodedViewPath/s/:signature${CONFIG_SUFFIX}`,
|
|
45
52
|
];
|
|
46
53
|
}
|
|
47
54
|
/**
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.6.0-alpha.
|
|
7
|
+
"version": "0.6.0-alpha.16",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"slugify": "^1.4.5"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@lwrjs/diagnostics": "0.6.0-alpha.
|
|
47
|
-
"@lwrjs/types": "0.6.0-alpha.
|
|
46
|
+
"@lwrjs/diagnostics": "0.6.0-alpha.16",
|
|
47
|
+
"@lwrjs/types": "0.6.0-alpha.16",
|
|
48
48
|
"@types/mime-types": "2.1.1",
|
|
49
49
|
"@types/path-to-regexp": "^1.7.0"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
52
52
|
"node": ">=14.15.4 <17"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "2ccfba164126587f8c898da5994b6749ec23aa22"
|
|
55
55
|
}
|
package/build/cjs/metrics.cjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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/metrics.ts
|
|
9
|
-
__markAsModule(exports);
|
|
10
|
-
__export(exports, {
|
|
11
|
-
ON_APP_INIT: () => ON_APP_INIT,
|
|
12
|
-
ON_APP_LOAD: () => ON_APP_LOAD
|
|
13
|
-
});
|
|
14
|
-
var ON_APP_LOAD = "lwr-bootstrap-on-app-load";
|
|
15
|
-
var ON_APP_INIT = "lwr-bootstrap-on-app-init";
|
package/build/es/metrics.d.ts
DELETED
package/build/es/metrics.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// Measure the point just before the app is requested
|
|
2
|
-
const ON_APP_LOAD = 'lwr-bootstrap-on-app-load';
|
|
3
|
-
// Measure the point where the app has been defined via customElements.define
|
|
4
|
-
const ON_APP_INIT = 'lwr-bootstrap-on-app-init';
|
|
5
|
-
export { ON_APP_LOAD, ON_APP_INIT };
|
|
6
|
-
//# sourceMappingURL=metrics.js.map
|