deepflow 0.1.21 → 0.1.22
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/hooks/df-check-update.js +1 -12
- package/package.json +1 -1
package/hooks/df-check-update.js
CHANGED
|
@@ -12,7 +12,6 @@ const os = require('os');
|
|
|
12
12
|
const PACKAGE_NAME = 'deepflow';
|
|
13
13
|
const CACHE_DIR = path.join(os.homedir(), '.claude', 'cache');
|
|
14
14
|
const CACHE_FILE = path.join(CACHE_DIR, 'df-update-check.json');
|
|
15
|
-
const CHECK_INTERVAL = 24 * 60 * 60 * 1000; // 24 hours
|
|
16
15
|
|
|
17
16
|
// If called directly, spawn background process and exit
|
|
18
17
|
if (process.argv[2] !== '--background') {
|
|
@@ -32,15 +31,6 @@ async function checkForUpdate() {
|
|
|
32
31
|
fs.mkdirSync(CACHE_DIR, { recursive: true });
|
|
33
32
|
}
|
|
34
33
|
|
|
35
|
-
// Check if we've checked recently
|
|
36
|
-
if (fs.existsSync(CACHE_FILE)) {
|
|
37
|
-
const cache = JSON.parse(fs.readFileSync(CACHE_FILE, 'utf8'));
|
|
38
|
-
const age = Date.now() - (cache.timestamp || 0);
|
|
39
|
-
if (age < CHECK_INTERVAL) {
|
|
40
|
-
process.exit(0);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
34
|
// Get current version
|
|
45
35
|
const currentVersion = getCurrentVersion();
|
|
46
36
|
if (!currentVersion) {
|
|
@@ -92,8 +82,7 @@ function getLatestVersion() {
|
|
|
92
82
|
const timeout = setTimeout(() => resolve(null), 10000);
|
|
93
83
|
|
|
94
84
|
const child = spawn('npm', ['view', PACKAGE_NAME, 'version'], {
|
|
95
|
-
stdio: ['ignore', 'pipe', 'ignore']
|
|
96
|
-
shell: true
|
|
85
|
+
stdio: ['ignore', 'pipe', 'ignore']
|
|
97
86
|
});
|
|
98
87
|
|
|
99
88
|
let output = '';
|