@ix-xs/node-comfort 1.0.4 → 1.0.51
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/index.js +12 -14
- package/package.json +13 -17
- package/src/checker.js +76 -0
- package/src/cli.js +86 -0
- package/{core/FS.js → src/fs.js} +121 -229
- package/src/localStorage.js +242 -0
- package/{core/Logger.js → src/logger.js} +23 -97
- package/src/utils.js +225 -0
- package/core/CLI.js +0 -95
- package/core/Checker.js +0 -127
- package/core/Stepper.js +0 -115
- package/core/Storage.js +0 -348
- package/core/Utils.js +0 -206
- package/tsconfig.json +0 -18
- package/types/core/CLI.d.ts +0 -25
- package/types/core/CLI.d.ts.map +0 -1
- package/types/core/Checker.d.ts +0 -73
- package/types/core/Checker.d.ts.map +0 -1
- package/types/core/FS.d.ts +0 -220
- package/types/core/FS.d.ts.map +0 -1
- package/types/core/Logger.d.ts +0 -253
- package/types/core/Logger.d.ts.map +0 -1
- package/types/core/Stepper.d.ts +0 -49
- package/types/core/Stepper.d.ts.map +0 -1
- package/types/core/Storage.d.ts +0 -111
- package/types/core/Storage.d.ts.map +0 -1
- package/types/core/Utils.d.ts +0 -55
- package/types/core/Utils.d.ts.map +0 -1
- package/types/index.d.ts +0 -175
- package/types/index.d.ts.map +0 -1
package/types/core/Logger.d.ts
DELETED
|
@@ -1,253 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/types/core/Stepper.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/types/core/Storage.d.ts
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/types/core/Utils.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/types/index.d.ts
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
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
|
-
}): {
|
|
139
|
-
on(event: "change" | "rename" | "all", callback: Function): void;
|
|
140
|
-
stop(): void;
|
|
141
|
-
pause(): void;
|
|
142
|
-
resume(): void;
|
|
143
|
-
};
|
|
144
|
-
Storage: {
|
|
145
|
-
new (path?: string): Storage;
|
|
146
|
-
};
|
|
147
|
-
cli_run: (command: string) => NonSharedBuffer & string;
|
|
148
|
-
cli_stream: {
|
|
149
|
-
new (command: any, args: any): {
|
|
150
|
-
"__#private@#processus": import("node:child_process").ChildProcessByStdio<null, import("node:stream").Readable, import("node:stream").Readable>;
|
|
151
|
-
"__#private@#events": import("node:events")<any>;
|
|
152
|
-
on<E extends "data" | "error" | "stopped">(event: E, handler: {
|
|
153
|
-
error: (error: Error) => void | Promise<void>;
|
|
154
|
-
data: (message: string) => void | Promise<void>;
|
|
155
|
-
stopped: (code: number, signal: keyof import("node:child_process").ChildProcessEventMap) => void | Promise<void>;
|
|
156
|
-
}[E]): /*elided*/ any;
|
|
157
|
-
stop(): Promise<any>;
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
|
-
isArray(value: any): boolean;
|
|
161
|
-
isNumber(value: any): boolean;
|
|
162
|
-
isFunction(value: any): boolean;
|
|
163
|
-
isObject(value: any): boolean;
|
|
164
|
-
isBoolean(value: any): boolean;
|
|
165
|
-
isString(value: any): boolean;
|
|
166
|
-
isUndefined(value: any): boolean;
|
|
167
|
-
isNull(value: any): boolean;
|
|
168
|
-
isDate(value: any): boolean;
|
|
169
|
-
isMap(value: any): boolean;
|
|
170
|
-
isSet(value: any): boolean;
|
|
171
|
-
isError(value: any): boolean;
|
|
172
|
-
};
|
|
173
|
-
export = _exports;
|
|
174
|
-
import Storage = require("./core/Storage");
|
|
175
|
-
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":""}
|