@kubb/core 3.16.1 → 3.16.3
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/FileManager-Dk759iZ3.js +918 -0
- package/dist/FileManager-Dk759iZ3.js.map +1 -0
- package/dist/FileManager-DsRjYJa_.cjs +1031 -0
- package/dist/FileManager-DsRjYJa_.cjs.map +1 -0
- package/dist/PluginManager-1jPxuyQK.d.ts +511 -0
- package/dist/PluginManager-Cvj5AlsU.d.cts +511 -0
- package/dist/chunk-DWy1uDak.cjs +39 -0
- package/dist/chunk-DbvY3SJr.js +33 -0
- package/dist/fs-BacxV1CO.js +87 -0
- package/dist/fs-BacxV1CO.js.map +1 -0
- package/dist/fs-BazSaf2y.cjs +129 -0
- package/dist/fs-BazSaf2y.cjs.map +1 -0
- package/dist/fs.cjs +15 -39
- package/dist/fs.d.cts +2 -19
- package/dist/fs.d.ts +2 -19
- package/dist/fs.js +4 -3
- package/dist/index-BKHQGQVq.d.ts +140 -0
- package/dist/index-BfD6z1P5.d.cts +141 -0
- package/dist/index-Cb4pChs8.d.ts +180 -0
- package/dist/index-D2ptHzfn.d.cts +180 -0
- package/dist/index.cjs +1000 -1028
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +107 -89
- package/dist/index.d.ts +107 -89
- package/dist/index.js +1020 -864
- package/dist/index.js.map +1 -1
- package/dist/logger-BxvJpQMX.cjs +1115 -0
- package/dist/logger-BxvJpQMX.cjs.map +1 -0
- package/dist/logger-Cs45J4yy.js +1085 -0
- package/dist/logger-Cs45J4yy.js.map +1 -0
- package/dist/logger-OWS6fqk0.d.cts +69 -0
- package/dist/logger-xcdTETKy.d.ts +69 -0
- package/dist/logger.cjs +6 -24
- package/dist/logger.d.cts +2 -3
- package/dist/logger.d.ts +2 -3
- package/dist/logger.js +4 -4
- package/dist/mocks.cjs +49 -65
- package/dist/mocks.cjs.map +1 -1
- package/dist/mocks.d.cts +6 -6
- package/dist/mocks.d.ts +6 -6
- package/dist/mocks.js +48 -59
- package/dist/mocks.js.map +1 -1
- package/dist/prompt-DwEAzq0q.js +853 -0
- package/dist/prompt-DwEAzq0q.js.map +1 -0
- package/dist/prompt-qiwl6Be9.cjs +855 -0
- package/dist/prompt-qiwl6Be9.cjs.map +1 -0
- package/dist/transformers-B3CHtwuB.cjs +948 -0
- package/dist/transformers-B3CHtwuB.cjs.map +1 -0
- package/dist/transformers-CJqBQFIl.js +829 -0
- package/dist/transformers-CJqBQFIl.js.map +1 -0
- package/dist/transformers.cjs +33 -88
- package/dist/transformers.d.cts +75 -54
- package/dist/transformers.d.ts +75 -54
- package/dist/transformers.js +4 -3
- package/dist/utils.cjs +20 -73
- package/dist/utils.d.cts +5 -126
- package/dist/utils.d.ts +5 -126
- package/dist/utils.js +6 -5
- package/dist/write-CLTPlucv.js +42 -0
- package/dist/write-CLTPlucv.js.map +1 -0
- package/dist/write-l_NzIqyy.cjs +48 -0
- package/dist/write-l_NzIqyy.cjs.map +1 -0
- package/package.json +28 -35
- package/src/BarrelManager.ts +1 -0
- package/src/PromiseManager.ts +1 -7
- package/src/build.ts +9 -11
- package/src/index.ts +5 -5
- package/src/logger.ts +10 -10
- package/src/utils/FunctionParams.ts +3 -1
- package/src/utils/TreeNode.ts +3 -1
- package/dist/PluginManager-E3SghPP9.d.cts +0 -458
- package/dist/PluginManager-PDmRCu9k.d.ts +0 -458
- package/dist/chunk-4V7HK7PT.js +0 -1199
- package/dist/chunk-4V7HK7PT.js.map +0 -1
- package/dist/chunk-BHSTNFNQ.cjs +0 -701
- package/dist/chunk-BHSTNFNQ.cjs.map +0 -1
- package/dist/chunk-CAZ37TGB.js +0 -918
- package/dist/chunk-CAZ37TGB.js.map +0 -1
- package/dist/chunk-E4XLCCPK.cjs +0 -170
- package/dist/chunk-E4XLCCPK.cjs.map +0 -1
- package/dist/chunk-GBYHPDPK.js +0 -595
- package/dist/chunk-GBYHPDPK.js.map +0 -1
- package/dist/chunk-MCNA6SYG.cjs +0 -1231
- package/dist/chunk-MCNA6SYG.cjs.map +0 -1
- package/dist/chunk-QR7CQIA3.cjs +0 -943
- package/dist/chunk-QR7CQIA3.cjs.map +0 -1
- package/dist/chunk-YRPOID7E.js +0 -157
- package/dist/chunk-YRPOID7E.js.map +0 -1
- package/dist/fs.cjs.map +0 -1
- package/dist/fs.js.map +0 -1
- package/dist/logger-BWq-oJU_.d.cts +0 -63
- package/dist/logger-BWq-oJU_.d.ts +0 -63
- package/dist/logger.cjs.map +0 -1
- package/dist/logger.js.map +0 -1
- package/dist/parser-C1vOjVEd.d.ts +0 -41
- package/dist/parser-D6vU1kA9.d.cts +0 -41
- package/dist/prompt-ELTHGQK6.js +0 -753
- package/dist/prompt-ELTHGQK6.js.map +0 -1
- package/dist/prompt-U7M5G25C.cjs +0 -761
- package/dist/prompt-U7M5G25C.cjs.map +0 -1
- package/dist/transformers.cjs.map +0 -1
- package/dist/transformers.js.map +0 -1
- package/dist/types-CA8nQKwM.d.cts +0 -132
- package/dist/types-CA8nQKwM.d.ts +0 -132
- package/dist/utils.cjs.map +0 -1
- package/dist/utils.js.map +0 -1
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { Export, Extname, File, Import, ResolvedExport, ResolvedFile, ResolvedImport } from "./index-BKHQGQVq.js";
|
|
2
|
+
import { Logger } from "./logger-xcdTETKy.js";
|
|
3
|
+
import { Config, PossiblePromise } from "./PluginManager-1jPxuyQK.js";
|
|
4
|
+
|
|
5
|
+
//#region src/utils/FunctionParams.d.ts
|
|
6
|
+
type FunctionParamsASTWithoutType = {
|
|
7
|
+
name?: string;
|
|
8
|
+
type?: string;
|
|
9
|
+
/**
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
12
|
+
required?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
enabled?: boolean;
|
|
17
|
+
default?: string;
|
|
18
|
+
};
|
|
19
|
+
type FunctionParamsASTWithType = {
|
|
20
|
+
name?: never;
|
|
21
|
+
type: string;
|
|
22
|
+
/**
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
required?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
enabled?: boolean;
|
|
30
|
+
default?: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated
|
|
34
|
+
*/
|
|
35
|
+
type FunctionParamsAST = FunctionParamsASTWithoutType | FunctionParamsASTWithType;
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated
|
|
38
|
+
*/
|
|
39
|
+
declare class FunctionParams {
|
|
40
|
+
#private;
|
|
41
|
+
constructor();
|
|
42
|
+
get items(): FunctionParamsAST[];
|
|
43
|
+
add(item: FunctionParamsAST | Array<FunctionParamsAST | FunctionParamsAST[] | undefined> | undefined): FunctionParams;
|
|
44
|
+
static toObject(items: FunctionParamsAST[]): FunctionParamsAST;
|
|
45
|
+
static toString(items: (FunctionParamsAST | FunctionParamsAST[])[]): string;
|
|
46
|
+
toObject(): FunctionParamsAST;
|
|
47
|
+
toString(): string;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/utils/promise.d.ts
|
|
51
|
+
declare function isPromise<T>(result: PossiblePromise<T>): result is Promise<T>;
|
|
52
|
+
declare function isPromiseFulfilledResult<T = unknown>(result: PromiseSettledResult<unknown>): result is PromiseFulfilledResult<T>;
|
|
53
|
+
declare function isPromiseRejectedResult<T>(result: PromiseSettledResult<unknown>): result is Omit<PromiseRejectedResult, 'reason'> & {
|
|
54
|
+
reason: T;
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/utils/renderTemplate.d.ts
|
|
58
|
+
declare function renderTemplate<TData extends Record<string, unknown> = Record<string, unknown>>(template: string, data?: TData | undefined): string;
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/utils/timeout.d.ts
|
|
61
|
+
declare function timeout(ms: number): Promise<unknown>;
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/utils/uniqueName.d.ts
|
|
64
|
+
declare function getUniqueName(originalName: string, data: Record<string, number>): string;
|
|
65
|
+
declare function setUniqueName(originalName: string, data: Record<string, number>): string;
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/utils/URLPath.d.ts
|
|
68
|
+
type URLObject = {
|
|
69
|
+
url: string;
|
|
70
|
+
params?: Record<string, string>;
|
|
71
|
+
};
|
|
72
|
+
type ObjectOptions = {
|
|
73
|
+
type?: 'path' | 'template';
|
|
74
|
+
replacer?: (pathParam: string) => string;
|
|
75
|
+
stringify?: boolean;
|
|
76
|
+
};
|
|
77
|
+
type Options = {
|
|
78
|
+
casing?: 'camelcase';
|
|
79
|
+
};
|
|
80
|
+
declare class URLPath {
|
|
81
|
+
#private;
|
|
82
|
+
path: string;
|
|
83
|
+
constructor(path: string, options?: Options);
|
|
84
|
+
/**
|
|
85
|
+
* Convert Swagger path to URLPath(syntax of Express)
|
|
86
|
+
* @example /pet/{petId} => /pet/:petId
|
|
87
|
+
*/
|
|
88
|
+
get URL(): string;
|
|
89
|
+
get isURL(): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Convert Swagger path to template literals/ template strings(camelcase)
|
|
92
|
+
* @example /pet/{petId} => `/pet/${petId}`
|
|
93
|
+
* @example /account/monetary-accountID => `/account/${monetaryAccountId}`
|
|
94
|
+
* @example /account/userID => `/account/${userId}`
|
|
95
|
+
*/
|
|
96
|
+
get template(): string;
|
|
97
|
+
get object(): URLObject | string;
|
|
98
|
+
get params(): Record<string, string> | undefined;
|
|
99
|
+
toObject({
|
|
100
|
+
type,
|
|
101
|
+
replacer,
|
|
102
|
+
stringify
|
|
103
|
+
}?: ObjectOptions): URLObject | string;
|
|
104
|
+
/**
|
|
105
|
+
* Convert Swagger path to template literals/ template strings(camelcase)
|
|
106
|
+
* @example /pet/{petId} => `/pet/${petId}`
|
|
107
|
+
* @example /account/monetary-accountID => `/account/${monetaryAccountId}`
|
|
108
|
+
* @example /account/userID => `/account/${userId}`
|
|
109
|
+
*/
|
|
110
|
+
toTemplateString({
|
|
111
|
+
prefix,
|
|
112
|
+
replacer
|
|
113
|
+
}?: {
|
|
114
|
+
prefix?: string;
|
|
115
|
+
replacer?: (pathParam: string) => string;
|
|
116
|
+
}): string;
|
|
117
|
+
getParams(replacer?: (pathParam: string) => string): Record<string, string> | undefined;
|
|
118
|
+
/**
|
|
119
|
+
* Convert Swagger path to URLPath(syntax of Express)
|
|
120
|
+
* @example /pet/{petId} => /pet/:petId
|
|
121
|
+
*/
|
|
122
|
+
toURLPath(): string;
|
|
123
|
+
}
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region src/utils/parser.d.ts
|
|
126
|
+
/**
|
|
127
|
+
* Generate a default banner for files created by Kubb
|
|
128
|
+
* @returns A string with the default banner
|
|
129
|
+
*/
|
|
130
|
+
declare function getDefaultBanner({
|
|
131
|
+
title,
|
|
132
|
+
description,
|
|
133
|
+
version,
|
|
134
|
+
config
|
|
135
|
+
}: {
|
|
136
|
+
title?: string;
|
|
137
|
+
description?: string;
|
|
138
|
+
version?: string;
|
|
139
|
+
config: Config;
|
|
140
|
+
}): string;
|
|
141
|
+
/**
|
|
142
|
+
* Helper to create a file with name and id set
|
|
143
|
+
*/
|
|
144
|
+
declare function createFile<TMeta extends object = object>(file: File<TMeta>): ResolvedFile<TMeta>;
|
|
145
|
+
/**
|
|
146
|
+
* Helper to create a fileImport with extname set
|
|
147
|
+
*/
|
|
148
|
+
declare function createFileImport(imp: Import): ResolvedImport;
|
|
149
|
+
/**
|
|
150
|
+
* Helper to create a fileExport with extname set
|
|
151
|
+
*/
|
|
152
|
+
declare function createFileExport(exp: Export): ResolvedExport;
|
|
153
|
+
type ParserModule<TMeta extends object = object> = {
|
|
154
|
+
format: (source: string) => Promise<string>;
|
|
155
|
+
/**
|
|
156
|
+
* Convert a file to string
|
|
157
|
+
*/
|
|
158
|
+
print: (file: ResolvedFile<TMeta>, options: PrintOptions) => Promise<string>;
|
|
159
|
+
};
|
|
160
|
+
declare function createFileParser<TMeta extends object = object>(parser: ParserModule<TMeta>): ParserModule<TMeta>;
|
|
161
|
+
type PrintOptions = {
|
|
162
|
+
extname?: Extname;
|
|
163
|
+
logger?: Logger;
|
|
164
|
+
};
|
|
165
|
+
declare function getFileParser<TMeta extends object = object>(extname: Extname | undefined): Promise<ParserModule<TMeta>>;
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/utils/Cache.d.ts
|
|
168
|
+
declare class Cache<T> {
|
|
169
|
+
#private;
|
|
170
|
+
get(key: string): Promise<T | null>;
|
|
171
|
+
set(key: string, value: T): Promise<void>;
|
|
172
|
+
delete(key: string): Promise<void>;
|
|
173
|
+
clear(): Promise<void>;
|
|
174
|
+
keys(): Promise<string[]>;
|
|
175
|
+
values(): Promise<T[]>;
|
|
176
|
+
flush(): Promise<void>;
|
|
177
|
+
}
|
|
178
|
+
//#endregion
|
|
179
|
+
export { Cache, FunctionParams, type FunctionParamsAST, type ParserModule, type URLObject, URLPath, createFile, createFileExport, createFileImport, createFileParser, getDefaultBanner, getFileParser, getUniqueName, isPromise, isPromiseFulfilledResult, isPromiseRejectedResult, renderTemplate, setUniqueName, timeout };
|
|
180
|
+
//# sourceMappingURL=index-Cb4pChs8.d.ts.map
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { Export, Extname, File, Import, ResolvedExport, ResolvedFile, ResolvedImport } from "./index-BfD6z1P5.cjs";
|
|
2
|
+
import { Logger } from "./logger-OWS6fqk0.cjs";
|
|
3
|
+
import { Config, PossiblePromise } from "./PluginManager-Cvj5AlsU.cjs";
|
|
4
|
+
|
|
5
|
+
//#region src/utils/FunctionParams.d.ts
|
|
6
|
+
type FunctionParamsASTWithoutType = {
|
|
7
|
+
name?: string;
|
|
8
|
+
type?: string;
|
|
9
|
+
/**
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
12
|
+
required?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
enabled?: boolean;
|
|
17
|
+
default?: string;
|
|
18
|
+
};
|
|
19
|
+
type FunctionParamsASTWithType = {
|
|
20
|
+
name?: never;
|
|
21
|
+
type: string;
|
|
22
|
+
/**
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
required?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
enabled?: boolean;
|
|
30
|
+
default?: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated
|
|
34
|
+
*/
|
|
35
|
+
type FunctionParamsAST = FunctionParamsASTWithoutType | FunctionParamsASTWithType;
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated
|
|
38
|
+
*/
|
|
39
|
+
declare class FunctionParams {
|
|
40
|
+
#private;
|
|
41
|
+
constructor();
|
|
42
|
+
get items(): FunctionParamsAST[];
|
|
43
|
+
add(item: FunctionParamsAST | Array<FunctionParamsAST | FunctionParamsAST[] | undefined> | undefined): FunctionParams;
|
|
44
|
+
static toObject(items: FunctionParamsAST[]): FunctionParamsAST;
|
|
45
|
+
static toString(items: (FunctionParamsAST | FunctionParamsAST[])[]): string;
|
|
46
|
+
toObject(): FunctionParamsAST;
|
|
47
|
+
toString(): string;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/utils/promise.d.ts
|
|
51
|
+
declare function isPromise<T>(result: PossiblePromise<T>): result is Promise<T>;
|
|
52
|
+
declare function isPromiseFulfilledResult<T = unknown>(result: PromiseSettledResult<unknown>): result is PromiseFulfilledResult<T>;
|
|
53
|
+
declare function isPromiseRejectedResult<T>(result: PromiseSettledResult<unknown>): result is Omit<PromiseRejectedResult, 'reason'> & {
|
|
54
|
+
reason: T;
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/utils/renderTemplate.d.ts
|
|
58
|
+
declare function renderTemplate<TData extends Record<string, unknown> = Record<string, unknown>>(template: string, data?: TData | undefined): string;
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/utils/timeout.d.ts
|
|
61
|
+
declare function timeout(ms: number): Promise<unknown>;
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/utils/uniqueName.d.ts
|
|
64
|
+
declare function getUniqueName(originalName: string, data: Record<string, number>): string;
|
|
65
|
+
declare function setUniqueName(originalName: string, data: Record<string, number>): string;
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/utils/URLPath.d.ts
|
|
68
|
+
type URLObject = {
|
|
69
|
+
url: string;
|
|
70
|
+
params?: Record<string, string>;
|
|
71
|
+
};
|
|
72
|
+
type ObjectOptions = {
|
|
73
|
+
type?: 'path' | 'template';
|
|
74
|
+
replacer?: (pathParam: string) => string;
|
|
75
|
+
stringify?: boolean;
|
|
76
|
+
};
|
|
77
|
+
type Options = {
|
|
78
|
+
casing?: 'camelcase';
|
|
79
|
+
};
|
|
80
|
+
declare class URLPath {
|
|
81
|
+
#private;
|
|
82
|
+
path: string;
|
|
83
|
+
constructor(path: string, options?: Options);
|
|
84
|
+
/**
|
|
85
|
+
* Convert Swagger path to URLPath(syntax of Express)
|
|
86
|
+
* @example /pet/{petId} => /pet/:petId
|
|
87
|
+
*/
|
|
88
|
+
get URL(): string;
|
|
89
|
+
get isURL(): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Convert Swagger path to template literals/ template strings(camelcase)
|
|
92
|
+
* @example /pet/{petId} => `/pet/${petId}`
|
|
93
|
+
* @example /account/monetary-accountID => `/account/${monetaryAccountId}`
|
|
94
|
+
* @example /account/userID => `/account/${userId}`
|
|
95
|
+
*/
|
|
96
|
+
get template(): string;
|
|
97
|
+
get object(): URLObject | string;
|
|
98
|
+
get params(): Record<string, string> | undefined;
|
|
99
|
+
toObject({
|
|
100
|
+
type,
|
|
101
|
+
replacer,
|
|
102
|
+
stringify
|
|
103
|
+
}?: ObjectOptions): URLObject | string;
|
|
104
|
+
/**
|
|
105
|
+
* Convert Swagger path to template literals/ template strings(camelcase)
|
|
106
|
+
* @example /pet/{petId} => `/pet/${petId}`
|
|
107
|
+
* @example /account/monetary-accountID => `/account/${monetaryAccountId}`
|
|
108
|
+
* @example /account/userID => `/account/${userId}`
|
|
109
|
+
*/
|
|
110
|
+
toTemplateString({
|
|
111
|
+
prefix,
|
|
112
|
+
replacer
|
|
113
|
+
}?: {
|
|
114
|
+
prefix?: string;
|
|
115
|
+
replacer?: (pathParam: string) => string;
|
|
116
|
+
}): string;
|
|
117
|
+
getParams(replacer?: (pathParam: string) => string): Record<string, string> | undefined;
|
|
118
|
+
/**
|
|
119
|
+
* Convert Swagger path to URLPath(syntax of Express)
|
|
120
|
+
* @example /pet/{petId} => /pet/:petId
|
|
121
|
+
*/
|
|
122
|
+
toURLPath(): string;
|
|
123
|
+
}
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region src/utils/parser.d.ts
|
|
126
|
+
/**
|
|
127
|
+
* Generate a default banner for files created by Kubb
|
|
128
|
+
* @returns A string with the default banner
|
|
129
|
+
*/
|
|
130
|
+
declare function getDefaultBanner({
|
|
131
|
+
title,
|
|
132
|
+
description,
|
|
133
|
+
version,
|
|
134
|
+
config
|
|
135
|
+
}: {
|
|
136
|
+
title?: string;
|
|
137
|
+
description?: string;
|
|
138
|
+
version?: string;
|
|
139
|
+
config: Config;
|
|
140
|
+
}): string;
|
|
141
|
+
/**
|
|
142
|
+
* Helper to create a file with name and id set
|
|
143
|
+
*/
|
|
144
|
+
declare function createFile<TMeta extends object = object>(file: File<TMeta>): ResolvedFile<TMeta>;
|
|
145
|
+
/**
|
|
146
|
+
* Helper to create a fileImport with extname set
|
|
147
|
+
*/
|
|
148
|
+
declare function createFileImport(imp: Import): ResolvedImport;
|
|
149
|
+
/**
|
|
150
|
+
* Helper to create a fileExport with extname set
|
|
151
|
+
*/
|
|
152
|
+
declare function createFileExport(exp: Export): ResolvedExport;
|
|
153
|
+
type ParserModule<TMeta extends object = object> = {
|
|
154
|
+
format: (source: string) => Promise<string>;
|
|
155
|
+
/**
|
|
156
|
+
* Convert a file to string
|
|
157
|
+
*/
|
|
158
|
+
print: (file: ResolvedFile<TMeta>, options: PrintOptions) => Promise<string>;
|
|
159
|
+
};
|
|
160
|
+
declare function createFileParser<TMeta extends object = object>(parser: ParserModule<TMeta>): ParserModule<TMeta>;
|
|
161
|
+
type PrintOptions = {
|
|
162
|
+
extname?: Extname;
|
|
163
|
+
logger?: Logger;
|
|
164
|
+
};
|
|
165
|
+
declare function getFileParser<TMeta extends object = object>(extname: Extname | undefined): Promise<ParserModule<TMeta>>;
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/utils/Cache.d.ts
|
|
168
|
+
declare class Cache<T> {
|
|
169
|
+
#private;
|
|
170
|
+
get(key: string): Promise<T | null>;
|
|
171
|
+
set(key: string, value: T): Promise<void>;
|
|
172
|
+
delete(key: string): Promise<void>;
|
|
173
|
+
clear(): Promise<void>;
|
|
174
|
+
keys(): Promise<string[]>;
|
|
175
|
+
values(): Promise<T[]>;
|
|
176
|
+
flush(): Promise<void>;
|
|
177
|
+
}
|
|
178
|
+
//#endregion
|
|
179
|
+
export { Cache, FunctionParams, type FunctionParamsAST, type ParserModule, type URLObject, URLPath, createFile, createFileExport, createFileImport, createFileParser, getDefaultBanner, getFileParser, getUniqueName, isPromise, isPromiseFulfilledResult, isPromiseRejectedResult, renderTemplate, setUniqueName, timeout };
|
|
180
|
+
//# sourceMappingURL=index-D2ptHzfn.d.cts.map
|