@xylabs/forget 4.13.15 → 4.13.16
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/README.md +23 -31
- package/dist/neutral/neutral/index.d.ts +4 -33
- package/dist/neutral/spec/forget.node.spec.d.ts +2 -0
- package/dist/neutral/spec/forget.node.spec.d.ts.map +1 -0
- package/dist/neutral/spec/forget.spec.d.ts +2 -0
- package/dist/neutral/spec/forget.spec.d.ts.map +1 -0
- package/dist/node/ForgetNodeConfig.d.ts +7 -0
- package/dist/node/ForgetNodeConfig.d.ts.map +1 -0
- package/dist/node/ForgetPromiseNode.d.ts +9 -0
- package/dist/node/ForgetPromiseNode.d.ts.map +1 -0
- package/dist/node/forget.d.ts +4 -0
- package/dist/node/forget.d.ts.map +1 -0
- package/dist/node/forgetNode.d.ts +4 -0
- package/dist/node/forgetNode.d.ts.map +1 -0
- package/dist/node/neutral/index.d.ts.map +1 -0
- package/dist/node/node/index.d.ts +4 -44
- package/dist/node/node/index.d.ts.map +1 -0
- package/dist/node/spec/forget.node.spec.d.ts +2 -0
- package/dist/node/spec/forget.node.spec.d.ts.map +1 -0
- package/dist/node/spec/forget.spec.d.ts +2 -0
- package/dist/node/spec/forget.spec.d.ts.map +1 -0
- package/package.json +7 -7
- /package/{build → dist}/neutral/ForgetConfig.d.ts +0 -0
- /package/{build → dist}/neutral/ForgetConfig.d.ts.map +0 -0
- /package/{build/node → dist/neutral}/ForgetNodeConfig.d.ts +0 -0
- /package/{build/node → dist/neutral}/ForgetNodeConfig.d.ts.map +0 -0
- /package/{build → dist}/neutral/ForgetPromise.d.ts +0 -0
- /package/{build → dist}/neutral/ForgetPromise.d.ts.map +0 -0
- /package/{build/node → dist/neutral}/ForgetPromiseNode.d.ts +0 -0
- /package/{build/node → dist/neutral}/ForgetPromiseNode.d.ts.map +0 -0
- /package/{build → dist}/neutral/forget.d.ts +0 -0
- /package/{build → dist}/neutral/forget.d.ts.map +0 -0
- /package/{build/node → dist/neutral}/forgetNode.d.ts +0 -0
- /package/{build/node → dist/neutral}/forgetNode.d.ts.map +0 -0
- /package/{build → dist}/neutral/neutral/index.d.ts.map +0 -0
- /package/{build/node → dist/neutral}/node/index.d.ts +0 -0
- /package/{build/node → dist/neutral}/node/index.d.ts.map +0 -0
- /package/{build → dist}/node/ForgetConfig.d.ts +0 -0
- /package/{build → dist}/node/ForgetConfig.d.ts.map +0 -0
- /package/{build → dist}/node/ForgetPromise.d.ts +0 -0
- /package/{build → dist}/node/ForgetPromise.d.ts.map +0 -0
- /package/{build/neutral → dist/node}/neutral/index.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,62 +1,54 @@
|
|
|
1
|
-
[![logo][]](https://xylabs.com)
|
|
2
|
-
|
|
3
1
|
# @xylabs/forget
|
|
4
2
|
|
|
3
|
+
[![logo][]](https://xylabs.com)
|
|
4
|
+
|
|
5
|
+
[![main-build][]][main-build-link]
|
|
5
6
|
[![npm-badge][]][npm-link]
|
|
6
7
|
[![npm-downloads-badge][]][npm-link]
|
|
7
8
|
[![jsdelivr-badge][]][jsdelivr-link]
|
|
8
9
|
[![npm-license-badge][]](LICENSE)
|
|
10
|
+
[![codacy-badge][]][codacy-link]
|
|
11
|
+
[![codeclimate-badge][]][codeclimate-link]
|
|
12
|
+
[![snyk-badge][]][snyk-link]
|
|
13
|
+
[![socket-badge][]][socket-link]
|
|
9
14
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Table of Contents
|
|
13
|
-
|
|
14
|
-
- [Description](#description)
|
|
15
|
-
- [Install](#install)
|
|
16
|
-
- [Maintainers](#maintainers)
|
|
17
|
-
- [License](#license)
|
|
18
|
-
- [Credits](#credits)
|
|
19
|
-
|
|
20
|
-
## Description
|
|
15
|
+
Version: 4.13.15
|
|
21
16
|
|
|
22
|
-
|
|
17
|
+
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
|
|
23
18
|
|
|
24
|
-
##
|
|
25
|
-
|
|
26
|
-
Using npm:
|
|
27
|
-
|
|
28
|
-
```sh
|
|
29
|
-
npm i --save @xylabs/forget
|
|
30
|
-
```
|
|
19
|
+
## Documentation
|
|
31
20
|
|
|
32
|
-
|
|
21
|
+
Coming Soon!
|
|
33
22
|
|
|
34
|
-
|
|
35
|
-
yarn add @xylabs/forget
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Documentation
|
|
39
|
-
[Developer Reference](https://xylabs.github.io/sdk-js)
|
|
23
|
+
Part of [sdk-js](https://www.npmjs.com/package/@xyo-network/sdk-js)
|
|
40
24
|
|
|
41
25
|
## Maintainers
|
|
42
26
|
|
|
43
27
|
- [Arie Trouw](https://github.com/arietrouw) ([arietrouw.com](https://arietrouw.com))
|
|
44
|
-
- [Joel Carter](https://github.com/JoelBCarter)
|
|
45
28
|
- [Matt Jones](https://github.com/jonesmac)
|
|
29
|
+
- [Joel Carter](https://github.com/JoelBCarter)
|
|
46
30
|
- [Jordan Trouw](https://github.com/jordantrouw)
|
|
47
31
|
|
|
48
32
|
## License
|
|
49
33
|
|
|
50
|
-
See the [LICENSE](LICENSE) file for license details
|
|
34
|
+
> See the [LICENSE](LICENSE) file for license details
|
|
51
35
|
|
|
52
36
|
## Credits
|
|
53
37
|
|
|
54
|
-
[Made with 🔥and ❄️ by
|
|
38
|
+
[Made with 🔥 and ❄️ by XYLabs](https://xylabs.com)
|
|
55
39
|
|
|
56
40
|
[logo]: https://cdn.xy.company/img/brand/XYPersistentCompany_Logo_Icon_Colored.svg
|
|
57
41
|
|
|
42
|
+
[main-build]: https://github.com/xylabs/sdk-js/actions/workflows/build.yml/badge.svg
|
|
43
|
+
[main-build-link]: https://github.com/xylabs/sdk-js/actions/workflows/build.yml
|
|
58
44
|
[npm-badge]: https://img.shields.io/npm/v/@xylabs/forget.svg
|
|
59
45
|
[npm-link]: https://www.npmjs.com/package/@xylabs/forget
|
|
46
|
+
[codacy-badge]: https://app.codacy.com/project/badge/Grade/c8e15e14f37741c18cfb47ac7245c698
|
|
47
|
+
[codacy-link]: https://www.codacy.com/gh/xylabs/sdk-js/dashboard?utm_source=github.com&utm_medium=referral&utm_content=xylabs/sdk-js&utm_campaign=Badge_Grade
|
|
48
|
+
[codeclimate-badge]: https://api.codeclimate.com/v1/badges/c5eb068f806f0b047ea7/maintainability
|
|
49
|
+
[codeclimate-link]: https://codeclimate.com/github/xylabs/sdk-js/maintainability
|
|
50
|
+
[snyk-badge]: https://snyk.io/test/github/xylabs/sdk-js/badge.svg?targetFile=package.json
|
|
51
|
+
[snyk-link]: https://snyk.io/test/github/xylabs/sdk-js?targetFile=package.json
|
|
60
52
|
|
|
61
53
|
[npm-downloads-badge]: https://img.shields.io/npm/dw/@xylabs/forget
|
|
62
54
|
[npm-license-badge]: https://img.shields.io/npm/l/@xylabs/forget
|
|
@@ -1,33 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name?: string;
|
|
6
|
-
onCancel?: () => void;
|
|
7
|
-
onComplete?: (result: [T | undefined, Error | undefined]) => void;
|
|
8
|
-
onException?: (error: Error) => void;
|
|
9
|
-
timeout?: number;
|
|
10
|
-
}
|
|
11
|
-
declare const defaultForgetConfig: ForgetConfig<unknown>;
|
|
12
|
-
|
|
13
|
-
declare const forget: <T>(promise: Promisable<T>, config?: ForgetConfig<T>) => void;
|
|
14
|
-
|
|
15
|
-
type PromisableFunction<T> = () => Promisable<T>;
|
|
16
|
-
declare class ForgetPromise {
|
|
17
|
-
static activeForgets: number;
|
|
18
|
-
static exceptedForgets: number;
|
|
19
|
-
static logger: Logger;
|
|
20
|
-
static get active(): boolean;
|
|
21
|
-
static awaitInactive(interval?: number, timeout?: number): Promise<number>;
|
|
22
|
-
static exceptionHandler(error: Error, { name }: ForgetConfig, externalStackTrace?: string): void;
|
|
23
|
-
/**
|
|
24
|
-
* Used to explicitly launch an async function (or Promise) with awaiting it
|
|
25
|
-
* @param promise The promise to forget
|
|
26
|
-
* @param config Configuration of forget settings
|
|
27
|
-
*/
|
|
28
|
-
static forget<T>(promise: Promise<T> | PromiseEx<T> | PromisableFunction<T> | T, config?: ForgetConfig<T>): void;
|
|
29
|
-
static timeoutHandler(time: number, { name }: ForgetConfig, externalStackTrace?: string): void;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export { ForgetPromise, defaultForgetConfig, forget };
|
|
33
|
-
export type { ForgetConfig };
|
|
1
|
+
export * from '../forget.ts';
|
|
2
|
+
export * from '../ForgetConfig.ts';
|
|
3
|
+
export * from '../ForgetPromise.ts';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forget.node.spec.d.ts","sourceRoot":"","sources":["../../../src/spec/forget.node.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forget.spec.d.ts","sourceRoot":"","sources":["../../../src/spec/forget.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ForgetConfig } from './ForgetConfig.ts';
|
|
2
|
+
export interface ForgetNodeConfig<T = any> extends ForgetConfig<T> {
|
|
3
|
+
terminateOnException?: boolean;
|
|
4
|
+
terminateOnTimeout?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const defaultForgetNodeConfig: ForgetNodeConfig<unknown>;
|
|
7
|
+
//# sourceMappingURL=ForgetNodeConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ForgetNodeConfig.d.ts","sourceRoot":"","sources":["../../src/ForgetNodeConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAG1E,MAAM,WAAW,gBAAgB,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,YAAY,CAAC,CAAC,CAAC;IAChE,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,eAAO,MAAM,uBAAuB,EAAE,gBAAgB,CAAC,OAAO,CAI7D,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Promisable } from '@xylabs/promise';
|
|
2
|
+
import { type ForgetNodeConfig } from './ForgetNodeConfig.ts';
|
|
3
|
+
import { ForgetPromise } from './ForgetPromise.ts';
|
|
4
|
+
export declare class ForgetPromiseNode extends ForgetPromise {
|
|
5
|
+
static exceptionHandler(error: Error, config: ForgetNodeConfig, externalStackTrace?: string): void;
|
|
6
|
+
static forget<T>(promise: Promisable<T>, config?: ForgetNodeConfig<T>): void;
|
|
7
|
+
static timeoutHandler(time: number, config: ForgetNodeConfig, externalStackTrace?: string): void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ForgetPromiseNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ForgetPromiseNode.d.ts","sourceRoot":"","sources":["../../src/ForgetPromiseNode.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,EAA2B,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,qBAAa,iBAAkB,SAAQ,aAAa;WAClC,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,CAAC,EAAE,MAAM;WAUpF,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC;WAO9D,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,CAAC,EAAE,MAAM;CAQnG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forget.d.ts","sourceRoot":"","sources":["../../src/forget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAIrD,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,SAAS,UAAU,CAAC,CAAC,CAAC,EAAE,SAAS,YAAY,CAAC,CAAC,CAAC,SAEzE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forgetNode.d.ts","sourceRoot":"","sources":["../../src/forgetNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAI7D,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,SAAS,UAAU,CAAC,CAAC,CAAC,EAAE,SAAS,gBAAgB,CAAC,CAAC,CAAC,SAEjF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/neutral/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA"}
|
|
@@ -1,44 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name?: string;
|
|
6
|
-
onCancel?: () => void;
|
|
7
|
-
onComplete?: (result: [T | undefined, Error | undefined]) => void;
|
|
8
|
-
onException?: (error: Error) => void;
|
|
9
|
-
timeout?: number;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
interface ForgetNodeConfig<T = any> extends ForgetConfig<T> {
|
|
13
|
-
terminateOnException?: boolean;
|
|
14
|
-
terminateOnTimeout?: boolean;
|
|
15
|
-
}
|
|
16
|
-
declare const defaultForgetNodeConfig: ForgetNodeConfig<unknown>;
|
|
17
|
-
|
|
18
|
-
declare const forgetNode: <T>(promise: Promisable<T>, config?: ForgetNodeConfig<T>) => void;
|
|
19
|
-
|
|
20
|
-
type PromisableFunction<T> = () => Promisable<T>;
|
|
21
|
-
declare class ForgetPromise {
|
|
22
|
-
static activeForgets: number;
|
|
23
|
-
static exceptedForgets: number;
|
|
24
|
-
static logger: Logger;
|
|
25
|
-
static get active(): boolean;
|
|
26
|
-
static awaitInactive(interval?: number, timeout?: number): Promise<number>;
|
|
27
|
-
static exceptionHandler(error: Error, { name }: ForgetConfig, externalStackTrace?: string): void;
|
|
28
|
-
/**
|
|
29
|
-
* Used to explicitly launch an async function (or Promise) with awaiting it
|
|
30
|
-
* @param promise The promise to forget
|
|
31
|
-
* @param config Configuration of forget settings
|
|
32
|
-
*/
|
|
33
|
-
static forget<T>(promise: Promise<T> | PromiseEx<T> | PromisableFunction<T> | T, config?: ForgetConfig<T>): void;
|
|
34
|
-
static timeoutHandler(time: number, { name }: ForgetConfig, externalStackTrace?: string): void;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
declare class ForgetPromiseNode extends ForgetPromise {
|
|
38
|
-
static exceptionHandler(error: Error, config: ForgetNodeConfig, externalStackTrace?: string): void;
|
|
39
|
-
static forget<T>(promise: Promisable<T>, config?: ForgetNodeConfig<T>): void;
|
|
40
|
-
static timeoutHandler(time: number, config: ForgetNodeConfig, externalStackTrace?: string): void;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export { ForgetPromiseNode as ForgetPromise, defaultForgetNodeConfig, forgetNode as forget };
|
|
44
|
-
export type { ForgetNodeConfig };
|
|
1
|
+
export { forgetNode as forget } from '../forgetNode.ts';
|
|
2
|
+
export * from '../ForgetNodeConfig.ts';
|
|
3
|
+
export { ForgetPromiseNode as ForgetPromise } from '../ForgetPromiseNode.ts';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACvD,cAAc,wBAAwB,CAAA;AACtC,OAAO,EAAE,iBAAiB,IAAI,aAAa,EAAE,MAAM,yBAAyB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forget.node.spec.d.ts","sourceRoot":"","sources":["../../../src/spec/forget.node.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forget.spec.d.ts","sourceRoot":"","sources":["../../../src/spec/forget.spec.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/forget",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.16",
|
|
4
4
|
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"forget",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"module": "./dist/node/index.mjs",
|
|
41
41
|
"types": "./dist/node/node/index.d.ts",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@xylabs/delay": "^4.13.
|
|
44
|
-
"@xylabs/logger": "^4.13.
|
|
45
|
-
"@xylabs/promise": "^4.13.
|
|
46
|
-
"@xylabs/typeof": "^4.13.
|
|
43
|
+
"@xylabs/delay": "^4.13.16",
|
|
44
|
+
"@xylabs/logger": "^4.13.16",
|
|
45
|
+
"@xylabs/promise": "^4.13.16",
|
|
46
|
+
"@xylabs/typeof": "^4.13.16"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.
|
|
50
|
-
"@xylabs/tsconfig-dom": "^7.0.0-rc.
|
|
49
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.27",
|
|
50
|
+
"@xylabs/tsconfig-dom": "^7.0.0-rc.27",
|
|
51
51
|
"typescript": "^5.8.3",
|
|
52
52
|
"vitest": "^3.2.4"
|
|
53
53
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|