aws-cdk 2.1020.1 → 2.1021.0
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/README.md +40 -35
- package/THIRD_PARTY_LICENSES +65 -65
- package/build-info.json +2 -2
- package/db.json.gz +0 -0
- package/lib/api/refactor.d.ts +1 -0
- package/lib/api/refactor.js +8 -0
- package/lib/cli/cdk-toolkit.d.ts +18 -21
- package/lib/cli/cdk-toolkit.js +121 -140
- package/lib/cli/cli-config.js +12 -12
- package/lib/cli/cli-type-registry.json +946 -0
- package/lib/cli/cli.js +38 -17
- package/lib/cli/convert-to-user-input.js +12 -6
- package/lib/cli/display-version.d.ts +11 -0
- package/lib/cli/display-version.js +101 -0
- package/lib/cli/io-host/cli-io-host.d.ts +1 -6
- package/lib/cli/io-host/cli-io-host.js +1 -16
- package/lib/cli/parse-command-line-arguments.js +16 -10
- package/lib/cli/platform-warnings.d.ts +2 -1
- package/lib/cli/platform-warnings.js +3 -4
- package/lib/cli/telemetry/endpoint-sink.d.ts +44 -0
- package/lib/cli/telemetry/endpoint-sink.js +95 -0
- package/lib/cli/telemetry/file-sink.d.ts +32 -0
- package/lib/cli/telemetry/file-sink.js +43 -0
- package/lib/cli/telemetry/io-host-sink.d.ts +27 -0
- package/lib/cli/telemetry/io-host-sink.js +35 -0
- package/lib/cli/telemetry/schema.d.ts +62 -0
- package/lib/cli/telemetry/schema.js +3 -0
- package/lib/cli/telemetry/sink-interface.d.ts +18 -0
- package/lib/cli/telemetry/sink-interface.js +3 -0
- package/lib/cli/user-configuration.d.ts +14 -4
- package/lib/cli/user-configuration.js +42 -30
- package/lib/cli/user-input.d.ts +18 -12
- package/lib/cli/user-input.js +1 -1
- package/lib/cli/util/yargs-helpers.js +3 -3
- package/lib/cli/version.d.ts +2 -12
- package/lib/cli/version.js +5 -102
- package/lib/commands/context.d.ts +10 -5
- package/lib/commands/context.js +35 -35
- package/lib/commands/docs.d.ts +6 -1
- package/lib/commands/docs.js +20 -19
- package/lib/commands/doctor.d.ts +4 -1
- package/lib/commands/doctor.js +17 -17
- package/lib/commands/flags.d.ts +3 -0
- package/lib/commands/flags.js +43 -0
- package/lib/commands/init/init-hooks.d.ts +2 -1
- package/lib/commands/init/init-hooks.js +6 -6
- package/lib/commands/init/init.d.ts +4 -2
- package/lib/commands/init/init.js +56 -54
- package/lib/commands/init/os.d.ts +2 -1
- package/lib/commands/init/os.js +3 -4
- package/lib/commands/list-stacks.js +8 -2
- package/lib/commands/migrate.d.ts +6 -17
- package/lib/commands/migrate.js +28 -29
- package/lib/cxapp/cloud-assembly.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +44612 -30681
- package/lib/index_bg.wasm +0 -0
- package/lib/init-templates/.init-version.json +1 -1
- package/lib/init-templates/.recommended-feature-flags.json +1 -0
- package/lib/{legacy-aws-auth.d.ts → legacy/aws-auth.d.ts} +1 -1
- package/lib/legacy/aws-auth.js +47 -0
- package/lib/legacy/configuration.d.ts +82 -0
- package/lib/legacy/configuration.js +321 -0
- package/lib/legacy/index.d.ts +19 -0
- package/lib/{legacy-exports-source.js → legacy/index.js} +23 -23
- package/lib/{legacy-logging-source.d.ts → legacy/logging.d.ts} +50 -0
- package/lib/legacy/logging.js +154 -0
- package/lib/legacy/types.js +3 -0
- package/lib/legacy-exports.d.ts +4 -3
- package/lib/legacy-exports.js +4 -1
- package/package.json +12 -12
- package/lib/legacy-aws-auth.js +0 -47
- package/lib/legacy-exports-source.d.ts +0 -18
- package/lib/legacy-logging-source.js +0 -107
- package/lib/legacy-types.js +0 -3
- package/lib/logging.d.ts +0 -99
- package/lib/logging.js +0 -146
- /package/lib/{legacy-types.d.ts → legacy/types.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1101,8 +1101,12 @@ when using this command.
|
|
|
1101
1101
|
|
|
1102
1102
|
Compares the infrastructure specified in the current state of the CDK app with
|
|
1103
1103
|
the currently deployed application, to determine if any resource was moved
|
|
1104
|
-
(to a different stack or to a different logical ID, or both).
|
|
1105
|
-
|
|
1104
|
+
(to a different stack or to a different logical ID, or both). In keeping with
|
|
1105
|
+
the CloudFormation API, you are not allowed to modify the set of resources
|
|
1106
|
+
as part of a refactor. In other words, adding, deleting or updating resources
|
|
1107
|
+
is considered an error.
|
|
1108
|
+
|
|
1109
|
+
The CLI will show the correspondence between the old and new locations in a table:
|
|
1106
1110
|
|
|
1107
1111
|
```
|
|
1108
1112
|
$ cdk refactor --unstable=refactor --dry-run
|
|
@@ -1125,41 +1129,45 @@ show this table and exit. Eventually, the CLI will also be able to automatically
|
|
|
1125
1129
|
apply the refactor on your CloudFormation stacks. But for now, only the dry-run
|
|
1126
1130
|
mode is supported.
|
|
1127
1131
|
|
|
1128
|
-
If
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
example, if you don't want to include the bucket and the distribution from
|
|
1132
|
-
the table above in the refactor, you can create a file called
|
|
1133
|
-
`exclude.txt` with the following content (destination locations separated by
|
|
1134
|
-
newlines):
|
|
1132
|
+
If your application has more than one stack, and you want the `refactor`
|
|
1133
|
+
command to consider only a subset of them, you can pass a list of stack
|
|
1134
|
+
patterns as a parameter:
|
|
1135
1135
|
|
|
1136
|
+
```shell
|
|
1137
|
+
$ cdk refactor Web* --unstable=refactor --dry-run
|
|
1136
1138
|
```
|
|
1137
|
-
Web/Website/Origin/Resource
|
|
1138
|
-
Web/Website/Distribution/Resource
|
|
1139
|
-
```
|
|
1140
1139
|
|
|
1141
|
-
|
|
1140
|
+
The pattern language is the same as the one used in the `cdk deploy` command.
|
|
1141
|
+
However, unlike `cdk deploy`, in the absence of this parameter, all stacks are
|
|
1142
|
+
considered.
|
|
1143
|
+
|
|
1144
|
+
The CLI's default behavior is to include in the comparison only the deployed
|
|
1145
|
+
stacks that have a counterpart (stack with the same name) locally. If you want
|
|
1146
|
+
to include additional deployed stacks in the comparison, pass their names using
|
|
1147
|
+
the `--additional-stack-name` option:
|
|
1142
1148
|
|
|
1143
1149
|
```shell
|
|
1144
|
-
$ cdk refactor --
|
|
1150
|
+
$ cdk refactor --unstable=refactor --dry-run --additional-stack-name=Foo --additional-stack-name=Bar
|
|
1145
1151
|
```
|
|
1146
1152
|
|
|
1147
|
-
|
|
1148
|
-
command to consider only a subset of them, you can pass a list of stack
|
|
1149
|
-
patterns as a parameter:
|
|
1153
|
+
In case of ambiguities, the CLI will display a table like this:
|
|
1150
1154
|
|
|
1151
|
-
```
|
|
1152
|
-
|
|
1155
|
+
```
|
|
1156
|
+
Detected ambiguities:
|
|
1157
|
+
┌───┬──────────────────────┐
|
|
1158
|
+
│ │ Resource │
|
|
1159
|
+
├───┼──────────────────────┤
|
|
1160
|
+
│ - │ Stack2/DLQ/Resource │
|
|
1161
|
+
│ │ Stack2/DLQ2/Resource │
|
|
1162
|
+
├───┼──────────────────────┤
|
|
1163
|
+
│ + │ Stack1/DLQ/Resource │
|
|
1164
|
+
│ │ Stack1/DLQ2/Resource │
|
|
1165
|
+
└───┴──────────────────────┘
|
|
1153
1166
|
```
|
|
1154
1167
|
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
If, instead of letting the CLI decide which resources to move, you want to
|
|
1160
|
-
provide your own mapping of old to new locations, you can do so by passing a
|
|
1161
|
-
mapping file to the CLI via the `--mapping-file` flag. This file should
|
|
1162
|
-
contain a JSON object with the following format:
|
|
1168
|
+
You can resolve this ambiguity manually, by passing an override file via the
|
|
1169
|
+
`--override-file=<path>` CLI option. This file should contain a JSON object
|
|
1170
|
+
with the following structure:
|
|
1163
1171
|
|
|
1164
1172
|
```json
|
|
1165
1173
|
{
|
|
@@ -1168,22 +1176,19 @@ contain a JSON object with the following format:
|
|
|
1168
1176
|
"account": "123456789012",
|
|
1169
1177
|
"region": "us-east-1",
|
|
1170
1178
|
"resources": {
|
|
1171
|
-
"
|
|
1179
|
+
"Stack2.OldName": "Stack2.NewName"
|
|
1172
1180
|
}
|
|
1173
1181
|
}
|
|
1174
1182
|
]
|
|
1175
1183
|
}
|
|
1176
1184
|
```
|
|
1177
1185
|
|
|
1178
|
-
where `resources` is a mapping of resources from source to destination
|
|
1179
|
-
locations for a given environment. Resource locations are in the format
|
|
1180
|
-
`StackName.LogicalId`.The source must refer to a location where there is a
|
|
1181
|
-
resource currently deployed, while the destination must refer to a location
|
|
1186
|
+
where `resources` is a mapping of resources from source to destination
|
|
1187
|
+
locations for a given environment. Resource locations are in the format
|
|
1188
|
+
`StackName.LogicalId`.The source must refer to a location where there is a
|
|
1189
|
+
resource currently deployed, while the destination must refer to a location
|
|
1182
1190
|
that is not already occupied by any resource.
|
|
1183
1191
|
|
|
1184
|
-
If you want to undo a refactor, you can use the `--revert` option in
|
|
1185
|
-
conjunction with the `--mapping-file` option. It will apply the mapping in
|
|
1186
|
-
reverse order (source becomes destination and vice versa).
|
|
1187
1192
|
|
|
1188
1193
|
### `cdk drift`
|
|
1189
1194
|
|