@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.
- package/.jsii +98 -57
- package/lib/alb-defaults.js +2 -3
- package/lib/alb-helper.js +8 -10
- package/lib/apigateway-defaults.d.ts +6 -6
- package/lib/apigateway-defaults.js +17 -18
- package/lib/apigateway-helper.d.ts +2 -2
- package/lib/apigateway-helper.js +14 -17
- package/lib/cloudfront-distribution-defaults.js +4 -5
- package/lib/cloudfront-distribution-helper.js +7 -9
- package/lib/cloudwatch-log-group-defaults.js +2 -3
- package/lib/cloudwatch-log-group-helper.js +3 -6
- package/lib/cognito-defaults.d.ts +2 -2
- package/lib/cognito-defaults.js +6 -6
- package/lib/cognito-helper.js +8 -11
- package/lib/dynamodb-table-defaults.d.ts +3 -3
- package/lib/dynamodb-table-defaults.js +6 -6
- package/lib/dynamodb-table-helper.js +7 -8
- package/lib/elasticache-defaults.js +3 -4
- package/lib/elasticache-helper.js +4 -5
- package/lib/elasticsearch-defaults.js +2 -3
- package/lib/elasticsearch-helper.js +7 -8
- package/lib/eventbridge-helper.d.ts +2 -2
- package/lib/eventbridge-helper.js +6 -7
- package/lib/events-rule-defaults.d.ts +1 -1
- package/lib/events-rule-defaults.js +5 -6
- package/lib/fargate-defaults.js +6 -7
- package/lib/fargate-helper.js +7 -9
- package/lib/glue-database-defaults.js +4 -5
- package/lib/glue-database-helper.js +2 -3
- package/lib/glue-job-defaults.js +2 -3
- package/lib/glue-job-helper.js +9 -9
- package/lib/glue-table-defaults.js +7 -8
- package/lib/glue-table-helper.js +3 -4
- package/lib/iot-topic-rule-defaults.d.ts +1 -1
- package/lib/iot-topic-rule-defaults.js +7 -8
- package/lib/kendra-defaults.js +2 -3
- package/lib/kendra-helper.d.ts +1 -1
- package/lib/kendra-helper.js +5 -6
- package/lib/kinesis-analytics-defaults.d.ts +2 -2
- package/lib/kinesis-analytics-defaults.js +4 -4
- package/lib/kinesis-analytics-helper.js +3 -4
- package/lib/kinesis-firehose-s3-defaults.d.ts +1 -1
- package/lib/kinesis-firehose-s3-defaults.js +8 -9
- package/lib/kinesis-streams-defaults.d.ts +2 -2
- package/lib/kinesis-streams-defaults.js +4 -4
- package/lib/kinesis-streams-helper.js +5 -7
- package/lib/kms-defaults.d.ts +2 -2
- package/lib/kms-defaults.js +4 -4
- package/lib/kms-helper.js +3 -6
- package/lib/lambda-defaults.js +2 -3
- package/lib/lambda-event-source-mapping-defaults.d.ts +3 -3
- package/lib/lambda-event-source-mapping-defaults.js +16 -17
- package/lib/lambda-helper.js +6 -7
- package/lib/mediastore-defaults.js +2 -3
- package/lib/mediastore-helper.js +4 -6
- package/lib/opensearch-defaults.js +2 -3
- package/lib/opensearch-helper.js +5 -6
- package/lib/override-warning-service.js +10 -8
- package/lib/pipes-defaults.js +5 -6
- package/lib/pipes-helper.js +7 -7
- package/lib/s3-bucket-defaults.js +3 -3
- package/lib/s3-bucket-helper.js +13 -8
- package/lib/sagemaker-defaults.js +5 -6
- package/lib/sagemaker-helper.d.ts +5 -0
- package/lib/sagemaker-helper.js +17 -17
- package/lib/secretsmanager-defaults.d.ts +2 -2
- package/lib/secretsmanager-defaults.js +4 -4
- package/lib/secretsmanager-helper.js +4 -6
- package/lib/security-group-helper.js +3 -4
- package/lib/sns-defaults.d.ts +2 -2
- package/lib/sns-defaults.js +4 -4
- package/lib/sns-helper.js +4 -5
- package/lib/sqs-defaults.js +5 -5
- package/lib/sqs-helper.d.ts +1 -1
- package/lib/sqs-helper.js +5 -6
- package/lib/ssm-string-parameter-helper.js +2 -3
- package/lib/step-function-defaults.d.ts +1 -1
- package/lib/step-function-defaults.js +4 -5
- package/lib/step-function-helper.js +5 -5
- package/lib/utils.d.ts +1 -1
- package/lib/utils.js +32 -30
- package/lib/vpc-defaults.js +4 -5
- package/lib/vpc-helper.js +6 -8
- package/lib/waf-defaults.js +4 -5
- package/lib/waf-helper.js +4 -6
- package/lib/websocket-api-helper.js +4 -6
- package/package.json +6 -5
- package/test/apigateway-helper.test.js +3 -3
- package/test/cloudfront-distribution-api-gateway-helper.test.js +11 -11
- package/test/dynamo-table.test.js +9 -9
- package/test/glue-job-helper.test.js +7 -7
- package/test/glue-table-helper.test.js +5 -5
- package/test/kinesis-analytics.test.js +2 -2
- package/test/kinesis-streams-defaults.test.js +2 -2
- package/test/lambda-event-source.test.js +10 -10
- package/test/override-warning-service.test.js +25 -26
- package/test/pipes-helper.test.js +2 -2
- package/test/step-function-helper.test.js +5 -5
- package/test/test-helper.js +16 -16
- package/test/utils.test.js +11 -12
- package/.eslintignore +0 -9
- package/node_modules/ansi-regex/index.d.ts +0 -37
- package/node_modules/ansi-regex/index.js +0 -10
- package/node_modules/ansi-regex/license +0 -9
- package/node_modules/ansi-regex/package.json +0 -55
- package/node_modules/ansi-regex/readme.md +0 -78
- package/node_modules/aproba/LICENSE +0 -14
- package/node_modules/aproba/README.md +0 -94
- package/node_modules/aproba/index.js +0 -105
- package/node_modules/aproba/package.json +0 -35
- package/node_modules/are-we-there-yet/LICENSE.md +0 -18
- package/node_modules/are-we-there-yet/README.md +0 -208
- package/node_modules/are-we-there-yet/lib/index.js +0 -4
- package/node_modules/are-we-there-yet/lib/tracker-base.js +0 -13
- package/node_modules/are-we-there-yet/lib/tracker-group.js +0 -112
- package/node_modules/are-we-there-yet/lib/tracker-stream.js +0 -42
- package/node_modules/are-we-there-yet/lib/tracker.js +0 -34
- package/node_modules/are-we-there-yet/package.json +0 -53
- package/node_modules/color-support/LICENSE +0 -15
- package/node_modules/color-support/README.md +0 -129
- package/node_modules/color-support/bin.js +0 -3
- package/node_modules/color-support/browser.js +0 -14
- package/node_modules/color-support/index.js +0 -134
- package/node_modules/color-support/package.json +0 -36
- package/node_modules/console-control-strings/LICENSE +0 -13
- package/node_modules/console-control-strings/README.md +0 -145
- package/node_modules/console-control-strings/index.js +0 -125
- package/node_modules/console-control-strings/package.json +0 -27
- package/node_modules/deep-diff/.circleci/config.yml +0 -76
- package/node_modules/deep-diff/.eslintrc +0 -72
- package/node_modules/deep-diff/.vscode/launch.json +0 -30
- package/node_modules/deep-diff/.vscode/tasks.json +0 -12
- package/node_modules/deep-diff/ChangeLog.md +0 -63
- package/node_modules/deep-diff/LICENSE +0 -7
- package/node_modules/deep-diff/Readme.md +0 -239
- package/node_modules/deep-diff/dist/deep-diff.min.js +0 -1
- package/node_modules/deep-diff/dist/deep-diff.min.js.map +0 -1
- package/node_modules/deep-diff/examples/apply-diff-from-any.js +0 -39
- package/node_modules/deep-diff/examples/array-change.js +0 -45
- package/node_modules/deep-diff/examples/capture_change_apply_elsewhere.js +0 -53
- package/node_modules/deep-diff/examples/diff-ignoring-fun.js +0 -88
- package/node_modules/deep-diff/examples/diff-scenarios.js +0 -49
- package/node_modules/deep-diff/examples/example1.js +0 -41
- package/node_modules/deep-diff/examples/issue-111.js +0 -6
- package/node_modules/deep-diff/examples/issue-113-1.js +0 -14
- package/node_modules/deep-diff/examples/issue-113-2.js +0 -11
- package/node_modules/deep-diff/examples/issue-115.js +0 -17
- package/node_modules/deep-diff/examples/issue-124.js +0 -8
- package/node_modules/deep-diff/examples/issue-125.js +0 -19
- package/node_modules/deep-diff/examples/issue-126.js +0 -33
- package/node_modules/deep-diff/examples/issue-35.js +0 -11
- package/node_modules/deep-diff/examples/issue-47.js +0 -17
- package/node_modules/deep-diff/examples/issue-48.js +0 -48
- package/node_modules/deep-diff/examples/issue-62.js +0 -14
- package/node_modules/deep-diff/examples/issue-70.js +0 -6
- package/node_modules/deep-diff/examples/issue-71.js +0 -15
- package/node_modules/deep-diff/examples/issue-72.js +0 -21
- package/node_modules/deep-diff/examples/issue-74.js +0 -9
- package/node_modules/deep-diff/examples/issue-78.js +0 -24
- package/node_modules/deep-diff/examples/issue-83.js +0 -11
- package/node_modules/deep-diff/examples/issue-88.js +0 -26
- package/node_modules/deep-diff/examples/performance.js +0 -64
- package/node_modules/deep-diff/examples/practice-data.json +0 -2501
- package/node_modules/deep-diff/index.js +0 -526
- package/node_modules/deep-diff/package.json +0 -74
- package/node_modules/deep-diff/test/.eslintrc +0 -10
- package/node_modules/deep-diff/test/tests.html +0 -34
- package/node_modules/deep-diff/test/tests.js +0 -759
- package/node_modules/deepmerge/.editorconfig +0 -7
- package/node_modules/deepmerge/.eslintcache +0 -1
- package/node_modules/deepmerge/changelog.md +0 -167
- package/node_modules/deepmerge/dist/cjs.js +0 -133
- package/node_modules/deepmerge/dist/umd.js +0 -139
- package/node_modules/deepmerge/index.d.ts +0 -20
- package/node_modules/deepmerge/index.js +0 -106
- package/node_modules/deepmerge/license.txt +0 -21
- package/node_modules/deepmerge/package.json +0 -42
- package/node_modules/deepmerge/readme.md +0 -264
- package/node_modules/deepmerge/rollup.config.js +0 -22
- package/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
- package/node_modules/emoji-regex/README.md +0 -73
- package/node_modules/emoji-regex/es2015/index.js +0 -6
- package/node_modules/emoji-regex/es2015/text.js +0 -6
- package/node_modules/emoji-regex/index.d.ts +0 -23
- package/node_modules/emoji-regex/index.js +0 -6
- package/node_modules/emoji-regex/package.json +0 -50
- package/node_modules/emoji-regex/text.js +0 -6
- package/node_modules/gauge/LICENSE.md +0 -20
- package/node_modules/gauge/README.md +0 -402
- package/node_modules/gauge/lib/base-theme.js +0 -18
- package/node_modules/gauge/lib/error.js +0 -24
- package/node_modules/gauge/lib/has-color.js +0 -4
- package/node_modules/gauge/lib/index.js +0 -289
- package/node_modules/gauge/lib/plumbing.js +0 -50
- package/node_modules/gauge/lib/process.js +0 -3
- package/node_modules/gauge/lib/progress-bar.js +0 -41
- package/node_modules/gauge/lib/render-template.js +0 -222
- package/node_modules/gauge/lib/set-immediate.js +0 -7
- package/node_modules/gauge/lib/set-interval.js +0 -3
- package/node_modules/gauge/lib/spin.js +0 -5
- package/node_modules/gauge/lib/template-item.js +0 -87
- package/node_modules/gauge/lib/theme-set.js +0 -122
- package/node_modules/gauge/lib/themes.js +0 -56
- package/node_modules/gauge/lib/wide-truncate.js +0 -31
- package/node_modules/gauge/package.json +0 -68
- package/node_modules/has-unicode/LICENSE +0 -14
- package/node_modules/has-unicode/README.md +0 -43
- package/node_modules/has-unicode/index.js +0 -16
- package/node_modules/has-unicode/package.json +0 -30
- package/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
- package/node_modules/is-fullwidth-code-point/index.js +0 -50
- package/node_modules/is-fullwidth-code-point/license +0 -9
- package/node_modules/is-fullwidth-code-point/package.json +0 -42
- package/node_modules/is-fullwidth-code-point/readme.md +0 -39
- package/node_modules/npmlog/LICENSE.md +0 -20
- package/node_modules/npmlog/README.md +0 -216
- package/node_modules/npmlog/lib/log.js +0 -400
- package/node_modules/npmlog/package.json +0 -52
- package/node_modules/set-blocking/LICENSE.txt +0 -14
- package/node_modules/set-blocking/README.md +0 -31
- package/node_modules/set-blocking/index.js +0 -7
- package/node_modules/set-blocking/package.json +0 -42
- package/node_modules/signal-exit/LICENSE.txt +0 -16
- package/node_modules/signal-exit/README.md +0 -74
- package/node_modules/signal-exit/dist/cjs/browser.d.ts +0 -12
- package/node_modules/signal-exit/dist/cjs/browser.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/cjs/browser.js +0 -10
- package/node_modules/signal-exit/dist/cjs/browser.js.map +0 -1
- package/node_modules/signal-exit/dist/cjs/index.d.ts +0 -48
- package/node_modules/signal-exit/dist/cjs/index.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/cjs/index.js +0 -279
- package/node_modules/signal-exit/dist/cjs/index.js.map +0 -1
- package/node_modules/signal-exit/dist/cjs/package.json +0 -3
- package/node_modules/signal-exit/dist/cjs/signals.d.ts +0 -29
- package/node_modules/signal-exit/dist/cjs/signals.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/cjs/signals.js +0 -42
- package/node_modules/signal-exit/dist/cjs/signals.js.map +0 -1
- package/node_modules/signal-exit/dist/mjs/browser.d.ts +0 -12
- package/node_modules/signal-exit/dist/mjs/browser.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/mjs/browser.js +0 -4
- package/node_modules/signal-exit/dist/mjs/browser.js.map +0 -1
- package/node_modules/signal-exit/dist/mjs/index.d.ts +0 -48
- package/node_modules/signal-exit/dist/mjs/index.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/mjs/index.js +0 -275
- package/node_modules/signal-exit/dist/mjs/index.js.map +0 -1
- package/node_modules/signal-exit/dist/mjs/package.json +0 -3
- package/node_modules/signal-exit/dist/mjs/signals.d.ts +0 -29
- package/node_modules/signal-exit/dist/mjs/signals.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/mjs/signals.js +0 -39
- package/node_modules/signal-exit/dist/mjs/signals.js.map +0 -1
- package/node_modules/signal-exit/package.json +0 -106
- package/node_modules/string-width/index.d.ts +0 -29
- package/node_modules/string-width/index.js +0 -47
- package/node_modules/string-width/license +0 -9
- package/node_modules/string-width/package.json +0 -56
- package/node_modules/string-width/readme.md +0 -50
- package/node_modules/strip-ansi/index.d.ts +0 -17
- package/node_modules/strip-ansi/index.js +0 -4
- package/node_modules/strip-ansi/license +0 -9
- package/node_modules/strip-ansi/package.json +0 -54
- package/node_modules/strip-ansi/readme.md +0 -46
- package/node_modules/wide-align/LICENSE +0 -14
- package/node_modules/wide-align/README.md +0 -47
- package/node_modules/wide-align/align.js +0 -65
- package/node_modules/wide-align/package.json +0 -33
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
module.exports = function () {
|
|
4
|
-
return ThemeSetProto.newThemeSet()
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
var ThemeSetProto = {}
|
|
8
|
-
|
|
9
|
-
ThemeSetProto.baseTheme = require('./base-theme.js')
|
|
10
|
-
|
|
11
|
-
ThemeSetProto.newTheme = function (parent, theme) {
|
|
12
|
-
if (!theme) {
|
|
13
|
-
theme = parent
|
|
14
|
-
parent = this.baseTheme
|
|
15
|
-
}
|
|
16
|
-
return Object.assign({}, parent, theme)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
ThemeSetProto.getThemeNames = function () {
|
|
20
|
-
return Object.keys(this.themes)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
ThemeSetProto.addTheme = function (name, parent, theme) {
|
|
24
|
-
this.themes[name] = this.newTheme(parent, theme)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
ThemeSetProto.addToAllThemes = function (theme) {
|
|
28
|
-
var themes = this.themes
|
|
29
|
-
Object.keys(themes).forEach(function (name) {
|
|
30
|
-
Object.assign(themes[name], theme)
|
|
31
|
-
})
|
|
32
|
-
Object.assign(this.baseTheme, theme)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
ThemeSetProto.getTheme = function (name) {
|
|
36
|
-
if (!this.themes[name]) {
|
|
37
|
-
throw this.newMissingThemeError(name)
|
|
38
|
-
}
|
|
39
|
-
return this.themes[name]
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
ThemeSetProto.setDefault = function (opts, name) {
|
|
43
|
-
if (name == null) {
|
|
44
|
-
name = opts
|
|
45
|
-
opts = {}
|
|
46
|
-
}
|
|
47
|
-
var platform = opts.platform == null ? 'fallback' : opts.platform
|
|
48
|
-
var hasUnicode = !!opts.hasUnicode
|
|
49
|
-
var hasColor = !!opts.hasColor
|
|
50
|
-
if (!this.defaults[platform]) {
|
|
51
|
-
this.defaults[platform] = { true: {}, false: {} }
|
|
52
|
-
}
|
|
53
|
-
this.defaults[platform][hasUnicode][hasColor] = name
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
ThemeSetProto.getDefault = function (opts) {
|
|
57
|
-
if (!opts) {
|
|
58
|
-
opts = {}
|
|
59
|
-
}
|
|
60
|
-
var platformName = opts.platform || process.platform
|
|
61
|
-
var platform = this.defaults[platformName] || this.defaults.fallback
|
|
62
|
-
var hasUnicode = !!opts.hasUnicode
|
|
63
|
-
var hasColor = !!opts.hasColor
|
|
64
|
-
if (!platform) {
|
|
65
|
-
throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor)
|
|
66
|
-
}
|
|
67
|
-
if (!platform[hasUnicode][hasColor]) {
|
|
68
|
-
if (hasUnicode && hasColor && platform[!hasUnicode][hasColor]) {
|
|
69
|
-
hasUnicode = false
|
|
70
|
-
} else if (hasUnicode && hasColor && platform[hasUnicode][!hasColor]) {
|
|
71
|
-
hasColor = false
|
|
72
|
-
} else if (hasUnicode && hasColor && platform[!hasUnicode][!hasColor]) {
|
|
73
|
-
hasUnicode = false
|
|
74
|
-
hasColor = false
|
|
75
|
-
} else if (hasUnicode && !hasColor && platform[!hasUnicode][hasColor]) {
|
|
76
|
-
hasUnicode = false
|
|
77
|
-
} else if (!hasUnicode && hasColor && platform[hasUnicode][!hasColor]) {
|
|
78
|
-
hasColor = false
|
|
79
|
-
} else if (platform === this.defaults.fallback) {
|
|
80
|
-
throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor)
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
if (platform[hasUnicode][hasColor]) {
|
|
84
|
-
return this.getTheme(platform[hasUnicode][hasColor])
|
|
85
|
-
} else {
|
|
86
|
-
return this.getDefault(Object.assign({}, opts, { platform: 'fallback' }))
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
ThemeSetProto.newMissingThemeError = function newMissingThemeError (name) {
|
|
91
|
-
var err = new Error('Could not find a gauge theme named "' + name + '"')
|
|
92
|
-
Error.captureStackTrace.call(err, newMissingThemeError)
|
|
93
|
-
err.theme = name
|
|
94
|
-
err.code = 'EMISSINGTHEME'
|
|
95
|
-
return err
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
ThemeSetProto.newMissingDefaultThemeError =
|
|
99
|
-
function newMissingDefaultThemeError (platformName, hasUnicode, hasColor) {
|
|
100
|
-
var err = new Error(
|
|
101
|
-
'Could not find a gauge theme for your platform/unicode/color use combo:\n' +
|
|
102
|
-
' platform = ' + platformName + '\n' +
|
|
103
|
-
' hasUnicode = ' + hasUnicode + '\n' +
|
|
104
|
-
' hasColor = ' + hasColor)
|
|
105
|
-
Error.captureStackTrace.call(err, newMissingDefaultThemeError)
|
|
106
|
-
err.platform = platformName
|
|
107
|
-
err.hasUnicode = hasUnicode
|
|
108
|
-
err.hasColor = hasColor
|
|
109
|
-
err.code = 'EMISSINGTHEME'
|
|
110
|
-
return err
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
ThemeSetProto.newThemeSet = function () {
|
|
114
|
-
var themeset = function (opts) {
|
|
115
|
-
return themeset.getDefault(opts)
|
|
116
|
-
}
|
|
117
|
-
return Object.assign(themeset, ThemeSetProto, {
|
|
118
|
-
themes: Object.assign({}, this.themes),
|
|
119
|
-
baseTheme: Object.assign({}, this.baseTheme),
|
|
120
|
-
defaults: JSON.parse(JSON.stringify(this.defaults || {})),
|
|
121
|
-
})
|
|
122
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
var color = require('console-control-strings').color
|
|
3
|
-
var ThemeSet = require('./theme-set.js')
|
|
4
|
-
|
|
5
|
-
var themes = module.exports = new ThemeSet()
|
|
6
|
-
|
|
7
|
-
themes.addTheme('ASCII', {
|
|
8
|
-
preProgressbar: '[',
|
|
9
|
-
postProgressbar: ']',
|
|
10
|
-
progressbarTheme: {
|
|
11
|
-
complete: '#',
|
|
12
|
-
remaining: '.',
|
|
13
|
-
},
|
|
14
|
-
activityIndicatorTheme: '-\\|/',
|
|
15
|
-
preSubsection: '>',
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
themes.addTheme('colorASCII', themes.getTheme('ASCII'), {
|
|
19
|
-
progressbarTheme: {
|
|
20
|
-
preComplete: color('bgBrightWhite', 'brightWhite'),
|
|
21
|
-
complete: '#',
|
|
22
|
-
postComplete: color('reset'),
|
|
23
|
-
preRemaining: color('bgBrightBlack', 'brightBlack'),
|
|
24
|
-
remaining: '.',
|
|
25
|
-
postRemaining: color('reset'),
|
|
26
|
-
},
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
themes.addTheme('brailleSpinner', {
|
|
30
|
-
preProgressbar: '(',
|
|
31
|
-
postProgressbar: ')',
|
|
32
|
-
progressbarTheme: {
|
|
33
|
-
complete: '#',
|
|
34
|
-
remaining: '⠂',
|
|
35
|
-
},
|
|
36
|
-
activityIndicatorTheme: '⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏',
|
|
37
|
-
preSubsection: '>',
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
themes.addTheme('colorBrailleSpinner', themes.getTheme('brailleSpinner'), {
|
|
41
|
-
progressbarTheme: {
|
|
42
|
-
preComplete: color('bgBrightWhite', 'brightWhite'),
|
|
43
|
-
complete: '#',
|
|
44
|
-
postComplete: color('reset'),
|
|
45
|
-
preRemaining: color('bgBrightBlack', 'brightBlack'),
|
|
46
|
-
remaining: '⠂',
|
|
47
|
-
postRemaining: color('reset'),
|
|
48
|
-
},
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
themes.setDefault({}, 'ASCII')
|
|
52
|
-
themes.setDefault({ hasColor: true }, 'colorASCII')
|
|
53
|
-
themes.setDefault({ platform: 'darwin', hasUnicode: true }, 'brailleSpinner')
|
|
54
|
-
themes.setDefault({ platform: 'darwin', hasUnicode: true, hasColor: true }, 'colorBrailleSpinner')
|
|
55
|
-
themes.setDefault({ platform: 'linux', hasUnicode: true }, 'brailleSpinner')
|
|
56
|
-
themes.setDefault({ platform: 'linux', hasUnicode: true, hasColor: true }, 'colorBrailleSpinner')
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
var stringWidth = require('string-width')
|
|
3
|
-
var stripAnsi = require('strip-ansi')
|
|
4
|
-
|
|
5
|
-
module.exports = wideTruncate
|
|
6
|
-
|
|
7
|
-
function wideTruncate (str, target) {
|
|
8
|
-
if (stringWidth(str) === 0) {
|
|
9
|
-
return str
|
|
10
|
-
}
|
|
11
|
-
if (target <= 0) {
|
|
12
|
-
return ''
|
|
13
|
-
}
|
|
14
|
-
if (stringWidth(str) <= target) {
|
|
15
|
-
return str
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// We compute the number of bytes of ansi sequences here and add
|
|
19
|
-
// that to our initial truncation to ensure that we don't slice one
|
|
20
|
-
// that we want to keep in half.
|
|
21
|
-
var noAnsi = stripAnsi(str)
|
|
22
|
-
var ansiSize = str.length + noAnsi.length
|
|
23
|
-
var truncated = str.slice(0, target + ansiSize)
|
|
24
|
-
|
|
25
|
-
// we have to shrink the result to account for our ansi sequence buffer
|
|
26
|
-
// (if an ansi sequence was truncated) and double width characters.
|
|
27
|
-
while (stringWidth(truncated) > target) {
|
|
28
|
-
truncated = truncated.slice(0, -1)
|
|
29
|
-
}
|
|
30
|
-
return truncated
|
|
31
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "gauge",
|
|
3
|
-
"version": "5.0.2",
|
|
4
|
-
"description": "A terminal based horizontal gauge",
|
|
5
|
-
"main": "lib",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "tap",
|
|
8
|
-
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
|
|
9
|
-
"postlint": "template-oss-check",
|
|
10
|
-
"lintfix": "npm run lint -- --fix",
|
|
11
|
-
"snap": "tap",
|
|
12
|
-
"posttest": "npm run lint",
|
|
13
|
-
"template-oss-apply": "template-oss-apply --force"
|
|
14
|
-
},
|
|
15
|
-
"repository": {
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "git+https://github.com/npm/gauge.git"
|
|
18
|
-
},
|
|
19
|
-
"keywords": [
|
|
20
|
-
"progressbar",
|
|
21
|
-
"progress",
|
|
22
|
-
"gauge"
|
|
23
|
-
],
|
|
24
|
-
"author": "GitHub Inc.",
|
|
25
|
-
"license": "ISC",
|
|
26
|
-
"bugs": {
|
|
27
|
-
"url": "https://github.com/npm/gauge/issues"
|
|
28
|
-
},
|
|
29
|
-
"homepage": "https://github.com/npm/gauge",
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"aproba": "^1.0.3 || ^2.0.0",
|
|
32
|
-
"color-support": "^1.1.3",
|
|
33
|
-
"console-control-strings": "^1.1.0",
|
|
34
|
-
"has-unicode": "^2.0.1",
|
|
35
|
-
"signal-exit": "^4.0.1",
|
|
36
|
-
"string-width": "^4.2.3",
|
|
37
|
-
"strip-ansi": "^6.0.1",
|
|
38
|
-
"wide-align": "^1.1.5"
|
|
39
|
-
},
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"@npmcli/eslint-config": "^4.0.0",
|
|
42
|
-
"@npmcli/template-oss": "4.22.0",
|
|
43
|
-
"readable-stream": "^4.0.0",
|
|
44
|
-
"tap": "^16.0.1"
|
|
45
|
-
},
|
|
46
|
-
"files": [
|
|
47
|
-
"bin/",
|
|
48
|
-
"lib/"
|
|
49
|
-
],
|
|
50
|
-
"engines": {
|
|
51
|
-
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
|
|
52
|
-
},
|
|
53
|
-
"tap": {
|
|
54
|
-
"branches": 79,
|
|
55
|
-
"statements": 89,
|
|
56
|
-
"functions": 92,
|
|
57
|
-
"lines": 90,
|
|
58
|
-
"nyc-arg": [
|
|
59
|
-
"--exclude",
|
|
60
|
-
"tap-snapshots/**"
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
|
-
"templateOSS": {
|
|
64
|
-
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
|
65
|
-
"version": "4.22.0",
|
|
66
|
-
"publish": "true"
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1,14 +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.
|
|
14
|
-
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
has-unicode
|
|
2
|
-
===========
|
|
3
|
-
|
|
4
|
-
Try to guess if your terminal supports unicode
|
|
5
|
-
|
|
6
|
-
```javascript
|
|
7
|
-
var hasUnicode = require("has-unicode")
|
|
8
|
-
|
|
9
|
-
if (hasUnicode()) {
|
|
10
|
-
// the terminal probably has unicode support
|
|
11
|
-
}
|
|
12
|
-
```
|
|
13
|
-
```javascript
|
|
14
|
-
var hasUnicode = require("has-unicode").tryHarder
|
|
15
|
-
hasUnicode(function(unicodeSupported) {
|
|
16
|
-
if (unicodeSupported) {
|
|
17
|
-
// the terminal probably has unicode support
|
|
18
|
-
}
|
|
19
|
-
})
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Detecting Unicode
|
|
23
|
-
|
|
24
|
-
What we actually detect is UTF-8 support, as that's what Node itself supports.
|
|
25
|
-
If you have a UTF-16 locale then you won't be detected as unicode capable.
|
|
26
|
-
|
|
27
|
-
### Windows
|
|
28
|
-
|
|
29
|
-
Since at least Windows 7, `cmd` and `powershell` have been unicode capable,
|
|
30
|
-
but unfortunately even then it's not guaranteed. In many localizations it
|
|
31
|
-
still uses legacy code pages and there's no facility short of running
|
|
32
|
-
programs or linking C++ that will let us detect this. As such, we
|
|
33
|
-
report any Windows installation as NOT unicode capable, and recommend
|
|
34
|
-
that you encourage your users to override this via config.
|
|
35
|
-
|
|
36
|
-
### Unix Like Operating Systems
|
|
37
|
-
|
|
38
|
-
We look at the environment variables `LC_ALL`, `LC_CTYPE`, and `LANG` in
|
|
39
|
-
that order. For `LC_ALL` and `LANG`, it looks for `.UTF-8` in the value.
|
|
40
|
-
For `LC_CTYPE` it looks to see if the value is `UTF-8`. This is sufficient
|
|
41
|
-
for most POSIX systems. While locale data can be put in `/etc/locale.conf`
|
|
42
|
-
as well, AFAIK it's always copied into the environment.
|
|
43
|
-
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict"
|
|
2
|
-
var os = require("os")
|
|
3
|
-
|
|
4
|
-
var hasUnicode = module.exports = function () {
|
|
5
|
-
// Recent Win32 platforms (>XP) CAN support unicode in the console but
|
|
6
|
-
// don't have to, and in non-english locales often use traditional local
|
|
7
|
-
// code pages. There's no way, short of windows system calls or execing
|
|
8
|
-
// the chcp command line program to figure this out. As such, we default
|
|
9
|
-
// this to false and encourage your users to override it via config if
|
|
10
|
-
// appropriate.
|
|
11
|
-
if (os.type() == "Windows_NT") { return false }
|
|
12
|
-
|
|
13
|
-
var isUTF8 = /UTF-?8$/i
|
|
14
|
-
var ctype = process.env.LC_ALL || process.env.LC_CTYPE || process.env.LANG
|
|
15
|
-
return isUTF8.test(ctype)
|
|
16
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "has-unicode",
|
|
3
|
-
"version": "2.0.1",
|
|
4
|
-
"description": "Try to guess if your terminal supports unicode",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "tap test/*.js"
|
|
8
|
-
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "https://github.com/iarna/has-unicode"
|
|
12
|
-
},
|
|
13
|
-
"keywords": [
|
|
14
|
-
"unicode",
|
|
15
|
-
"terminal"
|
|
16
|
-
],
|
|
17
|
-
"files": [
|
|
18
|
-
"index.js"
|
|
19
|
-
],
|
|
20
|
-
"author": "Rebecca Turner <me@re-becca.org>",
|
|
21
|
-
"license": "ISC",
|
|
22
|
-
"bugs": {
|
|
23
|
-
"url": "https://github.com/iarna/has-unicode/issues"
|
|
24
|
-
},
|
|
25
|
-
"homepage": "https://github.com/iarna/has-unicode",
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"require-inject": "^1.3.0",
|
|
28
|
-
"tap": "^2.3.1"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms).
|
|
3
|
-
|
|
4
|
-
@param codePoint - The [code point](https://en.wikipedia.org/wiki/Code_point) of a character.
|
|
5
|
-
|
|
6
|
-
@example
|
|
7
|
-
```
|
|
8
|
-
import isFullwidthCodePoint from 'is-fullwidth-code-point';
|
|
9
|
-
|
|
10
|
-
isFullwidthCodePoint('谢'.codePointAt(0));
|
|
11
|
-
//=> true
|
|
12
|
-
|
|
13
|
-
isFullwidthCodePoint('a'.codePointAt(0));
|
|
14
|
-
//=> false
|
|
15
|
-
```
|
|
16
|
-
*/
|
|
17
|
-
export default function isFullwidthCodePoint(codePoint: number): boolean;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/* eslint-disable yoda */
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
const isFullwidthCodePoint = codePoint => {
|
|
5
|
-
if (Number.isNaN(codePoint)) {
|
|
6
|
-
return false;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
// Code points are derived from:
|
|
10
|
-
// http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
|
|
11
|
-
if (
|
|
12
|
-
codePoint >= 0x1100 && (
|
|
13
|
-
codePoint <= 0x115F || // Hangul Jamo
|
|
14
|
-
codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET
|
|
15
|
-
codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET
|
|
16
|
-
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
17
|
-
(0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) ||
|
|
18
|
-
// Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
19
|
-
(0x3250 <= codePoint && codePoint <= 0x4DBF) ||
|
|
20
|
-
// CJK Unified Ideographs .. Yi Radicals
|
|
21
|
-
(0x4E00 <= codePoint && codePoint <= 0xA4C6) ||
|
|
22
|
-
// Hangul Jamo Extended-A
|
|
23
|
-
(0xA960 <= codePoint && codePoint <= 0xA97C) ||
|
|
24
|
-
// Hangul Syllables
|
|
25
|
-
(0xAC00 <= codePoint && codePoint <= 0xD7A3) ||
|
|
26
|
-
// CJK Compatibility Ideographs
|
|
27
|
-
(0xF900 <= codePoint && codePoint <= 0xFAFF) ||
|
|
28
|
-
// Vertical Forms
|
|
29
|
-
(0xFE10 <= codePoint && codePoint <= 0xFE19) ||
|
|
30
|
-
// CJK Compatibility Forms .. Small Form Variants
|
|
31
|
-
(0xFE30 <= codePoint && codePoint <= 0xFE6B) ||
|
|
32
|
-
// Halfwidth and Fullwidth Forms
|
|
33
|
-
(0xFF01 <= codePoint && codePoint <= 0xFF60) ||
|
|
34
|
-
(0xFFE0 <= codePoint && codePoint <= 0xFFE6) ||
|
|
35
|
-
// Kana Supplement
|
|
36
|
-
(0x1B000 <= codePoint && codePoint <= 0x1B001) ||
|
|
37
|
-
// Enclosed Ideographic Supplement
|
|
38
|
-
(0x1F200 <= codePoint && codePoint <= 0x1F251) ||
|
|
39
|
-
// CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
40
|
-
(0x20000 <= codePoint && codePoint <= 0x3FFFD)
|
|
41
|
-
)
|
|
42
|
-
) {
|
|
43
|
-
return true;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return false;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
module.exports = isFullwidthCodePoint;
|
|
50
|
-
module.exports.default = isFullwidthCodePoint;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
-
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "is-fullwidth-code-point",
|
|
3
|
-
"version": "3.0.0",
|
|
4
|
-
"description": "Check if the character represented by a given Unicode code point is fullwidth",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": "sindresorhus/is-fullwidth-code-point",
|
|
7
|
-
"author": {
|
|
8
|
-
"name": "Sindre Sorhus",
|
|
9
|
-
"email": "sindresorhus@gmail.com",
|
|
10
|
-
"url": "sindresorhus.com"
|
|
11
|
-
},
|
|
12
|
-
"engines": {
|
|
13
|
-
"node": ">=8"
|
|
14
|
-
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"test": "xo && ava && tsd-check"
|
|
17
|
-
},
|
|
18
|
-
"files": [
|
|
19
|
-
"index.js",
|
|
20
|
-
"index.d.ts"
|
|
21
|
-
],
|
|
22
|
-
"keywords": [
|
|
23
|
-
"fullwidth",
|
|
24
|
-
"full-width",
|
|
25
|
-
"full",
|
|
26
|
-
"width",
|
|
27
|
-
"unicode",
|
|
28
|
-
"character",
|
|
29
|
-
"string",
|
|
30
|
-
"codepoint",
|
|
31
|
-
"code",
|
|
32
|
-
"point",
|
|
33
|
-
"is",
|
|
34
|
-
"detect",
|
|
35
|
-
"check"
|
|
36
|
-
],
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"ava": "^1.3.1",
|
|
39
|
-
"tsd-check": "^0.5.0",
|
|
40
|
-
"xo": "^0.24.0"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# is-fullwidth-code-point [](https://travis-ci.org/sindresorhus/is-fullwidth-code-point)
|
|
2
|
-
|
|
3
|
-
> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Install
|
|
7
|
-
|
|
8
|
-
```
|
|
9
|
-
$ npm install is-fullwidth-code-point
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```js
|
|
16
|
-
const isFullwidthCodePoint = require('is-fullwidth-code-point');
|
|
17
|
-
|
|
18
|
-
isFullwidthCodePoint('谢'.codePointAt(0));
|
|
19
|
-
//=> true
|
|
20
|
-
|
|
21
|
-
isFullwidthCodePoint('a'.codePointAt(0));
|
|
22
|
-
//=> false
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
## API
|
|
27
|
-
|
|
28
|
-
### isFullwidthCodePoint(codePoint)
|
|
29
|
-
|
|
30
|
-
#### codePoint
|
|
31
|
-
|
|
32
|
-
Type: `number`
|
|
33
|
-
|
|
34
|
-
The [code point](https://en.wikipedia.org/wiki/Code_point) of a character.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
## License
|
|
38
|
-
|
|
39
|
-
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<!-- This file is automatically added by @npmcli/template-oss. Do not edit. -->
|
|
2
|
-
|
|
3
|
-
ISC License
|
|
4
|
-
|
|
5
|
-
Copyright npm, Inc.
|
|
6
|
-
|
|
7
|
-
Permission to use, copy, modify, and/or distribute this
|
|
8
|
-
software for any purpose with or without fee is hereby
|
|
9
|
-
granted, provided that the above copyright notice and this
|
|
10
|
-
permission notice appear in all copies.
|
|
11
|
-
|
|
12
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL
|
|
13
|
-
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
|
14
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
|
|
15
|
-
EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
17
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
18
|
-
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
19
|
-
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
|
|
20
|
-
USE OR PERFORMANCE OF THIS SOFTWARE.
|