kob-cli 1.0.1 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kob-cli",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "KOB CLI — AI-powered code generation tool. Built by Kob AI, made in Thailand.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -23,6 +23,7 @@
23
23
  "start": "bun run src/index.ts",
24
24
  "build": "bun build src/index.ts --compile --outfile kob-cli",
25
25
  "prepublishOnly": "bun run build",
26
+ "publish": "bun run src/scripts/release.ts",
26
27
  "release:patch": "npm version patch --no-git-tag-version && npm publish",
27
28
  "release:minor": "npm version minor --no-git-tag-version && npm publish",
28
29
  "release:major": "npm version major --no-git-tag-version && npm publish"
@@ -0,0 +1,16 @@
1
+ import { readFileSync, writeFileSync } from 'fs';
2
+ import { execSync } from 'child_process';
3
+ import { resolve } from 'path';
4
+
5
+ const pkgPath = resolve(import.meta.dir, '../../package.json');
6
+ const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
7
+
8
+ const parts = pkg.version.split('.').map(Number);
9
+ parts[2] += 1;
10
+ pkg.version = parts.join('.');
11
+
12
+ writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
13
+ console.log(`\n 📦 ${pkg.name}@${pkg.version}\n`);
14
+
15
+ execSync('bun run build', { stdio: 'inherit', cwd: resolve(import.meta.dir, '../..') });
16
+ execSync('npm publish --ignore-scripts', { stdio: 'inherit', cwd: resolve(import.meta.dir, '../..') });