@hasna/hooks 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/bin/index.js +6 -2
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -4280,7 +4280,8 @@ var {
4280
4280
  // src/cli/index.tsx
4281
4281
  import chalk2 from "chalk";
4282
4282
  import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
4283
- import { join as join3 } from "path";
4283
+ import { join as join3, dirname as dirname3 } from "path";
4284
+ import { fileURLToPath as fileURLToPath3 } from "url";
4284
4285
 
4285
4286
  // src/cli/components/App.tsx
4286
4287
  import { useState as useState7 } from "react";
@@ -5455,13 +5456,16 @@ function App({ initialHooks, overwrite = false }) {
5455
5456
  init_registry();
5456
5457
  init_installer();
5457
5458
  import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
5459
+ var __dirname4 = dirname3(fileURLToPath3(import.meta.url));
5460
+ var pkgPath = existsSync3(join3(__dirname4, "..", "package.json")) ? join3(__dirname4, "..", "package.json") : join3(__dirname4, "..", "..", "package.json");
5461
+ var pkg2 = JSON.parse(readFileSync3(pkgPath, "utf-8"));
5458
5462
  var program2 = new Command;
5459
5463
  function resolveScope(options) {
5460
5464
  if (options.project)
5461
5465
  return "project";
5462
5466
  return "global";
5463
5467
  }
5464
- program2.name("hooks").description("Install hooks for AI coding agents").version("0.1.1");
5468
+ program2.name("hooks").description("Install hooks for AI coding agents").version(pkg2.version);
5465
5469
  program2.command("interactive", { isDefault: true }).alias("i").description("Interactive hook browser").action(() => {
5466
5470
  render(/* @__PURE__ */ jsxDEV8(App, {}, undefined, false, undefined, this));
5467
5471
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/hooks",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Open source hooks library for AI coding agents - Install safety, quality, and automation hooks with a single command",
5
5
  "type": "module",
6
6
  "bin": {