sst 2.25.6 → 2.26.1

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.
Files changed (52) hide show
  1. package/bootstrap.js +3 -3
  2. package/bus.js +2 -2
  3. package/cache.js +2 -2
  4. package/cdk/deployments-wrapper.js +2 -2
  5. package/cli/commands/dev.js +6 -5
  6. package/cli/commands/plugins/kysely.js +2 -2
  7. package/cli/commands/plugins/pothos.js +2 -2
  8. package/cli/commands/plugins/warmer.js +2 -2
  9. package/cli/local/server.js +75 -26
  10. package/cli/spinner.js +2 -2
  11. package/constructs/App.js +4 -3
  12. package/constructs/Function.d.ts +2 -2
  13. package/constructs/Function.js +1 -1
  14. package/constructs/context.d.ts +2 -7
  15. package/constructs/context.js +26 -8
  16. package/context/context2.d.ts +16 -0
  17. package/context/context2.js +108 -0
  18. package/context/handler.js +3 -4
  19. package/credentials.d.ts +3 -10
  20. package/credentials.js +5 -5
  21. package/iot.js +3 -3
  22. package/logger.js +2 -2
  23. package/node/actor/index.d.ts +2 -2
  24. package/node/actor/index.js +3 -3
  25. package/node/api/index.js +7 -7
  26. package/node/auth/session.js +1 -1
  27. package/node/event-bus/index.js +0 -1
  28. package/node/future/auth/session.js +1 -1
  29. package/node/util/loader.js +4 -4
  30. package/package.json +20 -19
  31. package/project.d.ts +0 -5
  32. package/project.js +5 -5
  33. package/runtime/handlers/python.js +1 -3
  34. package/runtime/handlers.js +3 -3
  35. package/runtime/iot.js +2 -2
  36. package/runtime/server.js +3 -3
  37. package/runtime/workers.js +2 -2
  38. package/stacks/app-metadata.js +2 -3
  39. package/stacks/metadata.d.ts +1 -1
  40. package/stacks/metadata.js +2 -5
  41. package/support/bootstrap-metadata-function/index.mjs +41338 -45328
  42. package/support/bridge/bridge.mjs +55 -65
  43. package/support/custom-resources/index.mjs +90699 -90561
  44. package/support/event-bus-retrier/index.mjs +57 -27
  45. package/support/job-manager/index.mjs +22257 -7697
  46. package/support/rds-migrator/index.mjs +41 -17
  47. package/support/script-function/index.mjs +33731 -35450
  48. package/support/signing-function/index.mjs +578 -32
  49. package/support/ssr-warmer/index.mjs +26855 -26892
  50. package/util/lazy.d.ts +1 -0
  51. package/util/lazy.js +11 -0
  52. package/watcher.js +2 -2
package/util/lazy.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare function lazy<T>(callback: () => T): () => T;
package/util/lazy.js ADDED
@@ -0,0 +1,11 @@
1
+ export function lazy(callback) {
2
+ let loaded = false;
3
+ let result;
4
+ return () => {
5
+ if (!loaded) {
6
+ result = callback();
7
+ loaded = true;
8
+ }
9
+ return result;
10
+ };
11
+ }
package/watcher.js CHANGED
@@ -1,9 +1,9 @@
1
- import { Context } from "./context/context.js";
2
1
  import chokidar from "chokidar";
3
2
  import { useBus } from "./bus.js";
4
3
  import path from "path";
5
4
  import { useProject } from "./project.js";
6
- export const useWatcher = Context.memo(() => {
5
+ import { lazy } from "./util/lazy.js";
6
+ export const useWatcher = lazy(() => {
7
7
  const project = useProject();
8
8
  const bus = useBus();
9
9
  const watcher = chokidar.watch([project.paths.root], {