cdk-assets 4.4.8 → 4.4.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.
package/bin/cdk-assets.js CHANGED
@@ -686,6 +686,13 @@ var init_interfaces = __esm({
686
686
  }
687
687
  });
688
688
 
689
+ // ../@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/validation-report-schema.ts
690
+ var init_validation_report_schema = __esm({
691
+ "../@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/validation-report-schema.ts"() {
692
+ "use strict";
693
+ }
694
+ });
695
+
689
696
  // ../@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/index.ts
690
697
  var cloud_assembly_exports = {};
691
698
  __export(cloud_assembly_exports, {
@@ -703,6 +710,7 @@ var init_cloud_assembly = __esm({
703
710
  init_artifact_schema();
704
711
  init_context_queries();
705
712
  init_interfaces();
713
+ init_validation_report_schema();
706
714
  }
707
715
  });
708
716
 
@@ -4064,7 +4072,7 @@ var require_semver2 = __commonJS({
4064
4072
  // ../@aws-cdk/cloud-assembly-schema/cli-version.json
4065
4073
  var require_cli_version = __commonJS({
4066
4074
  "../@aws-cdk/cloud-assembly-schema/cli-version.json"(exports2, module2) {
4067
- module2.exports = { version: "2.1123.0" };
4075
+ module2.exports = { version: "2.1124.1" };
4068
4076
  }
4069
4077
  });
4070
4078
 
@@ -6097,6 +6105,175 @@ var require_integ_schema = __commonJS({
6097
6105
  }
6098
6106
  });
6099
6107
 
6108
+ // ../@aws-cdk/cloud-assembly-schema/schema/validation-report.schema.json
6109
+ var require_validation_report_schema = __commonJS({
6110
+ "../@aws-cdk/cloud-assembly-schema/schema/validation-report.schema.json"(exports2, module2) {
6111
+ module2.exports = {
6112
+ $ref: "#/definitions/PolicyValidationReportJson",
6113
+ definitions: {
6114
+ PolicyValidationReportJson: {
6115
+ description: "The top-level structure of the policy validation report file.",
6116
+ type: "object",
6117
+ properties: {
6118
+ version: {
6119
+ description: "Protocol version",
6120
+ type: "string"
6121
+ },
6122
+ title: {
6123
+ description: "Report title, if present.",
6124
+ type: "string"
6125
+ },
6126
+ pluginReports: {
6127
+ description: "Reports from all validation plugins that ran during synthesis.",
6128
+ type: "array",
6129
+ items: {
6130
+ $ref: "#/definitions/PluginReportJson"
6131
+ }
6132
+ }
6133
+ },
6134
+ required: ["version", "pluginReports"]
6135
+ },
6136
+ PluginReportJson: {
6137
+ description: "A report from a single validation plugin.",
6138
+ type: "object",
6139
+ properties: {
6140
+ pluginName: {
6141
+ description: "The name of the plugin that produced this report.",
6142
+ type: "string"
6143
+ },
6144
+ pluginVersion: {
6145
+ description: "Version of the plugin that produced this report.",
6146
+ type: "string"
6147
+ },
6148
+ conclusion: {
6149
+ description: "Whether the plugin's validation passed or failed.",
6150
+ $ref: "#/definitions/PolicyValidationReportConclusion"
6151
+ },
6152
+ metadata: {
6153
+ description: "Additional plugin-specific metadata.",
6154
+ type: "object",
6155
+ additionalProperties: {
6156
+ type: "string"
6157
+ }
6158
+ },
6159
+ violations: {
6160
+ description: "Violations found by this plugin.",
6161
+ type: "array",
6162
+ items: {
6163
+ $ref: "#/definitions/PolicyViolationJson"
6164
+ }
6165
+ }
6166
+ },
6167
+ required: ["pluginName", "conclusion", "violations"]
6168
+ },
6169
+ PolicyValidationReportConclusion: {
6170
+ description: "The final conclusion of a validation report.",
6171
+ type: "string",
6172
+ enum: ["success", "failure"]
6173
+ },
6174
+ PolicyViolationJson: {
6175
+ description: "A single policy violation found by a validation plugin.",
6176
+ type: "object",
6177
+ properties: {
6178
+ ruleName: {
6179
+ description: "The name of the rule that was violated.",
6180
+ type: "string"
6181
+ },
6182
+ description: {
6183
+ description: "A description of the violation.",
6184
+ type: "string"
6185
+ },
6186
+ suggestedFix: {
6187
+ description: "How to fix the violation.",
6188
+ type: "string"
6189
+ },
6190
+ severity: {
6191
+ description: "The severity of the violation.",
6192
+ $ref: "#/definitions/PolicyViolationSeverity"
6193
+ },
6194
+ customSeverity: {
6195
+ description: "If the plugin wants to report using a non-standard severity, put it here.",
6196
+ type: "string"
6197
+ },
6198
+ ruleMetadata: {
6199
+ description: "Additional rule-specific metadata.",
6200
+ type: "object",
6201
+ additionalProperties: {
6202
+ type: "string"
6203
+ }
6204
+ },
6205
+ violatingConstructs: {
6206
+ description: "Constructs that violated the rule.",
6207
+ type: "array",
6208
+ items: {
6209
+ $ref: "#/definitions/ViolatingConstructJson"
6210
+ }
6211
+ }
6212
+ },
6213
+ required: ["ruleName", "description", "severity", "violatingConstructs"]
6214
+ },
6215
+ PolicyViolationSeverity: {
6216
+ description: "The severity of a policy violation.",
6217
+ type: "string",
6218
+ enum: ["fatal", "error", "warning", "info", "custom"]
6219
+ },
6220
+ ViolatingConstructJson: {
6221
+ description: "A construct that violated a policy rule.",
6222
+ type: "object",
6223
+ properties: {
6224
+ constructPath: {
6225
+ description: "The construct path as defined in the application.",
6226
+ type: "string"
6227
+ },
6228
+ constructFqn: {
6229
+ description: "The fully qualified name of the construct class (includes the library name).",
6230
+ type: "string"
6231
+ },
6232
+ libraryVersion: {
6233
+ description: "The version of the library that contains this construct.",
6234
+ type: "string"
6235
+ },
6236
+ cloudFormationResource: {
6237
+ description: "If this construct violation regards a CloudFormation resource, a reference to the resource details.",
6238
+ $ref: "#/definitions/CloudFormationResourceJson"
6239
+ },
6240
+ stackTraces: {
6241
+ description: "Stack traces associated with this violation.",
6242
+ type: "array",
6243
+ items: {
6244
+ type: "string"
6245
+ }
6246
+ }
6247
+ },
6248
+ required: ["constructPath"]
6249
+ },
6250
+ CloudFormationResourceJson: {
6251
+ description: "CloudFormation resource details for a violating construct.",
6252
+ type: "object",
6253
+ properties: {
6254
+ templatePath: {
6255
+ description: "The path to the CloudFormation template containing this resource.",
6256
+ type: "string"
6257
+ },
6258
+ logicalId: {
6259
+ description: "The logical ID of the resource in the CloudFormation template.",
6260
+ type: "string"
6261
+ },
6262
+ propertyPaths: {
6263
+ description: "Properties within the construct where the violation was detected.",
6264
+ type: "array",
6265
+ items: {
6266
+ type: "string"
6267
+ }
6268
+ }
6269
+ },
6270
+ required: ["templatePath", "logicalId"]
6271
+ }
6272
+ }
6273
+ };
6274
+ }
6275
+ });
6276
+
6100
6277
  // ../@aws-cdk/cloud-assembly-schema/schema/version.json
6101
6278
  var require_version = __commonJS({
6102
6279
  "../@aws-cdk/cloud-assembly-schema/schema/version.json"(exports2, module2) {
@@ -6117,7 +6294,7 @@ __export(manifest_exports, {
6117
6294
  function stripEnumErrors(errors) {
6118
6295
  return errors.filter((e16) => typeof e16.schema === "string" || !("enum" in e16.schema));
6119
6296
  }
6120
- var fs3, jsonschema, semver, VERSION_MISMATCH, CLI_VERSION, ASSETS_SCHEMA, ASSEMBLY_SCHEMA, INTEG_SCHEMA, SCHEMA_VERSION, Manifest;
6297
+ var fs3, jsonschema, semver, VERSION_MISMATCH, CLI_VERSION, ASSETS_SCHEMA, ASSEMBLY_SCHEMA, INTEG_SCHEMA, VALIDATION_REPORT_SCHEMA, SCHEMA_VERSION, Manifest;
6121
6298
  var init_manifest = __esm({
6122
6299
  "../@aws-cdk/cloud-assembly-schema/lib/manifest.ts"() {
6123
6300
  "use strict";
@@ -6130,6 +6307,7 @@ var init_manifest = __esm({
6130
6307
  ASSETS_SCHEMA = require_assets_schema();
6131
6308
  ASSEMBLY_SCHEMA = require_cloud_assembly_schema();
6132
6309
  INTEG_SCHEMA = require_integ_schema();
6310
+ VALIDATION_REPORT_SCHEMA = require_validation_report_schema();
6133
6311
  SCHEMA_VERSION = require_version();
6134
6312
  Manifest = class _Manifest {
6135
6313
  static {
@@ -6190,6 +6368,14 @@ var init_manifest = __esm({
6190
6368
  testCases: manifest.testCases ?? []
6191
6369
  };
6192
6370
  }
6371
+ /**
6372
+ * Load and validate the policy validation report from file.
6373
+ *
6374
+ * @param filePath - path to the validation report file.
6375
+ */
6376
+ static loadValidationReport(filePath) {
6377
+ return _Manifest.loadManifest(filePath, VALIDATION_REPORT_SCHEMA);
6378
+ }
6193
6379
  /**
6194
6380
  * Fetch the current schema version number.
6195
6381
  */
@@ -733,6 +733,13 @@ var init_interfaces = __esm({
733
733
  }
734
734
  });
735
735
 
736
+ // ../@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/validation-report-schema.ts
737
+ var init_validation_report_schema = __esm({
738
+ "../@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/validation-report-schema.ts"() {
739
+ "use strict";
740
+ }
741
+ });
742
+
736
743
  // ../@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/index.ts
737
744
  var cloud_assembly_exports = {};
738
745
  __export(cloud_assembly_exports, {
@@ -750,6 +757,7 @@ var init_cloud_assembly = __esm({
750
757
  init_artifact_schema();
751
758
  init_context_queries();
752
759
  init_interfaces();
760
+ init_validation_report_schema();
753
761
  }
754
762
  });
755
763
 
@@ -4111,7 +4119,7 @@ var require_semver2 = __commonJS({
4111
4119
  // ../@aws-cdk/cloud-assembly-schema/cli-version.json
4112
4120
  var require_cli_version = __commonJS({
4113
4121
  "../@aws-cdk/cloud-assembly-schema/cli-version.json"(exports2, module2) {
4114
- module2.exports = { version: "2.1123.0" };
4122
+ module2.exports = { version: "2.1124.1" };
4115
4123
  }
4116
4124
  });
4117
4125
 
@@ -6144,6 +6152,175 @@ var require_integ_schema = __commonJS({
6144
6152
  }
6145
6153
  });
6146
6154
 
6155
+ // ../@aws-cdk/cloud-assembly-schema/schema/validation-report.schema.json
6156
+ var require_validation_report_schema = __commonJS({
6157
+ "../@aws-cdk/cloud-assembly-schema/schema/validation-report.schema.json"(exports2, module2) {
6158
+ module2.exports = {
6159
+ $ref: "#/definitions/PolicyValidationReportJson",
6160
+ definitions: {
6161
+ PolicyValidationReportJson: {
6162
+ description: "The top-level structure of the policy validation report file.",
6163
+ type: "object",
6164
+ properties: {
6165
+ version: {
6166
+ description: "Protocol version",
6167
+ type: "string"
6168
+ },
6169
+ title: {
6170
+ description: "Report title, if present.",
6171
+ type: "string"
6172
+ },
6173
+ pluginReports: {
6174
+ description: "Reports from all validation plugins that ran during synthesis.",
6175
+ type: "array",
6176
+ items: {
6177
+ $ref: "#/definitions/PluginReportJson"
6178
+ }
6179
+ }
6180
+ },
6181
+ required: ["version", "pluginReports"]
6182
+ },
6183
+ PluginReportJson: {
6184
+ description: "A report from a single validation plugin.",
6185
+ type: "object",
6186
+ properties: {
6187
+ pluginName: {
6188
+ description: "The name of the plugin that produced this report.",
6189
+ type: "string"
6190
+ },
6191
+ pluginVersion: {
6192
+ description: "Version of the plugin that produced this report.",
6193
+ type: "string"
6194
+ },
6195
+ conclusion: {
6196
+ description: "Whether the plugin's validation passed or failed.",
6197
+ $ref: "#/definitions/PolicyValidationReportConclusion"
6198
+ },
6199
+ metadata: {
6200
+ description: "Additional plugin-specific metadata.",
6201
+ type: "object",
6202
+ additionalProperties: {
6203
+ type: "string"
6204
+ }
6205
+ },
6206
+ violations: {
6207
+ description: "Violations found by this plugin.",
6208
+ type: "array",
6209
+ items: {
6210
+ $ref: "#/definitions/PolicyViolationJson"
6211
+ }
6212
+ }
6213
+ },
6214
+ required: ["pluginName", "conclusion", "violations"]
6215
+ },
6216
+ PolicyValidationReportConclusion: {
6217
+ description: "The final conclusion of a validation report.",
6218
+ type: "string",
6219
+ enum: ["success", "failure"]
6220
+ },
6221
+ PolicyViolationJson: {
6222
+ description: "A single policy violation found by a validation plugin.",
6223
+ type: "object",
6224
+ properties: {
6225
+ ruleName: {
6226
+ description: "The name of the rule that was violated.",
6227
+ type: "string"
6228
+ },
6229
+ description: {
6230
+ description: "A description of the violation.",
6231
+ type: "string"
6232
+ },
6233
+ suggestedFix: {
6234
+ description: "How to fix the violation.",
6235
+ type: "string"
6236
+ },
6237
+ severity: {
6238
+ description: "The severity of the violation.",
6239
+ $ref: "#/definitions/PolicyViolationSeverity"
6240
+ },
6241
+ customSeverity: {
6242
+ description: "If the plugin wants to report using a non-standard severity, put it here.",
6243
+ type: "string"
6244
+ },
6245
+ ruleMetadata: {
6246
+ description: "Additional rule-specific metadata.",
6247
+ type: "object",
6248
+ additionalProperties: {
6249
+ type: "string"
6250
+ }
6251
+ },
6252
+ violatingConstructs: {
6253
+ description: "Constructs that violated the rule.",
6254
+ type: "array",
6255
+ items: {
6256
+ $ref: "#/definitions/ViolatingConstructJson"
6257
+ }
6258
+ }
6259
+ },
6260
+ required: ["ruleName", "description", "severity", "violatingConstructs"]
6261
+ },
6262
+ PolicyViolationSeverity: {
6263
+ description: "The severity of a policy violation.",
6264
+ type: "string",
6265
+ enum: ["fatal", "error", "warning", "info", "custom"]
6266
+ },
6267
+ ViolatingConstructJson: {
6268
+ description: "A construct that violated a policy rule.",
6269
+ type: "object",
6270
+ properties: {
6271
+ constructPath: {
6272
+ description: "The construct path as defined in the application.",
6273
+ type: "string"
6274
+ },
6275
+ constructFqn: {
6276
+ description: "The fully qualified name of the construct class (includes the library name).",
6277
+ type: "string"
6278
+ },
6279
+ libraryVersion: {
6280
+ description: "The version of the library that contains this construct.",
6281
+ type: "string"
6282
+ },
6283
+ cloudFormationResource: {
6284
+ description: "If this construct violation regards a CloudFormation resource, a reference to the resource details.",
6285
+ $ref: "#/definitions/CloudFormationResourceJson"
6286
+ },
6287
+ stackTraces: {
6288
+ description: "Stack traces associated with this violation.",
6289
+ type: "array",
6290
+ items: {
6291
+ type: "string"
6292
+ }
6293
+ }
6294
+ },
6295
+ required: ["constructPath"]
6296
+ },
6297
+ CloudFormationResourceJson: {
6298
+ description: "CloudFormation resource details for a violating construct.",
6299
+ type: "object",
6300
+ properties: {
6301
+ templatePath: {
6302
+ description: "The path to the CloudFormation template containing this resource.",
6303
+ type: "string"
6304
+ },
6305
+ logicalId: {
6306
+ description: "The logical ID of the resource in the CloudFormation template.",
6307
+ type: "string"
6308
+ },
6309
+ propertyPaths: {
6310
+ description: "Properties within the construct where the violation was detected.",
6311
+ type: "array",
6312
+ items: {
6313
+ type: "string"
6314
+ }
6315
+ }
6316
+ },
6317
+ required: ["templatePath", "logicalId"]
6318
+ }
6319
+ }
6320
+ };
6321
+ }
6322
+ });
6323
+
6147
6324
  // ../@aws-cdk/cloud-assembly-schema/schema/version.json
6148
6325
  var require_version = __commonJS({
6149
6326
  "../@aws-cdk/cloud-assembly-schema/schema/version.json"(exports2, module2) {
@@ -6164,7 +6341,7 @@ __export(manifest_exports, {
6164
6341
  function stripEnumErrors(errors) {
6165
6342
  return errors.filter((e16) => typeof e16.schema === "string" || !("enum" in e16.schema));
6166
6343
  }
6167
- var fs3, jsonschema, semver, VERSION_MISMATCH, CLI_VERSION, ASSETS_SCHEMA, ASSEMBLY_SCHEMA, INTEG_SCHEMA, SCHEMA_VERSION, Manifest;
6344
+ var fs3, jsonschema, semver, VERSION_MISMATCH, CLI_VERSION, ASSETS_SCHEMA, ASSEMBLY_SCHEMA, INTEG_SCHEMA, VALIDATION_REPORT_SCHEMA, SCHEMA_VERSION, Manifest;
6168
6345
  var init_manifest = __esm({
6169
6346
  "../@aws-cdk/cloud-assembly-schema/lib/manifest.ts"() {
6170
6347
  "use strict";
@@ -6177,6 +6354,7 @@ var init_manifest = __esm({
6177
6354
  ASSETS_SCHEMA = require_assets_schema();
6178
6355
  ASSEMBLY_SCHEMA = require_cloud_assembly_schema();
6179
6356
  INTEG_SCHEMA = require_integ_schema();
6357
+ VALIDATION_REPORT_SCHEMA = require_validation_report_schema();
6180
6358
  SCHEMA_VERSION = require_version();
6181
6359
  Manifest = class _Manifest {
6182
6360
  static {
@@ -6237,6 +6415,14 @@ var init_manifest = __esm({
6237
6415
  testCases: manifest.testCases ?? []
6238
6416
  };
6239
6417
  }
6418
+ /**
6419
+ * Load and validate the policy validation report from file.
6420
+ *
6421
+ * @param filePath - path to the validation report file.
6422
+ */
6423
+ static loadValidationReport(filePath) {
6424
+ return _Manifest.loadManifest(filePath, VALIDATION_REPORT_SCHEMA);
6425
+ }
6240
6426
  /**
6241
6427
  * Fetch the current schema version number.
6242
6428
  */
package/package.json CHANGED
@@ -35,7 +35,7 @@
35
35
  "organization": true
36
36
  },
37
37
  "devDependencies": {
38
- "@aws-cdk/cloud-assembly-schema": "53.25.0",
38
+ "@aws-cdk/cloud-assembly-schema": "53.27.0",
39
39
  "@aws-sdk/client-s3": "^3",
40
40
  "@cdklabs/eslint-plugin": "^2.0.5",
41
41
  "@stylistic/eslint-plugin": "^3",
@@ -63,7 +63,7 @@
63
63
  "projen": "^0.99.61",
64
64
  "ts-jest": "^29.4.9",
65
65
  "typescript": "5.9",
66
- "@aws-cdk/cdk-assets-lib": "^1.4.7",
66
+ "@aws-cdk/cdk-assets-lib": "^1.4.8",
67
67
  "yargs": "^17.7.2"
68
68
  },
69
69
  "dependencies": {},
@@ -87,7 +87,7 @@
87
87
  "publishConfig": {
88
88
  "access": "public"
89
89
  },
90
- "version": "4.4.8",
90
+ "version": "4.4.9",
91
91
  "packageManager": "yarn@4.13.0",
92
92
  "types": "lib/index.d.ts",
93
93
  "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"yarn projen\"."