@mapbox/cloudfriend 9.2.0 → 9.2.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.
Files changed (111) hide show
  1. package/changelog.md +4 -0
  2. package/coverage/clover.xml +598 -0
  3. package/coverage/coverage-final.json +32 -0
  4. package/coverage/lcov-report/base.css +224 -0
  5. package/coverage/lcov-report/block-navigation.js +87 -0
  6. package/coverage/lcov-report/cloudfriend/bin/build-template.js.html +130 -0
  7. package/coverage/lcov-report/cloudfriend/bin/index.html +131 -0
  8. package/coverage/lcov-report/cloudfriend/bin/validate-template.js.html +142 -0
  9. package/coverage/lcov-report/cloudfriend/index.html +116 -0
  10. package/coverage/lcov-report/cloudfriend/index.js.html +307 -0
  11. package/coverage/lcov-report/cloudfriend/lib/build.js.html +217 -0
  12. package/coverage/lcov-report/cloudfriend/lib/conditions.js.html +430 -0
  13. package/coverage/lcov-report/cloudfriend/lib/index.html +206 -0
  14. package/coverage/lcov-report/cloudfriend/lib/intrinsic.js.html +979 -0
  15. package/coverage/lcov-report/cloudfriend/lib/merge.js.html +478 -0
  16. package/coverage/lcov-report/cloudfriend/lib/pseudo.js.html +370 -0
  17. package/coverage/lcov-report/cloudfriend/lib/rules.js.html +349 -0
  18. package/coverage/lcov-report/cloudfriend/lib/shortcuts/cross-account-role.js.html +244 -0
  19. package/coverage/lcov-report/cloudfriend/lib/shortcuts/event-lambda.js.html +367 -0
  20. package/coverage/lcov-report/cloudfriend/lib/shortcuts/glue-database.js.html +286 -0
  21. package/coverage/lcov-report/cloudfriend/lib/shortcuts/glue-json-table.js.html +235 -0
  22. package/coverage/lcov-report/cloudfriend/lib/shortcuts/glue-orc-table.js.html +226 -0
  23. package/coverage/lcov-report/cloudfriend/lib/shortcuts/glue-parquet-table.js.html +268 -0
  24. package/coverage/lcov-report/cloudfriend/lib/shortcuts/glue-presto-view.js.html +358 -0
  25. package/coverage/lcov-report/cloudfriend/lib/shortcuts/glue-spark-view.js.html +241 -0
  26. package/coverage/lcov-report/cloudfriend/lib/shortcuts/glue-table.js.html +481 -0
  27. package/coverage/lcov-report/cloudfriend/lib/shortcuts/hookshot.js.html +1504 -0
  28. package/coverage/lcov-report/cloudfriend/lib/shortcuts/index.html +416 -0
  29. package/coverage/lcov-report/cloudfriend/lib/shortcuts/index.js.html +154 -0
  30. package/coverage/lcov-report/cloudfriend/lib/shortcuts/kinesis-firehose-base.js.html +418 -0
  31. package/coverage/lcov-report/cloudfriend/lib/shortcuts/lambda.js.html +832 -0
  32. package/coverage/lcov-report/cloudfriend/lib/shortcuts/log-subscription-lambda.js.html +310 -0
  33. package/coverage/lcov-report/cloudfriend/lib/shortcuts/queue-lambda.js.html +364 -0
  34. package/coverage/lcov-report/cloudfriend/lib/shortcuts/queue.js.html +619 -0
  35. package/coverage/lcov-report/cloudfriend/lib/shortcuts/role.js.html +382 -0
  36. package/coverage/lcov-report/cloudfriend/lib/shortcuts/s3-kinesis-firehose.js.html +568 -0
  37. package/coverage/lcov-report/cloudfriend/lib/shortcuts/scheduled-lambda.js.html +490 -0
  38. package/coverage/lcov-report/cloudfriend/lib/shortcuts/service-role.js.html +307 -0
  39. package/coverage/lcov-report/cloudfriend/lib/shortcuts/stream-lambda.js.html +493 -0
  40. package/coverage/lcov-report/cloudfriend/lib/validate.js.html +154 -0
  41. package/coverage/lcov-report/favicon.png +0 -0
  42. package/coverage/lcov-report/index.html +161 -0
  43. package/coverage/lcov-report/prettify.css +1 -0
  44. package/coverage/lcov-report/prettify.js +2 -0
  45. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  46. package/coverage/lcov-report/sorter.js +210 -0
  47. package/coverage/lcov.info +1240 -0
  48. package/jest.config.js +14 -0
  49. package/package.json +15 -13
  50. package/readme.md +1 -1
  51. package/test/bin.test.js +18 -14
  52. package/test/fixtures/shortcuts/cross-account-role-defaults.json +1 -1
  53. package/test/fixtures/shortcuts/cross-account-role-no-defaults.json +1 -1
  54. package/test/fixtures/shortcuts/event-lambda-defaults.json +1 -1
  55. package/test/fixtures/shortcuts/event-lambda-full.json +1 -1
  56. package/test/fixtures/shortcuts/firehose-defaults.json +1 -1
  57. package/test/fixtures/shortcuts/firehose-with-stream.json +1 -1
  58. package/test/fixtures/shortcuts/glue-database-defaults.json +1 -1
  59. package/test/fixtures/shortcuts/glue-database-no-defaults.json +1 -1
  60. package/test/fixtures/shortcuts/glue-json-table-defaults.json +1 -1
  61. package/test/fixtures/shortcuts/glue-json-table-no-defaults.json +1 -1
  62. package/test/fixtures/shortcuts/glue-orc-table-defaults.json +1 -1
  63. package/test/fixtures/shortcuts/glue-orc-table-no-defaults.json +1 -1
  64. package/test/fixtures/shortcuts/glue-parquet-table-defaults.json +1 -1
  65. package/test/fixtures/shortcuts/glue-parquet-table-no-defaults.json +1 -1
  66. package/test/fixtures/shortcuts/glue-table-defaults.json +1 -1
  67. package/test/fixtures/shortcuts/glue-table-no-defaults.json +1 -1
  68. package/test/fixtures/shortcuts/glue-view-defaults.json +1 -1
  69. package/test/fixtures/shortcuts/glue-view-no-defaults.json +1 -1
  70. package/test/fixtures/shortcuts/hookshot-github-secret-ref.json +1 -1
  71. package/test/fixtures/shortcuts/hookshot-github-secret-string.json +1 -1
  72. package/test/fixtures/shortcuts/hookshot-github.json +1 -1
  73. package/test/fixtures/shortcuts/hookshot-passthrough-access-log-format.json +1 -1
  74. package/test/fixtures/shortcuts/hookshot-passthrough-alarms.json +1 -1
  75. package/test/fixtures/shortcuts/hookshot-passthrough-enhanced-logging.json +1 -1
  76. package/test/fixtures/shortcuts/hookshot-passthrough-full-blown-logging.json +1 -1
  77. package/test/fixtures/shortcuts/hookshot-passthrough-logging.json +1 -1
  78. package/test/fixtures/shortcuts/hookshot-passthrough.json +1 -1
  79. package/test/fixtures/shortcuts/lambda-defaults.json +1 -1
  80. package/test/fixtures/shortcuts/lambda-docker.json +1 -1
  81. package/test/fixtures/shortcuts/lambda-full.json +1 -1
  82. package/test/fixtures/shortcuts/lambda-provided-role.json +1 -1
  83. package/test/fixtures/shortcuts/lambda-zipfile.json +1 -1
  84. package/test/fixtures/shortcuts/log-subscription-lambda-defaults.json +1 -1
  85. package/test/fixtures/shortcuts/log-subscription-lambda-no-defaults.json +1 -1
  86. package/test/fixtures/shortcuts/queue-defaults.json +1 -1
  87. package/test/fixtures/shortcuts/queue-external-topic-ref.json +1 -1
  88. package/test/fixtures/shortcuts/queue-external-topic.json +1 -1
  89. package/test/fixtures/shortcuts/queue-fifo-queuename.json +1 -1
  90. package/test/fixtures/shortcuts/queue-fifo.json +1 -1
  91. package/test/fixtures/shortcuts/queue-full.json +1 -1
  92. package/test/fixtures/shortcuts/queue-lambda-zero.json +1 -1
  93. package/test/fixtures/shortcuts/queue-lambda.json +1 -1
  94. package/test/fixtures/shortcuts/role-defaults.json +1 -1
  95. package/test/fixtures/shortcuts/role-no-defaults.json +1 -1
  96. package/test/fixtures/shortcuts/scheduled-lambda-defaults.json +1 -1
  97. package/test/fixtures/shortcuts/scheduled-lambda-full.json +1 -1
  98. package/test/fixtures/shortcuts/service-role-defaults.json +1 -1
  99. package/test/fixtures/shortcuts/service-role-no-defaults.json +1 -1
  100. package/test/fixtures/shortcuts/service-role-no-url-suffix.json +1 -1
  101. package/test/fixtures/shortcuts/service-role-url-suffix-with-replacement.json +1 -1
  102. package/test/fixtures/shortcuts/service-role-url-suffix.json +1 -1
  103. package/test/fixtures/shortcuts/stream-lambda-defaults.json +1 -1
  104. package/test/fixtures/shortcuts/stream-lambda-no-defaults.json +1 -1
  105. package/test/index.test.js +383 -235
  106. package/test/shortcuts.test.js +1224 -1475
  107. package/.nyc_output/2b544c0b-2830-4ad0-97cd-8e661710b0bb.json +0 -1
  108. package/.nyc_output/65e58b48-bf1c-412d-8dd4-d7b564b12d76.json +0 -1
  109. package/.nyc_output/processinfo/2b544c0b-2830-4ad0-97cd-8e661710b0bb.json +0 -1
  110. package/.nyc_output/processinfo/65e58b48-bf1c-412d-8dd4-d7b564b12d76.json +0 -1
  111. package/.nyc_output/processinfo/index.json +0 -1
@@ -0,0 +1,619 @@
1
+
2
+ <!doctype html>
3
+ <html lang="en">
4
+
5
+ <head>
6
+ <title>Code coverage report for cloudfriend/lib/shortcuts/queue.js</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">cloudfriend/lib/shortcuts</a> queue.js</h1>
23
+ <div class='clearfix'>
24
+
25
+ <div class='fl pad1y space-right2'>
26
+ <span class="strong">100% </span>
27
+ <span class="quiet">Statements</span>
28
+ <span class='fraction'>17/17</span>
29
+ </div>
30
+
31
+
32
+ <div class='fl pad1y space-right2'>
33
+ <span class="strong">100% </span>
34
+ <span class="quiet">Branches</span>
35
+ <span class='fraction'>22/22</span>
36
+ </div>
37
+
38
+
39
+ <div class='fl pad1y space-right2'>
40
+ <span class="strong">100% </span>
41
+ <span class="quiet">Functions</span>
42
+ <span class='fraction'>2/2</span>
43
+ </div>
44
+
45
+
46
+ <div class='fl pad1y space-right2'>
47
+ <span class="strong">100% </span>
48
+ <span class="quiet">Lines</span>
49
+ <span class='fraction'>15/15</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 type="search" id="fileSearch">
61
+ </div>
62
+ </template>
63
+ </div>
64
+ <div class='status-line high'></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>
137
+ <a name='L72'></a><a href='#L72'>72</a>
138
+ <a name='L73'></a><a href='#L73'>73</a>
139
+ <a name='L74'></a><a href='#L74'>74</a>
140
+ <a name='L75'></a><a href='#L75'>75</a>
141
+ <a name='L76'></a><a href='#L76'>76</a>
142
+ <a name='L77'></a><a href='#L77'>77</a>
143
+ <a name='L78'></a><a href='#L78'>78</a>
144
+ <a name='L79'></a><a href='#L79'>79</a>
145
+ <a name='L80'></a><a href='#L80'>80</a>
146
+ <a name='L81'></a><a href='#L81'>81</a>
147
+ <a name='L82'></a><a href='#L82'>82</a>
148
+ <a name='L83'></a><a href='#L83'>83</a>
149
+ <a name='L84'></a><a href='#L84'>84</a>
150
+ <a name='L85'></a><a href='#L85'>85</a>
151
+ <a name='L86'></a><a href='#L86'>86</a>
152
+ <a name='L87'></a><a href='#L87'>87</a>
153
+ <a name='L88'></a><a href='#L88'>88</a>
154
+ <a name='L89'></a><a href='#L89'>89</a>
155
+ <a name='L90'></a><a href='#L90'>90</a>
156
+ <a name='L91'></a><a href='#L91'>91</a>
157
+ <a name='L92'></a><a href='#L92'>92</a>
158
+ <a name='L93'></a><a href='#L93'>93</a>
159
+ <a name='L94'></a><a href='#L94'>94</a>
160
+ <a name='L95'></a><a href='#L95'>95</a>
161
+ <a name='L96'></a><a href='#L96'>96</a>
162
+ <a name='L97'></a><a href='#L97'>97</a>
163
+ <a name='L98'></a><a href='#L98'>98</a>
164
+ <a name='L99'></a><a href='#L99'>99</a>
165
+ <a name='L100'></a><a href='#L100'>100</a>
166
+ <a name='L101'></a><a href='#L101'>101</a>
167
+ <a name='L102'></a><a href='#L102'>102</a>
168
+ <a name='L103'></a><a href='#L103'>103</a>
169
+ <a name='L104'></a><a href='#L104'>104</a>
170
+ <a name='L105'></a><a href='#L105'>105</a>
171
+ <a name='L106'></a><a href='#L106'>106</a>
172
+ <a name='L107'></a><a href='#L107'>107</a>
173
+ <a name='L108'></a><a href='#L108'>108</a>
174
+ <a name='L109'></a><a href='#L109'>109</a>
175
+ <a name='L110'></a><a href='#L110'>110</a>
176
+ <a name='L111'></a><a href='#L111'>111</a>
177
+ <a name='L112'></a><a href='#L112'>112</a>
178
+ <a name='L113'></a><a href='#L113'>113</a>
179
+ <a name='L114'></a><a href='#L114'>114</a>
180
+ <a name='L115'></a><a href='#L115'>115</a>
181
+ <a name='L116'></a><a href='#L116'>116</a>
182
+ <a name='L117'></a><a href='#L117'>117</a>
183
+ <a name='L118'></a><a href='#L118'>118</a>
184
+ <a name='L119'></a><a href='#L119'>119</a>
185
+ <a name='L120'></a><a href='#L120'>120</a>
186
+ <a name='L121'></a><a href='#L121'>121</a>
187
+ <a name='L122'></a><a href='#L122'>122</a>
188
+ <a name='L123'></a><a href='#L123'>123</a>
189
+ <a name='L124'></a><a href='#L124'>124</a>
190
+ <a name='L125'></a><a href='#L125'>125</a>
191
+ <a name='L126'></a><a href='#L126'>126</a>
192
+ <a name='L127'></a><a href='#L127'>127</a>
193
+ <a name='L128'></a><a href='#L128'>128</a>
194
+ <a name='L129'></a><a href='#L129'>129</a>
195
+ <a name='L130'></a><a href='#L130'>130</a>
196
+ <a name='L131'></a><a href='#L131'>131</a>
197
+ <a name='L132'></a><a href='#L132'>132</a>
198
+ <a name='L133'></a><a href='#L133'>133</a>
199
+ <a name='L134'></a><a href='#L134'>134</a>
200
+ <a name='L135'></a><a href='#L135'>135</a>
201
+ <a name='L136'></a><a href='#L136'>136</a>
202
+ <a name='L137'></a><a href='#L137'>137</a>
203
+ <a name='L138'></a><a href='#L138'>138</a>
204
+ <a name='L139'></a><a href='#L139'>139</a>
205
+ <a name='L140'></a><a href='#L140'>140</a>
206
+ <a name='L141'></a><a href='#L141'>141</a>
207
+ <a name='L142'></a><a href='#L142'>142</a>
208
+ <a name='L143'></a><a href='#L143'>143</a>
209
+ <a name='L144'></a><a href='#L144'>144</a>
210
+ <a name='L145'></a><a href='#L145'>145</a>
211
+ <a name='L146'></a><a href='#L146'>146</a>
212
+ <a name='L147'></a><a href='#L147'>147</a>
213
+ <a name='L148'></a><a href='#L148'>148</a>
214
+ <a name='L149'></a><a href='#L149'>149</a>
215
+ <a name='L150'></a><a href='#L150'>150</a>
216
+ <a name='L151'></a><a href='#L151'>151</a>
217
+ <a name='L152'></a><a href='#L152'>152</a>
218
+ <a name='L153'></a><a href='#L153'>153</a>
219
+ <a name='L154'></a><a href='#L154'>154</a>
220
+ <a name='L155'></a><a href='#L155'>155</a>
221
+ <a name='L156'></a><a href='#L156'>156</a>
222
+ <a name='L157'></a><a href='#L157'>157</a>
223
+ <a name='L158'></a><a href='#L158'>158</a>
224
+ <a name='L159'></a><a href='#L159'>159</a>
225
+ <a name='L160'></a><a href='#L160'>160</a>
226
+ <a name='L161'></a><a href='#L161'>161</a>
227
+ <a name='L162'></a><a href='#L162'>162</a>
228
+ <a name='L163'></a><a href='#L163'>163</a>
229
+ <a name='L164'></a><a href='#L164'>164</a>
230
+ <a name='L165'></a><a href='#L165'>165</a>
231
+ <a name='L166'></a><a href='#L166'>166</a>
232
+ <a name='L167'></a><a href='#L167'>167</a>
233
+ <a name='L168'></a><a href='#L168'>168</a>
234
+ <a name='L169'></a><a href='#L169'>169</a>
235
+ <a name='L170'></a><a href='#L170'>170</a>
236
+ <a name='L171'></a><a href='#L171'>171</a>
237
+ <a name='L172'></a><a href='#L172'>172</a>
238
+ <a name='L173'></a><a href='#L173'>173</a>
239
+ <a name='L174'></a><a href='#L174'>174</a>
240
+ <a name='L175'></a><a href='#L175'>175</a>
241
+ <a name='L176'></a><a href='#L176'>176</a>
242
+ <a name='L177'></a><a href='#L177'>177</a>
243
+ <a name='L178'></a><a href='#L178'>178</a>
244
+ <a name='L179'></a><a href='#L179'>179</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
245
+ <span class="cline-any cline-neutral">&nbsp;</span>
246
+ <span class="cline-any cline-neutral">&nbsp;</span>
247
+ <span class="cline-any cline-neutral">&nbsp;</span>
248
+ <span class="cline-any cline-neutral">&nbsp;</span>
249
+ <span class="cline-any cline-neutral">&nbsp;</span>
250
+ <span class="cline-any cline-neutral">&nbsp;</span>
251
+ <span class="cline-any cline-neutral">&nbsp;</span>
252
+ <span class="cline-any cline-neutral">&nbsp;</span>
253
+ <span class="cline-any cline-neutral">&nbsp;</span>
254
+ <span class="cline-any cline-neutral">&nbsp;</span>
255
+ <span class="cline-any cline-neutral">&nbsp;</span>
256
+ <span class="cline-any cline-neutral">&nbsp;</span>
257
+ <span class="cline-any cline-neutral">&nbsp;</span>
258
+ <span class="cline-any cline-neutral">&nbsp;</span>
259
+ <span class="cline-any cline-neutral">&nbsp;</span>
260
+ <span class="cline-any cline-neutral">&nbsp;</span>
261
+ <span class="cline-any cline-neutral">&nbsp;</span>
262
+ <span class="cline-any cline-neutral">&nbsp;</span>
263
+ <span class="cline-any cline-neutral">&nbsp;</span>
264
+ <span class="cline-any cline-neutral">&nbsp;</span>
265
+ <span class="cline-any cline-neutral">&nbsp;</span>
266
+ <span class="cline-any cline-neutral">&nbsp;</span>
267
+ <span class="cline-any cline-neutral">&nbsp;</span>
268
+ <span class="cline-any cline-neutral">&nbsp;</span>
269
+ <span class="cline-any cline-neutral">&nbsp;</span>
270
+ <span class="cline-any cline-neutral">&nbsp;</span>
271
+ <span class="cline-any cline-neutral">&nbsp;</span>
272
+ <span class="cline-any cline-neutral">&nbsp;</span>
273
+ <span class="cline-any cline-neutral">&nbsp;</span>
274
+ <span class="cline-any cline-neutral">&nbsp;</span>
275
+ <span class="cline-any cline-neutral">&nbsp;</span>
276
+ <span class="cline-any cline-neutral">&nbsp;</span>
277
+ <span class="cline-any cline-neutral">&nbsp;</span>
278
+ <span class="cline-any cline-neutral">&nbsp;</span>
279
+ <span class="cline-any cline-neutral">&nbsp;</span>
280
+ <span class="cline-any cline-neutral">&nbsp;</span>
281
+ <span class="cline-any cline-neutral">&nbsp;</span>
282
+ <span class="cline-any cline-neutral">&nbsp;</span>
283
+ <span class="cline-any cline-neutral">&nbsp;</span>
284
+ <span class="cline-any cline-neutral">&nbsp;</span>
285
+ <span class="cline-any cline-neutral">&nbsp;</span>
286
+ <span class="cline-any cline-neutral">&nbsp;</span>
287
+ <span class="cline-any cline-neutral">&nbsp;</span>
288
+ <span class="cline-any cline-neutral">&nbsp;</span>
289
+ <span class="cline-any cline-neutral">&nbsp;</span>
290
+ <span class="cline-any cline-neutral">&nbsp;</span>
291
+ <span class="cline-any cline-neutral">&nbsp;</span>
292
+ <span class="cline-any cline-neutral">&nbsp;</span>
293
+ <span class="cline-any cline-neutral">&nbsp;</span>
294
+ <span class="cline-any cline-neutral">&nbsp;</span>
295
+ <span class="cline-any cline-neutral">&nbsp;</span>
296
+ <span class="cline-any cline-neutral">&nbsp;</span>
297
+ <span class="cline-any cline-yes">9x</span>
298
+ <span class="cline-any cline-neutral">&nbsp;</span>
299
+ <span class="cline-any cline-neutral">&nbsp;</span>
300
+ <span class="cline-any cline-neutral">&nbsp;</span>
301
+ <span class="cline-any cline-neutral">&nbsp;</span>
302
+ <span class="cline-any cline-neutral">&nbsp;</span>
303
+ <span class="cline-any cline-neutral">&nbsp;</span>
304
+ <span class="cline-any cline-neutral">&nbsp;</span>
305
+ <span class="cline-any cline-neutral">&nbsp;</span>
306
+ <span class="cline-any cline-neutral">&nbsp;</span>
307
+ <span class="cline-any cline-neutral">&nbsp;</span>
308
+ <span class="cline-any cline-neutral">&nbsp;</span>
309
+ <span class="cline-any cline-neutral">&nbsp;</span>
310
+ <span class="cline-any cline-neutral">&nbsp;</span>
311
+ <span class="cline-any cline-neutral">&nbsp;</span>
312
+ <span class="cline-any cline-neutral">&nbsp;</span>
313
+ <span class="cline-any cline-neutral">&nbsp;</span>
314
+ <span class="cline-any cline-neutral">&nbsp;</span>
315
+ <span class="cline-any cline-neutral">&nbsp;</span>
316
+ <span class="cline-any cline-yes">8x</span>
317
+ <span class="cline-any cline-neutral">&nbsp;</span>
318
+ <span class="cline-any cline-yes">8x</span>
319
+ <span class="cline-any cline-yes">8x</span>
320
+ <span class="cline-any cline-yes">1x</span>
321
+ <span class="cline-any cline-neutral">&nbsp;</span>
322
+ <span class="cline-any cline-neutral">&nbsp;</span>
323
+ <span class="cline-any cline-yes">7x</span>
324
+ <span class="cline-any cline-neutral">&nbsp;</span>
325
+ <span class="cline-any cline-yes">7x</span>
326
+ <span class="cline-any cline-neutral">&nbsp;</span>
327
+ <span class="cline-any cline-neutral">&nbsp;</span>
328
+ <span class="cline-any cline-neutral">&nbsp;</span>
329
+ <span class="cline-any cline-neutral">&nbsp;</span>
330
+ <span class="cline-any cline-neutral">&nbsp;</span>
331
+ <span class="cline-any cline-neutral">&nbsp;</span>
332
+ <span class="cline-any cline-neutral">&nbsp;</span>
333
+ <span class="cline-any cline-neutral">&nbsp;</span>
334
+ <span class="cline-any cline-neutral">&nbsp;</span>
335
+ <span class="cline-any cline-neutral">&nbsp;</span>
336
+ <span class="cline-any cline-neutral">&nbsp;</span>
337
+ <span class="cline-any cline-neutral">&nbsp;</span>
338
+ <span class="cline-any cline-neutral">&nbsp;</span>
339
+ <span class="cline-any cline-neutral">&nbsp;</span>
340
+ <span class="cline-any cline-neutral">&nbsp;</span>
341
+ <span class="cline-any cline-neutral">&nbsp;</span>
342
+ <span class="cline-any cline-neutral">&nbsp;</span>
343
+ <span class="cline-any cline-neutral">&nbsp;</span>
344
+ <span class="cline-any cline-neutral">&nbsp;</span>
345
+ <span class="cline-any cline-neutral">&nbsp;</span>
346
+ <span class="cline-any cline-neutral">&nbsp;</span>
347
+ <span class="cline-any cline-neutral">&nbsp;</span>
348
+ <span class="cline-any cline-neutral">&nbsp;</span>
349
+ <span class="cline-any cline-neutral">&nbsp;</span>
350
+ <span class="cline-any cline-neutral">&nbsp;</span>
351
+ <span class="cline-any cline-neutral">&nbsp;</span>
352
+ <span class="cline-any cline-neutral">&nbsp;</span>
353
+ <span class="cline-any cline-neutral">&nbsp;</span>
354
+ <span class="cline-any cline-neutral">&nbsp;</span>
355
+ <span class="cline-any cline-neutral">&nbsp;</span>
356
+ <span class="cline-any cline-neutral">&nbsp;</span>
357
+ <span class="cline-any cline-neutral">&nbsp;</span>
358
+ <span class="cline-any cline-neutral">&nbsp;</span>
359
+ <span class="cline-any cline-neutral">&nbsp;</span>
360
+ <span class="cline-any cline-neutral">&nbsp;</span>
361
+ <span class="cline-any cline-neutral">&nbsp;</span>
362
+ <span class="cline-any cline-neutral">&nbsp;</span>
363
+ <span class="cline-any cline-neutral">&nbsp;</span>
364
+ <span class="cline-any cline-neutral">&nbsp;</span>
365
+ <span class="cline-any cline-neutral">&nbsp;</span>
366
+ <span class="cline-any cline-neutral">&nbsp;</span>
367
+ <span class="cline-any cline-neutral">&nbsp;</span>
368
+ <span class="cline-any cline-neutral">&nbsp;</span>
369
+ <span class="cline-any cline-yes">7x</span>
370
+ <span class="cline-any cline-yes">5x</span>
371
+ <span class="cline-any cline-yes">5x</span>
372
+ <span class="cline-any cline-yes">3x</span>
373
+ <span class="cline-any cline-neutral">&nbsp;</span>
374
+ <span class="cline-any cline-neutral">&nbsp;</span>
375
+ <span class="cline-any cline-neutral">&nbsp;</span>
376
+ <span class="cline-any cline-neutral">&nbsp;</span>
377
+ <span class="cline-any cline-neutral">&nbsp;</span>
378
+ <span class="cline-any cline-neutral">&nbsp;</span>
379
+ <span class="cline-any cline-neutral">&nbsp;</span>
380
+ <span class="cline-any cline-yes">3x</span>
381
+ <span class="cline-any cline-neutral">&nbsp;</span>
382
+ <span class="cline-any cline-neutral">&nbsp;</span>
383
+ <span class="cline-any cline-yes">5x</span>
384
+ <span class="cline-any cline-neutral">&nbsp;</span>
385
+ <span class="cline-any cline-neutral">&nbsp;</span>
386
+ <span class="cline-any cline-neutral">&nbsp;</span>
387
+ <span class="cline-any cline-neutral">&nbsp;</span>
388
+ <span class="cline-any cline-neutral">&nbsp;</span>
389
+ <span class="cline-any cline-neutral">&nbsp;</span>
390
+ <span class="cline-any cline-neutral">&nbsp;</span>
391
+ <span class="cline-any cline-neutral">&nbsp;</span>
392
+ <span class="cline-any cline-yes">5x</span>
393
+ <span class="cline-any cline-neutral">&nbsp;</span>
394
+ <span class="cline-any cline-neutral">&nbsp;</span>
395
+ <span class="cline-any cline-neutral">&nbsp;</span>
396
+ <span class="cline-any cline-neutral">&nbsp;</span>
397
+ <span class="cline-any cline-neutral">&nbsp;</span>
398
+ <span class="cline-any cline-neutral">&nbsp;</span>
399
+ <span class="cline-any cline-neutral">&nbsp;</span>
400
+ <span class="cline-any cline-neutral">&nbsp;</span>
401
+ <span class="cline-any cline-neutral">&nbsp;</span>
402
+ <span class="cline-any cline-neutral">&nbsp;</span>
403
+ <span class="cline-any cline-neutral">&nbsp;</span>
404
+ <span class="cline-any cline-neutral">&nbsp;</span>
405
+ <span class="cline-any cline-neutral">&nbsp;</span>
406
+ <span class="cline-any cline-neutral">&nbsp;</span>
407
+ <span class="cline-any cline-neutral">&nbsp;</span>
408
+ <span class="cline-any cline-neutral">&nbsp;</span>
409
+ <span class="cline-any cline-neutral">&nbsp;</span>
410
+ <span class="cline-any cline-neutral">&nbsp;</span>
411
+ <span class="cline-any cline-neutral">&nbsp;</span>
412
+ <span class="cline-any cline-neutral">&nbsp;</span>
413
+ <span class="cline-any cline-neutral">&nbsp;</span>
414
+ <span class="cline-any cline-neutral">&nbsp;</span>
415
+ <span class="cline-any cline-neutral">&nbsp;</span>
416
+ <span class="cline-any cline-neutral">&nbsp;</span>
417
+ <span class="cline-any cline-neutral">&nbsp;</span>
418
+ <span class="cline-any cline-neutral">&nbsp;</span>
419
+ <span class="cline-any cline-neutral">&nbsp;</span>
420
+ <span class="cline-any cline-neutral">&nbsp;</span>
421
+ <span class="cline-any cline-yes">2x</span>
422
+ <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">'use strict';
423
+ &nbsp;
424
+ /**
425
+ * Creates an SQS queue with an attached dead-letter queue.
426
+ *
427
+ * Standard (non-FIFO) queues can receive messages through an SNS topic. The
428
+ * shortcut either creates a new SNS topic that can be used for sending messages
429
+ * into the queue, or subscribes the queue to an existing SNS topic provided
430
+ * with the `ExistingTopicArn` option. For FIFO queues, no SNS topic is created
431
+ * and `ExistingTopicArn` is ignored.
432
+ *
433
+ * @param {Object} options - Options.
434
+ * @param {String} options.LogicalName - The logical name of the SQS queue
435
+ * within the CloudFormation template. This is also used to construct the logical
436
+ * names of the other resources.
437
+ * @param {Number} [options.VisibilityTimeout=300] - See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-visibilitytimeout).
438
+ * @param {Number} [options.maxReceiveCount=10] - See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues-redrivepolicy.html#aws-sqs-queue-redrivepolicy-maxcount).
439
+ * @param {Boolean} [options.ContentBasedDeduplication=undefined] - See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#cfn-sqs-queue-contentbaseddeduplication).
440
+ * @param {Number} [options.DelaySeconds=undefined] - See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-delayseconds).
441
+ * @param {Boolean} [options.FifoQueue=undefined] - See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#cfn-sqs-queue-fifoqueue).
442
+ * @param {String} [options.KmsMasterKeyId=undefined] - See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-kmsmasterkeyid).
443
+ * @param {Number} [options.KmsDataKeyReusePeriodSeconds=undefined] - See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-kmsdatakeyreuseperiodseconds).
444
+ * @param {Number} [options.MaximumMessageSize=undefined] - See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-maxmsgsize).
445
+ * @param {Number} [options.MessageRetentionPeriod=1209600] - See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-msgretentionperiod).
446
+ * @param {String} [options.QueueName='${stack name}-${logical name}'] - See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-name).
447
+ * If `FifoQueue` is `true`, the suffix `.fifo` will be added to the queue name.
448
+ * @param {Number} [options.ReceiveMessageWaitTimeSeconds=undefined] - See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-receivemsgwaittime).
449
+ * @param {String} [options.Condition=undefined] - If there is a `Condition` defined
450
+ * in the template that should control whether to create this SQS queue,
451
+ * specify the name of the condition here. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html).
452
+ * @param {String} [options.DependsOn=undefined] - Specify a stack resource dependency
453
+ * to this SQS queue. See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html).
454
+ * @param {String} [options.ExistingTopicArn] - Specify an SNS topic ARN to subscribe the queue to.
455
+ * If this option is provided, `TopicName` is irrelevant because no new topic is created.
456
+ * This option is ignored if `FifoQueue: true`, because FIFO queues cannot subscribe to SNS topics.
457
+ * @param {String} [options.TopicName='${stack name}-${logical name}'] - See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic.html#cfn-sns-topic-name).
458
+ * This option is ignored if `FifoQueue: true`, because FIFO queues cannot subscribe to SNS topics.
459
+ * @param {String} [options.DisplayName=undefined] - See [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic.html#cfn-sns-topic-displayname).
460
+ * @param {Number} [options.DeadLetterVisibilityTimeout=300] - [VisibilityTimeout](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-visibilitytimeout) for the dead-letter queue.
461
+ *
462
+ * @example
463
+ * const cf = require('@mapbox/cloudfriend');
464
+ *
465
+ * const myTemplate = { ... };
466
+ *
467
+ * const queue = new cf.shortcuts.Queue({
468
+ * LogicalName: 'MyQueue'
469
+ * });
470
+ *
471
+ * module.exports = cf.merge(myTemplate, queue);
472
+ */
473
+ class Queue {
474
+ constructor(options) {
475
+ if (!options) throw new Error('Options required');
476
+ const {
477
+ LogicalName,
478
+ VisibilityTimeout = 300,
479
+ maxReceiveCount = 10,
480
+ ContentBasedDeduplication,
481
+ DelaySeconds,
482
+ KmsMasterKeyId,
483
+ KmsDataKeyReusePeriodSeconds,
484
+ MaximumMessageSize,
485
+ MessageRetentionPeriod = 1209600,
486
+ QueueName = { 'Fn::Sub': `\${AWS::StackName}-${LogicalName}` },
487
+ ReceiveMessageWaitTimeSeconds,
488
+ Condition = undefined,
489
+ DependsOn = undefined,
490
+ ExistingTopicArn,
491
+ TopicName = { 'Fn::Sub': `\${AWS::StackName}-${LogicalName}` },
492
+ DisplayName,
493
+ DeadLetterVisibilityTimeout = 300
494
+ } = options;
495
+ &nbsp;
496
+ const required = [LogicalName];
497
+ if (required.some((variable) =&gt; !variable))
498
+ throw new Error('You must provide a LogicalName');
499
+ &nbsp;
500
+ // CFN validation says FifoQueue cannot be false: it must be true or undefined.
501
+ const FifoQueue = options.FifoQueue || undefined;
502
+ &nbsp;
503
+ this.Resources = {
504
+ [LogicalName]: {
505
+ Type: 'AWS::SQS::Queue',
506
+ Condition,
507
+ DependsOn,
508
+ Properties: {
509
+ ContentBasedDeduplication,
510
+ DelaySeconds,
511
+ FifoQueue,
512
+ KmsMasterKeyId,
513
+ KmsDataKeyReusePeriodSeconds,
514
+ MaximumMessageSize,
515
+ MessageRetentionPeriod,
516
+ // FIFO queue names must have the .fifo suffix.
517
+ QueueName: FifoQueue
518
+ ? { 'Fn::Sub': ['${queue}.fifo', { queue: QueueName }] }
519
+ : QueueName,
520
+ ReceiveMessageWaitTimeSeconds,
521
+ RedrivePolicy: {
522
+ maxReceiveCount,
523
+ deadLetterTargetArn: {
524
+ 'Fn::GetAtt': [`${LogicalName}DeadLetter`, 'Arn']
525
+ }
526
+ },
527
+ VisibilityTimeout
528
+ }
529
+ },
530
+ &nbsp;
531
+ [`${LogicalName}DeadLetter`]: {
532
+ Type: 'AWS::SQS::Queue',
533
+ Condition,
534
+ Properties: {
535
+ MessageRetentionPeriod: 1209600,
536
+ VisibilityTimeout: DeadLetterVisibilityTimeout,
537
+ // The dead-letter queue's type must match the main queue's type.
538
+ FifoQueue,
539
+ QueueName: FifoQueue
540
+ ? { 'Fn::Sub': ['${queue}-dead-letter.fifo', { queue: QueueName }] }
541
+ : { 'Fn::Sub': ['${queue}-dead-letter', { queue: QueueName }] }
542
+ }
543
+ }
544
+ };
545
+ &nbsp;
546
+ // FIFO queues cannot subscribe to SNS topics.
547
+ if (!FifoQueue) {
548
+ let subscribedExistingTopicArn = ExistingTopicArn;
549
+ if (!subscribedExistingTopicArn) {
550
+ this.Resources[`${LogicalName}Topic`] = {
551
+ Type: 'AWS::SNS::Topic',
552
+ Condition,
553
+ Properties: {
554
+ TopicName,
555
+ DisplayName
556
+ }
557
+ };
558
+ subscribedExistingTopicArn = { Ref: `${LogicalName}Topic` };
559
+ }
560
+ &nbsp;
561
+ this.Resources[`${LogicalName}Subscription`] = {
562
+ Type: 'AWS::SNS::Subscription',
563
+ Properties: {
564
+ Protocol: 'sqs',
565
+ TopicArn: subscribedExistingTopicArn,
566
+ Endpoint: { 'Fn::GetAtt': [LogicalName, 'Arn'] }
567
+ }
568
+ };
569
+ &nbsp;
570
+ this.Resources[`${LogicalName}Policy`] = {
571
+ Type: 'AWS::SQS::QueuePolicy',
572
+ Condition,
573
+ Properties: {
574
+ Queues: [{ Ref: LogicalName }],
575
+ PolicyDocument: {
576
+ Version: '2008-10-17',
577
+ Id: LogicalName,
578
+ Statement: [
579
+ {
580
+ Sid: LogicalName,
581
+ Effect: 'Allow',
582
+ Action: 'sqs:SendMessage',
583
+ Principal: { AWS: '*' },
584
+ Resource: { 'Fn::GetAtt': [LogicalName, 'Arn'] },
585
+ Condition: {
586
+ ArnEquals: {
587
+ 'aws:SourceArn': subscribedExistingTopicArn
588
+ }
589
+ }
590
+ }
591
+ ]
592
+ }
593
+ }
594
+ };
595
+ }
596
+ }
597
+ }
598
+ &nbsp;
599
+ module.exports = Queue;
600
+ &nbsp;</pre></td></tr></table></pre>
601
+
602
+ <div class='push'></div><!-- for sticky footer -->
603
+ </div><!-- /wrapper -->
604
+ <div class='footer quiet pad2 space-top1 center small'>
605
+ Code coverage generated by
606
+ <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
607
+ at 2026-02-06T20:51:39.462Z
608
+ </div>
609
+ <script src="../../../prettify.js"></script>
610
+ <script>
611
+ window.onload = function () {
612
+ prettyPrint();
613
+ };
614
+ </script>
615
+ <script src="../../../sorter.js"></script>
616
+ <script src="../../../block-navigation.js"></script>
617
+ </body>
618
+ </html>
619
+