@hallaxius/forge 0.1.0 → 0.1.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/cli.js +11 -13
- package/package.json +7 -3
- package/src/commands/version.ts +2 -9
- package/src/version.const.ts +2 -0
package/dist/cli.js
CHANGED
|
@@ -26554,9 +26554,9 @@ var require_dist3 = __commonJS((exports) => {
|
|
|
26554
26554
|
});
|
|
26555
26555
|
|
|
26556
26556
|
// src/cli.ts
|
|
26557
|
-
import { readFileSync as
|
|
26558
|
-
import { dirname
|
|
26559
|
-
import { fileURLToPath
|
|
26557
|
+
import { readFileSync as readFileSync2 } from "node:fs";
|
|
26558
|
+
import { dirname, resolve as resolve2 } from "node:path";
|
|
26559
|
+
import { fileURLToPath } from "node:url";
|
|
26560
26560
|
|
|
26561
26561
|
// ../node_modules/commander/esm.mjs
|
|
26562
26562
|
var import__ = __toESM(require_commander(), 1);
|
|
@@ -35538,15 +35538,13 @@ function register24(program2) {
|
|
|
35538
35538
|
});
|
|
35539
35539
|
}
|
|
35540
35540
|
|
|
35541
|
+
// src/version.const.ts
|
|
35542
|
+
var VERSION = "0.1.1";
|
|
35543
|
+
|
|
35541
35544
|
// src/commands/version.ts
|
|
35542
|
-
import { readFileSync as readFileSync2 } from "node:fs";
|
|
35543
|
-
import { dirname, join as join3 } from "node:path";
|
|
35544
|
-
import { fileURLToPath } from "node:url";
|
|
35545
|
-
var __dirname2 = dirname(fileURLToPath(import.meta.url));
|
|
35546
|
-
var pkg = JSON.parse(readFileSync2(join3(__dirname2, "../../package.json"), "utf-8"));
|
|
35547
35545
|
function register25(program2) {
|
|
35548
35546
|
program2.command("version").description("Show version").action(async () => {
|
|
35549
|
-
info(`Forge v${
|
|
35547
|
+
info(`Forge v${VERSION}`);
|
|
35550
35548
|
});
|
|
35551
35549
|
}
|
|
35552
35550
|
|
|
@@ -35603,11 +35601,11 @@ function register26(program2) {
|
|
|
35603
35601
|
}
|
|
35604
35602
|
|
|
35605
35603
|
// src/cli.ts
|
|
35606
|
-
var __filename2 =
|
|
35607
|
-
var
|
|
35608
|
-
var
|
|
35604
|
+
var __filename2 = fileURLToPath(import.meta.url);
|
|
35605
|
+
var __dirname2 = dirname(__filename2);
|
|
35606
|
+
var pkg = JSON.parse(readFileSync2(resolve2(__dirname2, "../package.json"), "utf-8"));
|
|
35609
35607
|
var program2 = new Command;
|
|
35610
|
-
program2.name("fg").description("Modern Git CLI for professional workflows").version(
|
|
35608
|
+
program2.name("fg").description("Modern Git CLI for professional workflows").version(pkg.version);
|
|
35611
35609
|
register19(program2);
|
|
35612
35610
|
register8(program2);
|
|
35613
35611
|
register16(program2);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hallaxius/forge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "A modern Git CLI with professional UX",
|
|
5
5
|
"author": "hallaxius",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,13 +12,14 @@
|
|
|
12
12
|
"types": "./dist/cli.d.ts",
|
|
13
13
|
"scripts": {
|
|
14
14
|
"dev": "bun --watch src/cli.ts",
|
|
15
|
-
"build": "bun
|
|
15
|
+
"build:version": "bun scripts/gen-version.mjs",
|
|
16
|
+
"build": "bun run build:version && bun build src/cli.ts --outdir dist --target node",
|
|
16
17
|
"start": "bun bin/forge.js",
|
|
17
18
|
"test": "bun test",
|
|
18
19
|
"lint": "biome check",
|
|
19
20
|
"format": "biome format --write",
|
|
20
21
|
"lint:fix": "biome check --write --unsafe",
|
|
21
|
-
"prepublishOnly": "bun
|
|
22
|
+
"prepublishOnly": "bun run build && bun test",
|
|
22
23
|
"prepack": "bun run build"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
@@ -51,6 +52,9 @@
|
|
|
51
52
|
"bugs": {
|
|
52
53
|
"url": "https://github.com/hallaxius/forge/issues"
|
|
53
54
|
},
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public"
|
|
57
|
+
},
|
|
54
58
|
"homepage": "https://github.com/hallaxius/forge#readme",
|
|
55
59
|
"keywords": [
|
|
56
60
|
"git",
|
package/src/commands/version.ts
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
import { readFileSync } from "node:fs";
|
|
2
|
-
import { dirname, join } from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
1
|
import type { Command } from "commander";
|
|
5
2
|
import { info } from "../lib/logger.js";
|
|
6
|
-
|
|
7
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
-
const pkg = JSON.parse(
|
|
9
|
-
readFileSync(join(__dirname, "../../package.json"), "utf-8"),
|
|
10
|
-
);
|
|
3
|
+
import { VERSION } from "../version.const.js";
|
|
11
4
|
|
|
12
5
|
export default function register(program: Command): void {
|
|
13
6
|
program
|
|
14
7
|
.command("version")
|
|
15
8
|
.description("Show version")
|
|
16
9
|
.action(async () => {
|
|
17
|
-
info(`Forge v${
|
|
10
|
+
info(`Forge v${VERSION}`);
|
|
18
11
|
});
|
|
19
12
|
}
|