vivth 1.0.0 → 1.0.2
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 +2 -4
- package/package.json +1 -1
- package/src/class/EnvSignal.mjs +1 -1
- package/src/doc/JSautoDOC.mjs +1 -3
- package/types/src/class/EnvSignal.d.mts +1 -1
- package/types/src/class/EventSignal.d.mts +1 -1
- package/types/src/class/Paths.d.mts +1 -1
- package/types/src/class/QChannel.d.mts +2 -2
- package/types/src/class/Signal.d.mts +1 -1
- package/types/src/class/WorkerMainThread.d.mts +4 -4
- package/types/src/class/WorkerThread.d.mts +2 -2
- package/types/src/doc/JSautoDOC.d.mts +2 -4
- package/.vivth/dist/init.mjs +0 -24
package/README.md
CHANGED
|
@@ -416,7 +416,7 @@ npm i vivth
|
|
|
416
416
|
export const myEnv = new EnvSignal(true);
|
|
417
417
|
|
|
418
418
|
// somewhere else on the program
|
|
419
|
-
import { myEnv } from '
|
|
419
|
+
import { myEnv } from './myEnv.mjs'
|
|
420
420
|
|
|
421
421
|
myEnv.correction(false); // this will notify all subscribers;
|
|
422
422
|
|
|
@@ -1708,9 +1708,7 @@ npm i vivth
|
|
|
1708
1708
|
```
|
|
1709
1709
|
- <i>example</i>:
|
|
1710
1710
|
```js
|
|
1711
|
-
import { Console } from '
|
|
1712
|
-
import { Setup } from '../src/class/Setup.mjs';
|
|
1713
|
-
import { JSautoDOC } from '../src/doc/JSautoDOC.mjs';
|
|
1711
|
+
import { Console, Setup, JSautoDOC } from 'vivth';
|
|
1714
1712
|
|
|
1715
1713
|
const { paths, safeExit } = Setup;
|
|
1716
1714
|
|
package/package.json
CHANGED
package/src/class/EnvSignal.mjs
CHANGED
|
@@ -63,7 +63,7 @@ export class EnvSignal {
|
|
|
63
63
|
* export const myEnv = new EnvSignal(true);
|
|
64
64
|
*
|
|
65
65
|
* // somewhere else on the program
|
|
66
|
-
* import { myEnv } from '
|
|
66
|
+
* import { myEnv } from './myEnv.mjs'
|
|
67
67
|
*
|
|
68
68
|
* myEnv.correction(false); // this will notify all subscribers;
|
|
69
69
|
*/
|
package/src/doc/JSautoDOC.mjs
CHANGED
|
@@ -67,9 +67,7 @@ export class JSautoDOC {
|
|
|
67
67
|
* @param {import('chokidar').ChokidarOptions} [options.option]
|
|
68
68
|
* - ChokidarOptions;
|
|
69
69
|
* @example
|
|
70
|
-
* import { Console } from '
|
|
71
|
-
* import { Setup } from '../src/class/Setup.mjs';
|
|
72
|
-
* import { JSautoDOC } from '../src/doc/JSautoDOC.mjs';
|
|
70
|
+
* import { Console, Setup, JSautoDOC } from 'vivth';
|
|
73
71
|
*
|
|
74
72
|
* const { paths, safeExit } = Setup;
|
|
75
73
|
*
|
|
@@ -37,7 +37,7 @@ export class EnvSignal<V> {
|
|
|
37
37
|
* export const myEnv = new EnvSignal(true);
|
|
38
38
|
*
|
|
39
39
|
* // somewhere else on the program
|
|
40
|
-
* import { myEnv } from '
|
|
40
|
+
* import { myEnv } from './myEnv.mjs'
|
|
41
41
|
*
|
|
42
42
|
* myEnv.correction(false); // this will notify all subscribers;
|
|
43
43
|
*/
|
|
@@ -17,7 +17,7 @@ export class EventSignal<isList extends boolean> {
|
|
|
17
17
|
/**
|
|
18
18
|
* @type {QChannel<string>}
|
|
19
19
|
*/
|
|
20
|
-
static "__#
|
|
20
|
+
static "__#7@#qChannelEventSignal": QChannel<string>;
|
|
21
21
|
/**
|
|
22
22
|
* @description
|
|
23
23
|
* - the constructor it self is set to `private`;
|
|
@@ -20,14 +20,14 @@ export class QChannel<T extends import("../types/AnyButUndefined.mjs").AnyButUnd
|
|
|
20
20
|
/**
|
|
21
21
|
* @type {Map<AnyButUndefinedType, [Promise<any>, {}]>}
|
|
22
22
|
*/
|
|
23
|
-
static "__#
|
|
23
|
+
static "__#6@#uniquePromiser": Map<import("../types/AnyButUndefined.mjs").AnyButUndefined, [Promise<any>, {}]>;
|
|
24
24
|
/**
|
|
25
25
|
* - ensures that each id has only one task running at a time.
|
|
26
26
|
* - calls with the same id will wait for the previous call to finish.
|
|
27
27
|
* @param {AnyButUndefinedType} id
|
|
28
28
|
* @returns {Promise<QCBReturn>} Resolves when it's safe to proceed for the given id, returning a cleanup function
|
|
29
29
|
*/
|
|
30
|
-
static "__#
|
|
30
|
+
static "__#6@#uniqueCB": (id: import("../types/AnyButUndefined.mjs").AnyButUndefined) => Promise<import("../types/QCBReturn.mjs").QCBReturn>;
|
|
31
31
|
/**
|
|
32
32
|
* @description
|
|
33
33
|
* - first in first out handler
|
|
@@ -11,7 +11,7 @@ export class Signal<Value> {
|
|
|
11
11
|
/**
|
|
12
12
|
* @param {Set<Effect>} setOfSubscribers
|
|
13
13
|
*/
|
|
14
|
-
static "__#
|
|
14
|
+
static "__#3@#notify": (setOfSubscribers: Set<Effect>) => void;
|
|
15
15
|
/**
|
|
16
16
|
* @description
|
|
17
17
|
* @param {Value} value
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* @template {WorkerThread} WT
|
|
12
12
|
*/
|
|
13
13
|
export class WorkerMainThread<WT extends WorkerThread> {
|
|
14
|
-
static "__#
|
|
14
|
+
static "__#11@#isRegistered": boolean;
|
|
15
15
|
/**
|
|
16
16
|
* @description
|
|
17
17
|
* - need to be called first, before any `WorkerMainThread` instantiation:
|
|
@@ -70,7 +70,7 @@ export class WorkerMainThread<WT extends WorkerThread> {
|
|
|
70
70
|
root: string;
|
|
71
71
|
base: string;
|
|
72
72
|
}) => Promise<string>;
|
|
73
|
-
static "__#
|
|
73
|
+
static "__#11@#options": import("worker_threads").WorkerOptions & {
|
|
74
74
|
type?: "module";
|
|
75
75
|
};
|
|
76
76
|
/**
|
|
@@ -82,11 +82,11 @@ export class WorkerMainThread<WT extends WorkerThread> {
|
|
|
82
82
|
* @param {boolean} isInline
|
|
83
83
|
* @returns {Promise<void>}
|
|
84
84
|
*/
|
|
85
|
-
static "__#
|
|
85
|
+
static "__#11@#workerFilehandler": (handler: string, options: WorkerOptions | import("worker_threads").WorkerOptions, worker: WorkerMainThread<any>, listener: (any: any) => void, isInline: boolean) => Promise<void>;
|
|
86
86
|
/**
|
|
87
87
|
* @type {boolean}
|
|
88
88
|
*/
|
|
89
|
-
static "__#
|
|
89
|
+
static "__#11@#isBrowser": boolean;
|
|
90
90
|
/**
|
|
91
91
|
* @description
|
|
92
92
|
* - check whether js run in browser
|
|
@@ -8,7 +8,7 @@ export class WorkerThread<Receive, Post> {
|
|
|
8
8
|
/**
|
|
9
9
|
* @type {{parentPort:()=>Promise<any>}}
|
|
10
10
|
*/
|
|
11
|
-
static "__#
|
|
11
|
+
static "__#10@#parentPortRef": {
|
|
12
12
|
parentPort: () => Promise<any>;
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
@@ -32,7 +32,7 @@ export class WorkerThread<Receive, Post> {
|
|
|
32
32
|
/**
|
|
33
33
|
* @param {any} ev
|
|
34
34
|
*/
|
|
35
|
-
static "__#
|
|
35
|
+
static "__#10@#isCloseWorkerEvent": (ev: any) => boolean;
|
|
36
36
|
/**
|
|
37
37
|
* @description
|
|
38
38
|
* - instantiate via created class from `setup` static method;
|
|
@@ -18,7 +18,7 @@ export class JSautoDOC {
|
|
|
18
18
|
/**
|
|
19
19
|
* @type {JSautoDOC}
|
|
20
20
|
*/
|
|
21
|
-
static "__#
|
|
21
|
+
static "__#4682@#instance": JSautoDOC;
|
|
22
22
|
/**
|
|
23
23
|
* @description
|
|
24
24
|
* @param {Object} [options]
|
|
@@ -34,9 +34,7 @@ export class JSautoDOC {
|
|
|
34
34
|
* @param {import('chokidar').ChokidarOptions} [options.option]
|
|
35
35
|
* - ChokidarOptions;
|
|
36
36
|
* @example
|
|
37
|
-
* import { Console } from '
|
|
38
|
-
* import { Setup } from '../src/class/Setup.mjs';
|
|
39
|
-
* import { JSautoDOC } from '../src/doc/JSautoDOC.mjs';
|
|
37
|
+
* import { Console, Setup, JSautoDOC } from 'vivth';
|
|
40
38
|
*
|
|
41
39
|
* const { paths, safeExit } = Setup;
|
|
42
40
|
*
|
package/.vivth/dist/init.mjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-check
|
|
3
|
-
|
|
4
|
-
import { LazyFactory } from '../../src/function/LazyFactory.mjs';
|
|
5
|
-
|
|
6
|
-
const node_modules = LazyFactory(() => ({
|
|
7
|
-
/** @node_modules */
|
|
8
|
-
}));
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @type {Record<string, string>}
|
|
12
|
-
*/
|
|
13
|
-
const workers = LazyFactory(() => ({
|
|
14
|
-
/** @workers */
|
|
15
|
-
}));
|
|
16
|
-
|
|
17
|
-
const src = LazyFactory(() => ({
|
|
18
|
-
init: async () => {
|
|
19
|
-
/** @entry */
|
|
20
|
-
},
|
|
21
|
-
/** @src */
|
|
22
|
-
}));
|
|
23
|
-
|
|
24
|
-
src.init();
|