@ix-xs/node-comfort 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/core/Logger.js CHANGED
@@ -202,7 +202,6 @@ module.exports = {
202
202
  * Supports strings, objects (pretty JSON), and chaining.
203
203
  *
204
204
  * @param {any} content - Content to log (string, object, or primitive).
205
- * @returns {this} Chainable instance.
206
205
  * @example
207
206
  * nodeComfort.log("<%greenBright ✓ Done%>");
208
207
  * nodeComfort.log({ users: 42, active: true });
@@ -268,7 +267,6 @@ module.exports = {
268
267
  * Starts a new log group with ▼ indicator and increased indentation.
269
268
  *
270
269
  * @param {string} label - Group label (supports colors).
271
- * @returns {this} Chainable instance.
272
270
  * @example
273
271
  * nodeComfort.group("<%yellow Processing%>").log("Step 1").groupEnd();
274
272
  */
@@ -282,7 +280,6 @@ module.exports = {
282
280
  /**
283
281
  * Ends current group and reduces indentation.
284
282
  *
285
- * @returns {this} Chainable instance.
286
283
  * @example
287
284
  * nodeComfort.group("Work").groupEnd();
288
285
  */
@@ -299,7 +296,6 @@ module.exports = {
299
296
  * @param {string} [options.delimiters.start="<%="] - Start delimiter.
300
297
  * @param {string} [options.delimiters.end="%>"] - End delimiter.
301
298
  * @param {boolean} [options.timestamp=true] - Show timestamps.
302
- * @returns {this} Chainable instance.
303
299
  * @example
304
300
  * nodeComfort.setLogger({
305
301
  * delimiters: { start: "{{", end: "}}" },
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@ix-xs/node-comfort",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
+ "types": "types/index.d.ts",
6
7
  "scripts": {
7
8
  "test": "echo \"Error: no test specified\" && exit 1"
8
9
  },
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "CommonJS",
5
+ "allowJs": true,
6
+ "declaration": true,
7
+ "emitDeclarationOnly": true,
8
+ "outDir": "types",
9
+ "declarationMap": true,
10
+ "skipLibCheck": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "moduleResolution": "node",
13
+ "esModuleInterop": true,
14
+ "resolveJsonModule": true
15
+ },
16
+ "include": ["**/*"],
17
+ "exclude": ["node_modules", "types"]
18
+ }
@@ -0,0 +1,25 @@
1
+ export class cli_stream {
2
+ constructor(command: any, args: any);
3
+ /**
4
+ * @typedef {"error"|"data"|"stopped"} EventName
5
+ * @typedef {{
6
+ * error: (error: Error) => void|Promise<void>,
7
+ * data: (message: string) => void|Promise<void>,
8
+ * stopped: (code: number, signal: keyof import("node:child_process").ChildProcessEventMap) => void|Promise<void>,
9
+ * }} EventHandler
10
+ */
11
+ /**
12
+ * @template {EventName} E
13
+ * @param {E} event
14
+ * @param {EventHandler[E]} handler
15
+ */
16
+ on<E extends "data" | "error" | "stopped">(event: E, handler: {
17
+ error: (error: Error) => void | Promise<void>;
18
+ data: (message: string) => void | Promise<void>;
19
+ stopped: (code: number, signal: keyof import("node:child_process").ChildProcessEventMap) => void | Promise<void>;
20
+ }[E]): this;
21
+ stop(): Promise<any>;
22
+ #private;
23
+ }
24
+ export declare function cli_run(command: string): NonSharedBuffer & string;
25
+ //# sourceMappingURL=CLI.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CLI.d.ts","sourceRoot":"","sources":["../../core/CLI.js"],"names":[],"mappings":"AAGA;IAIE,qCAqBC;IAED;;;;;;;SAOE;IACF;;;;SAIE;IACF,GAJwB,CAAC,SAAb,4BAAW,SACb,CAAC;eAPF,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAC,OAAO,CAAC,IAAI,CAAC;cACrC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAAC,OAAO,CAAC,IAAI,CAAC;iBACpC,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,OAAO,oBAAoB,EAAE,oBAAoB,KAAK,IAAI,GAAC,OAAO,CAAC,IAAI,CAAC;gBAW/G;IAED,qBA4BC;;CACF;AAUU,yCAFC,MAAM,4BAOf"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Checks if the value is an array.
3
+ * @param {*} value - The value to check.
4
+ * @returns {boolean} Returns `true` if the value is an array, otherwise `false`.
5
+ */
6
+ export function isArray(value: any): boolean;
7
+ /**
8
+ * Checks if the value is a valid number (not NaN).
9
+ * @param {*} value - The value to check.
10
+ * @returns {boolean} Returns `true` if the value is a valid number, otherwise `false`.
11
+ */
12
+ export function isNumber(value: any): boolean;
13
+ /**
14
+ * Checks if the value is a function.
15
+ * @param {*} value - The value to check.
16
+ * @returns {boolean} Returns `true` if the value is a function, otherwise `false`.
17
+ */
18
+ export function isFunction(value: any): boolean;
19
+ /**
20
+ * Checks if the value is an object (and not `null`).
21
+ * @param {*} value - The value to check.
22
+ * @returns {boolean} Returns `true` if the value is a non-null object, otherwise `false`.
23
+ */
24
+ export function isObject(value: any): boolean;
25
+ /**
26
+ * Checks if the value is a boolean.
27
+ * @param {*} value - The value to check.
28
+ * @returns {boolean} Returns `true` if the value is a boolean, otherwise `false`.
29
+ */
30
+ export function isBoolean(value: any): boolean;
31
+ /**
32
+ * Checks if the value is a string.
33
+ * @param {*} value - The value to check.
34
+ * @returns {boolean} Returns `true` if the value is a string, otherwise `false`.
35
+ */
36
+ export function isString(value: any): boolean;
37
+ /**
38
+ * Checks if the value is `undefined`.
39
+ * @param {*} value - The value to check.
40
+ * @returns {boolean} Returns `true` if the value is `undefined`, otherwise `false`.
41
+ */
42
+ export function isUndefined(value: any): boolean;
43
+ /**
44
+ * Checks if the value is `null`.
45
+ * @param {*} value - The value to check.
46
+ * @returns {boolean} Returns `true` if the value is `null`, otherwise `false`.
47
+ */
48
+ export function isNull(value: any): boolean;
49
+ /**
50
+ * Checks if the value is a valid `Date` object.
51
+ * @param {*} value - The value to check.
52
+ * @returns {boolean} Returns `true` if the value is an instance of `Date`, otherwise `false`.
53
+ */
54
+ export function isDate(value: any): boolean;
55
+ /**
56
+ * Checks if the value is a `Map` instance.
57
+ * @param {*} value - The value to check.
58
+ * @returns {boolean} Returns `true` if the value is a Map, otherwise `false`.
59
+ */
60
+ export function isMap(value: any): boolean;
61
+ /**
62
+ * Checks if the value is a `Set` instance.
63
+ * @param {*} value - The value to check.
64
+ * @returns {boolean} Returns `true` if the value is a Set, otherwise `false`.
65
+ */
66
+ export function isSet(value: any): boolean;
67
+ /**
68
+ * Checks if the value is a native JavaScript error (`Error`, `TypeError`, etc.).
69
+ * @param {*} value - The value to check.
70
+ * @returns {boolean} Returns `true` if the value is a native error, otherwise `false`.
71
+ */
72
+ export function isError(value: any): boolean;
73
+ //# sourceMappingURL=Checker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checker.d.ts","sourceRoot":"","sources":["../../core/Checker.js"],"names":[],"mappings":"AAmBE;;;;KAIE;AACF,+BAHU,GAAC,GACC,OAAO,CAIlB;AAED;;;;KAIE;AACF,gCAHU,GAAC,GACC,OAAO,CAIlB;AAED;;;;KAIE;AACF,kCAHU,GAAC,GACC,OAAO,CAIlB;AAED;;;;KAIE;AACF,gCAHU,GAAC,GACC,OAAO,CAIlB;AAED;;;;KAIE;AACF,iCAHU,GAAC,GACC,OAAO,CAIlB;AAED;;;;KAIE;AACF,gCAHU,GAAC,GACC,OAAO,CAIlB;AAED;;;;KAIE;AACF,mCAHU,GAAC,GACC,OAAO,CAIlB;AAED;;;;KAIE;AACF,8BAHU,GAAC,GACC,OAAO,CAIlB;AAED;;;;KAIE;AACF,8BAHU,GAAC,GACC,OAAO,CAIlB;AAED;;;;KAIE;AACF,6BAHU,GAAC,GACC,OAAO,CAIlB;AAED;;;;KAIE;AACF,6BAHU,GAAC,GACC,OAAO,CAIlB;AAED;;;;KAIE;AACF,+BAHU,GAAC,GACC,OAAO,CAIlB"}
@@ -0,0 +1,211 @@
1
+ /**
2
+ * Safely read an environment variable.
3
+ *
4
+ * Loads variables from the default `.env` file (if present) and then
5
+ * returns the value for the given key. When `options.envFile` is provided,
6
+ * the function expects `process.env[options.envFile]` to be an object
7
+ * containing namespaced environment variables (e.g. per environment).
8
+ *
9
+ * @param {string} env - Environment variable name (e.g. "PORT").
10
+ * @param {object} [options] - Optional configuration object.
11
+ * @param {string} [options.envFile] - Name of a namespaced env container under `process.env`.
12
+ * @returns {string|undefined} The environment variable value, or `undefined` if not found.
13
+ */
14
+ export function getEnv(env: string, options?: {
15
+ envFile?: string;
16
+ }): string | undefined;
17
+ /**
18
+ * Resolves path relative to caller file or current directory.
19
+ * Supports `./`, `../`, absolute paths, and searches for existing paths.
20
+ * @param {string} [path=process.cwd()] - Path to resolve.
21
+ * @returns {string} Resolved absolute path.
22
+ * @example
23
+ * nodeComfort.createPath("./data/users"); // Resolves from caller file
24
+ */
25
+ export function createPath(path?: string): string;
26
+ /**
27
+ * Returns all folders in path (recursive option).
28
+ * @param {string} [path=process.cwd()] - Starting directory.
29
+ * @param {boolean} [recursive=true] - Include subfolders.
30
+ * @returns {string[]|undefined} Array of folder paths.
31
+ */
32
+ export function getFoldersIn(path?: string, recursive?: boolean): string[] | undefined;
33
+ /**
34
+ * Resolves and returns existing folder path.
35
+ * @param {string} [path=process.cwd()] - Folder path.
36
+ * @returns {string|undefined} Absolute folder path.
37
+ */
38
+ export function getFolder(path?: string): string | undefined;
39
+ /**
40
+ * Returns all files in path (recursive option).
41
+ * @param {string} [path=process.cwd()] - Starting directory.
42
+ * @param {boolean} [recursive=true] - Include subdirectories.
43
+ * @returns {string[]|undefined} Array of file paths.
44
+ */
45
+ export function getFilesIn(path?: string, recursive?: boolean): string[] | undefined;
46
+ /**
47
+ * Resolves and returns existing file path.
48
+ * @param {string} path - File path.
49
+ * @returns {string|undefined} Absolute file path.
50
+ */
51
+ export function getFile(path: string): string | undefined;
52
+ /**
53
+ * Creates folder (recursive) with force overwrite option.
54
+ * @param {string} path - Folder path to create.
55
+ * @param {boolean} [force=false] - Overwrite if exists.
56
+ * @returns {boolean|undefined} Success status.
57
+ */
58
+ export function createFolder(path: string, force?: boolean): boolean | undefined;
59
+ /**
60
+ * Creates file with auto-directory creation and content serialization.
61
+ * Supports string, object (→ JSON), null/undefined (→ empty).
62
+ * @param {string} path - File path.
63
+ * @param {boolean} [force=false] - Overwrite if exists.
64
+ * @param {string|object|null|undefined} [data] - File content.
65
+ * @returns {boolean|undefined} Success status.
66
+ * @example
67
+ * nodeComfort.createFile("config.json", false, { apiKey: "secret" });
68
+ */
69
+ export function createFile(path: string, force?: boolean, data?: string | object | null | undefined): boolean | undefined;
70
+ /**
71
+ * Deletes multiple folders matching filter.
72
+ * @param {string} [path=process.cwd()] - Starting directory.
73
+ * @param {(folder: string) => boolean} [filter] - Folder filter function.
74
+ * @returns {number|undefined} Count of deleted folders.
75
+ */
76
+ export function deleteFoldersIn(path?: string, filter?: (folder: string) => boolean): number | undefined;
77
+ /**
78
+ * Deletes folder and all contents recursively.
79
+ * @param {string} path - Folder path.
80
+ * @returns {boolean|undefined} Success status.
81
+ */
82
+ export function deleteFolder(path: string): boolean | undefined;
83
+ /**
84
+ * Deletes multiple files matching filter.
85
+ * @param {string} [path=process.cwd()] - Starting directory.
86
+ * @param {boolean} [recursive=false] - Search subdirectories.
87
+ * @param {(file: string) => boolean} [filter] - File filter function.
88
+ * @returns {number|undefined} Count of deleted files.
89
+ */
90
+ export function deleteFilesIn(path?: string, recursive?: boolean, filter?: (file: string) => boolean): number | undefined;
91
+ /**
92
+ * Deletes single file.
93
+ * @param {string} path - File path.
94
+ * @returns {boolean|undefined} Success status.
95
+ */
96
+ export function deleteFile(path: string): boolean | undefined;
97
+ /**
98
+ * Copies multiple folders with optional files and recursive support.
99
+ * @param {Object} options - Copy options.
100
+ * @param {string} options.dest - Destination base path.
101
+ * @param {string} [options.path] - Source path.
102
+ * @param {boolean} [options.recursive=true] - Copy subfolders.
103
+ * @param {boolean} [options.withFiles=false] - Include files.
104
+ * @param {boolean} [options.force=false] - Overwrite existing.
105
+ * @param {(folder: string) => boolean} [options.filter] - Folder filter.
106
+ * @returns {number|undefined} Count of copied folders.
107
+ */
108
+ export function copyFoldersIn(options: {
109
+ dest: string;
110
+ path?: string;
111
+ recursive?: boolean;
112
+ withFiles?: boolean;
113
+ force?: boolean;
114
+ filter?: (folder: string) => boolean;
115
+ }): number | undefined;
116
+ /**
117
+ * Copies single folder with optional contents.
118
+ * @param {Object} options - Copy options.
119
+ * @param {string} options.dest - Destination path.
120
+ * @param {string} [options.path] - Source path.
121
+ * @param {boolean} [options.recursive=false] - Copy subfolders.
122
+ * @param {boolean} [options.withFiles=false] - Include files.
123
+ * @param {boolean} [options.force=false] - Overwrite existing.
124
+ * @returns {boolean|undefined} Success status.
125
+ */
126
+ export function copyFolder(options: {
127
+ dest: string;
128
+ path?: string;
129
+ recursive?: boolean;
130
+ withFiles?: boolean;
131
+ force?: boolean;
132
+ }): boolean | undefined;
133
+ /**
134
+ * Copies multiple files with optional recursive structure preservation.
135
+ * @param {Object} options - Copy options.
136
+ * @param {string} options.dest - Destination base path.
137
+ * @param {string} [options.path] - Source path.
138
+ * @param {boolean} [options.recursive=true] - Preserve directory structure.
139
+ * @param {boolean} [options.force=false] - Overwrite existing.
140
+ * @param {(file: string) => boolean} [options.filter] - File filter.
141
+ * @returns {number|undefined} Count of copied files.
142
+ */
143
+ export function copyFilesIn(options: {
144
+ dest: string;
145
+ path?: string;
146
+ recursive?: boolean;
147
+ force?: boolean;
148
+ filter?: (file: string) => boolean;
149
+ }): number | undefined;
150
+ /**
151
+ * Copies single file to destination (auto-creates parent folders).
152
+ * @param {Object} options - Copy options.
153
+ * @param {string} options.path - Source file path.
154
+ * @param {string} options.dest - Destination path or folder.
155
+ * @param {boolean} [options.force=false] - Overwrite existing.
156
+ * @returns {boolean|undefined} Success status.
157
+ */
158
+ export function copyFile(options: {
159
+ path: string;
160
+ dest: string;
161
+ force?: boolean;
162
+ }): boolean | undefined;
163
+ /**
164
+ * Moves multiple folders (copy + delete source).
165
+ * @param {Object} options - Move options (same as copyFoldersIn).
166
+ * @returns {number|undefined} Count of moved folders.
167
+ */
168
+ export function moveFoldersIn(options: any): number | undefined;
169
+ /**
170
+ * Moves single folder (copy + delete source).
171
+ * @param {Object} options - Move options (same as copyFolder).
172
+ * @returns {boolean|undefined} Success status.
173
+ */
174
+ export function moveFolder(options: any): boolean | undefined;
175
+ /**
176
+ * Moves multiple files (copy + delete source).
177
+ * @param {Object} options - Move options (same as copyFilesIn).
178
+ * @returns {number|undefined} Count of moved files.
179
+ */
180
+ export function moveFilesIn(options: any): number | undefined;
181
+ /**
182
+ * Moves single file (copy + delete source).
183
+ * @param {Object} options - Move options (same as copyFile).
184
+ * @returns {boolean|undefined} Success status.
185
+ */
186
+ export function moveFile(options: any): boolean | undefined;
187
+ /**
188
+ * Reads file content synchronously.
189
+ * @param {string} path - File path.
190
+ * @returns {string|undefined} File content or undefined.
191
+ */
192
+ export function readFile(path: string): string | undefined;
193
+ /**
194
+ * Creates file system watcher with event filtering and pause/resume.
195
+ * @param {Object} [options] - Watcher options.
196
+ * @param {string} [options.path=process.cwd()] - Watch path.
197
+ * @param {boolean} [options.recursive=false] - Watch subdirectories.
198
+ * @param {(event: string, file: string) => boolean} [options.filter] - Event filter.
199
+ * @returns {Object|undefined} Watcher API.
200
+ * @example
201
+ * const watcher = nodeComfort.watch({ path: "./src", recursive: true });
202
+ * watcher.on("change", (file) => console.log("Changed:", file));
203
+ * watcher.on("rename", (file) => console.log("Renamed:", file));
204
+ * watcher.on("all", (event, file) => console.log(event, file));
205
+ */
206
+ export function watch(options?: {
207
+ path?: string;
208
+ recursive?: boolean;
209
+ filter?: (event: string, file: string) => boolean;
210
+ }): any | undefined;
211
+ //# sourceMappingURL=FS.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FS.d.ts","sourceRoot":"","sources":["../../core/FS.js"],"names":[],"mappings":"AAwME;;;;;;;;;;;;KAYE;AACF,4BALU,MAAM,YAEd;IAAyB,OAAO,GAAxB,MAAM;CACd,GAAU,MAAM,GAAC,SAAS,CAO3B;AACD;;;;;;;KAOE;AACF,kCALU,MAAM,GACJ,MAAM,CAajB;AAED;;;;;KAKE;AACF,oCAJU,MAAM,cACN,OAAO,GACL,MAAM,EAAE,GAAC,SAAS,CAK7B;AAED;;;;KAIE;AACF,iCAHU,MAAM,GACJ,MAAM,GAAC,SAAS,CAI3B;AAED;;;;;KAKE;AACF,kCAJU,MAAM,cACN,OAAO,GACL,MAAM,EAAE,GAAC,SAAS,CAK7B;AAED;;;;KAIE;AACF,8BAHU,MAAM,GACJ,MAAM,GAAC,SAAS,CAI3B;AAED;;;;;KAKE;AACF,mCAJU,MAAM,UACN,OAAO,GACL,OAAO,GAAC,SAAS,CAoB5B;AAED;;;;;;;;;KASE;AACF,iCAPU,MAAM,UACN,OAAO,SACP,MAAM,GAAC,MAAM,GAAC,IAAI,GAAC,SAAS,GAC1B,OAAO,GAAC,SAAS,CAiC5B;AAED;;;;;KAKE;AACF,uCAJU,MAAM,WACN,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,GACzB,MAAM,GAAC,SAAS,CAe3B;AAED;;;;KAIE;AACF,mCAHU,MAAM,GACJ,OAAO,GAAC,SAAS,CAY5B;AAED;;;;;;KAME;AACF,qCALU,MAAM,cACN,OAAO,WACP,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GACvB,MAAM,GAAC,SAAS,CAe3B;AAED;;;;KAIE;AACF,iCAHU,MAAM,GACJ,OAAO,GAAC,SAAS,CAY5B;AAED;;;;;;;;;;KAUE;AACF,uCARE;IAAwB,IAAI,EAApB,MAAM;IACW,IAAI,GAArB,MAAM;IACY,SAAS,GAA3B,OAAO;IACW,SAAS,GAA3B,OAAO;IACW,KAAK,GAAvB,OAAO;IAC+B,MAAM,GAA5C,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO;CACnC,GAAU,MAAM,GAAC,SAAS,CA0C3B;AAED;;;;;;;;;KASE;AACF,oCAPE;IAAwB,IAAI,EAApB,MAAM;IACW,IAAI,GAArB,MAAM;IACY,SAAS,GAA3B,OAAO;IACW,SAAS,GAA3B,OAAO;IACW,KAAK,GAAvB,OAAO;CACf,GAAU,OAAO,GAAC,SAAS,CA0C5B;AAED;;;;;;;;;KASE;AACF,qCAPE;IAAwB,IAAI,EAApB,MAAM;IACW,IAAI,GAArB,MAAM;IACY,SAAS,GAA3B,OAAO;IACW,KAAK,GAAvB,OAAO;IAC6B,MAAM,GAA1C,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO;CACjC,GAAU,MAAM,GAAC,SAAS,CA+B3B;AAED;;;;;;;KAOE;AACF,kCALE;IAAwB,IAAI,EAApB,MAAM;IACU,IAAI,EAApB,MAAM;IACY,KAAK,GAAvB,OAAO;CACf,GAAU,OAAO,GAAC,SAAS,CAwB5B;AAED;;;;KAIE;AACF,6CAFY,MAAM,GAAC,SAAS,CAkB3B;AAED;;;;KAIE;AACF,0CAFY,OAAO,GAAC,SAAS,CAS5B;AAED;;;;KAIE;AACF,2CAFY,MAAM,GAAC,SAAS,CAkB3B;AAED;;;;KAIE;AACF,wCAFY,OAAO,GAAC,SAAS,CAS5B;AAED;;;;KAIE;AACF,+BAHU,MAAM,GACJ,MAAM,GAAC,SAAS,CAW3B;AAED;;;;;;;;;;;;KAYE;AACF,gCAVE;IAAyB,IAAI,GAArB,MAAM;IACY,SAAS,GAA3B,OAAO;IAC4C,MAAM,GAAzD,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO;CAChD,GAAU,MAAO,SAAS,CAmE3B"}
@@ -0,0 +1,253 @@
1
+ /**
2
+ * Logs content with colors, timestamp, and group indentation.
3
+ * Supports strings, objects (pretty JSON), and chaining.
4
+ *
5
+ * @param {any} content - Content to log (string, object, or primitive).
6
+ * @example
7
+ * nodeComfort.log("<%greenBright ✓ Done%>");
8
+ * nodeComfort.log({ users: 42, active: true });
9
+ * nodeComfort.group("Files").log("Processing...").groupEnd();
10
+ */
11
+ export function log(content: any): {
12
+ log(content: any): /*elided*/ any;
13
+ /**
14
+ * Formats content with colors, timestamp, and group indentation (no console output).
15
+ *
16
+ * @param {any} content - Content to format.
17
+ * @returns {string} Formatted string.
18
+ * @example
19
+ * const msg = nodeComfort.logify("<%redBright ERROR%> Invalid input");
20
+ * console.log(msg);
21
+ */
22
+ logify(content: any): string;
23
+ /**
24
+ * Starts a new log group with ▼ indicator and increased indentation.
25
+ *
26
+ * @param {string} label - Group label (supports colors).
27
+ * @example
28
+ * nodeComfort.group("<%yellow Processing%>").log("Step 1").groupEnd();
29
+ */
30
+ group(label: string): /*elided*/ any;
31
+ /**
32
+ * Ends current group and reduces indentation.
33
+ *
34
+ * @example
35
+ * nodeComfort.group("Work").groupEnd();
36
+ */
37
+ groupEnd(): /*elided*/ any;
38
+ /**
39
+ * Configures logger options (delimiters and timestamp).
40
+ *
41
+ * @param {object} [options] - Logger options.
42
+ * @param {object} [options.delimiters] - Template delimiters.
43
+ * @param {string} [options.delimiters.start="<%="] - Start delimiter.
44
+ * @param {string} [options.delimiters.end="%>"] - End delimiter.
45
+ * @param {boolean} [options.timestamp=true] - Show timestamps.
46
+ * @example
47
+ * nodeComfort.setLogger({
48
+ * delimiters: { start: "{{", end: "}}" },
49
+ * timestamp: false
50
+ * }).log("{{ bgGreen new delimiters }}");
51
+ */
52
+ setLogger(options?: {
53
+ delimiters?: {
54
+ start?: string;
55
+ end?: string;
56
+ };
57
+ timestamp?: boolean;
58
+ }): /*elided*/ any;
59
+ };
60
+ /**
61
+ * Formats content with colors, timestamp, and group indentation (no console output).
62
+ *
63
+ * @param {any} content - Content to format.
64
+ * @returns {string} Formatted string.
65
+ * @example
66
+ * const msg = nodeComfort.logify("<%redBright ERROR%> Invalid input");
67
+ * console.log(msg);
68
+ */
69
+ export function logify(content: any): string;
70
+ /**
71
+ * Starts a new log group with ▼ indicator and increased indentation.
72
+ *
73
+ * @param {string} label - Group label (supports colors).
74
+ * @example
75
+ * nodeComfort.group("<%yellow Processing%>").log("Step 1").groupEnd();
76
+ */
77
+ export function group(label: string): {
78
+ /**
79
+ * Logs content with colors, timestamp, and group indentation.
80
+ * Supports strings, objects (pretty JSON), and chaining.
81
+ *
82
+ * @param {any} content - Content to log (string, object, or primitive).
83
+ * @example
84
+ * nodeComfort.log("<%greenBright ✓ Done%>");
85
+ * nodeComfort.log({ users: 42, active: true });
86
+ * nodeComfort.group("Files").log("Processing...").groupEnd();
87
+ */
88
+ log(content: any): /*elided*/ any;
89
+ /**
90
+ * Formats content with colors, timestamp, and group indentation (no console output).
91
+ *
92
+ * @param {any} content - Content to format.
93
+ * @returns {string} Formatted string.
94
+ * @example
95
+ * const msg = nodeComfort.logify("<%redBright ERROR%> Invalid input");
96
+ * console.log(msg);
97
+ */
98
+ logify(content: any): string;
99
+ group(label: string): /*elided*/ any;
100
+ /**
101
+ * Ends current group and reduces indentation.
102
+ *
103
+ * @example
104
+ * nodeComfort.group("Work").groupEnd();
105
+ */
106
+ groupEnd(): /*elided*/ any;
107
+ /**
108
+ * Configures logger options (delimiters and timestamp).
109
+ *
110
+ * @param {object} [options] - Logger options.
111
+ * @param {object} [options.delimiters] - Template delimiters.
112
+ * @param {string} [options.delimiters.start="<%="] - Start delimiter.
113
+ * @param {string} [options.delimiters.end="%>"] - End delimiter.
114
+ * @param {boolean} [options.timestamp=true] - Show timestamps.
115
+ * @example
116
+ * nodeComfort.setLogger({
117
+ * delimiters: { start: "{{", end: "}}" },
118
+ * timestamp: false
119
+ * }).log("{{ bgGreen new delimiters }}");
120
+ */
121
+ setLogger(options?: {
122
+ delimiters?: {
123
+ start?: string;
124
+ end?: string;
125
+ };
126
+ timestamp?: boolean;
127
+ }): /*elided*/ any;
128
+ };
129
+ /**
130
+ * Ends current group and reduces indentation.
131
+ *
132
+ * @example
133
+ * nodeComfort.group("Work").groupEnd();
134
+ */
135
+ export function groupEnd(): {
136
+ /**
137
+ * Logs content with colors, timestamp, and group indentation.
138
+ * Supports strings, objects (pretty JSON), and chaining.
139
+ *
140
+ * @param {any} content - Content to log (string, object, or primitive).
141
+ * @example
142
+ * nodeComfort.log("<%greenBright ✓ Done%>");
143
+ * nodeComfort.log({ users: 42, active: true });
144
+ * nodeComfort.group("Files").log("Processing...").groupEnd();
145
+ */
146
+ log(content: any): /*elided*/ any;
147
+ /**
148
+ * Formats content with colors, timestamp, and group indentation (no console output).
149
+ *
150
+ * @param {any} content - Content to format.
151
+ * @returns {string} Formatted string.
152
+ * @example
153
+ * const msg = nodeComfort.logify("<%redBright ERROR%> Invalid input");
154
+ * console.log(msg);
155
+ */
156
+ logify(content: any): string;
157
+ /**
158
+ * Starts a new log group with ▼ indicator and increased indentation.
159
+ *
160
+ * @param {string} label - Group label (supports colors).
161
+ * @example
162
+ * nodeComfort.group("<%yellow Processing%>").log("Step 1").groupEnd();
163
+ */
164
+ group(label: string): /*elided*/ any;
165
+ groupEnd(): /*elided*/ any;
166
+ /**
167
+ * Configures logger options (delimiters and timestamp).
168
+ *
169
+ * @param {object} [options] - Logger options.
170
+ * @param {object} [options.delimiters] - Template delimiters.
171
+ * @param {string} [options.delimiters.start="<%="] - Start delimiter.
172
+ * @param {string} [options.delimiters.end="%>"] - End delimiter.
173
+ * @param {boolean} [options.timestamp=true] - Show timestamps.
174
+ * @example
175
+ * nodeComfort.setLogger({
176
+ * delimiters: { start: "{{", end: "}}" },
177
+ * timestamp: false
178
+ * }).log("{{ bgGreen new delimiters }}");
179
+ */
180
+ setLogger(options?: {
181
+ delimiters?: {
182
+ start?: string;
183
+ end?: string;
184
+ };
185
+ timestamp?: boolean;
186
+ }): /*elided*/ any;
187
+ };
188
+ /**
189
+ * Configures logger options (delimiters and timestamp).
190
+ *
191
+ * @param {object} [options] - Logger options.
192
+ * @param {object} [options.delimiters] - Template delimiters.
193
+ * @param {string} [options.delimiters.start="<%="] - Start delimiter.
194
+ * @param {string} [options.delimiters.end="%>"] - End delimiter.
195
+ * @param {boolean} [options.timestamp=true] - Show timestamps.
196
+ * @example
197
+ * nodeComfort.setLogger({
198
+ * delimiters: { start: "{{", end: "}}" },
199
+ * timestamp: false
200
+ * }).log("{{ bgGreen new delimiters }}");
201
+ */
202
+ export function setLogger(options?: {
203
+ delimiters?: {
204
+ start?: string;
205
+ end?: string;
206
+ };
207
+ timestamp?: boolean;
208
+ }): {
209
+ /**
210
+ * Logs content with colors, timestamp, and group indentation.
211
+ * Supports strings, objects (pretty JSON), and chaining.
212
+ *
213
+ * @param {any} content - Content to log (string, object, or primitive).
214
+ * @example
215
+ * nodeComfort.log("<%greenBright ✓ Done%>");
216
+ * nodeComfort.log({ users: 42, active: true });
217
+ * nodeComfort.group("Files").log("Processing...").groupEnd();
218
+ */
219
+ log(content: any): /*elided*/ any;
220
+ /**
221
+ * Formats content with colors, timestamp, and group indentation (no console output).
222
+ *
223
+ * @param {any} content - Content to format.
224
+ * @returns {string} Formatted string.
225
+ * @example
226
+ * const msg = nodeComfort.logify("<%redBright ERROR%> Invalid input");
227
+ * console.log(msg);
228
+ */
229
+ logify(content: any): string;
230
+ /**
231
+ * Starts a new log group with ▼ indicator and increased indentation.
232
+ *
233
+ * @param {string} label - Group label (supports colors).
234
+ * @example
235
+ * nodeComfort.group("<%yellow Processing%>").log("Step 1").groupEnd();
236
+ */
237
+ group(label: string): /*elided*/ any;
238
+ /**
239
+ * Ends current group and reduces indentation.
240
+ *
241
+ * @example
242
+ * nodeComfort.group("Work").groupEnd();
243
+ */
244
+ groupEnd(): /*elided*/ any;
245
+ setLogger(options?: {
246
+ delimiters?: {
247
+ start?: string;
248
+ end?: string;
249
+ };
250
+ timestamp?: boolean;
251
+ }): /*elided*/ any;
252
+ };
253
+ //# sourceMappingURL=Logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../core/Logger.js"],"names":[],"mappings":"AAuME;;;;;;;;;KASE;AACF,6BANU,GAAG;iBAAH,GAAG;IAuCb;;;;;;;;SAQE;oBALQ,GAAG,GACD,MAAM;IAmBlB;;;;;;SAME;iBAHQ,MAAM;IAWhB;;;;;SAKE;;IAMF;;;;;;;;;;;;;SAaE;wBATA;QAAyB,UAAU,GACnC;YAAoC,KAAK,GAAjC,MAAM;YACsB,GAAG,GAA/B,MAAM;SACd;QAA0B,SAAS,GAA3B,OAAO;KACf;EA1DD;AAED;;;;;;;;KAQE;AACF,gCANU,GAAG,GACD,MAAM,CAiBjB;AAED;;;;;;KAME;AACF,6BAJU,MAAM;IArEhB;;;;;;;;;SASE;iBALQ,GAAG;IAuCb;;;;;;;;SAQE;oBALQ,GAAG,GACD,MAAM;iBAsBR,MAAM;IAWhB;;;;;SAKE;;IAMF;;;;;;;;;;;;;SAaE;wBATA;QAAyB,UAAU,GACnC;YAAoC,KAAK,GAAjC,MAAM;YACsB,GAAG,GAA/B,MAAM;SACd;QAA0B,SAAS,GAA3B,OAAO;KACf;EArBD;AAED;;;;;KAKE;AACF;IAtFA;;;;;;;;;SASE;iBALQ,GAAG;IAuCb;;;;;;;;SAQE;oBALQ,GAAG,GACD,MAAM;IAmBlB;;;;;;SAME;iBAHQ,MAAM;;IAsBhB;;;;;;;;;;;;;SAaE;wBATA;QAAyB,UAAU,GACnC;YAAoC,KAAK,GAAjC,MAAM;YACsB,GAAG,GAA/B,MAAM;SACd;QAA0B,SAAS,GAA3B,OAAO;KACf;EAVD;AAED;;;;;;;;;;;;;KAaE;AACF,oCAVE;IAAyB,UAAU,GACnC;QAAoC,KAAK,GAAjC,MAAM;QACsB,GAAG,GAA/B,MAAM;KACd;IAA0B,SAAS,GAA3B,OAAO;CACf;IAnGF;;;;;;;;;SASE;iBALQ,GAAG;IAuCb;;;;;;;;SAQE;oBALQ,GAAG,GACD,MAAM;IAmBlB;;;;;;SAME;iBAHQ,MAAM;IAWhB;;;;;SAKE;;wBAUA;QAAyB,UAAU,GACnC;YAAoC,KAAK,GAAjC,MAAM;YACsB,GAAG,GAA/B,MAAM;SACd;QAA0B,SAAS,GAA3B,OAAO;KACf;EAiBD"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Creates a step controller for sequential function execution.
3
+ *
4
+ * Returns fluent API with `next()`, `back()`, `at()`, `ignore()`, `reset()` methods.
5
+ *
6
+ * @param {Array<() => void>} steps - Array of step functions to execute.
7
+ *
8
+ * @example
9
+ * const steps = nodeComfort.step([
10
+ * () => console.log("Install dependencies"),
11
+ * () => console.log("Compile TypeScript"),
12
+ * () => console.log("Run tests")
13
+ * ]);
14
+ *
15
+ * steps.next().next(); // Execute steps 0, 1
16
+ * steps.back(); // Go back to step 0
17
+ * steps.at(2); // Jump to step 2
18
+ */
19
+ export function step(steps: Array<() => void>): {
20
+ currentIndex: number;
21
+ currentStep: () => void;
22
+ /**
23
+ * Advances to next step and executes it (if exists).
24
+ */
25
+ next(): /*elided*/ any;
26
+ /**
27
+ * Goes back to previous step and re-executes it (if exists).
28
+ */
29
+ back(): /*elided*/ any;
30
+ /**
31
+ * Jumps to specific step index and executes it.
32
+ * @param {number} index - Step index (0 to steps.length-1).
33
+ * @example
34
+ * steps.at(2); // Jump to 3rd step
35
+ */
36
+ at(index: number): /*elided*/ any;
37
+ /**
38
+ * Advances index without executing current step.
39
+ * @example
40
+ * steps.next().ignore().next(); // Execute 0, skip 1, execute 2
41
+ */
42
+ ignore(): /*elided*/ any;
43
+ /**
44
+ * Resets to initial state (index: -1).
45
+ */
46
+ reset(): /*elided*/ any;
47
+ all(): /*elided*/ any;
48
+ };
49
+ //# sourceMappingURL=Stepper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../core/Stepper.js"],"names":[],"mappings":"AA6BE;;;;;;;;;;;;;;;;;KAiBE;AACF,4BAbU,KAAK,CAAC,MAAM,IAAI,CAAC;;uBAAL,IAAI;IAmBtB;;aAEA;;IAQA;;aAEA;;IAQA;;;;;aAKA;cAHQ,MAAM;IAWd;;;;aAIA;;IAOA;;aAEA;;;EAcH"}
@@ -0,0 +1,111 @@
1
+ export = Storage;
2
+ declare class Storage {
3
+ /**
4
+ * @param {string} [path = ":memomry"]
5
+ */
6
+ constructor(path?: string);
7
+ /**
8
+ * @param {string} sql
9
+ * @param {array|object} [options = []]
10
+ */
11
+ exec(sql: string, options?: any[] | object): {
12
+ changes: any;
13
+ lastInsertRowid: any;
14
+ };
15
+ /**
16
+ * @param {string} sql
17
+ * @param {array|object} [options = []]
18
+ */
19
+ getOne(sql: string, options?: any[] | object): any;
20
+ /**
21
+ * @param {string} sql
22
+ * @param {array|object} [options = []]
23
+ */
24
+ getAll(sql: string, options?: any[] | object): any;
25
+ /**
26
+ * @param {string} name
27
+ * @param {string} sql
28
+ */
29
+ prepare(name: string, sql: string): any;
30
+ /**
31
+ * @param {string} table
32
+ * @param {object} schema
33
+ */
34
+ createTable(table: string, schema: object): void;
35
+ /**
36
+ * @param {string} table
37
+ * @param {object} data
38
+ */
39
+ insert(table: string, data: object): any;
40
+ /**
41
+ * @param {string} table
42
+ * @param {number} id
43
+ * @returns {object|null}
44
+ */
45
+ findById(table: string, id: number): object | null;
46
+ /**
47
+ * @param {string} table
48
+ * @param {object} [where = {}]
49
+ * @param {object} [options = {}]
50
+ */
51
+ findAll(table: string, where?: object, options?: object): any;
52
+ /**
53
+ * @param {string} table
54
+ * @param {object} [where]
55
+ */
56
+ count(table: string, where?: object): any;
57
+ /**
58
+ * @param {string} table
59
+ * @param {number} id
60
+ * @param {object} data
61
+ */
62
+ update(table: string, id: number, data: object): any;
63
+ /**
64
+ * @param {string} table
65
+ * @param {number} id
66
+ */
67
+ delete(table: string, id: number): any;
68
+ /**
69
+ * @param {string} table
70
+ * @param {object} data
71
+ * @param {string} [conflictColumn]
72
+ */
73
+ upsert(table: string, data: object, conflictColumn?: string): {
74
+ changes: any;
75
+ lastInsertRowid: any;
76
+ };
77
+ /**
78
+ * @param {function} callback
79
+ */
80
+ transaction(callback: Function): any;
81
+ /**
82
+ * @param {string} migrationsDir - Répertoire contenant les migrations
83
+ */
84
+ runMigrations(migrationsDir: string): void;
85
+ /**
86
+ * @param {string} table
87
+ */
88
+ export(table: string): any;
89
+ /**
90
+ * @param {string} table
91
+ * @param {array} data
92
+ */
93
+ import(table: string, data: any[]): number;
94
+ /**
95
+ * @param {string} table
96
+ */
97
+ truncate(table: string): void;
98
+ /**
99
+ * @param {string} indexName
100
+ * @param {string} table
101
+ * @param {string} columns
102
+ */
103
+ createIndex(indexName: string, table: string, columns: string): void;
104
+ /**
105
+ * @returns {object}
106
+ */
107
+ stats(): object;
108
+ close(): void;
109
+ #private;
110
+ }
111
+ //# sourceMappingURL=Storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Storage.d.ts","sourceRoot":"","sources":["../../core/Storage.js"],"names":[],"mappings":";AAmBiB;IAIf;;OAEG;IACH,mBAFW,MAAM,EAehB;IAED;;;OAGG;IACH,UAHW,MAAM,YACN,QAAM,MAAM;;;MAetB;IAED;;;OAGG;IACH,YAHW,MAAM,YACN,QAAM,MAAM,OAUtB;IAED;;;OAGG;IACH,YAHW,MAAM,YACN,QAAM,MAAM,OAUtB;IAED;;;OAGG;IACH,cAHW,MAAM,OACN,MAAM,OAYhB;IAED;;;OAGG;IACH,mBAHW,MAAM,UACN,MAAM,QAUhB;IAED;;;OAGG;IACH,cAHW,MAAM,QACN,MAAM,OAUhB;IAED;;;;OAIG;IACH,gBAJW,MAAM,MACN,MAAM,GACJ,MAAM,GAAC,IAAI,CAIvB;IAED;;;;OAIG;IACH,eAJW,MAAM,UACN,MAAM,YACN,MAAM,OAmBhB;IAED;;;OAGG;IACH,aAHW,MAAM,UACN,MAAM,OAehB;IAED;;;;OAIG;IACH,cAJW,MAAM,MACN,MAAM,QACN,MAAM,OAUhB;IAED;;;OAGG;IACH,cAHW,MAAM,MACN,MAAM,OAOhB;IAED;;;;OAIG;IACH,cAJW,MAAM,QACN,MAAM,mBACN,MAAM;;;MAkBhB;IAED;;OAEG;IACH,qCAaC;IAED;;OAEG;IACH,6BAFW,MAAM,QA+BhB;IAED;;OAEG;IACH,cAFW,MAAM,OAIhB;IAED;;;OAGG;IACH,cAHW,MAAM,uBAYhB;IAED;;OAEG;IACH,gBAFW,MAAM,QAIhB;IAED;;;;OAIG;IACH,uBAJW,MAAM,SACN,MAAM,WACN,MAAM,QAIhB;IAED;;OAEG;IACH,SAFa,MAAM,CAclB;IAED,cAMC;;CACF"}
@@ -0,0 +1,55 @@
1
+ export function getEnv(env: any): string;
2
+ /**
3
+ * Creates a Promise that resolves after specified milliseconds.
4
+ *
5
+ * @param {number} ms - Milliseconds to wait (positive integer).
6
+ * @returns {Promise<void>} Promise that resolves after delay.
7
+ *
8
+ * @example
9
+ * // Sequential delays
10
+ * await wait(100); // 100ms
11
+ * await wait(500); // 500ms
12
+ * await wait(2000); // 2 seconds
13
+ */
14
+ export function wait(ms: number): Promise<void>;
15
+ /**
16
+ *
17
+ * @param {boolean|Promise<boolean>} predicate
18
+ * @param {*} handler
19
+ * @param {object} [options]
20
+ * @param {number} [options.interval]
21
+ * @param {number|null} [options.timeout]
22
+ * @param {number|null} [options.max]
23
+ */
24
+ export function when(predicate: boolean | Promise<boolean>, handler: any, options?: {
25
+ interval?: number;
26
+ timeout?: number | null;
27
+ max?: number | null;
28
+ }): {
29
+ start(): /*elided*/ any;
30
+ stop(): /*elided*/ any;
31
+ /**
32
+ * @param {"error"|"trigger"|"timeout"} event
33
+ * @param {(payload: any) => void} fn
34
+ */
35
+ on(event: "error" | "trigger" | "timeout", fn: (payload: any) => void): /*elided*/ any;
36
+ /**
37
+ * @param {"error"|"trigger"|"timeout"} event
38
+ * @param {(payload: any) => void} fn
39
+ */
40
+ off(event: "error" | "trigger" | "timeout", fn: (payload: any) => void): /*elided*/ any;
41
+ };
42
+ export function dontCrash(): {
43
+ /**
44
+ * @template { "error" | "exit" | "sig" | "beforeExit" } E
45
+ * @param { E } event
46
+ * @param { { error: (error: Error | unknown) => void | Promise<void>, exit: (code: number) => void | Promise<void>, sig: (signal: "SIGINT" | "SIGTERM" | "SIGQUIT") => void | Promise<void>, beforeExit: (code: number) => void|Promise<void> }[E] } handler
47
+ */
48
+ on<E extends "error" | "exit" | "sig" | "beforeExit">(event: E, handler: {
49
+ error: (error: Error | unknown) => void | Promise<void>;
50
+ exit: (code: number) => void | Promise<void>;
51
+ sig: (signal: "SIGINT" | "SIGTERM" | "SIGQUIT") => void | Promise<void>;
52
+ beforeExit: (code: number) => void | Promise<void>;
53
+ }[E]): /*elided*/ any;
54
+ };
55
+ //# sourceMappingURL=Utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Utils.d.ts","sourceRoot":"","sources":["../../core/Utils.js"],"names":[],"mappings":"AAQE,yCAGC;AACD;;;;;;;;;;;KAWE;AACF,yBATU,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAUxB;AACD;;;;;;;;KAQE;AACF,gCAPU,OAAO,GAAC,OAAO,CAAC,OAAO,CAAC,WACxB,GAAC,YAET;IAAyB,QAAQ,GAAzB,MAAM;IACgB,OAAO,GAA7B,MAAM,GAAC,IAAI;IACW,GAAG,GAAzB,MAAM,GAAC,IAAI;CAAe;;;IAgGhC;;;aAGA;cAFQ,OAAO,GAAC,SAAS,GAAC,SAAS,MAC3B,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI;IAM9B;;;aAGA;eAFQ,OAAO,GAAC,SAAS,GAAC,SAAS,MAC3B,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI;EASjC;AACD;IAuBI;;;;aAIA;OAHsD,CAAC,SAA3C,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,YAAc,SAC5C,CAAC,WACD;QAAE,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAAC,GAAG,EAAE,CAAC,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAAC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAC,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,CAAC,CAAC,CAAC;EA4BnP"}
@@ -0,0 +1,170 @@
1
+ declare const _exports: {
2
+ getEnv(env: any): string;
3
+ wait(ms: number): Promise<void>;
4
+ when(predicate: boolean | Promise<boolean>, handler: any, options?: {
5
+ interval?: number;
6
+ timeout?: number | null;
7
+ max?: number | null;
8
+ }): {
9
+ start(): /*elided*/ any;
10
+ stop(): /*elided*/ any;
11
+ on(event: "error" | "trigger" | "timeout", fn: (payload: any) => void): /*elided*/ any;
12
+ off(event: "error" | "trigger" | "timeout", fn: (payload: any) => void): /*elided*/ any;
13
+ };
14
+ dontCrash(): {
15
+ on<E extends "error" | "exit" | "sig" | "beforeExit">(event: E, handler: {
16
+ error: (error: Error | unknown) => void | Promise<void>;
17
+ exit: (code: number) => void | Promise<void>;
18
+ sig: (signal: "SIGINT" | "SIGTERM" | "SIGQUIT") => void | Promise<void>;
19
+ beforeExit: (code: number) => void | Promise<void>;
20
+ }[E]): /*elided*/ any;
21
+ };
22
+ step(steps: Array<() => void>): {
23
+ currentIndex: number;
24
+ currentStep: () => void;
25
+ next(): /*elided*/ any;
26
+ back(): /*elided*/ any;
27
+ at(index: number): /*elided*/ any;
28
+ ignore(): /*elided*/ any;
29
+ reset(): /*elided*/ any;
30
+ all(): /*elided*/ any;
31
+ };
32
+ log(content: any): {
33
+ log(content: any): /*elided*/ any;
34
+ logify(content: any): string;
35
+ group(label: string): /*elided*/ any;
36
+ groupEnd(): /*elided*/ any;
37
+ setLogger(options?: {
38
+ delimiters?: {
39
+ start?: string;
40
+ end?: string;
41
+ };
42
+ timestamp?: boolean;
43
+ }): /*elided*/ any;
44
+ };
45
+ logify(content: any): string;
46
+ group(label: string): {
47
+ log(content: any): /*elided*/ any;
48
+ logify(content: any): string;
49
+ group(label: string): /*elided*/ any;
50
+ groupEnd(): /*elided*/ any;
51
+ setLogger(options?: {
52
+ delimiters?: {
53
+ start?: string;
54
+ end?: string;
55
+ };
56
+ timestamp?: boolean;
57
+ }): /*elided*/ any;
58
+ };
59
+ groupEnd(): {
60
+ log(content: any): /*elided*/ any;
61
+ logify(content: any): string;
62
+ group(label: string): /*elided*/ any;
63
+ groupEnd(): /*elided*/ any;
64
+ setLogger(options?: {
65
+ delimiters?: {
66
+ start?: string;
67
+ end?: string;
68
+ };
69
+ timestamp?: boolean;
70
+ }): /*elided*/ any;
71
+ };
72
+ setLogger(options?: {
73
+ delimiters?: {
74
+ start?: string;
75
+ end?: string;
76
+ };
77
+ timestamp?: boolean;
78
+ }): {
79
+ log(content: any): /*elided*/ any;
80
+ logify(content: any): string;
81
+ group(label: string): /*elided*/ any;
82
+ groupEnd(): /*elided*/ any;
83
+ setLogger(options?: {
84
+ delimiters?: {
85
+ start?: string;
86
+ end?: string;
87
+ };
88
+ timestamp?: boolean;
89
+ }): /*elided*/ any;
90
+ };
91
+ createPath(path?: string): string;
92
+ getFoldersIn(path?: string, recursive?: boolean): string[] | undefined;
93
+ getFolder(path?: string): string | undefined;
94
+ getFilesIn(path?: string, recursive?: boolean): string[] | undefined;
95
+ getFile(path: string): string | undefined;
96
+ createFolder(path: string, force?: boolean): boolean | undefined;
97
+ createFile(path: string, force?: boolean, data?: string | object | null | undefined): boolean | undefined;
98
+ deleteFoldersIn(path?: string, filter?: (folder: string) => boolean): number | undefined;
99
+ deleteFolder(path: string): boolean | undefined;
100
+ deleteFilesIn(path?: string, recursive?: boolean, filter?: (file: string) => boolean): number | undefined;
101
+ deleteFile(path: string): boolean | undefined;
102
+ copyFoldersIn(options: {
103
+ dest: string;
104
+ path?: string;
105
+ recursive?: boolean;
106
+ withFiles?: boolean;
107
+ force?: boolean;
108
+ filter?: (folder: string) => boolean;
109
+ }): number | undefined;
110
+ copyFolder(options: {
111
+ dest: string;
112
+ path?: string;
113
+ recursive?: boolean;
114
+ withFiles?: boolean;
115
+ force?: boolean;
116
+ }): boolean | undefined;
117
+ copyFilesIn(options: {
118
+ dest: string;
119
+ path?: string;
120
+ recursive?: boolean;
121
+ force?: boolean;
122
+ filter?: (file: string) => boolean;
123
+ }): number | undefined;
124
+ copyFile(options: {
125
+ path: string;
126
+ dest: string;
127
+ force?: boolean;
128
+ }): boolean | undefined;
129
+ moveFoldersIn(options: any): number | undefined;
130
+ moveFolder(options: any): boolean | undefined;
131
+ moveFilesIn(options: any): number | undefined;
132
+ moveFile(options: any): boolean | undefined;
133
+ readFile(path: string): string | undefined;
134
+ watch(options?: {
135
+ path?: string;
136
+ recursive?: boolean;
137
+ filter?: (event: string, file: string) => boolean;
138
+ }): any | undefined;
139
+ Storage: {
140
+ new (path?: string): Storage;
141
+ };
142
+ cli_run: (command: string) => NonSharedBuffer & string;
143
+ cli_stream: {
144
+ new (command: any, args: any): {
145
+ "__#private@#processus": import("node:child_process").ChildProcessByStdio<null, import("node:stream").Readable, import("node:stream").Readable>;
146
+ "__#private@#events": import("node:events")<any>;
147
+ on<E extends "data" | "error" | "stopped">(event: E, handler: {
148
+ error: (error: Error) => void | Promise<void>;
149
+ data: (message: string) => void | Promise<void>;
150
+ stopped: (code: number, signal: keyof import("node:child_process").ChildProcessEventMap) => void | Promise<void>;
151
+ }[E]): /*elided*/ any;
152
+ stop(): Promise<any>;
153
+ };
154
+ };
155
+ isArray(value: any): boolean;
156
+ isNumber(value: any): boolean;
157
+ isFunction(value: any): boolean;
158
+ isObject(value: any): boolean;
159
+ isBoolean(value: any): boolean;
160
+ isString(value: any): boolean;
161
+ isUndefined(value: any): boolean;
162
+ isNull(value: any): boolean;
163
+ isDate(value: any): boolean;
164
+ isMap(value: any): boolean;
165
+ isSet(value: any): boolean;
166
+ isError(value: any): boolean;
167
+ };
168
+ export = _exports;
169
+ import Storage = require("./core/Storage");
170
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":""}