@erdoai/cli 0.279.0 → 0.280.1
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.js +9 -13
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1748,8 +1748,10 @@ var ErdoClient = class {
|
|
|
1748
1748
|
}
|
|
1749
1749
|
getDatasetRowActions(slug, opts) {
|
|
1750
1750
|
const q = new URLSearchParams({ dataset: slug });
|
|
1751
|
+
if (opts?.name) q.set("name", opts.name);
|
|
1751
1752
|
if (opts?.include_receipts) q.set("include_receipts", "true");
|
|
1752
1753
|
if (opts?.include_unresolved) q.set("include_unresolved", "true");
|
|
1754
|
+
if (opts?.cursor) q.set("cursor", opts.cursor);
|
|
1753
1755
|
return this.request("GET", `/v1/dataset-row-actions?${q.toString()}`);
|
|
1754
1756
|
}
|
|
1755
1757
|
setDatasetRowAction(input) {
|
|
@@ -8963,11 +8965,13 @@ providerLeadSourcesCmd.command("delete").description("Delete a lead source, by -
|
|
|
8963
8965
|
}
|
|
8964
8966
|
});
|
|
8965
8967
|
var datasetRowActionsCmd = datasetsCmd.command("row-actions").description("Read and replace actions for arriving or excluded dataset rows");
|
|
8966
|
-
datasetRowActionsCmd.command("get <slug>").description("Read the row-action declarations and optional bounded diagnostics for a dataset").option("--include-receipts", "include bounded provider receipt diagnostics").option("--include-unresolved", "include bounded unresolved lookup diagnostics").action(async (slug, opts) => {
|
|
8968
|
+
datasetRowActionsCmd.command("get <slug>").description("Read the row-action declarations and optional bounded diagnostics for a dataset").option("--name <name>", "read one declaration by name (required with --cursor)").option("--include-receipts", "include bounded provider receipt diagnostics").option("--cursor <cursor>", "continue the provider receipt page returned by the previous read").option("--include-unresolved", "include bounded unresolved lookup diagnostics").action(async (slug, opts) => {
|
|
8967
8969
|
try {
|
|
8968
8970
|
print(await new ErdoClient().getDatasetRowActions(slug, {
|
|
8971
|
+
...opts.name ? { name: opts.name } : {},
|
|
8969
8972
|
...opts.includeReceipts ? { include_receipts: true } : {},
|
|
8970
|
-
...opts.includeUnresolved ? { include_unresolved: true } : {}
|
|
8973
|
+
...opts.includeUnresolved ? { include_unresolved: true } : {},
|
|
8974
|
+
...opts.cursor ? { cursor: opts.cursor } : {}
|
|
8971
8975
|
}));
|
|
8972
8976
|
} catch (e) {
|
|
8973
8977
|
fail(e);
|
|
@@ -11676,7 +11680,7 @@ declarationsCmd.command("upsert").description("Write one declaration. The same n
|
|
|
11676
11680
|
});
|
|
11677
11681
|
var knowledgeCmd = program.command("knowledge").description("Knowledge objects");
|
|
11678
11682
|
var filesCmd = program.command("files").description("Organization files");
|
|
11679
|
-
filesCmd.command("upload [path]").description("Upload a local file or download a public URL into the selected organization").option("--url <url>", "HTTP(S) source URL (downloaded by the service)").option("--filename <name>", "filename for a URL download").option("--source-ref <ref>", "stable retry target; the same bytes and ref return the existing file").option("--source <source>", "provenance: upload, download, generated, screenshot, code_output, email, or attachment_backfill").option("--access <access>", "org or private", "org").action(async (path, opts) => {
|
|
11683
|
+
filesCmd.command("upload [path]").description("Upload a local file or download a public URL into the selected organization").option("--url <url>", "HTTP(S) source URL (downloaded by the service)").option("--filename <name>", "override the provider filename for a URL download").option("--source-ref <ref>", "stable retry target; the same bytes and ref return the existing file").option("--source <source>", "provenance: upload, download, generated, screenshot, code_output, email, or attachment_backfill").option("--access <access>", "org or private", "org").action(async (path, opts) => {
|
|
11680
11684
|
try {
|
|
11681
11685
|
if (Boolean(opts.url) === Boolean(path)) throw new Error("provide exactly one local path or --url");
|
|
11682
11686
|
if (!(opts.access === "org" || opts.access === "private")) throw new Error("--access must be org or private");
|
|
@@ -11684,16 +11688,8 @@ filesCmd.command("upload [path]").description("Upload a local file or download a
|
|
|
11684
11688
|
if (opts.url) {
|
|
11685
11689
|
const sourceURL = new URL(opts.url);
|
|
11686
11690
|
if (!["http:", "https:"].includes(sourceURL.protocol) || sourceURL.username || sourceURL.password) throw new Error("--url must be an HTTP(S) URL without credentials");
|
|
11687
|
-
|
|
11688
|
-
if (
|
|
11689
|
-
try {
|
|
11690
|
-
filename = basename2(decodeURIComponent(sourceURL.pathname));
|
|
11691
|
-
} catch {
|
|
11692
|
-
filename = basename2(sourceURL.pathname);
|
|
11693
|
-
}
|
|
11694
|
-
}
|
|
11695
|
-
if (!filename || filename === "/") throw new Error("provide --filename when the URL has no filename");
|
|
11696
|
-
input = { filename: basename2(filename), source_url: opts.url, source: opts.source ?? "download", access: opts.access };
|
|
11691
|
+
input = { source_url: opts.url, source: opts.source ?? "download", access: opts.access };
|
|
11692
|
+
if (opts.filename) input.filename = basename2(opts.filename);
|
|
11697
11693
|
} else {
|
|
11698
11694
|
if (!path) throw new Error("provide a local path or --url");
|
|
11699
11695
|
if (statSync2(path).size > 50 * 1024 * 1024) throw new Error("file exceeds the 50 MiB limit");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@erdoai/cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Erdo CLI
|
|
3
|
+
"version": "0.280.1",
|
|
4
|
+
"description": "Erdo CLI — drive datasets, pages, and evals from the terminal or CI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"erdo": "dist/index.js"
|