@lwrjs/shared-utils 0.7.0-alpha.2 → 0.7.0-alpha.3
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/identity.cjs +1 -2
- package/build/cjs/mappings.cjs +2 -2
- package/build/es/identity.js +1 -2
- package/build/es/mappings.js +2 -2
- package/package.json +4 -4
package/build/cjs/identity.cjs
CHANGED
|
@@ -218,10 +218,9 @@ function getModuleIdentity(req) {
|
|
|
218
218
|
}
|
|
219
219
|
function getMappingIdentity(req) {
|
|
220
220
|
const {specifiers} = req.params;
|
|
221
|
-
const modifiers = req.query.importer ? {importer: decodeURIComponent(req.query.importer)} : {};
|
|
222
221
|
const moduleIds = explodeSpecifiers(specifiers).map((obj) => ({
|
|
223
222
|
...obj,
|
|
224
|
-
|
|
223
|
+
importer: req.query.importer
|
|
225
224
|
}));
|
|
226
225
|
return {
|
|
227
226
|
moduleIds
|
package/build/cjs/mappings.cjs
CHANGED
|
@@ -46,8 +46,8 @@ async function getImportMetadataMappings(moduleIds, runtimeEnvironment, runtimeP
|
|
|
46
46
|
const moduleGraph = await (0, import_graph.getModuleGraphs)(specifier, {includeUris: true, includeLinkedDefinitions: true, depth}, moduleRegistry, runtimeEnvironment.bundle ? moduleBundler : moduleRegistry, runtimeEnvironment, runtimeParams, visitedCache);
|
|
47
47
|
importMetadata = await toImportMetadata(moduleGraph, importMetadata, moduleRegistry, runtimeEnvironment, runtimeParams);
|
|
48
48
|
}
|
|
49
|
-
if (requestedSpecifier !== specifier
|
|
50
|
-
const requestedSpecifierPlusImporter = `${requestedSpecifier}?importer=${
|
|
49
|
+
if (requestedSpecifier !== specifier) {
|
|
50
|
+
const requestedSpecifierPlusImporter = `${requestedSpecifier}?importer=${moduleId.importer}`;
|
|
51
51
|
const specifiersArray = Object.values(importMetadata.imports).find((a) => a.includes(specifier));
|
|
52
52
|
if (!specifiersArray) {
|
|
53
53
|
throw new Error("Could not find: " + specifier + " in " + JSON.stringify(importMetadata.imports));
|
package/build/es/identity.js
CHANGED
|
@@ -281,10 +281,9 @@ export function getModuleIdentity(req) {
|
|
|
281
281
|
}
|
|
282
282
|
export function getMappingIdentity(req) {
|
|
283
283
|
const { specifiers } = req.params;
|
|
284
|
-
const modifiers = req.query.importer ? { importer: decodeURIComponent(req.query.importer) } : {};
|
|
285
284
|
const moduleIds = explodeSpecifiers(specifiers).map((obj) => ({
|
|
286
285
|
...obj,
|
|
287
|
-
|
|
286
|
+
importer: req.query.importer,
|
|
288
287
|
}));
|
|
289
288
|
return {
|
|
290
289
|
moduleIds,
|
package/build/es/mappings.js
CHANGED
|
@@ -30,8 +30,8 @@ export async function getImportMetadataMappings(moduleIds, runtimeEnvironment, r
|
|
|
30
30
|
importMetadata = await toImportMetadata(moduleGraph, importMetadata, moduleRegistry, runtimeEnvironment, runtimeParams);
|
|
31
31
|
}
|
|
32
32
|
// If the requested specifier is not the same as the versioned specifier, include the requested specifier's importer.
|
|
33
|
-
if (requestedSpecifier !== specifier
|
|
34
|
-
const requestedSpecifierPlusImporter = `${requestedSpecifier}?importer=${
|
|
33
|
+
if (requestedSpecifier !== specifier) {
|
|
34
|
+
const requestedSpecifierPlusImporter = `${requestedSpecifier}?importer=${moduleId.importer}`;
|
|
35
35
|
const specifiersArray = Object.values(importMetadata.imports).find((a) => a.includes(specifier));
|
|
36
36
|
if (!specifiersArray) {
|
|
37
37
|
throw new Error('Could not find: ' + specifier + ' in ' + JSON.stringify(importMetadata.imports));
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.7.0-alpha.
|
|
7
|
+
"version": "0.7.0-alpha.3",
|
|
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.7.0-alpha.
|
|
47
|
-
"@lwrjs/types": "0.7.0-alpha.
|
|
46
|
+
"@lwrjs/diagnostics": "0.7.0-alpha.3",
|
|
47
|
+
"@lwrjs/types": "0.7.0-alpha.3",
|
|
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": "5331416846f2de30b42a6c17f9ef723de2f30271"
|
|
55
55
|
}
|