@lwrjs/lwc-module-provider 0.24.3 → 0.24.4
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/cache.cjs +5 -3
- package/build/cjs/compiler.cjs +2 -2
- package/build/cjs/index.cjs +23 -15
- package/build/cjs/lwc-cjs-entry.d.cjs +0 -1
- package/build/cjs/utils.cjs +2 -3
- package/package.json +6 -6
package/build/cjs/cache.cjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -38,9 +37,9 @@ __export(cache_exports, {
|
|
|
38
37
|
setupModuleCache: () => setupModuleCache
|
|
39
38
|
});
|
|
40
39
|
module.exports = __toCommonJS(cache_exports);
|
|
41
|
-
var import_path = __toESM(require("path")
|
|
40
|
+
var import_path = __toESM(require("path"));
|
|
42
41
|
var import_shared_utils = require("@lwrjs/shared-utils");
|
|
43
|
-
var import_fs_extra = __toESM(require("fs-extra")
|
|
42
|
+
var import_fs_extra = __toESM(require("fs-extra"));
|
|
44
43
|
var import_diagnostics = require("@lwrjs/diagnostics");
|
|
45
44
|
var DEFAULT_COMPILED_DIR = "lwc_compiled_modules";
|
|
46
45
|
var DEFAULT_CACHE_FOLDER = "cache";
|
|
@@ -59,6 +58,9 @@ function setupModuleCache(cacheDir) {
|
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
var IndexPersister = class {
|
|
61
|
+
lwcCacheDir;
|
|
62
|
+
lwcCacheIndex;
|
|
63
|
+
updateTimer;
|
|
62
64
|
async persist({ lwcCacheIndex, lwcCacheDir }) {
|
|
63
65
|
if (this.updateTimer) {
|
|
64
66
|
clearTimeout(this.updateTimer);
|
package/build/cjs/compiler.cjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -34,7 +33,7 @@ __export(compiler_exports, {
|
|
|
34
33
|
});
|
|
35
34
|
module.exports = __toCommonJS(compiler_exports);
|
|
36
35
|
var import_core = require("@babel/core");
|
|
37
|
-
var lwcCompilerCjs = __toESM(require("@lwc/compiler/dist/index.cjs")
|
|
36
|
+
var lwcCompilerCjs = __toESM(require("@lwc/compiler/dist/index.cjs"));
|
|
38
37
|
var import_shared_utils = require("@lwrjs/shared-utils");
|
|
39
38
|
var import_utils = require("./utils.cjs");
|
|
40
39
|
var import_diagnostics = require("@lwrjs/diagnostics");
|
|
@@ -55,6 +54,7 @@ function skipCompilation(namespace, theName) {
|
|
|
55
54
|
return false;
|
|
56
55
|
}
|
|
57
56
|
var LwcCompiler = class {
|
|
57
|
+
compiler;
|
|
58
58
|
constructor(compiler) {
|
|
59
59
|
this.compiler = compiler;
|
|
60
60
|
}
|
package/build/cjs/index.cjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -18,11 +17,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
18
|
|
|
20
19
|
// packages/@lwrjs/lwc-module-provider/src/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
20
|
+
var src_exports = {};
|
|
21
|
+
__export(src_exports, {
|
|
23
22
|
default: () => LwcModuleProvider
|
|
24
23
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(src_exports);
|
|
26
25
|
var import_path = require("path");
|
|
27
26
|
var import_shared_utils = require("@lwrjs/shared-utils");
|
|
28
27
|
var import_diagnostics = require("@lwrjs/diagnostics");
|
|
@@ -33,23 +32,32 @@ function getModuleEntryCacheKey(specifier, version, targetSSR) {
|
|
|
33
32
|
return `${specifier}@${version}|${targetSSR ? "server" : "client"}`;
|
|
34
33
|
}
|
|
35
34
|
var LwcModuleProvider = class {
|
|
35
|
+
name = "lwc-module-provider";
|
|
36
|
+
rootDir;
|
|
37
|
+
moduleFsCacheEnabled;
|
|
38
|
+
interchangeableModulesEnabled;
|
|
39
|
+
lwcCacheDir;
|
|
40
|
+
lwcCacheIndex;
|
|
41
|
+
moduleSourceCache = /* @__PURE__ */ new Map();
|
|
42
|
+
// key = filepath
|
|
43
|
+
packageVersionCache = /* @__PURE__ */ new Map();
|
|
44
|
+
modules;
|
|
45
|
+
emitter;
|
|
46
|
+
watcher;
|
|
47
|
+
watchedModuleContextMap = /* @__PURE__ */ new Map();
|
|
48
|
+
// key = filepath
|
|
49
|
+
moduleEntryVersionCache = /* @__PURE__ */ new Map();
|
|
50
|
+
// key = moduleEntry.id
|
|
51
|
+
importerMappingCache = /* @__PURE__ */ new Map();
|
|
52
|
+
lwcCompiler;
|
|
53
|
+
inflightGetModuleJobs = new import_shared_utils.InflightTasks();
|
|
54
|
+
inflightGetModuleEntryJobs = new import_shared_utils.InflightTasks();
|
|
36
55
|
constructor(options = {}, {
|
|
37
56
|
appEmitter,
|
|
38
57
|
config: { modules, rootDir, cacheDir, environment },
|
|
39
58
|
runtimeEnvironment: { watchFiles },
|
|
40
59
|
watcherFactory
|
|
41
60
|
}) {
|
|
42
|
-
this.name = "lwc-module-provider";
|
|
43
|
-
this.moduleSourceCache = /* @__PURE__ */ new Map();
|
|
44
|
-
// key = filepath
|
|
45
|
-
this.packageVersionCache = /* @__PURE__ */ new Map();
|
|
46
|
-
this.watchedModuleContextMap = /* @__PURE__ */ new Map();
|
|
47
|
-
// key = filepath
|
|
48
|
-
this.moduleEntryVersionCache = /* @__PURE__ */ new Map();
|
|
49
|
-
// key = moduleEntry.id
|
|
50
|
-
this.importerMappingCache = /* @__PURE__ */ new Map();
|
|
51
|
-
this.inflightGetModuleJobs = new import_shared_utils.InflightTasks();
|
|
52
|
-
this.inflightGetModuleEntryJobs = new import_shared_utils.InflightTasks();
|
|
53
61
|
const { disableCaching } = options;
|
|
54
62
|
this.emitter = appEmitter;
|
|
55
63
|
this.modules = modules;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/build/cjs/utils.cjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -37,8 +36,8 @@ __export(utils_exports, {
|
|
|
37
36
|
setUpWatcher: () => setUpWatcher
|
|
38
37
|
});
|
|
39
38
|
module.exports = __toCommonJS(utils_exports);
|
|
40
|
-
var import_fs = __toESM(require("fs")
|
|
41
|
-
var import_path = __toESM(require("path")
|
|
39
|
+
var import_fs = __toESM(require("fs"));
|
|
40
|
+
var import_path = __toESM(require("path"));
|
|
42
41
|
var import_diagnostics = require("@lwrjs/diagnostics");
|
|
43
42
|
var import_shared_utils = require("@lwrjs/shared-utils");
|
|
44
43
|
var import_dist = require("@lwc/module-resolver/dist/index.cjs");
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.24.
|
|
7
|
+
"version": "0.24.4",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@babel/core": "^7.29.7",
|
|
37
37
|
"@babel/preset-typescript": "^7.28.5",
|
|
38
|
-
"@lwrjs/diagnostics": "0.24.
|
|
39
|
-
"@lwrjs/fs-watch": "0.24.
|
|
40
|
-
"@lwrjs/shared-utils": "0.24.
|
|
38
|
+
"@lwrjs/diagnostics": "0.24.4",
|
|
39
|
+
"@lwrjs/fs-watch": "0.24.4",
|
|
40
|
+
"@lwrjs/shared-utils": "0.24.4",
|
|
41
41
|
"fs-extra": "^11.2.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@lwrjs/types": "0.24.
|
|
44
|
+
"@lwrjs/types": "0.24.4",
|
|
45
45
|
"memfs": "^4.13.0",
|
|
46
46
|
"typescript": "5.0.4"
|
|
47
47
|
},
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"volta": {
|
|
56
56
|
"extends": "../../../package.json"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "63feabb6eea1340e80a82146cc1c24bfc4f2d518"
|
|
59
59
|
}
|