@specific.dev/cli 0.1.106 → 0.1.107

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 +61 -52
  64. package/package.json +1 -1
  65. /package/dist/admin/_next/static/{P3VZVUKKu1Qjrf-CPDzDC → Zu_1z5_BR3qjEF5OmxQ4k}/_buildManifest.js +0 -0
  66. /package/dist/admin/_next/static/{P3VZVUKKu1Qjrf-CPDzDC → Zu_1z5_BR3qjEF5OmxQ4k}/_clientMiddlewareManifest.json +0 -0
  67. /package/dist/admin/_next/static/{P3VZVUKKu1Qjrf-CPDzDC → Zu_1z5_BR3qjEF5OmxQ4k}/_ssgManifest.js +0 -0
package/dist/cli.js CHANGED
@@ -370793,6 +370793,29 @@ function runReshape(args, databaseUrl, migrationsDir, reshapeBinaryPath, log) {
370793
370793
  return { success: false, output: message };
370794
370794
  }
370795
370795
  }
370796
+ function getReshapeStatus(databaseUrl, reshapeBinaryPath, log) {
370797
+ const args = ["status", "--format", "json", "--url", databaseUrl];
370798
+ log(`Executing: reshape ${args.join(" ")}`);
370799
+ try {
370800
+ const result = spawnSync(reshapeBinaryPath, args, {
370801
+ encoding: "utf-8",
370802
+ stdio: ["pipe", "pipe", "pipe"]
370803
+ });
370804
+ const stdout = result.stdout || "";
370805
+ const stderr = result.stderr || "";
370806
+ if (result.status !== 0) {
370807
+ log(`Reshape status command failed with exit code ${result.status}`);
370808
+ if (stderr.trim()) log(` stderr: ${stderr.trim()}`);
370809
+ return null;
370810
+ }
370811
+ log(`Reshape status: ${stdout.trim()}`);
370812
+ return JSON.parse(stdout);
370813
+ } catch (err) {
370814
+ const message = err instanceof Error ? err.message : String(err);
370815
+ log(`Failed to get Reshape status: ${message}`);
370816
+ return null;
370817
+ }
370818
+ }
370796
370819
  function makeReadOnly(filePath, log) {
370797
370820
  try {
370798
370821
  fs10.chmodSync(filePath, 292);
@@ -370818,64 +370841,50 @@ function createReshapeWatcher(options2) {
370818
370841
  return null;
370819
370842
  }
370820
370843
  log(`Processing ${currentMigrationFiles.length} migration file(s)`);
370821
- if (currentMigrationFiles.length === 1) {
370822
- const migrationFile = currentMigrationFiles[0];
370823
- const migrationName = getMigrationName(migrationFile);
370824
- log(`Single migration detected: ${migrationFile}`);
370825
- log(`Starting migration "${migrationName}" (will not be completed, allowing iteration)`);
370826
- const result = runReshape(["start"], databaseUrl, migrationsDir, reshapeBinaryPath, log);
370827
- if (!result.success) {
370828
- log(`ERROR: Failed to start migration "${migrationName}"`);
370829
- onError(new Error(`Failed to start migration: ${result.output}`));
370830
- return null;
370831
- }
370832
- startedMigration = migrationFile;
370833
- log(`Migration "${migrationName}" started successfully`);
370834
- log(` Started migration file: ${startedMigration}`);
370835
- } else {
370844
+ const lastMigration = currentMigrationFiles[currentMigrationFiles.length - 1];
370845
+ const lastMigrationName = getMigrationName(lastMigration);
370846
+ const status = getReshapeStatus(databaseUrl, reshapeBinaryPath, log);
370847
+ if (status?.status === "in_progress") {
370848
+ log(`Found in-progress migration(s), aborting before re-initialization...`);
370849
+ runReshape(["abort"], databaseUrl, migrationsDir, reshapeBinaryPath, log);
370850
+ }
370851
+ if (currentMigrationFiles.length > 1) {
370836
370852
  const secondToLast = currentMigrationFiles[currentMigrationFiles.length - 2];
370837
370853
  const secondToLastName = getMigrationName(secondToLast);
370838
- const lastMigration = currentMigrationFiles[currentMigrationFiles.length - 1];
370839
- const lastMigrationName = getMigrationName(lastMigration);
370840
- log(`Multiple migrations detected (${currentMigrationFiles.length} total)`);
370841
- log(` Migrations to complete: ${currentMigrationFiles.slice(0, -1).join(", ")}`);
370842
- log(` Migration to start (latest): ${lastMigration}`);
370843
- log(`Completing all migrations up to and including "${secondToLastName}"...`);
370844
- const completeResult = runReshape(
370845
- ["start", "--complete", "--migration", secondToLastName],
370846
- databaseUrl,
370847
- migrationsDir,
370848
- reshapeBinaryPath,
370849
- log
370850
- );
370851
- if (!completeResult.success) {
370852
- log(`ERROR: Failed to complete migrations up to "${secondToLastName}"`);
370853
- onError(new Error(`Failed to complete migrations: ${completeResult.output}`));
370854
- return null;
370854
+ if (status?.latest_completed_migration !== secondToLastName) {
370855
+ log(`Completing all migrations up to and including "${secondToLastName}"...`);
370856
+ const completeResult = runReshape(
370857
+ ["start", "--complete", "--migration", secondToLastName],
370858
+ databaseUrl,
370859
+ migrationsDir,
370860
+ reshapeBinaryPath,
370861
+ log
370862
+ );
370863
+ if (!completeResult.success) {
370864
+ log(`ERROR: Failed to complete migrations up to "${secondToLastName}"`);
370865
+ onError(new Error(`Failed to complete migrations: ${completeResult.output}`));
370866
+ return null;
370867
+ }
370868
+ log(`Successfully completed ${currentMigrationFiles.length - 1} migration(s)`);
370869
+ } else {
370870
+ log(`Migrations up to "${secondToLastName}" already completed, skipping`);
370855
370871
  }
370856
- log(`Successfully completed ${currentMigrationFiles.length - 1} migration(s)`);
370857
- log(`Making completed migration files read-only...`);
370858
370872
  for (let i = 0; i < currentMigrationFiles.length - 1; i++) {
370859
370873
  const filePath = path11.join(migrationsDir, currentMigrationFiles[i]);
370860
370874
  makeReadOnly(filePath, log);
370861
370875
  }
370862
- log(`Starting latest migration "${lastMigrationName}" (will not be completed, allowing iteration)`);
370863
- const startResult = runReshape(["start"], databaseUrl, migrationsDir, reshapeBinaryPath, log);
370864
- if (!startResult.success) {
370865
- log(`ERROR: Failed to start migration "${lastMigrationName}"`);
370866
- onError(new Error(`Failed to start last migration: ${startResult.output}`));
370867
- return null;
370868
- }
370869
- startedMigration = lastMigration;
370870
- log(`Migration "${lastMigrationName}" started successfully`);
370871
- log(` Started migration file: ${startedMigration}`);
370872
370876
  }
370873
- const searchPath = startedMigration ? getSchemaName(startedMigration) : null;
370874
- if (searchPath) {
370875
- log(`Search path (schema name): ${searchPath}`);
370876
- } else {
370877
- log(`No search_path (no migration started)`);
370877
+ log(`Starting latest migration "${lastMigrationName}" (will not be completed, allowing iteration)`);
370878
+ const startResult = runReshape(["start"], databaseUrl, migrationsDir, reshapeBinaryPath, log);
370879
+ if (!startResult.success) {
370880
+ log(`ERROR: Failed to start migration "${lastMigrationName}"`);
370881
+ onError(new Error(`Failed to start migration: ${startResult.output}`));
370882
+ return null;
370878
370883
  }
370884
+ startedMigration = lastMigration;
370885
+ log(`Migration "${lastMigrationName}" started successfully`);
370886
+ const searchPath = getSchemaName(startedMigration);
370887
+ log(`Search path (schema name): ${searchPath}`);
370879
370888
  log(`Reshape initialization complete`);
370880
370889
  return searchPath;
370881
370890
  };
@@ -373075,7 +373084,7 @@ function trackEvent(event, properties) {
373075
373084
  event,
373076
373085
  properties: {
373077
373086
  ...properties,
373078
- cli_version: "0.1.106",
373087
+ cli_version: "0.1.107",
373079
373088
  platform: process.platform,
373080
373089
  node_version: process.version,
373081
373090
  project_id: getProjectId()
@@ -376754,7 +376763,7 @@ function compareVersions(a, b) {
376754
376763
  return 0;
376755
376764
  }
376756
376765
  async function checkForUpdate() {
376757
- const currentVersion = "0.1.106";
376766
+ const currentVersion = "0.1.107";
376758
376767
  const response = await fetch(`${BINARIES_BASE_URL}/latest?t=${Date.now()}`);
376759
376768
  if (!response.ok) {
376760
376769
  throw new Error(`Failed to check for updates: HTTP ${response.status}`);
@@ -377022,7 +377031,7 @@ async function projectListCommand() {
377022
377031
  var program = new Command();
377023
377032
  var env = "production";
377024
377033
  var envLabel = env !== "production" ? `[${env.toUpperCase()}] ` : "";
377025
- program.name("specific").description(`${envLabel}Infrastructure-as-code for coding agents`).version("0.1.106").enablePositionalOptions();
377034
+ program.name("specific").description(`${envLabel}Infrastructure-as-code for coding agents`).version("0.1.107").enablePositionalOptions();
377026
377035
  program.command("init").description("Initialize project for use with a coding agent").option("--agent <name...>", "Agents to configure (cursor, claude, codex, other)").addHelpText("after", `
377027
377036
  Examples:
377028
377037
  $ specific init
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@specific.dev/cli",
3
- "version": "0.1.106",
3
+ "version": "0.1.107",
4
4
  "description": "CLI for Specific infrastructure-as-code",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",