Skip to content

Commit 3dc27ab

Browse files
fix: add codegate-ai bin alias for npx invocation
1 parent 58303ef commit 3dc27ab

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

package-lock.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"security"
2424
],
2525
"bin": {
26-
"codegate": "dist/cli.js"
26+
"codegate": "dist/cli.js",
27+
"codegate-ai": "dist/cli.js"
2728
},
2829
"scripts": {
2930
"build": "tsc -p tsconfig.json && node scripts/copy-assets.mjs",

tests/meta/tooling-contract.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ function readPackageJson(): {
99
engines?: Record<string, string>;
1010
"lint-staged"?: Record<string, string[] | string>;
1111
devDependencies?: Record<string, string>;
12+
bin?: Record<string, string>;
1213
} {
1314
const content = readFileSync(resolve(root, "package.json"), "utf8");
1415
return JSON.parse(content) as {
1516
scripts?: Record<string, string>;
1617
engines?: Record<string, string>;
1718
"lint-staged"?: Record<string, string[] | string>;
1819
devDependencies?: Record<string, string>;
20+
bin?: Record<string, string>;
1921
};
2022
}
2123

@@ -49,4 +51,10 @@ describe("task 02 tooling contract", () => {
4951
expect(existsSync(resolve(root, ".husky/pre-commit"))).toBe(true);
5052
expect(readFileSync(resolve(root, ".husky/pre-commit"), "utf8")).toContain("lint-staged");
5153
});
54+
55+
it("exposes both codegate and codegate-ai CLI bin aliases", () => {
56+
const bin = readPackageJson().bin ?? {};
57+
expect(bin).toHaveProperty("codegate", "dist/cli.js");
58+
expect(bin).toHaveProperty("codegate-ai", "dist/cli.js");
59+
});
5260
});

0 commit comments

Comments
 (0)