mirror of
https://github.com/complexcaresolutions/cms.c2sgmbh.git
synced 2026-03-17 15:04:14 +00:00
- Add .claude/ configuration (agents, commands, hooks, get-shit-done workflows) - Add prompts/ directory with development planning documents - Add scripts/setup-tenants/ with tenant configuration - Add docs/screenshots/ - Remove obsolete phase2.2-corrections-report.md - Update pnpm-lock.yaml - Update detect-secrets.sh to ignore setup.sh (env var usage, not secrets) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
51 lines
1.4 KiB
JavaScript
Executable file
51 lines
1.4 KiB
JavaScript
Executable file
#!/usr/bin/env node
|
|
// Check for GSD updates in background, write result to cache
|
|
// Called by SessionStart hook - runs once per session
|
|
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
const os = require('os');
|
|
const { execSync, spawn } = require('child_process');
|
|
|
|
const homeDir = os.homedir();
|
|
const cacheDir = path.join(homeDir, '.claude', 'cache');
|
|
const cacheFile = path.join(cacheDir, 'gsd-update-check.json');
|
|
const versionFile = path.join(homeDir, '.claude', 'get-shit-done', 'VERSION');
|
|
|
|
// Ensure cache directory exists
|
|
if (!fs.existsSync(cacheDir)) {
|
|
fs.mkdirSync(cacheDir, { recursive: true });
|
|
}
|
|
|
|
// Run check in background (spawn detached process)
|
|
const child = spawn(process.execPath, ['-e', `
|
|
const fs = require('fs');
|
|
const { execSync } = require('child_process');
|
|
|
|
const cacheFile = ${JSON.stringify(cacheFile)};
|
|
const versionFile = ${JSON.stringify(versionFile)};
|
|
|
|
let installed = '0.0.0';
|
|
try {
|
|
installed = fs.readFileSync(versionFile, 'utf8').trim();
|
|
} catch (e) {}
|
|
|
|
let latest = null;
|
|
try {
|
|
latest = execSync('npm view get-shit-done-cc version', { encoding: 'utf8', timeout: 10000 }).trim();
|
|
} catch (e) {}
|
|
|
|
const result = {
|
|
update_available: latest && installed !== latest,
|
|
installed,
|
|
latest: latest || 'unknown',
|
|
checked: Math.floor(Date.now() / 1000)
|
|
};
|
|
|
|
fs.writeFileSync(cacheFile, JSON.stringify(result));
|
|
`], {
|
|
detached: true,
|
|
stdio: 'ignore'
|
|
});
|
|
|
|
child.unref();
|