@urugus/slack-cli 0.2.9 → 0.2.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/.claude/settings.local.json +60 -14
- package/README.md +71 -28
- package/dist/commands/scheduled.d.ts +3 -0
- package/dist/commands/scheduled.d.ts.map +1 -0
- package/dist/commands/scheduled.js +55 -0
- package/dist/commands/scheduled.js.map +1 -0
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +16 -2
- package/dist/commands/send.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/types/commands.d.ts +8 -0
- package/dist/types/commands.d.ts.map +1 -1
- package/dist/utils/channel-resolver.d.ts.map +1 -1
- package/dist/utils/channel-resolver.js +1 -3
- package/dist/utils/channel-resolver.js.map +1 -1
- package/dist/utils/config.d.ts +10 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +94 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/constants.d.ts +5 -0
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +5 -0
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/formatters/output-formatter.d.ts +7 -0
- package/dist/utils/formatters/output-formatter.d.ts.map +1 -0
- package/dist/utils/formatters/output-formatter.js +7 -0
- package/dist/utils/formatters/output-formatter.js.map +1 -0
- package/dist/utils/profile-config-refactored.d.ts +20 -0
- package/dist/utils/profile-config-refactored.d.ts.map +1 -0
- package/dist/utils/profile-config-refactored.js +174 -0
- package/dist/utils/profile-config-refactored.js.map +1 -0
- package/dist/utils/schedule-utils.d.ts +3 -0
- package/dist/utils/schedule-utils.d.ts.map +1 -0
- package/dist/utils/schedule-utils.js +34 -0
- package/dist/utils/schedule-utils.js.map +1 -0
- package/dist/utils/slack-api-client.d.ts +10 -1
- package/dist/utils/slack-api-client.d.ts.map +1 -1
- package/dist/utils/slack-api-client.js +6 -0
- package/dist/utils/slack-api-client.js.map +1 -1
- package/dist/utils/slack-operations/message-operations.d.ts +4 -2
- package/dist/utils/slack-operations/message-operations.d.ts.map +1 -1
- package/dist/utils/slack-operations/message-operations.js +28 -0
- package/dist/utils/slack-operations/message-operations.js.map +1 -1
- package/dist/utils/validators.d.ts +4 -0
- package/dist/utils/validators.d.ts.map +1 -1
- package/dist/utils/validators.js +31 -0
- package/dist/utils/validators.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/scheduled.ts +71 -0
- package/src/commands/send.ts +21 -3
- package/src/index.ts +2 -0
- package/src/types/commands.ts +9 -0
- package/src/utils/channel-resolver.ts +1 -5
- package/src/utils/constants.ts +7 -0
- package/src/utils/schedule-utils.ts +41 -0
- package/src/utils/slack-api-client.ts +22 -1
- package/src/utils/slack-operations/message-operations.ts +55 -2
- package/src/utils/validators.ts +38 -0
- package/tests/commands/scheduled.test.ts +131 -0
- package/tests/commands/send.test.ts +235 -44
- package/tests/utils/channel-resolver.test.ts +25 -21
- package/tests/utils/schedule-utils.test.ts +63 -0
- package/tests/utils/slack-api-client.test.ts +81 -46
- package/tests/utils/slack-operations/message-operations.test.ts +38 -1
|
@@ -1,29 +1,75 @@
|
|
|
1
1
|
{
|
|
2
2
|
"permissions": {
|
|
3
3
|
"allow": [
|
|
4
|
+
"Bash(mkdir:*)",
|
|
5
|
+
"Bash(ls:*)",
|
|
6
|
+
"Bash(npm install)",
|
|
7
|
+
"Bash(npm run test:*)",
|
|
4
8
|
"Bash(find:*)",
|
|
5
|
-
"Bash(npm install:*)",
|
|
6
|
-
"Bash(gh issue list:*)",
|
|
7
|
-
"Bash(gh pr list:*)",
|
|
8
|
-
"Bash(gh pr checkout:*)",
|
|
9
9
|
"Bash(npm test)",
|
|
10
|
-
"Bash(npm run lint)",
|
|
11
10
|
"Bash(npm run build:*)",
|
|
11
|
+
"Bash(npm run lint)",
|
|
12
|
+
"Bash(npm run format:check:*)",
|
|
13
|
+
"Bash(npm run format:*)",
|
|
14
|
+
"Bash(npm test:*)",
|
|
15
|
+
"Bash(node:*)",
|
|
12
16
|
"Bash(git add:*)",
|
|
13
17
|
"Bash(git commit:*)",
|
|
18
|
+
"Bash(grep:*)",
|
|
19
|
+
"Bash(true)",
|
|
20
|
+
"Bash(npx vitest run:*)",
|
|
21
|
+
"Bash(NODE_ENV=test npx vitest run --reporter=tap 2 >& 1)",
|
|
22
|
+
"Bash(npm ls:*)",
|
|
23
|
+
"Bash(/opt/homebrew/bin/slack-cli config:*)",
|
|
24
|
+
"Bash(npm bin:*)",
|
|
25
|
+
"Bash(npm root:*)",
|
|
26
|
+
"Bash(strace:*)",
|
|
27
|
+
"Bash(npx vitest list:*)",
|
|
28
|
+
"Bash(NODE_OPTIONS=\"--trace-warnings\" npx vitest run --no-threads 2 >& 1)",
|
|
29
|
+
"Bash(NODE_ENV=test npx vitest run --reporter=tap tests/commands/config.test.ts 2 >& 1)",
|
|
30
|
+
"Bash(echo:*)",
|
|
31
|
+
"Bash(git reset:*)",
|
|
32
|
+
"Bash(npm uninstall:*)",
|
|
33
|
+
"Bash(pkill:*)",
|
|
34
|
+
"Bash(/opt/homebrew/bin/slack:*)",
|
|
35
|
+
"Bash(brew list:*)",
|
|
36
|
+
"Bash(brew info:*)",
|
|
37
|
+
"Bash(npm link:*)",
|
|
38
|
+
"Bash(slack-cli:*)",
|
|
14
39
|
"Bash(git push:*)",
|
|
15
|
-
"Bash(
|
|
16
|
-
"Bash(gh pr view:*)",
|
|
40
|
+
"Bash(gh run list:*)",
|
|
17
41
|
"Bash(gh run view:*)",
|
|
42
|
+
"Bash(gh run watch:*)",
|
|
43
|
+
"Bash(cat:*)",
|
|
44
|
+
"Bash(mv:*)",
|
|
45
|
+
"Bash(rm:*)",
|
|
46
|
+
"WebFetch(domain:api.slack.com)",
|
|
47
|
+
"Bash(npm run typecheck:*)",
|
|
48
|
+
"Bash(npm run:*)",
|
|
49
|
+
"Bash(npm whoami:*)",
|
|
50
|
+
"Bash(npm unlink:*)",
|
|
51
|
+
"Bash(npm update:*)",
|
|
52
|
+
"Bash(npm install:*)",
|
|
53
|
+
"Bash(npm view:*)",
|
|
54
|
+
"Bash(npm publish:*)",
|
|
55
|
+
"Bash(rg:*)",
|
|
56
|
+
"Bash(npm version:*)",
|
|
57
|
+
"Bash(npx tsx:*)",
|
|
58
|
+
"Bash(gh workflow view:*)",
|
|
59
|
+
"Bash(git tag:*)",
|
|
60
|
+
"Bash(./bin/dev:*)",
|
|
18
61
|
"Bash(git checkout:*)",
|
|
62
|
+
"Bash(gh pr create:*)",
|
|
63
|
+
"Bash(gh pr checks:*)",
|
|
64
|
+
"Bash(gh pr view:*)",
|
|
65
|
+
"Bash(gh pr merge:*)",
|
|
19
66
|
"Bash(git pull:*)",
|
|
20
|
-
"Bash(
|
|
21
|
-
"
|
|
22
|
-
"Bash(
|
|
23
|
-
"Bash(
|
|
24
|
-
"Bash(
|
|
25
|
-
"Bash(npm publish:*)"
|
|
67
|
+
"Bash(gh api graphql:*)",
|
|
68
|
+
"mcp__slack__slack_list_channels",
|
|
69
|
+
"Bash(curl -X GET 'https://slack.com/api/conversations.members?channel=C02EHQ7TG68&limit=100' -H 'Authorization: Bearer xoxe.xoxp-1-Mi0yLTIxNjQ2MDk0NzItNzY4NTQ0NzAyNTM2MC04NzE0NzA4NDQ1NTcyLTkwODMxMzU5MDAwODItZTNjMDUyZjEwMzZhMDJhYzFlNTU5YjczNmE3MWFkODg0NDAzZDdiYmI5YTBjZDc4MzQ3MjJkZGE4ODFkZDYxMw')",
|
|
70
|
+
"Bash(curl -X GET 'https://slack.com/api/conversations.members?channel=C02EHQ7TG68&limit=100' -H 'Authorization: Bearer xoxb-2164609472-8861111830563-KKbispuxfw36K2YuIbnjgbT2')",
|
|
71
|
+
"Bash(curl -X GET 'https://slack.com/api/users.info?user=U07L5D50RAL' -H 'Authorization: Bearer xoxb-2164609472-8861111830563-KKbispuxfw36K2YuIbnjgbT2')"
|
|
26
72
|
],
|
|
27
73
|
"deny": []
|
|
28
74
|
}
|
|
29
|
-
}
|
|
75
|
+
}
|
package/README.md
CHANGED
|
@@ -64,6 +64,12 @@ slack-cli send -c channel-name -m "Reply message" --thread 1719207629.000100
|
|
|
64
64
|
|
|
65
65
|
# Reply to a thread (short option)
|
|
66
66
|
slack-cli send -c channel-name -m "Reply message" -t 1719207629.000100
|
|
67
|
+
|
|
68
|
+
# Schedule by absolute time (Unix seconds or ISO 8601)
|
|
69
|
+
slack-cli send -c channel-name -m "Scheduled message" --at "2026-03-01T09:00:00Z"
|
|
70
|
+
|
|
71
|
+
# Schedule after N minutes
|
|
72
|
+
slack-cli send -c channel-name -m "Scheduled message" --after 30
|
|
67
73
|
```
|
|
68
74
|
|
|
69
75
|
### List Channels
|
|
@@ -137,6 +143,23 @@ slack-cli unread --format json
|
|
|
137
143
|
slack-cli unread --format simple
|
|
138
144
|
```
|
|
139
145
|
|
|
146
|
+
### List Scheduled Messages
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# List scheduled messages
|
|
150
|
+
slack-cli scheduled
|
|
151
|
+
|
|
152
|
+
# Filter by channel
|
|
153
|
+
slack-cli scheduled -c general
|
|
154
|
+
|
|
155
|
+
# Limit results
|
|
156
|
+
slack-cli scheduled --limit 20
|
|
157
|
+
|
|
158
|
+
# Output in different formats
|
|
159
|
+
slack-cli scheduled --format json
|
|
160
|
+
slack-cli scheduled --format simple
|
|
161
|
+
```
|
|
162
|
+
|
|
140
163
|
### Other Commands
|
|
141
164
|
|
|
142
165
|
```bash
|
|
@@ -156,42 +179,56 @@ slack-cli config set --token NEW_TOKEN
|
|
|
156
179
|
## Options
|
|
157
180
|
|
|
158
181
|
### Global Options
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
|
182
|
+
|
|
183
|
+
| Option | Short | Description |
|
|
184
|
+
| --------- | ----- | ------------------------------ |
|
|
185
|
+
| --profile | -p | Use specific workspace profile |
|
|
162
186
|
|
|
163
187
|
### send command
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
|
167
|
-
| --
|
|
168
|
-
| --
|
|
169
|
-
| --
|
|
188
|
+
|
|
189
|
+
| Option | Short | Description |
|
|
190
|
+
| --------- | ----- | ---------------------------------------- |
|
|
191
|
+
| --channel | -c | Target channel name or ID (required) |
|
|
192
|
+
| --message | -m | Message to send |
|
|
193
|
+
| --file | -f | File containing message content |
|
|
194
|
+
| --thread | -t | Thread timestamp to reply to |
|
|
195
|
+
| --at | | Schedule time (Unix seconds or ISO 8601) |
|
|
196
|
+
| --after | | Schedule message after N minutes |
|
|
170
197
|
|
|
171
198
|
### channels command
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
|
175
|
-
| --
|
|
176
|
-
| --
|
|
177
|
-
| --
|
|
199
|
+
|
|
200
|
+
| Option | Short | Description |
|
|
201
|
+
| ------------------ | ----- | -------------------------------------------------------------- |
|
|
202
|
+
| --type | | Channel type: public, private, im, mpim, all (default: public) |
|
|
203
|
+
| --include-archived | | Include archived channels |
|
|
204
|
+
| --format | | Output format: table, simple, json (default: table) |
|
|
205
|
+
| --limit | | Maximum number of channels to list (default: 100) |
|
|
178
206
|
|
|
179
207
|
### history command
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
|
183
|
-
| --
|
|
184
|
-
| --
|
|
208
|
+
|
|
209
|
+
| Option | Short | Description |
|
|
210
|
+
| --------- | ----- | ------------------------------------------------------ |
|
|
211
|
+
| --channel | -c | Target channel name or ID (required) |
|
|
212
|
+
| --number | -n | Number of messages to retrieve (default: 10) |
|
|
213
|
+
| --since | | Get messages since specific date (YYYY-MM-DD HH:MM:SS) |
|
|
185
214
|
|
|
186
215
|
### unread command
|
|
187
|
-
| Option | Short | Description |
|
|
188
|
-
|--------|-------|-------------|
|
|
189
|
-
| --channel | -c | Get unread for specific channel |
|
|
190
|
-
| --format | | Output format: table, simple, json (default: table) |
|
|
191
|
-
| --count-only | | Show only unread counts |
|
|
192
|
-
| --limit | | Maximum number of channels to display (default: 50) |
|
|
193
|
-
| --mark-read | | Mark messages as read after fetching |
|
|
194
216
|
|
|
217
|
+
| Option | Short | Description |
|
|
218
|
+
| ------------ | ----- | --------------------------------------------------- |
|
|
219
|
+
| --channel | -c | Get unread for specific channel |
|
|
220
|
+
| --format | | Output format: table, simple, json (default: table) |
|
|
221
|
+
| --count-only | | Show only unread counts |
|
|
222
|
+
| --limit | | Maximum number of channels to display (default: 50) |
|
|
223
|
+
| --mark-read | | Mark messages as read after fetching |
|
|
224
|
+
|
|
225
|
+
### scheduled command
|
|
226
|
+
|
|
227
|
+
| Option | Short | Description |
|
|
228
|
+
| --------- | ----- | ---------------------------------------------------------- |
|
|
229
|
+
| --channel | -c | Filter by channel name or ID |
|
|
230
|
+
| --limit | | Maximum number of scheduled messages to list (default: 50) |
|
|
231
|
+
| --format | | Output format: table, simple, json (default: table) |
|
|
195
232
|
|
|
196
233
|
## Required Permissions
|
|
197
234
|
|
|
@@ -208,19 +245,25 @@ Your Slack API token needs the following scopes:
|
|
|
208
245
|
## Advanced Features
|
|
209
246
|
|
|
210
247
|
### Rate Limiting
|
|
248
|
+
|
|
211
249
|
The CLI includes built-in rate limiting to handle Slack API limits:
|
|
250
|
+
|
|
212
251
|
- Concurrent requests: 3
|
|
213
252
|
- Automatic retry with exponential backoff (max 3 retries)
|
|
214
253
|
- Graceful error handling for rate limit errors
|
|
215
254
|
|
|
216
255
|
### Output Formats
|
|
256
|
+
|
|
217
257
|
Most commands support multiple output formats:
|
|
258
|
+
|
|
218
259
|
- `table` (default) - Human-readable table format
|
|
219
260
|
- `simple` - Simplified text output
|
|
220
261
|
- `json` - Machine-readable JSON format
|
|
221
262
|
|
|
222
263
|
### Markdown Support
|
|
264
|
+
|
|
223
265
|
Messages sent via the `send` command automatically support Slack's mrkdwn formatting:
|
|
266
|
+
|
|
224
267
|
- `*bold*` for bold text
|
|
225
268
|
- `_italic_` for italic text
|
|
226
269
|
- `~strikethrough~` for strikethrough
|
|
@@ -232,4 +275,4 @@ Messages sent via the `send` command automatically support Slack's mrkdwn format
|
|
|
232
275
|
|
|
233
276
|
## License
|
|
234
277
|
|
|
235
|
-
MIT
|
|
278
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled.d.ts","sourceRoot":"","sources":["../../src/commands/scheduled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkCpC,wBAAgB,qBAAqB,IAAI,OAAO,CAoC/C"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setupScheduledCommand = setupScheduledCommand;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const command_wrapper_1 = require("../utils/command-wrapper");
|
|
6
|
+
const client_factory_1 = require("../utils/client-factory");
|
|
7
|
+
const option_parsers_1 = require("../utils/option-parsers");
|
|
8
|
+
const validators_1 = require("../utils/validators");
|
|
9
|
+
function formatPostAt(postAt) {
|
|
10
|
+
return new Date(postAt * 1000).toISOString();
|
|
11
|
+
}
|
|
12
|
+
function renderTable(messages) {
|
|
13
|
+
const rows = messages.map((message) => ({
|
|
14
|
+
id: message.id,
|
|
15
|
+
channel: message.channel_id,
|
|
16
|
+
post_at: formatPostAt(message.post_at),
|
|
17
|
+
text: message.text || '',
|
|
18
|
+
}));
|
|
19
|
+
console.table(rows);
|
|
20
|
+
}
|
|
21
|
+
function renderSimple(messages) {
|
|
22
|
+
for (const message of messages) {
|
|
23
|
+
console.log(`${formatPostAt(message.post_at)} ${message.channel_id} ${message.id} ${message.text || ''}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function setupScheduledCommand() {
|
|
27
|
+
const scheduledCommand = new commander_1.Command('scheduled')
|
|
28
|
+
.description('List scheduled messages')
|
|
29
|
+
.option('-c, --channel <channel>', 'Filter by channel name or ID')
|
|
30
|
+
.option('--limit <number>', 'Maximum number of scheduled messages to list', '50')
|
|
31
|
+
.option('--format <format>', 'Output format: table, simple, json', 'table')
|
|
32
|
+
.option('--profile <profile>', 'Use specific workspace profile')
|
|
33
|
+
.hook('preAction', (0, validators_1.createValidationHook)([validators_1.optionValidators.format]))
|
|
34
|
+
.action((0, command_wrapper_1.wrapCommand)(async (options) => {
|
|
35
|
+
const client = await (0, client_factory_1.createSlackClient)(options.profile);
|
|
36
|
+
const limit = (0, option_parsers_1.parseLimit)(options.limit, 50);
|
|
37
|
+
const messages = await client.listScheduledMessages(options.channel, limit);
|
|
38
|
+
if (messages.length === 0) {
|
|
39
|
+
console.log('No scheduled messages found');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const format = (0, option_parsers_1.parseFormat)(options.format);
|
|
43
|
+
if (format === 'json') {
|
|
44
|
+
console.log(JSON.stringify(messages, null, 2));
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (format === 'simple') {
|
|
48
|
+
renderSimple(messages);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
renderTable(messages);
|
|
52
|
+
}));
|
|
53
|
+
return scheduledCommand;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=scheduled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled.js","sourceRoot":"","sources":["../../src/commands/scheduled.ts"],"names":[],"mappings":";;AAkCA,sDAoCC;AAtED,yCAAoC;AACpC,8DAAuD;AACvD,4DAA4D;AAE5D,4DAAkE;AAClE,oDAA6E;AAE7E,SAAS,YAAY,CAAC,MAAc;IAClC,OAAO,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;AAC/C,CAAC;AAED,SAAS,WAAW,CAClB,QAAmF;IAEnF,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACtC,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,OAAO,EAAE,OAAO,CAAC,UAAU;QAC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I,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;YAC3C,OAAO;QACT,CAAC;QAED,MAAM,MAAM,GAAG,IAAA,4BAAW,EAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAE3C,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;YACtB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC/C,OAAO;QACT,CAAC;QAED,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;YACxB,YAAY,CAAC,QAAQ,CAAC,CAAC;YACvB,OAAO;QACT,CAAC;QAED,WAAW,CAAC,QAAQ,CAAC,CAAC;IACxB,CAAC,CAAC,CACH,CAAC;IAEJ,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../src/commands/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../src/commands/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAapC,wBAAgB,gBAAgB,IAAI,OAAO,CAuD1C"}
|
package/dist/commands/send.js
CHANGED
|
@@ -46,16 +46,23 @@ const errors_1 = require("../utils/errors");
|
|
|
46
46
|
const error_utils_1 = require("../utils/error-utils");
|
|
47
47
|
const option_parsers_1 = require("../utils/option-parsers");
|
|
48
48
|
const validators_1 = require("../utils/validators");
|
|
49
|
+
const schedule_utils_1 = require("../utils/schedule-utils");
|
|
49
50
|
const fs = __importStar(require("fs/promises"));
|
|
50
51
|
function setupSendCommand() {
|
|
51
52
|
const sendCommand = new commander_1.Command('send')
|
|
52
|
-
.description('Send a message to a Slack channel')
|
|
53
|
+
.description('Send or schedule a message to a Slack channel')
|
|
53
54
|
.requiredOption('-c, --channel <channel>', 'Target channel name or ID')
|
|
54
55
|
.option('-m, --message <message>', 'Message to send')
|
|
55
56
|
.option('-f, --file <file>', 'File containing message content')
|
|
56
57
|
.option('-t, --thread <thread>', 'Thread timestamp to reply to')
|
|
58
|
+
.option('--at <time>', 'Schedule time (Unix timestamp in seconds or ISO 8601)')
|
|
59
|
+
.option('--after <minutes>', 'Schedule message after N minutes')
|
|
57
60
|
.option('--profile <profile>', 'Use specific workspace profile')
|
|
58
|
-
.hook('preAction', (0, validators_1.createValidationHook)([
|
|
61
|
+
.hook('preAction', (0, validators_1.createValidationHook)([
|
|
62
|
+
validators_1.optionValidators.messageOrFile,
|
|
63
|
+
validators_1.optionValidators.threadTimestamp,
|
|
64
|
+
validators_1.optionValidators.scheduleTiming,
|
|
65
|
+
]))
|
|
59
66
|
.action((0, command_wrapper_1.wrapCommand)(async (options) => {
|
|
60
67
|
// Get message content
|
|
61
68
|
let messageContent;
|
|
@@ -70,9 +77,16 @@ function setupSendCommand() {
|
|
|
70
77
|
else {
|
|
71
78
|
messageContent = options.message; // This is safe because of preAction validation
|
|
72
79
|
}
|
|
80
|
+
const postAt = (0, schedule_utils_1.resolvePostAt)(options.at, options.after);
|
|
73
81
|
// Send message
|
|
74
82
|
const profile = (0, option_parsers_1.parseProfile)(options.profile);
|
|
75
83
|
const client = await (0, client_factory_1.createSlackClient)(profile);
|
|
84
|
+
if (postAt !== null) {
|
|
85
|
+
await client.scheduleMessage(options.channel, messageContent, postAt, options.thread);
|
|
86
|
+
const postAtIso = new Date(postAt * 1000).toISOString();
|
|
87
|
+
console.log(chalk_1.default.green(`✓ ${constants_1.SUCCESS_MESSAGES.MESSAGE_SCHEDULED(options.channel, postAtIso)}`));
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
76
90
|
await client.sendMessage(options.channel, messageContent, options.thread);
|
|
77
91
|
console.log(chalk_1.default.green(`✓ ${constants_1.SUCCESS_MESSAGES.MESSAGE_SENT(options.channel)}`));
|
|
78
92
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send.js","sourceRoot":"","sources":["../../src/commands/send.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"send.js","sourceRoot":"","sources":["../../src/commands/send.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,4CAuDC;AApED,yCAAoC;AACpC,kDAA0B;AAC1B,8DAAuD;AACvD,kDAAsE;AACtE,4DAA4D;AAC5D,4CAA4C;AAE5C,sDAA2D;AAC3D,4DAAuD;AACvD,oDAA6E;AAC7E,4DAAwD;AACxD,gDAAkC;AAElC,SAAgB,gBAAgB;IAC9B,MAAM,WAAW,GAAG,IAAI,mBAAO,CAAC,MAAM,CAAC;SACpC,WAAW,CAAC,+CAA+C,CAAC;SAC5D,cAAc,CAAC,yBAAyB,EAAE,2BAA2B,CAAC;SACtE,MAAM,CAAC,yBAAyB,EAAE,iBAAiB,CAAC;SACpD,MAAM,CAAC,mBAAmB,EAAE,iCAAiC,CAAC;SAC9D,MAAM,CAAC,uBAAuB,EAAE,8BAA8B,CAAC;SAC/D,MAAM,CAAC,aAAa,EAAE,uDAAuD,CAAC;SAC9E,MAAM,CAAC,mBAAmB,EAAE,kCAAkC,CAAC;SAC/D,MAAM,CAAC,qBAAqB,EAAE,gCAAgC,CAAC;SAC/D,IAAI,CACH,WAAW,EACX,IAAA,iCAAoB,EAAC;QACnB,6BAAgB,CAAC,aAAa;QAC9B,6BAAgB,CAAC,eAAe;QAChC,6BAAgB,CAAC,cAAc;KAChC,CAAC,CACH;SACA,MAAM,CACL,IAAA,6BAAW,EAAC,KAAK,EAAE,OAAoB,EAAE,EAAE;QACzC,sBAAsB;QACtB,IAAI,cAAsB,CAAC;QAC3B,IAAI,OAAO,CAAC,IAAI,E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AgB,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;IAClF,CAAC,CAAC,CACH,CAAC;IAEJ,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ const send_1 = require("./commands/send");
|
|
|
7
7
|
const channels_1 = require("./commands/channels");
|
|
8
8
|
const history_1 = require("./commands/history");
|
|
9
9
|
const unread_1 = require("./commands/unread");
|
|
10
|
+
const scheduled_1 = require("./commands/scheduled");
|
|
10
11
|
const fs_1 = require("fs");
|
|
11
12
|
const path_1 = require("path");
|
|
12
13
|
const program = new commander_1.Command();
|
|
@@ -19,5 +20,6 @@ program.addCommand((0, send_1.setupSendCommand)());
|
|
|
19
20
|
program.addCommand((0, channels_1.setupChannelsCommand)());
|
|
20
21
|
program.addCommand((0, history_1.setupHistoryCommand)());
|
|
21
22
|
program.addCommand((0, unread_1.setupUnreadCommand)());
|
|
23
|
+
program.addCommand((0, scheduled_1.setupScheduledCommand)());
|
|
22
24
|
program.parse();
|
|
23
25
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,8CAAuD;AACvD,0CAAmD;AACnD,kDAA2D;AAC3D,gDAAyD;AACzD,8CAAuD;AACvD,2BAAkC;AAClC,+BAA4B;AAE5B,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,iCAAiC;AACjC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;AAC7F,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;AAEpC,OAAO,CAAC,IAAI,CAAC,WAAW,CAA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,CAAC,UAAU,CAAC,IAAA,2BAAkB,GAAE,CAAC,CAAC;AACzC,OAAO,CAAC,UAAU,CAAC,IAAA,iCAAqB,GAAE,CAAC,CAAC;AAE5C,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
package/dist/types/commands.d.ts
CHANGED
|
@@ -16,6 +16,14 @@ export interface SendOptions {
|
|
|
16
16
|
message?: string;
|
|
17
17
|
file?: string;
|
|
18
18
|
thread?: string;
|
|
19
|
+
at?: string;
|
|
20
|
+
after?: string;
|
|
21
|
+
profile?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ScheduledOptions {
|
|
24
|
+
channel?: string;
|
|
25
|
+
limit?: string;
|
|
26
|
+
format?: 'table' | 'simple' | 'json';
|
|
19
27
|
profile?: string;
|
|
20
28
|
}
|
|
21
29
|
export interface ChannelsOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/types/commands.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,KAAK,CAAC;IACnD,eAAe,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AO,CAAC,OAAO,EAAE,CAAC,CAAC;AAE3D,qBAAa,eAAe;IAC1B;;OAEG;IACH,WAAW,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO;
|
|
1
|
+
{"version":3,"file":"channel-resolver.d.ts","sourceRoot":"","sources":["../../src/utils/channel-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;AAE3D,qBAAa,eAAe;IAC1B;;OAEG;IACH,WAAW,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO;IAI7C;;OAEG;IACH,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,GAAG,SAAS;IAc1E;;OAEG;IACH,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,KAAK,SAAI,GAAG,MAAM,EAAE;IAOjF;;OAEG;IACH,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK;IAcpE;;OAEG;IACG,gBAAgB,CACpB,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,mBAAmB,GAC/B,OAAO,CAAC,MAAM,CAAC;CAgBnB;AAGD,eAAO,MAAM,eAAe,iBAAwB,CAAC"}
|
|
@@ -6,9 +6,7 @@ class ChannelResolver {
|
|
|
6
6
|
* Check if the given string is a channel ID
|
|
7
7
|
*/
|
|
8
8
|
isChannelId(channelNameOrId) {
|
|
9
|
-
return (channelNameOrId
|
|
10
|
-
channelNameOrId.startsWith('D') ||
|
|
11
|
-
channelNameOrId.startsWith('G'));
|
|
9
|
+
return /^[CDG][A-Z0-9]{8,}$/.test(channelNameOrId);
|
|
12
10
|
}
|
|
13
11
|
/**
|
|
14
12
|
* Find a channel by name from the given list
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel-resolver.js","sourceRoot":"","sources":["../../src/utils/channel-resolver.ts"],"names":[],"mappings":";;;AAIA,MAAa,eAAe;IAC1B;;OAEG;IACH,WAAW,CAAC,eAAuB;QACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"channel-resolver.js","sourceRoot":"","sources":["../../src/utils/channel-resolver.ts"],"names":[],"mappings":";;;AAIA,MAAa,eAAe;IAC1B;;OAEG;IACH,WAAW,CAAC,eAAuB;QACjC,OAAO,qBAAqB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACrD,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,WAAmB,EAAE,QAAmB;QAClD,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;YACzB,oBAAoB;YACpB,IAAI,CAAC,CAAC,IAAI,KAAK,WAAW;gBAAE,OAAO,IAAI,CAAC;YACxC,yBAAyB;YACzB,IAAI,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;gBAAE,OAAO,IAAI,CAAC;YACzD,yBAAyB;YACzB,IAAI,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,WAAW,CAAC,WAAW,EAAE;gBAAE,OAAO,IAAI,CAAC;YACrE,6BAA6B;YAC7B,IAAI,CAAC,CAAC,eAAe,KAAK,WAAW;gBAAE,OAAO,IAAI,CAAC;YACnD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,kBAAkB,CAAC,WAAmB,EAAE,QAAmB,EAAE,KAAK,GAAG,CAAC;QACpE,OAAO,QAAQ;aACZ,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC;aACxE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC;aACf,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAc,CAAC,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,mBAAmB,CAAC,WAAmB,EAAE,QAAmB;QAC1D,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAEvE,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/B,OAAO,IAAI,KAAK,CACd,YAAY,WAAW,2CAA2C,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC/F,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,KAAK,CACd,YAAY,WAAW,0DAA0D,CAClF,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,gBAAgB,CACpB,eAAuB,EACvB,WAAgC;QAEhC,mCAAmC;QACnC,IAAI,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,CAAC;YACtC,OAAO,eAAe,CAAC;QACzB,CAAC;QAED,iDAAiD;QACjD,MAAM,QAAQ,GAAG,MAAM,WAAW,EAAE,CAAC;QACrC,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;QAE5D,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,CAAC,mBAAmB,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;QAC5D,CAAC;QAED,OAAO,OAAO,CAAC,EAAE,CAAC;IACpB,CAAC;CACF;AA1ED,0CA0EC;AAED,8BAA8B;AACjB,QAAA,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Config, ConfigOptions } from '../types/config';
|
|
2
|
+
export declare class ConfigManager {
|
|
3
|
+
private configPath;
|
|
4
|
+
constructor(options?: ConfigOptions);
|
|
5
|
+
setToken(token: string): Promise<void>;
|
|
6
|
+
getConfig(): Promise<Config | null>;
|
|
7
|
+
clearConfig(): Promise<void>;
|
|
8
|
+
maskToken(token: string): string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE7D,qBAAa,aAAa;IACxB,OAAO,CAAC,UAAU,CAAS;gBAEf,OAAO,GAAE,aAAkB;IAKjC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAatC,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAqBnC,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAUlC,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAUjC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ConfigManager = void 0;
|
|
37
|
+
const fs = __importStar(require("fs/promises"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const os = __importStar(require("os"));
|
|
40
|
+
class ConfigManager {
|
|
41
|
+
constructor(options = {}) {
|
|
42
|
+
const configDir = options.configDir || path.join(os.homedir(), '.slack-cli');
|
|
43
|
+
this.configPath = path.join(configDir, 'config.json');
|
|
44
|
+
}
|
|
45
|
+
async setToken(token) {
|
|
46
|
+
const config = {
|
|
47
|
+
token,
|
|
48
|
+
updatedAt: new Date().toISOString(),
|
|
49
|
+
};
|
|
50
|
+
const configDir = path.dirname(this.configPath);
|
|
51
|
+
await fs.mkdir(configDir, { recursive: true });
|
|
52
|
+
await fs.writeFile(this.configPath, JSON.stringify(config, null, 2));
|
|
53
|
+
await fs.chmod(this.configPath, 0o600);
|
|
54
|
+
}
|
|
55
|
+
async getConfig() {
|
|
56
|
+
try {
|
|
57
|
+
const data = await fs.readFile(this.configPath, 'utf-8');
|
|
58
|
+
const config = JSON.parse(data);
|
|
59
|
+
if (!config.token || !config.updatedAt) {
|
|
60
|
+
throw new Error('Invalid config file format');
|
|
61
|
+
}
|
|
62
|
+
return config;
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
if (error && typeof error === 'object' && 'code' in error && error.code === 'ENOENT') {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
if (error instanceof SyntaxError) {
|
|
69
|
+
throw new Error('Invalid config file format');
|
|
70
|
+
}
|
|
71
|
+
throw error;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async clearConfig() {
|
|
75
|
+
try {
|
|
76
|
+
await fs.unlink(this.configPath);
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
if (error && typeof error === 'object' && 'code' in error && error.code !== 'ENOENT') {
|
|
80
|
+
throw error;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
maskToken(token) {
|
|
85
|
+
if (token.length <= 9) {
|
|
86
|
+
return '****';
|
|
87
|
+
}
|
|
88
|
+
const prefix = token.substring(0, 4);
|
|
89
|
+
const suffix = token.substring(token.length - 4);
|
|
90
|
+
return `${prefix}-****-****-${suffix}`;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.ConfigManager = ConfigManager;
|
|
94
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAkC;AAClC,2CAA6B;AAC7B,uCAAyB;AAGzB,MAAa,aAAa;IAGxB,YAAY,UAAyB,EAAE;QACrC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,YAAY,CAAC,CAAC;QAC7E,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IACxD,CAAC;IAED,KA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;IACH,CAAC;IAED,KAAK,CAAC,WAAW;QACf,IAAI,CAAC;YACH,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACnC,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBACrF,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC;IAED,SAAS,CAAC,KAAa;QACrB,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;YACtB,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACrC,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAEjD,OAAO,GAAG,MAAM,cAAc,MAAM,EAAE,CAAC;IACzC,CAAC;CACF;AA9DD,sCA8DC"}
|
|
@@ -9,6 +9,10 @@ export declare const ERROR_MESSAGES: {
|
|
|
9
9
|
readonly NO_MESSAGE_OR_FILE: "You must specify either --message or --file";
|
|
10
10
|
readonly BOTH_MESSAGE_AND_FILE: "Cannot use both --message and --file";
|
|
11
11
|
readonly INVALID_THREAD_TIMESTAMP: "Invalid thread timestamp format";
|
|
12
|
+
readonly INVALID_SCHEDULE_AT: "Invalid schedule time format. Use Unix timestamp (seconds) or ISO 8601 date-time";
|
|
13
|
+
readonly INVALID_SCHEDULE_AFTER: "--after must be a positive integer (minutes)";
|
|
14
|
+
readonly BOTH_SCHEDULE_OPTIONS: "Cannot use both --at and --after";
|
|
15
|
+
readonly SCHEDULE_TIME_IN_PAST: "Schedule time must be in the future";
|
|
12
16
|
readonly API_ERROR: (error: string) => string;
|
|
13
17
|
readonly CHANNEL_NOT_FOUND: (channel: string) => string;
|
|
14
18
|
readonly FILE_READ_ERROR: (file: string, error: string) => string;
|
|
@@ -21,6 +25,7 @@ export declare const SUCCESS_MESSAGES: {
|
|
|
21
25
|
readonly PROFILE_SWITCHED: (profileName: string) => string;
|
|
22
26
|
readonly PROFILE_CLEARED: (profileName: string) => string;
|
|
23
27
|
readonly MESSAGE_SENT: (channel: string) => string;
|
|
28
|
+
readonly MESSAGE_SCHEDULED: (channel: string, postAtIso: string) => string;
|
|
24
29
|
};
|
|
25
30
|
export declare const FILE_PERMISSIONS: {
|
|
26
31
|
CONFIG_FILE: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAE9C,eAAO,MAAM,cAAc;sCAEA,MAAM;8CAEE,MAAM
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAE9C,eAAO,MAAM,cAAc;sCAEA,MAAM;8CAEE,MAAM;;;;;;;;;;gCAepB,MAAM;0CACI,MAAM;qCAGX,MAAM,SAAS,MAAM;oCACtB,MAAM;;6CAIG,MAAM;CAC9B,CAAC;AAEX,eAAO,MAAM,gBAAgB;wCACA,MAAM;6CACD,MAAM;4CACP,MAAM;qCACb,MAAM;0CACD,MAAM,aAAa,MAAM;CAE9C,CAAC;AAGX,eAAO,MAAM,gBAAgB;;CAE5B,CAAC;AAGF,eAAO,MAAM,UAAU;;;;CAItB,CAAC;AAGF,eAAO,MAAM,UAAU;;;;;;;;;;CAUtB,CAAC;AAGF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAGF,eAAO,MAAM,WAAW,wBAAwB,CAAC"}
|
package/dist/utils/constants.js
CHANGED
|
@@ -14,6 +14,10 @@ exports.ERROR_MESSAGES = {
|
|
|
14
14
|
NO_MESSAGE_OR_FILE: 'You must specify either --message or --file',
|
|
15
15
|
BOTH_MESSAGE_AND_FILE: 'Cannot use both --message and --file',
|
|
16
16
|
INVALID_THREAD_TIMESTAMP: 'Invalid thread timestamp format',
|
|
17
|
+
INVALID_SCHEDULE_AT: 'Invalid schedule time format. Use Unix timestamp (seconds) or ISO 8601 date-time',
|
|
18
|
+
INVALID_SCHEDULE_AFTER: '--after must be a positive integer (minutes)',
|
|
19
|
+
BOTH_SCHEDULE_OPTIONS: 'Cannot use both --at and --after',
|
|
20
|
+
SCHEDULE_TIME_IN_PAST: 'Schedule time must be in the future',
|
|
17
21
|
// API errors
|
|
18
22
|
API_ERROR: (error) => `API Error: ${error}`,
|
|
19
23
|
CHANNEL_NOT_FOUND: (channel) => `Channel not found: ${channel}`,
|
|
@@ -29,6 +33,7 @@ exports.SUCCESS_MESSAGES = {
|
|
|
29
33
|
PROFILE_SWITCHED: (profileName) => `Switched to profile "${profileName}"`,
|
|
30
34
|
PROFILE_CLEARED: (profileName) => `Profile "${profileName}" cleared successfully`,
|
|
31
35
|
MESSAGE_SENT: (channel) => `Message sent successfully to #${channel}`,
|
|
36
|
+
MESSAGE_SCHEDULED: (channel, postAtIso) => `Message scheduled to #${channel} at ${postAtIso}`,
|
|
32
37
|
};
|
|
33
38
|
// File and system constants
|
|
34
39
|
exports.FILE_PERMISSIONS = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG,CAAC,CAAC;AACtB,QAAA,gBAAgB,GAAG,CAAC,CAAC;AACrB,QAAA,oBAAoB,GAAG,SAAS,CAAC;AAEj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