@venturekit/infra 0.0.0-dev.20260514025219 → 0.0.0-dev.20260515022321
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/dist/cdk/app-stack.d.ts +330 -0
- package/dist/cdk/app-stack.d.ts.map +1 -0
- package/dist/cdk/app-stack.js +875 -0
- package/dist/cdk/app-stack.js.map +1 -0
- package/dist/cdk/config-stack.d.ts +104 -0
- package/dist/cdk/config-stack.d.ts.map +1 -0
- package/dist/cdk/config-stack.js +161 -0
- package/dist/cdk/config-stack.js.map +1 -0
- package/dist/cdk/data-stack.d.ts +198 -0
- package/dist/cdk/data-stack.d.ts.map +1 -0
- package/dist/cdk/data-stack.js +511 -0
- package/dist/cdk/data-stack.js.map +1 -0
- package/dist/cdk/edge-stack.d.ts +91 -0
- package/dist/cdk/edge-stack.d.ts.map +1 -0
- package/dist/cdk/edge-stack.js +364 -0
- package/dist/cdk/edge-stack.js.map +1 -0
- package/dist/cdk/identity-stack.d.ts +98 -0
- package/dist/cdk/identity-stack.d.ts.map +1 -0
- package/dist/cdk/identity-stack.js +254 -0
- package/dist/cdk/identity-stack.js.map +1 -0
- package/dist/cdk/index.d.ts +16 -0
- package/dist/cdk/index.d.ts.map +1 -1
- package/dist/cdk/index.js +17 -0
- package/dist/cdk/index.js.map +1 -1
- package/dist/cdk/messaging-stack.d.ts +109 -0
- package/dist/cdk/messaging-stack.d.ts.map +1 -0
- package/dist/cdk/messaging-stack.js +320 -0
- package/dist/cdk/messaging-stack.js.map +1 -0
- package/dist/cdk/network-stack.d.ts +87 -0
- package/dist/cdk/network-stack.d.ts.map +1 -0
- package/dist/cdk/network-stack.js +265 -0
- package/dist/cdk/network-stack.js.map +1 -0
- package/dist/cdk/shared/cross-stack-refs.d.ts +278 -0
- package/dist/cdk/shared/cross-stack-refs.d.ts.map +1 -0
- package/dist/cdk/shared/cross-stack-refs.js +326 -0
- package/dist/cdk/shared/cross-stack-refs.js.map +1 -0
- package/dist/cdk/shared/lambda-helpers.d.ts +82 -0
- package/dist/cdk/shared/lambda-helpers.d.ts.map +1 -0
- package/dist/cdk/shared/lambda-helpers.js +201 -0
- package/dist/cdk/shared/lambda-helpers.js.map +1 -0
- package/dist/cdk/shared/ssm-keys.d.ts +460 -0
- package/dist/cdk/shared/ssm-keys.d.ts.map +1 -0
- package/dist/cdk/shared/ssm-keys.js +291 -0
- package/dist/cdk/shared/ssm-keys.js.map +1 -0
- package/dist/cdk/stack.d.ts +3 -11
- package/dist/cdk/stack.d.ts.map +1 -1
- package/dist/cdk/stack.js +184 -41
- package/dist/cdk/stack.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SSM Parameter Store key builders for cross-stack references in the
|
|
3
|
+
* lifecycle-aligned multi-stack layout (network / data / identity /
|
|
4
|
+
* config / messaging / edge / app).
|
|
5
|
+
*
|
|
6
|
+
* # Why SSM and not `Fn::ImportValue`?
|
|
7
|
+
*
|
|
8
|
+
* CloudFormation cross-stack `Outputs` + `Fn::ImportValue` carries a
|
|
9
|
+
* hard lock: once a stack consumes another stack's export, the
|
|
10
|
+
* exporting stack cannot modify or delete that export until every
|
|
11
|
+
* consumer is removed. That makes the lower stable tiers (data,
|
|
12
|
+
* identity) unable to evolve their public surface without coordinated
|
|
13
|
+
* multi-stack redeploys — a single typo in a Cognito client id rename
|
|
14
|
+
* becomes a multi-week CFN choreography exercise.
|
|
15
|
+
*
|
|
16
|
+
* SSM Parameter Store has no such lock. The producer writes a
|
|
17
|
+
* `String` parameter; the consumer reads it via
|
|
18
|
+
* `StringParameter.valueForStringParameter(scope, name)` — a CFN
|
|
19
|
+
* dynamic reference (`{{resolve:ssm:…}}`) resolved at deploy time, not
|
|
20
|
+
* a stack-graph dependency. Producers can freely change values; the
|
|
21
|
+
* next consumer redeploy picks them up. Producers can be deleted with
|
|
22
|
+
* the parameter still in place; consumers fail loudly at synth/deploy
|
|
23
|
+
* with a clear "parameter not found" error rather than CFN's
|
|
24
|
+
* inscrutable "cannot modify export" rejection.
|
|
25
|
+
*
|
|
26
|
+
* # Naming convention
|
|
27
|
+
*
|
|
28
|
+
* /venturekit/<project>/<stage>/<category>/<resource-or-id>/<field>
|
|
29
|
+
*
|
|
30
|
+
* - Always rooted at `/venturekit/` so this module's parameters never
|
|
31
|
+
* collide with operator-managed parameters under `/<project>/...`.
|
|
32
|
+
* - `<project>` and `<stage>` produce a project- and env-isolated
|
|
33
|
+
* namespace so multiple projects in the same AWS account (or
|
|
34
|
+
* multiple stages of the same project) do not stomp on each other.
|
|
35
|
+
* - `<category>` mirrors the seven-tier split (`network`, `data`,
|
|
36
|
+
* `identity`, `config`, `messaging`, `edge`, `app`). Operators
|
|
37
|
+
* doing forensics can grep CloudTrail / `aws ssm describe-parameters
|
|
38
|
+
* --filters "Key=Name,Values=/venturekit/myapp/prod/data/"` to see
|
|
39
|
+
* exactly what one tier publishes.
|
|
40
|
+
* - `<resource-or-id>` is the user-declared `intent.id` for resources
|
|
41
|
+
* that come in arrays (databases, queues, auth pools, …); singletons
|
|
42
|
+
* collapse to a single key (`api/id` rather than `api/<id>/id`).
|
|
43
|
+
* - `<field>` is what specific attribute of the resource is stored
|
|
44
|
+
* (`endpoint`, `arn`, `secret-arn`, …). Always kebab-case.
|
|
45
|
+
*
|
|
46
|
+
* Lists (e.g. multi-AZ subnet IDs) are stored as comma-joined strings
|
|
47
|
+
* because SSM `StringList` parameters cannot be referenced via the
|
|
48
|
+
* `{{resolve:ssm:…}}` dynamic reference — only `String` and
|
|
49
|
+
* `SecureString`. The consumer-side helper `readSsmStringList` in
|
|
50
|
+
* `cross-stack-refs.ts` does the splitting.
|
|
51
|
+
*
|
|
52
|
+
* # Why a single source of truth?
|
|
53
|
+
*
|
|
54
|
+
* Every key is constructed via a function in this file — no inline
|
|
55
|
+
* string templating in stack code anywhere else. That gives us:
|
|
56
|
+
*
|
|
57
|
+
* - One place to change the convention (e.g. add a `version/` prefix
|
|
58
|
+
* for forward-compatible breaking changes to a key shape).
|
|
59
|
+
* - One place to grep when investigating "why is this Lambda
|
|
60
|
+
* reading parameter X?".
|
|
61
|
+
* - Test coverage that pins every key shape so a typo in a
|
|
62
|
+
* producer's write doesn't silently de-sync from a consumer's
|
|
63
|
+
* read three months later.
|
|
64
|
+
*
|
|
65
|
+
* # Stability guarantee
|
|
66
|
+
*
|
|
67
|
+
* The function names AND their return values are part of the
|
|
68
|
+
* cross-stack contract. Renaming a function = breaking every
|
|
69
|
+
* deployed stack that already wrote a parameter at the old name.
|
|
70
|
+
* Treat changes here the same way you'd treat changes to a public
|
|
71
|
+
* API: add new keys, deprecate old ones, never silently rename.
|
|
72
|
+
*/
|
|
73
|
+
/** Common path prefix for every key this module produces. */
|
|
74
|
+
const ROOT = '/venturekit';
|
|
75
|
+
/** Per-project, per-stage namespace shared by every category builder. */
|
|
76
|
+
function base(project, stage) {
|
|
77
|
+
return `${ROOT}/${project}/${stage}`;
|
|
78
|
+
}
|
|
79
|
+
// ─── Network tier ────────────────────────────────────────────────────
|
|
80
|
+
/**
|
|
81
|
+
* VPC ID for the project's primary VPC. Singleton — VentureKit
|
|
82
|
+
* provisions exactly one VPC per stack-set even when multiple
|
|
83
|
+
* databases / caches / Lambdas live in it.
|
|
84
|
+
*/
|
|
85
|
+
export const networkKeys = {
|
|
86
|
+
vpcId: (project, stage) => `${base(project, stage)}/network/vpc-id`,
|
|
87
|
+
/**
|
|
88
|
+
* Comma-joined private subnet IDs (subnets where Lambdas + RDS run).
|
|
89
|
+
* Stored as a single comma-joined `String` because CFN's
|
|
90
|
+
* `{{resolve:ssm:…}}` dynamic reference does not support
|
|
91
|
+
* `StringList` parameters. `readSsmStringList` in
|
|
92
|
+
* `cross-stack-refs.ts` re-splits on the consumer side.
|
|
93
|
+
*/
|
|
94
|
+
privateSubnetIds: (project, stage) => `${base(project, stage)}/network/private-subnet-ids`,
|
|
95
|
+
/** Comma-joined public subnet IDs — used by NAT GW + (future) ALB. */
|
|
96
|
+
publicSubnetIds: (project, stage) => `${base(project, stage)}/network/public-subnet-ids`,
|
|
97
|
+
/**
|
|
98
|
+
* Comma-joined isolated subnet IDs (no internet egress). RDS
|
|
99
|
+
* instances live here when `dataSafety='strict'` is in effect on
|
|
100
|
+
* presets that ship isolated subnets (medium+).
|
|
101
|
+
*/
|
|
102
|
+
isolatedSubnetIds: (project, stage) => `${base(project, stage)}/network/isolated-subnet-ids`,
|
|
103
|
+
/**
|
|
104
|
+
* Comma-joined Availability Zone names matching the order of the
|
|
105
|
+
* subnet ID lists above. CDK's `Vpc.fromVpcAttributes` requires
|
|
106
|
+
* per-subnet AZ to fully reconstruct the VPC abstraction in a
|
|
107
|
+
* consumer stack, and CFN won't infer it from the subnet IDs alone.
|
|
108
|
+
*/
|
|
109
|
+
availabilityZones: (project, stage) => `${base(project, stage)}/network/availability-zones`,
|
|
110
|
+
};
|
|
111
|
+
// ─── Data tier ──────────────────────────────────────────────────────
|
|
112
|
+
export const dataKeys = {
|
|
113
|
+
/**
|
|
114
|
+
* RDS endpoint hostname (no port, no protocol). The port is fixed
|
|
115
|
+
* per engine type, so consumers reconstruct the JDBC URL from
|
|
116
|
+
* `engine` + `endpoint` + `port` rather than storing the assembled
|
|
117
|
+
* URL — keeps reads composable and avoids re-writing on engine
|
|
118
|
+
* upgrades.
|
|
119
|
+
*/
|
|
120
|
+
rdsEndpoint: (project, stage, dbId) => `${base(project, stage)}/data/rds/${dbId}/endpoint`,
|
|
121
|
+
/** RDS port. Stored explicitly so consumers don't hardcode 5432/3306. */
|
|
122
|
+
rdsPort: (project, stage, dbId) => `${base(project, stage)}/data/rds/${dbId}/port`,
|
|
123
|
+
/**
|
|
124
|
+
* ARN of the Secrets Manager secret holding `{username,password}`
|
|
125
|
+
* for the master credentials. Lambdas in the app stack receive this
|
|
126
|
+
* via env var and call `GetSecretValue` at startup; a future
|
|
127
|
+
* `connect()` helper will resolve the cached secret to a Postgres
|
|
128
|
+
* URL transparently.
|
|
129
|
+
*/
|
|
130
|
+
rdsSecretArn: (project, stage, dbId) => `${base(project, stage)}/data/rds/${dbId}/secret-arn`,
|
|
131
|
+
/**
|
|
132
|
+
* Security Group ID for the RDS instance. The app stack creates its
|
|
133
|
+
* own Lambda SG locally and `rdsSg.connections.allowFrom(lambdaSg,
|
|
134
|
+
* port)`. CFN emits the resulting `AWS::EC2::SecurityGroupIngress`
|
|
135
|
+
* in the app stack — on app-stack delete, ingress is removed,
|
|
136
|
+
* RDS SG unaffected (see plan §6.1).
|
|
137
|
+
*/
|
|
138
|
+
rdsSecurityGroupId: (project, stage, dbId) => `${base(project, stage)}/data/rds/${dbId}/security-group-id`,
|
|
139
|
+
/** Database name created on the RDS instance (the actual SQL database). */
|
|
140
|
+
rdsDatabaseName: (project, stage, dbId) => `${base(project, stage)}/data/rds/${dbId}/database-name`,
|
|
141
|
+
/** S3 bucket name for an operator-declared storage intent. */
|
|
142
|
+
bucketName: (project, stage, bucketId) => `${base(project, stage)}/data/storage/${bucketId}/bucket-name`,
|
|
143
|
+
/** S3 bucket ARN — for IAM scoping on the consumer side. */
|
|
144
|
+
bucketArn: (project, stage, bucketId) => `${base(project, stage)}/data/storage/${bucketId}/bucket-arn`,
|
|
145
|
+
/**
|
|
146
|
+
* CloudFront distribution domain (e.g. `d111111abcdef8.cloudfront.net`)
|
|
147
|
+
* — only present when the storage intent set `cdn: true`. Consumers
|
|
148
|
+
* inject as `STORAGE_<ID>_CDN_URL` for presign-then-rewrite flows.
|
|
149
|
+
*/
|
|
150
|
+
cdnDomain: (project, stage, bucketId) => `${base(project, stage)}/data/storage/${bucketId}/cdn-domain`,
|
|
151
|
+
/** DynamoDB table name (user-declared on free-tier OR rate-limits). */
|
|
152
|
+
dynamoTableName: (project, stage, tableId) => `${base(project, stage)}/data/dynamo/${tableId}/table-name`,
|
|
153
|
+
/** DynamoDB table ARN — for IAM scoping. */
|
|
154
|
+
dynamoTableArn: (project, stage, tableId) => `${base(project, stage)}/data/dynamo/${tableId}/table-arn`,
|
|
155
|
+
/**
|
|
156
|
+
* ARN of the internal HMAC secret used by VentureKit auth/runtime
|
|
157
|
+
* for state-token signing. Singleton per project+stage.
|
|
158
|
+
*/
|
|
159
|
+
internalHmacSecretArn: (project, stage) => `${base(project, stage)}/data/internal-hmac-secret-arn`,
|
|
160
|
+
/**
|
|
161
|
+
* ElastiCache primary endpoint when a `caches` intent is declared.
|
|
162
|
+
* Currently keyed by `cacheId`; only one is typical but the keyed
|
|
163
|
+
* form keeps us forward-compatible with multi-cache setups.
|
|
164
|
+
*/
|
|
165
|
+
cacheEndpoint: (project, stage, cacheId) => `${base(project, stage)}/data/cache/${cacheId}/endpoint`,
|
|
166
|
+
/** ElastiCache port. Same rationale as `rdsPort`. */
|
|
167
|
+
cachePort: (project, stage, cacheId) => `${base(project, stage)}/data/cache/${cacheId}/port`,
|
|
168
|
+
/** ElastiCache security group ID — for the cross-stack ingress pattern. */
|
|
169
|
+
cacheSecurityGroupId: (project, stage, cacheId) => `${base(project, stage)}/data/cache/${cacheId}/security-group-id`,
|
|
170
|
+
};
|
|
171
|
+
// ─── Identity tier ──────────────────────────────────────────────────
|
|
172
|
+
export const identityKeys = {
|
|
173
|
+
/** Cognito User Pool ID for an `auth` intent. */
|
|
174
|
+
userPoolId: (project, stage, authId) => `${base(project, stage)}/identity/${authId}/user-pool-id`,
|
|
175
|
+
/** Cognito User Pool ARN — for IAM scoping `cognito-idp:Admin*` actions. */
|
|
176
|
+
userPoolArn: (project, stage, authId) => `${base(project, stage)}/identity/${authId}/user-pool-arn`,
|
|
177
|
+
/**
|
|
178
|
+
* Primary App Client ID. Multi-client support exists in the intent
|
|
179
|
+
* (auth.clients[]) but the dominant case is a single SPA client;
|
|
180
|
+
* we publish the primary id as a singleton key to avoid the
|
|
181
|
+
* multi-client SSM tax for the common case. Future per-client keys
|
|
182
|
+
* can extend this convention with `${authId}/clients/${clientName}`.
|
|
183
|
+
*/
|
|
184
|
+
primaryClientId: (project, stage, authId) => `${base(project, stage)}/identity/${authId}/client-id`,
|
|
185
|
+
/**
|
|
186
|
+
* ARN of the Secrets Manager secret holding `{clientId, clientSecret}`
|
|
187
|
+
* for a federated identity provider (Google / Facebook / Apple).
|
|
188
|
+
* Created by `createAuth` for every entry in
|
|
189
|
+
* `AuthIntent.federated[]`; the app stack reads it to enable
|
|
190
|
+
* `signInAsFederatedUser` server-side.
|
|
191
|
+
*/
|
|
192
|
+
federatedSecretArn: (project, stage, authId, provider) => `${base(project, stage)}/identity/${authId}/federated/${provider}/secret-arn`,
|
|
193
|
+
};
|
|
194
|
+
// ─── Config tier (operator-paste-in values) ────────────────────────
|
|
195
|
+
export const configKeys = {
|
|
196
|
+
/**
|
|
197
|
+
* ARN of an operator-declared `secrets` intent (Secrets Manager
|
|
198
|
+
* variant). The SSM-store variant of the intent is *itself* an SSM
|
|
199
|
+
* parameter and doesn't need a separate cross-stack key — the app
|
|
200
|
+
* stack reads the original parameter directly.
|
|
201
|
+
*/
|
|
202
|
+
secretArn: (project, stage, secretId) => `${base(project, stage)}/config/secrets/${secretId}/arn`,
|
|
203
|
+
/**
|
|
204
|
+
* SNS events topic ARN for a `notify` intent. The bounce-handler
|
|
205
|
+
* Lambda in the app stack subscribes to this; operators may attach
|
|
206
|
+
* additional console-level subscribers for paging / observability.
|
|
207
|
+
*/
|
|
208
|
+
notifyEventsTopicArn: (project, stage, notifyId) => `${base(project, stage)}/config/notify/${notifyId}/events-topic-arn`,
|
|
209
|
+
/** Notify SES configuration set name — needed by the dispatcher Lambda. */
|
|
210
|
+
notifyConfigurationSetName: (project, stage, notifyId) => `${base(project, stage)}/config/notify/${notifyId}/configuration-set-name`,
|
|
211
|
+
/**
|
|
212
|
+
* ARN of the WhatsApp Cloud API token Secret (only present when the
|
|
213
|
+
* notify intent declares `'whatsapp'` in `channels`). Operator
|
|
214
|
+
* pastes the Meta token into the secret value after first deploy.
|
|
215
|
+
*/
|
|
216
|
+
whatsappTokenSecretArn: (project, stage, notifyId) => `${base(project, stage)}/config/notify/${notifyId}/whatsapp-token-secret-arn`,
|
|
217
|
+
};
|
|
218
|
+
// ─── Messaging tier ─────────────────────────────────────────────────
|
|
219
|
+
export const messagingKeys = {
|
|
220
|
+
/** SQS queue ARN for a user-declared `queues` intent. */
|
|
221
|
+
queueArn: (project, stage, queueId) => `${base(project, stage)}/messaging/queues/${queueId}/arn`,
|
|
222
|
+
/** SQS queue URL — what `SendMessage` callers actually need. */
|
|
223
|
+
queueUrl: (project, stage, queueId) => `${base(project, stage)}/messaging/queues/${queueId}/url`,
|
|
224
|
+
/** Dead-letter queue ARN — for IAM scoping + ESM redrive policy. */
|
|
225
|
+
queueDlqArn: (project, stage, queueId) => `${base(project, stage)}/messaging/queues/${queueId}/dlq-arn`,
|
|
226
|
+
/**
|
|
227
|
+
* Visibility timeout (seconds, integer) of the primary work queue.
|
|
228
|
+
* App-stack synth uses this to validate the
|
|
229
|
+
* `queue.visibilityTimeout >= 6 * fn.timeout` invariant when the
|
|
230
|
+
* queue lives in another stack and CDK can't infer it (plan §6.3).
|
|
231
|
+
*/
|
|
232
|
+
queueVisibilityTimeoutSeconds: (project, stage, queueId) => `${base(project, stage)}/messaging/queues/${queueId}/visibility-timeout-seconds`,
|
|
233
|
+
/** Notify dispatcher DLQ ARN — created by the messaging tier. */
|
|
234
|
+
notifyDispatcherDlqArn: (project, stage, notifyId) => `${base(project, stage)}/messaging/notify/${notifyId}/dispatcher-dlq-arn`,
|
|
235
|
+
/** Notify bounce-handler DLQ ARN. */
|
|
236
|
+
notifyBounceDlqArn: (project, stage, notifyId) => `${base(project, stage)}/messaging/notify/${notifyId}/bounce-dlq-arn`,
|
|
237
|
+
};
|
|
238
|
+
// ─── Edge tier ──────────────────────────────────────────────────────
|
|
239
|
+
export const edgeKeys = {
|
|
240
|
+
/** API Gateway HttpApi ID. Singleton per stack-set. */
|
|
241
|
+
apiId: (project, stage) => `${base(project, stage)}/edge/api/id`,
|
|
242
|
+
/**
|
|
243
|
+
* API Gateway public endpoint (`https://<id>.execute-api.<region>.amazonaws.com`).
|
|
244
|
+
* Convenience for monitoring + smoke tests; consumers that need
|
|
245
|
+
* just the ID use `apiId` above.
|
|
246
|
+
*/
|
|
247
|
+
apiEndpoint: (project, stage) => `${base(project, stage)}/edge/api/endpoint`,
|
|
248
|
+
/**
|
|
249
|
+
* Custom domain hostname (e.g. `api.example.com`). Only present
|
|
250
|
+
* when a `domains` intent is declared. Consumers that build OAuth
|
|
251
|
+
* redirect URIs / webhook URLs should prefer this when set.
|
|
252
|
+
*/
|
|
253
|
+
apiCustomDomain: (project, stage) => `${base(project, stage)}/edge/api/custom-domain`,
|
|
254
|
+
/**
|
|
255
|
+
* API Gateway default stage name. Always `'$default'` for HttpApi
|
|
256
|
+
* but published explicitly so future support for named stages
|
|
257
|
+
* (canary, blue/green) doesn't require a key-shape change.
|
|
258
|
+
*/
|
|
259
|
+
apiDefaultStageName: (project, stage) => `${base(project, stage)}/edge/api/default-stage-name`,
|
|
260
|
+
/**
|
|
261
|
+
* CloudFront distribution domain (`*.cloudfront.net` or the
|
|
262
|
+
* configured alias) fronting a storage-tier S3 bucket. Only
|
|
263
|
+
* present when the `storage` intent declares `cdn: true`. App-
|
|
264
|
+
* stack code injects this into Lambda env vars as
|
|
265
|
+
* `STORAGE_<UPPER_ID>_CDN_URL` and `VENTURE_STORAGE_CDN_URL`
|
|
266
|
+
* (primary intent), so application code can build public URLs
|
|
267
|
+
* without an SDK lookup.
|
|
268
|
+
*/
|
|
269
|
+
storageCdnDomain: (project, stage, storageId) => `${base(project, stage)}/edge/storage/${storageId}/cdn-domain`,
|
|
270
|
+
/**
|
|
271
|
+
* CloudFront distribution ID for a storage-tier bucket CDN. App-
|
|
272
|
+
* stack handlers that need to issue invalidations
|
|
273
|
+
* (`CreateInvalidation` after a content rewrite) read this.
|
|
274
|
+
*/
|
|
275
|
+
storageCdnDistributionId: (project, stage, storageId) => `${base(project, stage)}/edge/storage/${storageId}/cdn-distribution-id`,
|
|
276
|
+
};
|
|
277
|
+
// ─── Aggregate ──────────────────────────────────────────────────────
|
|
278
|
+
/**
|
|
279
|
+
* Single namespace exporting every category for ergonomic imports
|
|
280
|
+
* elsewhere: `import { ssmKeys } from './shared/ssm-keys.js';
|
|
281
|
+
* ssmKeys.data.rdsEndpoint(project, stage, 'main')`.
|
|
282
|
+
*/
|
|
283
|
+
export const ssmKeys = {
|
|
284
|
+
network: networkKeys,
|
|
285
|
+
data: dataKeys,
|
|
286
|
+
identity: identityKeys,
|
|
287
|
+
config: configKeys,
|
|
288
|
+
messaging: messagingKeys,
|
|
289
|
+
edge: edgeKeys,
|
|
290
|
+
};
|
|
291
|
+
//# sourceMappingURL=ssm-keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssm-keys.js","sourceRoot":"","sources":["../../../src/cdk/shared/ssm-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;AAEH,6DAA6D;AAC7D,MAAM,IAAI,GAAG,aAAa,CAAC;AAE3B,yEAAyE;AACzE,SAAS,IAAI,CAAC,OAAe,EAAE,KAAa;IAC1C,OAAO,GAAG,IAAI,IAAI,OAAO,IAAI,KAAK,EAAE,CAAC;AACvC,CAAC;AAED,wEAAwE;AAExE;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE,CAAC,OAAe,EAAE,KAAa,EAAU,EAAE,CAChD,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,iBAAiB;IAE1C;;;;;;OAMG;IACH,gBAAgB,EAAE,CAAC,OAAe,EAAE,KAAa,EAAU,EAAE,CAC3D,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,6BAA6B;IAEtD,sEAAsE;IACtE,eAAe,EAAE,CAAC,OAAe,EAAE,KAAa,EAAU,EAAE,CAC1D,GAAG,IAAI,CAAC,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OAAe,EAAE,KAAa,EAAU,EAAE,CAChD,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,cAAc;IAEvC;;;;OAIG;IACH,WAAW,EAAE,CAAC,OAAe,EAAE,KAAa,EAAU,EAAE,CACtD,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,oBAAoB;IAE7C;;;;OAIG;IACH,eAAe,EAAE,CAAC,OAAe,EAAE,KAAa,EAAU,EAAE,CAC1D,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,yBAAyB;IAElD;;;;OAIG;IACH,mBAAmB,EAAE,CAAC,OAAe,EAAE,KAAa,EAAU,EAAE,CAC9D,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,8BAA8B;IAEvD;;;;;;;;OAQG;IACH,gBAAgB,EAAE,CAAC,OAAe,EAAE,KAAa,EAAE,SAAiB,EAAU,EAAE,CAC9E,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,iBAAiB,SAAS,aAAa;IAEhE;;;;OAIG;IACH,wBAAwB,EAAE,CAAC,OAAe,EAAE,KAAa,EAAE,SAAiB,EAAU,EAAE,CACtF,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,iBAAiB,SAAS,sBAAsB;CACjE,CAAC;AAEX,uEAAuE;AAEvE;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,OAAO,EAAE,WAAW;IACpB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,YAAY;IACtB,MAAM,EAAE,UAAU;IAClB,SAAS,EAAE,aAAa;IACxB,IAAI,EAAE,QAAQ;CACN,CAAC"}
|
package/dist/cdk/stack.d.ts
CHANGED
|
@@ -50,19 +50,11 @@ export interface DiscoveredRoute {
|
|
|
50
50
|
* full CDK stack, and so external tooling can reuse it.
|
|
51
51
|
*/
|
|
52
52
|
export declare function discoverRouteFiles(routesDir: string): DiscoveredRoute[];
|
|
53
|
-
/**
|
|
54
|
-
* Smallest power of two that is `>= n`. Used to pick the nested-stack
|
|
55
|
-
* bucket count, so that growing past a threshold doubles the count
|
|
56
|
-
* rather than incrementing it — the doubled-size hash bucketing only
|
|
57
|
-
* relocates ~half the routes, and growth is geometric (rare events)
|
|
58
|
-
* rather than additive (every deploy after a route added).
|
|
59
|
-
*/
|
|
60
|
-
export declare function nextPowerOfTwo(n: number): number;
|
|
61
53
|
/**
|
|
62
54
|
* Map a route slug to a nested-stack slot index in `[0, numSlots)`.
|
|
63
|
-
* `numSlots` MUST be a power of two so the modulo
|
|
64
|
-
* hash output evenly. Exported for unit tests
|
|
65
|
-
* stability across route-set changes.
|
|
55
|
+
* `numSlots` MUST be a power of two so the bitwise-AND modulo
|
|
56
|
+
* distributes the hash output evenly. Exported for unit tests
|
|
57
|
+
* asserting bucketing stability across route-set changes.
|
|
66
58
|
*/
|
|
67
59
|
export declare function stableSlotFor(slug: string, numSlots: number): number;
|
|
68
60
|
export interface VentureStackProps extends cdk.StackProps {
|
package/dist/cdk/stack.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../src/cdk/stack.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AA4BnC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIvC,OAAO,KAAK,EACV,aAAa,EAKb,SAAS,EAMV,MAAM,kBAAkB,CAAC;AAO1B;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;;OAOG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAC;CACrB;AAoBD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe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