@aws-solutions-constructs/core 2.76.0 → 2.78.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 (265) hide show
  1. package/.jsii +98 -57
  2. package/lib/alb-defaults.js +2 -3
  3. package/lib/alb-helper.js +8 -10
  4. package/lib/apigateway-defaults.d.ts +6 -6
  5. package/lib/apigateway-defaults.js +17 -18
  6. package/lib/apigateway-helper.d.ts +2 -2
  7. package/lib/apigateway-helper.js +14 -17
  8. package/lib/cloudfront-distribution-defaults.js +4 -5
  9. package/lib/cloudfront-distribution-helper.js +7 -9
  10. package/lib/cloudwatch-log-group-defaults.js +2 -3
  11. package/lib/cloudwatch-log-group-helper.js +3 -6
  12. package/lib/cognito-defaults.d.ts +2 -2
  13. package/lib/cognito-defaults.js +6 -6
  14. package/lib/cognito-helper.js +8 -11
  15. package/lib/dynamodb-table-defaults.d.ts +3 -3
  16. package/lib/dynamodb-table-defaults.js +6 -6
  17. package/lib/dynamodb-table-helper.js +7 -8
  18. package/lib/elasticache-defaults.js +3 -4
  19. package/lib/elasticache-helper.js +4 -5
  20. package/lib/elasticsearch-defaults.js +2 -3
  21. package/lib/elasticsearch-helper.js +7 -8
  22. package/lib/eventbridge-helper.d.ts +2 -2
  23. package/lib/eventbridge-helper.js +6 -7
  24. package/lib/events-rule-defaults.d.ts +1 -1
  25. package/lib/events-rule-defaults.js +5 -6
  26. package/lib/fargate-defaults.js +6 -7
  27. package/lib/fargate-helper.js +7 -9
  28. package/lib/glue-database-defaults.js +4 -5
  29. package/lib/glue-database-helper.js +2 -3
  30. package/lib/glue-job-defaults.js +2 -3
  31. package/lib/glue-job-helper.js +9 -9
  32. package/lib/glue-table-defaults.js +7 -8
  33. package/lib/glue-table-helper.js +3 -4
  34. package/lib/iot-topic-rule-defaults.d.ts +1 -1
  35. package/lib/iot-topic-rule-defaults.js +7 -8
  36. package/lib/kendra-defaults.js +2 -3
  37. package/lib/kendra-helper.d.ts +1 -1
  38. package/lib/kendra-helper.js +5 -6
  39. package/lib/kinesis-analytics-defaults.d.ts +2 -2
  40. package/lib/kinesis-analytics-defaults.js +4 -4
  41. package/lib/kinesis-analytics-helper.js +3 -4
  42. package/lib/kinesis-firehose-s3-defaults.d.ts +1 -1
  43. package/lib/kinesis-firehose-s3-defaults.js +8 -9
  44. package/lib/kinesis-streams-defaults.d.ts +2 -2
  45. package/lib/kinesis-streams-defaults.js +4 -4
  46. package/lib/kinesis-streams-helper.js +5 -7
  47. package/lib/kms-defaults.d.ts +2 -2
  48. package/lib/kms-defaults.js +4 -4
  49. package/lib/kms-helper.js +3 -6
  50. package/lib/lambda-defaults.js +2 -3
  51. package/lib/lambda-event-source-mapping-defaults.d.ts +3 -3
  52. package/lib/lambda-event-source-mapping-defaults.js +16 -17
  53. package/lib/lambda-helper.js +6 -7
  54. package/lib/mediastore-defaults.js +2 -3
  55. package/lib/mediastore-helper.js +4 -6
  56. package/lib/opensearch-defaults.js +2 -3
  57. package/lib/opensearch-helper.js +5 -6
  58. package/lib/override-warning-service.js +10 -8
  59. package/lib/pipes-defaults.js +5 -6
  60. package/lib/pipes-helper.js +7 -7
  61. package/lib/s3-bucket-defaults.js +3 -3
  62. package/lib/s3-bucket-helper.js +13 -8
  63. package/lib/sagemaker-defaults.js +5 -6
  64. package/lib/sagemaker-helper.d.ts +5 -0
  65. package/lib/sagemaker-helper.js +17 -17
  66. package/lib/secretsmanager-defaults.d.ts +2 -2
  67. package/lib/secretsmanager-defaults.js +4 -4
  68. package/lib/secretsmanager-helper.js +4 -6
  69. package/lib/security-group-helper.js +3 -4
  70. package/lib/sns-defaults.d.ts +2 -2
  71. package/lib/sns-defaults.js +4 -4
  72. package/lib/sns-helper.js +4 -5
  73. package/lib/sqs-defaults.js +5 -5
  74. package/lib/sqs-helper.d.ts +1 -1
  75. package/lib/sqs-helper.js +5 -6
  76. package/lib/ssm-string-parameter-helper.js +2 -3
  77. package/lib/step-function-defaults.d.ts +1 -1
  78. package/lib/step-function-defaults.js +4 -5
  79. package/lib/step-function-helper.js +5 -5
  80. package/lib/utils.d.ts +1 -1
  81. package/lib/utils.js +32 -30
  82. package/lib/vpc-defaults.js +4 -5
  83. package/lib/vpc-helper.js +6 -8
  84. package/lib/waf-defaults.js +4 -5
  85. package/lib/waf-helper.js +4 -6
  86. package/lib/websocket-api-helper.js +4 -6
  87. package/package.json +6 -5
  88. package/test/apigateway-helper.test.js +3 -3
  89. package/test/cloudfront-distribution-api-gateway-helper.test.js +11 -11
  90. package/test/dynamo-table.test.js +9 -9
  91. package/test/glue-job-helper.test.js +7 -7
  92. package/test/glue-table-helper.test.js +5 -5
  93. package/test/kinesis-analytics.test.js +2 -2
  94. package/test/kinesis-streams-defaults.test.js +2 -2
  95. package/test/lambda-event-source.test.js +10 -10
  96. package/test/override-warning-service.test.js +25 -26
  97. package/test/pipes-helper.test.js +2 -2
  98. package/test/step-function-helper.test.js +5 -5
  99. package/test/test-helper.js +16 -16
  100. package/test/utils.test.js +11 -12
  101. package/.eslintignore +0 -9
  102. package/node_modules/ansi-regex/index.d.ts +0 -37
  103. package/node_modules/ansi-regex/index.js +0 -10
  104. package/node_modules/ansi-regex/license +0 -9
  105. package/node_modules/ansi-regex/package.json +0 -55
  106. package/node_modules/ansi-regex/readme.md +0 -78
  107. package/node_modules/aproba/LICENSE +0 -14
  108. package/node_modules/aproba/README.md +0 -94
  109. package/node_modules/aproba/index.js +0 -105
  110. package/node_modules/aproba/package.json +0 -35
  111. package/node_modules/are-we-there-yet/LICENSE.md +0 -18
  112. package/node_modules/are-we-there-yet/README.md +0 -208
  113. package/node_modules/are-we-there-yet/lib/index.js +0 -4
  114. package/node_modules/are-we-there-yet/lib/tracker-base.js +0 -13
  115. package/node_modules/are-we-there-yet/lib/tracker-group.js +0 -112
  116. package/node_modules/are-we-there-yet/lib/tracker-stream.js +0 -42
  117. package/node_modules/are-we-there-yet/lib/tracker.js +0 -34
  118. package/node_modules/are-we-there-yet/package.json +0 -53
  119. package/node_modules/color-support/LICENSE +0 -15
  120. package/node_modules/color-support/README.md +0 -129
  121. package/node_modules/color-support/bin.js +0 -3
  122. package/node_modules/color-support/browser.js +0 -14
  123. package/node_modules/color-support/index.js +0 -134
  124. package/node_modules/color-support/package.json +0 -36
  125. package/node_modules/console-control-strings/LICENSE +0 -13
  126. package/node_modules/console-control-strings/README.md +0 -145
  127. package/node_modules/console-control-strings/index.js +0 -125
  128. package/node_modules/console-control-strings/package.json +0 -27
  129. package/node_modules/deep-diff/.circleci/config.yml +0 -76
  130. package/node_modules/deep-diff/.eslintrc +0 -72
  131. package/node_modules/deep-diff/.vscode/launch.json +0 -30
  132. package/node_modules/deep-diff/.vscode/tasks.json +0 -12
  133. package/node_modules/deep-diff/ChangeLog.md +0 -63
  134. package/node_modules/deep-diff/LICENSE +0 -7
  135. package/node_modules/deep-diff/Readme.md +0 -239
  136. package/node_modules/deep-diff/dist/deep-diff.min.js +0 -1
  137. package/node_modules/deep-diff/dist/deep-diff.min.js.map +0 -1
  138. package/node_modules/deep-diff/examples/apply-diff-from-any.js +0 -39
  139. package/node_modules/deep-diff/examples/array-change.js +0 -45
  140. package/node_modules/deep-diff/examples/capture_change_apply_elsewhere.js +0 -53
  141. package/node_modules/deep-diff/examples/diff-ignoring-fun.js +0 -88
  142. package/node_modules/deep-diff/examples/diff-scenarios.js +0 -49
  143. package/node_modules/deep-diff/examples/example1.js +0 -41
  144. package/node_modules/deep-diff/examples/issue-111.js +0 -6
  145. package/node_modules/deep-diff/examples/issue-113-1.js +0 -14
  146. package/node_modules/deep-diff/examples/issue-113-2.js +0 -11
  147. package/node_modules/deep-diff/examples/issue-115.js +0 -17
  148. package/node_modules/deep-diff/examples/issue-124.js +0 -8
  149. package/node_modules/deep-diff/examples/issue-125.js +0 -19
  150. package/node_modules/deep-diff/examples/issue-126.js +0 -33
  151. package/node_modules/deep-diff/examples/issue-35.js +0 -11
  152. package/node_modules/deep-diff/examples/issue-47.js +0 -17
  153. package/node_modules/deep-diff/examples/issue-48.js +0 -48
  154. package/node_modules/deep-diff/examples/issue-62.js +0 -14
  155. package/node_modules/deep-diff/examples/issue-70.js +0 -6
  156. package/node_modules/deep-diff/examples/issue-71.js +0 -15
  157. package/node_modules/deep-diff/examples/issue-72.js +0 -21
  158. package/node_modules/deep-diff/examples/issue-74.js +0 -9
  159. package/node_modules/deep-diff/examples/issue-78.js +0 -24
  160. package/node_modules/deep-diff/examples/issue-83.js +0 -11
  161. package/node_modules/deep-diff/examples/issue-88.js +0 -26
  162. package/node_modules/deep-diff/examples/performance.js +0 -64
  163. package/node_modules/deep-diff/examples/practice-data.json +0 -2501
  164. package/node_modules/deep-diff/index.js +0 -526
  165. package/node_modules/deep-diff/package.json +0 -74
  166. package/node_modules/deep-diff/test/.eslintrc +0 -10
  167. package/node_modules/deep-diff/test/tests.html +0 -34
  168. package/node_modules/deep-diff/test/tests.js +0 -759
  169. package/node_modules/deepmerge/.editorconfig +0 -7
  170. package/node_modules/deepmerge/.eslintcache +0 -1
  171. package/node_modules/deepmerge/changelog.md +0 -167
  172. package/node_modules/deepmerge/dist/cjs.js +0 -133
  173. package/node_modules/deepmerge/dist/umd.js +0 -139
  174. package/node_modules/deepmerge/index.d.ts +0 -20
  175. package/node_modules/deepmerge/index.js +0 -106
  176. package/node_modules/deepmerge/license.txt +0 -21
  177. package/node_modules/deepmerge/package.json +0 -42
  178. package/node_modules/deepmerge/readme.md +0 -264
  179. package/node_modules/deepmerge/rollup.config.js +0 -22
  180. package/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  181. package/node_modules/emoji-regex/README.md +0 -73
  182. package/node_modules/emoji-regex/es2015/index.js +0 -6
  183. package/node_modules/emoji-regex/es2015/text.js +0 -6
  184. package/node_modules/emoji-regex/index.d.ts +0 -23
  185. package/node_modules/emoji-regex/index.js +0 -6
  186. package/node_modules/emoji-regex/package.json +0 -50
  187. package/node_modules/emoji-regex/text.js +0 -6
  188. package/node_modules/gauge/LICENSE.md +0 -20
  189. package/node_modules/gauge/README.md +0 -402
  190. package/node_modules/gauge/lib/base-theme.js +0 -18
  191. package/node_modules/gauge/lib/error.js +0 -24
  192. package/node_modules/gauge/lib/has-color.js +0 -4
  193. package/node_modules/gauge/lib/index.js +0 -289
  194. package/node_modules/gauge/lib/plumbing.js +0 -50
  195. package/node_modules/gauge/lib/process.js +0 -3
  196. package/node_modules/gauge/lib/progress-bar.js +0 -41
  197. package/node_modules/gauge/lib/render-template.js +0 -222
  198. package/node_modules/gauge/lib/set-immediate.js +0 -7
  199. package/node_modules/gauge/lib/set-interval.js +0 -3
  200. package/node_modules/gauge/lib/spin.js +0 -5
  201. package/node_modules/gauge/lib/template-item.js +0 -87
  202. package/node_modules/gauge/lib/theme-set.js +0 -122
  203. package/node_modules/gauge/lib/themes.js +0 -56
  204. package/node_modules/gauge/lib/wide-truncate.js +0 -31
  205. package/node_modules/gauge/package.json +0 -68
  206. package/node_modules/has-unicode/LICENSE +0 -14
  207. package/node_modules/has-unicode/README.md +0 -43
  208. package/node_modules/has-unicode/index.js +0 -16
  209. package/node_modules/has-unicode/package.json +0 -30
  210. package/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  211. package/node_modules/is-fullwidth-code-point/index.js +0 -50
  212. package/node_modules/is-fullwidth-code-point/license +0 -9
  213. package/node_modules/is-fullwidth-code-point/package.json +0 -42
  214. package/node_modules/is-fullwidth-code-point/readme.md +0 -39
  215. package/node_modules/npmlog/LICENSE.md +0 -20
  216. package/node_modules/npmlog/README.md +0 -216
  217. package/node_modules/npmlog/lib/log.js +0 -400
  218. package/node_modules/npmlog/package.json +0 -52
  219. package/node_modules/set-blocking/LICENSE.txt +0 -14
  220. package/node_modules/set-blocking/README.md +0 -31
  221. package/node_modules/set-blocking/index.js +0 -7
  222. package/node_modules/set-blocking/package.json +0 -42
  223. package/node_modules/signal-exit/LICENSE.txt +0 -16
  224. package/node_modules/signal-exit/README.md +0 -74
  225. package/node_modules/signal-exit/dist/cjs/browser.d.ts +0 -12
  226. package/node_modules/signal-exit/dist/cjs/browser.d.ts.map +0 -1
  227. package/node_modules/signal-exit/dist/cjs/browser.js +0 -10
  228. package/node_modules/signal-exit/dist/cjs/browser.js.map +0 -1
  229. package/node_modules/signal-exit/dist/cjs/index.d.ts +0 -48
  230. package/node_modules/signal-exit/dist/cjs/index.d.ts.map +0 -1
  231. package/node_modules/signal-exit/dist/cjs/index.js +0 -279
  232. package/node_modules/signal-exit/dist/cjs/index.js.map +0 -1
  233. package/node_modules/signal-exit/dist/cjs/package.json +0 -3
  234. package/node_modules/signal-exit/dist/cjs/signals.d.ts +0 -29
  235. package/node_modules/signal-exit/dist/cjs/signals.d.ts.map +0 -1
  236. package/node_modules/signal-exit/dist/cjs/signals.js +0 -42
  237. package/node_modules/signal-exit/dist/cjs/signals.js.map +0 -1
  238. package/node_modules/signal-exit/dist/mjs/browser.d.ts +0 -12
  239. package/node_modules/signal-exit/dist/mjs/browser.d.ts.map +0 -1
  240. package/node_modules/signal-exit/dist/mjs/browser.js +0 -4
  241. package/node_modules/signal-exit/dist/mjs/browser.js.map +0 -1
  242. package/node_modules/signal-exit/dist/mjs/index.d.ts +0 -48
  243. package/node_modules/signal-exit/dist/mjs/index.d.ts.map +0 -1
  244. package/node_modules/signal-exit/dist/mjs/index.js +0 -275
  245. package/node_modules/signal-exit/dist/mjs/index.js.map +0 -1
  246. package/node_modules/signal-exit/dist/mjs/package.json +0 -3
  247. package/node_modules/signal-exit/dist/mjs/signals.d.ts +0 -29
  248. package/node_modules/signal-exit/dist/mjs/signals.d.ts.map +0 -1
  249. package/node_modules/signal-exit/dist/mjs/signals.js +0 -39
  250. package/node_modules/signal-exit/dist/mjs/signals.js.map +0 -1
  251. package/node_modules/signal-exit/package.json +0 -106
  252. package/node_modules/string-width/index.d.ts +0 -29
  253. package/node_modules/string-width/index.js +0 -47
  254. package/node_modules/string-width/license +0 -9
  255. package/node_modules/string-width/package.json +0 -56
  256. package/node_modules/string-width/readme.md +0 -50
  257. package/node_modules/strip-ansi/index.d.ts +0 -17
  258. package/node_modules/strip-ansi/index.js +0 -4
  259. package/node_modules/strip-ansi/license +0 -9
  260. package/node_modules/strip-ansi/package.json +0 -54
  261. package/node_modules/strip-ansi/readme.md +0 -46
  262. package/node_modules/wide-align/LICENSE +0 -14
  263. package/node_modules/wide-align/README.md +0 -47
  264. package/node_modules/wide-align/align.js +0 -65
  265. package/node_modules/wide-align/package.json +0 -33
@@ -1,134 +0,0 @@
1
- // call it on itself so we can test the export val for basic stuff
2
- module.exports = colorSupport({ alwaysReturn: true }, colorSupport)
3
-
4
- function hasNone (obj, options) {
5
- obj.level = 0
6
- obj.hasBasic = false
7
- obj.has256 = false
8
- obj.has16m = false
9
- if (!options.alwaysReturn) {
10
- return false
11
- }
12
- return obj
13
- }
14
-
15
- function hasBasic (obj) {
16
- obj.hasBasic = true
17
- obj.has256 = false
18
- obj.has16m = false
19
- obj.level = 1
20
- return obj
21
- }
22
-
23
- function has256 (obj) {
24
- obj.hasBasic = true
25
- obj.has256 = true
26
- obj.has16m = false
27
- obj.level = 2
28
- return obj
29
- }
30
-
31
- function has16m (obj) {
32
- obj.hasBasic = true
33
- obj.has256 = true
34
- obj.has16m = true
35
- obj.level = 3
36
- return obj
37
- }
38
-
39
- function colorSupport (options, obj) {
40
- options = options || {}
41
-
42
- obj = obj || {}
43
-
44
- // if just requesting a specific level, then return that.
45
- if (typeof options.level === 'number') {
46
- switch (options.level) {
47
- case 0:
48
- return hasNone(obj, options)
49
- case 1:
50
- return hasBasic(obj)
51
- case 2:
52
- return has256(obj)
53
- case 3:
54
- return has16m(obj)
55
- }
56
- }
57
-
58
- obj.level = 0
59
- obj.hasBasic = false
60
- obj.has256 = false
61
- obj.has16m = false
62
-
63
- if (typeof process === 'undefined' ||
64
- !process ||
65
- !process.stdout ||
66
- !process.env ||
67
- !process.platform) {
68
- return hasNone(obj, options)
69
- }
70
-
71
- var env = options.env || process.env
72
- var stream = options.stream || process.stdout
73
- var term = options.term || env.TERM || ''
74
- var platform = options.platform || process.platform
75
-
76
- if (!options.ignoreTTY && !stream.isTTY) {
77
- return hasNone(obj, options)
78
- }
79
-
80
- if (!options.ignoreDumb && term === 'dumb' && !env.COLORTERM) {
81
- return hasNone(obj, options)
82
- }
83
-
84
- if (platform === 'win32') {
85
- return hasBasic(obj)
86
- }
87
-
88
- if (env.TMUX) {
89
- return has256(obj)
90
- }
91
-
92
- if (!options.ignoreCI && (env.CI || env.TEAMCITY_VERSION)) {
93
- if (env.TRAVIS) {
94
- return has256(obj)
95
- } else {
96
- return hasNone(obj, options)
97
- }
98
- }
99
-
100
- // TODO: add more term programs
101
- switch (env.TERM_PROGRAM) {
102
- case 'iTerm.app':
103
- var ver = env.TERM_PROGRAM_VERSION || '0.'
104
- if (/^[0-2]\./.test(ver)) {
105
- return has256(obj)
106
- } else {
107
- return has16m(obj)
108
- }
109
-
110
- case 'HyperTerm':
111
- case 'Hyper':
112
- return has16m(obj)
113
-
114
- case 'MacTerm':
115
- return has16m(obj)
116
-
117
- case 'Apple_Terminal':
118
- return has256(obj)
119
- }
120
-
121
- if (/^xterm-256/.test(term)) {
122
- return has256(obj)
123
- }
124
-
125
- if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(term)) {
126
- return hasBasic(obj)
127
- }
128
-
129
- if (env.COLORTERM) {
130
- return hasBasic(obj)
131
- }
132
-
133
- return hasNone(obj, options)
134
- }
@@ -1,36 +0,0 @@
1
- {
2
- "name": "color-support",
3
- "version": "1.1.3",
4
- "description": "A module which will endeavor to guess your terminal's level of color support.",
5
- "main": "index.js",
6
- "browser": "browser.js",
7
- "bin": "bin.js",
8
- "devDependencies": {
9
- "tap": "^10.3.3"
10
- },
11
- "scripts": {
12
- "test": "tap test/*.js --100 -J",
13
- "preversion": "npm test",
14
- "postversion": "npm publish",
15
- "postpublish": "git push origin --all; git push origin --tags"
16
- },
17
- "repository": {
18
- "type": "git",
19
- "url": "git+https://github.com/isaacs/color-support.git"
20
- },
21
- "keywords": [
22
- "terminal",
23
- "color",
24
- "support",
25
- "xterm",
26
- "truecolor",
27
- "256"
28
- ],
29
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
30
- "license": "ISC",
31
- "files": [
32
- "browser.js",
33
- "index.js",
34
- "bin.js"
35
- ]
36
- }
@@ -1,13 +0,0 @@
1
- Copyright (c) 2014, Rebecca Turner <me@re-becca.org>
2
-
3
- Permission to use, copy, modify, and/or distribute this software for any
4
- purpose with or without fee is hereby granted, provided that the above
5
- copyright notice and this permission notice appear in all copies.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13
- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -1,145 +0,0 @@
1
- # Console Control Strings
2
-
3
- A library of cross-platform tested terminal/console command strings for
4
- doing things like color and cursor positioning. This is a subset of both
5
- ansi and vt100. All control codes included work on both Windows & Unix-like
6
- OSes, except where noted.
7
-
8
- ## Usage
9
-
10
- ```js
11
- var consoleControl = require('console-control-strings')
12
-
13
- console.log(consoleControl.color('blue','bgRed', 'bold') + 'hi there' + consoleControl.color('reset'))
14
- process.stdout.write(consoleControl.goto(75, 10))
15
- ```
16
-
17
- ## Why Another?
18
-
19
- There are tons of libraries similar to this one. I wanted one that was:
20
-
21
- 1. Very clear about compatibility goals.
22
- 2. Could emit, for instance, a start color code without an end one.
23
- 3. Returned strings w/o writing to streams.
24
- 4. Was not weighed down with other unrelated baggage.
25
-
26
- ## Functions
27
-
28
- ### var code = consoleControl.up(_num = 1_)
29
-
30
- Returns the escape sequence to move _num_ lines up.
31
-
32
- ### var code = consoleControl.down(_num = 1_)
33
-
34
- Returns the escape sequence to move _num_ lines down.
35
-
36
- ### var code = consoleControl.forward(_num = 1_)
37
-
38
- Returns the escape sequence to move _num_ lines righ.
39
-
40
- ### var code = consoleControl.back(_num = 1_)
41
-
42
- Returns the escape sequence to move _num_ lines left.
43
-
44
- ### var code = consoleControl.nextLine(_num = 1_)
45
-
46
- Returns the escape sequence to move _num_ lines down and to the beginning of
47
- the line.
48
-
49
- ### var code = consoleControl.previousLine(_num = 1_)
50
-
51
- Returns the escape sequence to move _num_ lines up and to the beginning of
52
- the line.
53
-
54
- ### var code = consoleControl.eraseData()
55
-
56
- Returns the escape sequence to erase everything from the current cursor
57
- position to the bottom right of the screen. This is line based, so it
58
- erases the remainder of the current line and all following lines.
59
-
60
- ### var code = consoleControl.eraseLine()
61
-
62
- Returns the escape sequence to erase to the end of the current line.
63
-
64
- ### var code = consoleControl.goto(_x_, _y_)
65
-
66
- Returns the escape sequence to move the cursor to the designated position.
67
- Note that the origin is _1, 1_ not _0, 0_.
68
-
69
- ### var code = consoleControl.gotoSOL()
70
-
71
- Returns the escape sequence to move the cursor to the beginning of the
72
- current line. (That is, it returns a carriage return, `\r`.)
73
-
74
- ### var code = consoleControl.beep()
75
-
76
- Returns the escape sequence to cause the termianl to beep. (That is, it
77
- returns unicode character `\x0007`, a Control-G.)
78
-
79
- ### var code = consoleControl.hideCursor()
80
-
81
- Returns the escape sequence to hide the cursor.
82
-
83
- ### var code = consoleControl.showCursor()
84
-
85
- Returns the escape sequence to show the cursor.
86
-
87
- ### var code = consoleControl.color(_colors = []_)
88
-
89
- ### var code = consoleControl.color(_color1_, _color2_, _…_, _colorn_)
90
-
91
- Returns the escape sequence to set the current terminal display attributes
92
- (mostly colors). Arguments can either be a list of attributes or an array
93
- of attributes. The difference between passing in an array or list of colors
94
- and calling `.color` separately for each one, is that in the former case a
95
- single escape sequence will be produced where as in the latter each change
96
- will have its own distinct escape sequence. Each attribute can be one of:
97
-
98
- * Reset:
99
- * **reset** – Reset all attributes to the terminal default.
100
- * Styles:
101
- * **bold** – Display text as bold. In some terminals this means using a
102
- bold font, in others this means changing the color. In some it means
103
- both.
104
- * **italic** – Display text as italic. This is not available in most Windows terminals.
105
- * **underline** – Underline text. This is not available in most Windows Terminals.
106
- * **inverse** – Invert the foreground and background colors.
107
- * **stopBold** – Do not display text as bold.
108
- * **stopItalic** – Do not display text as italic.
109
- * **stopUnderline** – Do not underline text.
110
- * **stopInverse** – Do not invert foreground and background.
111
- * Colors:
112
- * **white**
113
- * **black**
114
- * **blue**
115
- * **cyan**
116
- * **green**
117
- * **magenta**
118
- * **red**
119
- * **yellow**
120
- * **grey** / **brightBlack**
121
- * **brightRed**
122
- * **brightGreen**
123
- * **brightYellow**
124
- * **brightBlue**
125
- * **brightMagenta**
126
- * **brightCyan**
127
- * **brightWhite**
128
- * Background Colors:
129
- * **bgWhite**
130
- * **bgBlack**
131
- * **bgBlue**
132
- * **bgCyan**
133
- * **bgGreen**
134
- * **bgMagenta**
135
- * **bgRed**
136
- * **bgYellow**
137
- * **bgGrey** / **bgBrightBlack**
138
- * **bgBrightRed**
139
- * **bgBrightGreen**
140
- * **bgBrightYellow**
141
- * **bgBrightBlue**
142
- * **bgBrightMagenta**
143
- * **bgBrightCyan**
144
- * **bgBrightWhite**
145
-
@@ -1,125 +0,0 @@
1
- 'use strict'
2
-
3
- // These tables borrowed from `ansi`
4
-
5
- var prefix = '\x1b['
6
-
7
- exports.up = function up (num) {
8
- return prefix + (num || '') + 'A'
9
- }
10
-
11
- exports.down = function down (num) {
12
- return prefix + (num || '') + 'B'
13
- }
14
-
15
- exports.forward = function forward (num) {
16
- return prefix + (num || '') + 'C'
17
- }
18
-
19
- exports.back = function back (num) {
20
- return prefix + (num || '') + 'D'
21
- }
22
-
23
- exports.nextLine = function nextLine (num) {
24
- return prefix + (num || '') + 'E'
25
- }
26
-
27
- exports.previousLine = function previousLine (num) {
28
- return prefix + (num || '') + 'F'
29
- }
30
-
31
- exports.horizontalAbsolute = function horizontalAbsolute (num) {
32
- if (num == null) throw new Error('horizontalAboslute requires a column to position to')
33
- return prefix + num + 'G'
34
- }
35
-
36
- exports.eraseData = function eraseData () {
37
- return prefix + 'J'
38
- }
39
-
40
- exports.eraseLine = function eraseLine () {
41
- return prefix + 'K'
42
- }
43
-
44
- exports.goto = function (x, y) {
45
- return prefix + y + ';' + x + 'H'
46
- }
47
-
48
- exports.gotoSOL = function () {
49
- return '\r'
50
- }
51
-
52
- exports.beep = function () {
53
- return '\x07'
54
- }
55
-
56
- exports.hideCursor = function hideCursor () {
57
- return prefix + '?25l'
58
- }
59
-
60
- exports.showCursor = function showCursor () {
61
- return prefix + '?25h'
62
- }
63
-
64
- var colors = {
65
- reset: 0,
66
- // styles
67
- bold: 1,
68
- italic: 3,
69
- underline: 4,
70
- inverse: 7,
71
- // resets
72
- stopBold: 22,
73
- stopItalic: 23,
74
- stopUnderline: 24,
75
- stopInverse: 27,
76
- // colors
77
- white: 37,
78
- black: 30,
79
- blue: 34,
80
- cyan: 36,
81
- green: 32,
82
- magenta: 35,
83
- red: 31,
84
- yellow: 33,
85
- bgWhite: 47,
86
- bgBlack: 40,
87
- bgBlue: 44,
88
- bgCyan: 46,
89
- bgGreen: 42,
90
- bgMagenta: 45,
91
- bgRed: 41,
92
- bgYellow: 43,
93
-
94
- grey: 90,
95
- brightBlack: 90,
96
- brightRed: 91,
97
- brightGreen: 92,
98
- brightYellow: 93,
99
- brightBlue: 94,
100
- brightMagenta: 95,
101
- brightCyan: 96,
102
- brightWhite: 97,
103
-
104
- bgGrey: 100,
105
- bgBrightBlack: 100,
106
- bgBrightRed: 101,
107
- bgBrightGreen: 102,
108
- bgBrightYellow: 103,
109
- bgBrightBlue: 104,
110
- bgBrightMagenta: 105,
111
- bgBrightCyan: 106,
112
- bgBrightWhite: 107
113
- }
114
-
115
- exports.color = function color (colorWith) {
116
- if (arguments.length !== 1 || !Array.isArray(colorWith)) {
117
- colorWith = Array.prototype.slice.call(arguments)
118
- }
119
- return prefix + colorWith.map(colorNameToCode).join(';') + 'm'
120
- }
121
-
122
- function colorNameToCode (color) {
123
- if (colors[color] != null) return colors[color]
124
- throw new Error('Unknown color or style name: ' + color)
125
- }
@@ -1,27 +0,0 @@
1
- {
2
- "name": "console-control-strings",
3
- "version": "1.1.0",
4
- "description": "A library of cross-platform tested terminal/console command strings for doing things like color and cursor positioning. This is a subset of both ansi and vt100. All control codes included work on both Windows & Unix-like OSes, except where noted.",
5
- "main": "index.js",
6
- "directories": {
7
- "test": "test"
8
- },
9
- "scripts": {
10
- "test": "standard && tap test/*.js"
11
- },
12
- "repository": {
13
- "type": "git",
14
- "url": "https://github.com/iarna/console-control-strings"
15
- },
16
- "keywords": [],
17
- "author": "Rebecca Turner <me@re-becca.org> (http://re-becca.org/)",
18
- "license": "ISC",
19
- "files": [
20
- "LICENSE",
21
- "index.js"
22
- ],
23
- "devDependencies": {
24
- "standard": "^7.1.2",
25
- "tap": "^5.7.2"
26
- }
27
- }
@@ -1,76 +0,0 @@
1
- version: 2
2
- jobs:
3
- build:
4
- working_directory: ~/repo
5
- docker:
6
- - image: circleci/node:8.11.3
7
- steps:
8
- - checkout
9
- - run:
10
- name: authorize npm
11
- command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
12
- - restore_cache:
13
- key: dependency-cache-{{ checksum "package.json" }}
14
- - run:
15
- name: run npm install
16
- command: npm install
17
- - save_cache:
18
- key: dependency-cache-{{ checksum "package.json" }}
19
- paths:
20
- - ./node_modules
21
- - run: mkdir ~/junit
22
- - run:
23
- name: build & test
24
- command: npm run ci
25
- when: always
26
- - run: cp test-results.xml ~/junit/test-results.xml
27
- - store_test_results:
28
- path: ~/junit
29
- - store_artifacts:
30
- path: ~/junit
31
-
32
- build_deploy_npm:
33
- working_directory: ~/repo
34
- docker:
35
- - image: circleci/node:8.11.3
36
- steps:
37
- - checkout
38
- - run:
39
- name: authorize npm
40
- command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
41
- - restore_cache:
42
- key: dependency-cache-{{ checksum "package.json" }}
43
- - run:
44
- name: run npm install
45
- command: npm install
46
- - save_cache:
47
- key: dependency-cache-{{ checksum "package.json" }}
48
- paths:
49
- - ./node_modules
50
- - run: mkdir ~/junit
51
- - run:
52
- name: build & test
53
- command: npm run ci
54
- when: always
55
- - run: cp test-results.xml ~/junit/test-results.xml
56
- - store_test_results:
57
- path: ~/junit
58
- - store_artifacts:
59
- path: ~/junit
60
- - run:
61
- name: publish package to npm
62
- command: npm publish
63
-
64
- workflows:
65
- version: 2
66
- build_deploy:
67
- jobs:
68
- - build:
69
- context: secrets
70
- - build_deploy_npm:
71
- context: secrets
72
- filters:
73
- tags:
74
- only: /.*/
75
- branches:
76
- ignore: /.*/
@@ -1,72 +0,0 @@
1
- {
2
- "parserOptions": {
3
- "sourceType": "module"
4
- },
5
- "env": {
6
- "node": true,
7
- "browser": true
8
- },
9
- "extends": "eslint:recommended",
10
- "rules": {
11
- "no-alert": 2,
12
- "no-array-constructor": 2,
13
- "no-caller": 2,
14
- "no-catch-shadow": 2,
15
- "no-eval": 2,
16
- "no-extend-native": 2,
17
- "no-extra-bind": 2,
18
- "no-implied-eval": 2,
19
- "no-iterator": 2,
20
- "no-label-var": 2,
21
- "no-labels": 2,
22
- "no-lone-blocks": 2,
23
- "no-loop-func": 2,
24
- "no-multi-spaces": 2,
25
- "no-multi-str": 2,
26
- "no-native-reassign": 2,
27
- "no-new": 2,
28
- "no-new-func": 2,
29
- "no-new-object": 2,
30
- "no-new-wrappers": 2,
31
- "no-octal-escape": 2,
32
- "no-process-exit": 2,
33
- "no-proto": 2,
34
- "no-return-assign": 2,
35
- "no-script-url": 2,
36
- "no-sequences": 2,
37
- "no-shadow": 2,
38
- "no-shadow-restricted-names": 2,
39
- "no-spaced-func": 2,
40
- "no-trailing-spaces": 2,
41
- "no-undef-init": 2,
42
- "no-underscore-dangle": 0,
43
- "no-unused-expressions": 2,
44
- "no-use-before-define": 2,
45
- "no-with": 2,
46
- "camelcase": 1,
47
- "comma-spacing": 2,
48
- "consistent-return": 2,
49
- "curly": [ 2, "all" ],
50
- "dot-notation": [ 2, { "allowKeywords": true } ],
51
- "eol-last": 2,
52
- "no-extra-parens": [ 2, "functions" ],
53
- "eqeqeq": 2,
54
- "keyword-spacing": [ 2, { "before": true, "after": true } ],
55
- "key-spacing": [ 2, { "beforeColon": false, "afterColon": true } ],
56
- "new-cap": 2,
57
- "new-parens": 2,
58
- "quotes": [ 2, "single" ],
59
- "semi": 2,
60
- "semi-spacing": [ 2, { "before": false, "after": true } ],
61
- "space-infix-ops": 2,
62
- "space-unary-ops": [ 2, { "words": true, "nonwords": false } ],
63
- "strict": [ 2, "global" ],
64
- "yoda": [ 2, "never" ]
65
- },
66
- "overrides": [
67
- {
68
- "files": [ "*.js", "test/*.js" ],
69
- "excludedFiles": "examples/*.js"
70
- }
71
- ]
72
- }
@@ -1,30 +0,0 @@
1
- {
2
- // Use IntelliSense to learn about possible attributes.
3
- // Hover to view descriptions of existing attributes.
4
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
- "version": "0.2.0",
6
- "configurations": [
7
- {
8
- "type": "node",
9
- "request": "launch",
10
- "name": "Launch Program",
11
- "program": "${workspaceFolder}/examples/array-change.js"
12
- },
13
- {
14
- "name": "Run mocha",
15
- "type": "node",
16
- "request": "launch",
17
- "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
18
- "stopOnEntry": false,
19
- "args": [
20
- "test/**/*.js",
21
- "--no-timeouts"
22
- ],
23
- "cwd": "${workspaceRoot}",
24
- "runtimeExecutable": null,
25
- "env": {
26
- "NODE_ENV": "testing"
27
- }
28
- }
29
- ]
30
- }
@@ -1,12 +0,0 @@
1
- {
2
- // See https://go.microsoft.com/fwlink/?LinkId=733558
3
- // for the documentation about the tasks.json format
4
- "version": "2.0.0",
5
- "tasks": [
6
- {
7
- "type": "npm",
8
- "script": "build",
9
- "problemMatcher": []
10
- }
11
- ]
12
- }