@aws-solutions-constructs/core 2.78.0 → 2.79.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.
Files changed (61) hide show
  1. package/.jsii +303 -29
  2. package/lib/cloudfront-distribution-helper.d.ts +29 -0
  3. package/lib/cloudfront-distribution-helper.js +81 -1
  4. package/node_modules/deep-diff/.circleci/config.yml +76 -0
  5. package/node_modules/deep-diff/.eslintrc +72 -0
  6. package/node_modules/deep-diff/.vscode/launch.json +30 -0
  7. package/node_modules/deep-diff/.vscode/tasks.json +12 -0
  8. package/node_modules/deep-diff/ChangeLog.md +63 -0
  9. package/node_modules/deep-diff/LICENSE +7 -0
  10. package/node_modules/deep-diff/Readme.md +239 -0
  11. package/node_modules/deep-diff/dist/deep-diff.min.js +1 -0
  12. package/node_modules/deep-diff/dist/deep-diff.min.js.map +1 -0
  13. package/node_modules/deep-diff/examples/apply-diff-from-any.js +39 -0
  14. package/node_modules/deep-diff/examples/array-change.js +45 -0
  15. package/node_modules/deep-diff/examples/capture_change_apply_elsewhere.js +53 -0
  16. package/node_modules/deep-diff/examples/diff-ignoring-fun.js +88 -0
  17. package/node_modules/deep-diff/examples/diff-scenarios.js +49 -0
  18. package/node_modules/deep-diff/examples/example1.js +41 -0
  19. package/node_modules/deep-diff/examples/issue-111.js +6 -0
  20. package/node_modules/deep-diff/examples/issue-113-1.js +14 -0
  21. package/node_modules/deep-diff/examples/issue-113-2.js +11 -0
  22. package/node_modules/deep-diff/examples/issue-115.js +17 -0
  23. package/node_modules/deep-diff/examples/issue-124.js +8 -0
  24. package/node_modules/deep-diff/examples/issue-125.js +19 -0
  25. package/node_modules/deep-diff/examples/issue-126.js +33 -0
  26. package/node_modules/deep-diff/examples/issue-35.js +11 -0
  27. package/node_modules/deep-diff/examples/issue-47.js +17 -0
  28. package/node_modules/deep-diff/examples/issue-48.js +48 -0
  29. package/node_modules/deep-diff/examples/issue-62.js +14 -0
  30. package/node_modules/deep-diff/examples/issue-70.js +6 -0
  31. package/node_modules/deep-diff/examples/issue-71.js +15 -0
  32. package/node_modules/deep-diff/examples/issue-72.js +21 -0
  33. package/node_modules/deep-diff/examples/issue-74.js +9 -0
  34. package/node_modules/deep-diff/examples/issue-78.js +24 -0
  35. package/node_modules/deep-diff/examples/issue-83.js +11 -0
  36. package/node_modules/deep-diff/examples/issue-88.js +26 -0
  37. package/node_modules/deep-diff/examples/performance.js +64 -0
  38. package/node_modules/deep-diff/examples/practice-data.json +2501 -0
  39. package/node_modules/deep-diff/index.js +526 -0
  40. package/node_modules/deep-diff/package.json +74 -0
  41. package/node_modules/deep-diff/test/.eslintrc +10 -0
  42. package/node_modules/deep-diff/test/tests.html +34 -0
  43. package/node_modules/deep-diff/test/tests.js +759 -0
  44. package/node_modules/deepmerge/.editorconfig +7 -0
  45. package/node_modules/deepmerge/.eslintcache +1 -0
  46. package/node_modules/deepmerge/changelog.md +167 -0
  47. package/node_modules/deepmerge/dist/cjs.js +133 -0
  48. package/node_modules/deepmerge/dist/umd.js +139 -0
  49. package/node_modules/deepmerge/index.d.ts +20 -0
  50. package/node_modules/deepmerge/index.js +106 -0
  51. package/node_modules/deepmerge/license.txt +21 -0
  52. package/node_modules/deepmerge/package.json +42 -0
  53. package/node_modules/deepmerge/readme.md +264 -0
  54. package/node_modules/deepmerge/rollup.config.js +22 -0
  55. package/node_modules/npmlog/LICENSE.md +20 -0
  56. package/node_modules/npmlog/README.md +216 -0
  57. package/node_modules/npmlog/lib/log.js +400 -0
  58. package/node_modules/npmlog/package.json +52 -0
  59. package/nohoist.sh +11 -0
  60. package/package.json +3 -2
  61. package/test/cloudfront-distribution-s3-helper.test.js +455 -1
@@ -0,0 +1,400 @@
1
+ 'use strict'
2
+ var Progress = require('are-we-there-yet')
3
+ var Gauge = require('gauge')
4
+ var EE = require('events').EventEmitter
5
+ var log = exports = module.exports = new EE()
6
+ var util = require('util')
7
+
8
+ var setBlocking = require('set-blocking')
9
+ var consoleControl = require('console-control-strings')
10
+
11
+ setBlocking(true)
12
+ var stream = process.stderr
13
+ Object.defineProperty(log, 'stream', {
14
+ set: function (newStream) {
15
+ stream = newStream
16
+ if (this.gauge) {
17
+ this.gauge.setWriteTo(stream, stream)
18
+ }
19
+ },
20
+ get: function () {
21
+ return stream
22
+ },
23
+ })
24
+
25
+ // by default, decide based on tty-ness.
26
+ var colorEnabled
27
+ log.useColor = function () {
28
+ return colorEnabled != null ? colorEnabled : stream.isTTY
29
+ }
30
+
31
+ log.enableColor = function () {
32
+ colorEnabled = true
33
+ this.gauge.setTheme({ hasColor: colorEnabled, hasUnicode: unicodeEnabled })
34
+ }
35
+ log.disableColor = function () {
36
+ colorEnabled = false
37
+ this.gauge.setTheme({ hasColor: colorEnabled, hasUnicode: unicodeEnabled })
38
+ }
39
+
40
+ // default level
41
+ log.level = 'info'
42
+
43
+ log.gauge = new Gauge(stream, {
44
+ enabled: false, // no progress bars unless asked
45
+ theme: { hasColor: log.useColor() },
46
+ template: [
47
+ { type: 'progressbar', length: 20 },
48
+ { type: 'activityIndicator', kerning: 1, length: 1 },
49
+ { type: 'section', default: '' },
50
+ ':',
51
+ { type: 'logline', kerning: 1, default: '' },
52
+ ],
53
+ })
54
+
55
+ log.tracker = new Progress.TrackerGroup()
56
+
57
+ // we track this separately as we may need to temporarily disable the
58
+ // display of the status bar for our own loggy purposes.
59
+ log.progressEnabled = log.gauge.isEnabled()
60
+
61
+ var unicodeEnabled
62
+
63
+ log.enableUnicode = function () {
64
+ unicodeEnabled = true
65
+ this.gauge.setTheme({ hasColor: this.useColor(), hasUnicode: unicodeEnabled })
66
+ }
67
+
68
+ log.disableUnicode = function () {
69
+ unicodeEnabled = false
70
+ this.gauge.setTheme({ hasColor: this.useColor(), hasUnicode: unicodeEnabled })
71
+ }
72
+
73
+ log.setGaugeThemeset = function (themes) {
74
+ this.gauge.setThemeset(themes)
75
+ }
76
+
77
+ log.setGaugeTemplate = function (template) {
78
+ this.gauge.setTemplate(template)
79
+ }
80
+
81
+ log.enableProgress = function () {
82
+ if (this.progressEnabled || this._paused) {
83
+ return
84
+ }
85
+
86
+ this.progressEnabled = true
87
+ this.tracker.on('change', this.showProgress)
88
+ this.gauge.enable()
89
+ }
90
+
91
+ log.disableProgress = function () {
92
+ if (!this.progressEnabled) {
93
+ return
94
+ }
95
+ this.progressEnabled = false
96
+ this.tracker.removeListener('change', this.showProgress)
97
+ this.gauge.disable()
98
+ }
99
+
100
+ var trackerConstructors = ['newGroup', 'newItem', 'newStream']
101
+
102
+ var mixinLog = function (tracker) {
103
+ // mixin the public methods from log into the tracker
104
+ // (except: conflicts and one's we handle specially)
105
+ Object.keys(log).forEach(function (P) {
106
+ if (P[0] === '_') {
107
+ return
108
+ }
109
+
110
+ if (trackerConstructors.filter(function (C) {
111
+ return C === P
112
+ }).length) {
113
+ return
114
+ }
115
+
116
+ if (tracker[P]) {
117
+ return
118
+ }
119
+
120
+ if (typeof log[P] !== 'function') {
121
+ return
122
+ }
123
+
124
+ var func = log[P]
125
+ tracker[P] = function () {
126
+ return func.apply(log, arguments)
127
+ }
128
+ })
129
+ // if the new tracker is a group, make sure any subtrackers get
130
+ // mixed in too
131
+ if (tracker instanceof Progress.TrackerGroup) {
132
+ trackerConstructors.forEach(function (C) {
133
+ var func = tracker[C]
134
+ tracker[C] = function () {
135
+ return mixinLog(func.apply(tracker, arguments))
136
+ }
137
+ })
138
+ }
139
+ return tracker
140
+ }
141
+
142
+ // Add tracker constructors to the top level log object
143
+ trackerConstructors.forEach(function (C) {
144
+ log[C] = function () {
145
+ return mixinLog(this.tracker[C].apply(this.tracker, arguments))
146
+ }
147
+ })
148
+
149
+ log.clearProgress = function (cb) {
150
+ if (!this.progressEnabled) {
151
+ return cb && process.nextTick(cb)
152
+ }
153
+
154
+ this.gauge.hide(cb)
155
+ }
156
+
157
+ log.showProgress = function (name, completed) {
158
+ if (!this.progressEnabled) {
159
+ return
160
+ }
161
+
162
+ var values = {}
163
+ if (name) {
164
+ values.section = name
165
+ }
166
+
167
+ var last = log.record[log.record.length - 1]
168
+ if (last) {
169
+ values.subsection = last.prefix
170
+ var disp = log.disp[last.level] || last.level
171
+ var logline = this._format(disp, log.style[last.level])
172
+ if (last.prefix) {
173
+ logline += ' ' + this._format(last.prefix, this.prefixStyle)
174
+ }
175
+
176
+ logline += ' ' + last.message.split(/\r?\n/)[0]
177
+ values.logline = logline
178
+ }
179
+ values.completed = completed || this.tracker.completed()
180
+ this.gauge.show(values)
181
+ }.bind(log) // bind for use in tracker's on-change listener
182
+
183
+ // temporarily stop emitting, but don't drop
184
+ log.pause = function () {
185
+ this._paused = true
186
+ if (this.progressEnabled) {
187
+ this.gauge.disable()
188
+ }
189
+ }
190
+
191
+ log.resume = function () {
192
+ if (!this._paused) {
193
+ return
194
+ }
195
+
196
+ this._paused = false
197
+
198
+ var b = this._buffer
199
+ this._buffer = []
200
+ b.forEach(function (m) {
201
+ this.emitLog(m)
202
+ }, this)
203
+ if (this.progressEnabled) {
204
+ this.gauge.enable()
205
+ }
206
+ }
207
+
208
+ log._buffer = []
209
+
210
+ var id = 0
211
+ log.record = []
212
+ log.maxRecordSize = 10000
213
+ log.log = function (lvl, prefix, message) {
214
+ var l = this.levels[lvl]
215
+ if (l === undefined) {
216
+ return this.emit('error', new Error(util.format(
217
+ 'Undefined log level: %j', lvl)))
218
+ }
219
+
220
+ var a = new Array(arguments.length - 2)
221
+ var stack = null
222
+ for (var i = 2; i < arguments.length; i++) {
223
+ var arg = a[i - 2] = arguments[i]
224
+
225
+ // resolve stack traces to a plain string.
226
+ if (typeof arg === 'object' && arg instanceof Error && arg.stack) {
227
+ Object.defineProperty(arg, 'stack', {
228
+ value: stack = arg.stack + '',
229
+ enumerable: true,
230
+ writable: true,
231
+ })
232
+ }
233
+ }
234
+ if (stack) {
235
+ a.unshift(stack + '\n')
236
+ }
237
+ message = util.format.apply(util, a)
238
+
239
+ var m = {
240
+ id: id++,
241
+ level: lvl,
242
+ prefix: String(prefix || ''),
243
+ message: message,
244
+ messageRaw: a,
245
+ }
246
+
247
+ this.emit('log', m)
248
+ this.emit('log.' + lvl, m)
249
+ if (m.prefix) {
250
+ this.emit(m.prefix, m)
251
+ }
252
+
253
+ this.record.push(m)
254
+ var mrs = this.maxRecordSize
255
+ var n = this.record.length - mrs
256
+ if (n > mrs / 10) {
257
+ var newSize = Math.floor(mrs * 0.9)
258
+ this.record = this.record.slice(-1 * newSize)
259
+ }
260
+
261
+ this.emitLog(m)
262
+ }.bind(log)
263
+
264
+ log.emitLog = function (m) {
265
+ if (this._paused) {
266
+ this._buffer.push(m)
267
+ return
268
+ }
269
+ if (this.progressEnabled) {
270
+ this.gauge.pulse(m.prefix)
271
+ }
272
+
273
+ var l = this.levels[m.level]
274
+ if (l === undefined) {
275
+ return
276
+ }
277
+
278
+ if (l < this.levels[this.level]) {
279
+ return
280
+ }
281
+
282
+ if (l > 0 && !isFinite(l)) {
283
+ return
284
+ }
285
+
286
+ // If 'disp' is null or undefined, use the lvl as a default
287
+ // Allows: '', 0 as valid disp
288
+ var disp = log.disp[m.level] != null ? log.disp[m.level] : m.level
289
+ this.clearProgress()
290
+ m.message.split(/\r?\n/).forEach(function (line) {
291
+ var heading = this.heading
292
+ if (heading) {
293
+ this.write(heading, this.headingStyle)
294
+ this.write(' ')
295
+ }
296
+ this.write(disp, log.style[m.level])
297
+ var p = m.prefix || ''
298
+ if (p) {
299
+ this.write(' ')
300
+ }
301
+
302
+ this.write(p, this.prefixStyle)
303
+ this.write(' ' + line + '\n')
304
+ }, this)
305
+ this.showProgress()
306
+ }
307
+
308
+ log._format = function (msg, style) {
309
+ if (!stream) {
310
+ return
311
+ }
312
+
313
+ var output = ''
314
+ if (this.useColor()) {
315
+ style = style || {}
316
+ var settings = []
317
+ if (style.fg) {
318
+ settings.push(style.fg)
319
+ }
320
+
321
+ if (style.bg) {
322
+ settings.push('bg' + style.bg[0].toUpperCase() + style.bg.slice(1))
323
+ }
324
+
325
+ if (style.bold) {
326
+ settings.push('bold')
327
+ }
328
+
329
+ if (style.underline) {
330
+ settings.push('underline')
331
+ }
332
+
333
+ if (style.inverse) {
334
+ settings.push('inverse')
335
+ }
336
+
337
+ if (settings.length) {
338
+ output += consoleControl.color(settings)
339
+ }
340
+
341
+ if (style.beep) {
342
+ output += consoleControl.beep()
343
+ }
344
+ }
345
+ output += msg
346
+ if (this.useColor()) {
347
+ output += consoleControl.color('reset')
348
+ }
349
+
350
+ return output
351
+ }
352
+
353
+ log.write = function (msg, style) {
354
+ if (!stream) {
355
+ return
356
+ }
357
+
358
+ stream.write(this._format(msg, style))
359
+ }
360
+
361
+ log.addLevel = function (lvl, n, style, disp) {
362
+ // If 'disp' is null or undefined, use the lvl as a default
363
+ if (disp == null) {
364
+ disp = lvl
365
+ }
366
+
367
+ this.levels[lvl] = n
368
+ this.style[lvl] = style
369
+ if (!this[lvl]) {
370
+ this[lvl] = function () {
371
+ var a = new Array(arguments.length + 1)
372
+ a[0] = lvl
373
+ for (var i = 0; i < arguments.length; i++) {
374
+ a[i + 1] = arguments[i]
375
+ }
376
+
377
+ return this.log.apply(this, a)
378
+ }.bind(this)
379
+ }
380
+ this.disp[lvl] = disp
381
+ }
382
+
383
+ log.prefixStyle = { fg: 'magenta' }
384
+ log.headingStyle = { fg: 'white', bg: 'black' }
385
+
386
+ log.style = {}
387
+ log.levels = {}
388
+ log.disp = {}
389
+ log.addLevel('silly', -Infinity, { inverse: true }, 'sill')
390
+ log.addLevel('verbose', 1000, { fg: 'cyan', bg: 'black' }, 'verb')
391
+ log.addLevel('info', 2000, { fg: 'green' })
392
+ log.addLevel('timing', 2500, { fg: 'green', bg: 'black' })
393
+ log.addLevel('http', 3000, { fg: 'green', bg: 'black' })
394
+ log.addLevel('notice', 3500, { fg: 'cyan', bg: 'black' })
395
+ log.addLevel('warn', 4000, { fg: 'black', bg: 'yellow' }, 'WARN')
396
+ log.addLevel('error', 5000, { fg: 'red', bg: 'black' }, 'ERR!')
397
+ log.addLevel('silent', Infinity)
398
+
399
+ // allow 'error' prefix
400
+ log.on('error', function () {})
@@ -0,0 +1,52 @@
1
+ {
2
+ "author": "GitHub Inc.",
3
+ "name": "npmlog",
4
+ "description": "logger for npm",
5
+ "version": "7.0.1",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/npm/npmlog.git"
9
+ },
10
+ "main": "lib/log.js",
11
+ "files": [
12
+ "bin/",
13
+ "lib/"
14
+ ],
15
+ "scripts": {
16
+ "test": "tap",
17
+ "npmclilint": "npmcli-lint",
18
+ "lint": "eslint \"**/*.js\"",
19
+ "lintfix": "npm run lint -- --fix",
20
+ "posttest": "npm run lint",
21
+ "postsnap": "npm run lintfix --",
22
+ "postlint": "template-oss-check",
23
+ "snap": "tap",
24
+ "template-oss-apply": "template-oss-apply --force"
25
+ },
26
+ "dependencies": {
27
+ "are-we-there-yet": "^4.0.0",
28
+ "console-control-strings": "^1.1.0",
29
+ "gauge": "^5.0.0",
30
+ "set-blocking": "^2.0.0"
31
+ },
32
+ "devDependencies": {
33
+ "@npmcli/eslint-config": "^4.0.0",
34
+ "@npmcli/template-oss": "4.6.1",
35
+ "tap": "^16.0.1"
36
+ },
37
+ "license": "ISC",
38
+ "engines": {
39
+ "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
40
+ },
41
+ "tap": {
42
+ "branches": 95,
43
+ "nyc-arg": [
44
+ "--exclude",
45
+ "tap-snapshots/**"
46
+ ]
47
+ },
48
+ "templateOSS": {
49
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
50
+ "version": "4.6.1"
51
+ }
52
+ }
package/nohoist.sh ADDED
@@ -0,0 +1,11 @@
1
+ packagess="
2
+ deep-diff
3
+ deepmerge
4
+ npmlog
5
+ "
6
+
7
+ mkdir node_modules
8
+ for package in $packagess; do
9
+ echo "Installing $package"
10
+ cp -r ../../../node_modules/$package ./node_modules/
11
+ done
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-solutions-constructs/core",
3
- "version": "2.78.0",
3
+ "version": "2.79.0",
4
4
  "description": "Core CDK Construct for patterns library",
5
5
  "main": "index.js",
6
6
  "types": "index.ts",
@@ -26,7 +26,8 @@
26
26
  "integ-assert": "integ-runner",
27
27
  "jsii": "jsii",
28
28
  "jsii-pacmak": "jsii-pacmak",
29
- "build+lint+test": "npm run jsii && npm run lint && npm test && npm run integ-assert",
29
+ "nohoist": "./nohoist.sh",
30
+ "build+lint+test": "npm run jsii && npm run lint && npm test && npm run integ-assert && npm run nohoist",
30
31
  "blt": "npm run build+lint+test",
31
32
  "snapshot-update": "npm test -- -u"
32
33
  },