@rigstate/cli 0.7.17 → 0.7.18
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.cjs +9 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +5 -3
package/dist/index.js
CHANGED
|
@@ -1754,6 +1754,7 @@ var require_dist2 = __commonJS({
|
|
|
1754
1754
|
|
|
1755
1755
|
// src/index.ts
|
|
1756
1756
|
init_esm_shims();
|
|
1757
|
+
import { createRequire } from "module";
|
|
1757
1758
|
import { Command as Command23 } from "commander";
|
|
1758
1759
|
import chalk33 from "chalk";
|
|
1759
1760
|
|
|
@@ -9703,14 +9704,14 @@ function createReleaseCommand() {
|
|
|
9703
9704
|
spinner.text = "Scanning completed tasks...";
|
|
9704
9705
|
const pkgPath = path24.resolve(process.cwd(), "package.json");
|
|
9705
9706
|
const pkgContent = await fs22.readFile(pkgPath, "utf-8");
|
|
9706
|
-
const
|
|
9707
|
-
const currentVersion =
|
|
9707
|
+
const pkg2 = JSON.parse(pkgContent);
|
|
9708
|
+
const currentVersion = pkg2.version;
|
|
9708
9709
|
const [major, minor, patch] = currentVersion.split(".").map(Number);
|
|
9709
9710
|
let newVersion = currentVersion;
|
|
9710
9711
|
if (type === "major") newVersion = `${major + 1}.0.0`;
|
|
9711
9712
|
if (type === "minor") newVersion = `${major}.${minor + 1}.0`;
|
|
9712
9713
|
if (type === "patch") newVersion = `${major}.${minor}.${patch + 1}`;
|
|
9713
|
-
spinner.succeed(`Bumping ${
|
|
9714
|
+
spinner.succeed(`Bumping ${pkg2.name} from ${chalk30.dim(currentVersion)} to ${chalk30.green(newVersion)}`);
|
|
9714
9715
|
const { confirm } = await inquirer5.prompt([{
|
|
9715
9716
|
type: "confirm",
|
|
9716
9717
|
name: "confirm",
|
|
@@ -9721,8 +9722,8 @@ function createReleaseCommand() {
|
|
|
9721
9722
|
console.log("Aborted.");
|
|
9722
9723
|
return;
|
|
9723
9724
|
}
|
|
9724
|
-
|
|
9725
|
-
await fs22.writeFile(pkgPath, JSON.stringify(
|
|
9725
|
+
pkg2.version = newVersion;
|
|
9726
|
+
await fs22.writeFile(pkgPath, JSON.stringify(pkg2, null, 4));
|
|
9726
9727
|
const changelogPath = path24.resolve(process.cwd(), "CHANGELOG.md");
|
|
9727
9728
|
const date = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
9728
9729
|
const entry = `
|
|
@@ -9882,9 +9883,11 @@ async function checkVersion() {
|
|
|
9882
9883
|
|
|
9883
9884
|
// src/index.ts
|
|
9884
9885
|
import dotenv from "dotenv";
|
|
9886
|
+
var require2 = createRequire(import.meta.url);
|
|
9887
|
+
var pkg = require2("../package.json");
|
|
9885
9888
|
dotenv.config();
|
|
9886
9889
|
var program = new Command23();
|
|
9887
|
-
program.name("rigstate").description("CLI for Rigstate - The AI-Native Dev Studio").version(
|
|
9890
|
+
program.name("rigstate").description("CLI for Rigstate - The AI-Native Dev Studio").version(pkg.version);
|
|
9888
9891
|
program.addCommand(createLoginCommand());
|
|
9889
9892
|
program.addCommand(createLinkCommand());
|
|
9890
9893
|
program.addCommand(createScanCommand());
|