nococli 1.0.0 → 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.
@@ -0,0 +1,83 @@
1
+ import { createRequire } from "node:module";
2
+ var __create = Object.create;
3
+ var __getProtoOf = Object.getPrototypeOf;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ function __accessProp(key) {
8
+ return this[key];
9
+ }
10
+ var __toESMCache_node;
11
+ var __toESMCache_esm;
12
+ var __toESM = (mod, isNodeMode, target) => {
13
+ var canCache = mod != null && typeof mod === "object";
14
+ if (canCache) {
15
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
+ var cached = cache.get(mod);
17
+ if (cached)
18
+ return cached;
19
+ }
20
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
21
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
+ for (let key of __getOwnPropNames(mod))
23
+ if (!__hasOwnProp.call(to, key))
24
+ __defProp(to, key, {
25
+ get: __accessProp.bind(mod, key),
26
+ enumerable: true
27
+ });
28
+ if (canCache)
29
+ cache.set(mod, to);
30
+ return to;
31
+ };
32
+ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
33
+ var __returnValue = (v) => v;
34
+ function __exportSetter(name, newValue) {
35
+ this[name] = __returnValue.bind(null, newValue);
36
+ }
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, {
40
+ get: all[name],
41
+ enumerable: true,
42
+ configurable: true,
43
+ set: __exportSetter.bind(all, name)
44
+ });
45
+ };
46
+ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
47
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
48
+
49
+ // src/utils/paths.ts
50
+ import path from "path";
51
+ import os from "os";
52
+ import fs from "fs/promises";
53
+ function getHomeDir() {
54
+ return os.homedir();
55
+ }
56
+ function getConfig() {
57
+ const homeDir = getHomeDir();
58
+ const templateDir = path.join(homeDir, ".git-templates");
59
+ const hooksDir = path.join(templateDir, "hooks");
60
+ const hookFile = path.join(hooksDir, "commit-msg");
61
+ return {
62
+ templateDir,
63
+ hooksDir,
64
+ hookFile
65
+ };
66
+ }
67
+ function toGitPath(filePath) {
68
+ return filePath.replace(/\\/g, "/");
69
+ }
70
+ async function pathExists(filePath) {
71
+ try {
72
+ await fs.promises.access(filePath);
73
+ return true;
74
+ } catch {
75
+ return false;
76
+ }
77
+ }
78
+ export {
79
+ toGitPath,
80
+ pathExists,
81
+ getHomeDir,
82
+ getConfig
83
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nococli",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Keep your code yours — remove AI co-author signatures from git commits",
5
5
  "type": "module",
6
6
  "main": "./dist/install.js",
@@ -8,10 +8,10 @@
8
8
  "noco": "./dist/cli.js"
9
9
  },
10
10
  "scripts": {
11
- "build": "bun build ./src/*.ts --outdir ./dist --target bun && bun build ./src/*.ts --outdir ./dist --target node",
11
+ "build": "bun build ./src/cli.ts ./src/install.ts ./src/uninstall.ts ./src/types.ts ./src/utils/logger.ts ./src/utils/paths.ts ./src/utils/hook.ts ./src/utils/git.ts --outdir ./dist --target bun && bun build ./src/cli.ts ./src/install.ts ./src/uninstall.ts ./src/types.ts ./src/utils/logger.ts ./src/utils/paths.ts ./src/utils/hook.ts ./src/utils/git.ts --outdir ./dist --target node && node -e \"const fs=require('fs'); const p='./dist/cli.js'; fs.writeFileSync(p, '#!/usr/bin/env node\\n' + fs.readFileSync(p, 'utf8'));\"",
12
12
  "dev": "bun run src/cli.ts",
13
13
  "test": "bun test",
14
- "prepublishOnly": "bun run build"
14
+ "test:e2e": "node ./scripts/e2e-install.mjs"
15
15
  },
16
16
  "keywords": [
17
17
  "git",
@@ -27,7 +27,7 @@
27
27
  "license": "MIT",
28
28
  "repository": {
29
29
  "type": "git",
30
- "url": "https://github.com/yourusername/git-no-ai-author"
30
+ "url": "https://github.com/doanbactam/noco"
31
31
  },
32
32
  "dependencies": {
33
33
  "chalk": "^5.3.0",