@geekmidas/envkit 1.0.7 → 1.1.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.
- package/CHANGELOG.md +48 -0
- package/dist/sst.cjs +280 -2
- package/dist/sst.cjs.map +1 -1
- package/dist/sst.d.cts +166 -2
- package/dist/sst.d.cts.map +1 -1
- package/dist/sst.d.mts +166 -2
- package/dist/sst.d.mts.map +1 -1
- package/dist/sst.mjs +273 -3
- package/dist/sst.mjs.map +1 -1
- package/package.json +2 -2
- package/src/SstEnvValidator.ts +369 -0
- package/src/SstEnvironmentBuilder.ts +26 -0
- package/src/__tests__/SstEnvValidator.spec.ts +236 -0
- package/src/__tests__/SstEnvironmentBuilder.spec.ts +4 -0
- package/src/__tests__/sst.spec.ts +36 -0
- package/src/sst.ts +16 -0
package/dist/sst.d.cts
CHANGED
|
@@ -14,6 +14,7 @@ declare enum ResourceType {
|
|
|
14
14
|
Vpc = "sst.aws.Vpc",
|
|
15
15
|
Secret = "sst.sst.Secret",
|
|
16
16
|
Dynamo = "sst.aws.Dynamo",
|
|
17
|
+
Queue = "sst.aws.Queue",
|
|
17
18
|
SSTSecret = "sst:sst:Secret",
|
|
18
19
|
SSTFunction = "sst:sst:Function",
|
|
19
20
|
SSTApiGatewayV2 = "sst:aws:ApiGatewayV2",
|
|
@@ -21,6 +22,7 @@ declare enum ResourceType {
|
|
|
21
22
|
SSTBucket = "sst:aws:Bucket",
|
|
22
23
|
SnsTopic = "sst:aws:SnsTopic",
|
|
23
24
|
SSTDynamo = "sst:aws:Dynamo",
|
|
25
|
+
SSTQueue = "sst:aws:Queue",
|
|
24
26
|
}
|
|
25
27
|
/**
|
|
26
28
|
* AWS API Gateway V2 resource type.
|
|
@@ -77,6 +79,14 @@ type SnsTopic = {
|
|
|
77
79
|
type: ResourceType.SnsTopic;
|
|
78
80
|
arn: string;
|
|
79
81
|
};
|
|
82
|
+
/**
|
|
83
|
+
* AWS SQS Queue resource type.
|
|
84
|
+
*/
|
|
85
|
+
type Queue = {
|
|
86
|
+
type: ResourceType.Queue | ResourceType.SSTQueue;
|
|
87
|
+
url: string;
|
|
88
|
+
arn: string;
|
|
89
|
+
};
|
|
80
90
|
/**
|
|
81
91
|
* AWS DynamoDB Table resource type.
|
|
82
92
|
*/
|
|
@@ -87,7 +97,7 @@ type Dynamo = {
|
|
|
87
97
|
/**
|
|
88
98
|
* Union type of all supported SST resource types.
|
|
89
99
|
*/
|
|
90
|
-
type SstResource = ApiGatewayV2 | Postgres | Function | Bucket | Vpc | Secret | SnsTopic | Dynamo;
|
|
100
|
+
type SstResource = ApiGatewayV2 | Postgres | Function | Bucket | Vpc | Secret | SnsTopic | Queue | Dynamo;
|
|
91
101
|
/**
|
|
92
102
|
* Function type for processing a specific resource type into environment variables.
|
|
93
103
|
*
|
|
@@ -182,6 +192,160 @@ declare class SstEnvironmentBuilder<TRecord extends Record<string, SstResource |
|
|
|
182
192
|
build(): EnvRecord;
|
|
183
193
|
}
|
|
184
194
|
//#endregion
|
|
195
|
+
//#region src/SstEnvValidator.d.ts
|
|
196
|
+
/**
|
|
197
|
+
* Variables AWS Lambda injects into the runtime. Always valid on AWS, but never
|
|
198
|
+
* assumed — opt in via `platform: 'aws'` or by spreading {@link AWS_RUNTIME_ENV_VARS}
|
|
199
|
+
* into `whitelist`.
|
|
200
|
+
*/
|
|
201
|
+
declare const AWS_RUNTIME_ENV_VARS: readonly ["AWS_REGION", "AWS_DEFAULT_REGION", "AWS_ENDPOINT_URL", "AWS_ENDPOINT", "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN", "AWS_LAMBDA_FUNCTION_NAME", "AWS_LAMBDA_FUNCTION_VERSION"];
|
|
202
|
+
/**
|
|
203
|
+
* Variables GCP injects into Cloud Functions / Cloud Run.
|
|
204
|
+
*/
|
|
205
|
+
declare const GCP_RUNTIME_ENV_VARS: readonly ["GOOGLE_CLOUD_PROJECT", "GCP_PROJECT", "FUNCTION_TARGET", "FUNCTION_SIGNATURE_TYPE", "K_SERVICE", "K_REVISION", "K_CONFIGURATION", "PORT"];
|
|
206
|
+
/**
|
|
207
|
+
* Variables Cloudflare exposes to Workers. Workers inject almost nothing into
|
|
208
|
+
* the global env, so this is intentionally minimal.
|
|
209
|
+
*/
|
|
210
|
+
declare const CLOUDFLARE_RUNTIME_ENV_VARS: readonly ["CF_PAGES", "CF_PAGES_URL"];
|
|
211
|
+
/**
|
|
212
|
+
* Registry of platform → always-valid runtime variables. Export, don't assume:
|
|
213
|
+
* a caller states the platform it deploys to and the matching set is trusted.
|
|
214
|
+
*/
|
|
215
|
+
declare const PLATFORM_ENV_VARS: {
|
|
216
|
+
readonly aws: readonly ["AWS_REGION", "AWS_DEFAULT_REGION", "AWS_ENDPOINT_URL", "AWS_ENDPOINT", "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN", "AWS_LAMBDA_FUNCTION_NAME", "AWS_LAMBDA_FUNCTION_VERSION"];
|
|
217
|
+
readonly gcp: readonly ["GOOGLE_CLOUD_PROJECT", "GCP_PROJECT", "FUNCTION_TARGET", "FUNCTION_SIGNATURE_TYPE", "K_SERVICE", "K_REVISION", "K_CONFIGURATION", "PORT"];
|
|
218
|
+
readonly cloudflare: readonly ["CF_PAGES", "CF_PAGES_URL"];
|
|
219
|
+
};
|
|
220
|
+
type Platform = keyof typeof PLATFORM_ENV_VARS;
|
|
221
|
+
/**
|
|
222
|
+
* The always-valid runtime variables for a platform. The "whitelist construct":
|
|
223
|
+
* resolve a platform to its set, to spread into `whitelist` or compare against.
|
|
224
|
+
*/
|
|
225
|
+
declare function platformEnvVars(platform: Platform): readonly string[];
|
|
226
|
+
/**
|
|
227
|
+
* Input shape for the validator: the same record `SstEnvironmentBuilder`
|
|
228
|
+
* accepts — keyed by resource name, valued by an SST resource (or a plain
|
|
229
|
+
* string for pass-through env vars).
|
|
230
|
+
*/
|
|
231
|
+
type LinkRecord = Record<string, SstResource | InputValue | string>;
|
|
232
|
+
interface ValidationResult {
|
|
233
|
+
valid: boolean;
|
|
234
|
+
/** Requested variables that are not available (excluding optional `?` vars). */
|
|
235
|
+
invalidVars: string[];
|
|
236
|
+
/** Every variable the links + whitelist make available. */
|
|
237
|
+
availableVars: string[];
|
|
238
|
+
/** Nearest available matches for each invalid variable (best first). */
|
|
239
|
+
suggestions: Record<string, string[]>;
|
|
240
|
+
}
|
|
241
|
+
interface EnvValidatorOptions {
|
|
242
|
+
/**
|
|
243
|
+
* Platform whose runtime-injected variables are always valid. Omit to assume
|
|
244
|
+
* none — the validator never bakes in a platform's variables.
|
|
245
|
+
*/
|
|
246
|
+
platform?: Platform;
|
|
247
|
+
/**
|
|
248
|
+
* Extra always-valid variables in addition to the platform set — typically
|
|
249
|
+
* the keys of a function's explicit `environment`.
|
|
250
|
+
*/
|
|
251
|
+
whitelist?: readonly string[];
|
|
252
|
+
/**
|
|
253
|
+
* Label for the deployable unit (e.g. a function name), used in error
|
|
254
|
+
* messages so a failure points at exactly one unit.
|
|
255
|
+
*/
|
|
256
|
+
context?: string;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Thrown when a deployable unit requires environment variables its links do not
|
|
260
|
+
* provide. Carries the structured `missing`/`available`/`suggestions` so callers
|
|
261
|
+
* can inspect the failure programmatically, not just read the message.
|
|
262
|
+
*/
|
|
263
|
+
declare class EnvValidationError extends Error {
|
|
264
|
+
readonly isEnvValidationError = true;
|
|
265
|
+
readonly missing: string[];
|
|
266
|
+
readonly available: string[];
|
|
267
|
+
readonly suggestions: Record<string, string[]>;
|
|
268
|
+
readonly context?: string;
|
|
269
|
+
constructor(args: {
|
|
270
|
+
missing: string[];
|
|
271
|
+
available: string[];
|
|
272
|
+
linkVars: string[];
|
|
273
|
+
suggestions: Record<string, string[]>;
|
|
274
|
+
context?: string;
|
|
275
|
+
});
|
|
276
|
+
private static format;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Derives the set of environment-variable **keys** a group of linked resources
|
|
280
|
+
* will produce at runtime — without resolving any value.
|
|
281
|
+
*
|
|
282
|
+
* This reuses the runtime resolvers (`sstResolvers`) via {@link EnvironmentBuilder},
|
|
283
|
+
* so the keys computed here are exactly the keys a deployed function receives:
|
|
284
|
+
* the validator and the runtime resolution share a single source of truth and
|
|
285
|
+
* cannot drift. Because every resolver's output keys depend only on the record
|
|
286
|
+
* key and the resource `type` (never the value), each resource is reduced to
|
|
287
|
+
* `{ type }` before building, so no SST `Output` is ever read.
|
|
288
|
+
*
|
|
289
|
+
* @example
|
|
290
|
+
* resolveEnvKeys({ db: { type: ResourceType.Postgres } });
|
|
291
|
+
* // ['DB_NAME', 'DB_HOST', 'DB_PASSWORD', 'DB_PORT', 'DB_USERNAME', 'DB_URL']
|
|
292
|
+
*/
|
|
293
|
+
declare function resolveEnvKeys(record: LinkRecord): string[];
|
|
294
|
+
/**
|
|
295
|
+
* Validates that the environment variables a deployable unit requires are
|
|
296
|
+
* actually provided by its linked resources — at infra time, before deploy.
|
|
297
|
+
*
|
|
298
|
+
* Available variables are the union of the keys derived from `links`
|
|
299
|
+
* ({@link resolveEnvKeys}), the chosen platform's runtime variables (only when
|
|
300
|
+
* `options.platform` is set — nothing is assumed), and any `options.whitelist`
|
|
301
|
+
* (e.g. the keys of a function's explicit `environment`). A requested variable
|
|
302
|
+
* suffixed with `?` is treated as optional and never causes a failure.
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* const validator = new EnvValidator(
|
|
306
|
+
* { db: { type: ResourceType.Postgres } },
|
|
307
|
+
* { platform: 'aws', whitelist: ['APP_NAME'], context: 'orders-fn' },
|
|
308
|
+
* );
|
|
309
|
+
* validator.assert(['DB_HOST', 'AWS_REGION', 'APP_NAME', 'SENTRY_DSN?']); // ok
|
|
310
|
+
* validator.assert(['DATABASE_URL']); // throws EnvValidationError (did you mean DB_URL?)
|
|
311
|
+
*/
|
|
312
|
+
declare class EnvValidator {
|
|
313
|
+
/** Every variable available — link-derived, platform, and extra whitelist. */
|
|
314
|
+
readonly availableVars: string[];
|
|
315
|
+
/** Just the variables the links provide (used for error context). */
|
|
316
|
+
readonly linkVars: string[];
|
|
317
|
+
readonly context?: string;
|
|
318
|
+
private readonly availableSet;
|
|
319
|
+
/** Per-link (record key → its env-var keys), for least-privilege filtering. */
|
|
320
|
+
private readonly linkVarsByName;
|
|
321
|
+
constructor(links: LinkRecord, options?: EnvValidatorOptions);
|
|
322
|
+
/**
|
|
323
|
+
* Returns the names of the links that provide at least one of the requested
|
|
324
|
+
* variables — so a construct can attach only the links a unit actually needs
|
|
325
|
+
* (least privilege) rather than the whole pool. Trailing `?` is ignored.
|
|
326
|
+
*/
|
|
327
|
+
getProvidersForEnvVars(requestedEnvVars: readonly string[]): string[];
|
|
328
|
+
/**
|
|
329
|
+
* Checks every requested variable against the available set. Variables
|
|
330
|
+
* ending in `?` are optional and never reported as invalid. Invalid
|
|
331
|
+
* variables come back with their nearest available matches.
|
|
332
|
+
*/
|
|
333
|
+
validate(requestedEnvVars: readonly string[]): ValidationResult;
|
|
334
|
+
/**
|
|
335
|
+
* Asserts that every requested variable is available, throwing an
|
|
336
|
+
* {@link EnvValidationError} otherwise. Intended to run in a construct's
|
|
337
|
+
* constructor so a misconfigured `sst.config.ts` fails at synth time, before
|
|
338
|
+
* any AWS call.
|
|
339
|
+
*/
|
|
340
|
+
assert(requestedEnvVars: readonly string[]): void;
|
|
341
|
+
/**
|
|
342
|
+
* Whether a single variable is available. Does not treat a trailing `?` as
|
|
343
|
+
* optional — pass the bare name.
|
|
344
|
+
*/
|
|
345
|
+
has(envVar: string): boolean;
|
|
346
|
+
}
|
|
347
|
+
//# sourceMappingURL=SstEnvValidator.d.ts.map
|
|
348
|
+
//#endregion
|
|
185
349
|
//#region src/sst.d.ts
|
|
186
350
|
/**
|
|
187
351
|
* @deprecated Use `new SstEnvironmentBuilder(record).build()` instead.
|
|
@@ -207,5 +371,5 @@ type Resource = SstResource;
|
|
|
207
371
|
//# sourceMappingURL=sst.d.ts.map
|
|
208
372
|
|
|
209
373
|
//#endregion
|
|
210
|
-
export { ApiGatewayV2, Bucket, Dynamo, EnvRecord, EnvValue, EnvironmentBuilderOptions, Function, Postgres, Resource, ResourceProcessor, ResourceType, Secret, SnsTopic, SstEnvironmentBuilder, SstResource, Vpc, environmentCase, normalizeResourceEnv, sstResolvers };
|
|
374
|
+
export { AWS_RUNTIME_ENV_VARS, ApiGatewayV2, Bucket, CLOUDFLARE_RUNTIME_ENV_VARS, Dynamo, EnvRecord, EnvValidationError, EnvValidator, EnvValidatorOptions, EnvValue, EnvironmentBuilderOptions, Function, GCP_RUNTIME_ENV_VARS, LinkRecord, PLATFORM_ENV_VARS, Platform, Postgres, Queue, Resource, ResourceProcessor, ResourceType, Secret, SnsTopic, SstEnvironmentBuilder, SstResource, ValidationResult, Vpc, environmentCase, normalizeResourceEnv, platformEnvVars, resolveEnvKeys, sstResolvers };
|
|
211
375
|
//# sourceMappingURL=sst.d.cts.map
|
package/dist/sst.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sst.d.cts","names":[],"sources":["../src/SstEnvironmentBuilder.ts","../src/sst.ts"],"sourcesContent":[],"mappings":";;;;;;AAaA;
|
|
1
|
+
{"version":3,"file":"sst.d.cts","names":[],"sources":["../src/SstEnvironmentBuilder.ts","../src/SstEnvValidator.ts","../src/sst.ts"],"sourcesContent":[],"mappings":";;;;;;AAaA;AA0BA;AAAwB,aA1BZ,YAAA;EA0BY,YACjB,GAAA,sBAAa;EAAY,QAAG,GAAA,kBAAa;EAAe,QAAA,GAAA,kBAAA;EAQnD,MAAA,GAAA,gBAAQ;EAAA,GAAA,GAAA,aAAA;EAAA,MACb,GAAA,gBAAa;EAAQ,MAAG,GAAA,gBAAa;EAAW,KAAA,GAAA,eAAA;EAW3C,SAAA,GAAQ,gBAAA;EAAA,WAAA,GAAA,kBAAA;EAAA,eACb,GAAa,sBAA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GAAA,OAAA,GEF0B,MFE1B,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA;;AAA+B;AAOnD;AAQY,KETA,QAAA,GAAW,WFSL"}
|
package/dist/sst.d.mts
CHANGED
|
@@ -14,6 +14,7 @@ declare enum ResourceType {
|
|
|
14
14
|
Vpc = "sst.aws.Vpc",
|
|
15
15
|
Secret = "sst.sst.Secret",
|
|
16
16
|
Dynamo = "sst.aws.Dynamo",
|
|
17
|
+
Queue = "sst.aws.Queue",
|
|
17
18
|
SSTSecret = "sst:sst:Secret",
|
|
18
19
|
SSTFunction = "sst:sst:Function",
|
|
19
20
|
SSTApiGatewayV2 = "sst:aws:ApiGatewayV2",
|
|
@@ -21,6 +22,7 @@ declare enum ResourceType {
|
|
|
21
22
|
SSTBucket = "sst:aws:Bucket",
|
|
22
23
|
SnsTopic = "sst:aws:SnsTopic",
|
|
23
24
|
SSTDynamo = "sst:aws:Dynamo",
|
|
25
|
+
SSTQueue = "sst:aws:Queue",
|
|
24
26
|
}
|
|
25
27
|
/**
|
|
26
28
|
* AWS API Gateway V2 resource type.
|
|
@@ -77,6 +79,14 @@ type SnsTopic = {
|
|
|
77
79
|
type: ResourceType.SnsTopic;
|
|
78
80
|
arn: string;
|
|
79
81
|
};
|
|
82
|
+
/**
|
|
83
|
+
* AWS SQS Queue resource type.
|
|
84
|
+
*/
|
|
85
|
+
type Queue = {
|
|
86
|
+
type: ResourceType.Queue | ResourceType.SSTQueue;
|
|
87
|
+
url: string;
|
|
88
|
+
arn: string;
|
|
89
|
+
};
|
|
80
90
|
/**
|
|
81
91
|
* AWS DynamoDB Table resource type.
|
|
82
92
|
*/
|
|
@@ -87,7 +97,7 @@ type Dynamo = {
|
|
|
87
97
|
/**
|
|
88
98
|
* Union type of all supported SST resource types.
|
|
89
99
|
*/
|
|
90
|
-
type SstResource = ApiGatewayV2 | Postgres | Function | Bucket | Vpc | Secret | SnsTopic | Dynamo;
|
|
100
|
+
type SstResource = ApiGatewayV2 | Postgres | Function | Bucket | Vpc | Secret | SnsTopic | Queue | Dynamo;
|
|
91
101
|
/**
|
|
92
102
|
* Function type for processing a specific resource type into environment variables.
|
|
93
103
|
*
|
|
@@ -182,6 +192,160 @@ declare class SstEnvironmentBuilder<TRecord extends Record<string, SstResource |
|
|
|
182
192
|
build(): EnvRecord;
|
|
183
193
|
}
|
|
184
194
|
//#endregion
|
|
195
|
+
//#region src/SstEnvValidator.d.ts
|
|
196
|
+
/**
|
|
197
|
+
* Variables AWS Lambda injects into the runtime. Always valid on AWS, but never
|
|
198
|
+
* assumed — opt in via `platform: 'aws'` or by spreading {@link AWS_RUNTIME_ENV_VARS}
|
|
199
|
+
* into `whitelist`.
|
|
200
|
+
*/
|
|
201
|
+
declare const AWS_RUNTIME_ENV_VARS: readonly ["AWS_REGION", "AWS_DEFAULT_REGION", "AWS_ENDPOINT_URL", "AWS_ENDPOINT", "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN", "AWS_LAMBDA_FUNCTION_NAME", "AWS_LAMBDA_FUNCTION_VERSION"];
|
|
202
|
+
/**
|
|
203
|
+
* Variables GCP injects into Cloud Functions / Cloud Run.
|
|
204
|
+
*/
|
|
205
|
+
declare const GCP_RUNTIME_ENV_VARS: readonly ["GOOGLE_CLOUD_PROJECT", "GCP_PROJECT", "FUNCTION_TARGET", "FUNCTION_SIGNATURE_TYPE", "K_SERVICE", "K_REVISION", "K_CONFIGURATION", "PORT"];
|
|
206
|
+
/**
|
|
207
|
+
* Variables Cloudflare exposes to Workers. Workers inject almost nothing into
|
|
208
|
+
* the global env, so this is intentionally minimal.
|
|
209
|
+
*/
|
|
210
|
+
declare const CLOUDFLARE_RUNTIME_ENV_VARS: readonly ["CF_PAGES", "CF_PAGES_URL"];
|
|
211
|
+
/**
|
|
212
|
+
* Registry of platform → always-valid runtime variables. Export, don't assume:
|
|
213
|
+
* a caller states the platform it deploys to and the matching set is trusted.
|
|
214
|
+
*/
|
|
215
|
+
declare const PLATFORM_ENV_VARS: {
|
|
216
|
+
readonly aws: readonly ["AWS_REGION", "AWS_DEFAULT_REGION", "AWS_ENDPOINT_URL", "AWS_ENDPOINT", "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN", "AWS_LAMBDA_FUNCTION_NAME", "AWS_LAMBDA_FUNCTION_VERSION"];
|
|
217
|
+
readonly gcp: readonly ["GOOGLE_CLOUD_PROJECT", "GCP_PROJECT", "FUNCTION_TARGET", "FUNCTION_SIGNATURE_TYPE", "K_SERVICE", "K_REVISION", "K_CONFIGURATION", "PORT"];
|
|
218
|
+
readonly cloudflare: readonly ["CF_PAGES", "CF_PAGES_URL"];
|
|
219
|
+
};
|
|
220
|
+
type Platform = keyof typeof PLATFORM_ENV_VARS;
|
|
221
|
+
/**
|
|
222
|
+
* The always-valid runtime variables for a platform. The "whitelist construct":
|
|
223
|
+
* resolve a platform to its set, to spread into `whitelist` or compare against.
|
|
224
|
+
*/
|
|
225
|
+
declare function platformEnvVars(platform: Platform): readonly string[];
|
|
226
|
+
/**
|
|
227
|
+
* Input shape for the validator: the same record `SstEnvironmentBuilder`
|
|
228
|
+
* accepts — keyed by resource name, valued by an SST resource (or a plain
|
|
229
|
+
* string for pass-through env vars).
|
|
230
|
+
*/
|
|
231
|
+
type LinkRecord = Record<string, SstResource | InputValue | string>;
|
|
232
|
+
interface ValidationResult {
|
|
233
|
+
valid: boolean;
|
|
234
|
+
/** Requested variables that are not available (excluding optional `?` vars). */
|
|
235
|
+
invalidVars: string[];
|
|
236
|
+
/** Every variable the links + whitelist make available. */
|
|
237
|
+
availableVars: string[];
|
|
238
|
+
/** Nearest available matches for each invalid variable (best first). */
|
|
239
|
+
suggestions: Record<string, string[]>;
|
|
240
|
+
}
|
|
241
|
+
interface EnvValidatorOptions {
|
|
242
|
+
/**
|
|
243
|
+
* Platform whose runtime-injected variables are always valid. Omit to assume
|
|
244
|
+
* none — the validator never bakes in a platform's variables.
|
|
245
|
+
*/
|
|
246
|
+
platform?: Platform;
|
|
247
|
+
/**
|
|
248
|
+
* Extra always-valid variables in addition to the platform set — typically
|
|
249
|
+
* the keys of a function's explicit `environment`.
|
|
250
|
+
*/
|
|
251
|
+
whitelist?: readonly string[];
|
|
252
|
+
/**
|
|
253
|
+
* Label for the deployable unit (e.g. a function name), used in error
|
|
254
|
+
* messages so a failure points at exactly one unit.
|
|
255
|
+
*/
|
|
256
|
+
context?: string;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Thrown when a deployable unit requires environment variables its links do not
|
|
260
|
+
* provide. Carries the structured `missing`/`available`/`suggestions` so callers
|
|
261
|
+
* can inspect the failure programmatically, not just read the message.
|
|
262
|
+
*/
|
|
263
|
+
declare class EnvValidationError extends Error {
|
|
264
|
+
readonly isEnvValidationError = true;
|
|
265
|
+
readonly missing: string[];
|
|
266
|
+
readonly available: string[];
|
|
267
|
+
readonly suggestions: Record<string, string[]>;
|
|
268
|
+
readonly context?: string;
|
|
269
|
+
constructor(args: {
|
|
270
|
+
missing: string[];
|
|
271
|
+
available: string[];
|
|
272
|
+
linkVars: string[];
|
|
273
|
+
suggestions: Record<string, string[]>;
|
|
274
|
+
context?: string;
|
|
275
|
+
});
|
|
276
|
+
private static format;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Derives the set of environment-variable **keys** a group of linked resources
|
|
280
|
+
* will produce at runtime — without resolving any value.
|
|
281
|
+
*
|
|
282
|
+
* This reuses the runtime resolvers (`sstResolvers`) via {@link EnvironmentBuilder},
|
|
283
|
+
* so the keys computed here are exactly the keys a deployed function receives:
|
|
284
|
+
* the validator and the runtime resolution share a single source of truth and
|
|
285
|
+
* cannot drift. Because every resolver's output keys depend only on the record
|
|
286
|
+
* key and the resource `type` (never the value), each resource is reduced to
|
|
287
|
+
* `{ type }` before building, so no SST `Output` is ever read.
|
|
288
|
+
*
|
|
289
|
+
* @example
|
|
290
|
+
* resolveEnvKeys({ db: { type: ResourceType.Postgres } });
|
|
291
|
+
* // ['DB_NAME', 'DB_HOST', 'DB_PASSWORD', 'DB_PORT', 'DB_USERNAME', 'DB_URL']
|
|
292
|
+
*/
|
|
293
|
+
declare function resolveEnvKeys(record: LinkRecord): string[];
|
|
294
|
+
/**
|
|
295
|
+
* Validates that the environment variables a deployable unit requires are
|
|
296
|
+
* actually provided by its linked resources — at infra time, before deploy.
|
|
297
|
+
*
|
|
298
|
+
* Available variables are the union of the keys derived from `links`
|
|
299
|
+
* ({@link resolveEnvKeys}), the chosen platform's runtime variables (only when
|
|
300
|
+
* `options.platform` is set — nothing is assumed), and any `options.whitelist`
|
|
301
|
+
* (e.g. the keys of a function's explicit `environment`). A requested variable
|
|
302
|
+
* suffixed with `?` is treated as optional and never causes a failure.
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* const validator = new EnvValidator(
|
|
306
|
+
* { db: { type: ResourceType.Postgres } },
|
|
307
|
+
* { platform: 'aws', whitelist: ['APP_NAME'], context: 'orders-fn' },
|
|
308
|
+
* );
|
|
309
|
+
* validator.assert(['DB_HOST', 'AWS_REGION', 'APP_NAME', 'SENTRY_DSN?']); // ok
|
|
310
|
+
* validator.assert(['DATABASE_URL']); // throws EnvValidationError (did you mean DB_URL?)
|
|
311
|
+
*/
|
|
312
|
+
declare class EnvValidator {
|
|
313
|
+
/** Every variable available — link-derived, platform, and extra whitelist. */
|
|
314
|
+
readonly availableVars: string[];
|
|
315
|
+
/** Just the variables the links provide (used for error context). */
|
|
316
|
+
readonly linkVars: string[];
|
|
317
|
+
readonly context?: string;
|
|
318
|
+
private readonly availableSet;
|
|
319
|
+
/** Per-link (record key → its env-var keys), for least-privilege filtering. */
|
|
320
|
+
private readonly linkVarsByName;
|
|
321
|
+
constructor(links: LinkRecord, options?: EnvValidatorOptions);
|
|
322
|
+
/**
|
|
323
|
+
* Returns the names of the links that provide at least one of the requested
|
|
324
|
+
* variables — so a construct can attach only the links a unit actually needs
|
|
325
|
+
* (least privilege) rather than the whole pool. Trailing `?` is ignored.
|
|
326
|
+
*/
|
|
327
|
+
getProvidersForEnvVars(requestedEnvVars: readonly string[]): string[];
|
|
328
|
+
/**
|
|
329
|
+
* Checks every requested variable against the available set. Variables
|
|
330
|
+
* ending in `?` are optional and never reported as invalid. Invalid
|
|
331
|
+
* variables come back with their nearest available matches.
|
|
332
|
+
*/
|
|
333
|
+
validate(requestedEnvVars: readonly string[]): ValidationResult;
|
|
334
|
+
/**
|
|
335
|
+
* Asserts that every requested variable is available, throwing an
|
|
336
|
+
* {@link EnvValidationError} otherwise. Intended to run in a construct's
|
|
337
|
+
* constructor so a misconfigured `sst.config.ts` fails at synth time, before
|
|
338
|
+
* any AWS call.
|
|
339
|
+
*/
|
|
340
|
+
assert(requestedEnvVars: readonly string[]): void;
|
|
341
|
+
/**
|
|
342
|
+
* Whether a single variable is available. Does not treat a trailing `?` as
|
|
343
|
+
* optional — pass the bare name.
|
|
344
|
+
*/
|
|
345
|
+
has(envVar: string): boolean;
|
|
346
|
+
}
|
|
347
|
+
//# sourceMappingURL=SstEnvValidator.d.ts.map
|
|
348
|
+
//#endregion
|
|
185
349
|
//#region src/sst.d.ts
|
|
186
350
|
/**
|
|
187
351
|
* @deprecated Use `new SstEnvironmentBuilder(record).build()` instead.
|
|
@@ -207,5 +371,5 @@ type Resource = SstResource;
|
|
|
207
371
|
//# sourceMappingURL=sst.d.ts.map
|
|
208
372
|
|
|
209
373
|
//#endregion
|
|
210
|
-
export { ApiGatewayV2, Bucket, Dynamo, EnvRecord, EnvValue, EnvironmentBuilderOptions, Function, Postgres, Resource, ResourceProcessor, ResourceType, Secret, SnsTopic, SstEnvironmentBuilder, SstResource, Vpc, environmentCase, normalizeResourceEnv, sstResolvers };
|
|
374
|
+
export { AWS_RUNTIME_ENV_VARS, ApiGatewayV2, Bucket, CLOUDFLARE_RUNTIME_ENV_VARS, Dynamo, EnvRecord, EnvValidationError, EnvValidator, EnvValidatorOptions, EnvValue, EnvironmentBuilderOptions, Function, GCP_RUNTIME_ENV_VARS, LinkRecord, PLATFORM_ENV_VARS, Platform, Postgres, Queue, Resource, ResourceProcessor, ResourceType, Secret, SnsTopic, SstEnvironmentBuilder, SstResource, ValidationResult, Vpc, environmentCase, normalizeResourceEnv, platformEnvVars, resolveEnvKeys, sstResolvers };
|
|
211
375
|
//# sourceMappingURL=sst.d.mts.map
|
package/dist/sst.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sst.d.mts","names":[],"sources":["../src/SstEnvironmentBuilder.ts","../src/sst.ts"],"sourcesContent":[],"mappings":";;;;;;AAaA;
|
|
1
|
+
{"version":3,"file":"sst.d.mts","names":[],"sources":["../src/SstEnvironmentBuilder.ts","../src/SstEnvValidator.ts","../src/sst.ts"],"sourcesContent":[],"mappings":";;;;;;AAaA;AA0BA;AAAwB,aA1BZ,YAAA;EA0BY,YACjB,GAAA,sBAAa;EAAY,QAAG,GAAA,kBAAa;EAAe,QAAA,GAAA,kBAAA;EAQnD,MAAA,GAAA,gBAAQ;EAAA,GAAA,GAAA,aAAA;EAAA,MACb,GAAA,gBAAa;EAAQ,MAAG,GAAA,gBAAa;EAAW,KAAA,GAAA,eAAA;EAW3C,SAAA,GAAQ,gBAAA;EAAA,WAAA,GAAA,kBAAA;EAAA,eACb,GAAa,sBAAA;EAAQ,WAAG,GAAA,kBAAa;EAAW,SAAA,GAAA,gBAAA;EAO3C,QAAA,GAAM,kBAAA;EAAA,SAAA,GAAA,gBAAA;EAAA,QACX,GAAA,eAAa;;AAA+B;AAOnD;AAQA;;AACO,KA9CK,YAAA,GA8CQ;EAAM,IAAG,EA7CtB,YAAA,CAAa,YA6CsB,GA7CP,YAAA,CAAa,eA6CN;EAAS,GAAA,EAAA,MAAA;AAOnD,CAAA;AAQA;;;;AACiD,KArDrC,QAAA,GAqDqC;EAQrC,IAAA,EA5DL,YAAA,CAAa,QA4DF,GA5Da,YAAA,CAAa,WA4D1B;EAAA,QAAA,EAAA,MA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