cortex-sync 0.4.2 → 0.4.3
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 +4 -2
- package/scripts/postinstall.cjs +29 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cortex-sync",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Sync Claude Code sessions between machines with automatic path remapping and skill conversion",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"type": "module",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
|
+
"scripts",
|
|
12
13
|
"README.md",
|
|
13
14
|
"CHANGELOG.md",
|
|
14
15
|
"LICENSE"
|
|
@@ -31,7 +32,8 @@
|
|
|
31
32
|
"build": "tsup",
|
|
32
33
|
"dev": "tsup --watch",
|
|
33
34
|
"test": "vitest run",
|
|
34
|
-
"typecheck": "tsc --noEmit"
|
|
35
|
+
"typecheck": "tsc --noEmit",
|
|
36
|
+
"postinstall": "node scripts/postinstall.cjs"
|
|
35
37
|
},
|
|
36
38
|
"dependencies": {
|
|
37
39
|
"@anthropic-ai/sdk": "^0.95.2",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { execSync } = require('child_process');
|
|
5
|
+
const { join } = require('path');
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
const prefix = execSync('npm config get prefix', { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'ignore'] }).trim();
|
|
9
|
+
const binDir = join(prefix, 'bin');
|
|
10
|
+
const pathDirs = (process.env.PATH || '').split(':');
|
|
11
|
+
const inPath = pathDirs.some((d) => d === binDir);
|
|
12
|
+
|
|
13
|
+
if (!inPath) {
|
|
14
|
+
console.log('\n╔════════════════════════════════════════════════╗');
|
|
15
|
+
console.log('║ cortex installed — but needs a PATH fix ║');
|
|
16
|
+
console.log('╚════════════════════════════════════════════════╝');
|
|
17
|
+
console.log(`\n Binary location: ${join(binDir, 'cortex')}`);
|
|
18
|
+
console.log(` Missing from PATH: ${binDir}\n`);
|
|
19
|
+
console.log(' Fix (add ONE of these to ~/.zshrc or ~/.bashrc):\n');
|
|
20
|
+
console.log(` export PATH="${binDir}:$PATH"\n`);
|
|
21
|
+
console.log(' Then reload your shell:');
|
|
22
|
+
console.log(' source ~/.zshrc (zsh)');
|
|
23
|
+
console.log(' source ~/.bashrc (bash)\n');
|
|
24
|
+
} else {
|
|
25
|
+
console.log(`\n ✓ cortex installed. Run: cortex --version\n`);
|
|
26
|
+
}
|
|
27
|
+
} catch {
|
|
28
|
+
// silently ignore — postinstall must never break the install
|
|
29
|
+
}
|