@versu/cli 0.4.0 → 0.4.1

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
@@ -20,7 +20,7 @@ export default class Version extends Command {
20
20
  "append-snapshot": import("@oclif/core/interfaces").BooleanFlag<boolean>;
21
21
  "push-changes": import("@oclif/core/interfaces").BooleanFlag<boolean>;
22
22
  "generate-changelog": import("@oclif/core/interfaces").BooleanFlag<boolean>;
23
- "output-file": import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
23
+ "output-file": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
24
24
  };
25
25
  run(): Promise<void>;
26
26
  }
@@ -1 +1 @@
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;;;;;;;;;;;;;;MAyDnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA8B3B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAC;AAKnD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,OAAO;IAC1C,OAAgB,WAAW,SAAkD;IAE7E,OAAgB,QAAQ,WAKtB;IAEF,MAAM,CAAC,IAAI;;;;MAMT;IAEF,OAAgB,KAAK;;;;;;;;;;;;;;MAyDnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAgC3B"}
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Args, Command, Flags } from "@oclif/core";
2
2
  import { VersuRunner, initLogger } from "@versu/core";
3
3
  import { OclifLogger } from "./logger.js";
4
+ import * as path from "path";
4
5
  export default class Version extends Command {
5
6
  static description = "Calculate and apply semantic version changes";
6
7
  static examples = [
@@ -67,11 +68,12 @@ export default class Version extends Command {
67
68
  }),
68
69
  "output-file": Flags.string({
69
70
  description: "Path to the output file for project information",
70
- default: "project-information.json",
71
+ required: false,
71
72
  }),
72
73
  };
73
74
  async run() {
74
75
  const { flags, args } = await this.parse(Version);
76
+ const defaultOutputFile = flags["output-file"] || path.join(args.repositoryRoot, "project-information.json");
75
77
  initLogger(new OclifLogger(this));
76
78
  try {
77
79
  const options = {
@@ -87,7 +89,7 @@ export default class Version extends Command {
87
89
  appendSnapshot: flags["append-snapshot"],
88
90
  pushChanges: flags["push-changes"],
89
91
  generateChangelog: flags["generate-changelog"],
90
- outputFile: flags["output-file"],
92
+ outputFile: defaultOutputFile,
91
93
  };
92
94
  const runner = new VersuRunner(options);
93
95
  await runner.run();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versu/cli",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Version Engine for Repo Semantic Evolution (CLI)",
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
- "@versu/core": "^0.4.0",
41
+ "@versu/core": "^0.4.1",
42
42
  "oclif": "^4.14.0"
43
43
  },
44
44
  "devDependencies": {