tnp-helpers 16.444.16 → 16.444.19

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 (99) hide show
  1. package/assets/shared/shared_folder_info.txt +1 -1
  2. package/browser/esm2022/lib/base/base-git.mjs +620 -0
  3. package/browser/esm2022/lib/base/base-library-build.mjs +380 -0
  4. package/browser/esm2022/lib/base/base-linked-projects.mjs +291 -0
  5. package/browser/esm2022/lib/base/base-npm-helpers.mjs +324 -0
  6. package/browser/esm2022/lib/base/base-project-resolver.mjs +56 -2
  7. package/browser/esm2022/lib/base/base-project.mjs +183 -1483
  8. package/browser/esm2022/lib/base/core-project.mjs +5 -3
  9. package/browser/esm2022/lib/base/index.mjs +5 -1
  10. package/browser/esm2022/lib/models.mjs +2 -1
  11. package/browser/fesm2022/tnp-helpers.mjs +1112 -749
  12. package/browser/fesm2022/tnp-helpers.mjs.map +1 -1
  13. package/browser/lib/base/base-git.d.ts +115 -0
  14. package/browser/lib/base/base-library-build.d.ts +46 -0
  15. package/browser/lib/base/base-linked-projects.d.ts +23 -0
  16. package/browser/lib/base/base-npm-helpers.d.ts +79 -0
  17. package/browser/lib/base/base-project-resolver.d.ts +2 -1
  18. package/browser/lib/base/base-project.d.ts +12 -205
  19. package/browser/lib/base/core-project.d.ts +12 -3
  20. package/browser/lib/base/index.d.ts +4 -0
  21. package/browser/lib/models.d.ts +12 -4
  22. package/client/esm2022/lib/base/base-git.mjs +620 -0
  23. package/client/esm2022/lib/base/base-library-build.mjs +380 -0
  24. package/client/esm2022/lib/base/base-linked-projects.mjs +291 -0
  25. package/client/esm2022/lib/base/base-npm-helpers.mjs +324 -0
  26. package/client/esm2022/lib/base/base-project-resolver.mjs +56 -2
  27. package/client/esm2022/lib/base/base-project.mjs +183 -1483
  28. package/client/esm2022/lib/base/core-project.mjs +5 -3
  29. package/client/esm2022/lib/base/index.mjs +5 -1
  30. package/client/esm2022/lib/models.mjs +2 -1
  31. package/client/fesm2022/tnp-helpers.mjs +1112 -749
  32. package/client/fesm2022/tnp-helpers.mjs.map +1 -1
  33. package/client/lib/base/base-git.d.ts +115 -0
  34. package/client/lib/base/base-library-build.d.ts +46 -0
  35. package/client/lib/base/base-linked-projects.d.ts +23 -0
  36. package/client/lib/base/base-npm-helpers.d.ts +79 -0
  37. package/client/lib/base/base-project-resolver.d.ts +2 -1
  38. package/client/lib/base/base-project.d.ts +12 -205
  39. package/client/lib/base/core-project.d.ts +12 -3
  40. package/client/lib/base/index.d.ts +4 -0
  41. package/client/lib/models.d.ts +12 -4
  42. package/client/package.json +21 -21
  43. package/lib/base/base-command-line.backend.d.ts +5 -0
  44. package/lib/base/base-command-line.backend.js +70 -15
  45. package/lib/base/base-command-line.backend.js.map +1 -1
  46. package/lib/base/base-git.d.ts +121 -0
  47. package/lib/base/base-git.js +862 -0
  48. package/lib/base/base-git.js.map +1 -0
  49. package/lib/base/base-library-build.d.ts +56 -0
  50. package/lib/base/base-library-build.js +443 -0
  51. package/lib/base/base-library-build.js.map +1 -0
  52. package/lib/base/base-linked-projects.d.ts +23 -0
  53. package/lib/base/base-linked-projects.js +391 -0
  54. package/lib/base/base-linked-projects.js.map +1 -0
  55. package/lib/base/base-npm-helpers.d.ts +78 -0
  56. package/lib/base/base-npm-helpers.js +404 -0
  57. package/lib/base/base-npm-helpers.js.map +1 -0
  58. package/lib/base/base-project-resolver.d.ts +2 -1
  59. package/lib/base/base-project-resolver.js +39 -4
  60. package/lib/base/base-project-resolver.js.map +1 -1
  61. package/lib/base/base-project.d.ts +14 -214
  62. package/lib/base/base-project.js +106 -1740
  63. package/lib/base/base-project.js.map +1 -1
  64. package/lib/base/core-project.d.ts +12 -3
  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 +3 -1
  71. package/lib/helpers/for-backend/helpers-git.backend.js +74 -2
  72. package/lib/helpers/for-backend/helpers-git.backend.js.map +1 -1
  73. package/lib/helpers/for-browser/angular.helper.js +3 -3
  74. package/lib/models.d.ts +12 -4
  75. package/lib/old/base-component.js +3 -3
  76. package/lib/old/base-formly-component.js +3 -3
  77. package/lib/old/dual-component-ctrl.js +3 -3
  78. package/package.json +4 -4
  79. package/tmp-environment.json +25 -25
  80. package/websql/esm2022/lib/base/base-git.mjs +620 -0
  81. package/websql/esm2022/lib/base/base-library-build.mjs +380 -0
  82. package/websql/esm2022/lib/base/base-linked-projects.mjs +291 -0
  83. package/websql/esm2022/lib/base/base-npm-helpers.mjs +324 -0
  84. package/websql/esm2022/lib/base/base-project-resolver.mjs +50 -2
  85. package/websql/esm2022/lib/base/base-project.mjs +236 -1536
  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 +1112 -754
  90. package/websql/fesm2022/tnp-helpers.mjs.map +1 -1
  91. package/websql/lib/base/base-git.d.ts +115 -0
  92. package/websql/lib/base/base-library-build.d.ts +46 -0
  93. package/websql/lib/base/base-linked-projects.d.ts +23 -0
  94. package/websql/lib/base/base-npm-helpers.d.ts +79 -0
  95. package/websql/lib/base/base-project-resolver.d.ts +2 -1
  96. package/websql/lib/base/base-project.d.ts +9 -205
  97. package/websql/lib/base/core-project.d.ts +12 -3
  98. package/websql/lib/base/index.d.ts +4 -0
  99. package/websql/lib/models.d.ts +12 -4
@@ -0,0 +1,115 @@
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
+ setOrigin?: 'ssh' | 'http';
106
+ exitCallBack?: () => void;
107
+ forcePushNoQuestion?: boolean;
108
+ commitMessageRequired?: boolean;
109
+ skipChildren?: boolean;
110
+ }): Promise<any>;
111
+ _beforeAnyActionOnGitRoot(): any;
112
+ protected _beforePushProcessAction(): Promise<any>;
113
+ protected _beforePullProcessAction(cloneChildren?: boolean): Promise<any>;
114
+ protected _getCommitMessage(typeofCommit: TypeOfCommit, args: string[], commitMessageRequired?: boolean): Promise<CommitData>;
115
+ }
@@ -0,0 +1,46 @@
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 abstract class BaseLibraryBuild<PROJCET extends BaseProject = any> extends BaseFeatureForProject {
9
+ private cache;
10
+ protected sortByDeps(libraries: PROJCET[]): PROJCET[];
11
+ /**
12
+ * Use cases:
13
+ * 1. build all libraries in normal mode
14
+ * 2. build all libraries in watch mode
15
+ * 3. build selected libraries in normal mode
16
+ * (with first time all libraries will be build)
17
+ * 4. build selected libraries in watch mode
18
+ * (use normal build for not selected libraries)
19
+ * 5. build selected libraries in watch mode
20
+ * (skip normal build for not selected libraries)
21
+ */
22
+ selectAndSaveLibraries({ libs, watch, watchBuildSupported, }: {
23
+ libs: PROJCET[];
24
+ watch: boolean;
25
+ watchBuildSupported?: boolean;
26
+ }): Promise<{
27
+ selectedLibs: PROJCET[];
28
+ skipRebuildingAllForWatch: boolean;
29
+ }>;
30
+ /**
31
+ * angular libraries from angular.json
32
+ */
33
+ get libraries(): PROJCET[];
34
+ selectLibraries({ watch, watchBuildSupported, }: {
35
+ watch: boolean;
36
+ watchBuildSupported?: boolean;
37
+ }): Promise<any>;
38
+ /**
39
+ * Angular library build
40
+ */
41
+ buildLibraries({ watch, strategy, buildType, }?: LibrariesBuildOptions & {
42
+ watch: boolean;
43
+ }): Promise<void>;
44
+ getLibraryBuildComamnd(options?: LibraryBuildCommandOptions): string | undefined;
45
+ get getLibraryBuildSuccessComamnd(): string;
46
+ }
@@ -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,79 @@
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
+ useYarn?: boolean;
59
+ force?: boolean;
60
+ }): Promise<void>;
61
+ deleteNodeModules(): void;
62
+ reinstallNodeModules(forcerRemoveNodeModules?: boolean): Promise<any>;
63
+ reinstalNodeModules(options?: {
64
+ useYarn?: boolean;
65
+ force?: boolean;
66
+ }): any;
67
+ /**
68
+ * @returns true if node_modules folder is empty
69
+ */
70
+ get emptyNodeModules(): any;
71
+ resetPackageLockJson(): Promise<any>;
72
+ startNpmTask(taskName: string, additionalArguments?: string | object): {
73
+ sync(): any;
74
+ async(detach?: boolean, mockFun?: (stdoutCallback: (dataForStdout: any) => any, stdErrcCallback: (dataForStder: any) => any, shouldProcesBeDead?: () => boolean) => number | Promise<number>): import("child_process").ChildProcess;
75
+ asyncAsPromise(): Promise<void>;
76
+ unitlOutputContains(stdoutMsg: string | string[], stderMsg?: string | string[], timeout?: number, stdoutOutputContainsCallback?: () => any): any;
77
+ };
78
+ prepareCommand(optiosn?: CoreModels.NpmInstallOptions): Promise<string>;
79
+ }
@@ -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
  */
@@ -151,6 +87,9 @@ export declare abstract class BaseProject<PROJCET extends BaseProject = any, TYP
151
87
  * use output from or more preciese crafted api
152
88
  */
153
89
  run(command: string, options?: Omit<CoreModels.RunOptions, 'cwd'>): {
90
+ /**
91
+ * name from package.json
92
+ */
154
93
  sync(): any;
155
94
  async(detach?: boolean, mockFun?: (stdoutCallback: (dataForStdout: any) => any, stdErrcCallback: (dataForStder: any) => any, shouldProcesBeDead?: () => boolean) => number | Promise<number>): import("child_process").ChildProcess;
156
95
  asyncAsPromise(): Promise<void>;
@@ -175,8 +114,6 @@ export declare abstract class BaseProject<PROJCET extends BaseProject = any, TYP
175
114
  readJson<T = {}>(fileRelativeToProjectPath: string): T;
176
115
  remove(relativePath: string, exactPath?: boolean): void;
177
116
  removeFolderByRelativePath(relativePathToFolder: string): void;
178
- linkNodeModulesTo(proj: Partial<BaseProject>): any;
179
- reinstallNodeModules(forcerRemoveNodeModules?: boolean): any;
180
117
  assignFreePort(startFrom?: number, howManyFreePortsAfterThatPort?: number): Promise<number>;
181
118
  removeItself(): void;
182
119
  /**
@@ -204,98 +141,10 @@ export declare abstract class BaseProject<PROJCET extends BaseProject = any, TYP
204
141
  getMainBranches(): string[];
205
142
  isUnsingActionCommit(): boolean;
206
143
  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
144
  linkTo(destPackageLocation: string): void;
223
145
  writeFile(relativePath: string, content: string): void;
224
146
  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
147
  toString: () => string;
298
- protected checkIfLogginInToNpm(): any;
299
148
  get parentsNames(): any;
300
149
  openLocation(relativeFolderPath: string): any;
301
150
  private findParentsNames;
@@ -324,46 +173,4 @@ export declare abstract class BaseProject<PROJCET extends BaseProject = any, TYP
324
173
  * get info about porject
325
174
  */
326
175
  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
176
  }
@@ -1,5 +1,6 @@
1
1
  // @ts-nocheck
2
2
  import type { BaseProject } from './base-project';
3
+ import { LibrariesBuildOptions } from '../index';
3
4
  export type CoreProjectEnvironment = {
4
5
  shortName?: string;
5
6
  name?: string;
@@ -14,12 +15,20 @@ export type CoreCommandArgOptions<PROJECT extends BaseProject> = {
14
15
  watch?: boolean;
15
16
  prod?: boolean;
16
17
  debug?: boolean;
18
+ libraryBuildOptions?: LibrariesBuildOptions;
17
19
  /**
18
20
  * first arg from command line
19
21
  */
20
- firstArg?: string;
21
- argsWithParams?: string;
22
- exitCallback?: () => void;
22
+ firstArg: string;
23
+ /**
24
+ * orignal args with params
25
+ */
26
+ argsWithParams: string;
27
+ /**
28
+ * args from command line (clearn from params)
29
+ */
30
+ args: string[];
31
+ exitCallback: () => void;
23
32
  };
24
33
  export declare class CoreProject<PROJECT extends BaseProject = BaseProject> {
25
34
  static coreProjects: CoreProject<any>[];
@@ -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,22 @@ 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
+ strategy?: 'link' | 'copy';
26
+ buildType: core.CoreModels.LibraryType;
19
27
  };