rman 1.3.0 → 2.0.0-beta.3
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 +65 -31
- package/builtins/platforms/node/augmentation/rmanrc.augmentation.d.ts +83 -0
- package/builtins/platforms/node/augmentation/system-info.augmentation.d.ts +26 -0
- package/builtins/platforms/node/augmentation/system-info.augmentation.js +79 -0
- package/builtins/platforms/node/commands/ci.command.d.ts +133 -0
- package/builtins/platforms/node/commands/ci.command.js +60 -0
- package/builtins/platforms/node/commands/clean.command.d.ts +185 -0
- package/builtins/platforms/node/commands/clean.command.js +74 -0
- package/builtins/platforms/node/index.d.ts +8 -0
- package/builtins/platforms/node/index.js +8 -0
- package/builtins/platforms/node/node-config.interface.d.ts +76 -0
- package/builtins/platforms/node/node-config.interface.js +7 -0
- package/builtins/platforms/node/node-manifest.provider.d.ts +68 -0
- package/builtins/platforms/node/node-manifest.provider.js +125 -0
- package/builtins/platforms/node/node.platform.d.ts +53 -0
- package/builtins/platforms/node/node.platform.js +134 -0
- package/builtins/platforms/node/services/ci.service.d.ts +47 -0
- package/builtins/platforms/node/services/ci.service.js +213 -0
- package/builtins/platforms/node/services/clean.service.d.ts +53 -0
- package/builtins/platforms/node/services/clean.service.js +237 -0
- package/builtins/platforms/node/services/publish.service.d.ts +114 -0
- package/builtins/platforms/node/services/publish.service.js +371 -0
- package/builtins/platforms/node/services/version-plan.service.d.ts +44 -0
- package/builtins/platforms/node/services/version-plan.service.js +58 -0
- package/builtins/platforms/node/utils/workspace-range.d.ts +26 -0
- package/builtins/platforms/node/utils/workspace-range.js +28 -0
- package/builtins/presets/index.d.ts +15 -0
- package/builtins/presets/index.js +57 -0
- package/builtins/presets/node.d.ts +16 -0
- package/builtins/presets/node.js +57 -0
- package/{services → builtins/publish-targets/docker}/docker-publish.service.d.ts +52 -31
- package/{services → builtins/publish-targets/docker}/docker-publish.service.js +49 -26
- package/builtins/publish-targets/docker/docker.target.d.ts +54 -0
- package/builtins/publish-targets/docker/docker.target.js +40 -0
- package/builtins/publish-targets/docker/index.d.ts +2 -0
- package/builtins/publish-targets/docker/index.js +2 -0
- package/builtins/publish-targets/npm/index.d.ts +2 -0
- package/builtins/publish-targets/npm/index.js +2 -0
- package/builtins/publish-targets/npm/npm-publish-target.d.ts +73 -0
- package/builtins/publish-targets/npm/npm-publish-target.js +95 -0
- package/builtins/publish-targets/npm/npm-view.d.ts +48 -0
- package/builtins/publish-targets/npm/npm-view.js +71 -0
- package/cli.d.ts +8 -0
- package/cli.js +228 -93
- package/commands/build.command.d.ts +177 -3
- package/commands/build.command.js +20 -10
- package/commands/changelog.command.d.ts +296 -3
- package/commands/changelog.command.js +127 -43
- package/commands/config.command.d.ts +44 -3
- package/commands/config.command.js +53 -24
- package/commands/diff.command.d.ts +37 -3
- package/commands/diff.command.js +25 -16
- package/commands/exec.command.d.ts +193 -3
- package/commands/exec.command.js +60 -58
- package/commands/github-release.command.d.ts +154 -3
- package/commands/github-release.command.js +67 -37
- package/commands/import.command.d.ts +36 -3
- package/commands/import.command.js +28 -20
- package/commands/info.command.d.ts +35 -7
- package/commands/info.command.js +36 -30
- package/commands/lint.command.d.ts +176 -0
- package/commands/lint.command.js +34 -0
- package/commands/list.command.d.ts +163 -3
- package/commands/list.command.js +109 -71
- package/commands/publish.command.d.ts +231 -0
- package/commands/publish.command.js +304 -0
- package/commands/run.command.d.ts +186 -6
- package/commands/run.command.js +26 -72
- package/commands/test.command.d.ts +173 -3
- package/commands/test.command.js +16 -10
- package/commands/version.command.d.ts +330 -3
- package/commands/version.command.js +292 -78
- package/commands.d.ts +32 -0
- package/commands.js +28 -0
- package/constants.js +1 -1
- package/core/application.d.ts +116 -0
- package/core/application.js +160 -0
- package/core/classes/package.d.ts +219 -0
- package/core/classes/package.js +214 -0
- package/core/classes/registry.d.ts +30 -0
- package/core/classes/registry.js +47 -0
- package/core/{repository.d.ts → classes/repository.d.ts} +69 -20
- package/core/{repository.js → classes/repository.js} +195 -75
- package/core/classes/service.d.ts +49 -0
- package/core/classes/service.js +40 -0
- package/core/{version-scheme.d.ts → classes/version-scheme.d.ts} +23 -1
- package/core/{version-scheme.js → classes/version-scheme.js} +29 -1
- package/core/classes/workspace.d.ts +275 -0
- package/core/classes/workspace.js +537 -0
- package/core/command-builder.d.ts +14 -0
- package/core/command-builder.js +94 -0
- package/core/config/config-file-scope.d.ts +107 -0
- package/core/config/config-file-scope.js +226 -0
- package/core/config/config-interpolator.d.ts +164 -0
- package/core/config/config-interpolator.js +577 -0
- package/core/config/config-paths.d.ts +65 -0
- package/core/config/config-paths.js +78 -0
- package/core/config/config-reader.d.ts +192 -0
- package/core/config/config-reader.js +727 -0
- package/core/{merge-config.d.ts → config/merge-config.d.ts} +33 -34
- package/core/config/merge-config.js +260 -0
- package/core/{resolve-target.d.ts → config/resolve-config-target.d.ts} +1 -1
- package/core/{resolve-target.js → config/resolve-config-target.js} +1 -1
- package/core/{custom-command.d.ts → interfaces/custom-command.d.ts} +46 -10
- package/core/{custom-command.js → interfaces/custom-command.js} +44 -17
- package/core/{manifest.d.ts → interfaces/manifest.d.ts} +49 -27
- package/core/interfaces/manifest.js +132 -0
- package/core/interfaces/plugin.d.ts +174 -0
- package/core/interfaces/plugin.js +124 -0
- package/core/interfaces/publish-target.d.ts +136 -0
- package/core/interfaces/publish-target.js +43 -0
- package/core/{run-step.d.ts → interfaces/run-step.d.ts} +4 -4
- package/core/interfaces/run-step.js +1 -0
- package/core/plugin-loader.d.ts +25 -0
- package/core/plugin-loader.js +53 -0
- package/index.d.ts +122 -24
- package/index.js +66 -16
- package/interfaces/config-scope.interface.d.ts +223 -0
- package/interfaces/config-scope.interface.js +1 -0
- package/interfaces/rman-config.interface.d.ts +821 -203
- package/interfaces/rman-config.interface.js +78 -1
- package/package.json +3 -1
- package/services/change-hash.service.d.ts +42 -8
- package/services/change-hash.service.js +92 -13
- package/services/changelog.service.d.ts +91 -52
- package/services/changelog.service.js +460 -74
- package/services/config-service.d.ts +8 -0
- package/services/config-service.js +3 -0
- package/services/exec.service.d.ts +23 -12
- package/services/exec.service.js +14 -9
- package/services/github-release.service.d.ts +45 -34
- package/services/github-release.service.js +15 -12
- package/services/import.service.d.ts +25 -14
- package/services/import.service.js +9 -5
- package/services/list.service.d.ts +67 -13
- package/services/list.service.js +62 -15
- package/services/run.service.d.ts +35 -22
- package/services/run.service.js +316 -233
- package/services/system-info.d.ts +1 -1
- package/services/version-plan.service.d.ts +35 -8
- package/services/version-plan.service.js +96 -36
- package/services/version.service.d.ts +34 -14
- package/services/version.service.js +35 -16
- package/services.d.ts +1 -1
- package/services.js +1 -1
- package/utils/bin-path.d.ts +6 -7
- package/utils/bin-path.js +7 -18
- package/utils/branch-guard.d.ts +30 -1
- package/utils/branch-guard.js +31 -0
- package/utils/color-yaml.d.ts +8 -0
- package/utils/color-yaml.js +86 -0
- package/utils/exec.d.ts +10 -0
- package/utils/exec.js +1 -1
- package/utils/git.d.ts +26 -0
- package/utils/git.js +65 -0
- package/utils/logger.d.ts +2 -2
- package/utils/logger.js +1 -1
- package/utils/package-filter.d.ts +135 -8
- package/utils/package-filter.js +204 -16
- package/utils/printable-config.d.ts +9 -1
- package/utils/printable-config.js +46 -1
- package/utils/progress-panel.d.ts +9 -0
- package/utils/progress-panel.js +23 -1
- package/utils/release-version.d.ts +1 -1
- package/utils/run-bin.d.ts +10 -0
- package/utils/run-bin.js +1 -1
- package/utils/run-options.d.ts +97 -0
- package/utils/run-options.js +81 -0
- package/utils/version-group.d.ts +31 -0
- package/utils/version-group.js +43 -0
- package/utils/version-stamp.d.ts +1 -1
- package/utils/version-stamp.js +1 -1
- package/commands/changed.command.d.ts +0 -3
- package/commands/changed.command.js +0 -29
- package/core/config.d.ts +0 -409
- package/core/config.js +0 -939
- package/core/extends-config.d.ts +0 -27
- package/core/extends-config.js +0 -89
- package/core/manifest.js +0 -150
- package/core/merge-config.js +0 -219
- package/core/package.d.ts +0 -83
- package/core/package.js +0 -106
- package/core/plugin.d.ts +0 -112
- package/core/plugin.js +0 -189
- package/core/workspace.d.ts +0 -68
- package/core/workspace.js +0 -83
- /package/{core/run-step.js → builtins/platforms/node/augmentation/rmanrc.augmentation.js} +0 -0
|
@@ -1,6 +1,186 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { type RmanConfig } from '../interfaces/rman-config.interface.js';
|
|
2
|
+
declare const COMMAND: "run <script>";
|
|
3
|
+
declare const config: {
|
|
4
|
+
parallel: {
|
|
5
|
+
target: "cli";
|
|
6
|
+
describe: string;
|
|
7
|
+
coerce: (v: unknown) => boolean | number | undefined;
|
|
8
|
+
};
|
|
9
|
+
bail: {
|
|
10
|
+
target: "cli";
|
|
11
|
+
describe: string;
|
|
12
|
+
type: "boolean";
|
|
13
|
+
};
|
|
14
|
+
topo: {
|
|
15
|
+
target: "cli";
|
|
16
|
+
describe: string;
|
|
17
|
+
type: "boolean";
|
|
18
|
+
};
|
|
19
|
+
progress: {
|
|
20
|
+
target: "cli";
|
|
21
|
+
describe: string;
|
|
22
|
+
type: "boolean";
|
|
23
|
+
};
|
|
24
|
+
changed: {
|
|
25
|
+
target: "cli";
|
|
26
|
+
alias: string;
|
|
27
|
+
describe: string;
|
|
28
|
+
type: "boolean";
|
|
29
|
+
};
|
|
30
|
+
changedSince: {
|
|
31
|
+
target: "cli";
|
|
32
|
+
cliName: string;
|
|
33
|
+
describe: string;
|
|
34
|
+
type: "string";
|
|
35
|
+
conflicts: string;
|
|
36
|
+
};
|
|
37
|
+
fromRoot: {
|
|
38
|
+
target: "cli";
|
|
39
|
+
cliName: string;
|
|
40
|
+
alias: string;
|
|
41
|
+
describe: string;
|
|
42
|
+
type: "boolean";
|
|
43
|
+
};
|
|
44
|
+
allowBranch: {
|
|
45
|
+
target: "cli";
|
|
46
|
+
cliName: string;
|
|
47
|
+
describe: string;
|
|
48
|
+
type: "string";
|
|
49
|
+
};
|
|
50
|
+
ignoreBranch: {
|
|
51
|
+
target: "cli";
|
|
52
|
+
cliName: string;
|
|
53
|
+
describe: string;
|
|
54
|
+
type: "string";
|
|
55
|
+
};
|
|
56
|
+
scope: {
|
|
57
|
+
target: "cli";
|
|
58
|
+
describe: string;
|
|
59
|
+
type: "string";
|
|
60
|
+
};
|
|
61
|
+
ignore: {
|
|
62
|
+
target: "cli";
|
|
63
|
+
describe: string;
|
|
64
|
+
type: "string";
|
|
65
|
+
};
|
|
66
|
+
platform: {
|
|
67
|
+
target: "cli";
|
|
68
|
+
describe: string;
|
|
69
|
+
type: "string";
|
|
70
|
+
};
|
|
71
|
+
deps: {
|
|
72
|
+
target: "cli";
|
|
73
|
+
describe: string;
|
|
74
|
+
type: "boolean";
|
|
75
|
+
};
|
|
76
|
+
dependents: {
|
|
77
|
+
target: "cli";
|
|
78
|
+
describe: string;
|
|
79
|
+
type: "boolean";
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
type Args = RmanConfig.ArgsOf<typeof config, typeof COMMAND>;
|
|
83
|
+
declare const runCommand: (app: import("../index.js").RmanApplication) => {
|
|
84
|
+
command: "run <script>";
|
|
85
|
+
describe: string;
|
|
86
|
+
/**
|
|
87
|
+
* The one command whose `--config` keys depend on argv: the script's own block, whichever script
|
|
88
|
+
* was asked for. Read, not owned - `run.<script>.*` is keyed by script name, so it is the one
|
|
89
|
+
* config shape a flat option map cannot describe and it stays hand-written in `RmanConfig`.
|
|
90
|
+
*/
|
|
91
|
+
configKeys: (args: any) => string[];
|
|
92
|
+
config: {
|
|
93
|
+
parallel: {
|
|
94
|
+
target: "cli";
|
|
95
|
+
describe: string;
|
|
96
|
+
coerce: (v: unknown) => boolean | number | undefined;
|
|
97
|
+
};
|
|
98
|
+
bail: {
|
|
99
|
+
target: "cli";
|
|
100
|
+
describe: string;
|
|
101
|
+
type: "boolean";
|
|
102
|
+
};
|
|
103
|
+
topo: {
|
|
104
|
+
target: "cli";
|
|
105
|
+
describe: string;
|
|
106
|
+
type: "boolean";
|
|
107
|
+
};
|
|
108
|
+
progress: {
|
|
109
|
+
target: "cli";
|
|
110
|
+
describe: string;
|
|
111
|
+
type: "boolean";
|
|
112
|
+
};
|
|
113
|
+
changed: {
|
|
114
|
+
target: "cli";
|
|
115
|
+
alias: string;
|
|
116
|
+
describe: string;
|
|
117
|
+
type: "boolean";
|
|
118
|
+
};
|
|
119
|
+
changedSince: {
|
|
120
|
+
target: "cli";
|
|
121
|
+
cliName: string;
|
|
122
|
+
describe: string;
|
|
123
|
+
type: "string";
|
|
124
|
+
conflicts: string;
|
|
125
|
+
};
|
|
126
|
+
fromRoot: {
|
|
127
|
+
target: "cli";
|
|
128
|
+
cliName: string;
|
|
129
|
+
alias: string;
|
|
130
|
+
describe: string;
|
|
131
|
+
type: "boolean";
|
|
132
|
+
};
|
|
133
|
+
allowBranch: {
|
|
134
|
+
target: "cli";
|
|
135
|
+
cliName: string;
|
|
136
|
+
describe: string;
|
|
137
|
+
type: "string";
|
|
138
|
+
};
|
|
139
|
+
ignoreBranch: {
|
|
140
|
+
target: "cli";
|
|
141
|
+
cliName: string;
|
|
142
|
+
describe: string;
|
|
143
|
+
type: "string";
|
|
144
|
+
};
|
|
145
|
+
scope: {
|
|
146
|
+
target: "cli";
|
|
147
|
+
describe: string;
|
|
148
|
+
type: "string";
|
|
149
|
+
};
|
|
150
|
+
ignore: {
|
|
151
|
+
target: "cli";
|
|
152
|
+
describe: string;
|
|
153
|
+
type: "string";
|
|
154
|
+
};
|
|
155
|
+
platform: {
|
|
156
|
+
target: "cli";
|
|
157
|
+
describe: string;
|
|
158
|
+
type: "string";
|
|
159
|
+
};
|
|
160
|
+
deps: {
|
|
161
|
+
target: "cli";
|
|
162
|
+
describe: string;
|
|
163
|
+
type: "boolean";
|
|
164
|
+
};
|
|
165
|
+
dependents: {
|
|
166
|
+
target: "cli";
|
|
167
|
+
describe: string;
|
|
168
|
+
type: "boolean";
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
positionals: {
|
|
172
|
+
script: {
|
|
173
|
+
describe: string;
|
|
174
|
+
type: "string";
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
examples: ({
|
|
178
|
+
command: string;
|
|
179
|
+
description?: undefined;
|
|
180
|
+
} | {
|
|
181
|
+
command: string;
|
|
182
|
+
description: string;
|
|
183
|
+
})[];
|
|
184
|
+
handler: (args: Args) => Promise<void>;
|
|
185
|
+
};
|
|
186
|
+
export default runCommand;
|
package/commands/run.command.js
CHANGED
|
@@ -1,77 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
'a number for that many, false to run serially. Packages always build in dependency order.',
|
|
9
|
-
coerce: (v) => {
|
|
10
|
-
if (v === undefined)
|
|
11
|
-
return undefined;
|
|
12
|
-
if (v === 'false' || v === false)
|
|
13
|
-
return false;
|
|
14
|
-
if (v === 'true' || v === true)
|
|
15
|
-
return true;
|
|
16
|
-
const n = Number(v);
|
|
17
|
-
return Number.isFinite(n) ? n : true;
|
|
18
|
-
},
|
|
19
|
-
})
|
|
20
|
-
.option('bail', {
|
|
21
|
-
describe: 'Stop on first failure (default: true, overridable per-package via .rmanrc run.<script>.bail)',
|
|
22
|
-
type: 'boolean',
|
|
23
|
-
})
|
|
24
|
-
.option('topo', {
|
|
25
|
-
describe: 'Respect package dependency order: a package waits for its dependencies and is skipped if one ' +
|
|
26
|
-
'fails. Set false for independent scripts (e.g. lint/test) - order becomes alphabetical and ' +
|
|
27
|
-
'failures never skip other packages. Default: true, overridable per-package via .rmanrc run.<script>.topo.',
|
|
28
|
-
type: 'boolean',
|
|
29
|
-
})
|
|
30
|
-
.option('progress', {
|
|
31
|
-
describe: 'Show a live progress panel (default: true; auto-disabled when not a TTY; .rmanrc run.<script>.progress)',
|
|
32
|
-
type: 'boolean',
|
|
33
|
-
})
|
|
34
|
-
.option('changed', {
|
|
35
|
-
alias: 'c',
|
|
36
|
-
describe: 'Only run in packages that have changed since the last publish',
|
|
37
|
-
type: 'boolean',
|
|
38
|
-
})
|
|
39
|
-
.option('changed-since', {
|
|
40
|
-
describe: 'Only run in packages that have changed since the given git commit/hash',
|
|
41
|
-
type: 'string',
|
|
42
|
-
})
|
|
43
|
-
.conflicts('changed', 'changed-since');
|
|
44
|
-
}
|
|
45
|
-
export function readRunOptions(args) {
|
|
1
|
+
import { registerCommand } from '../interfaces/rman-config.interface.js';
|
|
2
|
+
import { assertAllowedBranch, readBranchGuardOptions } from '../utils/branch-guard.js';
|
|
3
|
+
import { readRunOptions, runOptions } from '../utils/run-options.js';
|
|
4
|
+
const COMMAND = 'run <script>';
|
|
5
|
+
const config = runOptions;
|
|
6
|
+
const runCommand = registerCommand(app => {
|
|
7
|
+
const repository = app.repository;
|
|
46
8
|
return {
|
|
47
|
-
|
|
48
|
-
parallel: args.parallel,
|
|
49
|
-
topo: args.topo,
|
|
50
|
-
bail: args.bail,
|
|
51
|
-
progress: args.progress,
|
|
52
|
-
changed: args.changed,
|
|
53
|
-
changedSince: args.changedSince,
|
|
54
|
-
logLevel: args.logLevel,
|
|
55
|
-
root: args.root,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
export function initCli(repository, program) {
|
|
59
|
-
program.command({
|
|
60
|
-
command: 'run <script>',
|
|
61
|
-
/** Which `.rmanrc` `--config` shows for this command: the script's own block, whichever
|
|
62
|
-
* script was asked for. */
|
|
63
|
-
configKeys: (args) => ['run.' + args.script],
|
|
9
|
+
command: COMMAND,
|
|
64
10
|
describe: 'Run an npm script in each package',
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
11
|
+
/**
|
|
12
|
+
* The one command whose `--config` keys depend on argv: the script's own block, whichever script
|
|
13
|
+
* was asked for. Read, not owned - `run.<script>.*` is keyed by script name, so it is the one
|
|
14
|
+
* config shape a flat option map cannot describe and it stays hand-written in `RmanConfig`.
|
|
15
|
+
*/
|
|
16
|
+
configKeys: (args) => ['run.' + args.script],
|
|
17
|
+
config,
|
|
18
|
+
positionals: {
|
|
19
|
+
script: { describe: 'The script to run', type: 'string' },
|
|
20
|
+
},
|
|
21
|
+
examples: [
|
|
22
|
+
{ command: '$0 run build' },
|
|
23
|
+
{ command: '$0 run build --changed', description: '# Only in packages you have touched but not pushed' },
|
|
24
|
+
],
|
|
72
25
|
handler: async (args) => {
|
|
73
26
|
await assertAllowedBranch(repository, readBranchGuardOptions(args));
|
|
74
|
-
await
|
|
27
|
+
await app.getService('run').runScript(args.script, { ...readRunOptions(args), commandName: 'run' });
|
|
75
28
|
},
|
|
76
|
-
}
|
|
77
|
-
}
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
export default runCommand;
|
|
@@ -1,3 +1,173 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { type RmanConfig } from '../interfaces/rman-config.interface.js';
|
|
2
|
+
declare const COMMAND: "test";
|
|
3
|
+
declare const config: {
|
|
4
|
+
parallel: {
|
|
5
|
+
target: "cli";
|
|
6
|
+
describe: string;
|
|
7
|
+
coerce: (v: unknown) => boolean | number | undefined;
|
|
8
|
+
};
|
|
9
|
+
bail: {
|
|
10
|
+
target: "cli";
|
|
11
|
+
describe: string;
|
|
12
|
+
type: "boolean";
|
|
13
|
+
};
|
|
14
|
+
topo: {
|
|
15
|
+
target: "cli";
|
|
16
|
+
describe: string;
|
|
17
|
+
type: "boolean";
|
|
18
|
+
};
|
|
19
|
+
progress: {
|
|
20
|
+
target: "cli";
|
|
21
|
+
describe: string;
|
|
22
|
+
type: "boolean";
|
|
23
|
+
};
|
|
24
|
+
changed: {
|
|
25
|
+
target: "cli";
|
|
26
|
+
alias: string;
|
|
27
|
+
describe: string;
|
|
28
|
+
type: "boolean";
|
|
29
|
+
};
|
|
30
|
+
changedSince: {
|
|
31
|
+
target: "cli";
|
|
32
|
+
cliName: string;
|
|
33
|
+
describe: string;
|
|
34
|
+
type: "string";
|
|
35
|
+
conflicts: string;
|
|
36
|
+
};
|
|
37
|
+
fromRoot: {
|
|
38
|
+
target: "cli";
|
|
39
|
+
cliName: string;
|
|
40
|
+
alias: string;
|
|
41
|
+
describe: string;
|
|
42
|
+
type: "boolean";
|
|
43
|
+
};
|
|
44
|
+
allowBranch: {
|
|
45
|
+
target: "cli";
|
|
46
|
+
cliName: string;
|
|
47
|
+
describe: string;
|
|
48
|
+
type: "string";
|
|
49
|
+
};
|
|
50
|
+
ignoreBranch: {
|
|
51
|
+
target: "cli";
|
|
52
|
+
cliName: string;
|
|
53
|
+
describe: string;
|
|
54
|
+
type: "string";
|
|
55
|
+
};
|
|
56
|
+
scope: {
|
|
57
|
+
target: "cli";
|
|
58
|
+
describe: string;
|
|
59
|
+
type: "string";
|
|
60
|
+
};
|
|
61
|
+
ignore: {
|
|
62
|
+
target: "cli";
|
|
63
|
+
describe: string;
|
|
64
|
+
type: "string";
|
|
65
|
+
};
|
|
66
|
+
platform: {
|
|
67
|
+
target: "cli";
|
|
68
|
+
describe: string;
|
|
69
|
+
type: "string";
|
|
70
|
+
};
|
|
71
|
+
deps: {
|
|
72
|
+
target: "cli";
|
|
73
|
+
describe: string;
|
|
74
|
+
type: "boolean";
|
|
75
|
+
};
|
|
76
|
+
dependents: {
|
|
77
|
+
target: "cli";
|
|
78
|
+
describe: string;
|
|
79
|
+
type: "boolean";
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
type Args = RmanConfig.ArgsOf<typeof config, typeof COMMAND>;
|
|
83
|
+
declare const testCommand: (app: import("../index.js").RmanApplication) => {
|
|
84
|
+
command: "test";
|
|
85
|
+
describe: string;
|
|
86
|
+
/** Owns nothing, for the same reason `build` does not - see there. */
|
|
87
|
+
configKeys: string[];
|
|
88
|
+
config: {
|
|
89
|
+
parallel: {
|
|
90
|
+
target: "cli";
|
|
91
|
+
describe: string;
|
|
92
|
+
coerce: (v: unknown) => boolean | number | undefined;
|
|
93
|
+
};
|
|
94
|
+
bail: {
|
|
95
|
+
target: "cli";
|
|
96
|
+
describe: string;
|
|
97
|
+
type: "boolean";
|
|
98
|
+
};
|
|
99
|
+
topo: {
|
|
100
|
+
target: "cli";
|
|
101
|
+
describe: string;
|
|
102
|
+
type: "boolean";
|
|
103
|
+
};
|
|
104
|
+
progress: {
|
|
105
|
+
target: "cli";
|
|
106
|
+
describe: string;
|
|
107
|
+
type: "boolean";
|
|
108
|
+
};
|
|
109
|
+
changed: {
|
|
110
|
+
target: "cli";
|
|
111
|
+
alias: string;
|
|
112
|
+
describe: string;
|
|
113
|
+
type: "boolean";
|
|
114
|
+
};
|
|
115
|
+
changedSince: {
|
|
116
|
+
target: "cli";
|
|
117
|
+
cliName: string;
|
|
118
|
+
describe: string;
|
|
119
|
+
type: "string";
|
|
120
|
+
conflicts: string;
|
|
121
|
+
};
|
|
122
|
+
fromRoot: {
|
|
123
|
+
target: "cli";
|
|
124
|
+
cliName: string;
|
|
125
|
+
alias: string;
|
|
126
|
+
describe: string;
|
|
127
|
+
type: "boolean";
|
|
128
|
+
};
|
|
129
|
+
allowBranch: {
|
|
130
|
+
target: "cli";
|
|
131
|
+
cliName: string;
|
|
132
|
+
describe: string;
|
|
133
|
+
type: "string";
|
|
134
|
+
};
|
|
135
|
+
ignoreBranch: {
|
|
136
|
+
target: "cli";
|
|
137
|
+
cliName: string;
|
|
138
|
+
describe: string;
|
|
139
|
+
type: "string";
|
|
140
|
+
};
|
|
141
|
+
scope: {
|
|
142
|
+
target: "cli";
|
|
143
|
+
describe: string;
|
|
144
|
+
type: "string";
|
|
145
|
+
};
|
|
146
|
+
ignore: {
|
|
147
|
+
target: "cli";
|
|
148
|
+
describe: string;
|
|
149
|
+
type: "string";
|
|
150
|
+
};
|
|
151
|
+
platform: {
|
|
152
|
+
target: "cli";
|
|
153
|
+
describe: string;
|
|
154
|
+
type: "string";
|
|
155
|
+
};
|
|
156
|
+
deps: {
|
|
157
|
+
target: "cli";
|
|
158
|
+
describe: string;
|
|
159
|
+
type: "boolean";
|
|
160
|
+
};
|
|
161
|
+
dependents: {
|
|
162
|
+
target: "cli";
|
|
163
|
+
describe: string;
|
|
164
|
+
type: "boolean";
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
examples: {
|
|
168
|
+
command: string;
|
|
169
|
+
description: string;
|
|
170
|
+
}[];
|
|
171
|
+
handler: (args: Args) => Promise<void>;
|
|
172
|
+
};
|
|
173
|
+
export default testCommand;
|
package/commands/test.command.js
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { registerCommand } from '../interfaces/rman-config.interface.js';
|
|
2
2
|
import { assertAllowedBranch, readBranchGuardOptions } from '../utils/branch-guard.js';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import { readRunOptions, runOptions } from '../utils/run-options.js';
|
|
4
|
+
const COMMAND = 'test';
|
|
5
|
+
const config = runOptions;
|
|
6
|
+
const testCommand = registerCommand(app => {
|
|
7
|
+
const repository = app.repository;
|
|
8
|
+
return {
|
|
9
|
+
command: COMMAND,
|
|
8
10
|
describe: 'Alias for "run test"',
|
|
9
|
-
|
|
11
|
+
/** Owns nothing, for the same reason `build` does not - see there. */
|
|
12
|
+
configKeys: ['run.test'],
|
|
13
|
+
config,
|
|
14
|
+
examples: [{ command: '$0 test', description: '# Tests packages' }],
|
|
10
15
|
handler: async (args) => {
|
|
11
16
|
await assertAllowedBranch(repository, readBranchGuardOptions(args));
|
|
12
|
-
await
|
|
17
|
+
await app.getService('run').runScript('test', { ...readRunOptions(args), commandName: 'test' });
|
|
13
18
|
},
|
|
14
|
-
}
|
|
15
|
-
}
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
export default testCommand;
|