@lwrjs/everywhere 0.12.0-alpha.6 → 0.12.0-alpha.8
Sign up to get free protection for your applications and to get access to all the features.
- package/build/__generated_site_amd_modules__/1/application/amd/l/en-US/ai/amd-bootstrap/configuration/ci/-/-/s/e050122262c9c7eb0f9fb8b85f52e5b3/config.js +11 -0
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/@lwrjs/app-service/amd-bootstrap/module/amd/v/0_12_0-alpha_8/s/8bce578258518655194bd71d1d72aad5/@lwrjs_app-service_amd-bootstrap_module_amd.js +14 -0
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwc/v/{6_0_0/s/6e7ff236fd6011fdc06fb33b61261493 → 6_1_1/s/97cfd3dd664529265351b5d32d878542}/lwc.js +89 -68
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/everywhereAmd/v/{0_12_0-alpha_6 → 0_12_0-alpha_8}/s/cb931ebef2b89dcf8ab51456e3a68864/lwr_everywhereAmd.js +3 -3
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/init/v/{0_12_0-alpha_6 → 0_12_0-alpha_8}/s/f30361ad8ff7af505bf4d465c8499181/lwr_init.js +21 -21
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/loader/v/{0_12_0-alpha_6/s/7d8a8e317de06e72e1bf307d3ea8d1f0 → 0_12_0-alpha_8/s/defdc8250ae07a7f1997e7288f4130fa}/lwr_loader.js +126 -132
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/metrics/v/{0_12_0-alpha_6 → 0_12_0-alpha_8}/s/274c8343f810353bbad085a79709395f/lwr_metrics.js +1 -1
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/preInit/v/{0_12_0-alpha_6 → 0_12_0-alpha_8}/s/f3a204ef43fb3057d910f80d7e9f9ba7/lwr_preInit.js +1 -1
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/profiler/v/{0_12_0-alpha_6 → 0_12_0-alpha_8}/s/a152b8d35f12ca1b5147c5cd1ee155fb/lwr_profiler.js +1 -1
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/lwr/vault/v/{0_12_0-alpha_6 → 0_12_0-alpha_8}/s/c92abd8c1fec2d7eff62e4b097abbe14/lwr_vault.js +1 -1
- package/build/__generated_site_amd_modules__/1/resource/amd/lwr-error-shim.js/v/{0_12_0-alpha_6 → 0_12_0-alpha_8}/lwr-error-shim.js +1 -1
- package/build/__generated_site_amd_modules__/1/resource/amd/lwr-loader-shim.bundle.js/v/{0_12_0-alpha_6 → 0_12_0-alpha_8}/lwr-loader-shim.bundle.js +131 -163
- package/build/assets/amd/lwr-everywhere-debug.js +133 -165
- package/build/assets/amd/lwr-everywhere-min.js +2 -2
- package/build/assets/amd/lwr-everywhere.js +133 -165
- package/build/assets/core/lwr-everywhere-debug.js +129 -161
- package/build/assets/core/lwr-everywhere-min.js +1 -1
- package/build/assets/core/lwr-everywhere.js +129 -161
- package/build/assets/esm/lwr-everywhere-debug.js +1 -1
- package/build/assets/esm/lwr-everywhere-min.js +1 -1
- package/build/assets/esm/lwr-everywhere.js +1 -1
- package/package.json +8 -8
- package/build/__generated_site_amd_modules__/1/application/amd/l/en-US/ai/amd-bootstrap/configuration/ci/-/-/s/c4ab7e5dbc0697efbf468c722dbd35d0/config.js +0 -11
- package/build/__generated_site_amd_modules__/1/module/amd/1/l/en-US/mi/@lwrjs/app-service/amd-bootstrap/module/amd/v/0_12_0-alpha_6/s/8bce578258518655194bd71d1d72aad5/@lwrjs_app-service_amd-bootstrap_module_amd.js +0 -14
@@ -52,7 +52,7 @@ function getConfiguration(options) {
|
|
52
52
|
* SPDX-License-Identifier: MIT
|
53
53
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
54
54
|
*/
|
55
|
-
/* LWR Module Loader v0.12.0-alpha.
|
55
|
+
/* LWR Module Loader v0.12.0-alpha.8 */
|
56
56
|
const templateRegex = /\{([0-9]+)\}/g;
|
57
57
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
58
58
|
function templateString(template, args) {
|
@@ -846,13 +846,22 @@ async function evaluateLoadHook(
|
|
846
846
|
|
847
847
|
|
848
848
|
|
849
|
-
|
850
|
-
|
851
849
|
|
852
850
|
|
853
851
|
|
854
852
|
class ModuleRegistry {
|
855
853
|
|
854
|
+
|
855
|
+
// A registry for named AMD defines containing the *metadata* of AMD module
|
856
|
+
__init() {this.namedDefineRegistry = new Map();}
|
857
|
+
// The evaluated module registry where the module identifier (name or URL?) is the key
|
858
|
+
__init2() {this.moduleRegistry = new Map();}
|
859
|
+
// Aliases of modules in the registry
|
860
|
+
__init3() {this.aliases = new Map();}
|
861
|
+
|
862
|
+
|
863
|
+
|
864
|
+
|
856
865
|
|
857
866
|
constructor(config) {ModuleRegistry.prototype.__init.call(this);ModuleRegistry.prototype.__init2.call(this);ModuleRegistry.prototype.__init3.call(this);
|
858
867
|
this.profiler = config.profiler;
|
@@ -862,6 +871,9 @@ class ModuleRegistry {
|
|
862
871
|
);
|
863
872
|
}
|
864
873
|
|
874
|
+
/**
|
875
|
+
* Module import
|
876
|
+
*/
|
865
877
|
async load(id, importer) {
|
866
878
|
const metadata = importer ? { importer } : {};
|
867
879
|
this.profiler.logOperationStart({
|
@@ -869,18 +881,23 @@ class ModuleRegistry {
|
|
869
881
|
specifier: id,
|
870
882
|
metadata,
|
871
883
|
});
|
884
|
+
|
872
885
|
const resolvedId = await this.resolve(id, importer);
|
873
|
-
const moduleRecord =
|
886
|
+
const moduleRecord = this.getModuleRecord(resolvedId, id);
|
887
|
+
|
874
888
|
if (moduleRecord.evaluated) {
|
875
889
|
return moduleRecord.module;
|
876
890
|
} else {
|
877
891
|
if (!moduleRecord.evaluationPromise) {
|
878
|
-
moduleRecord.evaluationPromise = this.
|
892
|
+
moduleRecord.evaluationPromise = this.evaluateModule(moduleRecord, {});
|
879
893
|
}
|
880
894
|
return moduleRecord.evaluationPromise;
|
881
895
|
}
|
882
896
|
}
|
883
897
|
|
898
|
+
/**
|
899
|
+
* Resolve id for a module
|
900
|
+
*/
|
884
901
|
async resolve(id, importer) {
|
885
902
|
const parentUrl = this.resolver.getBaseUrl(); // only support baseUrl for now
|
886
903
|
|
@@ -896,7 +913,7 @@ class ModuleRegistry {
|
|
896
913
|
// eslint-disable-next-line no-await-in-loop
|
897
914
|
result = isResponseAPromise(response) ? await response : response;
|
898
915
|
}
|
899
|
-
if (!
|
916
|
+
if (!isValidResolveResponse(result)) {
|
900
917
|
throw new LoaderError(INVALID_LOADER_SERVICE_RESPONSE);
|
901
918
|
}
|
902
919
|
|
@@ -982,6 +999,9 @@ class ModuleRegistry {
|
|
982
999
|
return this.moduleRegistry.has(id);
|
983
1000
|
}
|
984
1001
|
|
1002
|
+
/**
|
1003
|
+
* Module entry point LWR.define()
|
1004
|
+
*/
|
985
1005
|
define(name, dependencies, exporter) {
|
986
1006
|
const mod = this.namedDefineRegistry.get(name);
|
987
1007
|
// Don't allow redefining a module.
|
@@ -1048,19 +1068,6 @@ class ModuleRegistry {
|
|
1048
1068
|
});
|
1049
1069
|
}
|
1050
1070
|
|
1051
|
-
|
1052
|
-
|
1053
|
-
// A registry for named AMD defines containing the *metadata* of AMD module
|
1054
|
-
__init() {this.namedDefineRegistry = new Map();}
|
1055
|
-
|
1056
|
-
// The evaluated module registry where the module identifier (name or URL?) is the key
|
1057
|
-
__init2() {this.moduleRegistry = new Map();}
|
1058
|
-
|
1059
|
-
// Aliases of modules in the registry
|
1060
|
-
__init3() {this.aliases = new Map();}
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
1071
|
getImportMetadataResolver() {
|
1065
1072
|
return this.resolver;
|
1066
1073
|
}
|
@@ -1086,7 +1093,7 @@ class ModuleRegistry {
|
|
1086
1093
|
return moduleRecord;
|
1087
1094
|
}
|
1088
1095
|
|
1089
|
-
|
1096
|
+
getModuleRecord(resolvedId, id) {
|
1090
1097
|
// Look for an existing record
|
1091
1098
|
const existingRecord = this.getExistingModuleRecord(resolvedId, id);
|
1092
1099
|
if (existingRecord) {
|
@@ -1094,29 +1101,10 @@ class ModuleRegistry {
|
|
1094
1101
|
return existingRecord;
|
1095
1102
|
}
|
1096
1103
|
|
1097
|
-
// Create a new Module Record
|
1098
|
-
const instantiation = this.getModuleDef(resolvedId, id);
|
1099
|
-
const dependencyRecords = instantiation.then((moduleDef) => {
|
1100
|
-
const dependencies = moduleDef.dependencies || [];
|
1101
|
-
// get dep and filter out exports
|
1102
|
-
const filtered = dependencies
|
1103
|
-
.map((dep) => {
|
1104
|
-
if (dep === 'exports') {
|
1105
|
-
return;
|
1106
|
-
}
|
1107
|
-
invariant(dep !== 'require', NO_AMD_REQUIRE);
|
1108
|
-
return this.getModuleDependencyRecord.call(this, dep);
|
1109
|
-
})
|
1110
|
-
.filter((depRecord) => depRecord !== undefined) ;
|
1111
|
-
|
1112
|
-
return Promise.all(filtered);
|
1113
|
-
});
|
1114
|
-
|
1115
1104
|
const newModuleRecord = {
|
1116
1105
|
id: resolvedId,
|
1117
1106
|
module: Object.create(null),
|
1118
|
-
|
1119
|
-
instantiation,
|
1107
|
+
instantiation: this.getModuleDef(resolvedId, id),
|
1120
1108
|
evaluated: false,
|
1121
1109
|
evaluationPromise: null,
|
1122
1110
|
};
|
@@ -1124,8 +1112,7 @@ class ModuleRegistry {
|
|
1124
1112
|
this.moduleRegistry.set(resolvedId, newModuleRecord);
|
1125
1113
|
this.storeModuleAlias(id, resolvedId);
|
1126
1114
|
|
1127
|
-
|
1128
|
-
return dependencyRecords.then(() => newModuleRecord);
|
1115
|
+
return newModuleRecord;
|
1129
1116
|
}
|
1130
1117
|
|
1131
1118
|
storeModuleAlias(aliasId, resolvedId) {
|
@@ -1146,95 +1133,87 @@ class ModuleRegistry {
|
|
1146
1133
|
}
|
1147
1134
|
}
|
1148
1135
|
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1136
|
+
/**
|
1137
|
+
* Evaluate all module dependencies
|
1138
|
+
*/
|
1139
|
+
async evaluateDependencies(
|
1140
|
+
dependencies,
|
1141
|
+
evaluationMap,
|
1142
|
+
) {
|
1143
|
+
const exports = {};
|
1144
|
+
const promiseArray = [];
|
1145
|
+
|
1146
|
+
if (dependencies) {
|
1147
|
+
for (const dep of dependencies) {
|
1148
|
+
if (dep === 'exports') {
|
1149
|
+
promiseArray.push(Promise.resolve(exports));
|
1150
|
+
} else {
|
1151
|
+
invariant(dep !== 'require', NO_AMD_REQUIRE);
|
1152
|
+
promiseArray.push(this.evaluateDependent(dep, evaluationMap));
|
1153
|
+
}
|
1154
|
+
}
|
1155
|
+
}
|
1153
1156
|
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1157
|
+
return Promise.all(promiseArray).then((results) => {
|
1158
|
+
const depsMapped = results.filter((result) => result !== undefined);
|
1159
|
+
return { depsMapped, exports };
|
1160
|
+
});
|
1158
1161
|
}
|
1159
1162
|
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
for (let i = 0; i < dependencyModuleRecords.length; i++) {
|
1170
|
-
const depRecord = dependencyModuleRecords[i];
|
1171
|
-
// eslint-disable-next-line no-await-in-loop
|
1172
|
-
await this.instantiateAll(depRecord, instantiatedMap);
|
1173
|
-
}
|
1163
|
+
async evaluateDependent(dep, evaluationMap) {
|
1164
|
+
const resolvedDepId = await this.resolve(dep);
|
1165
|
+
|
1166
|
+
const depModuleRecord = this.getModuleRecord(resolvedDepId, dep);
|
1167
|
+
let module = depModuleRecord.module;
|
1168
|
+
|
1169
|
+
const handleReturn = (module) => {
|
1170
|
+
if (module) {
|
1171
|
+
return module.__defaultInterop ? module.default : module;
|
1174
1172
|
}
|
1173
|
+
throw new LoaderError(FAILED_DEP, [resolvedDepId]);
|
1174
|
+
};
|
1175
|
+
|
1176
|
+
// If evaluated return the module
|
1177
|
+
if (depModuleRecord.evaluated) {
|
1178
|
+
return handleReturn(module);
|
1179
|
+
}
|
1180
|
+
/**
|
1181
|
+
* Circular dependencies are handled properly when named exports are used,
|
1182
|
+
* however, for default exports there is a bug: https://github.com/rollup/rollup/issues/3384
|
1183
|
+
*
|
1184
|
+
* The workaround below applies for circular dependencies (!moduleRecord.evaluated)
|
1185
|
+
*/
|
1186
|
+
if (!evaluationMap[depModuleRecord.id]) {
|
1187
|
+
// If we have not started dependency evaluation kick it off
|
1188
|
+
if (!depModuleRecord.evaluationPromise) {
|
1189
|
+
depModuleRecord.evaluationPromise = this.evaluateModule(depModuleRecord, evaluationMap);
|
1190
|
+
}
|
1191
|
+
return depModuleRecord.evaluationPromise.then((module) => {
|
1192
|
+
return handleReturn(module);
|
1193
|
+
});
|
1194
|
+
} else {
|
1195
|
+
// Otherwise return a dummy circular module wrapper
|
1196
|
+
module = getCircularDependencyWrapper(module);
|
1175
1197
|
}
|
1198
|
+
return handleReturn(module);
|
1176
1199
|
}
|
1177
1200
|
|
1178
1201
|
async evaluateModule(
|
1179
1202
|
moduleRecord,
|
1180
1203
|
evaluationMap,
|
1181
1204
|
) {
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
// evaluate dependencies first
|
1186
|
-
await this.evaluateModuleDependencies(dependencyModuleRecords, evaluationMap);
|
1187
|
-
}
|
1205
|
+
// Create a evaluationMap to detect cycles in this dep chain
|
1206
|
+
const chainMap = { ...evaluationMap };
|
1207
|
+
chainMap[moduleRecord.id] = true;
|
1188
1208
|
|
1209
|
+
// Wait for load to finish
|
1189
1210
|
const { exporter, dependencies } = await moduleRecord.instantiation;
|
1190
|
-
|
1191
|
-
|
1192
|
-
const depsMapped = dependencies
|
1193
|
-
? await Promise.all(
|
1194
|
-
dependencies.map(async (dep) => {
|
1195
|
-
if (dep === 'exports') {
|
1196
|
-
return exports;
|
1197
|
-
}
|
1198
|
-
const resolvedDepId = await this.resolve(dep);
|
1199
|
-
|
1200
|
-
const moduleRecord = this.moduleRegistry.get(resolvedDepId) ;
|
1201
|
-
if (!moduleRecord) {
|
1202
|
-
throw new LoaderError(FAILED_DEP, [resolvedDepId]);
|
1203
|
-
}
|
1204
|
-
|
1205
|
-
const module = moduleRecord.module;
|
1206
|
-
|
1207
|
-
/**
|
1208
|
-
* Circular dependencies are handled properly when named exports are used,
|
1209
|
-
* however, for default exports there is a bug: https://github.com/rollup/rollup/issues/3384
|
1210
|
-
*
|
1211
|
-
* The workaround below applies for circular dependencies (!moduleRecord.evaluated)
|
1212
|
-
*/
|
1213
|
-
if (!moduleRecord.evaluated) {
|
1214
|
-
return this.getCircularDependencyWrapper(module);
|
1215
|
-
}
|
1216
|
-
|
1217
|
-
if (module) {
|
1218
|
-
return module.__defaultInterop ? module.default : module;
|
1219
|
-
}
|
1220
|
-
|
1221
|
-
throw new LoaderError(FAILED_DEP, [resolvedDepId]);
|
1222
|
-
}),
|
1223
|
-
)
|
1224
|
-
: [];
|
1225
|
-
|
1226
|
-
// W-10029836 - In the case where we could be instantiating multiple graphs at the same time lets make sure the module have not already been evaluated
|
1227
|
-
if (moduleRecord.evaluated) {
|
1228
|
-
return moduleRecord.module;
|
1229
|
-
}
|
1211
|
+
|
1212
|
+
// Evaluate all it's dependents
|
1213
|
+
const { depsMapped, exports } = await this.evaluateDependencies(dependencies, chainMap);
|
1230
1214
|
|
1231
1215
|
// evaluates the module function
|
1232
|
-
let moduleDefault;
|
1233
|
-
try {
|
1234
|
-
moduleDefault = exporter(...depsMapped);
|
1235
|
-
} catch (e) {
|
1236
|
-
throw new LoaderError(EXPORTER_ERROR, [moduleRecord.id, e.message || e]);
|
1237
|
-
}
|
1216
|
+
let moduleDefault = this.evaluateModuleCode(exporter, depsMapped, moduleRecord);
|
1238
1217
|
// value is returned from exporter, then we are not using named exports
|
1239
1218
|
if (moduleDefault !== undefined) {
|
1240
1219
|
moduleDefault = { default: moduleDefault };
|
@@ -1246,7 +1225,7 @@ class ModuleRegistry {
|
|
1246
1225
|
// if no return value, then we are using the exports object
|
1247
1226
|
else {
|
1248
1227
|
// handle only default export with Rollup forced named exports
|
1249
|
-
if (
|
1228
|
+
if (isNamedExportDefaultOnly(exports)) {
|
1250
1229
|
Object.defineProperty(exports, '__useDefault', { value: true });
|
1251
1230
|
}
|
1252
1231
|
}
|
@@ -1278,42 +1257,17 @@ class ModuleRegistry {
|
|
1278
1257
|
Object.defineProperty(moduleRecord.module, '__esModule', { value: true });
|
1279
1258
|
}
|
1280
1259
|
|
1281
|
-
moduleRecord.evaluated = true;
|
1282
1260
|
Object.freeze(moduleRecord.module);
|
1261
|
+
moduleRecord.evaluated = true;
|
1262
|
+
moduleRecord.evaluationPromise = null;
|
1283
1263
|
return moduleRecord.module;
|
1284
1264
|
}
|
1285
1265
|
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
Object.prototype.hasOwnProperty.call(exports, 'default') &&
|
1292
|
-
Object.prototype.hasOwnProperty.call(exports, '__esModule')
|
1293
|
-
);
|
1294
|
-
}
|
1295
|
-
|
1296
|
-
// Wrap the dependency in a function that can be called and detected by __circular__ property.
|
1297
|
-
// The LWC engine checks for __circular__ to detect circular dependencies.
|
1298
|
-
getCircularDependencyWrapper(module) {
|
1299
|
-
const tmp = () => {
|
1300
|
-
return module.__useDefault || module.__defaultInterop ? module.default : module;
|
1301
|
-
};
|
1302
|
-
tmp.__circular__ = true;
|
1303
|
-
return tmp;
|
1304
|
-
}
|
1305
|
-
|
1306
|
-
async evaluateModuleDependencies(
|
1307
|
-
dependencyModuleRecords,
|
1308
|
-
evaluationMap,
|
1309
|
-
) {
|
1310
|
-
for (let i = 0; i < dependencyModuleRecords.length; i++) {
|
1311
|
-
const depRecord = dependencyModuleRecords[i];
|
1312
|
-
if (!depRecord.evaluated && !evaluationMap[depRecord.id]) {
|
1313
|
-
evaluationMap[depRecord.id] = true;
|
1314
|
-
// eslint-disable-next-line no-await-in-loop
|
1315
|
-
await this.evaluateModule(depRecord, evaluationMap);
|
1316
|
-
}
|
1266
|
+
evaluateModuleCode(evaluatedExporter, depsMapped, moduleRecord) {
|
1267
|
+
try {
|
1268
|
+
return evaluatedExporter(...depsMapped);
|
1269
|
+
} catch (e) {
|
1270
|
+
throw new LoaderError(EXPORTER_ERROR, [moduleRecord.id, e.message || e]);
|
1317
1271
|
}
|
1318
1272
|
}
|
1319
1273
|
|
@@ -1393,9 +1347,6 @@ class ModuleRegistry {
|
|
1393
1347
|
});
|
1394
1348
|
}
|
1395
1349
|
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1399
1350
|
addLoaderPlugin(hooks) {
|
1400
1351
|
if (typeof hooks !== 'object') {
|
1401
1352
|
throw new LoaderError(INVALID_HOOK);
|
@@ -1437,7 +1388,6 @@ class ModuleRegistry {
|
|
1437
1388
|
}
|
1438
1389
|
}
|
1439
1390
|
|
1440
|
-
|
1441
1391
|
registerHandleStaleModuleHook(handleStaleModule) {
|
1442
1392
|
if (this.handleStaleModuleHook) {
|
1443
1393
|
this.handleStaleModuleHook.push(handleStaleModule);
|
@@ -1445,12 +1395,30 @@ class ModuleRegistry {
|
|
1445
1395
|
this.handleStaleModuleHook = [handleStaleModule];
|
1446
1396
|
}
|
1447
1397
|
}
|
1398
|
+
}
|
1448
1399
|
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1400
|
+
// Determines if named exports module has only default export
|
1401
|
+
function isNamedExportDefaultOnly(exports) {
|
1402
|
+
return (
|
1403
|
+
exports !== undefined &&
|
1404
|
+
Object.getOwnPropertyNames(exports).length === 2 &&
|
1405
|
+
Object.prototype.hasOwnProperty.call(exports, 'default') &&
|
1406
|
+
Object.prototype.hasOwnProperty.call(exports, '__esModule')
|
1407
|
+
);
|
1408
|
+
}
|
1409
|
+
|
1410
|
+
// Wrap the dependency in a function that can be called and detected by __circular__ property.
|
1411
|
+
// The LWC engine checks for __circular__ to detect circular dependencies.
|
1412
|
+
function getCircularDependencyWrapper(module) {
|
1413
|
+
const tmp = () => {
|
1414
|
+
return module.__useDefault || module.__defaultInterop ? module.default : module;
|
1415
|
+
};
|
1416
|
+
tmp.__circular__ = true;
|
1417
|
+
return tmp;
|
1418
|
+
}
|
1419
|
+
|
1420
|
+
function isValidResolveResponse(res) {
|
1421
|
+
return res === null || typeof res === 'string' || (res && typeof (res ).url === 'string');
|
1454
1422
|
}
|
1455
1423
|
|
1456
1424
|
/**
|
@@ -1608,12 +1576,12 @@ await loader.registerImportMappings({ imports, index }, [bootstrapModule]);
|
|
1608
1576
|
(globalThis ).LWR = Object.freeze({ define: loader.define.bind(loader) });
|
1609
1577
|
|
1610
1578
|
// Define preload modules (ie: ABS, vault, etc) BEFORE loading them
|
1611
|
-
LWR.define('lwr/everywhereAmd/v/0_0_1', ['exports', 'lwr/vault/v/0_0_1'], (function (exports,
|
1579
|
+
LWR.define('lwr/everywhereAmd/v/0_0_1', ['exports', 'lwr/vault/v/0_0_1'], (function (exports, _0_12_0Alpha_8) {
|
1612
1580
|
// IMPORTANT: Do not add any static imports to this file that are not bundled with the amd-client
|
1613
1581
|
|
1614
1582
|
// Do an OAuthed fetch
|
1615
1583
|
async function authFetch(url, accept = 'javascript') {
|
1616
|
-
const authInfo =
|
1584
|
+
const authInfo = _0_12_0Alpha_8.getAuthInfo();
|
1617
1585
|
if (authInfo) {
|
1618
1586
|
return fetch(url, {
|
1619
1587
|
headers: {
|
@@ -1662,7 +1630,7 @@ LWR.define('lwr/everywhereAmd/v/0_0_1', ['exports', 'lwr/vault/v/0_0_1'], (funct
|
|
1662
1630
|
function authenticate(authInfo) {
|
1663
1631
|
// Put OAuth info into the vault
|
1664
1632
|
if (authInfo) {
|
1665
|
-
|
1633
|
+
_0_12_0Alpha_8.setAuthInfo(authInfo);
|
1666
1634
|
}
|
1667
1635
|
}
|
1668
1636
|
|
@@ -20,7 +20,7 @@ function getConfiguration(options) {
|
|
20
20
|
: `${ORIGIN}${PREFIX}/module/${format}/${POSTFIX}/mi/`;
|
21
21
|
|
22
22
|
// Component specifiers and URIs
|
23
|
-
const BOOT_MODULE = `lwr/everywhere${format === 'esm' ? 'Esm' : 'Amd'}/v/0_12_0-
|
23
|
+
const BOOT_MODULE = `lwr/everywhere${format === 'esm' ? 'Esm' : 'Amd'}/v/0_12_0-alpha_8`;
|
24
24
|
const BOOT_URI = `${ENDPOINT}${encodeURIComponent(BOOT_MODULE)}/latest${debug ? '?debug' : ''}`;
|
25
25
|
|
26
26
|
// Client Bootstrap Config
|
@@ -1 +1 @@
|
|
1
|
-
globalThis.process={env:{NODE_ENV:"production"}};const e=function(e){const{format:o,server:i,apiVersion:n,apiPrefix:t,locale:p,bundle:r,debug:s}=e,a=new URL(import.meta.url),m=i||a.origin||"",d=`${t}/${n}`,$="0"+(p?`/l/${p}`:""),u="/bi/3_A,B,O,S,EG,JLMT,C,D,F,H,I,K,N,P,Q,R",l=r?`${m}${d}/bundle/${o}/${$}${u}-0/module/mi/`:`${m}${d}/module/${o}/${$}/mi/`,b=`lwr/everywhere${"esm"===o?"Esm":"Amd"}/v/0_12_0-
|
1
|
+
globalThis.process={env:{NODE_ENV:"production"}};const e=function(e){const{format:o,server:i,apiVersion:n,apiPrefix:t,locale:p,bundle:r,debug:s}=e,a=new URL(import.meta.url),m=i||a.origin||"",d=`${t}/${n}`,$="0"+(p?`/l/${p}`:""),u="/bi/3_A,B,O,S,EG,JLMT,C,D,F,H,I,K,N,P,Q,R",l=r?`${m}${d}/bundle/${o}/${$}${u}-0/module/mi/`:`${m}${d}/module/${o}/${$}/mi/`,b=`lwr/everywhere${"esm"===o?"Esm":"Amd"}/v/0_12_0-alpha_8`,g=`${l}${encodeURIComponent(b)}/latest${s?"?debug":""}`,c={appId:"lwre",autoBoot:!0,bootstrapModule:b,baseUrl:m,imports:{[g]:[b]},index:{[b]:g},endpoints:{uris:{module:l,mapping:`${m}${d}/mapping/${o}/${$}${r?u:""}/mp/`}}};return s&&c.endpoints&&(c.endpoints.modifiers={debug:"true"}),c}({format:"esm",apiVersion:"1",apiPrefix:"",bundle:!0,debug:!1}),{bootstrapModule:o,imports:i,index:n={},importMappings:t,endpoints:p}=e,{initEsm:r,authenticate:s,createComponent:a}=await import(n[o]);r({imports:i,index:n,importMappings:t,endpoints:p});export{s as authenticate,a as createComponent};
|
@@ -20,7 +20,7 @@ function getConfiguration(options) {
|
|
20
20
|
: `${ORIGIN}${PREFIX}/module/${format}/${POSTFIX}/mi/`;
|
21
21
|
|
22
22
|
// Component specifiers and URIs
|
23
|
-
const BOOT_MODULE = `lwr/everywhere${format === 'esm' ? 'Esm' : 'Amd'}/v/0_12_0-
|
23
|
+
const BOOT_MODULE = `lwr/everywhere${format === 'esm' ? 'Esm' : 'Amd'}/v/0_12_0-alpha_8`;
|
24
24
|
const BOOT_URI = `${ENDPOINT}${encodeURIComponent(BOOT_MODULE)}/latest${debug ? '?debug' : ''}`;
|
25
25
|
|
26
26
|
// Client Bootstrap Config
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lwrjs/everywhere",
|
3
3
|
"description": "LWR Everywhere",
|
4
|
-
"version": "0.12.0-alpha.
|
4
|
+
"version": "0.12.0-alpha.8",
|
5
5
|
"license": "MIT",
|
6
6
|
"publishConfig": {
|
7
7
|
"access": "public"
|
@@ -43,18 +43,18 @@
|
|
43
43
|
"build": "tsc -b && node ../../../bin/pack-lwc --dir src/modules build/modules && yarn build:amd && yarn build:scripts"
|
44
44
|
},
|
45
45
|
"dependencies": {
|
46
|
-
"@luvio/engine": "0.154.
|
46
|
+
"@luvio/engine": "0.154.12",
|
47
47
|
"@rollup/plugin-replace": "^2.4.2",
|
48
48
|
"@rollup/plugin-sucrase": "^5.0.2",
|
49
49
|
"@rollup/plugin-terser": "^0.4.4",
|
50
|
-
"@salesforce/lds-default-luvio": "1.
|
50
|
+
"@salesforce/lds-default-luvio": "1.277.1"
|
51
51
|
},
|
52
52
|
"devDependencies": {
|
53
53
|
"@locker/trusted-types": "0.21.0",
|
54
|
-
"@lwrjs/loader": "0.12.0-alpha.
|
55
|
-
"@lwrjs/router": "0.12.0-alpha.
|
56
|
-
"@lwrjs/types": "0.12.0-alpha.
|
57
|
-
"lwr": "0.12.0-alpha.
|
54
|
+
"@lwrjs/loader": "0.12.0-alpha.8",
|
55
|
+
"@lwrjs/router": "0.12.0-alpha.8",
|
56
|
+
"@lwrjs/types": "0.12.0-alpha.8",
|
57
|
+
"lwr": "0.12.0-alpha.8"
|
58
58
|
},
|
59
59
|
"peerDependencies": {
|
60
60
|
"@lwc/module-resolver": ">= 2.x"
|
@@ -81,5 +81,5 @@
|
|
81
81
|
"engines": {
|
82
82
|
"node": ">=18.0.0"
|
83
83
|
},
|
84
|
-
"gitHead": "
|
84
|
+
"gitHead": "fa2d2189d7309adfb47f7b125616d26cb721ed6f"
|
85
85
|
}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
/* This script is generated */
|
2
|
-
/* Client Bootstrap configuration */
|
3
|
-
globalThis.LWR = globalThis.LWR || {};
|
4
|
-
Object.assign(globalThis.LWR, {"appId":"amd-bootstrap","bootstrapModule":"@lwrjs/app-service/amd-bootstrap/module/amd/v/0_12_0-alpha_6","autoBoot":true,"imports":{"/1/module/amd/1/l/en-US/mi/%40lwrjs%2Fapp-service%2Famd-bootstrap%2Fmodule%2Famd%2Fv%2F0_12_0-alpha_6/s/8bce578258518655194bd71d1d72aad5/@lwrjs_app-service_amd-bootstrap_module_amd.js":["@lwrjs/app-service/amd-bootstrap/module/amd/v/0_12_0-alpha_6"],"/1/module/amd/1/l/en-US/mi/lwr%2FpreInit%2Fv%2F0_12_0-alpha_6/s/f3a204ef43fb3057d910f80d7e9f9ba7/lwr_preInit.js":["lwr/preInit/v/0_12_0-alpha_6"],"/1/module/amd/1/l/en-US/mi/lwr%2Finit%2Fv%2F0_12_0-alpha_6/s/f30361ad8ff7af505bf4d465c8499181/lwr_init.js":["lwr/init/v/0_12_0-alpha_6"],"/1/module/amd/1/l/en-US/mi/lwr%2Fmetrics%2Fv%2F0_12_0-alpha_6/s/274c8343f810353bbad085a79709395f/lwr_metrics.js":["lwr/metrics/v/0_12_0-alpha_6"],"/1/module/amd/1/l/en-US/mi/lwr%2Fprofiler%2Fv%2F0_12_0-alpha_6/s/a152b8d35f12ca1b5147c5cd1ee155fb/lwr_profiler.js":["lwr/profiler/v/0_12_0-alpha_6"],"/1/module/amd/1/l/en-US/mi/lwc%2Fv%2F6_0_0/s/6e7ff236fd6011fdc06fb33b61261493/lwc.js":["lwc/v/6_0_0"],"/1/module/amd/1/l/en-US/mi/lwr%2FeverywhereAmd%2Fv%2F0_12_0-alpha_6/s/cb931ebef2b89dcf8ab51456e3a68864/lwr_everywhereAmd.js":["lwr/everywhereAmd/v/0_12_0-alpha_6"],"/1/module/amd/1/l/en-US/mi/lwr%2Fvault%2Fv%2F0_12_0-alpha_6/s/c92abd8c1fec2d7eff62e4b097abbe14/lwr_vault.js":["lwr/vault/v/0_12_0-alpha_6"]},"index":{"@lwrjs/app-service/amd-bootstrap/module/amd/v/0_12_0-alpha_6":"/1/module/amd/1/l/en-US/mi/%40lwrjs%2Fapp-service%2Famd-bootstrap%2Fmodule%2Famd%2Fv%2F0_12_0-alpha_6/s/8bce578258518655194bd71d1d72aad5/@lwrjs_app-service_amd-bootstrap_module_amd.js","lwr/preInit/v/0_12_0-alpha_6":"/1/module/amd/1/l/en-US/mi/lwr%2FpreInit%2Fv%2F0_12_0-alpha_6/s/f3a204ef43fb3057d910f80d7e9f9ba7/lwr_preInit.js","lwr/init/v/0_12_0-alpha_6":"/1/module/amd/1/l/en-US/mi/lwr%2Finit%2Fv%2F0_12_0-alpha_6/s/f30361ad8ff7af505bf4d465c8499181/lwr_init.js","lwr/metrics/v/0_12_0-alpha_6":"/1/module/amd/1/l/en-US/mi/lwr%2Fmetrics%2Fv%2F0_12_0-alpha_6/s/274c8343f810353bbad085a79709395f/lwr_metrics.js","lwr/profiler/v/0_12_0-alpha_6":"/1/module/amd/1/l/en-US/mi/lwr%2Fprofiler%2Fv%2F0_12_0-alpha_6/s/a152b8d35f12ca1b5147c5cd1ee155fb/lwr_profiler.js","lwc/v/6_0_0":"/1/module/amd/1/l/en-US/mi/lwc%2Fv%2F6_0_0/s/6e7ff236fd6011fdc06fb33b61261493/lwc.js","lwr/everywhereAmd/v/0_12_0-alpha_6":"/1/module/amd/1/l/en-US/mi/lwr%2FeverywhereAmd%2Fv%2F0_12_0-alpha_6/s/cb931ebef2b89dcf8ab51456e3a68864/lwr_everywhereAmd.js","lwr/vault/v/0_12_0-alpha_6":"/1/module/amd/1/l/en-US/mi/lwr%2Fvault%2Fv%2F0_12_0-alpha_6/s/c92abd8c1fec2d7eff62e4b097abbe14/lwr_vault.js"},"rootComponents":["lwr/everywhereAmd/v/0_12_0-alpha_6"],"serverData":{},"requiredModules":["@lwrjs/app-service/amd-bootstrap/module/amd/v/0_12_0-alpha_6"],"preloadModules":["lwr/preInit/v/0_12_0-alpha_6","lwr/init/v/0_12_0-alpha_6","lwr/metrics/v/0_12_0-alpha_6","lwc/v/6_0_0","lwr/everywhereAmd/v/0_12_0-alpha_6"],"endpoints":{"uris":{"mapping":"/1/mapping/amd/1/l/en-US/mp/"}}});
|
5
|
-
globalThis.process = { env: {"NODE_ENV":"compat","SSR":false,"basePath":"","locale":"en-US","assetBasePath":"","uiBasePath":""} };
|
6
|
-
globalThis.lwcRuntimeFlags = { ENABLE_MIXED_SHADOW_MODE: false };
|
7
|
-
// Appended by Static Site Generator
|
8
|
-
if (!globalThis.LWR.imports) { globalThis.LWR.imports = {}; }
|
9
|
-
Object.assign(globalThis.LWR.imports, {"/1/module/amd/1/l/en-US/mi/lwr%2Floader%2Fv%2F0_12_0-alpha_6/s/7d8a8e317de06e72e1bf307d3ea8d1f0/lwr_loader.js":["lwr/loader/v/0_12_0-alpha_6"]})
|
10
|
-
if (!globalThis.LWR.index) { globalThis.LWR.index = {}; }
|
11
|
-
Object.assign(globalThis.LWR.index, {"lwr/loader/v/0_12_0-alpha_6":"/1/module/amd/1/l/en-US/mi/lwr%2Floader%2Fv%2F0_12_0-alpha_6/s/7d8a8e317de06e72e1bf307d3ea8d1f0/lwr_loader.js"})
|
@@ -1,14 +0,0 @@
|
|
1
|
-
LWR.define('@lwrjs/app-service/amd-bootstrap/module/amd/v/0_12_0-alpha_6', ['lwr/loader/v/0_12_0-alpha_6', 'lwr/preInit/v/0_12_0-alpha_6', 'lwr/init/v/0_12_0-alpha_6'], (function (_0_12_0Alpha_6$2, _0_12_0Alpha_6, _0_12_0Alpha_6$1) { 'use strict';
|
2
|
-
|
3
|
-
const clientBootstrapConfig = _0_12_0Alpha_6.getClientBootstrapConfig();
|
4
|
-
|
5
|
-
// initialize additional non-configured root components
|
6
|
-
const { rootComponents, serverData } = clientBootstrapConfig;
|
7
|
-
Promise.all(rootComponents.map(async (rootSpecifier) => {
|
8
|
-
const element = _0_12_0Alpha_6$1.toKebabCase(rootSpecifier);
|
9
|
-
return _0_12_0Alpha_6$2.load(rootSpecifier, '@lwrjs/app-service/amd-bootstrap/module/amd/v/0_12_0-alpha_6').then(({default: Ctor}) => {
|
10
|
-
_0_12_0Alpha_6$1.init([[element, Ctor]], serverData);
|
11
|
-
});
|
12
|
-
}));
|
13
|
-
|
14
|
-
}));
|