tnp-helpers 16.444.16 → 16.444.18

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.
Files changed (98) hide show
  1. package/assets/shared/shared_folder_info.txt +1 -1
  2. package/browser/README.md +24 -24
  3. package/browser/esm2022/lib/base/base-git.mjs +613 -0
  4. package/browser/esm2022/lib/base/base-library-build.mjs +383 -0
  5. package/browser/esm2022/lib/base/base-linked-projects.mjs +291 -0
  6. package/browser/esm2022/lib/base/base-npm-helpers.mjs +317 -0
  7. package/browser/esm2022/lib/base/base-project-resolver.mjs +56 -2
  8. package/browser/esm2022/lib/base/base-project.mjs +180 -1482
  9. package/browser/esm2022/lib/base/core-project.mjs +5 -3
  10. package/browser/esm2022/lib/base/index.mjs +5 -1
  11. package/browser/esm2022/lib/models.mjs +2 -1
  12. package/browser/fesm2022/tnp-helpers.mjs +1098 -748
  13. package/browser/fesm2022/tnp-helpers.mjs.map +1 -1
  14. package/browser/lib/base/base-git.d.ts +114 -0
  15. package/browser/lib/base/base-library-build.d.ts +22 -0
  16. package/browser/lib/base/base-linked-projects.d.ts +23 -0
  17. package/browser/lib/base/base-npm-helpers.d.ts +80 -0
  18. package/browser/lib/base/base-project-resolver.d.ts +2 -1
  19. package/browser/lib/base/base-project.d.ts +9 -205
  20. package/browser/lib/base/index.d.ts +4 -0
  21. package/browser/lib/models.d.ts +17 -4
  22. package/client/README.md +24 -24
  23. package/client/esm2022/lib/base/base-git.mjs +613 -0
  24. package/client/esm2022/lib/base/base-library-build.mjs +383 -0
  25. package/client/esm2022/lib/base/base-linked-projects.mjs +291 -0
  26. package/client/esm2022/lib/base/base-npm-helpers.mjs +317 -0
  27. package/client/esm2022/lib/base/base-project-resolver.mjs +56 -2
  28. package/client/esm2022/lib/base/base-project.mjs +180 -1482
  29. package/client/esm2022/lib/base/core-project.mjs +5 -3
  30. package/client/esm2022/lib/base/index.mjs +5 -1
  31. package/client/esm2022/lib/models.mjs +2 -1
  32. package/client/fesm2022/tnp-helpers.mjs +1098 -748
  33. package/client/fesm2022/tnp-helpers.mjs.map +1 -1
  34. package/client/lib/base/base-git.d.ts +114 -0
  35. package/client/lib/base/base-library-build.d.ts +22 -0
  36. package/client/lib/base/base-linked-projects.d.ts +23 -0
  37. package/client/lib/base/base-npm-helpers.d.ts +80 -0
  38. package/client/lib/base/base-project-resolver.d.ts +2 -1
  39. package/client/lib/base/base-project.d.ts +9 -205
  40. package/client/lib/base/index.d.ts +4 -0
  41. package/client/lib/models.d.ts +17 -4
  42. package/client/package.json +9 -9
  43. package/firedev.jsonc +61 -61
  44. package/lib/base/base-command-line.backend.d.ts +1 -0
  45. package/lib/base/base-command-line.backend.js +26 -13
  46. package/lib/base/base-command-line.backend.js.map +1 -1
  47. package/lib/base/base-git.d.ts +120 -0
  48. package/lib/base/base-git.js +856 -0
  49. package/lib/base/base-git.js.map +1 -0
  50. package/lib/base/base-library-build.d.ts +26 -0
  51. package/lib/base/base-library-build.js +450 -0
  52. package/lib/base/base-library-build.js.map +1 -0
  53. package/lib/base/base-linked-projects.d.ts +23 -0
  54. package/lib/base/base-linked-projects.js +391 -0
  55. package/lib/base/base-linked-projects.js.map +1 -0
  56. package/lib/base/base-npm-helpers.d.ts +79 -0
  57. package/lib/base/base-npm-helpers.js +399 -0
  58. package/lib/base/base-npm-helpers.js.map +1 -0
  59. package/lib/base/base-project-resolver.d.ts +2 -1
  60. package/lib/base/base-project-resolver.js +39 -4
  61. package/lib/base/base-project-resolver.js.map +1 -1
  62. package/lib/base/base-project.d.ts +11 -214
  63. package/lib/base/base-project.js +103 -1739
  64. package/lib/base/base-project.js.map +1 -1
  65. package/lib/base/core-project.js +8 -4
  66. package/lib/base/core-project.js.map +1 -1
  67. package/lib/base/index.d.ts +4 -0
  68. package/lib/base/index.js +4 -0
  69. package/lib/base/index.js.map +1 -1
  70. package/lib/helpers/for-backend/helpers-git.backend.d.ts +1 -1
  71. package/lib/helpers/for-backend/helpers-git.backend.js +2 -2
  72. package/lib/helpers/for-browser/angular.helper.js +3 -3
  73. package/lib/models.d.ts +17 -4
  74. package/lib/old/base-component.js +3 -3
  75. package/lib/old/base-formly-component.js +3 -3
  76. package/lib/old/dual-component-ctrl.js +3 -3
  77. package/package.json +4 -4
  78. package/tmp-environment.json +13 -13
  79. package/websql/README.md +24 -24
  80. package/websql/esm2022/lib/base/base-git.mjs +613 -0
  81. package/websql/esm2022/lib/base/base-library-build.mjs +383 -0
  82. package/websql/esm2022/lib/base/base-linked-projects.mjs +291 -0
  83. package/websql/esm2022/lib/base/base-npm-helpers.mjs +317 -0
  84. package/websql/esm2022/lib/base/base-project-resolver.mjs +50 -2
  85. package/websql/esm2022/lib/base/base-project.mjs +235 -1537
  86. package/websql/esm2022/lib/base/core-project.mjs +5 -3
  87. package/websql/esm2022/lib/base/index.mjs +5 -1
  88. package/websql/esm2022/lib/models.mjs +2 -1
  89. package/websql/fesm2022/tnp-helpers.mjs +1106 -761
  90. package/websql/fesm2022/tnp-helpers.mjs.map +1 -1
  91. package/websql/lib/base/base-git.d.ts +114 -0
  92. package/websql/lib/base/base-library-build.d.ts +22 -0
  93. package/websql/lib/base/base-linked-projects.d.ts +23 -0
  94. package/websql/lib/base/base-npm-helpers.d.ts +80 -0
  95. package/websql/lib/base/base-project-resolver.d.ts +2 -1
  96. package/websql/lib/base/base-project.d.ts +12 -205
  97. package/websql/lib/base/index.d.ts +4 -0
  98. package/websql/lib/models.d.ts +17 -4
@@ -0,0 +1,114 @@
1
+ // @ts-nocheck
2
+ import { BaseFeatureForProject } from './base-feature-for-project';
3
+ import { CommitData, TypeOfCommit } from '../index';
4
+ import type { BaseProject } from './base-project';
5
+ export declare class BaseGit<PROJCET extends BaseProject = any> extends BaseFeatureForProject {
6
+ project: PROJCET;
7
+ unstageAllFiles(): any;
8
+ revertFileChanges(fileReletivePath: string): any;
9
+ clone(url: string, destinationFolderName?: string, branchName?: string): Promise<any>;
10
+ restoreLastVersion(localFilePath: string): any;
11
+ stageAllFiles(): any;
12
+ stash(optinos?: {
13
+ onlyStaged?: boolean;
14
+ }): any;
15
+ stashApply(): any;
16
+ fetch(): any;
17
+ resetFiles(...relativePathes: string[]): any;
18
+ get isInsideGitRepo(): any;
19
+ get isWithoutGitRepository(): any;
20
+ get isGitRoot(): any;
21
+ get originURL(): any;
22
+ commit(commitMessage?: string): any;
23
+ /**
24
+ * alias to stage all and commit
25
+ */
26
+ addAndCommit(commitMessage: string): any;
27
+ stageAllAndCommit(commitMessage: string): any;
28
+ pushCurrentBranch(options?: {
29
+ force?: boolean;
30
+ origin?: string;
31
+ askToRetry?: boolean;
32
+ forcePushNoQuestion?: boolean;
33
+ }): Promise<any>;
34
+ get allOrigins(): any;
35
+ get uncommitedFiles(): any;
36
+ get thereAreSomeUncommitedChange(): any;
37
+ thereAreSomeUncommitedChangeExcept(filesList?: string[]): any;
38
+ meltActionCommits(soft?: boolean): void;
39
+ pullCurrentBranch(options?: {
40
+ askToRetry?: boolean;
41
+ defaultHardResetCommits?: number;
42
+ }): Promise<any>;
43
+ get currentBranchName(): any;
44
+ get listOfCurrentGitChanges(): any;
45
+ getBranchesNamesBy(pattern: string | RegExp): any;
46
+ resetSoftHEAD(HEAD?: number): any;
47
+ resetHard(options?: {
48
+ HEAD?: number;
49
+ }): any;
50
+ countComits(): any;
51
+ hasAnyCommits(): any;
52
+ get isInMergeProcess(): any;
53
+ lastCommitDate(): any;
54
+ lastCommitHash(): any;
55
+ lastCommitMessage(): any;
56
+ penultimateCommitHash(): any;
57
+ checkTagExists(tag: string): any;
58
+ checkout(branchName: string, options?: {
59
+ createBranchIfNotExists?: boolean;
60
+ fetchBeforeCheckout?: boolean;
61
+ switchBranchWhenExists?: boolean;
62
+ }): any;
63
+ checkoutFromTo(checkoutFromBranch: string, branch: string, origin?: string): any;
64
+ /**
65
+ *
66
+ * @param majorVersion example: v1, v2 etc.
67
+ * @returns tag name
68
+ */
69
+ lastTagNameForMajorVersion(majorVersion: any): any;
70
+ lastTagHash(): any;
71
+ get remoteOriginUrl(): any;
72
+ get lastTagVersionName(): any;
73
+ get stagedFiles(): string[];
74
+ /**
75
+ * TODO does this make any sense
76
+ */
77
+ renameOrigin(newNameOrUlr: string): any;
78
+ /**
79
+ * By default no translation of commit
80
+ */
81
+ transalteGitCommitFromArgs(): {
82
+ from: string;
83
+ to: string;
84
+ };
85
+ /**
86
+ * By defult true.. when commit branches will not function.
87
+ * (false is better for simple projects)
88
+ */
89
+ useGitBranchesWhenCommitingAndPushing(): boolean;
90
+ /**
91
+ * usefull when pushing in project with childrens as git repos
92
+ */
93
+ automaticallyAddAllChnagesWhenPushingToGit(): boolean;
94
+ /**
95
+ * usefull when pushing in project with childrens as git repos
96
+ */
97
+ useGitBranchesAsMetadataForCommits(): boolean;
98
+ cloneTo(cwd: string, newProjectName?: string): Promise<any>;
99
+ pullProcess(cloneChildren?: boolean): Promise<any>;
100
+ pushProcess(options?: {
101
+ force?: boolean;
102
+ typeofCommit?: TypeOfCommit;
103
+ origin?: string;
104
+ args?: string[];
105
+ exitCallBack?: () => void;
106
+ forcePushNoQuestion?: boolean;
107
+ commitMessageRequired?: boolean;
108
+ skipChildren?: boolean;
109
+ }): Promise<any>;
110
+ _beforeAnyActionOnGitRoot(): any;
111
+ protected _beforePushProcessAction(): Promise<any>;
112
+ protected _beforePullProcessAction(cloneChildren?: boolean): Promise<any>;
113
+ protected _getCommitMessage(typeofCommit: TypeOfCommit, args: string[], commitMessageRequired?: boolean): Promise<CommitData>;
114
+ }
@@ -0,0 +1,22 @@
1
+ // @ts-nocheck
2
+ import { BaseFeatureForProject } from './base-feature-for-project';
3
+ import { LibrariesBuildOptions, LibraryBuildCommandOptions } from '../models';
4
+ import type { BaseProject } from './base-project';
5
+ /**
6
+ * Base library build for standard angular/typescript projects
7
+ */
8
+ export declare class BaseLibraryBuild<PROJCET extends BaseProject = any> extends BaseFeatureForProject {
9
+ private cache;
10
+ get sortedLibrariesByDeps(): PROJCET[];
11
+ getSortedLibrariesByDepsForBuild(libs: PROJCET[], dontSugestBuildAll?: boolean): Promise<PROJCET[]>;
12
+ /**
13
+ * angular libraries from angular.json
14
+ */
15
+ get libraries(): PROJCET[];
16
+ selectLibraries({ onlySelectedLibs }: {
17
+ onlySelectedLibs: string[];
18
+ }): Promise<any>;
19
+ buildLibraries({ rebuild, watch, strategy, onlySelectedLibs, buildType, }?: LibrariesBuildOptions): Promise<void>;
20
+ getLibraryBuildComamnd(options?: LibraryBuildCommandOptions): string | undefined;
21
+ get getLibraryBuildSuccessComamnd(): string;
22
+ }
@@ -0,0 +1,23 @@
1
+ // @ts-nocheck
2
+ import { LinkedPorjectsConfig, LinkedProject } from '../index';
3
+ import { BaseFeatureForProject } from './base-feature-for-project';
4
+ import type { BaseProject } from './base-project';
5
+ export declare class BaseLinkedProjects<PROJCET extends BaseProject = any> extends BaseFeatureForProject {
6
+ private cache;
7
+ project: PROJCET;
8
+ get embeddedProject(): PROJCET;
9
+ get projectsDbLocation(): any;
10
+ saveLocationToDB(): Promise<any>;
11
+ saveAllLinkedProjectsToDB(): Promise<void>;
12
+ addLinkedProject(linkedProj: LinkedProject | string): any;
13
+ addLinkedProjects(linkedProjs: LinkedProject[]): any;
14
+ setLinkedProjectsConfig(linkedPorjectsConfig: Partial<LinkedPorjectsConfig>): any;
15
+ private get linkedProjectsConfigPath();
16
+ protected recreateLinkedProjectsConfig(): any;
17
+ getLinkedProjectsConfig(): LinkedPorjectsConfig;
18
+ get linkedProjects(): LinkedProject[];
19
+ get detectedLinkedProjects(): LinkedProject[];
20
+ get linkedProjectsPrefix(): string;
21
+ resetLinkedProjectsOnlyToCoreBranches(): boolean;
22
+ cloneUnexistedLinkedProjects(actionType: 'pull' | 'push', cloneChildren?: boolean): Promise<any>;
23
+ }
@@ -0,0 +1,80 @@
1
+ // @ts-nocheck
2
+ /// <reference types="node" />
3
+ import { BaseFeatureForProject } from './base-feature-for-project';
4
+ import type { BaseProject } from './base-project';
5
+ import { PackageJson } from 'type-fest';
6
+ import { CoreModels } from 'tnp-core/browser';
7
+ export declare class BaseNpmHelpers<PROJCET extends BaseProject = any> extends BaseFeatureForProject {
8
+ private packageJSON;
9
+ constructor(project: PROJCET);
10
+ get name(): string;
11
+ /**
12
+ * version from package.json -> property version
13
+ */
14
+ get version(): string;
15
+ /**
16
+ * Major Version from package.json
17
+ */
18
+ get majorVersion(): number;
19
+ /**
20
+ * Minor Version from package.json
21
+ */
22
+ get minorVersion(): number;
23
+ /**
24
+ * @deprecated
25
+ */
26
+ bumpPatchVersion(): Promise<any>;
27
+ get versionPathAsNumber(): number;
28
+ /**
29
+ * npm dependencies from package.json
30
+ */
31
+ get dependencies(): PackageJson.Dependency;
32
+ /**
33
+ * peerDependencies dependencies
34
+ */
35
+ get peerDependencies(): PackageJson.Dependency;
36
+ /**
37
+ * devDependencies dependencies
38
+ */
39
+ get devDependencies(): PackageJson.Dependency;
40
+ /**
41
+ * resolutions dependencies
42
+ */
43
+ get resolutions(): PackageJson.Dependency;
44
+ /**
45
+ * @returns object witl all deps from current project package json
46
+ */
47
+ get allDependencies(): {
48
+ [packageName: string]: string;
49
+ };
50
+ /**
51
+ * @returns object witl all deps from package json
52
+ */
53
+ allDepsFromPackageJson(packageJson: PackageJson): any;
54
+ checkIfLogginInToNpm(): any;
55
+ linkNodeModulesTo(proj: Partial<BaseProject>): any;
56
+ preferYarnOverNpm(): boolean;
57
+ makeSureNodeModulesInstalled(options?: {
58
+ checkPackages?: boolean;
59
+ useYarn?: boolean;
60
+ force?: boolean;
61
+ }): Promise<void>;
62
+ deleteNodeModules(): void;
63
+ reinstallNodeModules(forcerRemoveNodeModules?: boolean): Promise<any>;
64
+ reinstalNodeModules(options?: {
65
+ useYarn?: boolean;
66
+ force?: boolean;
67
+ }): any;
68
+ /**
69
+ * @returns true if node_modules folder is empty
70
+ */
71
+ get emptyNodeModules(): any;
72
+ resetPackageLockJson(): Promise<any>;
73
+ startNpmTask(taskName: string, additionalArguments?: string | object): {
74
+ sync(): any;
75
+ async(detach?: boolean, mockFun?: (stdoutCallback: (dataForStdout: any) => any, stdErrcCallback: (dataForStder: any) => any, shouldProcesBeDead?: () => boolean) => number | Promise<number>): import("child_process").ChildProcess;
76
+ asyncAsPromise(): Promise<void>;
77
+ unitlOutputContains(stdoutMsg: string | string[], stderMsg?: string | string[], timeout?: number, stdoutOutputContainsCallback?: () => any): any;
78
+ };
79
+ prepareCommand(optiosn?: CoreModels.NpmInstallOptions): Promise<string>;
80
+ }
@@ -29,7 +29,7 @@ export declare class BaseProjectResolver<T extends Partial<BaseProject> = any> {
29
29
  typeFrom(location: string, recrusiveCall?: boolean): string;
30
30
  From(locationOfProject: string | string[], options?: any): T;
31
31
  nearestTo(absoluteLocation: string, options?: {
32
- type?: (string | string[]);
32
+ type?: string | string[];
33
33
  findGitRoot?: boolean;
34
34
  onlyOutSideNodeModules?: boolean;
35
35
  }): T;
@@ -37,4 +37,5 @@ export declare class BaseProjectResolver<T extends Partial<BaseProject> = any> {
37
37
  remove(project: T): void;
38
38
  add(project: T): void;
39
39
  allProjectFrom(absoluteLocation: string, stopOnCwd?: string): any;
40
+ sortGroupOfProject<T extends BaseProject = BaseProject>(projects: T[], resoveDepsArray: (proj: T) => string[], projNameToCompare: (proj: T) => string): T[];
40
41
  }
@@ -1,24 +1,23 @@
1
1
  // @ts-nocheck
2
2
  /// <reference types="node" />
3
3
  import { CoreModels } from 'tnp-core/browser';
4
- import { CommitData, CoreProject, LinkedPorjectsConfig, LinkedProject, TypeOfCommit } from '../index';
4
+ import { CoreProject } from '../index';
5
5
  import { BaseProjectResolver } from './base-project-resolver';
6
6
  import { BaseProjectType } from '../models';
7
+ import type { BaseLibraryBuild } from './base-library-build';
8
+ import { BaseNpmHelpers } from './base-npm-helpers';
9
+ import { BaseLinkedProjects } from './base-linked-projects';
10
+ import { BaseGit } from './base-git';
7
11
  export declare abstract class BaseProject<PROJCET extends BaseProject = any, TYPE = BaseProjectType> {
8
12
  /**
9
13
  * doesn't need to be real path -> can be link
10
14
  */
11
15
  readonly location: string;
12
16
  static ins: BaseProjectResolver<BaseProject<any, CoreModels.BaseProjectType>>;
13
- static sortGroupOfProject<T extends BaseProject = BaseProject>(projects: T[], resoveDepsArray: (proj: T) => string[], projNameToCompare: (proj: T) => string): T[];
14
- get embeddedProject(): PROJCET;
15
- get projectsDbLocation(): any;
16
- saveLocationToDB(): Promise<any>;
17
17
  cache: any;
18
18
  static cache: any;
19
19
  get globalCache(): any;
20
20
  readonly type: TYPE | string;
21
- protected readonly packageJSON: any;
22
21
  /**
23
22
  * resolve instance
24
23
  */
@@ -28,27 +27,19 @@ export declare abstract class BaseProject<PROJCET extends BaseProject = any, TYP
28
27
  * only available after executing *this.assignFreePort()*
29
28
  */
30
29
  readonly port: string;
30
+ libraryBuild: BaseLibraryBuild;
31
+ npmHelpers: BaseNpmHelpers;
32
+ linkedProjects: BaseLinkedProjects;
33
+ git: BaseGit;
31
34
  constructor(
32
35
  /**
33
36
  * doesn't need to be real path -> can be link
34
37
  */
35
38
  location: string);
36
- saveAllLinkedProjectsToDB(): Promise<void>;
37
39
  get isMonorepo(): boolean;
38
40
  protected orderCoreProjects(coreProjects: CoreProject[]): CoreProject[];
39
41
  get core(): CoreProject;
40
- addLinkedProject(linkedProj: LinkedProject | string): any;
41
- addLinkedProjects(linkedProjs: LinkedProject[]): any;
42
- setLinkedProjectsConfig(linkedPorjectsConfig: Partial<LinkedPorjectsConfig>): any;
43
- private get linkedProjectsConfigPath();
44
- protected recreateLinkedProjectsConfig(): any;
45
- getLinkedProjectsConfig(): LinkedPorjectsConfig;
46
- get linkedProjects(): LinkedProject[];
47
- get detectedLinkedProjects(): LinkedProject[];
48
- get linkedProjectsPrefix(): string;
49
42
  get linkedProjectsExisted(): PROJCET[];
50
- resetLinkedProjectsOnlyToCoreBranches(): boolean;
51
- protected cloneUnexistedLinkedProjects(actionType: 'pull' | 'push', cloneChildren?: boolean): Promise<any>;
52
43
  setType(type: TYPE): void;
53
44
  typeIs(...types: TYPE[]): boolean;
54
45
  typeIsNot(...types: TYPE[]): boolean;
@@ -61,45 +52,6 @@ export declare abstract class BaseProject<PROJCET extends BaseProject = any, TYP
61
52
  */
62
53
  get name(): string;
63
54
  get nameFromPomXML(): string;
64
- /**
65
- * version from package.json -> property version
66
- */
67
- get version(): string;
68
- /**
69
- * Major Version from package.json
70
- */
71
- get majorVersion(): number;
72
- /**
73
- * Minor Version from package.json
74
- */
75
- get minorVersion(): number;
76
- /**
77
- * @deprecated
78
- */
79
- bumpPatchVersion(): Promise<any>;
80
- get versionPathAsNumber(): number;
81
- /**
82
- * npm dependencies from package.json
83
- */
84
- get dependencies(): any;
85
- /**
86
- * peerDependencies dependencies
87
- */
88
- get peerDependencies(): any;
89
- /**
90
- * devDependencies dependencies
91
- */
92
- get devDependencies(): any;
93
- /**
94
- * resolutions dependencies
95
- */
96
- get resolutions(): any;
97
- /**
98
- * object with all deps from package json
99
- */
100
- get allDependencies(): {
101
- [packageName: string]: string;
102
- };
103
55
  protected getFoldersForPossibleProjectChildren(): string[];
104
56
  protected getAllChildren(): any;
105
57
  /**
@@ -110,22 +62,6 @@ export declare abstract class BaseProject<PROJCET extends BaseProject = any, TYP
110
62
  get parent(): PROJCET;
111
63
  get grandpa(): PROJCET;
112
64
  get genericName(): any;
113
- deleteNodeModules(): void;
114
- reinstalNodeModules(options?: {
115
- useYarn?: boolean;
116
- force?: boolean;
117
- }): any;
118
- makeSureNodeModulesInstalled(options?: {
119
- checkPackages?: boolean;
120
- useYarn?: boolean;
121
- force?: boolean;
122
- }): Promise<void>;
123
- preferYarnOverNpm(): boolean;
124
- /**
125
- *
126
- * @returns true if node_modules folder is empty
127
- */
128
- nodeModulesEmpty(): any;
129
65
  /**
130
66
  * same has project.hasFile();
131
67
  */
@@ -175,8 +111,6 @@ export declare abstract class BaseProject<PROJCET extends BaseProject = any, TYP
175
111
  readJson<T = {}>(fileRelativeToProjectPath: string): T;
176
112
  remove(relativePath: string, exactPath?: boolean): void;
177
113
  removeFolderByRelativePath(relativePathToFolder: string): void;
178
- linkNodeModulesTo(proj: Partial<BaseProject>): any;
179
- reinstallNodeModules(forcerRemoveNodeModules?: boolean): any;
180
114
  assignFreePort(startFrom?: number, howManyFreePortsAfterThatPort?: number): Promise<number>;
181
115
  removeItself(): void;
182
116
  /**
@@ -204,98 +138,10 @@ export declare abstract class BaseProject<PROJCET extends BaseProject = any, TYP
204
138
  getMainBranches(): string[];
205
139
  isUnsingActionCommit(): boolean;
206
140
  resetProcess(overrideBranch?: string, recrusive?: boolean): Promise<void>;
207
- pullProcess(cloneChildren?: boolean): Promise<any>;
208
- pushProcess(options?: {
209
- force?: boolean;
210
- typeofCommit?: TypeOfCommit;
211
- origin?: string;
212
- args?: string[];
213
- exitCallBack?: () => void;
214
- forcePushNoQuestion?: boolean;
215
- commitMessageRequired?: boolean;
216
- skipChildren?: boolean;
217
- }): Promise<any>;
218
- private _beforeAnyActionOnGitRoot;
219
- protected _beforePushProcessAction(): Promise<any>;
220
- protected _beforePullProcessAction(cloneChildren?: boolean): Promise<any>;
221
- protected _getCommitMessage(typeofCommit: TypeOfCommit, args: string[], commitMessageRequired?: boolean): Promise<CommitData>;
222
141
  linkTo(destPackageLocation: string): void;
223
142
  writeFile(relativePath: string, content: string): void;
224
143
  runCommandGetString(this: BaseProject, command: string): any;
225
- get git(): {
226
- unstageAllFiles(): any;
227
- revertFileChanges(fileReletivePath: string): any;
228
- clone(url: string, destinationFolderName?: string, branchName?: string): Promise<any>;
229
- restoreLastVersion(localFilePath: string): any;
230
- stageAllFiles(): any;
231
- stash(optinos?: {
232
- onlyStaged?: boolean;
233
- }): any;
234
- stashApply(): any;
235
- fetch(): any;
236
- resetFiles(...relativePathes: string[]): any;
237
- readonly isInsideGitRepo: any;
238
- readonly isGitRoot: any;
239
- readonly originURL: any;
240
- commit(commitMessage?: string): any;
241
- /**
242
- * alias to stage all and commit
243
- */
244
- addAndCommit(commitMessage: string): any;
245
- stageAllAndCommit(commitMessage: string): any;
246
- pushCurrentBranch(options?: {
247
- force?: boolean;
248
- origin?: string;
249
- askToRetry?: boolean;
250
- forcePushNoQuestion?: boolean;
251
- }): Promise<any>;
252
- readonly allOrigins: any;
253
- readonly uncommitedFiles: any;
254
- readonly thereAreSomeUncommitedChange: any;
255
- thereAreSomeUncommitedChangeExcept(filesList?: string[]): any;
256
- meltActionCommits(soft?: boolean): void;
257
- pullCurrentBranch(options?: {
258
- askToRetry?: boolean;
259
- defaultHardResetCommits?: number;
260
- }): Promise<any>;
261
- readonly currentBranchName: any;
262
- readonly listOfCurrentGitChanges: any;
263
- getBranchesNamesBy(pattern: string | RegExp): any;
264
- resetSoftHEAD(HEAD?: number): any;
265
- resetHard(options?: {
266
- HEAD?: number;
267
- }): any;
268
- countComits(): any;
269
- hasAnyCommits(): any;
270
- readonly isInMergeProcess: any;
271
- lastCommitDate(): any;
272
- lastCommitHash(): any;
273
- lastCommitMessage(): any;
274
- penultimageCommitHash(): any;
275
- checkTagExists(tag: string): any;
276
- checkout(branchName: string, options?: {
277
- createBranchIfNotExists?: boolean;
278
- fetchBeforeCheckout?: boolean;
279
- switchBranchWhenExists?: boolean;
280
- }): any;
281
- checkoutFromTo(checkoutFromBranch: string, branch: string, origin?: string): any;
282
- /**
283
- *
284
- * @param majorVersion example: v1, v2 etc.
285
- * @returns tag name
286
- */
287
- lastTagNameForMajorVersion(majorVersion: any): any;
288
- lastTagHash(): any;
289
- readonly remoteOriginUrl: any;
290
- readonly lastTagVersionName: any;
291
- readonly stagedFiles: string[];
292
- /**
293
- * TODO does this make any sense
294
- */
295
- renameOrigin(newNameOrUlr: string): any;
296
- };
297
144
  toString: () => string;
298
- protected checkIfLogginInToNpm(): any;
299
145
  get parentsNames(): any;
300
146
  openLocation(relativeFolderPath: string): any;
301
147
  private findParentsNames;
@@ -324,46 +170,4 @@ export declare abstract class BaseProject<PROJCET extends BaseProject = any, TYP
324
170
  * get info about porject
325
171
  */
326
172
  info(): Promise<void>;
327
- /**
328
- * By default no translation of commit
329
- */
330
- transalteGitCommitFromArgs(): {
331
- from: string;
332
- to: string;
333
- };
334
- /**
335
- * By defult true.. when commit branches will not function.
336
- * (false is better for simple projects)
337
- */
338
- useGitBranchesWhenCommitingAndPushing(): boolean;
339
- /**
340
- * usefull when pushing in project with childrens as git repos
341
- */
342
- automaticallyAddAllChnagesWhenPushingToGit(): boolean;
343
- /**
344
- * usefull when pushing in project with childrens as git repos
345
- */
346
- useGitBranchesAsMetadataForCommits(): boolean;
347
- /**
348
- * angular libraries from angular.json
349
- */
350
- get libraries(): PROJCET[];
351
- get sortedLibrariesByDeps(): PROJCET[];
352
- getSortedLibrariesByDepsForBuild(libs: PROJCET[], dontSugestBuildAll?: boolean): Promise<PROJCET[]>;
353
- get getLibraryBuildSuccessComamnd(): string;
354
- buildLibraries({ rebuild, watch, strategy, onlySelectedLibs, }?: {
355
- rebuild?: boolean;
356
- watch?: boolean;
357
- strategy?: 'link' | 'copy';
358
- onlySelectedLibs?: string[];
359
- }): Promise<void>;
360
- getLibraryBuildComamnd(options?: {
361
- watch: boolean;
362
- }): string | undefined;
363
- startNpmTask(taskName: string, additionalArguments?: string | object): {
364
- sync(): any;
365
- async(detach?: boolean, mockFun?: (stdoutCallback: (dataForStdout: any) => any, stdErrcCallback: (dataForStder: any) => any, shouldProcesBeDead?: () => boolean) => number | Promise<number>): import("child_process").ChildProcess;
366
- asyncAsPromise(): Promise<void>;
367
- unitlOutputContains(stdoutMsg: string | string[], stderMsg?: string | string[], timeout?: number, stdoutOutputContainsCallback?: () => any): any;
368
- };
369
173
  }
@@ -2,6 +2,10 @@
2
2
  export * from './base-project';
3
3
  export * from './base-project-resolver';
4
4
  export * from './base-feature-for-project';
5
+ export * from './base-library-build';
6
+ export * from './base-npm-helpers';
7
+ export * from './base-linked-projects';
8
+ export * from './base-git';
5
9
  export * from './commit-data';
6
10
  export * from './core-project';
7
11
  export * from './linked-project';
@@ -6,14 +6,27 @@ export declare const BaseProjectTypeArr: string[];
6
6
  * Angular project type
7
7
  */
8
8
  export type NgProject = {
9
- "projectType": "library" | "application";
9
+ projectType: 'library' | 'application';
10
10
  /**
11
11
  * where ng-packagr.json is located, tsconfig etc.
12
12
  */
13
- "root": string;
13
+ root: string;
14
14
  /**
15
15
  * Source code project
16
16
  */
17
- "sourceRoot": string;
18
- "prefix": string;
17
+ sourceRoot: string;
18
+ prefix: string;
19
+ };
20
+ export type LibraryBuildCommandOptions = {
21
+ watch?: boolean;
22
+ buildType: core.CoreModels.LibraryType;
23
+ };
24
+ export type LibrariesBuildOptions = {
25
+ rebuild?: boolean;
26
+ watch?: boolean;
27
+ strategy?: 'link' | 'copy';
28
+ onlySelectedLibs?: string[];
29
+ buildType: core.CoreModels.LibraryType;
30
+ onlyBuildLib?: string;
31
+ args?: string[];
19
32
  };
package/client/README.md CHANGED
@@ -1,24 +1,24 @@
1
- # MyLib
2
-
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.0.
4
-
5
- ## Code scaffolding
6
-
7
- Run `ng generate component component-name --project my-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project my-lib`.
8
- > Note: Don't forget to add `--project my-lib` or else it will be added to the default project in your `angular.json` file.
9
-
10
- ## Build
11
-
12
- Run `ng build my-lib` to build the project. The build artifacts will be stored in the `dist/` directory.
13
-
14
- ## Publishing
15
-
16
- After building your library with `ng build my-lib`, go to the dist folder `cd dist/my-lib` and run `npm publish`.
17
-
18
- ## Running unit tests
19
-
20
- Run `ng test my-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
-
22
- ## Further help
23
-
24
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
1
+ # MyLib
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project my-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project my-lib`.
8
+ > Note: Don't forget to add `--project my-lib` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build my-lib` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build my-lib`, go to the dist folder `cd dist/my-lib` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test my-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Further help
23
+
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.