sst 3.3.33 → 3.3.34
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/dist/aws/realtime.js +4 -4
- package/package.json +6 -6
package/dist/aws/realtime.js
CHANGED
|
@@ -28,7 +28,7 @@ export var realtime;
|
|
|
28
28
|
*/
|
|
29
29
|
function authorizer(input) {
|
|
30
30
|
return async (evt, context) => {
|
|
31
|
-
const [, , , region, accountId] = context.invokedFunctionArn.split(":");
|
|
31
|
+
const [, partition, , region, accountId] = context.invokedFunctionArn.split(":");
|
|
32
32
|
const token = Buffer.from(evt.protocolData.mqtt?.password ?? "", "base64").toString();
|
|
33
33
|
const { principalId = evt.protocolData.mqtt?.username || Date.now().toString(), disconnectAfterInSeconds = 86400, refreshAfterInSeconds = 300, subscribe, publish, policyDocuments, } = await input(token);
|
|
34
34
|
return {
|
|
@@ -50,7 +50,7 @@ export var realtime;
|
|
|
50
50
|
{
|
|
51
51
|
Action: "iot:Receive",
|
|
52
52
|
Effect: "Allow",
|
|
53
|
-
Resource: subscribe.map((t) => `arn:
|
|
53
|
+
Resource: subscribe.map((t) => `arn:${partition}:iot:${region}:${accountId}:topic/${t}`),
|
|
54
54
|
},
|
|
55
55
|
]
|
|
56
56
|
: []),
|
|
@@ -59,7 +59,7 @@ export var realtime;
|
|
|
59
59
|
{
|
|
60
60
|
Action: "iot:Subscribe",
|
|
61
61
|
Effect: "Allow",
|
|
62
|
-
Resource: subscribe.map((t) => `arn:
|
|
62
|
+
Resource: subscribe.map((t) => `arn:${partition}:iot:${region}:${accountId}:topicfilter/${t}`),
|
|
63
63
|
},
|
|
64
64
|
]
|
|
65
65
|
: []),
|
|
@@ -68,7 +68,7 @@ export var realtime;
|
|
|
68
68
|
{
|
|
69
69
|
Action: "iot:Publish",
|
|
70
70
|
Effect: "Allow",
|
|
71
|
-
Resource: publish.map((t) => `arn:
|
|
71
|
+
Resource: publish.map((t) => `arn:${partition}:iot:${region}:${accountId}:topic/${t}`),
|
|
72
72
|
},
|
|
73
73
|
]
|
|
74
74
|
: []),
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "sst",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
|
-
"version": "3.3.
|
|
6
|
+
"version": "3.3.34",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": "./dist/index.js",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"sst-linux-x64": "3.3.
|
|
51
|
-
"sst-linux-x86": "3.3.
|
|
52
|
-
"sst-linux-arm64": "3.3.
|
|
53
|
-
"sst-darwin-x64": "3.3.
|
|
54
|
-
"sst-darwin-arm64": "3.3.
|
|
50
|
+
"sst-linux-x64": "3.3.34",
|
|
51
|
+
"sst-linux-x86": "3.3.34",
|
|
52
|
+
"sst-linux-arm64": "3.3.34",
|
|
53
|
+
"sst-darwin-x64": "3.3.34",
|
|
54
|
+
"sst-darwin-arm64": "3.3.34"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"aws4fetch": "^1.0.18",
|