rman 1.2.5 → 2.0.0-beta.2

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 (153) hide show
  1. package/README.md +63 -19
  2. package/cli.d.ts +5 -0
  3. package/cli.js +214 -88
  4. package/commands/build.command.d.ts +177 -3
  5. package/commands/build.command.js +20 -10
  6. package/commands/changed.command.d.ts +80 -3
  7. package/commands/changed.command.js +19 -12
  8. package/commands/changelog.command.d.ts +192 -3
  9. package/commands/changelog.command.js +87 -43
  10. package/commands/config.command.d.ts +44 -3
  11. package/commands/config.command.js +30 -19
  12. package/commands/diff.command.d.ts +37 -3
  13. package/commands/diff.command.js +25 -16
  14. package/commands/exec.command.d.ts +193 -3
  15. package/commands/exec.command.js +60 -58
  16. package/commands/github-release.command.d.ts +154 -3
  17. package/commands/github-release.command.js +67 -37
  18. package/commands/import.command.d.ts +36 -3
  19. package/commands/import.command.js +28 -20
  20. package/commands/info.command.d.ts +35 -7
  21. package/commands/info.command.js +36 -30
  22. package/commands/list.command.d.ts +163 -3
  23. package/commands/list.command.js +109 -71
  24. package/commands/publish.command.d.ts +231 -0
  25. package/commands/publish.command.js +304 -0
  26. package/commands/run.command.d.ts +186 -6
  27. package/commands/run.command.js +26 -72
  28. package/commands/test.command.d.ts +173 -3
  29. package/commands/test.command.js +16 -10
  30. package/commands/version.command.d.ts +317 -3
  31. package/commands/version.command.js +149 -69
  32. package/commands.d.ts +32 -0
  33. package/commands.js +28 -0
  34. package/constants.js +1 -1
  35. package/core/application.d.ts +116 -0
  36. package/core/application.js +143 -0
  37. package/core/command-builder.d.ts +14 -0
  38. package/core/command-builder.js +78 -0
  39. package/core/config.d.ts +180 -50
  40. package/core/config.js +332 -153
  41. package/core/core-services.d.ts +14 -0
  42. package/core/core-services.js +30 -0
  43. package/core/core-targets.d.ts +14 -0
  44. package/core/core-targets.js +16 -0
  45. package/core/custom-command.d.ts +42 -6
  46. package/core/custom-command.js +44 -17
  47. package/core/extends-config.d.ts +13 -5
  48. package/core/extends-config.js +52 -12
  49. package/core/load-config-module.d.ts +28 -0
  50. package/core/load-config-module.js +42 -0
  51. package/core/manifest.d.ts +47 -25
  52. package/core/manifest.js +51 -69
  53. package/core/merge-config.d.ts +33 -34
  54. package/core/merge-config.js +138 -93
  55. package/core/package.d.ts +145 -17
  56. package/core/package.js +128 -36
  57. package/core/plugin-loader.d.ts +65 -0
  58. package/core/plugin-loader.js +234 -0
  59. package/core/plugin.d.ts +135 -90
  60. package/core/plugin.js +70 -173
  61. package/core/publish-target.d.ts +124 -0
  62. package/core/publish-target.js +30 -0
  63. package/core/registry.d.ts +30 -0
  64. package/core/registry.js +47 -0
  65. package/core/repository.d.ts +72 -9
  66. package/core/repository.js +293 -43
  67. package/core/resolve-target.d.ts +1 -1
  68. package/core/resolve-target.js +1 -1
  69. package/core/service.d.ts +49 -0
  70. package/core/service.js +40 -0
  71. package/core/version-scheme.d.ts +23 -1
  72. package/core/version-scheme.js +29 -1
  73. package/core/workspace.d.ts +84 -33
  74. package/core/workspace.js +63 -22
  75. package/index.d.ts +111 -14
  76. package/index.js +85 -9
  77. package/interfaces/rman-config.interface.d.ts +739 -212
  78. package/interfaces/rman-config.interface.js +61 -1
  79. package/package.json +2 -1
  80. package/plugins/builtins.d.ts +44 -0
  81. package/plugins/builtins.js +33 -0
  82. package/plugins/detect.d.ts +78 -0
  83. package/plugins/detect.js +70 -0
  84. package/plugins/node/augmentation/rman.augmentation.d.ts +84 -0
  85. package/plugins/node/augmentation/rman.augmentation.js +1 -0
  86. package/plugins/node/augmentation/system-info.augmentation.d.ts +26 -0
  87. package/plugins/node/augmentation/system-info.augmentation.js +79 -0
  88. package/plugins/node/commands/ci.command.d.ts +131 -0
  89. package/plugins/node/commands/ci.command.js +59 -0
  90. package/plugins/node/commands/clean.command.d.ts +183 -0
  91. package/plugins/node/commands/clean.command.js +73 -0
  92. package/plugins/node/index.d.ts +29 -0
  93. package/plugins/node/index.js +40 -0
  94. package/plugins/node/node-config.interface.d.ts +77 -0
  95. package/plugins/node/node-config.interface.js +7 -0
  96. package/plugins/node/node-manifest.provider.d.ts +68 -0
  97. package/plugins/node/node-manifest.provider.js +125 -0
  98. package/plugins/node/node.platform.d.ts +53 -0
  99. package/plugins/node/node.platform.js +134 -0
  100. package/plugins/node/npm-publish-target.d.ts +73 -0
  101. package/plugins/node/npm-publish-target.js +96 -0
  102. package/plugins/node/services/ci.service.d.ts +47 -0
  103. package/plugins/node/services/ci.service.js +213 -0
  104. package/plugins/node/services/clean.service.d.ts +53 -0
  105. package/plugins/node/services/clean.service.js +237 -0
  106. package/plugins/node/services/publish.service.d.ts +114 -0
  107. package/plugins/node/services/publish.service.js +371 -0
  108. package/plugins/node/services/version-plan.service.d.ts +44 -0
  109. package/plugins/node/services/version-plan.service.js +58 -0
  110. package/plugins/node/utils/npm-view.d.ts +48 -0
  111. package/plugins/node/utils/npm-view.js +71 -0
  112. package/plugins/node/utils/workspace-range.d.ts +26 -0
  113. package/plugins/node/utils/workspace-range.js +28 -0
  114. package/services/change-hash.service.d.ts +2 -2
  115. package/services/change-hash.service.js +2 -2
  116. package/services/changelog.service.d.ts +62 -51
  117. package/services/changelog.service.js +14 -11
  118. package/services/docker-publish.service.d.ts +50 -29
  119. package/services/docker-publish.service.js +43 -20
  120. package/services/exec.service.d.ts +23 -12
  121. package/services/exec.service.js +14 -9
  122. package/services/github-release.service.d.ts +44 -33
  123. package/services/github-release.service.js +13 -10
  124. package/services/import.service.d.ts +25 -14
  125. package/services/import.service.js +9 -5
  126. package/services/list.service.d.ts +62 -10
  127. package/services/list.service.js +62 -15
  128. package/services/run.service.d.ts +22 -13
  129. package/services/run.service.js +262 -223
  130. package/services/version-plan.service.d.ts +27 -4
  131. package/services/version-plan.service.js +42 -15
  132. package/services/version.service.d.ts +31 -11
  133. package/services/version.service.js +29 -13
  134. package/targets/docker.target.d.ts +53 -0
  135. package/targets/docker.target.js +40 -0
  136. package/utils/bin-path.d.ts +6 -7
  137. package/utils/bin-path.js +7 -18
  138. package/utils/branch-guard.d.ts +29 -0
  139. package/utils/branch-guard.js +31 -0
  140. package/utils/exec.d.ts +10 -0
  141. package/utils/exec.js +1 -1
  142. package/utils/logger.d.ts +1 -1
  143. package/utils/logger.js +1 -1
  144. package/utils/package-filter.d.ts +127 -7
  145. package/utils/package-filter.js +197 -16
  146. package/utils/printable-config.d.ts +1 -1
  147. package/utils/printable-config.js +1 -1
  148. package/utils/run-bin.d.ts +10 -0
  149. package/utils/run-bin.js +1 -1
  150. package/utils/run-options.d.ts +97 -0
  151. package/utils/run-options.js +81 -0
  152. package/utils/version-stamp.d.ts +1 -1
  153. package/utils/version-stamp.js +1 -1
@@ -0,0 +1,81 @@
1
+ import { branchGuardOptions } from './branch-guard.js';
2
+ import { fromRootOption, packageFilterOptions, readPackageFilterOptions } from './package-filter.js';
3
+ /**
4
+ * Everything `run`, `build` and `test` accept - the package filter, the branch guard, `--from-root`, and
5
+ * the scheduling flags on top.
6
+ *
7
+ * **In `utils/` rather than in `run.command.ts`, which is where the `Argv` version lived.** `build`
8
+ * and `test` had to import it from a sibling command, which reads as a dependency between commands
9
+ * and is not one: they share a declaration, the way they already share `packageFilterOptions`.
10
+ *
11
+ * Every option is `target: 'cli'`. The `.rmanrc` half of these lives at `run.<script>.concurrency`,
12
+ * `.bail`, `.topo`, `.progress` - keyed by script name, so it is the one config shape that cannot be
13
+ * derived from a flat option map and stays hand-written in `RmanConfig`.
14
+ */
15
+ export const runOptions = {
16
+ ...packageFilterOptions,
17
+ ...branchGuardOptions,
18
+ ...fromRootOption('Run'),
19
+ parallel: {
20
+ target: 'cli',
21
+ describe: 'Max packages to build at once: omit/true for CPU count (or .rmanrc run.<script>.concurrency), ' +
22
+ 'a number for that many, false to run serially. Packages always build in dependency order.',
23
+ /** No `type`: the flag takes a boolean *or* a number, and `coerce` is what says so - which is
24
+ * also where `OptionValue` reads this option's type from. */
25
+ coerce: (v) => {
26
+ if (v === undefined)
27
+ return undefined;
28
+ if (v === 'false' || v === false)
29
+ return false;
30
+ if (v === 'true' || v === true)
31
+ return true;
32
+ const n = Number(v);
33
+ return Number.isFinite(n) ? n : true;
34
+ },
35
+ },
36
+ bail: {
37
+ target: 'cli',
38
+ describe: 'Stop on first failure (default: true, overridable per-package via .rmanrc run.<script>.bail)',
39
+ type: 'boolean',
40
+ },
41
+ topo: {
42
+ target: 'cli',
43
+ describe: 'Respect package dependency order: a package waits for its dependencies and is skipped if one ' +
44
+ 'fails. Set false for independent scripts (e.g. lint/test) - order becomes alphabetical and ' +
45
+ 'failures never skip other packages. Default: true, overridable per-package via .rmanrc run.<script>.topo.',
46
+ type: 'boolean',
47
+ },
48
+ progress: {
49
+ target: 'cli',
50
+ describe: 'Show a live progress panel (default: true; auto-disabled when not a TTY; .rmanrc run.<script>.progress)',
51
+ type: 'boolean',
52
+ },
53
+ changed: {
54
+ target: 'cli',
55
+ alias: 'c',
56
+ describe: 'Only run in packages that have changed since the last publish',
57
+ type: 'boolean',
58
+ },
59
+ changedSince: {
60
+ target: 'cli',
61
+ cliName: 'changed-since',
62
+ describe: 'Only run in packages that have changed since the given git commit/hash',
63
+ type: 'string',
64
+ /** Declared on the option rather than as a separate `.conflicts()` call - one place says what
65
+ * this flag is and what it cannot be combined with. */
66
+ conflicts: 'changed',
67
+ },
68
+ };
69
+ export function readRunOptions(args) {
70
+ return {
71
+ ...readPackageFilterOptions(args),
72
+ parallel: args.parallel,
73
+ topo: args.topo,
74
+ bail: args.bail,
75
+ progress: args.progress,
76
+ changed: args.changed,
77
+ changedSince: args.changedSince,
78
+ logLevel: args.logLevel,
79
+ fromRoot: args.fromRoot,
80
+ };
81
+ }
@@ -29,7 +29,7 @@ export declare function stampVersionLabel(content: string, version: string): str
29
29
  * ```
30
30
  *
31
31
  * **A helper, not a policy**: which shape a language declares a version in is
32
- * `ManifestProvider.stampVersion`'s answer, and this is the one most of them share, exported so
32
+ * `Plugin.stampVersion`'s answer, and this is the one most of them share, exported so
33
33
  * every provider need not re-derive the same regex. Measured, it reaches a Go `const version =
34
34
  * "…"`, a Gradle/TOML `version = "…"` and a JS/TS `const version = '…'`.
35
35
  *
@@ -51,7 +51,7 @@ export function stampVersionLabel(content, version) {
51
51
  * ```
52
52
  *
53
53
  * **A helper, not a policy**: which shape a language declares a version in is
54
- * `ManifestProvider.stampVersion`'s answer, and this is the one most of them share, exported so
54
+ * `Plugin.stampVersion`'s answer, and this is the one most of them share, exported so
55
55
  * every provider need not re-derive the same regex. Measured, it reaches a Go `const version =
56
56
  * "…"`, a Gradle/TOML `version = "…"` and a JS/TS `const version = '…'`.
57
57
  *