@e-mc/types 0.2.0 → 0.3.1
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/constant.d.ts +2 -2
- package/index.d.ts +7 -5
- package/index.js +11 -10
- package/lib/compat-v4.d.ts +3 -6
- package/lib/index.d.ts +22 -25
- package/lib/logger.d.ts +1 -3
- package/lib/settings.d.ts +5 -1
- package/package.json +1 -1
- package/lib/android.d.ts +0 -53
- package/lib/chrome.d.ts +0 -106
package/constant.d.ts
CHANGED
|
@@ -168,8 +168,8 @@ export const enum PACKAGE_NAME {
|
|
|
168
168
|
DB = '@e-mc/db',
|
|
169
169
|
DB_POOL = '@e-mc/db/pool',
|
|
170
170
|
DOCUMENT = '@e-mc/document',
|
|
171
|
-
DOCUMENT_ANDROID = '@e-
|
|
172
|
-
DOCUMENT_CHROME = '@e-
|
|
171
|
+
DOCUMENT_ANDROID = '@e-mc2/android',
|
|
172
|
+
DOCUMENT_CHROME = '@e-mc2/chrome',
|
|
173
173
|
DOCUMENT_TRANSFORM = '@e-mc/document/transform',
|
|
174
174
|
DOCUMENT_UTIL = '@e-mc/document/util',
|
|
175
175
|
FILE_MANAGER = '@e-mc/file-manager',
|
package/index.d.ts
CHANGED
|
@@ -210,18 +210,20 @@ declare namespace types {
|
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
const WATCH_EVENT: {
|
|
213
|
-
MODIFIED:
|
|
214
|
-
BROADCAST:
|
|
215
|
-
CLOSE:
|
|
216
|
-
ERROR:
|
|
213
|
+
MODIFIED: "modified";
|
|
214
|
+
BROADCAST: "broadcast";
|
|
215
|
+
CLOSE: "close";
|
|
216
|
+
ERROR: "error";
|
|
217
217
|
};
|
|
218
218
|
|
|
219
219
|
interface THRESHOLD {
|
|
220
|
+
FILEMANAGER_INTERVAL: number;
|
|
220
221
|
WATCH_INTERVAL: number;
|
|
221
222
|
WATCH_CHANGE: number;
|
|
222
223
|
}
|
|
223
224
|
|
|
224
225
|
const THRESHOLD: {
|
|
226
|
+
FILEMANAGER_INTERVAL: number;
|
|
225
227
|
WATCH_INTERVAL: number;
|
|
226
228
|
WATCH_CHANGE: number;
|
|
227
229
|
};
|
|
@@ -272,7 +274,7 @@ declare namespace types {
|
|
|
272
274
|
function encryptUTF8(algorithm: CipherGCMTypes, key: BinaryLike, iv: BinaryLike, data: string, encoding?: Encoding): Undef<string>;
|
|
273
275
|
function decryptUTF8(algorithm: CipherGCMTypes, key: BinaryLike, iv: BinaryLike, data: string, encoding?: Encoding): Undef<string>;
|
|
274
276
|
function generateUUID(): string;
|
|
275
|
-
function validateUUID(value: unknown):
|
|
277
|
+
function validateUUID(value: unknown): boolean;
|
|
276
278
|
function randomString(format: string, dictionary?: string): string;
|
|
277
279
|
function errorValue(value: string, hint?: string): Error;
|
|
278
280
|
function errorMessage(title: NumString, value: string, hint?: string): Error;
|
package/index.js
CHANGED
|
@@ -253,12 +253,6 @@ var IMPORT_MAP;
|
|
|
253
253
|
IMPORT_MAP["@squared-functions/db/pool"] = "@e-mc/db/pool";
|
|
254
254
|
IMPORT_MAP["@squared-functions/db/util"] = "@e-mc/db/util";
|
|
255
255
|
IMPORT_MAP["@squared-functions/document"] = "@e-mc/document";
|
|
256
|
-
IMPORT_MAP["@squared-functions/document/android"] = "@e-mc/document/android";
|
|
257
|
-
IMPORT_MAP["@squared-functions/document/android/extensions/app/manifest"] = "@e-mc/document/android/extensions/app/manifest";
|
|
258
|
-
IMPORT_MAP["@squared-functions/document/android/extensions/gradle/dependencies"] = "@e-mc/document/android/extensions/gradle/dependencies";
|
|
259
|
-
IMPORT_MAP["@squared-functions/document/android/extensions/gradle/settings"] = "@e-mc/document/android/extensions/gradle/settings";
|
|
260
|
-
IMPORT_MAP["@squared-functions/document/android/extensions/task"] = "@e-mc/document/android/extensions/task";
|
|
261
|
-
IMPORT_MAP["@squared-functions/document/chrome"] = "@e-mc/document/chrome";
|
|
262
256
|
IMPORT_MAP["@squared-functions/document/parse"] = "@e-mc/document/parse";
|
|
263
257
|
IMPORT_MAP["@squared-functions/document/parse/dom"] = "@e-mc/document/parse/dom";
|
|
264
258
|
IMPORT_MAP["@squared-functions/document/transform"] = "@e-mc/document/transform";
|
|
@@ -266,16 +260,22 @@ var IMPORT_MAP;
|
|
|
266
260
|
IMPORT_MAP["@squared-functions/document/util"] = "@e-mc/document/util";
|
|
267
261
|
IMPORT_MAP["@squared-functions/file-manager"] = "@e-mc/file-manager";
|
|
268
262
|
IMPORT_MAP["@squared-functions/file-manager/http/host"] = "@e-mc/request/http/host";
|
|
269
|
-
IMPORT_MAP["@squared-functions/image/jimp"] = "@e-mc2/jimp";
|
|
270
|
-
IMPORT_MAP["@squared-functions/image/jimp/util"] = "@e-mc2/jimp/util";
|
|
271
263
|
IMPORT_MAP["@squared-functions/image-v3"] = "@e-mc/image";
|
|
272
|
-
IMPORT_MAP["@squared-functions/image-v3/jimp"] = "@e-mc2/jimp";
|
|
273
264
|
IMPORT_MAP["@squared-functions/module"] = "@e-mc/module";
|
|
274
265
|
IMPORT_MAP["@squared-functions/task"] = "@e-mc/task";
|
|
275
|
-
IMPORT_MAP["@squared-functions/task/gulp"] = "@e-mc2/gulp";
|
|
276
266
|
IMPORT_MAP["@squared-functions/types"] = "@e-mc/types";
|
|
277
267
|
IMPORT_MAP["@squared-functions/watch"] = "@e-mc/watch";
|
|
278
268
|
IMPORT_MAP["@squared-functions/watch/filegroup"] = "@e-mc/watch/filegroup";
|
|
269
|
+
IMPORT_MAP["@squared-functions/document/android"] = "@e-mc2/android";
|
|
270
|
+
IMPORT_MAP["@squared-functions/document/android/extensions/app/manifest"] = "@e-mc2/android/extensions/app/manifest";
|
|
271
|
+
IMPORT_MAP["@squared-functions/document/android/extensions/gradle/dependencies"] = "@e-mc2/android/extensions/gradle/dependencies";
|
|
272
|
+
IMPORT_MAP["@squared-functions/document/android/extensions/gradle/settings"] = "@e-mc2/android/extensions/gradle/settings";
|
|
273
|
+
IMPORT_MAP["@squared-functions/document/android/extensions/task"] = "@e-mc2/android/extensions/task";
|
|
274
|
+
IMPORT_MAP["@squared-functions/document/chrome"] = "@e-mc2/chrome";
|
|
275
|
+
IMPORT_MAP["@squared-functions/image/jimp"] = "@e-mc2/jimp";
|
|
276
|
+
IMPORT_MAP["@squared-functions/image/jimp/util"] = "@e-mc2/jimp/util";
|
|
277
|
+
IMPORT_MAP["@squared-functions/image-v3/jimp"] = "@e-mc2/jimp";
|
|
278
|
+
IMPORT_MAP["@squared-functions/task/gulp"] = "@e-mc2/gulp";
|
|
279
279
|
IMPORT_MAP["@squared-functions/cloud/atlas"] = "@e-mc2/atlas";
|
|
280
280
|
IMPORT_MAP["@squared-functions/cloud/aws"] = "@e-mc2/aws";
|
|
281
281
|
IMPORT_MAP["@squared-functions/cloud/aws/download"] = "@e-mc2/aws/download";
|
|
@@ -325,6 +325,7 @@ var IMPORT_MAP;
|
|
|
325
325
|
})(IMPORT_MAP = exports.IMPORT_MAP || (exports.IMPORT_MAP = {}));
|
|
326
326
|
var THRESHOLD;
|
|
327
327
|
(function (THRESHOLD) {
|
|
328
|
+
THRESHOLD[THRESHOLD["FILEMANAGER_INTERVAL"] = 100] = "FILEMANAGER_INTERVAL";
|
|
328
329
|
THRESHOLD[THRESHOLD["WATCH_INTERVAL"] = 500] = "WATCH_INTERVAL";
|
|
329
330
|
THRESHOLD[THRESHOLD["WATCH_CHANGE"] = 100] = "WATCH_CHANGE";
|
|
330
331
|
})(THRESHOLD = exports.THRESHOLD || (exports.THRESHOLD = {}));
|
package/lib/compat-v4.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export interface IModuleLibV4 {
|
|
|
26
26
|
isPlainObject<T = PlainObject>(value: unknown): value is T;
|
|
27
27
|
escapePattern(value: unknown, lookBehind?: boolean): string;
|
|
28
28
|
generateUUID(format?: string, dictionary?: string): string;
|
|
29
|
-
validateUUID(value: unknown):
|
|
29
|
+
validateUUID(value: unknown): boolean;
|
|
30
30
|
cloneObject<T, U = unknown>(data: T, options?: boolean | WeakSet<object> | CloneObjectOptions<U>): T;
|
|
31
31
|
coerceObject<T = unknown>(data: T, parseString?: FunctionType<unknown, string> | boolean, cache?: boolean): T;
|
|
32
32
|
asFunction<T = unknown, U = FunctionType<Promise<T> | T>>(value: unknown, sync?: boolean): Null<U>;
|
|
@@ -44,7 +44,7 @@ export interface IModuleLibV4 {
|
|
|
44
44
|
getSize(value: string, diskUsed?: boolean): number;
|
|
45
45
|
byteLength(value: BufferContent, encoding?: BufferEncoding): number;
|
|
46
46
|
cleanupStream(target: Readable | Writable, pathname?: string): void;
|
|
47
|
-
allSettled:
|
|
47
|
+
allSettled<U>(values: readonly (U | PromiseLike<U>)[], rejected?: LogValue, options?: LogFailOptions | LogType): Promise<PromiseSettledResult<U>[]>;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
export interface IModuleCompatV4<T extends IHost = IHost> extends IModule<T> {
|
|
@@ -119,7 +119,4 @@ export interface ITransformSeriesCompatV4<T = AnyObject, U = T> extends ITransfo
|
|
|
119
119
|
export interface TransformSeriesCompatV4Constructor extends TransformSeriesConstructor {
|
|
120
120
|
readonly prototype: ITransformSeriesCompatV4;
|
|
121
121
|
new(...args: unknown[]): ITransformSeriesCompatV4;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export type SupportedMethod = (major: number, minor?: number, patch?: number, lts?: boolean) => boolean;
|
|
125
|
-
export type AllSettledMethod<T extends boolean = false> = <U>(values: readonly (U | PromiseLike<U>)[], rejected?: LogValue, options?: LogFailOptions | LogType) => Promise<T extends true ? PromiseFulfilledResult<U>[] : PromiseSettledResult<U>[]>;
|
|
122
|
+
}
|
package/lib/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import type { CompressLevel, DataSource, DbDataSource, IncrementalMatch, LogStat
|
|
|
7
7
|
|
|
8
8
|
import type { ExternalAsset, FileCommand, FileData, IFileThread, OutputFinalize } from './asset';
|
|
9
9
|
import type { BucketWebsiteOptions, CloudDatabase, CloudFeatures, CloudFunctions, CloudService, CloudStorage, CloudStorageDownload, CloudStorageUpload } from './cloud';
|
|
10
|
-
import type { AllSettledMethod, SupportedMethod } from './compat-v4';
|
|
11
10
|
import type { BufferResult, CompressFormat, TryFileCompressor, TryFileResult, TryImageResult } from './compress';
|
|
12
11
|
import type { ClientDbConstructor, HostInitConfig, IAbortComponent, IClient, IClientDb, IPermission, JoinQueueOptions, PermissionReadWrite, ResumeThreadOptions, ThreadCountStat } from './core';
|
|
13
12
|
import type { BatchQueryResult, DB_TYPE, ExecuteBatchQueryOptions, ExecuteQueryOptions, HandleFailOptions, PoolConfig, ProcessRowsOptions, QueryResult, SQL_COMMAND } from './db';
|
|
@@ -15,7 +14,7 @@ import type { AsSourceFileOptions, ConfigOrTransformer, CustomizeOptions as Cust
|
|
|
15
14
|
import type { AssetContentOptions, DeleteFileAddendum, FileOutput, FinalizeResult, FindAssetOptions, IHttpDiskCache, IHttpMemoryCache, InstallData, PostFinalizeCallback, ReplaceOptions } from './filemanager';
|
|
16
15
|
import type { HttpAgentSettings, HttpProtocolVersion, HttpRequestClient, InternetProtocolVersion } from './http';
|
|
17
16
|
import type { CommandData, CropData, QualityData, ResizeData, RotateData, TransformOptions } from './image';
|
|
18
|
-
import type { ExecCommand, LOG_TYPE, LogArguments, LogComponent, LogDate, LogFailOptions, LogMessageOptions, LogOptions, LogProcessOptions, LogTime, LogType, LogValue,
|
|
17
|
+
import type { ExecCommand, LOG_TYPE, LogArguments, LogComponent, LogDate, LogFailOptions, LogMessageOptions, LogOptions, LogProcessOptions, LogTime, LogType, LogValue, STATUS_TYPE, StatusType } from './logger';
|
|
19
18
|
import type { AsHashOptions, CheckSemVerOptions, CopyDirOptions, CopyDirResult, CopyFileOptions, CreateDirOptions, DeleteFileOptions, GetTempDirOptions, MoveFileOptions, NormalizeFlags, ParseFunctionOptions, PermissionOptions, ProtocolType, ReadFileCallback, ReadFileOptions, RemoveDirOptions, WriteFileOptions } from './module';
|
|
20
19
|
import type { RequestData, Settings } from './node';
|
|
21
20
|
import type { ApplyOptions, Aria2Options, BufferFormat, DataEncodedResult, DataObjectResult, FormDataPart, HostConfig, OpenOptions, PostOptions, ProxySettings, ReadExpectType, RequestInit } from './request';
|
|
@@ -23,8 +22,6 @@ import type { ClientModule, CloudModule, CloudServiceOptions, CompressModule, Co
|
|
|
23
22
|
import type { Command, SpawnResult } from './task';
|
|
24
23
|
import type { IFileGroup, ModifiedPostFinalizeListener, SecureOptions, WatchInitResult } from './watch';
|
|
25
24
|
|
|
26
|
-
import type { DOWNLOAD_TYPE, FILE_TYPE } from '../index';
|
|
27
|
-
|
|
28
25
|
import type { NoParamCallback, WriteStream } from 'fs';
|
|
29
26
|
import type { SpawnOptions } from 'child_process';
|
|
30
27
|
import type { BrotliCompress, Gzip } from 'zlib';
|
|
@@ -198,14 +195,14 @@ declare namespace functions {
|
|
|
198
195
|
LOG_CLOUD_DELETE: LogMessageOptions;
|
|
199
196
|
LOG_CLOUD_DELAYED: LogMessageOptions;
|
|
200
197
|
finalize(this: T, instance: ICloud<T, U, V>): Promise<unknown>;
|
|
201
|
-
uploadAsset<W extends IFileManager<X>, X extends ExternalAsset>(state: IScopeOrigin<W, ICloud<W>>, file: X, ignoreProcess: boolean): Promise<unknown
|
|
202
|
-
uploadAsset<W extends IFileManager<X>, X extends ExternalAsset>(state: IScopeOrigin<W, ICloud<W>>, file: X, contentType?: string, ignoreProcess?: boolean): Promise<unknown
|
|
198
|
+
uploadAsset<W extends IFileManager<X>, X extends ExternalAsset>(state: IScopeOrigin<W, ICloud<W>>, file: X, ignoreProcess: boolean): Promise<unknown>[];
|
|
199
|
+
uploadAsset<W extends IFileManager<X>, X extends ExternalAsset>(state: IScopeOrigin<W, ICloud<W>>, file: X, contentType?: string, ignoreProcess?: boolean): Promise<unknown>[];
|
|
203
200
|
sanitizeAssets<W extends ExternalAsset>(assets: W[]): W[];
|
|
204
201
|
readonly prototype: ICloud<T, U, V>;
|
|
205
202
|
new(module?: U, database?: CloudDatabase[], ...args: unknown[]): ICloud<T, U, V>;
|
|
206
203
|
}
|
|
207
204
|
|
|
208
|
-
interface IDocument<T extends IFileManager<U>, U extends ExternalAsset = ExternalAsset, V extends ClientModule = DocumentModule, W extends DocumentComponent = DocumentComponent, X extends DocumentComponentOption = DocumentComponentOption, Y extends ICloud = ICloud
|
|
205
|
+
interface IDocument<T extends IFileManager<U>, U extends ExternalAsset = ExternalAsset, V extends ClientModule = DocumentModule, W extends DocumentComponent = DocumentComponent, X extends DocumentComponentOption = DocumentComponentOption, Y extends ICloud = ICloud<T>> extends IClient<T, V, TransformCallback<T, U>> {
|
|
209
206
|
Db: Null<IDb>;
|
|
210
207
|
assets: U[];
|
|
211
208
|
config: StandardMap;
|
|
@@ -241,24 +238,24 @@ declare namespace functions {
|
|
|
241
238
|
cloudUpload?(state: IScopeOrigin<T, Y>, file: U, url: string, active: boolean): Promise<boolean>;
|
|
242
239
|
cloudFinalize?(state: IScopeOrigin<T, Y>): Promise<unknown[]>;
|
|
243
240
|
watchInit?(watch: IFileGroup<U>, assets: U[], sanitize?: boolean): Undef<WatchInitResult>;
|
|
244
|
-
watchModified
|
|
241
|
+
watchModified?(watch: IFileGroup<U>, assets?: U[]): PostFinalizeCallback;
|
|
245
242
|
set dataSource(value: DataSource[]);
|
|
246
243
|
get dataSource(): DataSource[];
|
|
247
244
|
get watching(): boolean;
|
|
248
245
|
}
|
|
249
246
|
|
|
250
|
-
interface DocumentConstructor<T extends IFileManager<U>, U extends ExternalAsset = ExternalAsset, V extends ClientModule = DocumentModule
|
|
251
|
-
finalize(this: T, instance: IDocument<T, U, V>): Promise<unknown>;
|
|
247
|
+
interface DocumentConstructor<T extends IFileManager<U>, U extends ExternalAsset = ExternalAsset, V extends ClientModule = DocumentModule, W extends DocumentComponent = DocumentComponent, X extends DocumentComponentOption = DocumentComponentOption, Y extends ICloud = ICloud<T>> extends ModuleConstructor {
|
|
248
|
+
finalize(this: T, instance: IDocument<T, U, V, W, X, Y>): Promise<unknown>;
|
|
252
249
|
createSourceMap(code: string, remove: boolean): SourceMap;
|
|
253
250
|
createSourceMap(code: string, uri?: string, remove?: boolean): SourceMap;
|
|
254
251
|
writeSourceMap(uri: string, data: SourceCode, options?: SourceMapOptions): Undef<string>;
|
|
255
252
|
updateGradle(source: string, namespaces: string[], value: string, options?: UpdateGradleOptions | boolean): string;
|
|
256
253
|
generateLintTable(messages: LintMessage[], options: GenerateLintTableOptions): LogComponent[];
|
|
257
|
-
using?(this: T, instance: IDocument<T, U, V>, file: U): Promise<unknown>;
|
|
258
|
-
cleanup?(this: T, instance: IDocument<T, U, V>): Promise<unknown>;
|
|
254
|
+
using?(this: T, instance: IDocument<T, U, V, W, X, Y>, file: U): Promise<unknown>;
|
|
255
|
+
cleanup?(this: T, instance: IDocument<T, U, V, W, X, Y>): Promise<unknown>;
|
|
259
256
|
sanitizeAssets?(assets: U[], exclusions?: U[]): U[];
|
|
260
|
-
readonly prototype: IDocument<T, U, V>;
|
|
261
|
-
new(module?: V, ...args: unknown[]): IDocument<T, U, V>;
|
|
257
|
+
readonly prototype: IDocument<T, U, V, W, X, Y>;
|
|
258
|
+
new(module?: V, ...args: unknown[]): IDocument<T, U, V, W, X, Y>;
|
|
262
259
|
}
|
|
263
260
|
|
|
264
261
|
interface IWatch<T extends IFileManager<U>, U extends ExternalAsset = ExternalAsset, V extends WatchModule = WatchModule, W extends FunctionType<unknown, any> = ModifiedPostFinalizeListener<U>> extends IClient<T, V, W> {
|
|
@@ -390,7 +387,7 @@ declare namespace functions {
|
|
|
390
387
|
rename(file: T, value: string): boolean;
|
|
391
388
|
performAsyncTask(): void;
|
|
392
389
|
removeAsyncTask(): void;
|
|
393
|
-
completeAsyncTask(err?: unknown, uri?: string, parent?: T, type?:
|
|
390
|
+
completeAsyncTask(err?: unknown, uri?: string, parent?: T, type?: number): void;
|
|
394
391
|
performFinalize(override?: boolean): void;
|
|
395
392
|
hasDocument(instance: IModule, document: Undef<StringOfArray>): boolean;
|
|
396
393
|
getDocumentAssets(instance: IModule, condition?: FunctionArgs<[T], boolean>): T[];
|
|
@@ -405,8 +402,8 @@ declare namespace functions {
|
|
|
405
402
|
getProcessTimeout(handler: InstallData): number;
|
|
406
403
|
clearProcessTimeout(): void;
|
|
407
404
|
addDownload(value: number | BufferContent, encoding: BufferEncoding): number;
|
|
408
|
-
addDownload(value: number | BufferContent, type?:
|
|
409
|
-
getDownload(type?:
|
|
405
|
+
addDownload(value: number | BufferContent, type?: number, encoding?: BufferEncoding): number;
|
|
406
|
+
getDownload(type?: number): TupleOf<number>;
|
|
410
407
|
transformAsset(data: IFileThread<T>, parent?: T): Promise<void>;
|
|
411
408
|
addCopy(data: FileCommand<T>, saveAs?: string, replace?: boolean): Undef<string>;
|
|
412
409
|
findMime(file: T, rename?: boolean): Promise<string>;
|
|
@@ -448,7 +445,7 @@ declare namespace functions {
|
|
|
448
445
|
get cleared(): boolean;
|
|
449
446
|
|
|
450
447
|
/* Set */
|
|
451
|
-
add(value: string, parent?: T, type?:
|
|
448
|
+
add(value: string, parent?: T, type?: number): this;
|
|
452
449
|
delete(value: string, emptyDir?: boolean): boolean;
|
|
453
450
|
has(value: unknown): value is string;
|
|
454
451
|
|
|
@@ -546,7 +543,7 @@ declare namespace functions {
|
|
|
546
543
|
interface IModule<T extends IHost = IHost> extends EventEmitter, IAbortComponent {
|
|
547
544
|
readonly status: LogStatus<StatusType>[];
|
|
548
545
|
readonly errors: unknown[];
|
|
549
|
-
supported:
|
|
546
|
+
supported(major: number, minor?: number, patch?: number, lts?: boolean): boolean;
|
|
550
547
|
supports(name: string, value?: boolean): boolean;
|
|
551
548
|
getTempDir(options: GetTempDirOptions): string;
|
|
552
549
|
getTempDir(uuidDir: boolean, createDir?: boolean): string;
|
|
@@ -591,10 +588,10 @@ declare namespace functions {
|
|
|
591
588
|
removeDir<U extends Promise<boolean>>(src: string, options: RemoveDirOptions, promises: true): U;
|
|
592
589
|
removeDir<U extends NoParamCallback>(src: string, callback: U): void;
|
|
593
590
|
removeDir<U extends NoParamCallback>(src: string, options: RemoveDirOptions, callback: U): void;
|
|
594
|
-
allSettled:
|
|
595
|
-
formatMessage:
|
|
591
|
+
allSettled<U>(values: readonly (U | PromiseLike<U>)[], rejected?: LogValue, options?: LogFailOptions | LogType): Promise<PromiseFulfilledResult<U>[]>;
|
|
592
|
+
formatMessage(type: LogType, title: string, value: LogValue, message?: unknown, options?: LogMessageOptions): void;
|
|
596
593
|
formatFail(type: LogType, title: string, value: LogValue, message?: unknown, options?: LogFailOptions): void;
|
|
597
|
-
writeFail:
|
|
594
|
+
writeFail(value: LogValue, message?: unknown, options?: LogFailOptions | LogType): void;
|
|
598
595
|
writeTimeProcess(title: string, value: string, startTime: LogTime, options?: LogProcessOptions): void;
|
|
599
596
|
writeTimeElapsed(title: string, value: LogValue, startTime: LogTime, options?: LogMessageOptions): void;
|
|
600
597
|
checkPackage(err: unknown, name: Undef<string>, options?: LogFailOptions | LogType): boolean;
|
|
@@ -677,9 +674,9 @@ declare namespace functions {
|
|
|
677
674
|
readonly LOG_TYPE: LOG_TYPE;
|
|
678
675
|
readonly STATUS_TYPE: STATUS_TYPE;
|
|
679
676
|
readonly MAX_TIMEOUT: number;
|
|
680
|
-
supported:
|
|
681
|
-
formatMessage:
|
|
682
|
-
writeFail:
|
|
677
|
+
supported(major: number, minor?: number, patch?: number, lts?: boolean): boolean;
|
|
678
|
+
formatMessage(type: LogType, title: string, value: LogValue, message?: unknown, options?: LogMessageOptions): void;
|
|
679
|
+
writeFail(value: LogValue, message?: unknown, options?: LogFailOptions | LogType): void;
|
|
683
680
|
enabled(key: string, username?: string): boolean;
|
|
684
681
|
parseFunction<U = unknown>(value: unknown, options?: ParseFunctionOptions): Null<FunctionType<Promise<U> | U>>;
|
|
685
682
|
parseFunction<U = unknown>(value: unknown, absolute: boolean, sync?: boolean): Null<FunctionType<Promise<U> | U>>;
|
package/lib/logger.d.ts
CHANGED
|
@@ -119,6 +119,4 @@ export type ForegroundColor = typeof IForegroundColor | HexColor;
|
|
|
119
119
|
export type TextAlign = "left" | "center" | "right";
|
|
120
120
|
export type ErrorOutMethod = (err: Error, data: LogTypeValue, require?: NodeRequire) => void;
|
|
121
121
|
export type BroadcastOutMethod = (value: string, options: LogMessageOptions, require?: NodeRequire) => void;
|
|
122
|
-
export type BroadcastValue = StringOfArray | { value: StringOfArray; stripAnsi?: boolean };
|
|
123
|
-
export type ModuleWriteFailMethod = (value: LogValue, message?: unknown, options?: LogFailOptions | LogType) => void;
|
|
124
|
-
export type ModuleFormatMessageMethod = (type: LogType, title: string, value: LogValue, message?: unknown, options?: LogMessageOptions) => void;
|
|
122
|
+
export type BroadcastValue = StringOfArray | { value: StringOfArray; stripAnsi?: boolean };
|
package/lib/settings.d.ts
CHANGED
|
@@ -243,10 +243,14 @@ export interface RequestSettings extends PurgeAction, PlainObject {
|
|
|
243
243
|
time_format?: "readable" | "relative" | "none";
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
export interface WatchModule extends HandlerModule
|
|
246
|
+
export interface WatchModule<T = WatchSettings> extends HandlerModule<T>, ServerInfo {
|
|
247
247
|
interval?: NumString;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
+
export interface WatchSettings<T = PlainObject> extends PlainObject {
|
|
251
|
+
users?: ObjectMap<ObjectMap<T>>;
|
|
252
|
+
}
|
|
253
|
+
|
|
250
254
|
export interface CompressModule<U = CompressSettings> extends HandlerSettings<U> {
|
|
251
255
|
gzip?: ZlibOptions;
|
|
252
256
|
brotli?: BrotliOptions;
|
package/package.json
CHANGED
package/lib/android.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { FinalizedElement, ControllerSettingsDirectoryUI as IControllerSettingsDirectoryUI } from './squared';
|
|
2
|
-
|
|
3
|
-
import type { ExternalAsset } from './asset';
|
|
4
|
-
import type { RequestData as IRequestData } from './node';
|
|
5
|
-
|
|
6
|
-
export interface DocumentOutput {
|
|
7
|
-
targetAPI?: NumString;
|
|
8
|
-
manifest?: ManifestData;
|
|
9
|
-
namespace?: string;
|
|
10
|
-
profileable?: boolean | StringOfArray;
|
|
11
|
-
dependencies?: string[];
|
|
12
|
-
directories?: ControllerSettingsDirectoryUI;
|
|
13
|
-
elements?: FinalizedElement[];
|
|
14
|
-
projectName?: string;
|
|
15
|
-
mainParentDir?: string;
|
|
16
|
-
mainSrcDir?: string;
|
|
17
|
-
mainActivityFile?: string;
|
|
18
|
-
javaVersion?: NumString;
|
|
19
|
-
versionName?: string;
|
|
20
|
-
versionCode?: number;
|
|
21
|
-
dataBinding?: boolean;
|
|
22
|
-
commands?: ArrayOf<StringOfArray>;
|
|
23
|
-
extensionData?: PlainObject;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface RequestData extends IRequestData<ExternalAsset>, DocumentOutput {}
|
|
27
|
-
|
|
28
|
-
export interface ManifestData {
|
|
29
|
-
package?: string;
|
|
30
|
-
application?: {
|
|
31
|
-
supportsRtl?: boolean;
|
|
32
|
-
label?: string;
|
|
33
|
-
theme?: string;
|
|
34
|
-
metaData?: { name?: string; resource?: string; value?: string }[];
|
|
35
|
-
activity?: ObjectMap<{
|
|
36
|
-
layout?: {
|
|
37
|
-
defaultWidth?: string;
|
|
38
|
-
defaultHeight?: string;
|
|
39
|
-
minWidth?: string;
|
|
40
|
-
minHeight?: string;
|
|
41
|
-
gravity?: string;
|
|
42
|
-
};
|
|
43
|
-
}>;
|
|
44
|
-
activityName?: string;
|
|
45
|
-
fontProvider?: string;
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface ControllerSettingsDirectoryUI extends IControllerSettingsDirectoryUI {
|
|
50
|
-
main: string;
|
|
51
|
-
animation: string;
|
|
52
|
-
theme: string;
|
|
53
|
-
}
|
package/lib/chrome.d.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import type { AttributeAction, ConditionProperty, CssConditionData, ElementAction, ExcludeAction, FileAsset, FromAction, HashAction, DataSource as IDataSource, ImportAction, MetadataAction, ViewEngine, XmlTagNode } from './squared';
|
|
2
|
-
|
|
3
|
-
import type { UploadAction } from './cloud';
|
|
4
|
-
import type { CascadeAction, DbSource } from './db';
|
|
5
|
-
import type { RequestData as IRequestData } from './node';
|
|
6
|
-
|
|
7
|
-
interface ImportFrom {
|
|
8
|
-
placeholder: string;
|
|
9
|
-
original: string;
|
|
10
|
-
uri: string;
|
|
11
|
-
type?: string;
|
|
12
|
-
dynamic?: boolean;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
interface DataObject extends CascadeAction {
|
|
16
|
-
format?: string;
|
|
17
|
-
options?: PlainObject;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface DocumentOutput {
|
|
21
|
-
productionRelease?: boolean | string;
|
|
22
|
-
productionIncremental?: boolean;
|
|
23
|
-
useOriginalHtmlPage?: boolean | string;
|
|
24
|
-
useUnsafeReplace?: ArrayOf<"html" | "css"> | boolean;
|
|
25
|
-
stripCommentsAndCDATA?: boolean | string;
|
|
26
|
-
normalizeHtmlOutput?: boolean | string;
|
|
27
|
-
escapeReservedCharacters?: boolean;
|
|
28
|
-
ignoreServerCodeBlocks?: string[];
|
|
29
|
-
webBundle?: {
|
|
30
|
-
rootDirAlias?: string;
|
|
31
|
-
baseUrl?: string;
|
|
32
|
-
primaryUrl?: string;
|
|
33
|
-
copyTo?: string;
|
|
34
|
-
rewriteHtmlPage?: boolean | string;
|
|
35
|
-
excludeHtmlPage?: boolean;
|
|
36
|
-
excludeTransforms?: boolean;
|
|
37
|
-
includeScopes?: string[];
|
|
38
|
-
excludeScopes?: string[];
|
|
39
|
-
};
|
|
40
|
-
templateMap?: TemplateMap;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface RequestData extends IRequestData<ChromeAsset>, Readonly<DocumentOutput>, Readonly<CssRuleData> {}
|
|
44
|
-
|
|
45
|
-
export interface ChromeAsset extends FileAsset, AttributeAction, ElementAction, MetadataAction<PlainObject>, UploadAction, HashAction, ExcludeAction, ImportAction<ImportFrom[] | boolean>, FromAction {
|
|
46
|
-
preserve?: boolean;
|
|
47
|
-
static?: boolean;
|
|
48
|
-
editing?: boolean;
|
|
49
|
-
inlineContent?: string;
|
|
50
|
-
originAddress?: boolean;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface TemplateMap extends PlainObject {
|
|
54
|
-
html?: ObjectMap<StringMap>;
|
|
55
|
-
js?: ObjectMap<StringMap>;
|
|
56
|
-
css?: ObjectMap<StringMap>;
|
|
57
|
-
data?: StringMap;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface CssRuleData {
|
|
61
|
-
usedVariables?: string[];
|
|
62
|
-
usedFontFace?: string[];
|
|
63
|
-
usedKeyframes?: string[];
|
|
64
|
-
unusedStyles?: string[];
|
|
65
|
-
unusedMedia?: string[];
|
|
66
|
-
unusedContainer?: string[];
|
|
67
|
-
unusedSupports?: string[];
|
|
68
|
-
unusedAtRules?: UnusedAtRule[];
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export interface UnusedAtRule {
|
|
72
|
-
selector?: string;
|
|
73
|
-
media?: ConditionProperty;
|
|
74
|
-
supports?: ConditionProperty;
|
|
75
|
-
container?: CssConditionData & Partial<ConditionProperty>;
|
|
76
|
-
layer?: string[];
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export interface DataSource<T = string> extends IDataSource<T>, ElementAction {
|
|
80
|
-
source: "cloud" | "uri" | "local" | "export" | DbSource;
|
|
81
|
-
element?: XmlTagNode;
|
|
82
|
-
type?: "text" | "attribute" | "display";
|
|
83
|
-
dynamic?: boolean;
|
|
84
|
-
value?: StringOfArray | ObjectMap<unknown>;
|
|
85
|
-
template?: string;
|
|
86
|
-
viewEngine?: ViewEngine | string;
|
|
87
|
-
ignoreEmpty?: boolean;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export interface UriDataSource extends DataSource, DataObject {
|
|
91
|
-
source: "uri";
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface LocalDataSource extends DataSource, DataObject {
|
|
95
|
-
source: "local";
|
|
96
|
-
pathname?: string;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export interface ExportDataSource extends DataSource, CascadeAction {
|
|
100
|
-
source: "export";
|
|
101
|
-
execute?: FunctionType;
|
|
102
|
-
pathname?: string;
|
|
103
|
-
settings?: string;
|
|
104
|
-
params?: unknown;
|
|
105
|
-
persist?: boolean;
|
|
106
|
-
}
|