nstantpage-agent 0.7.0 → 0.7.1

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.
@@ -24,7 +24,6 @@ import { getConfig, getProjectConfig, setProjectConfig, clearProjectConfig, getD
24
24
  import { TunnelClient } from '../tunnel.js';
25
25
  import { LocalServer } from '../localServer.js';
26
26
  import { PackageInstaller } from '../packageInstaller.js';
27
- import { ensureGit } from '../gitSetup.js';
28
27
  import { probeLocalPostgres, ensureLocalProjectDb, closeAdminPool, writeDatabaseUrlToEnv } from '../projectDb.js';
29
28
  import { StatusServer } from '../statusServer.js';
30
29
  import { getPackageVersion } from '../version.js';
@@ -255,14 +254,6 @@ export async function startCommand(directory, options) {
255
254
  cleanupPreviousAgent(projectId, apiPort, devPort);
256
255
  // Brief pause for OS to release ports (50ms is sufficient on macOS/Linux)
257
256
  await new Promise(r => setTimeout(r, 50));
258
- // Ensure git is installed (needed for undo/version control)
259
- const gitAvailable = await ensureGit();
260
- if (gitAvailable) {
261
- console.log(chalk.green(` ✓ Git available`));
262
- }
263
- else {
264
- console.log(chalk.yellow(` ⚠ Git not available — undo feature will be limited`));
265
- }
266
257
  console.log(chalk.blue(`\n🚀 nstantpage agent v${VERSION}\n`));
267
258
  console.log(chalk.gray(` Project ID: ${projectId}`));
268
259
  console.log(chalk.gray(` Device ID: ${deviceId.slice(0, 12)}...`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nstantpage-agent",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Local development agent for nstantpage.com — run your projects locally, preview in the cloud. Replaces cloud containers for faster builds.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -111,66 +111,7 @@ function getAssetPattern() {
111
111
  return null;
112
112
  }
113
113
 
114
- /**
115
- * Ensure git is installed. Try to auto-install if missing.
116
- */
117
- function ensureGit() {
118
- try {
119
- execSync('git --version', { stdio: 'pipe' });
120
- return; // already installed
121
- } catch {
122
- // git not found — try to install
123
- }
124
-
125
- console.log(' Installing git (required for undo/version control)...');
126
- const platform = os.platform();
127
-
128
- try {
129
- if (platform === 'darwin') {
130
- // Try Homebrew first (non-interactive)
131
- try {
132
- execSync('brew --version', { stdio: 'pipe' });
133
- execSync('brew install git', { stdio: 'inherit' });
134
- console.log(' ✓ Git installed via Homebrew');
135
- return;
136
- } catch {}
137
- // Trigger Xcode CLT install
138
- console.log(' Run this to install git: xcode-select --install');
139
- } else if (platform === 'win32') {
140
- try {
141
- execSync('winget --version', { stdio: 'pipe' });
142
- execSync('winget install --id Git.Git -e --source winget --accept-package-agreements --accept-source-agreements', { stdio: 'inherit' });
143
- console.log(' ✓ Git installed via winget');
144
- return;
145
- } catch {}
146
- console.log(' Install Git for Windows: https://git-scm.com/download/win');
147
- } else {
148
- // Linux: try apt, dnf, etc.
149
- const managers = [
150
- { check: 'apt-get --version', install: 'sudo apt-get install -y git' },
151
- { check: 'dnf --version', install: 'sudo dnf install -y git' },
152
- { check: 'yum --version', install: 'sudo yum install -y git' },
153
- { check: 'pacman --version', install: 'sudo pacman -S --noconfirm git' },
154
- ];
155
- for (const { check, install } of managers) {
156
- try {
157
- execSync(check, { stdio: 'pipe' });
158
- execSync(install, { stdio: 'inherit' });
159
- console.log(' ✓ Git installed');
160
- return;
161
- } catch { continue; }
162
- }
163
- console.log(' Please install git: sudo apt-get install git');
164
- }
165
- } catch (err) {
166
- console.log(` Note: Could not auto-install git (${err.message}). Install it manually for undo support.`);
167
- }
168
- }
169
-
170
114
  async function main() {
171
- // Ensure git is available (non-fatal)
172
- try { ensureGit(); } catch {}
173
-
174
115
  try {
175
116
  const assetPattern = getAssetPattern();
176
117
  if (!assetPattern) {