@zuplo/cli 6.69.0 → 6.69.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 (40) hide show
  1. package/dist/common/api/lib.d.ts +6 -1
  2. package/dist/common/api/lib.d.ts.map +1 -1
  3. package/dist/common/api/lib.js.map +1 -1
  4. package/dist/common/utils/pretty-print-environment-prompt.d.ts.map +1 -1
  5. package/dist/common/utils/pretty-print-environment-prompt.js +9 -15
  6. package/dist/common/utils/pretty-print-environment-prompt.js.map +1 -1
  7. package/dist/common/utils/pretty-print-environment-prompt.test.d.ts +2 -0
  8. package/dist/common/utils/pretty-print-environment-prompt.test.d.ts.map +1 -0
  9. package/dist/common/utils/pretty-print-environment-prompt.test.js +44 -0
  10. package/dist/common/utils/pretty-print-environment-prompt.test.js.map +1 -0
  11. package/dist/tsconfig.tsbuildinfo +1 -1
  12. package/node_modules/@zuplo/core/package.json +1 -1
  13. package/node_modules/@zuplo/graphql/package.json +1 -1
  14. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  15. package/node_modules/@zuplo/otel/package.json +1 -1
  16. package/node_modules/@zuplo/runtime/package.json +1 -1
  17. package/package.json +6 -10
  18. package/node_modules/as-table/.babelrc +0 -3
  19. package/node_modules/as-table/.eslintrc +0 -6
  20. package/node_modules/as-table/.travis.yml +0 -24
  21. package/node_modules/as-table/CHANGELOG.md +0 -3
  22. package/node_modules/as-table/LICENSE +0 -21
  23. package/node_modules/as-table/README.md +0 -113
  24. package/node_modules/as-table/as-table.d.ts +0 -32
  25. package/node_modules/as-table/as-table.js +0 -89
  26. package/node_modules/as-table/build/as-table.js +0 -86
  27. package/node_modules/as-table/package.json +0 -67
  28. package/node_modules/as-table/test.js +0 -223
  29. package/node_modules/printable-characters/.babelrc +0 -3
  30. package/node_modules/printable-characters/.eslintrc +0 -6
  31. package/node_modules/printable-characters/.gitattributes +0 -2
  32. package/node_modules/printable-characters/.npmignore +0 -8
  33. package/node_modules/printable-characters/.travis.yml +0 -24
  34. package/node_modules/printable-characters/CHANGELOG.md +0 -1
  35. package/node_modules/printable-characters/LICENSE +0 -24
  36. package/node_modules/printable-characters/README.md +0 -88
  37. package/node_modules/printable-characters/build/printable-characters.js +0 -53
  38. package/node_modules/printable-characters/package.json +0 -72
  39. package/node_modules/printable-characters/printable-characters.js +0 -44
  40. package/node_modules/printable-characters/test.js +0 -77
@@ -1,72 +0,0 @@
1
- {
2
- "name": "printable-characters",
3
- "version": "1.0.42",
4
- "description": "A little helper for handling strings containing zero width control characters, ANSI styling, whitespaces, newlines, 💩, etc.",
5
- "main": "./build/printable-characters.js",
6
- "scripts": {
7
- "lint": "eslint printable-characters.js",
8
- "lint-test": "eslint printable-characters.js",
9
- "babel": "babel printable-characters.js --source-maps inline --out-file ./build/printable-characters.js",
10
- "build": "npm run lint && npm run lint-test && npm run babel",
11
- "test": "npm run build && env PRINTABLE_CHARACTERS_TEST_FILE=./build/printable-characters.js nyc --reporter=html --reporter=text mocha --reporter spec",
12
- "autotest": "env PRINTABLE_CHARACTERS_TEST_FILE=./printable-characters.js mocha --reporter spec --watch",
13
- "coveralls": "nyc report --reporter=text-lcov | coveralls"
14
- },
15
- "repository": {
16
- "type": "git",
17
- "url": "https://github.com/xpl/printable-characters.git"
18
- },
19
- "keywords": [
20
- "string width",
21
- "string length",
22
- "real string width",
23
- "real string length",
24
- "optical string width",
25
- "printed width",
26
- "unicode",
27
- "codepoints",
28
- "code points",
29
- "strlen",
30
- "zero width",
31
- "zero width symbols",
32
- "zero width characters",
33
- "visible characters",
34
- "visible symbols",
35
- "visible",
36
- "invisible",
37
- "invisible symbols",
38
- "invisible characters",
39
- "printable",
40
- "printable length",
41
- "printable symbols",
42
- "printable characters",
43
- "non-printable characters",
44
- "nonprintable characters",
45
- "characters",
46
- "symbols",
47
- "string length",
48
- "real string length",
49
- "string trimming",
50
- "trimming",
51
- "escapes",
52
- "escape codes",
53
- "codes",
54
- "ansi escapes",
55
- "tokenizing",
56
- "ansi",
57
- "whitespaces"
58
- ],
59
- "author": "Vitaly Gordon <rocket.mind@gmail.com>",
60
- "license": "Unlicense",
61
- "homepage": "https://github.com/xpl/printable-characters",
62
- "devDependencies": {
63
- "babel-cli": "^6.26.0",
64
- "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0",
65
- "babel-plugin-transform-es2015-destructuring": "^6.23.0",
66
- "coveralls": "^2.13.3",
67
- "eslint": "^4.8.0",
68
- "istanbul": "^0.4.5",
69
- "mocha": "^3.5.3",
70
- "nyc": "^11.2.1"
71
- }
72
- }
@@ -1,44 +0,0 @@
1
- "use strict";
2
-
3
- const ansiEscapeCode = '[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]'
4
- , zeroWidthCharacterExceptNewline = '\u0000-\u0008\u000B-\u0019\u001b\u009b\u00ad\u200b\u2028\u2029\ufeff\ufe00-\ufe0f'
5
- , zeroWidthCharacter = '\n' + zeroWidthCharacterExceptNewline
6
- , zeroWidthCharactersExceptNewline = new RegExp ('(?:' + ansiEscapeCode + ')|[' + zeroWidthCharacterExceptNewline + ']', 'g')
7
- , zeroWidthCharacters = new RegExp ('(?:' + ansiEscapeCode + ')|[' + zeroWidthCharacter + ']', 'g')
8
- , partition = new RegExp ('((?:' + ansiEscapeCode + ')|[\t' + zeroWidthCharacter + '])?([^\t' + zeroWidthCharacter + ']*)', 'g')
9
-
10
- module.exports = {
11
-
12
- zeroWidthCharacters,
13
-
14
- ansiEscapeCodes: new RegExp (ansiEscapeCode, 'g'),
15
-
16
- strlen: s => Array.from (s.replace (zeroWidthCharacters, '')).length, // Array.from solves the emoji problem as described here: http://blog.jonnew.com/posts/poo-dot-length-equals-two
17
-
18
- isBlank: s => s.replace (zeroWidthCharacters, '')
19
- .replace (/\s/g, '')
20
- .length === 0,
21
-
22
- blank: s => Array.from (s.replace (zeroWidthCharactersExceptNewline, '')) // Array.from solves the emoji problem as described here: http://blog.jonnew.com/posts/poo-dot-length-equals-two
23
- .map (x => ((x === '\t') || (x === '\n')) ? x : ' ')
24
- .join (''),
25
-
26
- partition (s) {
27
- for (var m, spans = []; (partition.lastIndex !== s.length) && (m = partition.exec (s));) { spans.push ([m[1] || '', m[2]]) }
28
- partition.lastIndex = 0 // reset
29
- return spans
30
- },
31
-
32
- first (s, n) {
33
-
34
- let result = '', length = 0
35
-
36
- for (const [nonPrintable, printable] of module.exports.partition (s)) {
37
- const text = Array.from (printable).slice (0, n - length) // Array.from solves the emoji problem as described here: http://blog.jonnew.com/posts/poo-dot-length-equals-two
38
- result += nonPrintable + text.join ('')
39
- length += text.length
40
- }
41
-
42
- return result
43
- }
44
- }
@@ -1,77 +0,0 @@
1
- "use strict";
2
-
3
- const assert = require ('assert')
4
- const printableCharacters = require (process.env.PRINTABLE_CHARACTERS_TEST_FILE)
5
-
6
- // cannot use spread operator in tests due to Node v4 compatibility requirements...
7
- const strlen = printableCharacters.strlen
8
- , isBlank = printableCharacters.isBlank
9
- , blank = printableCharacters.blank
10
- , ansiEscapeCodes = printableCharacters.ansiEscapeCodes
11
- , zeroWidthCharacters = printableCharacters.zeroWidthCharacters
12
- , partition = printableCharacters.partition
13
- , first = printableCharacters.first
14
-
15
- describe ('printable-characters', () => {
16
-
17
- it ('determines visible length', () => {
18
-
19
- assert.equal (strlen ('💩'), 1)
20
- //assert.equal (strlen ('👩‍❤️‍💋‍👩'), 1) // FAILING, see http://blog.jonnew.com/posts/poo-dot-length-equals-two for possible solution
21
- assert.equal (strlen ('❤️'), 1)
22
- assert.equal (strlen ('foo bar'), 7)
23
- assert.equal (strlen ('\u001b[106mfoo bar\u001b[49m'), 7)
24
- })
25
-
26
- it ('detects blank text', () => {
27
-
28
- assert (!isBlank ('💩'))
29
- assert (!isBlank ('foobar'))
30
- assert ( isBlank ('\u001b[106m \t \t \n \u001b[49m'))
31
- })
32
-
33
- it ('matches zero-width characters and ANSI escape codes', () => {
34
-
35
- let s = '\u001b[106m' + 'foo' + '\n\n' + 'bar' + '\u001b[49m'
36
-
37
- assert (s = s.replace (ansiEscapeCodes, ''), 'foo\n\nbar')
38
- assert ( s.replace (zeroWidthCharacters, ''), 'foobar')
39
- })
40
-
41
- it ('obtains blank string of the same width', () => {
42
-
43
- assert.equal (blank ('💩'), ' ')
44
- //assert.equal (blank ('👩‍❤️‍💋‍👩'), ' ') // FAILING, see http://blog.jonnew.com/posts/poo-dot-length-equals-two for possible solution
45
- assert.equal (blank ('❤️'), ' ')
46
- assert.equal (blank ('foo'), ' ')
47
- assert.equal (blank ('\n'), '\n')
48
- assert.equal (blank ('\t'), '\t')
49
- assert.equal (blank ('\tfoo \nfoo'), '\t \n ')
50
- assert.equal (blank ('\u001b[22m\u001b[1mfoo \t\u001b[39m\u001b[22m'), ' \t')
51
- })
52
-
53
- it ('extracts invisible parts followed by visible ones', () => {
54
-
55
- assert.deepEqual (partition (''), [ ])
56
- assert.deepEqual (partition ('foo'), [['', 'foo'] ])
57
- assert.deepEqual (partition ('\u001b[1mfoo'), [['\u001b[1m', 'foo'] ])
58
- assert.deepEqual (partition ('\u001b[1mfoo\u0000bar'), [['\u001b[1m', 'foo'], ['\u0000', 'bar'] ])
59
- assert.deepEqual (partition ('\u001b[1mfoo\u0000bar\n'), [['\u001b[1m', 'foo'], ['\u0000', 'bar'], ['\n', '']])
60
- })
61
-
62
- it ('gets first N visible symbols (preserving invisible parts)', () => {
63
-
64
- assert.equal (first ('💩23456789', 0), '')
65
- assert.equal (first ('💩23456789', 3), '💩23')
66
- assert.equal (first ('💩23456789', 100), '💩23456789')
67
-
68
- const s = '\u001b[22m\u001b[1m' + '💩23' + '\u0000' + '45' + '\u001b[39m' + '67' + '\n' + '89' + '\u001b[39m\u001b[22m'
69
-
70
- assert.equal (first (s, 0), '\u001b[22m\u001b[1m' + '' + '\u0000' + '' + '\u001b[39m' + '' + '\n' + '' + '\u001b[39m\u001b[22m')
71
- assert.equal (first (s, 3), '\u001b[22m\u001b[1m' + '💩23' + '\u0000' + '' + '\u001b[39m' + '' + '\n' + '' + '\u001b[39m\u001b[22m')
72
- assert.equal (first (s, 4), '\u001b[22m\u001b[1m' + '💩23' + '\u0000' + '4' + '\u001b[39m' + '' + '\n' + '' + '\u001b[39m\u001b[22m')
73
- assert.equal (first (s, 6), '\u001b[22m\u001b[1m' + '💩23' + '\u0000' + '45' + '\u001b[39m' + '6' + '\n' + '' + '\u001b[39m\u001b[22m')
74
- assert.equal (first (s, 9), '\u001b[22m\u001b[1m' + '💩23' + '\u0000' + '45' + '\u001b[39m' + '67' + '\n' + '89' + '\u001b[39m\u001b[22m')
75
- assert.equal (first (s, 100), '\u001b[22m\u001b[1m' + '💩23' + '\u0000' + '45' + '\u001b[39m' + '67' + '\n' + '89' + '\u001b[39m\u001b[22m')
76
- })
77
- })