trainfabric 0.1.58 → 0.1.60
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/index.cjs +20 -7
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9364,7 +9364,7 @@ function buildComputeSpec(options) {
|
|
|
9364
9364
|
|
|
9365
9365
|
// src/index.ts
|
|
9366
9366
|
var DEFAULT_TRAINFABRIC_API_URL2 = "https://api.trainfabric.com";
|
|
9367
|
-
var CLI_VERSION = "0.1.
|
|
9367
|
+
var CLI_VERSION = "0.1.60";
|
|
9368
9368
|
var CONFIG_DIR = import_node_path3.default.join(import_node_os2.default.homedir(), ".trainfabric");
|
|
9369
9369
|
var CONFIG_PATH = import_node_path3.default.join(CONFIG_DIR, "config.json");
|
|
9370
9370
|
var FALLBACK_SECRET_PATH = import_node_path3.default.join(CONFIG_DIR, "session.enc");
|
|
@@ -10214,9 +10214,16 @@ program2.command("projects:create").requiredOption("--name <name>").option("--or
|
|
|
10214
10214
|
})
|
|
10215
10215
|
);
|
|
10216
10216
|
});
|
|
10217
|
-
program2.command("projects:delete").argument("<projectId>").description("Delete an empty project").action(async (projectId) => {
|
|
10217
|
+
program2.command("projects:delete").argument("<projectId>").option("--json", "print raw JSON output; this is the default").description("Delete an empty project").action(async (projectId) => {
|
|
10218
10218
|
const normalizedProjectId = normalizeId(projectId, "project", "Project ID");
|
|
10219
|
-
|
|
10219
|
+
const client = createClient(loadConfig());
|
|
10220
|
+
try {
|
|
10221
|
+
await client.projects.get(normalizedProjectId);
|
|
10222
|
+
} catch {
|
|
10223
|
+
printJson({ deleted: false, alreadyDeleted: true, id: normalizedProjectId });
|
|
10224
|
+
return;
|
|
10225
|
+
}
|
|
10226
|
+
await client.projects.delete(normalizedProjectId);
|
|
10220
10227
|
printJson({ deleted: true, id: normalizedProjectId });
|
|
10221
10228
|
});
|
|
10222
10229
|
program2.command("datasets:validate").argument("<file>").description("Validate a local dataset file").action(async (file) => {
|
|
@@ -10372,7 +10379,7 @@ program2.command("runs:explanation").argument("<runId>").option("--json", "print
|
|
|
10372
10379
|
program2.command("runs:cancel").argument("<runId>").description("Cancel a run").action(async (runId) => {
|
|
10373
10380
|
printJson(await createClient(loadConfig()).runs.cancel(normalizeId(runId, "run", "Run ID")));
|
|
10374
10381
|
});
|
|
10375
|
-
program2.command("runs:resume").argument("<runId>").description("Resume a run from the latest checkpoint").action(async (runId) => {
|
|
10382
|
+
program2.command("runs:resume").argument("<runId>").option("--json", "print raw JSON output; this is the default").description("Resume a run from the latest checkpoint").action(async (runId) => {
|
|
10376
10383
|
printJson(await createClient(loadConfig()).runs.resume(normalizeId(runId, "run", "Run ID")));
|
|
10377
10384
|
});
|
|
10378
10385
|
program2.command("runs:terminate").argument("<runId>").description("Terminate a queued, launchable, or active run").action(async (runId) => {
|
|
@@ -10393,7 +10400,7 @@ program2.command("models:export").argument("<modelId>").option("--json", "print
|
|
|
10393
10400
|
program2.command("deployments:list").option("--json", "print raw JSON output; this is the default").description("List deployments").action(async () => {
|
|
10394
10401
|
printJson(await createClient(loadConfig()).deployments.list());
|
|
10395
10402
|
});
|
|
10396
|
-
program2.command("deployments:create").requiredOption("--model <modelId>").option("--project <projectId>", "accepted for consistency; deployment project is inferred from the model").description("Create a hosted deployment for a model. Requires TRAINING_DEPLOYMENT_BASE_URL to be configured on the backend.").action(async (options) => {
|
|
10403
|
+
program2.command("deployments:create").requiredOption("--model <modelId>").option("--project <projectId>", "accepted for consistency; deployment project is inferred from the model").option("--json", "print raw JSON output; this is the default").description("Create a hosted deployment for a model. Requires TRAINING_DEPLOYMENT_BASE_URL to be configured on the backend.").action(async (options) => {
|
|
10397
10404
|
const config = loadConfig();
|
|
10398
10405
|
const client = createClient(config);
|
|
10399
10406
|
const projectId = normalizeOptionalId(options.project, "project", "Project ID");
|
|
@@ -10404,7 +10411,13 @@ program2.command("deployments:create").requiredOption("--model <modelId>").optio
|
|
|
10404
10411
|
try {
|
|
10405
10412
|
printJson(await client.deployments.create({ modelId }));
|
|
10406
10413
|
} catch (error) {
|
|
10407
|
-
printJson({
|
|
10414
|
+
printJson({
|
|
10415
|
+
error: {
|
|
10416
|
+
code: "command_failed",
|
|
10417
|
+
message: error instanceof Error ? error.message : String(error)
|
|
10418
|
+
},
|
|
10419
|
+
ok: false
|
|
10420
|
+
});
|
|
10408
10421
|
process.exitCode = 1;
|
|
10409
10422
|
}
|
|
10410
10423
|
});
|
|
@@ -10460,7 +10473,7 @@ program2.command("treasury:billing").option("--json", "print raw JSON output; th
|
|
|
10460
10473
|
program2.command("treasury:funding").option("--json", "print raw JSON output; this is the default").description("List supplier funding summaries").action(async () => {
|
|
10461
10474
|
printJson(await createClient(loadConfig()).treasury.listSupplierFunding());
|
|
10462
10475
|
});
|
|
10463
|
-
program2.command("treasury:funding-preview").requiredOption("--estimated-supplier-cost <usd>").option("--supplier <supplierId>").option("--pool <poolId>").description("Preview treasury funding readiness for a supplier-backed launch").action(async (options) => {
|
|
10476
|
+
program2.command("treasury:funding-preview").requiredOption("--estimated-supplier-cost <usd>").option("--supplier <supplierId>").option("--pool <poolId>").option("--json", "print raw JSON output; this is the default").description("Preview treasury funding readiness for a supplier-backed launch").action(async (options) => {
|
|
10464
10477
|
printJson(
|
|
10465
10478
|
await createClient(loadConfig()).treasury.previewFunding({
|
|
10466
10479
|
estimatedSupplierCostUsd: normalizePositiveUsd(options.estimatedSupplierCost, "Estimated supplier cost"),
|