@sockethub/server 5.0.0-alpha.17 → 5.0.0-alpha.19
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/dist/index.js +60 -20
- package/dist/index.js.map +4 -4
- package/dist/platform.js +27 -4
- package/dist/platform.js.map +3 -3
- package/package.json +14 -14
- package/res/sockethub-client.js +28 -5
- package/res/sockethub-client.min.js +12 -12
package/dist/index.js
CHANGED
|
@@ -10168,6 +10168,28 @@ var init_objects = __esm(() => {
|
|
|
10168
10168
|
enum: ["address"]
|
|
10169
10169
|
}
|
|
10170
10170
|
}
|
|
10171
|
+
},
|
|
10172
|
+
calendar: {
|
|
10173
|
+
required: ["id", "type"],
|
|
10174
|
+
additionalProperties: true,
|
|
10175
|
+
properties: {
|
|
10176
|
+
id: {
|
|
10177
|
+
type: "string",
|
|
10178
|
+
format: "iri"
|
|
10179
|
+
},
|
|
10180
|
+
type: {
|
|
10181
|
+
enum: ["calendar"]
|
|
10182
|
+
},
|
|
10183
|
+
name: {
|
|
10184
|
+
type: "string"
|
|
10185
|
+
},
|
|
10186
|
+
components: {
|
|
10187
|
+
type: "array",
|
|
10188
|
+
items: {
|
|
10189
|
+
enum: ["event", "task"]
|
|
10190
|
+
}
|
|
10191
|
+
}
|
|
10192
|
+
}
|
|
10171
10193
|
}
|
|
10172
10194
|
};
|
|
10173
10195
|
InternalObjectTypesList = ["platform", "heartbeat"];
|
|
@@ -10187,7 +10209,8 @@ var init_objects = __esm(() => {
|
|
|
10187
10209
|
"feed",
|
|
10188
10210
|
"website",
|
|
10189
10211
|
"platform",
|
|
10190
|
-
"address"
|
|
10212
|
+
"address",
|
|
10213
|
+
"calendar"
|
|
10191
10214
|
];
|
|
10192
10215
|
validActorRefs = ActorTypesList.map((type) => ({
|
|
10193
10216
|
$ref: `#/definitions/type/${type}`
|
|
@@ -10322,7 +10345,7 @@ var init_package = __esm(() => {
|
|
|
10322
10345
|
package_default = {
|
|
10323
10346
|
name: "@sockethub/schemas",
|
|
10324
10347
|
description: "JSON schema files for validating Sockethub Activity Streams",
|
|
10325
|
-
version: "3.0.0-alpha.
|
|
10348
|
+
version: "3.0.0-alpha.19",
|
|
10326
10349
|
type: "module",
|
|
10327
10350
|
private: false,
|
|
10328
10351
|
author: "Nick Jennings <nick@silverbucket.net>",
|
|
@@ -10383,7 +10406,7 @@ var init_package = __esm(() => {
|
|
|
10383
10406
|
"ajv-formats": "^2.1.1",
|
|
10384
10407
|
"ajv-formats-draft2019": "^1.6.1"
|
|
10385
10408
|
},
|
|
10386
|
-
gitHead: "
|
|
10409
|
+
gitHead: "9dc63d790aabfbfe894b1d1b0754013e40fd25ec",
|
|
10387
10410
|
types: "./dist/index.d.ts"
|
|
10388
10411
|
};
|
|
10389
10412
|
});
|
|
@@ -92647,7 +92670,7 @@ var require_package2 = __commonJS((exports, module) => {
|
|
|
92647
92670
|
module.exports = {
|
|
92648
92671
|
name: "@sockethub/server",
|
|
92649
92672
|
description: "A polyglot messaging service, server libraries",
|
|
92650
|
-
version: "5.0.0-alpha.
|
|
92673
|
+
version: "5.0.0-alpha.19",
|
|
92651
92674
|
type: "module",
|
|
92652
92675
|
private: false,
|
|
92653
92676
|
author: "Nick Jennings <nick@silverbucket.net>",
|
|
@@ -92697,11 +92720,11 @@ var require_package2 = __commonJS((exports, module) => {
|
|
|
92697
92720
|
homepage: "https://sockethub.org",
|
|
92698
92721
|
dependencies: {
|
|
92699
92722
|
"@sentry/node": "^10.36.0",
|
|
92700
|
-
"@sockethub/client": "^5.0.0-alpha.
|
|
92701
|
-
"@sockethub/data-layer": "^1.0.0-alpha.
|
|
92702
|
-
"@sockethub/logger": "^1.0.0-alpha.
|
|
92703
|
-
"@sockethub/schemas": "^3.0.0-alpha.
|
|
92704
|
-
"@sockethub/util": "^1.0.0-alpha.
|
|
92723
|
+
"@sockethub/client": "^5.0.0-alpha.19",
|
|
92724
|
+
"@sockethub/data-layer": "^1.0.0-alpha.19",
|
|
92725
|
+
"@sockethub/logger": "^1.0.0-alpha.19",
|
|
92726
|
+
"@sockethub/schemas": "^3.0.0-alpha.19",
|
|
92727
|
+
"@sockethub/util": "^1.0.0-alpha.7",
|
|
92705
92728
|
chalk: "^5.6.2",
|
|
92706
92729
|
convict: "^6.2.5",
|
|
92707
92730
|
ejs: "^3.1.10",
|
|
@@ -92732,15 +92755,15 @@ var require_package2 = __commonJS((exports, module) => {
|
|
|
92732
92755
|
"web-streams-polyfill": "^3.3.3"
|
|
92733
92756
|
},
|
|
92734
92757
|
optionalDependencies: {
|
|
92735
|
-
"@sockethub/examples": "^1.0.0-alpha.
|
|
92736
|
-
"@sockethub/platform-caldav": "^1.0.0-alpha.
|
|
92737
|
-
"@sockethub/platform-dummy": "^3.0.0-alpha.
|
|
92738
|
-
"@sockethub/platform-feeds": "^4.0.0-alpha.
|
|
92739
|
-
"@sockethub/platform-irc": "^4.0.0-alpha.
|
|
92740
|
-
"@sockethub/platform-metadata": "^1.0.1-alpha.
|
|
92741
|
-
"@sockethub/platform-xmpp": "^5.0.0-alpha.
|
|
92742
|
-
},
|
|
92743
|
-
gitHead: "
|
|
92758
|
+
"@sockethub/examples": "^1.0.0-alpha.19",
|
|
92759
|
+
"@sockethub/platform-caldav": "^1.0.0-alpha.3",
|
|
92760
|
+
"@sockethub/platform-dummy": "^3.0.0-alpha.19",
|
|
92761
|
+
"@sockethub/platform-feeds": "^4.0.0-alpha.19",
|
|
92762
|
+
"@sockethub/platform-irc": "^4.0.0-alpha.19",
|
|
92763
|
+
"@sockethub/platform-metadata": "^1.0.1-alpha.14",
|
|
92764
|
+
"@sockethub/platform-xmpp": "^5.0.0-alpha.19"
|
|
92765
|
+
},
|
|
92766
|
+
gitHead: "9dc63d790aabfbfe894b1d1b0754013e40fd25ec",
|
|
92744
92767
|
types: "./dist/index.d.ts"
|
|
92745
92768
|
};
|
|
92746
92769
|
});
|
|
@@ -151765,6 +151788,23 @@ function buildServerError(message, requestId) {
|
|
|
151765
151788
|
}
|
|
151766
151789
|
return payload;
|
|
151767
151790
|
}
|
|
151791
|
+
function buildCredentialsAck(payload, result) {
|
|
151792
|
+
if (result instanceof Error) {
|
|
151793
|
+
return result;
|
|
151794
|
+
}
|
|
151795
|
+
const ack = {
|
|
151796
|
+
"@context": buildCanonicalContext(INTERNAL_PLATFORM_CONTEXT_URL),
|
|
151797
|
+
type: "credentials-ack",
|
|
151798
|
+
actor: {
|
|
151799
|
+
id: payload.actor.id,
|
|
151800
|
+
type: "person"
|
|
151801
|
+
}
|
|
151802
|
+
};
|
|
151803
|
+
if (isObject(result) && typeof result.error === "string") {
|
|
151804
|
+
ack.error = result.error;
|
|
151805
|
+
}
|
|
151806
|
+
return ack;
|
|
151807
|
+
}
|
|
151768
151808
|
function normalizeRequestId(value) {
|
|
151769
151809
|
if (typeof value !== "string") {
|
|
151770
151810
|
return {};
|
|
@@ -152221,7 +152261,7 @@ function registerHttpActionsRoutes(app, options, deps = {}) {
|
|
|
152221
152261
|
const kind = classifyPayload(payload);
|
|
152222
152262
|
switch (kind) {
|
|
152223
152263
|
case "credentials":
|
|
152224
|
-
handlers.credentials(payload, writeResult);
|
|
152264
|
+
handlers.credentials(payload, (result) => writeResult(buildCredentialsAck(payload, result)));
|
|
152225
152265
|
break;
|
|
152226
152266
|
case "message":
|
|
152227
152267
|
handlers.message(payload, writeResult);
|
|
@@ -189624,4 +189664,4 @@ export {
|
|
|
189624
189664
|
server
|
|
189625
189665
|
};
|
|
189626
189666
|
|
|
189627
|
-
//# debugId=
|
|
189667
|
+
//# debugId=11DB76C99970757C64756E2164756E21
|