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.
- package/.jsii +2 -2
- package/lib/main.js +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +1 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +1 -0
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +1 -1
- package/node_modules/graceful-fs/package.json +1 -1
- package/node_modules/graceful-fs/polyfills.js +4 -2
- package/node_modules/table/README.md +79 -1
- package/node_modules/table/dist/src/alignSpanningCell.d.ts +7 -0
- package/node_modules/table/dist/src/alignSpanningCell.js +44 -0
- package/node_modules/table/dist/src/alignSpanningCell.js.map +1 -0
- package/node_modules/table/dist/src/alignString.js.map +1 -0
- package/node_modules/table/dist/src/alignTableData.js +7 -1
- package/node_modules/table/dist/src/alignTableData.js.map +1 -0
- package/node_modules/table/dist/src/calculateCellHeight.js.map +1 -0
- package/node_modules/table/dist/src/calculateMaximumColumnWidths.d.ts +7 -0
- package/node_modules/table/dist/src/calculateMaximumColumnWidths.js +36 -0
- package/node_modules/table/dist/src/calculateMaximumColumnWidths.js.map +1 -0
- package/node_modules/table/dist/src/calculateOutputColumnWidths.d.ts +2 -0
- package/node_modules/table/dist/src/calculateOutputColumnWidths.js +10 -0
- package/node_modules/table/dist/src/calculateOutputColumnWidths.js.map +1 -0
- package/node_modules/table/dist/src/calculateRowHeights.js +28 -5
- package/node_modules/table/dist/src/calculateRowHeights.js.map +1 -0
- package/node_modules/table/dist/src/calculateSpanningCellWidth.d.ts +3 -0
- package/node_modules/table/dist/src/calculateSpanningCellWidth.js +26 -0
- package/node_modules/table/dist/src/calculateSpanningCellWidth.js.map +1 -0
- package/node_modules/table/dist/src/createStream.js +2 -1
- package/node_modules/table/dist/src/createStream.js.map +1 -0
- package/node_modules/table/dist/src/drawBorder.d.ts +27 -19
- package/node_modules/table/dist/src/drawBorder.js +164 -63
- package/node_modules/table/dist/src/drawBorder.js.map +1 -0
- package/node_modules/table/dist/src/drawContent.d.ts +10 -5
- package/node_modules/table/dist/src/drawContent.js +31 -7
- package/node_modules/table/dist/src/drawContent.js.map +1 -0
- package/node_modules/table/dist/src/drawRow.d.ts +6 -2
- package/node_modules/table/dist/src/drawRow.js +6 -2
- package/node_modules/table/dist/src/drawRow.js.map +1 -0
- package/node_modules/table/dist/src/drawTable.d.ts +1 -1
- package/node_modules/table/dist/src/drawTable.js +10 -18
- package/node_modules/table/dist/src/drawTable.js.map +1 -0
- package/node_modules/table/dist/src/generated/validators.d.ts +2 -2
- package/node_modules/table/dist/src/generated/validators.js +746 -223
- package/node_modules/table/dist/src/generated/validators.js.map +1 -0
- package/node_modules/table/dist/src/getBorderCharacters.js +16 -0
- package/node_modules/table/dist/src/getBorderCharacters.js.map +1 -0
- package/node_modules/table/dist/src/index.js.map +1 -0
- package/node_modules/table/dist/src/injectHeaderConfig.d.ts +3 -0
- package/node_modules/table/dist/src/injectHeaderConfig.js +29 -0
- package/node_modules/table/dist/src/injectHeaderConfig.js.map +1 -0
- package/node_modules/table/dist/src/makeRangeConfig.d.ts +3 -0
- package/node_modules/table/dist/src/makeRangeConfig.js +18 -0
- package/node_modules/table/dist/src/makeRangeConfig.js.map +1 -0
- package/node_modules/table/dist/src/makeStreamConfig.js.map +1 -0
- package/node_modules/table/dist/src/makeTableConfig.d.ts +2 -2
- package/node_modules/table/dist/src/makeTableConfig.js +26 -29
- package/node_modules/table/dist/src/makeTableConfig.js.map +1 -0
- package/node_modules/table/dist/src/mapDataUsingRowHeights.d.ts +2 -0
- package/node_modules/table/dist/src/mapDataUsingRowHeights.js +17 -10
- package/node_modules/table/dist/src/mapDataUsingRowHeights.js.map +1 -0
- package/node_modules/table/dist/src/padTableData.js +7 -1
- package/node_modules/table/dist/src/padTableData.js.map +1 -0
- package/node_modules/table/dist/src/schemas/config.json +95 -0
- package/node_modules/table/dist/src/schemas/shared.json +139 -0
- package/node_modules/table/dist/src/schemas/streamConfig.json +25 -0
- package/node_modules/table/dist/src/spanningCellManager.d.ts +21 -0
- package/node_modules/table/dist/src/spanningCellManager.js +86 -0
- package/node_modules/table/dist/src/spanningCellManager.js.map +1 -0
- package/node_modules/table/dist/src/stringifyTableData.js.map +1 -0
- package/node_modules/table/dist/src/table.js +9 -5
- package/node_modules/table/dist/src/table.js.map +1 -0
- package/node_modules/table/dist/src/truncateTableData.d.ts +2 -2
- package/node_modules/table/dist/src/truncateTableData.js +2 -2
- package/node_modules/table/dist/src/truncateTableData.js.map +1 -0
- package/node_modules/table/dist/src/types/api.d.ts +21 -5
- package/node_modules/table/dist/src/types/api.js.map +1 -0
- package/node_modules/table/dist/src/types/internal.js.map +1 -0
- package/node_modules/table/dist/src/utils.d.ts +10 -1
- package/node_modules/table/dist/src/utils.js +51 -1
- package/node_modules/table/dist/src/utils.js.map +1 -0
- package/node_modules/table/dist/src/validateConfig.js.map +1 -0
- package/node_modules/table/dist/src/validateSpanningCellConfig.d.ts +3 -0
- package/node_modules/table/dist/src/validateSpanningCellConfig.js +46 -0
- package/node_modules/table/dist/src/validateSpanningCellConfig.js.map +1 -0
- package/node_modules/table/dist/src/validateTableData.js.map +1 -0
- package/node_modules/table/dist/src/wrapCell.js.map +1 -0
- package/node_modules/table/dist/src/wrapString.js.map +1 -0
- package/node_modules/table/dist/src/wrapWord.js +2 -2
- package/node_modules/table/dist/src/wrapWord.js.map +1 -0
- package/node_modules/table/package.json +2 -3
- package/package.json +3 -3
- package/node_modules/table/dist/src/calculateCellWidths.d.ts +0 -5
- package/node_modules/table/dist/src/calculateCellWidths.js +0 -17
- package/node_modules/table/dist/src/calculateColumnWidths.d.ts +0 -6
- package/node_modules/table/dist/src/calculateColumnWidths.js +0 -17
- package/node_modules/table/dist/src/drawHeader.d.ts +0 -2
- 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.
|
|
47
|
-
"jest": "^27.4.
|
|
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.
|
|
83
|
+
"version": "2.0.30",
|
|
84
84
|
"jest": {
|
|
85
85
|
"testMatch": [
|
|
86
86
|
"**/__tests__/**/*.ts?(x)",
|
|
@@ -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,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,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
|