@specific.dev/cli 0.1.105 → 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 +101 -56
  64. package/package.json +1 -1
  65. /package/dist/admin/_next/static/{DM3asEJQq_O7ltL-zYqgE → Zu_1z5_BR3qjEF5OmxQ4k}/_buildManifest.js +0 -0
  66. /package/dist/admin/_next/static/{DM3asEJQq_O7ltL-zYqgE → Zu_1z5_BR3qjEF5OmxQ4k}/_clientMiddlewareManifest.json +0 -0
  67. /package/dist/admin/_next/static/{DM3asEJQq_O7ltL-zYqgE → 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
  };
@@ -372363,6 +372372,23 @@ Add them to the config block in specific.local`
372363
372372
  this.systemLog(
372364
372373
  `Starting service "${service.name}"${portsList ? ` on port${endpointPorts.size > 1 ? "s" : ""} ${portsList}` : ""}`
372365
372374
  );
372375
+ const volumePaths = /* @__PURE__ */ new Map();
372376
+ if (service.volumes) {
372377
+ for (const vol of service.volumes) {
372378
+ const volumeDir = path14.resolve(
372379
+ this.projectDir,
372380
+ ".specific",
372381
+ "keys",
372382
+ this.instanceKey,
372383
+ "data",
372384
+ "volumes",
372385
+ service.name,
372386
+ vol.name
372387
+ );
372388
+ fs13.mkdirSync(volumeDir, { recursive: true });
372389
+ volumePaths.set(vol.name, volumeDir);
372390
+ }
372391
+ }
372366
372392
  const running = startService(
372367
372393
  service,
372368
372394
  resources,
@@ -372372,7 +372398,8 @@ Add them to the config block in specific.local`
372372
372398
  serviceEndpoints,
372373
372399
  (line) => this.addLog(line),
372374
372400
  publicUrls,
372375
- resolveServiceCwd(service)
372401
+ resolveServiceCwd(service),
372402
+ volumePaths
372376
372403
  );
372377
372404
  runningServices.push(running);
372378
372405
  this.services = [...runningServices];
@@ -372405,6 +372432,23 @@ Add them to the config block in specific.local`
372405
372432
  if (!service.command && !service.dev?.command) continue;
372406
372433
  try {
372407
372434
  const endpointPorts = serviceEndpointPorts.get(service.name) || /* @__PURE__ */ new Map();
372435
+ const volumePaths = /* @__PURE__ */ new Map();
372436
+ if (service.volumes) {
372437
+ for (const vol of service.volumes) {
372438
+ const volumeDir = path14.resolve(
372439
+ this.projectDir,
372440
+ ".specific",
372441
+ "keys",
372442
+ this.instanceKey,
372443
+ "data",
372444
+ "volumes",
372445
+ service.name,
372446
+ vol.name
372447
+ );
372448
+ fs13.mkdirSync(volumeDir, { recursive: true });
372449
+ volumePaths.set(vol.name, volumeDir);
372450
+ }
372451
+ }
372408
372452
  const running = startService(
372409
372453
  service,
372410
372454
  resources,
@@ -372414,7 +372458,8 @@ Add them to the config block in specific.local`
372414
372458
  serviceEndpoints,
372415
372459
  (line) => this.addLog(line),
372416
372460
  void 0,
372417
- resolveServiceCwd(service)
372461
+ resolveServiceCwd(service),
372462
+ volumePaths
372418
372463
  );
372419
372464
  newServices.push(running);
372420
372465
  } catch (err) {
@@ -373039,7 +373084,7 @@ function trackEvent(event, properties) {
373039
373084
  event,
373040
373085
  properties: {
373041
373086
  ...properties,
373042
- cli_version: "0.1.105",
373087
+ cli_version: "0.1.107",
373043
373088
  platform: process.platform,
373044
373089
  node_version: process.version,
373045
373090
  project_id: getProjectId()
@@ -373374,7 +373419,7 @@ var BETA_REGISTRY = [
373374
373419
  ];
373375
373420
 
373376
373421
  // src/lib/beta/storage.ts
373377
- import { readFileSync as readFileSync8, writeFileSync as writeFileSync7, existsSync as existsSync16, mkdirSync as mkdirSync12 } from "fs";
373422
+ import { readFileSync as readFileSync8, writeFileSync as writeFileSync7, existsSync as existsSync16, mkdirSync as mkdirSync13 } from "fs";
373378
373423
  import { join as join18 } from "path";
373379
373424
  var BETAS_FILE = ".specific/betas.json";
373380
373425
  function loadEnabledBetas(projectDir = process.cwd()) {
@@ -373404,7 +373449,7 @@ function disableBeta(name, projectDir = process.cwd()) {
373404
373449
  function saveBetas(enabled, projectDir) {
373405
373450
  const specificDir = join18(projectDir, ".specific");
373406
373451
  if (!existsSync16(specificDir)) {
373407
- mkdirSync12(specificDir, { recursive: true });
373452
+ mkdirSync13(specificDir, { recursive: true });
373408
373453
  }
373409
373454
  const data = { enabled };
373410
373455
  writeFileSync7(
@@ -376718,7 +376763,7 @@ function compareVersions(a, b) {
376718
376763
  return 0;
376719
376764
  }
376720
376765
  async function checkForUpdate() {
376721
- const currentVersion = "0.1.105";
376766
+ const currentVersion = "0.1.107";
376722
376767
  const response = await fetch(`${BINARIES_BASE_URL}/latest?t=${Date.now()}`);
376723
376768
  if (!response.ok) {
376724
376769
  throw new Error(`Failed to check for updates: HTTP ${response.status}`);
@@ -376986,7 +377031,7 @@ async function projectListCommand() {
376986
377031
  var program = new Command();
376987
377032
  var env = "production";
376988
377033
  var envLabel = env !== "production" ? `[${env.toUpperCase()}] ` : "";
376989
- program.name("specific").description(`${envLabel}Infrastructure-as-code for coding agents`).version("0.1.105").enablePositionalOptions();
377034
+ program.name("specific").description(`${envLabel}Infrastructure-as-code for coding agents`).version("0.1.107").enablePositionalOptions();
376990
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", `
376991
377036
  Examples:
376992
377037
  $ specific init
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@specific.dev/cli",
3
- "version": "0.1.105",
3
+ "version": "0.1.107",
4
4
  "description": "CLI for Specific infrastructure-as-code",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",