Socket
Socket
Sign inDemoInstall

@twurple/eventsub-http

Package Overview
Dependencies
122
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.1.0-pre.1 to 6.1.0-pre.2

7

lib/EventSubHttpBase.d.ts

@@ -43,4 +43,8 @@ import type { HelixEventSubSubscription, HelixEventSubWebHookTransportOptions } from '@twurple/api';

* You should switch it off at your earliest convenience.
*
* You can set this to the string 'migrate' to migrate your subscription to the new secrets.
* This will treat all existing subscriptions as legacy and all new subscriptions as non-legacy,
* then you may migrate the existing subscriptions using `.migrate()`.
*/
legacySecrets?: boolean;
legacySecrets?: boolean | 'migrate';
}

@@ -57,3 +61,2 @@ /**

protected readonly _helperRoutes: boolean;
private readonly _legacySecrets;
protected _readyToSubscribe: boolean;

@@ -60,0 +63,0 @@ /**

@@ -41,6 +41,12 @@ "use strict";

this._logger.warn(`In version 6.0, the automatic augmentation of EventSub secrets was disabled by default.
If you have been using a lower version before, your subscriptions will not work unless you remove all your subscriptions and subscribe to them again.
A new option named \`legacySecrets\` was introduced in order to enable you to migrate your subscriptions at a later date.
You should still migrate this as soon as possible, as in the next major version this switch will go away.
To silence this warning and keep using the new way of using your EventSub secret, please add \`legacySecrets: false\` to your EventSub configuration.
If you have been using a lower version before, your subscriptions will fail to verify now.
A new option named \`legacySecrets\` was introduced in order to enable you to migrate your subscriptions.
You should still migrate this as soon as possible, as in the next major version this switch will go away, and then you will have to remove all your subscriptions and subscribe to them again.
To make Twurple migrate the subscriptions smoothly, please add \`legacySecrets: 'migrate'\` to your EventSub configuration.
This will treat all pre-existing subscriptions as legacy and all new subscriptions as modern.
You can then call \`.restart()\` on your pre-existing subscriptions to make them use modern secrets.
After restarting all these subscriptions, before you restart again, set it to \`false\`.
To silence this warning (if you're done migrating or if you're a new user), please add \`legacySecrets: false\` to your EventSub configuration.
To use your legacy subscriptions without having to clean them up and resubscribing, please add \`legacySecrets: true\` to your EventSub configuration.`);

@@ -271,3 +277,3 @@ }

_createSecretForSubscription(subscription) {
if (this._legacySecrets) {
if (subscription.usesLegacySecret) {
return `${subscription.id}.${this._secret}`.slice(-100);

@@ -274,0 +280,0 @@ }

@@ -83,5 +83,5 @@ "use strict";

.then(async () => {
this._readyToSubscribe = true;
this._logger.info(`Listening on port ${listenerPort}`);
await this._resumeExistingSubscriptions();
this._readyToSubscribe = true;
})

@@ -88,0 +88,0 @@ .catch(e => {

@@ -71,4 +71,4 @@ "use strict";

async markAsReady() {
await this._resumeExistingSubscriptions();
this._readyToSubscribe = true;
await this._resumeExistingSubscriptions();
}

@@ -75,0 +75,0 @@ async getHostName() {

{
"name": "@twurple/eventsub-http",
"version": "6.1.0-pre.1",
"version": "6.1.0-pre.2",
"publishConfig": {

@@ -41,5 +41,5 @@ "access": "public"

"@d-fischer/typed-event-emitter": "^3.3.0",
"@twurple/auth": "6.1.0-pre.1",
"@twurple/common": "6.1.0-pre.1",
"@twurple/eventsub-base": "6.1.0-pre.1",
"@twurple/auth": "6.1.0-pre.2",
"@twurple/common": "6.1.0-pre.2",
"@twurple/eventsub-base": "6.1.0-pre.2",
"@types/express-serve-static-core": "^4.17.24",

@@ -50,6 +50,6 @@ "httpanda": "^0.4.6",

"devDependencies": {
"@twurple/api": "6.1.0-pre.1"
"@twurple/api": "6.1.0-pre.2"
},
"peerDependencies": {
"@twurple/api": "6.1.0-pre.1"
"@twurple/api": "6.1.0-pre.2"
},

@@ -56,0 +56,0 @@ "files": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc