depflow 2.0.0-dev.3 → 2.0.0
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/build/cli/DepFLowCLI.js +10 -16
- package/build/cli/DepFLowCLI.js.map +1 -1
- package/build/cli/bin.js +0 -0
- package/build/config/schemas.d.ts +105 -56
- package/build/config/schemas.js +20 -20
- package/build/config/schemas.js.map +1 -1
- package/build/support/Async.d.ts +22 -0
- package/build/support/Async.js +62 -0
- package/build/support/Async.js.map +1 -0
- package/build/support/Dependency.d.ts +23 -41
- package/build/support/Dependency.js +65 -115
- package/build/support/Dependency.js.map +1 -1
- package/build/support/Git.d.ts +45 -28
- package/build/support/Git.js +81 -55
- package/build/support/Git.js.map +1 -1
- package/build/support/Task/Command.d.ts +49 -0
- package/build/support/Task/Command.js +100 -0
- package/build/support/Task/Command.js.map +1 -0
- package/build/support/Task/Task.d.ts +84 -0
- package/build/support/Task/Task.js +145 -0
- package/build/support/Task/Task.js.map +1 -0
- package/package.json +3 -3
- package/build/support/File.d.ts +0 -80
- package/build/support/File.js +0 -123
- package/build/support/File.js.map +0 -1
- package/build/support/PathFixer.d.ts +0 -36
- package/build/support/PathFixer.js +0 -161
- package/build/support/PathFixer.js.map +0 -1
- package/build/support/PathResolver.d.ts +0 -100
- package/build/support/PathResolver.js +0 -280
- package/build/support/PathResolver.js.map +0 -1
- package/build/support/Resolver/AliasCompiler.d.ts +0 -18
- package/build/support/Resolver/AliasCompiler.js +0 -32
- package/build/support/Resolver/AliasCompiler.js.map +0 -1
- package/build/support/Resolver/PathResolver.d.ts +0 -25
- package/build/support/Resolver/PathResolver.js +0 -79
- package/build/support/Resolver/PathResolver.js.map +0 -1
- package/build/support/Resolver/PathRewriter.d.ts +0 -10
- package/build/support/Resolver/PathRewriter.js +0 -39
- package/build/support/Resolver/PathRewriter.js.map +0 -1
- package/build/support/Resolver/Utils.d.ts +0 -36
- package/build/support/Resolver/Utils.js +0 -45
- package/build/support/Resolver/Utils.js.map +0 -1
package/build/cli/DepFLowCLI.js
CHANGED
|
@@ -67,16 +67,13 @@ export class DepFlowCLI extends DebugUI {
|
|
|
67
67
|
this.out.info(`&C(255,180,220)╭──────────────────────────────────────────────────`);
|
|
68
68
|
try {
|
|
69
69
|
const config = await Config.load(this.configPath);
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
: config.dependencies;
|
|
73
|
-
if (toInstall.length === 0)
|
|
70
|
+
const dependencies = config.dependencies;
|
|
71
|
+
if (dependencies.length === 0)
|
|
74
72
|
throw new Error(args.length > 0 ? 'Specified dependencies not found.' : 'No dependencies to install.');
|
|
75
|
-
for (const dep of
|
|
73
|
+
for (const dep of dependencies) {
|
|
76
74
|
this.out.info(`&C(255,180,220)│ Installing "${dep.name}" from "${dep.repo}"...`);
|
|
77
|
-
const dependency = new Dependency(config, dep);
|
|
78
|
-
|
|
79
|
-
this.out.info(`&C(255,180,220)│ ${result.join('\n').replace(/\n/g, '\n&C(255,180,220)│ ')}`);
|
|
75
|
+
const dependency = new Dependency(config, dep, this.out);
|
|
76
|
+
await dependency.install();
|
|
80
77
|
this.out.info(`&C(255,180,220)│ &C3Installed dependency: &C3${dep.name}`);
|
|
81
78
|
this.out.info(`&C(255,180,220)│ Installed "${dep.name}".`);
|
|
82
79
|
}
|
|
@@ -93,16 +90,13 @@ export class DepFlowCLI extends DebugUI {
|
|
|
93
90
|
this.out.info(`&C(255,180,220)╭──────────────────────────────────────────────────`);
|
|
94
91
|
try {
|
|
95
92
|
const config = await Config.load(this.configPath);
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
: config.dependencies;
|
|
99
|
-
if (toUninstall.length === 0)
|
|
93
|
+
const dependencies = config.dependencies;
|
|
94
|
+
if (dependencies.length === 0)
|
|
100
95
|
throw new Error(args.length > 0 ? 'Specified dependencies not found.' : 'No dependencies to uninstall.');
|
|
101
|
-
for (const dep of
|
|
96
|
+
for (const dep of dependencies) {
|
|
102
97
|
this.out.info(`&C(255,180,220)│ Uninstalling "${dep.name}" from "${dep.repo}"...`);
|
|
103
|
-
const dependency = new Dependency(config, dep);
|
|
104
|
-
|
|
105
|
-
this.out.info(`&C(255,180,220)│ ${result.join('\n').replace(/\n/g, '\n&C(255,180,220)│ ')}`);
|
|
98
|
+
const dependency = new Dependency(config, dep, this.out);
|
|
99
|
+
await dependency.uninstall();
|
|
106
100
|
this.out.info(`&C(255,180,220)│ &C3Uninstalled dependency: &C3${dep.name}`);
|
|
107
101
|
this.out.info(`&C(255,180,220)│ Uninstalled "${dep.name}".`);
|
|
108
102
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DepFLowCLI.js","sourceRoot":"","sources":["../../src/cli/DepFLowCLI.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"DepFLowCLI.js","sourceRoot":"","sources":["../../src/cli/DepFLowCLI.ts"],"names":[],"mappings":"AAAA,OAAe,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,YAA8B,MAAM,yCAAyC,CAAC;AACrF,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,OAAO,UAAW,SAAQ,OAAO;IAGf;IAFD,WAAW,CAAS;IACvC,YACoB,aAAqB,cAAc;QACnD,KAAK,EAAE,CAAC;QADQ,eAAU,GAAV,UAAU,CAAyB;QAEnD,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACx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,sGAAsG,CAAC,CAAC;YAE7H,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAC;QACjF,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,0CAA0C,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAAC,CAAC;gBAC3F,CAAC;YAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,oEAAoE,CAAC,CAAC;QAAC,CAAC;IACpG,CAAC;CACJ;AAED,eAAe,UAAU,CAAC"}
|
package/build/cli/bin.js
CHANGED
|
File without changes
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { Schema } from '@netfeez/common';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const basicImportmap: Schema.Utils.FromObject<{
|
|
3
|
+
readonly imports: {
|
|
4
|
+
readonly type: "object";
|
|
5
|
+
};
|
|
6
|
+
readonly scopes: {
|
|
7
|
+
readonly type: "object";
|
|
8
|
+
};
|
|
9
|
+
}, undefined>;
|
|
10
|
+
export declare const basicTsconfig: Schema.Utils.FromObject<{
|
|
3
11
|
readonly compilerOptions: {
|
|
4
12
|
readonly type: "object";
|
|
5
13
|
readonly properties: {
|
|
@@ -16,9 +24,14 @@ export declare const basicTsconfig: Schema<{
|
|
|
16
24
|
readonly type: "object";
|
|
17
25
|
};
|
|
18
26
|
};
|
|
27
|
+
readonly allowAdditionalProperties: true;
|
|
28
|
+
};
|
|
29
|
+
}, true>;
|
|
30
|
+
export declare const builder: Schema.Utils.FromObject<{
|
|
31
|
+
readonly maxTimeMs: {
|
|
32
|
+
readonly type: "number";
|
|
33
|
+
readonly default: 60000;
|
|
19
34
|
};
|
|
20
|
-
}>;
|
|
21
|
-
export declare const builder: Schema<{
|
|
22
35
|
readonly run: {
|
|
23
36
|
readonly union: [{
|
|
24
37
|
readonly type: "string";
|
|
@@ -36,8 +49,8 @@ export declare const builder: Schema<{
|
|
|
36
49
|
readonly type: "object";
|
|
37
50
|
}];
|
|
38
51
|
};
|
|
39
|
-
}>;
|
|
40
|
-
export declare const pathResolverEntry: Schema<{
|
|
52
|
+
}, undefined>;
|
|
53
|
+
export declare const pathResolverEntry: Schema.Utils.FromObject<{
|
|
41
54
|
readonly alias: {
|
|
42
55
|
readonly type: "string";
|
|
43
56
|
readonly required: true;
|
|
@@ -59,8 +72,8 @@ export declare const pathResolverEntry: Schema<{
|
|
|
59
72
|
}];
|
|
60
73
|
readonly required: true;
|
|
61
74
|
};
|
|
62
|
-
}>;
|
|
63
|
-
export declare const dependency: Schema<{
|
|
75
|
+
}, undefined>;
|
|
76
|
+
export declare const dependency: Schema.Utils.FromObject<{
|
|
64
77
|
readonly name: {
|
|
65
78
|
readonly type: "string";
|
|
66
79
|
readonly required: true;
|
|
@@ -69,15 +82,19 @@ export declare const dependency: Schema<{
|
|
|
69
82
|
readonly type: "string";
|
|
70
83
|
readonly required: true;
|
|
71
84
|
};
|
|
72
|
-
readonly
|
|
85
|
+
readonly tag: {
|
|
73
86
|
readonly type: "string";
|
|
74
87
|
};
|
|
75
88
|
readonly builder: {
|
|
76
89
|
readonly type: "array";
|
|
77
90
|
readonly default: [];
|
|
78
91
|
readonly items: {
|
|
79
|
-
|
|
80
|
-
|
|
92
|
+
type: "object";
|
|
93
|
+
properties: {
|
|
94
|
+
readonly maxTimeMs: {
|
|
95
|
+
readonly type: "number";
|
|
96
|
+
readonly default: 60000;
|
|
97
|
+
};
|
|
81
98
|
readonly run: {
|
|
82
99
|
readonly union: [{
|
|
83
100
|
readonly type: "string";
|
|
@@ -96,6 +113,7 @@ export declare const dependency: Schema<{
|
|
|
96
113
|
}];
|
|
97
114
|
};
|
|
98
115
|
};
|
|
116
|
+
allowAdditionalProperties: undefined;
|
|
99
117
|
};
|
|
100
118
|
};
|
|
101
119
|
readonly resolver: {
|
|
@@ -103,8 +121,8 @@ export declare const dependency: Schema<{
|
|
|
103
121
|
readonly nullable: true;
|
|
104
122
|
readonly default: [];
|
|
105
123
|
readonly items: {
|
|
106
|
-
|
|
107
|
-
|
|
124
|
+
type: "object";
|
|
125
|
+
properties: {
|
|
108
126
|
readonly alias: {
|
|
109
127
|
readonly type: "string";
|
|
110
128
|
readonly required: true;
|
|
@@ -127,10 +145,11 @@ export declare const dependency: Schema<{
|
|
|
127
145
|
readonly required: true;
|
|
128
146
|
};
|
|
129
147
|
};
|
|
148
|
+
allowAdditionalProperties: undefined;
|
|
130
149
|
};
|
|
131
150
|
};
|
|
132
|
-
}>;
|
|
133
|
-
export declare const npmDependencySchema: Schema<{
|
|
151
|
+
}, undefined>;
|
|
152
|
+
export declare const npmDependencySchema: Schema.Utils.FromObject<{
|
|
134
153
|
readonly name: {
|
|
135
154
|
readonly type: "string";
|
|
136
155
|
readonly required: true;
|
|
@@ -140,8 +159,8 @@ export declare const npmDependencySchema: Schema<{
|
|
|
140
159
|
readonly nullable: true;
|
|
141
160
|
readonly default: [];
|
|
142
161
|
readonly items: {
|
|
143
|
-
|
|
144
|
-
|
|
162
|
+
type: "object";
|
|
163
|
+
properties: {
|
|
145
164
|
readonly alias: {
|
|
146
165
|
readonly type: "string";
|
|
147
166
|
readonly required: true;
|
|
@@ -164,10 +183,11 @@ export declare const npmDependencySchema: Schema<{
|
|
|
164
183
|
readonly required: true;
|
|
165
184
|
};
|
|
166
185
|
};
|
|
186
|
+
allowAdditionalProperties: undefined;
|
|
167
187
|
};
|
|
168
188
|
};
|
|
169
|
-
}>;
|
|
170
|
-
export declare const config: Schema<{
|
|
189
|
+
}, undefined>;
|
|
190
|
+
export declare const config: Schema.Utils.FromObject<{
|
|
171
191
|
readonly flowFolder: {
|
|
172
192
|
readonly type: "string";
|
|
173
193
|
readonly default: ".depflow";
|
|
@@ -190,8 +210,8 @@ export declare const config: Schema<{
|
|
|
190
210
|
readonly type: "array";
|
|
191
211
|
readonly default: [];
|
|
192
212
|
readonly items: {
|
|
193
|
-
|
|
194
|
-
|
|
213
|
+
type: "object";
|
|
214
|
+
properties: {
|
|
195
215
|
readonly name: {
|
|
196
216
|
readonly type: "string";
|
|
197
217
|
readonly required: true;
|
|
@@ -200,15 +220,19 @@ export declare const config: Schema<{
|
|
|
200
220
|
readonly type: "string";
|
|
201
221
|
readonly required: true;
|
|
202
222
|
};
|
|
203
|
-
readonly
|
|
223
|
+
readonly tag: {
|
|
204
224
|
readonly type: "string";
|
|
205
225
|
};
|
|
206
226
|
readonly builder: {
|
|
207
227
|
readonly type: "array";
|
|
208
228
|
readonly default: [];
|
|
209
229
|
readonly items: {
|
|
210
|
-
|
|
211
|
-
|
|
230
|
+
type: "object";
|
|
231
|
+
properties: {
|
|
232
|
+
readonly maxTimeMs: {
|
|
233
|
+
readonly type: "number";
|
|
234
|
+
readonly default: 60000;
|
|
235
|
+
};
|
|
212
236
|
readonly run: {
|
|
213
237
|
readonly union: [{
|
|
214
238
|
readonly type: "string";
|
|
@@ -227,6 +251,7 @@ export declare const config: Schema<{
|
|
|
227
251
|
}];
|
|
228
252
|
};
|
|
229
253
|
};
|
|
254
|
+
allowAdditionalProperties: undefined;
|
|
230
255
|
};
|
|
231
256
|
};
|
|
232
257
|
readonly resolver: {
|
|
@@ -234,8 +259,8 @@ export declare const config: Schema<{
|
|
|
234
259
|
readonly nullable: true;
|
|
235
260
|
readonly default: [];
|
|
236
261
|
readonly items: {
|
|
237
|
-
|
|
238
|
-
|
|
262
|
+
type: "object";
|
|
263
|
+
properties: {
|
|
239
264
|
readonly alias: {
|
|
240
265
|
readonly type: "string";
|
|
241
266
|
readonly required: true;
|
|
@@ -258,17 +283,19 @@ export declare const config: Schema<{
|
|
|
258
283
|
readonly required: true;
|
|
259
284
|
};
|
|
260
285
|
};
|
|
286
|
+
allowAdditionalProperties: undefined;
|
|
261
287
|
};
|
|
262
288
|
};
|
|
263
289
|
};
|
|
290
|
+
allowAdditionalProperties: undefined;
|
|
264
291
|
};
|
|
265
292
|
};
|
|
266
293
|
readonly npmDependencies: {
|
|
267
294
|
readonly type: "array";
|
|
268
295
|
readonly default: [];
|
|
269
296
|
readonly items: {
|
|
270
|
-
|
|
271
|
-
|
|
297
|
+
type: "object";
|
|
298
|
+
properties: {
|
|
272
299
|
readonly name: {
|
|
273
300
|
readonly type: "string";
|
|
274
301
|
readonly required: true;
|
|
@@ -278,8 +305,8 @@ export declare const config: Schema<{
|
|
|
278
305
|
readonly nullable: true;
|
|
279
306
|
readonly default: [];
|
|
280
307
|
readonly items: {
|
|
281
|
-
|
|
282
|
-
|
|
308
|
+
type: "object";
|
|
309
|
+
properties: {
|
|
283
310
|
readonly alias: {
|
|
284
311
|
readonly type: "string";
|
|
285
312
|
readonly required: true;
|
|
@@ -302,14 +329,16 @@ export declare const config: Schema<{
|
|
|
302
329
|
readonly required: true;
|
|
303
330
|
};
|
|
304
331
|
};
|
|
332
|
+
allowAdditionalProperties: undefined;
|
|
305
333
|
};
|
|
306
334
|
};
|
|
307
335
|
};
|
|
336
|
+
allowAdditionalProperties: undefined;
|
|
308
337
|
};
|
|
309
338
|
};
|
|
310
|
-
}>;
|
|
339
|
+
}, undefined>;
|
|
311
340
|
export declare const schemas: {
|
|
312
|
-
basicTsconfig: Schema<{
|
|
341
|
+
basicTsconfig: Schema.Utils.FromObject<{
|
|
313
342
|
readonly compilerOptions: {
|
|
314
343
|
readonly type: "object";
|
|
315
344
|
readonly properties: {
|
|
@@ -326,9 +355,10 @@ export declare const schemas: {
|
|
|
326
355
|
readonly type: "object";
|
|
327
356
|
};
|
|
328
357
|
};
|
|
358
|
+
readonly allowAdditionalProperties: true;
|
|
329
359
|
};
|
|
330
|
-
}>;
|
|
331
|
-
config: Schema<{
|
|
360
|
+
}, true>;
|
|
361
|
+
config: Schema.Utils.FromObject<{
|
|
332
362
|
readonly flowFolder: {
|
|
333
363
|
readonly type: "string";
|
|
334
364
|
readonly default: ".depflow";
|
|
@@ -351,8 +381,8 @@ export declare const schemas: {
|
|
|
351
381
|
readonly type: "array";
|
|
352
382
|
readonly default: [];
|
|
353
383
|
readonly items: {
|
|
354
|
-
|
|
355
|
-
|
|
384
|
+
type: "object";
|
|
385
|
+
properties: {
|
|
356
386
|
readonly name: {
|
|
357
387
|
readonly type: "string";
|
|
358
388
|
readonly required: true;
|
|
@@ -361,15 +391,19 @@ export declare const schemas: {
|
|
|
361
391
|
readonly type: "string";
|
|
362
392
|
readonly required: true;
|
|
363
393
|
};
|
|
364
|
-
readonly
|
|
394
|
+
readonly tag: {
|
|
365
395
|
readonly type: "string";
|
|
366
396
|
};
|
|
367
397
|
readonly builder: {
|
|
368
398
|
readonly type: "array";
|
|
369
399
|
readonly default: [];
|
|
370
400
|
readonly items: {
|
|
371
|
-
|
|
372
|
-
|
|
401
|
+
type: "object";
|
|
402
|
+
properties: {
|
|
403
|
+
readonly maxTimeMs: {
|
|
404
|
+
readonly type: "number";
|
|
405
|
+
readonly default: 60000;
|
|
406
|
+
};
|
|
373
407
|
readonly run: {
|
|
374
408
|
readonly union: [{
|
|
375
409
|
readonly type: "string";
|
|
@@ -388,6 +422,7 @@ export declare const schemas: {
|
|
|
388
422
|
}];
|
|
389
423
|
};
|
|
390
424
|
};
|
|
425
|
+
allowAdditionalProperties: undefined;
|
|
391
426
|
};
|
|
392
427
|
};
|
|
393
428
|
readonly resolver: {
|
|
@@ -395,8 +430,8 @@ export declare const schemas: {
|
|
|
395
430
|
readonly nullable: true;
|
|
396
431
|
readonly default: [];
|
|
397
432
|
readonly items: {
|
|
398
|
-
|
|
399
|
-
|
|
433
|
+
type: "object";
|
|
434
|
+
properties: {
|
|
400
435
|
readonly alias: {
|
|
401
436
|
readonly type: "string";
|
|
402
437
|
readonly required: true;
|
|
@@ -419,17 +454,19 @@ export declare const schemas: {
|
|
|
419
454
|
readonly required: true;
|
|
420
455
|
};
|
|
421
456
|
};
|
|
457
|
+
allowAdditionalProperties: undefined;
|
|
422
458
|
};
|
|
423
459
|
};
|
|
424
460
|
};
|
|
461
|
+
allowAdditionalProperties: undefined;
|
|
425
462
|
};
|
|
426
463
|
};
|
|
427
464
|
readonly npmDependencies: {
|
|
428
465
|
readonly type: "array";
|
|
429
466
|
readonly default: [];
|
|
430
467
|
readonly items: {
|
|
431
|
-
|
|
432
|
-
|
|
468
|
+
type: "object";
|
|
469
|
+
properties: {
|
|
433
470
|
readonly name: {
|
|
434
471
|
readonly type: "string";
|
|
435
472
|
readonly required: true;
|
|
@@ -439,8 +476,8 @@ export declare const schemas: {
|
|
|
439
476
|
readonly nullable: true;
|
|
440
477
|
readonly default: [];
|
|
441
478
|
readonly items: {
|
|
442
|
-
|
|
443
|
-
|
|
479
|
+
type: "object";
|
|
480
|
+
properties: {
|
|
444
481
|
readonly alias: {
|
|
445
482
|
readonly type: "string";
|
|
446
483
|
readonly required: true;
|
|
@@ -463,13 +500,19 @@ export declare const schemas: {
|
|
|
463
500
|
readonly required: true;
|
|
464
501
|
};
|
|
465
502
|
};
|
|
503
|
+
allowAdditionalProperties: undefined;
|
|
466
504
|
};
|
|
467
505
|
};
|
|
468
506
|
};
|
|
507
|
+
allowAdditionalProperties: undefined;
|
|
469
508
|
};
|
|
470
509
|
};
|
|
471
|
-
}>;
|
|
472
|
-
builder: Schema<{
|
|
510
|
+
}, undefined>;
|
|
511
|
+
builder: Schema.Utils.FromObject<{
|
|
512
|
+
readonly maxTimeMs: {
|
|
513
|
+
readonly type: "number";
|
|
514
|
+
readonly default: 60000;
|
|
515
|
+
};
|
|
473
516
|
readonly run: {
|
|
474
517
|
readonly union: [{
|
|
475
518
|
readonly type: "string";
|
|
@@ -487,8 +530,8 @@ export declare const schemas: {
|
|
|
487
530
|
readonly type: "object";
|
|
488
531
|
}];
|
|
489
532
|
};
|
|
490
|
-
}>;
|
|
491
|
-
pathResolver: Schema<{
|
|
533
|
+
}, undefined>;
|
|
534
|
+
pathResolver: Schema.Utils.FromObject<{
|
|
492
535
|
readonly alias: {
|
|
493
536
|
readonly type: "string";
|
|
494
537
|
readonly required: true;
|
|
@@ -510,8 +553,8 @@ export declare const schemas: {
|
|
|
510
553
|
}];
|
|
511
554
|
readonly required: true;
|
|
512
555
|
};
|
|
513
|
-
}>;
|
|
514
|
-
dependency: Schema<{
|
|
556
|
+
}, undefined>;
|
|
557
|
+
dependency: Schema.Utils.FromObject<{
|
|
515
558
|
readonly name: {
|
|
516
559
|
readonly type: "string";
|
|
517
560
|
readonly required: true;
|
|
@@ -520,15 +563,19 @@ export declare const schemas: {
|
|
|
520
563
|
readonly type: "string";
|
|
521
564
|
readonly required: true;
|
|
522
565
|
};
|
|
523
|
-
readonly
|
|
566
|
+
readonly tag: {
|
|
524
567
|
readonly type: "string";
|
|
525
568
|
};
|
|
526
569
|
readonly builder: {
|
|
527
570
|
readonly type: "array";
|
|
528
571
|
readonly default: [];
|
|
529
572
|
readonly items: {
|
|
530
|
-
|
|
531
|
-
|
|
573
|
+
type: "object";
|
|
574
|
+
properties: {
|
|
575
|
+
readonly maxTimeMs: {
|
|
576
|
+
readonly type: "number";
|
|
577
|
+
readonly default: 60000;
|
|
578
|
+
};
|
|
532
579
|
readonly run: {
|
|
533
580
|
readonly union: [{
|
|
534
581
|
readonly type: "string";
|
|
@@ -547,6 +594,7 @@ export declare const schemas: {
|
|
|
547
594
|
}];
|
|
548
595
|
};
|
|
549
596
|
};
|
|
597
|
+
allowAdditionalProperties: undefined;
|
|
550
598
|
};
|
|
551
599
|
};
|
|
552
600
|
readonly resolver: {
|
|
@@ -554,8 +602,8 @@ export declare const schemas: {
|
|
|
554
602
|
readonly nullable: true;
|
|
555
603
|
readonly default: [];
|
|
556
604
|
readonly items: {
|
|
557
|
-
|
|
558
|
-
|
|
605
|
+
type: "object";
|
|
606
|
+
properties: {
|
|
559
607
|
readonly alias: {
|
|
560
608
|
readonly type: "string";
|
|
561
609
|
readonly required: true;
|
|
@@ -578,9 +626,10 @@ export declare const schemas: {
|
|
|
578
626
|
readonly required: true;
|
|
579
627
|
};
|
|
580
628
|
};
|
|
629
|
+
allowAdditionalProperties: undefined;
|
|
581
630
|
};
|
|
582
631
|
};
|
|
583
|
-
}>;
|
|
632
|
+
}, undefined>;
|
|
584
633
|
};
|
|
585
634
|
export declare namespace schemas {
|
|
586
635
|
type config = typeof config;
|
package/build/config/schemas.js
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { Schema } from '@netfeez/common';
|
|
2
|
-
export const
|
|
2
|
+
export const basicImportmap = Schema.fromObject({
|
|
3
|
+
imports: { type: 'object' },
|
|
4
|
+
scopes: { type: 'object' }
|
|
5
|
+
});
|
|
6
|
+
export const basicTsconfig = Schema.fromObject({
|
|
3
7
|
compilerOptions: { type: 'object', properties: {
|
|
4
8
|
baseUrl: { type: 'string' },
|
|
5
9
|
rootDir: { type: 'string' },
|
|
6
10
|
outDir: { type: 'string' },
|
|
7
11
|
paths: { type: 'object' }
|
|
8
|
-
} }
|
|
9
|
-
});
|
|
10
|
-
|
|
12
|
+
}, allowAdditionalProperties: true },
|
|
13
|
+
}, true);
|
|
14
|
+
let test = basicTsconfig.infer;
|
|
15
|
+
export const builder = Schema.fromObject({
|
|
16
|
+
maxTimeMs: { type: 'number', default: 60000 },
|
|
11
17
|
run: { union: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }] },
|
|
12
18
|
move: { union: [{ type: 'string' }, { type: 'object' }] }
|
|
13
19
|
});
|
|
14
|
-
export const pathResolverEntry =
|
|
20
|
+
export const pathResolverEntry = Schema.fromObject({
|
|
15
21
|
alias: { type: 'string', required: true },
|
|
16
22
|
target: { union: [
|
|
17
23
|
{ type: 'string' },
|
|
@@ -21,30 +27,24 @@ export const pathResolverEntry = new Schema({
|
|
|
21
27
|
} }
|
|
22
28
|
], required: true }
|
|
23
29
|
});
|
|
24
|
-
export const dependency =
|
|
30
|
+
export const dependency = Schema.fromObject({
|
|
25
31
|
name: { type: 'string', required: true },
|
|
26
32
|
repo: { type: 'string', required: true },
|
|
27
|
-
|
|
28
|
-
builder: { type: 'array', default: [], items:
|
|
29
|
-
resolver: { type: 'array', nullable: true, default: [], items:
|
|
30
|
-
type: 'object', properties: pathResolverEntry.schema
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
+
tag: { type: 'string' },
|
|
34
|
+
builder: { type: 'array', default: [], items: builder.root },
|
|
35
|
+
resolver: { type: 'array', nullable: true, default: [], items: pathResolverEntry.root }
|
|
33
36
|
});
|
|
34
|
-
export const npmDependencySchema =
|
|
37
|
+
export const npmDependencySchema = Schema.fromObject({
|
|
35
38
|
name: { type: 'string', required: true },
|
|
36
|
-
resolver: { type: 'array', nullable: true, default: [], items:
|
|
37
|
-
type: 'object', properties: pathResolverEntry.schema
|
|
38
|
-
}
|
|
39
|
-
}
|
|
39
|
+
resolver: { type: 'array', nullable: true, default: [], items: pathResolverEntry.root }
|
|
40
40
|
});
|
|
41
|
-
export const config =
|
|
41
|
+
export const config = Schema.fromObject({
|
|
42
42
|
flowFolder: { type: 'string', default: '.depflow' },
|
|
43
43
|
outDir: { type: 'string', default: '.' },
|
|
44
44
|
tsconfig: { type: 'string', nullable: true, default: null },
|
|
45
45
|
importmap: { type: 'string', nullable: true, default: null },
|
|
46
|
-
dependencies: { type: 'array', default: [], items:
|
|
47
|
-
npmDependencies: { type: 'array', default: [], items:
|
|
46
|
+
dependencies: { type: 'array', default: [], items: dependency.root },
|
|
47
|
+
npmDependencies: { type: 'array', default: [], items: npmDependencySchema.root }
|
|
48
48
|
});
|
|
49
49
|
export const schemas = { basicTsconfig, config, builder, pathResolver: pathResolverEntry, dependency };
|
|
50
50
|
export default schemas;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/config/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/config/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,CAAC,MAAM,cAAc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E,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;IACxC,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE;IAC3D,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE;IAC5D,YAAY,EAAE,EAAG,IAAI,EAAE,OAAO,EAAG,OAAO,EAAE,EAAE,EAAG,KAAK,EAAE,UAAU,CAAC,IAAI,EAAE;IACvE,eAAe,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,mBAAmB,CAAC,IAAI,EAAE;CACnF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAC;AASvG,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare class Async {
|
|
2
|
+
static delay(ms: number): Promise<void>;
|
|
3
|
+
/**
|
|
4
|
+
* Asynchronously waits for a specific event to occur by executing the provided executor function.
|
|
5
|
+
* The executor function is expected to call a done callback when the event occurs, passing any relevant result.
|
|
6
|
+
* The method also supports an optional timeout parameter, which will reject the promise if the event does not occur within the specified time frame.
|
|
7
|
+
*
|
|
8
|
+
* @param executor - A function that executes the logic to wait for the event and calls the done callback when the event occurs.
|
|
9
|
+
* @param timeout - An optional timeout in milliseconds after which the promise will be rejected if the event has not occurred (default is -1, meaning no timeout).
|
|
10
|
+
* @returns A promise that resolves with the result passed to the done callback when the event occurs, or rejects if an error occurs or if the timeout is reached.
|
|
11
|
+
*/
|
|
12
|
+
static awaitEvent<R extends any>(executor: Async.AsyncEvent.Exec<R>, timeout?: number): Promise<R>;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace Async {
|
|
15
|
+
namespace AsyncEvent {
|
|
16
|
+
type Clean = () => void;
|
|
17
|
+
type Done<R> = (result: R) => void;
|
|
18
|
+
type Fail = (error: Error) => void;
|
|
19
|
+
type Exec<R> = (done: Done<R>, fail: Fail) => Clean | Promise<Clean> | void | Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export default Async;
|