@aws-cdk/toolkit-lib 0.1.5 → 0.1.7

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.
@@ -876,24 +876,77 @@ interface CcApiContextQuery extends ContextLookupRoleOptions {
876
876
  */
877
877
  readonly typeName: string;
878
878
  /**
879
- * exactIdentifier of the resource.
880
- * Specifying exactIdentifier will return at most one result.
881
- * Either exactIdentifier or propertyMatch should be specified.
882
- * @default - None
879
+ * Identifier of the resource to look up using `GetResource`.
880
+ *
881
+ * Specifying exactIdentifier will return exactly one result, or throw an error.
882
+ *
883
+ *
884
+ * @default - Either exactIdentifier or propertyMatch should be specified.
883
885
  */
884
886
  readonly exactIdentifier?: string;
885
887
  /**
886
- * This indicates the property to search for.
887
- * If both exactIdentifier and propertyMatch are specified, then exactIdentifier is used.
888
+ * Returns any resources matching these properties, using `ListResources`.
889
+ *
888
890
  * Specifying propertyMatch will return 0 or more results.
889
- * Either exactIdentifier or propertyMatch should be specified.
890
- * @default - None
891
+ *
892
+ * ## Notes on property completeness
893
+ *
894
+ * CloudControl API's `ListResources` may return fewer properties than
895
+ * `GetResource` would, depending on the resource implementation.
896
+ *
897
+ * The resources that `propertyMatch` matches against will *only ever* be the
898
+ * properties returned by the `ListResources` call.
899
+ *
900
+ * @default - Either exactIdentifier or propertyMatch should be specified.
891
901
  */
892
902
  readonly propertyMatch?: Record<string, unknown>;
893
903
  /**
894
904
  * This is a set of properties returned from CC API that we want to return from ContextQuery.
905
+ *
906
+ * If any properties listed here are absent from the target resource, an error will be thrown.
907
+ *
908
+ * The returned object will always include the key `Identifier` with the CC-API returned
909
+ * field `Identifier`.
910
+ *
911
+ * ## Notes on property completeness
912
+ *
913
+ * CloudControl API's `ListResources` may return fewer properties than
914
+ * `GetResource` would, depending on the resource implementation.
915
+ *
916
+ * The returned properties here are *currently* selected from the response
917
+ * object that CloudControl API returns to the CDK CLI.
918
+ *
919
+ * However, if we find there is need to do so, we may decide to change this
920
+ * behavior in the future: we might change it to perform an additional
921
+ * `GetResource` call for resources matched by `propertyMatch`.
895
922
  */
896
923
  readonly propertiesToReturn: string[];
924
+ /**
925
+ * The value to return if the resource was not found and `ignoreErrorOnMissingContext` is true.
926
+ *
927
+ * If supplied, `dummyValue` should be an array of objects.
928
+ *
929
+ * `dummyValue` does not have to have elements, and it may have objects with
930
+ * different properties than the properties in `propertiesToReturn`, but it
931
+ * will be easiest for downstream code if the `dummyValue` conforms to
932
+ * the expected response shape.
933
+ *
934
+ * @default - No dummy value available
935
+ */
936
+ readonly dummyValue?: any;
937
+ /**
938
+ * Ignore an error and return the `dummyValue` instead if the resource was not found.
939
+ *
940
+ * - In case of an `exactIdentifier` lookup, return the `dummyValue` if the resource with
941
+ * that identifier was not found.
942
+ * - In case of a `propertyMatch` lookup, this setting currently does not have any effect,
943
+ * as `propertyMatch` queries can legally return 0 resources.
944
+ *
945
+ * if `ignoreErrorOnMissingContext` is set, `dummyValue` should be set and be an array.
946
+ *
947
+ * @default false
948
+ */
949
+ readonly ignoreErrorOnMissingContext?: boolean;
897
950
  }
898
951
  interface PluginContextQuery {
899
952
  /**
@@ -2075,6 +2128,12 @@ export interface ConfirmationRequest {
2075
2128
  */
2076
2129
  readonly concurrency?: number;
2077
2130
  }
2131
+ export interface ContextProviderMessageSource {
2132
+ /**
2133
+ * The name of the context provider sending the message
2134
+ */
2135
+ readonly provider: string;
2136
+ }
2078
2137
  export interface StackDeployProgress {
2079
2138
  /**
2080
2139
  * The total number of stacks being deployed
@@ -2259,6 +2318,16 @@ export interface StackProgress {
2259
2318
  */
2260
2319
  readonly formatted: string;
2261
2320
  }
2321
+ interface ResourceMetadata {
2322
+ /**
2323
+ * The resource's metadata as declared in the cloud assembly
2324
+ */
2325
+ readonly entry: MetadataEntry;
2326
+ /**
2327
+ * The construct path of the resource
2328
+ */
2329
+ readonly constructPath: string;
2330
+ }
2262
2331
  /**
2263
2332
  * Payload when stack monitoring is starting or stopping for a given stack deployment.
2264
2333
  */
@@ -2298,6 +2367,9 @@ export interface StackActivity {
2298
2367
  readonly event: StackEvent;
2299
2368
  /**
2300
2369
  * Additional resource metadata
2370
+ *
2371
+ * This information is only available if the information is available in the current cloud assembly.
2372
+ * I.e. no `metadata` will not be available for resource deletion events.
2301
2373
  */
2302
2374
  readonly metadata?: ResourceMetadata;
2303
2375
  /**
@@ -2305,10 +2377,6 @@ export interface StackActivity {
2305
2377
  */
2306
2378
  readonly progress: StackProgress;
2307
2379
  }
2308
- export interface ResourceMetadata {
2309
- entry: MetadataEntry;
2310
- constructPath: string;
2311
- }
2312
2380
  export interface StackSelectionDetails {
2313
2381
  /**
2314
2382
  * The selected stacks, if any
@@ -2375,6 +2443,273 @@ export interface CloudWatchLogEvent {
2375
2443
  */
2376
2444
  readonly timestamp: Date;
2377
2445
  }
2446
+ interface IDifference<ValueType> {
2447
+ readonly oldValue: ValueType | undefined;
2448
+ readonly newValue: ValueType | undefined;
2449
+ readonly isDifferent: boolean;
2450
+ readonly isAddition: boolean;
2451
+ readonly isRemoval: boolean;
2452
+ readonly isUpdate: boolean;
2453
+ }
2454
+ declare class Difference<ValueType> implements IDifference<ValueType> {
2455
+ readonly oldValue: ValueType | undefined;
2456
+ readonly newValue: ValueType | undefined;
2457
+ /**
2458
+ * Whether this is an actual different or the values are actually the same
2459
+ *
2460
+ * isDifferent => (isUpdate | isRemoved | isUpdate)
2461
+ */
2462
+ isDifferent: boolean;
2463
+ /**
2464
+ * @param oldValue the old value, cannot be equal (to the sense of +deepEqual+) to +newValue+.
2465
+ * @param newValue the new value, cannot be equal (to the sense of +deepEqual+) to +oldValue+.
2466
+ */
2467
+ constructor(oldValue: ValueType | undefined, newValue: ValueType | undefined);
2468
+ /** @returns +true+ if the element is new to the template. */
2469
+ get isAddition(): boolean;
2470
+ /** @returns +true+ if the element was removed from the template. */
2471
+ get isRemoval(): boolean;
2472
+ /** @returns +true+ if the element was already in the template and is updated. */
2473
+ get isUpdate(): boolean;
2474
+ }
2475
+ declare class PropertyDifference<ValueType> extends Difference<ValueType> {
2476
+ changeImpact?: ResourceImpact;
2477
+ constructor(oldValue: ValueType | undefined, newValue: ValueType | undefined, args: {
2478
+ changeImpact?: ResourceImpact;
2479
+ });
2480
+ }
2481
+ declare enum ResourceImpact {
2482
+ /** The existing physical resource will be updated */
2483
+ WILL_UPDATE = "WILL_UPDATE",
2484
+ /** A new physical resource will be created */
2485
+ WILL_CREATE = "WILL_CREATE",
2486
+ /** The existing physical resource will be replaced */
2487
+ WILL_REPLACE = "WILL_REPLACE",
2488
+ /** The existing physical resource may be replaced */
2489
+ MAY_REPLACE = "MAY_REPLACE",
2490
+ /** The existing physical resource will be destroyed */
2491
+ WILL_DESTROY = "WILL_DESTROY",
2492
+ /** The existing physical resource will be removed from CloudFormation supervision */
2493
+ WILL_ORPHAN = "WILL_ORPHAN",
2494
+ /** The existing physical resource will be added to CloudFormation supervision */
2495
+ WILL_IMPORT = "WILL_IMPORT",
2496
+ /** There is no change in this resource */
2497
+ NO_CHANGE = "NO_CHANGE"
2498
+ }
2499
+ interface Resource {
2500
+ Type: string;
2501
+ Properties?: {
2502
+ [name: string]: any;
2503
+ };
2504
+ [key: string]: any;
2505
+ }
2506
+ /**
2507
+ * A resource affected by a change
2508
+ */
2509
+ export interface AffectedResource {
2510
+ /**
2511
+ * The logical ID of the affected resource in the template
2512
+ */
2513
+ readonly logicalId: string;
2514
+ /**
2515
+ * The CloudFormation type of the resource
2516
+ * This could be a custom type.
2517
+ */
2518
+ readonly resourceType: string;
2519
+ /**
2520
+ * The friendly description of the affected resource
2521
+ */
2522
+ readonly description?: string;
2523
+ /**
2524
+ * The physical name of the resource when deployed.
2525
+ *
2526
+ * A physical name is not always available, e.g. new resources will not have one until after the deployment
2527
+ */
2528
+ readonly physicalName?: string;
2529
+ /**
2530
+ * Resource metadata attached to the logical id from the cloud assembly
2531
+ *
2532
+ * This is only present if the resource is present in the current Cloud Assembly,
2533
+ * i.e. resource deletions will not have metadata.
2534
+ */
2535
+ readonly metadata?: ResourceMetadata;
2536
+ }
2537
+ /**
2538
+ * Represents a change in a resource
2539
+ */
2540
+ export interface ResourceChange {
2541
+ /**
2542
+ * The logical ID of the resource which is being changed
2543
+ */
2544
+ readonly logicalId: string;
2545
+ /**
2546
+ * The value the resource is being updated from
2547
+ */
2548
+ readonly oldValue: Resource;
2549
+ /**
2550
+ * The value the resource is being updated to
2551
+ */
2552
+ readonly newValue: Resource;
2553
+ /**
2554
+ * The changes made to the resource properties
2555
+ */
2556
+ readonly propertyUpdates: Record<string, PropertyDifference<unknown>>;
2557
+ /**
2558
+ * Resource metadata attached to the logical id from the cloud assembly
2559
+ *
2560
+ * This is only present if the resource is present in the current Cloud Assembly,
2561
+ * i.e. resource deletions will not have metadata.
2562
+ */
2563
+ readonly metadata?: ResourceMetadata;
2564
+ }
2565
+ /**
2566
+ * A change that can be hotswapped
2567
+ */
2568
+ export interface HotswappableChange {
2569
+ /**
2570
+ * The resource change that is causing the hotswap.
2571
+ */
2572
+ readonly cause: ResourceChange;
2573
+ /**
2574
+ * A list of resources that are being hotswapped as part of the change
2575
+ */
2576
+ readonly resources: AffectedResource[];
2577
+ }
2578
+ export declare enum NonHotswappableReason {
2579
+ /**
2580
+ * Tags are not hotswappable
2581
+ */
2582
+ TAGS = "tags",
2583
+ /**
2584
+ * Changed resource properties are not hotswappable on this resource type
2585
+ */
2586
+ PROPERTIES = "properties",
2587
+ /**
2588
+ * A stack output has changed
2589
+ */
2590
+ OUTPUT = "output",
2591
+ /**
2592
+ * A dependant resource is not hotswappable
2593
+ */
2594
+ DEPENDENCY_UNSUPPORTED = "dependency-unsupported",
2595
+ /**
2596
+ * The resource type is not hotswappable
2597
+ */
2598
+ RESOURCE_UNSUPPORTED = "resource-unsupported",
2599
+ /**
2600
+ * The resource is created in the deployment
2601
+ */
2602
+ RESOURCE_CREATION = "resource-creation",
2603
+ /**
2604
+ * The resource is removed in the deployment
2605
+ */
2606
+ RESOURCE_DELETION = "resource-deletion",
2607
+ /**
2608
+ * The resource identified by the logical id has its type changed
2609
+ */
2610
+ RESOURCE_TYPE_CHANGED = "resource-type-changed",
2611
+ /**
2612
+ * The nested stack is created in the deployment
2613
+ */
2614
+ NESTED_STACK_CREATION = "nested-stack-creation"
2615
+ }
2616
+ export interface RejectionSubject {
2617
+ /**
2618
+ * The type of the rejection subject, e.g. Resource or Output
2619
+ */
2620
+ readonly type: string;
2621
+ /**
2622
+ * The logical ID of the change that is not hotswappable
2623
+ */
2624
+ readonly logicalId: string;
2625
+ /**
2626
+ * Resource metadata attached to the logical id from the cloud assembly
2627
+ *
2628
+ * This is only present if the resource is present in the current Cloud Assembly,
2629
+ * i.e. resource deletions will not have metadata.
2630
+ */
2631
+ readonly metadata?: ResourceMetadata;
2632
+ }
2633
+ export interface ResourceSubject extends RejectionSubject {
2634
+ /**
2635
+ * A rejected resource
2636
+ */
2637
+ readonly type: "Resource";
2638
+ /**
2639
+ * The type of the rejected resource
2640
+ */
2641
+ readonly resourceType: string;
2642
+ /**
2643
+ * The list of properties that are cause for the rejection
2644
+ */
2645
+ readonly rejectedProperties?: string[];
2646
+ }
2647
+ export interface OutputSubject extends RejectionSubject {
2648
+ /**
2649
+ * A rejected output
2650
+ */
2651
+ readonly type: "Output";
2652
+ }
2653
+ /**
2654
+ * A change that can not be hotswapped
2655
+ */
2656
+ export interface NonHotswappableChange {
2657
+ /**
2658
+ * The subject of the change that was rejected
2659
+ */
2660
+ readonly subject: ResourceSubject | OutputSubject;
2661
+ /**
2662
+ * Why was this change was deemed non-hotswappable
2663
+ */
2664
+ readonly reason: NonHotswappableReason;
2665
+ /**
2666
+ * Tells the user exactly why this change was deemed non-hotswappable and what its logical ID is.
2667
+ * If not specified, `displayReason` default to state that the properties listed in `rejectedChanges` are not hotswappable.
2668
+ */
2669
+ readonly description: string;
2670
+ }
2671
+ export interface HotswapDeploymentAttempt {
2672
+ /**
2673
+ * The stack that's currently being deployed
2674
+ */
2675
+ readonly stack: cxapi.CloudFormationStackArtifact;
2676
+ /**
2677
+ * The mode the hotswap deployment was initiated with.
2678
+ */
2679
+ readonly mode: "hotswap-only" | "fall-back";
2680
+ }
2681
+ /**
2682
+ * Information about a hotswap deployment
2683
+ */
2684
+ export interface HotswapDeploymentDetails {
2685
+ /**
2686
+ * The stack that's currently being deployed
2687
+ */
2688
+ readonly stack: cxapi.CloudFormationStackArtifact;
2689
+ /**
2690
+ * The mode the hotswap deployment was initiated with.
2691
+ */
2692
+ readonly mode: "hotswap-only" | "fall-back";
2693
+ /**
2694
+ * The changes that were deemed hotswappable
2695
+ */
2696
+ readonly hotswappableChanges: HotswappableChange[];
2697
+ /**
2698
+ * The changes that were deemed not hotswappable
2699
+ */
2700
+ readonly nonHotswappableChanges: NonHotswappableChange[];
2701
+ }
2702
+ /**
2703
+ * The result of an attempted hotswap deployment
2704
+ */
2705
+ export interface HotswapResult extends Duration, HotswapDeploymentDetails {
2706
+ /**
2707
+ * Whether hotswapping happened or not.
2708
+ *
2709
+ * `false` indicates that the deployment could not be hotswapped and full deployment may be attempted as fallback.
2710
+ */
2711
+ readonly hotswapped: boolean;
2712
+ }
2378
2713
  /**
2379
2714
  * Represents a general toolkit error in the AWS CDK Toolkit.
2380
2715
  */
@@ -2395,6 +2730,10 @@ export declare class ToolkitError extends Error {
2395
2730
  * Determines if a given error is an instance of AssemblyError.
2396
2731
  */
2397
2732
  static isContextProviderError(x: any): x is ContextProviderError;
2733
+ /**
2734
+ * An AssemblyError with an original error as cause
2735
+ */
2736
+ static withCause(message: string, error: unknown): ToolkitError;
2398
2737
  /**
2399
2738
  * The type of the error, defaults to "toolkit".
2400
2739
  */
@@ -2403,7 +2742,11 @@ export declare class ToolkitError extends Error {
2403
2742
  * Denotes the source of the error as the toolkit.
2404
2743
  */
2405
2744
  readonly source: "toolkit" | "user";
2406
- constructor(message: string, type?: string);
2745
+ /**
2746
+ * The specific original cause of the error, if available
2747
+ */
2748
+ readonly cause?: unknown;
2749
+ constructor(message: string, type?: string, cause?: unknown);
2407
2750
  }
2408
2751
  /**
2409
2752
  * Represents an authentication-specific error in the AWS CDK Toolkit.
@@ -2440,10 +2783,6 @@ export declare class AssemblyError extends ToolkitError {
2440
2783
  * Absence indicates synthesis didn't fully complete.
2441
2784
  */
2442
2785
  readonly stacks?: cxapi.CloudFormationStackArtifact[];
2443
- /**
2444
- * The specific original cause of the error, if available
2445
- */
2446
- readonly cause?: unknown;
2447
2786
  private constructor();
2448
2787
  }
2449
2788
  /**
@@ -2456,9 +2795,27 @@ export declare class ContextProviderError extends ToolkitError {
2456
2795
  readonly source = "user";
2457
2796
  constructor(message: string);
2458
2797
  }
2798
+ /**
2799
+ * @deprecated
2800
+ */
2801
+ declare enum RequireApproval$1 {
2802
+ /**
2803
+ * Never require any security approvals
2804
+ */
2805
+ NEVER = "never",
2806
+ /**
2807
+ * Any security changes require an approval
2808
+ */
2809
+ ANY_CHANGE = "any-change",
2810
+ /**
2811
+ * Require approval only for changes that are access broadening
2812
+ */
2813
+ BROADENING = "broadening"
2814
+ }
2459
2815
 
2460
2816
  export {
2461
2817
  MissingContext$1 as MissingContext,
2818
+ RequireApproval$1 as RequireApproval,
2462
2819
  };
2463
2820
 
2464
2821
  export {};
@@ -24,7 +24,9 @@ __export(shared_public_exports, {
24
24
  AuthenticationError: () => AuthenticationError,
25
25
  ContextProviderError: () => ContextProviderError,
26
26
  ExpandStackSelection: () => ExpandStackSelection,
27
+ NonHotswappableReason: () => NonHotswappableReason,
27
28
  PermissionChangeType: () => PermissionChangeType,
29
+ RequireApproval: () => RequireApproval,
28
30
  StackSelectionStrategy: () => StackSelectionStrategy,
29
31
  ToolkitError: () => ToolkitError
30
32
  });
@@ -55,6 +57,20 @@ var PermissionChangeType = /* @__PURE__ */ ((PermissionChangeType2) => {
55
57
  return PermissionChangeType2;
56
58
  })(PermissionChangeType || {});
57
59
 
60
+ // ../tmp-toolkit-helpers/src/api/io/payloads/hotswap.ts
61
+ var NonHotswappableReason = /* @__PURE__ */ ((NonHotswappableReason2) => {
62
+ NonHotswappableReason2["TAGS"] = "tags";
63
+ NonHotswappableReason2["PROPERTIES"] = "properties";
64
+ NonHotswappableReason2["OUTPUT"] = "output";
65
+ NonHotswappableReason2["DEPENDENCY_UNSUPPORTED"] = "dependency-unsupported";
66
+ NonHotswappableReason2["RESOURCE_UNSUPPORTED"] = "resource-unsupported";
67
+ NonHotswappableReason2["RESOURCE_CREATION"] = "resource-creation";
68
+ NonHotswappableReason2["RESOURCE_DELETION"] = "resource-deletion";
69
+ NonHotswappableReason2["RESOURCE_TYPE_CHANGED"] = "resource-type-changed";
70
+ NonHotswappableReason2["NESTED_STACK_CREATION"] = "nested-stack-creation";
71
+ return NonHotswappableReason2;
72
+ })(NonHotswappableReason || {});
73
+
58
74
  // ../tmp-toolkit-helpers/src/api/toolkit-error.ts
59
75
  var TOOLKIT_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit-lib.ToolkitError");
60
76
  var AUTHENTICATION_ERROR_SYMBOL = Symbol.for("@aws-cdk/toolkit-lib.AuthenticationError");
@@ -85,6 +101,12 @@ var ToolkitError = class _ToolkitError extends Error {
85
101
  static isContextProviderError(x) {
86
102
  return this.isToolkitError(x) && CONTEXT_PROVIDER_ERROR_SYMBOL in x;
87
103
  }
104
+ /**
105
+ * An AssemblyError with an original error as cause
106
+ */
107
+ static withCause(message, error) {
108
+ return new _ToolkitError(message, "toolkit", error);
109
+ }
88
110
  /**
89
111
  * The type of the error, defaults to "toolkit".
90
112
  */
@@ -93,13 +115,18 @@ var ToolkitError = class _ToolkitError extends Error {
93
115
  * Denotes the source of the error as the toolkit.
94
116
  */
95
117
  source;
96
- constructor(message, type = "toolkit") {
118
+ /**
119
+ * The specific original cause of the error, if available
120
+ */
121
+ cause;
122
+ constructor(message, type = "toolkit", cause) {
97
123
  super(message);
98
124
  Object.setPrototypeOf(this, _ToolkitError.prototype);
99
125
  Object.defineProperty(this, TOOLKIT_ERROR_SYMBOL, { value: true });
100
126
  this.name = new.target.name;
101
127
  this.type = type;
102
128
  this.source = "toolkit";
129
+ this.cause = cause;
103
130
  }
104
131
  };
105
132
  var AuthenticationError = class _AuthenticationError extends ToolkitError {
@@ -137,16 +164,11 @@ var AssemblyError = class _AssemblyError extends ToolkitError {
137
164
  * Absence indicates synthesis didn't fully complete.
138
165
  */
139
166
  stacks;
140
- /**
141
- * The specific original cause of the error, if available
142
- */
143
- cause;
144
167
  constructor(message, stacks, cause) {
145
- super(message, "assembly");
168
+ super(message, "assembly", cause);
146
169
  Object.setPrototypeOf(this, _AssemblyError.prototype);
147
170
  Object.defineProperty(this, ASSEMBLY_ERROR_SYMBOL, { value: true });
148
171
  this.stacks = stacks;
149
- this.cause = cause;
150
172
  }
151
173
  };
152
174
  var ContextProviderError = class _ContextProviderError extends ToolkitError {
@@ -160,13 +182,23 @@ var ContextProviderError = class _ContextProviderError extends ToolkitError {
160
182
  Object.defineProperty(this, CONTEXT_PROVIDER_ERROR_SYMBOL, { value: true });
161
183
  }
162
184
  };
185
+
186
+ // ../tmp-toolkit-helpers/src/api/require-approval.ts
187
+ var RequireApproval = /* @__PURE__ */ ((RequireApproval2) => {
188
+ RequireApproval2["NEVER"] = "never";
189
+ RequireApproval2["ANY_CHANGE"] = "any-change";
190
+ RequireApproval2["BROADENING"] = "broadening";
191
+ return RequireApproval2;
192
+ })(RequireApproval || {});
163
193
  // Annotate the CommonJS export names for ESM import in node:
164
194
  0 && (module.exports = {
165
195
  AssemblyError,
166
196
  AuthenticationError,
167
197
  ContextProviderError,
168
198
  ExpandStackSelection,
199
+ NonHotswappableReason,
169
200
  PermissionChangeType,
201
+ RequireApproval,
170
202
  StackSelectionStrategy,
171
203
  ToolkitError
172
204
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["shared-public.ts", "../../../tmp-toolkit-helpers/src/api/cloud-assembly/stack-selector.ts", "../../../tmp-toolkit-helpers/src/api/io/payloads/diff.ts", "../../../tmp-toolkit-helpers/src/api/toolkit-error.ts"],
4
- "sourcesContent": ["/* eslint-disable import/no-restricted-paths */\n\nexport * from '../../../tmp-toolkit-helpers/src/api';\n", "/**\n * Which stacks should be selected from a cloud assembly\n */\nexport enum StackSelectionStrategy {\n /**\n * Returns all stacks in the app regardless of patterns,\n * including stacks inside nested assemblies.\n */\n ALL_STACKS = 'all-stacks',\n\n /**\n * Returns all stacks in the main (top level) assembly only.\n */\n MAIN_ASSEMBLY = 'main-assembly',\n\n /**\n * If the assembly includes a single stack, returns it.\n * Otherwise throws an exception.\n */\n ONLY_SINGLE = 'only-single',\n\n /**\n * Return stacks matched by patterns.\n * If no stacks are found, execution is halted successfully.\n * Most likely you don't want to use this but `StackSelectionStrategy.MUST_MATCH_PATTERN`\n */\n PATTERN_MATCH = 'pattern-match',\n\n /**\n * Return stacks matched by patterns.\n * Throws an exception if the patterns don't match at least one stack in the assembly.\n */\n PATTERN_MUST_MATCH = 'pattern-must-match',\n\n /**\n * Returns if exactly one stack is matched by the pattern(s).\n * Throws an exception if no stack, or more than exactly one stack are matched.\n */\n PATTERN_MUST_MATCH_SINGLE = 'pattern-must-match-single',\n}\n\n/**\n * When selecting stacks, what other stacks to include because of dependencies\n */\nexport enum ExpandStackSelection {\n /**\n * Don't select any extra stacks\n */\n NONE = 'none',\n\n /**\n * Include stacks that this stack depends on\n */\n UPSTREAM = 'upstream',\n\n /**\n * Include stacks that depend on this stack\n */\n DOWNSTREAM = 'downstream',\n\n /**\n * @TODO\n * Include both directions.\n * I.e. stacks that this stack depends on, and stacks that depend on this stack.\n */\n // FULL = 'full',\n}\n\n/**\n * A specification of which stacks should be selected\n */\nexport interface StackSelector {\n /**\n * The behavior if if no selectors are provided.\n */\n strategy: StackSelectionStrategy;\n\n /**\n * A list of patterns to match the stack hierarchical ids\n * Only used with `PATTERN_*` selection strategies.\n */\n patterns?: string[];\n\n /**\n * Expand the selection to upstream/downstream stacks.\n * @default ExpandStackSelection.None only select the specified/matched stacks\n */\n expand?: ExpandStackSelection;\n\n /**\n * By default, we throw an exception if the assembly contains no stacks.\n * Set to `false`, to halt execution for empty assemblies without error.\n *\n * Note that actions can still throw if a stack selection result is empty,\n * but the assembly contains stacks in principle.\n *\n * @default true\n */\n failOnEmpty?: boolean;\n}\n", "/**\n * Different types of permission related changes in a diff\n */\nexport enum PermissionChangeType {\n /**\n * No permission changes\n */\n NONE = 'none',\n\n /**\n * Permissions are broadening\n */\n BROADENING = 'broadening',\n\n /**\n * Permissions are changed but not broadening\n */\n NON_BROADENING = 'non-broadening',\n}\n", "import type * as cxapi from '@aws-cdk/cx-api';\n\nconst TOOLKIT_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.ToolkitError');\nconst AUTHENTICATION_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.AuthenticationError');\nconst ASSEMBLY_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.AssemblyError');\nconst CONTEXT_PROVIDER_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.ContextProviderError');\n\n/**\n * Represents a general toolkit error in the AWS CDK Toolkit.\n */\nexport class ToolkitError extends Error {\n /**\n * Determines if a given error is an instance of ToolkitError.\n */\n public static isToolkitError(x: any): x is ToolkitError {\n return x !== null && typeof(x) === 'object' && TOOLKIT_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AuthenticationError.\n */\n public static isAuthenticationError(x: any): x is AuthenticationError {\n return this.isToolkitError(x) && AUTHENTICATION_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AssemblyError.\n */\n public static isAssemblyError(x: any): x is AssemblyError {\n return this.isToolkitError(x) && ASSEMBLY_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AssemblyError.\n */\n public static isContextProviderError(x: any): x is ContextProviderError {\n return this.isToolkitError(x) && CONTEXT_PROVIDER_ERROR_SYMBOL in x;\n }\n\n /**\n * The type of the error, defaults to \"toolkit\".\n */\n public readonly type: string;\n\n /**\n * Denotes the source of the error as the toolkit.\n */\n public readonly source: 'toolkit' | 'user';\n\n constructor(message: string, type: string = 'toolkit') {\n super(message);\n Object.setPrototypeOf(this, ToolkitError.prototype);\n Object.defineProperty(this, TOOLKIT_ERROR_SYMBOL, { value: true });\n this.name = new.target.name;\n this.type = type;\n this.source = 'toolkit';\n }\n}\n\n/**\n * Represents an authentication-specific error in the AWS CDK Toolkit.\n */\nexport class AuthenticationError extends ToolkitError {\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n constructor(message: string) {\n super(message, 'authentication');\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n Object.defineProperty(this, AUTHENTICATION_ERROR_SYMBOL, { value: true });\n }\n}\n\n/**\n * Represents an error causes by cloud assembly synthesis\n *\n * This includes errors thrown during app execution, as well as failing annotations.\n */\nexport class AssemblyError extends ToolkitError {\n /**\n * An AssemblyError with an original error as cause\n */\n public static withCause(message: string, error: unknown): AssemblyError {\n return new AssemblyError(message, undefined, error);\n }\n\n /**\n * An AssemblyError with a list of stacks as cause\n */\n public static withStacks(message: string, stacks?: cxapi.CloudFormationStackArtifact[]): AssemblyError {\n return new AssemblyError(message, stacks);\n }\n\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n /**\n * The stacks that caused the error, if available\n *\n * The `messages` property of each `cxapi.CloudFormationStackArtifact` will contain the respective errors.\n * Absence indicates synthesis didn't fully complete.\n */\n public readonly stacks?: cxapi.CloudFormationStackArtifact[];\n\n /**\n * The specific original cause of the error, if available\n */\n public readonly cause?: unknown;\n\n private constructor(message: string, stacks?: cxapi.CloudFormationStackArtifact[], cause?: unknown) {\n super(message, 'assembly');\n Object.setPrototypeOf(this, AssemblyError.prototype);\n Object.defineProperty(this, ASSEMBLY_ERROR_SYMBOL, { value: true });\n this.stacks = stacks;\n this.cause = cause;\n }\n}\n\n/**\n * Represents an error originating from a Context Provider\n */\nexport class ContextProviderError extends ToolkitError {\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n constructor(message: string) {\n super(message, 'context-provider');\n Object.setPrototypeOf(this, ContextProviderError.prototype);\n Object.defineProperty(this, CONTEXT_PROVIDER_ERROR_SYMBOL, { value: true });\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,IAAK,yBAAL,kBAAKA,4BAAL;AAKL,EAAAA,wBAAA,gBAAa;AAKb,EAAAA,wBAAA,mBAAgB;AAMhB,EAAAA,wBAAA,iBAAc;AAOd,EAAAA,wBAAA,mBAAgB;AAMhB,EAAAA,wBAAA,wBAAqB;AAMrB,EAAAA,wBAAA,+BAA4B;AAnClB,SAAAA;AAAA,GAAA;AAyCL,IAAK,uBAAL,kBAAKC,0BAAL;AAIL,EAAAA,sBAAA,UAAO;AAKP,EAAAA,sBAAA,cAAW;AAKX,EAAAA,sBAAA,gBAAa;AAdH,SAAAA;AAAA,GAAA;;;ACzCL,IAAK,uBAAL,kBAAKC,0BAAL;AAIL,EAAAA,sBAAA,UAAO;AAKP,EAAAA,sBAAA,gBAAa;AAKb,EAAAA,sBAAA,oBAAiB;AAdP,SAAAA;AAAA,GAAA;;;ACDZ,IAAM,uBAAuB,OAAO,IAAI,mCAAmC;AAC3E,IAAM,8BAA8B,OAAO,IAAI,0CAA0C;AACzF,IAAM,wBAAwB,OAAO,IAAI,oCAAoC;AAC7E,IAAM,gCAAgC,OAAO,IAAI,2CAA2C;AAKrF,IAAM,eAAN,MAAM,sBAAqB,MAAM;AAAA;AAAA;AAAA;AAAA,EAItC,OAAc,eAAe,GAA2B;AACtD,WAAO,MAAM,QAAQ,OAAO,MAAO,YAAY,wBAAwB;AAAA,EACzE;AAAA;AAAA;AAAA;AAAA,EAKA,OAAc,sBAAsB,GAAkC;AACpE,WAAO,KAAK,eAAe,CAAC,KAAK,+BAA+B;AAAA,EAClE;AAAA;AAAA;AAAA;AAAA,EAKA,OAAc,gBAAgB,G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AAClE,SAAK,SAAS;AACd,SAAK,QAAQ;AAAA,EACf;AACF;AAKO,IAAM,uBAAN,MAAM,8BAA6B,aAAa;AAAA;AAAA;AAAA;AAAA,EAIrC,SAAS;AAAA,EAEzB,YAAY,SAAiB;AAC3B,UAAM,SAAS,kBAAkB;AACjC,WAAO,eAAe,MAAM,sBAAqB,SAAS;AAC1D,WAAO,eAAe,MAAM,+BAA+B,EAAE,OAAO,KAAK,CAAC;AAAA,EAC5E;AACF;",
6
- "names": ["StackSelectionStrategy", "ExpandStackSelection", "PermissionChangeType"]
3
+ "sources": ["shared-public.ts", "../../../tmp-toolkit-helpers/src/api/cloud-assembly/stack-selector.ts", "../../../tmp-toolkit-helpers/src/api/io/payloads/diff.ts", "../../../tmp-toolkit-helpers/src/api/io/payloads/hotswap.ts", "../../../tmp-toolkit-helpers/src/api/toolkit-error.ts", "../../../tmp-toolkit-helpers/src/api/require-approval.ts"],
4
+ "sourcesContent": ["/* eslint-disable import/no-restricted-paths */\n\nexport * from '../../../tmp-toolkit-helpers/src/api';\n", "/**\n * Which stacks should be selected from a cloud assembly\n */\nexport enum StackSelectionStrategy {\n /**\n * Returns all stacks in the app regardless of patterns,\n * including stacks inside nested assemblies.\n */\n ALL_STACKS = 'all-stacks',\n\n /**\n * Returns all stacks in the main (top level) assembly only.\n */\n MAIN_ASSEMBLY = 'main-assembly',\n\n /**\n * If the assembly includes a single stack, returns it.\n * Otherwise throws an exception.\n */\n ONLY_SINGLE = 'only-single',\n\n /**\n * Return stacks matched by patterns.\n * If no stacks are found, execution is halted successfully.\n * Most likely you don't want to use this but `StackSelectionStrategy.MUST_MATCH_PATTERN`\n */\n PATTERN_MATCH = 'pattern-match',\n\n /**\n * Return stacks matched by patterns.\n * Throws an exception if the patterns don't match at least one stack in the assembly.\n */\n PATTERN_MUST_MATCH = 'pattern-must-match',\n\n /**\n * Returns if exactly one stack is matched by the pattern(s).\n * Throws an exception if no stack, or more than exactly one stack are matched.\n */\n PATTERN_MUST_MATCH_SINGLE = 'pattern-must-match-single',\n}\n\n/**\n * When selecting stacks, what other stacks to include because of dependencies\n */\nexport enum ExpandStackSelection {\n /**\n * Don't select any extra stacks\n */\n NONE = 'none',\n\n /**\n * Include stacks that this stack depends on\n */\n UPSTREAM = 'upstream',\n\n /**\n * Include stacks that depend on this stack\n */\n DOWNSTREAM = 'downstream',\n\n /**\n * @TODO\n * Include both directions.\n * I.e. stacks that this stack depends on, and stacks that depend on this stack.\n */\n // FULL = 'full',\n}\n\n/**\n * A specification of which stacks should be selected\n */\nexport interface StackSelector {\n /**\n * The behavior if if no selectors are provided.\n */\n strategy: StackSelectionStrategy;\n\n /**\n * A list of patterns to match the stack hierarchical ids\n * Only used with `PATTERN_*` selection strategies.\n */\n patterns?: string[];\n\n /**\n * Expand the selection to upstream/downstream stacks.\n * @default ExpandStackSelection.None only select the specified/matched stacks\n */\n expand?: ExpandStackSelection;\n\n /**\n * By default, we throw an exception if the assembly contains no stacks.\n * Set to `false`, to halt execution for empty assemblies without error.\n *\n * Note that actions can still throw if a stack selection result is empty,\n * but the assembly contains stacks in principle.\n *\n * @default true\n */\n failOnEmpty?: boolean;\n}\n", "/**\n * Different types of permission related changes in a diff\n */\nexport enum PermissionChangeType {\n /**\n * No permission changes\n */\n NONE = 'none',\n\n /**\n * Permissions are broadening\n */\n BROADENING = 'broadening',\n\n /**\n * Permissions are changed but not broadening\n */\n NON_BROADENING = 'non-broadening',\n}\n", "import type { PropertyDifference, Resource } from '@aws-cdk/cloudformation-diff';\nimport type * as cxapi from '@aws-cdk/cx-api';\nimport type { Duration } from './types';\nimport type { ResourceMetadata } from '../../resource-metadata/resource-metadata';\n\n/**\n * A resource affected by a change\n */\nexport interface AffectedResource {\n /**\n * The logical ID of the affected resource in the template\n */\n readonly logicalId: string;\n /**\n * The CloudFormation type of the resource\n * This could be a custom type.\n */\n readonly resourceType: string;\n /**\n * The friendly description of the affected resource\n */\n readonly description?: string;\n /**\n * The physical name of the resource when deployed.\n *\n * A physical name is not always available, e.g. new resources will not have one until after the deployment\n */\n readonly physicalName?: string;\n /**\n * Resource metadata attached to the logical id from the cloud assembly\n *\n * This is only present if the resource is present in the current Cloud Assembly,\n * i.e. resource deletions will not have metadata.\n */\n readonly metadata?: ResourceMetadata;\n}\n\n/**\n * Represents a change in a resource\n */\nexport interface ResourceChange {\n /**\n * The logical ID of the resource which is being changed\n */\n readonly logicalId: string;\n /**\n * The value the resource is being updated from\n */\n readonly oldValue: Resource;\n /**\n * The value the resource is being updated to\n */\n readonly newValue: Resource;\n /**\n * The changes made to the resource properties\n */\n readonly propertyUpdates: Record<string, PropertyDifference<unknown>>;\n /**\n * Resource metadata attached to the logical id from the cloud assembly\n *\n * This is only present if the resource is present in the current Cloud Assembly,\n * i.e. resource deletions will not have metadata.\n */\n readonly metadata?: ResourceMetadata;\n}\n\n/**\n * A change that can be hotswapped\n */\nexport interface HotswappableChange {\n /**\n * The resource change that is causing the hotswap.\n */\n readonly cause: ResourceChange;\n /**\n * A list of resources that are being hotswapped as part of the change\n */\n readonly resources: AffectedResource[];\n}\n\nexport enum NonHotswappableReason {\n /**\n * Tags are not hotswappable\n */\n TAGS = 'tags',\n /**\n * Changed resource properties are not hotswappable on this resource type\n */\n PROPERTIES = 'properties',\n /**\n * A stack output has changed\n */\n OUTPUT = 'output',\n /**\n * A dependant resource is not hotswappable\n */\n DEPENDENCY_UNSUPPORTED = 'dependency-unsupported',\n /**\n * The resource type is not hotswappable\n */\n RESOURCE_UNSUPPORTED = 'resource-unsupported',\n /**\n * The resource is created in the deployment\n */\n RESOURCE_CREATION = 'resource-creation',\n /**\n * The resource is removed in the deployment\n */\n RESOURCE_DELETION = 'resource-deletion',\n /**\n * The resource identified by the logical id has its type changed\n */\n RESOURCE_TYPE_CHANGED = 'resource-type-changed',\n /**\n * The nested stack is created in the deployment\n */\n NESTED_STACK_CREATION = 'nested-stack-creation',\n}\n\nexport interface RejectionSubject {\n /**\n * The type of the rejection subject, e.g. Resource or Output\n */\n readonly type: string;\n\n /**\n * The logical ID of the change that is not hotswappable\n */\n readonly logicalId: string;\n /**\n * Resource metadata attached to the logical id from the cloud assembly\n *\n * This is only present if the resource is present in the current Cloud Assembly,\n * i.e. resource deletions will not have metadata.\n */\n readonly metadata?: ResourceMetadata;\n}\n\nexport interface ResourceSubject extends RejectionSubject {\n /**\n * A rejected resource\n */\n readonly type: 'Resource';\n /**\n * The type of the rejected resource\n */\n readonly resourceType: string;\n /**\n * The list of properties that are cause for the rejection\n */\n readonly rejectedProperties?: string[];\n}\n\nexport interface OutputSubject extends RejectionSubject {\n /**\n * A rejected output\n */\n readonly type: 'Output';\n}\n\n/**\n * A change that can not be hotswapped\n */\nexport interface NonHotswappableChange {\n /**\n * The subject of the change that was rejected\n */\n readonly subject: ResourceSubject | OutputSubject;\n /**\n * Why was this change was deemed non-hotswappable\n */\n readonly reason: NonHotswappableReason;\n /**\n * Tells the user exactly why this change was deemed non-hotswappable and what its logical ID is.\n * If not specified, `displayReason` default to state that the properties listed in `rejectedChanges` are not hotswappable.\n */\n readonly description: string;\n}\n\nexport interface HotswapDeploymentAttempt {\n /**\n * The stack that's currently being deployed\n */\n readonly stack: cxapi.CloudFormationStackArtifact;\n\n /**\n * The mode the hotswap deployment was initiated with.\n */\n readonly mode: 'hotswap-only' | 'fall-back';\n}\n\n/**\n * Information about a hotswap deployment\n */\nexport interface HotswapDeploymentDetails {\n /**\n * The stack that's currently being deployed\n */\n readonly stack: cxapi.CloudFormationStackArtifact;\n\n /**\n * The mode the hotswap deployment was initiated with.\n */\n readonly mode: 'hotswap-only' | 'fall-back';\n /**\n * The changes that were deemed hotswappable\n */\n readonly hotswappableChanges: HotswappableChange[];\n /**\n * The changes that were deemed not hotswappable\n */\n readonly nonHotswappableChanges: NonHotswappableChange[];\n}\n\n/**\n * The result of an attempted hotswap deployment\n */\nexport interface HotswapResult extends Duration, HotswapDeploymentDetails {\n /**\n * Whether hotswapping happened or not.\n *\n * `false` indicates that the deployment could not be hotswapped and full deployment may be attempted as fallback.\n */\n readonly hotswapped: boolean;\n}\n", "import type * as cxapi from '@aws-cdk/cx-api';\n\nconst TOOLKIT_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.ToolkitError');\nconst AUTHENTICATION_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.AuthenticationError');\nconst ASSEMBLY_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.AssemblyError');\nconst CONTEXT_PROVIDER_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.ContextProviderError');\n\n/**\n * Represents a general toolkit error in the AWS CDK Toolkit.\n */\nexport class ToolkitError extends Error {\n /**\n * Determines if a given error is an instance of ToolkitError.\n */\n public static isToolkitError(x: any): x is ToolkitError {\n return x !== null && typeof(x) === 'object' && TOOLKIT_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AuthenticationError.\n */\n public static isAuthenticationError(x: any): x is AuthenticationError {\n return this.isToolkitError(x) && AUTHENTICATION_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AssemblyError.\n */\n public static isAssemblyError(x: any): x is AssemblyError {\n return this.isToolkitError(x) && ASSEMBLY_ERROR_SYMBOL in x;\n }\n\n /**\n * Determines if a given error is an instance of AssemblyError.\n */\n public static isContextProviderError(x: any): x is ContextProviderError {\n return this.isToolkitError(x) && CONTEXT_PROVIDER_ERROR_SYMBOL in x;\n }\n\n /**\n * An AssemblyError with an original error as cause\n */\n public static withCause(message: string, error: unknown): ToolkitError {\n return new ToolkitError(message, 'toolkit', error);\n }\n\n /**\n * The type of the error, defaults to \"toolkit\".\n */\n public readonly type: string;\n\n /**\n * Denotes the source of the error as the toolkit.\n */\n public readonly source: 'toolkit' | 'user';\n\n /**\n * The specific original cause of the error, if available\n */\n public readonly cause?: unknown;\n\n constructor(message: string, type: string = 'toolkit', cause?: unknown) {\n super(message);\n Object.setPrototypeOf(this, ToolkitError.prototype);\n Object.defineProperty(this, TOOLKIT_ERROR_SYMBOL, { value: true });\n this.name = new.target.name;\n this.type = type;\n this.source = 'toolkit';\n this.cause = cause;\n }\n}\n\n/**\n * Represents an authentication-specific error in the AWS CDK Toolkit.\n */\nexport class AuthenticationError extends ToolkitError {\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n constructor(message: string) {\n super(message, 'authentication');\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n Object.defineProperty(this, AUTHENTICATION_ERROR_SYMBOL, { value: true });\n }\n}\n\n/**\n * Represents an error causes by cloud assembly synthesis\n *\n * This includes errors thrown during app execution, as well as failing annotations.\n */\nexport class AssemblyError extends ToolkitError {\n /**\n * An AssemblyError with an original error as cause\n */\n public static withCause(message: string, error: unknown): AssemblyError {\n return new AssemblyError(message, undefined, error);\n }\n\n /**\n * An AssemblyError with a list of stacks as cause\n */\n public static withStacks(message: string, stacks?: cxapi.CloudFormationStackArtifact[]): AssemblyError {\n return new AssemblyError(message, stacks);\n }\n\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n /**\n * The stacks that caused the error, if available\n *\n * The `messages` property of each `cxapi.CloudFormationStackArtifact` will contain the respective errors.\n * Absence indicates synthesis didn't fully complete.\n */\n public readonly stacks?: cxapi.CloudFormationStackArtifact[];\n\n private constructor(message: string, stacks?: cxapi.CloudFormationStackArtifact[], cause?: unknown) {\n super(message, 'assembly', cause);\n Object.setPrototypeOf(this, AssemblyError.prototype);\n Object.defineProperty(this, ASSEMBLY_ERROR_SYMBOL, { value: true });\n this.stacks = stacks;\n }\n}\n\n/**\n * Represents an error originating from a Context Provider\n */\nexport class ContextProviderError extends ToolkitError {\n /**\n * Denotes the source of the error as user.\n */\n public readonly source = 'user';\n\n constructor(message: string) {\n super(message, 'context-provider');\n Object.setPrototypeOf(this, ContextProviderError.prototype);\n Object.defineProperty(this, CONTEXT_PROVIDER_ERROR_SYMBOL, { value: true });\n }\n}\n", "/**\n * @deprecated\n */\nexport enum RequireApproval {\n /**\n * Never require any security approvals\n */\n NEVER = 'never',\n /**\n * Any security changes require an approval\n */\n ANY_CHANGE = 'any-change',\n /**\n * Require approval only for changes that are access broadening\n */\n BROADENING = 'broadening',\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,IAAK,yBAAL,kBAAKA,4BAAL;AAKL,EAAAA,wBAAA,gBAAa;AAKb,EAAAA,wBAAA,mBAAgB;AAMhB,EAAAA,wBAAA,iBAAc;AAOd,EAAAA,wBAAA,mBAAgB;AAMhB,EAAAA,wBAAA,wBAAqB;AAMrB,EAAAA,wBAAA,+BAA4B;AAnClB,SAAAA;AAAA,GAAA;AAyCL,IAAK,uBAAL,kBAAKC,0BAAL;AAIL,EAAAA,sBAAA,UAAO;AAKP,EAAAA,sBAAA,cAAW;AAKX,EAAAA,sBAAA,gBAAa;AAdH,SAAAA;AAAA,GAAA;;;ACzCL,IAAK,uBAAL,kBAAKC,0BAAL;AAIL,EAAAA,sBAAA,UAAO;AAKP,EAAAA,sBAAA,gBAAa;AAKb,EAAAA,sBAAA,oBAAiB;AAdP,SAAAA;AAAA,GAAA;;;AC6EL,IAAK,wBAAL,kBAAKC,2BAAL;AAIL,EAAAA,uBAAA,UAAO;AAIP,EAAAA,uBAAA,gBAAa;AAIb,EAAAA,uBAAA,YAAS;AAIT,EAAAA,uBAAA,4BAAyB;AAIzB,EAAAA,uBAAA,0BAAuB;AAIvB,EAAAA,uBAAA,uBAAoB;AAIpB,EAAAA,uBAAA,uBAAoB;AAIpB,EAAAA,uBAAA,2BAAwB;AAIxB,EAAAA,uBAAA,2BAAwB;AApCd,SAAAA;AAAA,GAAA;;;AC9EZ,IAAM,uBAAuB,OAAO,IAAI,mCAAmC;AAC3E,IAAM,8BAA8B,OAAO,IAAI,0CAA0C;AACzF,IAAM,wBAAwB,OAAO,IAAI,oCAAoC;AAC7E,IAAM,gC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