rman 1.0.1 → 1.0.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.
- package/README.md +14 -7
- package/cli.js +1 -1
- package/constants.js +1 -1
- package/package.json +3 -2
- package/rmanrc.schema.json +202 -0
package/README.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[![NPM Version][npm-image]][npm-url]
|
|
4
4
|
[![NPM Downloads][downloads-image]][downloads-url]
|
|
5
|
-
[![
|
|
6
|
-
[![
|
|
5
|
+
[![CI Tests][ci-test-image]][ci-test-url]
|
|
6
|
+
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
7
7
|
|
|
8
8
|
**rman** is a monorepo management CLI: a self-contained alternative to reaching for Lerna,
|
|
9
9
|
Changesets, and a handful of shell scripts glued together. One tool for running scripts across
|
|
@@ -341,6 +341,13 @@ See [docs/api.md#configuration-rmanrc-rmanyml](docs/api.md#configuration-rmanrc-
|
|
|
341
341
|
full key reference (every `run.<script>.*` sub-key, `clean.*`, `changelog.*`, precedence rules,
|
|
342
342
|
and which keys are root-level-only today).
|
|
343
343
|
|
|
344
|
+
**Editor autocomplete:** `rman` ships a JSON Schema for `.rmanrc`/`.rman.yml` at
|
|
345
|
+
`rman/rmanrc.schema.json` - add `"$schema": "./node_modules/rman/rmanrc.schema.json"` to your
|
|
346
|
+
`.rmanrc` (or the equivalent `# yaml-language-server: $schema=...` comment in `.rman.yml`) to get
|
|
347
|
+
autocomplete and validation in VS Code/WebStorm. See
|
|
348
|
+
[docs/api.md#editor-support-json-schema](docs/api.md#editor-support-json-schema) for details,
|
|
349
|
+
including a WebStorm setup that needs no changes to the config file itself.
|
|
350
|
+
|
|
344
351
|
## Programmatic API
|
|
345
352
|
|
|
346
353
|
Every command above is a thin wrapper around an exported service function - call them directly
|
|
@@ -366,11 +373,11 @@ Full reference, with detailed examples for every service (`VersionService`, `Pub
|
|
|
366
373
|
|
|
367
374
|
rman is available under the [MIT](LICENSE) license.
|
|
368
375
|
|
|
369
|
-
[npm-image]: https://img.shields.io/npm/v/rman
|
|
376
|
+
[npm-image]: https://img.shields.io/npm/v/rman
|
|
370
377
|
[npm-url]: https://npmjs.org/package/rman
|
|
371
378
|
[downloads-image]: https://img.shields.io/npm/dm/rman.svg
|
|
372
379
|
[downloads-url]: https://npmjs.org/package/rman
|
|
373
|
-
[
|
|
374
|
-
[
|
|
375
|
-
[
|
|
376
|
-
[
|
|
380
|
+
[ci-test-image]: https://github.com/panates/rman/actions/workflows/test.yml/badge.svg
|
|
381
|
+
[ci-test-url]: https://github.com/panates/rman/actions/workflows/test.yml
|
|
382
|
+
[coveralls-image]: https://img.shields.io/coveralls/panates/rman/dev.svg
|
|
383
|
+
[coveralls-url]: https://coveralls.io/r/panates/rman
|
package/cli.js
CHANGED
|
@@ -26,7 +26,7 @@ export async function runCli(options) {
|
|
|
26
26
|
const repository = Repository.create(options?.cwd);
|
|
27
27
|
const _argv = options?.argv || hideBin(process.argv);
|
|
28
28
|
const program = yargs(_argv)
|
|
29
|
-
.scriptName('
|
|
29
|
+
.scriptName('rman')
|
|
30
30
|
.version(version)
|
|
31
31
|
.alias('version', 'v')
|
|
32
32
|
.usage('$0 <cmd> [options...]')
|
package/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.0.
|
|
1
|
+
export const version = '1.0.2';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rman",
|
|
3
3
|
"description": "Repository manager",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"dependencies": {
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
"types": "./index.d.ts",
|
|
36
36
|
"default": "./index.js"
|
|
37
37
|
},
|
|
38
|
-
"./package.json": "./package.json"
|
|
38
|
+
"./package.json": "./package.json",
|
|
39
|
+
"./rmanrc.schema.json": "./rmanrc.schema.json"
|
|
39
40
|
},
|
|
40
41
|
"bin": {
|
|
41
42
|
"rman": "cli.js"
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/panates/rman/main/schemas/rmanrc.schema.json",
|
|
4
|
+
"title": "rman configuration",
|
|
5
|
+
"description": "Schema for rman's .rmanrc (JSON) and .rman.yml (YAML) config files, and the \"rman\" key in package.json. See docs/api.md#configuration-rmanrc-rmanyml for the full reference.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"$schema": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "Path/URL to this schema - not read by rman itself, purely for editor tooling."
|
|
11
|
+
},
|
|
12
|
+
"packageManager": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": ["npm", "yarn", "pnpm", "bun"],
|
|
15
|
+
"default": "npm",
|
|
16
|
+
"description": "Package manager used by \"ci\"/\"publish\". Root-level only - an explicit --package-manager CLI flag wins over this."
|
|
17
|
+
},
|
|
18
|
+
"logLevel": {
|
|
19
|
+
"$ref": "#/definitions/logLevel",
|
|
20
|
+
"default": "info",
|
|
21
|
+
"description": "Default verbosity of the classic per-step log for run/build/test/ci/clean. Root-level only. An explicit --log-level CLI flag wins over this."
|
|
22
|
+
},
|
|
23
|
+
"allowBranch": {
|
|
24
|
+
"$ref": "#/definitions/stringOrStringArray",
|
|
25
|
+
"description": "Refuse to run a state-changing command unless the current git branch matches one of these globs. Root-level only. An explicit --allow-branch CLI flag replaces this entirely (never merges)."
|
|
26
|
+
},
|
|
27
|
+
"ignoreBranch": {
|
|
28
|
+
"$ref": "#/definitions/stringOrStringArray",
|
|
29
|
+
"description": "Refuse to run a state-changing command if the current git branch matches one of these globs. Root-level only. An explicit --ignore-branch CLI flag replaces this entirely (never merges)."
|
|
30
|
+
},
|
|
31
|
+
"group": {
|
|
32
|
+
"description": "Release-versioning group for \"version\"/\"publish\": true (default) puts the package in the implicit repo-wide group; a string joins exactly the other packages sharing that string; false makes it a solo, fully independent group. Per-package cascaded.",
|
|
33
|
+
"default": true,
|
|
34
|
+
"oneOf": [{ "type": "boolean" }, { "type": "string", "minLength": 1 }]
|
|
35
|
+
},
|
|
36
|
+
"version": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"description": "Options for the \"version\" command/VersionService.",
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"properties": {
|
|
41
|
+
"commitMessage": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"default": "chore(release): v{version}",
|
|
44
|
+
"description": "Commit message for every group a \"version\" run commits. \"{version}\" is substituted when every bumped package in that commit shares one version. Root-level only."
|
|
45
|
+
},
|
|
46
|
+
"script": {
|
|
47
|
+
"$ref": "#/definitions/stringOrStringArray",
|
|
48
|
+
"description": "Command(s) to run as this package's own \"version\" npm-lifecycle step, when its package.json does not define one itself."
|
|
49
|
+
},
|
|
50
|
+
"preScript": {
|
|
51
|
+
"$ref": "#/definitions/stringOrStringArray",
|
|
52
|
+
"description": "Command(s) to run as this package's own \"preversion\" step, when its package.json does not define one itself."
|
|
53
|
+
},
|
|
54
|
+
"postScript": {
|
|
55
|
+
"$ref": "#/definitions/stringOrStringArray",
|
|
56
|
+
"description": "Command(s) to run as this package's own \"postversion\" step, when its package.json does not define one itself."
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"changelog": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"description": "Options for the \"changelog\" command/ChangelogService, and for \"version --changelog\".",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"properties": {
|
|
65
|
+
"ignoreTypes": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"items": { "type": "string" },
|
|
68
|
+
"default": [],
|
|
69
|
+
"description": "Conventional Commit types (e.g. \"chore\", \"ci\") dropped entirely from changelog output, instead of being folded into \"Other Changes\". Per-package cascaded."
|
|
70
|
+
},
|
|
71
|
+
"template": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"description": "Path (relative to the repository root) to a changelog template file - not the template text itself. Supports {{package}}/{{version}}/{{date}}/{{commits}} and {{features}}/{{fixes}}/{{other}}. Per-package cascaded."
|
|
74
|
+
},
|
|
75
|
+
"filePath": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"default": "CHANGELOG.md",
|
|
78
|
+
"description": "Where \"--write\" prepends this package's entry, relative to that package's own directory. Per-package cascaded."
|
|
79
|
+
},
|
|
80
|
+
"tagPattern": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"default": "v*",
|
|
83
|
+
"description": "Glob for this package's release tags. Include \"{name}\" for independent per-package tags (e.g. \"{name}@*\"); omit it for one shared repo-wide tag scheme. Per-package cascaded."
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"clean": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"description": "Options for the \"clean\" command/CleanService.",
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"properties": {
|
|
92
|
+
"include": {
|
|
93
|
+
"$ref": "#/definitions/stringOrStringArray",
|
|
94
|
+
"description": "Extra glob(s) to remove, resolved relative to this package's own directory. Per-package cascaded (a package's own value replaces the root's, it does not merge)."
|
|
95
|
+
},
|
|
96
|
+
"exclude": {
|
|
97
|
+
"$ref": "#/definitions/stringOrStringArray",
|
|
98
|
+
"description": "Glob(s) protected from \"include\" (and from the built-in TypeScript-artifact cleanup), relative to this package's own directory. Per-package cascaded."
|
|
99
|
+
},
|
|
100
|
+
"skip": {
|
|
101
|
+
"type": "boolean",
|
|
102
|
+
"default": false,
|
|
103
|
+
"description": "Opts this package out of \"clean\" entirely. Per-package cascaded."
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"run": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"description": "Per-script options for \"run\"/\"build\"/\"test\"/RunService, keyed by npm script name (e.g. \"build\", \"lint\", \"test\").",
|
|
110
|
+
"additionalProperties": { "$ref": "#/definitions/runScriptConfig" }
|
|
111
|
+
},
|
|
112
|
+
"packages": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"description": "Per-package overrides, keyed by the in-repo package's own name.",
|
|
115
|
+
"additionalProperties": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"additionalProperties": false,
|
|
118
|
+
"properties": {
|
|
119
|
+
"dependencies": {
|
|
120
|
+
"description": "Extra in-repo \"dependencies\" not present in this package's real package.json, purely for rman's own dependency graph (topo-sort, --deps/--dependents, run's task scheduling). An array defaults each entry's range to \"*\"; an object gives an explicit name -> range map.",
|
|
121
|
+
"oneOf": [
|
|
122
|
+
{ "type": "array", "items": { "type": "string" } },
|
|
123
|
+
{ "type": "object", "additionalProperties": { "type": "string" } }
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"definitions": {
|
|
131
|
+
"logLevel": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"enum": ["silent", "error", "info", "verbose"]
|
|
134
|
+
},
|
|
135
|
+
"stringOrStringArray": {
|
|
136
|
+
"oneOf": [
|
|
137
|
+
{ "type": "string", "minLength": 1 },
|
|
138
|
+
{ "type": "array", "items": { "type": "string", "minLength": 1 } }
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
"runScriptConfig": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"additionalProperties": false,
|
|
144
|
+
"properties": {
|
|
145
|
+
"concurrency": {
|
|
146
|
+
"type": "integer",
|
|
147
|
+
"minimum": 1,
|
|
148
|
+
"description": "Max packages built at once for this script. Default: CPU count."
|
|
149
|
+
},
|
|
150
|
+
"topo": {
|
|
151
|
+
"type": "boolean",
|
|
152
|
+
"default": true,
|
|
153
|
+
"description": "Respect the package dependency graph: a package waits for its dependencies and is skipped if one fails. Set false for independent scripts (lint/test) - alphabetical order, no failure skipping."
|
|
154
|
+
},
|
|
155
|
+
"bail": {
|
|
156
|
+
"type": "boolean",
|
|
157
|
+
"default": true,
|
|
158
|
+
"description": "Stop the whole batch on this package's own failure. Unusual precedence: this package-level value outranks even an explicit CLI --bail/--no-bail flag."
|
|
159
|
+
},
|
|
160
|
+
"progress": {
|
|
161
|
+
"type": "boolean",
|
|
162
|
+
"default": true,
|
|
163
|
+
"description": "Show the live progress panel for this script (auto-disabled off a TTY)."
|
|
164
|
+
},
|
|
165
|
+
"logLevel": {
|
|
166
|
+
"$ref": "#/definitions/logLevel",
|
|
167
|
+
"description": "Verbosity of the classic per-step log for this package/script, when the live panel is off."
|
|
168
|
+
},
|
|
169
|
+
"changedSince": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"description": "Root-level fallback commit/hash for \"--changed-since\", used only when the CLI flag is not given."
|
|
172
|
+
},
|
|
173
|
+
"skip": {
|
|
174
|
+
"type": "boolean",
|
|
175
|
+
"default": false,
|
|
176
|
+
"description": "Excludes this package (or the repository root's own pre/post hooks) from running this script entirely."
|
|
177
|
+
},
|
|
178
|
+
"if": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"description": "Conditional-execution expression: atoms \"changed\"/\"dirty\"/\"committed\" (optionally \"= <hash>\" or \"= {ENV_VAR}\"), combined with and/or/not/(...). E.g. \"changed\", \"(changed or dirty) and not committed\"."
|
|
181
|
+
},
|
|
182
|
+
"script": {
|
|
183
|
+
"$ref": "#/definitions/stringOrStringArray",
|
|
184
|
+
"description": "Command(s) to run as this package's own script, when its package.json does not define one for this script name."
|
|
185
|
+
},
|
|
186
|
+
"preScript": {
|
|
187
|
+
"$ref": "#/definitions/stringOrStringArray",
|
|
188
|
+
"description": "Command(s) to run as this package's own \"pre<script>\" hook, when its package.json does not define one."
|
|
189
|
+
},
|
|
190
|
+
"postScript": {
|
|
191
|
+
"$ref": "#/definitions/stringOrStringArray",
|
|
192
|
+
"description": "Command(s) to run as this package's own \"post<script>\" hook, when its package.json does not define one."
|
|
193
|
+
},
|
|
194
|
+
"override": {
|
|
195
|
+
"type": "boolean",
|
|
196
|
+
"default": false,
|
|
197
|
+
"description": "When true, \"script\"/\"preScript\"/\"postScript\" above replace the package's own package.json definition even when it already has one."
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|