@geekmidas/envkit 0.0.7 → 0.1.0

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 (74) hide show
  1. package/README.md +228 -174
  2. package/dist/EnvironmentBuilder-DHfDXJUm.d.mts +131 -0
  3. package/dist/EnvironmentBuilder-DfmYRBm-.mjs +83 -0
  4. package/dist/EnvironmentBuilder-DfmYRBm-.mjs.map +1 -0
  5. package/dist/EnvironmentBuilder-W2wku49g.cjs +95 -0
  6. package/dist/EnvironmentBuilder-W2wku49g.cjs.map +1 -0
  7. package/dist/EnvironmentBuilder-Xuf2Dd9u.d.cts +131 -0
  8. package/dist/EnvironmentBuilder.cjs +4 -0
  9. package/dist/EnvironmentBuilder.d.cts +2 -0
  10. package/dist/EnvironmentBuilder.d.mts +2 -0
  11. package/dist/EnvironmentBuilder.mjs +3 -0
  12. package/dist/{EnvironmentParser-BDPDLv6i.cjs → EnvironmentParser-Bt246UeP.cjs} +46 -3
  13. package/dist/EnvironmentParser-Bt246UeP.cjs.map +1 -0
  14. package/dist/{EnvironmentParser-C-arQEHQ.d.mts → EnvironmentParser-CVWU1ooT.d.mts} +40 -2
  15. package/dist/{EnvironmentParser-CQUOGqc0.mjs → EnvironmentParser-c06agx31.mjs} +46 -3
  16. package/dist/EnvironmentParser-c06agx31.mjs.map +1 -0
  17. package/dist/{EnvironmentParser-X4h2Vp4r.d.cts → EnvironmentParser-tV-JjCg7.d.cts} +40 -2
  18. package/dist/EnvironmentParser.cjs +1 -1
  19. package/dist/EnvironmentParser.d.cts +1 -1
  20. package/dist/EnvironmentParser.d.mts +1 -1
  21. package/dist/EnvironmentParser.mjs +1 -1
  22. package/dist/SnifferEnvironmentParser.cjs +140 -0
  23. package/dist/SnifferEnvironmentParser.cjs.map +1 -0
  24. package/dist/SnifferEnvironmentParser.d.cts +50 -0
  25. package/dist/SnifferEnvironmentParser.d.mts +50 -0
  26. package/dist/SnifferEnvironmentParser.mjs +139 -0
  27. package/dist/SnifferEnvironmentParser.mjs.map +1 -0
  28. package/dist/SstEnvironmentBuilder-BuFw1hCe.cjs +125 -0
  29. package/dist/SstEnvironmentBuilder-BuFw1hCe.cjs.map +1 -0
  30. package/dist/SstEnvironmentBuilder-CjURMGjW.d.mts +177 -0
  31. package/dist/SstEnvironmentBuilder-D4oSo_KX.d.cts +177 -0
  32. package/dist/SstEnvironmentBuilder-DEa3lTUB.mjs +108 -0
  33. package/dist/SstEnvironmentBuilder-DEa3lTUB.mjs.map +1 -0
  34. package/dist/SstEnvironmentBuilder.cjs +7 -0
  35. package/dist/SstEnvironmentBuilder.d.cts +3 -0
  36. package/dist/SstEnvironmentBuilder.d.mts +3 -0
  37. package/dist/SstEnvironmentBuilder.mjs +4 -0
  38. package/dist/index.cjs +6 -2
  39. package/dist/index.d.cts +3 -2
  40. package/dist/index.d.mts +3 -2
  41. package/dist/index.mjs +3 -2
  42. package/dist/sst.cjs +30 -4
  43. package/dist/sst.cjs.map +1 -0
  44. package/dist/sst.d.cts +15 -93
  45. package/dist/sst.d.mts +15 -93
  46. package/dist/sst.mjs +26 -2
  47. package/dist/sst.mjs.map +1 -0
  48. package/docs/async-secrets-design.md +355 -0
  49. package/package.json +11 -2
  50. package/src/EnvironmentBuilder.ts +196 -0
  51. package/src/EnvironmentParser.ts +51 -2
  52. package/src/SnifferEnvironmentParser.ts +209 -0
  53. package/src/SstEnvironmentBuilder.ts +298 -0
  54. package/src/__tests__/EnvironmentBuilder.spec.ts +274 -0
  55. package/src/__tests__/EnvironmentParser.spec.ts +147 -0
  56. package/src/__tests__/SnifferEnvironmentParser.spec.ts +332 -0
  57. package/src/__tests__/SstEnvironmentBuilder.spec.ts +373 -0
  58. package/src/__tests__/sst.spec.ts +1 -1
  59. package/src/index.ts +13 -1
  60. package/src/sst.ts +45 -207
  61. package/dist/__tests__/ConfigParser.spec.cjs +0 -323
  62. package/dist/__tests__/ConfigParser.spec.d.cts +0 -1
  63. package/dist/__tests__/ConfigParser.spec.d.mts +0 -1
  64. package/dist/__tests__/ConfigParser.spec.mjs +0 -322
  65. package/dist/__tests__/EnvironmentParser.spec.cjs +0 -422
  66. package/dist/__tests__/EnvironmentParser.spec.d.cts +0 -1
  67. package/dist/__tests__/EnvironmentParser.spec.d.mts +0 -1
  68. package/dist/__tests__/EnvironmentParser.spec.mjs +0 -421
  69. package/dist/__tests__/sst.spec.cjs +0 -305
  70. package/dist/__tests__/sst.spec.d.cts +0 -1
  71. package/dist/__tests__/sst.spec.d.mts +0 -1
  72. package/dist/__tests__/sst.spec.mjs +0 -304
  73. package/dist/sst-BSxwaAdz.cjs +0 -146
  74. package/dist/sst-CQhO0S6y.mjs +0 -128
package/dist/index.d.cts CHANGED
@@ -1,2 +1,3 @@
1
- import { EnvironmentParser } from "./EnvironmentParser-X4h2Vp4r.cjs";
2
- export { EnvironmentParser };
1
+ import { EnvRecord, EnvValue, EnvironmentBuilder, EnvironmentBuilderOptions, EnvironmentResolver, InputValue, Resolvers, TypedInputValue, TypedResolvers, environmentCase } from "./EnvironmentBuilder-Xuf2Dd9u.cjs";
2
+ import { ConfigParser, EnvironmentParser } from "./EnvironmentParser-tV-JjCg7.cjs";
3
+ export { ConfigParser, EnvRecord, EnvValue, EnvironmentBuilder, EnvironmentBuilderOptions, EnvironmentParser, EnvironmentResolver, InputValue, Resolvers, TypedInputValue, TypedResolvers, environmentCase };
package/dist/index.d.mts CHANGED
@@ -1,2 +1,3 @@
1
- import { EnvironmentParser } from "./EnvironmentParser-C-arQEHQ.mjs";
2
- export { EnvironmentParser };
1
+ import { EnvRecord, EnvValue, EnvironmentBuilder, EnvironmentBuilderOptions, EnvironmentResolver, InputValue, Resolvers, TypedInputValue, TypedResolvers, environmentCase } from "./EnvironmentBuilder-DHfDXJUm.mjs";
2
+ import { ConfigParser, EnvironmentParser } from "./EnvironmentParser-CVWU1ooT.mjs";
3
+ export { ConfigParser, EnvRecord, EnvValue, EnvironmentBuilder, EnvironmentBuilderOptions, EnvironmentParser, EnvironmentResolver, InputValue, Resolvers, TypedInputValue, TypedResolvers, environmentCase };
package/dist/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
- import { EnvironmentParser } from "./EnvironmentParser-CQUOGqc0.mjs";
1
+ import { EnvironmentBuilder, environmentCase } from "./EnvironmentBuilder-DfmYRBm-.mjs";
2
+ import { ConfigParser, EnvironmentParser } from "./EnvironmentParser-c06agx31.mjs";
2
3
 
3
- export { EnvironmentParser };
4
+ export { ConfigParser, EnvironmentBuilder, EnvironmentParser, environmentCase };
package/dist/sst.cjs CHANGED
@@ -1,5 +1,31 @@
1
- const require_sst = require('./sst-BSxwaAdz.cjs');
1
+ const require_EnvironmentBuilder = require('./EnvironmentBuilder-W2wku49g.cjs');
2
+ const require_SstEnvironmentBuilder = require('./SstEnvironmentBuilder-BuFw1hCe.cjs');
2
3
 
3
- exports.ResourceType = require_sst.ResourceType;
4
- exports.environmentCase = require_sst.environmentCase;
5
- exports.normalizeResourceEnv = require_sst.normalizeResourceEnv;
4
+ //#region src/sst.ts
5
+ /**
6
+ * @deprecated Use `new SstEnvironmentBuilder(record).build()` instead.
7
+ *
8
+ * Normalizes SST resources and plain strings into environment variables.
9
+ * Processes resources based on their type and converts names to environment case.
10
+ *
11
+ * @param record - Object containing resources and/or string values
12
+ * @returns Normalized environment variables object
13
+ *
14
+ * @example
15
+ * // Old usage (deprecated):
16
+ * normalizeResourceEnv({ database: postgresResource })
17
+ *
18
+ * // New usage:
19
+ * new SstEnvironmentBuilder({ database: postgresResource }).build()
20
+ */
21
+ function normalizeResourceEnv(record) {
22
+ return new require_SstEnvironmentBuilder.SstEnvironmentBuilder(record).build();
23
+ }
24
+
25
+ //#endregion
26
+ exports.ResourceType = require_SstEnvironmentBuilder.ResourceType;
27
+ exports.SstEnvironmentBuilder = require_SstEnvironmentBuilder.SstEnvironmentBuilder;
28
+ exports.environmentCase = require_EnvironmentBuilder.environmentCase;
29
+ exports.normalizeResourceEnv = normalizeResourceEnv;
30
+ exports.sstResolvers = require_SstEnvironmentBuilder.sstResolvers;
31
+ //# sourceMappingURL=sst.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sst.cjs","names":["record: Record<string, SstResource | string>","SstEnvironmentBuilder"],"sources":["../src/sst.ts"],"sourcesContent":["// Re-export everything from SstEnvironmentBuilder\nexport {\n SstEnvironmentBuilder,\n sstResolvers,\n ResourceType,\n type ApiGatewayV2,\n type Postgres,\n type Function,\n type Bucket,\n type Vpc,\n type Secret,\n type SnsTopic,\n type SstResource,\n type ResourceProcessor,\n} from './SstEnvironmentBuilder';\n\n// Re-export environmentCase from EnvironmentBuilder\nexport { environmentCase } from './EnvironmentBuilder';\n\n// Re-export types from EnvironmentBuilder\nexport type {\n EnvRecord,\n EnvValue,\n EnvironmentBuilderOptions,\n} from './EnvironmentBuilder';\n\n// Import for deprecated function\nimport {\n SstEnvironmentBuilder,\n type SstResource,\n} from './SstEnvironmentBuilder';\n\n/**\n * @deprecated Use `new SstEnvironmentBuilder(record).build()` instead.\n *\n * Normalizes SST resources and plain strings into environment variables.\n * Processes resources based on their type and converts names to environment case.\n *\n * @param record - Object containing resources and/or string values\n * @returns Normalized environment variables object\n *\n * @example\n * // Old usage (deprecated):\n * normalizeResourceEnv({ database: postgresResource })\n *\n * // New usage:\n * new SstEnvironmentBuilder({ database: postgresResource }).build()\n */\nexport function normalizeResourceEnv(\n record: Record<string, SstResource | string>,\n): Record<string, string | number | boolean | Record<string, unknown>> {\n return new SstEnvironmentBuilder(record).build();\n}\n\n// Keep Resource type as deprecated alias for backwards compatibility\n/**\n * @deprecated Use `SstResource` instead.\n */\nexport type Resource = SstResource;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,qBACdA,QACqE;AACrE,QAAO,IAAIC,oDAAsB,QAAQ,OAAO;AACjD"}
package/dist/sst.d.cts CHANGED
@@ -1,34 +1,11 @@
1
+ import { EnvRecord, EnvValue, EnvironmentBuilderOptions, environmentCase } from "./EnvironmentBuilder-Xuf2Dd9u.cjs";
2
+ import { ApiGatewayV2, Bucket, Function, Postgres, ResourceProcessor, ResourceType, Secret, SnsTopic, SstEnvironmentBuilder, SstResource, Vpc, sstResolvers } from "./SstEnvironmentBuilder-D4oSo_KX.cjs";
3
+
1
4
  //#region src/sst.d.ts
5
+
2
6
  /**
3
- * Converts a string to environment variable case format (UPPER_SNAKE_CASE).
4
- * Numbers following underscores are preserved without the underscore.
7
+ * @deprecated Use `new SstEnvironmentBuilder(record).build()` instead.
5
8
  *
6
- * @param name - The string to convert
7
- * @returns The converted string in environment variable format
8
- *
9
- * @example
10
- * environmentCase('myVariable') // 'MY_VARIABLE'
11
- * environmentCase('api_v2') // 'APIV2'
12
- */
13
- declare function environmentCase(name: string): string;
14
- /**
15
- * Enumeration of supported SST (Serverless Stack Toolkit) resource types.
16
- * Used to identify and process different AWS and SST resources.
17
- */
18
- declare enum ResourceType {
19
- ApiGatewayV2 = "sst.aws.ApiGatewayV2",
20
- Postgres = "sst.aws.Postgres",
21
- Function = "sst.aws.Function",
22
- Bucket = "sst.aws.Bucket",
23
- Vpc = "sst.aws.Vpc",
24
- Secret = "sst.sst.Secret",
25
- SSTSecret = "sst:sst:Secret",
26
- SSTFunction = "sst:sst:Function",
27
- SSTApiGatewayV2 = "sst:aws:ApiGatewayV2",
28
- SSTPostgres = "sst:aws:Postgres",
29
- SSTBucket = "sst:aws:Bucket",
30
- }
31
- /**
32
9
  * Normalizes SST resources and plain strings into environment variables.
33
10
  * Processes resources based on their type and converts names to environment case.
34
11
  *
@@ -36,72 +13,17 @@ declare enum ResourceType {
36
13
  * @returns Normalized environment variables object
37
14
  *
38
15
  * @example
39
- * normalizeResourceEnv({
40
- * apiUrl: 'https://api.example.com',
41
- * database: { type: ResourceType.Postgres, ... }
42
- * })
43
- */
44
- declare function normalizeResourceEnv(record: Record<string, Resource | string>): Record<string, string>;
45
- /**
46
- * AWS API Gateway V2 resource type.
47
- * Represents an HTTP/WebSocket API.
48
- */
49
- type ApiGatewayV2 = {
50
- type: ResourceType.ApiGatewayV2;
51
- url: string;
52
- };
53
- /**
54
- * PostgreSQL database resource type.
55
- * Contains all connection details needed to connect to the database.
56
- */
57
- type Postgres = {
58
- database: string;
59
- host: string;
60
- password: string;
61
- port: number;
62
- type: ResourceType.Postgres;
63
- username: string;
64
- };
65
- /**
66
- * AWS Lambda Function resource type.
67
- */
68
- type Function = {
69
- name: string;
70
- type: ResourceType.Function;
71
- };
72
- /**
73
- * AWS S3 Bucket resource type.
74
- */
75
- type Bucket = {
76
- name: string;
77
- type: ResourceType.Bucket;
78
- };
79
- /**
80
- * AWS VPC (Virtual Private Cloud) resource type.
81
- */
82
- type Vpc = {
83
- bastion: string;
84
- type: ResourceType.Vpc;
85
- };
86
- /**
87
- * Secret resource type for storing sensitive values.
88
- */
89
- type Secret = {
90
- type: ResourceType.Secret;
91
- value: string;
92
- };
93
- /**
94
- * Union type of all supported SST resource types.
16
+ * // Old usage (deprecated):
17
+ * normalizeResourceEnv({ database: postgresResource })
18
+ *
19
+ * // New usage:
20
+ * new SstEnvironmentBuilder({ database: postgresResource }).build()
95
21
  */
96
- type Resource = ApiGatewayV2 | Postgres | Function | Bucket | Vpc | Secret;
22
+ declare function normalizeResourceEnv(record: Record<string, SstResource | string>): Record<string, string | number | boolean | Record<string, unknown>>;
97
23
  /**
98
- * Function type for processing a specific resource type into environment variables.
99
- *
100
- * @template K - The specific resource type
101
- * @param name - The resource name
102
- * @param value - The resource value
103
- * @returns Object mapping environment variable names to values
24
+ * @deprecated Use `SstResource` instead.
104
25
  */
105
- type ResourceProcessor<K extends Resource> = (name: string, value: K) => Record<string, string | number>;
26
+ type Resource = SstResource;
106
27
  //#endregion
107
- export { ApiGatewayV2, Bucket, Function, Postgres, Resource, ResourceProcessor, ResourceType, Secret, Vpc, environmentCase, normalizeResourceEnv };
28
+ export { ApiGatewayV2, Bucket, EnvRecord, EnvValue, EnvironmentBuilderOptions, Function, Postgres, Resource, ResourceProcessor, ResourceType, Secret, SnsTopic, SstEnvironmentBuilder, SstResource, Vpc, environmentCase, normalizeResourceEnv, sstResolvers };
29
+ //# sourceMappingURL=sst.d.cts.map
package/dist/sst.d.mts CHANGED
@@ -1,34 +1,11 @@
1
+ import { EnvRecord, EnvValue, EnvironmentBuilderOptions, environmentCase } from "./EnvironmentBuilder-DHfDXJUm.mjs";
2
+ import { ApiGatewayV2, Bucket, Function, Postgres, ResourceProcessor, ResourceType, Secret, SnsTopic, SstEnvironmentBuilder, SstResource, Vpc, sstResolvers } from "./SstEnvironmentBuilder-CjURMGjW.mjs";
3
+
1
4
  //#region src/sst.d.ts
5
+
2
6
  /**
3
- * Converts a string to environment variable case format (UPPER_SNAKE_CASE).
4
- * Numbers following underscores are preserved without the underscore.
7
+ * @deprecated Use `new SstEnvironmentBuilder(record).build()` instead.
5
8
  *
6
- * @param name - The string to convert
7
- * @returns The converted string in environment variable format
8
- *
9
- * @example
10
- * environmentCase('myVariable') // 'MY_VARIABLE'
11
- * environmentCase('api_v2') // 'APIV2'
12
- */
13
- declare function environmentCase(name: string): string;
14
- /**
15
- * Enumeration of supported SST (Serverless Stack Toolkit) resource types.
16
- * Used to identify and process different AWS and SST resources.
17
- */
18
- declare enum ResourceType {
19
- ApiGatewayV2 = "sst.aws.ApiGatewayV2",
20
- Postgres = "sst.aws.Postgres",
21
- Function = "sst.aws.Function",
22
- Bucket = "sst.aws.Bucket",
23
- Vpc = "sst.aws.Vpc",
24
- Secret = "sst.sst.Secret",
25
- SSTSecret = "sst:sst:Secret",
26
- SSTFunction = "sst:sst:Function",
27
- SSTApiGatewayV2 = "sst:aws:ApiGatewayV2",
28
- SSTPostgres = "sst:aws:Postgres",
29
- SSTBucket = "sst:aws:Bucket",
30
- }
31
- /**
32
9
  * Normalizes SST resources and plain strings into environment variables.
33
10
  * Processes resources based on their type and converts names to environment case.
34
11
  *
@@ -36,72 +13,17 @@ declare enum ResourceType {
36
13
  * @returns Normalized environment variables object
37
14
  *
38
15
  * @example
39
- * normalizeResourceEnv({
40
- * apiUrl: 'https://api.example.com',
41
- * database: { type: ResourceType.Postgres, ... }
42
- * })
43
- */
44
- declare function normalizeResourceEnv(record: Record<string, Resource | string>): Record<string, string>;
45
- /**
46
- * AWS API Gateway V2 resource type.
47
- * Represents an HTTP/WebSocket API.
48
- */
49
- type ApiGatewayV2 = {
50
- type: ResourceType.ApiGatewayV2;
51
- url: string;
52
- };
53
- /**
54
- * PostgreSQL database resource type.
55
- * Contains all connection details needed to connect to the database.
56
- */
57
- type Postgres = {
58
- database: string;
59
- host: string;
60
- password: string;
61
- port: number;
62
- type: ResourceType.Postgres;
63
- username: string;
64
- };
65
- /**
66
- * AWS Lambda Function resource type.
67
- */
68
- type Function = {
69
- name: string;
70
- type: ResourceType.Function;
71
- };
72
- /**
73
- * AWS S3 Bucket resource type.
74
- */
75
- type Bucket = {
76
- name: string;
77
- type: ResourceType.Bucket;
78
- };
79
- /**
80
- * AWS VPC (Virtual Private Cloud) resource type.
81
- */
82
- type Vpc = {
83
- bastion: string;
84
- type: ResourceType.Vpc;
85
- };
86
- /**
87
- * Secret resource type for storing sensitive values.
88
- */
89
- type Secret = {
90
- type: ResourceType.Secret;
91
- value: string;
92
- };
93
- /**
94
- * Union type of all supported SST resource types.
16
+ * // Old usage (deprecated):
17
+ * normalizeResourceEnv({ database: postgresResource })
18
+ *
19
+ * // New usage:
20
+ * new SstEnvironmentBuilder({ database: postgresResource }).build()
95
21
  */
96
- type Resource = ApiGatewayV2 | Postgres | Function | Bucket | Vpc | Secret;
22
+ declare function normalizeResourceEnv(record: Record<string, SstResource | string>): Record<string, string | number | boolean | Record<string, unknown>>;
97
23
  /**
98
- * Function type for processing a specific resource type into environment variables.
99
- *
100
- * @template K - The specific resource type
101
- * @param name - The resource name
102
- * @param value - The resource value
103
- * @returns Object mapping environment variable names to values
24
+ * @deprecated Use `SstResource` instead.
104
25
  */
105
- type ResourceProcessor<K extends Resource> = (name: string, value: K) => Record<string, string | number>;
26
+ type Resource = SstResource;
106
27
  //#endregion
107
- export { ApiGatewayV2, Bucket, Function, Postgres, Resource, ResourceProcessor, ResourceType, Secret, Vpc, environmentCase, normalizeResourceEnv };
28
+ export { ApiGatewayV2, Bucket, EnvRecord, EnvValue, EnvironmentBuilderOptions, Function, Postgres, Resource, ResourceProcessor, ResourceType, Secret, SnsTopic, SstEnvironmentBuilder, SstResource, Vpc, environmentCase, normalizeResourceEnv, sstResolvers };
29
+ //# sourceMappingURL=sst.d.mts.map
package/dist/sst.mjs CHANGED
@@ -1,3 +1,27 @@
1
- import { ResourceType, environmentCase, normalizeResourceEnv } from "./sst-CQhO0S6y.mjs";
1
+ import { environmentCase } from "./EnvironmentBuilder-DfmYRBm-.mjs";
2
+ import { ResourceType, SstEnvironmentBuilder, sstResolvers } from "./SstEnvironmentBuilder-DEa3lTUB.mjs";
2
3
 
3
- export { ResourceType, environmentCase, normalizeResourceEnv };
4
+ //#region src/sst.ts
5
+ /**
6
+ * @deprecated Use `new SstEnvironmentBuilder(record).build()` instead.
7
+ *
8
+ * Normalizes SST resources and plain strings into environment variables.
9
+ * Processes resources based on their type and converts names to environment case.
10
+ *
11
+ * @param record - Object containing resources and/or string values
12
+ * @returns Normalized environment variables object
13
+ *
14
+ * @example
15
+ * // Old usage (deprecated):
16
+ * normalizeResourceEnv({ database: postgresResource })
17
+ *
18
+ * // New usage:
19
+ * new SstEnvironmentBuilder({ database: postgresResource }).build()
20
+ */
21
+ function normalizeResourceEnv(record) {
22
+ return new SstEnvironmentBuilder(record).build();
23
+ }
24
+
25
+ //#endregion
26
+ export { ResourceType, SstEnvironmentBuilder, environmentCase, normalizeResourceEnv, sstResolvers };
27
+ //# sourceMappingURL=sst.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sst.mjs","names":["record: Record<string, SstResource | string>"],"sources":["../src/sst.ts"],"sourcesContent":["// Re-export everything from SstEnvironmentBuilder\nexport {\n SstEnvironmentBuilder,\n sstResolvers,\n ResourceType,\n type ApiGatewayV2,\n type Postgres,\n type Function,\n type Bucket,\n type Vpc,\n type Secret,\n type SnsTopic,\n type SstResource,\n type ResourceProcessor,\n} from './SstEnvironmentBuilder';\n\n// Re-export environmentCase from EnvironmentBuilder\nexport { environmentCase } from './EnvironmentBuilder';\n\n// Re-export types from EnvironmentBuilder\nexport type {\n EnvRecord,\n EnvValue,\n EnvironmentBuilderOptions,\n} from './EnvironmentBuilder';\n\n// Import for deprecated function\nimport {\n SstEnvironmentBuilder,\n type SstResource,\n} from './SstEnvironmentBuilder';\n\n/**\n * @deprecated Use `new SstEnvironmentBuilder(record).build()` instead.\n *\n * Normalizes SST resources and plain strings into environment variables.\n * Processes resources based on their type and converts names to environment case.\n *\n * @param record - Object containing resources and/or string values\n * @returns Normalized environment variables object\n *\n * @example\n * // Old usage (deprecated):\n * normalizeResourceEnv({ database: postgresResource })\n *\n * // New usage:\n * new SstEnvironmentBuilder({ database: postgresResource }).build()\n */\nexport function normalizeResourceEnv(\n record: Record<string, SstResource | string>,\n): Record<string, string | number | boolean | Record<string, unknown>> {\n return new SstEnvironmentBuilder(record).build();\n}\n\n// Keep Resource type as deprecated alias for backwards compatibility\n/**\n * @deprecated Use `SstResource` instead.\n */\nexport type Resource = SstResource;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,qBACdA,QACqE;AACrE,QAAO,IAAI,sBAAsB,QAAQ,OAAO;AACjD"}