wirejs-deploy-amplify-basic 0.0.102-realtime → 0.0.103-realtime

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.
@@ -3,6 +3,6 @@
3
3
  "dependencies": {
4
4
  "jsdom": "^25.0.1",
5
5
  "wirejs-dom": "^1.0.41",
6
- "wirejs-resources": "^0.1.70-realtime"
6
+ "wirejs-resources": "^0.1.71-realtime"
7
7
  }
8
8
  }
@@ -105,17 +105,17 @@ export class RealtimeService extends Resource {
105
105
  }
106
106
  async getStream(channel) {
107
107
  this.#validateChannelName(channel);
108
- const channelString = Buffer.from(channel).toString('base64');
109
- const payload = { channel };
108
+ const channelString = `${this.#namespace}/${channel}`;
109
+ const payload = { channel: `/${channelString}` };
110
110
  const jwt = await new jose.SignJWT(payload)
111
111
  .setProtectedHeader({ alg: 'HS256' })
112
112
  .setIssuedAt()
113
- .setExpirationTime(`10s`)
113
+ .setExpirationTime(`30s`)
114
114
  .sign(new TextEncoder().encode(await this.#secret.read()));
115
115
  return {
116
116
  __wjstype: 'realtime',
117
117
  url: this.address,
118
- channel: `${this.#namespace}/${channel}`,
118
+ channel: channelString,
119
119
  token: jwt,
120
120
  authHost: process.env.REALTIME_HTTP_DOMAIN,
121
121
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wirejs-deploy-amplify-basic",
3
- "version": "0.0.102-realtime",
3
+ "version": "0.0.103-realtime",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -41,7 +41,7 @@
41
41
  "recursive-copy": "^2.0.14",
42
42
  "rimraf": "^6.0.1",
43
43
  "wirejs-dom": "^1.0.41",
44
- "wirejs-resources": "^0.1.70-realtime"
44
+ "wirejs-resources": "^0.1.71-realtime"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@aws-amplify/backend": "^1.14.0",