@kubb/fabric-core 0.0.0-canary-20260112115803 → 0.0.0-canary-20260113205926
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/{Fabric-CDFwTDyP.d.ts → Fabric-4XbXcu8_.d.cts} +4 -118
- package/dist/{Fabric-BXYWK9V4.d.cts → Fabric-BTRMItqi.d.ts} +4 -118
- package/dist/FileCollector-8RJHS5I3.d.ts +26 -0
- package/dist/FileCollector-lJGpddxr.d.cts +26 -0
- package/dist/KubbFile-BqiYGIzl.d.cts +118 -0
- package/dist/KubbFile-DSLdZhaI.d.ts +118 -0
- package/dist/classPrivateFieldSet2-DrVq6yr-.cjs +62 -0
- package/dist/classPrivateFieldSet2-Dy82u8wh.js +32 -0
- package/dist/{defaultParser-DPHcM2NR.js → defaultParser-CQ-4-EIF.js} +2 -2
- package/dist/{defaultParser-DPHcM2NR.js.map → defaultParser-CQ-4-EIF.js.map} +1 -1
- package/dist/{defineParser-Bxv4mb-N.js → defineParser-_trfFm28.js} +1 -1
- package/dist/{defineParser-Bxv4mb-N.js.map → defineParser-_trfFm28.js.map} +1 -1
- package/dist/{defineProperty-hUmuXj5B.cjs → defineProperty-BAD-J6vV.cjs} +5 -66
- package/dist/{defineProperty-hUmuXj5B.cjs.map → defineProperty-BAD-J6vV.cjs.map} +1 -1
- package/dist/{defineProperty-CS9Uk_6Q.js → defineProperty-DMYokRGX.js} +7 -38
- package/dist/{defineProperty-CS9Uk_6Q.js.map → defineProperty-DMYokRGX.js.map} +1 -1
- package/dist/{getRelativePath-DayVrg5k.js → getRelativePath-CHV9GNVv.js} +1 -1
- package/dist/{getRelativePath-DayVrg5k.js.map → getRelativePath-CHV9GNVv.js.map} +1 -1
- package/dist/{getRelativePath-CLj7Ou6d.cjs → getRelativePath-CMRL1NPO.cjs} +1 -1
- package/dist/{getRelativePath-CLj7Ou6d.cjs.map → getRelativePath-CMRL1NPO.cjs.map} +1 -1
- package/dist/index.cjs +173 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +105 -3
- package/dist/index.d.ts +105 -3
- package/dist/index.js +126 -5
- package/dist/index.js.map +1 -1
- package/dist/parsers/typescript.cjs +1 -1
- package/dist/parsers/typescript.d.cts +1 -1
- package/dist/parsers/typescript.d.ts +1 -1
- package/dist/parsers/typescript.js +3 -3
- package/dist/parsers.d.cts +1 -1
- package/dist/parsers.d.ts +1 -1
- package/dist/parsers.js +2 -2
- package/dist/plugins.cjs +10 -9
- package/dist/plugins.cjs.map +1 -1
- package/dist/plugins.d.cts +2 -1
- package/dist/plugins.d.ts +2 -1
- package/dist/plugins.js +3 -2
- package/dist/plugins.js.map +1 -1
- package/dist/{trimExtName-Dq2Z7SCT.js → trimExtName-C94zbVlg.js} +1 -1
- package/dist/{trimExtName-Dq2Z7SCT.js.map → trimExtName-C94zbVlg.js.map} +1 -1
- package/dist/types.d.cts +2 -1
- package/dist/types.d.ts +2 -1
- package/dist/utils.cjs +52 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.cts +14 -0
- package/dist/utils.d.ts +14 -0
- package/dist/utils.js +51 -0
- package/dist/utils.js.map +1 -0
- package/package.json +8 -1
- package/src/composables/useApp.ts +15 -0
- package/src/composables/useContext.ts +16 -0
- package/src/composables/useFile.ts +16 -0
- package/src/composables/useLifecycle.ts +13 -0
- package/src/context.ts +82 -0
- package/src/contexts/AppContext.ts +11 -0
- package/src/contexts/FileCollectorContext.ts +18 -0
- package/src/contexts/RootContext.ts +12 -0
- package/src/index.ts +10 -0
- package/src/utils/FileCollector.ts +30 -0
- package/src/utils/createJSDoc.ts +15 -0
- package/src/utils/index.ts +2 -0
|
@@ -1,119 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
type BasePath<T extends string = string> = `${T}/`;
|
|
5
|
-
type Import = {
|
|
6
|
-
/**
|
|
7
|
-
* Import name to be used
|
|
8
|
-
* @example ["useState"]
|
|
9
|
-
* @example "React"
|
|
10
|
-
*/
|
|
11
|
-
name: string | Array<string | {
|
|
12
|
-
propertyName: string;
|
|
13
|
-
name?: string;
|
|
14
|
-
}>;
|
|
15
|
-
/**
|
|
16
|
-
* Path for the import
|
|
17
|
-
* @example '@kubb/core'
|
|
18
|
-
*/
|
|
19
|
-
path: string;
|
|
20
|
-
/**
|
|
21
|
-
* Add `type` prefix to the import, this will result in: `import type { Type } from './path'`.
|
|
22
|
-
*/
|
|
23
|
-
isTypeOnly?: boolean;
|
|
24
|
-
isNameSpace?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* When root is set it will get the path with relative getRelativePath(root, path).
|
|
27
|
-
*/
|
|
28
|
-
root?: string;
|
|
29
|
-
};
|
|
30
|
-
type Source = {
|
|
31
|
-
name?: string;
|
|
32
|
-
value?: string;
|
|
33
|
-
isTypeOnly?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Has const or type 'export'
|
|
36
|
-
* @default false
|
|
37
|
-
*/
|
|
38
|
-
isExportable?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* When set, barrel generation will add this
|
|
41
|
-
* @default false
|
|
42
|
-
*/
|
|
43
|
-
isIndexable?: boolean;
|
|
44
|
-
};
|
|
45
|
-
type Export = {
|
|
46
|
-
/**
|
|
47
|
-
* Export name to be used.
|
|
48
|
-
* @example ["useState"]
|
|
49
|
-
* @example "React"
|
|
50
|
-
*/
|
|
51
|
-
name?: string | Array<string>;
|
|
52
|
-
/**
|
|
53
|
-
* Path for the import.
|
|
54
|
-
* @example '@kubb/core'
|
|
55
|
-
*/
|
|
56
|
-
path: string;
|
|
57
|
-
/**
|
|
58
|
-
* Add `type` prefix to the export, this will result in: `export type { Type } from './path'`.
|
|
59
|
-
*/
|
|
60
|
-
isTypeOnly?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Make it possible to override the name, this will result in: `export * as aliasName from './path'`.
|
|
63
|
-
*/
|
|
64
|
-
asAlias?: boolean;
|
|
65
|
-
};
|
|
66
|
-
type Extname = '.ts' | '.js' | '.tsx' | '.json' | `.${string}`;
|
|
67
|
-
type Mode = 'single' | 'split';
|
|
68
|
-
/**
|
|
69
|
-
* Name to be used to dynamicly create the baseName(based on input.path)
|
|
70
|
-
* Based on UNIX basename
|
|
71
|
-
* @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
|
|
72
|
-
*/
|
|
73
|
-
type BaseName = `${string}.${string}`;
|
|
74
|
-
/**
|
|
75
|
-
* Path will be full qualified path to a specified file
|
|
76
|
-
*/
|
|
77
|
-
type Path = string;
|
|
78
|
-
type AdvancedPath<T extends BaseName = BaseName> = `${BasePath}${T}`;
|
|
79
|
-
type File<TMeta extends object = object> = {
|
|
80
|
-
/**
|
|
81
|
-
* Name to be used to create the path
|
|
82
|
-
* Based on UNIX basename, `${name}.extname`
|
|
83
|
-
* @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
|
|
84
|
-
*/
|
|
85
|
-
baseName: BaseName;
|
|
86
|
-
/**
|
|
87
|
-
* Path will be full qualified path to a specified file
|
|
88
|
-
*/
|
|
89
|
-
path: AdvancedPath<BaseName> | Path;
|
|
90
|
-
sources: Array<Source>;
|
|
91
|
-
imports?: Array<Import>;
|
|
92
|
-
exports?: Array<Export>;
|
|
93
|
-
/**
|
|
94
|
-
* Use extra meta, this is getting used to generate the barrel/index files.
|
|
95
|
-
*/
|
|
96
|
-
meta?: TMeta;
|
|
97
|
-
banner?: string;
|
|
98
|
-
footer?: string;
|
|
99
|
-
};
|
|
100
|
-
type ResolvedImport = Import;
|
|
101
|
-
type ResolvedExport = Export;
|
|
102
|
-
type ResolvedFile<TMeta extends object = object> = File<TMeta> & {
|
|
103
|
-
/**
|
|
104
|
-
* @default hash
|
|
105
|
-
*/
|
|
106
|
-
id: string;
|
|
107
|
-
/**
|
|
108
|
-
* Contains the first part of the baseName, generated based on baseName
|
|
109
|
-
* @link https://nodejs.org/api/path.html#pathformatpathobject
|
|
110
|
-
*/
|
|
111
|
-
name: string;
|
|
112
|
-
extname: Extname;
|
|
113
|
-
imports: Array<ResolvedImport>;
|
|
114
|
-
exports: Array<ResolvedExport>;
|
|
115
|
-
};
|
|
116
|
-
//#endregion
|
|
1
|
+
import { a as ResolvedFile, i as Path, n as File, t as Extname } from "./KubbFile-BqiYGIzl.cjs";
|
|
2
|
+
|
|
117
3
|
//#region src/parsers/types.d.ts
|
|
118
4
|
type PrintOptions = {
|
|
119
5
|
extname?: Extname;
|
|
@@ -414,5 +300,5 @@ interface Fabric<T extends FabricOptions = FabricOptions> extends Kubb.Fabric {
|
|
|
414
300
|
upsertFile(...files: File[]): Promise<void>;
|
|
415
301
|
}
|
|
416
302
|
//#endregion
|
|
417
|
-
export { FabricOptions as a, FileManager as c, UserParser as d,
|
|
418
|
-
//# sourceMappingURL=Fabric-
|
|
303
|
+
export { FabricOptions as a, FileManager as c, UserParser as d, FabricMode as i, FileProcessor as l, FabricConfig as n, Plugin as o, FabricContext as r, UserPlugin as s, Fabric as t, Parser as u };
|
|
304
|
+
//# sourceMappingURL=Fabric-4XbXcu8_.d.cts.map
|
|
@@ -1,119 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
type BasePath<T extends string = string> = `${T}/`;
|
|
5
|
-
type Import = {
|
|
6
|
-
/**
|
|
7
|
-
* Import name to be used
|
|
8
|
-
* @example ["useState"]
|
|
9
|
-
* @example "React"
|
|
10
|
-
*/
|
|
11
|
-
name: string | Array<string | {
|
|
12
|
-
propertyName: string;
|
|
13
|
-
name?: string;
|
|
14
|
-
}>;
|
|
15
|
-
/**
|
|
16
|
-
* Path for the import
|
|
17
|
-
* @example '@kubb/core'
|
|
18
|
-
*/
|
|
19
|
-
path: string;
|
|
20
|
-
/**
|
|
21
|
-
* Add `type` prefix to the import, this will result in: `import type { Type } from './path'`.
|
|
22
|
-
*/
|
|
23
|
-
isTypeOnly?: boolean;
|
|
24
|
-
isNameSpace?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* When root is set it will get the path with relative getRelativePath(root, path).
|
|
27
|
-
*/
|
|
28
|
-
root?: string;
|
|
29
|
-
};
|
|
30
|
-
type Source = {
|
|
31
|
-
name?: string;
|
|
32
|
-
value?: string;
|
|
33
|
-
isTypeOnly?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Has const or type 'export'
|
|
36
|
-
* @default false
|
|
37
|
-
*/
|
|
38
|
-
isExportable?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* When set, barrel generation will add this
|
|
41
|
-
* @default false
|
|
42
|
-
*/
|
|
43
|
-
isIndexable?: boolean;
|
|
44
|
-
};
|
|
45
|
-
type Export = {
|
|
46
|
-
/**
|
|
47
|
-
* Export name to be used.
|
|
48
|
-
* @example ["useState"]
|
|
49
|
-
* @example "React"
|
|
50
|
-
*/
|
|
51
|
-
name?: string | Array<string>;
|
|
52
|
-
/**
|
|
53
|
-
* Path for the import.
|
|
54
|
-
* @example '@kubb/core'
|
|
55
|
-
*/
|
|
56
|
-
path: string;
|
|
57
|
-
/**
|
|
58
|
-
* Add `type` prefix to the export, this will result in: `export type { Type } from './path'`.
|
|
59
|
-
*/
|
|
60
|
-
isTypeOnly?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Make it possible to override the name, this will result in: `export * as aliasName from './path'`.
|
|
63
|
-
*/
|
|
64
|
-
asAlias?: boolean;
|
|
65
|
-
};
|
|
66
|
-
type Extname = '.ts' | '.js' | '.tsx' | '.json' | `.${string}`;
|
|
67
|
-
type Mode = 'single' | 'split';
|
|
68
|
-
/**
|
|
69
|
-
* Name to be used to dynamicly create the baseName(based on input.path)
|
|
70
|
-
* Based on UNIX basename
|
|
71
|
-
* @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
|
|
72
|
-
*/
|
|
73
|
-
type BaseName = `${string}.${string}`;
|
|
74
|
-
/**
|
|
75
|
-
* Path will be full qualified path to a specified file
|
|
76
|
-
*/
|
|
77
|
-
type Path = string;
|
|
78
|
-
type AdvancedPath<T extends BaseName = BaseName> = `${BasePath}${T}`;
|
|
79
|
-
type File<TMeta extends object = object> = {
|
|
80
|
-
/**
|
|
81
|
-
* Name to be used to create the path
|
|
82
|
-
* Based on UNIX basename, `${name}.extname`
|
|
83
|
-
* @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
|
|
84
|
-
*/
|
|
85
|
-
baseName: BaseName;
|
|
86
|
-
/**
|
|
87
|
-
* Path will be full qualified path to a specified file
|
|
88
|
-
*/
|
|
89
|
-
path: AdvancedPath<BaseName> | Path;
|
|
90
|
-
sources: Array<Source>;
|
|
91
|
-
imports?: Array<Import>;
|
|
92
|
-
exports?: Array<Export>;
|
|
93
|
-
/**
|
|
94
|
-
* Use extra meta, this is getting used to generate the barrel/index files.
|
|
95
|
-
*/
|
|
96
|
-
meta?: TMeta;
|
|
97
|
-
banner?: string;
|
|
98
|
-
footer?: string;
|
|
99
|
-
};
|
|
100
|
-
type ResolvedImport = Import;
|
|
101
|
-
type ResolvedExport = Export;
|
|
102
|
-
type ResolvedFile<TMeta extends object = object> = File<TMeta> & {
|
|
103
|
-
/**
|
|
104
|
-
* @default hash
|
|
105
|
-
*/
|
|
106
|
-
id: string;
|
|
107
|
-
/**
|
|
108
|
-
* Contains the first part of the baseName, generated based on baseName
|
|
109
|
-
* @link https://nodejs.org/api/path.html#pathformatpathobject
|
|
110
|
-
*/
|
|
111
|
-
name: string;
|
|
112
|
-
extname: Extname;
|
|
113
|
-
imports: Array<ResolvedImport>;
|
|
114
|
-
exports: Array<ResolvedExport>;
|
|
115
|
-
};
|
|
116
|
-
//#endregion
|
|
1
|
+
import { a as ResolvedFile, i as Path, n as File, t as Extname } from "./KubbFile-DSLdZhaI.js";
|
|
2
|
+
|
|
117
3
|
//#region src/parsers/types.d.ts
|
|
118
4
|
type PrintOptions = {
|
|
119
5
|
extname?: Extname;
|
|
@@ -414,5 +300,5 @@ interface Fabric<T extends FabricOptions = FabricOptions> extends Kubb.Fabric {
|
|
|
414
300
|
upsertFile(...files: File[]): Promise<void>;
|
|
415
301
|
}
|
|
416
302
|
//#endregion
|
|
417
|
-
export { FabricOptions as a, FileManager as c, UserParser as d,
|
|
418
|
-
//# sourceMappingURL=Fabric-
|
|
303
|
+
export { FabricOptions as a, FileManager as c, UserParser as d, FabricMode as i, FileProcessor as l, FabricConfig as n, Plugin as o, FabricContext as r, UserPlugin as s, Fabric as t, Parser as u };
|
|
304
|
+
//# sourceMappingURL=Fabric-BTRMItqi.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { n as File } from "./KubbFile-DSLdZhaI.js";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/FileCollector.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* FileCollector is used to collect files from components via context
|
|
7
|
+
* instead of walking the DOM tree.
|
|
8
|
+
*/
|
|
9
|
+
declare class FileCollector {
|
|
10
|
+
#private;
|
|
11
|
+
/**
|
|
12
|
+
* Add a file to the collector
|
|
13
|
+
*/
|
|
14
|
+
add(file: File): void;
|
|
15
|
+
/**
|
|
16
|
+
* Get all collected files
|
|
17
|
+
*/
|
|
18
|
+
get files(): Array<File>;
|
|
19
|
+
/**
|
|
20
|
+
* Clear all collected files
|
|
21
|
+
*/
|
|
22
|
+
clear(): void;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { FileCollector as t };
|
|
26
|
+
//# sourceMappingURL=FileCollector-8RJHS5I3.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { n as File } from "./KubbFile-BqiYGIzl.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/FileCollector.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* FileCollector is used to collect files from components via context
|
|
7
|
+
* instead of walking the DOM tree.
|
|
8
|
+
*/
|
|
9
|
+
declare class FileCollector {
|
|
10
|
+
#private;
|
|
11
|
+
/**
|
|
12
|
+
* Add a file to the collector
|
|
13
|
+
*/
|
|
14
|
+
add(file: File): void;
|
|
15
|
+
/**
|
|
16
|
+
* Get all collected files
|
|
17
|
+
*/
|
|
18
|
+
get files(): Array<File>;
|
|
19
|
+
/**
|
|
20
|
+
* Clear all collected files
|
|
21
|
+
*/
|
|
22
|
+
clear(): void;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { FileCollector as t };
|
|
26
|
+
//# sourceMappingURL=FileCollector-lJGpddxr.d.cts.map
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
declare namespace KubbFile_d_exports {
|
|
2
|
+
export { AdvancedPath, BaseName, Export, Extname, File, Import, Mode, Path, ResolvedExport, ResolvedFile, ResolvedImport, Source };
|
|
3
|
+
}
|
|
4
|
+
type BasePath<T extends string = string> = `${T}/`;
|
|
5
|
+
type Import = {
|
|
6
|
+
/**
|
|
7
|
+
* Import name to be used
|
|
8
|
+
* @example ["useState"]
|
|
9
|
+
* @example "React"
|
|
10
|
+
*/
|
|
11
|
+
name: string | Array<string | {
|
|
12
|
+
propertyName: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* Path for the import
|
|
17
|
+
* @example '@kubb/core'
|
|
18
|
+
*/
|
|
19
|
+
path: string;
|
|
20
|
+
/**
|
|
21
|
+
* Add `type` prefix to the import, this will result in: `import type { Type } from './path'`.
|
|
22
|
+
*/
|
|
23
|
+
isTypeOnly?: boolean;
|
|
24
|
+
isNameSpace?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* When root is set it will get the path with relative getRelativePath(root, path).
|
|
27
|
+
*/
|
|
28
|
+
root?: string;
|
|
29
|
+
};
|
|
30
|
+
type Source = {
|
|
31
|
+
name?: string;
|
|
32
|
+
value?: string;
|
|
33
|
+
isTypeOnly?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Has const or type 'export'
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
isExportable?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* When set, barrel generation will add this
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
isIndexable?: boolean;
|
|
44
|
+
};
|
|
45
|
+
type Export = {
|
|
46
|
+
/**
|
|
47
|
+
* Export name to be used.
|
|
48
|
+
* @example ["useState"]
|
|
49
|
+
* @example "React"
|
|
50
|
+
*/
|
|
51
|
+
name?: string | Array<string>;
|
|
52
|
+
/**
|
|
53
|
+
* Path for the import.
|
|
54
|
+
* @example '@kubb/core'
|
|
55
|
+
*/
|
|
56
|
+
path: string;
|
|
57
|
+
/**
|
|
58
|
+
* Add `type` prefix to the export, this will result in: `export type { Type } from './path'`.
|
|
59
|
+
*/
|
|
60
|
+
isTypeOnly?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Make it possible to override the name, this will result in: `export * as aliasName from './path'`.
|
|
63
|
+
*/
|
|
64
|
+
asAlias?: boolean;
|
|
65
|
+
};
|
|
66
|
+
type Extname = '.ts' | '.js' | '.tsx' | '.json' | `.${string}`;
|
|
67
|
+
type Mode = 'single' | 'split';
|
|
68
|
+
/**
|
|
69
|
+
* Name to be used to dynamicly create the baseName(based on input.path)
|
|
70
|
+
* Based on UNIX basename
|
|
71
|
+
* @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
|
|
72
|
+
*/
|
|
73
|
+
type BaseName = `${string}.${string}`;
|
|
74
|
+
/**
|
|
75
|
+
* Path will be full qualified path to a specified file
|
|
76
|
+
*/
|
|
77
|
+
type Path = string;
|
|
78
|
+
type AdvancedPath<T extends BaseName = BaseName> = `${BasePath}${T}`;
|
|
79
|
+
type File<TMeta extends object = object> = {
|
|
80
|
+
/**
|
|
81
|
+
* Name to be used to create the path
|
|
82
|
+
* Based on UNIX basename, `${name}.extname`
|
|
83
|
+
* @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
|
|
84
|
+
*/
|
|
85
|
+
baseName: BaseName;
|
|
86
|
+
/**
|
|
87
|
+
* Path will be full qualified path to a specified file
|
|
88
|
+
*/
|
|
89
|
+
path: AdvancedPath<BaseName> | Path;
|
|
90
|
+
sources: Array<Source>;
|
|
91
|
+
imports?: Array<Import>;
|
|
92
|
+
exports?: Array<Export>;
|
|
93
|
+
/**
|
|
94
|
+
* Use extra meta, this is getting used to generate the barrel/index files.
|
|
95
|
+
*/
|
|
96
|
+
meta?: TMeta;
|
|
97
|
+
banner?: string;
|
|
98
|
+
footer?: string;
|
|
99
|
+
};
|
|
100
|
+
type ResolvedImport = Import;
|
|
101
|
+
type ResolvedExport = Export;
|
|
102
|
+
type ResolvedFile<TMeta extends object = object> = File<TMeta> & {
|
|
103
|
+
/**
|
|
104
|
+
* @default hash
|
|
105
|
+
*/
|
|
106
|
+
id: string;
|
|
107
|
+
/**
|
|
108
|
+
* Contains the first part of the baseName, generated based on baseName
|
|
109
|
+
* @link https://nodejs.org/api/path.html#pathformatpathobject
|
|
110
|
+
*/
|
|
111
|
+
name: string;
|
|
112
|
+
extname: Extname;
|
|
113
|
+
imports: Array<ResolvedImport>;
|
|
114
|
+
exports: Array<ResolvedExport>;
|
|
115
|
+
};
|
|
116
|
+
//#endregion
|
|
117
|
+
export { ResolvedFile as a, Path as i, File as n, KubbFile_d_exports as r, Extname as t };
|
|
118
|
+
//# sourceMappingURL=KubbFile-BqiYGIzl.d.cts.map
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
declare namespace KubbFile_d_exports {
|
|
2
|
+
export { AdvancedPath, BaseName, Export, Extname, File, Import, Mode, Path, ResolvedExport, ResolvedFile, ResolvedImport, Source };
|
|
3
|
+
}
|
|
4
|
+
type BasePath<T extends string = string> = `${T}/`;
|
|
5
|
+
type Import = {
|
|
6
|
+
/**
|
|
7
|
+
* Import name to be used
|
|
8
|
+
* @example ["useState"]
|
|
9
|
+
* @example "React"
|
|
10
|
+
*/
|
|
11
|
+
name: string | Array<string | {
|
|
12
|
+
propertyName: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* Path for the import
|
|
17
|
+
* @example '@kubb/core'
|
|
18
|
+
*/
|
|
19
|
+
path: string;
|
|
20
|
+
/**
|
|
21
|
+
* Add `type` prefix to the import, this will result in: `import type { Type } from './path'`.
|
|
22
|
+
*/
|
|
23
|
+
isTypeOnly?: boolean;
|
|
24
|
+
isNameSpace?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* When root is set it will get the path with relative getRelativePath(root, path).
|
|
27
|
+
*/
|
|
28
|
+
root?: string;
|
|
29
|
+
};
|
|
30
|
+
type Source = {
|
|
31
|
+
name?: string;
|
|
32
|
+
value?: string;
|
|
33
|
+
isTypeOnly?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Has const or type 'export'
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
isExportable?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* When set, barrel generation will add this
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
isIndexable?: boolean;
|
|
44
|
+
};
|
|
45
|
+
type Export = {
|
|
46
|
+
/**
|
|
47
|
+
* Export name to be used.
|
|
48
|
+
* @example ["useState"]
|
|
49
|
+
* @example "React"
|
|
50
|
+
*/
|
|
51
|
+
name?: string | Array<string>;
|
|
52
|
+
/**
|
|
53
|
+
* Path for the import.
|
|
54
|
+
* @example '@kubb/core'
|
|
55
|
+
*/
|
|
56
|
+
path: string;
|
|
57
|
+
/**
|
|
58
|
+
* Add `type` prefix to the export, this will result in: `export type { Type } from './path'`.
|
|
59
|
+
*/
|
|
60
|
+
isTypeOnly?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Make it possible to override the name, this will result in: `export * as aliasName from './path'`.
|
|
63
|
+
*/
|
|
64
|
+
asAlias?: boolean;
|
|
65
|
+
};
|
|
66
|
+
type Extname = '.ts' | '.js' | '.tsx' | '.json' | `.${string}`;
|
|
67
|
+
type Mode = 'single' | 'split';
|
|
68
|
+
/**
|
|
69
|
+
* Name to be used to dynamicly create the baseName(based on input.path)
|
|
70
|
+
* Based on UNIX basename
|
|
71
|
+
* @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
|
|
72
|
+
*/
|
|
73
|
+
type BaseName = `${string}.${string}`;
|
|
74
|
+
/**
|
|
75
|
+
* Path will be full qualified path to a specified file
|
|
76
|
+
*/
|
|
77
|
+
type Path = string;
|
|
78
|
+
type AdvancedPath<T extends BaseName = BaseName> = `${BasePath}${T}`;
|
|
79
|
+
type File<TMeta extends object = object> = {
|
|
80
|
+
/**
|
|
81
|
+
* Name to be used to create the path
|
|
82
|
+
* Based on UNIX basename, `${name}.extname`
|
|
83
|
+
* @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
|
|
84
|
+
*/
|
|
85
|
+
baseName: BaseName;
|
|
86
|
+
/**
|
|
87
|
+
* Path will be full qualified path to a specified file
|
|
88
|
+
*/
|
|
89
|
+
path: AdvancedPath<BaseName> | Path;
|
|
90
|
+
sources: Array<Source>;
|
|
91
|
+
imports?: Array<Import>;
|
|
92
|
+
exports?: Array<Export>;
|
|
93
|
+
/**
|
|
94
|
+
* Use extra meta, this is getting used to generate the barrel/index files.
|
|
95
|
+
*/
|
|
96
|
+
meta?: TMeta;
|
|
97
|
+
banner?: string;
|
|
98
|
+
footer?: string;
|
|
99
|
+
};
|
|
100
|
+
type ResolvedImport = Import;
|
|
101
|
+
type ResolvedExport = Export;
|
|
102
|
+
type ResolvedFile<TMeta extends object = object> = File<TMeta> & {
|
|
103
|
+
/**
|
|
104
|
+
* @default hash
|
|
105
|
+
*/
|
|
106
|
+
id: string;
|
|
107
|
+
/**
|
|
108
|
+
* Contains the first part of the baseName, generated based on baseName
|
|
109
|
+
* @link https://nodejs.org/api/path.html#pathformatpathobject
|
|
110
|
+
*/
|
|
111
|
+
name: string;
|
|
112
|
+
extname: Extname;
|
|
113
|
+
imports: Array<ResolvedImport>;
|
|
114
|
+
exports: Array<ResolvedExport>;
|
|
115
|
+
};
|
|
116
|
+
//#endregion
|
|
117
|
+
export { ResolvedFile as a, Path as i, File as n, KubbFile_d_exports as r, Extname as t };
|
|
118
|
+
//# sourceMappingURL=KubbFile-DSLdZhaI.d.ts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
|
|
2
|
+
//#region \0@oxc-project+runtime@0.103.0/helpers/checkPrivateRedeclaration.js
|
|
3
|
+
function _checkPrivateRedeclaration(e, t) {
|
|
4
|
+
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region \0@oxc-project+runtime@0.103.0/helpers/classPrivateFieldInitSpec.js
|
|
9
|
+
function _classPrivateFieldInitSpec(e, t, a) {
|
|
10
|
+
_checkPrivateRedeclaration(e, t), t.set(e, a);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region \0@oxc-project+runtime@0.103.0/helpers/assertClassBrand.js
|
|
15
|
+
function _assertClassBrand(e, t, n) {
|
|
16
|
+
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
17
|
+
throw new TypeError("Private element is not present on this object");
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region \0@oxc-project+runtime@0.103.0/helpers/classPrivateFieldGet2.js
|
|
22
|
+
function _classPrivateFieldGet2(s, a) {
|
|
23
|
+
return s.get(_assertClassBrand(s, a));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region \0@oxc-project+runtime@0.103.0/helpers/classPrivateFieldSet2.js
|
|
28
|
+
function _classPrivateFieldSet2(s, a, r) {
|
|
29
|
+
return s.set(_assertClassBrand(s, a), r), r;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
Object.defineProperty(exports, '_assertClassBrand', {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () {
|
|
36
|
+
return _assertClassBrand;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, '_checkPrivateRedeclaration', {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () {
|
|
42
|
+
return _checkPrivateRedeclaration;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(exports, '_classPrivateFieldGet2', {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: function () {
|
|
48
|
+
return _classPrivateFieldGet2;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports, '_classPrivateFieldInitSpec', {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () {
|
|
54
|
+
return _classPrivateFieldInitSpec;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(exports, '_classPrivateFieldSet2', {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
get: function () {
|
|
60
|
+
return _classPrivateFieldSet2;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//#region \0@oxc-project+runtime@0.103.0/helpers/checkPrivateRedeclaration.js
|
|
2
|
+
function _checkPrivateRedeclaration(e, t) {
|
|
3
|
+
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region \0@oxc-project+runtime@0.103.0/helpers/classPrivateFieldInitSpec.js
|
|
8
|
+
function _classPrivateFieldInitSpec(e, t, a) {
|
|
9
|
+
_checkPrivateRedeclaration(e, t), t.set(e, a);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region \0@oxc-project+runtime@0.103.0/helpers/assertClassBrand.js
|
|
14
|
+
function _assertClassBrand(e, t, n) {
|
|
15
|
+
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
16
|
+
throw new TypeError("Private element is not present on this object");
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region \0@oxc-project+runtime@0.103.0/helpers/classPrivateFieldGet2.js
|
|
21
|
+
function _classPrivateFieldGet2(s, a) {
|
|
22
|
+
return s.get(_assertClassBrand(s, a));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region \0@oxc-project+runtime@0.103.0/helpers/classPrivateFieldSet2.js
|
|
27
|
+
function _classPrivateFieldSet2(s, a, r) {
|
|
28
|
+
return s.set(_assertClassBrand(s, a), r), r;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { _checkPrivateRedeclaration as a, _classPrivateFieldInitSpec as i, _classPrivateFieldGet2 as n, _assertClassBrand as r, _classPrivateFieldSet2 as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as defineParser } from "./defineParser-
|
|
1
|
+
import { t as defineParser } from "./defineParser-_trfFm28.js";
|
|
2
2
|
|
|
3
3
|
//#region src/parsers/defaultParser.ts
|
|
4
4
|
const defaultParser = defineParser({
|
|
@@ -12,4 +12,4 @@ const defaultParser = defineParser({
|
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
14
14
|
export { defaultParser as t };
|
|
15
|
-
//# sourceMappingURL=defaultParser-
|
|
15
|
+
//# sourceMappingURL=defaultParser-CQ-4-EIF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultParser-
|
|
1
|
+
{"version":3,"file":"defaultParser-CQ-4-EIF.js","names":[],"sources":["../src/parsers/defaultParser.ts"],"sourcesContent":["import { defineParser } from './defineParser.ts'\n\nexport const defaultParser = defineParser({\n name: 'default',\n extNames: ['.json'],\n install() {},\n async parse(file) {\n return file.sources.map((item) => item.value).join('\\n\\n')\n },\n})\n"],"mappings":";;;AAEA,MAAa,gBAAgB,aAAa;CACxC,MAAM;CACN,UAAU,CAAC,QAAQ;CACnB,UAAU;CACV,MAAM,MAAM,MAAM;AAChB,SAAO,KAAK,QAAQ,KAAK,SAAS,KAAK,MAAM,CAAC,KAAK,OAAO;;CAE7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineParser-
|
|
1
|
+
{"version":3,"file":"defineParser-_trfFm28.js","names":[],"sources":["../src/parsers/defineParser.ts"],"sourcesContent":["import type { Parser, UserParser } from './types.ts'\n\nexport function defineParser<TOptions = unknown, TMeta extends object = any>(parser: UserParser<TOptions, TMeta>): Parser<TOptions, TMeta> {\n return {\n type: 'parser',\n ...parser,\n }\n}\n"],"mappings":";AAEA,SAAgB,aAA6D,QAA8D;AACzI,QAAO;EACL,MAAM;EACN,GAAG;EACJ"}
|