@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.
- package/dist/admin/404/index.html +1 -1
- package/dist/admin/404.html +1 -1
- package/dist/admin/__next.!KGRlZmF1bHQp.__PAGE__.txt +1 -1
- package/dist/admin/__next.!KGRlZmF1bHQp.txt +1 -1
- package/dist/admin/__next._full.txt +1 -1
- package/dist/admin/__next._head.txt +1 -1
- package/dist/admin/__next._index.txt +1 -1
- package/dist/admin/__next._tree.txt +1 -1
- package/dist/admin/_not-found/__next._full.txt +1 -1
- package/dist/admin/_not-found/__next._head.txt +1 -1
- package/dist/admin/_not-found/__next._index.txt +1 -1
- package/dist/admin/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/admin/_not-found/__next._not-found.txt +1 -1
- package/dist/admin/_not-found/__next._tree.txt +1 -1
- package/dist/admin/_not-found/index.html +1 -1
- package/dist/admin/_not-found/index.txt +1 -1
- package/dist/admin/databases/__next.!KGRlZmF1bHQp.databases.__PAGE__.txt +1 -1
- package/dist/admin/databases/__next.!KGRlZmF1bHQp.databases.txt +1 -1
- package/dist/admin/databases/__next.!KGRlZmF1bHQp.txt +1 -1
- package/dist/admin/databases/__next._full.txt +1 -1
- package/dist/admin/databases/__next._head.txt +1 -1
- package/dist/admin/databases/__next._index.txt +1 -1
- package/dist/admin/databases/__next._tree.txt +1 -1
- package/dist/admin/databases/index.html +1 -1
- package/dist/admin/databases/index.txt +1 -1
- package/dist/admin/fullscreen/__next._full.txt +1 -1
- package/dist/admin/fullscreen/__next._head.txt +1 -1
- package/dist/admin/fullscreen/__next._index.txt +1 -1
- package/dist/admin/fullscreen/__next._tree.txt +1 -1
- package/dist/admin/fullscreen/__next.fullscreen.__PAGE__.txt +1 -1
- package/dist/admin/fullscreen/__next.fullscreen.txt +1 -1
- package/dist/admin/fullscreen/databases/__next._full.txt +1 -1
- package/dist/admin/fullscreen/databases/__next._head.txt +1 -1
- package/dist/admin/fullscreen/databases/__next._index.txt +1 -1
- package/dist/admin/fullscreen/databases/__next._tree.txt +1 -1
- package/dist/admin/fullscreen/databases/__next.fullscreen.databases.__PAGE__.txt +1 -1
- package/dist/admin/fullscreen/databases/__next.fullscreen.databases.txt +1 -1
- package/dist/admin/fullscreen/databases/__next.fullscreen.txt +1 -1
- package/dist/admin/fullscreen/databases/index.html +1 -1
- package/dist/admin/fullscreen/databases/index.txt +1 -1
- package/dist/admin/fullscreen/index.html +1 -1
- package/dist/admin/fullscreen/index.txt +1 -1
- package/dist/admin/index.html +1 -1
- package/dist/admin/index.txt +1 -1
- package/dist/admin/mail/__next.!KGRlZmF1bHQp.mail.__PAGE__.txt +1 -1
- package/dist/admin/mail/__next.!KGRlZmF1bHQp.mail.txt +1 -1
- package/dist/admin/mail/__next.!KGRlZmF1bHQp.txt +1 -1
- package/dist/admin/mail/__next._full.txt +1 -1
- package/dist/admin/mail/__next._head.txt +1 -1
- package/dist/admin/mail/__next._index.txt +1 -1
- package/dist/admin/mail/__next._tree.txt +1 -1
- package/dist/admin/mail/index.html +1 -1
- package/dist/admin/mail/index.txt +1 -1
- package/dist/admin/workflows/__next.!KGRlZmF1bHQp.txt +1 -1
- package/dist/admin/workflows/__next.!KGRlZmF1bHQp.workflows.__PAGE__.txt +1 -1
- package/dist/admin/workflows/__next.!KGRlZmF1bHQp.workflows.txt +1 -1
- package/dist/admin/workflows/__next._full.txt +1 -1
- package/dist/admin/workflows/__next._head.txt +1 -1
- package/dist/admin/workflows/__next._index.txt +1 -1
- package/dist/admin/workflows/__next._tree.txt +1 -1
- package/dist/admin/workflows/index.html +1 -1
- package/dist/admin/workflows/index.txt +1 -1
- package/dist/cli.js +101 -56
- package/package.json +1 -1
- /package/dist/admin/_next/static/{DM3asEJQq_O7ltL-zYqgE → Zu_1z5_BR3qjEF5OmxQ4k}/_buildManifest.js +0 -0
- /package/dist/admin/_next/static/{DM3asEJQq_O7ltL-zYqgE → Zu_1z5_BR3qjEF5OmxQ4k}/_clientMiddlewareManifest.json +0 -0
- /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
|
-
|
|
370822
|
-
|
|
370823
|
-
|
|
370824
|
-
|
|
370825
|
-
log(`
|
|
370826
|
-
|
|
370827
|
-
|
|
370828
|
-
|
|
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
|
-
|
|
370839
|
-
|
|
370840
|
-
|
|
370841
|
-
|
|
370842
|
-
|
|
370843
|
-
|
|
370844
|
-
|
|
370845
|
-
|
|
370846
|
-
|
|
370847
|
-
|
|
370848
|
-
|
|
370849
|
-
|
|
370850
|
-
|
|
370851
|
-
|
|
370852
|
-
log(`
|
|
370853
|
-
|
|
370854
|
-
|
|
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
|
-
|
|
370874
|
-
|
|
370875
|
-
|
|
370876
|
-
|
|
370877
|
-
|
|
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.
|
|
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
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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
/package/dist/admin/_next/static/{DM3asEJQq_O7ltL-zYqgE → Zu_1z5_BR3qjEF5OmxQ4k}/_buildManifest.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/admin/_next/static/{DM3asEJQq_O7ltL-zYqgE → Zu_1z5_BR3qjEF5OmxQ4k}/_ssgManifest.js
RENAMED
|
File without changes
|