vivth 1.0.1 → 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/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 '$src/myEnv'
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 '../src/class/Console.mjs';
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/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.2",
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
- "@html_first/simple_queue": ["@html_first/simple_queue@1.3.1", "", {}, "sha512-YidSXC9aTa0iQAxOA9NIAQWtKp/PU6IwLU+tvlDV62FAy2vwa3/SdpvaMFkBS+3/3t0qOKQ8mZYesDWdhY9Yig=="],
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/ws": ["@types/ws@8.5.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw=="],
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.3", "", { "dependencies": { "@types/node": "*", "@types/ws": "~8.5.10" } }, "sha512-P7AeyTseLKAvgaZqQrvp3RqFM3yN9PlcLuSTe7SoJOfZkER73mLdT2vEQi8U64S1YvM/ldcNiQjn0Sn7H9lGgg=="],
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.2", "", { "dependencies": { "chalk": "^4.1.2", "lodash": "^4.17.21", "rxjs": "^7.8.1", "shell-quote": "^1.8.1", "supports-color": "^8.1.1", "tree-kill": "^1.2.2", "yargs": "^17.7.2" }, "bin": { "concurrently": "dist/bin/concurrently.js", "conc": "dist/bin/concurrently.js" } }, "sha512-H9MWcoPsYddwbOGM6difjVwVZHl63nwMEwDJG/L7VGtuaJhb12h2caPG2tVPWs7emuYix252iGfqOyrz1GczTQ=="],
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.2", "", {}, "sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA=="],
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.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="],
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.1",
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
- "typescript": "^5.8.3",
9
- "@html_first/simple_queue": "^1.3.1",
10
- "concurrently": "^9.1.2",
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
  }
@@ -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 '$src/myEnv'
66
+ * import { myEnv } from './myEnv.mjs'
67
67
  *
68
68
  * myEnv.correction(false); // this will notify all subscribers;
69
69
  */
@@ -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 '../src/class/Console.mjs';
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
  *
@@ -12,7 +12,7 @@ export class Console {
12
12
  * @param {string} bgcolor
13
13
  * @returns {void}
14
14
  */
15
- static "__#1@#call": (prefix: string, mode: "log" | "info" | "error" | "warn", data: any, color: string, bgcolor: string) => void;
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
@@ -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 '$src/myEnv'
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 "__#12261@#qChannelEventSignal": QChannel<string>;
20
+ static #qChannelEventSignal: QChannel<string>;
21
21
  /**
22
22
  * @description
23
23
  * - the constructor it self is set to `private`;
@@ -7,7 +7,7 @@ export class Paths {
7
7
  /**
8
8
  * @type {Paths}
9
9
  */
10
- static "__#13337@#instance": Paths;
10
+ static #instance: Paths;
11
11
  /**
12
12
  * @description
13
13
  * - reference for rootPath
@@ -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 "__#7@#uniquePromiser": Map<import("../types/AnyButUndefined.mjs").AnyButUndefined, [Promise<any>, {}]>;
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 "__#7@#uniqueCB": (id: import("../types/AnyButUndefined.mjs").AnyButUndefined) => Promise<import("../types/QCBReturn.mjs").QCBReturn>;
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 "__#13628@#notify": (setOfSubscribers: Set<Effect>) => void;
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 "__#18619@#isRegistered": boolean;
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 "__#18619@#options": import("worker_threads").WorkerOptions & {
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 "__#18619@#workerFilehandler": (handler: string, options: WorkerOptions | import("worker_threads").WorkerOptions, worker: WorkerMainThread<any>, listener: (any: any) => void, isInline: boolean) => Promise<void>;
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 "__#18619@#isBrowser": boolean;
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 "__#16626@#parentPortRef": {
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 "__#16626@#isCloseWorkerEvent": (ev: any) => boolean;
35
+ static #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 "__#17292@#instance": JSautoDOC;
21
+ static #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 '../src/class/Console.mjs';
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
  *
@@ -3,7 +3,7 @@ export class parsedFile {
3
3
  * @param {string} exportName
4
4
  * @returns {boolean}
5
5
  */
6
- static "__#12@#isExportNameValid": (exportName: string) => boolean;
6
+ static #isExportNameValid: (exportName: string) => boolean;
7
7
  /**
8
8
  * @param {string} content
9
9
  * @returns { RegExpExecArray[] }