tnp-helpers 16.444.19 → 16.444.21
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/assets/shared/shared_folder_info.txt +1 -1
- package/browser/esm2022/lib/base/base-git.mjs +48 -5
- package/browser/esm2022/lib/base/base-library-build.mjs +27 -12
- package/browser/esm2022/lib/base/base-linked-projects.mjs +14 -3
- package/browser/esm2022/lib/base/base-npm-helpers.mjs +41 -2
- package/browser/esm2022/lib/base/base-project-resolver.mjs +10 -1
- package/browser/esm2022/lib/base/base-project.mjs +71 -9
- package/browser/esm2022/lib/base/base-release-process.mjs +204 -0
- package/browser/esm2022/lib/base/base-vscode.mjs +66 -0
- package/browser/esm2022/lib/base/core-project.mjs +1 -1
- package/browser/esm2022/lib/base/linked-project.mjs +2 -7
- package/browser/esm2022/lib/models.mjs +1 -1
- package/browser/fesm2022/tnp-helpers.mjs +205 -32
- package/browser/fesm2022/tnp-helpers.mjs.map +1 -1
- package/browser/lib/base/base-git.d.ts +17 -0
- package/browser/lib/base/base-library-build.d.ts +2 -1
- package/browser/lib/base/base-npm-helpers.d.ts +3 -0
- package/browser/lib/base/base-project-resolver.d.ts +9 -8
- package/browser/lib/base/base-project.d.ts +12 -7
- package/browser/lib/base/base-release-process.d.ts +40 -0
- package/browser/lib/base/base-vscode.d.ts +6 -0
- package/browser/lib/base/core-project.d.ts +8 -0
- package/browser/lib/models.d.ts +7 -1
- package/client/esm2022/lib/base/base-git.mjs +48 -5
- package/client/esm2022/lib/base/base-library-build.mjs +27 -12
- package/client/esm2022/lib/base/base-linked-projects.mjs +14 -3
- package/client/esm2022/lib/base/base-npm-helpers.mjs +41 -2
- package/client/esm2022/lib/base/base-project-resolver.mjs +10 -1
- package/client/esm2022/lib/base/base-project.mjs +71 -9
- package/client/esm2022/lib/base/base-release-process.mjs +204 -0
- package/client/esm2022/lib/base/base-vscode.mjs +66 -0
- package/client/esm2022/lib/base/core-project.mjs +1 -1
- package/client/esm2022/lib/base/linked-project.mjs +2 -7
- package/client/esm2022/lib/models.mjs +1 -1
- package/client/fesm2022/tnp-helpers.mjs +205 -32
- package/client/fesm2022/tnp-helpers.mjs.map +1 -1
- package/client/lib/base/base-git.d.ts +17 -0
- package/client/lib/base/base-library-build.d.ts +2 -1
- package/client/lib/base/base-npm-helpers.d.ts +3 -0
- package/client/lib/base/base-project-resolver.d.ts +9 -8
- package/client/lib/base/base-project.d.ts +12 -7
- package/client/lib/base/base-release-process.d.ts +40 -0
- package/client/lib/base/base-vscode.d.ts +6 -0
- package/client/lib/base/core-project.d.ts +8 -0
- package/client/lib/models.d.ts +7 -1
- package/client/package.json +32 -31
- package/lib/base/base-command-line.backend.d.ts +4 -1
- package/lib/base/base-command-line.backend.js +101 -6
- package/lib/base/base-command-line.backend.js.map +1 -1
- package/lib/base/base-git.d.ts +17 -0
- package/lib/base/base-git.js +120 -52
- package/lib/base/base-git.js.map +1 -1
- package/lib/base/base-library-build.d.ts +2 -1
- package/lib/base/base-library-build.js +159 -127
- package/lib/base/base-library-build.js.map +1 -1
- package/lib/base/base-linked-projects.js +13 -3
- package/lib/base/base-linked-projects.js.map +1 -1
- package/lib/base/base-npm-helpers.d.ts +3 -0
- package/lib/base/base-npm-helpers.js +57 -1
- package/lib/base/base-npm-helpers.js.map +1 -1
- package/lib/base/base-project-resolver.d.ts +10 -9
- package/lib/base/base-project-resolver.js +11 -1
- package/lib/base/base-project-resolver.js.map +1 -1
- package/lib/base/base-project.d.ts +13 -8
- package/lib/base/base-project.js +92 -21
- package/lib/base/base-project.js.map +1 -1
- package/lib/base/base-release-process.d.ts +39 -0
- package/lib/base/base-release-process.js +289 -0
- package/lib/base/base-release-process.js.map +1 -0
- package/lib/base/base-vscode.d.ts +5 -0
- package/lib/base/base-vscode.js +79 -0
- package/lib/base/base-vscode.js.map +1 -0
- package/lib/base/command-line-feature.backend.d.ts +6 -1
- package/lib/base/command-line-feature.backend.js +67 -1
- package/lib/base/command-line-feature.backend.js.map +1 -1
- package/lib/base/core-project.d.ts +8 -0
- package/lib/base/core-project.js.map +1 -1
- package/lib/base/linked-project.js +8 -10
- package/lib/base/linked-project.js.map +1 -1
- package/lib/helpers/for-backend/helpers-console-gui.d.ts +1 -1
- package/lib/helpers/for-backend/helpers-console-gui.js.map +1 -1
- package/lib/helpers/for-backend/helpers-dependencies.backend.js +1 -2
- package/lib/helpers/for-backend/helpers-dependencies.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-file-folders.backend.d.ts +16 -8
- package/lib/helpers/for-backend/helpers-file-folders.backend.js +156 -65
- package/lib/helpers/for-backend/helpers-file-folders.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-git.backend.d.ts +13 -0
- package/lib/helpers/for-backend/helpers-git.backend.js +93 -11
- package/lib/helpers/for-backend/helpers-git.backend.js.map +1 -1
- package/lib/helpers/for-backend/helpers-process.backend.js +3 -1
- package/lib/helpers/for-backend/helpers-process.backend.js.map +1 -1
- package/lib/helpers/for-browser/angular.helper.js +3 -3
- package/lib/models.d.ts +7 -1
- package/lib/old/base-component.js +3 -3
- package/lib/old/base-formly-component.js +3 -3
- package/lib/old/dual-component-ctrl.js +3 -3
- package/package.json +4 -4
- package/tmp-environment.json +37 -36
- package/websql/esm2022/lib/base/base-git.mjs +48 -5
- package/websql/esm2022/lib/base/base-library-build.mjs +27 -12
- package/websql/esm2022/lib/base/base-linked-projects.mjs +14 -3
- package/websql/esm2022/lib/base/base-npm-helpers.mjs +41 -2
- package/websql/esm2022/lib/base/base-project-resolver.mjs +10 -1
- package/websql/esm2022/lib/base/base-project.mjs +80 -18
- package/websql/esm2022/lib/base/base-release-process.mjs +204 -0
- package/websql/esm2022/lib/base/base-vscode.mjs +66 -0
- package/websql/esm2022/lib/base/core-project.mjs +1 -1
- package/websql/esm2022/lib/base/linked-project.mjs +2 -7
- package/websql/esm2022/lib/models.mjs +1 -1
- package/websql/fesm2022/tnp-helpers.mjs +213 -40
- package/websql/fesm2022/tnp-helpers.mjs.map +1 -1
- package/websql/lib/base/base-git.d.ts +17 -0
- package/websql/lib/base/base-library-build.d.ts +2 -1
- package/websql/lib/base/base-npm-helpers.d.ts +6 -1
- package/websql/lib/base/base-project-resolver.d.ts +9 -8
- package/websql/lib/base/base-project.d.ts +13 -5
- package/websql/lib/base/base-release-process.d.ts +40 -0
- package/websql/lib/base/base-vscode.d.ts +6 -0
- package/websql/lib/base/core-project.d.ts +8 -0
- package/websql/lib/models.d.ts +7 -1
|
@@ -53,6 +53,8 @@ export declare class BaseGit<PROJCET extends BaseProject = any> extends BaseFeat
|
|
|
53
53
|
lastCommitDate(): any;
|
|
54
54
|
lastCommitHash(): any;
|
|
55
55
|
lastCommitMessage(): any;
|
|
56
|
+
getCommitMessageByIndex(index: number): Promise<any>;
|
|
57
|
+
getCommitHashByIndex(index: number): Promise<any>;
|
|
56
58
|
penultimateCommitHash(): any;
|
|
57
59
|
checkTagExists(tag: string): any;
|
|
58
60
|
checkout(branchName: string, options?: {
|
|
@@ -96,6 +98,16 @@ export declare class BaseGit<PROJCET extends BaseProject = any> extends BaseFeat
|
|
|
96
98
|
*/
|
|
97
99
|
useGitBranchesAsMetadataForCommits(): boolean;
|
|
98
100
|
cloneTo(cwd: string, newProjectName?: string): Promise<any>;
|
|
101
|
+
/**
|
|
102
|
+
* This is only for push/pull process
|
|
103
|
+
*
|
|
104
|
+
* There are 2 types of projects:
|
|
105
|
+
* - with linked-projects.json
|
|
106
|
+
* - with children from external folder
|
|
107
|
+
*
|
|
108
|
+
* projects that are children of this project (with its own git repo)
|
|
109
|
+
*/
|
|
110
|
+
get gitChildren(): PROJCET[];
|
|
99
111
|
pullProcess(cloneChildren?: boolean): Promise<any>;
|
|
100
112
|
pushProcess(options?: {
|
|
101
113
|
force?: boolean;
|
|
@@ -112,4 +124,9 @@ export declare class BaseGit<PROJCET extends BaseProject = any> extends BaseFeat
|
|
|
112
124
|
protected _beforePushProcessAction(): Promise<any>;
|
|
113
125
|
protected _beforePullProcessAction(cloneChildren?: boolean): Promise<any>;
|
|
114
126
|
protected _getCommitMessage(typeofCommit: TypeOfCommit, args: string[], commitMessageRequired?: boolean): Promise<CommitData>;
|
|
127
|
+
/**
|
|
128
|
+
* This will prevent accidental branch change for firedev projects
|
|
129
|
+
* @returns branch name
|
|
130
|
+
*/
|
|
131
|
+
duringPushWarnIfProjectNotOnSpecyficDevBranch(): string;
|
|
115
132
|
}
|
|
@@ -38,9 +38,10 @@ export declare abstract class BaseLibraryBuild<PROJCET extends BaseProject = any
|
|
|
38
38
|
/**
|
|
39
39
|
* Angular library build
|
|
40
40
|
*/
|
|
41
|
-
buildLibraries({ watch, strategy, buildType, }?: LibrariesBuildOptions & {
|
|
41
|
+
buildLibraries({ watch, strategy, buildType, copylink_to_node_modules, }?: LibrariesBuildOptions & {
|
|
42
42
|
watch: boolean;
|
|
43
43
|
}): Promise<void>;
|
|
44
44
|
getLibraryBuildComamnd(options?: LibraryBuildCommandOptions): string | undefined;
|
|
45
45
|
get getLibraryBuildSuccessComamnd(): string;
|
|
46
|
+
selectCopytoProjects(): Promise<string[]>;
|
|
46
47
|
}
|
|
@@ -12,6 +12,9 @@ export declare class BaseNpmHelpers<PROJCET extends BaseProject = any> extends B
|
|
|
12
12
|
* version from package.json -> property version
|
|
13
13
|
*/
|
|
14
14
|
get version(): string;
|
|
15
|
+
get versionWithPatchPlusOne(): string;
|
|
16
|
+
get versionWithMinorPlusOneAndPatchZero(): string;
|
|
17
|
+
get versionWithMajorPlusOneAndMinorZeroAndPatchZero(): string;
|
|
15
18
|
/**
|
|
16
19
|
* Major Version from package.json
|
|
17
20
|
*/
|
|
@@ -73,7 +76,9 @@ export declare class BaseNpmHelpers<PROJCET extends BaseProject = any> extends B
|
|
|
73
76
|
sync(): any;
|
|
74
77
|
async(detach?: boolean, mockFun?: (stdoutCallback: (dataForStdout: any) => any, stdErrcCallback: (dataForStder: any) => any, shouldProcesBeDead?: () => boolean) => number | Promise<number>): import("child_process").ChildProcess;
|
|
75
78
|
asyncAsPromise(): Promise<void>;
|
|
76
|
-
unitlOutputContains(stdoutMsg: string | string[], stderMsg?: string | string[], timeout?: number, stdoutOutputContainsCallback?: () => any): any;
|
|
79
|
+
unitlOutputContains(stdoutMsg: string | string[], stderMsg?: string | string[], timeout?: number, stdoutOutputContainsCallback?: () => any): any; /**
|
|
80
|
+
* @returns true if node_modules folder is empty
|
|
81
|
+
*/
|
|
77
82
|
};
|
|
78
83
|
prepareCommand(optiosn?: CoreModels.NpmInstallOptions): Promise<string>;
|
|
79
84
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { BaseProject } from './base-project';
|
|
3
3
|
import { ConfigDatabase } from './config-database';
|
|
4
4
|
import { ProjectDatabase } from './project-database';
|
|
5
|
-
export declare class BaseProjectResolver<
|
|
5
|
+
export declare class BaseProjectResolver<PROJECT extends Partial<BaseProject> = any> {
|
|
6
6
|
protected classFn: any;
|
|
7
7
|
/**
|
|
8
8
|
* general name for project company
|
|
@@ -11,7 +11,7 @@ export declare class BaseProjectResolver<T extends Partial<BaseProject> = any> {
|
|
|
11
11
|
configDb: ConfigDatabase;
|
|
12
12
|
projectsDb: ProjectDatabase;
|
|
13
13
|
protected readonly NPM_PROJECT_KEY = "npm";
|
|
14
|
-
protected projects:
|
|
14
|
+
protected projects: PROJECT[];
|
|
15
15
|
/**
|
|
16
16
|
* To speed up checking folder I am keeping pathes for alterdy checked folder
|
|
17
17
|
* This may break things that are creating new projects
|
|
@@ -22,20 +22,21 @@ export declare class BaseProjectResolver<T extends Partial<BaseProject> = any> {
|
|
|
22
22
|
/**
|
|
23
23
|
* project from process.cwd()
|
|
24
24
|
*/
|
|
25
|
-
get Current():
|
|
25
|
+
get Current(): PROJECT;
|
|
26
26
|
/**
|
|
27
27
|
* override this
|
|
28
28
|
*/
|
|
29
29
|
typeFrom(location: string, recrusiveCall?: boolean): string;
|
|
30
|
-
From(locationOfProject: string | string[], options?: any):
|
|
30
|
+
From(locationOfProject: string | string[], options?: any): PROJECT;
|
|
31
31
|
nearestTo(absoluteLocation: string, options?: {
|
|
32
32
|
type?: string | string[];
|
|
33
33
|
findGitRoot?: boolean;
|
|
34
34
|
onlyOutSideNodeModules?: boolean;
|
|
35
|
-
}):
|
|
36
|
-
unload(project:
|
|
37
|
-
remove(project:
|
|
38
|
-
add(project:
|
|
35
|
+
}): PROJECT;
|
|
36
|
+
unload(project: PROJECT): void;
|
|
37
|
+
remove(project: PROJECT): void;
|
|
38
|
+
add(project: PROJECT): void;
|
|
39
39
|
allProjectFrom(absoluteLocation: string, stopOnCwd?: string): any;
|
|
40
|
+
allProjectsFromFolder(folderLocation: string): PROJECT[];
|
|
40
41
|
sortGroupOfProject<T extends BaseProject = BaseProject>(projects: T[], resoveDepsArray: (proj: T) => string[], projNameToCompare: (proj: T) => string): T[];
|
|
41
42
|
}
|
|
@@ -8,11 +8,9 @@ import type { BaseLibraryBuild } from './base-library-build';
|
|
|
8
8
|
import { BaseNpmHelpers } from './base-npm-helpers';
|
|
9
9
|
import { BaseLinkedProjects } from './base-linked-projects';
|
|
10
10
|
import { BaseGit } from './base-git';
|
|
11
|
+
import { BaseVscodeHelpers } from './base-vscode';
|
|
12
|
+
import { BaseReleaseProcess } from './base-release-process';
|
|
11
13
|
export declare abstract class BaseProject<PROJCET extends BaseProject = any, TYPE = BaseProjectType> {
|
|
12
|
-
/**
|
|
13
|
-
* doesn't need to be real path -> can be link
|
|
14
|
-
*/
|
|
15
|
-
readonly location: string;
|
|
16
14
|
static ins: BaseProjectResolver<BaseProject<any, CoreModels.BaseProjectType>>;
|
|
17
15
|
cache: any;
|
|
18
16
|
static cache: any;
|
|
@@ -30,7 +28,12 @@ export declare abstract class BaseProject<PROJCET extends BaseProject = any, TYP
|
|
|
30
28
|
libraryBuild: BaseLibraryBuild;
|
|
31
29
|
npmHelpers: BaseNpmHelpers;
|
|
32
30
|
linkedProjects: BaseLinkedProjects;
|
|
31
|
+
vsCodeHelpers: BaseVscodeHelpers;
|
|
32
|
+
releaseProcess: BaseReleaseProcess;
|
|
33
33
|
git: BaseGit;
|
|
34
|
+
private __location;
|
|
35
|
+
get location(): string;
|
|
36
|
+
set location(v: string);
|
|
34
37
|
constructor(
|
|
35
38
|
/**
|
|
36
39
|
* doesn't need to be real path -> can be link
|
|
@@ -61,7 +64,8 @@ export declare abstract class BaseProject<PROJCET extends BaseProject = any, TYP
|
|
|
61
64
|
getChildBy(nameOrBasename: string, errors?: boolean): PROJCET;
|
|
62
65
|
get parent(): PROJCET;
|
|
63
66
|
get grandpa(): PROJCET;
|
|
64
|
-
get genericName():
|
|
67
|
+
get genericName(): any;
|
|
68
|
+
private checkAndBoldenPath;
|
|
65
69
|
/**
|
|
66
70
|
* same has project.hasFile();
|
|
67
71
|
*/
|
|
@@ -139,6 +143,9 @@ export declare abstract class BaseProject<PROJCET extends BaseProject = any, TYP
|
|
|
139
143
|
isUnsingActionCommit(): boolean;
|
|
140
144
|
resetProcess(overrideBranch?: string, recrusive?: boolean): Promise<void>;
|
|
141
145
|
linkTo(destPackageLocation: string): void;
|
|
146
|
+
setValueToJSON(relativePath: string, lodashGetPath: string, value: any): void;
|
|
147
|
+
getValueFromJSON(relativePath: string, lodashGetPath: string, defaultValue?: any): any;
|
|
148
|
+
getValueFromJSONC(relativePath: string, lodashGetPath: string, defaultValue?: any): any;
|
|
142
149
|
writeFile(relativePath: string, content: string): void;
|
|
143
150
|
runCommandGetString(this: BaseProject, command: string): any;
|
|
144
151
|
toString: () => string;
|
|
@@ -162,6 +169,7 @@ export declare abstract class BaseProject<PROJCET extends BaseProject = any, TYP
|
|
|
162
169
|
* init and build() project
|
|
163
170
|
*/
|
|
164
171
|
build(buildOptions?: any): Promise<void>;
|
|
172
|
+
release(releaseOptions?: any): Promise<void>;
|
|
165
173
|
/**
|
|
166
174
|
* lint porject
|
|
167
175
|
*/
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { BaseFeatureForProject } from './base-feature-for-project';
|
|
3
|
+
import type { BaseProject } from './base-project';
|
|
4
|
+
import { CoreModels } from 'tnp-core/websql';
|
|
5
|
+
import type { ChangelogData } from '.././models';
|
|
6
|
+
export declare class BaseReleaseProcess<PROJCET extends BaseProject = any> extends BaseFeatureForProject {
|
|
7
|
+
project: PROJCET;
|
|
8
|
+
/**
|
|
9
|
+
* Automatic release process of patch plus one version
|
|
10
|
+
*/
|
|
11
|
+
automaticRelease: boolean;
|
|
12
|
+
type: CoreModels.ReleaseType;
|
|
13
|
+
lastChangesSummary: string;
|
|
14
|
+
startRelease(options?: Partial<Pick<BaseReleaseProcess<PROJCET>, 'automaticRelease' | 'type'>>): Promise<void>;
|
|
15
|
+
private selectReleaseType;
|
|
16
|
+
generateChangesForChangelog(): void;
|
|
17
|
+
generateLastChangesSummary(): Promise<string>;
|
|
18
|
+
getLastChangesFromCommits({ maxMessagesToCheck, stopOnCommitMessage, }?: {
|
|
19
|
+
/**
|
|
20
|
+
* default 3
|
|
21
|
+
*/
|
|
22
|
+
maxMessagesToCheck?: number;
|
|
23
|
+
/**
|
|
24
|
+
* stop serching on commit message
|
|
25
|
+
*/
|
|
26
|
+
stopOnCommitMessage?: string;
|
|
27
|
+
}): Promise<string>;
|
|
28
|
+
getLastReleaseCommitData(): Promise<{
|
|
29
|
+
lastRelaseCommitMsg: string;
|
|
30
|
+
/**
|
|
31
|
+
* -1 if not found
|
|
32
|
+
*/
|
|
33
|
+
index: number;
|
|
34
|
+
}>;
|
|
35
|
+
getLastPackageVersionChangesFromChnagelog(): Promise<string>;
|
|
36
|
+
private get changeLogPath();
|
|
37
|
+
get changelogContent(): any;
|
|
38
|
+
changeLogKeyWord(): string;
|
|
39
|
+
getChnagelogData(): ChangelogData[];
|
|
40
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import type { BaseProject } from './base-project';
|
|
3
|
+
import { BaseFeatureForProject } from './base-feature-for-project';
|
|
4
|
+
export declare class BaseVscodeHelpers<PROJCET extends BaseProject = any> extends BaseFeatureForProject {
|
|
5
|
+
get extensions(): string[];
|
|
6
|
+
}
|
|
@@ -20,10 +20,18 @@ export type CoreCommandArgOptions<PROJECT extends BaseProject> = {
|
|
|
20
20
|
* first arg from command line
|
|
21
21
|
*/
|
|
22
22
|
firstArg: string;
|
|
23
|
+
/**
|
|
24
|
+
* Not question for user ex.
|
|
25
|
+
* - automatic process of patch release
|
|
26
|
+
* - automatic deployment for default server
|
|
27
|
+
*/
|
|
28
|
+
automaticProcess?: boolean;
|
|
23
29
|
/**
|
|
24
30
|
* orignal args with params
|
|
25
31
|
*/
|
|
26
32
|
argsWithParams: string;
|
|
33
|
+
copyto?: string[];
|
|
34
|
+
copytoall?: boolean;
|
|
27
35
|
/**
|
|
28
36
|
* args from command line (clearn from params)
|
|
29
37
|
*/
|
package/websql/lib/models.d.ts
CHANGED
|
@@ -24,4 +24,10 @@ export type LibraryBuildCommandOptions = {
|
|
|
24
24
|
export type LibrariesBuildOptions = {
|
|
25
25
|
strategy?: 'link' | 'copy';
|
|
26
26
|
buildType: core.CoreModels.LibraryType;
|
|
27
|
-
|
|
27
|
+
copylink_to_node_modules?: string[];
|
|
28
|
+
};
|
|
29
|
+
export interface ChangelogData {
|
|
30
|
+
changes: string[];
|
|
31
|
+
version: string;
|
|
32
|
+
date: string;
|
|
33
|
+
}
|