cdk-common 2.0.26 → 2.0.30

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 (101) hide show
  1. package/.jsii +2 -2
  2. package/lib/main.js +1 -1
  3. package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
  4. package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +1 -0
  5. package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +2 -2
  6. package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +1 -1
  7. package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
  8. package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +1 -0
  9. package/node_modules/@types/form-data/node_modules/@types/node/package.json +2 -2
  10. package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +1 -1
  11. package/node_modules/graceful-fs/package.json +1 -1
  12. package/node_modules/graceful-fs/polyfills.js +4 -2
  13. package/node_modules/table/README.md +79 -1
  14. package/node_modules/table/dist/src/alignSpanningCell.d.ts +7 -0
  15. package/node_modules/table/dist/src/alignSpanningCell.js +44 -0
  16. package/node_modules/table/dist/src/alignSpanningCell.js.map +1 -0
  17. package/node_modules/table/dist/src/alignString.js.map +1 -0
  18. package/node_modules/table/dist/src/alignTableData.js +7 -1
  19. package/node_modules/table/dist/src/alignTableData.js.map +1 -0
  20. package/node_modules/table/dist/src/calculateCellHeight.js.map +1 -0
  21. package/node_modules/table/dist/src/calculateMaximumColumnWidths.d.ts +7 -0
  22. package/node_modules/table/dist/src/calculateMaximumColumnWidths.js +36 -0
  23. package/node_modules/table/dist/src/calculateMaximumColumnWidths.js.map +1 -0
  24. package/node_modules/table/dist/src/calculateOutputColumnWidths.d.ts +2 -0
  25. package/node_modules/table/dist/src/calculateOutputColumnWidths.js +10 -0
  26. package/node_modules/table/dist/src/calculateOutputColumnWidths.js.map +1 -0
  27. package/node_modules/table/dist/src/calculateRowHeights.js +28 -5
  28. package/node_modules/table/dist/src/calculateRowHeights.js.map +1 -0
  29. package/node_modules/table/dist/src/calculateSpanningCellWidth.d.ts +3 -0
  30. package/node_modules/table/dist/src/calculateSpanningCellWidth.js +26 -0
  31. package/node_modules/table/dist/src/calculateSpanningCellWidth.js.map +1 -0
  32. package/node_modules/table/dist/src/createStream.js +2 -1
  33. package/node_modules/table/dist/src/createStream.js.map +1 -0
  34. package/node_modules/table/dist/src/drawBorder.d.ts +27 -19
  35. package/node_modules/table/dist/src/drawBorder.js +164 -63
  36. package/node_modules/table/dist/src/drawBorder.js.map +1 -0
  37. package/node_modules/table/dist/src/drawContent.d.ts +10 -5
  38. package/node_modules/table/dist/src/drawContent.js +31 -7
  39. package/node_modules/table/dist/src/drawContent.js.map +1 -0
  40. package/node_modules/table/dist/src/drawRow.d.ts +6 -2
  41. package/node_modules/table/dist/src/drawRow.js +6 -2
  42. package/node_modules/table/dist/src/drawRow.js.map +1 -0
  43. package/node_modules/table/dist/src/drawTable.d.ts +1 -1
  44. package/node_modules/table/dist/src/drawTable.js +10 -18
  45. package/node_modules/table/dist/src/drawTable.js.map +1 -0
  46. package/node_modules/table/dist/src/generated/validators.d.ts +2 -2
  47. package/node_modules/table/dist/src/generated/validators.js +746 -223
  48. package/node_modules/table/dist/src/generated/validators.js.map +1 -0
  49. package/node_modules/table/dist/src/getBorderCharacters.js +16 -0
  50. package/node_modules/table/dist/src/getBorderCharacters.js.map +1 -0
  51. package/node_modules/table/dist/src/index.js.map +1 -0
  52. package/node_modules/table/dist/src/injectHeaderConfig.d.ts +3 -0
  53. package/node_modules/table/dist/src/injectHeaderConfig.js +29 -0
  54. package/node_modules/table/dist/src/injectHeaderConfig.js.map +1 -0
  55. package/node_modules/table/dist/src/makeRangeConfig.d.ts +3 -0
  56. package/node_modules/table/dist/src/makeRangeConfig.js +18 -0
  57. package/node_modules/table/dist/src/makeRangeConfig.js.map +1 -0
  58. package/node_modules/table/dist/src/makeStreamConfig.js.map +1 -0
  59. package/node_modules/table/dist/src/makeTableConfig.d.ts +2 -2
  60. package/node_modules/table/dist/src/makeTableConfig.js +26 -29
  61. package/node_modules/table/dist/src/makeTableConfig.js.map +1 -0
  62. package/node_modules/table/dist/src/mapDataUsingRowHeights.d.ts +2 -0
  63. package/node_modules/table/dist/src/mapDataUsingRowHeights.js +17 -10
  64. package/node_modules/table/dist/src/mapDataUsingRowHeights.js.map +1 -0
  65. package/node_modules/table/dist/src/padTableData.js +7 -1
  66. package/node_modules/table/dist/src/padTableData.js.map +1 -0
  67. package/node_modules/table/dist/src/schemas/config.json +95 -0
  68. package/node_modules/table/dist/src/schemas/shared.json +139 -0
  69. package/node_modules/table/dist/src/schemas/streamConfig.json +25 -0
  70. package/node_modules/table/dist/src/spanningCellManager.d.ts +21 -0
  71. package/node_modules/table/dist/src/spanningCellManager.js +86 -0
  72. package/node_modules/table/dist/src/spanningCellManager.js.map +1 -0
  73. package/node_modules/table/dist/src/stringifyTableData.js.map +1 -0
  74. package/node_modules/table/dist/src/table.js +9 -5
  75. package/node_modules/table/dist/src/table.js.map +1 -0
  76. package/node_modules/table/dist/src/truncateTableData.d.ts +2 -2
  77. package/node_modules/table/dist/src/truncateTableData.js +2 -2
  78. package/node_modules/table/dist/src/truncateTableData.js.map +1 -0
  79. package/node_modules/table/dist/src/types/api.d.ts +21 -5
  80. package/node_modules/table/dist/src/types/api.js.map +1 -0
  81. package/node_modules/table/dist/src/types/internal.js.map +1 -0
  82. package/node_modules/table/dist/src/utils.d.ts +10 -1
  83. package/node_modules/table/dist/src/utils.js +51 -1
  84. package/node_modules/table/dist/src/utils.js.map +1 -0
  85. package/node_modules/table/dist/src/validateConfig.js.map +1 -0
  86. package/node_modules/table/dist/src/validateSpanningCellConfig.d.ts +3 -0
  87. package/node_modules/table/dist/src/validateSpanningCellConfig.js +46 -0
  88. package/node_modules/table/dist/src/validateSpanningCellConfig.js.map +1 -0
  89. package/node_modules/table/dist/src/validateTableData.js.map +1 -0
  90. package/node_modules/table/dist/src/wrapCell.js.map +1 -0
  91. package/node_modules/table/dist/src/wrapString.js.map +1 -0
  92. package/node_modules/table/dist/src/wrapWord.js +2 -2
  93. package/node_modules/table/dist/src/wrapWord.js.map +1 -0
  94. package/node_modules/table/package.json +2 -3
  95. package/package.json +3 -3
  96. package/node_modules/table/dist/src/calculateCellWidths.d.ts +0 -5
  97. package/node_modules/table/dist/src/calculateCellWidths.js +0 -17
  98. package/node_modules/table/dist/src/calculateColumnWidths.d.ts +0 -6
  99. package/node_modules/table/dist/src/calculateColumnWidths.js +0 -17
  100. package/node_modules/table/dist/src/drawHeader.d.ts +0 -2
  101. package/node_modules/table/dist/src/drawHeader.js +0 -30
package/package.json CHANGED
@@ -43,8 +43,8 @@
43
43
  "eslint": "^8",
44
44
  "eslint-import-resolver-node": "^0.3.6",
45
45
  "eslint-import-resolver-typescript": "^2.5.0",
46
- "eslint-plugin-import": "^2.25.3",
47
- "jest": "^27.4.5",
46
+ "eslint-plugin-import": "^2.25.4",
47
+ "jest": "^27.4.7",
48
48
  "jest-junit": "^13",
49
49
  "jsii": "^1.50.0",
50
50
  "jsii-diff": "^1.50.0",
@@ -80,7 +80,7 @@
80
80
  ],
81
81
  "main": "lib/index.js",
82
82
  "license": "Apache-2.0",
83
- "version": "2.0.26",
83
+ "version": "2.0.30",
84
84
  "jest": {
85
85
  "testMatch": [
86
86
  "**/__tests__/**/*.ts?(x)",
@@ -1,5 +0,0 @@
1
- import type { Cell } from './types/internal';
2
- /**
3
- * Calculates width of each cell contents in a row.
4
- */
5
- export declare const calculateCellWidths: (cells: Cell[]) => number[];
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.calculateCellWidths = void 0;
7
- const string_width_1 = __importDefault(require("string-width"));
8
- /**
9
- * Calculates width of each cell contents in a row.
10
- */
11
- const calculateCellWidths = (cells) => {
12
- return cells.map((cell) => {
13
- return Math.max(...cell.split('\n').map(string_width_1.default));
14
- });
15
- };
16
- exports.calculateCellWidths = calculateCellWidths;
17
- //# sourceMappingURL=calculateCellWidths.js.map
@@ -1,6 +0,0 @@
1
- import type { Row } from './types/internal';
2
- declare const _default: (rows: Row[]) => number[];
3
- /**
4
- * Produces an array of values that describe the largest value length (width) in every column.
5
- */
6
- export default _default;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const calculateCellWidths_1 = require("./calculateCellWidths");
4
- /**
5
- * Produces an array of values that describe the largest value length (width) in every column.
6
- */
7
- exports.default = (rows) => {
8
- const columnWidths = new Array(rows[0].length).fill(0);
9
- rows.forEach((row) => {
10
- const cellWidths = (0, calculateCellWidths_1.calculateCellWidths)(row);
11
- cellWidths.forEach((cellWidth, cellIndex) => {
12
- columnWidths[cellIndex] = Math.max(columnWidths[cellIndex], cellWidth);
13
- });
14
- });
15
- return columnWidths;
16
- };
17
- //# sourceMappingURL=calculateColumnWidths.js.map
@@ -1,2 +0,0 @@
1
- import type { TableConfig } from './types/internal';
2
- export declare const drawHeader: (width: number, config: TableConfig) => string;
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.drawHeader = void 0;
4
- const alignString_1 = require("./alignString");
5
- const drawRow_1 = require("./drawRow");
6
- const padTableData_1 = require("./padTableData");
7
- const truncateTableData_1 = require("./truncateTableData");
8
- const wrapCell_1 = require("./wrapCell");
9
- const drawHeader = (width, config) => {
10
- if (!config.header) {
11
- throw new Error('Can not draw header without header configuration');
12
- }
13
- const { alignment, paddingRight, paddingLeft, wrapWord } = config.header;
14
- let { content } = config.header;
15
- content = (0, truncateTableData_1.truncateString)(content, config.header.truncate);
16
- const headerLines = (0, wrapCell_1.wrapCell)(content, width, wrapWord);
17
- return headerLines.map((headerLine) => {
18
- let line = (0, alignString_1.alignString)(headerLine, width, alignment);
19
- line = (0, padTableData_1.padString)(line, paddingLeft, paddingRight);
20
- return (0, drawRow_1.drawRow)([line], {
21
- ...config,
22
- drawVerticalLine: (index) => {
23
- const columnCount = config.columns.length;
24
- return config.drawVerticalLine(index === 0 ? 0 : columnCount, columnCount);
25
- },
26
- });
27
- }).join('');
28
- };
29
- exports.drawHeader = drawHeader;
30
- //# sourceMappingURL=drawHeader.js.map