@h3ravel/shared 0.30.2 → 1.29.0-alpha.11
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/dist/index.cjs +75 -72
- package/dist/index.d.ts +5 -7
- package/dist/index.js +51 -44
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -6,16 +7,12 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
6
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
9
|
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
+
get: ((k) => from[k]).bind(null, key),
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
19
16
|
}
|
|
20
17
|
return to;
|
|
21
18
|
};
|
|
@@ -23,26 +20,24 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
20
|
value: mod,
|
|
24
21
|
enumerable: true
|
|
25
22
|
}) : target, mod));
|
|
26
|
-
|
|
27
23
|
//#endregion
|
|
28
24
|
let chalk = require("chalk");
|
|
29
|
-
chalk = __toESM(chalk);
|
|
25
|
+
chalk = __toESM(chalk, 1);
|
|
30
26
|
let fs_promises = require("fs/promises");
|
|
31
27
|
let escalade_sync = require("escalade/sync");
|
|
32
|
-
escalade_sync = __toESM(escalade_sync);
|
|
28
|
+
escalade_sync = __toESM(escalade_sync, 1);
|
|
33
29
|
let fs = require("fs");
|
|
34
30
|
let path = require("path");
|
|
35
|
-
path = __toESM(path);
|
|
31
|
+
path = __toESM(path, 1);
|
|
36
32
|
let inquirer_autocomplete_standalone = require("inquirer-autocomplete-standalone");
|
|
37
|
-
inquirer_autocomplete_standalone = __toESM(inquirer_autocomplete_standalone);
|
|
38
|
-
let
|
|
33
|
+
inquirer_autocomplete_standalone = __toESM(inquirer_autocomplete_standalone, 1);
|
|
34
|
+
let _inquirer_prompts = require("@inquirer/prompts");
|
|
39
35
|
let ora = require("ora");
|
|
40
|
-
ora = __toESM(ora);
|
|
36
|
+
ora = __toESM(ora, 1);
|
|
41
37
|
let crypto = require("crypto");
|
|
42
|
-
crypto = __toESM(crypto);
|
|
38
|
+
crypto = __toESM(crypto, 1);
|
|
43
39
|
let preferred_pm = require("preferred-pm");
|
|
44
|
-
preferred_pm = __toESM(preferred_pm);
|
|
45
|
-
|
|
40
|
+
preferred_pm = __toESM(preferred_pm, 1);
|
|
46
41
|
//#region src/Container.ts
|
|
47
42
|
const INTERNAL_METHODS = Symbol("internal_methods");
|
|
48
43
|
/**
|
|
@@ -65,7 +60,6 @@ const internal = (target, propertyKey) => {
|
|
|
65
60
|
const isInternal = (instance, prop) => {
|
|
66
61
|
return Object.getPrototypeOf(instance)[INTERNAL_METHODS]?.has(prop) ?? false;
|
|
67
62
|
};
|
|
68
|
-
|
|
69
63
|
//#endregion
|
|
70
64
|
//#region src/Mixins/MixinSystem.ts
|
|
71
65
|
/**
|
|
@@ -112,7 +106,6 @@ const mix = (...bases) => {
|
|
|
112
106
|
Object.setPrototypeOf(Base, bases[0]);
|
|
113
107
|
return Base;
|
|
114
108
|
};
|
|
115
|
-
|
|
116
109
|
//#endregion
|
|
117
110
|
//#region src/Mixins/TraitSystem.ts
|
|
118
111
|
const crcTable = [];
|
|
@@ -145,14 +138,14 @@ const extendProperties = (cons, field, value) => Object.defineProperty(cons, fie
|
|
|
145
138
|
});
|
|
146
139
|
const rawTrait = (x) => isTypeFactory(x) ? x() : x;
|
|
147
140
|
const deriveTrait = (trait$, baseClz, derived) => {
|
|
148
|
-
const trait
|
|
141
|
+
const trait = rawTrait(trait$);
|
|
149
142
|
let clz = baseClz;
|
|
150
|
-
if (!derived.has(trait
|
|
151
|
-
derived.set(trait
|
|
152
|
-
if (trait
|
|
153
|
-
clz = trait
|
|
154
|
-
extendProperties(clz, "id", crc32(trait
|
|
155
|
-
extendProperties(clz, trait
|
|
143
|
+
if (!derived.has(trait.id)) {
|
|
144
|
+
derived.set(trait.id, true);
|
|
145
|
+
if (trait.superTraits !== void 0) for (const superTrait of reverseTraitList(trait.superTraits)) clz = deriveTrait(superTrait, clz, derived);
|
|
146
|
+
clz = trait.factory(clz);
|
|
147
|
+
extendProperties(clz, "id", crc32(trait.factory.toString()));
|
|
148
|
+
extendProperties(clz, trait.symbol, true);
|
|
156
149
|
}
|
|
157
150
|
return clz;
|
|
158
151
|
};
|
|
@@ -170,14 +163,14 @@ function use(...traits) {
|
|
|
170
163
|
lot = traits;
|
|
171
164
|
}
|
|
172
165
|
const derived = /* @__PURE__ */ new Map();
|
|
173
|
-
for (const trait
|
|
166
|
+
for (const trait of reverseTraitList(lot)) clz = deriveTrait(trait, clz, derived);
|
|
174
167
|
return clz;
|
|
175
168
|
}
|
|
176
|
-
function uses(instance, trait
|
|
169
|
+
function uses(instance, trait) {
|
|
177
170
|
if (typeof instance !== "object" || instance === null) return false;
|
|
178
171
|
let obj = instance;
|
|
179
|
-
if (isCons(trait
|
|
180
|
-
const idTrait = (isTypeFactory(trait
|
|
172
|
+
if (isCons(trait) && !isTypeFactory(trait)) return instance instanceof trait;
|
|
173
|
+
const idTrait = (isTypeFactory(trait) ? trait() : trait)["id"];
|
|
181
174
|
while (obj) {
|
|
182
175
|
if (Object.hasOwn(obj, "constructor")) {
|
|
183
176
|
if ((obj.constructor["id"] ?? 0) === idTrait) return true;
|
|
@@ -186,7 +179,6 @@ function uses(instance, trait$1) {
|
|
|
186
179
|
}
|
|
187
180
|
return false;
|
|
188
181
|
}
|
|
189
|
-
|
|
190
182
|
//#endregion
|
|
191
183
|
//#region src/Mixins/UseFinalizable.ts
|
|
192
184
|
/**
|
|
@@ -201,7 +193,7 @@ const registry = new FinalizationRegistry((fn) => {
|
|
|
201
193
|
/**
|
|
202
194
|
* the API trait "Finalizable<T>"
|
|
203
195
|
*/
|
|
204
|
-
const Finalizable = trait((base) => class Finalizable
|
|
196
|
+
const Finalizable = trait((base) => class Finalizable extends base {
|
|
205
197
|
constructor(...args) {
|
|
206
198
|
super(...args);
|
|
207
199
|
const fn1 = this.$finalize;
|
|
@@ -213,7 +205,6 @@ const Finalizable = trait((base) => class Finalizable$1 extends base {
|
|
|
213
205
|
registry.register(this, fn2, this);
|
|
214
206
|
}
|
|
215
207
|
});
|
|
216
|
-
|
|
217
208
|
//#endregion
|
|
218
209
|
//#region src/Mixins/UseMagic.ts
|
|
219
210
|
/**
|
|
@@ -235,6 +226,9 @@ const Finalizable = trait((base) => class Finalizable$1 extends base {
|
|
|
235
226
|
*/
|
|
236
227
|
function makeMagic(target) {
|
|
237
228
|
return new Proxy(target, {
|
|
229
|
+
/**
|
|
230
|
+
* Intercepts property access and missing method calls.
|
|
231
|
+
*/
|
|
238
232
|
get(obj, prop, receiver) {
|
|
239
233
|
if (typeof prop === "string") {
|
|
240
234
|
if (prop in obj) return Reflect.get(obj, prop, receiver);
|
|
@@ -242,6 +236,9 @@ function makeMagic(target) {
|
|
|
242
236
|
if (obj.__get) return obj.__get(prop);
|
|
243
237
|
}
|
|
244
238
|
},
|
|
239
|
+
/**
|
|
240
|
+
* Intercepts property assignment.
|
|
241
|
+
*/
|
|
245
242
|
set(obj, prop, value) {
|
|
246
243
|
if (typeof prop === "string" && obj.__set) {
|
|
247
244
|
obj.__set(prop, value);
|
|
@@ -249,10 +246,16 @@ function makeMagic(target) {
|
|
|
249
246
|
}
|
|
250
247
|
return Reflect.set(obj, prop, value);
|
|
251
248
|
},
|
|
249
|
+
/**
|
|
250
|
+
* Intercepts `in` operator and existence checks.
|
|
251
|
+
*/
|
|
252
252
|
has(obj, prop) {
|
|
253
253
|
if (typeof prop === "string" && obj.__isset) return obj.__isset(prop);
|
|
254
254
|
return Reflect.has(obj, prop);
|
|
255
255
|
},
|
|
256
|
+
/**
|
|
257
|
+
* Intercepts `delete obj.prop`.
|
|
258
|
+
*/
|
|
256
259
|
deleteProperty(obj, prop) {
|
|
257
260
|
if (typeof prop === "string" && obj.__unset) {
|
|
258
261
|
obj.__unset(prop);
|
|
@@ -277,6 +280,9 @@ function makeMagic(target) {
|
|
|
277
280
|
*/
|
|
278
281
|
function makeStaticMagic(cls) {
|
|
279
282
|
return new Proxy(cls, {
|
|
283
|
+
/**
|
|
284
|
+
* Intercepts static property access and missing static calls.
|
|
285
|
+
*/
|
|
280
286
|
get(target, prop) {
|
|
281
287
|
if (typeof prop === "string") {
|
|
282
288
|
if (prop in target) return target[prop];
|
|
@@ -284,6 +290,9 @@ function makeStaticMagic(cls) {
|
|
|
284
290
|
if (target.__get) return target.__get(prop);
|
|
285
291
|
}
|
|
286
292
|
},
|
|
293
|
+
/**
|
|
294
|
+
* Intercepts static property assignment.
|
|
295
|
+
*/
|
|
287
296
|
set(target, prop, value) {
|
|
288
297
|
if (typeof prop === "string" && target.__set) {
|
|
289
298
|
target.__set(prop, value);
|
|
@@ -291,10 +300,16 @@ function makeStaticMagic(cls) {
|
|
|
291
300
|
}
|
|
292
301
|
return Reflect.set(target, prop, value);
|
|
293
302
|
},
|
|
303
|
+
/**
|
|
304
|
+
* Intercepts `prop in Class`.
|
|
305
|
+
*/
|
|
294
306
|
has(target, prop) {
|
|
295
307
|
if (typeof prop === "string" && target.__isset) return target.__isset(prop);
|
|
296
308
|
return Reflect.has(target, prop);
|
|
297
309
|
},
|
|
310
|
+
/**
|
|
311
|
+
* Intercepts `delete Class.prop`.
|
|
312
|
+
*/
|
|
298
313
|
deleteProperty(target, prop) {
|
|
299
314
|
if (typeof prop === "string" && target.__unset) {
|
|
300
315
|
target.__unset(prop);
|
|
@@ -322,14 +337,13 @@ var Magic = class {
|
|
|
322
337
|
}
|
|
323
338
|
};
|
|
324
339
|
const UseMagic = trait((Base) => {
|
|
325
|
-
return class Magic
|
|
340
|
+
return class Magic extends Base {
|
|
326
341
|
constructor(...args) {
|
|
327
342
|
super(...args);
|
|
328
343
|
return makeMagic(this);
|
|
329
344
|
}
|
|
330
345
|
};
|
|
331
346
|
});
|
|
332
|
-
|
|
333
347
|
//#endregion
|
|
334
348
|
//#region src/Utils/Logger.ts
|
|
335
349
|
var Logger = class Logger {
|
|
@@ -489,10 +503,10 @@ var Logger = class Logger {
|
|
|
489
503
|
process.exit(0);
|
|
490
504
|
}
|
|
491
505
|
static chalker(styles) {
|
|
492
|
-
return (input
|
|
506
|
+
return (input) => styles.reduce((acc, style) => {
|
|
493
507
|
if (style in chalk.default) return (typeof style === "function" ? style : chalk.default[style])(acc);
|
|
494
508
|
return acc;
|
|
495
|
-
}, input
|
|
509
|
+
}, input);
|
|
496
510
|
}
|
|
497
511
|
static parse(config, joiner = " ", log = true, sc) {
|
|
498
512
|
const string = config.map(([str, opt]) => {
|
|
@@ -526,7 +540,6 @@ var Logger = class Logger {
|
|
|
526
540
|
return Console;
|
|
527
541
|
}
|
|
528
542
|
};
|
|
529
|
-
|
|
530
543
|
//#endregion
|
|
531
544
|
//#region src/Utils/Console.ts
|
|
532
545
|
var Console = class {
|
|
@@ -536,7 +549,6 @@ var Console = class {
|
|
|
536
549
|
static info = (...args) => args.map((e) => Logger.info(e, false, true));
|
|
537
550
|
static error = (...args) => args.map((e) => Logger.error(e, false), true);
|
|
538
551
|
};
|
|
539
|
-
|
|
540
552
|
//#endregion
|
|
541
553
|
//#region src/Utils/EnvParser.ts
|
|
542
554
|
var EnvParser = class {
|
|
@@ -573,7 +585,6 @@ var EnvParser = class {
|
|
|
573
585
|
return value;
|
|
574
586
|
}
|
|
575
587
|
};
|
|
576
|
-
|
|
577
588
|
//#endregion
|
|
578
589
|
//#region src/Utils/FileSystem.ts
|
|
579
590
|
var FileSystem = class {
|
|
@@ -593,9 +604,9 @@ var FileSystem = class {
|
|
|
593
604
|
* @param path
|
|
594
605
|
* @returns
|
|
595
606
|
*/
|
|
596
|
-
static async fileExists(path$
|
|
607
|
+
static async fileExists(path$5) {
|
|
597
608
|
try {
|
|
598
|
-
await (0, fs_promises.access)(path$
|
|
609
|
+
await (0, fs_promises.access)(path$5);
|
|
599
610
|
return true;
|
|
600
611
|
} catch {
|
|
601
612
|
return false;
|
|
@@ -630,14 +641,13 @@ var FileSystem = class {
|
|
|
630
641
|
*/
|
|
631
642
|
static resolveModulePath(moduleId, pathName, cwd) {
|
|
632
643
|
pathName = Array.isArray(pathName) ? pathName : [pathName];
|
|
633
|
-
const module
|
|
644
|
+
const module = this.findModulePkg(moduleId, cwd) ?? "";
|
|
634
645
|
for (const name of pathName) {
|
|
635
|
-
const file = path.default.join(module
|
|
646
|
+
const file = path.default.join(module, name);
|
|
636
647
|
if ((0, fs.existsSync)(file)) return file;
|
|
637
648
|
}
|
|
638
649
|
}
|
|
639
650
|
};
|
|
640
|
-
|
|
641
651
|
//#endregion
|
|
642
652
|
//#region src/Utils/PathLoader.ts
|
|
643
653
|
var PathLoader = class {
|
|
@@ -677,17 +687,16 @@ var PathLoader = class {
|
|
|
677
687
|
* @param path - The new path
|
|
678
688
|
* @param base - The base path to include to the path
|
|
679
689
|
*/
|
|
680
|
-
setPath(name, path$
|
|
681
|
-
if (base && name !== "base") this.paths[name] = path.default.join(base, path$
|
|
682
|
-
this.paths[name] = path$
|
|
690
|
+
setPath(name, path$3, base) {
|
|
691
|
+
if (base && name !== "base") this.paths[name] = path.default.join(base, path$3);
|
|
692
|
+
this.paths[name] = path$3;
|
|
683
693
|
}
|
|
684
|
-
distPath(path$
|
|
685
|
-
path$
|
|
686
|
-
if (!skipExt) path$
|
|
687
|
-
return path.default.normalize(path$
|
|
694
|
+
distPath(path$4, skipExt = false) {
|
|
695
|
+
path$4 = path$4.replace("/src/", `/${process.env.DIST_DIR ?? ".h3ravel/serve"}/`.replace(/([^:]\/)\/+/g, "$1"));
|
|
696
|
+
if (!skipExt) path$4 = path$4.replace(/\.(ts|tsx|mts|cts)$/, ".js");
|
|
697
|
+
return path.default.normalize(path$4);
|
|
688
698
|
}
|
|
689
699
|
};
|
|
690
|
-
|
|
691
700
|
//#endregion
|
|
692
701
|
//#region src/Utils/Prompts.ts
|
|
693
702
|
var Prompts = class extends Logger {
|
|
@@ -701,7 +710,7 @@ var Prompts = class extends Logger {
|
|
|
701
710
|
* @returns
|
|
702
711
|
*/
|
|
703
712
|
static async choice(message, choices, defaultIndex, pageSize) {
|
|
704
|
-
return (0,
|
|
713
|
+
return (0, _inquirer_prompts.select)({
|
|
705
714
|
message,
|
|
706
715
|
choices,
|
|
707
716
|
default: defaultIndex ? choices.at(defaultIndex) : void 0,
|
|
@@ -717,7 +726,7 @@ var Prompts = class extends Logger {
|
|
|
717
726
|
* @param defaultValue The default value
|
|
718
727
|
*/
|
|
719
728
|
static async confirm(message, defaultValue) {
|
|
720
|
-
return (0,
|
|
729
|
+
return (0, _inquirer_prompts.confirm)({
|
|
721
730
|
message,
|
|
722
731
|
default: defaultValue
|
|
723
732
|
});
|
|
@@ -731,7 +740,7 @@ var Prompts = class extends Logger {
|
|
|
731
740
|
* @returns
|
|
732
741
|
*/
|
|
733
742
|
static async ask(message, defaultValue) {
|
|
734
|
-
return (0,
|
|
743
|
+
return (0, _inquirer_prompts.input)({
|
|
735
744
|
message,
|
|
736
745
|
default: defaultValue
|
|
737
746
|
});
|
|
@@ -746,7 +755,7 @@ var Prompts = class extends Logger {
|
|
|
746
755
|
* @returns
|
|
747
756
|
*/
|
|
748
757
|
static async secret(message, mask) {
|
|
749
|
-
return (0,
|
|
758
|
+
return (0, _inquirer_prompts.password)({
|
|
750
759
|
message,
|
|
751
760
|
mask
|
|
752
761
|
});
|
|
@@ -794,7 +803,7 @@ var Prompts = class extends Logger {
|
|
|
794
803
|
* @returns
|
|
795
804
|
*/
|
|
796
805
|
static async checkbox(message, choices, required, prefix, pageSize) {
|
|
797
|
-
return await (0,
|
|
806
|
+
return await (0, _inquirer_prompts.checkbox)({
|
|
798
807
|
message,
|
|
799
808
|
choices,
|
|
800
809
|
required,
|
|
@@ -812,7 +821,7 @@ var Prompts = class extends Logger {
|
|
|
812
821
|
* @returns
|
|
813
822
|
*/
|
|
814
823
|
static async editor(message, postfix, defaultValue, validate) {
|
|
815
|
-
return await (0,
|
|
824
|
+
return await (0, _inquirer_prompts.editor)({
|
|
816
825
|
message: message ?? "Please provide your input in the editor below:",
|
|
817
826
|
postfix,
|
|
818
827
|
default: defaultValue,
|
|
@@ -820,7 +829,6 @@ var Prompts = class extends Logger {
|
|
|
820
829
|
});
|
|
821
830
|
}
|
|
822
831
|
};
|
|
823
|
-
|
|
824
832
|
//#endregion
|
|
825
833
|
//#region src/Utils/Resolver.ts
|
|
826
834
|
var Resolver = class {
|
|
@@ -859,14 +867,11 @@ var Resolver = class {
|
|
|
859
867
|
return Object.prototype.toString.call(func) === "[object AsyncFunction]";
|
|
860
868
|
}
|
|
861
869
|
};
|
|
862
|
-
|
|
863
870
|
//#endregion
|
|
864
871
|
//#region src/Utils/scripts.ts
|
|
865
872
|
const mainTsconfig = {
|
|
866
873
|
extends: "@h3ravel/shared/tsconfig.base.json",
|
|
867
874
|
compilerOptions: {
|
|
868
|
-
baseUrl: ".",
|
|
869
|
-
outDir: "dist",
|
|
870
875
|
paths: {
|
|
871
876
|
"src/*": ["./../src/*"],
|
|
872
877
|
"App/*": ["./../src/app/*"],
|
|
@@ -908,14 +913,13 @@ const mainTsconfig = {
|
|
|
908
913
|
};
|
|
909
914
|
const baseTsconfig = { extends: "./.h3ravel/tsconfig.json" };
|
|
910
915
|
const packageJsonScript = {
|
|
911
|
-
build: "NODE_ENV=production tsdown --config-loader
|
|
912
|
-
dev: "NODE_ENV=development pnpm tsdown --config-loader
|
|
916
|
+
build: "NODE_ENV=production tsdown --config-loader unrun -c tsdown.default.config.ts",
|
|
917
|
+
dev: "NODE_ENV=development pnpm tsdown --config-loader unrun -c tsdown.default.config.ts",
|
|
913
918
|
start: "DIST_DIR=dist node -r source-map-support/register dist/server.js",
|
|
914
919
|
lint: "eslint . --ext .ts",
|
|
915
920
|
test: "NODE_NO_WARNINGS=1 NODE_ENV=testing jest --passWithNoTests",
|
|
916
921
|
postinstall: "pnpm prepare"
|
|
917
922
|
};
|
|
918
|
-
|
|
919
923
|
//#endregion
|
|
920
924
|
//#region src/Utils/TaskManager.ts
|
|
921
925
|
var TaskManager = class {
|
|
@@ -945,7 +949,6 @@ var TaskManager = class {
|
|
|
945
949
|
}
|
|
946
950
|
}
|
|
947
951
|
};
|
|
948
|
-
|
|
949
952
|
//#endregion
|
|
950
953
|
exports.Console = Console;
|
|
951
954
|
exports.EnvParser = EnvParser;
|
|
@@ -970,4 +973,4 @@ exports.mix = mix;
|
|
|
970
973
|
exports.packageJsonScript = packageJsonScript;
|
|
971
974
|
exports.trait = trait;
|
|
972
975
|
exports.use = use;
|
|
973
|
-
exports.uses = uses;
|
|
976
|
+
exports.uses = uses;
|
package/dist/index.d.ts
CHANGED
|
@@ -262,26 +262,26 @@ type Explode<T = any> = { [P in keyof T]: T[P] };
|
|
|
262
262
|
type MixParams<T1 extends any[], T2 extends any[]> = T1 extends [] ? (T2 extends [] ? [] : T2) : (T2 extends [] ? T1 : (T1 extends [infer H1, ...infer R1] ? (T2 extends [infer H2, ...infer R2] ? [H1 & H2, ...MixParams<R1, R2>] : []) : []));
|
|
263
263
|
type TraitDefTypeT = ConsFactory<Cons>;
|
|
264
264
|
type TraitDefTypeST = (Trait | TypeFactory<Trait>)[] | undefined;
|
|
265
|
-
type Trait<T extends TraitDefTypeT = TraitDefTypeT, ST
|
|
265
|
+
type Trait<T extends TraitDefTypeT = TraitDefTypeT, ST extends TraitDefTypeST = TraitDefTypeST> = {
|
|
266
266
|
id: number;
|
|
267
267
|
symbol: symbol;
|
|
268
268
|
factory: T;
|
|
269
|
-
superTraits: ST
|
|
269
|
+
superTraits: ST;
|
|
270
270
|
};
|
|
271
271
|
declare function trait<T extends ConsFactory<Cons>>(factory: T): Trait<T, undefined>;
|
|
272
|
-
declare function trait<const ST
|
|
272
|
+
declare function trait<const ST extends (Trait | TypeFactory<Trait>)[], T extends ConsFactory<Cons, ResolveTraitLikeArray<ST>>>(superTraits: ST, factory: T): Trait<T, ST>;
|
|
273
273
|
type ExtractFactory<T extends Trait> = T extends Trait<ConsFactory<infer C>, TraitDefTypeST> ? C : never;
|
|
274
274
|
type ExtractSuperTrait<T extends Trait> = T extends Trait<TraitDefTypeT, infer ST extends TraitDefTypeST> ? ST : never;
|
|
275
275
|
type DeriveTraitsConsConsMerge<A extends Cons, B extends Cons> = A extends (new (...args: infer ArgsA) => infer RetA) ? (B extends (new (...args: infer ArgsB) => infer RetB) ? (new (...args: MixParams<ArgsA, ArgsB>) => RetA & RetB) : never) : never;
|
|
276
276
|
type DeriveTraitsConsCons<T extends Cons> = new (...args: ConstructorParameters<T>) => InstanceType<T>;
|
|
277
|
-
type DeriveTraitsConsTraitParts<C
|
|
277
|
+
type DeriveTraitsConsTraitParts<C extends Cons, ST extends ((Trait | TypeFactory<Trait>)[] | undefined)> = ST extends undefined ? DeriveTraitsConsCons<C> : ST extends [] ? DeriveTraitsConsCons<C> : DeriveTraitsConsConsMerge<DeriveTraitsConsCons<C>, DeriveTraitsConsAll<ST>>;
|
|
278
278
|
type DeriveTraitsConsTrait<T extends Trait> = DeriveTraitsConsTraitParts<ExtractFactory<T>, ExtractSuperTrait<T>>;
|
|
279
279
|
type DeriveTraitsConsOne<T extends (Trait | TypeFactory<Trait>)> = T extends Trait ? DeriveTraitsConsTrait<T> : T extends TypeFactory<Trait> ? DeriveTraitsConsTrait<ReturnType<T>> : never;
|
|
280
280
|
type DeriveTraitsConsAll<T extends (((Trait | TypeFactory<Trait>)[] | [...(Trait | TypeFactory<Trait>)[], Cons]) | undefined)> = T extends [...infer Others extends (Trait | TypeFactory<Trait>)[], infer Last extends Cons] ? (DeriveTraitsConsConsMerge<DeriveTraitsConsAll<Others>, /* RECURSION */DeriveTraitsConsCons<Last>>) : T extends (Trait | TypeFactory<Trait>)[] ? (T extends [infer First extends (Trait | TypeFactory<Trait>)] ? (DeriveTraitsConsOne<First>) : (T extends [infer First extends (Trait | TypeFactory<Trait>), ...infer Rest extends (Trait | TypeFactory<Trait>)[]] ? (DeriveTraitsConsConsMerge<DeriveTraitsConsOne<First>, DeriveTraitsConsAll<Rest>>) : never)) : never;
|
|
281
281
|
type DeriveTraitsCons<T extends ((Trait | TypeFactory<Trait>)[] | [...(Trait | TypeFactory<Trait>)[], Cons])> = DeriveTraitsConsAll<T>;
|
|
282
282
|
type DeriveTraitsStatsConsMerge<T1 extends object, T2 extends object> = T1 & T2;
|
|
283
283
|
type DeriveTraitsStatsCons<T extends Cons> = Explode<T>;
|
|
284
|
-
type DeriveTraitsStatsTraitParts<C
|
|
284
|
+
type DeriveTraitsStatsTraitParts<C extends Cons, ST extends ((Trait | TypeFactory<Trait>)[] | undefined)> = ST extends undefined ? DeriveTraitsStatsCons<C> : ST extends [] ? DeriveTraitsStatsCons<C> : DeriveTraitsStatsConsMerge<DeriveTraitsStatsCons<C>, DeriveTraitsStatsAll<ST>>;
|
|
285
285
|
type DeriveTraitsStatsTrait<T extends Trait> = DeriveTraitsStatsTraitParts<ExtractFactory<T>, ExtractSuperTrait<T>>;
|
|
286
286
|
type DeriveTraitsStatsOne<T extends (Trait | TypeFactory<Trait>)> = T extends Trait ? DeriveTraitsStatsTrait<T> : T extends TypeFactory<Trait> ? DeriveTraitsStatsTrait<ReturnType<T>> : never;
|
|
287
287
|
type DeriveTraitsStatsAll<T extends (((Trait | TypeFactory<Trait>)[] | [...(Trait | TypeFactory<Trait>)[], Cons]) | undefined)> = T extends [...infer Others extends (Trait | TypeFactory<Trait>)[], infer Last extends Cons] ? (DeriveTraitsStatsConsMerge<DeriveTraitsStatsAll<Others>, /* RECURSION */DeriveTraitsStatsCons<Last>>) : T extends (Trait | TypeFactory<Trait>)[] ? (T extends [infer First extends (Trait | TypeFactory<Trait>)] ? (DeriveTraitsStatsOne<First>) : (T extends [infer First extends (Trait | TypeFactory<Trait>), ...infer Rest extends (Trait | TypeFactory<Trait>)[]] ? (DeriveTraitsStatsConsMerge<DeriveTraitsStatsOne<First>, DeriveTraitsStatsAll<Rest>>) : never)) : never;
|
|
@@ -528,8 +528,6 @@ declare class Resolver {
|
|
|
528
528
|
declare const mainTsconfig: {
|
|
529
529
|
extends: string;
|
|
530
530
|
compilerOptions: {
|
|
531
|
-
baseUrl: string;
|
|
532
|
-
outDir: string;
|
|
533
531
|
paths: {
|
|
534
532
|
'src/*': string[];
|
|
535
533
|
'App/*': string[];
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,6 @@ import { checkbox, confirm, editor, input, password, select } from "@inquirer/pr
|
|
|
8
8
|
import ora from "ora";
|
|
9
9
|
import crypto from "crypto";
|
|
10
10
|
import preferredPM from "preferred-pm";
|
|
11
|
-
|
|
12
11
|
//#region src/Container.ts
|
|
13
12
|
const INTERNAL_METHODS = Symbol("internal_methods");
|
|
14
13
|
/**
|
|
@@ -31,7 +30,6 @@ const internal = (target, propertyKey) => {
|
|
|
31
30
|
const isInternal = (instance, prop) => {
|
|
32
31
|
return Object.getPrototypeOf(instance)[INTERNAL_METHODS]?.has(prop) ?? false;
|
|
33
32
|
};
|
|
34
|
-
|
|
35
33
|
//#endregion
|
|
36
34
|
//#region src/Mixins/MixinSystem.ts
|
|
37
35
|
/**
|
|
@@ -78,7 +76,6 @@ const mix = (...bases) => {
|
|
|
78
76
|
Object.setPrototypeOf(Base, bases[0]);
|
|
79
77
|
return Base;
|
|
80
78
|
};
|
|
81
|
-
|
|
82
79
|
//#endregion
|
|
83
80
|
//#region src/Mixins/TraitSystem.ts
|
|
84
81
|
const crcTable = [];
|
|
@@ -111,14 +108,14 @@ const extendProperties = (cons, field, value) => Object.defineProperty(cons, fie
|
|
|
111
108
|
});
|
|
112
109
|
const rawTrait = (x) => isTypeFactory(x) ? x() : x;
|
|
113
110
|
const deriveTrait = (trait$, baseClz, derived) => {
|
|
114
|
-
const trait
|
|
111
|
+
const trait = rawTrait(trait$);
|
|
115
112
|
let clz = baseClz;
|
|
116
|
-
if (!derived.has(trait
|
|
117
|
-
derived.set(trait
|
|
118
|
-
if (trait
|
|
119
|
-
clz = trait
|
|
120
|
-
extendProperties(clz, "id", crc32(trait
|
|
121
|
-
extendProperties(clz, trait
|
|
113
|
+
if (!derived.has(trait.id)) {
|
|
114
|
+
derived.set(trait.id, true);
|
|
115
|
+
if (trait.superTraits !== void 0) for (const superTrait of reverseTraitList(trait.superTraits)) clz = deriveTrait(superTrait, clz, derived);
|
|
116
|
+
clz = trait.factory(clz);
|
|
117
|
+
extendProperties(clz, "id", crc32(trait.factory.toString()));
|
|
118
|
+
extendProperties(clz, trait.symbol, true);
|
|
122
119
|
}
|
|
123
120
|
return clz;
|
|
124
121
|
};
|
|
@@ -136,14 +133,14 @@ function use(...traits) {
|
|
|
136
133
|
lot = traits;
|
|
137
134
|
}
|
|
138
135
|
const derived = /* @__PURE__ */ new Map();
|
|
139
|
-
for (const trait
|
|
136
|
+
for (const trait of reverseTraitList(lot)) clz = deriveTrait(trait, clz, derived);
|
|
140
137
|
return clz;
|
|
141
138
|
}
|
|
142
|
-
function uses(instance, trait
|
|
139
|
+
function uses(instance, trait) {
|
|
143
140
|
if (typeof instance !== "object" || instance === null) return false;
|
|
144
141
|
let obj = instance;
|
|
145
|
-
if (isCons(trait
|
|
146
|
-
const idTrait = (isTypeFactory(trait
|
|
142
|
+
if (isCons(trait) && !isTypeFactory(trait)) return instance instanceof trait;
|
|
143
|
+
const idTrait = (isTypeFactory(trait) ? trait() : trait)["id"];
|
|
147
144
|
while (obj) {
|
|
148
145
|
if (Object.hasOwn(obj, "constructor")) {
|
|
149
146
|
if ((obj.constructor["id"] ?? 0) === idTrait) return true;
|
|
@@ -152,7 +149,6 @@ function uses(instance, trait$1) {
|
|
|
152
149
|
}
|
|
153
150
|
return false;
|
|
154
151
|
}
|
|
155
|
-
|
|
156
152
|
//#endregion
|
|
157
153
|
//#region src/Mixins/UseFinalizable.ts
|
|
158
154
|
/**
|
|
@@ -167,7 +163,7 @@ const registry = new FinalizationRegistry((fn) => {
|
|
|
167
163
|
/**
|
|
168
164
|
* the API trait "Finalizable<T>"
|
|
169
165
|
*/
|
|
170
|
-
const Finalizable = trait((base) => class Finalizable
|
|
166
|
+
const Finalizable = trait((base) => class Finalizable extends base {
|
|
171
167
|
constructor(...args) {
|
|
172
168
|
super(...args);
|
|
173
169
|
const fn1 = this.$finalize;
|
|
@@ -179,7 +175,6 @@ const Finalizable = trait((base) => class Finalizable$1 extends base {
|
|
|
179
175
|
registry.register(this, fn2, this);
|
|
180
176
|
}
|
|
181
177
|
});
|
|
182
|
-
|
|
183
178
|
//#endregion
|
|
184
179
|
//#region src/Mixins/UseMagic.ts
|
|
185
180
|
/**
|
|
@@ -201,6 +196,9 @@ const Finalizable = trait((base) => class Finalizable$1 extends base {
|
|
|
201
196
|
*/
|
|
202
197
|
function makeMagic(target) {
|
|
203
198
|
return new Proxy(target, {
|
|
199
|
+
/**
|
|
200
|
+
* Intercepts property access and missing method calls.
|
|
201
|
+
*/
|
|
204
202
|
get(obj, prop, receiver) {
|
|
205
203
|
if (typeof prop === "string") {
|
|
206
204
|
if (prop in obj) return Reflect.get(obj, prop, receiver);
|
|
@@ -208,6 +206,9 @@ function makeMagic(target) {
|
|
|
208
206
|
if (obj.__get) return obj.__get(prop);
|
|
209
207
|
}
|
|
210
208
|
},
|
|
209
|
+
/**
|
|
210
|
+
* Intercepts property assignment.
|
|
211
|
+
*/
|
|
211
212
|
set(obj, prop, value) {
|
|
212
213
|
if (typeof prop === "string" && obj.__set) {
|
|
213
214
|
obj.__set(prop, value);
|
|
@@ -215,10 +216,16 @@ function makeMagic(target) {
|
|
|
215
216
|
}
|
|
216
217
|
return Reflect.set(obj, prop, value);
|
|
217
218
|
},
|
|
219
|
+
/**
|
|
220
|
+
* Intercepts `in` operator and existence checks.
|
|
221
|
+
*/
|
|
218
222
|
has(obj, prop) {
|
|
219
223
|
if (typeof prop === "string" && obj.__isset) return obj.__isset(prop);
|
|
220
224
|
return Reflect.has(obj, prop);
|
|
221
225
|
},
|
|
226
|
+
/**
|
|
227
|
+
* Intercepts `delete obj.prop`.
|
|
228
|
+
*/
|
|
222
229
|
deleteProperty(obj, prop) {
|
|
223
230
|
if (typeof prop === "string" && obj.__unset) {
|
|
224
231
|
obj.__unset(prop);
|
|
@@ -243,6 +250,9 @@ function makeMagic(target) {
|
|
|
243
250
|
*/
|
|
244
251
|
function makeStaticMagic(cls) {
|
|
245
252
|
return new Proxy(cls, {
|
|
253
|
+
/**
|
|
254
|
+
* Intercepts static property access and missing static calls.
|
|
255
|
+
*/
|
|
246
256
|
get(target, prop) {
|
|
247
257
|
if (typeof prop === "string") {
|
|
248
258
|
if (prop in target) return target[prop];
|
|
@@ -250,6 +260,9 @@ function makeStaticMagic(cls) {
|
|
|
250
260
|
if (target.__get) return target.__get(prop);
|
|
251
261
|
}
|
|
252
262
|
},
|
|
263
|
+
/**
|
|
264
|
+
* Intercepts static property assignment.
|
|
265
|
+
*/
|
|
253
266
|
set(target, prop, value) {
|
|
254
267
|
if (typeof prop === "string" && target.__set) {
|
|
255
268
|
target.__set(prop, value);
|
|
@@ -257,10 +270,16 @@ function makeStaticMagic(cls) {
|
|
|
257
270
|
}
|
|
258
271
|
return Reflect.set(target, prop, value);
|
|
259
272
|
},
|
|
273
|
+
/**
|
|
274
|
+
* Intercepts `prop in Class`.
|
|
275
|
+
*/
|
|
260
276
|
has(target, prop) {
|
|
261
277
|
if (typeof prop === "string" && target.__isset) return target.__isset(prop);
|
|
262
278
|
return Reflect.has(target, prop);
|
|
263
279
|
},
|
|
280
|
+
/**
|
|
281
|
+
* Intercepts `delete Class.prop`.
|
|
282
|
+
*/
|
|
264
283
|
deleteProperty(target, prop) {
|
|
265
284
|
if (typeof prop === "string" && target.__unset) {
|
|
266
285
|
target.__unset(prop);
|
|
@@ -288,14 +307,13 @@ var Magic = class {
|
|
|
288
307
|
}
|
|
289
308
|
};
|
|
290
309
|
const UseMagic = trait((Base) => {
|
|
291
|
-
return class Magic
|
|
310
|
+
return class Magic extends Base {
|
|
292
311
|
constructor(...args) {
|
|
293
312
|
super(...args);
|
|
294
313
|
return makeMagic(this);
|
|
295
314
|
}
|
|
296
315
|
};
|
|
297
316
|
});
|
|
298
|
-
|
|
299
317
|
//#endregion
|
|
300
318
|
//#region src/Utils/Logger.ts
|
|
301
319
|
var Logger = class Logger {
|
|
@@ -455,10 +473,10 @@ var Logger = class Logger {
|
|
|
455
473
|
process.exit(0);
|
|
456
474
|
}
|
|
457
475
|
static chalker(styles) {
|
|
458
|
-
return (input
|
|
476
|
+
return (input) => styles.reduce((acc, style) => {
|
|
459
477
|
if (style in chalk) return (typeof style === "function" ? style : chalk[style])(acc);
|
|
460
478
|
return acc;
|
|
461
|
-
}, input
|
|
479
|
+
}, input);
|
|
462
480
|
}
|
|
463
481
|
static parse(config, joiner = " ", log = true, sc) {
|
|
464
482
|
const string = config.map(([str, opt]) => {
|
|
@@ -492,7 +510,6 @@ var Logger = class Logger {
|
|
|
492
510
|
return Console;
|
|
493
511
|
}
|
|
494
512
|
};
|
|
495
|
-
|
|
496
513
|
//#endregion
|
|
497
514
|
//#region src/Utils/Console.ts
|
|
498
515
|
var Console = class {
|
|
@@ -502,7 +519,6 @@ var Console = class {
|
|
|
502
519
|
static info = (...args) => args.map((e) => Logger.info(e, false, true));
|
|
503
520
|
static error = (...args) => args.map((e) => Logger.error(e, false), true);
|
|
504
521
|
};
|
|
505
|
-
|
|
506
522
|
//#endregion
|
|
507
523
|
//#region src/Utils/EnvParser.ts
|
|
508
524
|
var EnvParser = class {
|
|
@@ -539,7 +555,6 @@ var EnvParser = class {
|
|
|
539
555
|
return value;
|
|
540
556
|
}
|
|
541
557
|
};
|
|
542
|
-
|
|
543
558
|
//#endregion
|
|
544
559
|
//#region src/Utils/FileSystem.ts
|
|
545
560
|
var FileSystem = class {
|
|
@@ -559,9 +574,9 @@ var FileSystem = class {
|
|
|
559
574
|
* @param path
|
|
560
575
|
* @returns
|
|
561
576
|
*/
|
|
562
|
-
static async fileExists(path
|
|
577
|
+
static async fileExists(path) {
|
|
563
578
|
try {
|
|
564
|
-
await access(path
|
|
579
|
+
await access(path);
|
|
565
580
|
return true;
|
|
566
581
|
} catch {
|
|
567
582
|
return false;
|
|
@@ -603,7 +618,6 @@ var FileSystem = class {
|
|
|
603
618
|
}
|
|
604
619
|
}
|
|
605
620
|
};
|
|
606
|
-
|
|
607
621
|
//#endregion
|
|
608
622
|
//#region src/Utils/PathLoader.ts
|
|
609
623
|
var PathLoader = class {
|
|
@@ -643,17 +657,16 @@ var PathLoader = class {
|
|
|
643
657
|
* @param path - The new path
|
|
644
658
|
* @param base - The base path to include to the path
|
|
645
659
|
*/
|
|
646
|
-
setPath(name, path$
|
|
647
|
-
if (base && name !== "base") this.paths[name] = path.join(base, path$
|
|
648
|
-
this.paths[name] = path$
|
|
660
|
+
setPath(name, path$2, base) {
|
|
661
|
+
if (base && name !== "base") this.paths[name] = path.join(base, path$2);
|
|
662
|
+
this.paths[name] = path$2;
|
|
649
663
|
}
|
|
650
|
-
distPath(path$
|
|
651
|
-
path$
|
|
652
|
-
if (!skipExt) path$
|
|
653
|
-
return path.normalize(path$
|
|
664
|
+
distPath(path$3, skipExt = false) {
|
|
665
|
+
path$3 = path$3.replace("/src/", `/${process.env.DIST_DIR ?? ".h3ravel/serve"}/`.replace(/([^:]\/)\/+/g, "$1"));
|
|
666
|
+
if (!skipExt) path$3 = path$3.replace(/\.(ts|tsx|mts|cts)$/, ".js");
|
|
667
|
+
return path.normalize(path$3);
|
|
654
668
|
}
|
|
655
669
|
};
|
|
656
|
-
|
|
657
670
|
//#endregion
|
|
658
671
|
//#region src/Utils/Prompts.ts
|
|
659
672
|
var Prompts = class extends Logger {
|
|
@@ -786,7 +799,6 @@ var Prompts = class extends Logger {
|
|
|
786
799
|
});
|
|
787
800
|
}
|
|
788
801
|
};
|
|
789
|
-
|
|
790
802
|
//#endregion
|
|
791
803
|
//#region src/Utils/Resolver.ts
|
|
792
804
|
var Resolver = class {
|
|
@@ -825,14 +837,11 @@ var Resolver = class {
|
|
|
825
837
|
return Object.prototype.toString.call(func) === "[object AsyncFunction]";
|
|
826
838
|
}
|
|
827
839
|
};
|
|
828
|
-
|
|
829
840
|
//#endregion
|
|
830
841
|
//#region src/Utils/scripts.ts
|
|
831
842
|
const mainTsconfig = {
|
|
832
843
|
extends: "@h3ravel/shared/tsconfig.base.json",
|
|
833
844
|
compilerOptions: {
|
|
834
|
-
baseUrl: ".",
|
|
835
|
-
outDir: "dist",
|
|
836
845
|
paths: {
|
|
837
846
|
"src/*": ["./../src/*"],
|
|
838
847
|
"App/*": ["./../src/app/*"],
|
|
@@ -874,14 +883,13 @@ const mainTsconfig = {
|
|
|
874
883
|
};
|
|
875
884
|
const baseTsconfig = { extends: "./.h3ravel/tsconfig.json" };
|
|
876
885
|
const packageJsonScript = {
|
|
877
|
-
build: "NODE_ENV=production tsdown --config-loader
|
|
878
|
-
dev: "NODE_ENV=development pnpm tsdown --config-loader
|
|
886
|
+
build: "NODE_ENV=production tsdown --config-loader unrun -c tsdown.default.config.ts",
|
|
887
|
+
dev: "NODE_ENV=development pnpm tsdown --config-loader unrun -c tsdown.default.config.ts",
|
|
879
888
|
start: "DIST_DIR=dist node -r source-map-support/register dist/server.js",
|
|
880
889
|
lint: "eslint . --ext .ts",
|
|
881
890
|
test: "NODE_NO_WARNINGS=1 NODE_ENV=testing jest --passWithNoTests",
|
|
882
891
|
postinstall: "pnpm prepare"
|
|
883
892
|
};
|
|
884
|
-
|
|
885
893
|
//#endregion
|
|
886
894
|
//#region src/Utils/TaskManager.ts
|
|
887
895
|
var TaskManager = class {
|
|
@@ -911,6 +919,5 @@ var TaskManager = class {
|
|
|
911
919
|
}
|
|
912
920
|
}
|
|
913
921
|
};
|
|
914
|
-
|
|
915
922
|
//#endregion
|
|
916
|
-
export { Console, EnvParser, FileSystem, Finalizable, INTERNAL_METHODS, Logger, Magic, PathLoader, Prompts, Resolver, TaskManager, UseMagic, baseTsconfig, crc32, internal, isInternal, mainTsconfig, makeMagic, makeStaticMagic, mix, packageJsonScript, trait, use, uses };
|
|
923
|
+
export { Console, EnvParser, FileSystem, Finalizable, INTERNAL_METHODS, Logger, Magic, PathLoader, Prompts, Resolver, TaskManager, UseMagic, baseTsconfig, crc32, internal, isInternal, mainTsconfig, makeMagic, makeStaticMagic, mix, packageJsonScript, trait, use, uses };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h3ravel/shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.29.0-alpha.11",
|
|
4
4
|
"description": "Shared Utilities.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"preferred-pm": "^4.1.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@h3ravel/contracts": "^
|
|
57
|
+
"@h3ravel/contracts": "^1.29.0-alpha.11",
|
|
58
58
|
"fetchdts": "^0.1.6",
|
|
59
59
|
"pnpm": "^10.14.0"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
|
-
"build": "tsdown --config-loader
|
|
62
|
+
"build": "tsdown --config-loader unrun",
|
|
63
63
|
"dev": "tsx watch src/index.ts",
|
|
64
64
|
"start": "node dist/index.js",
|
|
65
65
|
"lint": "eslint . --ext .ts",
|