depflow 3.0.0-dev.2 → 3.0.0-dev.4
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.d.ts +1 -0
- package/build/cli/DepFLowCLI.js +29 -0
- package/build/cli/DepFLowCLI.js.map +1 -1
- package/build/config/schemas.d.ts +265 -0
- package/build/config/schemas.js +9 -7
- package/build/config/schemas.js.map +1 -1
- package/build/support/Builder/Builder.js +1 -1
- package/build/support/Builder/Builder.js.map +1 -1
- package/build/support/Git.js +1 -1
- package/build/support/Git.js.map +1 -1
- package/build/support/PathResolver/AliasCompiler.d.ts +9 -0
- package/build/support/PathResolver/AliasCompiler.js +35 -18
- package/build/support/PathResolver/AliasCompiler.js.map +1 -1
- package/build/support/PathResolver/PathResolver.d.ts +1 -1
- package/build/support/PathResolver/PathResolver.js +23 -22
- package/build/support/PathResolver/PathResolver.js.map +1 -1
- package/build/support/Task/Task.js +1 -1
- package/build/support/Task/Task.js.map +1 -1
- package/package.json +6 -7
- package/build/support/Async.d.ts +0 -22
- package/build/support/Async.js +0 -62
- package/build/support/Async.js.map +0 -1
|
@@ -7,6 +7,7 @@ export declare class DepFlowCLI extends DebugUI {
|
|
|
7
7
|
commandRemove(command: string, args: string[]): Promise<void>;
|
|
8
8
|
commandInstall(command: string, args: string[]): Promise<void>;
|
|
9
9
|
uninstall(command: string, args: string[]): Promise<void>;
|
|
10
|
+
commandRun(command: string, args: string[]): Promise<void>;
|
|
10
11
|
list(command: string, args: string[]): Promise<void>;
|
|
11
12
|
rewritePaths(command: string, args: string[]): Promise<void>;
|
|
12
13
|
commandSync(command: string, args: string[]): Promise<void>;
|
package/build/cli/DepFLowCLI.js
CHANGED
|
@@ -9,6 +9,7 @@ import Schemas from "../config/schemas.js";
|
|
|
9
9
|
import Tsconfig from "../config/Tsconfig.js";
|
|
10
10
|
import ImportMap from "../config/ImportMap.js";
|
|
11
11
|
import NpmDependency from "../support/Dependency/NpmDependency.js";
|
|
12
|
+
import Builder from "../support/Builder/Builder.js";
|
|
12
13
|
export class DepFlowCLI extends DebugUI {
|
|
13
14
|
configPath;
|
|
14
15
|
projectRoot;
|
|
@@ -25,6 +26,7 @@ export class DepFlowCLI extends DebugUI {
|
|
|
25
26
|
this.addCommand('remove', this.commandRemove, { usage: 'dep remove <name> | <repo_url>', description: 'Remove a dependency from the configuration file by name or repo URL.' });
|
|
26
27
|
this.addCommand('install', this.commandInstall, { usage: 'dep install [name1 name2 ...]', description: 'Install dependencies. If names are provided, only those dependencies will be installed.' });
|
|
27
28
|
this.addCommand('uninstall', this.uninstall, { usage: 'dep uninstall [name1 name2 ...]', description: 'Uninstall dependencies. If names are provided, only those dependencies will be uninstalled.' });
|
|
29
|
+
this.addCommand('run', this.commandRun, { usage: 'dep run <script>', description: 'Run a custom action defined in the configuration file.' });
|
|
28
30
|
this.addCommand('list', this.list, { usage: 'dep list', description: 'List all dependencies in the configuration file.' });
|
|
29
31
|
this.addCommand('rewrite-paths', this.rewritePaths, { usage: 'dep rewrite-paths [--watch] [--cdn]', description: 'Resolve and rewrite paths in built files based on depFlow configuration.' });
|
|
30
32
|
this.addCommand('sync', this.commandSync, { usage: 'dep sync', description: 'Syncs depFlow.json with tsconfig.json and generates the importmap.' });
|
|
@@ -144,6 +146,32 @@ export class DepFlowCLI extends DebugUI {
|
|
|
144
146
|
this.out.groupEnd();
|
|
145
147
|
}
|
|
146
148
|
}
|
|
149
|
+
async commandRun(command, args) {
|
|
150
|
+
try {
|
|
151
|
+
const [actionName] = args;
|
|
152
|
+
if (!actionName)
|
|
153
|
+
throw new Error('Usage: dep run <action>');
|
|
154
|
+
this.out.group(Utils.newGroup('#FFB4DC'));
|
|
155
|
+
this.out.info(`&C5Running action &C6${actionName}&C5...`);
|
|
156
|
+
const config = await Config.load(this.configPath);
|
|
157
|
+
const action = config.actions[actionName];
|
|
158
|
+
if (!action)
|
|
159
|
+
throw new Error(`action "${actionName}" not found in configuration.`);
|
|
160
|
+
const pipeline = Array.isArray(action) ? action : [action];
|
|
161
|
+
const builder = new Builder({
|
|
162
|
+
cwd: this.projectRoot,
|
|
163
|
+
pipeline,
|
|
164
|
+
logger: this.out
|
|
165
|
+
});
|
|
166
|
+
await builder.run();
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
this.out.error(`&C1${error}`);
|
|
170
|
+
}
|
|
171
|
+
finally {
|
|
172
|
+
this.out.groupEnd();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
147
175
|
async list(command, args) {
|
|
148
176
|
this.out.group(Utils.newGroup('#FFB4DC'));
|
|
149
177
|
try {
|
|
@@ -169,6 +197,7 @@ export class DepFlowCLI extends DebugUI {
|
|
|
169
197
|
const watch = args.includes('--watch') || args.includes('-w');
|
|
170
198
|
const useCDN = args.includes('--cdn');
|
|
171
199
|
const mode = useCDN ? 'cdn' : 'local';
|
|
200
|
+
const dir = config.outDir;
|
|
172
201
|
this.out.info(`Mode: &C3${useCDN ? 'CDN' : 'Local'}`);
|
|
173
202
|
if (watch)
|
|
174
203
|
this.out.info(`Watcher: &C2Enabled`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DepFLowCLI.js","sourceRoot":"","sources":["../../src/cli/DepFLowCLI.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,aAAa,MAAM,wCAAwC,CAAC;AACnE,OAAO,YAAY,MAAM,yCAAyC,CAAC;AACnE,OAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,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AC,yBAAyB,KAAK,EAAE,CAAC,CAAC;QAAC,CAAC;gBAC7D,CAAC;YAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAAC,CAAC;IACpC,CAAC;CACJ;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -2,10 +2,12 @@ import { Schema } from '@netfeez/common';
|
|
|
2
2
|
export declare const ImportMap: Schema.Utils.FromObject<{
|
|
3
3
|
readonly imports: {
|
|
4
4
|
readonly type: "object";
|
|
5
|
+
readonly allowAdditionalProperties: true;
|
|
5
6
|
readonly default: {};
|
|
6
7
|
};
|
|
7
8
|
readonly scopes: {
|
|
8
9
|
readonly type: "object";
|
|
10
|
+
readonly allowAdditionalProperties: true;
|
|
9
11
|
readonly default: {};
|
|
10
12
|
};
|
|
11
13
|
}, undefined>;
|
|
@@ -24,6 +26,12 @@ export declare const TsConfig: Schema.Utils.FromObject<{
|
|
|
24
26
|
};
|
|
25
27
|
readonly paths: {
|
|
26
28
|
readonly type: "object";
|
|
29
|
+
readonly allowAdditionalProperties: {
|
|
30
|
+
readonly type: "array";
|
|
31
|
+
readonly items: {
|
|
32
|
+
readonly type: "string";
|
|
33
|
+
};
|
|
34
|
+
};
|
|
27
35
|
};
|
|
28
36
|
};
|
|
29
37
|
readonly allowAdditionalProperties: true;
|
|
@@ -39,6 +47,7 @@ export declare const ExtractorEntry: Schema.Utils.FromObject<{
|
|
|
39
47
|
readonly required: true;
|
|
40
48
|
};
|
|
41
49
|
readonly replacer: {
|
|
50
|
+
readonly type: "union";
|
|
42
51
|
readonly union: [{
|
|
43
52
|
readonly type: "string";
|
|
44
53
|
}, {
|
|
@@ -63,6 +72,7 @@ export declare const BuilderEntry: Schema.Utils.FromObject<{
|
|
|
63
72
|
readonly default: 60000;
|
|
64
73
|
};
|
|
65
74
|
readonly run: {
|
|
75
|
+
readonly type: "union";
|
|
66
76
|
readonly union: [{
|
|
67
77
|
readonly type: "string";
|
|
68
78
|
}, {
|
|
@@ -73,6 +83,7 @@ export declare const BuilderEntry: Schema.Utils.FromObject<{
|
|
|
73
83
|
}];
|
|
74
84
|
};
|
|
75
85
|
readonly extract: {
|
|
86
|
+
readonly type: "union";
|
|
76
87
|
readonly union: [{
|
|
77
88
|
readonly type: "string";
|
|
78
89
|
}, {
|
|
@@ -89,6 +100,7 @@ export declare const BuilderEntry: Schema.Utils.FromObject<{
|
|
|
89
100
|
readonly required: true;
|
|
90
101
|
};
|
|
91
102
|
readonly replacer: {
|
|
103
|
+
readonly type: "union";
|
|
92
104
|
readonly union: [{
|
|
93
105
|
readonly type: "string";
|
|
94
106
|
}, {
|
|
@@ -118,6 +130,7 @@ export declare const ResolverEntry: Schema.Utils.FromObject<{
|
|
|
118
130
|
readonly required: true;
|
|
119
131
|
};
|
|
120
132
|
readonly target: {
|
|
133
|
+
readonly type: "union";
|
|
121
134
|
readonly union: [{
|
|
122
135
|
readonly type: "string";
|
|
123
136
|
}, {
|
|
@@ -162,6 +175,7 @@ export declare const GitDependency: Schema.Utils.FromObject<{
|
|
|
162
175
|
readonly default: 60000;
|
|
163
176
|
};
|
|
164
177
|
readonly run: {
|
|
178
|
+
readonly type: "union";
|
|
165
179
|
readonly union: [{
|
|
166
180
|
readonly type: "string";
|
|
167
181
|
}, {
|
|
@@ -172,6 +186,7 @@ export declare const GitDependency: Schema.Utils.FromObject<{
|
|
|
172
186
|
}];
|
|
173
187
|
};
|
|
174
188
|
readonly extract: {
|
|
189
|
+
readonly type: "union";
|
|
175
190
|
readonly union: [{
|
|
176
191
|
readonly type: "string";
|
|
177
192
|
}, {
|
|
@@ -188,6 +203,7 @@ export declare const GitDependency: Schema.Utils.FromObject<{
|
|
|
188
203
|
readonly required: true;
|
|
189
204
|
};
|
|
190
205
|
readonly replacer: {
|
|
206
|
+
readonly type: "union";
|
|
191
207
|
readonly union: [{
|
|
192
208
|
readonly type: "string";
|
|
193
209
|
}, {
|
|
@@ -226,6 +242,7 @@ export declare const GitDependency: Schema.Utils.FromObject<{
|
|
|
226
242
|
readonly required: true;
|
|
227
243
|
};
|
|
228
244
|
readonly target: {
|
|
245
|
+
readonly type: "union";
|
|
229
246
|
readonly union: [{
|
|
230
247
|
readonly type: "string";
|
|
231
248
|
}, {
|
|
@@ -270,6 +287,7 @@ export declare const NpmDependency: Schema.Utils.FromObject<{
|
|
|
270
287
|
readonly default: 60000;
|
|
271
288
|
};
|
|
272
289
|
readonly run: {
|
|
290
|
+
readonly type: "union";
|
|
273
291
|
readonly union: [{
|
|
274
292
|
readonly type: "string";
|
|
275
293
|
}, {
|
|
@@ -280,6 +298,7 @@ export declare const NpmDependency: Schema.Utils.FromObject<{
|
|
|
280
298
|
}];
|
|
281
299
|
};
|
|
282
300
|
readonly extract: {
|
|
301
|
+
readonly type: "union";
|
|
283
302
|
readonly union: [{
|
|
284
303
|
readonly type: "string";
|
|
285
304
|
}, {
|
|
@@ -296,6 +315,7 @@ export declare const NpmDependency: Schema.Utils.FromObject<{
|
|
|
296
315
|
readonly required: true;
|
|
297
316
|
};
|
|
298
317
|
readonly replacer: {
|
|
318
|
+
readonly type: "union";
|
|
299
319
|
readonly union: [{
|
|
300
320
|
readonly type: "string";
|
|
301
321
|
}, {
|
|
@@ -334,6 +354,7 @@ export declare const NpmDependency: Schema.Utils.FromObject<{
|
|
|
334
354
|
readonly required: true;
|
|
335
355
|
};
|
|
336
356
|
readonly target: {
|
|
357
|
+
readonly type: "union";
|
|
337
358
|
readonly union: [{
|
|
338
359
|
readonly type: "string";
|
|
339
360
|
}, {
|
|
@@ -381,6 +402,110 @@ export declare const Config: Schema.Utils.FromObject<{
|
|
|
381
402
|
readonly nullable: true;
|
|
382
403
|
readonly default: null;
|
|
383
404
|
};
|
|
405
|
+
readonly actions: {
|
|
406
|
+
readonly type: "object";
|
|
407
|
+
readonly allowAdditionalProperties: {
|
|
408
|
+
readonly type: "array";
|
|
409
|
+
readonly items: {
|
|
410
|
+
type: "object";
|
|
411
|
+
properties: {
|
|
412
|
+
readonly maxTimeMs: {
|
|
413
|
+
readonly type: "number";
|
|
414
|
+
readonly default: 60000;
|
|
415
|
+
};
|
|
416
|
+
readonly run: {
|
|
417
|
+
readonly type: "union";
|
|
418
|
+
readonly union: [{
|
|
419
|
+
readonly type: "string";
|
|
420
|
+
}, {
|
|
421
|
+
readonly type: "array";
|
|
422
|
+
readonly items: {
|
|
423
|
+
readonly type: "string";
|
|
424
|
+
};
|
|
425
|
+
}];
|
|
426
|
+
};
|
|
427
|
+
readonly extract: {
|
|
428
|
+
readonly type: "union";
|
|
429
|
+
readonly union: [{
|
|
430
|
+
readonly type: "string";
|
|
431
|
+
}, {
|
|
432
|
+
readonly type: "array";
|
|
433
|
+
readonly items: {
|
|
434
|
+
type: "object";
|
|
435
|
+
properties: {
|
|
436
|
+
readonly from: {
|
|
437
|
+
readonly type: "string";
|
|
438
|
+
readonly required: true;
|
|
439
|
+
};
|
|
440
|
+
readonly to: {
|
|
441
|
+
readonly type: "string";
|
|
442
|
+
readonly required: true;
|
|
443
|
+
};
|
|
444
|
+
readonly replacer: {
|
|
445
|
+
readonly type: "union";
|
|
446
|
+
readonly union: [{
|
|
447
|
+
readonly type: "string";
|
|
448
|
+
}, {
|
|
449
|
+
readonly type: "object";
|
|
450
|
+
readonly properties: {
|
|
451
|
+
readonly search: {
|
|
452
|
+
readonly type: "string";
|
|
453
|
+
readonly required: true;
|
|
454
|
+
};
|
|
455
|
+
readonly replace: {
|
|
456
|
+
readonly type: "string";
|
|
457
|
+
readonly required: true;
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
}];
|
|
461
|
+
readonly nullable: true;
|
|
462
|
+
};
|
|
463
|
+
};
|
|
464
|
+
allowAdditionalProperties: undefined;
|
|
465
|
+
};
|
|
466
|
+
}];
|
|
467
|
+
};
|
|
468
|
+
};
|
|
469
|
+
allowAdditionalProperties: undefined;
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
readonly default: {};
|
|
473
|
+
};
|
|
474
|
+
readonly resolver: {
|
|
475
|
+
readonly type: "array";
|
|
476
|
+
readonly default: [];
|
|
477
|
+
readonly items: {
|
|
478
|
+
type: "object";
|
|
479
|
+
properties: {
|
|
480
|
+
readonly alias: {
|
|
481
|
+
readonly type: "string";
|
|
482
|
+
readonly required: true;
|
|
483
|
+
};
|
|
484
|
+
readonly target: {
|
|
485
|
+
readonly type: "union";
|
|
486
|
+
readonly union: [{
|
|
487
|
+
readonly type: "string";
|
|
488
|
+
}, {
|
|
489
|
+
readonly type: "object";
|
|
490
|
+
readonly properties: {
|
|
491
|
+
readonly local: {
|
|
492
|
+
readonly type: "string";
|
|
493
|
+
readonly required: true;
|
|
494
|
+
};
|
|
495
|
+
readonly type: {
|
|
496
|
+
readonly type: "string";
|
|
497
|
+
};
|
|
498
|
+
readonly cdn: {
|
|
499
|
+
readonly type: "string";
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
}];
|
|
503
|
+
readonly required: true;
|
|
504
|
+
};
|
|
505
|
+
};
|
|
506
|
+
allowAdditionalProperties: undefined;
|
|
507
|
+
};
|
|
508
|
+
};
|
|
384
509
|
readonly dependencies: {
|
|
385
510
|
readonly type: "array";
|
|
386
511
|
readonly default: [];
|
|
@@ -410,6 +535,7 @@ export declare const Config: Schema.Utils.FromObject<{
|
|
|
410
535
|
readonly default: 60000;
|
|
411
536
|
};
|
|
412
537
|
readonly run: {
|
|
538
|
+
readonly type: "union";
|
|
413
539
|
readonly union: [{
|
|
414
540
|
readonly type: "string";
|
|
415
541
|
}, {
|
|
@@ -420,6 +546,7 @@ export declare const Config: Schema.Utils.FromObject<{
|
|
|
420
546
|
}];
|
|
421
547
|
};
|
|
422
548
|
readonly extract: {
|
|
549
|
+
readonly type: "union";
|
|
423
550
|
readonly union: [{
|
|
424
551
|
readonly type: "string";
|
|
425
552
|
}, {
|
|
@@ -436,6 +563,7 @@ export declare const Config: Schema.Utils.FromObject<{
|
|
|
436
563
|
readonly required: true;
|
|
437
564
|
};
|
|
438
565
|
readonly replacer: {
|
|
566
|
+
readonly type: "union";
|
|
439
567
|
readonly union: [{
|
|
440
568
|
readonly type: "string";
|
|
441
569
|
}, {
|
|
@@ -474,6 +602,7 @@ export declare const Config: Schema.Utils.FromObject<{
|
|
|
474
602
|
readonly required: true;
|
|
475
603
|
};
|
|
476
604
|
readonly target: {
|
|
605
|
+
readonly type: "union";
|
|
477
606
|
readonly union: [{
|
|
478
607
|
readonly type: "string";
|
|
479
608
|
}, {
|
|
@@ -526,6 +655,7 @@ export declare const Config: Schema.Utils.FromObject<{
|
|
|
526
655
|
readonly default: 60000;
|
|
527
656
|
};
|
|
528
657
|
readonly run: {
|
|
658
|
+
readonly type: "union";
|
|
529
659
|
readonly union: [{
|
|
530
660
|
readonly type: "string";
|
|
531
661
|
}, {
|
|
@@ -536,6 +666,7 @@ export declare const Config: Schema.Utils.FromObject<{
|
|
|
536
666
|
}];
|
|
537
667
|
};
|
|
538
668
|
readonly extract: {
|
|
669
|
+
readonly type: "union";
|
|
539
670
|
readonly union: [{
|
|
540
671
|
readonly type: "string";
|
|
541
672
|
}, {
|
|
@@ -552,6 +683,7 @@ export declare const Config: Schema.Utils.FromObject<{
|
|
|
552
683
|
readonly required: true;
|
|
553
684
|
};
|
|
554
685
|
readonly replacer: {
|
|
686
|
+
readonly type: "union";
|
|
555
687
|
readonly union: [{
|
|
556
688
|
readonly type: "string";
|
|
557
689
|
}, {
|
|
@@ -590,6 +722,7 @@ export declare const Config: Schema.Utils.FromObject<{
|
|
|
590
722
|
readonly required: true;
|
|
591
723
|
};
|
|
592
724
|
readonly target: {
|
|
725
|
+
readonly type: "union";
|
|
593
726
|
readonly union: [{
|
|
594
727
|
readonly type: "string";
|
|
595
728
|
}, {
|
|
@@ -642,6 +775,110 @@ export declare const Schemas: {
|
|
|
642
775
|
readonly nullable: true;
|
|
643
776
|
readonly default: null;
|
|
644
777
|
};
|
|
778
|
+
readonly actions: {
|
|
779
|
+
readonly type: "object";
|
|
780
|
+
readonly allowAdditionalProperties: {
|
|
781
|
+
readonly type: "array";
|
|
782
|
+
readonly items: {
|
|
783
|
+
type: "object";
|
|
784
|
+
properties: {
|
|
785
|
+
readonly maxTimeMs: {
|
|
786
|
+
readonly type: "number";
|
|
787
|
+
readonly default: 60000;
|
|
788
|
+
};
|
|
789
|
+
readonly run: {
|
|
790
|
+
readonly type: "union";
|
|
791
|
+
readonly union: [{
|
|
792
|
+
readonly type: "string";
|
|
793
|
+
}, {
|
|
794
|
+
readonly type: "array";
|
|
795
|
+
readonly items: {
|
|
796
|
+
readonly type: "string";
|
|
797
|
+
};
|
|
798
|
+
}];
|
|
799
|
+
};
|
|
800
|
+
readonly extract: {
|
|
801
|
+
readonly type: "union";
|
|
802
|
+
readonly union: [{
|
|
803
|
+
readonly type: "string";
|
|
804
|
+
}, {
|
|
805
|
+
readonly type: "array";
|
|
806
|
+
readonly items: {
|
|
807
|
+
type: "object";
|
|
808
|
+
properties: {
|
|
809
|
+
readonly from: {
|
|
810
|
+
readonly type: "string";
|
|
811
|
+
readonly required: true;
|
|
812
|
+
};
|
|
813
|
+
readonly to: {
|
|
814
|
+
readonly type: "string";
|
|
815
|
+
readonly required: true;
|
|
816
|
+
};
|
|
817
|
+
readonly replacer: {
|
|
818
|
+
readonly type: "union";
|
|
819
|
+
readonly union: [{
|
|
820
|
+
readonly type: "string";
|
|
821
|
+
}, {
|
|
822
|
+
readonly type: "object";
|
|
823
|
+
readonly properties: {
|
|
824
|
+
readonly search: {
|
|
825
|
+
readonly type: "string";
|
|
826
|
+
readonly required: true;
|
|
827
|
+
};
|
|
828
|
+
readonly replace: {
|
|
829
|
+
readonly type: "string";
|
|
830
|
+
readonly required: true;
|
|
831
|
+
};
|
|
832
|
+
};
|
|
833
|
+
}];
|
|
834
|
+
readonly nullable: true;
|
|
835
|
+
};
|
|
836
|
+
};
|
|
837
|
+
allowAdditionalProperties: undefined;
|
|
838
|
+
};
|
|
839
|
+
}];
|
|
840
|
+
};
|
|
841
|
+
};
|
|
842
|
+
allowAdditionalProperties: undefined;
|
|
843
|
+
};
|
|
844
|
+
};
|
|
845
|
+
readonly default: {};
|
|
846
|
+
};
|
|
847
|
+
readonly resolver: {
|
|
848
|
+
readonly type: "array";
|
|
849
|
+
readonly default: [];
|
|
850
|
+
readonly items: {
|
|
851
|
+
type: "object";
|
|
852
|
+
properties: {
|
|
853
|
+
readonly alias: {
|
|
854
|
+
readonly type: "string";
|
|
855
|
+
readonly required: true;
|
|
856
|
+
};
|
|
857
|
+
readonly target: {
|
|
858
|
+
readonly type: "union";
|
|
859
|
+
readonly union: [{
|
|
860
|
+
readonly type: "string";
|
|
861
|
+
}, {
|
|
862
|
+
readonly type: "object";
|
|
863
|
+
readonly properties: {
|
|
864
|
+
readonly local: {
|
|
865
|
+
readonly type: "string";
|
|
866
|
+
readonly required: true;
|
|
867
|
+
};
|
|
868
|
+
readonly type: {
|
|
869
|
+
readonly type: "string";
|
|
870
|
+
};
|
|
871
|
+
readonly cdn: {
|
|
872
|
+
readonly type: "string";
|
|
873
|
+
};
|
|
874
|
+
};
|
|
875
|
+
}];
|
|
876
|
+
readonly required: true;
|
|
877
|
+
};
|
|
878
|
+
};
|
|
879
|
+
allowAdditionalProperties: undefined;
|
|
880
|
+
};
|
|
881
|
+
};
|
|
645
882
|
readonly dependencies: {
|
|
646
883
|
readonly type: "array";
|
|
647
884
|
readonly default: [];
|
|
@@ -671,6 +908,7 @@ export declare const Schemas: {
|
|
|
671
908
|
readonly default: 60000;
|
|
672
909
|
};
|
|
673
910
|
readonly run: {
|
|
911
|
+
readonly type: "union";
|
|
674
912
|
readonly union: [{
|
|
675
913
|
readonly type: "string";
|
|
676
914
|
}, {
|
|
@@ -681,6 +919,7 @@ export declare const Schemas: {
|
|
|
681
919
|
}];
|
|
682
920
|
};
|
|
683
921
|
readonly extract: {
|
|
922
|
+
readonly type: "union";
|
|
684
923
|
readonly union: [{
|
|
685
924
|
readonly type: "string";
|
|
686
925
|
}, {
|
|
@@ -697,6 +936,7 @@ export declare const Schemas: {
|
|
|
697
936
|
readonly required: true;
|
|
698
937
|
};
|
|
699
938
|
readonly replacer: {
|
|
939
|
+
readonly type: "union";
|
|
700
940
|
readonly union: [{
|
|
701
941
|
readonly type: "string";
|
|
702
942
|
}, {
|
|
@@ -735,6 +975,7 @@ export declare const Schemas: {
|
|
|
735
975
|
readonly required: true;
|
|
736
976
|
};
|
|
737
977
|
readonly target: {
|
|
978
|
+
readonly type: "union";
|
|
738
979
|
readonly union: [{
|
|
739
980
|
readonly type: "string";
|
|
740
981
|
}, {
|
|
@@ -787,6 +1028,7 @@ export declare const Schemas: {
|
|
|
787
1028
|
readonly default: 60000;
|
|
788
1029
|
};
|
|
789
1030
|
readonly run: {
|
|
1031
|
+
readonly type: "union";
|
|
790
1032
|
readonly union: [{
|
|
791
1033
|
readonly type: "string";
|
|
792
1034
|
}, {
|
|
@@ -797,6 +1039,7 @@ export declare const Schemas: {
|
|
|
797
1039
|
}];
|
|
798
1040
|
};
|
|
799
1041
|
readonly extract: {
|
|
1042
|
+
readonly type: "union";
|
|
800
1043
|
readonly union: [{
|
|
801
1044
|
readonly type: "string";
|
|
802
1045
|
}, {
|
|
@@ -813,6 +1056,7 @@ export declare const Schemas: {
|
|
|
813
1056
|
readonly required: true;
|
|
814
1057
|
};
|
|
815
1058
|
readonly replacer: {
|
|
1059
|
+
readonly type: "union";
|
|
816
1060
|
readonly union: [{
|
|
817
1061
|
readonly type: "string";
|
|
818
1062
|
}, {
|
|
@@ -851,6 +1095,7 @@ export declare const Schemas: {
|
|
|
851
1095
|
readonly required: true;
|
|
852
1096
|
};
|
|
853
1097
|
readonly target: {
|
|
1098
|
+
readonly type: "union";
|
|
854
1099
|
readonly union: [{
|
|
855
1100
|
readonly type: "string";
|
|
856
1101
|
}, {
|
|
@@ -894,6 +1139,12 @@ export declare const Schemas: {
|
|
|
894
1139
|
};
|
|
895
1140
|
readonly paths: {
|
|
896
1141
|
readonly type: "object";
|
|
1142
|
+
readonly allowAdditionalProperties: {
|
|
1143
|
+
readonly type: "array";
|
|
1144
|
+
readonly items: {
|
|
1145
|
+
readonly type: "string";
|
|
1146
|
+
};
|
|
1147
|
+
};
|
|
897
1148
|
};
|
|
898
1149
|
};
|
|
899
1150
|
readonly allowAdditionalProperties: true;
|
|
@@ -902,10 +1153,12 @@ export declare const Schemas: {
|
|
|
902
1153
|
ImportMap: Schema.Utils.FromObject<{
|
|
903
1154
|
readonly imports: {
|
|
904
1155
|
readonly type: "object";
|
|
1156
|
+
readonly allowAdditionalProperties: true;
|
|
905
1157
|
readonly default: {};
|
|
906
1158
|
};
|
|
907
1159
|
readonly scopes: {
|
|
908
1160
|
readonly type: "object";
|
|
1161
|
+
readonly allowAdditionalProperties: true;
|
|
909
1162
|
readonly default: {};
|
|
910
1163
|
};
|
|
911
1164
|
}, undefined>;
|
|
@@ -915,6 +1168,7 @@ export declare const Schemas: {
|
|
|
915
1168
|
readonly default: 60000;
|
|
916
1169
|
};
|
|
917
1170
|
readonly run: {
|
|
1171
|
+
readonly type: "union";
|
|
918
1172
|
readonly union: [{
|
|
919
1173
|
readonly type: "string";
|
|
920
1174
|
}, {
|
|
@@ -925,6 +1179,7 @@ export declare const Schemas: {
|
|
|
925
1179
|
}];
|
|
926
1180
|
};
|
|
927
1181
|
readonly extract: {
|
|
1182
|
+
readonly type: "union";
|
|
928
1183
|
readonly union: [{
|
|
929
1184
|
readonly type: "string";
|
|
930
1185
|
}, {
|
|
@@ -941,6 +1196,7 @@ export declare const Schemas: {
|
|
|
941
1196
|
readonly required: true;
|
|
942
1197
|
};
|
|
943
1198
|
readonly replacer: {
|
|
1199
|
+
readonly type: "union";
|
|
944
1200
|
readonly union: [{
|
|
945
1201
|
readonly type: "string";
|
|
946
1202
|
}, {
|
|
@@ -970,6 +1226,7 @@ export declare const Schemas: {
|
|
|
970
1226
|
readonly required: true;
|
|
971
1227
|
};
|
|
972
1228
|
readonly target: {
|
|
1229
|
+
readonly type: "union";
|
|
973
1230
|
readonly union: [{
|
|
974
1231
|
readonly type: "string";
|
|
975
1232
|
}, {
|
|
@@ -1014,6 +1271,7 @@ export declare const Schemas: {
|
|
|
1014
1271
|
readonly default: 60000;
|
|
1015
1272
|
};
|
|
1016
1273
|
readonly run: {
|
|
1274
|
+
readonly type: "union";
|
|
1017
1275
|
readonly union: [{
|
|
1018
1276
|
readonly type: "string";
|
|
1019
1277
|
}, {
|
|
@@ -1024,6 +1282,7 @@ export declare const Schemas: {
|
|
|
1024
1282
|
}];
|
|
1025
1283
|
};
|
|
1026
1284
|
readonly extract: {
|
|
1285
|
+
readonly type: "union";
|
|
1027
1286
|
readonly union: [{
|
|
1028
1287
|
readonly type: "string";
|
|
1029
1288
|
}, {
|
|
@@ -1040,6 +1299,7 @@ export declare const Schemas: {
|
|
|
1040
1299
|
readonly required: true;
|
|
1041
1300
|
};
|
|
1042
1301
|
readonly replacer: {
|
|
1302
|
+
readonly type: "union";
|
|
1043
1303
|
readonly union: [{
|
|
1044
1304
|
readonly type: "string";
|
|
1045
1305
|
}, {
|
|
@@ -1078,6 +1338,7 @@ export declare const Schemas: {
|
|
|
1078
1338
|
readonly required: true;
|
|
1079
1339
|
};
|
|
1080
1340
|
readonly target: {
|
|
1341
|
+
readonly type: "union";
|
|
1081
1342
|
readonly union: [{
|
|
1082
1343
|
readonly type: "string";
|
|
1083
1344
|
}, {
|
|
@@ -1122,6 +1383,7 @@ export declare const Schemas: {
|
|
|
1122
1383
|
readonly default: 60000;
|
|
1123
1384
|
};
|
|
1124
1385
|
readonly run: {
|
|
1386
|
+
readonly type: "union";
|
|
1125
1387
|
readonly union: [{
|
|
1126
1388
|
readonly type: "string";
|
|
1127
1389
|
}, {
|
|
@@ -1132,6 +1394,7 @@ export declare const Schemas: {
|
|
|
1132
1394
|
}];
|
|
1133
1395
|
};
|
|
1134
1396
|
readonly extract: {
|
|
1397
|
+
readonly type: "union";
|
|
1135
1398
|
readonly union: [{
|
|
1136
1399
|
readonly type: "string";
|
|
1137
1400
|
}, {
|
|
@@ -1148,6 +1411,7 @@ export declare const Schemas: {
|
|
|
1148
1411
|
readonly required: true;
|
|
1149
1412
|
};
|
|
1150
1413
|
readonly replacer: {
|
|
1414
|
+
readonly type: "union";
|
|
1151
1415
|
readonly union: [{
|
|
1152
1416
|
readonly type: "string";
|
|
1153
1417
|
}, {
|
|
@@ -1186,6 +1450,7 @@ export declare const Schemas: {
|
|
|
1186
1450
|
readonly required: true;
|
|
1187
1451
|
};
|
|
1188
1452
|
readonly target: {
|
|
1453
|
+
readonly type: "union";
|
|
1189
1454
|
readonly union: [{
|
|
1190
1455
|
readonly type: "string";
|
|
1191
1456
|
}, {
|
package/build/config/schemas.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { Schema } from '@netfeez/common';
|
|
2
2
|
export const ImportMap = Schema.fromObject({
|
|
3
|
-
imports: { type: 'object', default: {} },
|
|
4
|
-
scopes: { type: 'object', default: {} }
|
|
3
|
+
imports: { type: 'object', allowAdditionalProperties: true, default: {} },
|
|
4
|
+
scopes: { type: 'object', allowAdditionalProperties: true, default: {} }
|
|
5
5
|
});
|
|
6
6
|
export const TsConfig = Schema.fromObject({
|
|
7
7
|
compilerOptions: { type: 'object', properties: {
|
|
8
8
|
baseUrl: { type: 'string' },
|
|
9
9
|
rootDir: { type: 'string' },
|
|
10
10
|
outDir: { type: 'string' },
|
|
11
|
-
paths: { type: 'object' }
|
|
11
|
+
paths: { type: 'object', allowAdditionalProperties: { type: 'array', items: { type: 'string' } } }
|
|
12
12
|
}, allowAdditionalProperties: true }
|
|
13
13
|
}, true);
|
|
14
14
|
export const ExtractorEntry = Schema.fromObject({
|
|
15
15
|
from: { type: 'string', required: true },
|
|
16
16
|
to: { type: 'string', required: true },
|
|
17
|
-
replacer: { union: [{ type: 'string' }, { type: 'object', properties: {
|
|
17
|
+
replacer: { type: 'union', union: [{ type: 'string' }, { type: 'object', properties: {
|
|
18
18
|
search: { type: 'string', required: true },
|
|
19
19
|
replace: { type: 'string', required: true }
|
|
20
20
|
} }], nullable: true }
|
|
21
21
|
});
|
|
22
22
|
export const BuilderEntry = Schema.fromObject({
|
|
23
23
|
maxTimeMs: { type: 'number', default: 60000 },
|
|
24
|
-
run: { union: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }] },
|
|
25
|
-
extract: { union: [{ type: 'string' }, { type: 'array', items: ExtractorEntry.root }] }
|
|
24
|
+
run: { type: 'union', union: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }] },
|
|
25
|
+
extract: { type: 'union', union: [{ type: 'string' }, { type: 'array', items: ExtractorEntry.root }] }
|
|
26
26
|
});
|
|
27
27
|
export const ResolverEntry = Schema.fromObject({
|
|
28
28
|
alias: { type: 'string', required: true },
|
|
29
|
-
target: { union: [
|
|
29
|
+
target: { type: 'union', union: [
|
|
30
30
|
{ type: 'string' },
|
|
31
31
|
{ type: 'object', properties: {
|
|
32
32
|
local: { type: 'string', required: true },
|
|
@@ -54,6 +54,8 @@ export const Config = Schema.fromObject({
|
|
|
54
54
|
outDir: { type: 'string', default: 'dist' },
|
|
55
55
|
tsconfig: { type: 'string', nullable: true, default: null },
|
|
56
56
|
importmap: { type: 'string', nullable: true, default: null },
|
|
57
|
+
actions: { type: 'object', allowAdditionalProperties: { type: 'array', items: BuilderEntry.root }, default: {} },
|
|
58
|
+
resolver: { type: 'array', default: [], items: ResolverEntry.root },
|
|
57
59
|
dependencies: { type: 'array', default: [], items: GitDependency.root },
|
|
58
60
|
npmDependencies: { type: 'array', default: [], items: NpmDependency.root }
|
|
59
61
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/config/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;
|
|
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,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AE;IAC3C,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,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,yBAAyB,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;IAChH,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,aAAa,CAAC,IAAI,EAAE;IACnE,YAAY,EAAE,EAAG,IAAI,EAAE,OAAO,EAAG,OAAO,EAAE,EAAE,EAAG,KAAK,EAAE,aAAa,CAAC,IAAI,EAAE;IAC1E,eAAe,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,aAAa,CAAC,IAAI,EAAE;CAC7E,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG;IACnB,MAAM;IACN,QAAQ,EAAE,SAAS;IACnB,YAAY,EAAE,aAAa;IAC3B,aAAa,EAAE,aAAa;CAC/B,CAAC;AAYF,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Builder.js","sourceRoot":"","sources":["../../../src/support/Builder/Builder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Builder.js","sourceRoot":"","sources":["../../../src/support/Builder/Builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAI7C,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MA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CAAC,EAAE,SAAS,CAAC,CAAC;IAClB,CAAC;CACJ;AAUD,eAAe,OAAO,CAAC"}
|
package/build/support/Git.js
CHANGED
package/build/support/Git.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Git.js","sourceRoot":"","sources":["../../src/support/Git.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Git.js","sourceRoot":"","sources":["../../src/support/Git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAGlC,MAAM,OAAO,GAAG;IAIE;IACA;IAJJ,MAAM,CAAgB;IACtB,GAAG,CAAS;IACtB,YACc,IAAY,EACZ,IAAY,EACtB,OAAwB;QAFd,SAAI,GAAJ,IAAI,CAAQ;QACZ,SAAI,GAAJ,IAAI,CAAQ;QAGtB,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,IAAI,CAAC;QAC7B,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACpC,CAAC;IACD;;;;;;;;;;;;OAYG;IACI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAY,EAAE,IAAY,EAAE,OAAwB;QAC1E,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC;QACrD,MAAM,QAAQ,GAAG;YACb,aAAa,IAAI,IAAI,IAAI,EAAE;YAC3B,MAAM,IAAI,EAAE;SACf,CAAC;QACF,IAAI,GAAG;YAAE,QAAQ,CAAC,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,CAAC;QAC9C,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,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,OAAO,CAAC,CAAC;;oBAClC,IAAI,CAAC,IAAI,KAAK,CAAC,yBAAyB,OAAO,CAAC,KAAK,4BAA4B,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;YACxH,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACzB,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAUD,eAAe,GAAG,CAAC"}
|
|
@@ -10,8 +10,17 @@ export declare class AliasCompiler {
|
|
|
10
10
|
* @returns An array of compiled alias objects ready for use in path resolution.
|
|
11
11
|
*/
|
|
12
12
|
compile(config: Schemas.Config['infer']): AliasCompiler.CompiledAlias[];
|
|
13
|
+
/**
|
|
14
|
+
* Resolves an array of resolver entries into compiled alias objects, handling both string and object target formats.
|
|
15
|
+
* It determines if each alias is a wildcard and resolves local paths to absolute paths based on the project root.
|
|
16
|
+
* The method also extracts type and CDN targets if provided in the resolver entry.
|
|
17
|
+
* @param resolver An array of resolver entries to process into compiled aliases.
|
|
18
|
+
* @returns An array of compiled alias objects derived from the resolver entries.
|
|
19
|
+
*/
|
|
20
|
+
protected resolve(resolver: AliasCompiler.Resolver[]): AliasCompiler.CompiledAlias[];
|
|
13
21
|
}
|
|
14
22
|
export declare namespace AliasCompiler {
|
|
23
|
+
type Resolver = Schemas.ResolverEntry['infer'];
|
|
15
24
|
interface Target {
|
|
16
25
|
local: string;
|
|
17
26
|
type?: string;
|
|
@@ -14,29 +14,46 @@ export class AliasCompiler {
|
|
|
14
14
|
*/
|
|
15
15
|
compile(config) {
|
|
16
16
|
const result = [];
|
|
17
|
-
const allDeps = [
|
|
17
|
+
const allDeps = [
|
|
18
|
+
...(config.dependencies || []),
|
|
19
|
+
...(config.npmDependencies || [])
|
|
20
|
+
];
|
|
21
|
+
const baseResolvers = config.resolver || [];
|
|
18
22
|
for (const dep of allDeps) {
|
|
19
23
|
if (typeof dep !== 'object' || !dep.resolver)
|
|
20
24
|
continue;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
result.push(...this.resolve(dep.resolver));
|
|
26
|
+
}
|
|
27
|
+
result.push(...this.resolve(baseResolvers));
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Resolves an array of resolver entries into compiled alias objects, handling both string and object target formats.
|
|
32
|
+
* It determines if each alias is a wildcard and resolves local paths to absolute paths based on the project root.
|
|
33
|
+
* The method also extracts type and CDN targets if provided in the resolver entry.
|
|
34
|
+
* @param resolver An array of resolver entries to process into compiled aliases.
|
|
35
|
+
* @returns An array of compiled alias objects derived from the resolver entries.
|
|
36
|
+
*/
|
|
37
|
+
resolve(resolver) {
|
|
38
|
+
const result = [];
|
|
39
|
+
for (const entry of resolver) {
|
|
40
|
+
const isWildcard = Utils.isWildcard(entry.alias);
|
|
41
|
+
const alias = Utils.removeWildcardSuffix(entry.alias);
|
|
42
|
+
const rawLocal = typeof entry.target === 'string' ? entry.target : entry.target.local;
|
|
43
|
+
const localTarget = path.isAbsolute(rawLocal)
|
|
44
|
+
? Utils.removeWildcardSuffix(rawLocal)
|
|
45
|
+
: path.resolve(this.projectRoot, Utils.removeWildcardSuffix(rawLocal));
|
|
46
|
+
let cdnTarget;
|
|
47
|
+
let typeTarget;
|
|
48
|
+
if (typeof entry.target === 'object') {
|
|
49
|
+
if (entry.target.type) {
|
|
50
|
+
typeTarget = Utils.removeWildcardSuffix(entry.target.type);
|
|
51
|
+
}
|
|
52
|
+
if (entry.target.cdn) {
|
|
53
|
+
cdnTarget = Utils.removeWildcardSuffix(entry.target.cdn);
|
|
37
54
|
}
|
|
38
|
-
result.push({ alias, isWildcard, targets: { local: localTarget, type: typeTarget, cdn: cdnTarget } });
|
|
39
55
|
}
|
|
56
|
+
result.push({ alias, isWildcard, targets: { local: localTarget, type: typeTarget, cdn: cdnTarget } });
|
|
40
57
|
}
|
|
41
58
|
return result;
|
|
42
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AliasCompiler.js","sourceRoot":"","sources":["../../../src/support/PathResolver/AliasCompiler.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,MAAM,OAAO,aAAa;IACF;IAApB,YAAoB,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;IAAG,CAAC;IAC3C;;;;;;OAMG;IACI,OAAO,CAAC,MAA+B;QAC1C,MAAM,MAAM,GAAkC,EAAE,CAAC;QACjD,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"AliasCompiler.js","sourceRoot":"","sources":["../../../src/support/PathResolver/AliasCompiler.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,MAAM,OAAO,aAAa;IACF;IAApB,YAAoB,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;IAAG,CAAC;IAC3C;;;;;;OAMG;IACI,OAAO,CAAC,MAA+B;QAC1C,MAAM,MAAM,GAAkC,EAAE,CAAC;QACjD,MAAM,OAAO,GAAG;YACZ,GAAG,CAAC,MAAM,CAAC,YAAY,IAAI,EAAE,CAAC;YAC9B,GAAG,CAAC,MAAM,CAAC,eAAe,IAAI,EAAE,CAAC;SACpC,CAAC;QACF,MAAM,aAAa,GAAG,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC;QAC5C,KAAK,MAAM,GAAG,IAAI,OAAO,EA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AM,CAAC,IAAI,CAAC,CAAC;gBAC/D,CAAC;gBACD,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;oBACnB,SAAS,GAAG,KAAK,CAAC,oBAAoB,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBAC7D,CAAC;YACL,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;QAC1G,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AAcD,eAAe,aAAa,CAAC"}
|
|
@@ -9,7 +9,7 @@ export declare class PathResolver {
|
|
|
9
9
|
static readonly EXTENSIONS: string[];
|
|
10
10
|
protected readonly logger: Logger;
|
|
11
11
|
protected readonly rewriter: PathRewriter;
|
|
12
|
-
protected readonly
|
|
12
|
+
protected readonly outDir: string;
|
|
13
13
|
readonly aliases: AliasCompiler.CompiledAlias[];
|
|
14
14
|
constructor(config: Schemas.Config['infer'], options?: PathResolver.Options);
|
|
15
15
|
/**
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* @description Utility for path resolution with Local/CDN support and dual path fixing.
|
|
4
4
|
* @license Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import PATH from "node:path";
|
|
7
6
|
import FS, { promises as FSP } from 'node:fs';
|
|
8
|
-
import { File } from '@netfeez/common-node';
|
|
7
|
+
import { File, Path } from '@netfeez/common-node';
|
|
9
8
|
import { Logger } from "@netfeez/vterm";
|
|
10
9
|
import Utils from '../Utils.js';
|
|
11
10
|
import PathRewriter from './PathRewriter.js';
|
|
12
11
|
import AliasCompiler from './AliasCompiler.js';
|
|
12
|
+
import Async from "@netfeez/common-node/Async";
|
|
13
13
|
export class PathResolver {
|
|
14
14
|
config;
|
|
15
15
|
options;
|
|
@@ -17,15 +17,15 @@ export class PathResolver {
|
|
|
17
17
|
static EXTENSIONS = ['.js', '.ts', '.jsx', '.tsx'];
|
|
18
18
|
logger;
|
|
19
19
|
rewriter;
|
|
20
|
-
|
|
20
|
+
outDir;
|
|
21
21
|
aliases;
|
|
22
22
|
constructor(config, options = {}) {
|
|
23
23
|
this.config = config;
|
|
24
24
|
this.options = options;
|
|
25
25
|
this.logger = options.logger || new Logger({ name: 'PATH-RW' });
|
|
26
|
-
const outDir = config.outDir || '
|
|
27
|
-
this.
|
|
28
|
-
?
|
|
26
|
+
const outDir = config.outDir || 'build';
|
|
27
|
+
this.outDir = !Path.isAbsolute(outDir)
|
|
28
|
+
? Path.resolve(PathResolver.PROJECT_ROOT, outDir)
|
|
29
29
|
: outDir;
|
|
30
30
|
this.aliases = new AliasCompiler(PathResolver.PROJECT_ROOT).compile(config);
|
|
31
31
|
this.rewriter = new PathRewriter(this.aliases, PathResolver.PROJECT_ROOT);
|
|
@@ -36,20 +36,21 @@ export class PathResolver {
|
|
|
36
36
|
* @param mode The resolution mode ('local' or 'cdn') to determine which target paths to use.
|
|
37
37
|
*/
|
|
38
38
|
async rewritePaths(mode) {
|
|
39
|
-
this.logger.log(`&C2Starting path resolver in &C3${mode} &C2mode...`);
|
|
40
|
-
if (!await File.exists(this.
|
|
41
|
-
return void this.logger.warn(`Directory &C4${this.
|
|
42
|
-
|
|
43
|
-
const files =
|
|
44
|
-
files.push(...await File.find('**/*.js'));
|
|
45
|
-
files.push(...await File.find('**/*.ts'));
|
|
46
|
-
files.push(...await File.find('**/*.jsx'));
|
|
47
|
-
files.push(...await File.find('**/*.tsx'));
|
|
39
|
+
this.logger.log(`&C2Starting path resolver in &C3${mode} &C2mode for ${this.outDir}...`);
|
|
40
|
+
if (!await File.exists(this.outDir))
|
|
41
|
+
return void this.logger.warn(`Directory &C4${this.outDir}&R not found.`);
|
|
42
|
+
const filter = '**/*.{js,ts,jsx,tsx,{c,m}js}';
|
|
43
|
+
const files = await File.find(filter, this.outDir);
|
|
48
44
|
let rewrittenCount = 0;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
const limiter = Async.currencyLimiter(16);
|
|
46
|
+
const promises = files.map((file) => {
|
|
47
|
+
file = Path.join(this.outDir, file);
|
|
48
|
+
return limiter(() => this.processFile(file, mode).then(changed => {
|
|
49
|
+
if (changed)
|
|
50
|
+
rewrittenCount++;
|
|
51
|
+
}));
|
|
52
|
+
});
|
|
53
|
+
await Promise.all(promises);
|
|
53
54
|
this.logger.log(`&C2Path aliases resolved in &C3${rewrittenCount} &C2files.`);
|
|
54
55
|
}
|
|
55
56
|
/**
|
|
@@ -83,19 +84,19 @@ export class PathResolver {
|
|
|
83
84
|
*/
|
|
84
85
|
async watch(mode) {
|
|
85
86
|
await this.rewritePaths(mode);
|
|
86
|
-
this.logger.log(`&C2Watching for changes in &C4${this.
|
|
87
|
+
this.logger.log(`&C2Watching for changes in &C4${this.outDir}...`);
|
|
87
88
|
const debouncedProcessor = Utils.debounce(async (fullPath, filename) => {
|
|
88
89
|
if (await this.processFile(fullPath, mode)) {
|
|
89
90
|
this.logger.log(`&C2File &C4${filename}&C2 updated.`);
|
|
90
91
|
}
|
|
91
92
|
}, 300);
|
|
92
|
-
FS.watch(this.
|
|
93
|
+
FS.watch(this.outDir, { recursive: true }, (eventType, filename) => {
|
|
93
94
|
if (!filename)
|
|
94
95
|
return;
|
|
95
96
|
const isTargetExtension = PathResolver.EXTENSIONS.some(ext => filename.endsWith(ext));
|
|
96
97
|
if (!isTargetExtension)
|
|
97
98
|
return;
|
|
98
|
-
const fullPath =
|
|
99
|
+
const fullPath = Path.join(this.outDir, filename);
|
|
99
100
|
debouncedProcessor(fullPath, filename);
|
|
100
101
|
});
|
|
101
102
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PathResolver.js","sourceRoot":"","sources":["../../../src/support/PathResolver/PathResolver.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OA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E,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE;YAC/D,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAEtB,MAAM,iBAAiB,GAAG,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;YACtF,IAAI,CAAC,iBAAiB;gBAAE,OAAO;YAE/B,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAClD,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACP,CAAC;;AAQL,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Task.js","sourceRoot":"","sources":["../../../src/support/Task/Task.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Task.js","sourceRoot":"","sources":["../../../src/support/Task/Task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,MAAM,OAAO,IAAK,SAAQ,MAAqB;IAcpB;IACA;IAdb,QAAQ,GAAyB,EAAE,CAAC;IAEpC,MAAM,GAAW,CAAC,CAAC;IACnB,UAAU,GAAW,CAAC,CAAC;IACvB,YAAY,GAAW,CAAC,CAAC;IACzB,UAAU,GAAW,CAAC,CAAC;IAEvB,WAAW,GAAY,KAAK,CAAC;IAC7B,UAAU,GAAY,KAAK,CAAC;IAE5B,eAAe,GAAmC,IAAI,CAAC;IAEjE,YACuB,GAAW,EACX,QAAkB;QACrC,KAAK,EAAE,CAAC;QAFW,QAAG,GAAH,GAAG,CAAQ;QACX,aAAQ,GAAR,QAAQ,CAAU;IAC5B,CAAC;IAEd,IAAW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E,GAAG,CAAC,CAAC,CAAC;gBAEnD,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;oBAChC,IAAI,MAAM,KAAK,CAAC;wBAAE,IAAI,CAAC,GAAG,CAAC,CAAC;;wBACvB,IAAI,CAAC,IAAI,KAAK,CAAC,8BAA8B,MAAM,EAAE,CAAC,CAAC,CAAC;gBACjE,CAAC,CAAC,CAAC;gBACH,OAAO,CAAC,IAAI,EAAE,CAAC;gBACf,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAClC,CAAC,CAAC,CAAC;YAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE,CAAC;QACnE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,MAAM,QAAQ,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACxE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE,CAAC;QAC9E,CAAC;IACL,CAAC;CACJ;AAwBD,eAAe,IAAI,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "depflow",
|
|
3
3
|
"description": "is a simple dependency manager based on github repositories",
|
|
4
|
-
"version": "3.0.0-dev.
|
|
4
|
+
"version": "3.0.0-dev.4",
|
|
5
5
|
"main": "build/bin/bin.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -9,13 +9,12 @@
|
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"dev": "npx tsc --watch",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
12
|
+
"build": "bash ./scripts/build.sh",
|
|
13
|
+
"prepublishOnly": "npm run build"
|
|
14
14
|
},
|
|
15
15
|
"license": "Apache-2.0",
|
|
16
16
|
"repository": {
|
|
17
|
-
"
|
|
18
|
-
"url": "https://github.com/NetFeez/DependencyManager.git"
|
|
17
|
+
"url": "git+https://github.com/NetFeez/depflow.git"
|
|
19
18
|
},
|
|
20
19
|
"author": {
|
|
21
20
|
"name": "NetFeez",
|
|
@@ -33,8 +32,8 @@
|
|
|
33
32
|
"README.md"
|
|
34
33
|
],
|
|
35
34
|
"dependencies": {
|
|
36
|
-
"@netfeez/common": "^3.
|
|
37
|
-
"@netfeez/common-node": "^3.
|
|
35
|
+
"@netfeez/common": "^3.2.1",
|
|
36
|
+
"@netfeez/common-node": "^3.1.1",
|
|
38
37
|
"@netfeez/vterm": "^1.1.0"
|
|
39
38
|
},
|
|
40
39
|
"devDependencies": {
|
package/build/support/Async.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
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;
|
package/build/support/Async.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
export class Async {
|
|
2
|
-
static async delay(ms) {
|
|
3
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Asynchronously waits for a specific event to occur by executing the provided executor function.
|
|
7
|
-
* The executor function is expected to call a done callback when the event occurs, passing any relevant result.
|
|
8
|
-
* The method also supports an optional timeout parameter, which will reject the promise if the event does not occur within the specified time frame.
|
|
9
|
-
*
|
|
10
|
-
* @param executor - A function that executes the logic to wait for the event and calls the done callback when the event occurs.
|
|
11
|
-
* @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).
|
|
12
|
-
* @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.
|
|
13
|
-
*/
|
|
14
|
-
static async awaitEvent(executor, timeout = -1) {
|
|
15
|
-
return new Promise((resolve, reject) => {
|
|
16
|
-
let timer = null;
|
|
17
|
-
let isSettled = false;
|
|
18
|
-
let cleanupHandler;
|
|
19
|
-
const cleanup = () => {
|
|
20
|
-
isSettled = true;
|
|
21
|
-
if (!timer)
|
|
22
|
-
return;
|
|
23
|
-
clearTimeout(timer);
|
|
24
|
-
timer = null;
|
|
25
|
-
if (typeof cleanupHandler === 'function') {
|
|
26
|
-
cleanupHandler();
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
const safeResolve = (result) => {
|
|
30
|
-
if (isSettled)
|
|
31
|
-
return;
|
|
32
|
-
cleanup();
|
|
33
|
-
resolve(result);
|
|
34
|
-
};
|
|
35
|
-
const safeReject = (err) => {
|
|
36
|
-
if (isSettled)
|
|
37
|
-
return;
|
|
38
|
-
cleanup();
|
|
39
|
-
reject(err instanceof Error ? err : new Error(String(err)));
|
|
40
|
-
};
|
|
41
|
-
if (timeout > 0) {
|
|
42
|
-
timer = setTimeout(() => {
|
|
43
|
-
safeReject(new Error(`Async event timed out after ${timeout}ms`));
|
|
44
|
-
}, timeout);
|
|
45
|
-
}
|
|
46
|
-
try {
|
|
47
|
-
const result = executor(safeResolve, safeReject);
|
|
48
|
-
if (result instanceof Promise) {
|
|
49
|
-
result.then(h => { cleanupHandler = h; }).catch(safeReject);
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
cleanupHandler = result;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
catch (error) {
|
|
56
|
-
safeReject(error);
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
export default Async;
|
|
62
|
-
//# sourceMappingURL=Async.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Async.js","sourceRoot":"","sources":["../../src/support/Async.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,KAAK;IACP,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAU;QAChC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,KAAK,CAAC,UAAU,CAC1B,QAAkC,EAClC,UAAkB,CAAC,CAAC;QAEpB,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACtC,IAAI,KAAK,GAA0B,IAAI,CAAC;YACxC,IAAI,SAAS,GAAG,KAAK,CAAC;YACtB,IAAI,cAA6C,CAAC;YAElD,MAAM,OAAO,GAAG,GAAG,EAAE;gBACjB,SAAS,GAAG,IAAI,CAAC;gBACjB,IAAI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