@travetto/repo 3.4.4 → 3.4.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/repo",
3
- "version": "3.4.4",
3
+ "version": "3.4.6",
4
4
  "description": "Monorepo utilities",
5
5
  "keywords": [
6
6
  "travetto",
@@ -22,7 +22,7 @@
22
22
  "directory": "module/repo"
23
23
  },
24
24
  "dependencies": {
25
- "@travetto/cli": "^3.4.4",
25
+ "@travetto/cli": "^3.4.6",
26
26
  "@travetto/worker": "^3.4.1"
27
27
  },
28
28
  "peerDependenciesMeta": {
@@ -1,7 +1,8 @@
1
- import { CliCommand, CliCommandShape } from '@travetto/cli';
1
+ import { CliCommand, CliCommandShape, CliParseUtil } from '@travetto/cli';
2
2
  import { WorkPool } from '@travetto/worker';
3
- import { ExecUtil, EnvInit } from '@travetto/base';
3
+ import { ExecUtil, defineEnv } from '@travetto/base';
4
4
  import { Max, Min } from '@travetto/schema';
5
+
5
6
  import { RepoExecUtil } from './bin/exec';
6
7
 
7
8
  /**
@@ -10,8 +11,6 @@ import { RepoExecUtil } from './bin/exec';
10
11
  @CliCommand()
11
12
  export class RepoExecCommand implements CliCommandShape {
12
13
 
13
- #unknownArgs?: string[];
14
-
15
14
  /** Only changed modules */
16
15
  changed = false;
17
16
 
@@ -25,16 +24,12 @@ export class RepoExecCommand implements CliCommandShape {
25
24
  /** Show stdout */
26
25
  showStdout = true;
27
26
 
28
- envInit(): EnvInit {
29
- return { debug: false };
30
- }
31
-
32
- finalize(unknownArgs?: string[] | undefined): void | Promise<void> {
33
- this.#unknownArgs = unknownArgs;
27
+ preMain(): void {
28
+ defineEnv({ debug: false });
34
29
  }
35
30
 
36
31
  async main(cmd: string, args: string[] = []): Promise<void> {
37
- const finalArgs = [...args, ...this.#unknownArgs ?? []];
32
+ const finalArgs = [...args, ...CliParseUtil.getState(this)?.unknown ?? []];
38
33
 
39
34
  await RepoExecUtil.execOnModules(
40
35
  this.changed ? 'changed' : 'all',
@@ -25,7 +25,7 @@ export class RepoVersionCommand implements CliCommandShape {
25
25
  */
26
26
  modules?: string[];
27
27
 
28
- async validate(...args: unknown[]): Promise<CliValidationError | undefined> {
28
+ async validate(): Promise<CliValidationError | undefined> {
29
29
  if (!this.force && await CliScmUtil.isWorkspaceDirty()) {
30
30
  return { message: 'Cannot update versions with uncommitted changes' };
31
31
  }