@sockethub/server 5.0.0-alpha.18 → 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 CHANGED
@@ -10345,7 +10345,7 @@ var init_package = __esm(() => {
10345
10345
  package_default = {
10346
10346
  name: "@sockethub/schemas",
10347
10347
  description: "JSON schema files for validating Sockethub Activity Streams",
10348
- version: "3.0.0-alpha.18",
10348
+ version: "3.0.0-alpha.19",
10349
10349
  type: "module",
10350
10350
  private: false,
10351
10351
  author: "Nick Jennings <nick@silverbucket.net>",
@@ -10406,7 +10406,7 @@ var init_package = __esm(() => {
10406
10406
  "ajv-formats": "^2.1.1",
10407
10407
  "ajv-formats-draft2019": "^1.6.1"
10408
10408
  },
10409
- gitHead: "c0a5b3b61f376651fc5184d1072a78c43f5ebb9e",
10409
+ gitHead: "9dc63d790aabfbfe894b1d1b0754013e40fd25ec",
10410
10410
  types: "./dist/index.d.ts"
10411
10411
  };
10412
10412
  });
@@ -92670,7 +92670,7 @@ var require_package2 = __commonJS((exports, module) => {
92670
92670
  module.exports = {
92671
92671
  name: "@sockethub/server",
92672
92672
  description: "A polyglot messaging service, server libraries",
92673
- version: "5.0.0-alpha.18",
92673
+ version: "5.0.0-alpha.19",
92674
92674
  type: "module",
92675
92675
  private: false,
92676
92676
  author: "Nick Jennings <nick@silverbucket.net>",
@@ -92720,11 +92720,11 @@ var require_package2 = __commonJS((exports, module) => {
92720
92720
  homepage: "https://sockethub.org",
92721
92721
  dependencies: {
92722
92722
  "@sentry/node": "^10.36.0",
92723
- "@sockethub/client": "^5.0.0-alpha.18",
92724
- "@sockethub/data-layer": "^1.0.0-alpha.18",
92725
- "@sockethub/logger": "^1.0.0-alpha.18",
92726
- "@sockethub/schemas": "^3.0.0-alpha.18",
92727
- "@sockethub/util": "^1.0.0-alpha.6",
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",
92728
92728
  chalk: "^5.6.2",
92729
92729
  convict: "^6.2.5",
92730
92730
  ejs: "^3.1.10",
@@ -92755,15 +92755,15 @@ var require_package2 = __commonJS((exports, module) => {
92755
92755
  "web-streams-polyfill": "^3.3.3"
92756
92756
  },
92757
92757
  optionalDependencies: {
92758
- "@sockethub/examples": "^1.0.0-alpha.18",
92759
- "@sockethub/platform-caldav": "^1.0.0-alpha.2",
92760
- "@sockethub/platform-dummy": "^3.0.0-alpha.18",
92761
- "@sockethub/platform-feeds": "^4.0.0-alpha.18",
92762
- "@sockethub/platform-irc": "^4.0.0-alpha.18",
92763
- "@sockethub/platform-metadata": "^1.0.1-alpha.13",
92764
- "@sockethub/platform-xmpp": "^5.0.0-alpha.18"
92765
- },
92766
- gitHead: "c0a5b3b61f376651fc5184d1072a78c43f5ebb9e",
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",
92767
92767
  types: "./dist/index.d.ts"
92768
92768
  };
92769
92769
  });
@@ -151788,6 +151788,23 @@ function buildServerError(message, requestId) {
151788
151788
  }
151789
151789
  return payload;
151790
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
+ }
151791
151808
  function normalizeRequestId(value) {
151792
151809
  if (typeof value !== "string") {
151793
151810
  return {};
@@ -152244,7 +152261,7 @@ function registerHttpActionsRoutes(app, options, deps = {}) {
152244
152261
  const kind = classifyPayload(payload);
152245
152262
  switch (kind) {
152246
152263
  case "credentials":
152247
- handlers.credentials(payload, writeResult);
152264
+ handlers.credentials(payload, (result) => writeResult(buildCredentialsAck(payload, result)));
152248
152265
  break;
152249
152266
  case "message":
152250
152267
  handlers.message(payload, writeResult);
@@ -189647,4 +189664,4 @@ export {
189647
189664
  server
189648
189665
  };
189649
189666
 
189650
- //# debugId=518F00CDB2AF821864756E2164756E21
189667
+ //# debugId=11DB76C99970757C64756E2164756E21