@travetto/repo 5.0.4 → 5.0.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/README.md CHANGED
@@ -167,8 +167,7 @@ module/rest-fastify
167
167
  module/rest-fastify-lambda
168
168
  module/rest-koa
169
169
  module/rest-koa-lambda
170
- module/rest-model
171
- module/rest-model-query
170
+ module/rest-rpc
172
171
  module/rest-session
173
172
  module/rest-upload
174
173
  module/runtime
@@ -268,8 +267,7 @@ global-test/model_rest-session <workspace-root>/global-test/model_rest-session
268
267
  module/rest-fastify-lambda <workspace-root>/module/rest-fastify-lambda
269
268
  module/rest-koa <workspace-root>/module/rest-koa
270
269
  module/rest-koa-lambda <workspace-root>/module/rest-koa-lambda
271
- module/rest-model <workspace-root>/module/rest-model
272
- module/rest-model-query <workspace-root>/module/rest-model-query
270
+ module/rest-rpc <workspace-root>/module/rest-rpc
273
271
  module/rest-session <workspace-root>/module/rest-session
274
272
  module/rest-upload <workspace-root>/module/rest-upload
275
273
  module/runtime <workspace-root>/module/runtime
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/repo",
3
- "version": "5.0.4",
3
+ "version": "5.0.6",
4
4
  "description": "Monorepo utilities",
5
5
  "keywords": [
6
6
  "travetto",
@@ -22,8 +22,8 @@
22
22
  "directory": "module/repo"
23
23
  },
24
24
  "dependencies": {
25
- "@travetto/cli": "^5.0.4",
26
- "@travetto/worker": "^5.0.4"
25
+ "@travetto/cli": "^5.0.6",
26
+ "@travetto/worker": "^5.0.6"
27
27
  },
28
28
  "peerDependenciesMeta": {
29
29
  "@travetto/cli": {
@@ -46,7 +46,7 @@ export class RepoExecUtil {
46
46
  * Run on all modules
47
47
  */
48
48
  static async execOnModules<T = ExecutionResult>(
49
- mode: 'all' | 'changed',
49
+ mode: 'all' | 'workspace' | 'changed',
50
50
  operation: (mod: IndexedModule) => ChildProcess,
51
51
  config: ModuleRunConfig<T> = {}
52
52
  ): Promise<Map<IndexedModule, T>> {
@@ -116,7 +116,7 @@ export class PackageManager {
116
116
  */
117
117
  static async synchronizeVersions(): Promise<Record<string, string>> {
118
118
  const versions: Record<string, string> = {};
119
- const folders = (await CliModuleUtil.findModules('all')).map(x => x.sourcePath);
119
+ const folders = (await CliModuleUtil.findModules('workspace')).map(x => x.sourcePath);
120
120
  const packages = folders.map(folder => {
121
121
  const pkg = PackageUtil.readPackage(folder, true);
122
122
  versions[pkg.name] = `^${pkg.version}`;
@@ -37,7 +37,7 @@ export class RepoExecCommand implements CliCommandShape {
37
37
  const finalArgs = [...args, ...this._parsed.unknown];
38
38
 
39
39
  await RepoExecUtil.execOnModules(
40
- this.changed ? 'changed' : 'all',
40
+ this.changed ? 'changed' : 'workspace',
41
41
  mod => spawn(cmd, finalArgs, {
42
42
  cwd: mod.sourceFolder,
43
43
  env: {
@@ -29,7 +29,7 @@ export class ListModuleCommand implements CliCommandShape {
29
29
 
30
30
  async main(): Promise<void> {
31
31
 
32
- const mods = await CliModuleUtil.findModules(this.changed ? 'changed' : 'all', this.fromHash, this.toHash);
32
+ const mods = await CliModuleUtil.findModules(this.changed ? 'changed' : 'workspace', this.fromHash, this.toHash);
33
33
  switch (this.format) {
34
34
  case 'list': {
35
35
  for (const mod of mods.map(x => x.sourceFolder).sort()) {
@@ -14,7 +14,7 @@ export class RepoPublishCommand implements CliCommandShape {
14
14
  dryRun = true;
15
15
 
16
16
  async main(): Promise<void> {
17
- const published = await RepoExecUtil.execOnModules('all', mod => PackageManager.isPublished(Runtime, mod), {
17
+ const published = await RepoExecUtil.execOnModules('workspace', mod => PackageManager.isPublished(Runtime, mod), {
18
18
  filter: mod => !!mod.workspace && !mod.internal,
19
19
  progressMessage: (mod) => `Checking published [%idx/%total] -- ${mod?.name}`,
20
20
  showStderr: false,
@@ -26,7 +26,7 @@ export class RepoPublishCommand implements CliCommandShape {
26
26
  }
27
27
 
28
28
  await RepoExecUtil.execOnModules(
29
- 'all', mod => PackageManager.publish(Runtime, mod, this.dryRun),
29
+ 'workspace', mod => PackageManager.publish(Runtime, mod, this.dryRun),
30
30
  {
31
31
  progressMessage: (mod) => `Published [%idx/%total] -- ${mod?.name}`,
32
32
  showStdout: false,
@@ -33,11 +33,11 @@ export class RepoVersionCommand implements CliCommandShape {
33
33
  }
34
34
 
35
35
  async main(level: SemverLevel, prefix?: string): Promise<void> {
36
- const mode = this.mode ?? CHANGE_LEVELS.has(level) ? 'changed' : 'all';
36
+ const mode = this.mode ?? CHANGE_LEVELS.has(level) ? 'changed' : 'workspace';
37
37
 
38
38
  this.tag ??= (level === 'minor' || level === 'major');
39
39
 
40
- const allModules = await CliModuleUtil.findModules(mode === 'changed' ? 'changed' : 'all');
40
+ const allModules = await CliModuleUtil.findModules(mode);
41
41
 
42
42
  const modules = allModules.filter(x => !x.internal && (this.mode !== 'direct' || this.modules?.includes(x.name)));
43
43