tnp-core 18.0.45 → 18.0.47
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 +20 -20
- package/assets/shared/shared_folder_info.txt +1 -1
- package/browser/README.md +24 -24
- package/browser/esm2022/lib/core-imports.mjs +1 -6
- package/browser/esm2022/lib/core-models.mjs +50 -1
- package/browser/esm2022/lib/helpers.mjs +13 -5
- package/browser/esm2022/lib/utils.mjs +141 -11
- package/browser/fesm2022/tnp-core.mjs +201 -15
- package/browser/fesm2022/tnp-core.mjs.map +1 -1
- package/browser/lib/core-models.d.ts +65 -3
- package/browser/lib/utils.d.ts +61 -34
- package/cli.backend.js +2 -2
- package/client/README.md +24 -24
- package/client/esm2022/lib/core-imports.mjs +1 -6
- package/client/esm2022/lib/core-models.mjs +50 -1
- package/client/esm2022/lib/helpers.mjs +13 -5
- package/client/esm2022/lib/utils.mjs +141 -11
- package/client/fesm2022/tnp-core.mjs +201 -15
- package/client/fesm2022/tnp-core.mjs.map +1 -1
- package/client/lib/core-models.d.ts +65 -3
- package/client/lib/utils.d.ts +61 -34
- package/lib/core-cli.js +1 -1
- package/lib/core-cli.js.map +1 -1
- package/lib/core-imports.d.ts +1 -6
- package/lib/core-imports.js +1 -3
- package/lib/core-imports.js.map +1 -1
- package/lib/core-models.d.ts +65 -3
- package/lib/core-models.js +49 -0
- package/lib/core-models.js.map +1 -1
- package/lib/helpers.js +8 -7
- package/lib/helpers.js.map +1 -1
- package/lib/node-chalk-mock.js +2 -2
- package/lib/node-path-mock.js +2 -2
- package/lib/utils.d.ts +73 -34
- package/lib/utils.js +182 -33
- package/lib/utils.js.map +1 -1
- package/package.json +2 -4
- package/taon.jsonc +64 -65
- package/tmp-environment.json +30 -31
- package/websql/README.md +24 -24
- package/websql/esm2022/lib/core-imports.mjs +1 -6
- package/websql/esm2022/lib/core-models.mjs +50 -1
- package/websql/esm2022/lib/helpers.mjs +13 -5
- package/websql/esm2022/lib/utils.mjs +141 -11
- package/websql/fesm2022/tnp-core.mjs +201 -15
- package/websql/fesm2022/tnp-core.mjs.map +1 -1
- package/websql/lib/core-models.d.ts +65 -3
- package/websql/lib/utils.d.ts +61 -34
@@ -36,9 +36,68 @@ export declare namespace CoreModels {
|
|
36
36
|
export const InstalationTypeArr: string[];
|
37
37
|
export type PackageJsonDependencyObj = 'dependencies' | 'devDependencies' | 'peerDependencies' | 'resolutions';
|
38
38
|
export const PackageJsonDependencyObjArr: PackageJsonDependencyObj[];
|
39
|
-
export type
|
40
|
-
|
41
|
-
|
39
|
+
export type ReleaseProcessType = 'manual' | 'local' | 'cloud';
|
40
|
+
/**
|
41
|
+
* All possible release types for taon
|
42
|
+
* for MANUAL/CLOUD release
|
43
|
+
*/
|
44
|
+
export type ReleaseArtifactTaon = 'angular-electron-app' | 'angular-frontend-webapp' | 'angular-ionic-app' | 'mkdocs-docs-webapp' | 'nodejs-backend-server' | 'npm-lib-pkg-and-cli-tool' | 'vscode-extension';
|
45
|
+
export const ReleaseArtifactTaonNames: Readonly<{
|
46
|
+
ANGULAR_ELECTRON_APP: ReleaseArtifactTaon;
|
47
|
+
/**
|
48
|
+
* Angular frontend webapp (pwa) inside docker
|
49
|
+
*/
|
50
|
+
ANGULAR_FRONTEND_WEBAPP: ReleaseArtifactTaon;
|
51
|
+
/**
|
52
|
+
* Angular + Ionic
|
53
|
+
*/
|
54
|
+
ANGULAR_IONIC_APP: ReleaseArtifactTaon;
|
55
|
+
/**
|
56
|
+
* MkDocs documentation webapp (pwa) inside docker
|
57
|
+
*/
|
58
|
+
MKDOCS_DOCS_WEBAPP: ReleaseArtifactTaon;
|
59
|
+
/**
|
60
|
+
* Nodejs backend server inside docker
|
61
|
+
* (could be backend or frontend or microservice)
|
62
|
+
*/
|
63
|
+
NODEJS_BACKEND_SERVER: ReleaseArtifactTaon;
|
64
|
+
/**
|
65
|
+
* Npm lib package and global cli tool
|
66
|
+
*/
|
67
|
+
NPM_LIB_PKG_AND_CLI_TOOL: ReleaseArtifactTaon;
|
68
|
+
/**
|
69
|
+
* Visual Studio Code extension
|
70
|
+
*/
|
71
|
+
VSCODE_EXTENSION: ReleaseArtifactTaon;
|
72
|
+
}>;
|
73
|
+
export const ReleaseArtifactTaonNamesArr: ReleaseArtifactTaon[];
|
74
|
+
/**
|
75
|
+
* All possible local release types for taon
|
76
|
+
* for LOCAL release
|
77
|
+
*/
|
78
|
+
export type LocalReleaseArtifactTaon = 'docker-backend-frontend-app' | 'global-cli-tool' | 'vscode-extension';
|
79
|
+
/**
|
80
|
+
* Object with all possible local release types for taon
|
81
|
+
* inside LOCAL release
|
82
|
+
*/
|
83
|
+
export const LocalReleaseArtifactTaonNames: Readonly<{
|
84
|
+
DOCKER_BACKEND_FRONTEND_APP: LocalReleaseArtifactTaon;
|
85
|
+
/**
|
86
|
+
* Global CLI tool
|
87
|
+
*/
|
88
|
+
GLOBAL_CLI_TOOL: LocalReleaseArtifactTaon;
|
89
|
+
/**
|
90
|
+
* Visual Studio Code extension
|
91
|
+
*/
|
92
|
+
VSCODE_EXTENSION: LocalReleaseArtifactTaon;
|
93
|
+
}>;
|
94
|
+
/**
|
95
|
+
* Array with all possible local release types for taon
|
96
|
+
* inside LOCAL release
|
97
|
+
*/
|
98
|
+
export const LocalReleaseArtifactTaonNamesArr: LocalReleaseArtifactTaon[];
|
99
|
+
export type ReleaseVersionType = 'major' | 'minor' | 'patch';
|
100
|
+
export type PreReleaseVersionTag = 'alpha' | 'beta' | 'rc' | 'next';
|
42
101
|
export const NpmSpecialVersions: string[];
|
43
102
|
export type PROGRESS_DATA_TYPE = 'info' | 'error' | 'warning' | 'event';
|
44
103
|
export type EnvironmentName = 'local' | 'static' | 'dev' | 'stage' | 'prod' | 'online' | 'test' | 'qa' | 'custom';
|
@@ -57,6 +116,9 @@ export declare namespace CoreModels {
|
|
57
116
|
export type TsUsage = 'import' | 'export';
|
58
117
|
export type BaseProjectType = 'typescript' | 'angular' | 'angular-lib' | 'unknow' | 'unknow-npm-project';
|
59
118
|
export const BaseProjectTypeArr: string[];
|
119
|
+
/**
|
120
|
+
* @deprecated there will be only one lib type "isomorphic-lib"
|
121
|
+
*/
|
60
122
|
export type LibType = BaseProjectType | 'isomorphic-lib' | 'container' | 'docker' | 'vscode-ext' | 'chrome-ext' | 'unknow-npm-project';
|
61
123
|
/**
|
62
124
|
* @deprecated
|
package/websql/lib/utils.d.ts
CHANGED
@@ -12,7 +12,6 @@ export declare namespace Utils {
|
|
12
12
|
export const fullDate: () => any;
|
13
13
|
export const getFreePort: (options?: {
|
14
14
|
startFrom?: number;
|
15
|
-
howManyFreePortsAfterThatPort?: number;
|
16
15
|
}) => Promise<number>;
|
17
16
|
interface AttrJsoncProp {
|
18
17
|
name: string;
|
@@ -90,7 +89,21 @@ export declare namespace Utils {
|
|
90
89
|
export {};
|
91
90
|
}
|
92
91
|
export declare namespace UtilsProcess {
|
93
|
-
interface
|
92
|
+
interface ResolvePromiseMsg {
|
93
|
+
/**
|
94
|
+
* until this string is in output of stdout
|
95
|
+
*/
|
96
|
+
stdout?: string | string[];
|
97
|
+
/**
|
98
|
+
* until this string is in output of stderr
|
99
|
+
*/
|
100
|
+
stderr?: string | string[];
|
101
|
+
/**
|
102
|
+
* by default only resolve when exit code is 0
|
103
|
+
*/
|
104
|
+
resolveAfterAnyExitCode?: boolean;
|
105
|
+
}
|
106
|
+
export interface ProcessStartOptions {
|
94
107
|
/**
|
95
108
|
* by default is process.cwd();
|
96
109
|
*/
|
@@ -103,20 +116,7 @@ export declare namespace UtilsProcess {
|
|
103
116
|
* Modify output line by line
|
104
117
|
*/
|
105
118
|
outputLineReplace?: (outputLineStderOrStdout: string) => string;
|
106
|
-
resolvePromiseMsg?:
|
107
|
-
/**
|
108
|
-
* until this string is in output of stdout
|
109
|
-
*/
|
110
|
-
stdout?: string | string[];
|
111
|
-
/**
|
112
|
-
* until this string is in output of stderr
|
113
|
-
*/
|
114
|
-
stderr?: string | string[];
|
115
|
-
/**
|
116
|
-
* by default only resolve when exit code is 0
|
117
|
-
*/
|
118
|
-
resolveAfterAnyExitCode?: boolean;
|
119
|
-
};
|
119
|
+
resolvePromiseMsg?: ResolvePromiseMsg;
|
120
120
|
/**
|
121
121
|
* Prefix messages output from child_process
|
122
122
|
*/
|
@@ -141,18 +141,28 @@ export declare namespace UtilsProcess {
|
|
141
141
|
* TODO IMPLEMENT
|
142
142
|
* start async node process
|
143
143
|
*/
|
144
|
-
function startAsync(command: string, options?: ProcessStartOptions): Promise<void>;
|
145
144
|
/**
|
146
|
-
*
|
145
|
+
* This let you start child process and resolve promise when some
|
146
|
+
* condition is met. It is useful for example when you want to start
|
147
|
+
* process and wait until some output is in stdout or stderr.
|
147
148
|
*/
|
148
|
-
|
149
|
-
|
149
|
+
export const startAsyncChildProcessCommandUntil: (command: string, options: {
|
150
|
+
/**
|
151
|
+
* tels when to resolve promise
|
152
|
+
*/
|
153
|
+
untilOptions: ResolvePromiseMsg;
|
154
|
+
displayOutputInParentProcess?: boolean;
|
155
|
+
resolveAfterAnyExitCode?: boolean;
|
156
|
+
cwd?: string;
|
157
|
+
}) => Promise<void>;
|
158
|
+
export const getGitBashPath: () => any;
|
150
159
|
/**
|
151
160
|
* TODO IMPLEMENT
|
152
161
|
* start async node process
|
153
162
|
*/
|
154
|
-
const startInNewTerminalWindow: (command: string, options?: Pick<ProcessStartOptions, "cwd" | "hideOutput">) => any;
|
155
|
-
const getBashOrShellName: () => "browser" | "cmd" | "powershell" | "gitbash" | "cygwin" | "unknown" | "bash" | "zsh" | "fish" | "sh";
|
163
|
+
export const startInNewTerminalWindow: (command: string, options?: Pick<ProcessStartOptions, "cwd" | "hideOutput">) => any;
|
164
|
+
export const getBashOrShellName: () => "browser" | "cmd" | "powershell" | "gitbash" | "cygwin" | "unknown" | "bash" | "zsh" | "fish" | "sh";
|
165
|
+
export {};
|
156
166
|
}
|
157
167
|
export declare namespace UtilsOs {
|
158
168
|
/**
|
@@ -219,11 +229,29 @@ export declare namespace UtilsMigrations {
|
|
219
229
|
const isValidTimestamp: (value: any) => boolean;
|
220
230
|
}
|
221
231
|
export declare namespace UtilsTerminal {
|
232
|
+
type SelectActionChoice = {
|
233
|
+
[choice: string]: {
|
234
|
+
/**
|
235
|
+
* Title of the choice
|
236
|
+
*/
|
237
|
+
name: string;
|
238
|
+
/**
|
239
|
+
* Action to execute
|
240
|
+
*/
|
241
|
+
action?: () => any;
|
242
|
+
/**
|
243
|
+
* If choice is visible
|
244
|
+
* default: true
|
245
|
+
*/
|
246
|
+
visible?: boolean;
|
247
|
+
};
|
248
|
+
};
|
222
249
|
export const clearConsole: () => void;
|
223
250
|
export const multiselect: <T = string>(options: {
|
224
251
|
question: string;
|
225
252
|
/**
|
226
253
|
* If true, then only one choice can be selected
|
254
|
+
* @deprecated use select instead
|
227
255
|
*/
|
228
256
|
onlyOneChoice?: boolean;
|
229
257
|
choices: {
|
@@ -237,18 +265,17 @@ export declare namespace UtilsTerminal {
|
|
237
265
|
autocomplete?: boolean;
|
238
266
|
defaultSelected?: string[];
|
239
267
|
}) => Promise<T[]>;
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
};
|
268
|
+
/**
|
269
|
+
* Similar to select but executes action if provided
|
270
|
+
* @returns selected and executed value
|
271
|
+
*/
|
272
|
+
export const multiselectActionAndExecute: <CHOICE extends SelectActionChoice = SelectActionChoice>(choices: CHOICE, options?: {
|
273
|
+
question?: string;
|
274
|
+
autocomplete?: boolean;
|
275
|
+
defaultSelected?: string;
|
276
|
+
hint?: string;
|
277
|
+
executeActionsOnDefault?: boolean;
|
278
|
+
}) => Promise<any>;
|
252
279
|
/**
|
253
280
|
* Similar to select but executes action if provided
|
254
281
|
* @returns selected and executed value
|