@mp-lb/forum-cli 0.1.9 → 0.1.11
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 +39 -9
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -18693,7 +18693,8 @@ var listSearchReconciliationStoresInputSchema = external_exports.object({
|
|
|
18693
18693
|
touchedAfter: external_exports.string().datetime()
|
|
18694
18694
|
});
|
|
18695
18695
|
var listOwnStoresInputSchema = external_exports.object({
|
|
18696
|
-
workspaceId: external_exports.string().trim().min(1).optional()
|
|
18696
|
+
workspaceId: external_exports.string().trim().min(1).optional(),
|
|
18697
|
+
workspaceSlug: external_exports.string().trim().min(1).optional()
|
|
18697
18698
|
});
|
|
18698
18699
|
var readStoreMetadataInputSchema = external_exports.object({
|
|
18699
18700
|
workspaceId: storeWorkspaceIdSchema,
|
|
@@ -18831,6 +18832,9 @@ var pruneOwnRecentStoresInputSchema = external_exports.object({});
|
|
|
18831
18832
|
var updateOwnPinnedStoreInputSchema = external_exports.object({
|
|
18832
18833
|
storeId: storePreferenceIdSchema
|
|
18833
18834
|
});
|
|
18835
|
+
var reorderOwnPinnedStoresInputSchema = external_exports.object({
|
|
18836
|
+
storeIds: external_exports.array(storePreferenceIdSchema)
|
|
18837
|
+
});
|
|
18834
18838
|
var upsertUserPreferencesInputSchema = external_exports.object({
|
|
18835
18839
|
userId: storeOwnerIdSchema,
|
|
18836
18840
|
patch: userPreferencesUpdateSchema.partial().default({})
|
|
@@ -31403,7 +31407,7 @@ var createStoreClient = ({
|
|
|
31403
31407
|
);
|
|
31404
31408
|
return {
|
|
31405
31409
|
createRawFileUrl: (fileId) => `${apiBaseUrl.replace(/\/+$/, "")}/raw-file/${encodeURIComponent(fileId)}`,
|
|
31406
|
-
listStores: () => call("stores.list", () => trpc.stores.list.query(
|
|
31410
|
+
listStores: (input = {}) => call("stores.list", () => trpc.stores.list.query(input)),
|
|
31407
31411
|
createStore: (input) => call("stores.create", () => trpc.stores.create.mutate(input)),
|
|
31408
31412
|
deleteStore: (input) => call("stores.delete", () => trpc.stores.delete.mutate(input)),
|
|
31409
31413
|
readStoreByRef: (input) => call("stores.readByRef", () => trpc.stores.readByRef.query(input)),
|
|
@@ -32368,10 +32372,10 @@ var usage = `Forum CLI
|
|
|
32368
32372
|
|
|
32369
32373
|
Usage:
|
|
32370
32374
|
Remote workspace commands:
|
|
32371
|
-
fm store create <storeId|workspace/storeId> [--token <jwt>]
|
|
32372
|
-
fm store list [--token <jwt>]
|
|
32373
|
-
fm store ls [--token <jwt>]
|
|
32374
|
-
fm store info <storeId> [--token <jwt>] [--json]
|
|
32375
|
+
fm store create <storeId|workspace/storeId> [--workspace <slug>] [--token <jwt>]
|
|
32376
|
+
fm store list [--workspace <slug>] [--token <jwt>]
|
|
32377
|
+
fm store ls [--workspace <slug>] [--token <jwt>]
|
|
32378
|
+
fm store info <storeId> [--workspace <slug>] [--token <jwt>] [--json]
|
|
32375
32379
|
fm store duplicate <sourceStoreId> <newStoreId> [--token <jwt>]
|
|
32376
32380
|
fm store delete <storeId> [--yes|-y] [--token <jwt>]
|
|
32377
32381
|
fm file ls [directoryPath] [--store <storeId>] [--token <jwt>]
|
|
@@ -32458,6 +32462,7 @@ Usage:
|
|
|
32458
32462
|
Store creation:
|
|
32459
32463
|
fm store create <storeId> creates in defaults.store's workspace from .forum/sync.yaml when present, otherwise in the authenticated workspace.
|
|
32460
32464
|
fm store create <workspace/storeId> creates in that explicitly selected workspace.
|
|
32465
|
+
For store create, list, and info, --workspace <slug> selects a workspace without changing the saved login.
|
|
32461
32466
|
|
|
32462
32467
|
Auth:
|
|
32463
32468
|
Provide a Clerk session token via --token or DOCTRINE_TOKEN.
|
|
@@ -32518,6 +32523,7 @@ var parseArgs = (argv) => {
|
|
|
32518
32523
|
const isSyncCommand = parseArgvCommandName(argv) === "sync";
|
|
32519
32524
|
const isCatCommand = parseArgvCommandName(argv) === "cat";
|
|
32520
32525
|
let token = null;
|
|
32526
|
+
let workspace = null;
|
|
32521
32527
|
const storeFilters = [];
|
|
32522
32528
|
let searchLimit = null;
|
|
32523
32529
|
let searchType = null;
|
|
@@ -32564,6 +32570,14 @@ var parseArgs = (argv) => {
|
|
|
32564
32570
|
index += 1;
|
|
32565
32571
|
continue;
|
|
32566
32572
|
}
|
|
32573
|
+
if (current === "--workspace") {
|
|
32574
|
+
if (!next || next.startsWith("-")) {
|
|
32575
|
+
throw new Error("--workspace requires a workspace slug.");
|
|
32576
|
+
}
|
|
32577
|
+
workspace = next;
|
|
32578
|
+
index += 1;
|
|
32579
|
+
continue;
|
|
32580
|
+
}
|
|
32567
32581
|
if (current === "--store" || current === "-s" && !isCatCommand) {
|
|
32568
32582
|
storeFilters.push(
|
|
32569
32583
|
...(next ?? "").split(",").map((storeId) => storeId.trim()).filter(Boolean)
|
|
@@ -32766,6 +32780,7 @@ var parseArgs = (argv) => {
|
|
|
32766
32780
|
args: positional,
|
|
32767
32781
|
conflictPolicy,
|
|
32768
32782
|
token,
|
|
32783
|
+
workspace,
|
|
32769
32784
|
storeFilters,
|
|
32770
32785
|
searchLimit,
|
|
32771
32786
|
searchType,
|
|
@@ -37313,6 +37328,11 @@ var main = async (argv = process.argv.slice(2)) => {
|
|
|
37313
37328
|
renderOutput(usage);
|
|
37314
37329
|
return;
|
|
37315
37330
|
}
|
|
37331
|
+
if (parsed.workspace && (command !== "store" || !["create", "list", "ls", "info", "metadata"].includes(rest[0] ?? ""))) {
|
|
37332
|
+
throw new Error(
|
|
37333
|
+
"--workspace is supported by store create, list, and info. Use a qualified workspace/store ref for file commands."
|
|
37334
|
+
);
|
|
37335
|
+
}
|
|
37316
37336
|
assertDryRunSupported(parsed, command, rest);
|
|
37317
37337
|
if (command === "schema") {
|
|
37318
37338
|
if (rest.length > 1) {
|
|
@@ -37490,7 +37510,7 @@ var main = async (argv = process.argv.slice(2)) => {
|
|
|
37490
37510
|
const storePath = await withActivity(
|
|
37491
37511
|
"Creating store",
|
|
37492
37512
|
() => createStore(
|
|
37493
|
-
storePathInput,
|
|
37513
|
+
parsed.workspace && !storePathInput.includes("/") ? `${parsed.workspace}/${storePathInput}` : storePathInput,
|
|
37494
37514
|
(input) => client.createStore(input),
|
|
37495
37515
|
(input) => client.writeTextFileByRef(input)
|
|
37496
37516
|
)
|
|
@@ -37501,7 +37521,11 @@ var main = async (argv = process.argv.slice(2)) => {
|
|
|
37501
37521
|
if (subcommand === "list" || subcommand === "ls") {
|
|
37502
37522
|
await withActivity(
|
|
37503
37523
|
"Loading stores",
|
|
37504
|
-
() => listStores(
|
|
37524
|
+
() => listStores(
|
|
37525
|
+
() => client.listStores(
|
|
37526
|
+
parsed.workspace ? { workspaceSlug: parsed.workspace } : {}
|
|
37527
|
+
)
|
|
37528
|
+
)
|
|
37505
37529
|
);
|
|
37506
37530
|
return;
|
|
37507
37531
|
}
|
|
@@ -37512,7 +37536,13 @@ var main = async (argv = process.argv.slice(2)) => {
|
|
|
37512
37536
|
}
|
|
37513
37537
|
await withActivity(
|
|
37514
37538
|
"Loading store",
|
|
37515
|
-
() => storeInfo(
|
|
37539
|
+
() => storeInfo(
|
|
37540
|
+
storeInput,
|
|
37541
|
+
() => client.listStores(
|
|
37542
|
+
parsed.workspace ? { workspaceSlug: parsed.workspace } : {}
|
|
37543
|
+
),
|
|
37544
|
+
parsed.json
|
|
37545
|
+
)
|
|
37516
37546
|
);
|
|
37517
37547
|
return;
|
|
37518
37548
|
}
|