@e-mc/types 0.10.1 → 0.10.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/LICENSE +10 -10
- package/README.md +208 -208
- package/constant.d.ts +338 -338
- package/index.d.ts +336 -336
- package/index.js +4 -4
- package/lib/asset.d.ts +76 -76
- package/lib/cloud.d.ts +106 -106
- package/lib/compat-v4.d.ts +120 -120
- package/lib/compress.d.ts +25 -25
- package/lib/core.d.ts +195 -195
- package/lib/db.d.ts +107 -109
- package/lib/document.d.ts +199 -199
- package/lib/filemanager.d.ts +122 -122
- package/lib/http.d.ts +115 -115
- package/lib/index.d.ts +796 -790
- package/lib/logger.d.ts +113 -113
- package/lib/module.d.ts +137 -127
- package/lib/node.d.ts +21 -21
- package/lib/object.d.ts +29 -29
- package/lib/request.d.ts +146 -138
- package/lib/settings.d.ts +490 -490
- package/lib/squared.d.ts +339 -339
- package/lib/type.d.ts +34 -33
- package/lib/watch.d.ts +77 -77
- package/package.json +28 -28
- package/lib/dom.d.ts +0 -9
package/lib/db.d.ts
CHANGED
|
@@ -1,110 +1,108 @@
|
|
|
1
|
-
import type { DataSource, DbDataSource } from './squared';
|
|
2
|
-
|
|
3
|
-
import type { CacheOptions, IdentifierAction } from './core';
|
|
4
|
-
|
|
5
|
-
import type { DB_TYPE } from '../index.d';
|
|
6
|
-
|
|
7
|
-
export interface ExecuteAction<T = unknown> {
|
|
8
|
-
params?: T;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface CascadeAction {
|
|
12
|
-
cascade?: string;
|
|
13
|
-
cacheObjectKey?: string;
|
|
14
|
-
fallback?: unknown;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface ExecuteQueryOptions {
|
|
18
|
-
checkObject?: CheckObjectCallback | string;
|
|
19
|
-
checkObjectKey?: string;
|
|
20
|
-
errorQuery?: ErrorQueryCallback;
|
|
21
|
-
sessionKey?: string;
|
|
22
|
-
outCacheMiss?: string[];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface ExecuteBatchQueryOptions extends ExecuteQueryOptions {
|
|
26
|
-
parallel?: boolean;
|
|
27
|
-
connectOnce?: boolean;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface ProcessRowsOptions {
|
|
31
|
-
disconnect?: () => void;
|
|
32
|
-
parallel?: boolean;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface DbConnection {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
get
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
export type
|
|
98
|
-
export type
|
|
99
|
-
export type
|
|
100
|
-
|
|
101
|
-
export
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
1
|
+
import type { DataSource, DbDataSource } from './squared';
|
|
2
|
+
|
|
3
|
+
import type { CacheOptions, IdentifierAction } from './core';
|
|
4
|
+
|
|
5
|
+
import type { DB_TYPE } from '../index.d';
|
|
6
|
+
|
|
7
|
+
export interface ExecuteAction<T = unknown> {
|
|
8
|
+
params?: T;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface CascadeAction {
|
|
12
|
+
cascade?: string;
|
|
13
|
+
cacheObjectKey?: string;
|
|
14
|
+
fallback?: unknown;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ExecuteQueryOptions {
|
|
18
|
+
checkObject?: CheckObjectCallback | string;
|
|
19
|
+
checkObjectKey?: string;
|
|
20
|
+
errorQuery?: ErrorQueryCallback;
|
|
21
|
+
sessionKey?: string;
|
|
22
|
+
outCacheMiss?: string[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ExecuteBatchQueryOptions extends ExecuteQueryOptions {
|
|
26
|
+
parallel?: boolean;
|
|
27
|
+
connectOnce?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ProcessRowsOptions {
|
|
31
|
+
disconnect?: () => void;
|
|
32
|
+
parallel?: boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface DbConnection extends Required<AuthValue> {
|
|
36
|
+
protocol: string;
|
|
37
|
+
hostname: string;
|
|
38
|
+
port: string;
|
|
39
|
+
pathname: string;
|
|
40
|
+
search: string;
|
|
41
|
+
database: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface HandleFailOptions {
|
|
45
|
+
commandType?: number;
|
|
46
|
+
errorQuery?: ErrorQueryCallback;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface ServerAuth<T = number> extends AuthValue, IdentifierAction {
|
|
50
|
+
protocol?: string;
|
|
51
|
+
server?: string;
|
|
52
|
+
hostname?: string;
|
|
53
|
+
port?: T;
|
|
54
|
+
database?: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface IDbPool<T extends DbDataSource = DbDataSource, U = unknown, V = unknown, W = unknown> {
|
|
58
|
+
client: U;
|
|
59
|
+
lastAccessed: number;
|
|
60
|
+
success: number;
|
|
61
|
+
failed: number;
|
|
62
|
+
poolKey: string;
|
|
63
|
+
uuidKey: Null<AuthValue>;
|
|
64
|
+
add(item: T, uuidKey?: string): this;
|
|
65
|
+
has(item: T): boolean;
|
|
66
|
+
getConnection(credential?: W): Promise<V>;
|
|
67
|
+
remove(): void;
|
|
68
|
+
detach(force?: boolean): Promise<void>;
|
|
69
|
+
close(): Promise<void>;
|
|
70
|
+
isIdle(timeout: number): boolean;
|
|
71
|
+
isEmpty(): boolean;
|
|
72
|
+
set connected(value: boolean);
|
|
73
|
+
get persist(): boolean;
|
|
74
|
+
get closed(): boolean;
|
|
75
|
+
get closeable(): boolean;
|
|
76
|
+
set parent(value: ObjectMap<IDbPool<T>>);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface DbPoolConstructor<T extends DbDataSource = DbDataSource, U = unknown, V = unknown, W = unknown> {
|
|
80
|
+
CACHE_UNUSED: readonly string[];
|
|
81
|
+
asString(credential: unknown): string;
|
|
82
|
+
sanitize(credential: unknown): unknown;
|
|
83
|
+
removeUUIDKey<X>(credential: X & IdentifierAction): X;
|
|
84
|
+
findKey<X extends IDbPool, Y extends DbDataSource>(pools: ObjectMap<X>, uuidKey: unknown, poolKey: Undef<string>, ...items: Y[]): Null<X>;
|
|
85
|
+
validateKey<X extends IDbPool>(pools: ObjectMap<X>, username: string, uuidKey: unknown): [string, Null<X>];
|
|
86
|
+
checkTimeout<X extends IDbPool>(pools: ObjectMap<X>, value: number, limit?: number): Promise<number>;
|
|
87
|
+
readonly prototype: IDbPool<T, U, V, W>;
|
|
88
|
+
new(pool: U, poolKey: string, uuidKey?: Null<AuthValue>): IDbPool<T, U, V, W>;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface TimeoutAction {
|
|
92
|
+
timeout?: number | string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export type DbSource = "mariadb" | "mongodb" | "mssql" | "mysql" | "oracle" | "postgres" | "redis";
|
|
96
|
+
export type QueryResult = unknown[];
|
|
97
|
+
export type BatchQueryResult = Null<QueryResult>[];
|
|
98
|
+
export type CheckObjectCallback = (item: DataSource, data: unknown) => Null<QueryResult>;
|
|
99
|
+
export type ErrorQueryCallback = (err: unknown, item: DbDataSource, commandType?: number) => boolean;
|
|
100
|
+
|
|
101
|
+
export interface SQL_COMMAND {
|
|
102
|
+
SELECT: 1;
|
|
103
|
+
INSERT: 2;
|
|
104
|
+
UPDATE: 3;
|
|
105
|
+
DELETE: 4;
|
|
106
|
+
}
|
|
107
|
+
|
|
110
108
|
export type { DB_TYPE, CacheOptions, IdentifierAction };
|
package/lib/document.d.ts
CHANGED
|
@@ -1,200 +1,200 @@
|
|
|
1
|
-
import type { LocationUri, MimeTypeAction, StorageAction } from './squared';
|
|
2
|
-
|
|
3
|
-
import type { IDocument, IFileManager, IModule } from './index';
|
|
4
|
-
import type { ExternalAsset, InitialValue } from './asset';
|
|
5
|
-
import type { CloudStorage } from './cloud';
|
|
6
|
-
import type { LogComponent, LogDate } from './logger';
|
|
7
|
-
import type { DocumentTransform } from './settings';
|
|
8
|
-
|
|
9
|
-
export interface DocumentAsset extends ExternalAsset, StorageAction<CloudStorage> {
|
|
10
|
-
inlineFilename?: string;
|
|
11
|
-
initialValue?: InitialValue & { inlineFilename?: string };
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface StartOfSourceMap {
|
|
15
|
-
file?: string;
|
|
16
|
-
sourceRoot?: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface RawSourceMap<T = number | string> extends StartOfSourceMap {
|
|
20
|
-
version: T;
|
|
21
|
-
sources: string[];
|
|
22
|
-
names: string[];
|
|
23
|
-
sourcesContent?: string[];
|
|
24
|
-
mappings: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface SourceInput<T = [string, string?, string?][]> {
|
|
28
|
-
code?: string;
|
|
29
|
-
sourceFile?: T;
|
|
30
|
-
sourceName?: string;
|
|
31
|
-
sourcesRelativeTo?: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface SourceCode {
|
|
35
|
-
code: string;
|
|
36
|
-
map?: RawSourceMap;
|
|
37
|
-
sourceMappingURL?: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface ChunkFile {
|
|
41
|
-
code: string;
|
|
42
|
-
filename?: string;
|
|
43
|
-
entryPoint?: boolean;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface ChunkData extends ChunkFile {
|
|
47
|
-
sourceMap?: SourceMap;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface CacheData {
|
|
51
|
-
uri?: string;
|
|
52
|
-
etag?: string;
|
|
53
|
-
encoding?: BufferEncoding;
|
|
54
|
-
override?: boolean;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface TransformAction {
|
|
58
|
-
cacheData?: CacheData;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface TransformResult extends SourceCode {
|
|
62
|
-
type?: string;
|
|
63
|
-
chunks?: Null<(SourceCode & ChunkFile)[]>;
|
|
64
|
-
sourceFiles?: string[];
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export interface TransformOutput extends Partial<LocationUri>, Omit<SourceInput<string>, "code">, MimeTypeAction {
|
|
68
|
-
imported?: boolean;
|
|
69
|
-
sourceMap?: SourceMap;
|
|
70
|
-
metadata?: unknown;
|
|
71
|
-
external?: PlainObject;
|
|
72
|
-
productionRelease?: boolean;
|
|
73
|
-
getMainFile?(code?: string, imports?: StringMap): Undef<SourceInput<string>>;
|
|
74
|
-
getSourceFiles?(imports?: StringMap): Undef<SourceInput>;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface TransformOptions<T = AnyObject, U = T> extends TransformOutput {
|
|
78
|
-
baseConfig: T;
|
|
79
|
-
outputConfig: U;
|
|
80
|
-
sourceMap: SourceMap;
|
|
81
|
-
supplementChunks: ChunkData[];
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface ITransformSeries<T = AnyObject, U = T> extends IModule, TransformOptions<T, U> {
|
|
85
|
-
readonly type: string;
|
|
86
|
-
init(instance: IModule, dirname?: string): this;
|
|
87
|
-
close(instance: IModule): void;
|
|
88
|
-
createSourceMap(value: string): SourceMap;
|
|
89
|
-
getMainFile(code?: string, imports?: StringMap): Undef<SourceInput<string>>;
|
|
90
|
-
getSourceFiles(imports?: StringMap): Undef<SourceInput>;
|
|
91
|
-
toBaseConfig(all?: boolean): T;
|
|
92
|
-
upgrade<V = unknown>(context: V, dirname?: string, pkgname?: string): V;
|
|
93
|
-
upgradeESM<V = unknown>(context: V, dirname?: string, pkgname?: string): Promise<V>;
|
|
94
|
-
set code(value);
|
|
95
|
-
get code(): string;
|
|
96
|
-
get out(): IOut;
|
|
97
|
-
get metadata(): object;
|
|
98
|
-
get options(): TransformOutput;
|
|
99
|
-
get productionRelease(): boolean;
|
|
100
|
-
get imported(): boolean;
|
|
101
|
-
set version(value);
|
|
102
|
-
get version(): string;
|
|
103
|
-
set packageName(value);
|
|
104
|
-
get packageName(): string;
|
|
105
|
-
get packageVersion(): string;
|
|
106
|
-
get username(): string;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export interface TransformSeriesConstructor {
|
|
110
|
-
readonly prototype: ITransformSeries;
|
|
111
|
-
new(type: string, code: string, options: TransformOutput): ITransformSeries;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export interface IOut extends OutV3, OutV4 {}
|
|
115
|
-
|
|
116
|
-
export interface OutV3 {
|
|
117
|
-
sourceFiles?: string[];
|
|
118
|
-
ignoreCache?: boolean;
|
|
119
|
-
logAppend?: LogComponent[];
|
|
120
|
-
messageAppend?: string;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export interface OutV4 {
|
|
124
|
-
logQueued?: LogComponent[];
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export interface SourceMapOptions extends MimeTypeAction {
|
|
128
|
-
file?: string;
|
|
129
|
-
hash?: string;
|
|
130
|
-
sourceRoot?: string;
|
|
131
|
-
sourceMappingURL?: string;
|
|
132
|
-
inlineMap?: boolean;
|
|
133
|
-
emptySources?: boolean;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export interface SourceMap extends SourceCode {
|
|
137
|
-
output: Map<string, SourceCode>;
|
|
138
|
-
reset(): void;
|
|
139
|
-
nextMap(name: string, code: string, map: unknown, sourceMappingURL?: string, emptySources?: boolean): boolean;
|
|
140
|
-
set map(value);
|
|
141
|
-
get map(): Undef<RawSourceMap>;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export interface SourceMapConstructor {
|
|
145
|
-
findSourceMap(code?: string, uri?: string): Undef<RawSourceMap>;
|
|
146
|
-
removeSourceMappingURL(value: string): [string, string?, Null<RawSourceMap>?];
|
|
147
|
-
isRaw(map: unknown): map is RawSourceMap;
|
|
148
|
-
readonly prototype: SourceMap;
|
|
149
|
-
new(code: string, remove: boolean): SourceMap;
|
|
150
|
-
new(code: string, uri?: string, remove?: boolean): SourceMap;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export interface ImportMap {
|
|
154
|
-
imports?: StringMap;
|
|
155
|
-
scopes?: ObjectMap<StringMap>;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export interface UpdateGradleOptions {
|
|
159
|
-
multiple?: boolean;
|
|
160
|
-
addendum?: string;
|
|
161
|
-
upgrade?: boolean;
|
|
162
|
-
updateOnly?: boolean;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export interface LintMessage {
|
|
166
|
-
ruleId: string;
|
|
167
|
-
message: string;
|
|
168
|
-
line: number;
|
|
169
|
-
column: number;
|
|
170
|
-
endLine?: number;
|
|
171
|
-
endColumn?: number;
|
|
172
|
-
severity?: 0 | 1 | 2 | "" | "error" | "warning";
|
|
173
|
-
fatal?: boolean;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
export interface GenerateLintTableOptions extends Partial<LocationUri> {
|
|
177
|
-
leadingText?: string;
|
|
178
|
-
trailingText?: string;
|
|
179
|
-
errorCount?: number | TupleOf<number>;
|
|
180
|
-
warningCount?: number | TupleOf<number>;
|
|
181
|
-
fatalErrorCount?: number;
|
|
182
|
-
timeStamp?: LogDate;
|
|
183
|
-
ruleWidth?: number;
|
|
184
|
-
messageWidth?: number;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export interface CustomizeOptions {
|
|
188
|
-
transform?: DocumentTransform;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export interface AsSourceFileOptions {
|
|
192
|
-
encoding?: BufferEncoding;
|
|
193
|
-
persist?: boolean;
|
|
194
|
-
cache?: boolean;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export type Transformer = FunctionType<Undef<Promise<string> | string>>;
|
|
198
|
-
export type ConfigOrTransformer = AnyObject | Transformer;
|
|
199
|
-
export type PluginConfig = [string, Undef<ConfigOrTransformer>, Undef<AnyObject>, boolean?] | [];
|
|
1
|
+
import type { LocationUri, MimeTypeAction, StorageAction } from './squared';
|
|
2
|
+
|
|
3
|
+
import type { IDocument, IFileManager, IModule } from './index';
|
|
4
|
+
import type { ExternalAsset, InitialValue } from './asset';
|
|
5
|
+
import type { CloudStorage } from './cloud';
|
|
6
|
+
import type { LogComponent, LogDate } from './logger';
|
|
7
|
+
import type { DocumentTransform } from './settings';
|
|
8
|
+
|
|
9
|
+
export interface DocumentAsset extends ExternalAsset, StorageAction<CloudStorage> {
|
|
10
|
+
inlineFilename?: string;
|
|
11
|
+
initialValue?: InitialValue & { inlineFilename?: string };
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface StartOfSourceMap {
|
|
15
|
+
file?: string;
|
|
16
|
+
sourceRoot?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface RawSourceMap<T = number | string> extends StartOfSourceMap {
|
|
20
|
+
version: T;
|
|
21
|
+
sources: string[];
|
|
22
|
+
names: string[];
|
|
23
|
+
sourcesContent?: string[];
|
|
24
|
+
mappings: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface SourceInput<T = [string, string?, string?][]> {
|
|
28
|
+
code?: string;
|
|
29
|
+
sourceFile?: T;
|
|
30
|
+
sourceName?: string;
|
|
31
|
+
sourcesRelativeTo?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface SourceCode {
|
|
35
|
+
code: string;
|
|
36
|
+
map?: RawSourceMap;
|
|
37
|
+
sourceMappingURL?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface ChunkFile {
|
|
41
|
+
code: string;
|
|
42
|
+
filename?: string;
|
|
43
|
+
entryPoint?: boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface ChunkData extends ChunkFile {
|
|
47
|
+
sourceMap?: SourceMap;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface CacheData {
|
|
51
|
+
uri?: string;
|
|
52
|
+
etag?: string;
|
|
53
|
+
encoding?: BufferEncoding;
|
|
54
|
+
override?: boolean;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface TransformAction {
|
|
58
|
+
cacheData?: CacheData;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface TransformResult extends SourceCode {
|
|
62
|
+
type?: string;
|
|
63
|
+
chunks?: Null<(SourceCode & ChunkFile)[]>;
|
|
64
|
+
sourceFiles?: string[];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface TransformOutput extends Partial<LocationUri>, Omit<SourceInput<string>, "code">, MimeTypeAction {
|
|
68
|
+
imported?: boolean;
|
|
69
|
+
sourceMap?: SourceMap;
|
|
70
|
+
metadata?: unknown;
|
|
71
|
+
external?: PlainObject;
|
|
72
|
+
productionRelease?: boolean;
|
|
73
|
+
getMainFile?(code?: string, imports?: StringMap): Undef<SourceInput<string>>;
|
|
74
|
+
getSourceFiles?(imports?: StringMap): Undef<SourceInput>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface TransformOptions<T = AnyObject, U = T> extends TransformOutput {
|
|
78
|
+
baseConfig: T;
|
|
79
|
+
outputConfig: U;
|
|
80
|
+
sourceMap: SourceMap;
|
|
81
|
+
supplementChunks: ChunkData[];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface ITransformSeries<T = AnyObject, U = T> extends IModule, TransformOptions<T, U> {
|
|
85
|
+
readonly type: string;
|
|
86
|
+
init(instance: IModule, dirname?: string): this;
|
|
87
|
+
close(instance: IModule): void;
|
|
88
|
+
createSourceMap(value: string): SourceMap;
|
|
89
|
+
getMainFile(code?: string, imports?: StringMap): Undef<SourceInput<string>>;
|
|
90
|
+
getSourceFiles(imports?: StringMap): Undef<SourceInput>;
|
|
91
|
+
toBaseConfig(all?: boolean): T;
|
|
92
|
+
upgrade<V = unknown>(context: V, dirname?: string, pkgname?: string): V;
|
|
93
|
+
upgradeESM<V = unknown>(context: V, dirname?: string, pkgname?: string): Promise<V>;
|
|
94
|
+
set code(value);
|
|
95
|
+
get code(): string;
|
|
96
|
+
get out(): IOut;
|
|
97
|
+
get metadata(): object;
|
|
98
|
+
get options(): TransformOutput;
|
|
99
|
+
get productionRelease(): boolean;
|
|
100
|
+
get imported(): boolean;
|
|
101
|
+
set version(value);
|
|
102
|
+
get version(): string;
|
|
103
|
+
set packageName(value);
|
|
104
|
+
get packageName(): string;
|
|
105
|
+
get packageVersion(): string;
|
|
106
|
+
get username(): string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface TransformSeriesConstructor {
|
|
110
|
+
readonly prototype: ITransformSeries;
|
|
111
|
+
new(type: string, code: string, options: TransformOutput): ITransformSeries;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface IOut extends OutV3, OutV4 {}
|
|
115
|
+
|
|
116
|
+
export interface OutV3 {
|
|
117
|
+
sourceFiles?: string[];
|
|
118
|
+
ignoreCache?: boolean;
|
|
119
|
+
logAppend?: LogComponent[];
|
|
120
|
+
messageAppend?: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface OutV4 {
|
|
124
|
+
logQueued?: LogComponent[];
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface SourceMapOptions extends MimeTypeAction {
|
|
128
|
+
file?: string;
|
|
129
|
+
hash?: string;
|
|
130
|
+
sourceRoot?: string;
|
|
131
|
+
sourceMappingURL?: string;
|
|
132
|
+
inlineMap?: boolean;
|
|
133
|
+
emptySources?: boolean;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface SourceMap extends SourceCode {
|
|
137
|
+
output: Map<string, SourceCode>;
|
|
138
|
+
reset(): void;
|
|
139
|
+
nextMap(name: string, code: string, map: unknown, sourceMappingURL?: string, emptySources?: boolean): boolean;
|
|
140
|
+
set map(value);
|
|
141
|
+
get map(): Undef<RawSourceMap>;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface SourceMapConstructor {
|
|
145
|
+
findSourceMap(code?: string, uri?: string): Undef<RawSourceMap>;
|
|
146
|
+
removeSourceMappingURL(value: string): [string, string?, Null<RawSourceMap>?];
|
|
147
|
+
isRaw(map: unknown): map is RawSourceMap;
|
|
148
|
+
readonly prototype: SourceMap;
|
|
149
|
+
new(code: string, remove: boolean): SourceMap;
|
|
150
|
+
new(code: string, uri?: string, remove?: boolean): SourceMap;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface ImportMap {
|
|
154
|
+
imports?: StringMap;
|
|
155
|
+
scopes?: ObjectMap<StringMap>;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface UpdateGradleOptions {
|
|
159
|
+
multiple?: boolean;
|
|
160
|
+
addendum?: string;
|
|
161
|
+
upgrade?: boolean;
|
|
162
|
+
updateOnly?: boolean;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface LintMessage {
|
|
166
|
+
ruleId: string;
|
|
167
|
+
message: string;
|
|
168
|
+
line: number;
|
|
169
|
+
column: number;
|
|
170
|
+
endLine?: number;
|
|
171
|
+
endColumn?: number;
|
|
172
|
+
severity?: 0 | 1 | 2 | "" | "error" | "warning";
|
|
173
|
+
fatal?: boolean;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export interface GenerateLintTableOptions extends Partial<LocationUri> {
|
|
177
|
+
leadingText?: string;
|
|
178
|
+
trailingText?: string;
|
|
179
|
+
errorCount?: number | TupleOf<number>;
|
|
180
|
+
warningCount?: number | TupleOf<number>;
|
|
181
|
+
fatalErrorCount?: number;
|
|
182
|
+
timeStamp?: LogDate;
|
|
183
|
+
ruleWidth?: number;
|
|
184
|
+
messageWidth?: number;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export interface CustomizeOptions {
|
|
188
|
+
transform?: DocumentTransform;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface AsSourceFileOptions {
|
|
192
|
+
encoding?: BufferEncoding;
|
|
193
|
+
persist?: boolean;
|
|
194
|
+
cache?: boolean;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export type Transformer = FunctionType<Undef<Promise<string> | string>>;
|
|
198
|
+
export type ConfigOrTransformer = AnyObject | Transformer;
|
|
199
|
+
export type PluginConfig = [string, Undef<ConfigOrTransformer>, Undef<AnyObject>, boolean?] | [];
|
|
200
200
|
export type TransformCallback<T extends IFileManager<U>, U extends ExternalAsset = ExternalAsset> = (this: T, instance: IDocument<T, U>, requireOrDocumentDir?: NodeJS.Require | string) => Void<Promise<void>>;
|