sst 2.39.3 → 2.39.5

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/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export type { SSTConfig } from "./project.js";
2
+ export { Resource } from "./resource.js";
package/index.js CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export { Resource } from "./resource.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.39.3",
4
+ "version": "2.39.5",
5
5
  "bin": {
6
6
  "sst": "cli/sst.js"
7
7
  },
@@ -53,7 +53,6 @@
53
53
  "@babel/generator": "^7.20.5",
54
54
  "@babel/plugin-syntax-typescript": "^7.21.4",
55
55
  "@smithy/signature-v4": "^2.0.16",
56
- "@smithy/util-endpoints": "1.0.5",
57
56
  "@trpc/server": "9.16.0",
58
57
  "adm-zip": "^0.5.10",
59
58
  "aws-cdk-lib": "2.110.1",
@@ -121,7 +120,7 @@
121
120
  "@types/ws": "^8.5.3",
122
121
  "@types/yargs": "^17.0.13",
123
122
  "archiver": "^5.3.1",
124
- "astro-sst": "2.39.3",
123
+ "astro-sst": "2.39.5",
125
124
  "async": "^3.2.4",
126
125
  "tsx": "^3.12.1",
127
126
  "typescript": "^5.2.2",
package/resource.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ declare global {
2
+ const SST_LINKS: {
3
+ name: string;
4
+ value: any;
5
+ }[];
6
+ }
7
+ export declare const Resource: {
8
+ [k: string]: any;
9
+ };
package/resource.js ADDED
@@ -0,0 +1,9 @@
1
+ const resources = Object.fromEntries(SST_LINKS.map((item) => [item.name, item.value]));
2
+ export const Resource = new Proxy(resources, {
3
+ get(target, prop) {
4
+ if (!(prop in target)) {
5
+ throw new Error(`"${prop}" is not linked`);
6
+ }
7
+ return target[prop];
8
+ },
9
+ });