sst 2.1.18 → 2.1.20

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.18",
3
+ "version": "2.1.20",
4
4
  "bin": {
5
5
  "sst": "cli/sst.js"
6
6
  },
@@ -56,6 +56,8 @@ export const useRuntimeHandlers = Context.memo(() => {
56
56
  recursive: true,
57
57
  });
58
58
  if (mode === "start") {
59
+ const dir = path.dirname(toPath);
60
+ await fs.mkdir(dir, { recursive: true });
59
61
  await fs.symlink(fromPath, toPath);
60
62
  }
61
63
  }));
@@ -27,7 +27,6 @@ interface Worker {
27
27
  export declare const useRuntimeWorkers: () => Promise<{
28
28
  fromID(workerID: string): Worker;
29
29
  getCurrentRequestID(workerID: string): string | undefined;
30
- setCurrentRequestID(workerID: string, requestID: string): void;
31
30
  stdout(workerID: string, message: string): void;
32
31
  exited(workerID: string): void;
33
32
  subscribe: <Type extends "worker.started" | "worker.stopped" | "worker.exited" | "worker.stdout">(type: Type, cb: (payload: import("../bus.js").EventPayload<Type>) => void) => {
@@ -25,6 +25,7 @@ export const useRuntimeWorkers = Context.memo(async () => {
25
25
  functionID: evt.properties.functionID,
26
26
  workerID: evt.properties.workerID,
27
27
  });
28
+ lastRequestId.set(evt.properties.workerID, evt.properties.requestID);
28
29
  let worker = workers.get(evt.properties.workerID);
29
30
  if (worker)
30
31
  return;
@@ -35,7 +36,6 @@ export const useRuntimeWorkers = Context.memo(async () => {
35
36
  const build = await builder.artifact(evt.properties.functionID);
36
37
  if (!build)
37
38
  return;
38
- lastRequestId.set(evt.properties.workerID, evt.properties.requestID);
39
39
  await handler.startWorker({
40
40
  ...build,
41
41
  workerID: evt.properties.workerID,
@@ -58,9 +58,6 @@ export const useRuntimeWorkers = Context.memo(async () => {
58
58
  getCurrentRequestID(workerID) {
59
59
  return lastRequestId.get(workerID);
60
60
  },
61
- setCurrentRequestID(workerID, requestID) {
62
- lastRequestId.set(workerID, requestID);
63
- },
64
61
  stdout(workerID, message) {
65
62
  const worker = workers.get(workerID);
66
63
  bus.publish("worker.stdout", {
@@ -74,6 +71,7 @@ export const useRuntimeWorkers = Context.memo(async () => {
74
71
  if (!existing)
75
72
  return;
76
73
  workers.delete(workerID);
74
+ lastRequestId.delete(workerID);
77
75
  bus.publish("worker.exited", existing);
78
76
  },
79
77
  subscribe: bus.forward("worker.started", "worker.stopped", "worker.exited", "worker.stdout"),
package/sst.mjs CHANGED
@@ -2243,6 +2243,8 @@ var init_handlers = __esm({
2243
2243
  recursive: true
2244
2244
  });
2245
2245
  if (mode === "start") {
2246
+ const dir = path7.dirname(toPath);
2247
+ await fs7.mkdir(dir, { recursive: true });
2246
2248
  await fs7.symlink(fromPath, toPath);
2247
2249
  }
2248
2250
  })
@@ -2540,6 +2542,7 @@ var init_workers = __esm({
2540
2542
  functionID: evt.properties.functionID,
2541
2543
  workerID: evt.properties.workerID
2542
2544
  });
2545
+ lastRequestId.set(evt.properties.workerID, evt.properties.requestID);
2543
2546
  let worker = workers.get(evt.properties.workerID);
2544
2547
  if (worker)
2545
2548
  return;
@@ -2550,7 +2553,6 @@ var init_workers = __esm({
2550
2553
  const build2 = await builder.artifact(evt.properties.functionID);
2551
2554
  if (!build2)
2552
2555
  return;
2553
- lastRequestId.set(evt.properties.workerID, evt.properties.requestID);
2554
2556
  await handler.startWorker({
2555
2557
  ...build2,
2556
2558
  workerID: evt.properties.workerID,
@@ -2573,9 +2575,6 @@ var init_workers = __esm({
2573
2575
  getCurrentRequestID(workerID) {
2574
2576
  return lastRequestId.get(workerID);
2575
2577
  },
2576
- setCurrentRequestID(workerID, requestID) {
2577
- lastRequestId.set(workerID, requestID);
2578
- },
2579
2578
  stdout(workerID, message) {
2580
2579
  const worker = workers.get(workerID);
2581
2580
  bus.publish("worker.stdout", {
@@ -2589,6 +2588,7 @@ var init_workers = __esm({
2589
2588
  if (!existing)
2590
2589
  return;
2591
2590
  workers.delete(workerID);
2591
+ lastRequestId.delete(workerID);
2592
2592
  bus.publish("worker.exited", existing);
2593
2593
  },
2594
2594
  subscribe: bus.forward(