@znemz/cft-utils 0.0.5-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/LICENSE +21 -0
- package/README.md +39 -0
- package/bin/taggableResourceMap.js +7 -0
- package/bin/taggableResources.js +7 -0
- package/debug.js +3 -0
- package/package.json +57 -0
- package/src/cache/cft_taggable_resource_map.json +755 -0
- package/src/cache/cft_taggable_resources.json +756 -0
- package/src/index.js +5 -0
- package/src/resources/index.js +3 -0
- package/src/resources/taggable.js +133 -0
- package/src/resources/taggable.test.js +18 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Nicholas McCready
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# cft-utils
|
|
2
|
+
|
|
3
|
+
This projects goal is to provide information and capabilities of what AWS Cloudformation
|
|
4
|
+
actually provides. There are many missing gaps and this library intends to fill them. The
|
|
5
|
+
original goal of this library is to identify all AWS Resources which are actually Taggable via
|
|
6
|
+
a Cloudformation Template.
|
|
7
|
+
|
|
8
|
+
Note: the first time the library is run it processes the aws-cd-lib for taggable resources. This
|
|
9
|
+
is then cached inside of `./src/cache/*.json` .
|
|
10
|
+
|
|
11
|
+
## install
|
|
12
|
+
|
|
13
|
+
`npm i --save @znemz/cft-utils`
|
|
14
|
+
|
|
15
|
+
## SDK
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
const lib = require('@znemz/cft-utils');
|
|
19
|
+
(async () =>
|
|
20
|
+
console.log(await lib.resources.taggable.getResources())
|
|
21
|
+
console.log(await lib.resources.taggable.getResourceMap())
|
|
22
|
+
|
|
23
|
+
await lib.resources.taggable.isTaggableResource('AWS::IAM::Role') // true
|
|
24
|
+
)();
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## CLI Tools
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
$ ./bin/taggableResourceMap.js
|
|
31
|
+
{"AWS::AccessAnalyzer::Analyzer":true,"AWS::ACMPCA::CertificateAuthority":true,"AWS::AmazonMQ::Broker":true,"AWS::AmazonMQ::Configuration":true,"AWS::Amplify::App":true,"AWS::Amplify::Branch":true,"AWS::AmplifyUIBuilder::Component":true,"AWS::AmplifyUIBuilder::Form":true,"AWS::AmplifyUIBuilder::Theme":true,"AWS::ApiGatewayV2::Api":true,"AWS::ApiGatewayV2::DomainName":true,"AWS::ApiGatewayV2::Stage":true,"AWS::ApiGatewayV2::VpcLink":true,"AWS::AppConfig::Extension":true,
|
|
32
|
+
... more items
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
$ ./bin/taggableResources.js
|
|
37
|
+
["AWS::AccessAnalyzer::Analyzer","AWS::ACMPCA::CertificateAuthority","AWS::AmazonMQ::Broker","AWS::AmazonMQ::Configuration","AWS::Amplify::App","AWS::Amplify::Branch","AWS::AmplifyUIBuilder::Component","AWS::AmplifyUIBuilder::Form","AWS::AmplifyUIBuilder::Theme",
|
|
38
|
+
... more items
|
|
39
|
+
```
|
package/debug.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@znemz/cft-utils",
|
|
3
|
+
"version": "0.0.5-0",
|
|
4
|
+
"description": "AWS CFT Utilities to fill the gaps for Cloud Formation",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"cft",
|
|
7
|
+
"aws",
|
|
8
|
+
"cloudformation"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://github.com/nmccready/cft-utils#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/nmccready/cft-utils/issues"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/nmccready/cft-utils.git"
|
|
17
|
+
},
|
|
18
|
+
"author": "Nicholas McCready",
|
|
19
|
+
"main": "src/index.js",
|
|
20
|
+
"bin": {
|
|
21
|
+
"taggableResourceMap.js": "./bin/taggableResourceMap.js",
|
|
22
|
+
"taggableResources.js": "./bin/taggableResources.js"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"src/**/*.js",
|
|
26
|
+
"src/**/*.json",
|
|
27
|
+
"*.js",
|
|
28
|
+
"!commitlint.config.js",
|
|
29
|
+
"!jest*.js",
|
|
30
|
+
"!.*.js"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"lint": "eslint .",
|
|
34
|
+
"prepack": "./bin/taggableResourceMap.js && ./bin/taggableResources.js",
|
|
35
|
+
"prepare": "skip-npm-task -t prepare sort-package-json",
|
|
36
|
+
"test": "mocha --timeout 20000 --bail ./src/**/*.test.js",
|
|
37
|
+
"unused:dependencies": "depcheck --ignore-bin-package --ignores @znemz/skip-npm-task,sort-package-json"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"debug-fabulous": "2.0.2",
|
|
41
|
+
"globby": "11.1.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@znemz/skip-npm-task": "0.1.0",
|
|
45
|
+
"aws-cdk-lib": "2",
|
|
46
|
+
"commit-and-tag-version": "12",
|
|
47
|
+
"commitlint": "19",
|
|
48
|
+
"depcheck": "1.4.7",
|
|
49
|
+
"eslint": "8",
|
|
50
|
+
"eslint-config-prettier": "9",
|
|
51
|
+
"eslint-config-standard": "17",
|
|
52
|
+
"eslint-plugin-mocha": "10",
|
|
53
|
+
"eslint-plugin-prettier": "5",
|
|
54
|
+
"mocha": "10",
|
|
55
|
+
"sort-package-json": "1.42"
|
|
56
|
+
}
|
|
57
|
+
}
|