nstantpage-agent 0.8.13 → 0.8.14

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.
@@ -572,15 +572,16 @@ async function startStandbyMode(token, options, backendUrl, deviceId) {
572
572
  devPort: 0,
573
573
  onStartProject: async (pid, opts) => {
574
574
  const isClean = opts?.clean === true;
575
- // If clean reset requested and project is already running, stop it first
576
- if (isClean && activeProjects.has(pid)) {
577
- console.log(chalk.yellow(` Stopping existing project ${pid} for clean reset...`));
575
+ const isLocalRepo = !!opts?.localFolderPath;
576
+ // If clean reset or LocalRepo re-start requested and project is already running, stop it first
577
+ if ((isClean || isLocalRepo) && activeProjects.has(pid)) {
578
+ console.log(chalk.yellow(` Stopping existing project ${pid} for ${isClean ? 'clean reset' : 'LocalRepo restart'}...`));
578
579
  const existing = activeProjects.get(pid);
579
580
  existing.tunnel.disconnect();
580
581
  await existing.localServer.stop();
581
582
  activeProjects.delete(pid);
582
- // Wipe the project directory (only for non-LocalRepo)
583
- if (!opts?.localFolderPath) {
583
+ // Wipe the project directory (only for clean non-LocalRepo)
584
+ if (isClean && !isLocalRepo) {
584
585
  const projectDir = resolveProjectDir('.', pid);
585
586
  if (fs.existsSync(projectDir)) {
586
587
  console.log(chalk.gray(` Wiping project directory: ${projectDir}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nstantpage-agent",
3
- "version": "0.8.13",
3
+ "version": "0.8.14",
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": {