@aws-cdk/aws-service-spec 0.1.67 → 0.1.68
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 +42 -0
- package/db.json.gz +0 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,3 +1,45 @@
|
|
|
1
1
|
# AWS Service Spec
|
|
2
2
|
|
|
3
3
|
This package contains a definition of the AWS Resources available in CloudFormation.
|
|
4
|
+
|
|
5
|
+
# Patching
|
|
6
|
+
|
|
7
|
+
Sometimes it is necessary to patch in certain aspects of the CloudFormation schema, as they are not always
|
|
8
|
+
properly configured for our use cases. As such, we'll need to create a patch.
|
|
9
|
+
|
|
10
|
+
You can create a patch by following these steps:
|
|
11
|
+
1. Create a new patch file under `build/patches/service-patches/my-module.ts` (or use one of the existing patch files if it is for
|
|
12
|
+
the same module).
|
|
13
|
+
2. If you created a new file, add it to `build/patches/service-patches/index.ts`.
|
|
14
|
+
3. Enter in the exact properties, attributes, resources, etc. that you wish to patch. You can refer to the existing patches for example,
|
|
15
|
+
or the example down below:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { forResource, fp, registerServicePatches, replaceDefinitionProperty } from './core';
|
|
19
|
+
import { patching } from '@aws-cdk/service-spec-importers';
|
|
20
|
+
|
|
21
|
+
const reason = patching.Reason.sourceIssue('Something in source was wrong'); // many root causes under `patching.Reason`
|
|
22
|
+
|
|
23
|
+
registerServicePatches(
|
|
24
|
+
forResource('AWS::Service::Construct', (lens) => {
|
|
25
|
+
replaceDefinitionProperty('SomeDefinition', 'SomeProperty', { type: 'integer' }, reason)(lens);
|
|
26
|
+
replaceDefinition(
|
|
27
|
+
'SomeDefinition',
|
|
28
|
+
{
|
|
29
|
+
type: 'string',
|
|
30
|
+
properties : {
|
|
31
|
+
X : {...},
|
|
32
|
+
Y : {...},
|
|
33
|
+
Z : {...},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
reason,
|
|
37
|
+
)(lens);
|
|
38
|
+
addDefinitions({newDefinition: "something something"}, reason)(lens);
|
|
39
|
+
fp.removeFromReadOnlyProperties('AWS::Service::Construct', ['NotAReadOnlyProperty'], reason),
|
|
40
|
+
}),
|
|
41
|
+
);
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
If you do not see your patching changes reflected, double check that there is not an existing [legacy patch](https://github.com/cdklabs/awscdk-service-spec/blob/main/sources/CloudFormationResourceSpecification/README.md)
|
|
45
|
+
that may be overwriting your changes.
|
package/db.json.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"projen": "npx projen"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@aws-cdk/service-spec-importers": "0.0.
|
|
29
|
+
"@aws-cdk/service-spec-importers": "0.0.76",
|
|
30
30
|
"@types/jest": "^29.5.14",
|
|
31
31
|
"@types/node": "^18",
|
|
32
32
|
"@typescript-eslint/eslint-plugin": "^8",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"jest": "^29.7.0",
|
|
42
42
|
"jest-junit": "^16",
|
|
43
43
|
"prettier": "^2.8.8",
|
|
44
|
-
"projen": "^0.91.
|
|
44
|
+
"projen": "^0.91.20",
|
|
45
45
|
"source-map-support": "^0.5.21",
|
|
46
|
-
"ts-jest": "^29.3.
|
|
47
|
-
"typescript": "^5.8.
|
|
46
|
+
"ts-jest": "^29.3.2",
|
|
47
|
+
"typescript": "^5.8.3"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@aws-cdk/service-spec-types": "^0.0.
|
|
50
|
+
"@aws-cdk/service-spec-types": "^0.0.134",
|
|
51
51
|
"@cdklabs/tskb": "^0.0.3"
|
|
52
52
|
},
|
|
53
53
|
"main": "lib/index.js",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
-
"version": "0.1.
|
|
58
|
+
"version": "0.1.68",
|
|
59
59
|
"jest": {
|
|
60
60
|
"coverageProvider": "v8",
|
|
61
61
|
"testMatch": [
|