Files
CD c97414cd37 fix(bridge): stall-based approval detection + known issues from deep debugging
- IDLE→stall detection: RUNNING+delta=0 for 6 polls (30s)
- lastModifiedTime-based thinking filter (partial)
- ResolveOutstandingSteps confirmed CANCELS steps (removed)
- HandleCascadeUserInteraction always socket hang up (removed)
- VS Code accept commands: silent success, no effect
- Hybrid approval: focus+all commands sequential, no break
- logToFile: console.log backup added
- Known issues: 4 critical findings documented
- better-antigravity reference added for future research
2026-03-08 14:38:41 +09:00

45 lines
1.4 KiB
JavaScript

#!/usr/bin/env node
/**
* Publish to Open VSX using token from .env
*
* Usage:
* node publish-ovsx.mjs — publish VSIX
* node publish-ovsx.mjs create-namespace — create publisher namespace (first time only)
*/
import { readFileSync } from 'fs';
import { execSync } from 'child_process';
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const pkg = require('./package.json');
const cmd = process.argv[2] || 'publish';
// Read token from .env
let pat;
try {
const env = readFileSync('.env', 'utf8');
const match = env.match(/OVSX_PAT=(.+)/);
if (!match) throw new Error('OVSX_PAT not found in .env');
pat = match[1].trim();
} catch (err) {
console.error('ERROR: Could not read .env file. Create .env with OVSX_PAT=<token>');
process.exit(1);
}
try {
if (cmd === 'create-namespace') {
console.log(`Creating namespace "${pkg.publisher}" on Open VSX...`);
execSync(`npx ovsx create-namespace ${pkg.publisher} --pat ${pat}`, { stdio: 'inherit' });
console.log('Namespace created!');
} else {
const vsixFile = `out/better-antigravity.vsix`;
console.log(`Publishing ${vsixFile} to Open VSX...`);
execSync(`npx ovsx publish ${vsixFile} --pat ${pat}`, { stdio: 'inherit' });
console.log('Done!');
}
} catch {
process.exit(1);
}