busa-cli 0.9.4 → 0.9.5
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/{chunk-5P2ZNCL5.js → chunk-N6NMNVQT.js} +53 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -1089,6 +1089,28 @@ Examples:
|
|
|
1089
1089
|
});
|
|
1090
1090
|
})
|
|
1091
1091
|
);
|
|
1092
|
+
addGlobalFlags(nodes.command("move")).description("Move or reorder a node (applied immediately, no review needed)").requiredOption("--node-id <id>", "node id to move").option("--parent-node-id <id>", "new parent folder node id; omit to keep the current parent").option(
|
|
1093
|
+
"--position <n>",
|
|
1094
|
+
"new position among the target parent's children",
|
|
1095
|
+
(v) => Number.parseInt(v, 10)
|
|
1096
|
+
).option("--message <text>", "Change Request message").option("--submitted-by <name>", "producer label").addHelpText(
|
|
1097
|
+
"after",
|
|
1098
|
+
`
|
|
1099
|
+
Examples:
|
|
1100
|
+
busabase-cli nodes move --node-id nod_123 --position 0
|
|
1101
|
+
busabase-cli nodes move --node-id nod_123 --parent-node-id nod_456 --position 2`
|
|
1102
|
+
).action(
|
|
1103
|
+
runAction(
|
|
1104
|
+
state,
|
|
1105
|
+
(client, opts) => client.nodes.move({
|
|
1106
|
+
nodeId: opts.nodeId,
|
|
1107
|
+
parentNodeId: opts.parentNodeId,
|
|
1108
|
+
position: opts.position,
|
|
1109
|
+
message: opts.message,
|
|
1110
|
+
submittedBy: opts.submittedBy
|
|
1111
|
+
})
|
|
1112
|
+
)
|
|
1113
|
+
);
|
|
1092
1114
|
const bases = program.command("bases").description("Bases (structured tables)");
|
|
1093
1115
|
addGlobalFlags(bases.command("list")).description("List Bases in the active space").action(runAction(state, (client) => client.bases.list()));
|
|
1094
1116
|
addGlobalFlags(bases.command("get")).description("Get one Base by slug").requiredOption("--slug <slug>", "Base slug").action(
|
|
@@ -1271,6 +1293,37 @@ Examples:
|
|
|
1271
1293
|
})
|
|
1272
1294
|
)
|
|
1273
1295
|
);
|
|
1296
|
+
addGlobalFlags(program.command("grep")).description(
|
|
1297
|
+
"Search files, Docs, and Base records with one pattern (unified grep; use `assets grep` for files-only)"
|
|
1298
|
+
).requiredOption("--pattern <regex>", "literal or regex pattern").option("--flags <flags>", 'RegExp flags, e.g. "i" for case-insensitive').option(
|
|
1299
|
+
"--sources <sources...>",
|
|
1300
|
+
'sources to scan: "files", "docs", and/or "records" (default: all three)'
|
|
1301
|
+
).option("--asset-ids <ids...>", "files scope: specific asset ids").option("--drive-path <path>", "files scope: Drive/Skill mounted path prefix").option("--mime-types <types...>", "files scope: MIME types").option("--node-ids <ids...>", "docs scope: specific Doc node ids").option("--base-ids <ids...>", "records scope: specific Base ids").option("--base-slugs <slugs...>", "records scope: specific Base slugs").option(
|
|
1302
|
+
"--max-matches <n>",
|
|
1303
|
+
"max matches, shared across sources (default 100, cap 1000)",
|
|
1304
|
+
parsePositiveInt
|
|
1305
|
+
).option("--context-lines <n>", "lines of before/after context (default 0, cap 10)", parseNum).action(
|
|
1306
|
+
runAction(state, (client, opts) => {
|
|
1307
|
+
const filesScope = opts.assetIds || opts.drivePath || opts.mimeTypes ? {
|
|
1308
|
+
assetIds: opts.assetIds,
|
|
1309
|
+
drivePath: opts.drivePath,
|
|
1310
|
+
mimeTypes: opts.mimeTypes
|
|
1311
|
+
} : void 0;
|
|
1312
|
+
const docsScope = opts.nodeIds ? { nodeIds: opts.nodeIds } : void 0;
|
|
1313
|
+
const recordsScope = opts.baseIds || opts.baseSlugs ? {
|
|
1314
|
+
baseIds: opts.baseIds,
|
|
1315
|
+
baseSlugs: opts.baseSlugs
|
|
1316
|
+
} : void 0;
|
|
1317
|
+
return client.grep({
|
|
1318
|
+
pattern: opts.pattern,
|
|
1319
|
+
flags: opts.flags,
|
|
1320
|
+
sources: opts.sources,
|
|
1321
|
+
scope: filesScope || docsScope || recordsScope ? { files: filesScope, docs: docsScope, records: recordsScope } : void 0,
|
|
1322
|
+
maxMatches: opts.maxMatches,
|
|
1323
|
+
contextLines: opts.contextLines
|
|
1324
|
+
});
|
|
1325
|
+
})
|
|
1326
|
+
);
|
|
1274
1327
|
const addUploadCommand = (parent, hidden = false) => addGlobalFlags(parent.command("upload", { noHelp: hidden })).description("Upload a file and print an asset ref for record fields").requiredOption("--file <path>", "local file to upload").option("--file-name <name>", "stored file name (default: basename of --file)").option("--mime-type <mime>", "MIME type (default: inferred from extension)").option("--context <value>", "upload context (default record-field)").addHelpText(
|
|
1275
1328
|
"after",
|
|
1276
1329
|
`
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "busa-cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"description": "Command-line client for the Busabase OpenAPI REST API. Talks to a local or remote `busabase server`. Short-name alias for busabase-cli.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/busabase/busabase/tree/main/apps/busabase-cli",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"README.md"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"busabase-sdk": "0.9.
|
|
34
|
+
"busabase-sdk": "0.9.5",
|
|
35
35
|
"commander": "^14.0.0"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|