wirejs-deploy-amplify-basic 0.0.104-realtime → 0.0.105-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.
|
@@ -77,15 +77,17 @@ export class RealtimeService extends Resource {
|
|
|
77
77
|
});
|
|
78
78
|
const request = new HttpRequest({
|
|
79
79
|
method: 'POST',
|
|
80
|
-
protocol: 'https:',
|
|
81
|
-
// hostname: `${process.env.REALTIME_DOMAIN}.appsync-api.${process.env.AWS_REGION}.amazonaws.com`,
|
|
82
80
|
hostname: process.env.REALTIME_HTTP_DOMAIN,
|
|
83
81
|
path: '/event',
|
|
84
82
|
headers: {
|
|
85
|
-
|
|
83
|
+
accept: 'application/json, text/javascript',
|
|
84
|
+
'content-encoding': 'amz-1.0',
|
|
85
|
+
'content-type': 'application/json; charset=UTF-8',
|
|
86
86
|
'x-amz-date': new Date().toISOString(),
|
|
87
|
+
host: process.env.REALTIME_HTTP_DOMAIN,
|
|
87
88
|
},
|
|
88
89
|
body: JSON.stringify({
|
|
90
|
+
id: crypto.randomUUID(),
|
|
89
91
|
channel: `${this.#namespace}/${channel}`,
|
|
90
92
|
events: events.map(event => JSON.stringify(event))
|
|
91
93
|
}),
|
|
@@ -96,6 +98,8 @@ export class RealtimeService extends Resource {
|
|
|
96
98
|
headers: signedRequest.headers,
|
|
97
99
|
body: signedRequest.body,
|
|
98
100
|
});
|
|
101
|
+
await response.text();
|
|
102
|
+
console.log('Response from publish:', response.status, response.statusText);
|
|
99
103
|
if (!response.ok) {
|
|
100
104
|
throw new Error(`Failed to publish to channel: ${response.statusText}`);
|
|
101
105
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wirejs-deploy-amplify-basic",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.105-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.
|
|
44
|
+
"wirejs-resources": "^0.1.73-realtime"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@aws-amplify/backend": "^1.14.0",
|