@specific.dev/cli 0.1.115 → 0.1.117

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 +83 -131
  64. package/package.json +1 -1
  65. /package/dist/admin/_next/static/{3wOysvI433uU7Czi4vdl0 → fnPhqXcj07EG8iChCiS1Y}/_buildManifest.js +0 -0
  66. /package/dist/admin/_next/static/{3wOysvI433uU7Czi4vdl0 → fnPhqXcj07EG8iChCiS1Y}/_clientMiddlewareManifest.json +0 -0
  67. /package/dist/admin/_next/static/{3wOysvI433uU7Czi4vdl0 → fnPhqXcj07EG8iChCiS1Y}/_ssgManifest.js +0 -0
package/dist/cli.js CHANGED
@@ -369216,6 +369216,22 @@ var temporalBinary = {
369216
369216
  stripComponents: 0,
369217
369217
  executables: ["temporal"]
369218
369218
  };
369219
+ function killProcess(proc) {
369220
+ return new Promise((resolve52) => {
369221
+ if (proc.killed || proc.exitCode !== null) {
369222
+ resolve52();
369223
+ return;
369224
+ }
369225
+ proc.once("exit", () => resolve52());
369226
+ proc.kill("SIGKILL");
369227
+ });
369228
+ }
369229
+ function killProcessGroup(pid) {
369230
+ try {
369231
+ process.kill(-pid, "SIGKILL");
369232
+ } catch {
369233
+ }
369234
+ }
369219
369235
  async function startPostgres(pg, port, dataDir, onProgress) {
369220
369236
  const binary = await ensureBinary(postgresBinary, void 0, onProgress);
369221
369237
  const dbDataPath = path5.join(process.cwd(), dataDir, pg.name);
@@ -369282,8 +369298,9 @@ async function startPostgres(pg, port, dataDir, onProgress) {
369282
369298
  password,
369283
369299
  dbName: pg.name,
369284
369300
  url: `postgres://${user}:${password}@${host}:${port}/${pg.name}`,
369301
+ pid: postgres.pid,
369285
369302
  async stop() {
369286
- return stopProcess(postgres);
369303
+ return killProcess(postgres);
369287
369304
  }
369288
369305
  };
369289
369306
  }
@@ -369308,8 +369325,9 @@ async function startRedis(redis, port, onProgress) {
369308
369325
  password: "",
369309
369326
  dbName: redis.name,
369310
369327
  url: `redis://${host}:${port}`,
369328
+ pid: redisProc.pid,
369311
369329
  async stop() {
369312
- return stopProcess(redisProc);
369330
+ return killProcess(redisProc);
369313
369331
  }
369314
369332
  };
369315
369333
  }
@@ -369346,6 +369364,7 @@ async function startStorage(storage, port, dataDir) {
369346
369364
  secretKey,
369347
369365
  bucket: storage.name,
369348
369366
  async stop() {
369367
+ server.httpServer?.closeAllConnections?.();
369349
369368
  await server.close();
369350
369369
  }
369351
369370
  };
@@ -369423,24 +369442,6 @@ function checkTcpPort(host, port) {
369423
369442
  socket.connect(port, host);
369424
369443
  });
369425
369444
  }
369426
- async function stopProcess(proc) {
369427
- return new Promise((resolve52) => {
369428
- if (proc.killed || proc.exitCode !== null) {
369429
- resolve52();
369430
- return;
369431
- }
369432
- proc.once("exit", () => {
369433
- clearTimeout(forceKillTimeout);
369434
- resolve52();
369435
- });
369436
- proc.kill("SIGTERM");
369437
- const forceKillTimeout = setTimeout(() => {
369438
- if (!proc.killed && proc.exitCode === null) {
369439
- proc.kill("SIGKILL");
369440
- }
369441
- }, 2e3);
369442
- });
369443
- }
369444
369445
  function sleep(ms) {
369445
369446
  return new Promise((resolve52) => setTimeout(resolve52, ms));
369446
369447
  }
@@ -369913,29 +369914,13 @@ function startService(service, resources, secrets, configs, endpointPorts, servi
369913
369914
  resolve52();
369914
369915
  return;
369915
369916
  }
369916
- child.once("exit", () => {
369917
- clearTimeout(forceKillTimeout);
369918
- resolve52();
369919
- });
369917
+ child.once("exit", () => resolve52());
369920
369918
  const pid = child.pid;
369921
369919
  if (pid) {
369922
- try {
369923
- process.kill(-pid, "SIGTERM");
369924
- } catch {
369925
- }
369920
+ killProcessGroup(pid);
369926
369921
  } else {
369927
- child.kill("SIGTERM");
369922
+ child.kill("SIGKILL");
369928
369923
  }
369929
- const forceKillTimeout = setTimeout(() => {
369930
- if (pid) {
369931
- try {
369932
- process.kill(-pid, "SIGKILL");
369933
- } catch {
369934
- }
369935
- } else if (!child.killed) {
369936
- child.kill("SIGKILL");
369937
- }
369938
- }, 2e3);
369939
369924
  });
369940
369925
  }
369941
369926
  };
@@ -370380,6 +370365,7 @@ async function startAdminServer(getState, listenPort = 0) {
370380
370365
  port,
370381
370366
  stop: () => new Promise((res, rej) => {
370382
370367
  server.close((err) => err ? rej(err) : res());
370368
+ server.closeAllConnections();
370383
370369
  })
370384
370370
  });
370385
370371
  });
@@ -370530,7 +370516,7 @@ async function startElectric(postgres, port, dataDir, options2) {
370530
370516
  url: `http://${host}:${port}`,
370531
370517
  secret,
370532
370518
  async stop() {
370533
- return stopProcess2(electric);
370519
+ return killProcess(electric);
370534
370520
  }
370535
370521
  };
370536
370522
  }
@@ -370564,24 +370550,6 @@ function checkTcpPort2(host, port) {
370564
370550
  socket.connect(port, host);
370565
370551
  });
370566
370552
  }
370567
- async function stopProcess2(proc) {
370568
- return new Promise((resolve52) => {
370569
- if (proc.killed || proc.exitCode !== null) {
370570
- resolve52();
370571
- return;
370572
- }
370573
- proc.once("exit", () => {
370574
- clearTimeout(forceKillTimeout);
370575
- resolve52();
370576
- });
370577
- proc.kill("SIGTERM");
370578
- const forceKillTimeout = setTimeout(() => {
370579
- if (!proc.killed && proc.exitCode === null) {
370580
- proc.kill("SIGKILL");
370581
- }
370582
- }, 2e3);
370583
- });
370584
- }
370585
370553
  function sleep2(ms) {
370586
370554
  return new Promise((resolve52) => setTimeout(resolve52, ms));
370587
370555
  }
@@ -370683,12 +370651,11 @@ async function startMailServer(mail, smtpPort, apiPort) {
370683
370651
  httpServer.on("error", reject);
370684
370652
  });
370685
370653
  const stop = async () => {
370686
- await new Promise((resolve52) => {
370687
- smtpServer.close(() => resolve52());
370688
- });
370689
- await new Promise((resolve52) => {
370690
- httpServer.close(() => resolve52());
370691
- });
370654
+ httpServer.closeAllConnections();
370655
+ await Promise.all([
370656
+ new Promise((resolve52) => smtpServer.close(() => resolve52())),
370657
+ new Promise((resolve52) => httpServer.close(() => resolve52()))
370658
+ ]);
370692
370659
  };
370693
370660
  const resource = {
370694
370661
  name: mail.name,
@@ -370765,8 +370732,9 @@ async function startDrizzleGateway(postgresInstances, port, configDir, options2)
370765
370732
  return {
370766
370733
  port,
370767
370734
  url: `http://${host}:${port}`,
370735
+ pid: drizzleGateway.pid,
370768
370736
  async stop() {
370769
- return stopProcess3(drizzleGateway);
370737
+ return killProcess(drizzleGateway);
370770
370738
  }
370771
370739
  };
370772
370740
  }
@@ -370802,24 +370770,6 @@ function checkTcpPort3(host, port) {
370802
370770
  socket.connect(port, host);
370803
370771
  });
370804
370772
  }
370805
- async function stopProcess3(proc) {
370806
- return new Promise((resolve52) => {
370807
- if (proc.killed || proc.exitCode !== null) {
370808
- resolve52();
370809
- return;
370810
- }
370811
- proc.once("exit", () => {
370812
- clearTimeout(forceKillTimeout);
370813
- resolve52();
370814
- });
370815
- proc.kill("SIGTERM");
370816
- const forceKillTimeout = setTimeout(() => {
370817
- if (!proc.killed && proc.exitCode === null) {
370818
- proc.kill("SIGKILL");
370819
- }
370820
- }, 2e3);
370821
- });
370822
- }
370823
370773
  function sleep3(ms) {
370824
370774
  return new Promise((resolve52) => setTimeout(resolve52, ms));
370825
370775
  }
@@ -371160,7 +371110,7 @@ async function startTemporalDevServer(temporals, grpcPort, uiPort, dataDir, onPr
371160
371110
  );
371161
371111
  pipeProcess("temporal", proc);
371162
371112
  await waitForTcpPort4(host, grpcPort);
371163
- const stopServer = () => stopProcess4(proc);
371113
+ const stopServer = () => killProcess(proc);
371164
371114
  const instances = temporals.map((temporal, i) => ({
371165
371115
  name: temporal.name,
371166
371116
  type: "temporal",
@@ -371171,6 +371121,7 @@ async function startTemporalDevServer(temporals, grpcPort, uiPort, dataDir, onPr
371171
371121
  dbName: temporal.name,
371172
371122
  url: `${host}:${grpcPort}`,
371173
371123
  uiPort,
371124
+ pid: i === 0 ? proc.pid : void 0,
371174
371125
  // Only the first instance owns the server lifecycle
371175
371126
  stop: i === 0 ? stopServer : async () => {
371176
371127
  }
@@ -371207,24 +371158,6 @@ function checkTcpPort4(host, port) {
371207
371158
  socket.connect(port, host);
371208
371159
  });
371209
371160
  }
371210
- async function stopProcess4(proc) {
371211
- return new Promise((resolve52) => {
371212
- if (proc.killed || proc.exitCode !== null) {
371213
- resolve52();
371214
- return;
371215
- }
371216
- proc.once("exit", () => {
371217
- clearTimeout(forceKillTimeout);
371218
- resolve52();
371219
- });
371220
- proc.kill("SIGTERM");
371221
- const forceKillTimeout = setTimeout(() => {
371222
- if (!proc.killed && proc.exitCode === null) {
371223
- proc.kill("SIGKILL");
371224
- }
371225
- }, 2e3);
371226
- });
371227
- }
371228
371161
  function findRequiredResources(service) {
371229
371162
  const required = { postgres: [], redis: [], storage: [], temporal: [], mail: [] };
371230
371163
  if (service.env) {
@@ -371900,28 +371833,35 @@ var DevEnvironment = class extends TypedEventEmitter {
371900
371833
  * Fire-and-forget stop all processes without waiting.
371901
371834
  */
371902
371835
  forceStop() {
371903
- if (this.shuttingDown) {
371904
- this.systemLog("Force shutting down");
371905
- const allProcesses = [
371906
- ...this.services,
371907
- ...this.electricInstances,
371908
- this.drizzleGateway,
371909
- ...[...this.resources.values()],
371910
- ...this.tunnels
371911
- ].filter(Boolean);
371912
- for (const proc of allProcesses) {
371836
+ this.systemLog("Force shutting down");
371837
+ for (const service of this.services) {
371838
+ const pid = service.process.pid;
371839
+ if (pid) {
371840
+ killProcessGroup(pid);
371841
+ }
371842
+ }
371843
+ for (const electric of this.electricInstances) {
371844
+ if (electric.pid) {
371913
371845
  try {
371914
- proc?.stop().catch(() => {
371915
- });
371846
+ process.kill(electric.pid, "SIGKILL");
371847
+ } catch {
371848
+ }
371849
+ }
371850
+ }
371851
+ if (this.drizzleGateway?.pid) {
371852
+ try {
371853
+ process.kill(this.drizzleGateway.pid, "SIGKILL");
371854
+ } catch {
371855
+ }
371856
+ }
371857
+ for (const resource of this.resources.values()) {
371858
+ if (resource.pid) {
371859
+ try {
371860
+ process.kill(resource.pid, "SIGKILL");
371916
371861
  } catch {
371917
371862
  }
371918
371863
  }
371919
- return;
371920
371864
  }
371921
- this.shuttingDown = true;
371922
- this.cancelled = true;
371923
- this.shutdownInternal().catch(() => {
371924
- });
371925
371865
  }
371926
371866
  /**
371927
371867
  * Reload the dev environment (stop everything except release instance ownership completely, then restart).
@@ -372035,13 +371975,11 @@ var DevEnvironment = class extends TypedEventEmitter {
372035
371975
  ...this.reshapeWatchers.map((watcher) => watcher.close()),
372036
371976
  this.drizzleGateway?.stop(),
372037
371977
  ...[...this.resources.values()].map((resource) => resource.stop()),
372038
- ...this.tunnels.map((tunnel) => tunnel.stop())
371978
+ ...this.tunnels.map((tunnel) => tunnel.stop()),
371979
+ this.stateManager?.releaseOwnership()
372039
371980
  ]);
372040
371981
  this.reshapeWatchers = [];
372041
371982
  this.restartServices = null;
372042
- if (this.stateManager) {
372043
- await this.stateManager.releaseOwnership();
372044
- }
372045
371983
  this.removeExitHandler();
372046
371984
  this.systemLog("Shutdown complete");
372047
371985
  closeDebugLog();
@@ -372061,6 +371999,15 @@ var DevEnvironment = class extends TypedEventEmitter {
372061
371999
  registerExitHandler() {
372062
372000
  this.removeExitHandler();
372063
372001
  this.exitHandler = () => {
372002
+ for (const service of this.services) {
372003
+ const pid = service.process.pid;
372004
+ if (pid) {
372005
+ try {
372006
+ process.kill(-pid, "SIGKILL");
372007
+ } catch {
372008
+ }
372009
+ }
372010
+ }
372064
372011
  for (const electric of this.electricInstances) {
372065
372012
  if (electric.pid) {
372066
372013
  try {
@@ -372069,11 +372016,16 @@ var DevEnvironment = class extends TypedEventEmitter {
372069
372016
  }
372070
372017
  }
372071
372018
  }
372072
- for (const service of this.services) {
372073
- const pid = service.process.pid;
372074
- if (pid) {
372019
+ if (this.drizzleGateway?.pid) {
372020
+ try {
372021
+ process.kill(this.drizzleGateway.pid, "SIGKILL");
372022
+ } catch {
372023
+ }
372024
+ }
372025
+ for (const resource of this.resources.values()) {
372026
+ if (resource.pid) {
372075
372027
  try {
372076
- process.kill(-pid, "SIGKILL");
372028
+ process.kill(resource.pid, "SIGKILL");
372077
372029
  } catch {
372078
372030
  }
372079
372031
  }
@@ -373278,7 +373230,7 @@ function trackEvent(event, properties) {
373278
373230
  event,
373279
373231
  properties: {
373280
373232
  ...properties,
373281
- cli_version: "0.1.115",
373233
+ cli_version: "0.1.117",
373282
373234
  platform: process.platform,
373283
373235
  node_version: process.version,
373284
373236
  project_id: getProjectId()
@@ -373287,7 +373239,7 @@ function trackEvent(event, properties) {
373287
373239
  }
373288
373240
  async function shutdown() {
373289
373241
  if (client) {
373290
- await client.shutdown();
373242
+ await client.shutdown(1e3);
373291
373243
  client = null;
373292
373244
  }
373293
373245
  }
@@ -377102,7 +377054,7 @@ function compareVersions(a, b) {
377102
377054
  return 0;
377103
377055
  }
377104
377056
  async function checkForUpdate() {
377105
- const currentVersion = "0.1.115";
377057
+ const currentVersion = "0.1.117";
377106
377058
  const response = await fetch(`${BINARIES_BASE_URL}/latest?t=${Date.now()}`);
377107
377059
  if (!response.ok) {
377108
377060
  throw new Error(`Failed to check for updates: HTTP ${response.status}`);
@@ -377370,7 +377322,7 @@ async function projectListCommand() {
377370
377322
  var program = new Command();
377371
377323
  var env = "production";
377372
377324
  var envLabel = env !== "production" ? `[${env.toUpperCase()}] ` : "";
377373
- program.name("specific").description(`${envLabel}Infrastructure-as-code for coding agents`).version("0.1.115").enablePositionalOptions();
377325
+ program.name("specific").description(`${envLabel}Infrastructure-as-code for coding agents`).version("0.1.117").enablePositionalOptions();
377374
377326
  program.command("init").description("Initialize project for use with a coding agent").option("--agent <name...>", "Agents to configure (cursor, claude, codex, other)").addHelpText("after", `
377375
377327
  Examples:
377376
377328
  $ specific init
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@specific.dev/cli",
3
- "version": "0.1.115",
3
+ "version": "0.1.117",
4
4
  "description": "CLI for Specific infrastructure-as-code",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",