@kubb/fabric-core 0.1.6 → 0.1.7
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/{App-Dvetv2V_.d.ts → App-DVWD6TgC.d.cts} +17 -6
- package/dist/{App-Cplfh8QA.d.cts → App-_vPNh477.d.ts} +17 -6
- package/dist/defineProperty-BtekiGIK.js +332 -0
- package/dist/defineProperty-BtekiGIK.js.map +1 -0
- package/dist/defineProperty-CspRhtP3.cjs +364 -0
- package/dist/defineProperty-CspRhtP3.cjs.map +1 -0
- package/dist/{index-Agz-2M75.d.ts → index-CfV-59_M.d.ts} +5 -5
- package/dist/{index-C3GyFwE1.d.cts → index-DVok6g82.d.cts} +5 -5
- package/dist/index.cjs +32 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +32 -25
- package/dist/index.js.map +1 -1
- package/dist/parsers/typescript.d.cts +2 -2
- package/dist/parsers/typescript.d.ts +2 -2
- package/dist/parsers.d.cts +2 -2
- package/dist/parsers.d.ts +2 -2
- package/dist/plugins.cjs +66 -27
- package/dist/plugins.cjs.map +1 -1
- package/dist/plugins.d.cts +29 -12
- package/dist/plugins.d.ts +29 -12
- package/dist/plugins.js +65 -29
- package/dist/plugins.js.map +1 -1
- package/dist/types.d.cts +2 -2
- package/dist/types.d.ts +2 -2
- package/dist/{typescriptParser-CxGhFQXh.d.cts → typescriptParser-BM90H8Tx.d.cts} +2 -2
- package/dist/{typescriptParser-B49WHoGL.d.ts → typescriptParser-Chjs-RhT.d.ts} +2 -2
- package/package.json +4 -2
- package/src/App.ts +12 -3
- package/src/FileProcessor.ts +41 -17
- package/src/defineApp.ts +3 -3
- package/src/plugins/barrelPlugin.ts +24 -6
- package/src/plugins/fsPlugin.ts +30 -29
- package/src/plugins/index.ts +1 -0
- package/src/plugins/progressPlugin.ts +48 -0
- package/dist/defineProperty-3OJdpith.js +0 -168
- package/dist/defineProperty-3OJdpith.js.map +0 -1
- package/dist/defineProperty-CjCLDutJ.cjs +0 -201
- package/dist/defineProperty-CjCLDutJ.cjs.map +0 -1
|
@@ -164,6 +164,10 @@ type ProcessFilesProps = {
|
|
|
164
164
|
parsers?: Set<Parser>;
|
|
165
165
|
extension?: Record<Extname, Extname | ''>;
|
|
166
166
|
dryRun?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* @default 'sequential'
|
|
169
|
+
*/
|
|
170
|
+
mode?: AppMode;
|
|
167
171
|
};
|
|
168
172
|
type GetParseOptions = {
|
|
169
173
|
parsers?: Set<Parser>;
|
|
@@ -184,6 +188,7 @@ declare class FileProcessor {
|
|
|
184
188
|
}?: GetParseOptions): Promise<string>;
|
|
185
189
|
run(files: Array<ResolvedFile>, {
|
|
186
190
|
parsers,
|
|
191
|
+
mode,
|
|
187
192
|
dryRun,
|
|
188
193
|
extension
|
|
189
194
|
}?: ProcessFilesProps): Promise<ResolvedFile[]>;
|
|
@@ -215,7 +220,12 @@ declare global {
|
|
|
215
220
|
interface App {}
|
|
216
221
|
}
|
|
217
222
|
}
|
|
218
|
-
type
|
|
223
|
+
type AppOptions = {
|
|
224
|
+
/**
|
|
225
|
+
* @default 'sequential'
|
|
226
|
+
*/
|
|
227
|
+
mode?: AppMode;
|
|
228
|
+
};
|
|
219
229
|
type AppEvents = {
|
|
220
230
|
/**
|
|
221
231
|
* Called in the beginning of the app lifecycle.
|
|
@@ -261,7 +271,7 @@ type AppEvents = {
|
|
|
261
271
|
processed: number;
|
|
262
272
|
total: number;
|
|
263
273
|
percentage: number;
|
|
264
|
-
source
|
|
274
|
+
source?: string;
|
|
265
275
|
file: ResolvedFile;
|
|
266
276
|
}];
|
|
267
277
|
/**
|
|
@@ -271,22 +281,23 @@ type AppEvents = {
|
|
|
271
281
|
files: ResolvedFile[];
|
|
272
282
|
}];
|
|
273
283
|
};
|
|
274
|
-
type AppContext<TOptions
|
|
284
|
+
type AppContext<TOptions extends AppOptions> = {
|
|
275
285
|
options?: TOptions;
|
|
276
286
|
events: AsyncEventEmitter<AppEvents>;
|
|
277
287
|
fileManager: FileManager;
|
|
278
288
|
installedPlugins: Set<Plugin>;
|
|
279
289
|
installedParsers: Set<Parser>;
|
|
280
290
|
};
|
|
291
|
+
type AppMode = 'sequential' | 'parallel';
|
|
281
292
|
type AllOptional<T> = {} extends T ? true : false;
|
|
282
293
|
type Install<TOptions = unknown> = TOptions extends any[] ? (app: App, ...options: TOptions) => void | Promise<void> : AllOptional<TOptions> extends true ? (app: App, options: TOptions | undefined) => void | Promise<void> : (app: App, options: TOptions) => void | Promise<void>;
|
|
283
294
|
type Inject<TOptions = unknown, TAppExtension$1 extends Record<string, any> = {}> = TOptions extends any[] ? (app: App, ...options: TOptions) => Partial<TAppExtension$1> : AllOptional<TOptions> extends true ? (app: App, options: TOptions | undefined) => Partial<TAppExtension$1> : (app: App, options: TOptions) => Partial<TAppExtension$1>;
|
|
284
|
-
interface App<TOptions =
|
|
295
|
+
interface App<TOptions extends AppOptions = AppOptions> extends Kubb.App {
|
|
285
296
|
context: AppContext<TOptions>;
|
|
286
297
|
files: Array<ResolvedFile>;
|
|
287
298
|
use<TPluginOptions = unknown, TMeta extends object = object, TAppExtension extends Record<string, any> = {}>(pluginOrParser: Plugin<TPluginOptions, TAppExtension> | Parser<TPluginOptions, TMeta>, ...options: TPluginOptions extends any[] ? NoInfer<TPluginOptions> : AllOptional<TPluginOptions> extends true ? [NoInfer<TPluginOptions>?] : [NoInfer<TPluginOptions>]): (this & TAppExtension) | Promise<this & TAppExtension>;
|
|
288
299
|
addFile(...files: Array<File>): Promise<void>;
|
|
289
300
|
}
|
|
290
301
|
//#endregion
|
|
291
|
-
export { FileProcessor as a, Plugin as c, File as d, KubbFile_d_exports as f, FileManager as i, UserPlugin as l, AppContext as n, Parser as o, ResolvedFile as p,
|
|
292
|
-
//# sourceMappingURL=App-
|
|
302
|
+
export { FileProcessor as a, Plugin as c, File as d, KubbFile_d_exports as f, FileManager as i, UserPlugin as l, AppContext as n, Parser as o, ResolvedFile as p, AppOptions as r, UserParser as s, App as t, Extname as u };
|
|
303
|
+
//# sourceMappingURL=App-DVWD6TgC.d.cts.map
|
|
@@ -164,6 +164,10 @@ type ProcessFilesProps = {
|
|
|
164
164
|
parsers?: Set<Parser>;
|
|
165
165
|
extension?: Record<Extname, Extname | ''>;
|
|
166
166
|
dryRun?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* @default 'sequential'
|
|
169
|
+
*/
|
|
170
|
+
mode?: AppMode;
|
|
167
171
|
};
|
|
168
172
|
type GetParseOptions = {
|
|
169
173
|
parsers?: Set<Parser>;
|
|
@@ -184,6 +188,7 @@ declare class FileProcessor {
|
|
|
184
188
|
}?: GetParseOptions): Promise<string>;
|
|
185
189
|
run(files: Array<ResolvedFile>, {
|
|
186
190
|
parsers,
|
|
191
|
+
mode,
|
|
187
192
|
dryRun,
|
|
188
193
|
extension
|
|
189
194
|
}?: ProcessFilesProps): Promise<ResolvedFile[]>;
|
|
@@ -215,7 +220,12 @@ declare global {
|
|
|
215
220
|
interface App {}
|
|
216
221
|
}
|
|
217
222
|
}
|
|
218
|
-
type
|
|
223
|
+
type AppOptions = {
|
|
224
|
+
/**
|
|
225
|
+
* @default 'sequential'
|
|
226
|
+
*/
|
|
227
|
+
mode?: AppMode;
|
|
228
|
+
};
|
|
219
229
|
type AppEvents = {
|
|
220
230
|
/**
|
|
221
231
|
* Called in the beginning of the app lifecycle.
|
|
@@ -261,7 +271,7 @@ type AppEvents = {
|
|
|
261
271
|
processed: number;
|
|
262
272
|
total: number;
|
|
263
273
|
percentage: number;
|
|
264
|
-
source
|
|
274
|
+
source?: string;
|
|
265
275
|
file: ResolvedFile;
|
|
266
276
|
}];
|
|
267
277
|
/**
|
|
@@ -271,22 +281,23 @@ type AppEvents = {
|
|
|
271
281
|
files: ResolvedFile[];
|
|
272
282
|
}];
|
|
273
283
|
};
|
|
274
|
-
type AppContext<TOptions
|
|
284
|
+
type AppContext<TOptions extends AppOptions> = {
|
|
275
285
|
options?: TOptions;
|
|
276
286
|
events: AsyncEventEmitter<AppEvents>;
|
|
277
287
|
fileManager: FileManager;
|
|
278
288
|
installedPlugins: Set<Plugin>;
|
|
279
289
|
installedParsers: Set<Parser>;
|
|
280
290
|
};
|
|
291
|
+
type AppMode = 'sequential' | 'parallel';
|
|
281
292
|
type AllOptional<T> = {} extends T ? true : false;
|
|
282
293
|
type Install<TOptions = unknown> = TOptions extends any[] ? (app: App, ...options: TOptions) => void | Promise<void> : AllOptional<TOptions> extends true ? (app: App, options: TOptions | undefined) => void | Promise<void> : (app: App, options: TOptions) => void | Promise<void>;
|
|
283
294
|
type Inject<TOptions = unknown, TAppExtension$1 extends Record<string, any> = {}> = TOptions extends any[] ? (app: App, ...options: TOptions) => Partial<TAppExtension$1> : AllOptional<TOptions> extends true ? (app: App, options: TOptions | undefined) => Partial<TAppExtension$1> : (app: App, options: TOptions) => Partial<TAppExtension$1>;
|
|
284
|
-
interface App<TOptions =
|
|
295
|
+
interface App<TOptions extends AppOptions = AppOptions> extends Kubb.App {
|
|
285
296
|
context: AppContext<TOptions>;
|
|
286
297
|
files: Array<ResolvedFile>;
|
|
287
298
|
use<TPluginOptions = unknown, TMeta extends object = object, TAppExtension extends Record<string, any> = {}>(pluginOrParser: Plugin<TPluginOptions, TAppExtension> | Parser<TPluginOptions, TMeta>, ...options: TPluginOptions extends any[] ? NoInfer<TPluginOptions> : AllOptional<TPluginOptions> extends true ? [NoInfer<TPluginOptions>?] : [NoInfer<TPluginOptions>]): (this & TAppExtension) | Promise<this & TAppExtension>;
|
|
288
299
|
addFile(...files: Array<File>): Promise<void>;
|
|
289
300
|
}
|
|
290
301
|
//#endregion
|
|
291
|
-
export { FileProcessor as a, Plugin as c, File as d, KubbFile_d_exports as f, FileManager as i, UserPlugin as l, AppContext as n, Parser as o, ResolvedFile as p,
|
|
292
|
-
//# sourceMappingURL=App-
|
|
302
|
+
export { FileProcessor as a, Plugin as c, File as d, KubbFile_d_exports as f, FileManager as i, UserPlugin as l, AppContext as n, Parser as o, ResolvedFile as p, AppOptions as r, UserParser as s, App as t, Extname as u };
|
|
303
|
+
//# sourceMappingURL=App-_vPNh477.d.ts.map
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import { t as trimExtName } from "./trimExtName-CeOVQVbu.js";
|
|
2
|
+
import { orderBy } from "natural-orderby";
|
|
3
|
+
import { createHash } from "node:crypto";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
|
|
6
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/checkPrivateRedeclaration.js
|
|
7
|
+
function _checkPrivateRedeclaration(e$2, t$5) {
|
|
8
|
+
if (t$5.has(e$2)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/classPrivateFieldInitSpec.js
|
|
13
|
+
function _classPrivateFieldInitSpec(e$2, t$5, a$1) {
|
|
14
|
+
_checkPrivateRedeclaration(e$2, t$5), t$5.set(e$2, a$1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/assertClassBrand.js
|
|
19
|
+
function _assertClassBrand(e$2, t$5, n$4) {
|
|
20
|
+
if ("function" == typeof e$2 ? e$2 === t$5 : e$2.has(t$5)) return arguments.length < 3 ? t$5 : n$4;
|
|
21
|
+
throw new TypeError("Private element is not present on this object");
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/classPrivateFieldGet2.js
|
|
26
|
+
function _classPrivateFieldGet2(s, a$1) {
|
|
27
|
+
return s.get(_assertClassBrand(s, a$1));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/lazyDataLastImpl-BDhrIOwR.js
|
|
32
|
+
function e$1(e$2, t$5, n$4) {
|
|
33
|
+
let r$4 = (n$5) => e$2(n$5, ...t$5);
|
|
34
|
+
return n$4 === void 0 ? r$4 : Object.assign(r$4, {
|
|
35
|
+
lazy: n$4,
|
|
36
|
+
lazyArgs: t$5
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/purry-DH9cw9sy.js
|
|
42
|
+
function t$3(t$5, n$4, r$4) {
|
|
43
|
+
let i$2 = t$5.length - n$4.length;
|
|
44
|
+
if (i$2 === 0) return t$5(...n$4);
|
|
45
|
+
if (i$2 === 1) return e$1(t$5, n$4, r$4);
|
|
46
|
+
throw Error(`Wrong number of arguments`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/utilityEvaluators-DORpnx39.js
|
|
51
|
+
const e = {
|
|
52
|
+
done: !0,
|
|
53
|
+
hasNext: !1
|
|
54
|
+
}, t$1 = {
|
|
55
|
+
done: !1,
|
|
56
|
+
hasNext: !1
|
|
57
|
+
}, n$3 = () => e, r$3 = (e$2) => ({
|
|
58
|
+
hasNext: !0,
|
|
59
|
+
next: e$2,
|
|
60
|
+
done: !1
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/pipe-jLehR9-P.js
|
|
65
|
+
function t$4(e$2, ...t$5) {
|
|
66
|
+
let a$1 = e$2, o = t$5.map((e$3) => `lazy` in e$3 ? r$2(e$3) : void 0), s = 0;
|
|
67
|
+
for (; s < t$5.length;) {
|
|
68
|
+
if (o[s] === void 0 || !i$1(a$1)) {
|
|
69
|
+
let e$4 = t$5[s];
|
|
70
|
+
a$1 = e$4(a$1), s += 1;
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
let e$3 = [];
|
|
74
|
+
for (let n$4 = s; n$4 < t$5.length; n$4++) {
|
|
75
|
+
let t$6 = o[n$4];
|
|
76
|
+
if (t$6 === void 0 || (e$3.push(t$6), t$6.isSingle)) break;
|
|
77
|
+
}
|
|
78
|
+
let r$4 = [];
|
|
79
|
+
for (let t$6 of a$1) if (n$2(t$6, r$4, e$3)) break;
|
|
80
|
+
let { isSingle: c } = e$3.at(-1);
|
|
81
|
+
a$1 = c ? r$4[0] : r$4, s += e$3.length;
|
|
82
|
+
}
|
|
83
|
+
return a$1;
|
|
84
|
+
}
|
|
85
|
+
function n$2(t$5, r$4, i$2) {
|
|
86
|
+
if (i$2.length === 0) return r$4.push(t$5), !1;
|
|
87
|
+
let a$1 = t$5, o = t$1, s = !1;
|
|
88
|
+
for (let [e$2, t$6] of i$2.entries()) {
|
|
89
|
+
let { index: c, items: l } = t$6;
|
|
90
|
+
if (l.push(a$1), o = t$6(a$1, c, l), t$6.index += 1, o.hasNext) {
|
|
91
|
+
var _o$hasMany;
|
|
92
|
+
if ((_o$hasMany = o.hasMany) !== null && _o$hasMany !== void 0 ? _o$hasMany : !1) {
|
|
93
|
+
for (let t$7 of o.next) if (n$2(t$7, r$4, i$2.slice(e$2 + 1))) return !0;
|
|
94
|
+
return s;
|
|
95
|
+
}
|
|
96
|
+
a$1 = o.next;
|
|
97
|
+
}
|
|
98
|
+
if (!o.hasNext) break;
|
|
99
|
+
o.done && (s = !0);
|
|
100
|
+
}
|
|
101
|
+
return o.hasNext && r$4.push(a$1), s;
|
|
102
|
+
}
|
|
103
|
+
function r$2(e$2) {
|
|
104
|
+
var _t$single;
|
|
105
|
+
let { lazy: t$5, lazyArgs: n$4 } = e$2, r$4 = t$5(...n$4);
|
|
106
|
+
return Object.assign(r$4, {
|
|
107
|
+
isSingle: (_t$single = t$5.single) !== null && _t$single !== void 0 ? _t$single : !1,
|
|
108
|
+
index: 0,
|
|
109
|
+
items: []
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function i$1(e$2) {
|
|
113
|
+
return typeof e$2 == `string` || typeof e$2 == `object` && !!e$2 && Symbol.iterator in e$2;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/purryFromLazy-3oywCNIb.js
|
|
118
|
+
function t$2(t$5, n$4) {
|
|
119
|
+
let r$4 = n$4.length - t$5.length;
|
|
120
|
+
if (r$4 === 1) {
|
|
121
|
+
let [r$5, ...i$2] = n$4;
|
|
122
|
+
return t$4(r$5, {
|
|
123
|
+
lazy: t$5,
|
|
124
|
+
lazyArgs: i$2
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
if (r$4 === 0) {
|
|
128
|
+
let r$5 = {
|
|
129
|
+
lazy: t$5,
|
|
130
|
+
lazyArgs: n$4
|
|
131
|
+
};
|
|
132
|
+
return Object.assign((t$6) => t$4(t$6, r$5), r$5);
|
|
133
|
+
}
|
|
134
|
+
throw Error(`Wrong number of arguments`);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/isDeepEqual-jLo35Woq.js
|
|
139
|
+
function t(...t$5) {
|
|
140
|
+
return t$3(n$1, t$5);
|
|
141
|
+
}
|
|
142
|
+
function n$1(e$2, t$5) {
|
|
143
|
+
if (e$2 === t$5 || Object.is(e$2, t$5)) return !0;
|
|
144
|
+
if (typeof e$2 != `object` || typeof t$5 != `object` || e$2 === null || t$5 === null || Object.getPrototypeOf(e$2) !== Object.getPrototypeOf(t$5)) return !1;
|
|
145
|
+
if (Array.isArray(e$2)) return r$1(e$2, t$5);
|
|
146
|
+
if (e$2 instanceof Map) return i(e$2, t$5);
|
|
147
|
+
if (e$2 instanceof Set) return a(e$2, t$5);
|
|
148
|
+
if (e$2 instanceof Date) return e$2.getTime() === t$5.getTime();
|
|
149
|
+
if (e$2 instanceof RegExp) return e$2.toString() === t$5.toString();
|
|
150
|
+
if (Object.keys(e$2).length !== Object.keys(t$5).length) return !1;
|
|
151
|
+
for (let [r$4, i$2] of Object.entries(e$2)) if (!(r$4 in t$5) || !n$1(i$2, t$5[r$4])) return !1;
|
|
152
|
+
return !0;
|
|
153
|
+
}
|
|
154
|
+
function r$1(e$2, t$5) {
|
|
155
|
+
if (e$2.length !== t$5.length) return !1;
|
|
156
|
+
for (let [r$4, i$2] of e$2.entries()) if (!n$1(i$2, t$5[r$4])) return !1;
|
|
157
|
+
return !0;
|
|
158
|
+
}
|
|
159
|
+
function i(e$2, t$5) {
|
|
160
|
+
if (e$2.size !== t$5.size) return !1;
|
|
161
|
+
for (let [r$4, i$2] of e$2.entries()) if (!t$5.has(r$4) || !n$1(i$2, t$5.get(r$4))) return !1;
|
|
162
|
+
return !0;
|
|
163
|
+
}
|
|
164
|
+
function a(e$2, t$5) {
|
|
165
|
+
if (e$2.size !== t$5.size) return !1;
|
|
166
|
+
let r$4 = [...t$5];
|
|
167
|
+
for (let t$6 of e$2) {
|
|
168
|
+
let e$3 = !1;
|
|
169
|
+
for (let [i$2, a$1] of r$4.entries()) if (n$1(t$6, a$1)) {
|
|
170
|
+
e$3 = !0, r$4.splice(i$2, 1);
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
if (!e$3) return !1;
|
|
174
|
+
}
|
|
175
|
+
return !0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
//#endregion
|
|
179
|
+
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/uniqueBy-C_PxkF_D.js
|
|
180
|
+
function n(...e$2) {
|
|
181
|
+
return t$2(r, e$2);
|
|
182
|
+
}
|
|
183
|
+
function r(t$5) {
|
|
184
|
+
let n$4 = t$5, r$4 = /* @__PURE__ */ new Set();
|
|
185
|
+
return (t$6, i$2, a$1) => {
|
|
186
|
+
let o = n$4(t$6, i$2, a$1);
|
|
187
|
+
return r$4.has(o) ? t$1 : (r$4.add(o), {
|
|
188
|
+
done: !1,
|
|
189
|
+
hasNext: !0,
|
|
190
|
+
next: t$6
|
|
191
|
+
});
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
//#endregion
|
|
196
|
+
//#region src/createFile.ts
|
|
197
|
+
function hashObject(obj) {
|
|
198
|
+
const str = JSON.stringify(obj, Object.keys(obj).sort());
|
|
199
|
+
return createHash("sha256").update(str).digest("hex");
|
|
200
|
+
}
|
|
201
|
+
function combineSources(sources) {
|
|
202
|
+
return n(sources, (obj) => [
|
|
203
|
+
obj.name,
|
|
204
|
+
obj.isExportable,
|
|
205
|
+
obj.isTypeOnly
|
|
206
|
+
]);
|
|
207
|
+
}
|
|
208
|
+
function combineExports(exports) {
|
|
209
|
+
return orderBy(exports, [
|
|
210
|
+
(v) => !!Array.isArray(v.name),
|
|
211
|
+
(v) => !v.isTypeOnly,
|
|
212
|
+
(v) => v.path,
|
|
213
|
+
(v) => !!v.name,
|
|
214
|
+
(v) => Array.isArray(v.name) ? orderBy(v.name) : v.name
|
|
215
|
+
]).reduce((prev, curr) => {
|
|
216
|
+
const name = curr.name;
|
|
217
|
+
const prevByPath = prev.findLast((imp) => imp.path === curr.path);
|
|
218
|
+
if (prev.findLast((imp) => imp.path === curr.path && t(imp.name, name) && imp.isTypeOnly)) return prev;
|
|
219
|
+
if (prev.findLast((imp) => imp.path === curr.path && t(imp.name, name) && imp.isTypeOnly === curr.isTypeOnly && imp.asAlias === curr.asAlias) || Array.isArray(name) && !name.length || (prevByPath === null || prevByPath === void 0 ? void 0 : prevByPath.asAlias) && !curr.asAlias) return prev;
|
|
220
|
+
if (!prevByPath) return [...prev, {
|
|
221
|
+
...curr,
|
|
222
|
+
name: Array.isArray(name) ? [...new Set(name)] : name
|
|
223
|
+
}];
|
|
224
|
+
if (prevByPath && Array.isArray(prevByPath.name) && Array.isArray(curr.name) && prevByPath.isTypeOnly === curr.isTypeOnly) {
|
|
225
|
+
prevByPath.name = [...new Set([...prevByPath.name, ...curr.name])];
|
|
226
|
+
return prev;
|
|
227
|
+
}
|
|
228
|
+
return [...prev, curr];
|
|
229
|
+
}, []);
|
|
230
|
+
}
|
|
231
|
+
function combineImports(imports, exports, source) {
|
|
232
|
+
return orderBy(imports, [
|
|
233
|
+
(v) => !!Array.isArray(v.name),
|
|
234
|
+
(v) => !v.isTypeOnly,
|
|
235
|
+
(v) => v.path,
|
|
236
|
+
(v) => !!v.name,
|
|
237
|
+
(v) => Array.isArray(v.name) ? orderBy(v.name) : v.name
|
|
238
|
+
]).reduce((prev, curr) => {
|
|
239
|
+
let name = Array.isArray(curr.name) ? [...new Set(curr.name)] : curr.name;
|
|
240
|
+
const hasImportInSource = (importName) => {
|
|
241
|
+
if (!source) return true;
|
|
242
|
+
const checker = (name$1) => {
|
|
243
|
+
return name$1 && source.includes(name$1);
|
|
244
|
+
};
|
|
245
|
+
return checker(importName) || exports.some(({ name: name$1 }) => Array.isArray(name$1) ? name$1.some(checker) : checker(name$1));
|
|
246
|
+
};
|
|
247
|
+
if (curr.path === curr.root) return prev;
|
|
248
|
+
if (Array.isArray(name)) name = name.filter((item) => typeof item === "string" ? hasImportInSource(item) : hasImportInSource(item.propertyName));
|
|
249
|
+
const prevByPath = prev.findLast((imp) => imp.path === curr.path && imp.isTypeOnly === curr.isTypeOnly);
|
|
250
|
+
const uniquePrev = prev.findLast((imp) => imp.path === curr.path && t(imp.name, name) && imp.isTypeOnly === curr.isTypeOnly);
|
|
251
|
+
if (prev.findLast((imp) => imp.path === curr.path && t(imp.name, name) && imp.isTypeOnly)) return prev;
|
|
252
|
+
if (uniquePrev || Array.isArray(name) && !name.length) return prev;
|
|
253
|
+
if (!prevByPath) return [...prev, {
|
|
254
|
+
...curr,
|
|
255
|
+
name
|
|
256
|
+
}];
|
|
257
|
+
if (prevByPath && Array.isArray(prevByPath.name) && Array.isArray(name) && prevByPath.isTypeOnly === curr.isTypeOnly) {
|
|
258
|
+
prevByPath.name = [...new Set([...prevByPath.name, ...name])];
|
|
259
|
+
return prev;
|
|
260
|
+
}
|
|
261
|
+
if (!Array.isArray(name) && name && !hasImportInSource(name)) return prev;
|
|
262
|
+
return [...prev, curr];
|
|
263
|
+
}, []);
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Helper to create a file with name and id set
|
|
267
|
+
*/
|
|
268
|
+
function createFile(file) {
|
|
269
|
+
var _file$exports, _file$imports, _file$sources;
|
|
270
|
+
const extname = path.extname(file.baseName);
|
|
271
|
+
if (!extname) throw new Error(`No extname found for ${file.baseName}`);
|
|
272
|
+
const source = file.sources.map((item) => item.value).join("\n\n");
|
|
273
|
+
const exports = ((_file$exports = file.exports) === null || _file$exports === void 0 ? void 0 : _file$exports.length) ? combineExports(file.exports) : [];
|
|
274
|
+
const imports = ((_file$imports = file.imports) === null || _file$imports === void 0 ? void 0 : _file$imports.length) && source ? combineImports(file.imports, exports, source) : [];
|
|
275
|
+
const sources = ((_file$sources = file.sources) === null || _file$sources === void 0 ? void 0 : _file$sources.length) ? combineSources(file.sources) : [];
|
|
276
|
+
return {
|
|
277
|
+
...file,
|
|
278
|
+
id: hashObject({ path: file.path }),
|
|
279
|
+
name: trimExtName(file.baseName),
|
|
280
|
+
extname,
|
|
281
|
+
imports,
|
|
282
|
+
exports,
|
|
283
|
+
sources,
|
|
284
|
+
meta: file.meta || {}
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
//#endregion
|
|
289
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/typeof.js
|
|
290
|
+
function _typeof(o) {
|
|
291
|
+
"@babel/helpers - typeof";
|
|
292
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
|
|
293
|
+
return typeof o$1;
|
|
294
|
+
} : function(o$1) {
|
|
295
|
+
return o$1 && "function" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? "symbol" : typeof o$1;
|
|
296
|
+
}, _typeof(o);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/toPrimitive.js
|
|
301
|
+
function toPrimitive(t$5, r$4) {
|
|
302
|
+
if ("object" != _typeof(t$5) || !t$5) return t$5;
|
|
303
|
+
var e$2 = t$5[Symbol.toPrimitive];
|
|
304
|
+
if (void 0 !== e$2) {
|
|
305
|
+
var i$2 = e$2.call(t$5, r$4 || "default");
|
|
306
|
+
if ("object" != _typeof(i$2)) return i$2;
|
|
307
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
308
|
+
}
|
|
309
|
+
return ("string" === r$4 ? String : Number)(t$5);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
//#endregion
|
|
313
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/toPropertyKey.js
|
|
314
|
+
function toPropertyKey(t$5) {
|
|
315
|
+
var i$2 = toPrimitive(t$5, "string");
|
|
316
|
+
return "symbol" == _typeof(i$2) ? i$2 : i$2 + "";
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
//#endregion
|
|
320
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/defineProperty.js
|
|
321
|
+
function _defineProperty(e$2, r$4, t$5) {
|
|
322
|
+
return (r$4 = toPropertyKey(r$4)) in e$2 ? Object.defineProperty(e$2, r$4, {
|
|
323
|
+
value: t$5,
|
|
324
|
+
enumerable: !0,
|
|
325
|
+
configurable: !0,
|
|
326
|
+
writable: !0
|
|
327
|
+
}) : e$2[r$4] = t$5, e$2;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
//#endregion
|
|
331
|
+
export { _classPrivateFieldInitSpec as a, _assertClassBrand as i, createFile as n, _classPrivateFieldGet2 as r, _defineProperty as t };
|
|
332
|
+
//# sourceMappingURL=defineProperty-BtekiGIK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defineProperty-BtekiGIK.js","names":["e","r","n","t","t","i","n","e","r","t","n","r","e","t","a","e","r","i","n","t","r","n","i","e","t","e","n","r","i","a","e","t","n","r","i","a","uniqueBy","isDeepEqual","name"],"sources":["../../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/lazyDataLastImpl-BDhrIOwR.js","../../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/purry-DH9cw9sy.js","../../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/utilityEvaluators-DORpnx39.js","../../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/pipe-jLehR9-P.js","../../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/purryFromLazy-3oywCNIb.js","../../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/isDeepEqual-jLo35Woq.js","../../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/uniqueBy-C_PxkF_D.js","../src/createFile.ts"],"sourcesContent":["function e(e,t,n){let r=n=>e(n,...t);return n===void 0?r:Object.assign(r,{lazy:n,lazyArgs:t})}export{e as lazyDataLastImpl};\n//# sourceMappingURL=lazyDataLastImpl-BDhrIOwR.js.map","import{lazyDataLastImpl as e}from\"./lazyDataLastImpl-BDhrIOwR.js\";function t(t,n,r){let i=t.length-n.length;if(i===0)return t(...n);if(i===1)return e(t,n,r);throw Error(`Wrong number of arguments`)}export{t as purry};\n//# sourceMappingURL=purry-DH9cw9sy.js.map","const e={done:!0,hasNext:!1},t={done:!1,hasNext:!1},n=()=>e,r=e=>({hasNext:!0,next:e,done:!1});export{t as SKIP_ITEM,n as lazyEmptyEvaluator,r as lazyIdentityEvaluator};\n//# sourceMappingURL=utilityEvaluators-DORpnx39.js.map","import{SKIP_ITEM as e}from\"./utilityEvaluators-DORpnx39.js\";function t(e,...t){let a=e,o=t.map(e=>`lazy`in e?r(e):void 0),s=0;for(;s<t.length;){if(o[s]===void 0||!i(a)){let e=t[s];a=e(a),s+=1;continue}let e=[];for(let n=s;n<t.length;n++){let t=o[n];if(t===void 0||(e.push(t),t.isSingle))break}let r=[];for(let t of a)if(n(t,r,e))break;let{isSingle:c}=e.at(-1);a=c?r[0]:r,s+=e.length}return a}function n(t,r,i){if(i.length===0)return r.push(t),!1;let a=t,o=e,s=!1;for(let[e,t]of i.entries()){let{index:c,items:l}=t;if(l.push(a),o=t(a,c,l),t.index+=1,o.hasNext){if(o.hasMany??!1){for(let t of o.next)if(n(t,r,i.slice(e+1)))return!0;return s}a=o.next}if(!o.hasNext)break;o.done&&(s=!0)}return o.hasNext&&r.push(a),s}function r(e){let{lazy:t,lazyArgs:n}=e,r=t(...n);return Object.assign(r,{isSingle:t.single??!1,index:0,items:[]})}function i(e){return typeof e==`string`||typeof e==`object`&&!!e&&Symbol.iterator in e}export{t as pipe};\n//# sourceMappingURL=pipe-jLehR9-P.js.map","import{pipe as e}from\"./pipe-jLehR9-P.js\";function t(t,n){let r=n.length-t.length;if(r===1){let[r,...i]=n;return e(r,{lazy:t,lazyArgs:i})}if(r===0){let r={lazy:t,lazyArgs:n};return Object.assign(t=>e(t,r),r)}throw Error(`Wrong number of arguments`)}export{t as purryFromLazy};\n//# sourceMappingURL=purryFromLazy-3oywCNIb.js.map","import{purry as e}from\"./purry-DH9cw9sy.js\";function t(...t){return e(n,t)}function n(e,t){if(e===t||Object.is(e,t))return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;if(Array.isArray(e))return r(e,t);if(e instanceof Map)return i(e,t);if(e instanceof Set)return a(e,t);if(e instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp)return e.toString()===t.toString();if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let[r,i]of Object.entries(e))if(!(r in t)||!n(i,t[r]))return!1;return!0}function r(e,t){if(e.length!==t.length)return!1;for(let[r,i]of e.entries())if(!n(i,t[r]))return!1;return!0}function i(e,t){if(e.size!==t.size)return!1;for(let[r,i]of e.entries())if(!t.has(r)||!n(i,t.get(r)))return!1;return!0}function a(e,t){if(e.size!==t.size)return!1;let r=[...t];for(let t of e){let e=!1;for(let[i,a]of r.entries())if(n(t,a)){e=!0,r.splice(i,1);break}if(!e)return!1}return!0}export{t as isDeepEqual};\n//# sourceMappingURL=isDeepEqual-jLo35Woq.js.map","import{SKIP_ITEM as e}from\"./utilityEvaluators-DORpnx39.js\";import{purryFromLazy as t}from\"./purryFromLazy-3oywCNIb.js\";function n(...e){return t(r,e)}function r(t){let n=t,r=new Set;return(t,i,a)=>{let o=n(t,i,a);return r.has(o)?e:(r.add(o),{done:!1,hasNext:!0,next:t})}}export{n as uniqueBy};\n//# sourceMappingURL=uniqueBy-C_PxkF_D.js.map","import type * as KubbFile from './KubbFile.ts'\nimport { trimExtName } from './utils/trimExtName.ts'\nimport { createHash } from 'node:crypto'\nimport path from 'node:path'\nimport { isDeepEqual, uniqueBy } from 'remeda'\nimport { orderBy } from 'natural-orderby'\n\nfunction hashObject(obj: Record<string, unknown>): string {\n const str = JSON.stringify(obj, Object.keys(obj).sort())\n return createHash('sha256').update(str).digest('hex')\n}\n\nexport function combineSources(sources: Array<KubbFile.Source>): Array<KubbFile.Source> {\n return uniqueBy(sources, (obj) => [obj.name, obj.isExportable, obj.isTypeOnly] as const)\n}\n\nexport function combineExports(exports: Array<KubbFile.Export>): Array<KubbFile.Export> {\n return orderBy(exports, [\n (v) => !!Array.isArray(v.name),\n (v) => !v.isTypeOnly,\n (v) => v.path,\n (v) => !!v.name,\n (v) => (Array.isArray(v.name) ? orderBy(v.name) : v.name),\n ]).reduce(\n (prev, curr) => {\n const name = curr.name\n const prevByPath = prev.findLast((imp) => imp.path === curr.path)\n const prevByPathAndIsTypeOnly = prev.findLast((imp) => imp.path === curr.path && isDeepEqual(imp.name, name) && imp.isTypeOnly)\n\n if (prevByPathAndIsTypeOnly) {\n // we already have an export that has the same path but uses `isTypeOnly` (export type ...)\n return prev\n }\n\n const uniquePrev = prev.findLast(\n (imp) => imp.path === curr.path && isDeepEqual(imp.name, name) && imp.isTypeOnly === curr.isTypeOnly && imp.asAlias === curr.asAlias,\n )\n\n // we already have an item that was unique enough or name field is empty or prev asAlias is set but current has no changes\n if (uniquePrev || (Array.isArray(name) && !name.length) || (prevByPath?.asAlias && !curr.asAlias)) {\n return prev\n }\n\n if (!prevByPath) {\n return [\n ...prev,\n {\n ...curr,\n name: Array.isArray(name) ? [...new Set(name)] : name,\n },\n ]\n }\n\n // merge all names when prev and current both have the same isTypeOnly set\n if (prevByPath && Array.isArray(prevByPath.name) && Array.isArray(curr.name) && prevByPath.isTypeOnly === curr.isTypeOnly) {\n prevByPath.name = [...new Set([...prevByPath.name, ...curr.name])]\n\n return prev\n }\n\n return [...prev, curr]\n },\n [] as Array<KubbFile.Export>,\n )\n}\n\nexport function combineImports(imports: Array<KubbFile.Import>, exports: Array<KubbFile.Export>, source?: string): Array<KubbFile.Import> {\n return orderBy(imports, [\n (v) => !!Array.isArray(v.name),\n (v) => !v.isTypeOnly,\n (v) => v.path,\n (v) => !!v.name,\n (v) => (Array.isArray(v.name) ? orderBy(v.name) : v.name),\n ]).reduce(\n (prev, curr) => {\n let name = Array.isArray(curr.name) ? [...new Set(curr.name)] : curr.name\n\n const hasImportInSource = (importName: string) => {\n if (!source) {\n return true\n }\n\n const checker = (name?: string) => {\n return name && source.includes(name)\n }\n\n return checker(importName) || exports.some(({ name }) => (Array.isArray(name) ? name.some(checker) : checker(name)))\n }\n\n if (curr.path === curr.root) {\n // root and path are the same file, remove the \"./\" import\n return prev\n }\n\n // merge all names and check if the importName is being used in the generated source and if not filter those imports out\n if (Array.isArray(name)) {\n name = name.filter((item) => (typeof item === 'string' ? hasImportInSource(item) : hasImportInSource(item.propertyName)))\n }\n\n const prevByPath = prev.findLast((imp) => imp.path === curr.path && imp.isTypeOnly === curr.isTypeOnly)\n const uniquePrev = prev.findLast((imp) => imp.path === curr.path && isDeepEqual(imp.name, name) && imp.isTypeOnly === curr.isTypeOnly)\n const prevByPathNameAndIsTypeOnly = prev.findLast((imp) => imp.path === curr.path && isDeepEqual(imp.name, name) && imp.isTypeOnly)\n\n if (prevByPathNameAndIsTypeOnly) {\n // we already have an export that has the same path but uses `isTypeOnly` (import type ...)\n return prev\n }\n\n // already unique enough or name is empty\n if (uniquePrev || (Array.isArray(name) && !name.length)) {\n return prev\n }\n\n // new item, append name\n if (!prevByPath) {\n return [\n ...prev,\n {\n ...curr,\n name,\n },\n ]\n }\n\n // merge all names when prev and current both have the same isTypeOnly set\n if (prevByPath && Array.isArray(prevByPath.name) && Array.isArray(name) && prevByPath.isTypeOnly === curr.isTypeOnly) {\n prevByPath.name = [...new Set([...prevByPath.name, ...name])]\n\n return prev\n }\n\n // no import was found in the source, ignore import\n if (!Array.isArray(name) && name && !hasImportInSource(name)) {\n return prev\n }\n\n return [...prev, curr]\n },\n [] as Array<KubbFile.Import>,\n )\n}\n\n/**\n * Helper to create a file with name and id set\n */\nexport function createFile<TMeta extends object = object>(file: KubbFile.File<TMeta>): KubbFile.ResolvedFile<TMeta> {\n const extname = path.extname(file.baseName) as KubbFile.Extname\n if (!extname) {\n throw new Error(`No extname found for ${file.baseName}`)\n }\n\n const source = file.sources.map((item) => item.value).join('\\n\\n')\n const exports = file.exports?.length ? combineExports(file.exports) : []\n const imports = file.imports?.length && source ? combineImports(file.imports, exports, source) : []\n const sources = file.sources?.length ? combineSources(file.sources) : []\n\n return {\n ...file,\n id: hashObject({ path: file.path }),\n name: trimExtName(file.baseName),\n extname,\n imports: imports,\n exports: exports,\n sources: sources,\n meta: file.meta || ({} as TMeta),\n }\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,IAAE,KAAE,KAAE,KAAE;CAAC,IAAIC,OAAE,QAAGD,IAAEE,KAAE,GAAGC,IAAE;AAAC,QAAOD,QAAI,KAAK,IAAED,MAAE,OAAO,OA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