@storm-software/workspace-tools 1.10.20 → 1.11.1
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 +27 -25
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +100 -60
- package/src/executors/tsup/get-config.js +104 -62
package/package.json
CHANGED
|
@@ -408390,9 +408390,9 @@ var require_brace_expansion2 = __commonJS({
|
|
|
408390
408390
|
}
|
|
408391
408391
|
});
|
|
408392
408392
|
|
|
408393
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
408393
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-EPAEWGCP.js
|
|
408394
408394
|
var require_chunk_EPAEWGCP = __commonJS({
|
|
408395
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
408395
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
|
|
408396
408396
|
"use strict";
|
|
408397
408397
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
408398
408398
|
var version = "8.0.0";
|
|
@@ -410039,9 +410039,9 @@ var require_resolve_from = __commonJS({
|
|
|
410039
410039
|
}
|
|
410040
410040
|
});
|
|
410041
410041
|
|
|
410042
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
410042
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-GQ77QZBO.js
|
|
410043
410043
|
var require_chunk_GQ77QZBO = __commonJS({
|
|
410044
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
410044
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
|
|
410045
410045
|
"use strict";
|
|
410046
410046
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
410047
410047
|
function _interopRequireDefault(obj) {
|
|
@@ -410239,13 +410239,12 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
410239
410239
|
};
|
|
410240
410240
|
}
|
|
410241
410241
|
function ensureTempDeclarationDir(options) {
|
|
410242
|
-
const
|
|
410243
|
-
const dirPath = _path2.default.join(cwd, "tmp", ".tsup", "declaration");
|
|
410242
|
+
const dirPath = _path2.default.join(options.workspaceRoot, "tmp", ".tsup", "declaration");
|
|
410244
410243
|
if (_fs2.default.existsSync(dirPath)) {
|
|
410245
410244
|
return dirPath;
|
|
410246
410245
|
}
|
|
410247
410246
|
_fs2.default.mkdirSync(dirPath, { recursive: true });
|
|
410248
|
-
const gitIgnorePath = _path2.default.join(
|
|
410247
|
+
const gitIgnorePath = _path2.default.join(options.workspaceRoot, "tmp", ".tsup", ".gitignore");
|
|
410249
410248
|
writeFileSync2(gitIgnorePath, "**/*\n");
|
|
410250
410249
|
return dirPath;
|
|
410251
410250
|
}
|
|
@@ -410320,9 +410319,9 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
410320
410319
|
}
|
|
410321
410320
|
});
|
|
410322
410321
|
|
|
410323
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
410322
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-UIX4URMV.js
|
|
410324
410323
|
var require_chunk_UIX4URMV = __commonJS({
|
|
410325
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
410324
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
|
|
410326
410325
|
"use strict";
|
|
410327
410326
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
410328
410327
|
function _interopRequireWildcard(obj) {
|
|
@@ -411256,9 +411255,9 @@ var require_dist2 = __commonJS({
|
|
|
411256
411255
|
}
|
|
411257
411256
|
});
|
|
411258
411257
|
|
|
411259
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
411258
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-7G76EW2R.js
|
|
411260
411259
|
var require_chunk_7G76EW2R = __commonJS({
|
|
411261
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
411260
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
|
|
411262
411261
|
"use strict";
|
|
411263
411262
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
411264
411263
|
function _interopRequireDefault(obj) {
|
|
@@ -465064,9 +465063,9 @@ var require_chokidar = __commonJS({
|
|
|
465064
465063
|
}
|
|
465065
465064
|
});
|
|
465066
465065
|
|
|
465067
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
465066
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/index.js
|
|
465068
465067
|
var require_dist5 = __commonJS({
|
|
465069
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
465068
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/index.js"(exports) {
|
|
465070
465069
|
"use strict";
|
|
465071
465070
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
465072
465071
|
function _interopRequireDefault(obj) {
|
|
@@ -466633,14 +466632,15 @@ var require_dist5 = __commonJS({
|
|
|
466633
466632
|
".js": extension.js || defaultExtension.js
|
|
466634
466633
|
};
|
|
466635
466634
|
};
|
|
466636
|
-
var generateExternal = async (external) => {
|
|
466635
|
+
var generateExternal = async (external, options, logger3) => {
|
|
466637
466636
|
const result = [];
|
|
466637
|
+
const pkgJsonPath = packageJsonSearch(options.outDir, options.silent, "CLI", logger3);
|
|
466638
466638
|
for (const item of external) {
|
|
466639
466639
|
if (typeof item !== "string" || !item.endsWith("package.json")) {
|
|
466640
466640
|
result.push(item);
|
|
466641
466641
|
continue;
|
|
466642
466642
|
}
|
|
466643
|
-
let pkgPath = _path2.default.isAbsolute(item) ? _path2.default.dirname(item) : _path2.default.dirname(_path2.default.resolve(process.cwd(), item));
|
|
466643
|
+
let pkgPath = _path2.default.isAbsolute(item) ? _path2.default.dirname(item) : _path2.default.dirname(_path2.default.resolve(pkgJsonPath ?? process.cwd(), item));
|
|
466644
466644
|
const deps = await _chunk7G76EW2Rjs.getProductionDeps.call(void 0, pkgPath);
|
|
466645
466645
|
result.push(...deps);
|
|
466646
466646
|
}
|
|
@@ -466648,7 +466648,7 @@ var require_dist5 = __commonJS({
|
|
|
466648
466648
|
};
|
|
466649
466649
|
var packageJsonSearch = (outDir, silent, format2, logger3) => {
|
|
466650
466650
|
let pkgPath = outDir ? outDir : process.cwd();
|
|
466651
|
-
!silent && logger3.info(format2, `\u26A1 Beginning search for package.json file: ${pkgPath}`);
|
|
466651
|
+
!silent && logger3 && logger3.info(format2, `\u26A1 Beginning search for package.json file: ${pkgPath}`);
|
|
466652
466652
|
if (pkgPath) {
|
|
466653
466653
|
const splits = pkgPath.split("/");
|
|
466654
466654
|
if (splits.length > 0) {
|
|
@@ -466660,12 +466660,12 @@ var require_dist5 = __commonJS({
|
|
|
466660
466660
|
).join("/"),
|
|
466661
466661
|
"package.json"
|
|
466662
466662
|
);
|
|
466663
|
-
!silent && logger3.info(
|
|
466663
|
+
!silent && logger3 && logger3.info(
|
|
466664
466664
|
format2,
|
|
466665
466665
|
`\u26A1 Searching for package.json file in ${packageJsonPath} (index: ${i})`
|
|
466666
466666
|
);
|
|
466667
466667
|
if (_fs2.default.existsSync(packageJsonPath)) {
|
|
466668
|
-
!silent && logger3.info(
|
|
466668
|
+
!silent && logger3 && logger3.info(
|
|
466669
466669
|
format2,
|
|
466670
466670
|
`\u26A1 Found the package.json file in ${packageJsonPath} (index: ${i})`
|
|
466671
466671
|
);
|
|
@@ -466691,7 +466691,7 @@ var require_dist5 = __commonJS({
|
|
|
466691
466691
|
const external = [
|
|
466692
466692
|
// Exclude dependencies, e.g. `lodash`, `lodash/get`
|
|
466693
466693
|
...deps.map((dep) => new RegExp(`^${dep}($|\\/|\\\\)`)),
|
|
466694
|
-
...await generateExternal(options.external || [])
|
|
466694
|
+
...await generateExternal(options.external || [], options, logger3)
|
|
466695
466695
|
];
|
|
466696
466696
|
const outDir = options.outDir;
|
|
466697
466697
|
const outExtension2 = getOutputExtensionMap(options, format2, pkg.type);
|
|
@@ -467366,7 +467366,7 @@ var require_dist5 = __commonJS({
|
|
|
467366
467366
|
rawTsconfig.data.compilerOptions = {};
|
|
467367
467367
|
}
|
|
467368
467368
|
logger.info("tsc", "Getting temporary declaration directory");
|
|
467369
|
-
let declarationDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0);
|
|
467369
|
+
let declarationDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
|
|
467370
467370
|
logger.info("tsc", declarationDir);
|
|
467371
467371
|
logger.info("tsc", "Parsing tsconfig.json");
|
|
467372
467372
|
let parsedTsconfig = _typescript2.default.parseJsonConfigFileContent(
|
|
@@ -467384,8 +467384,10 @@ var require_dist5 = __commonJS({
|
|
|
467384
467384
|
emitDeclarationOnly: true
|
|
467385
467385
|
},
|
|
467386
467386
|
include: [
|
|
467387
|
-
...rawTsconfig.data.
|
|
467388
|
-
|
|
467387
|
+
...rawTsconfig.data.include?.map?.((include) => _path.join(options.projectRoot, include)) ?? {}
|
|
467388
|
+
],
|
|
467389
|
+
exclude: [
|
|
467390
|
+
...rawTsconfig.data.exclude?.map?.((exclude) => _path.join(options.projectRoot, exclude)) ?? {}
|
|
467389
467391
|
]
|
|
467390
467392
|
},
|
|
467391
467393
|
_typescript2.default.sys,
|
|
@@ -467780,7 +467782,7 @@ var require_dist5 = __commonJS({
|
|
|
467780
467782
|
async function build2(_options) {
|
|
467781
467783
|
const config = _options.config === false ? {} : await _chunk7G76EW2Rjs.loadTsupConfig.call(
|
|
467782
467784
|
void 0,
|
|
467783
|
-
process.cwd(),
|
|
467785
|
+
_options.workspaceRoot ?? process.cwd(),
|
|
467784
467786
|
_options.config === true ? void 0 : _options.config
|
|
467785
467787
|
);
|
|
467786
467788
|
const configData = typeof config.data === "function" ? await config.data(_options) : config.data;
|
|
@@ -467846,7 +467848,7 @@ var require_dist5 = __commonJS({
|
|
|
467846
467848
|
let onSuccessProcess;
|
|
467847
467849
|
let onSuccessCleanup;
|
|
467848
467850
|
const buildDependencies = /* @__PURE__ */ new Set();
|
|
467849
|
-
let depsHash = await _chunk7G76EW2Rjs.getAllDepsHash.call(void 0, process.cwd());
|
|
467851
|
+
let depsHash = await _chunk7G76EW2Rjs.getAllDepsHash.call(void 0, options.workspaceRoot ?? process.cwd());
|
|
467850
467852
|
const doOnSuccessCleanup = async () => {
|
|
467851
467853
|
if (onSuccessProcess) {
|
|
467852
467854
|
await killProcess({
|
|
@@ -467968,7 +467970,7 @@ var require_dist5 = __commonJS({
|
|
|
467968
467970
|
let shouldSkipChange = false;
|
|
467969
467971
|
if (options.watch === true) {
|
|
467970
467972
|
if (file === "package.json" && !buildDependencies.has(file)) {
|
|
467971
|
-
const currentHash = await _chunk7G76EW2Rjs.getAllDepsHash.call(void 0, process.cwd());
|
|
467973
|
+
const currentHash = await _chunk7G76EW2Rjs.getAllDepsHash.call(void 0, options.workspaceRoot ?? process.cwd());
|
|
467972
467974
|
shouldSkipChange = currentHash === depsHash;
|
|
467973
467975
|
depsHash = currentHash;
|
|
467974
467976
|
} else if (!buildDependencies.has(file)) {
|
|
@@ -474353,6 +474355,56 @@ function legacyConfig({
|
|
|
474353
474355
|
outExtension
|
|
474354
474356
|
};
|
|
474355
474357
|
}
|
|
474358
|
+
function workerConfig({
|
|
474359
|
+
entry,
|
|
474360
|
+
outDir,
|
|
474361
|
+
projectRoot,
|
|
474362
|
+
workspaceRoot,
|
|
474363
|
+
tsconfig = "tsconfig.json",
|
|
474364
|
+
debug = false,
|
|
474365
|
+
external,
|
|
474366
|
+
banner = {},
|
|
474367
|
+
verbose = false,
|
|
474368
|
+
apiReport = true,
|
|
474369
|
+
docModel = true,
|
|
474370
|
+
tsdocMetadata = true,
|
|
474371
|
+
define: define2,
|
|
474372
|
+
env,
|
|
474373
|
+
options
|
|
474374
|
+
}) {
|
|
474375
|
+
return {
|
|
474376
|
+
name: "worker",
|
|
474377
|
+
entry,
|
|
474378
|
+
format: ["esm"],
|
|
474379
|
+
target: ["chrome95"],
|
|
474380
|
+
tsconfig,
|
|
474381
|
+
projectRoot,
|
|
474382
|
+
workspaceRoot,
|
|
474383
|
+
outDir: (0, import_path2.join)(outDir, "dist", "worker"),
|
|
474384
|
+
silent: !verbose,
|
|
474385
|
+
metafile: true,
|
|
474386
|
+
shims: true,
|
|
474387
|
+
minify: false,
|
|
474388
|
+
external,
|
|
474389
|
+
platform: "browser",
|
|
474390
|
+
banner,
|
|
474391
|
+
define: define2,
|
|
474392
|
+
env,
|
|
474393
|
+
dts: false,
|
|
474394
|
+
experimentalDts: {
|
|
474395
|
+
entry,
|
|
474396
|
+
compilerOptions: {
|
|
474397
|
+
noEmit: false
|
|
474398
|
+
}
|
|
474399
|
+
},
|
|
474400
|
+
apiReport,
|
|
474401
|
+
docModel,
|
|
474402
|
+
tsdocMetadata,
|
|
474403
|
+
sourcemap: debug,
|
|
474404
|
+
clean: false,
|
|
474405
|
+
outExtension
|
|
474406
|
+
};
|
|
474407
|
+
}
|
|
474356
474408
|
function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
474357
474409
|
outputPath,
|
|
474358
474410
|
tsConfig,
|
|
@@ -474390,41 +474442,29 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
474390
474442
|
}
|
|
474391
474443
|
return ret;
|
|
474392
474444
|
}, {});
|
|
474393
|
-
|
|
474394
|
-
|
|
474395
|
-
|
|
474396
|
-
|
|
474397
|
-
|
|
474398
|
-
|
|
474399
|
-
|
|
474400
|
-
|
|
474401
|
-
|
|
474402
|
-
|
|
474403
|
-
|
|
474404
|
-
|
|
474405
|
-
|
|
474406
|
-
|
|
474407
|
-
|
|
474408
|
-
|
|
474409
|
-
|
|
474410
|
-
|
|
474411
|
-
|
|
474412
|
-
|
|
474413
|
-
|
|
474414
|
-
|
|
474415
|
-
|
|
474416
|
-
workspaceRoot,
|
|
474417
|
-
tsconfig: tsConfig,
|
|
474418
|
-
debug,
|
|
474419
|
-
banner,
|
|
474420
|
-
platform,
|
|
474421
|
-
external,
|
|
474422
|
-
verbose,
|
|
474423
|
-
define: define2,
|
|
474424
|
-
env,
|
|
474425
|
-
options
|
|
474426
|
-
})
|
|
474427
|
-
]);
|
|
474445
|
+
const params = {
|
|
474446
|
+
entry,
|
|
474447
|
+
outDir: outputPath,
|
|
474448
|
+
projectRoot,
|
|
474449
|
+
workspaceRoot,
|
|
474450
|
+
tsconfig: tsConfig,
|
|
474451
|
+
debug,
|
|
474452
|
+
banner,
|
|
474453
|
+
platform,
|
|
474454
|
+
external,
|
|
474455
|
+
verbose,
|
|
474456
|
+
apiReport,
|
|
474457
|
+
docModel,
|
|
474458
|
+
tsdocMetadata,
|
|
474459
|
+
define: define2,
|
|
474460
|
+
env,
|
|
474461
|
+
options
|
|
474462
|
+
};
|
|
474463
|
+
const config = [modernConfig(params), legacyConfig(params)];
|
|
474464
|
+
if (platform === "node") {
|
|
474465
|
+
config.push(workerConfig(params));
|
|
474466
|
+
}
|
|
474467
|
+
return (0, import_tsup.defineConfig)(config);
|
|
474428
474468
|
}
|
|
474429
474469
|
var outExtension = ({ options, format: format2, pkgType }) => {
|
|
474430
474470
|
console.log(options);
|
|
@@ -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=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/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=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/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=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/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=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/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) {
|
|
@@ -6749,13 +6749,12 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
6749
6749
|
};
|
|
6750
6750
|
}
|
|
6751
6751
|
function ensureTempDeclarationDir(options) {
|
|
6752
|
-
const
|
|
6753
|
-
const dirPath = _path2.default.join(cwd, "tmp", ".tsup", "declaration");
|
|
6752
|
+
const dirPath = _path2.default.join(options.workspaceRoot, "tmp", ".tsup", "declaration");
|
|
6754
6753
|
if (_fs2.default.existsSync(dirPath)) {
|
|
6755
6754
|
return dirPath;
|
|
6756
6755
|
}
|
|
6757
6756
|
_fs2.default.mkdirSync(dirPath, { recursive: true });
|
|
6758
|
-
const gitIgnorePath = _path2.default.join(
|
|
6757
|
+
const gitIgnorePath = _path2.default.join(options.workspaceRoot, "tmp", ".tsup", ".gitignore");
|
|
6759
6758
|
writeFileSync(gitIgnorePath, "**/*\n");
|
|
6760
6759
|
return dirPath;
|
|
6761
6760
|
}
|
|
@@ -6830,9 +6829,9 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
6830
6829
|
}
|
|
6831
6830
|
});
|
|
6832
6831
|
|
|
6833
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
6832
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-UIX4URMV.js
|
|
6834
6833
|
var require_chunk_UIX4URMV = __commonJS({
|
|
6835
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
6834
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
|
|
6836
6835
|
"use strict";
|
|
6837
6836
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6838
6837
|
function _interopRequireWildcard(obj) {
|
|
@@ -7766,9 +7765,9 @@ var require_dist2 = __commonJS({
|
|
|
7766
7765
|
}
|
|
7767
7766
|
});
|
|
7768
7767
|
|
|
7769
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
7768
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-7G76EW2R.js
|
|
7770
7769
|
var require_chunk_7G76EW2R = __commonJS({
|
|
7771
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
7770
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
|
|
7772
7771
|
"use strict";
|
|
7773
7772
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7774
7773
|
function _interopRequireDefault(obj) {
|
|
@@ -249451,9 +249450,9 @@ var require_chokidar = __commonJS({
|
|
|
249451
249450
|
}
|
|
249452
249451
|
});
|
|
249453
249452
|
|
|
249454
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
249453
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/index.js
|
|
249455
249454
|
var require_dist5 = __commonJS({
|
|
249456
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
249455
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=ern7pjpfwxhrvg43ny7xz5rwvu_@microsoft+api-extractor@7.38.3_@swc+core@1._njdlrjkfcocb344y47h2ugwrmq/node_modules/tsup/dist/index.js"(exports) {
|
|
249457
249456
|
"use strict";
|
|
249458
249457
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
249459
249458
|
function _interopRequireDefault(obj) {
|
|
@@ -251020,14 +251019,15 @@ var require_dist5 = __commonJS({
|
|
|
251020
251019
|
".js": extension.js || defaultExtension.js
|
|
251021
251020
|
};
|
|
251022
251021
|
};
|
|
251023
|
-
var generateExternal = async (external) => {
|
|
251022
|
+
var generateExternal = async (external, options, logger3) => {
|
|
251024
251023
|
const result = [];
|
|
251024
|
+
const pkgJsonPath = packageJsonSearch(options.outDir, options.silent, "CLI", logger3);
|
|
251025
251025
|
for (const item of external) {
|
|
251026
251026
|
if (typeof item !== "string" || !item.endsWith("package.json")) {
|
|
251027
251027
|
result.push(item);
|
|
251028
251028
|
continue;
|
|
251029
251029
|
}
|
|
251030
|
-
let pkgPath = _path2.default.isAbsolute(item) ? _path2.default.dirname(item) : _path2.default.dirname(_path2.default.resolve(process.cwd(), item));
|
|
251030
|
+
let pkgPath = _path2.default.isAbsolute(item) ? _path2.default.dirname(item) : _path2.default.dirname(_path2.default.resolve(pkgJsonPath ?? process.cwd(), item));
|
|
251031
251031
|
const deps = await _chunk7G76EW2Rjs.getProductionDeps.call(void 0, pkgPath);
|
|
251032
251032
|
result.push(...deps);
|
|
251033
251033
|
}
|
|
@@ -251035,7 +251035,7 @@ var require_dist5 = __commonJS({
|
|
|
251035
251035
|
};
|
|
251036
251036
|
var packageJsonSearch = (outDir, silent, format, logger3) => {
|
|
251037
251037
|
let pkgPath = outDir ? outDir : process.cwd();
|
|
251038
|
-
!silent && logger3.info(format, `\u26A1 Beginning search for package.json file: ${pkgPath}`);
|
|
251038
|
+
!silent && logger3 && logger3.info(format, `\u26A1 Beginning search for package.json file: ${pkgPath}`);
|
|
251039
251039
|
if (pkgPath) {
|
|
251040
251040
|
const splits = pkgPath.split("/");
|
|
251041
251041
|
if (splits.length > 0) {
|
|
@@ -251047,12 +251047,12 @@ var require_dist5 = __commonJS({
|
|
|
251047
251047
|
).join("/"),
|
|
251048
251048
|
"package.json"
|
|
251049
251049
|
);
|
|
251050
|
-
!silent && logger3.info(
|
|
251050
|
+
!silent && logger3 && logger3.info(
|
|
251051
251051
|
format,
|
|
251052
251052
|
`\u26A1 Searching for package.json file in ${packageJsonPath} (index: ${i})`
|
|
251053
251053
|
);
|
|
251054
251054
|
if (_fs2.default.existsSync(packageJsonPath)) {
|
|
251055
|
-
!silent && logger3.info(
|
|
251055
|
+
!silent && logger3 && logger3.info(
|
|
251056
251056
|
format,
|
|
251057
251057
|
`\u26A1 Found the package.json file in ${packageJsonPath} (index: ${i})`
|
|
251058
251058
|
);
|
|
@@ -251078,7 +251078,7 @@ var require_dist5 = __commonJS({
|
|
|
251078
251078
|
const external = [
|
|
251079
251079
|
// Exclude dependencies, e.g. `lodash`, `lodash/get`
|
|
251080
251080
|
...deps.map((dep) => new RegExp(`^${dep}($|\\/|\\\\)`)),
|
|
251081
|
-
...await generateExternal(options.external || [])
|
|
251081
|
+
...await generateExternal(options.external || [], options, logger3)
|
|
251082
251082
|
];
|
|
251083
251083
|
const outDir = options.outDir;
|
|
251084
251084
|
const outExtension2 = getOutputExtensionMap(options, format, pkg.type);
|
|
@@ -251753,7 +251753,7 @@ var require_dist5 = __commonJS({
|
|
|
251753
251753
|
rawTsconfig.data.compilerOptions = {};
|
|
251754
251754
|
}
|
|
251755
251755
|
logger.info("tsc", "Getting temporary declaration directory");
|
|
251756
|
-
let declarationDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0);
|
|
251756
|
+
let declarationDir = _chunkGQ77QZBOjs.ensureTempDeclarationDir.call(void 0, options);
|
|
251757
251757
|
logger.info("tsc", declarationDir);
|
|
251758
251758
|
logger.info("tsc", "Parsing tsconfig.json");
|
|
251759
251759
|
let parsedTsconfig = _typescript2.default.parseJsonConfigFileContent(
|
|
@@ -251771,8 +251771,10 @@ var require_dist5 = __commonJS({
|
|
|
251771
251771
|
emitDeclarationOnly: true
|
|
251772
251772
|
},
|
|
251773
251773
|
include: [
|
|
251774
|
-
...rawTsconfig.data.
|
|
251775
|
-
|
|
251774
|
+
...rawTsconfig.data.include?.map?.((include) => _path.join(options.projectRoot, include)) ?? {}
|
|
251775
|
+
],
|
|
251776
|
+
exclude: [
|
|
251777
|
+
...rawTsconfig.data.exclude?.map?.((exclude) => _path.join(options.projectRoot, exclude)) ?? {}
|
|
251776
251778
|
]
|
|
251777
251779
|
},
|
|
251778
251780
|
_typescript2.default.sys,
|
|
@@ -252167,7 +252169,7 @@ var require_dist5 = __commonJS({
|
|
|
252167
252169
|
async function build(_options) {
|
|
252168
252170
|
const config = _options.config === false ? {} : await _chunk7G76EW2Rjs.loadTsupConfig.call(
|
|
252169
252171
|
void 0,
|
|
252170
|
-
process.cwd(),
|
|
252172
|
+
_options.workspaceRoot ?? process.cwd(),
|
|
252171
252173
|
_options.config === true ? void 0 : _options.config
|
|
252172
252174
|
);
|
|
252173
252175
|
const configData = typeof config.data === "function" ? await config.data(_options) : config.data;
|
|
@@ -252233,7 +252235,7 @@ var require_dist5 = __commonJS({
|
|
|
252233
252235
|
let onSuccessProcess;
|
|
252234
252236
|
let onSuccessCleanup;
|
|
252235
252237
|
const buildDependencies = /* @__PURE__ */ new Set();
|
|
252236
|
-
let depsHash = await _chunk7G76EW2Rjs.getAllDepsHash.call(void 0, process.cwd());
|
|
252238
|
+
let depsHash = await _chunk7G76EW2Rjs.getAllDepsHash.call(void 0, options.workspaceRoot ?? process.cwd());
|
|
252237
252239
|
const doOnSuccessCleanup = async () => {
|
|
252238
252240
|
if (onSuccessProcess) {
|
|
252239
252241
|
await killProcess({
|
|
@@ -252355,7 +252357,7 @@ var require_dist5 = __commonJS({
|
|
|
252355
252357
|
let shouldSkipChange = false;
|
|
252356
252358
|
if (options.watch === true) {
|
|
252357
252359
|
if (file === "package.json" && !buildDependencies.has(file)) {
|
|
252358
|
-
const currentHash = await _chunk7G76EW2Rjs.getAllDepsHash.call(void 0, process.cwd());
|
|
252360
|
+
const currentHash = await _chunk7G76EW2Rjs.getAllDepsHash.call(void 0, options.workspaceRoot ?? process.cwd());
|
|
252359
252361
|
shouldSkipChange = currentHash === depsHash;
|
|
252360
252362
|
depsHash = currentHash;
|
|
252361
252363
|
} else if (!buildDependencies.has(file)) {
|
|
@@ -252390,7 +252392,8 @@ var get_config_exports = {};
|
|
|
252390
252392
|
__export(get_config_exports, {
|
|
252391
252393
|
getConfig: () => getConfig,
|
|
252392
252394
|
legacyConfig: () => legacyConfig,
|
|
252393
|
-
modernConfig: () => modernConfig
|
|
252395
|
+
modernConfig: () => modernConfig,
|
|
252396
|
+
workerConfig: () => workerConfig
|
|
252394
252397
|
});
|
|
252395
252398
|
module.exports = __toCommonJS(get_config_exports);
|
|
252396
252399
|
|
|
@@ -258685,6 +258688,56 @@ function legacyConfig({
|
|
|
258685
258688
|
outExtension
|
|
258686
258689
|
};
|
|
258687
258690
|
}
|
|
258691
|
+
function workerConfig({
|
|
258692
|
+
entry,
|
|
258693
|
+
outDir,
|
|
258694
|
+
projectRoot,
|
|
258695
|
+
workspaceRoot,
|
|
258696
|
+
tsconfig = "tsconfig.json",
|
|
258697
|
+
debug = false,
|
|
258698
|
+
external,
|
|
258699
|
+
banner = {},
|
|
258700
|
+
verbose = false,
|
|
258701
|
+
apiReport = true,
|
|
258702
|
+
docModel = true,
|
|
258703
|
+
tsdocMetadata = true,
|
|
258704
|
+
define: define2,
|
|
258705
|
+
env,
|
|
258706
|
+
options
|
|
258707
|
+
}) {
|
|
258708
|
+
return {
|
|
258709
|
+
name: "worker",
|
|
258710
|
+
entry,
|
|
258711
|
+
format: ["esm"],
|
|
258712
|
+
target: ["chrome95"],
|
|
258713
|
+
tsconfig,
|
|
258714
|
+
projectRoot,
|
|
258715
|
+
workspaceRoot,
|
|
258716
|
+
outDir: (0, import_path2.join)(outDir, "dist", "worker"),
|
|
258717
|
+
silent: !verbose,
|
|
258718
|
+
metafile: true,
|
|
258719
|
+
shims: true,
|
|
258720
|
+
minify: false,
|
|
258721
|
+
external,
|
|
258722
|
+
platform: "browser",
|
|
258723
|
+
banner,
|
|
258724
|
+
define: define2,
|
|
258725
|
+
env,
|
|
258726
|
+
dts: false,
|
|
258727
|
+
experimentalDts: {
|
|
258728
|
+
entry,
|
|
258729
|
+
compilerOptions: {
|
|
258730
|
+
noEmit: false
|
|
258731
|
+
}
|
|
258732
|
+
},
|
|
258733
|
+
apiReport,
|
|
258734
|
+
docModel,
|
|
258735
|
+
tsdocMetadata,
|
|
258736
|
+
sourcemap: debug,
|
|
258737
|
+
clean: false,
|
|
258738
|
+
outExtension
|
|
258739
|
+
};
|
|
258740
|
+
}
|
|
258688
258741
|
function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
258689
258742
|
outputPath,
|
|
258690
258743
|
tsConfig,
|
|
@@ -258722,41 +258775,29 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
258722
258775
|
}
|
|
258723
258776
|
return ret;
|
|
258724
258777
|
}, {});
|
|
258725
|
-
|
|
258726
|
-
|
|
258727
|
-
|
|
258728
|
-
|
|
258729
|
-
|
|
258730
|
-
|
|
258731
|
-
|
|
258732
|
-
|
|
258733
|
-
|
|
258734
|
-
|
|
258735
|
-
|
|
258736
|
-
|
|
258737
|
-
|
|
258738
|
-
|
|
258739
|
-
|
|
258740
|
-
|
|
258741
|
-
|
|
258742
|
-
|
|
258743
|
-
|
|
258744
|
-
|
|
258745
|
-
|
|
258746
|
-
|
|
258747
|
-
|
|
258748
|
-
workspaceRoot,
|
|
258749
|
-
tsconfig: tsConfig,
|
|
258750
|
-
debug,
|
|
258751
|
-
banner,
|
|
258752
|
-
platform,
|
|
258753
|
-
external,
|
|
258754
|
-
verbose,
|
|
258755
|
-
define: define2,
|
|
258756
|
-
env,
|
|
258757
|
-
options
|
|
258758
|
-
})
|
|
258759
|
-
]);
|
|
258778
|
+
const params = {
|
|
258779
|
+
entry,
|
|
258780
|
+
outDir: outputPath,
|
|
258781
|
+
projectRoot,
|
|
258782
|
+
workspaceRoot,
|
|
258783
|
+
tsconfig: tsConfig,
|
|
258784
|
+
debug,
|
|
258785
|
+
banner,
|
|
258786
|
+
platform,
|
|
258787
|
+
external,
|
|
258788
|
+
verbose,
|
|
258789
|
+
apiReport,
|
|
258790
|
+
docModel,
|
|
258791
|
+
tsdocMetadata,
|
|
258792
|
+
define: define2,
|
|
258793
|
+
env,
|
|
258794
|
+
options
|
|
258795
|
+
};
|
|
258796
|
+
const config = [modernConfig(params), legacyConfig(params)];
|
|
258797
|
+
if (platform === "node") {
|
|
258798
|
+
config.push(workerConfig(params));
|
|
258799
|
+
}
|
|
258800
|
+
return (0, import_tsup.defineConfig)(config);
|
|
258760
258801
|
}
|
|
258761
258802
|
var outExtension = ({ options, format, pkgType }) => {
|
|
258762
258803
|
console.log(options);
|
|
@@ -258784,7 +258825,8 @@ var outExtension = ({ options, format, pkgType }) => {
|
|
|
258784
258825
|
0 && (module.exports = {
|
|
258785
258826
|
getConfig,
|
|
258786
258827
|
legacyConfig,
|
|
258787
|
-
modernConfig
|
|
258828
|
+
modernConfig,
|
|
258829
|
+
workerConfig
|
|
258788
258830
|
});
|
|
258789
258831
|
/*! Bundled license information:
|
|
258790
258832
|
|