mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-06 03:14:00 +00:00
release: v0.1.0 — one-click install, keyless boot, in-app Provider Settings (#142)
The first formal release. - One-click install via Pinokio; keyless boot lands on a live Esri World Imagery satellite globe with keyless terrain, with automatic OSM fallback and graceful degradation when terrain is unavailable. - Provider Settings (the POWER UP panel): add, replace, or remove API keys inside the app; credential files made owner-only before any secret is written; external keys shown read-only; the panel refuses shared or proxied servers. - Keyless capability responses for the optional HUD summary and place search. - Aircraft-identity voice answers cover operator, type, and route, and say so plainly when enrichment is unavailable. - README rewritten keyless-first; concise 0.1.0 changelog section; CI workflow included. Gates: 2,672 unit tests pass / 0 fail, build clean, tracking regression 108/108, map-source tray QA pass, setup doctor ready.
This commit is contained in:
1 parent
6d83bb6008
commit
b6da93b8ac
170 files changed
+5800
-853
No files matched your search
@@ -0,0 +1,64 @@
|
||||
#!/usr/bin/env node
|
||||
import { realpathSync, rmSync, writeFileSync } from 'node:fs';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { applyPinokioEnvironment } from './pinokio-environment.mjs';
|
||||
import { formatSetupReport, inspectSetup, npmProcessSpec } from './setup-doctor.mjs';
|
||||
|
||||
const MODULE_PATH = fileURLToPath(import.meta.url);
|
||||
const ROOT = realpathSync(path.resolve(path.dirname(MODULE_PATH), '..'));
|
||||
const READY_FILE = path.join(ROOT, 'pinokio', '.installed');
|
||||
|
||||
export function runChecked(command, args, { shell = false } = {}) {
|
||||
const result = spawnSync(command, args, {
|
||||
cwd: ROOT,
|
||||
env: { ...process.env, PUPPETEER_SKIP_DOWNLOAD: '1' },
|
||||
shell,
|
||||
stdio: 'inherit',
|
||||
});
|
||||
if (result.error) throw result.error;
|
||||
if (result.status !== 0) process.exit(result.status || 1);
|
||||
}
|
||||
|
||||
export function installPinokioDependencies() {
|
||||
applyPinokioEnvironment();
|
||||
rmSync(READY_FILE, { force: true });
|
||||
const npm = npmProcessSpec();
|
||||
runChecked(npm.command, ['ci'], { shell: npm.shell });
|
||||
|
||||
// Pinokio starts Vite directly and loads only its ENVIRONMENT file plus the
|
||||
// normal dotenv ladder. Unlike dev-fresh.sh, it does not import macOS
|
||||
// Keychain items, so its install report must describe that exact runtime.
|
||||
const report = inspectSetup({
|
||||
includeKeychain: false,
|
||||
// The raw app ENVIRONMENT file was applied above. Even an empty field now
|
||||
// shadows Vite's dotenv ladder, so diagnosis must stop there instead of
|
||||
// claiming a dotenv-only value will reach the launched app.
|
||||
authoritativeEnvironment: true,
|
||||
});
|
||||
console.log(`\n${formatSetupReport(report, {
|
||||
readyMessage: 'Ready. Return to Pinokio and choose Start.',
|
||||
})}\n`);
|
||||
if (!report.ready) process.exit(1);
|
||||
|
||||
writeFileSync(READY_FILE, `${new Date().toISOString()}\n`, { mode: 0o600 });
|
||||
console.log('[Pinokio] Installation ready.');
|
||||
}
|
||||
|
||||
export function isDirectInvocation(
|
||||
invokedPath = process.argv[1],
|
||||
modulePath = MODULE_PATH,
|
||||
) {
|
||||
if (typeof invokedPath !== 'string' || invokedPath.length === 0) return false;
|
||||
if (typeof modulePath !== 'string' || modulePath.length === 0) return false;
|
||||
try {
|
||||
return realpathSync(path.resolve(invokedPath)) === realpathSync(path.resolve(modulePath));
|
||||
} catch {
|
||||
return path.resolve(invokedPath) === path.resolve(modulePath);
|
||||
}
|
||||
}
|
||||
|
||||
if (isDirectInvocation()) {
|
||||
installPinokioDependencies();
|
||||
}
|
||||
Reference in new issue
Block a user