gg-deploy 1.0.0 → 1.1.0
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/README.md +3 -2
- package/dist/cli.js +15 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/update.d.ts +2 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +96 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/lib/update-checker.d.ts +22 -0
- package/dist/lib/update-checker.d.ts.map +1 -0
- package/dist/lib/update-checker.js +202 -0
- package/dist/lib/update-checker.js.map +1 -0
- package/package.json +6 -2
- package/ui/dist/assets/{index-DuQvusTC.css → index-DCoiogDt.css} +1 -1
- package/ui/dist/assets/index-DToZwAqb.js +41 -0
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-DWy6cIAN.js +0 -41
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ npx gg-deploy status example.com user/repo # Health check
|
|
|
25
25
|
## Requirements
|
|
26
26
|
|
|
27
27
|
- **Node.js 18+** — Check with `node --version`
|
|
28
|
-
- **GoDaddy account** with API access
|
|
28
|
+
- **GoDaddy account** with **10+ domains** (API access requirement)
|
|
29
29
|
- **GitHub account** with a Personal Access Token
|
|
30
30
|
- **Domain on GoDaddy** you want to point to GitHub Pages
|
|
31
31
|
- **GitHub repo** with your site content (index.html or built site)
|
|
@@ -166,6 +166,7 @@ Then tell Claude: "Deploy example.com using user/repo"
|
|
|
166
166
|
| `403 Forbidden` | API key is for OTE (test). Create a **Production** key |
|
|
167
167
|
| `404 Not Found` | Domain not in your GoDaddy account |
|
|
168
168
|
| `422 Invalid` | Domain locked or has pending transfers |
|
|
169
|
+
| `403 Access denied` | Account needs **10+ domains** for API. Use Cloudflare (coming soon) |
|
|
169
170
|
| Red status dot | Hover for error. Usually auth issue |
|
|
170
171
|
|
|
171
172
|
### GitHub API Issues
|
|
@@ -237,7 +238,7 @@ Total time: ~60 seconds. DNS propagation: 10-60 minutes.
|
|
|
237
238
|
|
|
238
239
|
## Limitations
|
|
239
240
|
|
|
240
|
-
- GoDaddy only (
|
|
241
|
+
- GoDaddy only (10+ domains required for API; Cloudflare/Namecheap coming)
|
|
241
242
|
- Public repos or GitHub Pro required for Pages
|
|
242
243
|
- Only www subdomain supported
|
|
243
244
|
- One domain per deployment
|
package/dist/cli.js
CHANGED
|
@@ -4,13 +4,15 @@ import { Command } from 'commander';
|
|
|
4
4
|
import { planCommand } from './commands/plan.js';
|
|
5
5
|
import { applyCommand } from './commands/apply.js';
|
|
6
6
|
import { statusCommand } from './commands/status.js';
|
|
7
|
+
import { updateCommand } from './commands/update.js';
|
|
7
8
|
import { startMcpServer } from './mcp-server.js';
|
|
8
9
|
import { startUiServer } from './ui-server.js';
|
|
10
|
+
import { checkAndNotify, CURRENT_VERSION } from './lib/update-checker.js';
|
|
9
11
|
const program = new Command();
|
|
10
12
|
program
|
|
11
13
|
.name('gg-deploy')
|
|
12
14
|
.description('Free hosting deserves free tooling. Domain → GitHub Pages in 60 seconds.')
|
|
13
|
-
.version(
|
|
15
|
+
.version(CURRENT_VERSION);
|
|
14
16
|
program
|
|
15
17
|
.command('plan')
|
|
16
18
|
.description('Preview deployment without making changes (safe for AI agents)')
|
|
@@ -20,6 +22,8 @@ program
|
|
|
20
22
|
.action(async (domain, repo, opts) => {
|
|
21
23
|
const output = opts.output;
|
|
22
24
|
const result = await planCommand(domain, repo, output);
|
|
25
|
+
if (output === 'human')
|
|
26
|
+
await checkAndNotify();
|
|
23
27
|
process.exit(result.status === 'success' ? 0 : 1);
|
|
24
28
|
});
|
|
25
29
|
program
|
|
@@ -31,6 +35,8 @@ program
|
|
|
31
35
|
.action(async (domain, repo, opts) => {
|
|
32
36
|
const output = opts.output;
|
|
33
37
|
const result = await applyCommand(domain, repo, output);
|
|
38
|
+
if (output === 'human')
|
|
39
|
+
await checkAndNotify();
|
|
34
40
|
const exitCode = result.status === 'success' ? 0 :
|
|
35
41
|
result.status === 'partial_success' ? 2 : 3;
|
|
36
42
|
process.exit(exitCode);
|
|
@@ -44,6 +50,8 @@ program
|
|
|
44
50
|
.action(async (domain, repo, opts) => {
|
|
45
51
|
const output = opts.output;
|
|
46
52
|
const result = await statusCommand(domain, repo, output);
|
|
53
|
+
if (output === 'human')
|
|
54
|
+
await checkAndNotify();
|
|
47
55
|
process.exit(result.status === 'success' ? 0 : 1);
|
|
48
56
|
});
|
|
49
57
|
program
|
|
@@ -120,5 +128,11 @@ program
|
|
|
120
128
|
.action(async () => {
|
|
121
129
|
await startUiServer();
|
|
122
130
|
});
|
|
131
|
+
program
|
|
132
|
+
.command('update')
|
|
133
|
+
.description('Check for updates and show upgrade instructions')
|
|
134
|
+
.action(async () => {
|
|
135
|
+
await updateCommand();
|
|
136
|
+
});
|
|
123
137
|
program.parse();
|
|
124
138
|
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAA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src/commands/update.ts"],"names":[],"mappings":"AAUA,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAgGnD"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import ora from 'ora';
|
|
3
|
+
import { checkForUpdates, CURRENT_VERSION, detectSurfaceType, getPlatformInfo, getBinaryDownloadUrl } from '../lib/update-checker.js';
|
|
4
|
+
export async function updateCommand() {
|
|
5
|
+
console.log(chalk.bold('\n🔍 Checking for updates...\n'));
|
|
6
|
+
const spinner = ora('Fetching latest version info...').start();
|
|
7
|
+
try {
|
|
8
|
+
const update = await checkForUpdates();
|
|
9
|
+
spinner.stop();
|
|
10
|
+
const surface = detectSurfaceType();
|
|
11
|
+
const { os, arch } = getPlatformInfo();
|
|
12
|
+
console.log(chalk.bold('Current version: ') + chalk.cyan(CURRENT_VERSION));
|
|
13
|
+
console.log(chalk.bold('Installation: ') + chalk.gray(formatSurface(surface)));
|
|
14
|
+
console.log(chalk.bold('Platform: ') + chalk.gray(`${os}-${arch}`));
|
|
15
|
+
console.log('');
|
|
16
|
+
if (!update) {
|
|
17
|
+
console.log(chalk.green('✓ You are running the latest version!'));
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
console.log(chalk.yellow('⚡ Update available!'));
|
|
21
|
+
console.log('');
|
|
22
|
+
console.log(chalk.bold('Latest version: ') + chalk.green.bold(update.latestVersion));
|
|
23
|
+
console.log(chalk.bold('Release URL: ') + chalk.blue.underline(update.releaseUrl));
|
|
24
|
+
console.log('');
|
|
25
|
+
// Show upgrade instructions based on surface type
|
|
26
|
+
console.log(chalk.bold.white('How to update:'));
|
|
27
|
+
console.log('');
|
|
28
|
+
switch (surface) {
|
|
29
|
+
case 'npm-global':
|
|
30
|
+
console.log(chalk.white(' Run:'));
|
|
31
|
+
console.log(chalk.cyan(' npm update -g gg-deploy'));
|
|
32
|
+
break;
|
|
33
|
+
case 'npm-local':
|
|
34
|
+
console.log(chalk.white(' Run:'));
|
|
35
|
+
console.log(chalk.cyan(' npm update gg-deploy'));
|
|
36
|
+
break;
|
|
37
|
+
case 'npx':
|
|
38
|
+
console.log(chalk.white(' Just use the latest version with npx:'));
|
|
39
|
+
console.log(chalk.cyan(` npx gg-deploy@${update.latestVersion} <command>`));
|
|
40
|
+
console.log('');
|
|
41
|
+
console.log(chalk.gray(' Or install globally for faster startup:'));
|
|
42
|
+
console.log(chalk.gray(' npm install -g gg-deploy'));
|
|
43
|
+
break;
|
|
44
|
+
case 'binary': {
|
|
45
|
+
const downloadUrl = getBinaryDownloadUrl(update.latestVersion);
|
|
46
|
+
console.log(chalk.white(' Download the latest binary:'));
|
|
47
|
+
console.log(chalk.blue.underline(` ${downloadUrl}`));
|
|
48
|
+
console.log('');
|
|
49
|
+
if (os === 'macos' || os === 'linux') {
|
|
50
|
+
console.log(chalk.white(' Quick install (macOS/Linux):'));
|
|
51
|
+
console.log(chalk.cyan(` curl -L ${downloadUrl} | tar xz`));
|
|
52
|
+
console.log(chalk.cyan(' sudo mv gg-deploy-* /usr/local/bin/gg-deploy'));
|
|
53
|
+
}
|
|
54
|
+
else if (os === 'win') {
|
|
55
|
+
console.log(chalk.white(' Quick install (Windows):'));
|
|
56
|
+
console.log(chalk.cyan(' 1. Download the .zip file'));
|
|
57
|
+
console.log(chalk.cyan(' 2. Extract and move to a folder in your PATH'));
|
|
58
|
+
}
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
default:
|
|
62
|
+
console.log(chalk.white(' Install via npm:'));
|
|
63
|
+
console.log(chalk.cyan(' npm install -g gg-deploy@latest'));
|
|
64
|
+
console.log('');
|
|
65
|
+
console.log(chalk.white(' Or download binary from:'));
|
|
66
|
+
console.log(chalk.blue.underline(` https://github.com/abe238/gg-deploy/releases/tag/v${update.latestVersion}`));
|
|
67
|
+
}
|
|
68
|
+
console.log('');
|
|
69
|
+
// Show release notes preview if available
|
|
70
|
+
if (update.releaseNotes) {
|
|
71
|
+
console.log(chalk.bold.white('What\'s new:'));
|
|
72
|
+
console.log(chalk.gray('─'.repeat(50)));
|
|
73
|
+
const notes = update.releaseNotes.split('\n').slice(0, 5).join('\n');
|
|
74
|
+
console.log(chalk.gray(notes));
|
|
75
|
+
console.log(chalk.gray('─'.repeat(50)));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
spinner.fail('Failed to check for updates');
|
|
80
|
+
console.log(chalk.red('Error: Could not connect to GitHub API'));
|
|
81
|
+
console.log(chalk.gray('Check your internet connection and try again.'));
|
|
82
|
+
console.log('');
|
|
83
|
+
console.log(chalk.white('You can also check manually:'));
|
|
84
|
+
console.log(chalk.blue.underline(' https://github.com/abe238/gg-deploy/releases'));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function formatSurface(surface) {
|
|
88
|
+
switch (surface) {
|
|
89
|
+
case 'npm-global': return 'npm (global)';
|
|
90
|
+
case 'npm-local': return 'npm (local)';
|
|
91
|
+
case 'npx': return 'npx';
|
|
92
|
+
case 'binary': return 'standalone binary';
|
|
93
|
+
default: return 'unknown';
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EACL,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACrB,MAAM,0BAA0B,CAAC;AAElC,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC,CAAC;IAE1D,MAAM,OAAO,GAAG,GAAG,CAAC,iCAAiC,CAAC,CAAC,KAAK,EAAE,CAAC;IAE/D,IAAI,CAAC;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,KAAK,YAAY,CAAC,CAAC,OAAO,cAAc,CAAC;QACzC,KAAK,WAAW,CAAC,CAAC,OAAO,aAAa,CAAC;QACvC,KAAK,KAAK,CAAC,CAAC,OAAO,KAAK,CAAC;QACzB,KAAK,QAAQ,CAAC,CAAC,OAAO,mBAAmB,CAAC;QAC1C,OAAO,CAAC,CAAC,OAAO,SAAS,CAAC;IAC5B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const CURRENT_VERSION = "1.1.0";
|
|
2
|
+
interface UpdateInfo {
|
|
3
|
+
currentVersion: string;
|
|
4
|
+
latestVersion: string;
|
|
5
|
+
releaseUrl: string;
|
|
6
|
+
releaseNotes: string | null;
|
|
7
|
+
updateCommand: string;
|
|
8
|
+
downloadUrl: string | null;
|
|
9
|
+
}
|
|
10
|
+
type SurfaceType = 'npm-global' | 'npm-local' | 'npx' | 'binary' | 'unknown';
|
|
11
|
+
declare function detectSurfaceType(): SurfaceType;
|
|
12
|
+
declare function getPlatformInfo(): {
|
|
13
|
+
os: string;
|
|
14
|
+
arch: string;
|
|
15
|
+
};
|
|
16
|
+
declare function getBinaryDownloadUrl(version: string): string | null;
|
|
17
|
+
export declare function checkForUpdates(): Promise<UpdateInfo | null>;
|
|
18
|
+
export declare function printUpdateNotification(update: UpdateInfo): void;
|
|
19
|
+
export declare function printUpdateNotificationCompact(update: UpdateInfo): void;
|
|
20
|
+
export declare function checkAndNotify(compact?: boolean): Promise<void>;
|
|
21
|
+
export { CURRENT_VERSION, detectSurfaceType, getPlatformInfo, getBinaryDownloadUrl };
|
|
22
|
+
//# sourceMappingURL=update-checker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-checker.d.ts","sourceRoot":"","sources":["../../src/lib/update-checker.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,eAAe,UAAU,CAAC;AAahC,UAAU,UAAU;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,KAAK,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;AAe7E,iBAAS,iBAAiB,IAAI,WAAW,CA+BxC;AAED,iBAAS,eAAe,IAAI;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAMvD;AAmBD,iBAAS,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI5D;AAqDD,wBAAsB,eAAe,IAAI,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CA8ClE;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAUhE;AAED,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAKvE;AAED,wBAAsB,cAAc,CAAC,OAAO,UAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAalE;AAED,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { homedir } from 'os';
|
|
2
|
+
import { join } from 'path';
|
|
3
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
const CURRENT_VERSION = '1.1.0';
|
|
6
|
+
const GITHUB_REPO = 'abe238/gg-deploy';
|
|
7
|
+
const CACHE_DIR = join(homedir(), '.gg-deploy');
|
|
8
|
+
const CACHE_FILE = join(CACHE_DIR, 'update-cache.json');
|
|
9
|
+
const CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000; // 24 hours
|
|
10
|
+
function compareVersions(v1, v2) {
|
|
11
|
+
const parts1 = v1.replace(/^v/, '').split('.').map(Number);
|
|
12
|
+
const parts2 = v2.replace(/^v/, '').split('.').map(Number);
|
|
13
|
+
for (let i = 0; i < Math.max(parts1.length, parts2.length); i++) {
|
|
14
|
+
const p1 = parts1[i] || 0;
|
|
15
|
+
const p2 = parts2[i] || 0;
|
|
16
|
+
if (p1 > p2)
|
|
17
|
+
return 1;
|
|
18
|
+
if (p1 < p2)
|
|
19
|
+
return -1;
|
|
20
|
+
}
|
|
21
|
+
return 0;
|
|
22
|
+
}
|
|
23
|
+
function detectSurfaceType() {
|
|
24
|
+
// Check if running as pkg binary
|
|
25
|
+
if (process.pkg) {
|
|
26
|
+
return 'binary';
|
|
27
|
+
}
|
|
28
|
+
// Check if running via npx (has npm_execpath with npx)
|
|
29
|
+
if (process.env.npm_execpath?.includes('npx')) {
|
|
30
|
+
return 'npx';
|
|
31
|
+
}
|
|
32
|
+
// Check if globally installed
|
|
33
|
+
if (process.env.npm_config_global === 'true') {
|
|
34
|
+
return 'npm-global';
|
|
35
|
+
}
|
|
36
|
+
// Check common global paths
|
|
37
|
+
const execPath = process.argv[1] || '';
|
|
38
|
+
if (execPath.includes('/lib/node_modules/') ||
|
|
39
|
+
execPath.includes('\\node_modules\\') ||
|
|
40
|
+
execPath.includes('/usr/local/bin/') ||
|
|
41
|
+
execPath.includes('/opt/homebrew/')) {
|
|
42
|
+
return 'npm-global';
|
|
43
|
+
}
|
|
44
|
+
// If in a node_modules, likely local
|
|
45
|
+
if (execPath.includes('node_modules')) {
|
|
46
|
+
return 'npm-local';
|
|
47
|
+
}
|
|
48
|
+
return 'unknown';
|
|
49
|
+
}
|
|
50
|
+
function getPlatformInfo() {
|
|
51
|
+
const os = process.platform === 'darwin' ? 'macos' :
|
|
52
|
+
process.platform === 'win32' ? 'win' :
|
|
53
|
+
process.platform === 'linux' ? 'linux' : process.platform;
|
|
54
|
+
const arch = process.arch === 'arm64' ? 'arm64' : 'x64';
|
|
55
|
+
return { os, arch };
|
|
56
|
+
}
|
|
57
|
+
function getUpdateCommand(surface, version) {
|
|
58
|
+
switch (surface) {
|
|
59
|
+
case 'npm-global':
|
|
60
|
+
return 'npm update -g gg-deploy';
|
|
61
|
+
case 'npm-local':
|
|
62
|
+
return 'npm update gg-deploy';
|
|
63
|
+
case 'npx':
|
|
64
|
+
return `npx gg-deploy@${version}`;
|
|
65
|
+
case 'binary': {
|
|
66
|
+
const { os, arch } = getPlatformInfo();
|
|
67
|
+
return `gg-deploy update # or download from GitHub releases`;
|
|
68
|
+
}
|
|
69
|
+
default:
|
|
70
|
+
return 'npm install -g gg-deploy@latest';
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function getBinaryDownloadUrl(version) {
|
|
74
|
+
const { os, arch } = getPlatformInfo();
|
|
75
|
+
const ext = os === 'win' ? 'zip' : 'tar.gz';
|
|
76
|
+
return `https://github.com/${GITHUB_REPO}/releases/download/v${version}/gg-deploy-${version}-${os}-${arch}.${ext}`;
|
|
77
|
+
}
|
|
78
|
+
function readCache() {
|
|
79
|
+
try {
|
|
80
|
+
if (existsSync(CACHE_FILE)) {
|
|
81
|
+
const data = readFileSync(CACHE_FILE, 'utf-8');
|
|
82
|
+
return JSON.parse(data);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
// Cache corrupted or unreadable
|
|
87
|
+
}
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
function writeCache(cache) {
|
|
91
|
+
try {
|
|
92
|
+
if (!existsSync(CACHE_DIR)) {
|
|
93
|
+
mkdirSync(CACHE_DIR, { recursive: true });
|
|
94
|
+
}
|
|
95
|
+
writeFileSync(CACHE_FILE, JSON.stringify(cache, null, 2));
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
// Can't write cache, ignore
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
async function fetchLatestRelease() {
|
|
102
|
+
try {
|
|
103
|
+
const controller = new AbortController();
|
|
104
|
+
const timeout = setTimeout(() => controller.abort(), 3000); // 3s timeout
|
|
105
|
+
const res = await fetch(`https://api.github.com/repos/${GITHUB_REPO}/releases/latest`, {
|
|
106
|
+
signal: controller.signal,
|
|
107
|
+
headers: {
|
|
108
|
+
'Accept': 'application/vnd.github.v3+json',
|
|
109
|
+
'User-Agent': `gg-deploy/${CURRENT_VERSION}`
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
clearTimeout(timeout);
|
|
113
|
+
if (!res.ok)
|
|
114
|
+
return null;
|
|
115
|
+
const data = await res.json();
|
|
116
|
+
return {
|
|
117
|
+
version: data.tag_name.replace(/^v/, ''),
|
|
118
|
+
url: data.html_url,
|
|
119
|
+
notes: data.body?.split('\n').slice(0, 3).join('\n') || null
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
export async function checkForUpdates() {
|
|
127
|
+
const cache = readCache();
|
|
128
|
+
const now = Date.now();
|
|
129
|
+
// Return cached result if recent
|
|
130
|
+
if (cache && (now - cache.lastCheck) < CHECK_INTERVAL_MS) {
|
|
131
|
+
if (cache.latestVersion && compareVersions(cache.latestVersion, CURRENT_VERSION) > 0) {
|
|
132
|
+
const surface = detectSurfaceType();
|
|
133
|
+
return {
|
|
134
|
+
currentVersion: CURRENT_VERSION,
|
|
135
|
+
latestVersion: cache.latestVersion,
|
|
136
|
+
releaseUrl: cache.releaseUrl || `https://github.com/${GITHUB_REPO}/releases`,
|
|
137
|
+
releaseNotes: cache.releaseNotes,
|
|
138
|
+
updateCommand: getUpdateCommand(surface, cache.latestVersion),
|
|
139
|
+
downloadUrl: surface === 'binary' ? getBinaryDownloadUrl(cache.latestVersion) : null
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
// Fetch fresh data (non-blocking for CLI, result used on NEXT run)
|
|
145
|
+
const release = await fetchLatestRelease();
|
|
146
|
+
// Update cache
|
|
147
|
+
const newCache = {
|
|
148
|
+
lastCheck: now,
|
|
149
|
+
latestVersion: release?.version || null,
|
|
150
|
+
releaseUrl: release?.url || null,
|
|
151
|
+
releaseNotes: release?.notes || null
|
|
152
|
+
};
|
|
153
|
+
writeCache(newCache);
|
|
154
|
+
// Return update info if newer version exists
|
|
155
|
+
if (release && compareVersions(release.version, CURRENT_VERSION) > 0) {
|
|
156
|
+
const surface = detectSurfaceType();
|
|
157
|
+
return {
|
|
158
|
+
currentVersion: CURRENT_VERSION,
|
|
159
|
+
latestVersion: release.version,
|
|
160
|
+
releaseUrl: release.url,
|
|
161
|
+
releaseNotes: release.notes,
|
|
162
|
+
updateCommand: getUpdateCommand(surface, release.version),
|
|
163
|
+
downloadUrl: surface === 'binary' ? getBinaryDownloadUrl(release.version) : null
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
export function printUpdateNotification(update) {
|
|
169
|
+
console.log('');
|
|
170
|
+
console.log(chalk.yellow('╭─────────────────────────────────────────────────────╮'));
|
|
171
|
+
console.log(chalk.yellow('│') + chalk.bold.cyan(' 💡 Update available: ') +
|
|
172
|
+
chalk.gray(update.currentVersion) + chalk.white(' → ') +
|
|
173
|
+
chalk.green.bold(update.latestVersion) +
|
|
174
|
+
chalk.yellow(' │'));
|
|
175
|
+
console.log(chalk.yellow('│') + chalk.white(` Run: ${chalk.cyan(update.updateCommand)}`) +
|
|
176
|
+
' '.repeat(Math.max(0, 36 - update.updateCommand.length)) + chalk.yellow('│'));
|
|
177
|
+
console.log(chalk.yellow('╰─────────────────────────────────────────────────────╯'));
|
|
178
|
+
}
|
|
179
|
+
export function printUpdateNotificationCompact(update) {
|
|
180
|
+
console.log('');
|
|
181
|
+
console.log(chalk.yellow('💡') + chalk.gray(` Update available: ${update.currentVersion} → `) +
|
|
182
|
+
chalk.green.bold(update.latestVersion) +
|
|
183
|
+
chalk.gray(` • Run: `) + chalk.cyan(update.updateCommand));
|
|
184
|
+
}
|
|
185
|
+
export async function checkAndNotify(compact = true) {
|
|
186
|
+
try {
|
|
187
|
+
const update = await checkForUpdates();
|
|
188
|
+
if (update) {
|
|
189
|
+
if (compact) {
|
|
190
|
+
printUpdateNotificationCompact(update);
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
printUpdateNotification(update);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
catch {
|
|
198
|
+
// Silently ignore update check failures
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
export { CURRENT_VERSION, detectSurfaceType, getPlatformInfo, getBinaryDownloadUrl };
|
|
202
|
+
//# sourceMappingURL=update-checker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-checker.js","sourceRoot":"","sources":["../../src/lib/update-checker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,eAAe,GAAG,OAAO,CAAC;AAChC,MAAM,WAAW,GAAG,kBAAkB,CAAC;AACvC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,YAAY,CAAC,CAAC;AAChD,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;AACxD,MAAM,iBAAiB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,WAAW;AAoB1D,SAAS,eAAe,CAAC,EAAU,EAAE,EAAU;IAC7C,MAAM,MAAM,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GA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C;QACH,MAAM,MAAM,GAAG,MAAM,eAAe,EAAE,CAAC;QACvC,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,OAAO,EAAE,CAAC;gBACZ,8BAA8B,CAAC,MAAM,CAAC,CAAC;YACzC,CAAC;iBAAM,CAAC;gBACN,uBAAuB,CAAC,MAAM,CAAC,CAAC;YAClC,CAAC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,wCAAwC;IAC1C,CAAC;AACH,CAAC;AAED,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAE,oBAAoB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gg-deploy",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Free hosting deserves free tooling. Domain → GitHub Pages in 60 seconds.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"bin": {
|
|
8
|
-
"gg-deploy": "
|
|
8
|
+
"gg-deploy": "dist/cli.js"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "tsc",
|
|
@@ -31,10 +31,14 @@
|
|
|
31
31
|
],
|
|
32
32
|
"author": "Abe Diaz",
|
|
33
33
|
"license": "AGPL-3.0-only",
|
|
34
|
+
"homepage": "https://abe238.github.io/gg-deploy/",
|
|
34
35
|
"repository": {
|
|
35
36
|
"type": "git",
|
|
36
37
|
"url": "git+https://github.com/abe238/gg-deploy.git"
|
|
37
38
|
},
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/abe238/gg-deploy/issues"
|
|
41
|
+
},
|
|
38
42
|
"engines": {
|
|
39
43
|
"node": ">=18.0.0"
|
|
40
44
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
*{margin:0;padding:0;box-sizing:border-box}:root{--bg: #0a0a0a;--bg-secondary: #111111;--bg-tertiary: #1a1a1a;--bg-hover: #1f1f1f;--border: #262626;--border-hover: #404040;--text: #fafafa;--text-secondary: #a1a1a1;--text-muted: #525252;--accent: #10b981;--accent-hover: #059669;--accent-glow: rgba(16, 185, 129, .15);--error: #ef4444;--warning: #f59e0b}body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:var(--bg);color:var(--text);min-height:100vh;line-height:1.6;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.mono{font-family:JetBrains Mono,Fira Code,SF Mono,Consolas,monospace}.container{max-width:480px;margin:0 auto;padding:3rem 1.5rem;min-height:100vh;display:flex;flex-direction:column}.header{margin-bottom:2rem}.header-row{display:flex;align-items:center;justify-content:space-between}.logo{font-size:1.75rem;font-weight:700;letter-spacing:-.03em;background:linear-gradient(135deg,#fff,#a1a1a1);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.tagline{color:var(--text-secondary);font-size:.95rem;margin-top:.375rem}.settings-btn{background:transparent;border:none;color:var(--text-muted);cursor:pointer;padding:.5rem;border-radius:8px;transition:all .15s}.settings-btn:hover{background:var(--bg-tertiary);color:var(--text-secondary)}.card{background:var(--bg-secondary);border:1px solid var(--border);border-radius:16px;padding:1.5rem;margin-bottom:1rem}.setup-card{padding:1.75rem}.field{margin-bottom:1rem}.field:last-child{margin-bottom:0}.label{display:block;font-size:.8rem;font-weight:500;color:var(--text-secondary);margin-bottom:.5rem;text-transform:uppercase;letter-spacing:.05em}.input{width:100%;padding:.875rem 1rem;background:var(--bg);border:1px solid var(--border);border-radius:10px;color:var(--text);font-size:.95rem;transition:all .15s}.input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-glow)}.input::placeholder{color:var(--text-muted)}.input:disabled{opacity:.5;cursor:not-allowed}.input-with-toggle{position:relative;display:flex;align-items:center}.input-with-toggle .input{padding-right:3rem}.eye-toggle{position:absolute;right:.75rem;background:transparent;border:none;color:var(--text-muted);cursor:pointer;padding:.25rem;display:flex;align-items:center;justify-content:center;transition:color .15s}.eye-toggle:hover{color:var(--text-secondary)}.saved-value{font-size:.8rem;color:var(--accent);margin-top:.375rem;font-family:JetBrains Mono,monospace}.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.875rem 1.5rem;background:var(--accent);color:#000;border:none;border-radius:10px;font-size:.95rem;font-weight:600;cursor:pointer;transition:all .15s;width:100%}.btn:hover:not(:disabled){background:var(--accent-hover);transform:translateY(-1px)}.btn:active:not(:disabled){transform:translateY(0)}.btn:disabled{opacity:.4;cursor:not-allowed}.btn-secondary{background:var(--bg-tertiary);color:var(--text);border:1px solid var(--border)}.btn-secondary:hover:not(:disabled){background:var(--bg-hover);border-color:var(--border-hover)}.setup-section{padding:.5rem 0}.setup-header{display:flex;align-items:center;gap:.75rem;margin-bottom:.75rem}.setup-number{width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:var(--accent);color:#000;font-weight:600;font-size:.85rem;border-radius:50%}.setup-title{font-size:1.05rem;font-weight:600;color:var(--text);flex:1}.setup-check{color:var(--accent)}.setup-desc{color:var(--text-secondary);font-size:.9rem;margin-bottom:.75rem;line-height:1.5}.setup-configured{color:var(--accent);font-size:.9rem;font-family:JetBrains Mono,monospace}.setup-divider{height:1px;background:var(--border);margin:1.25rem 0}.external-link{display:inline-flex;align-items:center;gap:.375rem;color:var(--accent);font-size:.9rem;font-weight:500;text-decoration:none;margin-bottom:1rem;transition:opacity .15s}.external-link:hover{opacity:.8}.steps{margin:1.25rem 0}.step{display:flex;align-items:flex-start;gap:.875rem;padding:.75rem 0;border-bottom:1px solid var(--border)}.step:last-child{border-bottom:none}.step-icon{width:22px;height:22px;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px}.step-icon.pending{color:var(--text-muted)}.step-icon.active,.step-icon.done{color:var(--accent)}.step-icon.error{color:var(--error)}.step-text{flex:1;min-width:0}.step-title{font-size:.925rem;color:var(--text)}.step-title.muted{color:var(--text-muted)}.step-detail{font-size:.8rem;color:var(--text-secondary);margin-top:.25rem;font-family:JetBrains Mono,monospace}.success-banner{background:linear-gradient(135deg,var(--accent) 0%,#059669 100%);border-radius:16px;padding:2.5rem 2rem;text-align:center;margin-bottom:1rem}.success-icon{font-size:3.5rem;margin-bottom:.75rem;line-height:1}.success-title{font-size:1.5rem;font-weight:700;color:#fff;margin-bottom:.5rem}.success-url{font-family:JetBrains Mono,monospace;font-size:1rem}.success-url a{color:#ffffffe6;text-decoration:underline;text-underline-offset:3px}.status-row{display:flex;gap:.75rem;justify-content:center;margin-bottom:1rem}.status-badge{display:inline-flex;align-items:center;gap:.5rem;padding:.375rem .875rem;background:var(--bg-secondary);border:1px solid var(--border);border-radius:100px;font-size:.8rem;color:var(--text-secondary)}.status-dot{width:8px;height:8px;border-radius:50%;background:var(--text-muted)}.status-dot.connected{background:var(--accent);box-shadow:0 0 8px var(--accent)}.status-dot.error{background:var(--error)}.status-dot.testing{background:var(--warning);animation:pulse 1s ease-in-out infinite}@keyframes pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.2)}}.status-user{font-size:.75rem;color:var(--text-muted);margin-left:.25rem}.test-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;background:var(--bg-secondary);border:1px solid var(--border);border-radius:8px;color:var(--text-muted);cursor:pointer;transition:all .15s}.test-btn:hover:not(:disabled){background:var(--bg-tertiary);color:var(--text-secondary);border-color:var(--border-hover)}.test-btn:disabled{opacity:.5;cursor:not-allowed}.status-badge{cursor:help;position:relative}.status-badge[data-tooltip]:after{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 8px);left:50%;transform:translate(-50%);padding:.5rem .75rem;background:var(--bg-tertiary);border:1px solid var(--border);border-radius:6px;font-size:.75rem;color:var(--text-secondary);white-space:nowrap;opacity:0;visibility:hidden;transition:opacity .1s,visibility .1s;z-index:10;pointer-events:none}.status-badge[data-tooltip]:hover:after{opacity:1;visibility:visible}.settings-status-row{display:flex;gap:.75rem;align-items:center;justify-content:center;padding:1rem 0;margin-bottom:1rem;border-top:1px solid var(--border)}.loading-state{display:flex;align-items:center;justify-content:center;gap:.75rem;padding:4rem 0;color:var(--text-secondary)}.footer{margin-top:auto;padding-top:2rem;text-align:center;font-size:.85rem;color:var(--text-muted)}.footer a{color:var(--text-secondary);text-decoration:none;transition:color .15s}.footer a:hover{color:var(--text)}.error-text{color:var(--error);font-size:.875rem;margin-top:1rem;padding:.75rem;background:#ef44441a;border:1px solid rgba(239,68,68,.2);border-radius:8px}@keyframes spin{to{transform:rotate(360deg)}}.spinner{animation:spin 1s linear infinite}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.card{animation:fadeIn .3s ease-out}@media (max-width: 520px){.container{padding:2rem 1rem}.logo{font-size:1.5rem}.card{padding:1.25rem}}
|
|
1
|
+
*{margin:0;padding:0;box-sizing:border-box}:root{--bg: #0a0a0a;--bg-secondary: #111111;--bg-tertiary: #1a1a1a;--bg-hover: #1f1f1f;--border: #262626;--border-hover: #404040;--text: #fafafa;--text-secondary: #a1a1a1;--text-muted: #525252;--accent: #10b981;--accent-hover: #059669;--accent-glow: rgba(16, 185, 129, .15);--error: #ef4444;--warning: #f59e0b}body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:var(--bg);color:var(--text);min-height:100vh;line-height:1.6;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.mono{font-family:JetBrains Mono,Fira Code,SF Mono,Consolas,monospace}.container{max-width:480px;margin:0 auto;padding:3rem 1.5rem;min-height:100vh;display:flex;flex-direction:column}.header{margin-bottom:2rem}.header-row{display:flex;align-items:center;justify-content:space-between}.logo{font-size:1.75rem;font-weight:700;letter-spacing:-.03em;background:linear-gradient(135deg,#fff,#a1a1a1);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.tagline{color:var(--text-secondary);font-size:.95rem;margin-top:.375rem}.settings-btn{background:transparent;border:none;color:var(--text-muted);cursor:pointer;padding:.5rem;border-radius:8px;transition:all .15s}.settings-btn:hover{background:var(--bg-tertiary);color:var(--text-secondary)}.card{background:var(--bg-secondary);border:1px solid var(--border);border-radius:16px;padding:1.5rem;margin-bottom:1rem}.setup-card{padding:1.75rem}.field{margin-bottom:1rem}.field:last-child{margin-bottom:0}.label{display:block;font-size:.8rem;font-weight:500;color:var(--text-secondary);margin-bottom:.5rem;text-transform:uppercase;letter-spacing:.05em}.input{width:100%;padding:.875rem 1rem;background:var(--bg);border:1px solid var(--border);border-radius:10px;color:var(--text);font-size:.95rem;transition:all .15s}.input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-glow)}.input::placeholder{color:var(--text-muted)}.input:disabled{opacity:.5;cursor:not-allowed}.input-with-toggle{position:relative;display:flex;align-items:center}.input-with-toggle .input{padding-right:3rem}.eye-toggle{position:absolute;right:.75rem;background:transparent;border:none;color:var(--text-muted);cursor:pointer;padding:.25rem;display:flex;align-items:center;justify-content:center;transition:color .15s}.eye-toggle:hover{color:var(--text-secondary)}.saved-value{font-size:.8rem;color:var(--accent);margin-top:.375rem;font-family:JetBrains Mono,monospace}.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.875rem 1.5rem;background:var(--accent);color:#000;border:none;border-radius:10px;font-size:.95rem;font-weight:600;cursor:pointer;transition:all .15s;width:100%}.btn:hover:not(:disabled){background:var(--accent-hover);transform:translateY(-1px)}.btn:active:not(:disabled){transform:translateY(0)}.btn:disabled{opacity:.4;cursor:not-allowed}.btn-secondary{background:var(--bg-tertiary);color:var(--text);border:1px solid var(--border)}.btn-secondary:hover:not(:disabled){background:var(--bg-hover);border-color:var(--border-hover)}.setup-section{padding:.5rem 0}.setup-header{display:flex;align-items:center;gap:.75rem;margin-bottom:.75rem}.setup-number{width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:var(--accent);color:#000;font-weight:600;font-size:.85rem;border-radius:50%}.setup-title{font-size:1.05rem;font-weight:600;color:var(--text);flex:1}.setup-check{color:var(--accent)}.setup-desc{color:var(--text-secondary);font-size:.9rem;margin-bottom:.75rem;line-height:1.5}.setup-configured{color:var(--accent);font-size:.9rem;font-family:JetBrains Mono,monospace}.setup-divider{height:1px;background:var(--border);margin:1.25rem 0}.external-link{display:inline-flex;align-items:center;gap:.375rem;color:var(--accent);font-size:.9rem;font-weight:500;text-decoration:none;margin-bottom:1rem;transition:opacity .15s}.external-link:hover{opacity:.8}.steps{margin:1.25rem 0}.step{display:flex;align-items:flex-start;gap:.875rem;padding:.75rem 0;border-bottom:1px solid var(--border)}.step:last-child{border-bottom:none}.step-icon{width:22px;height:22px;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px}.step-icon.pending{color:var(--text-muted)}.step-icon.active,.step-icon.done{color:var(--accent)}.step-icon.error{color:var(--error)}.step-text{flex:1;min-width:0}.step-title{font-size:.925rem;color:var(--text)}.step-title.muted{color:var(--text-muted)}.step-detail{font-size:.8rem;color:var(--text-secondary);margin-top:.25rem;font-family:JetBrains Mono,monospace}.success-banner{background:linear-gradient(135deg,var(--accent) 0%,#059669 100%);border-radius:16px;padding:2.5rem 2rem;text-align:center;margin-bottom:1rem}.success-icon{font-size:3.5rem;margin-bottom:.75rem;line-height:1}.success-title{font-size:1.5rem;font-weight:700;color:#fff;margin-bottom:.5rem}.success-url{font-family:JetBrains Mono,monospace;font-size:1rem}.success-url a{color:#ffffffe6;text-decoration:underline;text-underline-offset:3px}.status-row{display:flex;gap:.75rem;justify-content:center;margin-bottom:1rem}.status-badge{display:inline-flex;align-items:center;gap:.5rem;padding:.375rem .875rem;background:var(--bg-secondary);border:1px solid var(--border);border-radius:100px;font-size:.8rem;color:var(--text-secondary)}.status-dot{width:8px;height:8px;border-radius:50%;background:var(--text-muted)}.status-dot.connected{background:var(--accent);box-shadow:0 0 8px var(--accent)}.status-dot.error{background:var(--error)}.status-dot.testing{background:var(--warning);animation:pulse 1s ease-in-out infinite}@keyframes pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.2)}}.status-user{font-size:.75rem;color:var(--text-muted);margin-left:.25rem}.test-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;background:var(--bg-secondary);border:1px solid var(--border);border-radius:8px;color:var(--text-muted);cursor:pointer;transition:all .15s}.test-btn:hover:not(:disabled){background:var(--bg-tertiary);color:var(--text-secondary);border-color:var(--border-hover)}.test-btn:disabled{opacity:.5;cursor:not-allowed}.status-badge{cursor:help;position:relative}.status-badge[data-tooltip]:after{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 8px);left:50%;transform:translate(-50%);padding:.5rem .75rem;background:var(--bg-tertiary);border:1px solid var(--border);border-radius:6px;font-size:.75rem;color:var(--text-secondary);white-space:nowrap;opacity:0;visibility:hidden;transition:opacity .1s,visibility .1s;z-index:10;pointer-events:none}.status-badge[data-tooltip]:hover:after{opacity:1;visibility:visible}.settings-status-row{display:flex;gap:.75rem;align-items:center;justify-content:center;padding:1rem 0;margin-bottom:1rem;border-top:1px solid var(--border)}.loading-state{display:flex;align-items:center;justify-content:center;gap:.75rem;padding:4rem 0;color:var(--text-secondary)}.footer{margin-top:auto;padding-top:2rem;text-align:center;font-size:.85rem;color:var(--text-muted)}.footer a{color:var(--text-secondary);text-decoration:none;transition:color .15s}.footer a:hover{color:var(--text)}.error-text{color:var(--error);font-size:.875rem;margin-top:1rem;padding:.75rem;background:#ef44441a;border:1px solid rgba(239,68,68,.2);border-radius:8px}@keyframes spin{to{transform:rotate(360deg)}}.spinner{animation:spin 1s linear infinite}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.card{animation:fadeIn .3s ease-out}@media (max-width: 520px){.container{padding:2rem 1rem}.logo{font-size:1.5rem}.card{padding:1.25rem}}.update-banner{background:linear-gradient(135deg,var(--accent) 0%,#059669 100%);border-radius:12px;padding:.75rem 1rem;margin-bottom:1.5rem;display:flex;align-items:center;justify-content:space-between;gap:.75rem;animation:slideDown .3s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.update-content{display:flex;align-items:center;gap:1rem;flex:1}.update-text{font-size:.875rem;font-weight:500;color:#fff}.update-btn{display:flex;align-items:center;gap:.375rem;background:#fff3;border:none;color:#fff;font-size:.8125rem;font-weight:600;padding:.5rem .875rem;border-radius:8px;cursor:pointer;transition:background .15s;white-space:nowrap}.update-btn:hover{background:#ffffff4d}.update-btn svg{width:14px;height:14px}.update-dismiss{background:transparent;border:none;color:#ffffffb3;cursor:pointer;padding:.25rem;border-radius:4px;display:flex;align-items:center;justify-content:center;transition:all .15s}.update-dismiss:hover{background:#ffffff26;color:#fff}
|