repluggable-core 0.0.0-pr302.475 → 0.0.0-pr303.476
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/dist/es/{src/API.d.ts → API.d.ts} +8 -46
- package/dist/es/API.d.ts.map +1 -0
- package/dist/es/API.js +2 -0
- package/dist/es/API.js.map +1 -0
- package/dist/es/__internal.d.ts.map +1 -0
- package/dist/es/__internal.js +5 -0
- package/dist/es/__internal.js.map +1 -0
- package/dist/es/index.d.ts +3 -0
- package/dist/es/index.d.ts.map +1 -0
- package/dist/es/index.js +2 -0
- package/dist/es/index.js.map +1 -0
- package/dist/src/API.d.ts +8 -46
- package/dist/src/API.d.ts.map +1 -1
- package/dist/src/API.js +0 -4
- package/dist/src/API.js.map +1 -1
- package/dist/src/__internal.d.ts.map +1 -1
- package/dist/src/__internal.js +1 -1
- package/dist/src/__internal.js.map +1 -1
- package/dist/src/index.d.ts +2 -10
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +15 -22
- package/dist/src/index.js.map +1 -1
- package/package.json +3 -21
- package/src/API.ts +9 -47
- package/src/__internal.ts +1 -1
- package/src/index.ts +2 -42
- package/tsconfig.json +2 -9
- package/__tests__/spec-setup.js +0 -3
- package/dist/es/src/API.d.ts.map +0 -1
- package/dist/es/src/API.js +0 -3
- package/dist/es/src/API.js.map +0 -1
- package/dist/es/src/IterableWeakMap.d.ts +0 -20
- package/dist/es/src/IterableWeakMap.d.ts.map +0 -1
- package/dist/es/src/IterableWeakMap.js +0 -93
- package/dist/es/src/IterableWeakMap.js.map +0 -1
- package/dist/es/src/__internal.d.ts.map +0 -1
- package/dist/es/src/__internal.js +0 -5
- package/dist/es/src/__internal.js.map +0 -1
- package/dist/es/src/appHost.d.ts +0 -7
- package/dist/es/src/appHost.d.ts.map +0 -1
- package/dist/es/src/appHost.js +0 -898
- package/dist/es/src/appHost.js.map +0 -1
- package/dist/es/src/appHostServices.d.ts +0 -12
- package/dist/es/src/appHostServices.d.ts.map +0 -1
- package/dist/es/src/appHostServices.js +0 -25
- package/dist/es/src/appHostServices.js.map +0 -1
- package/dist/es/src/appHostUtils.d.ts +0 -4
- package/dist/es/src/appHostUtils.d.ts.map +0 -1
- package/dist/es/src/appHostUtils.js +0 -8
- package/dist/es/src/appHostUtils.js.map +0 -1
- package/dist/es/src/extensionSlot.d.ts +0 -8
- package/dist/es/src/extensionSlot.d.ts.map +0 -1
- package/dist/es/src/extensionSlot.js +0 -59
- package/dist/es/src/extensionSlot.js.map +0 -1
- package/dist/es/src/hot.d.ts +0 -14
- package/dist/es/src/hot.d.ts.map +0 -1
- package/dist/es/src/hot.js +0 -52
- package/dist/es/src/hot.js.map +0 -1
- package/dist/es/src/index.d.ts +0 -11
- package/dist/es/src/index.d.ts.map +0 -1
- package/dist/es/src/index.js +0 -10
- package/dist/es/src/index.js.map +0 -1
- package/dist/es/src/installedShellsState.d.ts +0 -19
- package/dist/es/src/installedShellsState.d.ts.map +0 -1
- package/dist/es/src/installedShellsState.js +0 -30
- package/dist/es/src/installedShellsState.js.map +0 -1
- package/dist/es/src/interceptAnyObject.d.ts +0 -7
- package/dist/es/src/interceptAnyObject.d.ts.map +0 -1
- package/dist/es/src/interceptAnyObject.js +0 -21
- package/dist/es/src/interceptAnyObject.js.map +0 -1
- package/dist/es/src/invokeSlotCallbacks.d.ts +0 -3
- package/dist/es/src/invokeSlotCallbacks.d.ts.map +0 -1
- package/dist/es/src/invokeSlotCallbacks.js +0 -20
- package/dist/es/src/invokeSlotCallbacks.js.map +0 -1
- package/dist/es/src/loggers.d.ts +0 -4
- package/dist/es/src/loggers.d.ts.map +0 -1
- package/dist/es/src/loggers.js +0 -100
- package/dist/es/src/loggers.js.map +0 -1
- package/dist/es/src/monitorAPI.d.ts +0 -3
- package/dist/es/src/monitorAPI.d.ts.map +0 -1
- package/dist/es/src/monitorAPI.js +0 -53
- package/dist/es/src/monitorAPI.js.map +0 -1
- package/dist/es/src/repluggableAppDebug/index.d.ts +0 -2
- package/dist/es/src/repluggableAppDebug/index.d.ts.map +0 -1
- package/dist/es/src/repluggableAppDebug/index.js +0 -2
- package/dist/es/src/repluggableAppDebug/index.js.map +0 -1
- package/dist/es/src/repluggableAppDebug/performanceDebugInfo.d.ts +0 -15
- package/dist/es/src/repluggableAppDebug/performanceDebugInfo.d.ts.map +0 -1
- package/dist/es/src/repluggableAppDebug/performanceDebugInfo.js +0 -94
- package/dist/es/src/repluggableAppDebug/performanceDebugInfo.js.map +0 -1
- package/dist/es/src/repluggableAppDebug/repluggableAppDebug.d.ts +0 -24
- package/dist/es/src/repluggableAppDebug/repluggableAppDebug.d.ts.map +0 -1
- package/dist/es/src/repluggableAppDebug/repluggableAppDebug.js +0 -132
- package/dist/es/src/repluggableAppDebug/repluggableAppDebug.js.map +0 -1
- package/dist/es/src/tarjanGraph.d.ts +0 -27
- package/dist/es/src/tarjanGraph.d.ts.map +0 -1
- package/dist/es/src/tarjanGraph.js +0 -94
- package/dist/es/src/tarjanGraph.js.map +0 -1
- package/dist/es/src/throttledStore.d.ts +0 -32
- package/dist/es/src/throttledStore.d.ts.map +0 -1
- package/dist/es/src/throttledStore.js +0 -240
- package/dist/es/src/throttledStore.js.map +0 -1
- package/dist/es/test/IterableWeakMap.spec.d.ts +0 -2
- package/dist/es/test/IterableWeakMap.spec.d.ts.map +0 -1
- package/dist/es/test/IterableWeakMap.spec.js +0 -218
- package/dist/es/test/IterableWeakMap.spec.js.map +0 -1
- package/dist/es/test/appHost.mock.d.ts +0 -4
- package/dist/es/test/appHost.mock.d.ts.map +0 -1
- package/dist/es/test/appHost.mock.js +0 -54
- package/dist/es/test/appHost.mock.js.map +0 -1
- package/dist/es/test/appHost.spec.d.ts +0 -2
- package/dist/es/test/appHost.spec.d.ts.map +0 -1
- package/dist/es/test/appHost.spec.js +0 -1451
- package/dist/es/test/appHost.spec.js.map +0 -1
- package/dist/es/test/installedShellsState.spec.d.ts +0 -2
- package/dist/es/test/installedShellsState.spec.d.ts.map +0 -1
- package/dist/es/test/installedShellsState.spec.js +0 -28
- package/dist/es/test/installedShellsState.spec.js.map +0 -1
- package/dist/es/test/interceptAnyObject.spec.d.ts +0 -2
- package/dist/es/test/interceptAnyObject.spec.d.ts.map +0 -1
- package/dist/es/test/interceptAnyObject.spec.js +0 -166
- package/dist/es/test/interceptAnyObject.spec.js.map +0 -1
- package/dist/es/test/loggers.spec.d.ts +0 -2
- package/dist/es/test/loggers.spec.d.ts.map +0 -1
- package/dist/es/test/loggers.spec.js +0 -218
- package/dist/es/test/loggers.spec.js.map +0 -1
- package/dist/es/test/repluggableAppDebug.spec.d.ts +0 -2
- package/dist/es/test/repluggableAppDebug.spec.d.ts.map +0 -1
- package/dist/es/test/repluggableAppDebug.spec.js +0 -107
- package/dist/es/test/repluggableAppDebug.spec.js.map +0 -1
- package/dist/es/test/testKit.spec.d.ts +0 -2
- package/dist/es/test/testKit.spec.d.ts.map +0 -1
- package/dist/es/test/testKit.spec.js +0 -129
- package/dist/es/test/testKit.spec.js.map +0 -1
- package/dist/es/testKit/emptyLoggerOptions.d.ts +0 -3
- package/dist/es/testKit/emptyLoggerOptions.d.ts.map +0 -1
- package/dist/es/testKit/emptyLoggerOptions.js +0 -15
- package/dist/es/testKit/emptyLoggerOptions.js.map +0 -1
- package/dist/es/testKit/index.d.ts +0 -33
- package/dist/es/testKit/index.d.ts.map +0 -1
- package/dist/es/testKit/index.js +0 -132
- package/dist/es/testKit/index.js.map +0 -1
- package/dist/es/testKit/mockPackage.d.ts +0 -23
- package/dist/es/testKit/mockPackage.d.ts.map +0 -1
- package/dist/es/testKit/mockPackage.js +0 -95
- package/dist/es/testKit/mockPackage.js.map +0 -1
- package/dist/es/testKit/withConsoleErrors.d.ts +0 -2
- package/dist/es/testKit/withConsoleErrors.d.ts.map +0 -1
- package/dist/es/testKit/withConsoleErrors.js +0 -12
- package/dist/es/testKit/withConsoleErrors.js.map +0 -1
- package/dist/es/testKit/withThrowOnError.d.ts +0 -3
- package/dist/es/testKit/withThrowOnError.d.ts.map +0 -1
- package/dist/es/testKit/withThrowOnError.js +0 -27
- package/dist/es/testKit/withThrowOnError.js.map +0 -1
- package/dist/src/IterableWeakMap.d.ts +0 -20
- package/dist/src/IterableWeakMap.d.ts.map +0 -1
- package/dist/src/IterableWeakMap.js +0 -97
- package/dist/src/IterableWeakMap.js.map +0 -1
- package/dist/src/appHost.d.ts +0 -7
- package/dist/src/appHost.d.ts.map +0 -1
- package/dist/src/appHost.js +0 -906
- package/dist/src/appHost.js.map +0 -1
- package/dist/src/appHostServices.d.ts +0 -12
- package/dist/src/appHostServices.d.ts.map +0 -1
- package/dist/src/appHostServices.js +0 -29
- package/dist/src/appHostServices.js.map +0 -1
- package/dist/src/appHostUtils.d.ts +0 -4
- package/dist/src/appHostUtils.d.ts.map +0 -1
- package/dist/src/appHostUtils.js +0 -16
- package/dist/src/appHostUtils.js.map +0 -1
- package/dist/src/extensionSlot.d.ts +0 -8
- package/dist/src/extensionSlot.d.ts.map +0 -1
- package/dist/src/extensionSlot.js +0 -67
- package/dist/src/extensionSlot.js.map +0 -1
- package/dist/src/hot.d.ts +0 -14
- package/dist/src/hot.d.ts.map +0 -1
- package/dist/src/hot.js +0 -56
- package/dist/src/hot.js.map +0 -1
- package/dist/src/installedShellsState.d.ts +0 -19
- package/dist/src/installedShellsState.d.ts.map +0 -1
- package/dist/src/installedShellsState.js +0 -38
- package/dist/src/installedShellsState.js.map +0 -1
- package/dist/src/interceptAnyObject.d.ts +0 -7
- package/dist/src/interceptAnyObject.d.ts.map +0 -1
- package/dist/src/interceptAnyObject.js +0 -28
- package/dist/src/interceptAnyObject.js.map +0 -1
- package/dist/src/invokeSlotCallbacks.d.ts +0 -3
- package/dist/src/invokeSlotCallbacks.d.ts.map +0 -1
- package/dist/src/invokeSlotCallbacks.js +0 -24
- package/dist/src/invokeSlotCallbacks.js.map +0 -1
- package/dist/src/loggers.d.ts +0 -4
- package/dist/src/loggers.d.ts.map +0 -1
- package/dist/src/loggers.js +0 -104
- package/dist/src/loggers.js.map +0 -1
- package/dist/src/monitorAPI.d.ts +0 -3
- package/dist/src/monitorAPI.d.ts.map +0 -1
- package/dist/src/monitorAPI.js +0 -57
- package/dist/src/monitorAPI.js.map +0 -1
- package/dist/src/repluggableAppDebug/index.d.ts +0 -2
- package/dist/src/repluggableAppDebug/index.d.ts.map +0 -1
- package/dist/src/repluggableAppDebug/index.js +0 -6
- package/dist/src/repluggableAppDebug/index.js.map +0 -1
- package/dist/src/repluggableAppDebug/performanceDebugInfo.d.ts +0 -15
- package/dist/src/repluggableAppDebug/performanceDebugInfo.d.ts.map +0 -1
- package/dist/src/repluggableAppDebug/performanceDebugInfo.js +0 -101
- package/dist/src/repluggableAppDebug/performanceDebugInfo.js.map +0 -1
- package/dist/src/repluggableAppDebug/repluggableAppDebug.d.ts +0 -24
- package/dist/src/repluggableAppDebug/repluggableAppDebug.d.ts.map +0 -1
- package/dist/src/repluggableAppDebug/repluggableAppDebug.js +0 -139
- package/dist/src/repluggableAppDebug/repluggableAppDebug.js.map +0 -1
- package/dist/src/tarjanGraph.d.ts +0 -27
- package/dist/src/tarjanGraph.d.ts.map +0 -1
- package/dist/src/tarjanGraph.js +0 -100
- package/dist/src/tarjanGraph.js.map +0 -1
- package/dist/src/throttledStore.d.ts +0 -32
- package/dist/src/throttledStore.d.ts.map +0 -1
- package/dist/src/throttledStore.js +0 -249
- package/dist/src/throttledStore.js.map +0 -1
- package/dist/test/IterableWeakMap.spec.d.ts +0 -2
- package/dist/test/IterableWeakMap.spec.d.ts.map +0 -1
- package/dist/test/IterableWeakMap.spec.js +0 -220
- package/dist/test/IterableWeakMap.spec.js.map +0 -1
- package/dist/test/appHost.mock.d.ts +0 -4
- package/dist/test/appHost.mock.d.ts.map +0 -1
- package/dist/test/appHost.mock.js +0 -59
- package/dist/test/appHost.mock.js.map +0 -1
- package/dist/test/appHost.spec.d.ts +0 -2
- package/dist/test/appHost.spec.d.ts.map +0 -1
- package/dist/test/appHost.spec.js +0 -1456
- package/dist/test/appHost.spec.js.map +0 -1
- package/dist/test/installedShellsState.spec.d.ts +0 -2
- package/dist/test/installedShellsState.spec.d.ts.map +0 -1
- package/dist/test/installedShellsState.spec.js +0 -30
- package/dist/test/installedShellsState.spec.js.map +0 -1
- package/dist/test/interceptAnyObject.spec.d.ts +0 -2
- package/dist/test/interceptAnyObject.spec.d.ts.map +0 -1
- package/dist/test/interceptAnyObject.spec.js +0 -171
- package/dist/test/interceptAnyObject.spec.js.map +0 -1
- package/dist/test/loggers.spec.d.ts +0 -2
- package/dist/test/loggers.spec.d.ts.map +0 -1
- package/dist/test/loggers.spec.js +0 -220
- package/dist/test/loggers.spec.js.map +0 -1
- package/dist/test/repluggableAppDebug.spec.d.ts +0 -2
- package/dist/test/repluggableAppDebug.spec.d.ts.map +0 -1
- package/dist/test/repluggableAppDebug.spec.js +0 -109
- package/dist/test/repluggableAppDebug.spec.js.map +0 -1
- package/dist/test/testKit.spec.d.ts +0 -2
- package/dist/test/testKit.spec.d.ts.map +0 -1
- package/dist/test/testKit.spec.js +0 -134
- package/dist/test/testKit.spec.js.map +0 -1
- package/dist/testKit/emptyLoggerOptions.d.ts +0 -3
- package/dist/testKit/emptyLoggerOptions.d.ts.map +0 -1
- package/dist/testKit/emptyLoggerOptions.js +0 -18
- package/dist/testKit/emptyLoggerOptions.js.map +0 -1
- package/dist/testKit/index.d.ts +0 -33
- package/dist/testKit/index.d.ts.map +0 -1
- package/dist/testKit/index.js +0 -160
- package/dist/testKit/index.js.map +0 -1
- package/dist/testKit/mockPackage.d.ts +0 -23
- package/dist/testKit/mockPackage.d.ts.map +0 -1
- package/dist/testKit/mockPackage.js +0 -101
- package/dist/testKit/mockPackage.js.map +0 -1
- package/dist/testKit/withConsoleErrors.d.ts +0 -2
- package/dist/testKit/withConsoleErrors.d.ts.map +0 -1
- package/dist/testKit/withConsoleErrors.js +0 -16
- package/dist/testKit/withConsoleErrors.js.map +0 -1
- package/dist/testKit/withThrowOnError.d.ts +0 -3
- package/dist/testKit/withThrowOnError.d.ts.map +0 -1
- package/dist/testKit/withThrowOnError.js +0 -31
- package/dist/testKit/withThrowOnError.js.map +0 -1
- package/jest.config.js +0 -16
- package/src/IterableWeakMap.ts +0 -124
- package/src/appHost.ts +0 -1222
- package/src/appHostServices.ts +0 -42
- package/src/appHostUtils.ts +0 -11
- package/src/extensionSlot.ts +0 -96
- package/src/hot.ts +0 -53
- package/src/installedShellsState.ts +0 -54
- package/src/interceptAnyObject.ts +0 -39
- package/src/invokeSlotCallbacks.ts +0 -20
- package/src/loggers.ts +0 -112
- package/src/monitorAPI.ts +0 -71
- package/src/repluggableAppDebug/debug.d.ts +0 -37
- package/src/repluggableAppDebug/index.ts +0 -1
- package/src/repluggableAppDebug/performanceDebugInfo.ts +0 -96
- package/src/repluggableAppDebug/repluggableAppDebug.ts +0 -192
- package/src/tarjanGraph.ts +0 -96
- package/src/throttledStore.ts +0 -355
- package/test/IterableWeakMap.spec.ts +0 -280
- package/test/appHost.mock.ts +0 -58
- package/test/appHost.spec.ts +0 -1765
- package/test/installedShellsState.spec.ts +0 -39
- package/test/interceptAnyObject.spec.ts +0 -217
- package/test/loggers.spec.ts +0 -288
- package/test/repluggableAppDebug.spec.ts +0 -118
- package/test/testKit.spec.tsx +0 -153
- package/testKit/emptyLoggerOptions.ts +0 -16
- package/testKit/index.ts +0 -177
- package/testKit/mockPackage.ts +0 -110
- package/testKit/withConsoleErrors.ts +0 -12
- package/testKit/withThrowOnError.ts +0 -34
- /package/dist/es/{src/__internal.d.ts → __internal.d.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withConsoleErrors.d.ts","sourceRoot":"","sources":["../../testKit/withConsoleErrors.ts"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAShF"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.withConsoleErrors = void 0;
|
|
4
|
-
const noopConsoleError = () => { };
|
|
5
|
-
function withConsoleErrors(action, mock) {
|
|
6
|
-
const savedConsoleError = console.error;
|
|
7
|
-
console.error = mock || noopConsoleError;
|
|
8
|
-
try {
|
|
9
|
-
return action();
|
|
10
|
-
}
|
|
11
|
-
finally {
|
|
12
|
-
console.error = savedConsoleError;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.withConsoleErrors = withConsoleErrors;
|
|
16
|
-
//# sourceMappingURL=withConsoleErrors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withConsoleErrors.js","sourceRoot":"","sources":["../../testKit/withConsoleErrors.ts"],"names":[],"mappings":";;;AAAA,MAAM,gBAAgB,GAAqB,GAAG,EAAE,GAAE,CAAC,CAAA;AAEnD,SAAgB,iBAAiB,CAAI,MAAe,EAAE,IAAuB;IACzE,MAAM,iBAAiB,GAAG,OAAO,CAAC,KAAK,CAAA;IACvC,OAAO,CAAC,KAAK,GAAG,IAAI,IAAI,gBAAgB,CAAA;IAExC,IAAI,CAAC;QACD,OAAO,MAAM,EAAE,CAAA;IACnB,CAAC;YAAS,CAAC;QACP,OAAO,CAAC,KAAK,GAAG,iBAAiB,CAAA;IACrC,CAAC;AACL,CAAC;AATD,8CASC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withThrowOnError.d.ts","sourceRoot":"","sources":["../../testKit/withThrowOnError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA4C,MAAM,YAAY,CAAA;AAErF,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,cAAmC,GAAG,cAAc,CA+B7F"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.withThrowOnError = void 0;
|
|
4
|
-
function withThrowOnError(options = { monitoring: {} }) {
|
|
5
|
-
const throwError = (error, keyValuePairs) => {
|
|
6
|
-
throw new Error(`${error} ${keyValuePairs ? JSON.stringify(keyValuePairs) : ''}`);
|
|
7
|
-
};
|
|
8
|
-
const span = {
|
|
9
|
-
end(success, error, keyValuePairs) {
|
|
10
|
-
if (error) {
|
|
11
|
-
throwError(error, keyValuePairs);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
const logger = {
|
|
16
|
-
spanRoot(messageId, error, keyValuePairs) {
|
|
17
|
-
return span;
|
|
18
|
-
},
|
|
19
|
-
spanChild(messageId, error, keyValuePairs) {
|
|
20
|
-
return span;
|
|
21
|
-
},
|
|
22
|
-
log(severity, id, error, keyValuePairs) {
|
|
23
|
-
if (severity === 'error' || severity === 'critical') {
|
|
24
|
-
throwError(error || new Error('Unknown error'), keyValuePairs);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
return Object.assign(Object.assign({}, options), { logger });
|
|
29
|
-
}
|
|
30
|
-
exports.withThrowOnError = withThrowOnError;
|
|
31
|
-
//# sourceMappingURL=withThrowOnError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withThrowOnError.js","sourceRoot":"","sources":["../../testKit/withThrowOnError.ts"],"names":[],"mappings":";;;AAEA,SAAgB,gBAAgB,CAAC,UAA0B,EAAE,UAAU,EAAE,EAAE,EAAE;IACzE,MAAM,UAAU,GAAG,CAAC,KAAY,EAAE,aAAsB,EAAE,EAAE;QACxD,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,IAAI,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IACrF,CAAC,CAAA;IAED,MAAM,IAAI,GAAoB;QAC1B,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,aAAa;YAC7B,IAAI,KAAK,EAAE,CAAC;gBACR,UAAU,CAAC,KAAK,EAAE,aAAa,CAAC,CAAA;YACpC,CAAC;QACL,CAAC;KACJ,CAAA;IAED,MAAM,MAAM,GAAe;QACvB,QAAQ,CAAC,SAAiB,EAAE,KAAa,EAAE,aAAsB;YAC7D,OAAO,IAAI,CAAA;QACf,CAAC;QACD,SAAS,CAAC,SAAiB,EAAE,KAAa,EAAE,aAAsB;YAC9D,OAAO,IAAI,CAAA;QACf,CAAC;QACD,GAAG,CAAC,QAAqB,EAAE,EAAU,EAAE,KAAa,EAAE,aAAsB;YACxE,IAAI,QAAQ,KAAK,OAAO,IAAI,QAAQ,KAAK,UAAU,EAAE,CAAC;gBAClD,UAAU,CAAC,KAAK,IAAI,IAAI,KAAK,CAAC,eAAe,CAAC,EAAE,aAAa,CAAC,CAAA;YAClE,CAAC;QACL,CAAC;KACJ,CAAA;IAED,uCACO,OAAO,KACV,MAAM,IACT;AACL,CAAC;AA/BD,4CA+BC"}
|
package/jest.config.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const config = {
|
|
2
|
-
testMatch: ['<rootDir>/**/*.spec.ts?(x)'],
|
|
3
|
-
setupFilesAfterEnv: ['<rootDir>/__tests__/spec-setup.js'],
|
|
4
|
-
transform: {
|
|
5
|
-
'\\.tsx?$': 'ts-jest',
|
|
6
|
-
},
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const inTeamCity = () =>
|
|
10
|
-
!!(process.env.BUILD_NUMBER || process.env.TEAMCITY_VERSION);
|
|
11
|
-
|
|
12
|
-
if (inTeamCity()) {
|
|
13
|
-
config.testResultsProcessor = require.resolve('jest-teamcity-reporter');
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
module.exports = config;
|
package/src/IterableWeakMap.ts
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
interface WeakMapValue<K extends object, V> {
|
|
2
|
-
value: V
|
|
3
|
-
ref: WeakRefOrPlain<K>
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
type WeakRefOrPlain<T extends object> = WeakRef<T> | T
|
|
7
|
-
|
|
8
|
-
const isWeakRef = (val: unknown): val is WeakRef<any> => {
|
|
9
|
-
return typeof val === 'object' && val !== null && 'deref' in val
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const createWeakMapOrPlain = <T extends object>(val: T): WeakRef<T> | T => {
|
|
13
|
-
return typeof WeakRef !== 'undefined' ? new WeakRef(val) : val
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export class IterableWeakMap<K extends object = object, V = any> implements Map<K, V> {
|
|
17
|
-
private readonly weakMap = new WeakMap<K, WeakMapValue<K, V>>()
|
|
18
|
-
private readonly refSet: Set<WeakRefOrPlain<K>> = new Set()
|
|
19
|
-
private readonly finalizationGroup =
|
|
20
|
-
typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry(IterableWeakMap.cleanup) : null
|
|
21
|
-
|
|
22
|
-
private static cleanup({ set, ref }: { set: Set<WeakRefOrPlain<any>>; ref: WeakRefOrPlain<any> }) {
|
|
23
|
-
set.delete(ref)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
constructor(iterable?: [K, V][]) {
|
|
27
|
-
if (iterable) {
|
|
28
|
-
for (const [key, value] of iterable) {
|
|
29
|
-
this.set(key, value)
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
set(key: K, value: V) {
|
|
35
|
-
const ref = createWeakMapOrPlain(key)
|
|
36
|
-
|
|
37
|
-
this.weakMap.set(key, { value, ref })
|
|
38
|
-
this.refSet.add(ref)
|
|
39
|
-
this.finalizationGroup?.register(
|
|
40
|
-
key,
|
|
41
|
-
{
|
|
42
|
-
set: this.refSet,
|
|
43
|
-
ref
|
|
44
|
-
},
|
|
45
|
-
ref
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
return this
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
get(key: K): V | undefined {
|
|
52
|
-
const entry = this.weakMap.get(key)
|
|
53
|
-
return entry && entry.value
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
delete(key: any) {
|
|
57
|
-
const entry = this.weakMap.get(key)
|
|
58
|
-
if (!entry) {
|
|
59
|
-
return false
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
this.weakMap.delete(key)
|
|
63
|
-
this.refSet.delete(entry.ref)
|
|
64
|
-
this.finalizationGroup?.unregister(entry.ref)
|
|
65
|
-
return true
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
get size() {
|
|
69
|
-
return this.refSet.size
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
has(key: K): boolean {
|
|
73
|
-
return this.weakMap.has(key)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
clear() {
|
|
77
|
-
for (const [key] of this) {
|
|
78
|
-
this.delete(key)
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
forEach(callbackfn: (value: V, key: K, map: this) => void, thisArg?: any): void {
|
|
83
|
-
for (const [key, value] of this) {
|
|
84
|
-
callbackfn(value, key, this )
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
get [Symbol.toStringTag]() {
|
|
89
|
-
return '[object IterableWeakMap]'
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// can't use private type of MapIterator
|
|
93
|
-
*[Symbol.iterator](): any {
|
|
94
|
-
for (const ref of this.refSet) {
|
|
95
|
-
const key = isWeakRef(ref) ? ref.deref() : ref
|
|
96
|
-
|
|
97
|
-
if (!key) {
|
|
98
|
-
continue
|
|
99
|
-
}
|
|
100
|
-
const value = this.weakMap.get(key)
|
|
101
|
-
if (value) {
|
|
102
|
-
yield [key, value.value] as [K, V]
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
entries(): ReturnType<Map<K, V>['entries']> {
|
|
108
|
-
return this[Symbol.iterator]() as unknown as ReturnType<Map<K, V>['entries']>
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
*keys(): ReturnType<Map<K, V>['keys']> {
|
|
112
|
-
for (const [key] of this) {
|
|
113
|
-
yield key
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
*values(): ReturnType<Map<K, V>['values']> {
|
|
118
|
-
for (const [_, value] of this) {
|
|
119
|
-
yield value
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|