rman 1.3.0 → 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 +140 -19
  40. package/core/config.js +258 -74
  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 +137 -92
  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 -44
  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 +725 -202
  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
@@ -1,44 +1,88 @@
1
1
  import colors from 'ansi-colors';
2
+ import { registerCommand } from '../interfaces/rman-config.interface.js';
2
3
  import { ChangeHashService } from '../services/change-hash.service.js';
3
- import { ChangelogService } from '../services/changelog.service.js';
4
4
  import { Logger, resolveRootLogLevel } from '../utils/logger.js';
5
- import { applyPackageFilterOptions, applyRootOption, readPackageFilterOptions } from '../utils/package-filter.js';
6
- export function initCli(repository, program) {
7
- program.command({
8
- command: 'changelog',
9
- configKeys: ['changelog', 'publish.skip'],
5
+ import { fromRootOption, packageFilterOptions, readPackageFilterOptions } from '../utils/package-filter.js';
6
+ const COMMAND = 'changelog';
7
+ const config = {
8
+ ...packageFilterOptions,
9
+ ...fromRootOption('Generate'),
10
+ from: {
11
+ target: 'cli',
12
+ describe: 'Generate the changelog since this commit/hash, applied the same way to every package. ' +
13
+ 'Default (also "auto" explicitly): auto-detect per package from its own most recent release ' +
14
+ 'tag - same as "version"/"changed" - falling back to the version its own ecosystem\'s ' +
15
+ "registry reports (no tag yet), then to its whole history for a package that's never been " +
16
+ 'released at all',
17
+ type: 'string',
18
+ },
19
+ write: {
20
+ target: 'cli',
21
+ describe: "Prepend the entry into each package's own changelog file instead of printing it",
22
+ type: 'boolean',
23
+ },
24
+ /** The one option here that is also a config key - hence `'both'`, and hence this command
25
+ * contributing `changelog.filePath` to `RmanConfig`. */
26
+ filePath: {
27
+ target: 'both',
28
+ cliName: 'file-path',
29
+ describe: "With --write, the file to prepend into, relative to each package's own directory " +
30
+ '(default: "CHANGELOG.md", or .rmanrc "changelog.filePath")',
31
+ type: 'string',
32
+ },
33
+ includeSkipped: {
34
+ target: 'cli',
35
+ cliName: 'include-skipped',
36
+ describe: 'Also generate for a package with .rmanrc "publish.skip" - excluded by default',
37
+ type: 'boolean',
38
+ },
39
+ releaseVersion: {
40
+ target: 'cli',
41
+ cliName: 'release-version',
42
+ describe: 'The version these notes are for - what the entry heading shows. Default: read back from ' +
43
+ "each package's own latest release tag, which is only right once that release is tagged. " +
44
+ 'Pass it when generating notes ahead of the bump (e.g. from "changed --json" in CI), ' +
45
+ 'otherwise the heading shows the previous release.',
46
+ type: 'string',
47
+ },
48
+ /**
49
+ * Config-only, from here down - `.rmanrc "changelog.*"` keys with no reason to be a flag. All
50
+ * three are plain strings or a string list, so this command needs no `Extra` at all: its whole
51
+ * config block is derived from what is declared here.
52
+ */
53
+ ignoreTypes: {
54
+ target: 'config',
55
+ describe: 'Conventional-commit types to leave out of the notes entirely (e.g. ["chore", "ci"])',
56
+ type: 'string',
57
+ array: true,
58
+ },
59
+ template: {
60
+ target: 'config',
61
+ describe: "Path to a template file for one package's entry, relative to the repository root. Its own " +
62
+ "{{package}}/{{version}} placeholders are that file's content, not config expressions.",
63
+ type: 'string',
64
+ },
65
+ tagPattern: {
66
+ target: 'config',
67
+ describe: "The release tag naming scheme each package's changelog boundary is detected from - " +
68
+ '"{name}" is replaced with the package name (e.g. "{name}@*" for independent versioning). ' +
69
+ 'Default "v*", one repo-wide tag resolved through git describe.',
70
+ type: 'string',
71
+ },
72
+ };
73
+ const changelogCommand = registerCommand(app => {
74
+ const repository = app.repository;
75
+ return {
76
+ command: COMMAND,
10
77
  describe: 'Generates a changelog per package from unreleased commits',
11
- builder: cmd => applyRootOption(applyPackageFilterOptions(cmd), 'Generate')
12
- .example('$0 changelog', "# Auto-detects each package's own last release tag (or npm version)")
13
- .example('$0 changelog --from <hash> --write', '# Since a specific commit, written to file')
14
- .option('from', {
15
- describe: 'Generate the changelog since this commit/hash, applied the same way to every package. ' +
16
- 'Default (also "auto" explicitly): auto-detect per package from its own most recent release ' +
17
- 'tag - same as "version"/"changed" - falling back to the version its own ecosystem\'s ' +
18
- "registry reports (no tag yet), then to its whole history for a package that's never been " +
19
- 'released at all',
20
- type: 'string',
21
- })
22
- .option('write', {
23
- describe: "Prepend the entry into each package's own changelog file instead of printing it",
24
- type: 'boolean',
25
- })
26
- .option('file-path', {
27
- describe: "With --write, the file to prepend into, relative to each package's own directory " +
28
- '(default: "CHANGELOG.md", or .rmanrc "changelog.filePath")',
29
- type: 'string',
30
- })
31
- .option('include-skipped', {
32
- describe: 'Also generate for a package with .rmanrc "publish.skip" - excluded by default',
33
- type: 'boolean',
34
- })
35
- .option('release-version', {
36
- describe: 'The version these notes are for - what the entry heading shows. Default: read back from ' +
37
- "each package's own latest release tag, which is only right once that release is tagged. " +
38
- 'Pass it when generating notes ahead of the bump (e.g. from "changed --json" in CI), ' +
39
- 'otherwise the heading shows the previous release.',
40
- type: 'string',
41
- }),
78
+ /** Read, not owned: `publish.skip` is `publish`'s key, reused here on purpose - a package that is
79
+ * never distributed gets no release notes either. */
80
+ configKeys: ['publish.skip'],
81
+ config,
82
+ examples: [
83
+ { command: '$0 changelog', description: "# Auto-detects each package's own last release tag (or npm version)" },
84
+ { command: '$0 changelog --from <hash> --write', description: '# Since a specific commit, written to file' },
85
+ ],
42
86
  handler: async (args) => {
43
87
  const from = args.from;
44
88
  const write = args.write;
@@ -54,13 +98,12 @@ export function initCli(repository, program) {
54
98
  ...readPackageFilterOptions(args),
55
99
  from,
56
100
  filePath: args.filePath,
57
- root: args.root,
101
+ fromRoot: args.fromRoot,
58
102
  includeSkipped: args.includeSkipped,
59
103
  version: args.releaseVersion,
60
104
  };
61
- const entries = args.write
62
- ? await ChangelogService.generateToFile(repository, options)
63
- : await ChangelogService.getEntries(repository, options);
105
+ const changelog = app.getService('changelog');
106
+ const entries = write ? await changelog.generateToFile(options) : await changelog.getEntries(options);
64
107
  if (!entries.length) {
65
108
  logger.info(colors.gray('No unreleased changes.'));
66
109
  return;
@@ -72,5 +115,6 @@ export function initCli(repository, program) {
72
115
  console.log(entry.content);
73
116
  }
74
117
  },
75
- });
76
- }
118
+ };
119
+ });
120
+ export default changelogCommand;
@@ -1,3 +1,44 @@
1
- import type { Argv } from 'yargs';
2
- import type { Repository } from '../core/repository.js';
3
- export declare function initCli(repository: Repository, program: Argv): void;
1
+ import { type RmanConfig } from '../interfaces/rman-config.interface.js';
2
+ declare const COMMAND: "config";
3
+ declare const config: {
4
+ json: {
5
+ target: "cli";
6
+ describe: string;
7
+ type: "boolean";
8
+ default: boolean;
9
+ };
10
+ fromRoot: {
11
+ target: "cli";
12
+ cliName: string;
13
+ alias: string;
14
+ describe: string;
15
+ type: "boolean";
16
+ };
17
+ };
18
+ type Args = RmanConfig.ArgsOf<typeof config, typeof COMMAND>;
19
+ /** Prints config; declares none of its own, so it contributes nothing to `RmanConfig`. */
20
+ declare const configCommand: (app: import("../index.js").RmanApplication) => {
21
+ command: "config";
22
+ describe: string;
23
+ config: {
24
+ json: {
25
+ target: "cli";
26
+ describe: string;
27
+ type: "boolean";
28
+ default: boolean;
29
+ };
30
+ fromRoot: {
31
+ target: "cli";
32
+ cliName: string;
33
+ alias: string;
34
+ describe: string;
35
+ type: "boolean";
36
+ };
37
+ };
38
+ examples: {
39
+ command: string;
40
+ description: string;
41
+ }[];
42
+ handler: (args: Args) => void;
43
+ };
44
+ export default configCommand;
@@ -2,23 +2,33 @@ import path from 'node:path';
2
2
  import colors from 'ansi-colors';
3
3
  import * as yaml from 'js-yaml';
4
4
  import { DEFERRED_PATHS } from '../core/config.js';
5
- import { applyRootOption, readRootOption } from '../utils/package-filter.js';
5
+ import { registerCommand } from '../interfaces/rman-config.interface.js';
6
+ import { fromRootOption, readFromRootOption } from '../utils/package-filter.js';
6
7
  import { printableConfig } from '../utils/printable-config.js';
7
- export function initCli(repository, program) {
8
- program.command({
9
- command: 'config',
8
+ const COMMAND = 'config';
9
+ const config = {
10
+ ...fromRootOption('Print the config for'),
11
+ json: {
12
+ target: 'cli',
13
+ describe: 'Print as JSON instead of YAML - nothing else on stdout, so it can be piped.',
14
+ type: 'boolean',
15
+ default: false,
16
+ },
17
+ };
18
+ /** Prints config; declares none of its own, so it contributes nothing to `RmanConfig`. */
19
+ const configCommand = registerCommand(app => {
20
+ const repository = app.repository;
21
+ return {
22
+ command: COMMAND,
10
23
  describe: 'Prints the effective .rmanrc config for the package of the current directory',
11
- builder: cmd => applyRootOption(cmd, 'Print the config for')
12
- .example('$0 config', '# The config of the package you are standing in')
13
- .example('$0 config --root', "# The repository root's own config instead")
14
- .example('$0 config --json | jq .version', '# Machine-readable')
15
- .option('json', {
16
- describe: 'Print as JSON instead of YAML - nothing else on stdout, so it can be piped.',
17
- type: 'boolean',
18
- default: false,
19
- }),
20
- handler: args => {
21
- const target = (!readRootOption(args) && repository.currentPackage) || repository.rootPackage;
24
+ config,
25
+ examples: [
26
+ { command: '$0 config', description: '# The config of the package you are standing in' },
27
+ { command: '$0 config --from-root', description: "# The repository root's own config instead" },
28
+ { command: '$0 config --json | jq .version', description: '# Machine-readable' },
29
+ ],
30
+ handler: (args) => {
31
+ const target = (!readFromRootOption(args) && repository.currentPackage) || repository.rootPackage;
22
32
  if (args.json) {
23
33
  console.log(JSON.stringify(printableConfig(target.config), undefined, 2));
24
34
  return;
@@ -41,8 +51,9 @@ export function initCli(repository, program) {
41
51
  * as a mistake in something meant to be looked at. */
42
52
  console.log(yaml.dump(printableConfig(target.config), { noRefs: true, lineWidth: 100 }).trimEnd());
43
53
  },
44
- });
45
- }
54
+ };
55
+ });
56
+ export default configCommand;
46
57
  /**
47
58
  * The one honest caveat about this output: **`version.before`/`.exec`/`.after` are printed raw**,
48
59
  * expressions and all, because they are the paths in `DEFERRED_PATHS` - `${{ pkg.targetVersion }}`
@@ -56,6 +67,6 @@ function deferredNotes(pkg) {
56
67
  return [];
57
68
  return [`${raw.join(', ')}: printed raw - evaluated by "version" itself, once it knows the target version`];
58
69
  }
59
- function valueAt(config, dotted) {
60
- return dotted.split('.').reduce((node, key) => (node == null ? undefined : node[key]), config);
70
+ function valueAt(node, dotted) {
71
+ return dotted.split('.').reduce((current, key) => (current == null ? undefined : current[key]), node);
61
72
  }
@@ -1,3 +1,37 @@
1
- import type { Argv } from 'yargs';
2
- import type { Repository } from '../core/repository.js';
3
- export declare function initCli(repository: Repository, program: Argv): void;
1
+ import { type RmanConfig } from '../interfaces/rman-config.interface.js';
2
+ declare const COMMAND: "diff [package]";
3
+ declare const config: {
4
+ fromRoot: {
5
+ target: "cli";
6
+ cliName: string;
7
+ alias: string;
8
+ describe: string;
9
+ type: "boolean";
10
+ };
11
+ };
12
+ type Args = RmanConfig.ArgsOf<typeof config, typeof COMMAND>;
13
+ declare const diffCommand: (app: import("../index.js").RmanApplication) => {
14
+ command: "diff [package]";
15
+ describe: string;
16
+ config: {
17
+ fromRoot: {
18
+ target: "cli";
19
+ cliName: string;
20
+ alias: string;
21
+ describe: string;
22
+ type: "boolean";
23
+ };
24
+ };
25
+ positionals: {
26
+ package: {
27
+ describe: string;
28
+ type: "string";
29
+ };
30
+ };
31
+ examples: {
32
+ command: string;
33
+ description: string;
34
+ }[];
35
+ handler: (args: Args) => Promise<void>;
36
+ };
37
+ export default diffCommand;
@@ -1,21 +1,29 @@
1
1
  import path from 'node:path';
2
2
  import colors from 'ansi-colors';
3
+ import { registerCommand } from '../interfaces/rman-config.interface.js';
3
4
  import { ChangeHashService } from '../services/change-hash.service.js';
4
5
  import { GitHelper } from '../utils/git.js';
5
- import { applyRootOption, readRootOption } from '../utils/package-filter.js';
6
- export function initCli(repository, program) {
7
- program.command({
8
- command: 'diff [package]',
6
+ import { fromRootOption, readFromRootOption } from '../utils/package-filter.js';
7
+ const COMMAND = 'diff [package]';
8
+ const config = fromRootOption('Diff');
9
+ const diffCommand = registerCommand(app => {
10
+ const repository = app.repository;
11
+ return {
12
+ command: COMMAND,
9
13
  describe: "Shows the git diff since a package's (or the whole repository's) last release tag",
10
- builder: cmd => applyRootOption(cmd, 'Diff')
11
- .example('$0 diff', "# Since the repository's own last tag")
12
- .example('$0 diff pkg-a', "# Since pkg-a's own last tag, scoped to its directory")
13
- .example('$0 diff --root', '# The whole repository, from inside a package')
14
- .positional('package', {
15
- describe: 'Package name - diffs just that package, since its own last tag. Omit to diff the whole ' +
16
- "repository since its own last tag (or the current directory's package, if standing inside one).",
17
- type: 'string',
18
- }),
14
+ config,
15
+ positionals: {
16
+ package: {
17
+ describe: 'Package name - diffs just that package, since its own last tag. Omit to diff the whole ' +
18
+ "repository since its own last tag (or the current directory's package, if standing inside one).",
19
+ type: 'string',
20
+ },
21
+ },
22
+ examples: [
23
+ { command: '$0 diff', description: "# Since the repository's own last tag" },
24
+ { command: '$0 diff pkg-a', description: "# Since pkg-a's own last tag, scoped to its directory" },
25
+ { command: '$0 diff --from-root', description: '# The whole repository, from inside a package' },
26
+ ],
19
27
  handler: async (args) => {
20
28
  const git = new GitHelper({ cwd: repository.dirname });
21
29
  const packageName = args.package;
@@ -33,7 +41,7 @@ export function initCli(repository, program) {
33
41
  target = pkg;
34
42
  pathspec = path.relative(repository.dirname, pkg.dirname);
35
43
  }
36
- else if (!readRootOption(args) && repository.currentPackage) {
44
+ else if (!readFromRootOption(args) && repository.currentPackage) {
37
45
  /** The measured gap this closes: `diff` narrowed to the current package like `run` and
38
46
  * `changelog` do, but offered no way to say "the whole repository" without naming a
39
47
  * package - and no package name means the repository, so there was nothing to type. */
@@ -52,5 +60,6 @@ export function initCli(repository, program) {
52
60
  }
53
61
  console.log(text);
54
62
  },
55
- });
56
- }
63
+ };
64
+ });
65
+ export default diffCommand;
@@ -1,3 +1,193 @@
1
- import type { Argv } from 'yargs';
2
- import type { Repository } from '../core/repository.js';
3
- export declare function initCli(repository: Repository, program: Argv): void;
1
+ import { type RmanConfig } from '../interfaces/rman-config.interface.js';
2
+ declare const COMMAND: "exec [command..]";
3
+ /**
4
+ * `runOptions` with three texts replaced - the override case the spread order exists for.
5
+ *
6
+ * `exec` takes the same scheduling flags as `run`, but not the same *explanations*: `run`'s mention
7
+ * `.rmanrc run.<script>.bail` and friends, and `exec` runs no script, so there is no such block to
8
+ * point at. The declarations are shared; only the sentences that would be untrue differ.
9
+ */
10
+ declare const config: {
11
+ bail: {
12
+ target: "cli";
13
+ describe: string;
14
+ type: "boolean";
15
+ };
16
+ topo: {
17
+ target: "cli";
18
+ describe: string;
19
+ type: "boolean";
20
+ };
21
+ progress: {
22
+ target: "cli";
23
+ describe: string;
24
+ type: "boolean";
25
+ };
26
+ parallel: {
27
+ target: "cli";
28
+ describe: string;
29
+ coerce: (v: unknown) => boolean | number | undefined;
30
+ };
31
+ changed: {
32
+ target: "cli";
33
+ alias: string;
34
+ describe: string;
35
+ type: "boolean";
36
+ };
37
+ changedSince: {
38
+ target: "cli";
39
+ cliName: string;
40
+ describe: string;
41
+ type: "string";
42
+ conflicts: string;
43
+ };
44
+ fromRoot: {
45
+ target: "cli";
46
+ cliName: string;
47
+ alias: string;
48
+ describe: string;
49
+ type: "boolean";
50
+ };
51
+ allowBranch: {
52
+ target: "cli";
53
+ cliName: string;
54
+ describe: string;
55
+ type: "string";
56
+ };
57
+ ignoreBranch: {
58
+ target: "cli";
59
+ cliName: string;
60
+ describe: string;
61
+ type: "string";
62
+ };
63
+ scope: {
64
+ target: "cli";
65
+ describe: string;
66
+ type: "string";
67
+ };
68
+ ignore: {
69
+ target: "cli";
70
+ describe: string;
71
+ type: "string";
72
+ };
73
+ platform: {
74
+ target: "cli";
75
+ describe: string;
76
+ type: "string";
77
+ };
78
+ deps: {
79
+ target: "cli";
80
+ describe: string;
81
+ type: "boolean";
82
+ };
83
+ dependents: {
84
+ target: "cli";
85
+ describe: string;
86
+ type: "boolean";
87
+ };
88
+ };
89
+ type Args = RmanConfig.ArgsOf<typeof config, typeof COMMAND>;
90
+ declare const execCommand: (app: import("../index.js").RmanApplication) => {
91
+ command: "exec [command..]";
92
+ describe: string;
93
+ /**
94
+ * The two parser switches this command cannot work without: `populate--` keeps everything after
95
+ * `--` out of `exec`'s own options, and `unknown-options-as-args` passes the flags of the command
96
+ * being run through untouched.
97
+ */
98
+ parserConfiguration: {
99
+ 'populate--': true;
100
+ 'unknown-options-as-args': true;
101
+ };
102
+ config: {
103
+ bail: {
104
+ target: "cli";
105
+ describe: string;
106
+ type: "boolean";
107
+ };
108
+ topo: {
109
+ target: "cli";
110
+ describe: string;
111
+ type: "boolean";
112
+ };
113
+ progress: {
114
+ target: "cli";
115
+ describe: string;
116
+ type: "boolean";
117
+ };
118
+ parallel: {
119
+ target: "cli";
120
+ describe: string;
121
+ coerce: (v: unknown) => boolean | number | undefined;
122
+ };
123
+ changed: {
124
+ target: "cli";
125
+ alias: string;
126
+ describe: string;
127
+ type: "boolean";
128
+ };
129
+ changedSince: {
130
+ target: "cli";
131
+ cliName: string;
132
+ describe: string;
133
+ type: "string";
134
+ conflicts: string;
135
+ };
136
+ fromRoot: {
137
+ target: "cli";
138
+ cliName: string;
139
+ alias: string;
140
+ describe: string;
141
+ type: "boolean";
142
+ };
143
+ allowBranch: {
144
+ target: "cli";
145
+ cliName: string;
146
+ describe: string;
147
+ type: "string";
148
+ };
149
+ ignoreBranch: {
150
+ target: "cli";
151
+ cliName: string;
152
+ describe: string;
153
+ type: "string";
154
+ };
155
+ scope: {
156
+ target: "cli";
157
+ describe: string;
158
+ type: "string";
159
+ };
160
+ ignore: {
161
+ target: "cli";
162
+ describe: string;
163
+ type: "string";
164
+ };
165
+ platform: {
166
+ target: "cli";
167
+ describe: string;
168
+ type: "string";
169
+ };
170
+ deps: {
171
+ target: "cli";
172
+ describe: string;
173
+ type: "boolean";
174
+ };
175
+ dependents: {
176
+ target: "cli";
177
+ describe: string;
178
+ type: "boolean";
179
+ };
180
+ };
181
+ positionals: {
182
+ command: {
183
+ describe: string;
184
+ type: "string";
185
+ };
186
+ };
187
+ examples: {
188
+ command: string;
189
+ description: string;
190
+ }[];
191
+ handler: (args: Args) => Promise<void>;
192
+ };
193
+ export default execCommand;