@itwin/build-tools 4.9.0-dev.1 → 4.9.0-dev.2
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/package.json
CHANGED
@@ -34,7 +34,7 @@ if (undefined !== argv.gatherFullReport)
|
|
34
34
|
|
35
35
|
// create output file
|
36
36
|
const apiSignatureFileName = path.parse(argv.apiSignature).name;
|
37
|
-
const sigFileName = (apiSignatureFileName.
|
37
|
+
const sigFileName = apiSignatureFileName.substring(0, apiSignatureFileName.lastIndexOf('.'));
|
38
38
|
const sigFilePath = path.join(argv.outDir, `${shouldGenerateFullReport ? "summary" : sigFileName}.exports.csv`);
|
39
39
|
|
40
40
|
const outputLines = [];
|
@@ -43,12 +43,12 @@ if (shouldGenerateFullReport) {
|
|
43
43
|
outputLines.push("");
|
44
44
|
else {
|
45
45
|
outputLines.push("sep=;");
|
46
|
-
outputLines.push("Package Name;Release Tag;API Item");
|
46
|
+
outputLines.push("Package Name;Release Tag;API Item Type;API Item Name");
|
47
47
|
}
|
48
48
|
} else {
|
49
49
|
fs.createFileSync(sigFilePath);
|
50
50
|
outputLines.push("sep=;");
|
51
|
-
outputLines.push("Release Tag;API Item");
|
51
|
+
outputLines.push("Release Tag;API Item Type;API Item Name");
|
52
52
|
}
|
53
53
|
|
54
54
|
// Open up the signature file
|
@@ -60,11 +60,12 @@ fs.readFile(argv.apiSignature, function (error, data) {
|
|
60
60
|
if (index === arr.length - 1 && line === "") { return; }
|
61
61
|
|
62
62
|
if (previousLines.length !== 0) {
|
63
|
-
const matches = line.match(/export
|
64
|
-
if (
|
65
|
-
const
|
66
|
-
|
67
|
-
outputLines.push(shouldGenerateFullReport ? `${sigFileName};${
|
63
|
+
const matches = line.match(/export.+?(class|interface|type|function|const|enum|namespace) (\w+)/);
|
64
|
+
if (matches) {
|
65
|
+
for (const previousLine of previousLines) {
|
66
|
+
const line = `${previousLine};${matches[1]};${matches[2]}`;
|
67
|
+
outputLines.push(shouldGenerateFullReport ? `${sigFileName};${line}` : line);
|
68
|
+
}
|
68
69
|
}
|
69
70
|
|
70
71
|
previousLines = [];
|