@specific.dev/cli 0.1.108 → 0.1.110

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 (68) 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 +60 -15
  64. package/dist/docs/postgres/reshape/actions.md +16 -20
  65. package/package.json +1 -1
  66. /package/dist/admin/_next/static/{-uB2tvCTW06hUMOZfRURZ → XxrIhY0Ur2j5au9Vfy8af}/_buildManifest.js +0 -0
  67. /package/dist/admin/_next/static/{-uB2tvCTW06hUMOZfRURZ → XxrIhY0Ur2j5au9Vfy8af}/_clientMiddlewareManifest.json +0 -0
  68. /package/dist/admin/_next/static/{-uB2tvCTW06hUMOZfRURZ → XxrIhY0Ur2j5au9Vfy8af}/_ssgManifest.js +0 -0
package/dist/cli.js CHANGED
@@ -369255,7 +369255,18 @@ async function startPostgres(pg, port, dataDir, onProgress) {
369255
369255
  }
369256
369256
  );
369257
369257
  pipeProcess("postgres", postgres);
369258
- await waitForTcpPort(host, port);
369258
+ await Promise.race([
369259
+ waitForTcpPort(host, port),
369260
+ new Promise((_, reject) => {
369261
+ postgres.once("exit", (code, signal) => {
369262
+ reject(
369263
+ new Error(
369264
+ `PostgreSQL "${pg.name}" exited during startup (code ${code}, signal ${signal}). Port ${port} may already be in use by another process.`
369265
+ )
369266
+ );
369267
+ });
369268
+ })
369269
+ ]);
369259
369270
  return {
369260
369271
  name: pg.name,
369261
369272
  type: "postgres",
@@ -371433,7 +371444,9 @@ var BlockPortAllocator = class _BlockPortAllocator {
371433
371444
  static async create() {
371434
371445
  for (let i = 0; i < MAX_BLOCKS; i++) {
371435
371446
  const base = FIRST_BLOCK_START + i * BLOCK_SIZE;
371436
- if (await isPortAvailable(base)) {
371447
+ const ports = Array.from({ length: BLOCK_SIZE }, (_, j) => base + j);
371448
+ const results = await Promise.all(ports.map(isPortAvailable));
371449
+ if (results.every(Boolean)) {
371437
371450
  return new _BlockPortAllocator(base);
371438
371451
  }
371439
371452
  }
@@ -373187,7 +373200,7 @@ function trackEvent(event, properties) {
373187
373200
  event,
373188
373201
  properties: {
373189
373202
  ...properties,
373190
- cli_version: "0.1.108",
373203
+ cli_version: "0.1.110",
373191
373204
  platform: process.platform,
373192
373205
  node_version: process.version,
373193
373206
  project_id: getProjectId()
@@ -373506,6 +373519,7 @@ Valid agents: ${VALID_AGENT_IDS.join(", ")}`
373506
373519
 
373507
373520
  // src/commands/docs.tsx
373508
373521
  import { readFileSync as readFileSync9, existsSync as existsSync17 } from "fs";
373522
+ import { spawn as spawn6 } from "child_process";
373509
373523
  import { join as join19, dirname as dirname8 } from "path";
373510
373524
  import { fileURLToPath as fileURLToPath3 } from "url";
373511
373525
 
@@ -373565,8 +373579,12 @@ function saveBetas(enabled, projectDir) {
373565
373579
  var __dirname3 = dirname8(fileURLToPath3(import.meta.url));
373566
373580
  var docsDir = join19(__dirname3, "docs");
373567
373581
  var _embeddedDocs = null;
373568
- function docsCommand(path27) {
373569
- const content = resolveDocContent(path27);
373582
+ var RESHAPE_DOCS_PREFIX = "postgres/reshape/";
373583
+ async function docsCommand(path27) {
373584
+ let content = resolveDocContent(path27);
373585
+ if (!content && path27) {
373586
+ content = await resolveReshapeDoc(path27);
373587
+ }
373570
373588
  if (!content) {
373571
373589
  console.error(
373572
373590
  `Documentation not found: ${path27 || "index"}
@@ -373579,6 +373597,33 @@ Run 'specific docs' to see available topics.`
373579
373597
  const filtered = filterBetaTags(content, enabledBetas);
373580
373598
  console.log(filtered);
373581
373599
  }
373600
+ async function resolveReshapeDoc(path27) {
373601
+ const normalized = path27.replace(/^\/+|\/+$/g, "");
373602
+ if (!normalized.startsWith(RESHAPE_DOCS_PREFIX)) return null;
373603
+ const reshapePath = "/" + normalized.slice(RESHAPE_DOCS_PREFIX.length);
373604
+ try {
373605
+ const binary = await ensureBinary(reshapeBinary);
373606
+ const reshapeExe = binary.executables["reshape"];
373607
+ const output = await new Promise((resolve9) => {
373608
+ const child = spawn6(reshapeExe, ["docs", reshapePath], {
373609
+ stdio: ["ignore", "pipe", "ignore"]
373610
+ });
373611
+ const chunks = [];
373612
+ child.stdout.on("data", (chunk) => chunks.push(chunk));
373613
+ child.on("error", () => resolve9(null));
373614
+ child.on("close", (code) => {
373615
+ if (code === 0 && chunks.length > 0) {
373616
+ resolve9(Buffer.concat(chunks).toString("utf-8"));
373617
+ } else {
373618
+ resolve9(null);
373619
+ }
373620
+ });
373621
+ });
373622
+ if (output) return output;
373623
+ } catch {
373624
+ }
373625
+ return null;
373626
+ }
373582
373627
  function filterBetaTags(content, enabledBetas) {
373583
373628
  return content.replace(
373584
373629
  /<!-- beta:(\w[\w-]*) -->\n?([\s\S]*?)<!-- \/beta:\1 -->\n?/g,
@@ -376034,7 +376079,7 @@ async function deployCommand(options2) {
376034
376079
  }
376035
376080
 
376036
376081
  // src/commands/exec.tsx
376037
- import { spawn as spawn6 } from "child_process";
376082
+ import { spawn as spawn7 } from "child_process";
376038
376083
  import * as fs23 from "fs";
376039
376084
  import * as path21 from "path";
376040
376085
  function startSpinner(text) {
@@ -376229,7 +376274,7 @@ async function execCommand(serviceName, command, instanceKey = "default") {
376229
376274
  }
376230
376275
  }
376231
376276
  spinner?.stop();
376232
- child = spawn6(command[0], command.slice(1), {
376277
+ child = spawn7(command[0], command.slice(1), {
376233
376278
  cwd: effectiveCwd,
376234
376279
  env: {
376235
376280
  ...process.env,
@@ -376253,7 +376298,7 @@ async function execCommand(serviceName, command, instanceKey = "default") {
376253
376298
  }
376254
376299
 
376255
376300
  // src/commands/psql.tsx
376256
- import { spawn as spawn7 } from "child_process";
376301
+ import { spawn as spawn8 } from "child_process";
376257
376302
  import * as fs24 from "fs";
376258
376303
  import * as path22 from "path";
376259
376304
  async function psqlCommand(databaseName, instanceKey = "default", extraArgs = []) {
@@ -376377,7 +376422,7 @@ async function psqlCommand(databaseName, instanceKey = "default", extraArgs = []
376377
376422
  };
376378
376423
  process.on("SIGINT", () => handleSignal("SIGINT"));
376379
376424
  process.on("SIGTERM", () => handleSignal("SIGTERM"));
376380
- child = spawn7(psqlPath, ["-h", dbState.host, "-p", String(dbState.port), "-U", dbState.user, "-d", dbState.dbName, ...extraArgs], {
376425
+ child = spawn8(psqlPath, ["-h", dbState.host, "-p", String(dbState.port), "-U", dbState.user, "-d", dbState.dbName, ...extraArgs], {
376381
376426
  cwd: process.cwd(),
376382
376427
  env: {
376383
376428
  ...process.env,
@@ -376402,7 +376447,7 @@ async function psqlCommand(databaseName, instanceKey = "default", extraArgs = []
376402
376447
  }
376403
376448
 
376404
376449
  // src/commands/reshape.tsx
376405
- import { spawn as spawn8 } from "child_process";
376450
+ import { spawn as spawn9 } from "child_process";
376406
376451
  import * as fs25 from "fs";
376407
376452
  import * as path23 from "path";
376408
376453
  var VALID_ACTIONS = ["start", "complete", "status", "abort", "check"];
@@ -376589,7 +376634,7 @@ async function reshapeCommand(action, databaseName, instanceKey = "default") {
376589
376634
  };
376590
376635
  process.on("SIGINT", () => handleSignal("SIGINT"));
376591
376636
  process.on("SIGTERM", () => handleSignal("SIGTERM"));
376592
- child = spawn8(reshapePath, reshapeArgs, {
376637
+ child = spawn9(reshapePath, reshapeArgs, {
376593
376638
  cwd: process.cwd(),
376594
376639
  env: {
376595
376640
  ...process.env,
@@ -376866,7 +376911,7 @@ function compareVersions(a, b) {
376866
376911
  return 0;
376867
376912
  }
376868
376913
  async function checkForUpdate() {
376869
- const currentVersion = "0.1.108";
376914
+ const currentVersion = "0.1.110";
376870
376915
  const response = await fetch(`${BINARIES_BASE_URL}/latest?t=${Date.now()}`);
376871
376916
  if (!response.ok) {
376872
376917
  throw new Error(`Failed to check for updates: HTTP ${response.status}`);
@@ -376916,7 +376961,7 @@ async function performUpdate(version, onProgress) {
376916
376961
  }
376917
376962
 
376918
376963
  // src/lib/background-update.ts
376919
- import { spawn as spawn9 } from "child_process";
376964
+ import { spawn as spawn10 } from "child_process";
376920
376965
  import * as fs28 from "fs";
376921
376966
  import * as path26 from "path";
376922
376967
  import * as os6 from "os";
@@ -376945,7 +376990,7 @@ function maybeStartBackgroundUpdate() {
376945
376990
  if (process.env.SPECIFIC_BACKGROUND_UPDATE === "1") return;
376946
376991
  if (isRateLimited()) return;
376947
376992
  if (!isBinaryWritable()) return;
376948
- const child = spawn9(process.execPath, [], {
376993
+ const child = spawn10(process.execPath, [], {
376949
376994
  detached: true,
376950
376995
  stdio: "ignore",
376951
376996
  env: {
@@ -377134,7 +377179,7 @@ async function projectListCommand() {
377134
377179
  var program = new Command();
377135
377180
  var env = "production";
377136
377181
  var envLabel = env !== "production" ? `[${env.toUpperCase()}] ` : "";
377137
- program.name("specific").description(`${envLabel}Infrastructure-as-code for coding agents`).version("0.1.108").enablePositionalOptions();
377182
+ program.name("specific").description(`${envLabel}Infrastructure-as-code for coding agents`).version("0.1.110").enablePositionalOptions();
377138
377183
  program.command("init").description("Initialize project for use with a coding agent").option("--agent <name...>", "Agents to configure (cursor, claude, codex, other)").addHelpText("after", `
377139
377184
  Examples:
377140
377185
  $ specific init
@@ -23,27 +23,23 @@ Reshape supports many different actions for modifying your database schema:
23
23
 
24
24
  ## Action Documentation
25
25
 
26
- For detailed documentation on each action including all available options and examples, use the Reshape CLI directly:
26
+ For detailed documentation on each action including all available options and examples:
27
27
 
28
28
  ```bash
29
- # List all available actions
30
- reshape docs /actions
31
-
32
- # Get documentation for a specific action
33
- reshape docs /actions/create-table
34
- reshape docs /actions/add-column
35
- reshape docs /actions/alter-column
36
- reshape docs /actions/remove-column
37
- reshape docs /actions/create-enum
38
- reshape docs /actions/alter-enum
39
- reshape docs /actions/remove-enum
40
- reshape docs /actions/add-index
41
- reshape docs /actions/remove-index
42
- reshape docs /actions/add-foreign-key
43
- reshape docs /actions/remove-foreign-key
44
- reshape docs /actions/rename-table
45
- reshape docs /actions/remove-table
46
- reshape docs /actions/custom
29
+ specific docs /postgres/reshape/actions/create-table
30
+ specific docs /postgres/reshape/actions/add-column
31
+ specific docs /postgres/reshape/actions/alter-column
32
+ specific docs /postgres/reshape/actions/remove-column
33
+ specific docs /postgres/reshape/actions/create-enum
34
+ specific docs /postgres/reshape/actions/alter-enum
35
+ specific docs /postgres/reshape/actions/remove-enum
36
+ specific docs /postgres/reshape/actions/add-index
37
+ specific docs /postgres/reshape/actions/remove-index
38
+ specific docs /postgres/reshape/actions/add-foreign-key
39
+ specific docs /postgres/reshape/actions/remove-foreign-key
40
+ specific docs /postgres/reshape/actions/rename-table
41
+ specific docs /postgres/reshape/actions/remove-table
42
+ specific docs /postgres/reshape/actions/custom
47
43
  ```
48
44
 
49
45
  ## Example Migration
@@ -85,4 +81,4 @@ unique = true
85
81
 
86
82
  Related topics:
87
83
  - Run `specific docs /postgres/reshape` for general Reshape documentation
88
- - Run `reshape docs /actions/{ACTION}` for detailed action documentation
84
+ - Run `specific docs /postgres/reshape/actions/{ACTION}` for detailed action documentation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@specific.dev/cli",
3
- "version": "0.1.108",
3
+ "version": "0.1.110",
4
4
  "description": "CLI for Specific infrastructure-as-code",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",