@mastra/discord 1.2.0 → 1.2.1-alpha.0

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
  # @mastra/discord
2
2
 
3
+ ## 1.2.1-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Generate workspace, integration, channel, and voice identifiers with Web Crypto without changing synchronous APIs. ([#25462](https://github.com/mastra-ai/mastra/pull/25462))
8
+
9
+ - Updated dependencies [[`42b8761`](https://github.com/mastra-ai/mastra/commit/42b8761d917453cfe9b0b189c51442a5398fbf27), [`c260e42`](https://github.com/mastra-ai/mastra/commit/c260e429ff30cc19859555985cacd5b70cfd63d9), [`9a30e77`](https://github.com/mastra-ai/mastra/commit/9a30e7768d3ac704e3940bae24b7aafc7eb6cf23), [`4e9f39b`](https://github.com/mastra-ai/mastra/commit/4e9f39b0be3b49e9df4586c08d4eec1b6ab5c37c), [`9762b12`](https://github.com/mastra-ai/mastra/commit/9762b125c480ee8bdb887145f4044a69eb18e27f), [`279d4a7`](https://github.com/mastra-ai/mastra/commit/279d4a7acba086eac37f49471ed30734eecec490), [`bc826e8`](https://github.com/mastra-ai/mastra/commit/bc826e8fb1c0d0311b4675fcfcf5c4f6bc43efe6), [`3da569c`](https://github.com/mastra-ai/mastra/commit/3da569c2032b3ec32a818f47f942151926c8fd6a), [`c4b52a2`](https://github.com/mastra-ai/mastra/commit/c4b52a20b533b92cab1a0478e8bab66231cefb86), [`63b8630`](https://github.com/mastra-ai/mastra/commit/63b8630cf4f7f3b330c872a21ae0cfedf0b4978a), [`2f8cb4d`](https://github.com/mastra-ai/mastra/commit/2f8cb4d7237372a7dff899bf3b4cbf4060b007db), [`c260e42`](https://github.com/mastra-ai/mastra/commit/c260e429ff30cc19859555985cacd5b70cfd63d9), [`9d304f4`](https://github.com/mastra-ai/mastra/commit/9d304f452c761403a726a9a518d6678019af23ca), [`e9276f4`](https://github.com/mastra-ai/mastra/commit/e9276f45c6c1a222890334209d24e8917e4f6ad1), [`0b9e7bc`](https://github.com/mastra-ai/mastra/commit/0b9e7bc0839bcec59f9eaa014c759ae935454c45), [`270e05f`](https://github.com/mastra-ai/mastra/commit/270e05fec0ec934c564527e33d0f51768712ad79), [`ab42292`](https://github.com/mastra-ai/mastra/commit/ab42292369c62b847ae4039e4dcf07b0a1116966), [`5d8b27d`](https://github.com/mastra-ai/mastra/commit/5d8b27df7306759b7d065f8a968d4e250ceae7d4), [`9762b12`](https://github.com/mastra-ai/mastra/commit/9762b125c480ee8bdb887145f4044a69eb18e27f)]:
10
+ - @mastra/core@1.73.0-alpha.0
11
+
3
12
  ## 1.2.0
4
13
 
5
14
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -40,11 +40,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
40
40
  }) : target, mod));
41
41
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
42
42
  //#endregion
43
- let crypto$1 = require("crypto");
44
- crypto$1 = __toESM(crypto$1, 1);
45
43
  let _mastra_core_channels = require("@mastra/core/channels");
46
44
  let _mastra_core_storage = require("@mastra/core/storage");
47
45
  let async_hooks = require("async_hooks");
46
+ let crypto$1 = require("crypto");
47
+ crypto$1 = __toESM(crypto$1, 1);
48
48
  let dns_promises = require("dns/promises");
49
49
  let https = require("https");
50
50
  let net = require("net");
@@ -88682,7 +88682,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
88682
88682
  const http$1 = require("http");
88683
88683
  const net$1 = require("net");
88684
88684
  const tls = require("tls");
88685
- const { randomBytes: randomBytes$1, createHash: createHash$2 } = require("crypto");
88685
+ const { randomBytes, createHash: createHash$2 } = require("crypto");
88686
88686
  const { Duplex: Duplex$2, Readable } = require("stream");
88687
88687
  const { URL: URL$1 } = require("url");
88688
88688
  const PerMessageDeflate = require_permessage_deflate();
@@ -89249,7 +89249,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
89249
89249
  }
89250
89250
  }
89251
89251
  const defaultPort = isSecure ? 443 : 80;
89252
- const key = randomBytes$1(16).toString("base64");
89252
+ const key = randomBytes(16).toString("base64");
89253
89253
  const request = isSecure ? https$1.request : http$1.request;
89254
89254
  const protocolSet = /* @__PURE__ */ new Set();
89255
89255
  let perMessageDeflate;
@@ -115282,8 +115282,8 @@ function isEncrypted(value) {
115282
115282
  }
115283
115283
  /** Encrypt a UTF-8 string with a per-value random salt + IV. */
115284
115284
  function encrypt(plaintext, passphrase) {
115285
- const salt = (0, crypto$1.randomBytes)(16);
115286
- const iv = (0, crypto$1.randomBytes)(12);
115285
+ const salt = Buffer.from(globalThis.crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(16)));
115286
+ const iv = Buffer.from(globalThis.crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(12)));
115287
115287
  const cipher = (0, crypto$1.createCipheriv)("aes-256-gcm", deriveKey(passphrase, salt), iv);
115288
115288
  const enc = Buffer.concat([cipher.update(plaintext, "utf8"), cipher.final()]);
115289
115289
  const tag = cipher.getAuthTag();
@@ -115710,8 +115710,8 @@ var DiscordProvider = class {
115710
115710
  const { app, persisted, identity: resolvedIdentity } = await this.#resolveAppConfig(store);
115711
115711
  const identity = resolvedIdentity ?? await validateApp(app.botToken, this.#apiBaseUrl());
115712
115712
  if (!persisted) await store.saveAppConfig(app);
115713
- const installationId = existing?.id ?? (0, crypto$1.randomUUID)();
115714
- const webhookId = existing?.webhookId ?? (0, crypto$1.randomUUID)();
115713
+ const installationId = existing?.id ?? globalThis.crypto.randomUUID();
115714
+ const webhookId = existing?.webhookId ?? globalThis.crypto.randomUUID();
115715
115715
  const displayName = options.name ?? identity.name;
115716
115716
  const installedAt = existing?.installedAt ?? /* @__PURE__ */ new Date();
115717
115717
  const commands = normalizeCommands(options.commands ?? this.#config.commands ?? DEFAULT_COMMANDS);