@pachca/cli 2026.10.2 → 2026.10.3
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 +16 -0
- package/README.md +24 -24
- package/README.template.md +14 -23
- package/dist/base-command.js +1 -1
- package/dist/client.js +56 -32
- package/dist/commands/api.js +1 -1
- package/dist/commands/auth/logout.js +23 -12
- package/dist/commands/bots/create-token.js +0 -3
- package/dist/commands/bots/create.js +0 -4
- package/dist/commands/bots/delete.js +0 -3
- package/dist/commands/bots/get-stream.js +23 -0
- package/dist/commands/bots/list-company.js +0 -3
- package/dist/commands/bots/list-events.js +0 -3
- package/dist/commands/bots/list-scopes.js +0 -3
- package/dist/commands/bots/list.js +0 -3
- 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 +0 -5
- 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 +0 -3
- package/dist/commands/chats/list.js +1 -6
- 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/drafts/create.js +1 -4
- package/dist/commands/drafts/delete.js +0 -3
- package/dist/commands/drafts/update.js +1 -1
- 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 +0 -3
- package/dist/commands/group-tags/list.js +0 -3
- 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 +89 -0
- package/dist/commands/members/add.js +0 -5
- package/dist/commands/members/leave.js +0 -3
- package/dist/commands/members/list.js +0 -4
- package/dist/commands/members/remove.js +0 -3
- package/dist/commands/members/update.js +0 -3
- package/dist/commands/messages/create.js +3 -8
- package/dist/commands/messages/delete.js +0 -3
- package/dist/commands/messages/get.js +0 -5
- package/dist/commands/messages/list.js +1 -5
- 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 +2 -7
- 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/remove.js +3 -6
- package/dist/commands/read-member/list-readers.js +0 -3
- package/dist/commands/search/list-chats.js +0 -5
- package/dist/commands/search/list-messages.js +0 -3
- package/dist/commands/search/list-users.js +0 -5
- package/dist/commands/security/list.js +0 -5
- package/dist/commands/tasks/create.js +1 -6
- package/dist/commands/tasks/delete.js +0 -3
- package/dist/commands/tasks/get.js +0 -3
- package/dist/commands/tasks/list.js +0 -5
- package/dist/commands/tasks/update.js +2 -6
- package/dist/commands/threads/add.js +0 -4
- package/dist/commands/threads/list.js +0 -4
- 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 +0 -5
- 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 +4 -4
- package/dist/commands/views/open.js +0 -5
- package/dist/commands/views/submit-response.js +0 -3
- package/dist/data/alternatives.json +5 -9
- package/dist/data/changelog.json +66 -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 +5 -1
- package/dist/oauth.js +9 -4
- package/dist/token-refresh.js +61 -14
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
- package/dist/commands/guide.js +0 -90
- package/dist/data/workflows.json +0 -1058
package/package.json
CHANGED
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
|
-
}
|