trainfabric 0.1.19 → 0.1.20
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 +8 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -8210,6 +8210,9 @@ var DatasetsClient = class extends ResourceClient {
|
|
|
8210
8210
|
const effectiveProjectId = projectId ?? this.parent.projectId;
|
|
8211
8211
|
return this.requestGet(`/v1/datasets${effectiveProjectId ? `?projectId=${effectiveProjectId}` : ""}`);
|
|
8212
8212
|
}
|
|
8213
|
+
delete(datasetId) {
|
|
8214
|
+
return this.requestDelete(`/v1/datasets/${datasetId}`);
|
|
8215
|
+
}
|
|
8213
8216
|
};
|
|
8214
8217
|
|
|
8215
8218
|
// ../sdk/dist/client/deployments.js
|
|
@@ -8942,7 +8945,7 @@ function buildComputeSpec(options) {
|
|
|
8942
8945
|
|
|
8943
8946
|
// src/index.ts
|
|
8944
8947
|
var DEFAULT_TRAINFABRIC_API_URL2 = "https://api.trainfabric.com";
|
|
8945
|
-
var CLI_VERSION = "0.1.
|
|
8948
|
+
var CLI_VERSION = "0.1.20";
|
|
8946
8949
|
var CONFIG_DIR = import_node_path3.default.join(import_node_os2.default.homedir(), ".trainfabric");
|
|
8947
8950
|
var CONFIG_PATH = import_node_path3.default.join(CONFIG_DIR, "config.json");
|
|
8948
8951
|
var FALLBACK_SECRET_PATH = import_node_path3.default.join(CONFIG_DIR, "session.enc");
|
|
@@ -9511,6 +9514,10 @@ program2.command("datasets:list").option("--project <projectId>").description("L
|
|
|
9511
9514
|
program2.command("datasets:get").argument("<datasetId>").description("Fetch dataset detail").action(async (datasetId) => {
|
|
9512
9515
|
printJson(await createClient(loadConfig()).datasets.get(String(datasetId)));
|
|
9513
9516
|
});
|
|
9517
|
+
program2.command("datasets:delete").argument("<datasetId>").description("Delete a dataset").action(async (datasetId) => {
|
|
9518
|
+
await createClient(loadConfig()).datasets.delete(String(datasetId));
|
|
9519
|
+
printJson({ deleted: true, id: String(datasetId) });
|
|
9520
|
+
});
|
|
9514
9521
|
program2.command("datasets:upload").argument("<file>").option("--project <projectId>").option("--name <name>").description("Upload a dataset through upload sessions").action(async (file, options) => {
|
|
9515
9522
|
const config = loadConfig();
|
|
9516
9523
|
const dataset = await createClient(config).datasets.create({
|