@hesed/gchat 0.2.0 → 0.2.2
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/README.md
CHANGED
|
@@ -26,7 +26,7 @@ $ npm install -g @hesed/gchat
|
|
|
26
26
|
$ gchat COMMAND
|
|
27
27
|
running command...
|
|
28
28
|
$ gchat (--version)
|
|
29
|
-
@hesed/gchat/0.2.
|
|
29
|
+
@hesed/gchat/0.2.2 linux-x64 node-v22.22.0
|
|
30
30
|
$ gchat --help [COMMAND]
|
|
31
31
|
USAGE
|
|
32
32
|
$ gchat COMMAND
|
|
@@ -61,7 +61,7 @@ EXAMPLES
|
|
|
61
61
|
$ gchat gchat config add-token AAQAKA6hsFw your-space-token
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
_See code: [src/commands/gchat/config/add-token.ts](https://github.com/hesedcasa/gchat/blob/v0.2.
|
|
64
|
+
_See code: [src/commands/gchat/config/add-token.ts](https://github.com/hesedcasa/gchat/blob/v0.2.2/src/commands/gchat/config/add-token.ts)_
|
|
65
65
|
|
|
66
66
|
## `gchat gchat config set-key KEY`
|
|
67
67
|
|
|
@@ -81,7 +81,7 @@ EXAMPLES
|
|
|
81
81
|
$ gchat gchat config set-key your-api-key
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
_See code: [src/commands/gchat/config/set-key.ts](https://github.com/hesedcasa/gchat/blob/v0.2.
|
|
84
|
+
_See code: [src/commands/gchat/config/set-key.ts](https://github.com/hesedcasa/gchat/blob/v0.2.2/src/commands/gchat/config/set-key.ts)_
|
|
85
85
|
|
|
86
86
|
## `gchat gchat create-message SPACEID MESSAGE`
|
|
87
87
|
|
|
@@ -106,9 +106,11 @@ EXAMPLES
|
|
|
106
106
|
$ gchat gchat create-message AAQAKA6hsFw "Hello team"
|
|
107
107
|
|
|
108
108
|
$ gchat gchat create-message AAQAKA6hsFw "*Bold message*" --formatted
|
|
109
|
+
|
|
110
|
+
$ gchat gchat create-message AAQAKA6hsFw "<https://example.com|Click here>" -f
|
|
109
111
|
```
|
|
110
112
|
|
|
111
|
-
_See code: [src/commands/gchat/create-message.ts](https://github.com/hesedcasa/gchat/blob/v0.2.
|
|
113
|
+
_See code: [src/commands/gchat/create-message.ts](https://github.com/hesedcasa/gchat/blob/v0.2.2/src/commands/gchat/create-message.ts)_
|
|
112
114
|
|
|
113
115
|
## `gchat gchat reply-message THREADNAME MESSAGE`
|
|
114
116
|
|
|
@@ -135,5 +137,5 @@ EXAMPLES
|
|
|
135
137
|
$ gchat gchat reply-message spaces/AAQAKA6hsFw/threads/D1NI3W2B6vA "*Bold reply*" --formatted
|
|
136
138
|
```
|
|
137
139
|
|
|
138
|
-
_See code: [src/commands/gchat/reply-message.ts](https://github.com/hesedcasa/gchat/blob/v0.2.
|
|
140
|
+
_See code: [src/commands/gchat/reply-message.ts](https://github.com/hesedcasa/gchat/blob/v0.2.2/src/commands/gchat/reply-message.ts)_
|
|
139
141
|
<!-- commandsstop -->
|
|
@@ -13,6 +13,7 @@ export default class GChatCreateMessage extends Command {
|
|
|
13
13
|
static examples = [
|
|
14
14
|
'<%= config.bin %> <%= command.id %> AAQAKA6hsFw "Hello team"',
|
|
15
15
|
'<%= config.bin %> <%= command.id %> AAQAKA6hsFw "*Bold message*" --formatted',
|
|
16
|
+
'<%= config.bin %> <%= command.id %> AAQAKA6hsFw "<https://example.com|Click here>" -f',
|
|
16
17
|
];
|
|
17
18
|
static flags = {
|
|
18
19
|
formatted: Flags.boolean({ char: 'f', description: 'Enable formatted text (bold, italic, links)', required: false }),
|
|
@@ -23,7 +24,8 @@ export default class GChatCreateMessage extends Command {
|
|
|
23
24
|
const config = await readConfig(this.config.configDir, this.log.bind(this));
|
|
24
25
|
if (!config)
|
|
25
26
|
return;
|
|
26
|
-
|
|
27
|
+
// eslint-disable-next-line unicorn/prefer-string-replace-all
|
|
28
|
+
const result = await newMessage(config.auth, args.spaceId, args.message.replace(/\\n/g, '\n'), flags.formatted);
|
|
27
29
|
clearClients();
|
|
28
30
|
if (flags.toon) {
|
|
29
31
|
this.log(formatAsToon(result));
|
|
@@ -26,7 +26,8 @@ export default class GChatReplyMessage extends Command {
|
|
|
26
26
|
const config = await readConfig(this.config.configDir, this.log.bind(this));
|
|
27
27
|
if (!config)
|
|
28
28
|
return;
|
|
29
|
-
|
|
29
|
+
// eslint-disable-next-line unicorn/prefer-string-replace-all
|
|
30
|
+
const result = await replyMessage(config.auth, args.threadName, args.message.replace(/\\n/g, '\n'), flags.formatted);
|
|
30
31
|
clearClients();
|
|
31
32
|
if (flags.toon) {
|
|
32
33
|
this.log(formatAsToon(result));
|
package/oclif.manifest.json
CHANGED
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"description": "Send a message to a Google Chat space",
|
|
18
18
|
"examples": [
|
|
19
19
|
"<%= config.bin %> <%= command.id %> AAQAKA6hsFw \"Hello team\"",
|
|
20
|
-
"<%= config.bin %> <%= command.id %> AAQAKA6hsFw \"*Bold message*\" --formatted"
|
|
20
|
+
"<%= config.bin %> <%= command.id %> AAQAKA6hsFw \"*Bold message*\" --formatted",
|
|
21
|
+
"<%= config.bin %> <%= command.id %> AAQAKA6hsFw \"<https://example.com|Click here>\" -f"
|
|
21
22
|
],
|
|
22
23
|
"flags": {
|
|
23
24
|
"formatted": {
|
|
@@ -172,5 +173,5 @@
|
|
|
172
173
|
]
|
|
173
174
|
}
|
|
174
175
|
},
|
|
175
|
-
"version": "0.2.
|
|
176
|
+
"version": "0.2.2"
|
|
176
177
|
}
|