prjct-cli 2.32.1 → 2.32.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": "prjct-cli",
3
- "version": "2.32.1",
3
+ "version": "2.32.2",
4
4
  "description": "Context layer for AI agents. Project context for Claude Code, Gemini CLI, and more.",
5
5
  "main": "dist/bin/prjct.mjs",
6
6
  "bin": {
@@ -17,7 +17,6 @@
17
17
  "release:patch": "node scripts/release.js patch",
18
18
  "release:minor": "node scripts/release.js minor",
19
19
  "release:major": "node scripts/release.js major",
20
- "postinstall": "node scripts/postinstall.js",
21
20
  "prepare": "lefthook install",
22
21
  "update-commands": "bun -e \"const installer = require('./core/infrastructure/command-installer'); installer.syncCommands().then(r => console.log('Commands updated:', r)).catch(e => console.error('Error:', e.message))\"",
23
22
  "install-global": "./scripts/install.sh",
@@ -55,7 +54,6 @@
55
54
  "dependencies": {
56
55
  "@clack/prompts": "1.0.0",
57
56
  "@modelcontextprotocol/sdk": "1.29.0",
58
- "better-sqlite3": "12.9.0",
59
57
  "chalk": "4.1.2",
60
58
  "chokidar": "5.0.0",
61
59
  "date-fns": "4.1.0",
@@ -72,7 +70,6 @@
72
70
  },
73
71
  "devDependencies": {
74
72
  "@biomejs/biome": "2.3.13",
75
- "@types/better-sqlite3": "7.6.13",
76
73
  "@types/bun": "latest",
77
74
  "@types/chokidar": "2.1.7",
78
75
  "esbuild": "0.25.0",
@@ -91,24 +88,18 @@
91
88
  "packageManager": "bun@1.2.23",
92
89
  "engines": {
93
90
  "bun": ">=1.0.0",
94
- "node": ">=22.22.2"
91
+ "node": ">=22.5.0"
95
92
  },
96
93
  "files": [
97
94
  "assets/",
98
95
  "bin/prjct",
99
96
  "dist/",
100
97
  "templates/",
101
- "scripts/ensure-native-deps.js",
102
- "scripts/postinstall.js",
103
98
  "scripts/ensure-bun.sh",
104
99
  "scripts/install.sh",
105
100
  "LICENSE",
106
101
  "README.md",
107
102
  "CHANGELOG.md"
108
103
  ],
109
- "prepublishOnly": "node scripts/build.js",
110
- "trustedDependencies": [
111
- "better-sqlite3",
112
- "chalk"
113
- ]
104
+ "prepublishOnly": "node scripts/build.js"
114
105
  }
@@ -1,64 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const { execFileSync } = require('node:child_process')
4
- const path = require('node:path')
5
-
6
- const ROOT = path.resolve(__dirname, '..')
7
-
8
- function npmCommand() {
9
- return process.platform === 'win32' ? 'npm.cmd' : 'npm'
10
- }
11
-
12
- function hasBetterSqliteBinding() {
13
- try {
14
- const Database = require('better-sqlite3')
15
- new Database(':memory:').close()
16
- return true
17
- } catch (error) {
18
- const message = error instanceof Error ? error.message : String(error)
19
- if (
20
- message.includes('Could not locate the bindings file') ||
21
- message.includes('better_sqlite3.node')
22
- ) {
23
- return false
24
- }
25
- throw error
26
- }
27
- }
28
-
29
- function ensureNativeDependencies(options = {}) {
30
- if (process.env.PRJCT_SKIP_NATIVE_REBUILD === '1') {
31
- return { rebuilt: false, skipped: true }
32
- }
33
- if (hasBetterSqliteBinding()) {
34
- return { rebuilt: false, skipped: false }
35
- }
36
-
37
- const stdio = options.stdio || 'inherit'
38
- execFileSync(npmCommand(), ['rebuild', 'better-sqlite3', '--foreground-scripts'], {
39
- cwd: ROOT,
40
- stdio,
41
- timeout: 120000,
42
- })
43
-
44
- if (!hasBetterSqliteBinding()) {
45
- throw new Error('better-sqlite3 native binding is still unavailable after rebuild')
46
- }
47
-
48
- return { rebuilt: true, skipped: false }
49
- }
50
-
51
- if (require.main === module) {
52
- try {
53
- ensureNativeDependencies()
54
- } catch (error) {
55
- const message = error instanceof Error ? error.message : String(error)
56
- console.error(`prjct native dependency install failed: ${message}`)
57
- process.exit(1)
58
- }
59
- }
60
-
61
- module.exports = {
62
- ensureNativeDependencies,
63
- hasBetterSqliteBinding,
64
- }
@@ -1,49 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * postinstall - Minimal setup message
5
- *
6
- * NOTE: postinstall often doesn't run (npm quirks, --ignore-scripts, etc.)
7
- * The reliable setup path is `prjct start` which users run manually.
8
- *
9
- * This script may repair required native dependencies, but it must never
10
- * install optional tools, mutate shell config, or configure integrations.
11
- */
12
-
13
- const fs = require('node:fs')
14
- const path = require('node:path')
15
- const { ensureNativeDependencies } = require('./ensure-native-deps')
16
-
17
- const ROOT = path.resolve(__dirname, '..')
18
- const pkg = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf-8'))
19
- const VERSION = pkg.version
20
-
21
- // Colors
22
- const CYAN = '\x1b[36m'
23
- const GREEN = '\x1b[32m'
24
- const DIM = '\x1b[2m'
25
- const BOLD = '\x1b[1m'
26
- const RESET = '\x1b[0m'
27
-
28
- try {
29
- const result = ensureNativeDependencies({ stdio: 'inherit' })
30
- if (result.rebuilt) {
31
- console.log(` ${DIM}Built required SQLite native dependency.${RESET}`)
32
- }
33
- } catch (error) {
34
- const message = error instanceof Error ? error.message : String(error)
35
- console.error(`\n${BOLD}prjct native dependency repair warning:${RESET} ${message}`)
36
- console.error(
37
- `${DIM}Install will continue. prjct will retry this repair before starting the daemon.${RESET}`
38
- )
39
- }
40
-
41
- console.log(`
42
- ${CYAN}${BOLD} prjct${RESET} ${DIM}v${VERSION}${RESET}
43
-
44
- ${GREEN}✓${RESET} Installed successfully!
45
-
46
- ${BOLD}Next step:${RESET} Run ${CYAN}prjct start${RESET} to configure your AI providers.
47
-
48
- ${DIM}Supports: Claude Code, Gemini CLI, or both${RESET}
49
- `)