@muverse/cli 0.1.1 → 0.1.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/dist/index.d.ts CHANGED
@@ -1,3 +1,25 @@
1
- #!/usr/bin/env node
2
- export {};
1
+ import { Command } from "@oclif/core";
2
+ export default class Version extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static args: {
6
+ repositoryRoot: import("@oclif/core/interfaces").Arg<string, {
7
+ exists?: boolean;
8
+ }>;
9
+ };
10
+ static flags: {
11
+ "dry-run": import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
+ adapter: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ "push-tags": import("@oclif/core/interfaces").BooleanFlag<boolean>;
14
+ "prerelease-mode": import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
+ "prerelease-id": import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
16
+ "bump-unchanged": import("@oclif/core/interfaces").BooleanFlag<boolean>;
17
+ "add-build-metadata": import("@oclif/core/interfaces").BooleanFlag<boolean>;
18
+ "timestamp-versions": import("@oclif/core/interfaces").BooleanFlag<boolean>;
19
+ "append-snapshot": import("@oclif/core/interfaces").BooleanFlag<boolean>;
20
+ "push-changes": import("@oclif/core/interfaces").BooleanFlag<boolean>;
21
+ "generate-changelog": import("@oclif/core/interfaces").BooleanFlag<boolean>;
22
+ };
23
+ run(): Promise<void>;
24
+ }
3
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAC;AAInD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,OAAO;IAC1C,OAAgB,WAAW,SAAkD;IAE7E,OAAgB,QAAQ,WAKtB;IAEF,MAAM,CAAC,IAAI;;;;MAMT;IAEF,OAAgB,KAAK;;;;;;;;;;;;MAiDnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA6B3B"}
package/dist/index.js CHANGED
@@ -1,6 +1,91 @@
1
- #!/usr/bin/env node
2
- import { run } from '@oclif/core';
3
- run().catch((err) => {
4
- console.error(err);
5
- process.exit(1);
6
- });
1
+ import { Args, Command, Flags } from "@oclif/core";
2
+ import { VerseRunner, initLogger } from "@muverse/core";
3
+ import { OclifLogger } from "./logger.js";
4
+ export default class Version extends Command {
5
+ static description = "Calculate and apply semantic version changes";
6
+ static examples = [
7
+ "<%= config.bin %> <%= command.id %>",
8
+ "<%= config.bin %> <%= command.id %> --adapter gradle",
9
+ "<%= config.bin %> <%= command.id %> --dry-run",
10
+ "<%= config.bin %> <%= command.id %> --prerelease-mode --prerelease-id alpha",
11
+ ];
12
+ static args = {
13
+ repositoryRoot: Args.directory({
14
+ required: false,
15
+ description: "Path to the repository root",
16
+ default: ".",
17
+ }),
18
+ };
19
+ static flags = {
20
+ "dry-run": Flags.boolean({
21
+ description: "Run without writing or pushing changes",
22
+ default: false,
23
+ }),
24
+ adapter: Flags.string({
25
+ description: "Language adapter (e.g., gradle). Auto-detected if not provided",
26
+ required: false,
27
+ }),
28
+ "push-tags": Flags.boolean({
29
+ description: "Push tags to origin",
30
+ default: true,
31
+ }),
32
+ "prerelease-mode": Flags.boolean({
33
+ description: "Generate pre-release versions instead of final versions",
34
+ default: false,
35
+ }),
36
+ "prerelease-id": Flags.string({
37
+ description: "Pre-release identifier (e.g., alpha, beta, rc)",
38
+ default: "alpha",
39
+ }),
40
+ "bump-unchanged": Flags.boolean({
41
+ description: "In prerelease mode, bump modules even when no changes are detected",
42
+ default: false,
43
+ }),
44
+ "add-build-metadata": Flags.boolean({
45
+ description: "Add build metadata with short SHA to all versions",
46
+ default: false,
47
+ }),
48
+ "timestamp-versions": Flags.boolean({
49
+ description: "Use timestamp-based prerelease identifiers (requires prerelease-mode)",
50
+ default: false,
51
+ }),
52
+ "append-snapshot": Flags.boolean({
53
+ description: "Add -SNAPSHOT suffix to all versions if supported by adapter",
54
+ default: false,
55
+ }),
56
+ "push-changes": Flags.boolean({
57
+ description: "Commit and push version changes and changelogs to remote",
58
+ default: true,
59
+ }),
60
+ "generate-changelog": Flags.boolean({
61
+ description: "Generate or update changelog files for changed modules",
62
+ default: true,
63
+ }),
64
+ };
65
+ async run() {
66
+ const { flags, args } = await this.parse(Version);
67
+ initLogger(new OclifLogger(this));
68
+ try {
69
+ const options = {
70
+ repoRoot: args.repositoryRoot,
71
+ adapter: flags.adapter,
72
+ dryRun: flags["dry-run"],
73
+ pushTags: flags["push-tags"],
74
+ prereleaseMode: flags["prerelease-mode"],
75
+ prereleaseId: flags["prerelease-id"],
76
+ bumpUnchanged: flags["bump-unchanged"],
77
+ addBuildMetadata: flags["add-build-metadata"],
78
+ timestampVersions: flags["timestamp-versions"],
79
+ appendSnapshot: flags["append-snapshot"],
80
+ pushChanges: flags["push-changes"],
81
+ generateChangelog: flags["generate-changelog"],
82
+ };
83
+ const runner = new VerseRunner(options);
84
+ await runner.run();
85
+ }
86
+ catch (error) {
87
+ const errorMessage = error instanceof Error ? error.message : String(error);
88
+ this.error(`❌ Command failed: ${errorMessage}`);
89
+ }
90
+ }
91
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muverse/cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "muVERSE CLI - Command-line interface for μVERSE semantic versioning engine",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -38,7 +38,7 @@
38
38
  "types": "dist/index.d.ts",
39
39
  "dependencies": {
40
40
  "@oclif/core": "^4.8.0",
41
- "@muverse/core": "^0.1.1",
41
+ "@muverse/core": "^0.1.2",
42
42
  "oclif": "^4.14.0"
43
43
  },
44
44
  "devDependencies": {
@@ -59,9 +59,12 @@
59
59
  },
60
60
  "oclif": {
61
61
  "bin": "muverse",
62
- "commands": "./dist/commands",
63
62
  "dirname": "muverse",
64
63
  "topicSeparator": " ",
65
- "plugins": []
64
+ "plugins": [],
65
+ "commands": {
66
+ "strategy": "single",
67
+ "target": "./dist/index.js"
68
+ }
66
69
  }
67
70
  }
@@ -1,25 +0,0 @@
1
- import { Command } from "@oclif/core";
2
- export default class Version extends Command {
3
- static description: string;
4
- static examples: string[];
5
- static args: {
6
- repositoryRoot: import("@oclif/core/interfaces").Arg<string, {
7
- exists?: boolean;
8
- }>;
9
- };
10
- static flags: {
11
- "dry-run": import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
- adapter: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
- "push-tags": import("@oclif/core/interfaces").BooleanFlag<boolean>;
14
- "prerelease-mode": import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
- "prerelease-id": import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
16
- "bump-unchanged": import("@oclif/core/interfaces").BooleanFlag<boolean>;
17
- "add-build-metadata": import("@oclif/core/interfaces").BooleanFlag<boolean>;
18
- "timestamp-versions": import("@oclif/core/interfaces").BooleanFlag<boolean>;
19
- "append-snapshot": import("@oclif/core/interfaces").BooleanFlag<boolean>;
20
- "push-changes": import("@oclif/core/interfaces").BooleanFlag<boolean>;
21
- "generate-changelog": import("@oclif/core/interfaces").BooleanFlag<boolean>;
22
- };
23
- run(): Promise<void>;
24
- }
25
- //# sourceMappingURL=version.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/commands/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAC;AAInD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,OAAO;IAC1C,OAAgB,WAAW,SAAkD;IAE7E,OAAgB,QAAQ,WAKtB;IAEF,MAAM,CAAC,IAAI;;;;MAKT;IAEF,OAAgB,KAAK;;;;;;;;;;;;MAiDnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA6B3B"}
@@ -1,90 +0,0 @@
1
- import { Args, Command, Flags } from "@oclif/core";
2
- import { VerseRunner, initLogger } from "@muverse/core";
3
- import { OclifLogger } from "../logger.js";
4
- export default class Version extends Command {
5
- static description = "Calculate and apply semantic version changes";
6
- static examples = [
7
- "<%= config.bin %> <%= command.id %>",
8
- "<%= config.bin %> <%= command.id %> --adapter gradle",
9
- "<%= config.bin %> <%= command.id %> --dry-run",
10
- "<%= config.bin %> <%= command.id %> --prerelease-mode --prerelease-id alpha",
11
- ];
12
- static args = {
13
- repositoryRoot: Args.directory({
14
- required: true,
15
- description: "Path to the repository root",
16
- }),
17
- };
18
- static flags = {
19
- "dry-run": Flags.boolean({
20
- description: "Run without writing or pushing changes",
21
- default: false,
22
- }),
23
- adapter: Flags.string({
24
- description: "Language adapter (e.g., gradle). Auto-detected if not provided",
25
- required: false,
26
- }),
27
- "push-tags": Flags.boolean({
28
- description: "Push tags to origin",
29
- default: true,
30
- }),
31
- "prerelease-mode": Flags.boolean({
32
- description: "Generate pre-release versions instead of final versions",
33
- default: false,
34
- }),
35
- "prerelease-id": Flags.string({
36
- description: "Pre-release identifier (e.g., alpha, beta, rc)",
37
- default: "alpha",
38
- }),
39
- "bump-unchanged": Flags.boolean({
40
- description: "In prerelease mode, bump modules even when no changes are detected",
41
- default: false,
42
- }),
43
- "add-build-metadata": Flags.boolean({
44
- description: "Add build metadata with short SHA to all versions",
45
- default: false,
46
- }),
47
- "timestamp-versions": Flags.boolean({
48
- description: "Use timestamp-based prerelease identifiers (requires prerelease-mode)",
49
- default: false,
50
- }),
51
- "append-snapshot": Flags.boolean({
52
- description: "Add -SNAPSHOT suffix to all versions if supported by adapter",
53
- default: false,
54
- }),
55
- "push-changes": Flags.boolean({
56
- description: "Commit and push version changes and changelogs to remote",
57
- default: true,
58
- }),
59
- "generate-changelog": Flags.boolean({
60
- description: "Generate or update changelog files for changed modules",
61
- default: true,
62
- }),
63
- };
64
- async run() {
65
- const { flags, args } = await this.parse(Version);
66
- initLogger(new OclifLogger(this));
67
- try {
68
- const options = {
69
- repoRoot: args.repositoryRoot,
70
- adapter: flags.adapter,
71
- dryRun: flags["dry-run"],
72
- pushTags: flags["push-tags"],
73
- prereleaseMode: flags["prerelease-mode"],
74
- prereleaseId: flags["prerelease-id"],
75
- bumpUnchanged: flags["bump-unchanged"],
76
- addBuildMetadata: flags["add-build-metadata"],
77
- timestampVersions: flags["timestamp-versions"],
78
- appendSnapshot: flags["append-snapshot"],
79
- pushChanges: flags["push-changes"],
80
- generateChangelog: flags["generate-changelog"],
81
- };
82
- const runner = new VerseRunner(options);
83
- await runner.run();
84
- }
85
- catch (error) {
86
- const errorMessage = error instanceof Error ? error.message : String(error);
87
- this.error(`❌ Command failed: ${errorMessage}`);
88
- }
89
- }
90
- }