@go-to-k/cdkd 0.94.8 → 0.94.9

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.
Binary file
@@ -0,0 +1,703 @@
1
+ import { S3Client } from "@aws-sdk/client-s3";
2
+ import { CloudControlClient } from "@aws-sdk/client-cloudcontrol";
3
+ import { IAMClient } from "@aws-sdk/client-iam";
4
+ import { SQSClient } from "@aws-sdk/client-sqs";
5
+ import { SNSClient } from "@aws-sdk/client-sns";
6
+ import { LambdaClient } from "@aws-sdk/client-lambda";
7
+ import { STSClient } from "@aws-sdk/client-sts";
8
+ import { EC2Client } from "@aws-sdk/client-ec2";
9
+ import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
10
+ import { CloudFormationClient } from "@aws-sdk/client-cloudformation";
11
+ import { APIGatewayClient } from "@aws-sdk/client-api-gateway";
12
+ import { EventBridgeClient } from "@aws-sdk/client-eventbridge";
13
+ import { SecretsManagerClient } from "@aws-sdk/client-secrets-manager";
14
+ import { SSMClient } from "@aws-sdk/client-ssm";
15
+ import { CloudFrontClient } from "@aws-sdk/client-cloudfront";
16
+ import { CloudWatchClient } from "@aws-sdk/client-cloudwatch";
17
+ import { CloudWatchLogsClient } from "@aws-sdk/client-cloudwatch-logs";
18
+ import { BedrockAgentCoreControlClient } from "@aws-sdk/client-bedrock-agentcore-control";
19
+ import graphlib from "graphlib";
20
+
21
+ //#region src/types/state.d.ts
22
+ type StateSchemaVersion = 1 | 2 | 3;
23
+ interface StackState {
24
+ version: StateSchemaVersion;
25
+ stackName: string;
26
+ region?: string;
27
+ resources: Record<string, ResourceState>;
28
+ outputs: Record<string, unknown>;
29
+ lastModified: number;
30
+ }
31
+ interface ResourceState {
32
+ physicalId: string;
33
+ resourceType: string;
34
+ properties: Record<string, unknown>;
35
+ observedProperties?: Record<string, unknown>;
36
+ attributes?: Record<string, unknown>;
37
+ dependencies?: string[];
38
+ metadata?: Record<string, unknown>;
39
+ }
40
+ interface LockInfo {
41
+ owner: string;
42
+ timestamp: number;
43
+ expiresAt: number;
44
+ operation?: string;
45
+ }
46
+ type ChangeType = 'CREATE' | 'UPDATE' | 'DELETE' | 'NO_CHANGE';
47
+ interface ResourceChange {
48
+ logicalId: string;
49
+ changeType: ChangeType;
50
+ resourceType: string;
51
+ currentProperties?: Record<string, unknown>;
52
+ desiredProperties?: Record<string, unknown>;
53
+ propertyChanges?: PropertyChange[];
54
+ }
55
+ interface PropertyChange {
56
+ path: string;
57
+ oldValue: unknown;
58
+ newValue: unknown;
59
+ requiresReplacement: boolean;
60
+ }
61
+ //#endregion
62
+ //#region src/provisioning/region-check.d.ts
63
+ interface DeleteContext {
64
+ expectedRegion?: string | undefined;
65
+ removeProtection?: boolean;
66
+ }
67
+ //#endregion
68
+ //#region src/types/resource.d.ts
69
+ interface CloudFormationTemplate {
70
+ AWSTemplateFormatVersion?: string;
71
+ Description?: string;
72
+ Parameters?: Record<string, TemplateParameter>;
73
+ Resources: Record<string, TemplateResource>;
74
+ Outputs?: Record<string, TemplateOutput>;
75
+ Conditions?: Record<string, unknown>;
76
+ Mappings?: Record<string, unknown>;
77
+ }
78
+ interface TemplateParameter {
79
+ Type: string;
80
+ Default?: unknown;
81
+ Description?: string;
82
+ AllowedValues?: unknown[];
83
+ AllowedPattern?: string;
84
+ ConstraintDescription?: string;
85
+ }
86
+ interface TemplateResource {
87
+ Type: string;
88
+ Properties?: Record<string, unknown>;
89
+ DependsOn?: string | readonly string[];
90
+ Condition?: string;
91
+ Metadata?: Record<string, unknown>;
92
+ CreationPolicy?: Record<string, unknown>;
93
+ UpdatePolicy?: Record<string, unknown>;
94
+ DeletionPolicy?: 'Delete' | 'Retain' | 'Snapshot';
95
+ UpdateReplacePolicy?: 'Delete' | 'Retain' | 'Snapshot';
96
+ }
97
+ interface TemplateOutput {
98
+ Value: unknown;
99
+ Description?: string;
100
+ Export?: {
101
+ Name: string;
102
+ };
103
+ }
104
+ interface ResourceCreateResult {
105
+ physicalId: string;
106
+ attributes?: Record<string, unknown>;
107
+ }
108
+ interface ResourceUpdateResult {
109
+ physicalId: string;
110
+ wasReplaced: boolean;
111
+ attributes?: Record<string, unknown>;
112
+ }
113
+ interface ResourceImportInput {
114
+ logicalId: string;
115
+ resourceType: string;
116
+ cdkPath: string;
117
+ stackName: string;
118
+ region: string;
119
+ properties: Record<string, unknown>;
120
+ knownPhysicalId?: string;
121
+ }
122
+ interface ResourceImportResult {
123
+ physicalId: string;
124
+ attributes?: Record<string, unknown>;
125
+ }
126
+ interface ResourceProvider {
127
+ handledProperties?: ReadonlyMap<string, ReadonlySet<string>>;
128
+ disableCcApiFallback?: boolean;
129
+ disableOuterRetry?: boolean;
130
+ getMinResourceTimeoutMs?(): number;
131
+ preparePropertiesForFallback?(logicalId: string, resourceType: string, properties: Record<string, unknown>): Record<string, unknown>;
132
+ create(logicalId: string, resourceType: string, properties: Record<string, unknown>): Promise<ResourceCreateResult>;
133
+ update(logicalId: string, physicalId: string, resourceType: string, properties: Record<string, unknown>, previousProperties: Record<string, unknown>): Promise<ResourceUpdateResult>;
134
+ delete(logicalId: string, physicalId: string, resourceType: string, properties?: Record<string, unknown>, context?: DeleteContext): Promise<void>;
135
+ getAttribute?(physicalId: string, resourceType: string, attributeName: string): Promise<unknown>;
136
+ readCurrentState?(physicalId: string, logicalId: string, resourceType: string, properties?: Record<string, unknown>): Promise<Record<string, unknown> | undefined>;
137
+ getDriftUnknownPaths?(resourceType: string): string[];
138
+ import?(input: ResourceImportInput): Promise<ResourceImportResult | null>;
139
+ }
140
+ //#endregion
141
+ //#region src/types/config.d.ts
142
+ interface CdkdConfig {
143
+ app: string;
144
+ stateBucket: string;
145
+ statePrefix?: string;
146
+ stack?: string;
147
+ region?: string;
148
+ profile?: string;
149
+ concurrency?: number;
150
+ verbose?: boolean;
151
+ dryRun?: boolean;
152
+ output?: string;
153
+ }
154
+ interface DeployOptions {
155
+ stackName: string;
156
+ template: string;
157
+ stateBackend: StateBackendConfig;
158
+ concurrency: number;
159
+ dryRun: boolean;
160
+ skipAssets?: boolean;
161
+ }
162
+ interface StateBackendConfig {
163
+ bucket: string;
164
+ prefix: string;
165
+ }
166
+ type LogLevel = 'debug' | 'info' | 'warn' | 'error';
167
+ interface Logger {
168
+ debug(message: string, ...args: unknown[]): void;
169
+ info(message: string, ...args: unknown[]): void;
170
+ warn(message: string, ...args: unknown[]): void;
171
+ error(message: string, ...args: unknown[]): void;
172
+ }
173
+ //#endregion
174
+ //#region src/utils/logger.d.ts
175
+ declare class ConsoleLogger implements Logger {
176
+ private level;
177
+ private useColors;
178
+ constructor(level?: LogLevel, useColors?: boolean);
179
+ private shouldLog;
180
+ private formatMessage;
181
+ private emit;
182
+ debug(message: string, ...args: unknown[]): void;
183
+ info(message: string, ...args: unknown[]): void;
184
+ warn(message: string, ...args: unknown[]): void;
185
+ error(message: string, ...args: unknown[]): void;
186
+ setLevel(level: LogLevel): void;
187
+ getLevel(): LogLevel;
188
+ child(prefix: string): ChildLogger;
189
+ }
190
+ declare class ChildLogger extends ConsoleLogger {
191
+ private readonly prefix;
192
+ constructor(prefix: string, useColors: boolean);
193
+ private syncLevel;
194
+ debug(message: string, ...args: unknown[]): void;
195
+ info(message: string, ...args: unknown[]): void;
196
+ warn(message: string, ...args: unknown[]): void;
197
+ error(message: string, ...args: unknown[]): void;
198
+ }
199
+ declare function getLogger(): ConsoleLogger;
200
+ declare function setLogger(logger: ConsoleLogger): void;
201
+ //#endregion
202
+ //#region src/utils/error-handler.d.ts
203
+ declare class CdkdError extends Error {
204
+ readonly code: string;
205
+ readonly cause: Error | undefined;
206
+ constructor(message: string, code: string, cause?: Error);
207
+ }
208
+ declare class StateError extends CdkdError {
209
+ constructor(message: string, cause?: Error);
210
+ }
211
+ declare class LockError extends CdkdError {
212
+ constructor(message: string, cause?: Error);
213
+ }
214
+ declare class SynthesisError extends CdkdError {
215
+ constructor(message: string, cause?: Error);
216
+ }
217
+ declare class AssetError extends CdkdError {
218
+ constructor(message: string, cause?: Error);
219
+ }
220
+ declare class ProvisioningError extends CdkdError {
221
+ readonly resourceType: string;
222
+ readonly logicalId: string;
223
+ readonly physicalId: string | undefined;
224
+ constructor(message: string, resourceType: string, logicalId: string, physicalId?: string, cause?: Error);
225
+ }
226
+ declare class DependencyError extends CdkdError {
227
+ constructor(message: string, cause?: Error);
228
+ }
229
+ declare class ConfigError extends CdkdError {
230
+ constructor(message: string, cause?: Error);
231
+ }
232
+ declare function isCdkdError(error: unknown): error is CdkdError;
233
+ declare function formatError(error: unknown): string;
234
+ interface NormalizeAwsErrorContext {
235
+ bucket?: string;
236
+ operation?: string;
237
+ }
238
+ declare function normalizeAwsError(err: unknown, context?: NormalizeAwsErrorContext): Error;
239
+ //#endregion
240
+ //#region src/utils/aws-clients.d.ts
241
+ interface AwsClientConfig {
242
+ region?: string;
243
+ profile?: string;
244
+ credentials?: {
245
+ accessKeyId: string;
246
+ secretAccessKey: string;
247
+ sessionToken?: string;
248
+ };
249
+ }
250
+ declare class AwsClients {
251
+ private s3Client?;
252
+ private cloudControlClient?;
253
+ private iamClient?;
254
+ private sqsClient?;
255
+ private snsClient?;
256
+ private lambdaClient?;
257
+ private stsClient?;
258
+ private ec2Client?;
259
+ private dynamoDBClient?;
260
+ private cloudFormationClient?;
261
+ private apiGatewayClient?;
262
+ private eventBridgeClient?;
263
+ private secretsManagerClient?;
264
+ private ssmClient?;
265
+ private cloudFrontClient?;
266
+ private cloudWatchClient?;
267
+ private cloudWatchLogsClient?;
268
+ private bedrockAgentCoreControlClient?;
269
+ private config;
270
+ constructor(config?: AwsClientConfig);
271
+ getS3Client(): S3Client;
272
+ getCloudControlClient(): CloudControlClient;
273
+ getIAMClient(): IAMClient;
274
+ get s3(): S3Client;
275
+ get cloudControl(): CloudControlClient;
276
+ get iam(): IAMClient;
277
+ getSQSClient(): SQSClient;
278
+ get sqs(): SQSClient;
279
+ getSNSClient(): SNSClient;
280
+ get sns(): SNSClient;
281
+ getLambdaClient(): LambdaClient;
282
+ get lambda(): LambdaClient;
283
+ getEC2Client(): EC2Client;
284
+ get ec2(): EC2Client;
285
+ getSTSClient(): STSClient;
286
+ get sts(): STSClient;
287
+ getDynamoDBClient(): DynamoDBClient;
288
+ get dynamoDB(): DynamoDBClient;
289
+ getCloudFormationClient(): CloudFormationClient;
290
+ get cloudFormation(): CloudFormationClient;
291
+ getAPIGatewayClient(): APIGatewayClient;
292
+ get apiGateway(): APIGatewayClient;
293
+ getEventBridgeClient(): EventBridgeClient;
294
+ get eventBridge(): EventBridgeClient;
295
+ getSecretsManagerClient(): SecretsManagerClient;
296
+ get secretsManager(): SecretsManagerClient;
297
+ getSSMClient(): SSMClient;
298
+ get ssm(): SSMClient;
299
+ getCloudFrontClient(): CloudFrontClient;
300
+ get cloudFront(): CloudFrontClient;
301
+ getCloudWatchClient(): CloudWatchClient;
302
+ get cloudWatch(): CloudWatchClient;
303
+ getCloudWatchLogsClient(): CloudWatchLogsClient;
304
+ get cloudWatchLogs(): CloudWatchLogsClient;
305
+ getBedrockAgentCoreControlClient(): BedrockAgentCoreControlClient;
306
+ get bedrockAgentCoreControl(): BedrockAgentCoreControlClient;
307
+ destroy(): void;
308
+ }
309
+ declare function getAwsClients(config?: AwsClientConfig): AwsClients;
310
+ declare function setAwsClients(clients: AwsClients): void;
311
+ declare function resetAwsClients(): void;
312
+ //#endregion
313
+ //#region src/utils/aws-region-resolver.d.ts
314
+ interface ResolveBucketRegionOptions {
315
+ profile?: string;
316
+ credentials?: {
317
+ accessKeyId: string;
318
+ secretAccessKey: string;
319
+ sessionToken?: string;
320
+ };
321
+ fallbackRegion?: string;
322
+ }
323
+ declare function resolveBucketRegion(bucketName: string, opts?: ResolveBucketRegionOptions): Promise<string>;
324
+ declare function clearBucketRegionCache(): void;
325
+ //#endregion
326
+ //#region src/types/assembly.d.ts
327
+ interface AssemblyManifest {
328
+ version: string;
329
+ artifacts?: Record<string, ArtifactManifest>;
330
+ missing?: MissingContext[];
331
+ runtime?: RuntimeInfo;
332
+ }
333
+ interface ArtifactManifest {
334
+ type: ArtifactType;
335
+ environment?: string;
336
+ displayName?: string;
337
+ properties?: Record<string, unknown>;
338
+ dependencies?: string[];
339
+ metadata?: Record<string, MetadataEntry[]>;
340
+ }
341
+ type ArtifactType = 'aws:cloudformation:stack' | 'cdk:asset-manifest' | 'cdk:tree' | 'cdk:cloud-assembly' | 'cdk:feature-flag-report';
342
+ interface MissingContext {
343
+ key: string;
344
+ provider: string;
345
+ props: ContextQueryProperties;
346
+ }
347
+ interface ContextQueryProperties {
348
+ account: string;
349
+ region: string;
350
+ lookupRoleArn?: string;
351
+ [key: string]: unknown;
352
+ }
353
+ interface MetadataEntry {
354
+ type: string;
355
+ data?: unknown;
356
+ trace?: string[];
357
+ }
358
+ interface RuntimeInfo {
359
+ libraries?: Record<string, string>;
360
+ }
361
+ //#endregion
362
+ //#region src/synthesis/assembly-reader.d.ts
363
+ interface StackInfo {
364
+ stackName: string;
365
+ displayName: string;
366
+ artifactId: string;
367
+ template: CloudFormationTemplate;
368
+ assetManifestPath?: string | undefined;
369
+ dependencyNames: string[];
370
+ region?: string | undefined;
371
+ account?: string | undefined;
372
+ terminationProtection?: boolean | undefined;
373
+ }
374
+ declare class AssemblyReader {
375
+ private logger;
376
+ readManifest(assemblyDir: string): AssemblyManifest;
377
+ getAllStacks(assemblyDir: string, manifest: AssemblyManifest): StackInfo[];
378
+ getStack(assemblyDir: string, manifest: AssemblyManifest, stackName: string): StackInfo;
379
+ getTemplate(assemblyDir: string, manifest: AssemblyManifest, stackName: string): CloudFormationTemplate;
380
+ private buildAssetManifestMap;
381
+ private extractStackInfo;
382
+ hasAssets(stackInfo: StackInfo): boolean;
383
+ }
384
+ //#endregion
385
+ //#region src/synthesis/synthesizer.d.ts
386
+ interface SynthesisOptions {
387
+ app: string;
388
+ output?: string;
389
+ profile?: string;
390
+ region?: string;
391
+ context?: Record<string, string>;
392
+ }
393
+ interface SynthesisResult {
394
+ manifest: AssemblyManifest;
395
+ assemblyDir: string;
396
+ stacks: StackInfo[];
397
+ }
398
+ declare class Synthesizer {
399
+ private logger;
400
+ private appExecutor;
401
+ private assemblyReader;
402
+ private contextStore;
403
+ synthesize(options: SynthesisOptions): Promise<SynthesisResult>;
404
+ listStacks(options: SynthesisOptions): Promise<string[]>;
405
+ }
406
+ //#endregion
407
+ //#region src/deployment/work-graph.d.ts
408
+ type WorkNodeType = 'asset-build' | 'asset-publish' | 'stack';
409
+ type NodeState = 'pending' | 'queued' | 'running' | 'completed' | 'failed' | 'skipped';
410
+ interface WorkNode {
411
+ id: string;
412
+ type: WorkNodeType;
413
+ dependencies: Set<string>;
414
+ state: NodeState;
415
+ data: unknown;
416
+ }
417
+ interface WorkGraphConcurrency {
418
+ 'asset-build': number;
419
+ 'asset-publish': number;
420
+ stack: number;
421
+ }
422
+ declare class WorkGraph {
423
+ private nodes;
424
+ private logger;
425
+ addNode(node: WorkNode): void;
426
+ execute(concurrency: WorkGraphConcurrency, fn: (node: WorkNode) => Promise<void>): Promise<void>;
427
+ summary(): Record<WorkNodeType, number>;
428
+ }
429
+ //#endregion
430
+ //#region src/assets/asset-publisher.d.ts
431
+ interface AssetPublisherOptions {
432
+ profile?: string;
433
+ region?: string;
434
+ accountId?: string;
435
+ assetPublishConcurrency?: number;
436
+ imageBuildConcurrency?: number;
437
+ }
438
+ declare class AssetPublisher {
439
+ private logger;
440
+ private filePublisher;
441
+ private dockerPublisher;
442
+ addAssetsToGraph(graph: WorkGraph, manifestPath: string, options: {
443
+ accountId: string;
444
+ region: string;
445
+ profile?: string;
446
+ nodePrefix?: string;
447
+ }): string[];
448
+ executeNode(node: WorkNode): Promise<void>;
449
+ publishFromManifest(manifestPath: string, options?: AssetPublisherOptions): Promise<void>;
450
+ hasAssets(manifestPath: string): boolean;
451
+ }
452
+ //#endregion
453
+ //#region src/state/s3-state-backend.d.ts
454
+ interface StackStateRef {
455
+ stackName: string;
456
+ region?: string;
457
+ }
458
+ interface S3ClientOptions {
459
+ region?: string;
460
+ profile?: string;
461
+ credentials?: {
462
+ accessKeyId: string;
463
+ secretAccessKey: string;
464
+ sessionToken?: string;
465
+ };
466
+ }
467
+ declare class S3StateBackend {
468
+ private logger;
469
+ private s3Client;
470
+ private config;
471
+ private clientOpts;
472
+ private clientResolved;
473
+ private resolveInFlight;
474
+ constructor(s3Client: S3Client, config: StateBackendConfig, clientOpts?: S3ClientOptions);
475
+ private getStateKey;
476
+ private getLegacyStateKey;
477
+ private ensureClientForBucket;
478
+ verifyBucketExists(): Promise<void>;
479
+ stateExists(stackName: string, region: string): Promise<boolean>;
480
+ getState(stackName: string, region: string): Promise<{
481
+ state: StackState;
482
+ etag: string;
483
+ migrationPending?: boolean;
484
+ } | null>;
485
+ saveState(stackName: string, region: string, state: StackState, options?: {
486
+ expectedEtag?: string;
487
+ migrateLegacy?: boolean;
488
+ }): Promise<string>;
489
+ deleteState(stackName: string, region: string): Promise<void>;
490
+ listStacks(): Promise<StackStateRef[]>;
491
+ private headObject;
492
+ private readLegacyRegion;
493
+ private legacyMatchesRegion;
494
+ private tryGetLegacy;
495
+ private parseStateBody;
496
+ }
497
+ //#endregion
498
+ //#region src/state/lock-manager.d.ts
499
+ interface LockManagerOptions {
500
+ ttlMinutes?: number;
501
+ }
502
+ declare class LockManager {
503
+ private logger;
504
+ private s3Client;
505
+ private config;
506
+ private readonly ttlMs;
507
+ constructor(s3Client: S3Client, config: StateBackendConfig, options?: LockManagerOptions);
508
+ private getLockKey;
509
+ private getDefaultOwner;
510
+ private isLockExpired;
511
+ private formatDuration;
512
+ acquireLock(stackName: string, region: string, owner?: string, operation?: string): Promise<boolean>;
513
+ getLockInfo(stackName: string, region: string | undefined): Promise<LockInfo | null>;
514
+ isLocked(stackName: string, region: string | undefined): Promise<boolean>;
515
+ releaseLock(stackName: string, region: string): Promise<void>;
516
+ forceReleaseLock(stackName: string, region: string | undefined): Promise<void>;
517
+ private deleteLock;
518
+ acquireLockWithRetry(stackName: string, region: string, owner?: string, operation?: string, maxRetries?: number, retryDelay?: number): Promise<void>;
519
+ }
520
+ //#endregion
521
+ //#region src/analyzer/template-parser.d.ts
522
+ declare class TemplateParser {
523
+ private logger;
524
+ getResourceIds(template: CloudFormationTemplate): string[];
525
+ getResource(template: CloudFormationTemplate, logicalId: string): TemplateResource | undefined;
526
+ extractDependencies(resource: TemplateResource): Set<string>;
527
+ private extractRefsFromValue;
528
+ hasProperty(resource: TemplateResource, propertyPath: string): boolean;
529
+ getProperty(resource: TemplateResource, propertyPath: string): unknown;
530
+ validateTemplate(template: unknown): template is CloudFormationTemplate;
531
+ getResourcesByType(template: CloudFormationTemplate, resourceType: string): Map<string, TemplateResource>;
532
+ countResources(template: CloudFormationTemplate): number;
533
+ }
534
+ //#endregion
535
+ //#region src/analyzer/dag-builder.d.ts
536
+ type GraphType = graphlib.Graph;
537
+ interface DagBuilderOptions {
538
+ relaxCdkVpcDefensiveDeps?: boolean;
539
+ }
540
+ declare class DagBuilder {
541
+ private logger;
542
+ private parser;
543
+ private options;
544
+ constructor(options?: DagBuilderOptions);
545
+ buildGraph(template: CloudFormationTemplate): GraphType;
546
+ getExecutionLevels(graph: GraphType): string[][];
547
+ private findCycles;
548
+ getAllDependencies(graph: GraphType, logicalId: string): Set<string>;
549
+ getAllDependents(graph: GraphType, logicalId: string): Set<string>;
550
+ getDirectDependencies(graph: GraphType, logicalId: string): string[];
551
+ getDirectDependents(graph: GraphType, logicalId: string): string[];
552
+ dependsOn(graph: GraphType, resourceA: string, resourceB: string): boolean;
553
+ private addCustomResourcePolicyEdges;
554
+ private addLambdaVpcEdges;
555
+ private isCustomResourceType;
556
+ private buildRolePoliciesMap;
557
+ private extractAttachedRoleIds;
558
+ private extractLogicalIdFromReference;
559
+ }
560
+ //#endregion
561
+ //#region src/analyzer/diff-calculator.d.ts
562
+ type IntrinsicResolveFn = (value: unknown) => Promise<unknown>;
563
+ declare class DiffCalculator {
564
+ private logger;
565
+ private replacementRules;
566
+ calculateDiff(currentState: StackState, desiredTemplate: CloudFormationTemplate, resolveFn?: IntrinsicResolveFn): Promise<Map<string, ResourceChange>>;
567
+ private resolveBestEffort;
568
+ private compareProperties;
569
+ private static readonly INTRINSIC_KEYS;
570
+ private static isIntrinsic;
571
+ private valuesEqual;
572
+ getSummary(changes: Map<string, ResourceChange>): {
573
+ create: number;
574
+ update: number;
575
+ delete: number;
576
+ noChange: number;
577
+ total: number;
578
+ };
579
+ filterByType(changes: Map<string, ResourceChange>, type: ChangeType): ResourceChange[];
580
+ hasChanges(changes: Map<string, ResourceChange>): boolean;
581
+ getReplacementChanges(changes: Map<string, ResourceChange>): ResourceChange[];
582
+ }
583
+ //#endregion
584
+ //#region src/provisioning/cloud-control-provider.d.ts
585
+ declare class CloudControlProvider implements ResourceProvider {
586
+ private cloudControlClient;
587
+ private logger;
588
+ private patchGenerator;
589
+ private readonly MAX_WAIT_TIME_MS;
590
+ private readonly INITIAL_POLL_INTERVAL_MS;
591
+ private readonly MAX_POLL_INTERVAL_MS;
592
+ constructor();
593
+ create(logicalId: string, resourceType: string, properties: Record<string, unknown>): Promise<ResourceCreateResult>;
594
+ update(logicalId: string, physicalId: string, resourceType: string, properties: Record<string, unknown>, previousProperties: Record<string, unknown>): Promise<ResourceUpdateResult>;
595
+ delete(logicalId: string, physicalId: string, resourceType: string, _properties?: Record<string, unknown>, context?: DeleteContext): Promise<void>;
596
+ getResourceState(resourceType: string, physicalId: string): Promise<Record<string, unknown> | null>;
597
+ private waitForOperation;
598
+ private parseResourceModel;
599
+ private enrichResourceAttributes;
600
+ private handleError;
601
+ private sleep;
602
+ static isSupportedResourceType(resourceType: string): boolean;
603
+ readCurrentState(physicalId: string, _logicalId: string, resourceType: string, _properties?: Record<string, unknown>): Promise<Record<string, unknown> | undefined>;
604
+ import(input: ResourceImportInput): Promise<ResourceImportResult | null>;
605
+ }
606
+ //#endregion
607
+ //#region src/provisioning/provider-registry.d.ts
608
+ declare class ProviderRegistry {
609
+ private logger;
610
+ private providers;
611
+ private cloudControlProvider;
612
+ private customResourceProvider;
613
+ private skipResourceTypes;
614
+ constructor();
615
+ setCustomResourceResponseBucket(bucket: string, bucketRegion?: string): void;
616
+ skipResourceType(resourceType: string): void;
617
+ register(resourceType: string, provider: ResourceProvider): void;
618
+ unregister(resourceType: string): void;
619
+ getProvider(resourceType: string): ResourceProvider;
620
+ shouldSkipResource(resourceType: string): boolean;
621
+ hasProvider(resourceType: string): boolean;
622
+ getCloudControlProvider(): CloudControlProvider;
623
+ getRegisteredTypes(): string[];
624
+ getProviderType(resourceType: string): 'sdk' | 'cloud-control' | null;
625
+ validateResourceTypes(resourceTypes: Set<string>): void;
626
+ }
627
+ //#endregion
628
+ //#region src/provisioning/providers/iam-role-provider.d.ts
629
+ declare class IAMRoleProvider implements ResourceProvider {
630
+ private iamClient;
631
+ private logger;
632
+ handledProperties: Map<string, ReadonlySet<string>>;
633
+ constructor();
634
+ create(logicalId: string, resourceType: string, properties: Record<string, unknown>): Promise<ResourceCreateResult>;
635
+ update(logicalId: string, physicalId: string, resourceType: string, properties: Record<string, unknown>, previousProperties: Record<string, unknown>): Promise<ResourceUpdateResult>;
636
+ delete(logicalId: string, physicalId: string, resourceType: string, _properties?: Record<string, unknown>, context?: DeleteContext): Promise<void>;
637
+ private detachAllManagedPolicies;
638
+ private deleteAllInlinePolicies;
639
+ private removeFromAllInstanceProfiles;
640
+ private updateManagedPolicies;
641
+ private updateInlinePolicies;
642
+ private updateTags;
643
+ getAttribute(physicalId: string, _resourceType: string, attributeName: string): Promise<unknown>;
644
+ readCurrentState(physicalId: string, _logicalId: string, _resourceType: string, properties?: Record<string, unknown>): Promise<Record<string, unknown> | undefined>;
645
+ import(input: ResourceImportInput): Promise<ResourceImportResult | null>;
646
+ }
647
+ //#endregion
648
+ //#region src/deployment/deploy-engine.d.ts
649
+ interface DeployEngineOptions {
650
+ concurrency?: number;
651
+ dryRun?: boolean;
652
+ lockTimeout?: number;
653
+ parameters?: Record<string, string>;
654
+ noRollback?: boolean;
655
+ resourceWarnAfterMs?: number;
656
+ resourceTimeoutMs?: number;
657
+ resourceWarnAfterByType?: Record<string, number>;
658
+ resourceTimeoutByType?: Record<string, number>;
659
+ captureObservedState?: boolean;
660
+ }
661
+ interface DeployResult {
662
+ stackName: string;
663
+ created: number;
664
+ updated: number;
665
+ deleted: number;
666
+ unchanged: number;
667
+ durationMs: number;
668
+ }
669
+ declare class DeployEngine {
670
+ private logger;
671
+ private resolver;
672
+ private interrupted;
673
+ private observedCaptureTasks;
674
+ private stateBackend;
675
+ private lockManager;
676
+ private dagBuilder;
677
+ private diffCalculator;
678
+ private providerRegistry;
679
+ private options;
680
+ private stackRegion;
681
+ constructor(stateBackend: S3StateBackend, lockManager: LockManager, dagBuilder: DagBuilder, diffCalculator: DiffCalculator, providerRegistry: ProviderRegistry, options: DeployEngineOptions | undefined, stackRegion: string);
682
+ deploy(stackName: string, template: CloudFormationTemplate): Promise<DeployResult>;
683
+ private kickOffObservedCapture;
684
+ private drainObservedCaptures;
685
+ private kickOffAutoRefreshObservedProperties;
686
+ private doDeploy;
687
+ private executeDeployment;
688
+ private performRollback;
689
+ private sortRollbackCreates;
690
+ private performSingleRollback;
691
+ private provisionResource;
692
+ private provisionResourceBody;
693
+ private extractAllDependencies;
694
+ private hasPending;
695
+ private buildDeletionDependencies;
696
+ private addImplicitDeleteDependencies;
697
+ private selectProviderWithSafetyNet;
698
+ private withRetry;
699
+ private resolveOutputs;
700
+ }
701
+ //#endregion
702
+ export { AssemblyReader, AssetError, AssetPublisher, type AssetPublisherOptions, AwsClients, type CdkdConfig, CdkdError, type ChangeType, CloudControlProvider, type CloudFormationTemplate, ConfigError, ConsoleLogger, DagBuilder, DependencyError, DeployEngine, type DeployEngineOptions, type DeployOptions, type DeployResult, DiffCalculator, IAMRoleProvider, LockError, type LockInfo, LockManager, type LogLevel, type Logger, type NormalizeAwsErrorContext, type PropertyChange, ProviderRegistry, ProvisioningError, type ResolveBucketRegionOptions, type ResourceChange, type ResourceCreateResult, type ResourceProvider, type ResourceState, type ResourceUpdateResult, S3StateBackend, type StackInfo, type StackState, type StateBackendConfig, StateError, SynthesisError, type SynthesisOptions, type SynthesisResult, Synthesizer, type TemplateOutput, type TemplateParameter, TemplateParser, type TemplateResource, clearBucketRegionCache, formatError, getAwsClients, getLogger, isCdkdError, normalizeAwsError, resetAwsClients, resolveBucketRegion, setAwsClients, setLogger };
703
+ //# sourceMappingURL=index.d.ts.map