antigravity-ide 3.5.58 → 3.5.60
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/cli/index.js +37 -1
- package/package.json +1 -1
- package/setup.js +1 -1
package/cli/index.js
CHANGED
|
@@ -11,7 +11,43 @@ const packageJson = require('../package.json');
|
|
|
11
11
|
const updateNotifier = require('update-notifier');
|
|
12
12
|
|
|
13
13
|
// Check for updates
|
|
14
|
-
|
|
14
|
+
const prompts = require('prompts');
|
|
15
|
+
const { execSync } = require('child_process');
|
|
16
|
+
const chalk = require('chalk');
|
|
17
|
+
|
|
18
|
+
// Check for updates (Aggressive: Check every time)
|
|
19
|
+
const notifier = updateNotifier({ pkg: packageJson, updateCheckInterval: 0 });
|
|
20
|
+
|
|
21
|
+
if (notifier.update) {
|
|
22
|
+
const { latest, current, type } = notifier.update;
|
|
23
|
+
console.log(chalk.yellow(`\n📦 Update available: ${current} → ${chalk.green(latest)} (${type})`));
|
|
24
|
+
|
|
25
|
+
(async () => {
|
|
26
|
+
const response = await prompts({
|
|
27
|
+
type: 'confirm',
|
|
28
|
+
name: 'shouldUpdate',
|
|
29
|
+
message: 'Do you want to update Google Antigravity now? / Bạn có muốn cập nhật ngay không?',
|
|
30
|
+
initial: true
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
if (response.shouldUpdate) {
|
|
34
|
+
try {
|
|
35
|
+
console.log(chalk.cyan('\n🚀 Updating Global Antigravity... Please wait...'));
|
|
36
|
+
execSync('npm install -g antigravity-ide@latest', { stdio: 'inherit' });
|
|
37
|
+
console.log(chalk.green('\n✅ Verified Update! Restarting command...'));
|
|
38
|
+
|
|
39
|
+
// Spawn the original command again with new version
|
|
40
|
+
// execSync(`${process.argv0} ${process.argv.slice(1).join(' ')}`, { stdio: 'inherit' });
|
|
41
|
+
process.exit(0);
|
|
42
|
+
} catch (error) {
|
|
43
|
+
console.error(chalk.red('\n❌ Update failed. Please run: npm install -g antigravity-ide@latest'));
|
|
44
|
+
console.error(error.message);
|
|
45
|
+
}
|
|
46
|
+
} else {
|
|
47
|
+
console.log(chalk.gray('\nℹ️ Skipping update. You can update later using: npx antigravity-ide update'));
|
|
48
|
+
}
|
|
49
|
+
})();
|
|
50
|
+
}
|
|
15
51
|
|
|
16
52
|
program
|
|
17
53
|
.name('google-antigravity')
|
package/package.json
CHANGED
package/setup.js
CHANGED
|
@@ -30,7 +30,7 @@ async function setup() {
|
|
|
30
30
|
|
|
31
31
|
console.log(gradient.rainbow.multiline(branding));
|
|
32
32
|
console.log(gradient.atlas('━'.repeat(60)));
|
|
33
|
-
console.log(chalk.gray(` Google Antigravity • Global Setup Wizard • v3.5.
|
|
33
|
+
console.log(chalk.gray(` Google Antigravity • Global Setup Wizard • v3.5.60`));
|
|
34
34
|
console.log(chalk.gray(' Developed with 💡 by Dokhacgiakhoa'));
|
|
35
35
|
console.log(gradient.atlas('━'.repeat(60)) + '\n');
|
|
36
36
|
console.log(chalk.bold.hex('#00ffee')('🚀 Antigravity Global Setup Starting...\n'));
|