@lwrjs/shared-utils 0.17.2-alpha.30 → 0.17.2-alpha.31
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.
|
@@ -4,9 +4,9 @@ import resolve from 'resolve';
|
|
|
4
4
|
import { readFile } from './fs.js';
|
|
5
5
|
const CONFIG_FILES = ['package.json', 'lwc.config.json', 'lwr.config.json'];
|
|
6
6
|
class NoLwcModuleError extends Error {
|
|
7
|
+
code = 'NO_LWC_MODULE_FOUND';
|
|
7
8
|
constructor() {
|
|
8
9
|
super('No LWC module found');
|
|
9
|
-
this.code = 'NO_LWC_MODULE_FOUND';
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
function isNpmModuleRecord(module) {
|
|
@@ -4,6 +4,7 @@ const MODULE_SOURCE_CHANGED_EVENT = 'module_source_changed';
|
|
|
4
4
|
const VIEW_SOURCE_CHANGED_EVENT = 'view_source_changed';
|
|
5
5
|
const ASSET_SOURCE_CHANGED_EVENT = 'asset_source_changed';
|
|
6
6
|
class LwrEmitter {
|
|
7
|
+
observer;
|
|
7
8
|
constructor(observer) {
|
|
8
9
|
this.observer = observer;
|
|
9
10
|
}
|
package/build/es/tasks.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
class Task {
|
|
2
|
+
taskFunction;
|
|
3
|
+
caller;
|
|
4
|
+
resolve;
|
|
5
|
+
reject;
|
|
2
6
|
constructor(taskFunction, caller, resolve, reject) {
|
|
3
7
|
this.taskFunction = taskFunction;
|
|
4
8
|
this.caller = caller;
|
|
@@ -11,9 +15,10 @@ class Task {
|
|
|
11
15
|
* If more tasks than that are asked to execute they are put in a queue until there is space in the pool
|
|
12
16
|
*/
|
|
13
17
|
export class TaskPool {
|
|
18
|
+
size;
|
|
19
|
+
queue = [];
|
|
20
|
+
running = 0;
|
|
14
21
|
constructor(size) {
|
|
15
|
-
this.queue = [];
|
|
16
|
-
this.running = 0;
|
|
17
22
|
this.size = size || 15;
|
|
18
23
|
}
|
|
19
24
|
/**
|
|
@@ -67,9 +72,7 @@ export class TaskPool {
|
|
|
67
72
|
* If no task of that id is running a new task is created
|
|
68
73
|
*/
|
|
69
74
|
export class InflightTasks {
|
|
70
|
-
|
|
71
|
-
this.tasks = new Map();
|
|
72
|
-
}
|
|
75
|
+
tasks = new Map();
|
|
73
76
|
/**
|
|
74
77
|
* Return a promise per id. If one is already in flight return the promise.
|
|
75
78
|
* If not use the constructor to create a new
|
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.31",
|
|
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.31",
|
|
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.31",
|
|
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": ">=20.0.0"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "bbb087ab080321047b10bbcda40e88e69b6a69a5"
|
|
62
62
|
}
|