@sockethub/schemas 3.0.0-alpha.3 → 3.0.0-alpha.5
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/package.json +16 -31
- package/src/index.ts +23 -22
- package/src/schemas/activity-object.ts +15 -15
- package/src/schemas/activity-stream.ts +41 -38
- package/{dist → src}/schemas/json/activity-object.json +1 -1
- package/{dist → src}/schemas/json/activity-stream.json +5 -1
- package/{dist → src}/schemas/json/platform.json +1 -0
- package/src/schemas/json/sockethub-config.json +144 -0
- package/src/schemas/platform.ts +22 -22
- package/src/schemas/sockethub-config.ts +140 -0
- package/dist/helpers/error-parser.d.ts +0 -9
- package/dist/helpers/error-parser.js +0 -91
- package/dist/helpers/objects.d.ts +0 -206
- package/dist/helpers/objects.js +0 -217
- package/dist/index.d.ts +0 -15
- package/dist/index.js +0 -22
- package/dist/index.test.data.credentials.d.ts +0 -37
- package/dist/index.test.data.credentials.js +0 -69
- package/dist/index.test.data.objects.d.ts +0 -50
- package/dist/index.test.data.objects.js +0 -214
- package/dist/index.test.data.platform.d.ts +0 -44
- package/dist/index.test.data.platform.js +0 -47
- package/dist/index.test.data.streams.d.ts +0 -256
- package/dist/index.test.data.streams.js +0 -449
- package/dist/schemas/activity-object.d.ts +0 -16
- package/dist/schemas/activity-object.js +0 -18
- package/dist/schemas/activity-stream.d.ts +0 -235
- package/dist/schemas/activity-stream.js +0 -49
- package/dist/schemas/platform.d.ts +0 -41
- package/dist/schemas/platform.js +0 -44
- package/dist/types.d.ts +0 -20
- package/dist/types.js +0 -2
- package/dist/validator.d.ts +0 -8
- package/dist/validator.js +0 -78
- package/src/helpers/error-parser.ts +0 -99
- package/src/helpers/objects.ts +0 -230
- package/src/index.test.data.credentials.ts +0 -71
- package/src/index.test.data.objects.ts +0 -235
- package/src/index.test.data.platform.ts +0 -45
- package/src/index.test.data.streams.ts +0 -470
- package/src/index.test.ts +0 -84
- package/src/types.ts +0 -23
- package/src/validator.ts +0 -79
package/package.json
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sockethub/schemas",
|
|
3
3
|
"description": "JSON schema files for validating Sockethub Activity Streams",
|
|
4
|
-
"version": "3.0.0-alpha.
|
|
4
|
+
"version": "3.0.0-alpha.5",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"private": false,
|
|
6
7
|
"author": "Nick Jennings <nick@silverbucket.net>",
|
|
7
8
|
"license": "MIT",
|
|
9
|
+
"main": "src/index.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"src/schemas"
|
|
12
|
+
],
|
|
13
|
+
"engines": {
|
|
14
|
+
"bun": ">=1.2"
|
|
15
|
+
},
|
|
8
16
|
"keywords": [
|
|
9
17
|
"sockethub",
|
|
10
18
|
"sockethub schema",
|
|
@@ -12,12 +20,6 @@
|
|
|
12
20
|
"activity objects",
|
|
13
21
|
"sockethub platforms"
|
|
14
22
|
],
|
|
15
|
-
"main": "dist/index.js",
|
|
16
|
-
"types": "dist/index.d.ts",
|
|
17
|
-
"files": [
|
|
18
|
-
"dist/",
|
|
19
|
-
"src/"
|
|
20
|
-
],
|
|
21
23
|
"repository": {
|
|
22
24
|
"type": "git",
|
|
23
25
|
"url": "git+https://github.com/sockethub/sockethub.git",
|
|
@@ -25,34 +27,17 @@
|
|
|
25
27
|
},
|
|
26
28
|
"homepage": "https://github.com/sockethub/sockethub/tree/master/packages/schemas",
|
|
27
29
|
"devDependencies": {
|
|
28
|
-
"@types/
|
|
29
|
-
"@types/debug": "4.1.
|
|
30
|
-
"@types/eslint": "8.4.1",
|
|
31
|
-
"@types/mocha": "9.1.0",
|
|
32
|
-
"@types/node": "17.0.13",
|
|
33
|
-
"@typescript-eslint/parser": "5.12.1",
|
|
34
|
-
"c8": "7.11.0",
|
|
35
|
-
"chai": "4.3.6",
|
|
36
|
-
"eslint": "8.9.0",
|
|
37
|
-
"eslint-cli": "1.1.1",
|
|
38
|
-
"mocha": "9.2.1",
|
|
39
|
-
"ts-node": "10.5.0",
|
|
40
|
-
"typescript": "4.5.5"
|
|
30
|
+
"@types/bun": "latest",
|
|
31
|
+
"@types/debug": "4.1.12"
|
|
41
32
|
},
|
|
42
33
|
"scripts": {
|
|
43
|
-
"build": "
|
|
44
|
-
"clean": "npx rimraf coverage dist",
|
|
45
|
-
"clean:deps": "npx rimraf node_modules",
|
|
46
|
-
"compliance": "yarn test && yarn coverage",
|
|
47
|
-
"coverage": "c8 check-coverage --statements 95 --branches 95 --functions 95 --lines 95",
|
|
48
|
-
"lint": "eslint \"**/*.ts\"",
|
|
49
|
-
"lint:fix": "eslint --fix \"**/*.ts\"",
|
|
50
|
-
"test": "c8 mocha -r ts-node/register src/**/*.test.ts"
|
|
34
|
+
"build": "bun ./scripts/export-json-schema.ts"
|
|
51
35
|
},
|
|
52
36
|
"dependencies": {
|
|
53
|
-
"ajv": "8.
|
|
37
|
+
"ajv": "8.12.0",
|
|
38
|
+
"ajv-formats": "2.1.1",
|
|
54
39
|
"ajv-formats-draft2019": "1.6.1",
|
|
55
|
-
"debug": "
|
|
40
|
+
"debug": "4.3.4"
|
|
56
41
|
},
|
|
57
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "341ea9eeca6afd1442fe6e01457bc21d112b91a4"
|
|
58
43
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
validateActivityObject,
|
|
14
|
-
};
|
|
1
|
+
import { ObjectTypesList } from "./helpers/objects.js";
|
|
2
|
+
import { ActivityObjectSchema } from "./schemas/activity-object.js";
|
|
3
|
+
import { ActivityStreamSchema } from "./schemas/activity-stream.js";
|
|
4
|
+
import { PlatformSchema } from "./schemas/platform.js";
|
|
5
|
+
import {
|
|
6
|
+
addPlatformSchema,
|
|
7
|
+
getPlatformSchema,
|
|
8
|
+
validateActivityObject,
|
|
9
|
+
validateActivityStream,
|
|
10
|
+
validateCredentials,
|
|
11
|
+
validatePlatformSchema,
|
|
12
|
+
} from "./validator.js";
|
|
15
13
|
|
|
16
14
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
addPlatformSchema,
|
|
16
|
+
getPlatformSchema,
|
|
17
|
+
validatePlatformSchema,
|
|
18
|
+
validateCredentials,
|
|
19
|
+
validateActivityStream,
|
|
20
|
+
validateActivityObject,
|
|
21
|
+
PlatformSchema,
|
|
22
|
+
ActivityObjectSchema,
|
|
23
|
+
ActivityStreamSchema,
|
|
24
|
+
ObjectTypesList,
|
|
21
25
|
};
|
|
22
26
|
|
|
23
|
-
export
|
|
24
|
-
IActivityStream,
|
|
25
|
-
IActivityObject
|
|
26
|
-
} from "./types";
|
|
27
|
+
export * from "./types.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { validObjectDefs, validObjectRefs } from "../helpers/objects.js";
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export const ActivityObjectSchema = {
|
|
4
|
+
$id: "https://sockethub.org/schemas/v/activity-object.json",
|
|
5
|
+
description: "Schema for Sockethub Activity Objects",
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
type: "object",
|
|
8
|
+
required: ["object"],
|
|
9
|
+
properties: {
|
|
10
|
+
object: {
|
|
11
|
+
type: "object",
|
|
12
|
+
oneOf: validObjectRefs,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
definitions: {
|
|
17
|
+
type: validObjectDefs,
|
|
18
|
+
},
|
|
19
19
|
};
|
|
@@ -1,51 +1,54 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { ObjectTypesList, ObjectTypesSchema } from "../helpers/objects.js";
|
|
2
|
+
import { ActivityObjectSchema } from "./activity-object.js";
|
|
3
3
|
|
|
4
|
-
const validActorRefs
|
|
5
|
-
const validTargetRefs =
|
|
6
|
-
//
|
|
7
|
-
console.log(validActorRefs);
|
|
4
|
+
const validActorRefs = ActivityObjectSchema.properties.object.oneOf;
|
|
5
|
+
const validTargetRefs = ActivityObjectSchema.properties.object.oneOf;
|
|
6
|
+
// console.log(validActorRefs);
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
const validObjectRefs = [];
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
10
|
+
for (const type of ObjectTypesList) {
|
|
11
|
+
validObjectRefs.push({ $ref: `#/definitions/type/${type}` });
|
|
12
|
+
}
|
|
14
13
|
|
|
15
14
|
const contextSchema = {
|
|
16
|
-
|
|
15
|
+
type: "string",
|
|
17
16
|
};
|
|
18
17
|
const typeSchema = {
|
|
19
|
-
|
|
18
|
+
type: "string",
|
|
20
19
|
};
|
|
21
20
|
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
export const ActivityStreamSchema = {
|
|
22
|
+
$id: "https://sockethub.org/schemas/v/activity-stream.json",
|
|
23
|
+
description: "Schema for Sockethub Activity Streams",
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
type: "object",
|
|
26
|
+
required: ["context", "type", "actor"],
|
|
27
|
+
properties: {
|
|
28
|
+
id: {
|
|
29
|
+
type: "string",
|
|
30
|
+
},
|
|
31
|
+
type: typeSchema,
|
|
32
|
+
context: contextSchema,
|
|
33
|
+
actor: {
|
|
34
|
+
type: "object",
|
|
35
|
+
oneOf: validActorRefs,
|
|
36
|
+
},
|
|
37
|
+
target: {
|
|
38
|
+
type: "object",
|
|
39
|
+
oneOf: validTargetRefs,
|
|
40
|
+
},
|
|
41
|
+
object: {
|
|
42
|
+
type: "object",
|
|
43
|
+
oneOf: validObjectRefs,
|
|
44
|
+
},
|
|
45
|
+
published: {
|
|
46
|
+
type: "string",
|
|
47
|
+
format: "date-time",
|
|
48
|
+
},
|
|
31
49
|
},
|
|
32
|
-
"type": typeSchema,
|
|
33
|
-
"context": contextSchema,
|
|
34
|
-
"actor": {
|
|
35
|
-
"type": "object",
|
|
36
|
-
"oneOf": validActorRefs
|
|
37
|
-
},
|
|
38
|
-
"target": {
|
|
39
|
-
"type": "object",
|
|
40
|
-
"oneOf": validTargetRefs
|
|
41
|
-
},
|
|
42
|
-
"object": {
|
|
43
|
-
"type": "object",
|
|
44
|
-
"oneOf": validObjectRefs
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
50
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
definitions: {
|
|
52
|
+
type: ObjectTypesSchema,
|
|
53
|
+
},
|
|
51
54
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://sockethub.org/schemas/
|
|
2
|
+
"$id": "https://sockethub.org/schemas/3.0.0-alpha.5/activity-stream.json",
|
|
3
3
|
"description": "Schema for Sockethub Activity Streams",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"required": [
|
|
@@ -142,6 +142,10 @@
|
|
|
142
142
|
"$ref": "#/definitions/type/address"
|
|
143
143
|
}
|
|
144
144
|
]
|
|
145
|
+
},
|
|
146
|
+
"published": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"format": "date-time"
|
|
145
149
|
}
|
|
146
150
|
},
|
|
147
151
|
"definitions": {
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://sockethub.org/schemas/3.0.0-alpha.5/sockethub-config.json",
|
|
3
|
+
"description": "Sockethub Config Schema",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"platforms"
|
|
7
|
+
],
|
|
8
|
+
"properties": {
|
|
9
|
+
"examples": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"enabled": {
|
|
13
|
+
"type": "boolean",
|
|
14
|
+
"default": false
|
|
15
|
+
},
|
|
16
|
+
"secret": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"default": "1234567890"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"additionalProperties": false
|
|
22
|
+
},
|
|
23
|
+
"log_file": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"packageConfig": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"properties": {
|
|
29
|
+
"@sockethub/activity-streams": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"properties": {
|
|
32
|
+
"specialObjs": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"default": [
|
|
38
|
+
"credentials"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"failOnUnknownObjectProperties": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"default": true
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"additionalProperties": false
|
|
47
|
+
},
|
|
48
|
+
"@sockethub/platform-dummy": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"properties": {
|
|
51
|
+
"greeting": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"default": "Hello"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"additionalProperties": false
|
|
57
|
+
},
|
|
58
|
+
"@sockethub/platform-feeds": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"properties": {
|
|
61
|
+
"connectTimeoutMs": {
|
|
62
|
+
"type": "number"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"additionalProperties": false
|
|
66
|
+
},
|
|
67
|
+
"@sockethub/platform-irc": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"properties": {
|
|
70
|
+
"connectTimeoutMs": {
|
|
71
|
+
"type": "number"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"additionalProperties": false
|
|
75
|
+
},
|
|
76
|
+
"@sockethub/platform-xmpp": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"properties": {
|
|
79
|
+
"connectTimeoutMs": {
|
|
80
|
+
"type": "number"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"additionalProperties": false
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"platforms": {
|
|
88
|
+
"type": "array",
|
|
89
|
+
"items": {
|
|
90
|
+
"type": "string"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"public": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"properties": {
|
|
96
|
+
"protocol": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"default": "http"
|
|
99
|
+
},
|
|
100
|
+
"host": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"default": "localhost"
|
|
103
|
+
},
|
|
104
|
+
"port": {
|
|
105
|
+
"type": "number",
|
|
106
|
+
"default": 10550
|
|
107
|
+
},
|
|
108
|
+
"path": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"default": "/"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"additionalProperties": false
|
|
114
|
+
},
|
|
115
|
+
"redis": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"properties": {
|
|
118
|
+
"url": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"default": "redis://127.0.0.1:6379"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"additionalProperties": false
|
|
124
|
+
},
|
|
125
|
+
"sockethub": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"properties": {
|
|
128
|
+
"port": {
|
|
129
|
+
"type": "number",
|
|
130
|
+
"default": 10550
|
|
131
|
+
},
|
|
132
|
+
"host": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"default": "localhost"
|
|
135
|
+
},
|
|
136
|
+
"path": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"default": "/sockethub"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"additionalProperties": false
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
package/src/schemas/platform.ts
CHANGED
|
@@ -18,30 +18,30 @@
|
|
|
18
18
|
|
|
19
19
|
// this schema defines the general structure of the schema object which should
|
|
20
20
|
// be returned from platforms.
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
export const PlatformSchema = {
|
|
22
|
+
$id: "https://sockethub.org/schemas/v/platform.json",
|
|
23
|
+
type: "object",
|
|
24
|
+
required: ["name", "version", "messages"],
|
|
25
|
+
additionalProperties: false,
|
|
26
|
+
properties: {
|
|
27
|
+
credentials: {
|
|
28
|
+
title: "credentials",
|
|
29
|
+
type: "object",
|
|
30
|
+
},
|
|
26
31
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
32
|
+
messages: {
|
|
33
|
+
title: "messages",
|
|
34
|
+
type: "object",
|
|
35
|
+
},
|
|
31
36
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
name: {
|
|
38
|
+
title: "name",
|
|
39
|
+
type: "string",
|
|
40
|
+
},
|
|
36
41
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
version: {
|
|
43
|
+
title: "version",
|
|
44
|
+
type: "string",
|
|
45
|
+
},
|
|
40
46
|
},
|
|
41
|
-
|
|
42
|
-
'version' : {
|
|
43
|
-
'title': 'version',
|
|
44
|
-
'type': 'string',
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
47
|
};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
const connectConfigPlatforms = {
|
|
2
|
+
connectTimeoutMs: {
|
|
3
|
+
type: "number",
|
|
4
|
+
},
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const SockethubConfigSchema = {
|
|
8
|
+
$id: "https://sockethub.org/schemas/v/sockethub-config.json",
|
|
9
|
+
description: "Sockethub Config Schema",
|
|
10
|
+
type: "object",
|
|
11
|
+
required: ["platforms"],
|
|
12
|
+
properties: {
|
|
13
|
+
examples: {
|
|
14
|
+
type: "object",
|
|
15
|
+
properties: {
|
|
16
|
+
enabled: {
|
|
17
|
+
type: "boolean",
|
|
18
|
+
default: false,
|
|
19
|
+
},
|
|
20
|
+
secret: {
|
|
21
|
+
type: "string",
|
|
22
|
+
default: "1234567890",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
additionalProperties: false,
|
|
26
|
+
},
|
|
27
|
+
log_file: {
|
|
28
|
+
type: "string",
|
|
29
|
+
},
|
|
30
|
+
packageConfig: {
|
|
31
|
+
type: "object",
|
|
32
|
+
properties: {
|
|
33
|
+
"@sockethub/activity-streams": {
|
|
34
|
+
type: "object",
|
|
35
|
+
properties: {
|
|
36
|
+
specialObjs: {
|
|
37
|
+
type: "array",
|
|
38
|
+
items: {
|
|
39
|
+
type: "string",
|
|
40
|
+
},
|
|
41
|
+
default: ["credentials"],
|
|
42
|
+
},
|
|
43
|
+
failOnUnknownObjectProperties: {
|
|
44
|
+
type: "boolean",
|
|
45
|
+
default: true,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
additionalProperties: false,
|
|
49
|
+
},
|
|
50
|
+
"@sockethub/platform-dummy": {
|
|
51
|
+
type: "object",
|
|
52
|
+
properties: {
|
|
53
|
+
greeting: {
|
|
54
|
+
type: "string",
|
|
55
|
+
default: "Hello",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
additionalProperties: false,
|
|
59
|
+
},
|
|
60
|
+
"@sockethub/platform-feeds": {
|
|
61
|
+
type: "object",
|
|
62
|
+
properties: {
|
|
63
|
+
...connectConfigPlatforms,
|
|
64
|
+
},
|
|
65
|
+
additionalProperties: false,
|
|
66
|
+
},
|
|
67
|
+
"@sockethub/platform-irc": {
|
|
68
|
+
type: "object",
|
|
69
|
+
properties: {
|
|
70
|
+
...connectConfigPlatforms,
|
|
71
|
+
},
|
|
72
|
+
additionalProperties: false,
|
|
73
|
+
},
|
|
74
|
+
"@sockethub/platform-xmpp": {
|
|
75
|
+
type: "object",
|
|
76
|
+
properties: {
|
|
77
|
+
...connectConfigPlatforms,
|
|
78
|
+
},
|
|
79
|
+
additionalProperties: false,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
platforms: {
|
|
84
|
+
type: "array",
|
|
85
|
+
items: {
|
|
86
|
+
type: "string",
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
public: {
|
|
90
|
+
type: "object",
|
|
91
|
+
properties: {
|
|
92
|
+
protocol: {
|
|
93
|
+
type: "string",
|
|
94
|
+
default: "http",
|
|
95
|
+
},
|
|
96
|
+
host: {
|
|
97
|
+
type: "string",
|
|
98
|
+
default: "localhost",
|
|
99
|
+
},
|
|
100
|
+
port: {
|
|
101
|
+
type: "number",
|
|
102
|
+
default: 10550,
|
|
103
|
+
},
|
|
104
|
+
path: {
|
|
105
|
+
type: "string",
|
|
106
|
+
default: "/",
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
additionalProperties: false,
|
|
110
|
+
},
|
|
111
|
+
redis: {
|
|
112
|
+
type: "object",
|
|
113
|
+
properties: {
|
|
114
|
+
url: {
|
|
115
|
+
type: "string",
|
|
116
|
+
default: "redis://127.0.0.1:6379",
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
additionalProperties: false,
|
|
120
|
+
},
|
|
121
|
+
sockethub: {
|
|
122
|
+
type: "object",
|
|
123
|
+
properties: {
|
|
124
|
+
port: {
|
|
125
|
+
type: "number",
|
|
126
|
+
default: 10550,
|
|
127
|
+
},
|
|
128
|
+
host: {
|
|
129
|
+
type: "string",
|
|
130
|
+
default: "localhost",
|
|
131
|
+
},
|
|
132
|
+
path: {
|
|
133
|
+
type: "string",
|
|
134
|
+
default: "/sockethub",
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
additionalProperties: false,
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ErrorObject } from "ajv";
|
|
2
|
-
/**
|
|
3
|
-
* Traverses the errors array from ajv, and makes a series of filtering decisions to
|
|
4
|
-
* try to arrive at the most useful error.
|
|
5
|
-
* @param msg
|
|
6
|
-
* @param errors
|
|
7
|
-
* @returns {string}
|
|
8
|
-
*/
|
|
9
|
-
export default function getErrorMessage(msg: any, errors: Array<ErrorObject>): string;
|