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.
- package/README.md +63 -19
- package/cli.d.ts +5 -0
- package/cli.js +214 -88
- package/commands/build.command.d.ts +177 -3
- package/commands/build.command.js +20 -10
- package/commands/changed.command.d.ts +80 -3
- package/commands/changed.command.js +19 -12
- package/commands/changelog.command.d.ts +192 -3
- package/commands/changelog.command.js +87 -43
- package/commands/config.command.d.ts +44 -3
- package/commands/config.command.js +30 -19
- 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/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 +317 -3
- package/commands/version.command.js +149 -69
- 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 +143 -0
- package/core/command-builder.d.ts +14 -0
- package/core/command-builder.js +78 -0
- package/core/config.d.ts +180 -50
- package/core/config.js +332 -153
- package/core/core-services.d.ts +14 -0
- package/core/core-services.js +30 -0
- package/core/core-targets.d.ts +14 -0
- package/core/core-targets.js +16 -0
- package/core/custom-command.d.ts +42 -6
- package/core/custom-command.js +44 -17
- package/core/extends-config.d.ts +13 -5
- package/core/extends-config.js +52 -12
- package/core/load-config-module.d.ts +28 -0
- package/core/load-config-module.js +42 -0
- package/core/manifest.d.ts +47 -25
- package/core/manifest.js +51 -69
- package/core/merge-config.d.ts +33 -34
- package/core/merge-config.js +138 -93
- package/core/package.d.ts +145 -17
- package/core/package.js +128 -36
- package/core/plugin-loader.d.ts +65 -0
- package/core/plugin-loader.js +234 -0
- package/core/plugin.d.ts +135 -90
- package/core/plugin.js +70 -173
- package/core/publish-target.d.ts +124 -0
- package/core/publish-target.js +30 -0
- package/core/registry.d.ts +30 -0
- package/core/registry.js +47 -0
- package/core/repository.d.ts +72 -9
- package/core/repository.js +293 -43
- package/core/resolve-target.d.ts +1 -1
- package/core/resolve-target.js +1 -1
- package/core/service.d.ts +49 -0
- package/core/service.js +40 -0
- package/core/version-scheme.d.ts +23 -1
- package/core/version-scheme.js +29 -1
- package/core/workspace.d.ts +84 -33
- package/core/workspace.js +63 -22
- package/index.d.ts +111 -14
- package/index.js +85 -9
- package/interfaces/rman-config.interface.d.ts +739 -212
- package/interfaces/rman-config.interface.js +61 -1
- package/package.json +2 -1
- package/plugins/builtins.d.ts +44 -0
- package/plugins/builtins.js +33 -0
- package/plugins/detect.d.ts +78 -0
- package/plugins/detect.js +70 -0
- package/plugins/node/augmentation/rman.augmentation.d.ts +84 -0
- package/plugins/node/augmentation/rman.augmentation.js +1 -0
- package/plugins/node/augmentation/system-info.augmentation.d.ts +26 -0
- package/plugins/node/augmentation/system-info.augmentation.js +79 -0
- package/plugins/node/commands/ci.command.d.ts +131 -0
- package/plugins/node/commands/ci.command.js +59 -0
- package/plugins/node/commands/clean.command.d.ts +183 -0
- package/plugins/node/commands/clean.command.js +73 -0
- package/plugins/node/index.d.ts +29 -0
- package/plugins/node/index.js +40 -0
- package/plugins/node/node-config.interface.d.ts +77 -0
- package/plugins/node/node-config.interface.js +7 -0
- package/plugins/node/node-manifest.provider.d.ts +68 -0
- package/plugins/node/node-manifest.provider.js +125 -0
- package/plugins/node/node.platform.d.ts +53 -0
- package/plugins/node/node.platform.js +134 -0
- package/plugins/node/npm-publish-target.d.ts +73 -0
- package/plugins/node/npm-publish-target.js +96 -0
- package/plugins/node/services/ci.service.d.ts +47 -0
- package/plugins/node/services/ci.service.js +213 -0
- package/plugins/node/services/clean.service.d.ts +53 -0
- package/plugins/node/services/clean.service.js +237 -0
- package/plugins/node/services/publish.service.d.ts +114 -0
- package/plugins/node/services/publish.service.js +371 -0
- package/plugins/node/services/version-plan.service.d.ts +44 -0
- package/plugins/node/services/version-plan.service.js +58 -0
- package/plugins/node/utils/npm-view.d.ts +48 -0
- package/plugins/node/utils/npm-view.js +71 -0
- package/plugins/node/utils/workspace-range.d.ts +26 -0
- package/plugins/node/utils/workspace-range.js +28 -0
- package/services/change-hash.service.d.ts +2 -2
- package/services/change-hash.service.js +2 -2
- package/services/changelog.service.d.ts +62 -51
- package/services/changelog.service.js +14 -11
- package/services/docker-publish.service.d.ts +50 -29
- package/services/docker-publish.service.js +43 -20
- package/services/exec.service.d.ts +23 -12
- package/services/exec.service.js +14 -9
- package/services/github-release.service.d.ts +44 -33
- package/services/github-release.service.js +13 -10
- package/services/import.service.d.ts +25 -14
- package/services/import.service.js +9 -5
- package/services/list.service.d.ts +62 -10
- package/services/list.service.js +62 -15
- package/services/run.service.d.ts +22 -13
- package/services/run.service.js +262 -223
- package/services/version-plan.service.d.ts +27 -4
- package/services/version-plan.service.js +42 -15
- package/services/version.service.d.ts +31 -11
- package/services/version.service.js +29 -13
- package/targets/docker.target.d.ts +53 -0
- package/targets/docker.target.js +40 -0
- package/utils/bin-path.d.ts +6 -7
- package/utils/bin-path.js +7 -18
- package/utils/branch-guard.d.ts +29 -0
- package/utils/branch-guard.js +31 -0
- package/utils/exec.d.ts +10 -0
- package/utils/exec.js +1 -1
- package/utils/logger.d.ts +1 -1
- package/utils/logger.js +1 -1
- package/utils/package-filter.d.ts +127 -7
- package/utils/package-filter.js +197 -16
- package/utils/printable-config.d.ts +1 -1
- package/utils/printable-config.js +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-stamp.d.ts +1 -1
- package/utils/version-stamp.js +1 -1
package/index.js
CHANGED
|
@@ -6,47 +6,123 @@
|
|
|
6
6
|
* per domain - CLI-only concerns (argv parsing, `--help` text, and all console/file presentation)
|
|
7
7
|
* stay in `cli.ts` and the individual `commands/*.command.ts` modules, which are not exported here.
|
|
8
8
|
*
|
|
9
|
-
* **This is also the plugin contract.** A
|
|
10
|
-
*
|
|
11
|
-
* exported - the progress panel, the package filter, the branch guard, the git helper. What is
|
|
9
|
+
* **This is also the plugin contract.** A third-party plugin is an ordinary package that imports
|
|
10
|
+
* from here, so everything a command needs in order to live outside rman has to be exported - the progress panel, the package filter, the branch guard, the git helper. What is
|
|
12
11
|
* *not* exported is deliberately private: config resolution internals, the expression evaluator,
|
|
13
12
|
* the command registry.
|
|
14
13
|
*/
|
|
14
|
+
/**
|
|
15
|
+
* **The `node` built-in's type augmentation, imported for the same reason `commands.ts` is.**
|
|
16
|
+
*
|
|
17
|
+
* A `declare module` augmentation applies only where the module declaring it is part of the
|
|
18
|
+
* program. The node plugin's lives in `plugins/node/augmentation/rman.augmentation.ts` and is
|
|
19
|
+
* imported by the *plugin's* entry point - which nothing here reached, so `clean`, `publish.npm`
|
|
20
|
+
* and the rest existed for rman itself and for nobody else.
|
|
21
|
+
*
|
|
22
|
+
* **Measured on a real consumer**, `@panates/rman-node`, a config package annotated with these
|
|
23
|
+
* types: `Object literal may only specify known properties, and 'clean' does not exist in type
|
|
24
|
+
* 'RmanConfig'`, plus `Property 'npm' does not exist` - ten errors across its config and its own
|
|
25
|
+
* suite. It is the identical failure the core's command keys caused when they stopped being
|
|
26
|
+
* hand-written centrally, and it reappeared the moment the plugin moved *inside* rman: until then
|
|
27
|
+
* a consumer imported `rman-node` and got the augmentation with the package.
|
|
28
|
+
*
|
|
29
|
+
* Type-only, so the emitted module is empty - imported for what it declares, not for what it does.
|
|
30
|
+
* Pinned in `docs-api.spec.ts`, which imports only from this file.
|
|
31
|
+
*/
|
|
32
|
+
import './plugins/node/augmentation/rman.augmentation.js';
|
|
15
33
|
export { defineConfig } from './core/config.js';
|
|
16
34
|
export { defineCommand } from './core/custom-command.js';
|
|
17
35
|
/** Both the shape and the registry: `const m: Manifest` and `Manifest.read(dir)` - merged onto one
|
|
18
36
|
* name so a plugin can augment it the way it augments `SystemInfo`. */
|
|
37
|
+
export { RmanApplication } from './core/application.js';
|
|
19
38
|
export { Manifest } from './core/manifest.js';
|
|
20
39
|
export { Package } from './core/package.js';
|
|
21
|
-
|
|
40
|
+
/** The publish seam: where a package's artifact ships. The core brings `docker` (nobody's
|
|
41
|
+
* ecosystem); npm's target is the `node` built-in's, and any other technology's is its own plugin's. */
|
|
42
|
+
export { declaredTargets, shipsTo, targetsOf, unknownTargets } from './core/publish-target.js';
|
|
43
|
+
export { Registry } from './core/registry.js';
|
|
22
44
|
export { Repository } from './core/repository.js';
|
|
45
|
+
export { Service } from './core/service.js';
|
|
46
|
+
/**
|
|
47
|
+
* **`Platform` is one technology, whole**; **`Plugin` is whatever a package contributes**, platforms
|
|
48
|
+
* among them.
|
|
49
|
+
*
|
|
50
|
+
* A platform says how its packages are recognized and written, where they live, what goes on a
|
|
51
|
+
* child's PATH and how its releases are planned - `manifestProvider` is what makes one, and it is
|
|
52
|
+
* required. A plugin carries `platforms` and an `init` for anything the seams do not name yet; a
|
|
53
|
+
* bare `Platform` is accepted wherever a `Plugin` is, as sugar for the plugin that provides only it.
|
|
54
|
+
*
|
|
55
|
+
* **Both must be declared through their factory.** `loadPlugins` checks for the mark, because an
|
|
56
|
+
* rman 1.x plugin was `{ name, init }` and so is a 2.x plugin contributing nothing but an `init` -
|
|
57
|
+
* no shape test can tell them apart.
|
|
58
|
+
*/
|
|
59
|
+
export { basePlatform, definePlatform, definePlugin, isPlatform, } from './core/plugin.js';
|
|
23
60
|
/** The numbering seam. `VersionScheme` is abstract - `highestVersion`/`highestBump`/`smallestBump`
|
|
24
61
|
* are implemented from the members around them, so a scheme states only what it must and still
|
|
25
62
|
* overrides any of the three. `SemverScheme` is exported to subclass rather than restate. */
|
|
26
63
|
export { assertOneScheme, SemverScheme, semverScheme, VersionScheme } from './core/version-scheme.js';
|
|
27
64
|
/** The workspace seam: how a repository's packages are found. A plugin contributes a provider
|
|
28
|
-
* (see `
|
|
29
|
-
* `
|
|
65
|
+
* (see `Plugin.workspace`); the core has none, so `workspaces` is npm's idea and belongs to the
|
|
66
|
+
* `node` built-in. */
|
|
30
67
|
/** `Workspace.Layout`, `Workspace.Provider`, `Workspace.addProvider`, `Workspace.resolve`,
|
|
31
68
|
* `Workspace.findRoot` - one namespace, so a plugin can augment it. */
|
|
32
69
|
export { Workspace } from './core/workspace.js';
|
|
70
|
+
/**
|
|
71
|
+
* **How a command is declared** - the same API the built-ins use, so a plugin's command is declared
|
|
72
|
+
* rather than built: options as data (checked for typos), positionals named against the command
|
|
73
|
+
* string, `--config` keys derived from what the command owns, and `ArgsOf` for the handler.
|
|
74
|
+
*
|
|
75
|
+
* `declareCommand`, not `registerCommand`: the latter pushes onto a module-level registry every
|
|
76
|
+
* `runCli` walks, so a plugin using it would give its commands to repositories that never named it.
|
|
77
|
+
* Anything else puts the function in its config's `commands`.
|
|
78
|
+
*
|
|
79
|
+
* **Flat names rather than `RmanConfig.CommandOption`**, and they outlived the reason they were
|
|
80
|
+
* introduced: a second file exported a `RmanConfig` too, so the namespace holding these was
|
|
81
|
+
* unreachable from outside the package. The two are one file now and `RmanConfig` *is* exported -
|
|
82
|
+
* these stay because they are the better names for the job. A plugin author declaring a flag wants
|
|
83
|
+
* `CommandOption`; the config it happens to contribute to is not what they are naming.
|
|
84
|
+
*/
|
|
85
|
+
export { declareCommand } from './interfaces/rman-config.interface.js';
|
|
86
|
+
export * from './commands.js';
|
|
33
87
|
export * from './interfaces/rman-config.interface.js';
|
|
34
88
|
export * from './services.js';
|
|
35
89
|
// --- what a command needs to behave like a built-in one -----------------------------------------
|
|
36
90
|
/** Branch guarding: `allowBranch`/`ignoreBranch`, so a plugin's release command refuses to run on
|
|
37
91
|
* the wrong branch exactly as `publish` and `version` do. */
|
|
38
|
-
export { applyBranchGuardOptions, assertAllowedBranch, readBranchGuardOptions, } from './utils/branch-guard.js';
|
|
92
|
+
export { applyBranchGuardOptions, assertAllowedBranch, branchGuardOptions, readBranchGuardOptions, } from './utils/branch-guard.js';
|
|
39
93
|
/** Where a repository's locally installed binaries live - the core spells the PATH variable, a
|
|
40
|
-
* plugin says which directories go on it (see `
|
|
94
|
+
* plugin says which directories go on it (see `Plugin.binPaths`). */
|
|
41
95
|
export { BinPath } from './utils/bin-path.js';
|
|
42
96
|
export { exec } from './utils/exec.js';
|
|
43
97
|
export { GitHelper } from './utils/git.js';
|
|
44
98
|
export { LOG_LEVELS, Logger, resolveRootLogLevel } from './utils/logger.js';
|
|
45
99
|
/** `--scope`/`--deps`/`--dependents`/`--private`, so a plugin's command filters packages the same
|
|
46
100
|
* way every built-in does rather than inventing its own flags. */
|
|
47
|
-
export {
|
|
101
|
+
export { applyFromRootOption, applyPackageFilterOptions, filterPackages, fromRootOption, packageFilterOptions, readFromRootOption, readPackageFilterOptions, ROOT_SELECTOR, } from './utils/package-filter.js';
|
|
48
102
|
/** The live panel `run`/`build`/`clean` print - a plugin's per-package command looks like the rest
|
|
49
103
|
* of rman instead of like a script someone bolted on. */
|
|
50
104
|
export { formatDuration, ProgressPanel, } from './utils/progress-panel.js';
|
|
105
|
+
/** Version stamping helpers a `Plugin.stampVersion` can delegate to - the quoted-constant
|
|
106
|
+
* pattern most languages share, and the OCI Dockerfile label (which `version` stamps itself, since
|
|
107
|
+
* the label's value is by specification the package's version). */
|
|
108
|
+
/** A calendar version's time part (`2026.9.15-1430`) is a semver *prerelease identifier* by
|
|
109
|
+
* construction, so anything asking "is this a preview?" has to rule it out first - `github-release`
|
|
110
|
+
* does, and so must a publish target deciding whether a version needs its own dist-tag. Exported
|
|
111
|
+
* because that second caller lives in a plugin. */
|
|
112
|
+
/**
|
|
113
|
+
* **The `node` built-in's own surface.** It ships inside rman rather than as `rman-node`, so its
|
|
114
|
+
* services and target are named from here - a repository asks for the technology with
|
|
115
|
+
* `plugins: ['node']` (or lets detection find it) and never constructs any of this by hand.
|
|
116
|
+
*
|
|
117
|
+
* Its `.rmanrc` *keys* arrive separately, through the bare import at the top of this file - see
|
|
118
|
+
* there for why that import is not tidiness.
|
|
119
|
+
*/
|
|
120
|
+
export { BUILTIN_PLUGINS, builtinPluginNames, isBuiltinPlugin } from './plugins/builtins.js';
|
|
121
|
+
export { NPM_TARGET, NpmPublishTarget } from './plugins/node/npm-publish-target.js';
|
|
122
|
+
export { CiService } from './plugins/node/services/ci.service.js';
|
|
123
|
+
export { CleanService } from './plugins/node/services/clean.service.js';
|
|
124
|
+
export { PublishService } from './plugins/node/services/publish.service.js';
|
|
125
|
+
export { NodeVersionPlanService } from './plugins/node/services/version-plan.service.js';
|
|
126
|
+
export { isCalendarVersion } from './utils/release-version.js';
|
|
51
127
|
export { runBin } from './utils/run-bin.js';
|
|
52
128
|
export { OCI_VERSION_LABEL, stampVersionConstant, stampVersionLabel } from './utils/version-stamp.js';
|