@lwrjs/shared-utils 0.17.2-alpha.0 → 0.17.2-alpha.2
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/fs.cjs +1 -3
- package/build/cjs/graph.cjs +1 -3
- package/build/es/fs.js +2 -4
- package/build/es/graph.js +2 -4
- package/package.json +4 -4
package/build/cjs/fs.cjs
CHANGED
|
@@ -168,9 +168,7 @@ function normalizeResourcePath(rawPath, {rootDir, assets, contentDir, layoutsDir
|
|
|
168
168
|
return rawPath.replace(RESOURCE_DIR_REGEX, function(fullMatch, m1, m2) {
|
|
169
169
|
const alias = assetsMap[m1] || assetsMap[m2];
|
|
170
170
|
if (!alias && !allowUnresolvedAlias) {
|
|
171
|
-
throw
|
|
172
|
-
description: import_diagnostics.descriptions.UNRESOLVABLE.DIR_ALIAS(fullMatch)
|
|
173
|
-
}, import_diagnostics.LwrUnresolvableError);
|
|
171
|
+
throw new import_diagnostics.LwrUnresolvableError(import_diagnostics.descriptions.UNRESOLVABLE.DIR_ALIAS(fullMatch), "asset");
|
|
174
172
|
}
|
|
175
173
|
return alias;
|
|
176
174
|
});
|
package/build/cjs/graph.cjs
CHANGED
|
@@ -112,9 +112,7 @@ async function getModuleGraphs(specifier, options, moduleRegistry, defRegistry,
|
|
|
112
112
|
};
|
|
113
113
|
const moduleDef = isBundler(defRegistry) ? await defRegistry.getModuleBundle(versionedModuleId, runtimeEnvironment, runtimeParams) : await defRegistry.getModule(versionedModuleId, runtimeParams);
|
|
114
114
|
if (!moduleDef) {
|
|
115
|
-
throw
|
|
116
|
-
description: import_diagnostics.descriptions.UNRESOLVABLE.MODULE_ENTRY(versionedModuleId.specifier)
|
|
117
|
-
}, import_diagnostics.LwrUnresolvableError);
|
|
115
|
+
throw new import_diagnostics.LwrUnresolvableError(import_diagnostics.descriptions.UNRESOLVABLE.MODULE_ENTRY(versionedModuleId.specifier), "module");
|
|
118
116
|
}
|
|
119
117
|
const flattened = [];
|
|
120
118
|
await traverse(moduleDef, depth, flattened, 0, acc, defRegistry, runtimeEnvironment, runtimeParams);
|
package/build/es/fs.js
CHANGED
|
@@ -3,7 +3,7 @@ import pathLib from 'path';
|
|
|
3
3
|
import url from 'url';
|
|
4
4
|
import crypto from 'crypto';
|
|
5
5
|
import { slugify } from './identity.js';
|
|
6
|
-
import { LwrUnresolvableError,
|
|
6
|
+
import { LwrUnresolvableError, descriptions } from '@lwrjs/diagnostics';
|
|
7
7
|
import { lookup } from 'mime-types';
|
|
8
8
|
import { Readable } from 'stream';
|
|
9
9
|
import { logger } from '@lwrjs/diagnostics';
|
|
@@ -185,9 +185,7 @@ export function normalizeResourcePath(rawPath, { rootDir, assets, contentDir, la
|
|
|
185
185
|
return rawPath.replace(RESOURCE_DIR_REGEX, function (fullMatch, m1, m2) {
|
|
186
186
|
const alias = assetsMap[m1] || assetsMap[m2];
|
|
187
187
|
if (!alias && !allowUnresolvedAlias) {
|
|
188
|
-
throw
|
|
189
|
-
description: descriptions.UNRESOLVABLE.DIR_ALIAS(fullMatch),
|
|
190
|
-
}, LwrUnresolvableError);
|
|
188
|
+
throw new LwrUnresolvableError(descriptions.UNRESOLVABLE.DIR_ALIAS(fullMatch), 'asset');
|
|
191
189
|
}
|
|
192
190
|
return alias;
|
|
193
191
|
});
|
package/build/es/graph.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getSpecifier, getVersionedModuleId, isBundleDefinition } from './identity.js';
|
|
2
|
-
import { LwrUnresolvableError,
|
|
2
|
+
import { LwrUnresolvableError, descriptions } from '@lwrjs/diagnostics';
|
|
3
3
|
import { ModuleNameType } from './import-metadata.js';
|
|
4
4
|
export var GraphDepth;
|
|
5
5
|
(function (GraphDepth) {
|
|
@@ -117,9 +117,7 @@ options, moduleRegistry, defRegistry, runtimeEnvironment, runtimeParams, visited
|
|
|
117
117
|
? await defRegistry.getModuleBundle(versionedModuleId, runtimeEnvironment, runtimeParams)
|
|
118
118
|
: await defRegistry.getModule(versionedModuleId, runtimeParams);
|
|
119
119
|
if (!moduleDef) {
|
|
120
|
-
throw
|
|
121
|
-
description: descriptions.UNRESOLVABLE.MODULE_ENTRY(versionedModuleId.specifier),
|
|
122
|
-
}, LwrUnresolvableError);
|
|
120
|
+
throw new LwrUnresolvableError(descriptions.UNRESOLVABLE.MODULE_ENTRY(versionedModuleId.specifier), 'module');
|
|
123
121
|
}
|
|
124
122
|
const flattened = [];
|
|
125
123
|
await traverse(moduleDef, depth, flattened, 0, acc, defRegistry, runtimeEnvironment, runtimeParams);
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.17.2-alpha.
|
|
7
|
+
"version": "0.17.2-alpha.2",
|
|
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.17.2-alpha.
|
|
40
|
+
"@lwrjs/diagnostics": "0.17.2-alpha.2",
|
|
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.17.2-alpha.
|
|
53
|
+
"@lwrjs/types": "0.17.2-alpha.2",
|
|
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": "739b237f5d7f2c1989142cb505a56cc763f21976"
|
|
62
62
|
}
|