@sockethub/platform-irc 4.0.0-alpha.9 → 4.0.0-beta.1

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.
@@ -0,0 +1,421 @@
1
+ export declare const PlatformIrcSchema: {
2
+ name: string;
3
+ version: string;
4
+ contextUrl: string;
5
+ contextVersion: string;
6
+ schemaVersion: string;
7
+ messages: {
8
+ required: string[];
9
+ properties: {
10
+ type: {
11
+ enum: string[];
12
+ };
13
+ object: {
14
+ oneOf: {
15
+ $ref: string;
16
+ }[];
17
+ };
18
+ target: {
19
+ type: string;
20
+ if: {
21
+ required: string[];
22
+ properties: {
23
+ type: {
24
+ const: string;
25
+ };
26
+ };
27
+ };
28
+ then: {
29
+ required: string[];
30
+ properties: {
31
+ id: {
32
+ type: string;
33
+ pattern: string;
34
+ };
35
+ };
36
+ };
37
+ };
38
+ };
39
+ definitions: {
40
+ objectTypes: {
41
+ message: {
42
+ type: string;
43
+ required: string[];
44
+ additionalProperties: boolean;
45
+ properties: {
46
+ type: {
47
+ enum: string[];
48
+ };
49
+ content: {
50
+ type: string;
51
+ };
52
+ };
53
+ };
54
+ topic: {
55
+ type: string;
56
+ required: string[];
57
+ additionalProperties: boolean;
58
+ properties: {
59
+ type: {
60
+ enum: string[];
61
+ };
62
+ content: {
63
+ type: string;
64
+ };
65
+ };
66
+ };
67
+ address: {
68
+ type: string;
69
+ required: string[];
70
+ additionalProperties: boolean;
71
+ properties: {
72
+ type: {
73
+ enum: string[];
74
+ };
75
+ };
76
+ };
77
+ attendance: {
78
+ type: string;
79
+ required: string[];
80
+ additionalProperties: boolean;
81
+ properties: {
82
+ type: {
83
+ enum: string[];
84
+ };
85
+ };
86
+ };
87
+ channels: {
88
+ type: string;
89
+ required: string[];
90
+ additionalProperties: boolean;
91
+ properties: {
92
+ type: {
93
+ enum: string[];
94
+ };
95
+ name: {
96
+ type: string;
97
+ minLength: number;
98
+ pattern: string;
99
+ };
100
+ };
101
+ };
102
+ };
103
+ };
104
+ };
105
+ responses: {
106
+ type: string;
107
+ required: string[];
108
+ additionalProperties: boolean;
109
+ properties: {
110
+ "@context": {
111
+ type: string;
112
+ items: {
113
+ type: string;
114
+ };
115
+ };
116
+ id: {
117
+ type: string;
118
+ };
119
+ published: {
120
+ type: string;
121
+ };
122
+ type: {
123
+ enum: string[];
124
+ };
125
+ actor: {
126
+ oneOf: {
127
+ $ref: string;
128
+ }[];
129
+ };
130
+ target: {
131
+ oneOf: {
132
+ $ref: string;
133
+ }[];
134
+ };
135
+ error: {
136
+ type: string;
137
+ };
138
+ object: {
139
+ oneOf: {
140
+ $ref: string;
141
+ }[];
142
+ };
143
+ };
144
+ definitions: {
145
+ responses: {
146
+ person: {
147
+ type: string;
148
+ required: string[];
149
+ additionalProperties: boolean;
150
+ properties: {
151
+ id: {
152
+ type: string;
153
+ };
154
+ type: {
155
+ enum: string[];
156
+ };
157
+ name: {
158
+ type: string;
159
+ };
160
+ };
161
+ };
162
+ service: {
163
+ type: string;
164
+ required: string[];
165
+ additionalProperties: boolean;
166
+ properties: {
167
+ id: {
168
+ type: string;
169
+ };
170
+ type: {
171
+ enum: string[];
172
+ };
173
+ name: {
174
+ type: string;
175
+ };
176
+ };
177
+ };
178
+ room: {
179
+ type: string;
180
+ required: string[];
181
+ additionalProperties: boolean;
182
+ properties: {
183
+ id: {
184
+ type: string;
185
+ pattern: string;
186
+ };
187
+ type: {
188
+ enum: string[];
189
+ };
190
+ name: {
191
+ type: string;
192
+ };
193
+ };
194
+ };
195
+ message: {
196
+ type: string;
197
+ required: string[];
198
+ additionalProperties: boolean;
199
+ properties: {
200
+ type: {
201
+ enum: string[];
202
+ };
203
+ content: {
204
+ type: string;
205
+ };
206
+ };
207
+ };
208
+ me: {
209
+ type: string;
210
+ required: string[];
211
+ additionalProperties: boolean;
212
+ properties: {
213
+ type: {
214
+ enum: string[];
215
+ };
216
+ content: {
217
+ type: string;
218
+ };
219
+ };
220
+ };
221
+ presence: {
222
+ type: string;
223
+ required: string[];
224
+ additionalProperties: boolean;
225
+ properties: {
226
+ type: {
227
+ enum: string[];
228
+ };
229
+ role: {
230
+ enum: string[];
231
+ };
232
+ };
233
+ };
234
+ attendance: {
235
+ type: string;
236
+ required: string[];
237
+ additionalProperties: boolean;
238
+ properties: {
239
+ type: {
240
+ enum: string[];
241
+ };
242
+ members: {
243
+ type: string;
244
+ items: {
245
+ type: string;
246
+ };
247
+ };
248
+ roles: {
249
+ type: string;
250
+ additionalProperties: {
251
+ enum: string[];
252
+ };
253
+ };
254
+ };
255
+ };
256
+ topic: {
257
+ type: string;
258
+ required: string[];
259
+ additionalProperties: boolean;
260
+ properties: {
261
+ type: {
262
+ enum: string[];
263
+ };
264
+ content: {
265
+ type: string;
266
+ };
267
+ };
268
+ };
269
+ address: {
270
+ type: string;
271
+ required: string[];
272
+ additionalProperties: boolean;
273
+ properties: {
274
+ type: {
275
+ enum: string[];
276
+ };
277
+ };
278
+ };
279
+ relationship: {
280
+ type: string;
281
+ required: string[];
282
+ additionalProperties: boolean;
283
+ properties: {
284
+ type: {
285
+ enum: string[];
286
+ };
287
+ relationship: {
288
+ enum: string[];
289
+ };
290
+ subject: {
291
+ type: string;
292
+ required: string[];
293
+ additionalProperties: boolean;
294
+ properties: {
295
+ type: {
296
+ enum: string[];
297
+ };
298
+ role: {
299
+ enum: string[];
300
+ };
301
+ };
302
+ };
303
+ object: {
304
+ $ref: string;
305
+ };
306
+ };
307
+ };
308
+ channels: {
309
+ type: string;
310
+ required: string[];
311
+ additionalProperties: boolean;
312
+ properties: {
313
+ type: {
314
+ enum: string[];
315
+ };
316
+ truncated: {
317
+ type: string;
318
+ };
319
+ items: {
320
+ type: string;
321
+ items: {
322
+ type: string;
323
+ required: string[];
324
+ additionalProperties: boolean;
325
+ properties: {
326
+ id: {
327
+ type: string;
328
+ pattern: string;
329
+ };
330
+ type: {
331
+ enum: string[];
332
+ };
333
+ name: {
334
+ type: string;
335
+ };
336
+ members: {
337
+ type: string;
338
+ };
339
+ summary: {
340
+ type: string;
341
+ };
342
+ };
343
+ };
344
+ };
345
+ };
346
+ };
347
+ };
348
+ };
349
+ };
350
+ credentials: {
351
+ required: string[];
352
+ properties: {
353
+ actor: {
354
+ type: string;
355
+ required: string[];
356
+ };
357
+ object: {
358
+ type: string;
359
+ required: string[];
360
+ additionalProperties: boolean;
361
+ not: {
362
+ required: string[];
363
+ };
364
+ allOf: {
365
+ anyOf: ({
366
+ not: {
367
+ properties: {
368
+ saslMechanism: {
369
+ const: string;
370
+ };
371
+ };
372
+ required: string[];
373
+ };
374
+ required?: undefined;
375
+ } | {
376
+ required: string[];
377
+ not?: undefined;
378
+ })[];
379
+ }[];
380
+ properties: {
381
+ type: {
382
+ type: string;
383
+ };
384
+ nick: {
385
+ type: string;
386
+ };
387
+ username: {
388
+ type: string;
389
+ };
390
+ password: {
391
+ type: string;
392
+ minLength: number;
393
+ };
394
+ token: {
395
+ type: string;
396
+ minLength: number;
397
+ };
398
+ server: {
399
+ type: string;
400
+ };
401
+ port: {
402
+ type: string;
403
+ };
404
+ secure: {
405
+ type: string;
406
+ };
407
+ sasl: {
408
+ type: string;
409
+ };
410
+ saslMechanism: {
411
+ type: string;
412
+ enum: string[];
413
+ };
414
+ allowInvalidCert: {
415
+ type: string;
416
+ };
417
+ };
418
+ };
419
+ };
420
+ };
421
+ };
@@ -1,7 +1,6 @@
1
1
  import type { ActivityActor, CredentialsObject } from "@sockethub/schemas";
2
-
3
2
  export interface PlatformIrcCredentialsObject extends CredentialsObject {
4
- context: "irc";
3
+ "@context": Array<string>;
5
4
  type: "credentials";
6
5
  actor: ActivityActor;
7
6
  target?: ActivityActor;
@@ -11,8 +10,11 @@ export interface PlatformIrcCredentialsObject extends CredentialsObject {
11
10
  server: string;
12
11
  username?: string;
13
12
  password?: string;
13
+ token?: string;
14
14
  port?: number;
15
15
  secure?: boolean;
16
16
  sasl?: boolean;
17
+ saslMechanism?: "PLAIN" | "OAUTHBEARER";
18
+ allowInvalidCert?: boolean;
17
19
  };
18
20
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sockethub/platform-irc",
3
3
  "description": "A sockethub platform module implementing IRC functionality",
4
- "version": "4.0.0-alpha.9",
4
+ "version": "4.0.0-beta.1",
5
5
  "private": false,
6
6
  "author": "Nick Jennings <nick@silverbucket.net>",
7
7
  "license": "LGPL-3.0+",
@@ -12,17 +12,16 @@
12
12
  "main": "dist/index.js",
13
13
  "exports": {
14
14
  ".": {
15
- "bun": "./src/index.ts",
15
+ "types": "./dist/index.d.ts",
16
16
  "import": "./dist/index.js",
17
17
  "default": "./dist/index.js"
18
18
  }
19
19
  },
20
20
  "files": [
21
- "src/",
22
21
  "dist/"
23
22
  ],
24
23
  "engines": {
25
- "bun": ">=1.2"
24
+ "node": ">=20"
26
25
  },
27
26
  "keywords": [
28
27
  "sockethub",
@@ -42,24 +41,26 @@
42
41
  "scripts": {
43
42
  "build": "bun build src/index.ts --outdir dist --target node --format esm --sourcemap=external",
44
43
  "clean": "rm -rf dist",
44
+ "clean:deps": "rm -rf node_modules",
45
45
  "doc": "typedoc --options typedoc.json"
46
46
  },
47
47
  "dependencies": {
48
- "@sockethub/irc2as": "^4.0.0-alpha.9",
49
- "irc-socket-sasl": "^4.0.0"
48
+ "@sockethub/irc2as": "^4.0.0-beta.1",
49
+ "irc-socket-sasl": "^4.1.2"
50
50
  },
51
51
  "devDependencies": {
52
- "@sockethub/schemas": "^3.0.0-alpha.9",
52
+ "@sockethub/schemas": "^3.0.0-beta.1",
53
53
  "@types/bun": "latest",
54
54
  "typedoc": "^0.28.14"
55
55
  },
56
56
  "peerDependencies": {
57
- "@sockethub/server": "^5.0.0-alpha.9"
57
+ "@sockethub/server": "^5.0.0-beta.1"
58
58
  },
59
59
  "peerDependenciesMeta": {
60
60
  "@sockethub/server": {
61
61
  "optional": true
62
62
  }
63
63
  },
64
- "gitHead": "b89aac0946735864f3fec3bdc4ea15328b37120e"
64
+ "gitHead": "928f0c480e4828f492fb29a97712474a8f1bcaef",
65
+ "types": "./dist/index.d.ts"
65
66
  }
@@ -1,60 +0,0 @@
1
- export default [
2
- {
3
- name: "irc credentials",
4
- valid: true,
5
- type: "credentials",
6
- input: {
7
- context: "irc",
8
- type: "credentials",
9
- actor: {
10
- id: "sh-9K3Vk@irc.freenode.net",
11
- type: "person",
12
- name: "sh-9K3Vk",
13
- image: {
14
- height: 250,
15
- mediaType: "image/jpeg",
16
- url: "http://example.org/image.jpg",
17
- width: 250,
18
- },
19
- url: "http://sockethub.org",
20
- },
21
- object: {
22
- type: "credentials",
23
- nick: "sh-9K3Vk",
24
- port: 6667,
25
- secure: false,
26
- server: "irc.freenode.net",
27
- },
28
- },
29
- output: "same",
30
- },
31
- {
32
- name: "bad irc credentials: user/nick host/server",
33
- valid: false,
34
- type: "credentials",
35
- input: {
36
- context: "irc",
37
- type: "credentials",
38
- actor: {
39
- id: "sh-9K3Vk@irc.freenode.net",
40
- type: "person",
41
- name: "sh-9K3Vk",
42
- image: {
43
- height: 250,
44
- mediaType: "image/jpeg",
45
- url: "http://example.org/image.jpg",
46
- width: 250,
47
- },
48
- url: "http://sockethub.org",
49
- },
50
- object: {
51
- type: "credentials",
52
- user: "sh-9K3Vk",
53
- port: 6667,
54
- secure: false,
55
- host: "irc.freenode.net",
56
- },
57
- },
58
- error: "Error: [irc] /object: must NOT have additional properties: host",
59
- },
60
- ];