@onecx/accelerator 6.29.0 → 6.29.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onecx/accelerator",
|
|
3
|
-
"version": "6.29.
|
|
3
|
+
"version": "6.29.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"tslib": "^2.6.3",
|
|
11
11
|
"rxjs": "^7.8.1",
|
|
12
12
|
"@nx/devkit": "^20.3.0",
|
|
13
|
-
"@onecx/nx-migration-utils": "^6.29.
|
|
13
|
+
"@onecx/nx-migration-utils": "^6.29.1"
|
|
14
14
|
},
|
|
15
15
|
"peerDependenciesMeta": {
|
|
16
16
|
"@nx/devkit": {
|
|
@@ -8,6 +8,16 @@ declare const topicTabId: object & {
|
|
|
8
8
|
"@onecx/accelerator": {
|
|
9
9
|
gatherer: object & {
|
|
10
10
|
promises: Record<number, Promise<any>[]>;
|
|
11
|
+
} & {
|
|
12
|
+
id: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
} & {
|
|
16
|
+
"@onecx/accelerator": {
|
|
17
|
+
gatherer: object & {
|
|
18
|
+
promises: Record<number, Promise<any>[]>;
|
|
19
|
+
} & {
|
|
20
|
+
id: number;
|
|
11
21
|
} & {
|
|
12
22
|
debug: string[];
|
|
13
23
|
};
|
|
@@ -16,6 +26,8 @@ declare const topicTabId: object & {
|
|
|
16
26
|
"@onecx/accelerator": {
|
|
17
27
|
gatherer: object & {
|
|
18
28
|
promises: Record<number, Promise<any>[]>;
|
|
29
|
+
} & {
|
|
30
|
+
id: number;
|
|
19
31
|
} & {
|
|
20
32
|
debug: string[];
|
|
21
33
|
};
|
|
@@ -27,6 +39,8 @@ declare const topicTabId: object & {
|
|
|
27
39
|
"@onecx/accelerator": {
|
|
28
40
|
gatherer: object & {
|
|
29
41
|
promises: Record<number, Promise<any>[]>;
|
|
42
|
+
} & {
|
|
43
|
+
id: number;
|
|
30
44
|
} & {
|
|
31
45
|
debug: string[];
|
|
32
46
|
};
|
|
@@ -40,6 +54,8 @@ declare const topicTabId: object & {
|
|
|
40
54
|
"@onecx/accelerator": {
|
|
41
55
|
gatherer: object & {
|
|
42
56
|
promises: Record<number, Promise<any>[]>;
|
|
57
|
+
} & {
|
|
58
|
+
id: number;
|
|
43
59
|
} & {
|
|
44
60
|
debug: string[];
|
|
45
61
|
};
|
package/src/lib/declarations.js
CHANGED
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.acceleratorState = void 0;
|
|
4
4
|
const ensure_property_utils_1 = require("./utils/ensure-property.utils");
|
|
5
5
|
const gatherPromises = (0, ensure_property_utils_1.ensureProperty)(globalThis, ['@onecx/accelerator', 'gatherer', 'promises'], {});
|
|
6
|
-
const
|
|
6
|
+
const gatherId = (0, ensure_property_utils_1.ensureProperty)(gatherPromises, ['@onecx/accelerator', 'gatherer', 'id'], 0);
|
|
7
|
+
const gatherDebug = (0, ensure_property_utils_1.ensureProperty)(gatherId, ['@onecx/accelerator', 'gatherer', 'debug'], []);
|
|
7
8
|
const topicUseBroadcastChannel = (0, ensure_property_utils_1.ensureProperty)(gatherDebug, ['@onecx/accelerator', 'topic', 'useBroadcastChannel'], 'V2');
|
|
8
9
|
const topicInitDate = (0, ensure_property_utils_1.ensureProperty)(topicUseBroadcastChannel, ['@onecx/accelerator', 'topic', 'initDate'], Date.now());
|
|
9
10
|
const topicTabId = (0, ensure_property_utils_1.ensureProperty)(topicInitDate, ['@onecx/accelerator', 'topic', 'tabId'], Math.ceil(globalThis.performance?.now?.() ?? 0));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declarations.js","sourceRoot":"","sources":["../../../../../libs/accelerator/src/lib/declarations.ts"],"names":[],"mappings":";;;AAAA,yEAA8D;AAE9D,MAAM,cAAc,GAAG,IAAA,sCAAc,EAAC,UAAoB,EAAE,CAAC,oBAAoB,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,EAAyC,CAAC,CAAA;AACtJ,MAAM,
|
|
1
|
+
{"version":3,"file":"declarations.js","sourceRoot":"","sources":["../../../../../libs/accelerator/src/lib/declarations.ts"],"names":[],"mappings":";;;AAAA,yEAA8D;AAE9D,MAAM,cAAc,GAAG,IAAA,sCAAc,EAAC,UAAoB,EAAE,CAAC,oBAAoB,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,EAAyC,CAAC,CAAA;AACtJ,MAAM,QAAQ,GAAG,IAAA,sCAAc,EAAC,cAAc,EAAE,CAAC,oBAAoB,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;AAC5F,MAAM,WAAW,GAAG,IAAA,sCAAc,EAAC,QAAQ,EAAE,CAAC,oBAAoB,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,EAAc,CAAC,CAAA;AACzG,MAAM,wBAAwB,GAAG,IAAA,sCAAc,EAAC,WAAW,EAAE,CAAC,oBAAoB,EAAE,OAAO,EAAE,qBAAqB,CAAC,EAAE,IAAsB,CAAC,CAAA;AAC5I,MAAM,aAAa,GAAG,IAAA,sCAAc,EAAC,wBAAwB,EAAE,CAAC,oBAAoB,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAA;AACvH,MAAM,UAAU,GAAG,IAAA,sCAAc,EAAC,aAAa,EAAE,CAAC,oBAAoB,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;AAEpH,sCAAgB"}
|
|
@@ -7,7 +7,6 @@ const declarations_1 = require("../declarations");
|
|
|
7
7
|
* Implementation of the Scatter-Gather pattern.
|
|
8
8
|
*/
|
|
9
9
|
class Gatherer {
|
|
10
|
-
static id = 0;
|
|
11
10
|
topic;
|
|
12
11
|
ownIds = new Set();
|
|
13
12
|
topicSub = null;
|
|
@@ -49,7 +48,7 @@ class Gatherer {
|
|
|
49
48
|
if (!declarations_1.acceleratorState['@onecx/accelerator'].gatherer.promises) {
|
|
50
49
|
throw new Error('Gatherer is not initialized');
|
|
51
50
|
}
|
|
52
|
-
const id =
|
|
51
|
+
const id = declarations_1.acceleratorState['@onecx/accelerator'].gatherer.id++;
|
|
53
52
|
// Save the id to ownIds to prevent processing own requests.
|
|
54
53
|
this.ownIds.add(id);
|
|
55
54
|
declarations_1.acceleratorState['@onecx/accelerator'].gatherer.promises[id] = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gatherer.js","sourceRoot":"","sources":["../../../../../../libs/accelerator/src/lib/utils/gatherer.ts"],"names":[],"mappings":";;;AACA,0CAAsC;AAEtC,kDAAkD;AAElD;;GAEG;AACH,MAAa,QAAQ;
|
|
1
|
+
{"version":3,"file":"gatherer.js","sourceRoot":"","sources":["../../../../../../libs/accelerator/src/lib/utils/gatherer.ts"],"names":[],"mappings":";;;AACA,0CAAsC;AAEtC,kDAAkD;AAElD;;GAEG;AACH,MAAa,QAAQ;IACF,KAAK,CAAyC;IAC9C,MAAM,GAAG,IAAI,GAAG,EAAU,CAAA;IAC1B,QAAQ,GAAwB,IAAI,CAAA;IACpC,SAAS,CAAQ;IAElC,YAAY,IAAY,EAAE,OAAe,EAAE,QAAiD;QAC1F,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;QACrB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,YAAY,IAAI,KAAK,OAAO,UAAU,CAAC,CAAA;QAE7D,IAAI,CAAC,KAAK,GAAG,IAAI,aAAK,CAAmC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;QAC9E,oEAAoE;QACpE,IAAI,CAAC,QAAQ,GAAG,IAAI,CA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