@aws-cdk/toolkit-lib 0.3.3 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/api-extractor.json +8 -2
  2. package/build-info.json +2 -2
  3. package/db.json.gz +0 -0
  4. package/lib/actions/bootstrap/private/helpers.js +3 -3
  5. package/lib/actions/diff/index.d.ts +2 -2
  6. package/lib/actions/diff/index.js +1 -1
  7. package/lib/actions/diff/private/helpers.js +8 -8
  8. package/lib/actions/refactor/index.d.ts +44 -0
  9. package/lib/actions/refactor/index.js +1 -1
  10. package/lib/api/aws-auth/awscli-compatible.d.ts +6 -5
  11. package/lib/api/aws-auth/awscli-compatible.js +2 -2
  12. package/lib/api/aws-auth/credential-plugins.d.ts +2 -2
  13. package/lib/api/aws-auth/credential-plugins.js +2 -2
  14. package/lib/api/aws-auth/provider-caching.d.ts +3 -3
  15. package/lib/api/aws-auth/provider-caching.js +1 -1
  16. package/lib/api/aws-auth/sdk-logger.d.ts +8 -2
  17. package/lib/api/aws-auth/sdk-logger.js +4 -4
  18. package/lib/api/aws-auth/sdk-provider.d.ts +4 -3
  19. package/lib/api/aws-auth/sdk-provider.js +2 -2
  20. package/lib/api/aws-auth/sdk.d.ts +7 -6
  21. package/lib/api/aws-auth/sdk.js +4 -4
  22. package/lib/api/aws-auth/tracing.d.ts +2 -2
  23. package/lib/api/aws-auth/tracing.js +1 -1
  24. package/lib/api/aws-auth/types.d.ts +3 -3
  25. package/lib/api/aws-auth/types.js +1 -1
  26. package/lib/api/bootstrap/bootstrap-environment.js +2 -2
  27. package/lib/api/bootstrap/bootstrap-template.yaml +12 -1
  28. package/lib/api/cloud-assembly/environment.js +1 -1
  29. package/lib/api/cloud-assembly/index.d.ts +2 -1
  30. package/lib/api/cloud-assembly/index.js +3 -2
  31. package/lib/api/cloud-assembly/private/context-aware-source.js +3 -3
  32. package/lib/api/cloud-assembly/private/exec.js +3 -3
  33. package/lib/api/cloud-assembly/private/prepare-source.js +4 -4
  34. package/lib/api/cloud-assembly/private/source-builder.d.ts +14 -12
  35. package/lib/api/cloud-assembly/private/source-builder.js +40 -23
  36. package/lib/api/cloud-assembly/private/stack-assembly.js +7 -7
  37. package/lib/api/cloud-assembly/source-builder.d.ts +19 -0
  38. package/lib/api/cloud-assembly/source-builder.js +1 -1
  39. package/lib/api/cloud-assembly/stack-collection.js +2 -2
  40. package/lib/api/cloudformation/evaluate-cloudformation-template.d.ts +1 -1
  41. package/lib/api/cloudformation/evaluate-cloudformation-template.js +2 -2
  42. package/lib/api/cloudformation/stack-helpers.js +2 -2
  43. package/lib/api/cloudformation/template-body-parameter.js +2 -2
  44. package/lib/api/context.js +2 -2
  45. package/lib/api/deployments/asset-publishing.js +2 -2
  46. package/lib/api/deployments/assets.js +5 -6
  47. package/lib/api/deployments/cfn-api.js +3 -3
  48. package/lib/api/deployments/checks.js +2 -2
  49. package/lib/api/deployments/deploy-stack.js +2 -2
  50. package/lib/api/deployments/deployment-result.js +2 -2
  51. package/lib/api/deployments/deployments.js +3 -3
  52. package/lib/api/diff/diff-formatter.js +2 -2
  53. package/lib/api/environment/environment-access.js +2 -2
  54. package/lib/api/environment/environment-resources.js +2 -2
  55. package/lib/api/environment/placeholders.js +1 -1
  56. package/lib/api/garbage-collection/garbage-collector.js +2 -2
  57. package/lib/api/garbage-collection/progress-printer.js +2 -2
  58. package/lib/api/garbage-collection/stack-refresh.js +2 -2
  59. package/lib/api/hotswap/appsync-mapping-templates.js +2 -2
  60. package/lib/api/hotswap/common.d.ts +2 -1
  61. package/lib/api/hotswap/common.js +9 -3
  62. package/lib/api/hotswap/ecs-services.js +3 -2
  63. package/lib/api/hotswap/hotswap-deployments.js +2 -2
  64. package/lib/api/hotswap/lambda-functions.js +2 -2
  65. package/lib/api/index.d.ts +0 -1
  66. package/lib/api/index.js +1 -2
  67. package/lib/api/io/private/index.d.ts +0 -1
  68. package/lib/api/io/private/index.js +1 -2
  69. package/lib/api/io/private/level-priority.js +1 -1
  70. package/lib/api/io/private/span.js +1 -1
  71. package/lib/api/logs-monitor/logs-monitor.js +2 -2
  72. package/lib/api/notices/cached-data-source.d.ts +13 -0
  73. package/lib/api/notices/cached-data-source.js +77 -0
  74. package/lib/api/notices/filter.d.ts +59 -0
  75. package/lib/api/notices/filter.js +189 -0
  76. package/lib/api/notices/index.d.ts +1 -0
  77. package/lib/api/{private.js → notices/index.js} +2 -2
  78. package/lib/api/notices/notices.d.ts +111 -0
  79. package/lib/api/notices/notices.js +131 -0
  80. package/lib/api/notices/types.d.ts +37 -0
  81. package/lib/api/notices/types.js +3 -0
  82. package/lib/api/notices/web-data-source.d.ts +9 -0
  83. package/lib/api/notices/web-data-source.js +70 -0
  84. package/lib/api/plugin/context-provider-plugin.js +1 -1
  85. package/lib/api/plugin/plugin.d.ts +4 -6
  86. package/lib/api/plugin/plugin.js +8 -13
  87. package/lib/api/refactoring/cloudformation.d.ts +23 -0
  88. package/lib/api/refactoring/cloudformation.js +54 -1
  89. package/lib/api/refactoring/exclude.d.ts +29 -0
  90. package/lib/api/refactoring/exclude.js +94 -0
  91. package/lib/api/refactoring/execution.d.ts +7 -0
  92. package/lib/api/refactoring/execution.js +43 -0
  93. package/lib/api/refactoring/index.d.ts +6 -23
  94. package/lib/api/refactoring/index.js +89 -60
  95. package/lib/api/resource-import/importer.js +2 -2
  96. package/lib/api/rwlock.js +2 -2
  97. package/lib/api/settings.js +2 -2
  98. package/lib/api/shared-private.js +31 -6186
  99. package/lib/api/toolkit-info.js +2 -2
  100. package/lib/api/work-graph/work-graph-builder.js +3 -3
  101. package/lib/api/work-graph/work-graph.js +2 -2
  102. package/lib/context-providers/ami.js +2 -2
  103. package/lib/context-providers/cc-api-provider.js +2 -2
  104. package/lib/context-providers/hosted-zones.js +2 -2
  105. package/lib/context-providers/index.js +4 -4
  106. package/lib/context-providers/keys.js +2 -2
  107. package/lib/context-providers/load-balancers.js +2 -2
  108. package/lib/context-providers/security-groups.js +2 -2
  109. package/lib/context-providers/ssm-parameters.js +2 -2
  110. package/lib/context-providers/vpcs.js +3 -3
  111. package/lib/index.d.ts +3 -1
  112. package/lib/index.js +4 -2
  113. package/lib/index_bg.wasm +0 -0
  114. package/lib/payloads/deploy.d.ts +8 -1
  115. package/lib/payloads/deploy.js +1 -1
  116. package/lib/payloads/hotswap.d.ts +1 -0
  117. package/lib/payloads/hotswap.js +1 -1
  118. package/lib/private/activity-printer/base.js +1 -1
  119. package/lib/toolkit/non-interactive-io-host.js +5 -4
  120. package/lib/toolkit/toolkit.d.ts +2 -2
  121. package/lib/toolkit/toolkit.js +82 -37
  122. package/lib/util/directories.js +2 -2
  123. package/lib/util/index.d.ts +1 -0
  124. package/lib/util/index.js +2 -1
  125. package/lib/util/json.js +1 -1
  126. package/lib/util/net.d.ts +9 -0
  127. package/lib/util/net.js +60 -0
  128. package/lib/util/objects.js +2 -2
  129. package/lib/util/types.js +1 -1
  130. package/lib/util/version-range.js +2 -2
  131. package/package.json +31 -31
  132. package/tsdoc.json +20 -0
  133. package/lib/api/io/private/sdk-logger.d.ts +0 -3
  134. package/lib/api/io/private/sdk-logger.js +0 -124
  135. package/lib/api/notices.d.ts +0 -210
  136. package/lib/api/notices.js +0 -430
  137. package/lib/api/private.d.ts +0 -1
  138. package/lib/api/shared-private.js.map +0 -7
  139. package/lib/api/shared-public.d.ts +0 -2139
  140. package/lib/api/shared-public.js +0 -3272
  141. package/lib/api/shared-public.js.map +0 -7
  142. package/lib/private/util.d.ts +0 -1
  143. package/lib/private/util.js +0 -787
  144. package/lib/private/util.js.map +0 -7
  145. /package/lib/{api → toolkit}/toolkit-error.d.ts +0 -0
  146. /package/lib/{api → toolkit}/toolkit-error.js +0 -0
@@ -1,210 +0,0 @@
1
- import type { Environment } from '@aws-cdk/cx-api';
2
- import type { SdkHttpOptions } from './aws-auth';
3
- import type { Context } from './context';
4
- import type { IIoHost } from './io';
5
- import type { IoHelper } from './io/private';
6
- import { IoDefaultMessages } from './io/private';
7
- export interface NoticesProps {
8
- /**
9
- * CDK context
10
- */
11
- readonly context: Context;
12
- /**
13
- * Include notices that have already been acknowledged.
14
- *
15
- * @default false
16
- */
17
- readonly includeAcknowledged?: boolean;
18
- /**
19
- * Global CLI option for output directory for synthesized cloud assembly
20
- *
21
- * @default 'cdk.out'
22
- */
23
- readonly output?: string;
24
- /**
25
- * Options for the HTTP request
26
- */
27
- readonly httpOptions?: SdkHttpOptions;
28
- /**
29
- * Where messages are going to be sent
30
- */
31
- readonly ioHost: IIoHost;
32
- /**
33
- * The version of the CLI
34
- */
35
- readonly cliVersion: string;
36
- }
37
- export interface NoticesPrintOptions {
38
- /**
39
- * Whether to append the total number of unacknowledged notices to the display.
40
- *
41
- * @default false
42
- */
43
- readonly showTotal?: boolean;
44
- }
45
- export interface NoticesRefreshOptions {
46
- /**
47
- * Whether to force a cache refresh regardless of expiration time.
48
- *
49
- * @default false
50
- */
51
- readonly force?: boolean;
52
- /**
53
- * Data source for fetch notices from.
54
- *
55
- * @default - WebsiteNoticeDataSource
56
- */
57
- readonly dataSource?: NoticeDataSource;
58
- }
59
- export interface NoticesFilterFilterOptions {
60
- readonly data: Notice[];
61
- readonly cliVersion: string;
62
- readonly outDir: string;
63
- readonly bootstrappedEnvironments: BootstrappedEnvironment[];
64
- }
65
- export declare class NoticesFilter {
66
- private readonly ioMessages;
67
- constructor(ioMessages: IoDefaultMessages);
68
- filter(options: NoticesFilterFilterOptions): FilteredNotice[];
69
- /**
70
- * From a set of input options, return the notices components we are searching for
71
- */
72
- private otherComponents;
73
- /**
74
- * Based on a set of component names, find all notices that match one of the given components
75
- */
76
- private findForNamedComponents;
77
- /**
78
- * Whether the given "affected component" name applies to the given actual component name.
79
- *
80
- * The name matches if the name is exactly the same, or the name in the notice
81
- * is a prefix of the node name when the query ends in '.'.
82
- */
83
- private componentNameMatches;
84
- /**
85
- * Adds dynamic values from the given ActualComponents
86
- *
87
- * If there are multiple components with the same dynamic name, they are joined
88
- * by a comma.
89
- */
90
- private addDynamicValues;
91
- /**
92
- * Treat 'framework' as an alias for either `aws-cdk-lib.` or `@aws-cdk/core.`.
93
- *
94
- * Because it's EITHER `aws-cdk-lib` or `@aws-cdk/core`, we need to add multiple
95
- * arrays at the top level.
96
- */
97
- private resolveAliases;
98
- /**
99
- * Load the construct tree from the given directory and return its components
100
- */
101
- private constructTreeComponents;
102
- }
103
- /**
104
- * Information about a bootstrapped environment.
105
- */
106
- export interface BootstrappedEnvironment {
107
- readonly bootstrapStackVersion: number;
108
- readonly environment: Environment;
109
- }
110
- /**
111
- * Provides access to notices the CLI can display.
112
- */
113
- export declare class Notices {
114
- /**
115
- * Create an instance. Note that this replaces the singleton.
116
- */
117
- static create(props: NoticesProps): Notices;
118
- /**
119
- * Get the singleton instance. May return `undefined` if `create` has not been called.
120
- */
121
- static get(): Notices | undefined;
122
- private static _instance;
123
- private readonly context;
124
- private readonly output;
125
- private readonly acknowledgedIssueNumbers;
126
- private readonly includeAcknowlegded;
127
- private readonly httpOptions;
128
- private readonly ioHelper;
129
- private readonly ioMessages;
130
- private readonly cliVersion;
131
- private data;
132
- private readonly bootstrappedEnvironments;
133
- private constructor();
134
- /**
135
- * Add a bootstrap information to filter on. Can have multiple values
136
- * in case of multi-environment deployments.
137
- */
138
- addBootstrappedEnvironment(bootstrapped: BootstrappedEnvironment): void;
139
- /**
140
- * Refresh the list of notices this instance is aware of.
141
- * To make sure this never crashes the CLI process, all failures are caught and
142
- * silently logged.
143
- *
144
- * If context is configured to not display notices, this will no-op.
145
- */
146
- refresh(options?: NoticesRefreshOptions): Promise<void>;
147
- /**
148
- * Display the relevant notices (unless context dictates we shouldn't).
149
- */
150
- display(options?: NoticesPrintOptions): void;
151
- }
152
- export interface Component {
153
- name: string;
154
- /**
155
- * The range of affected versions
156
- */
157
- version: string;
158
- }
159
- export interface Notice {
160
- title: string;
161
- issueNumber: number;
162
- overview: string;
163
- /**
164
- * A set of affected components
165
- *
166
- * The canonical form of a list of components is in Disjunctive Normal Form
167
- * (i.e., an OR of ANDs). This is the form when the list of components is a
168
- * doubly nested array: the notice matches if all components of at least one
169
- * of the top-level array matches.
170
- *
171
- * If the `components` is a single-level array, it is evaluated as an OR; it
172
- * matches if any of the components matches.
173
- */
174
- components: Array<Component | Component[]>;
175
- schemaVersion: string;
176
- severity?: string;
177
- }
178
- /**
179
- * Notice after passing the filter. A filter can augment a notice with
180
- * dynamic values as it has access to the dynamic matching data.
181
- */
182
- export declare class FilteredNotice {
183
- readonly notice: Notice;
184
- private readonly dynamicValues;
185
- constructor(notice: Notice);
186
- addDynamicValue(key: string, value: string): void;
187
- format(): string;
188
- private formatOverview;
189
- private resolveDynamicValues;
190
- }
191
- export interface NoticeDataSource {
192
- fetch(): Promise<Notice[]>;
193
- }
194
- export declare class WebsiteNoticeDataSource implements NoticeDataSource {
195
- private readonly ioHelper;
196
- private readonly options;
197
- constructor(ioHelper: IoHelper, options?: SdkHttpOptions);
198
- fetch(): Promise<Notice[]>;
199
- }
200
- export declare class CachedDataSource implements NoticeDataSource {
201
- private readonly ioMessages;
202
- private readonly fileName;
203
- private readonly dataSource;
204
- private readonly skipCache?;
205
- constructor(ioMessages: IoDefaultMessages, fileName: string, dataSource: NoticeDataSource, skipCache?: boolean | undefined);
206
- fetch(): Promise<Notice[]>;
207
- private fetchInner;
208
- private load;
209
- private save;
210
- }