@specific.dev/cli 0.1.139 → 0.1.140
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 +51 -40
- package/package.json +1 -1
- /package/dist/admin/_next/static/{LO0zwxsFXZclTu0Jbig9c → dIbCgE-_TKsqFpoght8OM}/_buildManifest.js +0 -0
- /package/dist/admin/_next/static/{LO0zwxsFXZclTu0Jbig9c → dIbCgE-_TKsqFpoght8OM}/_clientMiddlewareManifest.json +0 -0
- /package/dist/admin/_next/static/{LO0zwxsFXZclTu0Jbig9c → dIbCgE-_TKsqFpoght8OM}/_ssgManifest.js +0 -0
package/dist/cli.js
CHANGED
|
@@ -373282,6 +373282,11 @@ function writePreviewEnvironmentId(environmentId, projectDir = process.cwd()) {
|
|
|
373282
373282
|
fs3.writeFileSync(path3.join(specificDir, "preview_environment_id"), environmentId + "\n");
|
|
373283
373283
|
}
|
|
373284
373284
|
|
|
373285
|
+
// src/lib/project/environment.ts
|
|
373286
|
+
function findEnvironmentByNameOrId(environments, flag) {
|
|
373287
|
+
return environments.find((e) => e.id === flag) ?? environments.find((e) => e.name === flag);
|
|
373288
|
+
}
|
|
373289
|
+
|
|
373285
373290
|
// src/lib/auth/credentials.ts
|
|
373286
373291
|
import * as fs19 from "fs";
|
|
373287
373292
|
import * as path17 from "path";
|
|
@@ -373768,7 +373773,7 @@ function trackEvent(event, properties) {
|
|
|
373768
373773
|
event,
|
|
373769
373774
|
properties: {
|
|
373770
373775
|
...properties,
|
|
373771
|
-
cli_version: "0.1.
|
|
373776
|
+
cli_version: "0.1.140",
|
|
373772
373777
|
platform: process.platform,
|
|
373773
373778
|
node_version: process.version,
|
|
373774
373779
|
project_id: getProjectId()
|
|
@@ -375998,12 +376003,12 @@ function DeployUI({ envFlag, preview, config }) {
|
|
|
375998
376003
|
return;
|
|
375999
376004
|
}
|
|
376000
376005
|
if (envFlag) {
|
|
376001
|
-
const match = environments
|
|
376006
|
+
const match = findEnvironmentByNameOrId(environments, envFlag);
|
|
376002
376007
|
if (!match) {
|
|
376003
376008
|
setState((s) => ({
|
|
376004
376009
|
...s,
|
|
376005
376010
|
phase: "error",
|
|
376006
|
-
error: `Environment "${envFlag}" not found. Available: ${environments.map((e) => e.name).join(", ")}`
|
|
376011
|
+
error: `Environment "${envFlag}" not found (matched against name and ID). Available: ${environments.map((e) => e.name).join(", ")}`
|
|
376007
376012
|
}));
|
|
376008
376013
|
return;
|
|
376009
376014
|
}
|
|
@@ -376751,39 +376756,43 @@ async function runDeployPipeline(options2) {
|
|
|
376751
376756
|
const preview = await client2.createPreviewEnvironment(projectId);
|
|
376752
376757
|
writePreviewEnvironmentId(preview.id, projectDir);
|
|
376753
376758
|
console.log(`Preview environment "${preview.name}" created (expires: ${new Date(preview.expiresAt).toLocaleString()})`);
|
|
376754
|
-
options2.
|
|
376759
|
+
options2.environment = preview.name;
|
|
376755
376760
|
}
|
|
376761
|
+
const projects = await client2.listProjects();
|
|
376762
|
+
const project = projects.find((p) => p.id === projectId);
|
|
376763
|
+
const environments = project?.environments ?? [];
|
|
376756
376764
|
let environmentName;
|
|
376757
|
-
if (options2.
|
|
376758
|
-
|
|
376765
|
+
if (options2.environment) {
|
|
376766
|
+
const match = findEnvironmentByNameOrId(environments, options2.environment);
|
|
376767
|
+
if (!match) {
|
|
376768
|
+
console.error(
|
|
376769
|
+
`Error: Environment "${options2.environment}" not found (matched against name and ID).
|
|
376770
|
+
Available: ${environments.map((e) => e.name).join(", ") || "(none)"}`
|
|
376771
|
+
);
|
|
376772
|
+
process.exit(1);
|
|
376773
|
+
}
|
|
376774
|
+
environmentName = match.name;
|
|
376775
|
+
writeEnvironmentId(match.id);
|
|
376759
376776
|
} else if (hasEnvironmentId(projectDir)) {
|
|
376760
376777
|
const savedEnvId = readEnvironmentId(projectDir);
|
|
376761
|
-
const
|
|
376762
|
-
const project = projects.find((p) => p.id === projectId);
|
|
376763
|
-
const env2 = project?.environments.find((e) => e.id === savedEnvId);
|
|
376778
|
+
const env2 = environments.find((e) => e.id === savedEnvId);
|
|
376764
376779
|
if (env2) {
|
|
376765
376780
|
environmentName = env2.name;
|
|
376781
|
+
} else if (environments.length === 1) {
|
|
376782
|
+
environmentName = environments[0].name;
|
|
376783
|
+
writeEnvironmentId(environments[0].id);
|
|
376784
|
+
} else if (environments.length === 0) {
|
|
376785
|
+
console.error("Error: No environments found for this project");
|
|
376786
|
+
process.exit(1);
|
|
376766
376787
|
} else {
|
|
376767
|
-
|
|
376768
|
-
|
|
376769
|
-
environmentName = environments[0].name;
|
|
376770
|
-
writeEnvironmentId(environments[0].id);
|
|
376771
|
-
} else if (environments.length === 0) {
|
|
376772
|
-
console.error("Error: No environments found for this project");
|
|
376773
|
-
process.exit(1);
|
|
376774
|
-
} else {
|
|
376775
|
-
console.error(
|
|
376776
|
-
`Error: Multiple environments available. Specify one with --env.
|
|
376788
|
+
console.error(
|
|
376789
|
+
`Error: Multiple environments available. Specify one with --environment.
|
|
376777
376790
|
Available: ${environments.map((e) => e.name).join(", ")}
|
|
376778
|
-
Example: specific deploy --
|
|
376779
|
-
|
|
376780
|
-
|
|
376781
|
-
}
|
|
376791
|
+
Example: specific deploy --environment ${environments[0].name}`
|
|
376792
|
+
);
|
|
376793
|
+
process.exit(1);
|
|
376782
376794
|
}
|
|
376783
376795
|
} else {
|
|
376784
|
-
const projects = await client2.listProjects();
|
|
376785
|
-
const project = projects.find((p) => p.id === projectId);
|
|
376786
|
-
const environments = project?.environments ?? [];
|
|
376787
376796
|
if (environments.length === 1) {
|
|
376788
376797
|
environmentName = environments[0].name;
|
|
376789
376798
|
writeEnvironmentId(environments[0].id);
|
|
@@ -376792,9 +376801,9 @@ async function runDeployPipeline(options2) {
|
|
|
376792
376801
|
process.exit(1);
|
|
376793
376802
|
} else {
|
|
376794
376803
|
console.error(
|
|
376795
|
-
`Error: Multiple environments available. Specify one with --
|
|
376804
|
+
`Error: Multiple environments available. Specify one with --environment.
|
|
376796
376805
|
Available: ${environments.map((e) => e.name).join(", ")}
|
|
376797
|
-
Example: specific deploy --
|
|
376806
|
+
Example: specific deploy --environment ${environments[0].name}`
|
|
376798
376807
|
);
|
|
376799
376808
|
process.exit(1);
|
|
376800
376809
|
}
|
|
@@ -376979,7 +376988,7 @@ async function deployCommand(options2) {
|
|
|
376979
376988
|
await runDeployPipeline({
|
|
376980
376989
|
config,
|
|
376981
376990
|
projectId: options2.project,
|
|
376982
|
-
|
|
376991
|
+
environment: options2.environment,
|
|
376983
376992
|
secrets: options2.secret,
|
|
376984
376993
|
configs: options2.config,
|
|
376985
376994
|
preview: options2.preview
|
|
@@ -376990,7 +376999,7 @@ async function deployCommand(options2) {
|
|
|
376990
376999
|
/* @__PURE__ */ React7.createElement(
|
|
376991
377000
|
DeployUI,
|
|
376992
377001
|
{
|
|
376993
|
-
envFlag: options2.
|
|
377002
|
+
envFlag: options2.environment,
|
|
376994
377003
|
preview: options2.preview,
|
|
376995
377004
|
config
|
|
376996
377005
|
}
|
|
@@ -377875,7 +377884,7 @@ function compareVersions(a, b) {
|
|
|
377875
377884
|
return 0;
|
|
377876
377885
|
}
|
|
377877
377886
|
async function checkForUpdate() {
|
|
377878
|
-
const currentVersion = "0.1.
|
|
377887
|
+
const currentVersion = "0.1.140";
|
|
377879
377888
|
const response = await fetch(`${BINARIES_BASE_URL}/latest?t=${Date.now()}`);
|
|
377880
377889
|
if (!response.ok) {
|
|
377881
377890
|
throw new Error(`Failed to check for updates: HTTP ${response.status}`);
|
|
@@ -378324,7 +378333,7 @@ async function queryCommand(sqlArg, options2) {
|
|
|
378324
378333
|
const projectId = readProjectId();
|
|
378325
378334
|
const token = await getValidAccessToken();
|
|
378326
378335
|
const client2 = new SpecificClient({ accessToken: token });
|
|
378327
|
-
const environmentId = await resolveEnvironment(client2, projectId, options2.
|
|
378336
|
+
const environmentId = await resolveEnvironment(client2, projectId, options2.environment);
|
|
378328
378337
|
const result = await client2.runObservabilityQuery(environmentId, sql);
|
|
378329
378338
|
process.stdout.write(renderTable(result));
|
|
378330
378339
|
} catch (err) {
|
|
@@ -378354,11 +378363,11 @@ async function resolveEnvironment(client2, projectId, envFlag) {
|
|
|
378354
378363
|
const status = await client2.getProjectStatus(projectId);
|
|
378355
378364
|
const environments = status.environments;
|
|
378356
378365
|
if (envFlag) {
|
|
378357
|
-
const match = environments
|
|
378366
|
+
const match = findEnvironmentByNameOrId(environments, envFlag);
|
|
378358
378367
|
if (!match) {
|
|
378359
378368
|
const available = environments.map((e) => e.name).join(", ") || "(none)";
|
|
378360
378369
|
throw new Error(
|
|
378361
|
-
`Environment "${envFlag}" not found. Available: ${available}`
|
|
378370
|
+
`Environment "${envFlag}" not found (matched against name and ID). Available: ${available}`
|
|
378362
378371
|
);
|
|
378363
378372
|
}
|
|
378364
378373
|
return match.id;
|
|
@@ -378377,7 +378386,7 @@ async function resolveEnvironment(client2, projectId, envFlag) {
|
|
|
378377
378386
|
}
|
|
378378
378387
|
const names = environments.map((e) => e.name).join(", ");
|
|
378379
378388
|
throw new Error(
|
|
378380
|
-
`Project has multiple environments (${names}). Pass --
|
|
378389
|
+
`Project has multiple environments (${names}). Pass --environment <name|id>.`
|
|
378381
378390
|
);
|
|
378382
378391
|
}
|
|
378383
378392
|
function friendlyErrorMessage(raw) {
|
|
@@ -378390,7 +378399,7 @@ function friendlyErrorMessage(raw) {
|
|
|
378390
378399
|
var program = new Command();
|
|
378391
378400
|
var env = "production";
|
|
378392
378401
|
var envLabel = env !== "production" ? `[${env.toUpperCase()}] ` : "";
|
|
378393
|
-
program.name("specific").description(`${envLabel}Infrastructure-as-code for coding agents`).version("0.1.
|
|
378402
|
+
program.name("specific").description(`${envLabel}Infrastructure-as-code for coding agents`).version("0.1.140").enablePositionalOptions();
|
|
378394
378403
|
program.command("init").description("Initialize project for use with a coding agent").option("--agent <name...>", "Agents to configure (cursor, claude, codex, other)").addHelpText("after", `
|
|
378395
378404
|
Examples:
|
|
378396
378405
|
$ specific init
|
|
@@ -378411,10 +378420,11 @@ Examples:
|
|
|
378411
378420
|
const key = options2.key ?? getDefaultKey();
|
|
378412
378421
|
devCommand(key, options2.tunnel ?? false);
|
|
378413
378422
|
});
|
|
378414
|
-
program.command("deploy").description("Deploy to Specific infrastructure").option("--project <id>", "Project ID to deploy to (overrides .projectid file)").option("--
|
|
378423
|
+
program.command("deploy").description("Deploy to Specific infrastructure").option("--project <id>", "Project ID to deploy to (overrides .projectid file)").option("-e, --environment <name|id>", "Target environment (auto-selected if only one exists)").option("--secret <key=value...>", "Secret values (repeatable)").option("--config <key=value...>", "Config values (repeatable)").option("--preview", "Deploy to an ephemeral preview environment").addHelpText("after", `
|
|
378415
378424
|
Examples:
|
|
378416
378425
|
$ specific deploy
|
|
378417
|
-
$ specific deploy --
|
|
378426
|
+
$ specific deploy --environment staging
|
|
378427
|
+
$ specific deploy -e env_0abc123
|
|
378418
378428
|
$ specific deploy --project proj_123
|
|
378419
378429
|
$ specific deploy --preview
|
|
378420
378430
|
$ specific deploy --secret db_url=postgres://... --config domain=app.com`).action((options2) => {
|
|
@@ -378467,10 +378477,11 @@ Examples:
|
|
|
378467
378477
|
program.command("status").description("Show project, environments, and deployment status").addHelpText("after", `
|
|
378468
378478
|
Examples:
|
|
378469
378479
|
$ specific status`).action(statusCommand);
|
|
378470
|
-
program.command("query [sql]").description("Run a SQL query against your environment's observability data").option("--
|
|
378480
|
+
program.command("query [sql]").description("Run a SQL query against your environment's observability data").option("-e, --environment <name|id>", "Target environment (defaults to the current one)").addHelpText("after", `
|
|
378471
378481
|
Examples:
|
|
378472
378482
|
$ specific query "SELECT count() FROM observability.logs"
|
|
378473
|
-
$ specific query --
|
|
378483
|
+
$ specific query --environment staging "SELECT * FROM observability.logs LIMIT 5"
|
|
378484
|
+
$ specific query -e env_0abc123 "SELECT * FROM observability.logs LIMIT 5"
|
|
378474
378485
|
$ cat queries/p99.sql | specific query
|
|
378475
378486
|
$ specific query - < queries/p99.sql`).action((sql, options2) => {
|
|
378476
378487
|
queryCommand(sql, options2);
|
package/package.json
CHANGED
/package/dist/admin/_next/static/{LO0zwxsFXZclTu0Jbig9c → dIbCgE-_TKsqFpoght8OM}/_buildManifest.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/admin/_next/static/{LO0zwxsFXZclTu0Jbig9c → dIbCgE-_TKsqFpoght8OM}/_ssgManifest.js
RENAMED
|
File without changes
|