@pachca/cli 2026.10.2 → 2026.10.4
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/CHANGELOG.md +41 -0
- package/README.md +29 -29
- package/README.template.md +19 -28
- package/dist/base-command.js +69 -37
- package/dist/client.js +58 -33
- package/dist/commands/api.js +4 -4
- package/dist/commands/auth/login.js +12 -9
- package/dist/commands/auth/logout.js +23 -12
- package/dist/commands/bots/create-token.js +0 -3
- package/dist/commands/bots/create.js +1 -5
- package/dist/commands/bots/delete.js +0 -3
- package/dist/commands/bots/get-stream.js +23 -0
- package/dist/commands/bots/list-company.js +4 -5
- package/dist/commands/bots/list-events.js +4 -5
- package/dist/commands/bots/list-scopes.js +0 -3
- package/dist/commands/bots/list-tokens.js +4 -2
- package/dist/commands/bots/list.js +4 -5
- package/dist/commands/bots/recreate-token-self.js +0 -3
- package/dist/commands/bots/recreate-token.js +0 -3
- package/dist/commands/bots/reissue-token.js +0 -3
- package/dist/commands/bots/remove-event.js +0 -3
- package/dist/commands/bots/update-webhook.js +0 -3
- package/dist/commands/bots/update.js +4 -8
- package/dist/commands/chats/archive.js +0 -4
- package/dist/commands/chats/create.js +3 -6
- package/dist/commands/chats/download-export.js +0 -3
- package/dist/commands/chats/list-company.js +4 -5
- package/dist/commands/chats/list.js +5 -8
- package/dist/commands/chats/remove-avatar.js +0 -3
- package/dist/commands/chats/request-export.js +0 -3
- package/dist/commands/chats/unarchive.js +0 -3
- package/dist/commands/chats/update-avatar.js +0 -3
- package/dist/commands/chats/update.js +0 -3
- package/dist/commands/custom-properties/list.js +0 -3
- package/dist/commands/doctor.js +60 -35
- package/dist/commands/drafts/create.js +6 -6
- package/dist/commands/drafts/delete.js +0 -3
- package/dist/commands/drafts/list.js +4 -2
- package/dist/commands/drafts/update.js +7 -4
- package/dist/commands/files/uploads.js +0 -3
- package/dist/commands/group-tags/create.js +0 -3
- package/dist/commands/group-tags/list-users.js +4 -5
- package/dist/commands/group-tags/list.js +4 -5
- package/dist/commands/important-messages/create.js +64 -0
- package/dist/commands/important-messages/delete.js +42 -0
- package/dist/commands/important-messages/list.js +91 -0
- package/dist/commands/members/add.js +1 -6
- package/dist/commands/members/leave.js +0 -3
- package/dist/commands/members/list.js +4 -6
- package/dist/commands/members/remove.js +0 -3
- package/dist/commands/members/update.js +0 -3
- package/dist/commands/messages/create.js +6 -9
- package/dist/commands/messages/delete.js +0 -3
- package/dist/commands/messages/get.js +0 -5
- package/dist/commands/messages/list.js +5 -7
- package/dist/commands/messages/pin.js +0 -3
- package/dist/commands/messages/unfurl.js +0 -3
- package/dist/commands/messages/unpin.js +0 -3
- package/dist/commands/messages/update.js +5 -8
- package/dist/commands/oauth/token-info.js +0 -3
- package/dist/commands/profile/delete-avatar.js +0 -3
- package/dist/commands/profile/delete-status.js +0 -3
- package/dist/commands/profile/get.js +0 -4
- package/dist/commands/profile/update-avatar.js +0 -3
- package/dist/commands/profile/update-status.js +1 -4
- package/dist/commands/reactions/add.js +3 -6
- package/dist/commands/reactions/list.js +4 -2
- package/dist/commands/reactions/remove.js +3 -6
- package/dist/commands/read-member/list-readers.js +4 -5
- package/dist/commands/search/list-chats.js +4 -7
- package/dist/commands/search/list-messages.js +4 -5
- package/dist/commands/search/list-users.js +4 -7
- package/dist/commands/security/list.js +4 -7
- package/dist/commands/tasks/create.js +4 -7
- package/dist/commands/tasks/delete.js +0 -3
- package/dist/commands/tasks/get.js +0 -3
- package/dist/commands/tasks/list.js +4 -7
- package/dist/commands/tasks/update.js +5 -7
- package/dist/commands/threads/add.js +0 -4
- package/dist/commands/threads/list.js +4 -6
- package/dist/commands/upload.js +27 -8
- package/dist/commands/users/create.js +0 -5
- package/dist/commands/users/delete.js +0 -3
- package/dist/commands/users/get-status.js +0 -3
- package/dist/commands/users/get.js +0 -3
- package/dist/commands/users/list.js +4 -7
- package/dist/commands/users/remove-avatar.js +0 -3
- package/dist/commands/users/remove-status.js +0 -3
- package/dist/commands/users/update-avatar.js +0 -3
- package/dist/commands/users/update-status.js +1 -4
- package/dist/commands/users/update.js +5 -5
- package/dist/commands/views/open.js +1 -5
- package/dist/commands/views/submit-response.js +0 -3
- package/dist/data/alternatives.json +5 -9
- package/dist/data/changelog.json +177 -0
- package/dist/data/endpoints.json +1 -1
- package/dist/help.js +0 -1
- package/dist/hooks/command-not-found.js +0 -1
- package/dist/hooks/init.js +13 -5
- package/dist/lib/flags.js +25 -0
- package/dist/oauth.js +11 -5
- package/dist/profiles.js +22 -4
- package/dist/token-refresh.js +61 -14
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
- package/dist/commands/guide.js +0 -90
- package/dist/data/workflows.json +0 -1058
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pachca/cli",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.4",
|
|
4
4
|
"description": "CLI для Pachca API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"node": ">=20"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
|
-
"build": "bun scripts/generate-cli.ts && tsc && oclif manifest && node scripts/patch-manifest.js && bun scripts/emit-commands.ts",
|
|
20
|
+
"build": "bun scripts/generate-cli.ts && tsc && OCLIF_SKIP_NEW_VERSION_CHECK=true oclif manifest && node scripts/patch-manifest.js && bun scripts/emit-commands.ts",
|
|
21
21
|
"dev": "node --import tsx bin/dev.js",
|
|
22
22
|
"typecheck": "tsc --noEmit",
|
|
23
23
|
"test": "tsc && vitest run",
|
package/dist/commands/guide.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { Args } from '@oclif/core';
|
|
2
|
-
import { BaseCommand } from '../base-command.js';
|
|
3
|
-
export default class Guide extends BaseCommand {
|
|
4
|
-
static description = 'Поиск сценариев использования';
|
|
5
|
-
static examples = [
|
|
6
|
-
'<%= config.bin %> guide "отправить файл"',
|
|
7
|
-
'<%= config.bin %> guide "создать бота"',
|
|
8
|
-
'<%= config.bin %> guide',
|
|
9
|
-
];
|
|
10
|
-
static args = {
|
|
11
|
-
query: Args.string({
|
|
12
|
-
description: 'Поисковый запрос',
|
|
13
|
-
required: false,
|
|
14
|
-
}),
|
|
15
|
-
};
|
|
16
|
-
static flags = {
|
|
17
|
-
...BaseCommand.baseFlags,
|
|
18
|
-
};
|
|
19
|
-
async run() {
|
|
20
|
-
const { args, flags } = await this.parse(Guide);
|
|
21
|
-
this.parsedFlags = flags;
|
|
22
|
-
let workflows = [];
|
|
23
|
-
try {
|
|
24
|
-
const data = await import('../data/workflows.json', { with: { type: 'json' } });
|
|
25
|
-
workflows = (data.default || data);
|
|
26
|
-
}
|
|
27
|
-
catch {
|
|
28
|
-
workflows = [];
|
|
29
|
-
}
|
|
30
|
-
const format = this.getOutputFormat();
|
|
31
|
-
if (!args.query) {
|
|
32
|
-
// List all workflows grouped by skill
|
|
33
|
-
const grouped = new Map();
|
|
34
|
-
for (const w of workflows) {
|
|
35
|
-
if (!grouped.has(w.skill))
|
|
36
|
-
grouped.set(w.skill, []);
|
|
37
|
-
grouped.get(w.skill).push(w);
|
|
38
|
-
}
|
|
39
|
-
if (format === 'json') {
|
|
40
|
-
this.output(workflows);
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
if (workflows.length === 0) {
|
|
44
|
-
process.stderr.write('Нет доступных сценариев.\n');
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
for (const [skill, items] of grouped) {
|
|
48
|
-
process.stdout.write(` ${skill} (${items.length} сценариев)\n`);
|
|
49
|
-
for (const w of items) {
|
|
50
|
-
process.stdout.write(` · ${w.title}\n`);
|
|
51
|
-
}
|
|
52
|
-
process.stdout.write('\n');
|
|
53
|
-
}
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
// Search workflows
|
|
57
|
-
const query = args.query.toLowerCase();
|
|
58
|
-
const matches = workflows.filter((w) => {
|
|
59
|
-
if (w.title.toLowerCase().includes(query))
|
|
60
|
-
return true;
|
|
61
|
-
return w.steps.some((s) => s.description.toLowerCase().includes(query) ||
|
|
62
|
-
(s.command && s.command.toLowerCase().includes(query)));
|
|
63
|
-
});
|
|
64
|
-
if (format === 'json') {
|
|
65
|
-
this.output(matches);
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
if (matches.length === 0) {
|
|
69
|
-
process.stderr.write(`Ничего не найдено по запросу "${args.query}".\n`);
|
|
70
|
-
process.stderr.write(`Все сценарии: pachca guide\n`);
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
for (const w of matches) {
|
|
74
|
-
process.stdout.write(` Сценарий: ${w.title} (${w.skill})\n\n`);
|
|
75
|
-
for (let i = 0; i < w.steps.length; i++) {
|
|
76
|
-
const step = w.steps[i];
|
|
77
|
-
if (step.command) {
|
|
78
|
-
process.stdout.write(` ${i + 1}. $ ${step.command}\n`);
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
process.stdout.write(` ${i + 1}. ${step.description}\n`);
|
|
82
|
-
}
|
|
83
|
-
if (step.notes) {
|
|
84
|
-
process.stdout.write(` ${step.notes}\n`);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
process.stdout.write('\n');
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|