deepflow 0.1.13 → 0.1.14
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/VERSION +1 -1
- package/bin/install.js +14 -14
- package/package.json +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.14
|
package/bin/install.js
CHANGED
|
@@ -122,31 +122,31 @@ async function main() {
|
|
|
122
122
|
|
|
123
123
|
// Copy VERSION file (for update checking)
|
|
124
124
|
const versionFile = path.join(PACKAGE_DIR, 'VERSION');
|
|
125
|
+
let installedVersion = null;
|
|
125
126
|
if (fs.existsSync(versionFile)) {
|
|
126
127
|
fs.copyFileSync(versionFile, path.join(CLAUDE_DIR, 'deepflow', 'VERSION'));
|
|
128
|
+
installedVersion = fs.readFileSync(versionFile, 'utf8').trim();
|
|
127
129
|
log('Version file installed');
|
|
128
130
|
}
|
|
129
131
|
|
|
130
|
-
//
|
|
131
|
-
const
|
|
132
|
-
|
|
132
|
+
// Update cache to reflect installed version (prevents stale "update available" message)
|
|
133
|
+
const cacheDir = path.join(GLOBAL_DIR, 'cache');
|
|
134
|
+
const cacheFile = path.join(cacheDir, 'df-update-check.json');
|
|
135
|
+
if (installedVersion) {
|
|
136
|
+
fs.mkdirSync(cacheDir, { recursive: true });
|
|
137
|
+
fs.writeFileSync(cacheFile, JSON.stringify({
|
|
138
|
+
updateAvailable: false,
|
|
139
|
+
currentVersion: installedVersion,
|
|
140
|
+
latestVersion: installedVersion,
|
|
141
|
+
timestamp: Date.now()
|
|
142
|
+
}, null, 2));
|
|
143
|
+
} else if (fs.existsSync(cacheFile)) {
|
|
133
144
|
fs.unlinkSync(cacheFile);
|
|
134
145
|
}
|
|
135
146
|
|
|
136
147
|
// Configure statusline (global only)
|
|
137
148
|
if (level === 'global') {
|
|
138
149
|
await configureStatusline(CLAUDE_DIR);
|
|
139
|
-
|
|
140
|
-
// Trigger background update check
|
|
141
|
-
const updateChecker = path.join(CLAUDE_DIR, 'hooks', 'df-check-update.js');
|
|
142
|
-
if (fs.existsSync(updateChecker)) {
|
|
143
|
-
const { spawn } = require('child_process');
|
|
144
|
-
const child = spawn(process.execPath, [updateChecker], {
|
|
145
|
-
detached: true,
|
|
146
|
-
stdio: 'ignore'
|
|
147
|
-
});
|
|
148
|
-
child.unref();
|
|
149
|
-
}
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
console.log('');
|