sst 2.1.23 → 2.1.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sst",
3
- "version": "2.1.23",
3
+ "version": "2.1.24",
4
4
  "bin": {
5
5
  "sst": "cli/sst.js"
6
6
  },
package/runtime/iot.js CHANGED
@@ -6,12 +6,12 @@ export const useIOTBridge = Context.memo(async () => {
6
6
  const iot = await useIOT();
7
7
  const topic = `${iot.prefix}/events`;
8
8
  bus.subscribe("function.success", async (evt) => {
9
- iot.publish(topic, "function.success", evt.properties);
9
+ iot.publish(topic + "/" + evt.properties.workerID, "function.success", evt.properties);
10
10
  });
11
11
  bus.subscribe("function.error", async (evt) => {
12
- iot.publish(topic, "function.error", evt.properties);
12
+ iot.publish(topic + "/" + evt.properties.workerID, "function.error", evt.properties);
13
13
  });
14
14
  bus.subscribe("function.ack", async (evt) => {
15
- iot.publish(topic, "function.ack", evt.properties);
15
+ iot.publish(topic + "/" + evt.properties.workerID, "function.ack", evt.properties);
16
16
  });
17
17
  });
package/sst.mjs CHANGED
@@ -2742,13 +2742,25 @@ var init_iot2 = __esm({
2742
2742
  const iot2 = await useIOT();
2743
2743
  const topic = `${iot2.prefix}/events`;
2744
2744
  bus.subscribe("function.success", async (evt) => {
2745
- iot2.publish(topic, "function.success", evt.properties);
2745
+ iot2.publish(
2746
+ topic + "/" + evt.properties.workerID,
2747
+ "function.success",
2748
+ evt.properties
2749
+ );
2746
2750
  });
2747
2751
  bus.subscribe("function.error", async (evt) => {
2748
- iot2.publish(topic, "function.error", evt.properties);
2752
+ iot2.publish(
2753
+ topic + "/" + evt.properties.workerID,
2754
+ "function.error",
2755
+ evt.properties
2756
+ );
2749
2757
  });
2750
2758
  bus.subscribe("function.ack", async (evt) => {
2751
- iot2.publish(topic, "function.ack", evt.properties);
2759
+ iot2.publish(
2760
+ topic + "/" + evt.properties.workerID,
2761
+ "function.ack",
2762
+ evt.properties
2763
+ );
2752
2764
  });
2753
2765
  });
2754
2766
  }