@storm-software/workspace-tools 1.13.9 → 1.13.11
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/CHANGELOG.md +14 -0
- package/index.js +35 -84
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +35 -84
- package/src/executors/tsup/get-config.js +35 -84
package/package.json
CHANGED
|
@@ -37426,9 +37426,9 @@ var require_brace_expansion2 = __commonJS({
|
|
|
37426
37426
|
}
|
|
37427
37427
|
});
|
|
37428
37428
|
|
|
37429
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
37429
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/chunk-EPAEWGCP.js
|
|
37430
37430
|
var require_chunk_EPAEWGCP = __commonJS({
|
|
37431
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
37431
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
|
|
37432
37432
|
"use strict";
|
|
37433
37433
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37434
37434
|
var version = "8.0.0";
|
|
@@ -39075,9 +39075,9 @@ var require_resolve_from = __commonJS({
|
|
|
39075
39075
|
}
|
|
39076
39076
|
});
|
|
39077
39077
|
|
|
39078
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
39078
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/chunk-GQ77QZBO.js
|
|
39079
39079
|
var require_chunk_GQ77QZBO = __commonJS({
|
|
39080
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
39080
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
|
|
39081
39081
|
"use strict";
|
|
39082
39082
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39083
39083
|
function _interopRequireDefault(obj) {
|
|
@@ -39355,9 +39355,9 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
39355
39355
|
}
|
|
39356
39356
|
});
|
|
39357
39357
|
|
|
39358
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
39358
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/chunk-UIX4URMV.js
|
|
39359
39359
|
var require_chunk_UIX4URMV = __commonJS({
|
|
39360
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
39360
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
|
|
39361
39361
|
"use strict";
|
|
39362
39362
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39363
39363
|
function _interopRequireWildcard(obj) {
|
|
@@ -40291,9 +40291,9 @@ var require_dist2 = __commonJS({
|
|
|
40291
40291
|
}
|
|
40292
40292
|
});
|
|
40293
40293
|
|
|
40294
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40294
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/chunk-7G76EW2R.js
|
|
40295
40295
|
var require_chunk_7G76EW2R = __commonJS({
|
|
40296
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40296
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
|
|
40297
40297
|
"use strict";
|
|
40298
40298
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40299
40299
|
function _interopRequireDefault(obj) {
|
|
@@ -95291,9 +95291,9 @@ var require_chokidar = __commonJS({
|
|
|
95291
95291
|
}
|
|
95292
95292
|
});
|
|
95293
95293
|
|
|
95294
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
95294
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/index.js
|
|
95295
95295
|
var require_dist6 = __commonJS({
|
|
95296
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
95296
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/index.js"(exports) {
|
|
95297
95297
|
"use strict";
|
|
95298
95298
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95299
95299
|
function _interopRequireDefault(obj) {
|
|
@@ -97523,62 +97523,6 @@ var require_dist6 = __commonJS({
|
|
|
97523
97523
|
}
|
|
97524
97524
|
return program.getRootFileNames().flatMap(extractExports);
|
|
97525
97525
|
}
|
|
97526
|
-
function emitDtsFiles(program, host, options) {
|
|
97527
|
-
let fileMapping = /* @__PURE__ */ new Map();
|
|
97528
|
-
let writeFile2 = (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {
|
|
97529
|
-
const sourceFile = _optionalChain([sourceFiles, "optionalAccess", (_14) => _14[0]]);
|
|
97530
|
-
let sourceFileName = _optionalChain([sourceFile, "optionalAccess", (_15) => _15.fileName]);
|
|
97531
|
-
if (sourceFileName && !fileName.endsWith(".map")) {
|
|
97532
|
-
const cwd = options.workspaceRoot ? options.workspaceRoot : program.getCurrentDirectory();
|
|
97533
|
-
fileMapping.set(
|
|
97534
|
-
_chunkGQ77QZBOjs.toAbsolutePath.call(void 0, sourceFileName, cwd),
|
|
97535
|
-
_chunkGQ77QZBOjs.toAbsolutePath.call(void 0, fileName, cwd)
|
|
97536
|
-
);
|
|
97537
|
-
}
|
|
97538
|
-
return host.writeFile(
|
|
97539
|
-
fileName,
|
|
97540
|
-
text,
|
|
97541
|
-
writeByteOrderMark,
|
|
97542
|
-
onError,
|
|
97543
|
-
sourceFiles,
|
|
97544
|
-
data
|
|
97545
|
-
);
|
|
97546
|
-
};
|
|
97547
|
-
logger.info("tsc", "Emitting DTS files");
|
|
97548
|
-
let emitResult = program.emit(void 0, writeFile2, void 0, true);
|
|
97549
|
-
let diagnostics = _typescript2.default.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
|
|
97550
|
-
let diagnosticMessages = [];
|
|
97551
|
-
diagnostics.forEach((diagnostic) => {
|
|
97552
|
-
if (diagnostic.file) {
|
|
97553
|
-
let { line, character } = _typescript2.default.getLineAndCharacterOfPosition(
|
|
97554
|
-
diagnostic.file,
|
|
97555
|
-
diagnostic.start
|
|
97556
|
-
);
|
|
97557
|
-
let message = _typescript2.default.flattenDiagnosticMessageText(
|
|
97558
|
-
diagnostic.messageText,
|
|
97559
|
-
"\n"
|
|
97560
|
-
);
|
|
97561
|
-
diagnosticMessages.push(
|
|
97562
|
-
`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`
|
|
97563
|
-
);
|
|
97564
|
-
} else {
|
|
97565
|
-
let message = _typescript2.default.flattenDiagnosticMessageText(
|
|
97566
|
-
diagnostic.messageText,
|
|
97567
|
-
"\n"
|
|
97568
|
-
);
|
|
97569
|
-
diagnosticMessages.push(message);
|
|
97570
|
-
}
|
|
97571
|
-
});
|
|
97572
|
-
let diagnosticMessage = diagnosticMessages.join("\n");
|
|
97573
|
-
if (diagnosticMessage) {
|
|
97574
|
-
logger.error(
|
|
97575
|
-
"TSC",
|
|
97576
|
-
"Failed to emit declaration files.\n\n" + diagnosticMessage
|
|
97577
|
-
);
|
|
97578
|
-
throw new Error("TypeScript compilation failed");
|
|
97579
|
-
}
|
|
97580
|
-
return fileMapping;
|
|
97581
|
-
}
|
|
97582
97526
|
var getFile = (name, logger3) => {
|
|
97583
97527
|
logger3.info("tsc", `Reading file content for: ${name}`);
|
|
97584
97528
|
return _fs2.default.promises.readFile(name, "utf8");
|
|
@@ -97618,6 +97562,7 @@ var require_dist6 = __commonJS({
|
|
|
97618
97562
|
...rawTsconfig.data,
|
|
97619
97563
|
compilerOptions: {
|
|
97620
97564
|
...rawTsconfig.data.compilerOptions,
|
|
97565
|
+
...compilerOptions,
|
|
97621
97566
|
// Enable declaration emit and disable javascript emit
|
|
97622
97567
|
outDir: options.outDir,
|
|
97623
97568
|
allowJs: true,
|
|
@@ -97678,9 +97623,17 @@ var require_dist6 = __commonJS({
|
|
|
97678
97623
|
logger.info("tsc", "Created program");
|
|
97679
97624
|
logger.info("tsc", "Emitting DTS files with the following options: ");
|
|
97680
97625
|
logger.info("tsc", parsedTsconfig.options);
|
|
97681
|
-
|
|
97682
|
-
|
|
97683
|
-
|
|
97626
|
+
try {
|
|
97627
|
+
logger.info("tsc", "Emitting DTS files");
|
|
97628
|
+
logger.info("tsc", fsMap);
|
|
97629
|
+
program.emit();
|
|
97630
|
+
logger.info("tsc", "Emit DTS files complete");
|
|
97631
|
+
logger.info("tsc", fsMap);
|
|
97632
|
+
} catch (e) {
|
|
97633
|
+
logger.error("tsc", "An error occured while emitting DTS files");
|
|
97634
|
+
logger.error("tsc", e);
|
|
97635
|
+
}
|
|
97636
|
+
return getExports(options, program, fsMap);
|
|
97684
97637
|
}
|
|
97685
97638
|
async function runTypeScriptCompiler(options) {
|
|
97686
97639
|
try {
|
|
@@ -97690,7 +97643,11 @@ var require_dist6 = __commonJS({
|
|
|
97690
97643
|
};
|
|
97691
97644
|
logger.info("tsc", "Build start");
|
|
97692
97645
|
const dtsOptions = options.experimentalDts;
|
|
97693
|
-
const exports2 = await emit(
|
|
97646
|
+
const exports2 = await emit(
|
|
97647
|
+
options,
|
|
97648
|
+
dtsOptions.compilerOptions,
|
|
97649
|
+
options.tsconfig
|
|
97650
|
+
);
|
|
97694
97651
|
logger.success("tsc", `\u26A1\uFE0F Build success in ${getDuration()}`);
|
|
97695
97652
|
return exports2;
|
|
97696
97653
|
} catch (error) {
|
|
@@ -97790,23 +97747,17 @@ var require_dist6 = __commonJS({
|
|
|
97790
97747
|
pkgPath = pkgPath.slice(0, -1);
|
|
97791
97748
|
}
|
|
97792
97749
|
logger2.info("dts", `\u26A1 Preparing to run API Extractor (DTS generate): ${pkgPath}`);
|
|
97793
|
-
let packageJsonFullPath = options.workspaceRoot ? _path2.default.join(options.workspaceRoot, pkgPath, "package.json") : _path2.default.join(pkgPath, "package.json");
|
|
97794
|
-
const splits = pkgPath.split("\\");
|
|
97795
|
-
logger2.info("dts", splits);
|
|
97796
|
-
let packageName = pkgPath;
|
|
97797
|
-
if (splits.length > 2) {
|
|
97798
|
-
packageName = splits[splits.length - 2];
|
|
97799
|
-
}
|
|
97800
97750
|
const apiReferenceProjectDir = _path2.default.join(
|
|
97801
97751
|
"<projectFolder>",
|
|
97802
|
-
|
|
97803
|
-
"api-reports"
|
|
97752
|
+
"docs",
|
|
97753
|
+
"api-reports",
|
|
97754
|
+
options.projectRoot
|
|
97804
97755
|
);
|
|
97805
97756
|
let configObject = {
|
|
97806
97757
|
mainEntryPointFilePath: inputFilePath,
|
|
97807
97758
|
apiReport: {
|
|
97808
97759
|
enabled: options.apiReport !== false,
|
|
97809
|
-
reportFileName:
|
|
97760
|
+
reportFileName: "api-report.md",
|
|
97810
97761
|
reportFolder: apiReferenceProjectDir,
|
|
97811
97762
|
reportTempFolder: _path2.default.join(
|
|
97812
97763
|
"<projectFolder>",
|
|
@@ -97818,7 +97769,7 @@ var require_dist6 = __commonJS({
|
|
|
97818
97769
|
enabled: options.docModel !== false,
|
|
97819
97770
|
apiJsonFilePath: _path2.default.join(
|
|
97820
97771
|
apiReferenceProjectDir,
|
|
97821
|
-
|
|
97772
|
+
"documents-model.api.json"
|
|
97822
97773
|
)
|
|
97823
97774
|
},
|
|
97824
97775
|
dtsRollup: {
|
|
@@ -97831,19 +97782,19 @@ var require_dist6 = __commonJS({
|
|
|
97831
97782
|
betaTrimmedFilePath: _path2.default.join(
|
|
97832
97783
|
"<projectFolder>",
|
|
97833
97784
|
options.outDir,
|
|
97834
|
-
|
|
97785
|
+
"index-beta.d.ts"
|
|
97835
97786
|
),
|
|
97836
97787
|
publicTrimmedFilePath: _path2.default.join(
|
|
97837
97788
|
"<projectFolder>",
|
|
97838
97789
|
options.outDir,
|
|
97839
|
-
|
|
97790
|
+
"index-public.d.ts"
|
|
97840
97791
|
)
|
|
97841
97792
|
},
|
|
97842
97793
|
tsdocMetadata: {
|
|
97843
97794
|
enabled: options.tsdocMetadata !== false,
|
|
97844
97795
|
tsdocMetadataFilePath: _path2.default.join(
|
|
97845
97796
|
apiReferenceProjectDir,
|
|
97846
|
-
|
|
97797
|
+
"tsdoc-metadata.api.json"
|
|
97847
97798
|
)
|
|
97848
97799
|
},
|
|
97849
97800
|
compiler: {
|
|
@@ -240,9 +240,9 @@ var require_brace_expansion = __commonJS({
|
|
|
240
240
|
}
|
|
241
241
|
});
|
|
242
242
|
|
|
243
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
243
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/chunk-EPAEWGCP.js
|
|
244
244
|
var require_chunk_EPAEWGCP = __commonJS({
|
|
245
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
245
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
|
|
246
246
|
"use strict";
|
|
247
247
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
248
248
|
var version = "8.0.0";
|
|
@@ -6549,9 +6549,9 @@ var require_resolve_from = __commonJS({
|
|
|
6549
6549
|
}
|
|
6550
6550
|
});
|
|
6551
6551
|
|
|
6552
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
6552
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/chunk-GQ77QZBO.js
|
|
6553
6553
|
var require_chunk_GQ77QZBO = __commonJS({
|
|
6554
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
6554
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
|
|
6555
6555
|
"use strict";
|
|
6556
6556
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6557
6557
|
function _interopRequireDefault(obj) {
|
|
@@ -6829,9 +6829,9 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
6829
6829
|
}
|
|
6830
6830
|
});
|
|
6831
6831
|
|
|
6832
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
6832
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/chunk-UIX4URMV.js
|
|
6833
6833
|
var require_chunk_UIX4URMV = __commonJS({
|
|
6834
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
6834
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
|
|
6835
6835
|
"use strict";
|
|
6836
6836
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6837
6837
|
function _interopRequireWildcard(obj) {
|
|
@@ -7765,9 +7765,9 @@ var require_dist2 = __commonJS({
|
|
|
7765
7765
|
}
|
|
7766
7766
|
});
|
|
7767
7767
|
|
|
7768
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
7768
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/chunk-7G76EW2R.js
|
|
7769
7769
|
var require_chunk_7G76EW2R = __commonJS({
|
|
7770
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
7770
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
|
|
7771
7771
|
"use strict";
|
|
7772
7772
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7773
7773
|
function _interopRequireDefault(obj) {
|
|
@@ -62765,9 +62765,9 @@ var require_chokidar = __commonJS({
|
|
|
62765
62765
|
}
|
|
62766
62766
|
});
|
|
62767
62767
|
|
|
62768
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
62768
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/index.js
|
|
62769
62769
|
var require_dist6 = __commonJS({
|
|
62770
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
62770
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ey2bly4qh77gvdv3ymoz7pnvnm_@microsoft+api-extractor@7.38.3_@swc+core@1._rzdpkyxhwa3hk5iyolbhuxsk3a/node_modules/tsup/dist/index.js"(exports) {
|
|
62771
62771
|
"use strict";
|
|
62772
62772
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62773
62773
|
function _interopRequireDefault(obj) {
|
|
@@ -64997,62 +64997,6 @@ var require_dist6 = __commonJS({
|
|
|
64997
64997
|
}
|
|
64998
64998
|
return program.getRootFileNames().flatMap(extractExports);
|
|
64999
64999
|
}
|
|
65000
|
-
function emitDtsFiles(program, host, options) {
|
|
65001
|
-
let fileMapping = /* @__PURE__ */ new Map();
|
|
65002
|
-
let writeFile = (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {
|
|
65003
|
-
const sourceFile = _optionalChain([sourceFiles, "optionalAccess", (_14) => _14[0]]);
|
|
65004
|
-
let sourceFileName = _optionalChain([sourceFile, "optionalAccess", (_15) => _15.fileName]);
|
|
65005
|
-
if (sourceFileName && !fileName.endsWith(".map")) {
|
|
65006
|
-
const cwd = options.workspaceRoot ? options.workspaceRoot : program.getCurrentDirectory();
|
|
65007
|
-
fileMapping.set(
|
|
65008
|
-
_chunkGQ77QZBOjs.toAbsolutePath.call(void 0, sourceFileName, cwd),
|
|
65009
|
-
_chunkGQ77QZBOjs.toAbsolutePath.call(void 0, fileName, cwd)
|
|
65010
|
-
);
|
|
65011
|
-
}
|
|
65012
|
-
return host.writeFile(
|
|
65013
|
-
fileName,
|
|
65014
|
-
text,
|
|
65015
|
-
writeByteOrderMark,
|
|
65016
|
-
onError,
|
|
65017
|
-
sourceFiles,
|
|
65018
|
-
data
|
|
65019
|
-
);
|
|
65020
|
-
};
|
|
65021
|
-
logger.info("tsc", "Emitting DTS files");
|
|
65022
|
-
let emitResult = program.emit(void 0, writeFile, void 0, true);
|
|
65023
|
-
let diagnostics = _typescript2.default.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
|
|
65024
|
-
let diagnosticMessages = [];
|
|
65025
|
-
diagnostics.forEach((diagnostic) => {
|
|
65026
|
-
if (diagnostic.file) {
|
|
65027
|
-
let { line, character } = _typescript2.default.getLineAndCharacterOfPosition(
|
|
65028
|
-
diagnostic.file,
|
|
65029
|
-
diagnostic.start
|
|
65030
|
-
);
|
|
65031
|
-
let message = _typescript2.default.flattenDiagnosticMessageText(
|
|
65032
|
-
diagnostic.messageText,
|
|
65033
|
-
"\n"
|
|
65034
|
-
);
|
|
65035
|
-
diagnosticMessages.push(
|
|
65036
|
-
`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`
|
|
65037
|
-
);
|
|
65038
|
-
} else {
|
|
65039
|
-
let message = _typescript2.default.flattenDiagnosticMessageText(
|
|
65040
|
-
diagnostic.messageText,
|
|
65041
|
-
"\n"
|
|
65042
|
-
);
|
|
65043
|
-
diagnosticMessages.push(message);
|
|
65044
|
-
}
|
|
65045
|
-
});
|
|
65046
|
-
let diagnosticMessage = diagnosticMessages.join("\n");
|
|
65047
|
-
if (diagnosticMessage) {
|
|
65048
|
-
logger.error(
|
|
65049
|
-
"TSC",
|
|
65050
|
-
"Failed to emit declaration files.\n\n" + diagnosticMessage
|
|
65051
|
-
);
|
|
65052
|
-
throw new Error("TypeScript compilation failed");
|
|
65053
|
-
}
|
|
65054
|
-
return fileMapping;
|
|
65055
|
-
}
|
|
65056
65000
|
var getFile = (name, logger3) => {
|
|
65057
65001
|
logger3.info("tsc", `Reading file content for: ${name}`);
|
|
65058
65002
|
return _fs2.default.promises.readFile(name, "utf8");
|
|
@@ -65092,6 +65036,7 @@ var require_dist6 = __commonJS({
|
|
|
65092
65036
|
...rawTsconfig.data,
|
|
65093
65037
|
compilerOptions: {
|
|
65094
65038
|
...rawTsconfig.data.compilerOptions,
|
|
65039
|
+
...compilerOptions,
|
|
65095
65040
|
// Enable declaration emit and disable javascript emit
|
|
65096
65041
|
outDir: options.outDir,
|
|
65097
65042
|
allowJs: true,
|
|
@@ -65152,9 +65097,17 @@ var require_dist6 = __commonJS({
|
|
|
65152
65097
|
logger.info("tsc", "Created program");
|
|
65153
65098
|
logger.info("tsc", "Emitting DTS files with the following options: ");
|
|
65154
65099
|
logger.info("tsc", parsedTsconfig.options);
|
|
65155
|
-
|
|
65156
|
-
|
|
65157
|
-
|
|
65100
|
+
try {
|
|
65101
|
+
logger.info("tsc", "Emitting DTS files");
|
|
65102
|
+
logger.info("tsc", fsMap);
|
|
65103
|
+
program.emit();
|
|
65104
|
+
logger.info("tsc", "Emit DTS files complete");
|
|
65105
|
+
logger.info("tsc", fsMap);
|
|
65106
|
+
} catch (e) {
|
|
65107
|
+
logger.error("tsc", "An error occured while emitting DTS files");
|
|
65108
|
+
logger.error("tsc", e);
|
|
65109
|
+
}
|
|
65110
|
+
return getExports(options, program, fsMap);
|
|
65158
65111
|
}
|
|
65159
65112
|
async function runTypeScriptCompiler(options) {
|
|
65160
65113
|
try {
|
|
@@ -65164,7 +65117,11 @@ var require_dist6 = __commonJS({
|
|
|
65164
65117
|
};
|
|
65165
65118
|
logger.info("tsc", "Build start");
|
|
65166
65119
|
const dtsOptions = options.experimentalDts;
|
|
65167
|
-
const exports2 = await emit(
|
|
65120
|
+
const exports2 = await emit(
|
|
65121
|
+
options,
|
|
65122
|
+
dtsOptions.compilerOptions,
|
|
65123
|
+
options.tsconfig
|
|
65124
|
+
);
|
|
65168
65125
|
logger.success("tsc", `\u26A1\uFE0F Build success in ${getDuration()}`);
|
|
65169
65126
|
return exports2;
|
|
65170
65127
|
} catch (error) {
|
|
@@ -65264,23 +65221,17 @@ var require_dist6 = __commonJS({
|
|
|
65264
65221
|
pkgPath = pkgPath.slice(0, -1);
|
|
65265
65222
|
}
|
|
65266
65223
|
logger2.info("dts", `\u26A1 Preparing to run API Extractor (DTS generate): ${pkgPath}`);
|
|
65267
|
-
let packageJsonFullPath = options.workspaceRoot ? _path2.default.join(options.workspaceRoot, pkgPath, "package.json") : _path2.default.join(pkgPath, "package.json");
|
|
65268
|
-
const splits = pkgPath.split("\\");
|
|
65269
|
-
logger2.info("dts", splits);
|
|
65270
|
-
let packageName = pkgPath;
|
|
65271
|
-
if (splits.length > 2) {
|
|
65272
|
-
packageName = splits[splits.length - 2];
|
|
65273
|
-
}
|
|
65274
65224
|
const apiReferenceProjectDir = _path2.default.join(
|
|
65275
65225
|
"<projectFolder>",
|
|
65276
|
-
|
|
65277
|
-
"api-reports"
|
|
65226
|
+
"docs",
|
|
65227
|
+
"api-reports",
|
|
65228
|
+
options.projectRoot
|
|
65278
65229
|
);
|
|
65279
65230
|
let configObject = {
|
|
65280
65231
|
mainEntryPointFilePath: inputFilePath,
|
|
65281
65232
|
apiReport: {
|
|
65282
65233
|
enabled: options.apiReport !== false,
|
|
65283
|
-
reportFileName:
|
|
65234
|
+
reportFileName: "api-report.md",
|
|
65284
65235
|
reportFolder: apiReferenceProjectDir,
|
|
65285
65236
|
reportTempFolder: _path2.default.join(
|
|
65286
65237
|
"<projectFolder>",
|
|
@@ -65292,7 +65243,7 @@ var require_dist6 = __commonJS({
|
|
|
65292
65243
|
enabled: options.docModel !== false,
|
|
65293
65244
|
apiJsonFilePath: _path2.default.join(
|
|
65294
65245
|
apiReferenceProjectDir,
|
|
65295
|
-
|
|
65246
|
+
"documents-model.api.json"
|
|
65296
65247
|
)
|
|
65297
65248
|
},
|
|
65298
65249
|
dtsRollup: {
|
|
@@ -65305,19 +65256,19 @@ var require_dist6 = __commonJS({
|
|
|
65305
65256
|
betaTrimmedFilePath: _path2.default.join(
|
|
65306
65257
|
"<projectFolder>",
|
|
65307
65258
|
options.outDir,
|
|
65308
|
-
|
|
65259
|
+
"index-beta.d.ts"
|
|
65309
65260
|
),
|
|
65310
65261
|
publicTrimmedFilePath: _path2.default.join(
|
|
65311
65262
|
"<projectFolder>",
|
|
65312
65263
|
options.outDir,
|
|
65313
|
-
|
|
65264
|
+
"index-public.d.ts"
|
|
65314
65265
|
)
|
|
65315
65266
|
},
|
|
65316
65267
|
tsdocMetadata: {
|
|
65317
65268
|
enabled: options.tsdocMetadata !== false,
|
|
65318
65269
|
tsdocMetadataFilePath: _path2.default.join(
|
|
65319
65270
|
apiReferenceProjectDir,
|
|
65320
|
-
|
|
65271
|
+
"tsdoc-metadata.api.json"
|
|
65321
65272
|
)
|
|
65322
65273
|
},
|
|
65323
65274
|
compiler: {
|