busa-cli 0.9.14 → 0.9.16
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-P4Z4SWET.js → chunk-RGZM6OXX.js} +69 -2
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -912,7 +912,6 @@ async function loopbackOauthLogin(baseUrl, useBrowser) {
|
|
|
912
912
|
authorizeUrl.searchParams.set("code_challenge_method", "S256");
|
|
913
913
|
authorizeUrl.searchParams.set("redirect_uri", redirect);
|
|
914
914
|
authorizeUrl.searchParams.set("state", state);
|
|
915
|
-
authorizeUrl.searchParams.set("prompt", "login");
|
|
916
915
|
const href = authorizeUrl.toString();
|
|
917
916
|
say("");
|
|
918
917
|
say("Open this URL in your browser to sign in:");
|
|
@@ -1380,8 +1379,12 @@ var fieldTypeSchema = z5.enum([
|
|
|
1380
1379
|
"ai_tags",
|
|
1381
1380
|
"code",
|
|
1382
1381
|
"json",
|
|
1383
|
-
"yaml"
|
|
1382
|
+
"yaml",
|
|
1383
|
+
"formula",
|
|
1384
|
+
"lookup",
|
|
1385
|
+
"whiteboard"
|
|
1384
1386
|
]);
|
|
1387
|
+
var lookupRollupSchema = z5.enum(["values", "count", "sum", "average", "min", "max", "concatenate"]).default("values");
|
|
1385
1388
|
var fieldOptionsSchema = z5.object({
|
|
1386
1389
|
ai: z5.object({
|
|
1387
1390
|
model: z5.string().optional(),
|
|
@@ -1411,7 +1414,26 @@ var fieldOptionsSchema = z5.object({
|
|
|
1411
1414
|
height: z5.number().int().positive().max(1200).optional(),
|
|
1412
1415
|
providers: z5.array(z5.string()).optional()
|
|
1413
1416
|
}).optional(),
|
|
1417
|
+
// `formula` fields are server-computed (like the other computed types) from
|
|
1418
|
+
// `expression` at record write time — see packages/busabase-core's
|
|
1419
|
+
// domains/base/formula/ engine. `{slug}` references a sibling field, including
|
|
1420
|
+
// another `formula` field (chained formulas) — a dependency graph orders
|
|
1421
|
+
// computation and rejects cycles at field create/edit time.
|
|
1422
|
+
formula: z5.object({
|
|
1423
|
+
expression: z5.string().min(1)
|
|
1424
|
+
}).optional(),
|
|
1414
1425
|
inverseFieldId: z5.string().optional(),
|
|
1426
|
+
// `lookup` fields pull a field's values across a `relation` field on the same
|
|
1427
|
+
// Base, optionally rolling them up into one scalar. Unlike every other computed
|
|
1428
|
+
// type they are NOT stored on the commit: a lookup's value depends on OTHER
|
|
1429
|
+
// records, which can change without this record ever being written, so it is
|
|
1430
|
+
// resolved at read time (see busabase-core's domains/base/logic/lookup-values.ts).
|
|
1431
|
+
lookup: z5.object({
|
|
1432
|
+
relationFieldSlug: z5.string().min(1).describe("Slug of a `relation` field on THIS Base \u2014 the hop to follow."),
|
|
1433
|
+
targetFieldSlug: z5.string().min(1).describe("Slug of the field on the related Base whose values are pulled over."),
|
|
1434
|
+
rollup: lookupRollupSchema.optional(),
|
|
1435
|
+
limit: z5.enum(["all", "first"]).optional().describe("`first` looks at only the first linked record; default `all`.")
|
|
1436
|
+
}).optional(),
|
|
1415
1437
|
multiple: z5.boolean().optional(),
|
|
1416
1438
|
// Display formatting for `number` columns (Notion-style: one number type,
|
|
1417
1439
|
// a format option). `currency` renders via Intl.NumberFormat.
|
|
@@ -1704,6 +1726,15 @@ var folderNodeType = {
|
|
|
1704
1726
|
operations: []
|
|
1705
1727
|
};
|
|
1706
1728
|
|
|
1729
|
+
// ../../packages/busabase-contract/src/domains/form/definition.ts
|
|
1730
|
+
var formNodeType = {
|
|
1731
|
+
type: "form",
|
|
1732
|
+
label: "Form",
|
|
1733
|
+
icon: "clipboard-list",
|
|
1734
|
+
capabilities: { hasDetail: true, creatable: true },
|
|
1735
|
+
operations: []
|
|
1736
|
+
};
|
|
1737
|
+
|
|
1707
1738
|
// ../../packages/busabase-contract/src/domains/html/definition.ts
|
|
1708
1739
|
var htmlNodeType = {
|
|
1709
1740
|
type: "html",
|
|
@@ -1769,6 +1800,7 @@ var BUILTIN_NODE_TYPES = [
|
|
|
1769
1800
|
airappNodeType,
|
|
1770
1801
|
fileNodeType,
|
|
1771
1802
|
docNodeType,
|
|
1803
|
+
formNodeType,
|
|
1772
1804
|
whiteboardNodeType,
|
|
1773
1805
|
workflowNodeType,
|
|
1774
1806
|
htmlNodeType
|
|
@@ -1830,6 +1862,15 @@ var nodePrincipalSchema = z6.object({
|
|
|
1830
1862
|
createdAt: z6.string(),
|
|
1831
1863
|
updatedAt: z6.string()
|
|
1832
1864
|
});
|
|
1865
|
+
var nodeShareSchema = z6.object({
|
|
1866
|
+
nodeId: z6.string(),
|
|
1867
|
+
scope: z6.enum(["none", "public"]),
|
|
1868
|
+
capability: z6.enum(["read", "submit"]),
|
|
1869
|
+
// Derived from `passwordHash != null` — the hash itself is never serialized.
|
|
1870
|
+
hasPassword: z6.boolean(),
|
|
1871
|
+
expiresAt: z6.string().nullable(),
|
|
1872
|
+
updatedAt: z6.string()
|
|
1873
|
+
});
|
|
1833
1874
|
var listNodesInputSchema = z6.object({
|
|
1834
1875
|
parentId: z6.string().nullable().optional().describe("Node to start from. Omit or null to start from the space root."),
|
|
1835
1876
|
depth: z6.coerce.number().int().min(1).max(5).optional().describe(
|
|
@@ -2341,10 +2382,21 @@ var PACKAGE_COMPUTED_FIELD_TYPES = [
|
|
|
2341
2382
|
"created_by",
|
|
2342
2383
|
"updated_by",
|
|
2343
2384
|
"auto_number",
|
|
2385
|
+
"formula",
|
|
2386
|
+
// `lookup` is derived from OTHER records and resolved at read time, so it
|
|
2387
|
+
// shows up in `headCommit.fields` like any other value — but publishing it
|
|
2388
|
+
// would ship derived data as if it were authored, and install would strip it
|
|
2389
|
+
// server-side anyway.
|
|
2390
|
+
"lookup",
|
|
2344
2391
|
...PACKAGE_AI_FIELD_TYPES
|
|
2345
2392
|
];
|
|
2346
2393
|
var PACKAGE_DEFERRED_FIELD_TYPES = [
|
|
2347
2394
|
"relation",
|
|
2395
|
+
// `lookup` hops through a `relation` field on the same Base, and the server
|
|
2396
|
+
// rejects a lookup whose relation sibling doesn't exist yet. Since relations
|
|
2397
|
+
// are themselves deferred to pass 2, a lookup created in pass 1 would fail
|
|
2398
|
+
// validation outright — it has to land in the same pass as the hop it needs.
|
|
2399
|
+
"lookup",
|
|
2348
2400
|
...PACKAGE_AI_FIELD_TYPES
|
|
2349
2401
|
];
|
|
2350
2402
|
var PACKAGE_MAX_FILE_BYTES = 25 * 1024 * 1024;
|
|
@@ -2412,8 +2464,23 @@ var PackageFieldOptionsSchema = z8.object({
|
|
|
2412
2464
|
height: z8.number().int().positive().max(1200).optional(),
|
|
2413
2465
|
providers: z8.array(z8.string()).optional()
|
|
2414
2466
|
}).optional(),
|
|
2467
|
+
/** Mirrors the API's `formula.expression` verbatim — `{slug}` references carry
|
|
2468
|
+
* over unchanged since the package format keys everything by slug already. */
|
|
2469
|
+
formula: z8.object({
|
|
2470
|
+
expression: z8.string().min(1)
|
|
2471
|
+
}).optional(),
|
|
2415
2472
|
/** Package-only — replaces `inverseFieldId`. */
|
|
2416
2473
|
inverseFieldSlug: z8.string().optional(),
|
|
2474
|
+
/** Carried verbatim: the API's own `lookup` config is already keyed entirely
|
|
2475
|
+
* by slug (`relationFieldSlug` / `targetFieldSlug`), so it survives a
|
|
2476
|
+
* re-id'ing install with no package-only alias. The companion `number`
|
|
2477
|
+
* snapshot rides along in the `number` key above. */
|
|
2478
|
+
lookup: z8.object({
|
|
2479
|
+
relationFieldSlug: z8.string().min(1),
|
|
2480
|
+
targetFieldSlug: z8.string().min(1),
|
|
2481
|
+
rollup: lookupRollupSchema.optional(),
|
|
2482
|
+
limit: z8.enum(["all", "first"]).optional()
|
|
2483
|
+
}).optional(),
|
|
2417
2484
|
multiple: z8.boolean().optional(),
|
|
2418
2485
|
number: z8.object({
|
|
2419
2486
|
format: z8.enum(["plain", "currency"]).optional(),
|
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.16",
|
|
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",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@zip.js/zip.js": "^2.8.20",
|
|
35
35
|
"busabase-package": "workspace:*",
|
|
36
|
-
"busabase-sdk": "0.9.
|
|
36
|
+
"busabase-sdk": "0.9.16",
|
|
37
37
|
"commander": "^14.0.0",
|
|
38
38
|
"tar-stream": "^3.1.7",
|
|
39
39
|
"yaml": "^2.9.0",
|