@storm-software/workspace-tools 1.16.11 → 1.16.12
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 +7 -0
- package/README.md +1 -1
- package/index.js +47 -39
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +47 -39
- package/src/executors/tsup/get-config.js +46 -37
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.16.11](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.16.10...workspace-tools-v1.16.11) (2023-11-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **workspace-tools:** Resolve issue with path separators in tsup patch ([e7dc44d](https://github.com/storm-software/storm-ops/commit/e7dc44d77f8445a495fb7164d85498d4a2cbf179))
|
|
7
|
+
|
|
1
8
|
## [1.16.10](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.16.9...workspace-tools-v1.16.10) (2023-11-29)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
16
16
|
|
|
17
17
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.org" target="_blank">stormsoftware.org</a> to stay up to date with this developer</h3><br />
|
|
18
18
|
|
|
19
|
-
[](https://prettier.io/)
|
|
20
20
|
[](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://docusaurus.io/) 
|
|
21
21
|
|
|
22
22
|
<h3 align="center" bold="true">⚠️ <b>Attention</b> ⚠️ This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.</h3><br />
|
package/index.js
CHANGED
|
@@ -40019,9 +40019,9 @@ var require_brace_expansion2 = __commonJS({
|
|
|
40019
40019
|
}
|
|
40020
40020
|
});
|
|
40021
40021
|
|
|
40022
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40022
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/chunk-EPAEWGCP.js
|
|
40023
40023
|
var require_chunk_EPAEWGCP = __commonJS({
|
|
40024
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40024
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
|
|
40025
40025
|
"use strict";
|
|
40026
40026
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40027
40027
|
var version = "8.0.0";
|
|
@@ -40481,9 +40481,9 @@ var require_resolve_from = __commonJS({
|
|
|
40481
40481
|
}
|
|
40482
40482
|
});
|
|
40483
40483
|
|
|
40484
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40484
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/chunk-GQ77QZBO.js
|
|
40485
40485
|
var require_chunk_GQ77QZBO = __commonJS({
|
|
40486
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40486
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
|
|
40487
40487
|
"use strict";
|
|
40488
40488
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40489
40489
|
function _interopRequireDefault(obj) {
|
|
@@ -40681,12 +40681,13 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
40681
40681
|
};
|
|
40682
40682
|
}
|
|
40683
40683
|
function ensureTempDeclarationDir(options) {
|
|
40684
|
-
|
|
40684
|
+
let projectFolder = packageJsonSearch(options.outDir, options.silent, "dts", logger2);
|
|
40685
|
+
const dirPath = _path2.default.join(options.workspaceRoot, projectFolder, "tmp", "declarations");
|
|
40685
40686
|
if (_fs2.default.existsSync(dirPath)) {
|
|
40686
40687
|
return dirPath;
|
|
40687
40688
|
}
|
|
40688
40689
|
_fs2.default.mkdirSync(dirPath, { recursive: true });
|
|
40689
|
-
const gitIgnorePath = _path2.default.join(options.workspaceRoot,
|
|
40690
|
+
const gitIgnorePath = _path2.default.join(options.workspaceRoot, projectFolder, "tmp", ".gitignore");
|
|
40690
40691
|
writeFileSync3(gitIgnorePath, "**/*\n");
|
|
40691
40692
|
return dirPath;
|
|
40692
40693
|
}
|
|
@@ -40761,9 +40762,9 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
40761
40762
|
}
|
|
40762
40763
|
});
|
|
40763
40764
|
|
|
40764
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40765
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/chunk-UIX4URMV.js
|
|
40765
40766
|
var require_chunk_UIX4URMV = __commonJS({
|
|
40766
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40767
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
|
|
40767
40768
|
"use strict";
|
|
40768
40769
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40769
40770
|
function _interopRequireWildcard(obj) {
|
|
@@ -41697,9 +41698,9 @@ var require_dist2 = __commonJS({
|
|
|
41697
41698
|
}
|
|
41698
41699
|
});
|
|
41699
41700
|
|
|
41700
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
41701
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/chunk-7G76EW2R.js
|
|
41701
41702
|
var require_chunk_7G76EW2R = __commonJS({
|
|
41702
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
41703
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
|
|
41703
41704
|
"use strict";
|
|
41704
41705
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41705
41706
|
function _interopRequireDefault(obj) {
|
|
@@ -95505,9 +95506,9 @@ var require_chokidar = __commonJS({
|
|
|
95505
95506
|
}
|
|
95506
95507
|
});
|
|
95507
95508
|
|
|
95508
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
95509
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/index.js
|
|
95509
95510
|
var require_dist5 = __commonJS({
|
|
95510
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
95511
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=4o7xevcixzlrqw5gm3wlleqhou_@microsoft+api-extractor@7.38.3_@swc+core@1._tguqvnpknvrsonece4nkdclyai/node_modules/tsup/dist/index.js"(exports) {
|
|
95511
95512
|
"use strict";
|
|
95512
95513
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95513
95514
|
function _interopRequireDefault(obj) {
|
|
@@ -97076,7 +97077,7 @@ var require_dist5 = __commonJS({
|
|
|
97076
97077
|
};
|
|
97077
97078
|
var generateExternal = async (external, options, logger3) => {
|
|
97078
97079
|
const result = [];
|
|
97079
|
-
const pkgJsonPath =
|
|
97080
|
+
const pkgJsonPath = packageJsonSearch2(options.outDir, options.silent, "CLI", logger3);
|
|
97080
97081
|
for (const item of external) {
|
|
97081
97082
|
if (typeof item !== "string" || !item.endsWith("package.json")) {
|
|
97082
97083
|
result.push(item);
|
|
@@ -97088,7 +97089,7 @@ var require_dist5 = __commonJS({
|
|
|
97088
97089
|
}
|
|
97089
97090
|
return result;
|
|
97090
97091
|
};
|
|
97091
|
-
var
|
|
97092
|
+
var packageJsonSearch2 = (outDir, silent, format2, logger3) => {
|
|
97092
97093
|
let pkgPath = outDir ? outDir : process.cwd();
|
|
97093
97094
|
!silent && logger3 && logger3.info(format2, `\u26A1 Beginning search for package.json file: ${pkgPath}`);
|
|
97094
97095
|
if (pkgPath) {
|
|
@@ -97132,7 +97133,7 @@ var require_dist5 = __commonJS({
|
|
|
97132
97133
|
buildDependencies,
|
|
97133
97134
|
pluginContainer
|
|
97134
97135
|
}) {
|
|
97135
|
-
const pkgPath =
|
|
97136
|
+
const pkgPath = packageJsonSearch2(options.outDir, options.silent, format2, logger3);
|
|
97136
97137
|
logger3.info(format2, `\u26A1 Running ESBuild: ${pkgPath}`);
|
|
97137
97138
|
const pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, pkgPath);
|
|
97138
97139
|
const deps = await _chunk7G76EW2Rjs.getProductionDeps.call(void 0, pkgPath);
|
|
@@ -97823,6 +97824,13 @@ var require_dist5 = __commonJS({
|
|
|
97823
97824
|
};
|
|
97824
97825
|
logger.info("tsc", "Build start");
|
|
97825
97826
|
const dtsOptions = options.experimentalDts;
|
|
97827
|
+
if (!dtsOptions.compilerOptions) {
|
|
97828
|
+
dtsOptions.compilerOptions = {};
|
|
97829
|
+
} else if (!dtsOptions.compilerOptions.options) {
|
|
97830
|
+
dtsOptions.compilerOptions.options = {};
|
|
97831
|
+
}
|
|
97832
|
+
let tempDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
|
|
97833
|
+
dtsOptions.compilerOptions.options.declarationDir = _path2.default.join(tempDir, "declarations");
|
|
97826
97834
|
const exports2 = await emit(
|
|
97827
97835
|
options,
|
|
97828
97836
|
dtsOptions.compilerOptions,
|
|
@@ -97929,10 +97937,10 @@ var require_dist5 = __commonJS({
|
|
|
97929
97937
|
}
|
|
97930
97938
|
return "";
|
|
97931
97939
|
}
|
|
97932
|
-
var
|
|
97933
|
-
function rollupDtsFile(options, inputFilePath, outputFilePath, tsconfigFilePath) {
|
|
97934
|
-
let projectFolder =
|
|
97935
|
-
!options.silent &&
|
|
97940
|
+
var logger22 = _chunk7G76EW2Rjs.createLogger.call(void 0);
|
|
97941
|
+
function rollupDtsFile(options, tmpDirPath, inputFilePath, outputFilePath, tsconfigFilePath) {
|
|
97942
|
+
let projectFolder = packageJsonSearch2(options.outDir, options.silent, "dts", logger22);
|
|
97943
|
+
!options.silent && logger22.info("dts", `\u26A1 Preparing to run API Extractor (DTS generate): ${projectFolder}`);
|
|
97936
97944
|
const apiReferenceProjectDir = `<projectFolder>/${_path2.default.join(
|
|
97937
97945
|
"docs",
|
|
97938
97946
|
"api-reports",
|
|
@@ -97944,10 +97952,10 @@ var require_dist5 = __commonJS({
|
|
|
97944
97952
|
enabled: options.apiReport !== false,
|
|
97945
97953
|
reportFileName: "api-report.md",
|
|
97946
97954
|
reportFolder: apiReferenceProjectDir,
|
|
97947
|
-
reportTempFolder:
|
|
97948
|
-
|
|
97955
|
+
reportTempFolder: _path2.default.join(
|
|
97956
|
+
tmpDirPath,
|
|
97949
97957
|
"api-reports"
|
|
97950
|
-
).replaceAll("
|
|
97958
|
+
).replaceAll("/", "\\")
|
|
97951
97959
|
},
|
|
97952
97960
|
docModel: {
|
|
97953
97961
|
enabled: options.docModel !== false,
|
|
@@ -97981,13 +97989,13 @@ var require_dist5 = __commonJS({
|
|
|
97981
97989
|
"package.json"
|
|
97982
97990
|
)
|
|
97983
97991
|
};
|
|
97984
|
-
!options.silent &&
|
|
97985
|
-
!options.silent &&
|
|
97992
|
+
!options.silent && logger22.info("dts", `\u26A1 Current Directory: ${__dirname}`);
|
|
97993
|
+
!options.silent && logger22.info(
|
|
97986
97994
|
"dts",
|
|
97987
97995
|
"\u26A1 Running API Extractor with the following config: \n",
|
|
97988
97996
|
prepareOptions
|
|
97989
97997
|
);
|
|
97990
|
-
!options.silent &&
|
|
97998
|
+
!options.silent && logger22.info(
|
|
97991
97999
|
"dts",
|
|
97992
98000
|
"\u26A1 Using the following compiler options: \n",
|
|
97993
98001
|
JSON.stringify(prepareOptions.configObject?.compiler)
|
|
@@ -98000,7 +98008,7 @@ var require_dist5 = __commonJS({
|
|
|
98000
98008
|
}
|
|
98001
98009
|
const { ExtractorConfig, Extractor } = imported;
|
|
98002
98010
|
const extractorConfig = ExtractorConfig.prepare(prepareOptions);
|
|
98003
|
-
!options.silent &&
|
|
98011
|
+
!options.silent && logger22.info(
|
|
98004
98012
|
"dts",
|
|
98005
98013
|
"\u26A1 Invoking extractor with the following prepare options: \n",
|
|
98006
98014
|
JSON.stringify(extractorConfig)
|
|
@@ -98018,16 +98026,16 @@ var require_dist5 = __commonJS({
|
|
|
98018
98026
|
}
|
|
98019
98027
|
}
|
|
98020
98028
|
async function rollupDtsFiles(options, exports2, format2) {
|
|
98021
|
-
let
|
|
98029
|
+
let tempDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
|
|
98022
98030
|
let outDir = options.outDir || "dist";
|
|
98023
|
-
let pkgPath =
|
|
98024
|
-
!options.silent &&
|
|
98025
|
-
!options.silent &&
|
|
98031
|
+
let pkgPath = packageJsonSearch2(outDir, options.silent, "dts", logger22);
|
|
98032
|
+
!options.silent && logger22.info("dts", `\u26A1 Preparing to run Rollup (DTS generate): ${pkgPath}`);
|
|
98033
|
+
!options.silent && logger22.info("dts", `\u26A1 Exports list to use in generation: ${exports2.map((e) => JSON.stringify(e)).join("\n")}`);
|
|
98026
98034
|
let pkg = await _chunk7G76EW2Rjs.loadPkg.call(void 0, pkgPath);
|
|
98027
98035
|
let dtsExtension = _chunkGQ77QZBOjs.defaultOutExtension.call(void 0, { format: format2, pkgType: pkg.type }).dts;
|
|
98036
|
+
let declarationDir = _path2.default.join(tempDir, "declarations");
|
|
98028
98037
|
let dtsInputFilePath = _path2.default.join(
|
|
98029
98038
|
declarationDir,
|
|
98030
|
-
options.projectRoot,
|
|
98031
98039
|
"_tsup-dts-aggregation" + dtsExtension
|
|
98032
98040
|
);
|
|
98033
98041
|
dtsInputFilePath = dtsInputFilePath.replace(/\.d\.mts$/, ".dmts.d.ts").replace(/\.d\.cts$/, ".dcts.d.ts");
|
|
@@ -98039,6 +98047,7 @@ var require_dist5 = __commonJS({
|
|
|
98039
98047
|
let dtsOutputFilePath = _path2.default.join(outDir, "declarations" + dtsExtension);
|
|
98040
98048
|
rollupDtsFile(
|
|
98041
98049
|
options,
|
|
98050
|
+
tempDir,
|
|
98042
98051
|
dtsInputFilePath,
|
|
98043
98052
|
dtsOutputFilePath,
|
|
98044
98053
|
options.tsconfig || "tsconfig.json"
|
|
@@ -98052,14 +98061,14 @@ var require_dist5 = __commonJS({
|
|
|
98052
98061
|
outDir,
|
|
98053
98062
|
out + dtsExtension
|
|
98054
98063
|
).replaceAll("/", "\\");
|
|
98055
|
-
!options.silent &&
|
|
98064
|
+
!options.silent && logger22.info("dts", `\u26A1 Checking exports generation for file: ${outFileName}`);
|
|
98056
98065
|
const currentExports = exports2.filter(
|
|
98057
98066
|
(declaration) => declaration.sourceFileName.replaceAll("/", "\\") === sourceFileName.replaceAll("/", "\\")
|
|
98058
98067
|
);
|
|
98059
98068
|
_chunkGQ77QZBOjs.writeFileSync.call(
|
|
98060
98069
|
void 0,
|
|
98061
98070
|
outFileName,
|
|
98062
|
-
formatDistributionExports(currentExports, outFileName, dtsOutputFilePath,
|
|
98071
|
+
formatDistributionExports(currentExports, outFileName, dtsOutputFilePath, logger22, options)
|
|
98063
98072
|
);
|
|
98064
98073
|
}
|
|
98065
98074
|
}
|
|
@@ -98069,17 +98078,17 @@ var require_dist5 = __commonJS({
|
|
|
98069
98078
|
const getDuration = () => {
|
|
98070
98079
|
return `${Math.floor(Date.now() - start)}ms`;
|
|
98071
98080
|
};
|
|
98072
|
-
|
|
98081
|
+
logger22.info("dts", "Build start");
|
|
98073
98082
|
if (!exports2) {
|
|
98074
98083
|
throw new Error("Unexpected internal error: dts exports is not define");
|
|
98075
98084
|
}
|
|
98076
98085
|
for (const format2 of options.format) {
|
|
98077
98086
|
await rollupDtsFiles(options, exports2, format2);
|
|
98078
98087
|
}
|
|
98079
|
-
|
|
98088
|
+
logger22.success("dts", `\u26A1\uFE0F Build success in ${getDuration()}`);
|
|
98080
98089
|
} catch (error) {
|
|
98081
98090
|
_chunkUIX4URMVjs.handleError.call(void 0, error);
|
|
98082
|
-
|
|
98091
|
+
logger22.error("dts", "Build error");
|
|
98083
98092
|
}
|
|
98084
98093
|
}
|
|
98085
98094
|
var cjsInterop = () => {
|
|
@@ -98146,7 +98155,7 @@ var require_dist5 = __commonJS({
|
|
|
98146
98155
|
options.entry = entry;
|
|
98147
98156
|
logger3.info("CLI", `Building entry: ${JSON.stringify(entry)}`);
|
|
98148
98157
|
}
|
|
98149
|
-
!options.silent &&
|
|
98158
|
+
!options.silent && logger22.info("CLI", `\u26A1 Normalizing options: ${options.tsconfig}`);
|
|
98150
98159
|
const tsconfig = _bundlerequire.loadTsConfig.call(void 0, options.workspaceRoot, options.tsconfig);
|
|
98151
98160
|
if (tsconfig) {
|
|
98152
98161
|
logger3.info(
|
|
@@ -105378,8 +105387,7 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
|
|
|
105378
105387
|
noEmit: false,
|
|
105379
105388
|
declaration: true,
|
|
105380
105389
|
declarationMap: true,
|
|
105381
|
-
emitDeclarationOnly: true
|
|
105382
|
-
declarationDir: (0, import_path3.join)(workspaceRoot, "tmp", ".tsup", "declaration")
|
|
105390
|
+
emitDeclarationOnly: true
|
|
105383
105391
|
}
|
|
105384
105392
|
},
|
|
105385
105393
|
ts.sys,
|