incremental-compiler 13.1.19 → 13.1.20
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/README.md +13 -13
- package/app.js +3 -3
- package/browser/README.md +24 -24
- package/browser/esm2020/incremental-compiler.mjs +4 -4
- package/browser/esm2020/lib/index.mjs +74 -74
- package/browser/esm2020/lib/models.mjs +5 -5
- package/browser/esm2020/public-api.mjs +1 -1
- package/browser/fesm2015/incremental-compiler.mjs +74 -74
- package/browser/fesm2020/incremental-compiler.mjs +74 -74
- package/browser/incremental-compiler.d.ts +4 -4
- package/browser/lib/models.d.ts +33 -33
- package/client/README.md +24 -24
- package/client/esm2020/incremental-compiler.mjs +4 -4
- package/client/esm2020/lib/index.mjs +74 -74
- package/client/esm2020/lib/models.mjs +5 -5
- package/client/esm2020/public-api.mjs +1 -1
- package/client/fesm2015/incremental-compiler.mjs +74 -74
- package/client/fesm2020/incremental-compiler.mjs +74 -74
- package/client/incremental-compiler.d.ts +4 -4
- package/client/lib/models.d.ts +33 -33
- package/index.d.ts +1 -1
- package/lib/base-client-compiler.backend.d.ts +48 -48
- package/lib/change-of-file.backend.d.ts +14 -14
- package/lib/compiler-manager.backend.d.ts +27 -27
- package/lib/decorators.backend.d.ts +5 -5
- package/lib/helpers.backend.d.ts +2 -2
- package/lib/index.d.ts +40 -40
- package/lib/models.d.ts +34 -34
- package/package.json +4 -4
- package/package.json_devDependencies.json +216 -216
- package/package.json_tnp.json5 +50 -50
- package/tmp-environment.json +13 -13
- package/websql/README.md +24 -24
- package/websql/esm2020/incremental-compiler.mjs +4 -4
- package/websql/esm2020/lib/index.mjs +74 -74
- package/websql/esm2020/lib/models.mjs +5 -5
- package/websql/esm2020/public-api.mjs +1 -1
- package/websql/fesm2015/incremental-compiler.mjs +74 -74
- package/websql/fesm2020/incremental-compiler.mjs +74 -74
- package/websql/incremental-compiler.d.ts +4 -4
- package/websql/lib/models.d.ts +33 -33
@@ -1,48 +1,48 @@
|
|
1
|
-
import { ChangeOfFile } from './change-of-file.backend';
|
2
|
-
import { Models } from './models';
|
3
|
-
import { ConfigModels } from 'tnp-config';
|
4
|
-
export declare class BaseClientCompiler<RES_ASYNC = any, RES_SYNC = any, ADDITIONAL_DATA = any> implements Models.BaseClientCompilerOptions {
|
5
|
-
readonly followSymlinks: boolean;
|
6
|
-
readonly subscribeOnlyFor: ConfigModels.FileExtension[];
|
7
|
-
readonly executeOutsideScenario: boolean;
|
8
|
-
readonly watchDepth: Number;
|
9
|
-
readonly taskName: string;
|
10
|
-
ignoreFolderPatter?: string[];
|
11
|
-
allowedOnlyFileExt?: string[];
|
12
|
-
additionallyAllowedFilesWithNames?: string[];
|
13
|
-
readonly notifyOnFileUnlink: boolean;
|
14
|
-
compilationWrapper: (fn: () => void, taskName?: string, executionType?: "Compilation of" | "Code execution of" | "Event:") => Promise<void>;
|
15
|
-
private pathResolve;
|
16
|
-
private initedWithOptions;
|
17
|
-
private __folderPath;
|
18
|
-
private _folderPathContentCheck;
|
19
|
-
get key(): string;
|
20
|
-
get isInited(): boolean;
|
21
|
-
get folderPathContentCheck(): string[];
|
22
|
-
private set folderPathContentCheck(value);
|
23
|
-
set folderPath(v: string[]);
|
24
|
-
get folderPath(): string[];
|
25
|
-
constructor(options?: Models.BaseClientCompilerOptions);
|
26
|
-
/**
|
27
|
-
* manually init options (when no passing object to constructor super() )
|
28
|
-
*/
|
29
|
-
protected initOptions(options?: Models.BaseClientCompilerOptions): void;
|
30
|
-
/**
|
31
|
-
* Do not override this
|
32
|
-
*/
|
33
|
-
start(taskName?: string, afterInitCallBack?: () => void): Promise<BaseClientCompiler<RES_ASYNC, RES_SYNC, ADDITIONAL_DATA>>;
|
34
|
-
/**
|
35
|
-
* Do not override this
|
36
|
-
*/
|
37
|
-
startAndWatch(taskName?: string, options?: Models.StartAndWatchOptions): Promise<BaseClientCompiler<RES_ASYNC, RES_SYNC, ADDITIONAL_DATA>>;
|
38
|
-
/**
|
39
|
-
*
|
40
|
-
* @param absolteFilesPathes for each watched file
|
41
|
-
* @returns
|
42
|
-
*/
|
43
|
-
syncAction(absolteFilesPathes?: string[]): Promise<RES_SYNC>;
|
44
|
-
preAsyncAction(): Promise<void>;
|
45
|
-
asyncAction(asyncEvents: ChangeOfFile, additionalData?: ADDITIONAL_DATA): Promise<RES_ASYNC>;
|
46
|
-
private _init;
|
47
|
-
private fixTaskName;
|
48
|
-
}
|
1
|
+
import { ChangeOfFile } from './change-of-file.backend';
|
2
|
+
import { Models } from './models';
|
3
|
+
import { ConfigModels } from 'tnp-config';
|
4
|
+
export declare class BaseClientCompiler<RES_ASYNC = any, RES_SYNC = any, ADDITIONAL_DATA = any> implements Models.BaseClientCompilerOptions {
|
5
|
+
readonly followSymlinks: boolean;
|
6
|
+
readonly subscribeOnlyFor: ConfigModels.FileExtension[];
|
7
|
+
readonly executeOutsideScenario: boolean;
|
8
|
+
readonly watchDepth: Number;
|
9
|
+
readonly taskName: string;
|
10
|
+
ignoreFolderPatter?: string[];
|
11
|
+
allowedOnlyFileExt?: string[];
|
12
|
+
additionallyAllowedFilesWithNames?: string[];
|
13
|
+
readonly notifyOnFileUnlink: boolean;
|
14
|
+
compilationWrapper: (fn: () => void, taskName?: string, executionType?: "Compilation of" | "Code execution of" | "Event:") => Promise<void>;
|
15
|
+
private pathResolve;
|
16
|
+
private initedWithOptions;
|
17
|
+
private __folderPath;
|
18
|
+
private _folderPathContentCheck;
|
19
|
+
get key(): string;
|
20
|
+
get isInited(): boolean;
|
21
|
+
get folderPathContentCheck(): string[];
|
22
|
+
private set folderPathContentCheck(value);
|
23
|
+
set folderPath(v: string[]);
|
24
|
+
get folderPath(): string[];
|
25
|
+
constructor(options?: Models.BaseClientCompilerOptions);
|
26
|
+
/**
|
27
|
+
* manually init options (when no passing object to constructor super() )
|
28
|
+
*/
|
29
|
+
protected initOptions(options?: Models.BaseClientCompilerOptions): void;
|
30
|
+
/**
|
31
|
+
* Do not override this
|
32
|
+
*/
|
33
|
+
start(taskName?: string, afterInitCallBack?: () => void): Promise<BaseClientCompiler<RES_ASYNC, RES_SYNC, ADDITIONAL_DATA>>;
|
34
|
+
/**
|
35
|
+
* Do not override this
|
36
|
+
*/
|
37
|
+
startAndWatch(taskName?: string, options?: Models.StartAndWatchOptions): Promise<BaseClientCompiler<RES_ASYNC, RES_SYNC, ADDITIONAL_DATA>>;
|
38
|
+
/**
|
39
|
+
*
|
40
|
+
* @param absolteFilesPathes for each watched file
|
41
|
+
* @returns
|
42
|
+
*/
|
43
|
+
syncAction(absolteFilesPathes?: string[]): Promise<RES_SYNC>;
|
44
|
+
preAsyncAction(): Promise<void>;
|
45
|
+
asyncAction(asyncEvents: ChangeOfFile, additionalData?: ADDITIONAL_DATA): Promise<RES_ASYNC>;
|
46
|
+
private _init;
|
47
|
+
private fixTaskName;
|
48
|
+
}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import { BaseClientCompiler } from './base-client-compiler.backend';
|
2
|
-
import { ConfigModels } from 'tnp-config';
|
3
|
-
export declare class ChangeOfFile {
|
4
|
-
fileAbsolutePath: string;
|
5
|
-
readonly eventName: 'add' | 'change' | 'unlink' | 'unlinkDir';
|
6
|
-
executedFor: BaseClientCompiler[];
|
7
|
-
private readonly _clientsForChange;
|
8
|
-
readonly datetime: Date;
|
9
|
-
constructor(clientsForChange?: BaseClientCompiler[], fileAbsolutePath?: string, eventName?: 'add' | 'change' | 'unlink' | 'unlinkDir');
|
10
|
-
get clientsForChange(): BaseClientCompiler<any, any, any>[];
|
11
|
-
get clientsForChangeFilterExt(): BaseClientCompiler<any, any, any>[];
|
12
|
-
get fileExt(): ConfigModels.FileExtension;
|
13
|
-
clientsBy<T = BaseClientCompiler>(clientNameOrClass: string | Function, condition?: (c: T) => boolean): T[];
|
14
|
-
}
|
1
|
+
import { BaseClientCompiler } from './base-client-compiler.backend';
|
2
|
+
import { ConfigModels } from 'tnp-config';
|
3
|
+
export declare class ChangeOfFile {
|
4
|
+
fileAbsolutePath: string;
|
5
|
+
readonly eventName: 'add' | 'change' | 'unlink' | 'unlinkDir';
|
6
|
+
executedFor: BaseClientCompiler[];
|
7
|
+
private readonly _clientsForChange;
|
8
|
+
readonly datetime: Date;
|
9
|
+
constructor(clientsForChange?: BaseClientCompiler[], fileAbsolutePath?: string, eventName?: 'add' | 'change' | 'unlink' | 'unlinkDir');
|
10
|
+
get clientsForChange(): BaseClientCompiler<any, any, any>[];
|
11
|
+
get clientsForChangeFilterExt(): BaseClientCompiler<any, any, any>[];
|
12
|
+
get fileExt(): ConfigModels.FileExtension;
|
13
|
+
clientsBy<T = BaseClientCompiler>(clientNameOrClass: string | Function, condition?: (c: T) => boolean): T[];
|
14
|
+
}
|
@@ -1,27 +1,27 @@
|
|
1
|
-
import { ChangeOfFile } from './change-of-file.backend';
|
2
|
-
import { BaseClientCompiler } from './base-client-compiler.backend';
|
3
|
-
export declare class CompilerManager {
|
4
|
-
private static _instance;
|
5
|
-
static get Instance(): CompilerManager;
|
6
|
-
private filesToWatch;
|
7
|
-
get allClients(): {
|
8
|
-
get<T = BaseClientCompiler<any, any, any>>(clientNameOrClass: string | Function, condition: (c: T) => boolean): BaseClientCompiler<any, any, any>[] | T[];
|
9
|
-
};
|
10
|
-
private watchers;
|
11
|
-
private lastAsyncFiles;
|
12
|
-
private currentObservedFolder;
|
13
|
-
private clients;
|
14
|
-
private asyncEventScenario;
|
15
|
-
private inited;
|
16
|
-
private filesContentCache;
|
17
|
-
private constructor();
|
18
|
-
syncInit(client: BaseClientCompiler): Promise<void>;
|
19
|
-
asyncInit(client: BaseClientCompiler): Promise<void>;
|
20
|
-
addClient(client: BaseClientCompiler): void;
|
21
|
-
/**
|
22
|
-
* @deprecated
|
23
|
-
*/
|
24
|
-
initScenario(onAsyncFileChange?: (event: ChangeOfFile) => Promise<any>): Promise<void>;
|
25
|
-
private preventAlreadyInited;
|
26
|
-
private fileShouldBeChecked;
|
27
|
-
}
|
1
|
+
import { ChangeOfFile } from './change-of-file.backend';
|
2
|
+
import { BaseClientCompiler } from './base-client-compiler.backend';
|
3
|
+
export declare class CompilerManager {
|
4
|
+
private static _instance;
|
5
|
+
static get Instance(): CompilerManager;
|
6
|
+
private filesToWatch;
|
7
|
+
get allClients(): {
|
8
|
+
get<T = BaseClientCompiler<any, any, any>>(clientNameOrClass: string | Function, condition: (c: T) => boolean): BaseClientCompiler<any, any, any>[] | T[];
|
9
|
+
};
|
10
|
+
private watchers;
|
11
|
+
private lastAsyncFiles;
|
12
|
+
private currentObservedFolder;
|
13
|
+
private clients;
|
14
|
+
private asyncEventScenario;
|
15
|
+
private inited;
|
16
|
+
private filesContentCache;
|
17
|
+
private constructor();
|
18
|
+
syncInit(client: BaseClientCompiler): Promise<void>;
|
19
|
+
asyncInit(client: BaseClientCompiler): Promise<void>;
|
20
|
+
addClient(client: BaseClientCompiler): void;
|
21
|
+
/**
|
22
|
+
* @deprecated
|
23
|
+
*/
|
24
|
+
initScenario(onAsyncFileChange?: (event: ChangeOfFile) => Promise<any>): Promise<void>;
|
25
|
+
private preventAlreadyInited;
|
26
|
+
private fileShouldBeChecked;
|
27
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export declare function AsyncAction(): (target: object, propertyKey: string, propertyDescriptor: PropertyDescriptor) => void;
|
2
|
-
export interface IncCompilerClassOptions {
|
3
|
-
className: string;
|
4
|
-
}
|
5
|
-
export declare function IncCompilerClass(options: IncCompilerClassOptions): (target: any) => void;
|
1
|
+
export declare function AsyncAction(): (target: object, propertyKey: string, propertyDescriptor: PropertyDescriptor) => void;
|
2
|
+
export interface IncCompilerClassOptions {
|
3
|
+
className: string;
|
4
|
+
}
|
5
|
+
export declare function IncCompilerClass(options: IncCompilerClassOptions): (target: any) => void;
|
package/lib/helpers.backend.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import { BaseClientCompiler } from './base-client-compiler.backend';
|
2
|
-
export declare function clientsBy<T = BaseClientCompiler>(clientNameOrClass: string | Function, condition: (c: T) => boolean, clients: BaseClientCompiler[]): T[];
|
1
|
+
import { BaseClientCompiler } from './base-client-compiler.backend';
|
2
|
+
export declare function clientsBy<T = BaseClientCompiler>(clientNameOrClass: string | Function, condition: (c: T) => boolean, clients: BaseClientCompiler[]): T[];
|
package/lib/index.d.ts
CHANGED
@@ -1,40 +1,40 @@
|
|
1
|
-
import * as models from './models';
|
2
|
-
export * from './compiler-manager.backend';
|
3
|
-
export * from './base-client-compiler.backend';
|
4
|
-
export * from './change-of-file.backend';
|
5
|
-
import * as incBase from './base-client-compiler.backend';
|
6
|
-
import * as change from './change-of-file.backend';
|
7
|
-
import * as deco from './decorators.backend';
|
8
|
-
/**
|
9
|
-
* Template for watcher client:
|
10
|
-
*
|
11
|
-
* import { IncCompiler } from 'firedev'
|
12
|
-
*
|
13
|
-
* IncCompiler.init( asyncChangeOfFile => {
|
14
|
-
*
|
15
|
-
* })
|
16
|
-
*
|
17
|
-
* @IncCompiler.Class({ className: 'TestWatcher' })
|
18
|
-
* export class TestWatcher extends IncCompiler.Base {
|
19
|
-
*
|
20
|
-
* syncAction(files = []) { }
|
21
|
-
* preAsyncAction() { }
|
22
|
-
* asyncAction(change: IncCompiler.Change, additionalData:any ) { }
|
23
|
-
* }
|
24
|
-
*/
|
25
|
-
export declare namespace IncCompiler {
|
26
|
-
export import Models = models.Models;
|
27
|
-
/**
|
28
|
-
* 1. Only one task at the time
|
29
|
-
* 2. Only files changes not directories
|
30
|
-
* @deprecated
|
31
|
-
*/
|
32
|
-
function allClients<T>(clientNameOrClass?: string | Function, condition?: (c: T) => boolean): Base<any, any, any>[] | T[];
|
33
|
-
export import Base = incBase.BaseClientCompiler;
|
34
|
-
export import Class = deco.IncCompilerClass;
|
35
|
-
namespace methods {
|
36
|
-
export import AsyncAction = deco.AsyncAction;
|
37
|
-
}
|
38
|
-
export import Change = change.ChangeOfFile;
|
39
|
-
function getInstance<CLASS_TYPE>(compilerClassName: string): CLASS_TYPE;
|
40
|
-
}
|
1
|
+
import * as models from './models';
|
2
|
+
export * from './compiler-manager.backend';
|
3
|
+
export * from './base-client-compiler.backend';
|
4
|
+
export * from './change-of-file.backend';
|
5
|
+
import * as incBase from './base-client-compiler.backend';
|
6
|
+
import * as change from './change-of-file.backend';
|
7
|
+
import * as deco from './decorators.backend';
|
8
|
+
/**
|
9
|
+
* Template for watcher client:
|
10
|
+
*
|
11
|
+
* import { IncCompiler } from 'firedev'
|
12
|
+
*
|
13
|
+
* IncCompiler.init( asyncChangeOfFile => {
|
14
|
+
*
|
15
|
+
* })
|
16
|
+
*
|
17
|
+
* @IncCompiler.Class({ className: 'TestWatcher' })
|
18
|
+
* export class TestWatcher extends IncCompiler.Base {
|
19
|
+
*
|
20
|
+
* syncAction(files = []) { }
|
21
|
+
* preAsyncAction() { }
|
22
|
+
* asyncAction(change: IncCompiler.Change, additionalData:any ) { }
|
23
|
+
* }
|
24
|
+
*/
|
25
|
+
export declare namespace IncCompiler {
|
26
|
+
export import Models = models.Models;
|
27
|
+
/**
|
28
|
+
* 1. Only one task at the time
|
29
|
+
* 2. Only files changes not directories
|
30
|
+
* @deprecated
|
31
|
+
*/
|
32
|
+
function allClients<T>(clientNameOrClass?: string | Function, condition?: (c: T) => boolean): Base<any, any, any>[] | T[];
|
33
|
+
export import Base = incBase.BaseClientCompiler;
|
34
|
+
export import Class = deco.IncCompilerClass;
|
35
|
+
namespace methods {
|
36
|
+
export import AsyncAction = deco.AsyncAction;
|
37
|
+
}
|
38
|
+
export import Change = change.ChangeOfFile;
|
39
|
+
function getInstance<CLASS_TYPE>(compilerClassName: string): CLASS_TYPE;
|
40
|
+
}
|
package/lib/models.d.ts
CHANGED
@@ -1,34 +1,34 @@
|
|
1
|
-
import { ConfigModels } from 'tnp-config';
|
2
|
-
export declare namespace Models {
|
3
|
-
interface StartAndWatchOptions {
|
4
|
-
afterInitCallBack?: () => void;
|
5
|
-
watchOnly?: boolean;
|
6
|
-
}
|
7
|
-
interface BaseClientCompilerOptions {
|
8
|
-
folderPath?: string | string[];
|
9
|
-
/**
|
10
|
-
* It will cache in memory previouse files
|
11
|
-
* to limit async actions calls
|
12
|
-
* and prevent not changed files emiting change event
|
13
|
-
*/
|
14
|
-
folderPathContentCheck?: string | string[];
|
15
|
-
watchDepth?: Number;
|
16
|
-
/**
|
17
|
-
* default true
|
18
|
-
*/
|
19
|
-
followSymlinks?: boolean;
|
20
|
-
/**
|
21
|
-
* Notify compiler if file is unlinked
|
22
|
-
* default: false
|
23
|
-
*/
|
24
|
-
notifyOnFileUnlink?: boolean;
|
25
|
-
ignoreFolderPatter?: string[];
|
26
|
-
allowedOnlyFileExt?: string[];
|
27
|
-
/**
|
28
|
-
* useful when using **allowedOnlyFileExt**
|
29
|
-
*/
|
30
|
-
additionallyAllowedFilesWithNames?: string[];
|
31
|
-
executeOutsideScenario?: boolean;
|
32
|
-
subscribeOnlyFor?: ConfigModels.FileExtension[];
|
33
|
-
}
|
34
|
-
}
|
1
|
+
import { ConfigModels } from 'tnp-config';
|
2
|
+
export declare namespace Models {
|
3
|
+
interface StartAndWatchOptions {
|
4
|
+
afterInitCallBack?: () => void;
|
5
|
+
watchOnly?: boolean;
|
6
|
+
}
|
7
|
+
interface BaseClientCompilerOptions {
|
8
|
+
folderPath?: string | string[];
|
9
|
+
/**
|
10
|
+
* It will cache in memory previouse files
|
11
|
+
* to limit async actions calls
|
12
|
+
* and prevent not changed files emiting change event
|
13
|
+
*/
|
14
|
+
folderPathContentCheck?: string | string[];
|
15
|
+
watchDepth?: Number;
|
16
|
+
/**
|
17
|
+
* default true
|
18
|
+
*/
|
19
|
+
followSymlinks?: boolean;
|
20
|
+
/**
|
21
|
+
* Notify compiler if file is unlinked
|
22
|
+
* default: false
|
23
|
+
*/
|
24
|
+
notifyOnFileUnlink?: boolean;
|
25
|
+
ignoreFolderPatter?: string[];
|
26
|
+
allowedOnlyFileExt?: string[];
|
27
|
+
/**
|
28
|
+
* useful when using **allowedOnlyFileExt**
|
29
|
+
*/
|
30
|
+
additionallyAllowedFilesWithNames?: string[];
|
31
|
+
executeOutsideScenario?: boolean;
|
32
|
+
subscribeOnlyFor?: ConfigModels.FileExtension[];
|
33
|
+
}
|
34
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "incremental-compiler",
|
3
|
-
"version": "13.1.
|
3
|
+
"version": "13.1.20",
|
4
4
|
"license": "MIT",
|
5
5
|
"dependencies": {
|
6
6
|
"@types/chokidar": "2.1.3",
|
@@ -11,11 +11,11 @@
|
|
11
11
|
"dateformat": "3.0.3",
|
12
12
|
"fs-extra": "8.1.0",
|
13
13
|
"glob": "7.1.2",
|
14
|
-
"tnp-cli": "~13.1.
|
15
|
-
"typescript-class-helpers": "~13.2.
|
14
|
+
"tnp-cli": "~13.1.53",
|
15
|
+
"typescript-class-helpers": "~13.2.4"
|
16
16
|
},
|
17
17
|
"private": false,
|
18
|
-
"lastBuildTagHash": "
|
18
|
+
"lastBuildTagHash": "a6dcee50b8bf6a68d2fdd630276a5f032f230212",
|
19
19
|
"main": "index.js",
|
20
20
|
"devDependencies": {}
|
21
21
|
}
|