@specific.dev/cli 0.1.102 → 0.1.103

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.
Files changed (67) hide show
  1. package/dist/admin/404/index.html +1 -1
  2. package/dist/admin/404.html +1 -1
  3. package/dist/admin/__next.!KGRlZmF1bHQp.__PAGE__.txt +1 -1
  4. package/dist/admin/__next.!KGRlZmF1bHQp.txt +1 -1
  5. package/dist/admin/__next._full.txt +1 -1
  6. package/dist/admin/__next._head.txt +1 -1
  7. package/dist/admin/__next._index.txt +1 -1
  8. package/dist/admin/__next._tree.txt +1 -1
  9. package/dist/admin/_not-found/__next._full.txt +1 -1
  10. package/dist/admin/_not-found/__next._head.txt +1 -1
  11. package/dist/admin/_not-found/__next._index.txt +1 -1
  12. package/dist/admin/_not-found/__next._not-found.__PAGE__.txt +1 -1
  13. package/dist/admin/_not-found/__next._not-found.txt +1 -1
  14. package/dist/admin/_not-found/__next._tree.txt +1 -1
  15. package/dist/admin/_not-found/index.html +1 -1
  16. package/dist/admin/_not-found/index.txt +1 -1
  17. package/dist/admin/databases/__next.!KGRlZmF1bHQp.databases.__PAGE__.txt +1 -1
  18. package/dist/admin/databases/__next.!KGRlZmF1bHQp.databases.txt +1 -1
  19. package/dist/admin/databases/__next.!KGRlZmF1bHQp.txt +1 -1
  20. package/dist/admin/databases/__next._full.txt +1 -1
  21. package/dist/admin/databases/__next._head.txt +1 -1
  22. package/dist/admin/databases/__next._index.txt +1 -1
  23. package/dist/admin/databases/__next._tree.txt +1 -1
  24. package/dist/admin/databases/index.html +1 -1
  25. package/dist/admin/databases/index.txt +1 -1
  26. package/dist/admin/fullscreen/__next._full.txt +1 -1
  27. package/dist/admin/fullscreen/__next._head.txt +1 -1
  28. package/dist/admin/fullscreen/__next._index.txt +1 -1
  29. package/dist/admin/fullscreen/__next._tree.txt +1 -1
  30. package/dist/admin/fullscreen/__next.fullscreen.__PAGE__.txt +1 -1
  31. package/dist/admin/fullscreen/__next.fullscreen.txt +1 -1
  32. package/dist/admin/fullscreen/databases/__next._full.txt +1 -1
  33. package/dist/admin/fullscreen/databases/__next._head.txt +1 -1
  34. package/dist/admin/fullscreen/databases/__next._index.txt +1 -1
  35. package/dist/admin/fullscreen/databases/__next._tree.txt +1 -1
  36. package/dist/admin/fullscreen/databases/__next.fullscreen.databases.__PAGE__.txt +1 -1
  37. package/dist/admin/fullscreen/databases/__next.fullscreen.databases.txt +1 -1
  38. package/dist/admin/fullscreen/databases/__next.fullscreen.txt +1 -1
  39. package/dist/admin/fullscreen/databases/index.html +1 -1
  40. package/dist/admin/fullscreen/databases/index.txt +1 -1
  41. package/dist/admin/fullscreen/index.html +1 -1
  42. package/dist/admin/fullscreen/index.txt +1 -1
  43. package/dist/admin/index.html +1 -1
  44. package/dist/admin/index.txt +1 -1
  45. package/dist/admin/mail/__next.!KGRlZmF1bHQp.mail.__PAGE__.txt +1 -1
  46. package/dist/admin/mail/__next.!KGRlZmF1bHQp.mail.txt +1 -1
  47. package/dist/admin/mail/__next.!KGRlZmF1bHQp.txt +1 -1
  48. package/dist/admin/mail/__next._full.txt +1 -1
  49. package/dist/admin/mail/__next._head.txt +1 -1
  50. package/dist/admin/mail/__next._index.txt +1 -1
  51. package/dist/admin/mail/__next._tree.txt +1 -1
  52. package/dist/admin/mail/index.html +1 -1
  53. package/dist/admin/mail/index.txt +1 -1
  54. package/dist/admin/workflows/__next.!KGRlZmF1bHQp.txt +1 -1
  55. package/dist/admin/workflows/__next.!KGRlZmF1bHQp.workflows.__PAGE__.txt +1 -1
  56. package/dist/admin/workflows/__next.!KGRlZmF1bHQp.workflows.txt +1 -1
  57. package/dist/admin/workflows/__next._full.txt +1 -1
  58. package/dist/admin/workflows/__next._head.txt +1 -1
  59. package/dist/admin/workflows/__next._index.txt +1 -1
  60. package/dist/admin/workflows/__next._tree.txt +1 -1
  61. package/dist/admin/workflows/index.html +1 -1
  62. package/dist/admin/workflows/index.txt +1 -1
  63. package/dist/cli.js +368 -362
  64. package/package.json +1 -1
  65. /package/dist/admin/_next/static/{t6Nv9BcBf3NfJnds5W8MU → rh21O0TR1IaWnJRmFmEQ2}/_buildManifest.js +0 -0
  66. /package/dist/admin/_next/static/{t6Nv9BcBf3NfJnds5W8MU → rh21O0TR1IaWnJRmFmEQ2}/_clientMiddlewareManifest.json +0 -0
  67. /package/dist/admin/_next/static/{t6Nv9BcBf3NfJnds5W8MU → rh21O0TR1IaWnJRmFmEQ2}/_ssgManifest.js +0 -0
package/dist/cli.js CHANGED
@@ -520,10 +520,10 @@ ${frame}`;
520
520
  });
521
521
 
522
522
  // node_modules/.pnpm/is-docker@3.0.0/node_modules/is-docker/index.js
523
- import fs13 from "node:fs";
523
+ import fs14 from "node:fs";
524
524
  function hasDockerEnv() {
525
525
  try {
526
- fs13.statSync("/.dockerenv");
526
+ fs14.statSync("/.dockerenv");
527
527
  return true;
528
528
  } catch {
529
529
  return false;
@@ -531,7 +531,7 @@ function hasDockerEnv() {
531
531
  }
532
532
  function hasDockerCGroup() {
533
533
  try {
534
- return fs13.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
534
+ return fs14.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
535
535
  } catch {
536
536
  return false;
537
537
  }
@@ -549,7 +549,7 @@ var init_is_docker = __esm({
549
549
  });
550
550
 
551
551
  // node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js
552
- import fs14 from "node:fs";
552
+ import fs15 from "node:fs";
553
553
  function isInsideContainer() {
554
554
  if (cachedResult === void 0) {
555
555
  cachedResult = hasContainerEnv() || isDocker();
@@ -562,7 +562,7 @@ var init_is_inside_container = __esm({
562
562
  init_is_docker();
563
563
  hasContainerEnv = () => {
564
564
  try {
565
- fs14.statSync("/run/.containerenv");
565
+ fs15.statSync("/run/.containerenv");
566
566
  return true;
567
567
  } catch {
568
568
  return false;
@@ -574,7 +574,7 @@ var init_is_inside_container = __esm({
574
574
  // node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js
575
575
  import process2 from "node:process";
576
576
  import os3 from "node:os";
577
- import fs15 from "node:fs";
577
+ import fs16 from "node:fs";
578
578
  var isWsl, is_wsl_default;
579
579
  var init_is_wsl = __esm({
580
580
  "node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js"() {
@@ -590,7 +590,7 @@ var init_is_wsl = __esm({
590
590
  return true;
591
591
  }
592
592
  try {
593
- return fs15.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
593
+ return fs16.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
594
594
  } catch {
595
595
  return false;
596
596
  }
@@ -660,7 +660,7 @@ var init_utilities = __esm({
660
660
  // node_modules/.pnpm/wsl-utils@0.3.1/node_modules/wsl-utils/index.js
661
661
  import { promisify as promisify2 } from "node:util";
662
662
  import childProcess2 from "node:child_process";
663
- import fs16, { constants as fsConstants } from "node:fs/promises";
663
+ import fs17, { constants as fsConstants } from "node:fs/promises";
664
664
  var execFile2, wslDrivesMountPoint, powerShellPathFromWsl, powerShellPath2, canAccessPowerShellPromise, canAccessPowerShell, wslDefaultBrowser, convertWslPathToWindows;
665
665
  var init_wsl_utils = __esm({
666
666
  "node_modules/.pnpm/wsl-utils@0.3.1/node_modules/wsl-utils/index.js"() {
@@ -679,14 +679,14 @@ var init_wsl_utils = __esm({
679
679
  const configFilePath = "/etc/wsl.conf";
680
680
  let isConfigFileExists = false;
681
681
  try {
682
- await fs16.access(configFilePath, fsConstants.F_OK);
682
+ await fs17.access(configFilePath, fsConstants.F_OK);
683
683
  isConfigFileExists = true;
684
684
  } catch {
685
685
  }
686
686
  if (!isConfigFileExists) {
687
687
  return defaultMountPoint;
688
688
  }
689
- const configContent = await fs16.readFile(configFilePath, { encoding: "utf8" });
689
+ const configContent = await fs17.readFile(configFilePath, { encoding: "utf8" });
690
690
  const parsedMountPoint = parseMountPointFromConfig(configContent);
691
691
  if (parsedMountPoint === void 0) {
692
692
  return defaultMountPoint;
@@ -705,7 +705,7 @@ var init_wsl_utils = __esm({
705
705
  canAccessPowerShellPromise ??= (async () => {
706
706
  try {
707
707
  const psPath = await powerShellPath2();
708
- await fs16.access(psPath, fsConstants.X_OK);
708
+ await fs17.access(psPath, fsConstants.X_OK);
709
709
  return true;
710
710
  } catch {
711
711
  return false;
@@ -719,15 +719,15 @@ var init_wsl_utils = __esm({
719
719
  const { stdout } = await executePowerShell(command, { powerShellPath: psPath });
720
720
  return stdout.trim();
721
721
  };
722
- convertWslPathToWindows = async (path26) => {
723
- if (/^[a-z]+:\/\//i.test(path26)) {
724
- return path26;
722
+ convertWslPathToWindows = async (path27) => {
723
+ if (/^[a-z]+:\/\//i.test(path27)) {
724
+ return path27;
725
725
  }
726
726
  try {
727
- const { stdout } = await execFile2("wslpath", ["-aw", path26], { encoding: "utf8" });
727
+ const { stdout } = await execFile2("wslpath", ["-aw", path27], { encoding: "utf8" });
728
728
  return stdout.trim();
729
729
  } catch {
730
- return path26;
730
+ return path27;
731
731
  }
732
732
  };
733
733
  }
@@ -913,10 +913,10 @@ __export(open_exports, {
913
913
  openApp: () => openApp
914
914
  });
915
915
  import process8 from "node:process";
916
- import path15 from "node:path";
916
+ import path16 from "node:path";
917
917
  import { fileURLToPath as fileURLToPath2 } from "node:url";
918
918
  import childProcess3 from "node:child_process";
919
- import fs17, { constants as fsConstants2 } from "node:fs/promises";
919
+ import fs18, { constants as fsConstants2 } from "node:fs/promises";
920
920
  function detectArchBinary(binary) {
921
921
  if (typeof binary === "string" || Array.isArray(binary)) {
922
922
  return binary;
@@ -946,8 +946,8 @@ var init_open = __esm({
946
946
  init_is_inside_container();
947
947
  init_is_in_ssh();
948
948
  fallbackAttemptSymbol = Symbol("fallbackAttempt");
949
- __dirname2 = import.meta.url ? path15.dirname(fileURLToPath2(import.meta.url)) : "";
950
- localXdgOpenPath = path15.join(__dirname2, "xdg-open");
949
+ __dirname2 = import.meta.url ? path16.dirname(fileURLToPath2(import.meta.url)) : "";
950
+ localXdgOpenPath = path16.join(__dirname2, "xdg-open");
951
951
  ({ platform: platform2, arch: arch2 } = process8);
952
952
  tryEachApp = async (apps2, opener) => {
953
953
  if (apps2.length === 0) {
@@ -1095,7 +1095,7 @@ var init_open = __esm({
1095
1095
  const isBundled = !__dirname2 || __dirname2 === "/";
1096
1096
  let exeLocalXdgOpen = false;
1097
1097
  try {
1098
- await fs17.access(localXdgOpenPath, fsConstants2.X_OK);
1098
+ await fs18.access(localXdgOpenPath, fsConstants2.X_OK);
1099
1099
  exeLocalXdgOpen = true;
1100
1100
  } catch {
1101
1101
  }
@@ -1235,8 +1235,8 @@ var require_dist2 = __commonJS({
1235
1235
  var $global, $module, $NaN = NaN;
1236
1236
  if ("undefined" != typeof window ? $global = window : "undefined" != typeof self ? $global = self : "undefined" != typeof global ? ($global = global).require = __require : $global = this, void 0 === $global || void 0 === $global.Array) throw new Error("no global object found");
1237
1237
  if ("undefined" != typeof module && ($module = module), !$global.fs && $global.require) try {
1238
- var fs28 = $global.require("fs");
1239
- "object" == typeof fs28 && null !== fs28 && 0 !== Object.keys(fs28).length && ($global.fs = fs28);
1238
+ var fs29 = $global.require("fs");
1239
+ "object" == typeof fs29 && null !== fs29 && 0 !== Object.keys(fs29).length && ($global.fs = fs29);
1240
1240
  } catch (e) {
1241
1241
  }
1242
1242
  if (!$global.fs) {
@@ -183429,8 +183429,8 @@ import { Command } from "commander";
183429
183429
  // src/commands/init.tsx
183430
183430
  import React2, { useState, useEffect } from "react";
183431
183431
  import { render as render2, Text as Text2, Box as Box2, useInput, useApp } from "ink";
183432
- import * as fs19 from "fs";
183433
- import * as path17 from "path";
183432
+ import * as fs20 from "fs";
183433
+ import * as path18 from "path";
183434
183434
 
183435
183435
  // node_modules/.pnpm/@specific+sdk@file+..+sdk/node_modules/@specific/sdk/dist/index.js
183436
183436
  import * as fs from "fs";
@@ -183440,8 +183440,8 @@ import { execSync } from "child_process";
183440
183440
  import * as fs2 from "fs";
183441
183441
  import * as path2 from "path";
183442
183442
  import { createTarPacker, createEntryItemGenerator } from "tar-vern";
183443
- import * as fs12 from "fs";
183444
- import * as path13 from "path";
183443
+ import * as fs13 from "fs";
183444
+ import * as path14 from "path";
183445
183445
 
183446
183446
  // node_modules/.pnpm/chokidar@5.0.0/node_modules/chokidar/index.js
183447
183447
  import { EventEmitter } from "node:events";
@@ -183533,7 +183533,7 @@ var ReaddirpStream = class extends Readable {
183533
183533
  this._directoryFilter = normalizeFilter(opts.directoryFilter);
183534
183534
  const statMethod = opts.lstat ? lstat : stat;
183535
183535
  if (wantBigintFsStats) {
183536
- this._stat = (path26) => statMethod(path26, { bigint: true });
183536
+ this._stat = (path27) => statMethod(path27, { bigint: true });
183537
183537
  } else {
183538
183538
  this._stat = statMethod;
183539
183539
  }
@@ -183558,8 +183558,8 @@ var ReaddirpStream = class extends Readable {
183558
183558
  const par = this.parent;
183559
183559
  const fil = par && par.files;
183560
183560
  if (fil && fil.length > 0) {
183561
- const { path: path26, depth } = par;
183562
- const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path26));
183561
+ const { path: path27, depth } = par;
183562
+ const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path27));
183563
183563
  const awaited = await Promise.all(slice);
183564
183564
  for (const entry of awaited) {
183565
183565
  if (!entry)
@@ -183599,20 +183599,20 @@ var ReaddirpStream = class extends Readable {
183599
183599
  this.reading = false;
183600
183600
  }
183601
183601
  }
183602
- async _exploreDir(path26, depth) {
183602
+ async _exploreDir(path27, depth) {
183603
183603
  let files;
183604
183604
  try {
183605
- files = await readdir(path26, this._rdOptions);
183605
+ files = await readdir(path27, this._rdOptions);
183606
183606
  } catch (error) {
183607
183607
  this._onError(error);
183608
183608
  }
183609
- return { files, depth, path: path26 };
183609
+ return { files, depth, path: path27 };
183610
183610
  }
183611
- async _formatEntry(dirent, path26) {
183611
+ async _formatEntry(dirent, path27) {
183612
183612
  let entry;
183613
183613
  const basename6 = this._isDirent ? dirent.name : dirent;
183614
183614
  try {
183615
- const fullPath = presolve(pjoin(path26, basename6));
183615
+ const fullPath = presolve(pjoin(path27, basename6));
183616
183616
  entry = { path: prelative(this._root, fullPath), fullPath, basename: basename6 };
183617
183617
  entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
183618
183618
  } catch (err) {
@@ -184012,16 +184012,16 @@ var delFromSet = (main, prop, item) => {
184012
184012
  };
184013
184013
  var isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;
184014
184014
  var FsWatchInstances = /* @__PURE__ */ new Map();
184015
- function createFsWatchInstance(path26, options2, listener, errHandler, emitRaw) {
184015
+ function createFsWatchInstance(path27, options2, listener, errHandler, emitRaw) {
184016
184016
  const handleEvent = (rawEvent, evPath) => {
184017
- listener(path26);
184018
- emitRaw(rawEvent, evPath, { watchedPath: path26 });
184019
- if (evPath && path26 !== evPath) {
184020
- fsWatchBroadcast(sp.resolve(path26, evPath), KEY_LISTENERS, sp.join(path26, evPath));
184017
+ listener(path27);
184018
+ emitRaw(rawEvent, evPath, { watchedPath: path27 });
184019
+ if (evPath && path27 !== evPath) {
184020
+ fsWatchBroadcast(sp.resolve(path27, evPath), KEY_LISTENERS, sp.join(path27, evPath));
184021
184021
  }
184022
184022
  };
184023
184023
  try {
184024
- return fs_watch(path26, {
184024
+ return fs_watch(path27, {
184025
184025
  persistent: options2.persistent
184026
184026
  }, handleEvent);
184027
184027
  } catch (error) {
@@ -184037,12 +184037,12 @@ var fsWatchBroadcast = (fullPath, listenerType, val1, val2, val3) => {
184037
184037
  listener(val1, val2, val3);
184038
184038
  });
184039
184039
  };
184040
- var setFsWatchListener = (path26, fullPath, options2, handlers) => {
184040
+ var setFsWatchListener = (path27, fullPath, options2, handlers) => {
184041
184041
  const { listener, errHandler, rawEmitter } = handlers;
184042
184042
  let cont = FsWatchInstances.get(fullPath);
184043
184043
  let watcher;
184044
184044
  if (!options2.persistent) {
184045
- watcher = createFsWatchInstance(path26, options2, listener, errHandler, rawEmitter);
184045
+ watcher = createFsWatchInstance(path27, options2, listener, errHandler, rawEmitter);
184046
184046
  if (!watcher)
184047
184047
  return;
184048
184048
  return watcher.close.bind(watcher);
@@ -184053,7 +184053,7 @@ var setFsWatchListener = (path26, fullPath, options2, handlers) => {
184053
184053
  addAndConvert(cont, KEY_RAW, rawEmitter);
184054
184054
  } else {
184055
184055
  watcher = createFsWatchInstance(
184056
- path26,
184056
+ path27,
184057
184057
  options2,
184058
184058
  fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS),
184059
184059
  errHandler,
@@ -184068,7 +184068,7 @@ var setFsWatchListener = (path26, fullPath, options2, handlers) => {
184068
184068
  cont.watcherUnusable = true;
184069
184069
  if (isWindows && error.code === "EPERM") {
184070
184070
  try {
184071
- const fd = await open(path26, "r");
184071
+ const fd = await open(path27, "r");
184072
184072
  await fd.close();
184073
184073
  broadcastErr(error);
184074
184074
  } catch (err) {
@@ -184099,7 +184099,7 @@ var setFsWatchListener = (path26, fullPath, options2, handlers) => {
184099
184099
  };
184100
184100
  };
184101
184101
  var FsWatchFileInstances = /* @__PURE__ */ new Map();
184102
- var setFsWatchFileListener = (path26, fullPath, options2, handlers) => {
184102
+ var setFsWatchFileListener = (path27, fullPath, options2, handlers) => {
184103
184103
  const { listener, rawEmitter } = handlers;
184104
184104
  let cont = FsWatchFileInstances.get(fullPath);
184105
184105
  const copts = cont && cont.options;
@@ -184121,7 +184121,7 @@ var setFsWatchFileListener = (path26, fullPath, options2, handlers) => {
184121
184121
  });
184122
184122
  const currmtime = curr.mtimeMs;
184123
184123
  if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
184124
- foreach(cont.listeners, (listener2) => listener2(path26, curr));
184124
+ foreach(cont.listeners, (listener2) => listener2(path27, curr));
184125
184125
  }
184126
184126
  })
184127
184127
  };
@@ -184151,13 +184151,13 @@ var NodeFsHandler = class {
184151
184151
  * @param listener on fs change
184152
184152
  * @returns closer for the watcher instance
184153
184153
  */
184154
- _watchWithNodeFs(path26, listener) {
184154
+ _watchWithNodeFs(path27, listener) {
184155
184155
  const opts = this.fsw.options;
184156
- const directory = sp.dirname(path26);
184157
- const basename6 = sp.basename(path26);
184156
+ const directory = sp.dirname(path27);
184157
+ const basename6 = sp.basename(path27);
184158
184158
  const parent = this.fsw._getWatchedDir(directory);
184159
184159
  parent.add(basename6);
184160
- const absolutePath = sp.resolve(path26);
184160
+ const absolutePath = sp.resolve(path27);
184161
184161
  const options2 = {
184162
184162
  persistent: opts.persistent
184163
184163
  };
@@ -184167,12 +184167,12 @@ var NodeFsHandler = class {
184167
184167
  if (opts.usePolling) {
184168
184168
  const enableBin = opts.interval !== opts.binaryInterval;
184169
184169
  options2.interval = enableBin && isBinaryPath(basename6) ? opts.binaryInterval : opts.interval;
184170
- closer = setFsWatchFileListener(path26, absolutePath, options2, {
184170
+ closer = setFsWatchFileListener(path27, absolutePath, options2, {
184171
184171
  listener,
184172
184172
  rawEmitter: this.fsw._emitRaw
184173
184173
  });
184174
184174
  } else {
184175
- closer = setFsWatchListener(path26, absolutePath, options2, {
184175
+ closer = setFsWatchListener(path27, absolutePath, options2, {
184176
184176
  listener,
184177
184177
  errHandler: this._boundHandleError,
184178
184178
  rawEmitter: this.fsw._emitRaw
@@ -184194,7 +184194,7 @@ var NodeFsHandler = class {
184194
184194
  let prevStats = stats;
184195
184195
  if (parent.has(basename6))
184196
184196
  return;
184197
- const listener = async (path26, newStats) => {
184197
+ const listener = async (path27, newStats) => {
184198
184198
  if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5))
184199
184199
  return;
184200
184200
  if (!newStats || newStats.mtimeMs === 0) {
@@ -184208,11 +184208,11 @@ var NodeFsHandler = class {
184208
184208
  this.fsw._emit(EV.CHANGE, file, newStats2);
184209
184209
  }
184210
184210
  if ((isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats2.ino) {
184211
- this.fsw._closeFile(path26);
184211
+ this.fsw._closeFile(path27);
184212
184212
  prevStats = newStats2;
184213
184213
  const closer2 = this._watchWithNodeFs(file, listener);
184214
184214
  if (closer2)
184215
- this.fsw._addPathCloser(path26, closer2);
184215
+ this.fsw._addPathCloser(path27, closer2);
184216
184216
  } else {
184217
184217
  prevStats = newStats2;
184218
184218
  }
@@ -184244,7 +184244,7 @@ var NodeFsHandler = class {
184244
184244
  * @param item basename of this item
184245
184245
  * @returns true if no more processing is needed for this entry.
184246
184246
  */
184247
- async _handleSymlink(entry, directory, path26, item) {
184247
+ async _handleSymlink(entry, directory, path27, item) {
184248
184248
  if (this.fsw.closed) {
184249
184249
  return;
184250
184250
  }
@@ -184254,7 +184254,7 @@ var NodeFsHandler = class {
184254
184254
  this.fsw._incrReadyCount();
184255
184255
  let linkPath;
184256
184256
  try {
184257
- linkPath = await fsrealpath(path26);
184257
+ linkPath = await fsrealpath(path27);
184258
184258
  } catch (e) {
184259
184259
  this.fsw._emitReady();
184260
184260
  return true;
@@ -184264,12 +184264,12 @@ var NodeFsHandler = class {
184264
184264
  if (dir.has(item)) {
184265
184265
  if (this.fsw._symlinkPaths.get(full) !== linkPath) {
184266
184266
  this.fsw._symlinkPaths.set(full, linkPath);
184267
- this.fsw._emit(EV.CHANGE, path26, entry.stats);
184267
+ this.fsw._emit(EV.CHANGE, path27, entry.stats);
184268
184268
  }
184269
184269
  } else {
184270
184270
  dir.add(item);
184271
184271
  this.fsw._symlinkPaths.set(full, linkPath);
184272
- this.fsw._emit(EV.ADD, path26, entry.stats);
184272
+ this.fsw._emit(EV.ADD, path27, entry.stats);
184273
184273
  }
184274
184274
  this.fsw._emitReady();
184275
184275
  return true;
@@ -184299,9 +184299,9 @@ var NodeFsHandler = class {
184299
184299
  return;
184300
184300
  }
184301
184301
  const item = entry.path;
184302
- let path26 = sp.join(directory, item);
184302
+ let path27 = sp.join(directory, item);
184303
184303
  current.add(item);
184304
- if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path26, item)) {
184304
+ if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path27, item)) {
184305
184305
  return;
184306
184306
  }
184307
184307
  if (this.fsw.closed) {
@@ -184310,8 +184310,8 @@ var NodeFsHandler = class {
184310
184310
  }
184311
184311
  if (item === target || !target && !previous.has(item)) {
184312
184312
  this.fsw._incrReadyCount();
184313
- path26 = sp.join(dir, sp.relative(dir, path26));
184314
- this._addToNodeFs(path26, initialAdd, wh, depth + 1);
184313
+ path27 = sp.join(dir, sp.relative(dir, path27));
184314
+ this._addToNodeFs(path27, initialAdd, wh, depth + 1);
184315
184315
  }
184316
184316
  }).on(EV.ERROR, this._boundHandleError);
184317
184317
  return new Promise((resolve9, reject) => {
@@ -184380,13 +184380,13 @@ var NodeFsHandler = class {
184380
184380
  * @param depth Child path actually targeted for watch
184381
184381
  * @param target Child path actually targeted for watch
184382
184382
  */
184383
- async _addToNodeFs(path26, initialAdd, priorWh, depth, target) {
184383
+ async _addToNodeFs(path27, initialAdd, priorWh, depth, target) {
184384
184384
  const ready = this.fsw._emitReady;
184385
- if (this.fsw._isIgnored(path26) || this.fsw.closed) {
184385
+ if (this.fsw._isIgnored(path27) || this.fsw.closed) {
184386
184386
  ready();
184387
184387
  return false;
184388
184388
  }
184389
- const wh = this.fsw._getWatchHelpers(path26);
184389
+ const wh = this.fsw._getWatchHelpers(path27);
184390
184390
  if (priorWh) {
184391
184391
  wh.filterPath = (entry) => priorWh.filterPath(entry);
184392
184392
  wh.filterDir = (entry) => priorWh.filterDir(entry);
@@ -184402,8 +184402,8 @@ var NodeFsHandler = class {
184402
184402
  const follow = this.fsw.options.followSymlinks;
184403
184403
  let closer;
184404
184404
  if (stats.isDirectory()) {
184405
- const absPath = sp.resolve(path26);
184406
- const targetPath = follow ? await fsrealpath(path26) : path26;
184405
+ const absPath = sp.resolve(path27);
184406
+ const targetPath = follow ? await fsrealpath(path27) : path27;
184407
184407
  if (this.fsw.closed)
184408
184408
  return;
184409
184409
  closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
@@ -184413,29 +184413,29 @@ var NodeFsHandler = class {
184413
184413
  this.fsw._symlinkPaths.set(absPath, targetPath);
184414
184414
  }
184415
184415
  } else if (stats.isSymbolicLink()) {
184416
- const targetPath = follow ? await fsrealpath(path26) : path26;
184416
+ const targetPath = follow ? await fsrealpath(path27) : path27;
184417
184417
  if (this.fsw.closed)
184418
184418
  return;
184419
184419
  const parent = sp.dirname(wh.watchPath);
184420
184420
  this.fsw._getWatchedDir(parent).add(wh.watchPath);
184421
184421
  this.fsw._emit(EV.ADD, wh.watchPath, stats);
184422
- closer = await this._handleDir(parent, stats, initialAdd, depth, path26, wh, targetPath);
184422
+ closer = await this._handleDir(parent, stats, initialAdd, depth, path27, wh, targetPath);
184423
184423
  if (this.fsw.closed)
184424
184424
  return;
184425
184425
  if (targetPath !== void 0) {
184426
- this.fsw._symlinkPaths.set(sp.resolve(path26), targetPath);
184426
+ this.fsw._symlinkPaths.set(sp.resolve(path27), targetPath);
184427
184427
  }
184428
184428
  } else {
184429
184429
  closer = this._handleFile(wh.watchPath, stats, initialAdd);
184430
184430
  }
184431
184431
  ready();
184432
184432
  if (closer)
184433
- this.fsw._addPathCloser(path26, closer);
184433
+ this.fsw._addPathCloser(path27, closer);
184434
184434
  return false;
184435
184435
  } catch (error) {
184436
184436
  if (this.fsw._handleError(error)) {
184437
184437
  ready();
184438
- return path26;
184438
+ return path27;
184439
184439
  }
184440
184440
  }
184441
184441
  }
@@ -184478,24 +184478,24 @@ function createPattern(matcher) {
184478
184478
  }
184479
184479
  return () => false;
184480
184480
  }
184481
- function normalizePath(path26) {
184482
- if (typeof path26 !== "string")
184481
+ function normalizePath(path27) {
184482
+ if (typeof path27 !== "string")
184483
184483
  throw new Error("string expected");
184484
- path26 = sp2.normalize(path26);
184485
- path26 = path26.replace(/\\/g, "/");
184484
+ path27 = sp2.normalize(path27);
184485
+ path27 = path27.replace(/\\/g, "/");
184486
184486
  let prepend = false;
184487
- if (path26.startsWith("//"))
184487
+ if (path27.startsWith("//"))
184488
184488
  prepend = true;
184489
- path26 = path26.replace(DOUBLE_SLASH_RE, "/");
184489
+ path27 = path27.replace(DOUBLE_SLASH_RE, "/");
184490
184490
  if (prepend)
184491
- path26 = "/" + path26;
184492
- return path26;
184491
+ path27 = "/" + path27;
184492
+ return path27;
184493
184493
  }
184494
184494
  function matchPatterns(patterns, testString, stats) {
184495
- const path26 = normalizePath(testString);
184495
+ const path27 = normalizePath(testString);
184496
184496
  for (let index = 0; index < patterns.length; index++) {
184497
184497
  const pattern = patterns[index];
184498
- if (pattern(path26, stats)) {
184498
+ if (pattern(path27, stats)) {
184499
184499
  return true;
184500
184500
  }
184501
184501
  }
@@ -184533,19 +184533,19 @@ var toUnix = (string) => {
184533
184533
  }
184534
184534
  return str;
184535
184535
  };
184536
- var normalizePathToUnix = (path26) => toUnix(sp2.normalize(toUnix(path26)));
184537
- var normalizeIgnored = (cwd = "") => (path26) => {
184538
- if (typeof path26 === "string") {
184539
- return normalizePathToUnix(sp2.isAbsolute(path26) ? path26 : sp2.join(cwd, path26));
184536
+ var normalizePathToUnix = (path27) => toUnix(sp2.normalize(toUnix(path27)));
184537
+ var normalizeIgnored = (cwd = "") => (path27) => {
184538
+ if (typeof path27 === "string") {
184539
+ return normalizePathToUnix(sp2.isAbsolute(path27) ? path27 : sp2.join(cwd, path27));
184540
184540
  } else {
184541
- return path26;
184541
+ return path27;
184542
184542
  }
184543
184543
  };
184544
- var getAbsolutePath = (path26, cwd) => {
184545
- if (sp2.isAbsolute(path26)) {
184546
- return path26;
184544
+ var getAbsolutePath = (path27, cwd) => {
184545
+ if (sp2.isAbsolute(path27)) {
184546
+ return path27;
184547
184547
  }
184548
- return sp2.join(cwd, path26);
184548
+ return sp2.join(cwd, path27);
184549
184549
  };
184550
184550
  var EMPTY_SET = Object.freeze(/* @__PURE__ */ new Set());
184551
184551
  var DirEntry = class {
@@ -184610,10 +184610,10 @@ var WatchHelper = class {
184610
184610
  dirParts;
184611
184611
  followSymlinks;
184612
184612
  statMethod;
184613
- constructor(path26, follow, fsw) {
184613
+ constructor(path27, follow, fsw) {
184614
184614
  this.fsw = fsw;
184615
- const watchPath = path26;
184616
- this.path = path26 = path26.replace(REPLACER_RE, "");
184615
+ const watchPath = path27;
184616
+ this.path = path27 = path27.replace(REPLACER_RE, "");
184617
184617
  this.watchPath = watchPath;
184618
184618
  this.fullWatchPath = sp2.resolve(watchPath);
184619
184619
  this.dirParts = [];
@@ -184753,20 +184753,20 @@ var FSWatcher = class extends EventEmitter {
184753
184753
  this._closePromise = void 0;
184754
184754
  let paths = unifyPaths(paths_);
184755
184755
  if (cwd) {
184756
- paths = paths.map((path26) => {
184757
- const absPath = getAbsolutePath(path26, cwd);
184756
+ paths = paths.map((path27) => {
184757
+ const absPath = getAbsolutePath(path27, cwd);
184758
184758
  return absPath;
184759
184759
  });
184760
184760
  }
184761
- paths.forEach((path26) => {
184762
- this._removeIgnoredPath(path26);
184761
+ paths.forEach((path27) => {
184762
+ this._removeIgnoredPath(path27);
184763
184763
  });
184764
184764
  this._userIgnored = void 0;
184765
184765
  if (!this._readyCount)
184766
184766
  this._readyCount = 0;
184767
184767
  this._readyCount += paths.length;
184768
- Promise.all(paths.map(async (path26) => {
184769
- const res = await this._nodeFsHandler._addToNodeFs(path26, !_internal, void 0, 0, _origAdd);
184768
+ Promise.all(paths.map(async (path27) => {
184769
+ const res = await this._nodeFsHandler._addToNodeFs(path27, !_internal, void 0, 0, _origAdd);
184770
184770
  if (res)
184771
184771
  this._emitReady();
184772
184772
  return res;
@@ -184788,17 +184788,17 @@ var FSWatcher = class extends EventEmitter {
184788
184788
  return this;
184789
184789
  const paths = unifyPaths(paths_);
184790
184790
  const { cwd } = this.options;
184791
- paths.forEach((path26) => {
184792
- if (!sp2.isAbsolute(path26) && !this._closers.has(path26)) {
184791
+ paths.forEach((path27) => {
184792
+ if (!sp2.isAbsolute(path27) && !this._closers.has(path27)) {
184793
184793
  if (cwd)
184794
- path26 = sp2.join(cwd, path26);
184795
- path26 = sp2.resolve(path26);
184794
+ path27 = sp2.join(cwd, path27);
184795
+ path27 = sp2.resolve(path27);
184796
184796
  }
184797
- this._closePath(path26);
184798
- this._addIgnoredPath(path26);
184799
- if (this._watched.has(path26)) {
184797
+ this._closePath(path27);
184798
+ this._addIgnoredPath(path27);
184799
+ if (this._watched.has(path27)) {
184800
184800
  this._addIgnoredPath({
184801
- path: path26,
184801
+ path: path27,
184802
184802
  recursive: true
184803
184803
  });
184804
184804
  }
@@ -184862,38 +184862,38 @@ var FSWatcher = class extends EventEmitter {
184862
184862
  * @param stats arguments to be passed with event
184863
184863
  * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
184864
184864
  */
184865
- async _emit(event, path26, stats) {
184865
+ async _emit(event, path27, stats) {
184866
184866
  if (this.closed)
184867
184867
  return;
184868
184868
  const opts = this.options;
184869
184869
  if (isWindows)
184870
- path26 = sp2.normalize(path26);
184870
+ path27 = sp2.normalize(path27);
184871
184871
  if (opts.cwd)
184872
- path26 = sp2.relative(opts.cwd, path26);
184873
- const args = [path26];
184872
+ path27 = sp2.relative(opts.cwd, path27);
184873
+ const args = [path27];
184874
184874
  if (stats != null)
184875
184875
  args.push(stats);
184876
184876
  const awf = opts.awaitWriteFinish;
184877
184877
  let pw;
184878
- if (awf && (pw = this._pendingWrites.get(path26))) {
184878
+ if (awf && (pw = this._pendingWrites.get(path27))) {
184879
184879
  pw.lastChange = /* @__PURE__ */ new Date();
184880
184880
  return this;
184881
184881
  }
184882
184882
  if (opts.atomic) {
184883
184883
  if (event === EVENTS.UNLINK) {
184884
- this._pendingUnlinks.set(path26, [event, ...args]);
184884
+ this._pendingUnlinks.set(path27, [event, ...args]);
184885
184885
  setTimeout(() => {
184886
- this._pendingUnlinks.forEach((entry, path27) => {
184886
+ this._pendingUnlinks.forEach((entry, path28) => {
184887
184887
  this.emit(...entry);
184888
184888
  this.emit(EVENTS.ALL, ...entry);
184889
- this._pendingUnlinks.delete(path27);
184889
+ this._pendingUnlinks.delete(path28);
184890
184890
  });
184891
184891
  }, typeof opts.atomic === "number" ? opts.atomic : 100);
184892
184892
  return this;
184893
184893
  }
184894
- if (event === EVENTS.ADD && this._pendingUnlinks.has(path26)) {
184894
+ if (event === EVENTS.ADD && this._pendingUnlinks.has(path27)) {
184895
184895
  event = EVENTS.CHANGE;
184896
- this._pendingUnlinks.delete(path26);
184896
+ this._pendingUnlinks.delete(path27);
184897
184897
  }
184898
184898
  }
184899
184899
  if (awf && (event === EVENTS.ADD || event === EVENTS.CHANGE) && this._readyEmitted) {
@@ -184911,16 +184911,16 @@ var FSWatcher = class extends EventEmitter {
184911
184911
  this.emitWithAll(event, args);
184912
184912
  }
184913
184913
  };
184914
- this._awaitWriteFinish(path26, awf.stabilityThreshold, event, awfEmit);
184914
+ this._awaitWriteFinish(path27, awf.stabilityThreshold, event, awfEmit);
184915
184915
  return this;
184916
184916
  }
184917
184917
  if (event === EVENTS.CHANGE) {
184918
- const isThrottled = !this._throttle(EVENTS.CHANGE, path26, 50);
184918
+ const isThrottled = !this._throttle(EVENTS.CHANGE, path27, 50);
184919
184919
  if (isThrottled)
184920
184920
  return this;
184921
184921
  }
184922
184922
  if (opts.alwaysStat && stats === void 0 && (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
184923
- const fullPath = opts.cwd ? sp2.join(opts.cwd, path26) : path26;
184923
+ const fullPath = opts.cwd ? sp2.join(opts.cwd, path27) : path27;
184924
184924
  let stats2;
184925
184925
  try {
184926
184926
  stats2 = await stat3(fullPath);
@@ -184951,23 +184951,23 @@ var FSWatcher = class extends EventEmitter {
184951
184951
  * @param timeout duration of time to suppress duplicate actions
184952
184952
  * @returns tracking object or false if action should be suppressed
184953
184953
  */
184954
- _throttle(actionType, path26, timeout) {
184954
+ _throttle(actionType, path27, timeout) {
184955
184955
  if (!this._throttled.has(actionType)) {
184956
184956
  this._throttled.set(actionType, /* @__PURE__ */ new Map());
184957
184957
  }
184958
184958
  const action = this._throttled.get(actionType);
184959
184959
  if (!action)
184960
184960
  throw new Error("invalid throttle");
184961
- const actionPath = action.get(path26);
184961
+ const actionPath = action.get(path27);
184962
184962
  if (actionPath) {
184963
184963
  actionPath.count++;
184964
184964
  return false;
184965
184965
  }
184966
184966
  let timeoutObject;
184967
184967
  const clear = () => {
184968
- const item = action.get(path26);
184968
+ const item = action.get(path27);
184969
184969
  const count = item ? item.count : 0;
184970
- action.delete(path26);
184970
+ action.delete(path27);
184971
184971
  clearTimeout(timeoutObject);
184972
184972
  if (item)
184973
184973
  clearTimeout(item.timeoutObject);
@@ -184975,7 +184975,7 @@ var FSWatcher = class extends EventEmitter {
184975
184975
  };
184976
184976
  timeoutObject = setTimeout(clear, timeout);
184977
184977
  const thr = { timeoutObject, clear, count: 0 };
184978
- action.set(path26, thr);
184978
+ action.set(path27, thr);
184979
184979
  return thr;
184980
184980
  }
184981
184981
  _incrReadyCount() {
@@ -184989,44 +184989,44 @@ var FSWatcher = class extends EventEmitter {
184989
184989
  * @param event
184990
184990
  * @param awfEmit Callback to be called when ready for event to be emitted.
184991
184991
  */
184992
- _awaitWriteFinish(path26, threshold, event, awfEmit) {
184992
+ _awaitWriteFinish(path27, threshold, event, awfEmit) {
184993
184993
  const awf = this.options.awaitWriteFinish;
184994
184994
  if (typeof awf !== "object")
184995
184995
  return;
184996
184996
  const pollInterval = awf.pollInterval;
184997
184997
  let timeoutHandler;
184998
- let fullPath = path26;
184999
- if (this.options.cwd && !sp2.isAbsolute(path26)) {
185000
- fullPath = sp2.join(this.options.cwd, path26);
184998
+ let fullPath = path27;
184999
+ if (this.options.cwd && !sp2.isAbsolute(path27)) {
185000
+ fullPath = sp2.join(this.options.cwd, path27);
185001
185001
  }
185002
185002
  const now = /* @__PURE__ */ new Date();
185003
185003
  const writes = this._pendingWrites;
185004
185004
  function awaitWriteFinishFn(prevStat) {
185005
185005
  statcb(fullPath, (err, curStat) => {
185006
- if (err || !writes.has(path26)) {
185006
+ if (err || !writes.has(path27)) {
185007
185007
  if (err && err.code !== "ENOENT")
185008
185008
  awfEmit(err);
185009
185009
  return;
185010
185010
  }
185011
185011
  const now2 = Number(/* @__PURE__ */ new Date());
185012
185012
  if (prevStat && curStat.size !== prevStat.size) {
185013
- writes.get(path26).lastChange = now2;
185013
+ writes.get(path27).lastChange = now2;
185014
185014
  }
185015
- const pw = writes.get(path26);
185015
+ const pw = writes.get(path27);
185016
185016
  const df = now2 - pw.lastChange;
185017
185017
  if (df >= threshold) {
185018
- writes.delete(path26);
185018
+ writes.delete(path27);
185019
185019
  awfEmit(void 0, curStat);
185020
185020
  } else {
185021
185021
  timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval, curStat);
185022
185022
  }
185023
185023
  });
185024
185024
  }
185025
- if (!writes.has(path26)) {
185026
- writes.set(path26, {
185025
+ if (!writes.has(path27)) {
185026
+ writes.set(path27, {
185027
185027
  lastChange: now,
185028
185028
  cancelWait: () => {
185029
- writes.delete(path26);
185029
+ writes.delete(path27);
185030
185030
  clearTimeout(timeoutHandler);
185031
185031
  return event;
185032
185032
  }
@@ -185037,8 +185037,8 @@ var FSWatcher = class extends EventEmitter {
185037
185037
  /**
185038
185038
  * Determines whether user has asked to ignore this path.
185039
185039
  */
185040
- _isIgnored(path26, stats) {
185041
- if (this.options.atomic && DOT_RE.test(path26))
185040
+ _isIgnored(path27, stats) {
185041
+ if (this.options.atomic && DOT_RE.test(path27))
185042
185042
  return true;
185043
185043
  if (!this._userIgnored) {
185044
185044
  const { cwd } = this.options;
@@ -185048,17 +185048,17 @@ var FSWatcher = class extends EventEmitter {
185048
185048
  const list = [...ignoredPaths.map(normalizeIgnored(cwd)), ...ignored];
185049
185049
  this._userIgnored = anymatch(list, void 0);
185050
185050
  }
185051
- return this._userIgnored(path26, stats);
185051
+ return this._userIgnored(path27, stats);
185052
185052
  }
185053
- _isntIgnored(path26, stat4) {
185054
- return !this._isIgnored(path26, stat4);
185053
+ _isntIgnored(path27, stat4) {
185054
+ return !this._isIgnored(path27, stat4);
185055
185055
  }
185056
185056
  /**
185057
185057
  * Provides a set of common helpers and properties relating to symlink handling.
185058
185058
  * @param path file or directory pattern being watched
185059
185059
  */
185060
- _getWatchHelpers(path26) {
185061
- return new WatchHelper(path26, this.options.followSymlinks, this);
185060
+ _getWatchHelpers(path27) {
185061
+ return new WatchHelper(path27, this.options.followSymlinks, this);
185062
185062
  }
185063
185063
  // Directory helpers
185064
185064
  // -----------------
@@ -185090,63 +185090,63 @@ var FSWatcher = class extends EventEmitter {
185090
185090
  * @param item base path of item/directory
185091
185091
  */
185092
185092
  _remove(directory, item, isDirectory) {
185093
- const path26 = sp2.join(directory, item);
185094
- const fullPath = sp2.resolve(path26);
185095
- isDirectory = isDirectory != null ? isDirectory : this._watched.has(path26) || this._watched.has(fullPath);
185096
- if (!this._throttle("remove", path26, 100))
185093
+ const path27 = sp2.join(directory, item);
185094
+ const fullPath = sp2.resolve(path27);
185095
+ isDirectory = isDirectory != null ? isDirectory : this._watched.has(path27) || this._watched.has(fullPath);
185096
+ if (!this._throttle("remove", path27, 100))
185097
185097
  return;
185098
185098
  if (!isDirectory && this._watched.size === 1) {
185099
185099
  this.add(directory, item, true);
185100
185100
  }
185101
- const wp = this._getWatchedDir(path26);
185101
+ const wp = this._getWatchedDir(path27);
185102
185102
  const nestedDirectoryChildren = wp.getChildren();
185103
- nestedDirectoryChildren.forEach((nested) => this._remove(path26, nested));
185103
+ nestedDirectoryChildren.forEach((nested) => this._remove(path27, nested));
185104
185104
  const parent = this._getWatchedDir(directory);
185105
185105
  const wasTracked = parent.has(item);
185106
185106
  parent.remove(item);
185107
185107
  if (this._symlinkPaths.has(fullPath)) {
185108
185108
  this._symlinkPaths.delete(fullPath);
185109
185109
  }
185110
- let relPath = path26;
185110
+ let relPath = path27;
185111
185111
  if (this.options.cwd)
185112
- relPath = sp2.relative(this.options.cwd, path26);
185112
+ relPath = sp2.relative(this.options.cwd, path27);
185113
185113
  if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
185114
185114
  const event = this._pendingWrites.get(relPath).cancelWait();
185115
185115
  if (event === EVENTS.ADD)
185116
185116
  return;
185117
185117
  }
185118
- this._watched.delete(path26);
185118
+ this._watched.delete(path27);
185119
185119
  this._watched.delete(fullPath);
185120
185120
  const eventName = isDirectory ? EVENTS.UNLINK_DIR : EVENTS.UNLINK;
185121
- if (wasTracked && !this._isIgnored(path26))
185122
- this._emit(eventName, path26);
185123
- this._closePath(path26);
185121
+ if (wasTracked && !this._isIgnored(path27))
185122
+ this._emit(eventName, path27);
185123
+ this._closePath(path27);
185124
185124
  }
185125
185125
  /**
185126
185126
  * Closes all watchers for a path
185127
185127
  */
185128
- _closePath(path26) {
185129
- this._closeFile(path26);
185130
- const dir = sp2.dirname(path26);
185131
- this._getWatchedDir(dir).remove(sp2.basename(path26));
185128
+ _closePath(path27) {
185129
+ this._closeFile(path27);
185130
+ const dir = sp2.dirname(path27);
185131
+ this._getWatchedDir(dir).remove(sp2.basename(path27));
185132
185132
  }
185133
185133
  /**
185134
185134
  * Closes only file-specific watchers
185135
185135
  */
185136
- _closeFile(path26) {
185137
- const closers = this._closers.get(path26);
185136
+ _closeFile(path27) {
185137
+ const closers = this._closers.get(path27);
185138
185138
  if (!closers)
185139
185139
  return;
185140
185140
  closers.forEach((closer) => closer());
185141
- this._closers.delete(path26);
185141
+ this._closers.delete(path27);
185142
185142
  }
185143
- _addPathCloser(path26, closer) {
185143
+ _addPathCloser(path27, closer) {
185144
185144
  if (!closer)
185145
185145
  return;
185146
- let list = this._closers.get(path26);
185146
+ let list = this._closers.get(path27);
185147
185147
  if (!list) {
185148
185148
  list = [];
185149
- this._closers.set(path26, list);
185149
+ this._closers.set(path27, list);
185150
185150
  }
185151
185151
  list.push(closer);
185152
185152
  }
@@ -185196,6 +185196,8 @@ import * as fs7 from "fs";
185196
185196
  import * as path7 from "path";
185197
185197
  import { fileURLToPath } from "url";
185198
185198
  import * as net2 from "net";
185199
+ import * as fs8 from "fs";
185200
+ import * as path9 from "path";
185199
185201
  import { spawn as spawn3 } from "child_process";
185200
185202
  import { readFile as readFile2, writeFile as writeFile2, mkdir } from "fs/promises";
185201
185203
  import { existsSync as existsSync8 } from "fs";
@@ -185204,26 +185206,26 @@ import * as crypto from "crypto";
185204
185206
  import * as http2 from "http";
185205
185207
  import * as crypto2 from "crypto";
185206
185208
  import * as net3 from "net";
185207
- import * as fs8 from "fs";
185208
- import * as path9 from "path";
185209
- import { spawn as spawn4 } from "child_process";
185210
- import { randomUUID as randomUUID2 } from "crypto";
185211
185209
  import * as fs9 from "fs";
185212
185210
  import * as path10 from "path";
185213
- import { spawnSync } from "child_process";
185211
+ import { spawn as spawn4 } from "child_process";
185212
+ import { randomUUID as randomUUID2 } from "crypto";
185214
185213
  import * as fs10 from "fs";
185215
185214
  import * as path11 from "path";
185215
+ import { spawnSync } from "child_process";
185216
+ import * as fs11 from "fs";
185217
+ import * as path12 from "path";
185216
185218
  import * as net4 from "net";
185217
185219
  import { spawn as spawn5 } from "child_process";
185218
185220
  import * as net5 from "net";
185219
- import * as fs11 from "fs";
185220
- import * as path12 from "path";
185221
+ import * as fs12 from "fs";
185222
+ import * as path13 from "path";
185221
185223
  import { generateSlug } from "random-word-slugs";
185222
185224
  import { EventEmitter as EventEmitter2 } from "node:events";
185223
185225
  import * as net6 from "node:net";
185224
185226
  import { EventEmitter as EventEmitter22 } from "events";
185225
185227
  import { execSync as execSync2 } from "child_process";
185226
- import * as path14 from "path";
185228
+ import * as path15 from "path";
185227
185229
  var __create2 = Object.create;
185228
185230
  var __defProp2 = Object.defineProperty;
185229
185231
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -185264,8 +185266,8 @@ var require_dist = __commonJS2({
185264
185266
  var $global, $module, $NaN = NaN;
185265
185267
  if ("undefined" != typeof window ? $global = window : "undefined" != typeof self ? $global = self : "undefined" != typeof global ? ($global = global).require = __require2 : $global = this, void 0 === $global || void 0 === $global.Array) throw new Error("no global object found");
185266
185268
  if ("undefined" != typeof module && ($module = module), !$global.fs && $global.require) try {
185267
- var fs132 = $global.require("fs");
185268
- "object" == typeof fs132 && null !== fs132 && 0 !== Object.keys(fs132).length && ($global.fs = fs132);
185269
+ var fs142 = $global.require("fs");
185270
+ "object" == typeof fs142 && null !== fs142 && 0 !== Object.keys(fs142).length && ($global.fs = fs142);
185269
185271
  } catch (e) {
185270
185272
  }
185271
185273
  if (!$global.fs) {
@@ -370384,7 +370386,7 @@ function findMissingSecrets(secretsDef, preparedSecrets, usedSecrets) {
370384
370386
  }
370385
370387
  return missing;
370386
370388
  }
370387
- async function startElectric(postgres, port, options2) {
370389
+ async function startElectric(postgres, port, dataDir, options2) {
370388
370390
  if (postgres.type !== "postgres") {
370389
370391
  throw new Error(
370390
370392
  `Electric sync only works with postgres, not ${postgres.type}`
@@ -370397,10 +370399,13 @@ async function startElectric(postgres, port, options2) {
370397
370399
  );
370398
370400
  const secret = generateRandomString(32);
370399
370401
  const host = "127.0.0.1";
370402
+ const storageDir = path9.join(process.cwd(), dataDir, `electric-${postgres.name}`);
370403
+ fs8.rmSync(storageDir, { recursive: true, force: true });
370400
370404
  writeLog("electric", `Starting Electric for database "${postgres.name}"`);
370401
370405
  writeLog("electric", `DATABASE_URL: ${postgres.url}`);
370402
370406
  writeLog("electric", `ELECTRIC_PORT: ${port}`);
370403
370407
  writeLog("electric", `ELECTRIC_SECRET: ${secret}`);
370408
+ writeLog("electric", `ELECTRIC_STORAGE_DIR: ${storageDir}`);
370404
370409
  writeLog("electric", `Binary: ${binary.executables["electric"]}`);
370405
370410
  const electric = spawn3(binary.executables["electric"], [], {
370406
370411
  stdio: ["ignore", "pipe", "pipe"],
@@ -370409,6 +370414,7 @@ async function startElectric(postgres, port, options2) {
370409
370414
  DATABASE_URL: postgres.url,
370410
370415
  ELECTRIC_SECRET: secret,
370411
370416
  ELECTRIC_PORT: String(port),
370417
+ ELECTRIC_STORAGE_DIR: storageDir,
370412
370418
  ELECTRIC_PERSISTENT_STATE: "MEMORY",
370413
370419
  ELECTRIC_STORAGE: "MEMORY"
370414
370420
  }
@@ -370629,13 +370635,13 @@ async function startDrizzleGateway(postgresInstances, port, configDir, options2)
370629
370635
  options2?.onProgress
370630
370636
  );
370631
370637
  const host = "127.0.0.1";
370632
- const drizzleConfigDir = path9.join(configDir, "drizzle-gateway");
370633
- if (!fs8.existsSync(drizzleConfigDir)) {
370634
- fs8.mkdirSync(drizzleConfigDir, { recursive: true });
370638
+ const drizzleConfigDir = path10.join(configDir, "drizzle-gateway");
370639
+ if (!fs9.existsSync(drizzleConfigDir)) {
370640
+ fs9.mkdirSync(drizzleConfigDir, { recursive: true });
370635
370641
  }
370636
370642
  const storeJson = generateStoreJson(postgresInstances);
370637
- const storeJsonPath = path9.join(drizzleConfigDir, "store.json");
370638
- fs8.writeFileSync(storeJsonPath, JSON.stringify(storeJson, null, 2));
370643
+ const storeJsonPath = path10.join(drizzleConfigDir, "store.json");
370644
+ fs9.writeFileSync(storeJsonPath, JSON.stringify(storeJson, null, 2));
370639
370645
  writeLog("drizzle-gateway", `Starting Drizzle Gateway`);
370640
370646
  writeLog("drizzle-gateway", `STORE_PATH: ${drizzleConfigDir}`);
370641
370647
  writeLog("drizzle-gateway", `PORT: ${port}`);
@@ -370735,11 +370741,11 @@ function detectSyncDatabases(config) {
370735
370741
  }
370736
370742
  function getMigrationFiles(dir, log) {
370737
370743
  log(`Scanning migrations directory: ${dir}`);
370738
- if (!fs9.existsSync(dir)) {
370744
+ if (!fs10.existsSync(dir)) {
370739
370745
  log(`Migrations directory does not exist: ${dir}`);
370740
370746
  return [];
370741
370747
  }
370742
- const files = fs9.readdirSync(dir);
370748
+ const files = fs10.readdirSync(dir);
370743
370749
  log(`Found ${files.length} files in directory`);
370744
370750
  const tomlFiles = files.filter((f) => f.endsWith(".toml")).sort((a, b) => a.localeCompare(b));
370745
370751
  log(`Found ${tomlFiles.length} .toml migration files: ${tomlFiles.join(", ") || "(none)"}`);
@@ -370789,7 +370795,7 @@ function runReshape(args, databaseUrl, migrationsDir, reshapeBinaryPath, log) {
370789
370795
  }
370790
370796
  function makeReadOnly(filePath, log) {
370791
370797
  try {
370792
- fs9.chmodSync(filePath, 292);
370798
+ fs10.chmodSync(filePath, 292);
370793
370799
  log(`Set file permissions to read-only (444): ${filePath}`);
370794
370800
  } catch (err) {
370795
370801
  const message = err instanceof Error ? err.message : String(err);
@@ -370850,7 +370856,7 @@ function createReshapeWatcher(options2) {
370850
370856
  log(`Successfully completed ${currentMigrationFiles.length - 1} migration(s)`);
370851
370857
  log(`Making completed migration files read-only...`);
370852
370858
  for (let i = 0; i < currentMigrationFiles.length - 1; i++) {
370853
- const filePath = path10.join(migrationsDir, currentMigrationFiles[i]);
370859
+ const filePath = path11.join(migrationsDir, currentMigrationFiles[i]);
370854
370860
  makeReadOnly(filePath, log);
370855
370861
  }
370856
370862
  log(`Starting latest migration "${lastMigrationName}" (will not be completed, allowing iteration)`);
@@ -370875,9 +370881,9 @@ function createReshapeWatcher(options2) {
370875
370881
  };
370876
370882
  const startWatching = () => {
370877
370883
  log(`Starting file watcher for migrations directory...`);
370878
- if (!fs9.existsSync(migrationsDir)) {
370884
+ if (!fs10.existsSync(migrationsDir)) {
370879
370885
  log(`Migrations directory does not exist, creating: ${migrationsDir}`);
370880
- fs9.mkdirSync(migrationsDir, { recursive: true });
370886
+ fs10.mkdirSync(migrationsDir, { recursive: true });
370881
370887
  }
370882
370888
  log(`Watching directory: ${migrationsDir}`);
370883
370889
  watcher = chokidar_default.watch(migrationsDir, {
@@ -370890,7 +370896,7 @@ function createReshapeWatcher(options2) {
370890
370896
  }
370891
370897
  });
370892
370898
  watcher.on("change", (filePath) => {
370893
- const filename = path10.basename(filePath);
370899
+ const filename = path11.basename(filePath);
370894
370900
  if (!filename.endsWith(".toml")) return;
370895
370901
  log(`File change detected: ${filename}`);
370896
370902
  log(` Full path: ${filePath}`);
@@ -370921,7 +370927,7 @@ function createReshapeWatcher(options2) {
370921
370927
  }
370922
370928
  });
370923
370929
  watcher.on("add", (filePath) => {
370924
- const filename = path10.basename(filePath);
370930
+ const filename = path11.basename(filePath);
370925
370931
  if (!filename.endsWith(".toml")) return;
370926
370932
  log(`New file detected: ${filename}`);
370927
370933
  log(` Full path: ${filePath}`);
@@ -370945,7 +370951,7 @@ function createReshapeWatcher(options2) {
370945
370951
  return;
370946
370952
  }
370947
370953
  log(`Previous migration completed successfully`);
370948
- const completedPath = path10.join(migrationsDir, startedMigration);
370954
+ const completedPath = path11.join(migrationsDir, startedMigration);
370949
370955
  makeReadOnly(completedPath, log);
370950
370956
  } else {
370951
370957
  log(`No previous migration was started`);
@@ -370970,7 +370976,7 @@ function createReshapeWatcher(options2) {
370970
370976
  onSearchPathChanged(newSearchPath);
370971
370977
  });
370972
370978
  watcher.on("unlink", (filePath) => {
370973
- const filename = path10.basename(filePath);
370979
+ const filename = path11.basename(filePath);
370974
370980
  if (!filename.endsWith(".toml")) return;
370975
370981
  log(`File deleted: ${filename}`);
370976
370982
  log(` Full path: ${filePath}`);
@@ -371012,10 +371018,10 @@ function createReshapeWatcher(options2) {
371012
371018
  }
371013
371019
  async function startTemporalDevServer(temporals, grpcPort, uiPort, dataDir, onProgress) {
371014
371020
  const binary = await ensureBinary(temporalBinary, void 0, onProgress);
371015
- const dbPath = path11.join(process.cwd(), dataDir, "temporal.db");
371016
- const dbDir = path11.dirname(dbPath);
371017
- if (!fs10.existsSync(dbDir)) {
371018
- fs10.mkdirSync(dbDir, { recursive: true });
371021
+ const dbPath = path12.join(process.cwd(), dataDir, "temporal.db");
371022
+ const dbDir = path12.dirname(dbPath);
371023
+ if (!fs11.existsSync(dbDir)) {
371024
+ fs11.mkdirSync(dbDir, { recursive: true });
371019
371025
  }
371020
371026
  const host = "127.0.0.1";
371021
371027
  const namespaceArgs = temporals.flatMap((t) => ["--namespace", t.name]);
@@ -371303,7 +371309,7 @@ async function startResources(options2) {
371303
371309
  const electricPort = portAllocator.allocate(`electric:${pgName}`);
371304
371310
  log(`Starting Electric sync for "${pgName}" on port ${electricPort}`);
371305
371311
  callbacks.onElectricStarting?.(pgName);
371306
- const electricInstance = await startElectric(pg, electricPort);
371312
+ const electricInstance = await startElectric(pg, electricPort, dataDir);
371307
371313
  electric.set(pgName, electricInstance);
371308
371314
  startedElectric.push(electricInstance);
371309
371315
  pg.syncUrl = electricInstance.url;
@@ -371408,16 +371414,16 @@ var StableSubdomainAllocator = class {
371408
371414
  tunnelsFilePath;
371409
371415
  baseSlug = null;
371410
371416
  constructor(projectRoot, key = "default") {
371411
- this.tunnelsDir = path12.join(projectRoot, ".specific", "keys", key);
371412
- this.tunnelsFilePath = path12.join(this.tunnelsDir, "tunnels.json");
371417
+ this.tunnelsDir = path13.join(projectRoot, ".specific", "keys", key);
371418
+ this.tunnelsFilePath = path13.join(this.tunnelsDir, "tunnels.json");
371413
371419
  this.loadTunnels();
371414
371420
  }
371415
371421
  loadTunnels() {
371416
- if (!fs11.existsSync(this.tunnelsFilePath)) {
371422
+ if (!fs12.existsSync(this.tunnelsFilePath)) {
371417
371423
  return;
371418
371424
  }
371419
371425
  try {
371420
- const content = fs11.readFileSync(this.tunnelsFilePath, "utf-8");
371426
+ const content = fs12.readFileSync(this.tunnelsFilePath, "utf-8");
371421
371427
  const data = JSON.parse(content);
371422
371428
  if (data.version === 1 && data.baseSlug) {
371423
371429
  this.baseSlug = data.baseSlug;
@@ -371427,14 +371433,14 @@ var StableSubdomainAllocator = class {
371427
371433
  }
371428
371434
  }
371429
371435
  saveTunnels() {
371430
- if (!fs11.existsSync(this.tunnelsDir)) {
371431
- fs11.mkdirSync(this.tunnelsDir, { recursive: true });
371436
+ if (!fs12.existsSync(this.tunnelsDir)) {
371437
+ fs12.mkdirSync(this.tunnelsDir, { recursive: true });
371432
371438
  }
371433
371439
  const data = {
371434
371440
  version: 1,
371435
371441
  baseSlug: this.baseSlug
371436
371442
  };
371437
- fs11.writeFileSync(this.tunnelsFilePath, JSON.stringify(data, null, 2));
371443
+ fs12.writeFileSync(this.tunnelsFilePath, JSON.stringify(data, null, 2));
371438
371444
  }
371439
371445
  generateBaseSlug() {
371440
371446
  return generateSlug(2, {
@@ -371918,10 +371924,10 @@ var DevEnvironment = class extends TypedEventEmitter {
371918
371924
  }
371919
371925
  // ── Private: config file watcher ───────────────────────────────────────────
371920
371926
  startConfigWatcher() {
371921
- const configPath = path13.join(this.projectDir, "specific.hcl");
371927
+ const configPath = path14.join(this.projectDir, "specific.hcl");
371922
371928
  this.configWatcher = watchConfigFile(configPath, 1e3, () => {
371923
371929
  try {
371924
- const hcl = fs12.readFileSync(configPath, "utf-8");
371930
+ const hcl = fs13.readFileSync(configPath, "utf-8");
371925
371931
  parseConfig(hcl).then(() => {
371926
371932
  this.reload();
371927
371933
  }).catch((err) => {
@@ -371960,8 +371966,8 @@ var DevEnvironment = class extends TypedEventEmitter {
371960
371966
  this.emit("error", new Error(msg));
371961
371967
  return;
371962
371968
  }
371963
- const configPath = path13.join(this.projectDir, "specific.hcl");
371964
- if (!fs12.existsSync(configPath)) {
371969
+ const configPath = path14.join(this.projectDir, "specific.hcl");
371970
+ if (!fs13.existsSync(configPath)) {
371965
371971
  this.systemLog("Waiting for specific.hcl to appear");
371966
371972
  this.setStatus("waiting");
371967
371973
  const dirWatcher = chokidar_default.watch(configPath, {
@@ -371982,7 +371988,7 @@ var DevEnvironment = class extends TypedEventEmitter {
371982
371988
  return;
371983
371989
  }
371984
371990
  let config;
371985
- const hcl = fs12.readFileSync(configPath, "utf-8");
371991
+ const hcl = fs13.readFileSync(configPath, "utf-8");
371986
371992
  try {
371987
371993
  config = await parseConfig(hcl);
371988
371994
  } catch (err) {
@@ -371992,9 +371998,9 @@ var DevEnvironment = class extends TypedEventEmitter {
371992
371998
  return;
371993
371999
  }
371994
372000
  if (this.cancelled) return;
371995
- const localFilePath = path13.join(this.projectDir, "specific.local");
371996
- if (fs12.existsSync(localFilePath)) {
371997
- const localContent = fs12.readFileSync(localFilePath, "utf-8");
372001
+ const localFilePath = path14.join(this.projectDir, "specific.local");
372002
+ if (fs13.existsSync(localFilePath)) {
372003
+ const localContent = fs13.readFileSync(localFilePath, "utf-8");
371998
372004
  try {
371999
372005
  await parseLocalFile(localContent);
372000
372006
  } catch (err) {
@@ -372111,7 +372117,7 @@ var DevEnvironment = class extends TypedEventEmitter {
372111
372117
  const drizzleGateway = await startDrizzleGateway(
372112
372118
  postgresResources,
372113
372119
  drizzlePort,
372114
- path13.join(this.projectDir, ".specific", "keys", this.instanceKey)
372120
+ path14.join(this.projectDir, ".specific", "keys", this.instanceKey)
372115
372121
  );
372116
372122
  this.drizzleGateway = drizzleGateway;
372117
372123
  this.systemLog(`Database viewer ready at ${drizzleGateway.url}`);
@@ -372131,7 +372137,7 @@ var DevEnvironment = class extends TypedEventEmitter {
372131
372137
  if (pg.reshape?.enabled) {
372132
372138
  const resource = resources.get(pg.name);
372133
372139
  if (!resource) continue;
372134
- const migrationsDir = path13.resolve(
372140
+ const migrationsDir = path14.resolve(
372135
372141
  this.projectDir,
372136
372142
  pg.reshape.migrations_dir ?? "migrations"
372137
372143
  );
@@ -372334,13 +372340,13 @@ Add them to the config block in specific.local`
372334
372340
  const runningServices = [];
372335
372341
  const resolveServiceCwd = (service) => {
372336
372342
  if (service.root)
372337
- return path13.resolve(this.projectDir, service.root);
372343
+ return path14.resolve(this.projectDir, service.root);
372338
372344
  if (service.build) {
372339
372345
  const build = config.builds.find(
372340
372346
  (b) => b.name === service.build.name
372341
372347
  );
372342
372348
  if (build?.root)
372343
- return path13.resolve(this.projectDir, build.root);
372349
+ return path14.resolve(this.projectDir, build.root);
372344
372350
  }
372345
372351
  return this.projectDir;
372346
372352
  };
@@ -372561,8 +372567,8 @@ function isInWorktree() {
372561
372567
  encoding: "utf-8",
372562
372568
  stdio: ["pipe", "pipe", "pipe"]
372563
372569
  }).trim();
372564
- const resolvedCommonDir = path14.resolve(commonDir);
372565
- const resolvedGitDir = path14.resolve(gitDir);
372570
+ const resolvedCommonDir = path15.resolve(commonDir);
372571
+ const resolvedGitDir = path15.resolve(gitDir);
372566
372572
  return resolvedCommonDir !== resolvedGitDir;
372567
372573
  } catch {
372568
372574
  return false;
@@ -372577,7 +372583,7 @@ function getWorktreeName() {
372577
372583
  encoding: "utf-8",
372578
372584
  stdio: ["pipe", "pipe", "pipe"]
372579
372585
  }).trim();
372580
- return path14.basename(gitDir);
372586
+ return path15.basename(gitDir);
372581
372587
  } catch {
372582
372588
  return null;
372583
372589
  }
@@ -372632,8 +372638,8 @@ function writeProjectId(projectId, projectDir = process.cwd()) {
372632
372638
  }
372633
372639
 
372634
372640
  // src/lib/auth/credentials.ts
372635
- import * as fs18 from "fs";
372636
- import * as path16 from "path";
372641
+ import * as fs19 from "fs";
372642
+ import * as path17 from "path";
372637
372643
  import * as os4 from "os";
372638
372644
 
372639
372645
  // src/lib/auth/errors.ts
@@ -372877,18 +372883,18 @@ function performLogin(options2 = {}) {
372877
372883
 
372878
372884
  // src/lib/auth/credentials.ts
372879
372885
  function getUserCredentialsDir() {
372880
- return path16.join(os4.homedir(), ".specific");
372886
+ return path17.join(os4.homedir(), ".specific");
372881
372887
  }
372882
372888
  function getCredentialsPath() {
372883
- return path16.join(getUserCredentialsDir(), "credentials.json");
372889
+ return path17.join(getUserCredentialsDir(), "credentials.json");
372884
372890
  }
372885
372891
  function readUserCredentials() {
372886
372892
  const credentialsPath = getCredentialsPath();
372887
- if (!fs18.existsSync(credentialsPath)) {
372893
+ if (!fs19.existsSync(credentialsPath)) {
372888
372894
  return null;
372889
372895
  }
372890
372896
  try {
372891
- const content = fs18.readFileSync(credentialsPath, "utf-8");
372897
+ const content = fs19.readFileSync(credentialsPath, "utf-8");
372892
372898
  return JSON.parse(content);
372893
372899
  } catch {
372894
372900
  return null;
@@ -372896,18 +372902,18 @@ function readUserCredentials() {
372896
372902
  }
372897
372903
  function writeUserCredentials(credentials) {
372898
372904
  const dir = getUserCredentialsDir();
372899
- if (!fs18.existsSync(dir)) {
372900
- fs18.mkdirSync(dir, { recursive: true, mode: 448 });
372905
+ if (!fs19.existsSync(dir)) {
372906
+ fs19.mkdirSync(dir, { recursive: true, mode: 448 });
372901
372907
  }
372902
372908
  const credentialsPath = getCredentialsPath();
372903
- fs18.writeFileSync(credentialsPath, JSON.stringify(credentials, null, 2), {
372909
+ fs19.writeFileSync(credentialsPath, JSON.stringify(credentials, null, 2), {
372904
372910
  mode: 384
372905
372911
  });
372906
372912
  }
372907
372913
  function clearUserCredentials() {
372908
372914
  const credentialsPath = getCredentialsPath();
372909
- if (fs18.existsSync(credentialsPath)) {
372910
- fs18.unlinkSync(credentialsPath);
372915
+ if (fs19.existsSync(credentialsPath)) {
372916
+ fs19.unlinkSync(credentialsPath);
372911
372917
  }
372912
372918
  }
372913
372919
  function isLoggedIn() {
@@ -373033,7 +373039,7 @@ function trackEvent(event, properties) {
373033
373039
  event,
373034
373040
  properties: {
373035
373041
  ...properties,
373036
- cli_version: "0.1.102",
373042
+ cli_version: "0.1.103",
373037
373043
  platform: process.platform,
373038
373044
  node_version: process.version,
373039
373045
  project_id: getProjectId()
@@ -373064,67 +373070,67 @@ var options = [
373064
373070
  { id: "other", label: "Other / Manual" }
373065
373071
  ];
373066
373072
  function isGitProject() {
373067
- const gitPath = path17.join(process.cwd(), ".git");
373068
- return fs19.existsSync(gitPath);
373073
+ const gitPath = path18.join(process.cwd(), ".git");
373074
+ return fs20.existsSync(gitPath);
373069
373075
  }
373070
373076
  function detectExistingAgents() {
373071
373077
  const detected = {};
373072
- const cursorDir = path17.join(process.cwd(), ".cursor");
373073
- if (fs19.existsSync(cursorDir)) {
373078
+ const cursorDir = path18.join(process.cwd(), ".cursor");
373079
+ if (fs20.existsSync(cursorDir)) {
373074
373080
  detected["cursor"] = true;
373075
373081
  }
373076
- const claudeDir = path17.join(process.cwd(), ".claude");
373077
- const claudeMd = path17.join(process.cwd(), "CLAUDE.md");
373078
- if (fs19.existsSync(claudeDir) || fs19.existsSync(claudeMd)) {
373082
+ const claudeDir = path18.join(process.cwd(), ".claude");
373083
+ const claudeMd = path18.join(process.cwd(), "CLAUDE.md");
373084
+ if (fs20.existsSync(claudeDir) || fs20.existsSync(claudeMd)) {
373079
373085
  detected["claude"] = true;
373080
373086
  }
373081
- const agentsMd = path17.join(process.cwd(), "AGENTS.md");
373082
- if (fs19.existsSync(agentsMd)) {
373087
+ const agentsMd = path18.join(process.cwd(), "AGENTS.md");
373088
+ if (fs20.existsSync(agentsMd)) {
373083
373089
  detected["codex"] = true;
373084
373090
  }
373085
373091
  return detected;
373086
373092
  }
373087
373093
  function appendOrCreateFile(filePath, content) {
373088
- if (fs19.existsSync(filePath)) {
373089
- const existing = fs19.readFileSync(filePath, "utf-8");
373094
+ if (fs20.existsSync(filePath)) {
373095
+ const existing = fs20.readFileSync(filePath, "utf-8");
373090
373096
  if (existing.includes("specific docs") || existing.includes("specific check")) {
373091
373097
  return "unchanged";
373092
373098
  }
373093
373099
  const separator = existing.endsWith("\n") ? "\n" : "\n\n";
373094
- fs19.writeFileSync(filePath, existing + separator + content + "\n");
373100
+ fs20.writeFileSync(filePath, existing + separator + content + "\n");
373095
373101
  return "modified";
373096
373102
  } else {
373097
- fs19.writeFileSync(filePath, content + "\n");
373103
+ fs20.writeFileSync(filePath, content + "\n");
373098
373104
  return "created";
373099
373105
  }
373100
373106
  }
373101
373107
  function addToGitignore() {
373102
- const gitignorePath = path17.join(process.cwd(), ".gitignore");
373108
+ const gitignorePath = path18.join(process.cwd(), ".gitignore");
373103
373109
  const entries = [".specific", "specific.local"];
373104
- if (fs19.existsSync(gitignorePath)) {
373105
- const existing = fs19.readFileSync(gitignorePath, "utf-8");
373110
+ if (fs20.existsSync(gitignorePath)) {
373111
+ const existing = fs20.readFileSync(gitignorePath, "utf-8");
373106
373112
  const lines = existing.split("\n").map((l) => l.trim());
373107
373113
  const missingEntries = entries.filter((entry) => !lines.includes(entry));
373108
373114
  if (missingEntries.length === 0) {
373109
373115
  return "unchanged";
373110
373116
  }
373111
373117
  const separator = existing.endsWith("\n") ? "" : "\n";
373112
- fs19.writeFileSync(
373118
+ fs20.writeFileSync(
373113
373119
  gitignorePath,
373114
373120
  existing + separator + missingEntries.join("\n") + "\n"
373115
373121
  );
373116
373122
  return "modified";
373117
373123
  } else {
373118
- fs19.writeFileSync(gitignorePath, entries.join("\n") + "\n");
373124
+ fs20.writeFileSync(gitignorePath, entries.join("\n") + "\n");
373119
373125
  return "created";
373120
373126
  }
373121
373127
  }
373122
373128
  function configureClaudeCodePermissions() {
373123
- const claudeDir = path17.join(process.cwd(), ".claude");
373124
- const settingsPath = path17.join(claudeDir, "settings.local.json");
373129
+ const claudeDir = path18.join(process.cwd(), ".claude");
373130
+ const settingsPath = path18.join(claudeDir, "settings.local.json");
373125
373131
  const permissions = ["Bash(specific docs:*)", "Bash(specific check:*)"];
373126
- if (fs19.existsSync(settingsPath)) {
373127
- const existing = JSON.parse(fs19.readFileSync(settingsPath, "utf-8"));
373132
+ if (fs20.existsSync(settingsPath)) {
373133
+ const existing = JSON.parse(fs20.readFileSync(settingsPath, "utf-8"));
373128
373134
  const allowList = existing?.permissions?.allow || [];
373129
373135
  const missingPermissions = permissions.filter(
373130
373136
  (p) => !allowList.includes(p)
@@ -373139,39 +373145,39 @@ function configureClaudeCodePermissions() {
373139
373145
  existing.permissions.allow = [];
373140
373146
  }
373141
373147
  existing.permissions.allow.push(...missingPermissions);
373142
- fs19.writeFileSync(settingsPath, JSON.stringify(existing, null, 2) + "\n");
373148
+ fs20.writeFileSync(settingsPath, JSON.stringify(existing, null, 2) + "\n");
373143
373149
  return "modified";
373144
373150
  }
373145
- if (!fs19.existsSync(claudeDir)) {
373146
- fs19.mkdirSync(claudeDir);
373151
+ if (!fs20.existsSync(claudeDir)) {
373152
+ fs20.mkdirSync(claudeDir);
373147
373153
  }
373148
373154
  const settings = {
373149
373155
  permissions: {
373150
373156
  allow: permissions
373151
373157
  }
373152
373158
  };
373153
- fs19.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n");
373159
+ fs20.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n");
373154
373160
  return "created";
373155
373161
  }
373156
373162
  function createCursorRule() {
373157
- const cursorDir = path17.join(process.cwd(), ".cursor");
373158
- const rulesDir = path17.join(cursorDir, "rules");
373159
- const mdcPath = path17.join(rulesDir, "specific.mdc");
373160
- if (fs19.existsSync(mdcPath)) {
373161
- const existing = fs19.readFileSync(mdcPath, "utf-8");
373163
+ const cursorDir = path18.join(process.cwd(), ".cursor");
373164
+ const rulesDir = path18.join(cursorDir, "rules");
373165
+ const mdcPath = path18.join(rulesDir, "specific.mdc");
373166
+ if (fs20.existsSync(mdcPath)) {
373167
+ const existing = fs20.readFileSync(mdcPath, "utf-8");
373162
373168
  if (existing.includes("specific docs") || existing.includes("specific check")) {
373163
373169
  return "unchanged";
373164
373170
  }
373165
- fs19.writeFileSync(mdcPath, CURSOR_MDC_CONTENT);
373171
+ fs20.writeFileSync(mdcPath, CURSOR_MDC_CONTENT);
373166
373172
  return "modified";
373167
373173
  }
373168
- if (!fs19.existsSync(cursorDir)) {
373169
- fs19.mkdirSync(cursorDir);
373174
+ if (!fs20.existsSync(cursorDir)) {
373175
+ fs20.mkdirSync(cursorDir);
373170
373176
  }
373171
- if (!fs19.existsSync(rulesDir)) {
373172
- fs19.mkdirSync(rulesDir);
373177
+ if (!fs20.existsSync(rulesDir)) {
373178
+ fs20.mkdirSync(rulesDir);
373173
373179
  }
373174
- fs19.writeFileSync(mdcPath, CURSOR_MDC_CONTENT);
373180
+ fs20.writeFileSync(mdcPath, CURSOR_MDC_CONTENT);
373175
373181
  return "created";
373176
373182
  }
373177
373183
  function configureAgents(checked) {
@@ -373187,7 +373193,7 @@ function configureAgents(checked) {
373187
373193
  agents.filesModified.push(".cursor/rules/specific.mdc");
373188
373194
  }
373189
373195
  if (checked["claude"]) {
373190
- const claudeMdPath = path17.join(process.cwd(), "CLAUDE.md");
373196
+ const claudeMdPath = path18.join(process.cwd(), "CLAUDE.md");
373191
373197
  const status = appendOrCreateFile(claudeMdPath, SPECIFIC_INSTRUCTIONS);
373192
373198
  if (status === "created") agents.filesCreated.push("CLAUDE.md");
373193
373199
  else if (status === "modified") agents.filesModified.push("CLAUDE.md");
@@ -373198,7 +373204,7 @@ function configureAgents(checked) {
373198
373204
  agents.filesModified.push(".claude/settings.local.json");
373199
373205
  }
373200
373206
  if (checked["codex"]) {
373201
- const agentsMdPath = path17.join(process.cwd(), "AGENTS.md");
373207
+ const agentsMdPath = path18.join(process.cwd(), "AGENTS.md");
373202
373208
  const status = appendOrCreateFile(agentsMdPath, SPECIFIC_INSTRUCTIONS);
373203
373209
  if (status === "created") agents.filesCreated.push("AGENTS.md");
373204
373210
  else if (status === "modified") agents.filesModified.push("AGENTS.md");
@@ -373352,7 +373358,7 @@ Valid agents: ${VALID_AGENT_IDS.join(", ")}`
373352
373358
 
373353
373359
  // src/commands/docs.tsx
373354
373360
  import { readFileSync as readFileSync9, existsSync as existsSync17 } from "fs";
373355
- import { join as join18, dirname as dirname8 } from "path";
373361
+ import { join as join19, dirname as dirname8 } from "path";
373356
373362
  import { fileURLToPath as fileURLToPath3 } from "url";
373357
373363
 
373358
373364
  // src/lib/beta/registry.ts
@@ -373369,10 +373375,10 @@ var BETA_REGISTRY = [
373369
373375
 
373370
373376
  // src/lib/beta/storage.ts
373371
373377
  import { readFileSync as readFileSync8, writeFileSync as writeFileSync7, existsSync as existsSync16, mkdirSync as mkdirSync12 } from "fs";
373372
- import { join as join17 } from "path";
373378
+ import { join as join18 } from "path";
373373
373379
  var BETAS_FILE = ".specific/betas.json";
373374
373380
  function loadEnabledBetas(projectDir = process.cwd()) {
373375
- const filePath = join17(projectDir, BETAS_FILE);
373381
+ const filePath = join18(projectDir, BETAS_FILE);
373376
373382
  if (!existsSync16(filePath)) {
373377
373383
  return [];
373378
373384
  }
@@ -373396,26 +373402,26 @@ function disableBeta(name, projectDir = process.cwd()) {
373396
373402
  saveBetas(enabled, projectDir);
373397
373403
  }
373398
373404
  function saveBetas(enabled, projectDir) {
373399
- const specificDir = join17(projectDir, ".specific");
373405
+ const specificDir = join18(projectDir, ".specific");
373400
373406
  if (!existsSync16(specificDir)) {
373401
373407
  mkdirSync12(specificDir, { recursive: true });
373402
373408
  }
373403
373409
  const data = { enabled };
373404
373410
  writeFileSync7(
373405
- join17(projectDir, BETAS_FILE),
373411
+ join18(projectDir, BETAS_FILE),
373406
373412
  JSON.stringify(data, null, 2) + "\n"
373407
373413
  );
373408
373414
  }
373409
373415
 
373410
373416
  // src/commands/docs.tsx
373411
373417
  var __dirname3 = dirname8(fileURLToPath3(import.meta.url));
373412
- var docsDir = join18(__dirname3, "docs");
373418
+ var docsDir = join19(__dirname3, "docs");
373413
373419
  var _embeddedDocs = null;
373414
- function docsCommand(path26) {
373415
- const content = resolveDocContent(path26);
373420
+ function docsCommand(path27) {
373421
+ const content = resolveDocContent(path27);
373416
373422
  if (!content) {
373417
373423
  console.error(
373418
- `Documentation not found: ${path26 || "index"}
373424
+ `Documentation not found: ${path27 || "index"}
373419
373425
 
373420
373426
  Run 'specific docs' to see available topics.`
373421
373427
  );
@@ -373433,31 +373439,31 @@ function filterBetaTags(content, enabledBetas) {
373433
373439
  }
373434
373440
  );
373435
373441
  }
373436
- function resolveDocContent(path26) {
373437
- const normalized = path26?.replace(/^\/+|\/+$/g, "") || void 0;
373442
+ function resolveDocContent(path27) {
373443
+ const normalized = path27?.replace(/^\/+|\/+$/g, "") || void 0;
373438
373444
  if (_embeddedDocs) {
373439
373445
  return resolveEmbeddedDoc(normalized);
373440
373446
  }
373441
373447
  return resolveFilesystemDoc(normalized);
373442
373448
  }
373443
- function resolveEmbeddedDoc(path26) {
373444
- if (!path26) {
373449
+ function resolveEmbeddedDoc(path27) {
373450
+ if (!path27) {
373445
373451
  return _embeddedDocs.get("index.md") ?? null;
373446
373452
  }
373447
- const direct = _embeddedDocs.get(`${path26}.md`);
373453
+ const direct = _embeddedDocs.get(`${path27}.md`);
373448
373454
  if (direct) return direct;
373449
- return _embeddedDocs.get(`${path26}/index.md`) ?? null;
373455
+ return _embeddedDocs.get(`${path27}/index.md`) ?? null;
373450
373456
  }
373451
- function resolveFilesystemDoc(path26) {
373452
- if (!path26) {
373453
- const indexPath2 = join18(docsDir, "index.md");
373457
+ function resolveFilesystemDoc(path27) {
373458
+ if (!path27) {
373459
+ const indexPath2 = join19(docsDir, "index.md");
373454
373460
  return existsSync17(indexPath2) ? readFileSync9(indexPath2, "utf-8") : null;
373455
373461
  }
373456
- const directPath = join18(docsDir, `${path26}.md`);
373462
+ const directPath = join19(docsDir, `${path27}.md`);
373457
373463
  if (existsSync17(directPath)) {
373458
373464
  return readFileSync9(directPath, "utf-8");
373459
373465
  }
373460
- const indexPath = join18(docsDir, path26, "index.md");
373466
+ const indexPath = join19(docsDir, path27, "index.md");
373461
373467
  if (existsSync17(indexPath)) {
373462
373468
  return readFileSync9(indexPath, "utf-8");
373463
373469
  }
@@ -373468,8 +373474,8 @@ function resolveFilesystemDoc(path26) {
373468
373474
  import React3, { useState as useState2, useEffect as useEffect2 } from "react";
373469
373475
  import { render as render3, Text as Text3, Box as Box3 } from "ink";
373470
373476
  import Spinner2 from "ink-spinner";
373471
- import * as fs20 from "fs";
373472
- import * as path18 from "path";
373477
+ import * as fs21 from "fs";
373478
+ import * as path19 from "path";
373473
373479
  import { execFile as execFile7 } from "child_process";
373474
373480
 
373475
373481
  // node_modules/.pnpm/@specific+config@file+..+config/node_modules/@specific/config/dist/parser.js
@@ -374141,20 +374147,20 @@ function CheckUI() {
374141
374147
  const [state, setState] = useState2({ status: "loading" });
374142
374148
  useEffect2(() => {
374143
374149
  async function load() {
374144
- const configPath = path18.join(process.cwd(), "specific.hcl");
374145
- if (!fs20.existsSync(configPath)) {
374150
+ const configPath = path19.join(process.cwd(), "specific.hcl");
374151
+ if (!fs21.existsSync(configPath)) {
374146
374152
  setState({
374147
374153
  status: "error",
374148
374154
  error: "No specific.hcl found in current directory"
374149
374155
  });
374150
374156
  return;
374151
374157
  }
374152
- const hcl = fs20.readFileSync(configPath, "utf-8");
374158
+ const hcl = fs21.readFileSync(configPath, "utf-8");
374153
374159
  try {
374154
374160
  const config2 = await parseConfig2(hcl);
374155
- const localPath = path18.join(process.cwd(), LOCAL_FILE);
374156
- if (fs20.existsSync(localPath)) {
374157
- const localContent = fs20.readFileSync(localPath, "utf-8");
374161
+ const localPath = path19.join(process.cwd(), LOCAL_FILE);
374162
+ if (fs21.existsSync(localPath)) {
374163
+ const localContent = fs21.readFileSync(localPath, "utf-8");
374158
374164
  try {
374159
374165
  await parseLocalFile(localContent);
374160
374166
  } catch (localErr) {
@@ -374167,8 +374173,8 @@ function CheckUI() {
374167
374173
  }
374168
374174
  for (const build of config2.builds) {
374169
374175
  if (build.dockerfile) {
374170
- const dockerfilePath = path18.resolve(process.cwd(), build.dockerfile);
374171
- if (!fs20.existsSync(dockerfilePath)) {
374176
+ const dockerfilePath = path19.resolve(process.cwd(), build.dockerfile);
374177
+ if (!fs21.existsSync(dockerfilePath)) {
374172
374178
  setState({
374173
374179
  status: "error",
374174
374180
  error: `Build "${build.name}": Dockerfile not found at "${build.dockerfile}" (resolved to ${dockerfilePath})`
@@ -374180,11 +374186,11 @@ function CheckUI() {
374180
374186
  const reshapeChecks2 = [];
374181
374187
  for (const pg of config2.postgres) {
374182
374188
  if (pg.reshape?.enabled) {
374183
- const migrationsDir = path18.resolve(
374189
+ const migrationsDir = path19.resolve(
374184
374190
  process.cwd(),
374185
374191
  pg.reshape.migrations_dir ?? "migrations"
374186
374192
  );
374187
- if (!fs20.existsSync(migrationsDir)) {
374193
+ if (!fs21.existsSync(migrationsDir)) {
374188
374194
  reshapeChecks2.push({
374189
374195
  databaseName: pg.name,
374190
374196
  migrationsDir: pg.reshape.migrations_dir ?? "migrations",
@@ -374791,8 +374797,8 @@ init_open();
374791
374797
  import React7, { useState as useState6, useEffect as useEffect4, useCallback } from "react";
374792
374798
  import { render as render5, Text as Text7, Box as Box7, useApp as useApp3, useInput as useInput4 } from "ink";
374793
374799
  import Spinner4 from "ink-spinner";
374794
- import * as fs21 from "fs";
374795
- import * as path19 from "path";
374800
+ import * as fs22 from "fs";
374801
+ import * as path20 from "path";
374796
374802
  function formatBytes(bytes) {
374797
374803
  if (bytes < 1024) return `${bytes} B`;
374798
374804
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
@@ -375845,13 +375851,13 @@ ${status.error.output}`);
375845
375851
  }
375846
375852
  }
375847
375853
  async function deployCommand(options2) {
375848
- const configPath = path19.join(process.cwd(), "specific.hcl");
375849
- if (!fs21.existsSync(configPath)) {
375854
+ const configPath = path20.join(process.cwd(), "specific.hcl");
375855
+ if (!fs22.existsSync(configPath)) {
375850
375856
  console.error("Error: No specific.hcl found in current directory");
375851
375857
  process.exit(1);
375852
375858
  }
375853
375859
  let config;
375854
- const hcl = fs21.readFileSync(configPath, "utf-8");
375860
+ const hcl = fs22.readFileSync(configPath, "utf-8");
375855
375861
  try {
375856
375862
  config = await parseConfig2(hcl);
375857
375863
  } catch (err) {
@@ -375881,8 +375887,8 @@ async function deployCommand(options2) {
375881
375887
 
375882
375888
  // src/commands/exec.tsx
375883
375889
  import { spawn as spawn6 } from "child_process";
375884
- import * as fs22 from "fs";
375885
- import * as path20 from "path";
375890
+ import * as fs23 from "fs";
375891
+ import * as path21 from "path";
375886
375892
  function startSpinner(text) {
375887
375893
  const frames = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
375888
375894
  let i = 0;
@@ -375923,13 +375929,13 @@ async function execCommand(serviceName, command, instanceKey = "default") {
375923
375929
  }
375924
375930
  }
375925
375931
  };
375926
- const configPath = path20.join(process.cwd(), "specific.hcl");
375927
- if (!fs22.existsSync(configPath)) {
375932
+ const configPath = path21.join(process.cwd(), "specific.hcl");
375933
+ if (!fs23.existsSync(configPath)) {
375928
375934
  console.error("Error: No specific.hcl found in current directory");
375929
375935
  process.exit(1);
375930
375936
  }
375931
375937
  let config;
375932
- const hcl = fs22.readFileSync(configPath, "utf-8");
375938
+ const hcl = fs23.readFileSync(configPath, "utf-8");
375933
375939
  try {
375934
375940
  config = await parseConfig2(hcl);
375935
375941
  } catch (err) {
@@ -376067,11 +376073,11 @@ async function execCommand(serviceName, command, instanceKey = "default") {
376067
376073
  process.on("SIGTERM", () => handleSignal("SIGTERM"));
376068
376074
  let effectiveCwd = process.cwd();
376069
376075
  if (service.root) {
376070
- effectiveCwd = path20.resolve(process.cwd(), service.root);
376076
+ effectiveCwd = path21.resolve(process.cwd(), service.root);
376071
376077
  } else if (service.build) {
376072
376078
  const build = config.builds.find((b) => b.name === service.build.name);
376073
376079
  if (build?.root) {
376074
- effectiveCwd = path20.resolve(process.cwd(), build.root);
376080
+ effectiveCwd = path21.resolve(process.cwd(), build.root);
376075
376081
  }
376076
376082
  }
376077
376083
  spinner?.stop();
@@ -376100,8 +376106,8 @@ async function execCommand(serviceName, command, instanceKey = "default") {
376100
376106
 
376101
376107
  // src/commands/psql.tsx
376102
376108
  import { spawn as spawn7 } from "child_process";
376103
- import * as fs23 from "fs";
376104
- import * as path21 from "path";
376109
+ import * as fs24 from "fs";
376110
+ import * as path22 from "path";
376105
376111
  async function psqlCommand(databaseName, instanceKey = "default", extraArgs = []) {
376106
376112
  let startedResources = [];
376107
376113
  let ownsInstances = false;
@@ -376118,13 +376124,13 @@ async function psqlCommand(databaseName, instanceKey = "default", extraArgs = []
376118
376124
  }
376119
376125
  }
376120
376126
  };
376121
- const configPath = path21.join(process.cwd(), "specific.hcl");
376122
- if (!fs23.existsSync(configPath)) {
376127
+ const configPath = path22.join(process.cwd(), "specific.hcl");
376128
+ if (!fs24.existsSync(configPath)) {
376123
376129
  console.error("Error: No specific.hcl found in current directory");
376124
376130
  process.exit(1);
376125
376131
  }
376126
376132
  let config;
376127
- const hcl = fs23.readFileSync(configPath, "utf-8");
376133
+ const hcl = fs24.readFileSync(configPath, "utf-8");
376128
376134
  try {
376129
376135
  config = await parseConfig2(hcl);
376130
376136
  } catch (err) {
@@ -376249,8 +376255,8 @@ async function psqlCommand(databaseName, instanceKey = "default", extraArgs = []
376249
376255
 
376250
376256
  // src/commands/reshape.tsx
376251
376257
  import { spawn as spawn8 } from "child_process";
376252
- import * as fs24 from "fs";
376253
- import * as path22 from "path";
376258
+ import * as fs25 from "fs";
376259
+ import * as path23 from "path";
376254
376260
  var VALID_ACTIONS = ["start", "complete", "status", "abort", "check"];
376255
376261
  var MIGRATION_SUBCOMMANDS = ["start", "complete", "abort"];
376256
376262
  var OFFLINE_ACTIONS = ["check"];
@@ -376270,13 +376276,13 @@ async function reshapeCommand(action, databaseName, instanceKey = "default") {
376270
376276
  process.exit(1);
376271
376277
  }
376272
376278
  const isOfflineAction = OFFLINE_ACTIONS.includes(action);
376273
- const configPath = path22.join(process.cwd(), "specific.hcl");
376279
+ const configPath = path23.join(process.cwd(), "specific.hcl");
376274
376280
  let config;
376275
376281
  let migrationsDir = "migrations";
376276
376282
  let targetDb;
376277
376283
  try {
376278
- if (fs24.existsSync(configPath)) {
376279
- const configContent = fs24.readFileSync(configPath, "utf-8");
376284
+ if (fs25.existsSync(configPath)) {
376285
+ const configContent = fs25.readFileSync(configPath, "utf-8");
376280
376286
  config = await parseConfig2(configContent);
376281
376287
  if (databaseName) {
376282
376288
  const postgresConfig = config.postgres.find((p) => p.name === databaseName);
@@ -376411,9 +376417,9 @@ async function reshapeCommand(action, databaseName, instanceKey = "default") {
376411
376417
  }
376412
376418
  const isMigrationSubcommand = MIGRATION_SUBCOMMANDS.includes(action);
376413
376419
  const reshapeArgs = isMigrationSubcommand ? ["migration", action] : [action];
376414
- const fullMigrationsPath = path22.join(process.cwd(), migrationsDir);
376420
+ const fullMigrationsPath = path23.join(process.cwd(), migrationsDir);
376415
376421
  if (action === "check" || action === "start") {
376416
- if (fs24.existsSync(fullMigrationsPath)) {
376422
+ if (fs25.existsSync(fullMigrationsPath)) {
376417
376423
  reshapeArgs.push("--dirs", fullMigrationsPath);
376418
376424
  } else if (action === "check") {
376419
376425
  console.error(`Error: Migrations directory not found: ${fullMigrationsPath}`);
@@ -376463,21 +376469,21 @@ async function reshapeCommand(action, databaseName, instanceKey = "default") {
376463
376469
  import React8, { useState as useState7, useEffect as useEffect5 } from "react";
376464
376470
  import { render as render6, Text as Text8, Box as Box8 } from "ink";
376465
376471
  import Spinner5 from "ink-spinner";
376466
- import * as fs25 from "fs";
376467
- import * as path23 from "path";
376472
+ import * as fs26 from "fs";
376473
+ import * as path24 from "path";
376468
376474
  function CleanUI({ instanceKey }) {
376469
376475
  const [state, setState] = useState7({ status: "checking" });
376470
376476
  useEffect5(() => {
376471
376477
  async function clean() {
376472
376478
  const projectRoot = process.cwd();
376473
- const specificDir = path23.join(projectRoot, ".specific");
376474
- if (!fs25.existsSync(specificDir)) {
376479
+ const specificDir = path24.join(projectRoot, ".specific");
376480
+ if (!fs26.existsSync(specificDir)) {
376475
376481
  setState({ status: "nothing" });
376476
376482
  return;
376477
376483
  }
376478
376484
  if (instanceKey) {
376479
- const keyDir = path23.join(specificDir, "keys", instanceKey);
376480
- if (!fs25.existsSync(keyDir)) {
376485
+ const keyDir = path24.join(specificDir, "keys", instanceKey);
376486
+ if (!fs26.existsSync(keyDir)) {
376481
376487
  setState({ status: "nothing" });
376482
376488
  return;
376483
376489
  }
@@ -376493,7 +376499,7 @@ function CleanUI({ instanceKey }) {
376493
376499
  await stateManager.cleanStaleState();
376494
376500
  setState({ status: "cleaning" });
376495
376501
  try {
376496
- fs25.rmSync(keyDir, { recursive: true, force: true });
376502
+ fs26.rmSync(keyDir, { recursive: true, force: true });
376497
376503
  setState({ status: "success" });
376498
376504
  } catch (err) {
376499
376505
  setState({
@@ -376502,13 +376508,13 @@ function CleanUI({ instanceKey }) {
376502
376508
  });
376503
376509
  }
376504
376510
  } else {
376505
- const keysDir = path23.join(specificDir, "keys");
376506
- if (!fs25.existsSync(keysDir)) {
376511
+ const keysDir = path24.join(specificDir, "keys");
376512
+ if (!fs26.existsSync(keysDir)) {
376507
376513
  setState({ status: "nothing" });
376508
376514
  return;
376509
376515
  }
376510
- const keys = fs25.readdirSync(keysDir).filter(
376511
- (f) => fs25.statSync(path23.join(keysDir, f)).isDirectory()
376516
+ const keys = fs26.readdirSync(keysDir).filter(
376517
+ (f) => fs26.statSync(path24.join(keysDir, f)).isDirectory()
376512
376518
  );
376513
376519
  for (const key of keys) {
376514
376520
  const stateManager2 = new InstanceStateManager(projectRoot, key);
@@ -376532,7 +376538,7 @@ function CleanUI({ instanceKey }) {
376532
376538
  }
376533
376539
  setState({ status: "cleaning" });
376534
376540
  try {
376535
- fs25.rmSync(keysDir, { recursive: true, force: true });
376541
+ fs26.rmSync(keysDir, { recursive: true, force: true });
376536
376542
  setState({ status: "success" });
376537
376543
  } catch (err) {
376538
376544
  setState({
@@ -376697,8 +376703,8 @@ import { render as render9, Text as Text11, Box as Box10, useApp as useApp6 } fr
376697
376703
  import Spinner6 from "ink-spinner";
376698
376704
 
376699
376705
  // src/lib/update.ts
376700
- import * as fs26 from "fs";
376701
- import * as path24 from "path";
376706
+ import * as fs27 from "fs";
376707
+ import * as path25 from "path";
376702
376708
  var BINARIES_BASE_URL = "https://binaries.specific.dev/cli";
376703
376709
  function compareVersions(a, b) {
376704
376710
  const partsA = a.split(".").map(Number);
@@ -376712,7 +376718,7 @@ function compareVersions(a, b) {
376712
376718
  return 0;
376713
376719
  }
376714
376720
  async function checkForUpdate() {
376715
- const currentVersion = "0.1.102";
376721
+ const currentVersion = "0.1.103";
376716
376722
  const response = await fetch(`${BINARIES_BASE_URL}/latest?t=${Date.now()}`);
376717
376723
  if (!response.ok) {
376718
376724
  throw new Error(`Failed to check for updates: HTTP ${response.status}`);
@@ -376726,9 +376732,9 @@ function getCurrentBinaryPath() {
376726
376732
  }
376727
376733
  function isBinaryWritable() {
376728
376734
  const binaryPath = getCurrentBinaryPath();
376729
- const dir = path24.dirname(binaryPath);
376735
+ const dir = path25.dirname(binaryPath);
376730
376736
  try {
376731
- fs26.accessSync(dir, fs26.constants.W_OK);
376737
+ fs27.accessSync(dir, fs27.constants.W_OK);
376732
376738
  return true;
376733
376739
  } catch {
376734
376740
  return false;
@@ -376736,24 +376742,24 @@ function isBinaryWritable() {
376736
376742
  }
376737
376743
  async function performUpdate(version, onProgress) {
376738
376744
  const binaryPath = getCurrentBinaryPath();
376739
- const binaryDir = path24.dirname(binaryPath);
376740
- const tempPath = path24.join(binaryDir, `.specific-update-${process.pid}`);
376745
+ const binaryDir = path25.dirname(binaryPath);
376746
+ const tempPath = path25.join(binaryDir, `.specific-update-${process.pid}`);
376741
376747
  try {
376742
376748
  const { platform: platform3, arch: arch3 } = getPlatformInfo();
376743
376749
  const url = `${BINARIES_BASE_URL}/${version}/specific-${platform3}-${arch3}`;
376744
376750
  await downloadFile(url, tempPath, onProgress);
376745
- const stat4 = fs26.statSync(tempPath);
376751
+ const stat4 = fs27.statSync(tempPath);
376746
376752
  if (stat4.size === 0) {
376747
376753
  throw new Error("Downloaded binary is empty");
376748
376754
  }
376749
- fs26.chmodSync(tempPath, 493);
376755
+ fs27.chmodSync(tempPath, 493);
376750
376756
  onProgress?.({ phase: "finalizing" });
376751
- fs26.unlinkSync(binaryPath);
376752
- fs26.renameSync(tempPath, binaryPath);
376757
+ fs27.unlinkSync(binaryPath);
376758
+ fs27.renameSync(tempPath, binaryPath);
376753
376759
  } catch (error) {
376754
376760
  try {
376755
- if (fs26.existsSync(tempPath)) {
376756
- fs26.unlinkSync(tempPath);
376761
+ if (fs27.existsSync(tempPath)) {
376762
+ fs27.unlinkSync(tempPath);
376757
376763
  }
376758
376764
  } catch {
376759
376765
  }
@@ -376763,21 +376769,21 @@ async function performUpdate(version, onProgress) {
376763
376769
 
376764
376770
  // src/lib/background-update.ts
376765
376771
  import { spawn as spawn9 } from "child_process";
376766
- import * as fs27 from "fs";
376767
- import * as path25 from "path";
376772
+ import * as fs28 from "fs";
376773
+ import * as path26 from "path";
376768
376774
  import * as os6 from "os";
376769
- var SPECIFIC_DIR = path25.join(os6.homedir(), ".specific");
376770
- var RATE_LIMIT_FILE = path25.join(SPECIFIC_DIR, "last-update-check");
376771
- var LOCK_FILE = path25.join(SPECIFIC_DIR, "update.lock");
376775
+ var SPECIFIC_DIR = path26.join(os6.homedir(), ".specific");
376776
+ var RATE_LIMIT_FILE = path26.join(SPECIFIC_DIR, "last-update-check");
376777
+ var LOCK_FILE = path26.join(SPECIFIC_DIR, "update.lock");
376772
376778
  var RATE_LIMIT_MS = 60 * 60 * 1e3;
376773
376779
  var STALE_LOCK_MS = 10 * 60 * 1e3;
376774
376780
  function writeCheckTimestamp() {
376775
- fs27.mkdirSync(SPECIFIC_DIR, { recursive: true });
376776
- fs27.writeFileSync(RATE_LIMIT_FILE, String(Date.now()), "utf-8");
376781
+ fs28.mkdirSync(SPECIFIC_DIR, { recursive: true });
376782
+ fs28.writeFileSync(RATE_LIMIT_FILE, String(Date.now()), "utf-8");
376777
376783
  }
376778
376784
  function isRateLimited() {
376779
376785
  try {
376780
- const content = fs27.readFileSync(RATE_LIMIT_FILE, "utf-8").trim();
376786
+ const content = fs28.readFileSync(RATE_LIMIT_FILE, "utf-8").trim();
376781
376787
  const lastCheck = parseInt(content, 10);
376782
376788
  if (isNaN(lastCheck)) return false;
376783
376789
  return Date.now() - lastCheck < RATE_LIMIT_MS;
@@ -376980,7 +376986,7 @@ async function projectListCommand() {
376980
376986
  var program = new Command();
376981
376987
  var env = "production";
376982
376988
  var envLabel = env !== "production" ? `[${env.toUpperCase()}] ` : "";
376983
- program.name("specific").description(`${envLabel}Infrastructure-as-code for coding agents`).version("0.1.102").enablePositionalOptions();
376989
+ program.name("specific").description(`${envLabel}Infrastructure-as-code for coding agents`).version("0.1.103").enablePositionalOptions();
376984
376990
  program.command("init").description("Initialize project for use with a coding agent").option("--agent <name...>", "Agents to configure (cursor, claude, codex, other)").addHelpText("after", `
376985
376991
  Examples:
376986
376992
  $ specific init