@e-mc/types 0.10.1 → 0.10.2
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/dom.d.ts +8 -8
- package/lib/filemanager.d.ts +122 -122
- package/lib/http.d.ts +115 -115
- package/lib/index.d.ts +791 -790
- package/lib/logger.d.ts +113 -113
- package/lib/module.d.ts +129 -127
- package/lib/node.d.ts +21 -21
- package/lib/object.d.ts +29 -29
- package/lib/request.d.ts +140 -138
- package/lib/settings.d.ts +490 -490
- package/lib/squared.d.ts +339 -339
- package/lib/type.d.ts +36 -33
- package/lib/watch.d.ts +77 -77
- package/package.json +28 -28
package/lib/squared.d.ts
CHANGED
|
@@ -1,340 +1,340 @@
|
|
|
1
|
-
/// <reference path="type.d.ts" />
|
|
2
|
-
/// <reference path="object.d.ts" />
|
|
3
|
-
|
|
4
|
-
import type { BinaryToTextEncoding } from "crypto";
|
|
5
|
-
|
|
6
|
-
interface Asset extends MimeTypeAction {
|
|
7
|
-
uri?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface TextAsset extends Asset, LocationUri {
|
|
11
|
-
content?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface ResourceAction extends TaskAction, WatchAction {
|
|
15
|
-
wbnUri?: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface MultipartAction {
|
|
19
|
-
formData?: BlobValue;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
interface BlobValue extends KeyValue<string, unknown> {
|
|
23
|
-
filename?: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface FileAsset extends TextAsset, OutputAction, DocumentAction, MultipartAction, ResourceAction, IncrementalAction, ChecksumAction {
|
|
27
|
-
format?: ArrayOf<string>;
|
|
28
|
-
dataView?: NodeJS.ArrayBufferView;
|
|
29
|
-
base64?: string;
|
|
30
|
-
imported?: boolean | string[];
|
|
31
|
-
flags?: number;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface DataSource<T = unknown> extends DocumentAction {
|
|
35
|
-
source: string;
|
|
36
|
-
uri?: string;
|
|
37
|
-
index?: number;
|
|
38
|
-
limit?: number;
|
|
39
|
-
query?: T;
|
|
40
|
-
postQuery?: string | FunctionType;
|
|
41
|
-
preRender?: string | FunctionType;
|
|
42
|
-
whenEmpty?: string | FunctionType;
|
|
43
|
-
removeEmpty?: boolean;
|
|
44
|
-
ignoreCache?: IntBool | FirstOf<number, number>;
|
|
45
|
-
transactionState?: number;
|
|
46
|
-
transactionFail?: boolean;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface DbDataSource<T = unknown, U = unknown, V = unknown, W = unknown, X = unknown> extends DataSource<T> {
|
|
50
|
-
name?: string;
|
|
51
|
-
table?: string;
|
|
52
|
-
credential?: string | W;
|
|
53
|
-
options?: U;
|
|
54
|
-
update?: V;
|
|
55
|
-
withCommand?: string | TupleOf<string>;
|
|
56
|
-
parallel?: boolean;
|
|
57
|
-
flat?: number;
|
|
58
|
-
willAbort?: boolean;
|
|
59
|
-
streamRow?: Null<boolean | string | ((row: unknown) => Void<Error | false>)>;
|
|
60
|
-
usePool?: boolean | X;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export interface OutputAction {
|
|
64
|
-
moveTo?: string;
|
|
65
|
-
commands?: string[];
|
|
66
|
-
compress?: CompressFormat[];
|
|
67
|
-
willChange?: boolean;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export interface MimeTypeAction {
|
|
71
|
-
mimeType?: string;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface TaskAction {
|
|
75
|
-
tasks?: TaskCommand[];
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export interface WatchAction {
|
|
79
|
-
watch?: WatchValue;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export interface BundleAction<T = unknown> {
|
|
83
|
-
bundleId?: number | string;
|
|
84
|
-
bundleIndex?: number;
|
|
85
|
-
bundleReplace?: T;
|
|
86
|
-
bundleQueue?: Promise<unknown>[];
|
|
87
|
-
trailingContent?: ArrayOf<string>;
|
|
88
|
-
exported?: boolean;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export interface ChecksumAction {
|
|
92
|
-
checksum?: ChecksumValue;
|
|
93
|
-
checksumOutput?: ChecksumValue;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export interface DocumentAction {
|
|
97
|
-
document?: ArrayOf<string>;
|
|
98
|
-
encoding?: BufferEncoding;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export interface AttributeAction<T = AttributeMap> {
|
|
102
|
-
attributes?: T;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export interface HashAction {
|
|
106
|
-
hash?: string;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export interface TextAction {
|
|
110
|
-
textContent?: string;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export interface ExcludeAction {
|
|
114
|
-
exclude?: boolean;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export interface StorageAction<T = unknown> {
|
|
118
|
-
cloudStorage?: T[];
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export interface ElementAction<T = XmlTagNode> {
|
|
122
|
-
element?: T;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export interface MetadataAction<T = unknown> {
|
|
126
|
-
metadata?: T;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export interface ImportAction<T = unknown> {
|
|
130
|
-
imports?: T;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export interface IncrementalAction {
|
|
134
|
-
incremental?: boolean | IncrementalMatch;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export interface FromAction {
|
|
138
|
-
from?: string[];
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export interface TaskCommand<T = PlainObject> {
|
|
142
|
-
handler?: string;
|
|
143
|
-
task?: string | T;
|
|
144
|
-
preceding?: boolean;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export interface TagData {
|
|
148
|
-
tagName: string;
|
|
149
|
-
tagCount?: number;
|
|
150
|
-
tagIndex?: number;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export interface TagAppend extends TagData, TextAction {
|
|
154
|
-
order: number;
|
|
155
|
-
id?: string;
|
|
156
|
-
prepend?: boolean;
|
|
157
|
-
nextSibling?: number;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export interface TagLocator {
|
|
161
|
-
id: string;
|
|
162
|
-
index?: number;
|
|
163
|
-
count?: number;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
export interface XmlNode extends AttributeAction {
|
|
167
|
-
index?: number;
|
|
168
|
-
outerXml?: string;
|
|
169
|
-
innerXml?: string;
|
|
170
|
-
dynamic?: string;
|
|
171
|
-
ignoreCase?: boolean;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export interface XmlTagNode extends XmlNode, TagData, TextAction {
|
|
175
|
-
id?: StringMap;
|
|
176
|
-
locator?: TagLocator;
|
|
177
|
-
append?: TagAppend;
|
|
178
|
-
removed?: boolean;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
export interface WebSocketClient {
|
|
182
|
-
socketId?: string;
|
|
183
|
-
port?: number;
|
|
184
|
-
secure?: boolean;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export interface WebSocketConnection extends Required<WebSocketClient> {
|
|
188
|
-
expired: number;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export interface LocationUri {
|
|
192
|
-
pathname: string;
|
|
193
|
-
filename: string;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
export interface ViewEngine {
|
|
197
|
-
name?: string;
|
|
198
|
-
singleRow?: boolean;
|
|
199
|
-
outputEmpty?: boolean;
|
|
200
|
-
options?: {
|
|
201
|
-
compile?: PlainObject;
|
|
202
|
-
output?: PlainObject;
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
export interface CompressLevel extends MimeTypeAction {
|
|
207
|
-
algorithm?: string;
|
|
208
|
-
level?: number;
|
|
209
|
-
chunkSize?: number;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export interface CompressFormat extends CompressLevel {
|
|
213
|
-
format?: string;
|
|
214
|
-
condition?: string;
|
|
215
|
-
plugin?: string;
|
|
216
|
-
timeout?: number;
|
|
217
|
-
options?: PlainObject;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export interface WatchInterval<T = FileAsset> extends TaskBase {
|
|
221
|
-
id?: string;
|
|
222
|
-
main?: boolean;
|
|
223
|
-
reload?: WatchReload;
|
|
224
|
-
assets?: T[];
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
export interface WatchReload extends WebSocketClient {
|
|
228
|
-
module?: boolean;
|
|
229
|
-
always?: boolean;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
export interface WebSocketResponse {
|
|
233
|
-
event?: string;
|
|
234
|
-
socketId?: ArrayOf<string>;
|
|
235
|
-
type?: string;
|
|
236
|
-
encoding?: BufferEncoding;
|
|
237
|
-
value?: unknown;
|
|
238
|
-
timeStamp?: number;
|
|
239
|
-
status?: LogStatus[];
|
|
240
|
-
errors?: string[];
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
export interface WatchResponse extends WebSocketResponse {
|
|
244
|
-
event: "modified" | "broadcast" | WebSocketEvent;
|
|
245
|
-
action?: string;
|
|
246
|
-
url?: {
|
|
247
|
-
pathname: string;
|
|
248
|
-
search?: string;
|
|
249
|
-
};
|
|
250
|
-
always?: boolean;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
export interface BroadcastResponse extends WebSocketResponse {
|
|
254
|
-
event: "broadcast" | WebSocketEvent;
|
|
255
|
-
options?: unknown;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
export interface FileInfo {
|
|
259
|
-
name: string;
|
|
260
|
-
size: number | string;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
export interface RequestBase<T = PlainObject> {
|
|
264
|
-
baseUrl?: string;
|
|
265
|
-
priority?: number;
|
|
266
|
-
threads?: number;
|
|
267
|
-
broadcastId?: ArrayOf<string>;
|
|
268
|
-
log?: boolean | ArrayOf<string> | T;
|
|
269
|
-
error?: { abort?: boolean | ArrayOf<string>; fatal?: boolean };
|
|
270
|
-
ignoreExtensions?: boolean | ArrayOf<string>;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
export interface RequestData extends RequestBase, ImportAction<StringMap>, IncrementalAction {
|
|
274
|
-
assets?: FileAsset[];
|
|
275
|
-
dataSource?: DataSource[];
|
|
276
|
-
document?: string[];
|
|
277
|
-
task?: string[];
|
|
278
|
-
modules?: string[];
|
|
279
|
-
update?: WatchInterval;
|
|
280
|
-
checksum?: string | boolean | 1 | ChecksumOutput;
|
|
281
|
-
cache?: boolean | AnyObject;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
export interface LogStatus<T = number> {
|
|
285
|
-
name: string;
|
|
286
|
-
type: T;
|
|
287
|
-
value: string;
|
|
288
|
-
timeStamp: number;
|
|
289
|
-
from: string;
|
|
290
|
-
sessionId: string;
|
|
291
|
-
duration?: number;
|
|
292
|
-
source?: string;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
export interface ResponseData<T = unknown> {
|
|
296
|
-
success: boolean;
|
|
297
|
-
data?: T;
|
|
298
|
-
filename?: string;
|
|
299
|
-
downloadKey?: string;
|
|
300
|
-
downloadUrl?: string;
|
|
301
|
-
bytes?: number;
|
|
302
|
-
files?: FileInfo[] | string[];
|
|
303
|
-
status?: LogStatus[];
|
|
304
|
-
error?: ResponseError;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
export interface ResponseError {
|
|
308
|
-
message: string;
|
|
309
|
-
hint?: string;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
export interface RequestObserve extends WebSocketClient {
|
|
313
|
-
action?: string;
|
|
314
|
-
expires?: number | string;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
export interface ChecksumBase<T = BinaryToTextEncoding> {
|
|
318
|
-
algorithm?: string;
|
|
319
|
-
digest?: T;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
export interface ChecksumOutput<T = BinaryToTextEncoding> extends ChecksumBase<T> {
|
|
323
|
-
filename?: string;
|
|
324
|
-
include?: ArrayOf<string>;
|
|
325
|
-
exclude?: ArrayOf<string>;
|
|
326
|
-
recursive?: boolean | 1;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
export interface TaskBase {
|
|
330
|
-
interval?: number | string;
|
|
331
|
-
start?: number | string;
|
|
332
|
-
expires?: number | string;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
export type WebSocketEvent = "close" | "error";
|
|
336
|
-
export type IncrementalMatch = "none" | "staging" | "etag" | "exists";
|
|
337
|
-
export type TextEncoding = "utf-8" | "utf-16" | "utf-16be" | "utf-16le" | "latin1";
|
|
338
|
-
export type AttributeMap = ObjectMap<unknown>;
|
|
339
|
-
export type WatchValue = boolean | WatchInterval;
|
|
1
|
+
/// <reference path="type.d.ts" />
|
|
2
|
+
/// <reference path="object.d.ts" />
|
|
3
|
+
|
|
4
|
+
import type { BinaryToTextEncoding } from "crypto";
|
|
5
|
+
|
|
6
|
+
interface Asset extends MimeTypeAction {
|
|
7
|
+
uri?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface TextAsset extends Asset, LocationUri {
|
|
11
|
+
content?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface ResourceAction extends TaskAction, WatchAction {
|
|
15
|
+
wbnUri?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface MultipartAction {
|
|
19
|
+
formData?: BlobValue;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface BlobValue extends KeyValue<string, unknown> {
|
|
23
|
+
filename?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface FileAsset extends TextAsset, OutputAction, DocumentAction, MultipartAction, ResourceAction, IncrementalAction, ChecksumAction {
|
|
27
|
+
format?: ArrayOf<string>;
|
|
28
|
+
dataView?: NodeJS.ArrayBufferView;
|
|
29
|
+
base64?: string;
|
|
30
|
+
imported?: boolean | string[];
|
|
31
|
+
flags?: number;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface DataSource<T = unknown> extends DocumentAction {
|
|
35
|
+
source: string;
|
|
36
|
+
uri?: string;
|
|
37
|
+
index?: number;
|
|
38
|
+
limit?: number;
|
|
39
|
+
query?: T;
|
|
40
|
+
postQuery?: string | FunctionType;
|
|
41
|
+
preRender?: string | FunctionType;
|
|
42
|
+
whenEmpty?: string | FunctionType;
|
|
43
|
+
removeEmpty?: boolean;
|
|
44
|
+
ignoreCache?: IntBool | FirstOf<number, number>;
|
|
45
|
+
transactionState?: number;
|
|
46
|
+
transactionFail?: boolean;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface DbDataSource<T = unknown, U = unknown, V = unknown, W = unknown, X = unknown> extends DataSource<T> {
|
|
50
|
+
name?: string;
|
|
51
|
+
table?: string;
|
|
52
|
+
credential?: string | W;
|
|
53
|
+
options?: U;
|
|
54
|
+
update?: V;
|
|
55
|
+
withCommand?: string | TupleOf<string>;
|
|
56
|
+
parallel?: boolean;
|
|
57
|
+
flat?: number;
|
|
58
|
+
willAbort?: boolean;
|
|
59
|
+
streamRow?: Null<boolean | string | ((row: unknown) => Void<Error | false>)>;
|
|
60
|
+
usePool?: boolean | X;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface OutputAction {
|
|
64
|
+
moveTo?: string;
|
|
65
|
+
commands?: string[];
|
|
66
|
+
compress?: CompressFormat[];
|
|
67
|
+
willChange?: boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface MimeTypeAction {
|
|
71
|
+
mimeType?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface TaskAction {
|
|
75
|
+
tasks?: TaskCommand[];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface WatchAction {
|
|
79
|
+
watch?: WatchValue;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface BundleAction<T = unknown> {
|
|
83
|
+
bundleId?: number | string;
|
|
84
|
+
bundleIndex?: number;
|
|
85
|
+
bundleReplace?: T;
|
|
86
|
+
bundleQueue?: Promise<unknown>[];
|
|
87
|
+
trailingContent?: ArrayOf<string>;
|
|
88
|
+
exported?: boolean;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface ChecksumAction {
|
|
92
|
+
checksum?: ChecksumValue;
|
|
93
|
+
checksumOutput?: ChecksumValue;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface DocumentAction {
|
|
97
|
+
document?: ArrayOf<string>;
|
|
98
|
+
encoding?: BufferEncoding;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface AttributeAction<T = AttributeMap> {
|
|
102
|
+
attributes?: T;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface HashAction {
|
|
106
|
+
hash?: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface TextAction {
|
|
110
|
+
textContent?: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface ExcludeAction {
|
|
114
|
+
exclude?: boolean;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface StorageAction<T = unknown> {
|
|
118
|
+
cloudStorage?: T[];
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface ElementAction<T = XmlTagNode> {
|
|
122
|
+
element?: T;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface MetadataAction<T = unknown> {
|
|
126
|
+
metadata?: T;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface ImportAction<T = unknown> {
|
|
130
|
+
imports?: T;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface IncrementalAction {
|
|
134
|
+
incremental?: boolean | IncrementalMatch;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface FromAction {
|
|
138
|
+
from?: string[];
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface TaskCommand<T = PlainObject> {
|
|
142
|
+
handler?: string;
|
|
143
|
+
task?: string | T;
|
|
144
|
+
preceding?: boolean;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface TagData {
|
|
148
|
+
tagName: string;
|
|
149
|
+
tagCount?: number;
|
|
150
|
+
tagIndex?: number;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface TagAppend extends TagData, TextAction {
|
|
154
|
+
order: number;
|
|
155
|
+
id?: string;
|
|
156
|
+
prepend?: boolean;
|
|
157
|
+
nextSibling?: number;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface TagLocator {
|
|
161
|
+
id: string;
|
|
162
|
+
index?: number;
|
|
163
|
+
count?: number;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface XmlNode extends AttributeAction {
|
|
167
|
+
index?: number;
|
|
168
|
+
outerXml?: string;
|
|
169
|
+
innerXml?: string;
|
|
170
|
+
dynamic?: string;
|
|
171
|
+
ignoreCase?: boolean;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface XmlTagNode extends XmlNode, TagData, TextAction {
|
|
175
|
+
id?: StringMap;
|
|
176
|
+
locator?: TagLocator;
|
|
177
|
+
append?: TagAppend;
|
|
178
|
+
removed?: boolean;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface WebSocketClient {
|
|
182
|
+
socketId?: string;
|
|
183
|
+
port?: number;
|
|
184
|
+
secure?: boolean;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export interface WebSocketConnection extends Required<WebSocketClient> {
|
|
188
|
+
expired: number;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface LocationUri {
|
|
192
|
+
pathname: string;
|
|
193
|
+
filename: string;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export interface ViewEngine {
|
|
197
|
+
name?: string;
|
|
198
|
+
singleRow?: boolean;
|
|
199
|
+
outputEmpty?: boolean;
|
|
200
|
+
options?: {
|
|
201
|
+
compile?: PlainObject;
|
|
202
|
+
output?: PlainObject;
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export interface CompressLevel extends MimeTypeAction {
|
|
207
|
+
algorithm?: string;
|
|
208
|
+
level?: number;
|
|
209
|
+
chunkSize?: number;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export interface CompressFormat extends CompressLevel {
|
|
213
|
+
format?: string;
|
|
214
|
+
condition?: string;
|
|
215
|
+
plugin?: string;
|
|
216
|
+
timeout?: number;
|
|
217
|
+
options?: PlainObject;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface WatchInterval<T = FileAsset> extends TaskBase {
|
|
221
|
+
id?: string;
|
|
222
|
+
main?: boolean;
|
|
223
|
+
reload?: WatchReload;
|
|
224
|
+
assets?: T[];
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export interface WatchReload extends WebSocketClient {
|
|
228
|
+
module?: boolean;
|
|
229
|
+
always?: boolean;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export interface WebSocketResponse {
|
|
233
|
+
event?: string;
|
|
234
|
+
socketId?: ArrayOf<string>;
|
|
235
|
+
type?: string;
|
|
236
|
+
encoding?: BufferEncoding;
|
|
237
|
+
value?: unknown;
|
|
238
|
+
timeStamp?: number;
|
|
239
|
+
status?: LogStatus[];
|
|
240
|
+
errors?: string[];
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export interface WatchResponse extends WebSocketResponse {
|
|
244
|
+
event: "modified" | "broadcast" | WebSocketEvent;
|
|
245
|
+
action?: string;
|
|
246
|
+
url?: {
|
|
247
|
+
pathname: string;
|
|
248
|
+
search?: string;
|
|
249
|
+
};
|
|
250
|
+
always?: boolean;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface BroadcastResponse extends WebSocketResponse {
|
|
254
|
+
event: "broadcast" | WebSocketEvent;
|
|
255
|
+
options?: unknown;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface FileInfo {
|
|
259
|
+
name: string;
|
|
260
|
+
size: number | string;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export interface RequestBase<T = PlainObject> {
|
|
264
|
+
baseUrl?: string;
|
|
265
|
+
priority?: number;
|
|
266
|
+
threads?: number;
|
|
267
|
+
broadcastId?: ArrayOf<string>;
|
|
268
|
+
log?: boolean | ArrayOf<string> | T;
|
|
269
|
+
error?: { abort?: boolean | ArrayOf<string>; fatal?: boolean };
|
|
270
|
+
ignoreExtensions?: boolean | ArrayOf<string>;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export interface RequestData extends RequestBase, ImportAction<StringMap>, IncrementalAction {
|
|
274
|
+
assets?: FileAsset[];
|
|
275
|
+
dataSource?: DataSource[];
|
|
276
|
+
document?: string[];
|
|
277
|
+
task?: string[];
|
|
278
|
+
modules?: string[];
|
|
279
|
+
update?: WatchInterval;
|
|
280
|
+
checksum?: string | boolean | 1 | ChecksumOutput;
|
|
281
|
+
cache?: boolean | AnyObject;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export interface LogStatus<T = number> {
|
|
285
|
+
name: string;
|
|
286
|
+
type: T;
|
|
287
|
+
value: string;
|
|
288
|
+
timeStamp: number;
|
|
289
|
+
from: string;
|
|
290
|
+
sessionId: string;
|
|
291
|
+
duration?: number;
|
|
292
|
+
source?: string;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export interface ResponseData<T = unknown> {
|
|
296
|
+
success: boolean;
|
|
297
|
+
data?: T;
|
|
298
|
+
filename?: string;
|
|
299
|
+
downloadKey?: string;
|
|
300
|
+
downloadUrl?: string;
|
|
301
|
+
bytes?: number;
|
|
302
|
+
files?: FileInfo[] | string[];
|
|
303
|
+
status?: LogStatus[];
|
|
304
|
+
error?: ResponseError;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export interface ResponseError {
|
|
308
|
+
message: string;
|
|
309
|
+
hint?: string;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export interface RequestObserve extends WebSocketClient {
|
|
313
|
+
action?: string;
|
|
314
|
+
expires?: number | string;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export interface ChecksumBase<T = BinaryToTextEncoding> {
|
|
318
|
+
algorithm?: string;
|
|
319
|
+
digest?: T;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export interface ChecksumOutput<T = BinaryToTextEncoding> extends ChecksumBase<T> {
|
|
323
|
+
filename?: string;
|
|
324
|
+
include?: ArrayOf<string>;
|
|
325
|
+
exclude?: ArrayOf<string>;
|
|
326
|
+
recursive?: boolean | 1;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export interface TaskBase {
|
|
330
|
+
interval?: number | string;
|
|
331
|
+
start?: number | string;
|
|
332
|
+
expires?: number | string;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export type WebSocketEvent = "close" | "error";
|
|
336
|
+
export type IncrementalMatch = "none" | "staging" | "etag" | "exists";
|
|
337
|
+
export type TextEncoding = "utf-8" | "utf-16" | "utf-16be" | "utf-16le" | "latin1";
|
|
338
|
+
export type AttributeMap = ObjectMap<unknown>;
|
|
339
|
+
export type WatchValue = boolean | WatchInterval;
|
|
340
340
|
export type ChecksumValue = string | ChecksumBase & { value?: string };
|