@jchat/addon-sdk 1.0.0-alpha.22 → 1.0.0-alpha.23

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @jchat/addon-sdk
2
2
 
3
+ ## 1.0.0-alpha.23
4
+
5
+ ### Patch Changes
6
+
7
+ - Support newline normalization for addon signing private keys
8
+
9
+ - Bumped `@jchat/*` dependencies:
10
+ - [`ui@1.0.0-alpha.23`](https://github.com/mjjabarullah/jchat/releases/tag/ui@v1.0.0-alpha.23)
11
+
3
12
  ## 1.0.0-alpha.22
4
13
 
5
14
  ### Minor Changes
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import { MOUNT_POINTS } from "./contracts.mjs";
2
2
  import { a as useTranslation, i as useLocale, n as LocaleContext, r as createTranslator, t as HOST_LANGUAGES } from "./i18n.mjs";
3
3
  import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
4
4
  //#region package.json
5
- var version = "1.0.0-alpha.21";
5
+ var version = "1.0.0-alpha.22";
6
6
  //#endregion
7
7
  //#region src/query.ts
8
8
  /**
package/dist/vite.mjs CHANGED
@@ -221,12 +221,13 @@ function signAddonManifest(manifest, files, privateKey) {
221
221
  hash.update("\0");
222
222
  }
223
223
  const digest = hash.digest("hex");
224
+ const normalizedKey = privateKey.replace(/\\n/g, "\n").trim();
224
225
  return {
225
226
  ...unsigned,
226
227
  signature: {
227
228
  algorithm: "rsa-sha256",
228
229
  digest,
229
- value: crypto.sign("sha256", Buffer.from(digest), privateKey).toString("base64url")
230
+ value: crypto.sign("sha256", Buffer.from(digest), normalizedKey).toString("base64url")
230
231
  }
231
232
  };
232
233
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jchat/addon-sdk",
3
- "version": "1.0.0-alpha.22",
3
+ "version": "1.0.0-alpha.23",
4
4
  "private": false,
5
5
  "description": "JChat Addon SDK for building JChat addons.",
6
6
  "keywords": [