cdk-common 2.0.190 → 2.0.193
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/.jsii +3 -3
- package/lib/main.js +1 -1
- package/node_modules/@aws-cdk/assert/package.json +8 -8
- package/node_modules/@aws-cdk/cfnspec/build-tools/create-missing-libraries.js +2 -2
- package/node_modules/@aws-cdk/cfnspec/package.json +3 -3
- package/node_modules/@aws-cdk/cfnspec/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@aws-cdk/cloudformation-diff/package.json +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +2 -2
- package/package.json +2 -2
- package/node_modules/@aws-cdk/cfnspec/coverage/base.css +0 -224
- package/node_modules/@aws-cdk/cfnspec/coverage/block-navigation.js +0 -87
- package/node_modules/@aws-cdk/cfnspec/coverage/build-tools/index.html +0 -161
- package/node_modules/@aws-cdk/cfnspec/coverage/build-tools/massage-spec.ts.html +0 -295
- package/node_modules/@aws-cdk/cfnspec/coverage/build-tools/patch-set.ts.html +0 -907
- package/node_modules/@aws-cdk/cfnspec/coverage/build-tools/scrutiny.ts.html +0 -349
- package/node_modules/@aws-cdk/cfnspec/coverage/build-tools/validate-cfn.ts.html +0 -1093
- package/node_modules/@aws-cdk/cfnspec/coverage/favicon.png +0 -0
- package/node_modules/@aws-cdk/cfnspec/coverage/index.html +0 -161
- package/node_modules/@aws-cdk/cfnspec/coverage/junit.xml +0 -35617
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/base.css +0 -224
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/block-navigation.js +0 -87
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/build-tools/index.html +0 -161
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/build-tools/massage-spec.ts.html +0 -295
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/build-tools/patch-set.ts.html +0 -907
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/build-tools/scrutiny.ts.html +0 -349
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/build-tools/validate-cfn.ts.html +0 -1093
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/favicon.png +0 -0
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/index.html +0 -161
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/lib/canned-metrics/canned-metrics-schema.ts.html +0 -304
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/lib/canned-metrics/index.html +0 -116
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/lib/canned-metrics.ts.html +0 -445
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/lib/index.html +0 -131
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/lib/index.ts.html +0 -634
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/lib/schema/augmentation.ts.html +0 -376
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/lib/schema/base-types.ts.html +0 -172
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/lib/schema/index.html +0 -191
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/lib/schema/index.ts.html +0 -103
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/lib/schema/property.ts.html +0 -1003
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/lib/schema/resource-type.ts.html +0 -577
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/lib/schema/specification.ts.html +0 -253
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/prettify.css +0 -1
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/prettify.js +0 -2
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov-report/sorter.js +0 -196
- package/node_modules/@aws-cdk/cfnspec/coverage/lcov.info +0 -1112
- package/node_modules/@aws-cdk/cfnspec/coverage/lib/canned-metrics/canned-metrics-schema.ts.html +0 -304
- package/node_modules/@aws-cdk/cfnspec/coverage/lib/canned-metrics/index.html +0 -116
- package/node_modules/@aws-cdk/cfnspec/coverage/lib/canned-metrics.ts.html +0 -445
- package/node_modules/@aws-cdk/cfnspec/coverage/lib/index.html +0 -131
- package/node_modules/@aws-cdk/cfnspec/coverage/lib/index.ts.html +0 -634
- package/node_modules/@aws-cdk/cfnspec/coverage/lib/schema/augmentation.ts.html +0 -376
- package/node_modules/@aws-cdk/cfnspec/coverage/lib/schema/base-types.ts.html +0 -172
- package/node_modules/@aws-cdk/cfnspec/coverage/lib/schema/index.html +0 -191
- package/node_modules/@aws-cdk/cfnspec/coverage/lib/schema/index.ts.html +0 -103
- package/node_modules/@aws-cdk/cfnspec/coverage/lib/schema/property.ts.html +0 -1003
- package/node_modules/@aws-cdk/cfnspec/coverage/lib/schema/resource-type.ts.html +0 -577
- package/node_modules/@aws-cdk/cfnspec/coverage/lib/schema/specification.ts.html +0 -253
- package/node_modules/@aws-cdk/cfnspec/coverage/prettify.css +0 -1
- package/node_modules/@aws-cdk/cfnspec/coverage/prettify.js +0 -2
- package/node_modules/@aws-cdk/cfnspec/coverage/sort-arrow-sprite.png +0 -0
- package/node_modules/@aws-cdk/cfnspec/coverage/sorter.js +0 -196
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
var jumpToCode = (function init() {
|
|
3
|
-
// Classes of code we would like to highlight in the file view
|
|
4
|
-
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
|
|
5
|
-
|
|
6
|
-
// Elements to highlight in the file listing view
|
|
7
|
-
var fileListingElements = ['td.pct.low'];
|
|
8
|
-
|
|
9
|
-
// We don't want to select elements that are direct descendants of another match
|
|
10
|
-
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
|
|
11
|
-
|
|
12
|
-
// Selecter that finds elements on the page to which we can jump
|
|
13
|
-
var selector =
|
|
14
|
-
fileListingElements.join(', ') +
|
|
15
|
-
', ' +
|
|
16
|
-
notSelector +
|
|
17
|
-
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
|
|
18
|
-
|
|
19
|
-
// The NodeList of matching elements
|
|
20
|
-
var missingCoverageElements = document.querySelectorAll(selector);
|
|
21
|
-
|
|
22
|
-
var currentIndex;
|
|
23
|
-
|
|
24
|
-
function toggleClass(index) {
|
|
25
|
-
missingCoverageElements
|
|
26
|
-
.item(currentIndex)
|
|
27
|
-
.classList.remove('highlighted');
|
|
28
|
-
missingCoverageElements.item(index).classList.add('highlighted');
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function makeCurrent(index) {
|
|
32
|
-
toggleClass(index);
|
|
33
|
-
currentIndex = index;
|
|
34
|
-
missingCoverageElements.item(index).scrollIntoView({
|
|
35
|
-
behavior: 'smooth',
|
|
36
|
-
block: 'center',
|
|
37
|
-
inline: 'center'
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function goToPrevious() {
|
|
42
|
-
var nextIndex = 0;
|
|
43
|
-
if (typeof currentIndex !== 'number' || currentIndex === 0) {
|
|
44
|
-
nextIndex = missingCoverageElements.length - 1;
|
|
45
|
-
} else if (missingCoverageElements.length > 1) {
|
|
46
|
-
nextIndex = currentIndex - 1;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
makeCurrent(nextIndex);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function goToNext() {
|
|
53
|
-
var nextIndex = 0;
|
|
54
|
-
|
|
55
|
-
if (
|
|
56
|
-
typeof currentIndex === 'number' &&
|
|
57
|
-
currentIndex < missingCoverageElements.length - 1
|
|
58
|
-
) {
|
|
59
|
-
nextIndex = currentIndex + 1;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
makeCurrent(nextIndex);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return function jump(event) {
|
|
66
|
-
if (
|
|
67
|
-
document.getElementById('fileSearch') === document.activeElement &&
|
|
68
|
-
document.activeElement != null
|
|
69
|
-
) {
|
|
70
|
-
// if we're currently focused on the search input, we don't want to navigate
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
switch (event.which) {
|
|
75
|
-
case 78: // n
|
|
76
|
-
case 74: // j
|
|
77
|
-
goToNext();
|
|
78
|
-
break;
|
|
79
|
-
case 66: // b
|
|
80
|
-
case 75: // k
|
|
81
|
-
case 80: // p
|
|
82
|
-
goToPrevious();
|
|
83
|
-
break;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
})();
|
|
87
|
-
window.addEventListener('keydown', jumpToCode);
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
|
|
5
|
-
<head>
|
|
6
|
-
<title>Code coverage report for build-tools</title>
|
|
7
|
-
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="../prettify.css" />
|
|
9
|
-
<link rel="stylesheet" href="../base.css" />
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
-
<style type='text/css'>
|
|
13
|
-
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(../sort-arrow-sprite.png);
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<div class='wrapper'>
|
|
21
|
-
<div class='pad1'>
|
|
22
|
-
<h1><a href="../index.html">All files</a> build-tools</h1>
|
|
23
|
-
<div class='clearfix'>
|
|
24
|
-
|
|
25
|
-
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">62.24% </span>
|
|
27
|
-
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>183/294</span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">45.83% </span>
|
|
34
|
-
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>55/120</span>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">67.16% </span>
|
|
41
|
-
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>45/67</span>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">63.53% </span>
|
|
48
|
-
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>176/277</span>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
<p class="quiet">
|
|
55
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
-
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
|
-
</div>
|
|
64
|
-
<div class='status-line medium'></div>
|
|
65
|
-
<div class="pad1">
|
|
66
|
-
<table class="coverage-summary">
|
|
67
|
-
<thead>
|
|
68
|
-
<tr>
|
|
69
|
-
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
|
70
|
-
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
|
71
|
-
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
|
72
|
-
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
73
|
-
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
|
74
|
-
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
75
|
-
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
|
76
|
-
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
77
|
-
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
|
78
|
-
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
79
|
-
</tr>
|
|
80
|
-
</thead>
|
|
81
|
-
<tbody><tr>
|
|
82
|
-
<td class="file medium" data-value="massage-spec.ts"><a href="massage-spec.ts.html">massage-spec.ts</a></td>
|
|
83
|
-
<td data-value="61.53" class="pic medium">
|
|
84
|
-
<div class="chart"><div class="cover-fill" style="width: 61%"></div><div class="cover-empty" style="width: 39%"></div></div>
|
|
85
|
-
</td>
|
|
86
|
-
<td data-value="61.53" class="pct medium">61.53%</td>
|
|
87
|
-
<td data-value="26" class="abs medium">16/26</td>
|
|
88
|
-
<td data-value="45.45" class="pct low">45.45%</td>
|
|
89
|
-
<td data-value="11" class="abs low">5/11</td>
|
|
90
|
-
<td data-value="71.42" class="pct medium">71.42%</td>
|
|
91
|
-
<td data-value="7" class="abs medium">5/7</td>
|
|
92
|
-
<td data-value="61.53" class="pct medium">61.53%</td>
|
|
93
|
-
<td data-value="26" class="abs medium">16/26</td>
|
|
94
|
-
</tr>
|
|
95
|
-
|
|
96
|
-
<tr>
|
|
97
|
-
<td class="file medium" data-value="patch-set.ts"><a href="patch-set.ts.html">patch-set.ts</a></td>
|
|
98
|
-
<td data-value="54.23" class="pic medium">
|
|
99
|
-
<div class="chart"><div class="cover-fill" style="width: 54%"></div><div class="cover-empty" style="width: 46%"></div></div>
|
|
100
|
-
</td>
|
|
101
|
-
<td data-value="54.23" class="pct medium">54.23%</td>
|
|
102
|
-
<td data-value="118" class="abs medium">64/118</td>
|
|
103
|
-
<td data-value="37.25" class="pct low">37.25%</td>
|
|
104
|
-
<td data-value="51" class="abs low">19/51</td>
|
|
105
|
-
<td data-value="55" class="pct medium">55%</td>
|
|
106
|
-
<td data-value="20" class="abs medium">11/20</td>
|
|
107
|
-
<td data-value="55.85" class="pct medium">55.85%</td>
|
|
108
|
-
<td data-value="111" class="abs medium">62/111</td>
|
|
109
|
-
</tr>
|
|
110
|
-
|
|
111
|
-
<tr>
|
|
112
|
-
<td class="file medium" data-value="scrutiny.ts"><a href="scrutiny.ts.html">scrutiny.ts</a></td>
|
|
113
|
-
<td data-value="55.88" class="pic medium">
|
|
114
|
-
<div class="chart"><div class="cover-fill" style="width: 55%"></div><div class="cover-empty" style="width: 45%"></div></div>
|
|
115
|
-
</td>
|
|
116
|
-
<td data-value="55.88" class="pct medium">55.88%</td>
|
|
117
|
-
<td data-value="34" class="abs medium">19/34</td>
|
|
118
|
-
<td data-value="30.43" class="pct low">30.43%</td>
|
|
119
|
-
<td data-value="23" class="abs low">7/23</td>
|
|
120
|
-
<td data-value="57.14" class="pct medium">57.14%</td>
|
|
121
|
-
<td data-value="7" class="abs medium">4/7</td>
|
|
122
|
-
<td data-value="63.33" class="pct medium">63.33%</td>
|
|
123
|
-
<td data-value="30" class="abs medium">19/30</td>
|
|
124
|
-
</tr>
|
|
125
|
-
|
|
126
|
-
<tr>
|
|
127
|
-
<td class="file high" data-value="validate-cfn.ts"><a href="validate-cfn.ts.html">validate-cfn.ts</a></td>
|
|
128
|
-
<td data-value="72.41" class="pic high">
|
|
129
|
-
<div class="chart"><div class="cover-fill" style="width: 72%"></div><div class="cover-empty" style="width: 28%"></div></div>
|
|
130
|
-
</td>
|
|
131
|
-
<td data-value="72.41" class="pct high">72.41%</td>
|
|
132
|
-
<td data-value="116" class="abs high">84/116</td>
|
|
133
|
-
<td data-value="68.57" class="pct high">68.57%</td>
|
|
134
|
-
<td data-value="35" class="abs high">24/35</td>
|
|
135
|
-
<td data-value="75.75" class="pct medium">75.75%</td>
|
|
136
|
-
<td data-value="33" class="abs medium">25/33</td>
|
|
137
|
-
<td data-value="71.81" class="pct medium">71.81%</td>
|
|
138
|
-
<td data-value="110" class="abs medium">79/110</td>
|
|
139
|
-
</tr>
|
|
140
|
-
|
|
141
|
-
</tbody>
|
|
142
|
-
</table>
|
|
143
|
-
</div>
|
|
144
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
145
|
-
</div><!-- /wrapper -->
|
|
146
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
147
|
-
Code coverage generated by
|
|
148
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
149
|
-
at Fri Jun 24 2022 21:27:03 GMT+0000 (Coordinated Universal Time)
|
|
150
|
-
</div>
|
|
151
|
-
<script src="../prettify.js"></script>
|
|
152
|
-
<script>
|
|
153
|
-
window.onload = function () {
|
|
154
|
-
prettyPrint();
|
|
155
|
-
};
|
|
156
|
-
</script>
|
|
157
|
-
<script src="../sorter.js"></script>
|
|
158
|
-
<script src="../block-navigation.js"></script>
|
|
159
|
-
</body>
|
|
160
|
-
</html>
|
|
161
|
-
|
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
|
|
5
|
-
<head>
|
|
6
|
-
<title>Code coverage report for build-tools/massage-spec.ts</title>
|
|
7
|
-
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="../prettify.css" />
|
|
9
|
-
<link rel="stylesheet" href="../base.css" />
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
-
<style type='text/css'>
|
|
13
|
-
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(../sort-arrow-sprite.png);
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<div class='wrapper'>
|
|
21
|
-
<div class='pad1'>
|
|
22
|
-
<h1><a href="../index.html">All files</a> / <a href="index.html">build-tools</a> massage-spec.ts</h1>
|
|
23
|
-
<div class='clearfix'>
|
|
24
|
-
|
|
25
|
-
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">61.53% </span>
|
|
27
|
-
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>16/26</span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">45.45% </span>
|
|
34
|
-
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>5/11</span>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">71.42% </span>
|
|
41
|
-
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>5/7</span>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">61.53% </span>
|
|
48
|
-
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>16/26</span>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
<p class="quiet">
|
|
55
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
-
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
|
-
</div>
|
|
64
|
-
<div class='status-line medium'></div>
|
|
65
|
-
<pre><table class="coverage">
|
|
66
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
-
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
-
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
-
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
-
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
-
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
-
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
-
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
-
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
-
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
-
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
-
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
-
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
-
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
-
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
-
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
-
<a name='L17'></a><a href='#L17'>17</a>
|
|
83
|
-
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
-
<a name='L19'></a><a href='#L19'>19</a>
|
|
85
|
-
<a name='L20'></a><a href='#L20'>20</a>
|
|
86
|
-
<a name='L21'></a><a href='#L21'>21</a>
|
|
87
|
-
<a name='L22'></a><a href='#L22'>22</a>
|
|
88
|
-
<a name='L23'></a><a href='#L23'>23</a>
|
|
89
|
-
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
|
-
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
|
-
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
-
<a name='L27'></a><a href='#L27'>27</a>
|
|
93
|
-
<a name='L28'></a><a href='#L28'>28</a>
|
|
94
|
-
<a name='L29'></a><a href='#L29'>29</a>
|
|
95
|
-
<a name='L30'></a><a href='#L30'>30</a>
|
|
96
|
-
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
|
-
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
|
-
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
|
-
<a name='L34'></a><a href='#L34'>34</a>
|
|
100
|
-
<a name='L35'></a><a href='#L35'>35</a>
|
|
101
|
-
<a name='L36'></a><a href='#L36'>36</a>
|
|
102
|
-
<a name='L37'></a><a href='#L37'>37</a>
|
|
103
|
-
<a name='L38'></a><a href='#L38'>38</a>
|
|
104
|
-
<a name='L39'></a><a href='#L39'>39</a>
|
|
105
|
-
<a name='L40'></a><a href='#L40'>40</a>
|
|
106
|
-
<a name='L41'></a><a href='#L41'>41</a>
|
|
107
|
-
<a name='L42'></a><a href='#L42'>42</a>
|
|
108
|
-
<a name='L43'></a><a href='#L43'>43</a>
|
|
109
|
-
<a name='L44'></a><a href='#L44'>44</a>
|
|
110
|
-
<a name='L45'></a><a href='#L45'>45</a>
|
|
111
|
-
<a name='L46'></a><a href='#L46'>46</a>
|
|
112
|
-
<a name='L47'></a><a href='#L47'>47</a>
|
|
113
|
-
<a name='L48'></a><a href='#L48'>48</a>
|
|
114
|
-
<a name='L49'></a><a href='#L49'>49</a>
|
|
115
|
-
<a name='L50'></a><a href='#L50'>50</a>
|
|
116
|
-
<a name='L51'></a><a href='#L51'>51</a>
|
|
117
|
-
<a name='L52'></a><a href='#L52'>52</a>
|
|
118
|
-
<a name='L53'></a><a href='#L53'>53</a>
|
|
119
|
-
<a name='L54'></a><a href='#L54'>54</a>
|
|
120
|
-
<a name='L55'></a><a href='#L55'>55</a>
|
|
121
|
-
<a name='L56'></a><a href='#L56'>56</a>
|
|
122
|
-
<a name='L57'></a><a href='#L57'>57</a>
|
|
123
|
-
<a name='L58'></a><a href='#L58'>58</a>
|
|
124
|
-
<a name='L59'></a><a href='#L59'>59</a>
|
|
125
|
-
<a name='L60'></a><a href='#L60'>60</a>
|
|
126
|
-
<a name='L61'></a><a href='#L61'>61</a>
|
|
127
|
-
<a name='L62'></a><a href='#L62'>62</a>
|
|
128
|
-
<a name='L63'></a><a href='#L63'>63</a>
|
|
129
|
-
<a name='L64'></a><a href='#L64'>64</a>
|
|
130
|
-
<a name='L65'></a><a href='#L65'>65</a>
|
|
131
|
-
<a name='L66'></a><a href='#L66'>66</a>
|
|
132
|
-
<a name='L67'></a><a href='#L67'>67</a>
|
|
133
|
-
<a name='L68'></a><a href='#L68'>68</a>
|
|
134
|
-
<a name='L69'></a><a href='#L69'>69</a>
|
|
135
|
-
<a name='L70'></a><a href='#L70'>70</a>
|
|
136
|
-
<a name='L71'></a><a href='#L71'>71</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
137
|
-
<span class="cline-any cline-yes">1x</span>
|
|
138
|
-
<span class="cline-any cline-neutral"> </span>
|
|
139
|
-
<span class="cline-any cline-yes">1x</span>
|
|
140
|
-
<span class="cline-any cline-yes">1x</span>
|
|
141
|
-
<span class="cline-any cline-yes">1x</span>
|
|
142
|
-
<span class="cline-any cline-yes">1x</span>
|
|
143
|
-
<span class="cline-any cline-neutral"> </span>
|
|
144
|
-
<span class="cline-any cline-neutral"> </span>
|
|
145
|
-
<span class="cline-any cline-neutral"> </span>
|
|
146
|
-
<span class="cline-any cline-neutral"> </span>
|
|
147
|
-
<span class="cline-any cline-neutral"> </span>
|
|
148
|
-
<span class="cline-any cline-neutral"> </span>
|
|
149
|
-
<span class="cline-any cline-neutral"> </span>
|
|
150
|
-
<span class="cline-any cline-neutral"> </span>
|
|
151
|
-
<span class="cline-any cline-neutral"> </span>
|
|
152
|
-
<span class="cline-any cline-neutral"> </span>
|
|
153
|
-
<span class="cline-any cline-neutral"> </span>
|
|
154
|
-
<span class="cline-any cline-yes">1x</span>
|
|
155
|
-
<span class="cline-any cline-yes">1x</span>
|
|
156
|
-
<span class="cline-any cline-neutral"> </span>
|
|
157
|
-
<span class="cline-any cline-neutral"> </span>
|
|
158
|
-
<span class="cline-any cline-neutral"> </span>
|
|
159
|
-
<span class="cline-any cline-neutral"> </span>
|
|
160
|
-
<span class="cline-any cline-no"> </span>
|
|
161
|
-
<span class="cline-any cline-neutral"> </span>
|
|
162
|
-
<span class="cline-any cline-no"> </span>
|
|
163
|
-
<span class="cline-any cline-neutral"> </span>
|
|
164
|
-
<span class="cline-any cline-neutral"> </span>
|
|
165
|
-
<span class="cline-any cline-neutral"> </span>
|
|
166
|
-
<span class="cline-any cline-neutral"> </span>
|
|
167
|
-
<span class="cline-any cline-neutral"> </span>
|
|
168
|
-
<span class="cline-any cline-neutral"> </span>
|
|
169
|
-
<span class="cline-any cline-neutral"> </span>
|
|
170
|
-
<span class="cline-any cline-neutral"> </span>
|
|
171
|
-
<span class="cline-any cline-neutral"> </span>
|
|
172
|
-
<span class="cline-any cline-yes">1x</span>
|
|
173
|
-
<span class="cline-any cline-yes">1x</span>
|
|
174
|
-
<span class="cline-any cline-yes">1x</span>
|
|
175
|
-
<span class="cline-any cline-yes">1x</span>
|
|
176
|
-
<span class="cline-any cline-yes">2x</span>
|
|
177
|
-
<span class="cline-any cline-yes">2x</span>
|
|
178
|
-
<span class="cline-any cline-yes">1x</span>
|
|
179
|
-
<span class="cline-any cline-neutral"> </span>
|
|
180
|
-
<span class="cline-any cline-neutral"> </span>
|
|
181
|
-
<span class="cline-any cline-neutral"> </span>
|
|
182
|
-
<span class="cline-any cline-neutral"> </span>
|
|
183
|
-
<span class="cline-any cline-neutral"> </span>
|
|
184
|
-
<span class="cline-any cline-neutral"> </span>
|
|
185
|
-
<span class="cline-any cline-neutral"> </span>
|
|
186
|
-
<span class="cline-any cline-neutral"> </span>
|
|
187
|
-
<span class="cline-any cline-neutral"> </span>
|
|
188
|
-
<span class="cline-any cline-neutral"> </span>
|
|
189
|
-
<span class="cline-any cline-neutral"> </span>
|
|
190
|
-
<span class="cline-any cline-neutral"> </span>
|
|
191
|
-
<span class="cline-any cline-yes">1x</span>
|
|
192
|
-
<span class="cline-any cline-no"> </span>
|
|
193
|
-
<span class="cline-any cline-no"> </span>
|
|
194
|
-
<span class="cline-any cline-no"> </span>
|
|
195
|
-
<span class="cline-any cline-neutral"> </span>
|
|
196
|
-
<span class="cline-any cline-no"> </span>
|
|
197
|
-
<span class="cline-any cline-neutral"> </span>
|
|
198
|
-
<span class="cline-any cline-neutral"> </span>
|
|
199
|
-
<span class="cline-any cline-no"> </span>
|
|
200
|
-
<span class="cline-any cline-no"> </span>
|
|
201
|
-
<span class="cline-any cline-no"> </span>
|
|
202
|
-
<span class="cline-any cline-neutral"> </span>
|
|
203
|
-
<span class="cline-any cline-no"> </span>
|
|
204
|
-
<span class="cline-any cline-neutral"> </span>
|
|
205
|
-
<span class="cline-any cline-neutral"> </span>
|
|
206
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { schema } from '../lib';
|
|
207
|
-
import { detectScrutinyTypes } from './scrutiny';
|
|
208
|
-
|
|
209
|
-
export function massageSpec(spec: schema.Specification) {
|
|
210
|
-
detectScrutinyTypes(spec);
|
|
211
|
-
replaceIncompleteTypes(spec);
|
|
212
|
-
dropTypelessAttributes(spec);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Fix incomplete type definitions in PropertyTypes
|
|
217
|
-
*
|
|
218
|
-
* Some user-defined types are defined to not have any properties, and not
|
|
219
|
-
* be a collection of other types either. They have no definition at all.
|
|
220
|
-
*
|
|
221
|
-
* Add a property object type with empty properties.
|
|
222
|
-
*/
|
|
223
|
-
function replaceIncompleteTypes(spec: schema.Specification) {
|
|
224
|
-
for (const [name, definition] of Object.entries(spec.PropertyTypes)) {
|
|
225
|
-
<span class="missing-if-branch" title="if path not taken" >I</span>if (!schema.isRecordType(definition)
|
|
226
|
-
&& <span class="branch-1 cbranch-no" title="branch not covered" >!schema.isCollectionProperty(definition)</span>
|
|
227
|
-
&& <span class="branch-2 cbranch-no" title="branch not covered" >!schema.isScalarProperty(definition)</span>
|
|
228
|
-
&& <span class="branch-3 cbranch-no" title="branch not covered" >!schema.isPrimitiveProperty(definition))</span> {
|
|
229
|
-
// eslint-disable-next-line no-console
|
|
230
|
-
<span class="cstat-no" title="statement not covered" > console.log(`[${name}] Incomplete type, adding empty "Properties" field`);</span>
|
|
231
|
-
|
|
232
|
-
(<span class="cstat-no" title="statement not covered" >definition as unknown as schema.RecordProperty).Properties = {};</span>
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Drop Attributes specified with the different ResourceTypes that have
|
|
239
|
-
* no type specified.
|
|
240
|
-
*/
|
|
241
|
-
function dropTypelessAttributes(spec: schema.Specification) {
|
|
242
|
-
const resourceTypes = spec.ResourceTypes;
|
|
243
|
-
Object.values(resourceTypes).forEach((resourceType) => {
|
|
244
|
-
const attributes = resourceType.Attributes ?? <span class="branch-1 cbranch-no" title="branch not covered" >{};</span>
|
|
245
|
-
Object.keys(attributes).forEach((attrKey) => {
|
|
246
|
-
const attrVal = attributes[attrKey];
|
|
247
|
-
if (Object.keys(attrVal).length === 0) {
|
|
248
|
-
delete attributes[attrKey];
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* Modifies the provided specification so that ``ResourceTypes`` and ``PropertyTypes`` are listed in alphabetical order.
|
|
256
|
-
*
|
|
257
|
-
* @param spec an AWS CloudFormation Resource Specification document.
|
|
258
|
-
*
|
|
259
|
-
* @returns ``spec``, after having sorted the ``ResourceTypes`` and ``PropertyTypes`` sections alphabetically.
|
|
260
|
-
*/
|
|
261
|
-
export function <span class="fstat-no" title="function not covered" >normalize(</span>spec: schema.Specification): schema.Specification {
|
|
262
|
-
<span class="cstat-no" title="statement not covered" > spec.ResourceTypes = normalizeSection(spec.ResourceTypes);</span>
|
|
263
|
-
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (spec.PropertyTypes) {</span>
|
|
264
|
-
<span class="cstat-no" title="statement not covered" > spec.PropertyTypes = normalizeSection(spec.PropertyTypes);</span>
|
|
265
|
-
}
|
|
266
|
-
<span class="cstat-no" title="statement not covered" > return spec;</span>
|
|
267
|
-
|
|
268
|
-
function <span class="fstat-no" title="function not covered" >normalizeSection<</span>T>(section: { [name: string]: T }): { [name: string]: T } {
|
|
269
|
-
const result: { [name: string]: T } = <span class="cstat-no" title="statement not covered" >{};</span>
|
|
270
|
-
<span class="cstat-no" title="statement not covered" > for (const key of Object.keys(section).sort()) {</span>
|
|
271
|
-
<span class="cstat-no" title="statement not covered" > result[key] = section[key];</span>
|
|
272
|
-
}
|
|
273
|
-
<span class="cstat-no" title="statement not covered" > return result;</span>
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
</pre></td></tr></table></pre>
|
|
277
|
-
|
|
278
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
279
|
-
</div><!-- /wrapper -->
|
|
280
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
281
|
-
Code coverage generated by
|
|
282
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
283
|
-
at Fri Jun 24 2022 21:27:03 GMT+0000 (Coordinated Universal Time)
|
|
284
|
-
</div>
|
|
285
|
-
<script src="../prettify.js"></script>
|
|
286
|
-
<script>
|
|
287
|
-
window.onload = function () {
|
|
288
|
-
prettyPrint();
|
|
289
|
-
};
|
|
290
|
-
</script>
|
|
291
|
-
<script src="../sorter.js"></script>
|
|
292
|
-
<script src="../block-navigation.js"></script>
|
|
293
|
-
</body>
|
|
294
|
-
</html>
|
|
295
|
-
|