@lwrjs/module-registry 0.6.0-alpha.2 → 0.6.0-alpha.6
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 +40 -30
- package/build/cjs/linker/linker.cjs +24 -24
- package/build/cjs/linker/strategies/amd-strategy.cjs +10 -10
- package/build/cjs/linker/strategies/esm-strategy.cjs +12 -12
- package/build/cjs/module-record.cjs +17 -17
- package/build/cjs/signature.cjs +10 -10
- package/build/es/index.d.ts +2 -0
- package/build/es/index.js +21 -7
- package/build/es/linker/strategies/esm-strategy.js +2 -3
- package/package.json +6 -6
package/build/cjs/index.cjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
3
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", {value: true});
|
|
8
8
|
var __export = (target, all) => {
|
|
9
|
-
__markAsModule(target);
|
|
10
9
|
for (var name in all)
|
|
11
|
-
__defProp(target, name, {
|
|
10
|
+
__defProp(target, name, {get: all[name], enumerable: true});
|
|
12
11
|
};
|
|
13
|
-
var
|
|
12
|
+
var __exportStar = (target, module2, desc) => {
|
|
14
13
|
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
15
14
|
for (let key of __getOwnPropNames(module2))
|
|
16
15
|
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
17
|
-
__defProp(target, key, {
|
|
16
|
+
__defProp(target, key, {get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable});
|
|
18
17
|
}
|
|
19
18
|
return target;
|
|
20
19
|
};
|
|
21
20
|
var __toModule = (module2) => {
|
|
22
|
-
return
|
|
21
|
+
return __exportStar(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? {get: () => module2.default, enumerable: true} : {value: module2, enumerable: true})), module2);
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
// packages/@lwrjs/module-registry/src/index.ts
|
|
25
|
+
__markAsModule(exports);
|
|
26
26
|
__export(exports, {
|
|
27
27
|
LwrModuleRegistry: () => LwrModuleRegistry
|
|
28
28
|
});
|
|
@@ -38,6 +38,7 @@ var LwrModuleRegistry = class {
|
|
|
38
38
|
this.providers = [];
|
|
39
39
|
this.moduleDefCache = new Map();
|
|
40
40
|
this.moduleLinkedCache = new Map();
|
|
41
|
+
this.inflightModuleDefinitions = new import_shared_utils.InflightTasks();
|
|
41
42
|
this.name = "lwr-module-registry";
|
|
42
43
|
this.context = context;
|
|
43
44
|
this.globalConfig = globalConfig;
|
|
@@ -48,10 +49,10 @@ var LwrModuleRegistry = class {
|
|
|
48
49
|
if (globalConfig.environment?.default) {
|
|
49
50
|
this.interchangeableModules = (0, import_shared_utils.discoverInterchangeableModules)(globalConfig.lwc.modules, globalConfig.lwc.interchangeableModulesMap);
|
|
50
51
|
}
|
|
51
|
-
context.appObserver.onModuleSourceChange(async ({
|
|
52
|
+
context.appObserver.onModuleSourceChange(async ({payload: moduleCompiled}) => {
|
|
52
53
|
const id = moduleCompiled.id;
|
|
53
54
|
if (!this.moduleDefCache.has(id)) {
|
|
54
|
-
console.log("[WARNING] Unable to find match in moduleDefCache", {
|
|
55
|
+
console.log("[WARNING] Unable to find match in moduleDefCache", {id});
|
|
55
56
|
}
|
|
56
57
|
this.moduleDefCache.delete(id);
|
|
57
58
|
const linkedModules = this.moduleLinkedCache.get(id);
|
|
@@ -70,7 +71,7 @@ var LwrModuleRegistry = class {
|
|
|
70
71
|
const uri = (0, import_esm_strategy.default)(moduleId, runtimeEnvironment, runtimeParams, signature);
|
|
71
72
|
return uri;
|
|
72
73
|
}
|
|
73
|
-
const {
|
|
74
|
+
const {bundle, format} = runtimeEnvironment;
|
|
74
75
|
if (bundle) {
|
|
75
76
|
return new Promise((resolve, reject) => {
|
|
76
77
|
(0, import_signature.getBundleSignature)(moduleId, this).then((bundleSignature) => resolve((0, import_esm_strategy.default)(moduleId, runtimeEnvironment, runtimeParams, bundleSignature))).catch(reject);
|
|
@@ -88,34 +89,41 @@ var LwrModuleRegistry = class {
|
|
|
88
89
|
return this.delegateGetModuleEntryOnServices(moduleId, runtimeParams);
|
|
89
90
|
}
|
|
90
91
|
async getModule(moduleId, runtimeParams) {
|
|
91
|
-
const { locker } = this.globalConfig;
|
|
92
92
|
const moduleEntry = await this.getModuleEntry(moduleId, runtimeParams);
|
|
93
93
|
const cacheDisabled = process.env.NOCACHE === "true";
|
|
94
94
|
if (cacheDisabled === false && this.moduleDefCache.has(moduleEntry.id)) {
|
|
95
95
|
return this.moduleDefCache.get(moduleEntry.id);
|
|
96
96
|
}
|
|
97
|
+
const createModulePromiseCtor = async () => {
|
|
98
|
+
return this.createModuleDefinition(moduleId, runtimeParams).then((moduleDef) => {
|
|
99
|
+
if (cacheDisabled === false) {
|
|
100
|
+
this.moduleDefCache.set(moduleDef.id, moduleDef);
|
|
101
|
+
}
|
|
102
|
+
return moduleDef;
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
return this.inflightModuleDefinitions.execute(moduleEntry.id, createModulePromiseCtor, this);
|
|
106
|
+
}
|
|
107
|
+
async createModuleDefinition(moduleId, runtimeParams) {
|
|
108
|
+
const {locker} = this.globalConfig;
|
|
97
109
|
const moduleCompiled = await this.delegateGetModuleOnProviders(moduleId, runtimeParams);
|
|
98
110
|
if (locker.enabled && !locker.clientOnly) {
|
|
99
|
-
const {
|
|
111
|
+
const {runtimeEnvironment} = this.context;
|
|
100
112
|
const sourcemap = typeof runtimeEnvironment.sourceMapUrl === "string";
|
|
101
|
-
const {
|
|
113
|
+
const {code: lockerizedCode} = this.context.compiler.lockerize(moduleCompiled, locker, sourcemap);
|
|
102
114
|
moduleCompiled.compiledSource = lockerizedCode;
|
|
103
115
|
}
|
|
104
116
|
const moduleRecord = await (0, import_module_record.getModuleRecord)(moduleCompiled, this, this.context.compiler);
|
|
105
|
-
|
|
106
|
-
if (cacheDisabled === false) {
|
|
107
|
-
this.moduleDefCache.set(moduleDef.id, moduleDef);
|
|
108
|
-
}
|
|
109
|
-
return moduleDef;
|
|
117
|
+
return {...moduleCompiled, moduleRecord};
|
|
110
118
|
}
|
|
111
119
|
async getLinkedModule(moduleId, runtimeEnvironment, runtimeParams) {
|
|
112
120
|
const moduleEntry = await this.getModuleEntry(moduleId, runtimeParams);
|
|
113
121
|
const id = moduleEntry.id;
|
|
114
|
-
const {
|
|
122
|
+
const {format, compat, debug, minify} = runtimeEnvironment;
|
|
115
123
|
const locale = runtimeParams?.["locale"];
|
|
116
124
|
const environment = runtimeParams?.["environment"];
|
|
117
125
|
const {
|
|
118
|
-
locker: {
|
|
126
|
+
locker: {enabled: lockerEnabled}
|
|
119
127
|
} = this.globalConfig;
|
|
120
128
|
const cacheDisabled = process.env.NOCACHE === "true";
|
|
121
129
|
if (cacheDisabled === false && this.moduleLinkedCache.has(id)) {
|
|
@@ -138,17 +146,17 @@ var LwrModuleRegistry = class {
|
|
|
138
146
|
const moduleLinked = await this.createLinkedModuleDefinition(moduleDef, runtimeEnvironment, runtimeParams);
|
|
139
147
|
if (cacheDisabled === false) {
|
|
140
148
|
const linkedMap = this.moduleLinkedCache.get(id) || new Map();
|
|
141
|
-
linkedMap.set((0, import_shared_utils.getCacheKeyFromJson)({
|
|
149
|
+
linkedMap.set((0, import_shared_utils.getCacheKeyFromJson)({format, compat, debug, minify, lockerEnabled, locale, environment}), moduleLinked);
|
|
142
150
|
this.moduleLinkedCache.set(id, linkedMap);
|
|
143
151
|
}
|
|
144
152
|
return moduleLinked;
|
|
145
153
|
}
|
|
146
154
|
async createLinkedModuleDefinition(moduleDef, runtimeEnvironment, runtimeParams) {
|
|
147
|
-
const {
|
|
155
|
+
const {format, minify, debug} = runtimeEnvironment;
|
|
148
156
|
const minified = !!minify && !debug;
|
|
149
|
-
const {
|
|
157
|
+
const {amdLoader, esmLoader} = this.globalConfig;
|
|
150
158
|
if (format === "amd") {
|
|
151
|
-
const loaderModuleEntry = await this.getModuleEntry({
|
|
159
|
+
const loaderModuleEntry = await this.getModuleEntry({specifier: amdLoader}, runtimeParams);
|
|
152
160
|
const {
|
|
153
161
|
id,
|
|
154
162
|
code: linkedES6,
|
|
@@ -156,14 +164,15 @@ var LwrModuleRegistry = class {
|
|
|
156
164
|
} = await (0, import_linker.link)(this, moduleDef, import_amd_strategy.default, runtimeEnvironment, runtimeParams, {
|
|
157
165
|
amdLoaderModule: loaderModuleEntry
|
|
158
166
|
}, this.interchangeableModules);
|
|
159
|
-
const {
|
|
167
|
+
const {code: amdSource} = await this.context.compiler.convertToAmd(linkedES6, {
|
|
160
168
|
id
|
|
161
169
|
});
|
|
162
170
|
let linkedAmdSource = amdSource;
|
|
163
171
|
if (minified) {
|
|
164
|
-
const {
|
|
172
|
+
const {code: minifiedCode} = await this.context.compiler.minifyJavascript(amdSource);
|
|
165
173
|
linkedAmdSource = minifiedCode;
|
|
166
174
|
}
|
|
175
|
+
linkedModuleRecord.dynamicImports = linkedModuleRecord.dynamicImports?.filter((imp) => imp.moduleNameType !== import_shared_utils.ModuleNameType.unresolved);
|
|
167
176
|
return {
|
|
168
177
|
...moduleDef,
|
|
169
178
|
linkedSource: linkedAmdSource,
|
|
@@ -177,16 +186,17 @@ var LwrModuleRegistry = class {
|
|
|
177
186
|
let loaderModuleEntry;
|
|
178
187
|
const dynamicImports = moduleDef.moduleRecord.dynamicImports;
|
|
179
188
|
if (moduleDef.moduleEntry.specifier !== esmLoader && dynamicImports && dynamicImports.some((d) => d.moduleNameType === import_shared_utils.ModuleNameType.unresolved)) {
|
|
180
|
-
loaderModuleEntry = await this.getModuleEntry({
|
|
189
|
+
loaderModuleEntry = await this.getModuleEntry({specifier: esmLoader}, runtimeParams);
|
|
181
190
|
}
|
|
182
|
-
const {
|
|
191
|
+
const {code: esmLinkedSource, linkedModuleRecord} = await (0, import_linker.link)(this, moduleDef, import_esm_strategy.default, runtimeEnvironment, runtimeParams, loaderModuleEntry && {
|
|
183
192
|
esmLoaderModule: loaderModuleEntry
|
|
184
193
|
}, this.interchangeableModules, this.globalConfig.bundleConfig?.exclude);
|
|
185
194
|
let transformedEsmCode = esmLinkedSource;
|
|
186
195
|
if (minified) {
|
|
187
|
-
const {
|
|
196
|
+
const {code: minifiedEsm} = await this.context.compiler.minifyJavascript(transformedEsmCode);
|
|
188
197
|
transformedEsmCode = minifiedEsm;
|
|
189
198
|
}
|
|
199
|
+
linkedModuleRecord.dynamicImports = linkedModuleRecord.dynamicImports?.filter((imp) => imp.moduleNameType !== import_shared_utils.ModuleNameType.unresolved);
|
|
190
200
|
return {
|
|
191
201
|
...moduleDef,
|
|
192
202
|
linkedConfig: {
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
3
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", {value: true});
|
|
8
8
|
var __export = (target, all) => {
|
|
9
|
-
__markAsModule(target);
|
|
10
9
|
for (var name in all)
|
|
11
|
-
__defProp(target, name, {
|
|
10
|
+
__defProp(target, name, {get: all[name], enumerable: true});
|
|
12
11
|
};
|
|
13
|
-
var
|
|
12
|
+
var __exportStar = (target, module2, desc) => {
|
|
14
13
|
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
15
14
|
for (let key of __getOwnPropNames(module2))
|
|
16
15
|
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
17
|
-
__defProp(target, key, {
|
|
16
|
+
__defProp(target, key, {get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable});
|
|
18
17
|
}
|
|
19
18
|
return target;
|
|
20
19
|
};
|
|
21
20
|
var __toModule = (module2) => {
|
|
22
|
-
return
|
|
21
|
+
return __exportStar(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? {get: () => module2.default, enumerable: true} : {value: module2, enumerable: true})), module2);
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
// packages/@lwrjs/module-registry/src/linker/linker.ts
|
|
25
|
+
__markAsModule(exports);
|
|
26
26
|
__export(exports, {
|
|
27
27
|
link: () => link
|
|
28
28
|
});
|
|
@@ -30,12 +30,12 @@ var import_shared_utils = __toModule(require("@lwrjs/shared-utils"));
|
|
|
30
30
|
var import_shared_utils2 = __toModule(require("@lwrjs/shared-utils"));
|
|
31
31
|
var import_signature = __toModule(require("../signature.cjs"));
|
|
32
32
|
async function link(moduleRegistry, moduleDef, strategy, runtimeEnvironment, runtimeParams, config, interchangeableModules, exclude) {
|
|
33
|
-
const {
|
|
34
|
-
const {
|
|
33
|
+
const {specifier, version, compiledSource, moduleRecord} = moduleDef;
|
|
34
|
+
const {imports, dynamicImports} = moduleRecord;
|
|
35
35
|
const codeStringBuilder = (0, import_shared_utils.createStringBuilder)(compiledSource);
|
|
36
36
|
const amdLoaderModule = config?.amdLoaderModule;
|
|
37
37
|
const esmLoaderModule = config?.esmLoaderModule;
|
|
38
|
-
const id = strategy({
|
|
38
|
+
const id = strategy({specifier, version}, runtimeEnvironment, runtimeParams);
|
|
39
39
|
let linkedImports = [];
|
|
40
40
|
let linkedDynamicImports = [];
|
|
41
41
|
if (imports && imports.length > 0) {
|
|
@@ -62,32 +62,32 @@ async function link(moduleRegistry, moduleDef, strategy, runtimeEnvironment, run
|
|
|
62
62
|
if (runtimeEnvironment.bundle && runtimeEnvironment.format === "esm" && exclude?.includes(importRef.specifier)) {
|
|
63
63
|
signature = await (0, import_signature.getBundleSignature)(importRef, moduleRegistry);
|
|
64
64
|
}
|
|
65
|
-
const {
|
|
65
|
+
const {locations, sourceSpecifier} = importRef;
|
|
66
66
|
const link2 = strategy(importRef, runtimeEnvironment, runtimeParams, signature);
|
|
67
67
|
const linkedLocations = locations.map((location) => {
|
|
68
|
-
const {
|
|
68
|
+
const {startColumn, endColumn} = location;
|
|
69
69
|
codeStringBuilder.overwrite(startColumn, endColumn, link2);
|
|
70
70
|
return {
|
|
71
71
|
startColumn,
|
|
72
72
|
endColumn: endColumn + link2.length
|
|
73
73
|
};
|
|
74
74
|
});
|
|
75
|
-
return {
|
|
75
|
+
return {...importRef, sourceSpecifier, specifier: link2, locations: linkedLocations};
|
|
76
76
|
}));
|
|
77
77
|
}
|
|
78
78
|
if (dynamicImports && dynamicImports.length > 0) {
|
|
79
79
|
let loaderSizeOffset = 0;
|
|
80
80
|
linkedDynamicImports = await Promise.all(dynamicImports.map(async (importRef) => {
|
|
81
|
-
const {
|
|
81
|
+
const {locations, sourceSpecifier} = importRef;
|
|
82
82
|
let signature;
|
|
83
83
|
const isStringLiteral = importRef.moduleNameType === import_shared_utils2.ModuleNameType.string;
|
|
84
84
|
if (isStringLiteral && runtimeEnvironment.bundle && runtimeEnvironment.format === "esm") {
|
|
85
85
|
signature = await (0, import_signature.getBundleSignature)(importRef, moduleRegistry);
|
|
86
86
|
}
|
|
87
87
|
const link2 = isStringLiteral ? strategy(importRef, runtimeEnvironment, runtimeParams, signature) : importRef.specifier;
|
|
88
|
-
const linkedLocations = locations.map(({
|
|
89
|
-
const {
|
|
90
|
-
const {
|
|
88
|
+
const linkedLocations = locations.map(({location, importLocation}) => {
|
|
89
|
+
const {startColumn, endColumn} = location;
|
|
90
|
+
const {startColumn: importStart, endColumn: importEnd} = importLocation;
|
|
91
91
|
if (isStringLiteral) {
|
|
92
92
|
codeStringBuilder.overwrite(startColumn + 1, endColumn - 1, link2);
|
|
93
93
|
}
|
|
@@ -95,7 +95,7 @@ async function link(moduleRegistry, moduleDef, strategy, runtimeEnvironment, run
|
|
|
95
95
|
codeStringBuilder.overwrite(importStart, importEnd, "load(");
|
|
96
96
|
loaderSizeOffset = 2;
|
|
97
97
|
if (!isStringLiteral) {
|
|
98
|
-
const importerSpecifier = (0, import_shared_utils2.getSpecifier)({
|
|
98
|
+
const importerSpecifier = (0, import_shared_utils2.getSpecifier)({specifier, version});
|
|
99
99
|
codeStringBuilder.overwrite(endColumn, endColumn + 1, `, '${importerSpecifier}')`);
|
|
100
100
|
loaderSizeOffset = -1 * importerSpecifier.length - 2;
|
|
101
101
|
}
|
|
@@ -111,17 +111,17 @@ async function link(moduleRegistry, moduleDef, strategy, runtimeEnvironment, run
|
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
113
|
});
|
|
114
|
-
return {
|
|
114
|
+
return {...importRef, sourceSpecifier, specifier: link2, locations: linkedLocations};
|
|
115
115
|
}));
|
|
116
116
|
}
|
|
117
117
|
if (dynamicImports && dynamicImports.length > 0 && (amdLoaderModule || esmLoaderModule)) {
|
|
118
|
-
const {
|
|
119
|
-
const {
|
|
118
|
+
const {version: version2, specifier: specifier2} = amdLoaderModule || esmLoaderModule;
|
|
119
|
+
const {namespace, name} = (0, import_shared_utils2.explodeSpecifier)(specifier2);
|
|
120
120
|
let signature;
|
|
121
121
|
if (esmLoaderModule && runtimeEnvironment.bundle) {
|
|
122
|
-
signature = await (0, import_signature.getBundleSignature)({
|
|
122
|
+
signature = await (0, import_signature.getBundleSignature)({version: version2, specifier: specifier2}, moduleRegistry);
|
|
123
123
|
}
|
|
124
|
-
const loaderLink = strategy({
|
|
124
|
+
const loaderLink = strategy({specifier: specifier2, version: version2}, runtimeEnvironment, runtimeParams, signature);
|
|
125
125
|
codeStringBuilder.prepend(`import { load } from "${loaderLink}";
|
|
126
126
|
`);
|
|
127
127
|
linkedImports.unshift({
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
3
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", {value: true});
|
|
8
8
|
var __export = (target, all) => {
|
|
9
|
-
__markAsModule(target);
|
|
10
9
|
for (var name in all)
|
|
11
|
-
__defProp(target, name, {
|
|
10
|
+
__defProp(target, name, {get: all[name], enumerable: true});
|
|
12
11
|
};
|
|
13
|
-
var
|
|
12
|
+
var __exportStar = (target, module2, desc) => {
|
|
14
13
|
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
15
14
|
for (let key of __getOwnPropNames(module2))
|
|
16
15
|
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
17
|
-
__defProp(target, key, {
|
|
16
|
+
__defProp(target, key, {get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable});
|
|
18
17
|
}
|
|
19
18
|
return target;
|
|
20
19
|
};
|
|
21
20
|
var __toModule = (module2) => {
|
|
22
|
-
return
|
|
21
|
+
return __exportStar(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? {get: () => module2.default, enumerable: true} : {value: module2, enumerable: true})), module2);
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
// packages/@lwrjs/module-registry/src/linker/strategies/amd-strategy.ts
|
|
25
|
+
__markAsModule(exports);
|
|
26
26
|
__export(exports, {
|
|
27
27
|
default: () => amdLinkingStrategy
|
|
28
28
|
});
|
|
29
29
|
var import_shared_utils = __toModule(require("@lwrjs/shared-utils"));
|
|
30
30
|
function amdLinkingStrategy(moduleId) {
|
|
31
|
-
const {
|
|
32
|
-
return (0, import_shared_utils.getSpecifier)({
|
|
31
|
+
const {specifier, version} = moduleId;
|
|
32
|
+
return (0, import_shared_utils.getSpecifier)({specifier, version: (0, import_shared_utils.normalizeVersionToUri)(version)});
|
|
33
33
|
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
3
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", {value: true});
|
|
8
8
|
var __export = (target, all) => {
|
|
9
|
-
__markAsModule(target);
|
|
10
9
|
for (var name in all)
|
|
11
|
-
__defProp(target, name, {
|
|
10
|
+
__defProp(target, name, {get: all[name], enumerable: true});
|
|
12
11
|
};
|
|
13
|
-
var
|
|
12
|
+
var __exportStar = (target, module2, desc) => {
|
|
14
13
|
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
15
14
|
for (let key of __getOwnPropNames(module2))
|
|
16
15
|
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
17
|
-
__defProp(target, key, {
|
|
16
|
+
__defProp(target, key, {get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable});
|
|
18
17
|
}
|
|
19
18
|
return target;
|
|
20
19
|
};
|
|
21
20
|
var __toModule = (module2) => {
|
|
22
|
-
return
|
|
21
|
+
return __exportStar(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? {get: () => module2.default, enumerable: true} : {value: module2, enumerable: true})), module2);
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
// packages/@lwrjs/module-registry/src/linker/strategies/esm-strategy.ts
|
|
25
|
+
__markAsModule(exports);
|
|
26
26
|
__export(exports, {
|
|
27
27
|
default: () => linkEsm
|
|
28
28
|
});
|
|
@@ -30,14 +30,14 @@ var import_shared_utils = __toModule(require("@lwrjs/shared-utils"));
|
|
|
30
30
|
var SIGNATURE_SIGIL = "s";
|
|
31
31
|
var LATEST_SIG = "latest";
|
|
32
32
|
function linkEsm(moduleId, environment, params = {}, signature) {
|
|
33
|
-
const {
|
|
34
|
-
const {
|
|
33
|
+
const {bundle, debug} = environment;
|
|
34
|
+
const {specifier, version} = moduleId;
|
|
35
35
|
const uriPrefix = (0, import_shared_utils.getModuleUriPrefix)(environment, params);
|
|
36
|
-
const vSpecifier = (0, import_shared_utils.getSpecifier)({
|
|
36
|
+
const vSpecifier = (0, import_shared_utils.getSpecifier)({specifier, version: (0, import_shared_utils.normalizeVersionToUri)(version)});
|
|
37
37
|
const encodedVSpecifier = encodeURIComponent(vSpecifier);
|
|
38
38
|
const latestSignature = signature === void 0 || signature === LATEST_SIG;
|
|
39
39
|
const sigilSignature = latestSignature ? LATEST_SIG : `${SIGNATURE_SIGIL}/${signature}`;
|
|
40
|
-
const prettyUrl = (bundle ? "bundle_" : "") +
|
|
40
|
+
const prettyUrl = (bundle ? "bundle_" : "") + (0, import_shared_utils.prettyModuleUriSuffix)(specifier);
|
|
41
41
|
const debugModifier = debug ? "?debug=true" : "";
|
|
42
42
|
return `${uriPrefix}${encodedVSpecifier}/${sigilSignature}/${prettyUrl}.js${debugModifier}`;
|
|
43
43
|
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
3
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", {value: true});
|
|
8
8
|
var __export = (target, all) => {
|
|
9
|
-
__markAsModule(target);
|
|
10
9
|
for (var name in all)
|
|
11
|
-
__defProp(target, name, {
|
|
10
|
+
__defProp(target, name, {get: all[name], enumerable: true});
|
|
12
11
|
};
|
|
13
|
-
var
|
|
12
|
+
var __exportStar = (target, module2, desc) => {
|
|
14
13
|
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
15
14
|
for (let key of __getOwnPropNames(module2))
|
|
16
15
|
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
17
|
-
__defProp(target, key, {
|
|
16
|
+
__defProp(target, key, {get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable});
|
|
18
17
|
}
|
|
19
18
|
return target;
|
|
20
19
|
};
|
|
21
20
|
var __toModule = (module2) => {
|
|
22
|
-
return
|
|
21
|
+
return __exportStar(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? {get: () => module2.default, enumerable: true} : {value: module2, enumerable: true})), module2);
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
// packages/@lwrjs/module-registry/src/module-record.ts
|
|
25
|
+
__markAsModule(exports);
|
|
26
26
|
__export(exports, {
|
|
27
27
|
getModuleRecord: () => getModuleRecord
|
|
28
28
|
});
|
|
@@ -34,7 +34,7 @@ async function resolveRelativeImport(registry, moduleSpecifier, importeeEntry, v
|
|
|
34
34
|
moduleSpecifier = `./${import_path.default.join(importeePath, "..", moduleSpecifier)}`;
|
|
35
35
|
}
|
|
36
36
|
const specifier = `${importeeSpecifier}#${moduleSpecifier.substr(2)}`;
|
|
37
|
-
const {
|
|
37
|
+
const {namespace, name} = (0, import_shared_utils.explodeSpecifier)(specifier);
|
|
38
38
|
const dependencyModuleEntry = await registry.getModuleEntry({
|
|
39
39
|
specifier,
|
|
40
40
|
version,
|
|
@@ -51,8 +51,8 @@ async function resolveRelativeImport(registry, moduleSpecifier, importeeEntry, v
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
async function resolveExternalImport(registry, moduleSpecifier, importeeEntry, location) {
|
|
54
|
-
const {
|
|
55
|
-
const {
|
|
54
|
+
const {namespace, name, specifier} = (0, import_shared_utils.explodeSpecifier)(moduleSpecifier);
|
|
55
|
+
const {entry, virtual} = importeeEntry;
|
|
56
56
|
const moduleEntryRoot = virtual ? void 0 : import_path.default.dirname(entry);
|
|
57
57
|
const dependencyModuleEntry = await registry.getModuleEntry({
|
|
58
58
|
specifier: moduleSpecifier,
|
|
@@ -72,16 +72,16 @@ async function resolveExternalImport(registry, moduleSpecifier, importeeEntry, l
|
|
|
72
72
|
async function getModuleRecord(compiledModule, registry, compiler) {
|
|
73
73
|
const imports = [];
|
|
74
74
|
const dynamicImports = [];
|
|
75
|
-
const {
|
|
75
|
+
const {compiledMetadata: defaultCompilerMetadata, moduleEntry, version} = compiledModule;
|
|
76
76
|
const compiledMetadata = defaultCompilerMetadata || {};
|
|
77
|
-
const {
|
|
77
|
+
const {imports: compiledModuleImports, dynamicImports: compiledModuleDynamicImports} = await compiler.getModuleMetadata(compiledModule.compiledSource);
|
|
78
78
|
Object.assign(compiledMetadata, {
|
|
79
79
|
imports: compiledModuleImports,
|
|
80
80
|
dynamicImports: compiledModuleDynamicImports
|
|
81
81
|
});
|
|
82
82
|
if (compiledMetadata && compiledMetadata.imports && compiledMetadata.imports.length > 0) {
|
|
83
83
|
const visitedImports = new Set();
|
|
84
|
-
for (const {
|
|
84
|
+
for (const {moduleSpecifier, location} of compiledMetadata.imports) {
|
|
85
85
|
if (!visitedImports.has(moduleSpecifier)) {
|
|
86
86
|
visitedImports.add(moduleSpecifier);
|
|
87
87
|
if (moduleSpecifier.startsWith(".")) {
|
|
@@ -124,7 +124,7 @@ async function getModuleRecord(compiledModule, registry, compiler) {
|
|
|
124
124
|
]
|
|
125
125
|
});
|
|
126
126
|
} else if (moduleSpecifier.startsWith(".")) {
|
|
127
|
-
const {
|
|
127
|
+
const {locations, ...resolvedImport} = await resolveRelativeImport(registry, moduleSpecifier, moduleEntry, version, location);
|
|
128
128
|
dynamicImports.push({
|
|
129
129
|
...resolvedImport,
|
|
130
130
|
moduleNameType: import_shared_utils.ModuleNameType.string,
|
|
@@ -136,7 +136,7 @@ async function getModuleRecord(compiledModule, registry, compiler) {
|
|
|
136
136
|
]
|
|
137
137
|
});
|
|
138
138
|
} else {
|
|
139
|
-
const {
|
|
139
|
+
const {locations, ...resolvedImport} = await resolveExternalImport(registry, moduleSpecifier, moduleEntry, location);
|
|
140
140
|
dynamicImports.push({
|
|
141
141
|
...resolvedImport,
|
|
142
142
|
moduleNameType: import_shared_utils.ModuleNameType.string,
|
|
@@ -151,7 +151,7 @@ async function getModuleRecord(compiledModule, registry, compiler) {
|
|
|
151
151
|
} else {
|
|
152
152
|
const importReference = dynamicImports.find((i) => i.sourceSpecifier === moduleSpecifier);
|
|
153
153
|
if (importReference) {
|
|
154
|
-
importReference.locations.push({
|
|
154
|
+
importReference.locations.push({location, importLocation});
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
}
|
package/build/cjs/signature.cjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
3
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", {value: true});
|
|
8
8
|
var __export = (target, all) => {
|
|
9
|
-
__markAsModule(target);
|
|
10
9
|
for (var name in all)
|
|
11
|
-
__defProp(target, name, {
|
|
10
|
+
__defProp(target, name, {get: all[name], enumerable: true});
|
|
12
11
|
};
|
|
13
|
-
var
|
|
12
|
+
var __exportStar = (target, module2, desc) => {
|
|
14
13
|
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
15
14
|
for (let key of __getOwnPropNames(module2))
|
|
16
15
|
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
17
|
-
__defProp(target, key, {
|
|
16
|
+
__defProp(target, key, {get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable});
|
|
18
17
|
}
|
|
19
18
|
return target;
|
|
20
19
|
};
|
|
21
20
|
var __toModule = (module2) => {
|
|
22
|
-
return
|
|
21
|
+
return __exportStar(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? {get: () => module2.default, enumerable: true} : {value: module2, enumerable: true})), module2);
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
// packages/@lwrjs/module-registry/src/signature.ts
|
|
25
|
+
__markAsModule(exports);
|
|
26
26
|
__export(exports, {
|
|
27
27
|
getBundleSignature: () => getBundleSignature
|
|
28
28
|
});
|
|
@@ -43,7 +43,7 @@ async function getRecursiveModuleHash(definitions, registry, hash, visitedDefini
|
|
|
43
43
|
if (visitedDefinitions.has(definition.id)) {
|
|
44
44
|
continue;
|
|
45
45
|
}
|
|
46
|
-
const {
|
|
46
|
+
const {ownHash, moduleRecord} = definition;
|
|
47
47
|
hash.update(ownHash);
|
|
48
48
|
if (moduleRecord.imports) {
|
|
49
49
|
imports.push(...moduleRecord.imports);
|
|
@@ -64,6 +64,6 @@ async function getBundleSignature(moduleId, registry) {
|
|
|
64
64
|
}
|
|
65
65
|
function getLWCVersion() {
|
|
66
66
|
const require2 = (0, import_module.createRequire)(import_path.default.join((0, import_process.cwd)(), "./env-config.js"));
|
|
67
|
-
const {
|
|
67
|
+
const {version} = require2("lwc/package.json");
|
|
68
68
|
return version;
|
|
69
69
|
}
|
package/build/es/index.d.ts
CHANGED
|
@@ -14,11 +14,13 @@ export declare class LwrModuleRegistry implements ModuleRegistry {
|
|
|
14
14
|
emitter: LwrAppEmitter;
|
|
15
15
|
globalConfig: NormalizedLwrGlobalConfig;
|
|
16
16
|
private interchangeableModules?;
|
|
17
|
+
private inflightModuleDefinitions;
|
|
17
18
|
constructor(context: RegistryContext, globalConfig: NormalizedLwrGlobalConfig, registries?: ModuleProvider[]);
|
|
18
19
|
resolveModuleUri<R extends RuntimeEnvironment, S extends string | undefined>(moduleId: Required<Pick<ModuleId, 'specifier' | 'version'>>, runtimeEnvironment: R, runtimeParams?: RuntimeParams, signature?: S): S extends string ? string : Promise<string>;
|
|
19
20
|
addModuleProviders(registries: ModuleProvider[]): void;
|
|
20
21
|
getModuleEntry<T extends AbstractModuleId>(moduleId: T, runtimeParams?: RuntimeParams): Promise<ModuleEntry>;
|
|
21
22
|
getModule<T extends AbstractModuleId>(moduleId: T, runtimeParams?: RuntimeParams): Promise<ModuleDefinition>;
|
|
23
|
+
private createModuleDefinition;
|
|
22
24
|
getLinkedModule<T extends AbstractModuleId>(moduleId: T, runtimeEnvironment: RuntimeEnvironment, runtimeParams?: RuntimeParams): Promise<LinkedModuleDefinition>;
|
|
23
25
|
private createLinkedModuleDefinition;
|
|
24
26
|
private delegateGetModuleEntryOnServices;
|
package/build/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LwrUnresolvableError, createSingleDiagnosticError, descriptions } from '@lwrjs/diagnostics';
|
|
2
|
-
import { discoverInterchangeableModules, getCacheKeyFromJson, LATEST_SIGNATURE, ModuleNameType, } from '@lwrjs/shared-utils';
|
|
2
|
+
import { discoverInterchangeableModules, getCacheKeyFromJson, InflightTasks, LATEST_SIGNATURE, ModuleNameType, } from '@lwrjs/shared-utils';
|
|
3
3
|
import { link } from './linker/linker.js';
|
|
4
4
|
import { getModuleRecord } from './module-record.js';
|
|
5
5
|
import amdLinkingStrategy from './linker/strategies/amd-strategy.js';
|
|
@@ -10,6 +10,7 @@ export class LwrModuleRegistry {
|
|
|
10
10
|
this.providers = [];
|
|
11
11
|
this.moduleDefCache = new Map();
|
|
12
12
|
this.moduleLinkedCache = new Map();
|
|
13
|
+
this.inflightModuleDefinitions = new InflightTasks();
|
|
13
14
|
this.name = 'lwr-module-registry';
|
|
14
15
|
this.context = context;
|
|
15
16
|
this.globalConfig = globalConfig;
|
|
@@ -72,12 +73,25 @@ export class LwrModuleRegistry {
|
|
|
72
73
|
return this.delegateGetModuleEntryOnServices(moduleId, runtimeParams);
|
|
73
74
|
}
|
|
74
75
|
async getModule(moduleId, runtimeParams) {
|
|
75
|
-
const { locker } = this.globalConfig;
|
|
76
76
|
const moduleEntry = await this.getModuleEntry(moduleId, runtimeParams);
|
|
77
77
|
const cacheDisabled = process.env.NOCACHE === 'true';
|
|
78
78
|
if (cacheDisabled === false && this.moduleDefCache.has(moduleEntry.id)) {
|
|
79
|
+
// TODO add to profiling
|
|
80
|
+
// console.log('[INFO] Module Cache Hit: %s', moduleEntry.id);
|
|
79
81
|
return this.moduleDefCache.get(moduleEntry.id);
|
|
80
82
|
}
|
|
83
|
+
const createModulePromiseCtor = async () => {
|
|
84
|
+
return this.createModuleDefinition(moduleId, runtimeParams).then((moduleDef) => {
|
|
85
|
+
if (cacheDisabled === false) {
|
|
86
|
+
this.moduleDefCache.set(moduleDef.id, moduleDef);
|
|
87
|
+
}
|
|
88
|
+
return moduleDef;
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
return this.inflightModuleDefinitions.execute(moduleEntry.id, createModulePromiseCtor, this);
|
|
92
|
+
}
|
|
93
|
+
async createModuleDefinition(moduleId, runtimeParams) {
|
|
94
|
+
const { locker } = this.globalConfig;
|
|
81
95
|
const moduleCompiled = await this.delegateGetModuleOnProviders(moduleId, runtimeParams); // provider source + hash
|
|
82
96
|
/** Locker before collecting dep module records so locker imports are processed normally */
|
|
83
97
|
if (locker.enabled && !locker.clientOnly) {
|
|
@@ -87,11 +101,7 @@ export class LwrModuleRegistry {
|
|
|
87
101
|
moduleCompiled.compiledSource = lockerizedCode;
|
|
88
102
|
}
|
|
89
103
|
const moduleRecord = await getModuleRecord(moduleCompiled, this, this.context.compiler);
|
|
90
|
-
|
|
91
|
-
if (cacheDisabled === false) {
|
|
92
|
-
this.moduleDefCache.set(moduleDef.id, moduleDef);
|
|
93
|
-
}
|
|
94
|
-
return moduleDef;
|
|
104
|
+
return { ...moduleCompiled, moduleRecord };
|
|
95
105
|
}
|
|
96
106
|
async getLinkedModule(moduleId, runtimeEnvironment, runtimeParams) {
|
|
97
107
|
const moduleEntry = await this.getModuleEntry(moduleId, runtimeParams);
|
|
@@ -149,6 +159,8 @@ export class LwrModuleRegistry {
|
|
|
149
159
|
const { code: minifiedCode } = await this.context.compiler.minifyJavascript(amdSource);
|
|
150
160
|
linkedAmdSource = minifiedCode;
|
|
151
161
|
}
|
|
162
|
+
// Filter out variable dynamic imports
|
|
163
|
+
linkedModuleRecord.dynamicImports = linkedModuleRecord.dynamicImports?.filter((imp) => imp.moduleNameType !== ModuleNameType.unresolved);
|
|
152
164
|
return {
|
|
153
165
|
...moduleDef,
|
|
154
166
|
linkedSource: linkedAmdSource,
|
|
@@ -178,6 +190,8 @@ export class LwrModuleRegistry {
|
|
|
178
190
|
const { code: minifiedEsm } = await this.context.compiler.minifyJavascript(transformedEsmCode);
|
|
179
191
|
transformedEsmCode = minifiedEsm;
|
|
180
192
|
}
|
|
193
|
+
// Filter out variable dynamic imports
|
|
194
|
+
linkedModuleRecord.dynamicImports = linkedModuleRecord.dynamicImports?.filter((imp) => imp.moduleNameType !== ModuleNameType.unresolved);
|
|
181
195
|
return {
|
|
182
196
|
...moduleDef,
|
|
183
197
|
linkedConfig: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getModuleUriPrefix, getSpecifier, normalizeVersionToUri } from '@lwrjs/shared-utils';
|
|
1
|
+
import { getModuleUriPrefix, getSpecifier, normalizeVersionToUri, prettyModuleUriSuffix, } from '@lwrjs/shared-utils';
|
|
2
2
|
const SIGNATURE_SIGIL = 's';
|
|
3
3
|
const LATEST_SIG = 'latest';
|
|
4
4
|
export default function linkEsm(moduleId, environment, params = {}, signature) {
|
|
@@ -9,8 +9,7 @@ export default function linkEsm(moduleId, environment, params = {}, signature) {
|
|
|
9
9
|
const encodedVSpecifier = encodeURIComponent(vSpecifier);
|
|
10
10
|
const latestSignature = signature === undefined || signature === LATEST_SIG;
|
|
11
11
|
const sigilSignature = latestSignature ? LATEST_SIG : `${SIGNATURE_SIGIL}/${signature}`;
|
|
12
|
-
|
|
13
|
-
const prettyUrl = (bundle ? 'bundle_' : '') + `${specifier.replace(/[\/\.\#]/g, '_')}`;
|
|
12
|
+
const prettyUrl = (bundle ? 'bundle_' : '') + prettyModuleUriSuffix(specifier);
|
|
14
13
|
const debugModifier = debug ? '?debug=true' : '';
|
|
15
14
|
return `${uriPrefix}${encodedVSpecifier}/${sigilSignature}/${prettyUrl}.js${debugModifier}`;
|
|
16
15
|
}
|
package/package.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.6.0-alpha.
|
|
8
|
-
"homepage": "https://
|
|
7
|
+
"version": "0.6.0-alpha.6",
|
|
8
|
+
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/salesforce/lwr.git",
|
|
@@ -30,18 +30,18 @@
|
|
|
30
30
|
"build/**/*.d.ts"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@lwrjs/diagnostics": "0.6.0-alpha.
|
|
34
|
-
"@lwrjs/shared-utils": "0.6.0-alpha.
|
|
33
|
+
"@lwrjs/diagnostics": "0.6.0-alpha.6",
|
|
34
|
+
"@lwrjs/shared-utils": "0.6.0-alpha.6",
|
|
35
35
|
"es-module-lexer": "^0.3.18",
|
|
36
36
|
"ws": "^7.2.5"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@lwrjs/types": "0.6.0-alpha.
|
|
39
|
+
"@lwrjs/types": "0.6.0-alpha.6",
|
|
40
40
|
"@types/es-module-lexer": "^0.3.0",
|
|
41
41
|
"@types/ws": "^7.2.4"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": ">=14.15.4 <17"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "5d624e196dd46787399e6a269479508abe236081"
|
|
47
47
|
}
|