@parall/cli 1.71.0 → 1.72.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.
- package/dist/commands/apps.d.ts.map +1 -1
- package/dist/commands/apps.js +15 -0
- package/dist/commands/db-plane.d.ts +1 -2
- package/dist/commands/db-plane.d.ts.map +1 -1
- package/dist/commands/db-plane.js +1 -2
- package/dist/commands/dbs.d.ts.map +1 -1
- package/dist/commands/dbs.js +1 -15
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/commands/apps.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUzC;;;;;;;;;qBASqB;AACrB,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/commands/apps.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUzC;;;;;;;;;qBASqB;AACrB,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,QA8LnD"}
|
package/dist/commands/apps.js
CHANGED
|
@@ -118,6 +118,21 @@ export function registerAppCommands(program) {
|
|
|
118
118
|
printError(err);
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
|
+
app
|
|
122
|
+
.command('delete')
|
|
123
|
+
.description('Delete a Mini App (org owner/admin only, not its authors). It is gone at once — no one can open it or call its actions — its Database stays, and its versions and files are removed after 30 days')
|
|
124
|
+
.argument('<appId>', 'App ID')
|
|
125
|
+
.action(async (appId) => {
|
|
126
|
+
try {
|
|
127
|
+
const { client, orgId } = resolveCredentials();
|
|
128
|
+
const id = stripPrllScheme(appId);
|
|
129
|
+
await client.deleteMiniApp(orgId, id);
|
|
130
|
+
console.error(`Deleted ${id}`);
|
|
131
|
+
}
|
|
132
|
+
catch (err) {
|
|
133
|
+
printError(err);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
121
136
|
app
|
|
122
137
|
.command('restore')
|
|
123
138
|
.description("Restore an archived Mini App (the app's author or an org owner/admin)")
|
|
@@ -29,8 +29,7 @@ export interface DataPlaneBinding {
|
|
|
29
29
|
* read role; exec runs one or more statements in a single transaction as
|
|
30
30
|
* the write role, or as the owner role with a snapshot first when the SQL
|
|
31
31
|
* is a schema change. Destructive DDL and restores issued by an agent are
|
|
32
|
-
* refused with DB_DDL_APPROVAL_REQUIRED
|
|
33
|
-
* org owner/admin approval. */
|
|
32
|
+
* always refused with DB_DDL_APPROVAL_REQUIRED. */
|
|
34
33
|
export declare function registerDataPlaneCommands(group: Command, binding: DataPlaneBinding): void;
|
|
35
34
|
/** Each --param is a JSON value when it parses as one, else the bare text.
|
|
36
35
|
* The server binds every value as text and lets PostgreSQL parse it against
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db-plane.d.ts","sourceRoot":"","sources":["../../src/commands/db-plane.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAUV,eAAe,EAEhB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAItD,KAAK,GAAG,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEjD;4EAC4E;AAC5E,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;gEACgE;AAChE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB;qBACiB;IACjB,YAAY,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrD,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CACvF;AAED
|
|
1
|
+
{"version":3,"file":"db-plane.d.ts","sourceRoot":"","sources":["../../src/commands/db-plane.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAUV,eAAe,EAEhB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAItD,KAAK,GAAG,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEjD;4EAC4E;AAC5E,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;gEACgE;AAChE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB;qBACiB;IACjB,YAAY,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrD,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CACvF;AAED;;;;;;;;mDAQmD;AACnD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,QA2JlF;AAgED;;;4BAG4B;AAC5B,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,eAAe,EAAE,GAAG,SAAS,CASpF"}
|
|
@@ -10,8 +10,7 @@ import { resolveApiToken } from '../lib/wiki-shared.js';
|
|
|
10
10
|
* read role; exec runs one or more statements in a single transaction as
|
|
11
11
|
* the write role, or as the owner role with a snapshot first when the SQL
|
|
12
12
|
* is a schema change. Destructive DDL and restores issued by an agent are
|
|
13
|
-
* refused with DB_DDL_APPROVAL_REQUIRED
|
|
14
|
-
* org owner/admin approval. */
|
|
13
|
+
* always refused with DB_DDL_APPROVAL_REQUIRED. */
|
|
15
14
|
export function registerDataPlaneCommands(group, binding) {
|
|
16
15
|
const withTarget = (cmd) => {
|
|
17
16
|
cmd.requiredOption(binding.flag, binding.flagHelp);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dbs.d.ts","sourceRoot":"","sources":["../../src/commands/dbs.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAOtD;;;;;;;;8EAQ8E;AAC9E,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"dbs.d.ts","sourceRoot":"","sources":["../../src/commands/dbs.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAOtD;;;;;;;;8EAQ8E;AAC9E,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,QAgGlD;AASD;yBACyB;AACzB,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,EAC1C,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,CAYjB"}
|
package/dist/commands/dbs.js
CHANGED
|
@@ -52,16 +52,12 @@ export function registerDbCommands(program) {
|
|
|
52
52
|
.option('--project <projectId>', DEPRECATED_PROJECT)
|
|
53
53
|
.requiredOption('--name <name>', 'Database name (unique in the organization)')
|
|
54
54
|
.option('--description <text>', 'Description')
|
|
55
|
-
.option('--agent-destructive-requires-approval <bool>', 'true (default) = destructive DDL and restores by an agent need org owner/admin approval')
|
|
56
55
|
.action(async (opts) => {
|
|
57
56
|
try {
|
|
58
57
|
const { client, orgId } = resolveCredentials();
|
|
59
58
|
const data = { name: opts.name };
|
|
60
59
|
if (opts.description)
|
|
61
60
|
data.description = opts.description;
|
|
62
|
-
if (opts.agentDestructiveRequiresApproval !== undefined) {
|
|
63
|
-
data.agent_destructive_requires_approval = parseBoolFlag('--agent-destructive-requires-approval', opts.agentDestructiveRequiresApproval);
|
|
64
|
-
}
|
|
65
61
|
const result = await client.createMiniAppDatabase(orgId, data);
|
|
66
62
|
printJson(result);
|
|
67
63
|
printRefHint(result.id);
|
|
@@ -76,7 +72,6 @@ export function registerDbCommands(program) {
|
|
|
76
72
|
.option('--project <projectId>', DEPRECATED_PROJECT)
|
|
77
73
|
.option('--name <name>', 'New name')
|
|
78
74
|
.option('--description <text>', 'New description (empty string clears)')
|
|
79
|
-
.option('--agent-destructive-requires-approval <bool>', 'true (default) = destructive DDL and restores by an agent need org owner/admin approval')
|
|
80
75
|
.action(async (idOrName, opts) => {
|
|
81
76
|
try {
|
|
82
77
|
const ctx = resolveCredentials();
|
|
@@ -85,11 +80,8 @@ export function registerDbCommands(program) {
|
|
|
85
80
|
data.name = opts.name;
|
|
86
81
|
if (opts.description !== undefined)
|
|
87
82
|
data.description = opts.description;
|
|
88
|
-
if (opts.agentDestructiveRequiresApproval !== undefined) {
|
|
89
|
-
data.agent_destructive_requires_approval = parseBoolFlag('--agent-destructive-requires-approval', opts.agentDestructiveRequiresApproval);
|
|
90
|
-
}
|
|
91
83
|
if (Object.keys(data).length === 0) {
|
|
92
|
-
throw new Error('Nothing to update: pass
|
|
84
|
+
throw new Error('Nothing to update: pass --name or --description');
|
|
93
85
|
}
|
|
94
86
|
const id = await resolveDatabaseId(ctx, idOrName);
|
|
95
87
|
printJson(await ctx.client.updateMiniAppDatabase(ctx.orgId, id, data));
|
|
@@ -132,9 +124,3 @@ export async function resolveDatabaseId(ctx, idOrName) {
|
|
|
132
124
|
}
|
|
133
125
|
return match.id;
|
|
134
126
|
}
|
|
135
|
-
function parseBoolFlag(flag, value) {
|
|
136
|
-
if (value !== 'true' && value !== 'false') {
|
|
137
|
-
throw new Error(`${flag} must be true or false`);
|
|
138
|
-
}
|
|
139
|
-
return value === 'true';
|
|
140
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parall/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.72.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/agent-core": "1.
|
|
46
|
-
"@parall/sdk": "1.
|
|
45
|
+
"@parall/agent-core": "1.72.0",
|
|
46
|
+
"@parall/sdk": "1.72.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/js-yaml": "^4.0.9",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@types/tar-stream": "^3.1.4",
|
|
52
52
|
"esbuild": "^0.25.0",
|
|
53
53
|
"typescript": "^5.7.0",
|
|
54
|
-
"@parall/agent-core": "1.
|
|
54
|
+
"@parall/agent-core": "1.72.0"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "node scripts/generate-miniapp-sdk.mjs --check && node scripts/generate-local-runner.mjs --check && tsc",
|