@parall/cli 1.86.0 → 1.87.0
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.
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
/** Accept a bare share ID or its canonical resource URI, never a Wiki ID. */
|
|
3
|
+
export declare function pageShareId(value: string): string;
|
|
4
|
+
export declare function registerWikiPageShareCommands(wiki: Command): void;
|
|
5
|
+
//# sourceMappingURL=wiki-page-shares.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wiki-page-shares.d.ts","sourceRoot":"","sources":["../../src/commands/wiki-page-shares.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,6EAA6E;AAC7E,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQjD;AACD,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,OAAO,QAyB1D"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { resolveCredentials } from '../lib/client.js';
|
|
2
|
+
import { printError, printProgress } from '../lib/output.js';
|
|
3
|
+
/** Accept a bare share ID or its canonical resource URI, never a Wiki ID. */
|
|
4
|
+
export function pageShareId(value) {
|
|
5
|
+
const id = value.startsWith('prll://') ? value.slice('prll://'.length) : value;
|
|
6
|
+
if (!/^wsh_[a-zA-Z0-9_-]+$/.test(id) || id.length > 64) {
|
|
7
|
+
throw new Error('Expected a wsh_ share ID or prll://wsh_…; use: parall wiki shared cat <share>');
|
|
8
|
+
}
|
|
9
|
+
return id;
|
|
10
|
+
}
|
|
11
|
+
export function registerWikiPageShareCommands(wiki) {
|
|
12
|
+
wiki
|
|
13
|
+
.command('shared')
|
|
14
|
+
.description('Read a page explicitly shared with your account')
|
|
15
|
+
.command('cat')
|
|
16
|
+
.description('Read the latest published version of a page shared with your account')
|
|
17
|
+
.argument('<share>', 'wsh_ share ID or prll://wsh_… provided by the page owner')
|
|
18
|
+
.action(async (value) => {
|
|
19
|
+
try {
|
|
20
|
+
const id = pageShareId(value);
|
|
21
|
+
const { client } = resolveCredentials();
|
|
22
|
+
const page = await client.getSharedWikiPage(id);
|
|
23
|
+
process.stdout.write(page.content);
|
|
24
|
+
if (!page.content.endsWith('\n'))
|
|
25
|
+
process.stdout.write('\n');
|
|
26
|
+
const name = page.shared_by?.display_name?.trim() || page.shared_by?.id;
|
|
27
|
+
const label = name && page.shared_by?.type === 'agent' ? `${name} [agent]` : name;
|
|
28
|
+
const source = [label, page.organization_name].filter(Boolean).join(' · ');
|
|
29
|
+
printProgress(`Read-only · latest published version · ${page.path}${source ? ` · Shared by ${source}` : ''}`);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
printError(error);
|
|
33
|
+
process.exitCode = 1;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiki.d.ts","sourceRoot":"","sources":["../../src/commands/wiki.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wiki.d.ts","sourceRoot":"","sources":["../../src/commands/wiki.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuBpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,QAktBpD"}
|
package/dist/commands/wiki.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { registerWikiPageShareCommands } from './wiki-page-shares.js';
|
|
1
2
|
import { registerWikiChangesetCommands } from './wiki-changesets.js';
|
|
2
3
|
import { promises as fs } from 'node:fs';
|
|
3
4
|
import { resolveCredentials } from '../lib/client.js';
|
|
@@ -8,6 +9,7 @@ import { registerWikiCommentCommands } from './wiki-comments.js';
|
|
|
8
9
|
import { registerWikiEditCommand } from './wiki-edit.js';
|
|
9
10
|
export function registerWikiCommands(program) {
|
|
10
11
|
const wiki = program.command('wiki').description('Parall Wiki — read, edit, and propose changes');
|
|
12
|
+
registerWikiPageShareCommands(wiki);
|
|
11
13
|
// ---- CRUD ----
|
|
12
14
|
wiki
|
|
13
15
|
.command('create')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parall/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.87.0",
|
|
4
4
|
"description": "CLI client for Parall — universal agent & human access to Parall API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"node-diff3": "3.2.1",
|
|
43
43
|
"tar-stream": "^3.2.1",
|
|
44
44
|
"zod": "^4.3.6",
|
|
45
|
-
"@parall/sdk": "1.
|
|
46
|
-
"@parall/agent-core": "1.
|
|
45
|
+
"@parall/sdk": "1.87.0",
|
|
46
|
+
"@parall/agent-core": "1.87.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@dnd-kit/core": "6.3.1",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"tw-animate-css": "1.4.0",
|
|
72
72
|
"typescript": "^5.7.0",
|
|
73
73
|
"vite": "6.4.1",
|
|
74
|
-
"@parall/agent-core": "1.
|
|
74
|
+
"@parall/agent-core": "1.87.0"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"build": "node scripts/generate-miniapp-sdk.mjs --check && node scripts/generate-local-runner.mjs --check && node scripts/generate-app-templates.mjs --check && tsc",
|