@infrascan/aws-cloudwatch-logs-scanner 0.2.4 → 0.3.1
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/dist/generated/graph.d.mts +3 -3
- package/dist/generated/graph.d.ts +3 -3
- package/dist/generated/graph.js +2 -7
- package/dist/generated/graph.mjs +2 -7
- package/dist/index.js +2 -7
- package/dist/index.mjs +2 -7
- package/package.json +9 -23
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Connector, AwsContext,
|
|
1
|
+
import { Connector, AwsContext, SelectedNode, SelectedEdge } from '@infrascan/shared-types';
|
|
2
2
|
|
|
3
|
-
declare function getNodes(stateConnector: Connector, context: AwsContext): Promise<
|
|
4
|
-
declare function getEdges(stateConnector: Connector): Promise<
|
|
3
|
+
declare function getNodes(stateConnector: Connector, context: AwsContext): Promise<SelectedNode[]>;
|
|
4
|
+
declare function getEdges(stateConnector: Connector): Promise<SelectedEdge[]>;
|
|
5
5
|
|
|
6
6
|
export { getEdges, getNodes };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Connector, AwsContext,
|
|
1
|
+
import { Connector, AwsContext, SelectedNode, SelectedEdge } from '@infrascan/shared-types';
|
|
2
2
|
|
|
3
|
-
declare function getNodes(stateConnector: Connector, context: AwsContext): Promise<
|
|
4
|
-
declare function getEdges(stateConnector: Connector): Promise<
|
|
3
|
+
declare function getNodes(stateConnector: Connector, context: AwsContext): Promise<SelectedNode[]>;
|
|
4
|
+
declare function getEdges(stateConnector: Connector): Promise<SelectedEdge[]>;
|
|
5
5
|
|
|
6
6
|
export { getEdges, getNodes };
|
package/dist/generated/graph.js
CHANGED
|
@@ -34,9 +34,7 @@ async function getNodes(stateConnector, context) {
|
|
|
34
34
|
stateConnector
|
|
35
35
|
);
|
|
36
36
|
state.push(...DescribeSubscriptionFiltersNodes);
|
|
37
|
-
return state.map(
|
|
38
|
-
(node) => (0, import_core.formatNode)(node, "cloudwatch-logs", "CloudWatchLogs", context, true)
|
|
39
|
-
);
|
|
37
|
+
return state.map((node) => (0, import_core.formatNode)(node, "CloudWatchLogs", context, true));
|
|
40
38
|
}
|
|
41
39
|
async function getEdges(stateConnector) {
|
|
42
40
|
const edges = [];
|
|
@@ -46,10 +44,7 @@ async function getEdges(stateConnector) {
|
|
|
46
44
|
);
|
|
47
45
|
const DescribeSubscriptionFiltersEdges1 = DescribeSubscriptionFiltersState1.flatMap((state) => {
|
|
48
46
|
const source = (0, import_core.filterState)(state, "logGroupName");
|
|
49
|
-
const target = (0, import_core.filterState)(
|
|
50
|
-
state,
|
|
51
|
-
"{target:destinationArn}"
|
|
52
|
-
);
|
|
47
|
+
const target = (0, import_core.filterState)(state, "{target:destinationArn}");
|
|
53
48
|
if (!target || !source) {
|
|
54
49
|
return [];
|
|
55
50
|
}
|
package/dist/generated/graph.mjs
CHANGED
|
@@ -15,9 +15,7 @@ async function getNodes(stateConnector, context) {
|
|
|
15
15
|
stateConnector
|
|
16
16
|
);
|
|
17
17
|
state.push(...DescribeSubscriptionFiltersNodes);
|
|
18
|
-
return state.map(
|
|
19
|
-
(node) => formatNode(node, "cloudwatch-logs", "CloudWatchLogs", context, true)
|
|
20
|
-
);
|
|
18
|
+
return state.map((node) => formatNode(node, "CloudWatchLogs", context, true));
|
|
21
19
|
}
|
|
22
20
|
async function getEdges(stateConnector) {
|
|
23
21
|
const edges = [];
|
|
@@ -27,10 +25,7 @@ async function getEdges(stateConnector) {
|
|
|
27
25
|
);
|
|
28
26
|
const DescribeSubscriptionFiltersEdges1 = DescribeSubscriptionFiltersState1.flatMap((state) => {
|
|
29
27
|
const source = filterState(state, "logGroupName");
|
|
30
|
-
const target = filterState(
|
|
31
|
-
state,
|
|
32
|
-
"{target:destinationArn}"
|
|
33
|
-
);
|
|
28
|
+
const target = filterState(state, "{target:destinationArn}");
|
|
34
29
|
if (!target || !source) {
|
|
35
30
|
return [];
|
|
36
31
|
}
|
package/dist/index.js
CHANGED
|
@@ -137,9 +137,7 @@ async function getNodes(stateConnector, context) {
|
|
|
137
137
|
stateConnector
|
|
138
138
|
);
|
|
139
139
|
state.push(...DescribeSubscriptionFiltersNodes);
|
|
140
|
-
return state.map(
|
|
141
|
-
(node) => (0, import_core2.formatNode)(node, "cloudwatch-logs", "CloudWatchLogs", context, true)
|
|
142
|
-
);
|
|
140
|
+
return state.map((node) => (0, import_core2.formatNode)(node, "CloudWatchLogs", context, true));
|
|
143
141
|
}
|
|
144
142
|
async function getEdges(stateConnector) {
|
|
145
143
|
const edges = [];
|
|
@@ -149,10 +147,7 @@ async function getEdges(stateConnector) {
|
|
|
149
147
|
);
|
|
150
148
|
const DescribeSubscriptionFiltersEdges1 = DescribeSubscriptionFiltersState1.flatMap((state) => {
|
|
151
149
|
const source = (0, import_core2.filterState)(state, "logGroupName");
|
|
152
|
-
const target = (0, import_core2.filterState)(
|
|
153
|
-
state,
|
|
154
|
-
"{target:destinationArn}"
|
|
155
|
-
);
|
|
150
|
+
const target = (0, import_core2.filterState)(state, "{target:destinationArn}");
|
|
156
151
|
if (!target || !source) {
|
|
157
152
|
return [];
|
|
158
153
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -121,9 +121,7 @@ async function getNodes(stateConnector, context) {
|
|
|
121
121
|
stateConnector
|
|
122
122
|
);
|
|
123
123
|
state.push(...DescribeSubscriptionFiltersNodes);
|
|
124
|
-
return state.map(
|
|
125
|
-
(node) => formatNode(node, "cloudwatch-logs", "CloudWatchLogs", context, true)
|
|
126
|
-
);
|
|
124
|
+
return state.map((node) => formatNode(node, "CloudWatchLogs", context, true));
|
|
127
125
|
}
|
|
128
126
|
async function getEdges(stateConnector) {
|
|
129
127
|
const edges = [];
|
|
@@ -133,10 +131,7 @@ async function getEdges(stateConnector) {
|
|
|
133
131
|
);
|
|
134
132
|
const DescribeSubscriptionFiltersEdges1 = DescribeSubscriptionFiltersState1.flatMap((state) => {
|
|
135
133
|
const source = filterState(state, "logGroupName");
|
|
136
|
-
const target = filterState(
|
|
137
|
-
state,
|
|
138
|
-
"{target:destinationArn}"
|
|
139
|
-
);
|
|
134
|
+
const target = filterState(state, "{target:destinationArn}");
|
|
140
135
|
if (!target || !source) {
|
|
141
136
|
return [];
|
|
142
137
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infrascan/aws-cloudwatch-logs-scanner",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Infrascan scanner definition for AWS Cloudwatch Logs",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -15,26 +15,11 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
|
-
"tsup": {
|
|
19
|
-
"clean": true,
|
|
20
|
-
"cjsInterop": true,
|
|
21
|
-
"dts": true,
|
|
22
|
-
"splitting": false,
|
|
23
|
-
"sourcemap": false,
|
|
24
|
-
"entry": [
|
|
25
|
-
"src/**/*.ts"
|
|
26
|
-
],
|
|
27
|
-
"format": [
|
|
28
|
-
"cjs",
|
|
29
|
-
"esm"
|
|
30
|
-
],
|
|
31
|
-
"target": "node18"
|
|
32
|
-
},
|
|
33
18
|
"scripts": {
|
|
34
19
|
"codegen": "npx ts-node ./codegen.ts ; npm run lint:fix ; npm run fmt",
|
|
35
|
-
"build": "rm -rf dist ; tsup",
|
|
36
|
-
"prepublish": "rm -rf dist ; tsup",
|
|
37
|
-
"test": "tap
|
|
20
|
+
"build": "rm -rf dist ; tsup --config internal/tsconfig/tsup.json",
|
|
21
|
+
"prepublish": "rm -rf dist ; tsup --config internal/tsconfig/tsup.json",
|
|
22
|
+
"test": "tap src/*.test.ts --allow-incomplete-coverage -- --typescript",
|
|
38
23
|
"lint": "tsc --noEmit ; prettier src/**/*.ts -c ; eslint .",
|
|
39
24
|
"lint:fix": "eslint . --fix",
|
|
40
25
|
"fmt": "prettier src/**/*.ts -w",
|
|
@@ -60,13 +45,14 @@
|
|
|
60
45
|
"@aws-sdk/credential-providers": "^3.428.0",
|
|
61
46
|
"@infrascan/aws-codegen": "^0.1.0",
|
|
62
47
|
"@infrascan/fs-connector": "^0.2.2",
|
|
63
|
-
"@infrascan/shared-types": "^0.
|
|
48
|
+
"@infrascan/shared-types": "^0.5.0",
|
|
49
|
+
"@infrascan/tsconfig": "*",
|
|
64
50
|
"aws-sdk-client-mock": "^3.0.0",
|
|
65
51
|
"eslint-config-codegen": "^1.0.0",
|
|
66
|
-
"
|
|
52
|
+
"tap": "^18.7.0"
|
|
67
53
|
},
|
|
68
54
|
"dependencies": {
|
|
69
55
|
"@aws-sdk/client-cloudwatch-logs": "3.428.0",
|
|
70
|
-
"@infrascan/core": "0.
|
|
56
|
+
"@infrascan/core": "0.4.0"
|
|
71
57
|
}
|
|
72
|
-
}
|
|
58
|
+
}
|