vivth 1.0.2 → 1.0.3
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/bun.lock +9 -12
- package/package.json +5 -7
- package/types/src/class/Console.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 +1 -1
- package/types/src/doc/parsedFile.d.mts +1 -1
package/bun.lock
CHANGED
|
@@ -8,9 +8,8 @@
|
|
|
8
8
|
"esbuild": "^0.25.9",
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@html_first/simple_queue": "^1.3.1",
|
|
12
11
|
"@types/bun": "latest",
|
|
13
|
-
"concurrently": "^9.1
|
|
12
|
+
"concurrently": "^9.2.1",
|
|
14
13
|
"typescript": "^5.8.3",
|
|
15
14
|
},
|
|
16
15
|
},
|
|
@@ -68,19 +67,17 @@
|
|
|
68
67
|
|
|
69
68
|
"@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.9", "", { "os": "win32", "cpu": "x64" }, "sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ=="],
|
|
70
69
|
|
|
71
|
-
"@
|
|
72
|
-
|
|
73
|
-
"@types/bun": ["@types/bun@1.2.3", "", { "dependencies": { "bun-types": "1.2.3" } }, "sha512-054h79ipETRfjtsCW9qJK8Ipof67Pw9bodFWmkfkaUaRiIQ1dIV2VTlheshlBx3mpKr0KeK8VqnMMCtgN9rQtw=="],
|
|
70
|
+
"@types/bun": ["@types/bun@1.2.21", "", { "dependencies": { "bun-types": "1.2.21" } }, "sha512-NiDnvEqmbfQ6dmZ3EeUO577s4P5bf4HCTXtI6trMc6f6RzirY5IrF3aIookuSpyslFzrnvv2lmEWv5HyC1X79A=="],
|
|
74
71
|
|
|
75
72
|
"@types/node": ["@types/node@22.13.5", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg=="],
|
|
76
73
|
|
|
77
|
-
"@types/
|
|
74
|
+
"@types/react": ["@types/react@19.1.12", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-cMoR+FoAf/Jyq6+Df2/Z41jISvGZZ2eTlnsaJRptmZ76Caldwy1odD4xTr/gNV9VLj0AWgg/nmkevIyUfIIq5w=="],
|
|
78
75
|
|
|
79
76
|
"ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
|
80
77
|
|
|
81
78
|
"ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
|
|
82
79
|
|
|
83
|
-
"bun-types": ["bun-types@1.2.
|
|
80
|
+
"bun-types": ["bun-types@1.2.21", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-sa2Tj77Ijc/NTLS0/Odjq/qngmEPZfbfnOERi0KRUYhT9R8M4VBioWVmMWE5GrYbKMc+5lVybXygLdibHaqVqw=="],
|
|
84
81
|
|
|
85
82
|
"chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
|
|
86
83
|
|
|
@@ -92,7 +89,9 @@
|
|
|
92
89
|
|
|
93
90
|
"color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],
|
|
94
91
|
|
|
95
|
-
"concurrently": ["concurrently@9.1
|
|
92
|
+
"concurrently": ["concurrently@9.2.1", "", { "dependencies": { "chalk": "4.1.2", "rxjs": "7.8.2", "shell-quote": "1.8.3", "supports-color": "8.1.1", "tree-kill": "1.2.2", "yargs": "17.7.2" }, "bin": { "conc": "dist/bin/concurrently.js", "concurrently": "dist/bin/concurrently.js" } }, "sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng=="],
|
|
93
|
+
|
|
94
|
+
"csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="],
|
|
96
95
|
|
|
97
96
|
"emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
|
|
98
97
|
|
|
@@ -106,15 +105,13 @@
|
|
|
106
105
|
|
|
107
106
|
"is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="],
|
|
108
107
|
|
|
109
|
-
"lodash": ["lodash@4.17.21", "", {}, "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="],
|
|
110
|
-
|
|
111
108
|
"readdirp": ["readdirp@4.1.2", "", {}, "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg=="],
|
|
112
109
|
|
|
113
110
|
"require-directory": ["require-directory@2.1.1", "", {}, "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="],
|
|
114
111
|
|
|
115
112
|
"rxjs": ["rxjs@7.8.2", "", { "dependencies": { "tslib": "^2.1.0" } }, "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA=="],
|
|
116
113
|
|
|
117
|
-
"shell-quote": ["shell-quote@1.8.
|
|
114
|
+
"shell-quote": ["shell-quote@1.8.3", "", {}, "sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw=="],
|
|
118
115
|
|
|
119
116
|
"string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
|
|
120
117
|
|
|
@@ -126,7 +123,7 @@
|
|
|
126
123
|
|
|
127
124
|
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
|
128
125
|
|
|
129
|
-
"typescript": ["typescript@5.
|
|
126
|
+
"typescript": ["typescript@5.9.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A=="],
|
|
130
127
|
|
|
131
128
|
"undici-types": ["undici-types@6.20.0", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="],
|
|
132
129
|
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vivth",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "extremely simple signal as library primitives",
|
|
5
5
|
"main": "index.mjs",
|
|
6
6
|
"types": "./types/index.d.mts",
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"@types/bun": "latest"
|
|
8
|
+
"@types/bun": "latest",
|
|
9
|
+
"concurrently": "^9.2.1",
|
|
10
|
+
"typescript": "^5.9.2"
|
|
12
11
|
},
|
|
13
12
|
"dependencies": {
|
|
14
13
|
"chokidar": "^4.0.3",
|
|
@@ -31,8 +30,7 @@
|
|
|
31
30
|
},
|
|
32
31
|
"homepage": "https://github.com/hakimjazuli/vivth#readme",
|
|
33
32
|
"scripts": {
|
|
34
|
-
"dev": "concurrently 'bun --watch ./dev/index.mjs'"
|
|
35
|
-
"typed": "bun tsc --watch"
|
|
33
|
+
"dev": "concurrently 'bun --watch ./dev/index.mjs' 'bun tsc --watch'"
|
|
36
34
|
},
|
|
37
35
|
"sideEffects": false
|
|
38
36
|
}
|
|
@@ -12,7 +12,7 @@ export class Console {
|
|
|
12
12
|
* @param {string} bgcolor
|
|
13
13
|
* @returns {void}
|
|
14
14
|
*/
|
|
15
|
-
static
|
|
15
|
+
static #call: (prefix: string, mode: "log" | "info" | "error" | "warn", data: any, color: string, bgcolor: string) => void;
|
|
16
16
|
/**
|
|
17
17
|
* @description
|
|
18
18
|
* @param {any} data
|
|
@@ -17,7 +17,7 @@ export class EventSignal<isList extends boolean> {
|
|
|
17
17
|
/**
|
|
18
18
|
* @type {QChannel<string>}
|
|
19
19
|
*/
|
|
20
|
-
static
|
|
20
|
+
static #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 #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 #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 #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 #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 #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 #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 #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 #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 #isCloseWorkerEvent: (ev: any) => boolean;
|
|
36
36
|
/**
|
|
37
37
|
* @description
|
|
38
38
|
* - instantiate via created class from `setup` static method;
|
|
@@ -3,7 +3,7 @@ export class parsedFile {
|
|
|
3
3
|
* @param {string} exportName
|
|
4
4
|
* @returns {boolean}
|
|
5
5
|
*/
|
|
6
|
-
static
|
|
6
|
+
static #isExportNameValid: (exportName: string) => boolean;
|
|
7
7
|
/**
|
|
8
8
|
* @param {string} content
|
|
9
9
|
* @returns { RegExpExecArray[] }
|