tnp-helpers 19.0.5 → 19.0.7
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/browser/fesm2022/tnp-helpers.mjs +2399 -234
- package/browser/fesm2022/tnp-helpers.mjs.map +1 -1
- package/browser/lib/base/linked-project.d.ts +4 -1
- package/browser/lib/base/tcp-udp-ports/tcp-udp-ports.context.d.ts +6 -6
- package/browser/lib/build-info._auto-generated_.d.ts +2 -1
- package/browser/lib/helpers/helpers.d.ts +1 -0
- package/browser/lib/index.d.ts +3 -1
- package/browser/lib/old/execute-command.d.ts +12 -0
- package/browser/lib/old/helpers.d.ts +62 -0
- package/browser/lib/old/models.d.ts +81 -0
- package/browser/lib/utils.d.ts +42 -21
- package/browser/package.json +1 -1
- package/client/fesm2022/tnp-helpers.mjs +2399 -234
- package/client/fesm2022/tnp-helpers.mjs.map +1 -1
- package/client/lib/base/linked-project.d.ts +4 -1
- package/client/lib/base/tcp-udp-ports/tcp-udp-ports.context.d.ts +6 -6
- package/client/lib/build-info._auto-generated_.d.ts +2 -1
- package/client/lib/helpers/helpers.d.ts +1 -0
- package/client/lib/index.d.ts +3 -1
- package/client/lib/old/execute-command.d.ts +12 -0
- package/client/lib/old/helpers.d.ts +62 -0
- package/client/lib/old/models.d.ts +81 -0
- package/client/lib/utils.d.ts +42 -21
- package/client/package.json +1 -1
- package/lib/base/classes/base-bower-json.js +2 -2
- package/lib/base/classes/base-bower-json.js.map +1 -1
- package/lib/base/classes/base-cli-worker/base-cli-worker-config.js +2 -2
- package/lib/base/classes/base-cli-worker/base-cli-worker-config.js.map +1 -1
- package/lib/base/classes/base-cli-worker/base-cli-worker-controller.d.ts +1 -1
- package/lib/base/classes/base-cli-worker/base-cli-worker-controller.js +14 -14
- package/lib/base/classes/base-cli-worker/base-cli-worker-controller.js.map +1 -1
- package/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.js +10 -10
- package/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.js.map +1 -1
- package/lib/base/classes/base-cli-worker/base-cli-worker.d.ts +1 -1
- package/lib/base/classes/base-cli-worker/base-cli-worker.js +18 -18
- package/lib/base/classes/base-cli-worker/base-cli-worker.js.map +1 -1
- package/lib/base/classes/base-command-line-feature.backend.js +10 -10
- package/lib/base/classes/base-command-line-feature.backend.js.map +1 -1
- package/lib/base/classes/base-compiler-for-project.d.ts +1 -1
- package/lib/base/classes/base-compiler-for-project.js +13 -13
- package/lib/base/classes/base-compiler-for-project.js.map +1 -1
- package/lib/base/classes/base-db.js +7 -7
- package/lib/base/classes/base-db.js.map +1 -1
- package/lib/base/classes/base-debounce-compiler-for-project.d.ts +1 -1
- package/lib/base/classes/base-debounce-compiler-for-project.js +5 -5
- package/lib/base/classes/base-debounce-compiler-for-project.js.map +1 -1
- package/lib/base/classes/base-git.js +26 -25
- package/lib/base/classes/base-git.js.map +1 -1
- package/lib/base/classes/base-global-command-line.backend.d.ts +3 -1
- package/lib/base/classes/base-global-command-line.backend.js +60 -49
- package/lib/base/classes/base-global-command-line.backend.js.map +1 -1
- package/lib/base/classes/base-ignore-hide.js +2 -2
- package/lib/base/classes/base-ignore-hide.js.map +1 -1
- package/lib/base/classes/base-json-file-reader.js +24 -24
- package/lib/base/classes/base-json-file-reader.js.map +1 -1
- package/lib/base/classes/base-library-build.js +52 -52
- package/lib/base/classes/base-library-build.js.map +1 -1
- package/lib/base/classes/base-linked-projects.js +23 -23
- package/lib/base/classes/base-linked-projects.js.map +1 -1
- package/lib/base/classes/base-node-modules.js +37 -37
- package/lib/base/classes/base-node-modules.js.map +1 -1
- package/lib/base/classes/base-npm-helpers.d.ts +1 -1
- package/lib/base/classes/base-npm-helpers.js +14 -14
- package/lib/base/classes/base-npm-helpers.js.map +1 -1
- package/lib/base/classes/base-package-json.d.ts +1 -1
- package/lib/base/classes/base-package-json.js +27 -27
- package/lib/base/classes/base-package-json.js.map +1 -1
- package/lib/base/classes/base-powershell.js +7 -2
- package/lib/base/classes/base-powershell.js.map +1 -1
- package/lib/base/classes/base-process-manager.js +8 -8
- package/lib/base/classes/base-process-manager.js.map +1 -1
- package/lib/base/classes/base-project-resolver.js +34 -33
- package/lib/base/classes/base-project-resolver.js.map +1 -1
- package/lib/base/classes/base-project.d.ts +1 -1
- package/lib/base/classes/base-project.js +62 -62
- package/lib/base/classes/base-project.js.map +1 -1
- package/lib/base/classes/base-quick-fixes.js +9 -9
- package/lib/base/classes/base-quick-fixes.js.map +1 -1
- package/lib/base/classes/base-release-process.d.ts +1 -1
- package/lib/base/classes/base-release-process.js +19 -19
- package/lib/base/classes/base-release-process.js.map +1 -1
- package/lib/base/classes/base-start-config.backend.js +13 -13
- package/lib/base/classes/base-start-config.backend.js.map +1 -1
- package/lib/base/classes/base-static-pages.js +6 -6
- package/lib/base/classes/base-static-pages.js.map +1 -1
- package/lib/base/classes/base-vscode.js +31 -24
- package/lib/base/classes/base-vscode.js.map +1 -1
- package/lib/base/commit-data.js +25 -25
- package/lib/base/commit-data.js.map +1 -1
- package/lib/base/core-project.d.ts +1 -1
- package/lib/base/core-project.js +9 -9
- package/lib/base/core-project.js.map +1 -1
- package/lib/base/gh-temp-code.js +6 -6
- package/lib/base/gh-temp-code.js.map +1 -1
- package/lib/base/index-rebuilder.backend.js +1 -1
- package/lib/base/index-rebuilder.backend.js.map +1 -1
- package/lib/base/linked-project.d.ts +4 -1
- package/lib/base/linked-project.js +18 -9
- package/lib/base/linked-project.js.map +1 -1
- package/lib/base/tcp-udp-ports/not-assignable-port.entity.js +2 -2
- package/lib/base/tcp-udp-ports/ports.controller.d.ts +1 -1
- package/lib/base/tcp-udp-ports/ports.controller.js +21 -21
- package/lib/base/tcp-udp-ports/ports.controller.js.map +1 -1
- package/lib/base/tcp-udp-ports/ports.entity.d.ts +1 -1
- package/lib/base/tcp-udp-ports/ports.entity.js +10 -10
- package/lib/base/tcp-udp-ports/ports.entity.js.map +1 -1
- package/lib/base/tcp-udp-ports/tcp-udp-ports.context.d.ts +9 -9
- package/lib/base/tcp-udp-ports/tcp-udp-ports.context.js +9 -9
- package/lib/base/tcp-udp-ports/tcp-udp-ports.context.js.map +1 -1
- package/lib/base/tcp-udp-ports/tcp-upd-ports-terminal-ui.js +18 -18
- package/lib/base/tcp-udp-ports/tcp-upd-ports-terminal-ui.js.map +1 -1
- package/lib/build-info._auto-generated_.d.ts +2 -1
- package/lib/build-info._auto-generated_.js +3 -2
- package/lib/build-info._auto-generated_.js.map +1 -1
- package/lib/helpers/for-backend/helpers-cli-tool.backend.js +40 -40
- package/lib/helpers/for-backend/helpers-cli-tool.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-console-gui.js +2 -2
- package/lib/helpers/for-backend/helpers-console-gui.js.map +1 -1
- package/lib/helpers/for-backend/helpers-dependencies.backend.js +2 -2
- package/lib/helpers/for-backend/helpers-dependencies.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-file-folders.js +131 -131
- package/lib/helpers/for-backend/helpers-file-folders.js.map +1 -1
- package/lib/helpers/for-backend/helpers-git.backend.js +120 -106
- package/lib/helpers/for-backend/helpers-git.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-network.backend.js +2 -3
- package/lib/helpers/for-backend/helpers-network.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-npm.backend.js +2 -2
- package/lib/helpers/for-backend/helpers-npm.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-path.backend.js +6 -6
- package/lib/helpers/for-backend/helpers-path.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-process.d.ts +1 -1
- package/lib/helpers/for-backend/helpers-process.js +41 -41
- package/lib/helpers/for-backend/helpers-process.js.map +1 -1
- package/lib/helpers/for-backend/helpers-system-terminal.backend.js +2 -2
- package/lib/helpers/for-backend/helpers-system-terminal.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-vscode.backend.d.ts +1 -1
- package/lib/helpers/for-backend/helpers-vscode.backend.js +2 -2
- package/lib/helpers/for-backend/helpers-vscode.backend.js.map +1 -1
- package/lib/helpers/for-browser/angular.helper.js +2 -2
- package/lib/helpers/helpers-array-obj.js +10 -10
- package/lib/helpers/helpers-array-obj.js.map +1 -1
- package/lib/helpers/helpers-json5.backend.js +6 -6
- package/lib/helpers/helpers-json5.backend.js.map +1 -1
- package/lib/helpers/helpers-numbers.js.map +1 -1
- package/lib/helpers/helpers-strings-regexes.js +5 -5
- package/lib/helpers/helpers-strings-regexes.js.map +1 -1
- package/lib/helpers/helpers-strings.js +3 -3
- package/lib/helpers/helpers-strings.js.map +1 -1
- package/lib/helpers/helpers.d.ts +1 -0
- package/lib/helpers/helpers.js +42 -30
- package/lib/helpers/helpers.js.map +1 -1
- package/lib/index.js +0 -2
- package/lib/index.js.map +1 -1
- package/lib/lowdb/adapters/node/TextFile.js +2 -2
- package/lib/lowdb/adapters/node/TextFile.js.map +1 -1
- package/lib/models.d.ts +1 -1
- package/lib/models.js +8 -8
- package/lib/models.js.map +1 -1
- package/lib/old/base-component.js +2 -2
- package/lib/old/base-formly-component.js +2 -2
- package/lib/old/dual-component-ctrl.js +2 -2
- package/lib/old/execute-command.js +20 -8
- package/lib/old/execute-command.js.map +1 -1
- package/lib/old/helpers.js +2 -2
- package/lib/old/helpers.js.map +1 -1
- package/lib/old/models.d.ts +1 -1
- package/lib/utils.d.ts +42 -21
- package/lib/utils.js +340 -54
- package/lib/utils.js.map +1 -1
- package/lib/validators/validators-firedev.js +6 -6
- package/lib/validators/validators-firedev.js.map +1 -1
- package/lib/validators/validators-git.js.map +1 -1
- package/lib/validators/validators-network.js +2 -2
- package/lib/validators/validators-network.js.map +1 -1
- package/migrations/1736198527297_init.d.ts +1 -1
- package/migrations/1736198527297_init.js +5 -5
- package/migrations/1736198527297_init.js.map +1 -1
- package/migrations/1736199486472_addingNotAssignablePorts.d.ts +1 -1
- package/migrations/1736199486472_addingNotAssignablePorts.js +8 -8
- package/migrations/1736199486472_addingNotAssignablePorts.js.map +1 -1
- package/migrations/1736454437350_addFreePorts.d.ts +1 -1
- package/migrations/1736454437350_addFreePorts.js +11 -11
- package/migrations/1736454437350_addFreePorts.js.map +1 -1
- package/package.json +1 -1
- package/tmp-environment.json +4 -4
- package/websql/fesm2022/tnp-helpers.mjs +2436 -238
- package/websql/fesm2022/tnp-helpers.mjs.map +1 -1
- package/websql/lib/base/linked-project.d.ts +4 -1
- package/websql/lib/base/tcp-udp-ports/tcp-udp-ports.context.d.ts +6 -6
- package/websql/lib/build-info._auto-generated_.d.ts +2 -1
- package/websql/lib/helpers/helpers.d.ts +1 -0
- package/websql/lib/index.d.ts +3 -1
- package/websql/lib/old/execute-command.d.ts +12 -0
- package/websql/lib/old/helpers.d.ts +62 -0
- package/websql/lib/old/models.d.ts +81 -0
- package/websql/lib/utils.d.ts +42 -21
- package/websql/package.json +1 -1
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
export declare class LinkedProject {
|
|
3
3
|
static from(options: Partial<LinkedProject>): LinkedProject;
|
|
4
4
|
static fromName(projectName: string, currentRemoteUrl?: string, currentBranch?: string): LinkedProject;
|
|
5
|
-
static detect(insideLocation: string,
|
|
5
|
+
static detect(insideLocation: string, options?: {
|
|
6
|
+
recursive?: boolean;
|
|
7
|
+
checkAlsoNonRepos?: boolean;
|
|
8
|
+
}): LinkedProject[];
|
|
6
9
|
/**
|
|
7
10
|
* sometime there is project that has one project
|
|
8
11
|
* embede inside another project
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
export declare const PortsContextTemplate: () => {
|
|
3
3
|
types: {
|
|
4
|
-
readonly controllers:
|
|
5
|
-
readonly repositories:
|
|
6
|
-
readonly providers:
|
|
7
|
-
readonly subscribers:
|
|
8
|
-
readonly migrations:
|
|
4
|
+
readonly controllers: any;
|
|
5
|
+
readonly repositories: any;
|
|
6
|
+
readonly providers: any;
|
|
7
|
+
readonly subscribers: any;
|
|
8
|
+
readonly migrations: any;
|
|
9
9
|
};
|
|
10
|
-
readonly contexts:
|
|
10
|
+
readonly contexts: any;
|
|
11
11
|
readonly contextName: string;
|
|
12
12
|
__ref(): Promise<import("taon/browser").EndpointContext>;
|
|
13
13
|
readonly __refSync: import("taon/browser").EndpointContext;
|
|
@@ -49,6 +49,7 @@ export declare class HelpersTaon extends CoreHelpers {
|
|
|
49
49
|
copyToDestination?: (fileOrFolderAbsPath: string) => void;
|
|
50
50
|
}) => string;
|
|
51
51
|
additionalExternals?: string[];
|
|
52
|
+
additionalReplaceWithNothing?: string[];
|
|
52
53
|
skipFixingSQLlite?: boolean;
|
|
53
54
|
minify?: boolean;
|
|
54
55
|
}): Promise<void>;
|
package/client/lib/index.d.ts
CHANGED
|
@@ -5,4 +5,6 @@ export * from './utils';
|
|
|
5
5
|
import { HelpersTaon as Base } from './helpers/helpers';
|
|
6
6
|
export declare const Helpers: Base;
|
|
7
7
|
export * from './base';
|
|
8
|
-
export * from './models';
|
|
8
|
+
export * from './models';
|
|
9
|
+
export * from './old/execute-command';
|
|
10
|
+
export * from './old/models';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import type { ExtensionContext } from 'vscode';
|
|
3
|
+
import { Log } from './helpers';
|
|
4
|
+
import { ProcesOptions } from './models';
|
|
5
|
+
export type ExecCommandTypeOpt = {
|
|
6
|
+
vscode?: typeof import('vscode');
|
|
7
|
+
log?: Log;
|
|
8
|
+
context?: ExtensionContext;
|
|
9
|
+
cwd?: string;
|
|
10
|
+
};
|
|
11
|
+
export type ExecCommandType = string | string[] | ((opt: ExecCommandTypeOpt) => any);
|
|
12
|
+
export declare function executeCommand(titleOfTask: any, registerName: string, commandToExecute: ExecCommandType, pOptions?: ProcesOptions, isDefaultBuildCommand?: boolean, context?: ExtensionContext, debug?: boolean): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { ProcesOptions } from './models';
|
|
3
|
+
import type { OutputChannel } from 'vscode';
|
|
4
|
+
export declare const getVscode: () => any;
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated
|
|
7
|
+
*/
|
|
8
|
+
export declare const shell: string;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated
|
|
11
|
+
*/
|
|
12
|
+
export declare function valueFromCommand({ command, cwd, bigBuffer, }: {
|
|
13
|
+
command: string;
|
|
14
|
+
cwd?: string;
|
|
15
|
+
bigBuffer?: boolean;
|
|
16
|
+
}): string;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated
|
|
19
|
+
*/
|
|
20
|
+
export declare function deepClone(obj: any, hash?: WeakMap<object, any>): any;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated
|
|
23
|
+
*/
|
|
24
|
+
export declare function capitalizeFirstLetter(str: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated
|
|
27
|
+
*/
|
|
28
|
+
export declare function escapeStringForRegEx(s: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated
|
|
31
|
+
*/
|
|
32
|
+
export declare function fixJSONString(s: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated
|
|
35
|
+
*/
|
|
36
|
+
export declare function optionsFix(options?: ProcesOptions): ProcesOptions;
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated
|
|
39
|
+
*/
|
|
40
|
+
export declare function crossPlatformPath(pathStringOrPathParts: string | string[]): string;
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated
|
|
43
|
+
*/
|
|
44
|
+
export declare function getModuleName(value?: string): Promise<any>;
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated
|
|
47
|
+
*/
|
|
48
|
+
export type LogMode = 'dialog' | 'logmsg';
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated
|
|
51
|
+
*/
|
|
52
|
+
export declare class Log {
|
|
53
|
+
private name;
|
|
54
|
+
private mode;
|
|
55
|
+
private debugMode;
|
|
56
|
+
outputChannel: OutputChannel;
|
|
57
|
+
constructor(name: string, mode?: LogMode, debugMode?: boolean);
|
|
58
|
+
static instance(name: string, mode: LogMode, debugMode?: boolean): Log;
|
|
59
|
+
data(data: string): void;
|
|
60
|
+
info(data: string): void;
|
|
61
|
+
error(data: string): void;
|
|
62
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { CoreModels } from 'tnp-core/browser';
|
|
3
|
+
import type { ExecCommandType } from './execute-command';
|
|
4
|
+
export type CommandType = {
|
|
5
|
+
command?: string;
|
|
6
|
+
exec?: ExecCommandType;
|
|
7
|
+
title?: string;
|
|
8
|
+
group?: string;
|
|
9
|
+
hideContextMenu?: boolean;
|
|
10
|
+
options?: ProcesOptions;
|
|
11
|
+
isDefaultBuildCommand?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type ResolveVariable = {
|
|
14
|
+
variable: string;
|
|
15
|
+
resolveValueFromCommand?: string;
|
|
16
|
+
prompt?: string;
|
|
17
|
+
placeholder?: string | Function;
|
|
18
|
+
variableValue?: any;
|
|
19
|
+
encode?: boolean;
|
|
20
|
+
options?: {
|
|
21
|
+
option: any;
|
|
22
|
+
label: string;
|
|
23
|
+
}[] | string;
|
|
24
|
+
optionsResolved?: {
|
|
25
|
+
option: any;
|
|
26
|
+
label: string;
|
|
27
|
+
skipNextVariableResolve?: boolean;
|
|
28
|
+
}[];
|
|
29
|
+
useResultAsLinkAndExit?: boolean;
|
|
30
|
+
exitWithMessgeWhenNoOptions?: string;
|
|
31
|
+
/**
|
|
32
|
+
* { label: 'action item !!!', option: { action: 'STRING_SECRET_CODE' } }
|
|
33
|
+
* { label: 'normal item', option: < primitive value > }
|
|
34
|
+
*/
|
|
35
|
+
fillNextVariableResolveWhenSelectedIsActionOption?: boolean;
|
|
36
|
+
};
|
|
37
|
+
export type ProcesOptions = {
|
|
38
|
+
progressLocation?: 'notification' | 'statusbar';
|
|
39
|
+
findNearestProject?: boolean;
|
|
40
|
+
findNearestProjectWithGitRoot?: boolean;
|
|
41
|
+
findNearestProjectType?: CoreModels.LibType;
|
|
42
|
+
findNearestProjectTypeWithGitRoot?: CoreModels.LibType;
|
|
43
|
+
syncProcess?: boolean;
|
|
44
|
+
reloadAfterSuccesFinish?: boolean;
|
|
45
|
+
cancellable?: boolean;
|
|
46
|
+
titleWhenProcessing?: string;
|
|
47
|
+
tnpNonInteractive?: boolean;
|
|
48
|
+
tnpShowProgress?: boolean;
|
|
49
|
+
debug?: boolean;
|
|
50
|
+
showOutputDataOnSuccess?: boolean;
|
|
51
|
+
showSuccessMessage?: boolean;
|
|
52
|
+
askBeforeExecute?: boolean;
|
|
53
|
+
resolveVariables?: ResolveVariable[];
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated
|
|
57
|
+
*/
|
|
58
|
+
export type PROGRESS_DATA_TYPE = 'info' | 'error' | 'warning' | 'event';
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated
|
|
61
|
+
*/
|
|
62
|
+
export interface IProgressData {
|
|
63
|
+
/**
|
|
64
|
+
* How man percent of progress
|
|
65
|
+
*/
|
|
66
|
+
value?: number;
|
|
67
|
+
msg?: string;
|
|
68
|
+
type?: PROGRESS_DATA_TYPE;
|
|
69
|
+
date?: Date;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @deprecated
|
|
73
|
+
*/
|
|
74
|
+
export declare class ProgressData implements IProgressData {
|
|
75
|
+
value: number;
|
|
76
|
+
msg: string;
|
|
77
|
+
type: PROGRESS_DATA_TYPE;
|
|
78
|
+
date: Date;
|
|
79
|
+
static resolveFrom(chunk: string, callbackOnFounded?: (json: ProgressData) => any, checkSplit?: boolean): ProgressData[];
|
|
80
|
+
constructor(value?: number, msg?: string, type?: PROGRESS_DATA_TYPE, date?: Date);
|
|
81
|
+
}
|
package/client/lib/utils.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ export declare namespace UtilsTypescript {
|
|
|
38
38
|
export const extractDefaultClassNameFromFile: (absoluteFilePath: string) => any;
|
|
39
39
|
export const formatFile: (absPathToFile: string) => void;
|
|
40
40
|
export const formatAllFilesInsideFolder: (absPathToFolder: string) => void;
|
|
41
|
+
export const eslintFixFile: (absPathToFile: string | string[]) => void;
|
|
42
|
+
export const eslintFixAllFilesInsideFolder: (absPathToFolder: string | string[]) => void;
|
|
41
43
|
export const getTaonContextFromContent: (fileContent: string) => string[];
|
|
42
44
|
export const getTaonContextsNamesFromFile: (tsAbsFilePath: string) => string[];
|
|
43
45
|
export const extractAngularComponentSelectors: (fileAbsPath: string) => {
|
|
@@ -50,44 +52,63 @@ export declare namespace UtilsTypescript {
|
|
|
50
52
|
*/
|
|
51
53
|
export const setValueToVariableInTsFile: (tsAbsFilePath: string, variableName: string, valueOfVariable: any, addIfNotExists?: boolean) => void;
|
|
52
54
|
export class TsImportExport {
|
|
53
|
-
type: 'export' | 'import' | 'async-import' | 'require';
|
|
54
55
|
/**
|
|
55
|
-
*
|
|
56
|
-
* Name of the file that is being imported/exported
|
|
57
|
-
* with parenthesis included
|
|
56
|
+
* for external modification
|
|
58
57
|
*/
|
|
59
|
-
|
|
58
|
+
embeddedPathToFileResult: string;
|
|
60
59
|
/**
|
|
61
|
-
*
|
|
60
|
+
* for external modification
|
|
62
61
|
*/
|
|
63
|
-
|
|
64
|
-
removeStartEndQuotes(str: string): string;
|
|
62
|
+
packageName: string;
|
|
65
63
|
/**
|
|
66
|
-
*
|
|
64
|
+
* for external modification
|
|
67
65
|
*/
|
|
68
|
-
|
|
66
|
+
isIsomorphic?: boolean;
|
|
67
|
+
readonly type: 'export' | 'import' | 'async-import' | 'require';
|
|
69
68
|
/**
|
|
70
|
-
*
|
|
69
|
+
* ORIGNAL
|
|
70
|
+
* Name of the file that is being imported/exported
|
|
71
|
+
* with parenthesis included , example
|
|
72
|
+
* 'my-file' or "my-file" or `my-file`
|
|
71
73
|
*/
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
readonly embeddedPathToFile: string;
|
|
75
|
+
/**
|
|
76
|
+
* same as cleanEmbeddedPathToFile but without quotes (parenthesis), example:
|
|
77
|
+
* my-file or my-file or my-file
|
|
78
|
+
*/
|
|
79
|
+
readonly cleanEmbeddedPathToFile: string;
|
|
80
|
+
readonly startRow: number;
|
|
81
|
+
readonly startCol: number;
|
|
82
|
+
readonly endRow: number;
|
|
83
|
+
readonly endCol: number;
|
|
84
|
+
readonly parenthesisType: 'single' | 'double' | 'tics';
|
|
85
|
+
readonly importElements: string[];
|
|
86
|
+
constructor(type: 'export' | 'import' | 'async-import' | 'require', embeddedPathToFile: string, start: ts.LineAndCharacter, end: ts.LineAndCharacter, parenthesisType: 'single' | 'double' | 'tics', importElements?: string[]);
|
|
87
|
+
private removeStartEndQuotes;
|
|
76
88
|
/**
|
|
77
89
|
* it will extract part of the file content
|
|
78
90
|
* that is between startRow, startCol and endRow, endCol
|
|
79
91
|
* and contains import/export/require statement
|
|
80
92
|
*/
|
|
81
93
|
getStringPartFrom(wholeContentOfFile: string): string;
|
|
82
|
-
endRow: number;
|
|
83
|
-
endCol: number;
|
|
84
|
-
parenthesisType: 'single' | 'double' | 'tics';
|
|
85
94
|
wrapInParenthesis(str: string): string;
|
|
86
|
-
importElements: string[];
|
|
87
|
-
constructor(type: 'export' | 'import' | 'async-import' | 'require', embeddedPathToFile: string, start: ts.LineAndCharacter, end: ts.LineAndCharacter, parenthesisType: 'single' | 'double' | 'tics', importElements?: string[]);
|
|
88
95
|
}
|
|
89
96
|
export const recognizeImportsFromFile: (fileAbsPAth: string) => TsImportExport[];
|
|
90
97
|
export const recognizeImportsFromContent: (fileContent: string) => TsImportExport[];
|
|
98
|
+
/**
|
|
99
|
+
* Transition methods ng18 => ng19
|
|
100
|
+
* Remove standalone:true from component decorator
|
|
101
|
+
* and add standalone: false if not exists
|
|
102
|
+
*/
|
|
103
|
+
export function transformComponentStandaloneOption(sourceText: string): string;
|
|
104
|
+
export const fixHtmlTemplatesInDir: (directoryPath: string) => void;
|
|
105
|
+
export function removeTaggedImportExport(tsFileContent: string, tags: string[]): string;
|
|
106
|
+
export const wrapFirstImportsInImportsRegion: (fileContent: string) => string;
|
|
107
|
+
/**
|
|
108
|
+
* wrap class field with decorators
|
|
109
|
+
* wrap class methods with decorators
|
|
110
|
+
*/
|
|
111
|
+
export function wrapContentClassMembersDecoratorsWithRegion(classFileContent: string, wrapTag?: string): string;
|
|
91
112
|
export {};
|
|
92
113
|
}
|
|
93
114
|
export declare namespace UtilsHttp {
|
|
@@ -121,5 +142,5 @@ export declare namespace UtilsQuickFixes {
|
|
|
121
142
|
/**
|
|
122
143
|
* for some reason electron is being bundled - and it is not needed for cli
|
|
123
144
|
*/
|
|
124
|
-
const replaceElectronWithNothing: (jsContent: string) => string;
|
|
145
|
+
const replaceElectronWithNothing: (jsContent: string, packageName: string) => string;
|
|
125
146
|
}
|
package/client/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseBowerJson = void 0;
|
|
4
|
-
const
|
|
4
|
+
const lib_1 = require("tnp-config/lib");
|
|
5
5
|
const base_json_file_reader_1 = require("./base-json-file-reader");
|
|
6
6
|
//#endregion
|
|
7
7
|
class BaseBowerJson extends base_json_file_reader_1.BaseJsonFileReader {
|
|
8
8
|
cwd;
|
|
9
9
|
constructor(cwd) {
|
|
10
|
-
super({ cwd, fileName:
|
|
10
|
+
super({ cwd, fileName: lib_1.config.file.bower_json });
|
|
11
11
|
this.cwd = cwd;
|
|
12
12
|
}
|
|
13
13
|
//#region bower dependencies
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-bower-json.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/tnp-helpers/src/lib/base/classes/base-bower-json.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"base-bower-json.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/tnp-helpers/src/lib/base/classes/base-bower-json.ts"],"names":[],"mappings":";;;AAAA,wCAAwC;AAExC,mEAA6D;AA6B7D,YAAY;AAEZ,MAAa,aAAc,SAAQ,0CAA6B;IAC3C;IAAnB,YAAmB,GAAW;QAC5B,KAAK,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,YAAM,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QADhC,QAAG,GAAH,GAAG,CAAQ;IAE9B,CAAC;IAED,4BAA4B;IAC5B,IAAI,YAAY;QACd,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;IACzD,CAAC;CAEF;AAVD,sCAUC"}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseCliWorkerConfig = void 0;
|
|
4
4
|
const semver_1 = require("semver");
|
|
5
|
-
const
|
|
5
|
+
const lib_1 = require("tnp-core/lib");
|
|
6
6
|
//#region base worker config
|
|
7
7
|
class BaseCliWorkerConfig {
|
|
8
8
|
static from(opt) {
|
|
9
|
-
return
|
|
9
|
+
return lib_1._.merge(new BaseCliWorkerConfig(), opt);
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* port taken by service
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-cli-worker-config.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/tnp-helpers/src/lib/base/classes/base-cli-worker/base-cli-worker-config.ts"],"names":[],"mappings":";;;AAAA,mCAA6B;AAC7B,
|
|
1
|
+
{"version":3,"file":"base-cli-worker-config.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/tnp-helpers/src/lib/base/classes/base-cli-worker/base-cli-worker-config.ts"],"names":[],"mappings":";;;AAAA,mCAA6B;AAC7B,sCAAiC;AAEjC,4BAA4B;AAC5B,MAAa,mBAAmB;IAC9B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AAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;IACpD,CAAC;CACF;AA3DD,kDA2DC;AACD,YAAY"}
|
|
@@ -12,4 +12,4 @@ export declare abstract class BaseCliWorkerController extends Taon.Base
|
|
|
12
12
|
info(): Taon.Response<string>;
|
|
13
13
|
baseCLiWorkerCommand_isHealthy(checkingProcessConfig: BaseCliWorkerConfig): Taon.Response<boolean>;
|
|
14
14
|
baseCLiWorkerCommand_hasUpToDateVersion(checkingProcessConfig: BaseCliWorkerConfig): Taon.Response<boolean>;
|
|
15
|
-
}
|
|
15
|
+
}
|
|
@@ -10,10 +10,10 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.BaseCliWorkerController = void 0;
|
|
13
|
-
const
|
|
14
|
-
const
|
|
13
|
+
const lib_1 = require("taon/lib");
|
|
14
|
+
const lib_2 = require("tnp-core/lib");
|
|
15
15
|
const base_cli_worker_config_1 = require("./base-cli-worker-config");
|
|
16
|
-
let BaseCliWorkerController = class BaseCliWorkerController extends
|
|
16
|
+
let BaseCliWorkerController = class BaseCliWorkerController extends lib_1.Taon.Base
|
|
17
17
|
.Controller {
|
|
18
18
|
/**
|
|
19
19
|
* service id
|
|
@@ -36,7 +36,7 @@ let BaseCliWorkerController = class BaseCliWorkerController extends taon_1.Taon.
|
|
|
36
36
|
return async () => {
|
|
37
37
|
console.log(`Killing worker "${this.cliWorkerServiceId}"...`);
|
|
38
38
|
setTimeout(() => {
|
|
39
|
-
|
|
39
|
+
lib_2.Helpers.clearConsole();
|
|
40
40
|
process.exit(0);
|
|
41
41
|
}, 1000); // TODO may be change to 0
|
|
42
42
|
};
|
|
@@ -94,30 +94,30 @@ let BaseCliWorkerController = class BaseCliWorkerController extends taon_1.Taon.
|
|
|
94
94
|
};
|
|
95
95
|
exports.BaseCliWorkerController = BaseCliWorkerController;
|
|
96
96
|
__decorate([
|
|
97
|
-
|
|
98
|
-
__param(0,
|
|
99
|
-
__param(1,
|
|
97
|
+
lib_1.Taon.Http.PUT(),
|
|
98
|
+
__param(0, lib_1.Taon.Http.Param.Body('serviceId')),
|
|
99
|
+
__param(1, lib_1.Taon.Http.Param.Body('serviceVersion'))
|
|
100
100
|
], BaseCliWorkerController.prototype, "baseCLiWorkerCommand_initializeMetadata", null);
|
|
101
101
|
__decorate([
|
|
102
|
-
|
|
102
|
+
lib_1.Taon.Http.GET()
|
|
103
103
|
], BaseCliWorkerController.prototype, "baseCLiWorkerCommand_kill", null);
|
|
104
104
|
__decorate([
|
|
105
|
-
|
|
105
|
+
lib_1.Taon.Http.GET({
|
|
106
106
|
pathIsGlobal: true,
|
|
107
107
|
// overrideContentType: 'text/html',
|
|
108
108
|
// overridResponseType: 'text',
|
|
109
109
|
})
|
|
110
110
|
], BaseCliWorkerController.prototype, "info", null);
|
|
111
111
|
__decorate([
|
|
112
|
-
|
|
113
|
-
__param(0,
|
|
112
|
+
lib_1.Taon.Http.POST(),
|
|
113
|
+
__param(0, lib_1.Taon.Http.Param.Body())
|
|
114
114
|
], BaseCliWorkerController.prototype, "baseCLiWorkerCommand_isHealthy", null);
|
|
115
115
|
__decorate([
|
|
116
|
-
|
|
117
|
-
__param(0,
|
|
116
|
+
lib_1.Taon.Http.POST(),
|
|
117
|
+
__param(0, lib_1.Taon.Http.Param.Body())
|
|
118
118
|
], BaseCliWorkerController.prototype, "baseCLiWorkerCommand_hasUpToDateVersion", null);
|
|
119
119
|
exports.BaseCliWorkerController = BaseCliWorkerController = __decorate([
|
|
120
|
-
|
|
120
|
+
lib_1.Taon.Controller({
|
|
121
121
|
className: 'BaseCliWorkerController',
|
|
122
122
|
})
|
|
123
123
|
], BaseCliWorkerController);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-cli-worker-controller.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/tnp-helpers/src/lib/base/classes/base-cli-worker/base-cli-worker-controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"base-cli-worker-controller.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/tnp-helpers/src/lib/base/classes/base-cli-worker/base-cli-worker-controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kCAAgC;AAChC,sCAAuC;AAEvC,qEAA+D;AAKxD,IAAe,uBAAuB,GAAtC,MAAe,uBAAwB,SAAQ,UAAI,CAAC,IAAI;KAC5D,UAAU;IACX;;OAEG;IACK,kBAAkB,GAAW,IAAI,CAAC;IAClC,uBAAuB,GAAW,IAAI,CAAC;IAE/C,2CAA2C;IAE3C,uCAAuC,CACF,SAAiB,EACZ,cAAsB;QAE9D,sBAAsB;QACtB,OAAO,KAAK,IAAI,EAAE;YAChB,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;YACpC,IAAI,CAAC,uBAAuB,GAAG,cAAc,CAAC;QAChD,CAAC,CAAC;QACF,YAAY;IACd,CAAC;IACD,YAAY;IAEZ,4BAA4B;IAE5B,yBAAyB;QACvB,sBAAsB;QACtB,OAAO,KAAK,IAAI,EAAE;YAChB,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,CAAC,kBAAkB,MAAM,CAAC,CAAC;YAC9D,UAAU,CAAC,GAAG,EAAE;gBACd,aAAO,CAAC,YAAY,EAAE,CAAC;gBACvB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,0BAA0B;QACtC,CAAC,CAAC;QACF,YAAY;IACd,CAAC;IACD,YAAY;IAEZ,4BAA4B;IAM5B,IAAI;QACF,sBAAsB;QACtB,OAAO,KAAK,IAAI,EAAE;YAChB,OAAO,CACL,YAAY,IAAI,CAAC,kBAAkB,OAAO;gBAC1C,2BAA2B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI;iBACnC,IAAI,CAAC,uBAAuB;aAChC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ACF,YAAY;IACd,CAAC;CAEF,CAAA;AAxGqB,0DAAuB;AAU3C;IADC,UAAI,CAAC,IAAI,CAAC,GAAG,EAAE;IAEb,WAAA,UAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IACjC,WAAA,UAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;sFAQxC;AAKD;IADC,UAAI,CAAC,IAAI,CAAC,GAAG,EAAE;wEAWf;AASD;IALC,UAAI,CAAC,IAAI,CAAC,GAAG,CAAC;QACb,YAAY,EAAE,IAAI;QAClB,oCAAoC;QACpC,+BAA+B;KAChC,CAAC;mDAaD;AAKD;IADC,UAAI,CAAC,IAAI,CAAC,IAAI,EAAE;IAEd,WAAA,UAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;6EAgBxB;AAKD;IADC,UAAI,CAAC,IAAI,CAAC,IAAI,EAAE;IAEd,WAAA,UAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;sFAkBxB;kCAtGmB,uBAAuB;IAH5C,UAAI,CAAC,UAAU,CAAC;QACf,SAAS,EAAE,yBAAyB;KACrC,CAAC;GACoB,uBAAuB,CAwG5C"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseCliWorkerTerminalUI = void 0;
|
|
4
4
|
//#region imports
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const lib_1 = require("tnp-core/lib");
|
|
6
|
+
const lib_2 = require("tnp-core/lib");
|
|
7
7
|
//#endregion
|
|
8
8
|
class BaseCliWorkerTerminalUI {
|
|
9
9
|
worker;
|
|
@@ -12,7 +12,7 @@ class BaseCliWorkerTerminalUI {
|
|
|
12
12
|
}
|
|
13
13
|
//#region protected methods / text for header
|
|
14
14
|
async headerText() {
|
|
15
|
-
return
|
|
15
|
+
return lib_2._.startCase(this.worker.serviceID);
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region protected methods / text header style
|
|
@@ -53,11 +53,11 @@ class BaseCliWorkerTerminalUI {
|
|
|
53
53
|
//#region protected methods / info message below header
|
|
54
54
|
async infoMessageBelowHeader() {
|
|
55
55
|
//#region @backendFunc
|
|
56
|
-
|
|
56
|
+
lib_1.Helpers.info(`
|
|
57
57
|
|
|
58
|
-
Service ${
|
|
58
|
+
Service ${lib_2.chalk.bold.red(this.worker.serviceID)}` +
|
|
59
59
|
` (version: ${this.worker.serviceVersion}) started..
|
|
60
|
-
Check info here http://localhost:${
|
|
60
|
+
Check info here http://localhost:${lib_2.chalk.bold(this.worker.processLocalInfoObj?.port?.toString())}/${'info'}
|
|
61
61
|
|
|
62
62
|
`);
|
|
63
63
|
//#endregion
|
|
@@ -86,7 +86,7 @@ class BaseCliWorkerTerminalUI {
|
|
|
86
86
|
getWorkerTerminalActions(options) {
|
|
87
87
|
//#region @backendFunc
|
|
88
88
|
options = options || {};
|
|
89
|
-
options.chooseAction =
|
|
89
|
+
options.chooseAction = lib_2._.isBoolean(options.chooseAction)
|
|
90
90
|
? options.chooseAction
|
|
91
91
|
: true;
|
|
92
92
|
return {
|
|
@@ -106,7 +106,7 @@ class BaseCliWorkerTerminalUI {
|
|
|
106
106
|
if (options.exitIsOnlyReturn) {
|
|
107
107
|
return true; // false will keep loop running
|
|
108
108
|
}
|
|
109
|
-
if (await
|
|
109
|
+
if (await lib_1.UtilsTerminal.confirm({
|
|
110
110
|
defaultValue: false,
|
|
111
111
|
message: 'Are you sure you want to shut down service?',
|
|
112
112
|
})) {
|
|
@@ -123,11 +123,11 @@ class BaseCliWorkerTerminalUI {
|
|
|
123
123
|
async infoScreen(options) {
|
|
124
124
|
options = options || {};
|
|
125
125
|
while (true) {
|
|
126
|
-
|
|
126
|
+
lib_1.Helpers.clearConsole();
|
|
127
127
|
await this.header();
|
|
128
128
|
await this.infoMessageBelowHeader();
|
|
129
129
|
const choices = this.getWorkerTerminalActions(options);
|
|
130
|
-
const choice = await
|
|
130
|
+
const choice = await lib_1.UtilsTerminal.select({
|
|
131
131
|
choices,
|
|
132
132
|
question: 'Choose action',
|
|
133
133
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-cli-worker-terminal-ui.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/tnp-helpers/src/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.ts"],"names":[],"mappings":";;;AAAA,iBAAiB;AACjB,
|
|
1
|
+
{"version":3,"file":"base-cli-worker-terminal-ui.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/tnp-helpers/src/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.ts"],"names":[],"mappings":";;;AAAA,iBAAiB;AACjB,sCAAsD;AACtD,sCAAwC;AAMxC,YAAY;AAEZ,MAAa,uBAAuB;IAGZ;IAAtB,YAAsB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAExC,6CAA6C;IACnC,KAAK,CAAC,UAAU;QACxB,OAAO,OAAC,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC;IACD,YAAY;IAEZ,+CAA+C;IACrC,eAAe;QACvB,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,YAAY;IAEZ,+CAA+C;IACrC,eAAe;QACvB,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,YAAY;IAEZ,oCAAoC;IACpC;;OAEG;IACO,KAAK,CAAC,MAAM;QACpB,sBAAsB;QACtB,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;QACjC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE,EAAE;YACpD,IAAI,EAAE,IAAI,CAAC,eAAe,EAAE;YAC5B,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE;Y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