@storm-software/workspace-tools 1.30.9 → 1.30.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 +120 -44
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +120 -44
- package/src/executors/tsup/get-config.js +0 -1
- package/src/executors/tsup-browser/executor.js +120 -44
- package/src/executors/tsup-neutral/executor.js +120 -44
- package/src/executors/tsup-node/executor.js +120 -44
package/package.json
CHANGED
|
@@ -117041,12 +117041,82 @@ function modernConfig({
|
|
|
117041
117041
|
outExtension
|
|
117042
117042
|
};
|
|
117043
117043
|
}
|
|
117044
|
+
function legacyConfig({
|
|
117045
|
+
entry,
|
|
117046
|
+
outDir,
|
|
117047
|
+
projectRoot,
|
|
117048
|
+
workspaceRoot,
|
|
117049
|
+
tsconfig = "tsconfig.json",
|
|
117050
|
+
splitting,
|
|
117051
|
+
treeshake,
|
|
117052
|
+
debug = false,
|
|
117053
|
+
external,
|
|
117054
|
+
banner = {},
|
|
117055
|
+
platform = "neutral",
|
|
117056
|
+
verbose = false,
|
|
117057
|
+
shims = true,
|
|
117058
|
+
define: define2,
|
|
117059
|
+
env,
|
|
117060
|
+
plugins,
|
|
117061
|
+
generatePackageJson,
|
|
117062
|
+
dtsTsConfig
|
|
117063
|
+
}) {
|
|
117064
|
+
let outputPath = (0, import_devkit.joinPathFragments)(outDir, "dist", "legacy");
|
|
117065
|
+
return {
|
|
117066
|
+
name: "legacy",
|
|
117067
|
+
entry,
|
|
117068
|
+
format: platform !== "node" ? ["cjs", "esm", "iife"] : ["cjs", "esm"],
|
|
117069
|
+
target: ["es2022", "node18"],
|
|
117070
|
+
tsconfig,
|
|
117071
|
+
splitting,
|
|
117072
|
+
generatePackageJson,
|
|
117073
|
+
treeshake: treeshake ? {
|
|
117074
|
+
preset: "recommended"
|
|
117075
|
+
} : false,
|
|
117076
|
+
projectRoot,
|
|
117077
|
+
workspaceRoot,
|
|
117078
|
+
outDir: outputPath,
|
|
117079
|
+
silent: !verbose,
|
|
117080
|
+
metafile: true,
|
|
117081
|
+
shims,
|
|
117082
|
+
external,
|
|
117083
|
+
platform,
|
|
117084
|
+
banner,
|
|
117085
|
+
define: define2,
|
|
117086
|
+
env,
|
|
117087
|
+
dts: false,
|
|
117088
|
+
experimentalDts: {
|
|
117089
|
+
entry,
|
|
117090
|
+
compilerOptions: {
|
|
117091
|
+
...dtsTsConfig,
|
|
117092
|
+
options: {
|
|
117093
|
+
...dtsTsConfig.options,
|
|
117094
|
+
outDir: outputPath
|
|
117095
|
+
}
|
|
117096
|
+
}
|
|
117097
|
+
},
|
|
117098
|
+
/*minify: debug ? false : "terser",
|
|
117099
|
+
terserOptions: {
|
|
117100
|
+
compress: true,
|
|
117101
|
+
ecma: 2020,
|
|
117102
|
+
keep_classnames: true,
|
|
117103
|
+
keep_fnames: true
|
|
117104
|
+
},*/
|
|
117105
|
+
apiReport: false,
|
|
117106
|
+
docModel: false,
|
|
117107
|
+
tsdocMetadata: false,
|
|
117108
|
+
sourcemap: debug,
|
|
117109
|
+
clean: false,
|
|
117110
|
+
tsconfigDecoratorMetadata: true,
|
|
117111
|
+
plugins,
|
|
117112
|
+
outExtension
|
|
117113
|
+
};
|
|
117114
|
+
}
|
|
117044
117115
|
function getConfig(workspaceRoot, projectRoot, getConfigFn, {
|
|
117045
117116
|
outputPath,
|
|
117046
117117
|
tsConfig,
|
|
117047
117118
|
additionalEntryPoints,
|
|
117048
117119
|
platform,
|
|
117049
|
-
emitOnAll = true,
|
|
117050
117120
|
...rest
|
|
117051
117121
|
}) {
|
|
117052
117122
|
return getConfigFn({
|
|
@@ -117255,15 +117325,15 @@ ${externalDependencies.map((dep) => {
|
|
|
117255
117325
|
const pathToPackageJson = (0, import_path3.join)(context.root, projectRoot, "package.json");
|
|
117256
117326
|
const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit2.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
|
|
117257
117327
|
delete packageJson.dependencies;
|
|
117258
|
-
externalDependencies.forEach((
|
|
117259
|
-
const packageConfig =
|
|
117260
|
-
if (packageConfig?.packageName && !!(projectGraph.externalNodes[
|
|
117328
|
+
externalDependencies.forEach((externalDependency) => {
|
|
117329
|
+
const packageConfig = externalDependency.node.data;
|
|
117330
|
+
if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
|
|
117261
117331
|
const { packageName, version } = packageConfig;
|
|
117262
117332
|
if (workspacePackageJson.dependencies?.[packageName] || workspacePackageJson.devDependencies?.[packageName]) {
|
|
117263
117333
|
return;
|
|
117264
117334
|
}
|
|
117265
117335
|
packageJson.dependencies ??= {};
|
|
117266
|
-
packageJson.dependencies[packageName] = !!projectGraph.nodes[
|
|
117336
|
+
packageJson.dependencies[packageName] = !!projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
|
|
117267
117337
|
}
|
|
117268
117338
|
});
|
|
117269
117339
|
internalDependencies.forEach((packageName) => {
|
|
@@ -117302,7 +117372,8 @@ ${externalDependencies.map((dep) => {
|
|
|
117302
117372
|
};
|
|
117303
117373
|
packageJson.exports = Object.keys(entry).reduce(
|
|
117304
117374
|
(ret, key) => {
|
|
117305
|
-
|
|
117375
|
+
let packageJsonKey = key.startsWith("./") ? key : `./${key}`;
|
|
117376
|
+
packageJsonKey = packageJsonKey.replaceAll("/index", "");
|
|
117306
117377
|
if (!ret[packageJsonKey]) {
|
|
117307
117378
|
ret[packageJsonKey] = {
|
|
117308
117379
|
import: {
|
|
@@ -117409,53 +117480,58 @@ ${(0, import_fs3.readFileSync)(file, "utf-8")}`,
|
|
|
117409
117480
|
})
|
|
117410
117481
|
);
|
|
117411
117482
|
options.plugins.push(environmentPlugin(stormEnv));
|
|
117412
|
-
|
|
117413
|
-
|
|
117414
|
-
|
|
117415
|
-
|
|
117416
|
-
|
|
117417
|
-
|
|
117418
|
-
|
|
117419
|
-
|
|
117420
|
-
|
|
117421
|
-
|
|
117422
|
-
|
|
117423
|
-
|
|
117424
|
-
|
|
117425
|
-
|
|
117426
|
-
|
|
117427
|
-
|
|
117428
|
-
|
|
117429
|
-
|
|
117430
|
-
|
|
117431
|
-
|
|
117432
|
-
|
|
117433
|
-
|
|
117434
|
-
|
|
117435
|
-
|
|
117436
|
-
|
|
117437
|
-
|
|
117438
|
-
|
|
117439
|
-
|
|
117440
|
-
|
|
117441
|
-
|
|
117442
|
-
|
|
117443
|
-
|
|
117483
|
+
console.log("\u26A1 Building with the following entry points: ", entry);
|
|
117484
|
+
const config = (0, import_tsup.defineConfig)(
|
|
117485
|
+
Object.keys(entry).reduce((ret, key) => {
|
|
117486
|
+
const getConfigOptions = {
|
|
117487
|
+
...options,
|
|
117488
|
+
define: {
|
|
117489
|
+
__STORM_CONFIG: JSON.stringify(stormEnv)
|
|
117490
|
+
},
|
|
117491
|
+
env: {
|
|
117492
|
+
__STORM_CONFIG: JSON.stringify(stormEnv),
|
|
117493
|
+
...stormEnv
|
|
117494
|
+
},
|
|
117495
|
+
dtsTsConfig: getNormalizedTsConfig(
|
|
117496
|
+
context.root,
|
|
117497
|
+
options.outputPath,
|
|
117498
|
+
(0, import_tsc.createTypeScriptCompilationOptions)(
|
|
117499
|
+
(0, import_normalize_options.normalizeOptions)(
|
|
117500
|
+
{
|
|
117501
|
+
...options,
|
|
117502
|
+
watch: false,
|
|
117503
|
+
main: entry[key],
|
|
117504
|
+
transformers: []
|
|
117505
|
+
},
|
|
117506
|
+
context.root,
|
|
117507
|
+
sourceRoot,
|
|
117508
|
+
workspaceRoot
|
|
117509
|
+
),
|
|
117510
|
+
context
|
|
117511
|
+
)
|
|
117512
|
+
),
|
|
117513
|
+
banner: options.banner ? {
|
|
117514
|
+
js: `${options.banner}
|
|
117444
117515
|
|
|
117445
117516
|
`,
|
|
117446
|
-
|
|
117517
|
+
css: `/*
|
|
117447
117518
|
${options.banner}
|
|
117448
117519
|
*/
|
|
117449
117520
|
|
|
117450
117521
|
`
|
|
117451
|
-
|
|
117452
|
-
|
|
117453
|
-
|
|
117454
|
-
|
|
117522
|
+
} : void 0,
|
|
117523
|
+
outputPath: options.outputPath,
|
|
117524
|
+
entry: entry[key]
|
|
117525
|
+
};
|
|
117526
|
+
ret.push(
|
|
117527
|
+
getConfig(context.root, projectRoot, legacyConfig, getConfigOptions)
|
|
117528
|
+
);
|
|
117529
|
+
ret.push(
|
|
117530
|
+
getConfig(context.root, projectRoot, modernConfig, getConfigOptions)
|
|
117455
117531
|
);
|
|
117456
117532
|
return ret;
|
|
117457
117533
|
}, [])
|
|
117458
|
-
|
|
117534
|
+
);
|
|
117459
117535
|
if (typeof config === "function") {
|
|
117460
117536
|
await build(await Promise.resolve(config({})));
|
|
117461
117537
|
} else {
|
|
@@ -18474,7 +18474,6 @@ function getConfig(workspaceRoot, projectRoot, getConfigFn, {
|
|
|
18474
18474
|
tsConfig,
|
|
18475
18475
|
additionalEntryPoints,
|
|
18476
18476
|
platform,
|
|
18477
|
-
emitOnAll = true,
|
|
18478
18477
|
...rest
|
|
18479
18478
|
}) {
|
|
18480
18479
|
return getConfigFn({
|
|
@@ -117072,12 +117072,82 @@ function modernConfig({
|
|
|
117072
117072
|
outExtension
|
|
117073
117073
|
};
|
|
117074
117074
|
}
|
|
117075
|
+
function legacyConfig({
|
|
117076
|
+
entry,
|
|
117077
|
+
outDir,
|
|
117078
|
+
projectRoot,
|
|
117079
|
+
workspaceRoot,
|
|
117080
|
+
tsconfig = "tsconfig.json",
|
|
117081
|
+
splitting,
|
|
117082
|
+
treeshake,
|
|
117083
|
+
debug = false,
|
|
117084
|
+
external,
|
|
117085
|
+
banner = {},
|
|
117086
|
+
platform = "neutral",
|
|
117087
|
+
verbose = false,
|
|
117088
|
+
shims = true,
|
|
117089
|
+
define: define2,
|
|
117090
|
+
env,
|
|
117091
|
+
plugins,
|
|
117092
|
+
generatePackageJson,
|
|
117093
|
+
dtsTsConfig
|
|
117094
|
+
}) {
|
|
117095
|
+
let outputPath = (0, import_devkit.joinPathFragments)(outDir, "dist", "legacy");
|
|
117096
|
+
return {
|
|
117097
|
+
name: "legacy",
|
|
117098
|
+
entry,
|
|
117099
|
+
format: platform !== "node" ? ["cjs", "esm", "iife"] : ["cjs", "esm"],
|
|
117100
|
+
target: ["es2022", "node18"],
|
|
117101
|
+
tsconfig,
|
|
117102
|
+
splitting,
|
|
117103
|
+
generatePackageJson,
|
|
117104
|
+
treeshake: treeshake ? {
|
|
117105
|
+
preset: "recommended"
|
|
117106
|
+
} : false,
|
|
117107
|
+
projectRoot,
|
|
117108
|
+
workspaceRoot,
|
|
117109
|
+
outDir: outputPath,
|
|
117110
|
+
silent: !verbose,
|
|
117111
|
+
metafile: true,
|
|
117112
|
+
shims,
|
|
117113
|
+
external,
|
|
117114
|
+
platform,
|
|
117115
|
+
banner,
|
|
117116
|
+
define: define2,
|
|
117117
|
+
env,
|
|
117118
|
+
dts: false,
|
|
117119
|
+
experimentalDts: {
|
|
117120
|
+
entry,
|
|
117121
|
+
compilerOptions: {
|
|
117122
|
+
...dtsTsConfig,
|
|
117123
|
+
options: {
|
|
117124
|
+
...dtsTsConfig.options,
|
|
117125
|
+
outDir: outputPath
|
|
117126
|
+
}
|
|
117127
|
+
}
|
|
117128
|
+
},
|
|
117129
|
+
/*minify: debug ? false : "terser",
|
|
117130
|
+
terserOptions: {
|
|
117131
|
+
compress: true,
|
|
117132
|
+
ecma: 2020,
|
|
117133
|
+
keep_classnames: true,
|
|
117134
|
+
keep_fnames: true
|
|
117135
|
+
},*/
|
|
117136
|
+
apiReport: false,
|
|
117137
|
+
docModel: false,
|
|
117138
|
+
tsdocMetadata: false,
|
|
117139
|
+
sourcemap: debug,
|
|
117140
|
+
clean: false,
|
|
117141
|
+
tsconfigDecoratorMetadata: true,
|
|
117142
|
+
plugins,
|
|
117143
|
+
outExtension
|
|
117144
|
+
};
|
|
117145
|
+
}
|
|
117075
117146
|
function getConfig(workspaceRoot, projectRoot, getConfigFn, {
|
|
117076
117147
|
outputPath,
|
|
117077
117148
|
tsConfig,
|
|
117078
117149
|
additionalEntryPoints,
|
|
117079
117150
|
platform,
|
|
117080
|
-
emitOnAll = true,
|
|
117081
117151
|
...rest
|
|
117082
117152
|
}) {
|
|
117083
117153
|
return getConfigFn({
|
|
@@ -117286,15 +117356,15 @@ ${externalDependencies.map((dep) => {
|
|
|
117286
117356
|
const pathToPackageJson = (0, import_path3.join)(context.root, projectRoot, "package.json");
|
|
117287
117357
|
const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit2.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
|
|
117288
117358
|
delete packageJson.dependencies;
|
|
117289
|
-
externalDependencies.forEach((
|
|
117290
|
-
const packageConfig =
|
|
117291
|
-
if (packageConfig?.packageName && !!(projectGraph.externalNodes[
|
|
117359
|
+
externalDependencies.forEach((externalDependency) => {
|
|
117360
|
+
const packageConfig = externalDependency.node.data;
|
|
117361
|
+
if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
|
|
117292
117362
|
const { packageName, version } = packageConfig;
|
|
117293
117363
|
if (workspacePackageJson.dependencies?.[packageName] || workspacePackageJson.devDependencies?.[packageName]) {
|
|
117294
117364
|
return;
|
|
117295
117365
|
}
|
|
117296
117366
|
packageJson.dependencies ??= {};
|
|
117297
|
-
packageJson.dependencies[packageName] = !!projectGraph.nodes[
|
|
117367
|
+
packageJson.dependencies[packageName] = !!projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
|
|
117298
117368
|
}
|
|
117299
117369
|
});
|
|
117300
117370
|
internalDependencies.forEach((packageName) => {
|
|
@@ -117333,7 +117403,8 @@ ${externalDependencies.map((dep) => {
|
|
|
117333
117403
|
};
|
|
117334
117404
|
packageJson.exports = Object.keys(entry).reduce(
|
|
117335
117405
|
(ret, key) => {
|
|
117336
|
-
|
|
117406
|
+
let packageJsonKey = key.startsWith("./") ? key : `./${key}`;
|
|
117407
|
+
packageJsonKey = packageJsonKey.replaceAll("/index", "");
|
|
117337
117408
|
if (!ret[packageJsonKey]) {
|
|
117338
117409
|
ret[packageJsonKey] = {
|
|
117339
117410
|
import: {
|
|
@@ -117440,53 +117511,58 @@ ${(0, import_fs3.readFileSync)(file, "utf-8")}`,
|
|
|
117440
117511
|
})
|
|
117441
117512
|
);
|
|
117442
117513
|
options.plugins.push(environmentPlugin(stormEnv));
|
|
117443
|
-
|
|
117444
|
-
|
|
117445
|
-
|
|
117446
|
-
|
|
117447
|
-
|
|
117448
|
-
|
|
117449
|
-
|
|
117450
|
-
|
|
117451
|
-
|
|
117452
|
-
|
|
117453
|
-
|
|
117454
|
-
|
|
117455
|
-
|
|
117456
|
-
|
|
117457
|
-
|
|
117458
|
-
|
|
117459
|
-
|
|
117460
|
-
|
|
117461
|
-
|
|
117462
|
-
|
|
117463
|
-
|
|
117464
|
-
|
|
117465
|
-
|
|
117466
|
-
|
|
117467
|
-
|
|
117468
|
-
|
|
117469
|
-
|
|
117470
|
-
|
|
117471
|
-
|
|
117472
|
-
|
|
117473
|
-
|
|
117474
|
-
|
|
117514
|
+
console.log("\u26A1 Building with the following entry points: ", entry);
|
|
117515
|
+
const config = (0, import_tsup.defineConfig)(
|
|
117516
|
+
Object.keys(entry).reduce((ret, key) => {
|
|
117517
|
+
const getConfigOptions = {
|
|
117518
|
+
...options,
|
|
117519
|
+
define: {
|
|
117520
|
+
__STORM_CONFIG: JSON.stringify(stormEnv)
|
|
117521
|
+
},
|
|
117522
|
+
env: {
|
|
117523
|
+
__STORM_CONFIG: JSON.stringify(stormEnv),
|
|
117524
|
+
...stormEnv
|
|
117525
|
+
},
|
|
117526
|
+
dtsTsConfig: getNormalizedTsConfig(
|
|
117527
|
+
context.root,
|
|
117528
|
+
options.outputPath,
|
|
117529
|
+
(0, import_tsc.createTypeScriptCompilationOptions)(
|
|
117530
|
+
(0, import_normalize_options.normalizeOptions)(
|
|
117531
|
+
{
|
|
117532
|
+
...options,
|
|
117533
|
+
watch: false,
|
|
117534
|
+
main: entry[key],
|
|
117535
|
+
transformers: []
|
|
117536
|
+
},
|
|
117537
|
+
context.root,
|
|
117538
|
+
sourceRoot,
|
|
117539
|
+
workspaceRoot
|
|
117540
|
+
),
|
|
117541
|
+
context
|
|
117542
|
+
)
|
|
117543
|
+
),
|
|
117544
|
+
banner: options.banner ? {
|
|
117545
|
+
js: `${options.banner}
|
|
117475
117546
|
|
|
117476
117547
|
`,
|
|
117477
|
-
|
|
117548
|
+
css: `/*
|
|
117478
117549
|
${options.banner}
|
|
117479
117550
|
*/
|
|
117480
117551
|
|
|
117481
117552
|
`
|
|
117482
|
-
|
|
117483
|
-
|
|
117484
|
-
|
|
117485
|
-
|
|
117553
|
+
} : void 0,
|
|
117554
|
+
outputPath: options.outputPath,
|
|
117555
|
+
entry: entry[key]
|
|
117556
|
+
};
|
|
117557
|
+
ret.push(
|
|
117558
|
+
getConfig(context.root, projectRoot, legacyConfig, getConfigOptions)
|
|
117559
|
+
);
|
|
117560
|
+
ret.push(
|
|
117561
|
+
getConfig(context.root, projectRoot, modernConfig, getConfigOptions)
|
|
117486
117562
|
);
|
|
117487
117563
|
return ret;
|
|
117488
117564
|
}, [])
|
|
117489
|
-
|
|
117565
|
+
);
|
|
117490
117566
|
if (typeof config === "function") {
|
|
117491
117567
|
await build(await Promise.resolve(config({})));
|
|
117492
117568
|
} else {
|
|
@@ -117072,12 +117072,82 @@ function modernConfig({
|
|
|
117072
117072
|
outExtension
|
|
117073
117073
|
};
|
|
117074
117074
|
}
|
|
117075
|
+
function legacyConfig({
|
|
117076
|
+
entry,
|
|
117077
|
+
outDir,
|
|
117078
|
+
projectRoot,
|
|
117079
|
+
workspaceRoot,
|
|
117080
|
+
tsconfig = "tsconfig.json",
|
|
117081
|
+
splitting,
|
|
117082
|
+
treeshake,
|
|
117083
|
+
debug = false,
|
|
117084
|
+
external,
|
|
117085
|
+
banner = {},
|
|
117086
|
+
platform = "neutral",
|
|
117087
|
+
verbose = false,
|
|
117088
|
+
shims = true,
|
|
117089
|
+
define: define2,
|
|
117090
|
+
env,
|
|
117091
|
+
plugins,
|
|
117092
|
+
generatePackageJson,
|
|
117093
|
+
dtsTsConfig
|
|
117094
|
+
}) {
|
|
117095
|
+
let outputPath = (0, import_devkit.joinPathFragments)(outDir, "dist", "legacy");
|
|
117096
|
+
return {
|
|
117097
|
+
name: "legacy",
|
|
117098
|
+
entry,
|
|
117099
|
+
format: platform !== "node" ? ["cjs", "esm", "iife"] : ["cjs", "esm"],
|
|
117100
|
+
target: ["es2022", "node18"],
|
|
117101
|
+
tsconfig,
|
|
117102
|
+
splitting,
|
|
117103
|
+
generatePackageJson,
|
|
117104
|
+
treeshake: treeshake ? {
|
|
117105
|
+
preset: "recommended"
|
|
117106
|
+
} : false,
|
|
117107
|
+
projectRoot,
|
|
117108
|
+
workspaceRoot,
|
|
117109
|
+
outDir: outputPath,
|
|
117110
|
+
silent: !verbose,
|
|
117111
|
+
metafile: true,
|
|
117112
|
+
shims,
|
|
117113
|
+
external,
|
|
117114
|
+
platform,
|
|
117115
|
+
banner,
|
|
117116
|
+
define: define2,
|
|
117117
|
+
env,
|
|
117118
|
+
dts: false,
|
|
117119
|
+
experimentalDts: {
|
|
117120
|
+
entry,
|
|
117121
|
+
compilerOptions: {
|
|
117122
|
+
...dtsTsConfig,
|
|
117123
|
+
options: {
|
|
117124
|
+
...dtsTsConfig.options,
|
|
117125
|
+
outDir: outputPath
|
|
117126
|
+
}
|
|
117127
|
+
}
|
|
117128
|
+
},
|
|
117129
|
+
/*minify: debug ? false : "terser",
|
|
117130
|
+
terserOptions: {
|
|
117131
|
+
compress: true,
|
|
117132
|
+
ecma: 2020,
|
|
117133
|
+
keep_classnames: true,
|
|
117134
|
+
keep_fnames: true
|
|
117135
|
+
},*/
|
|
117136
|
+
apiReport: false,
|
|
117137
|
+
docModel: false,
|
|
117138
|
+
tsdocMetadata: false,
|
|
117139
|
+
sourcemap: debug,
|
|
117140
|
+
clean: false,
|
|
117141
|
+
tsconfigDecoratorMetadata: true,
|
|
117142
|
+
plugins,
|
|
117143
|
+
outExtension
|
|
117144
|
+
};
|
|
117145
|
+
}
|
|
117075
117146
|
function getConfig(workspaceRoot, projectRoot, getConfigFn, {
|
|
117076
117147
|
outputPath,
|
|
117077
117148
|
tsConfig,
|
|
117078
117149
|
additionalEntryPoints,
|
|
117079
117150
|
platform,
|
|
117080
|
-
emitOnAll = true,
|
|
117081
117151
|
...rest
|
|
117082
117152
|
}) {
|
|
117083
117153
|
return getConfigFn({
|
|
@@ -117286,15 +117356,15 @@ ${externalDependencies.map((dep) => {
|
|
|
117286
117356
|
const pathToPackageJson = (0, import_path3.join)(context.root, projectRoot, "package.json");
|
|
117287
117357
|
const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit2.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
|
|
117288
117358
|
delete packageJson.dependencies;
|
|
117289
|
-
externalDependencies.forEach((
|
|
117290
|
-
const packageConfig =
|
|
117291
|
-
if (packageConfig?.packageName && !!(projectGraph.externalNodes[
|
|
117359
|
+
externalDependencies.forEach((externalDependency) => {
|
|
117360
|
+
const packageConfig = externalDependency.node.data;
|
|
117361
|
+
if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
|
|
117292
117362
|
const { packageName, version } = packageConfig;
|
|
117293
117363
|
if (workspacePackageJson.dependencies?.[packageName] || workspacePackageJson.devDependencies?.[packageName]) {
|
|
117294
117364
|
return;
|
|
117295
117365
|
}
|
|
117296
117366
|
packageJson.dependencies ??= {};
|
|
117297
|
-
packageJson.dependencies[packageName] = !!projectGraph.nodes[
|
|
117367
|
+
packageJson.dependencies[packageName] = !!projectGraph.nodes[externalDependency.node.name] ? "latest" : version;
|
|
117298
117368
|
}
|
|
117299
117369
|
});
|
|
117300
117370
|
internalDependencies.forEach((packageName) => {
|
|
@@ -117333,7 +117403,8 @@ ${externalDependencies.map((dep) => {
|
|
|
117333
117403
|
};
|
|
117334
117404
|
packageJson.exports = Object.keys(entry).reduce(
|
|
117335
117405
|
(ret, key) => {
|
|
117336
|
-
|
|
117406
|
+
let packageJsonKey = key.startsWith("./") ? key : `./${key}`;
|
|
117407
|
+
packageJsonKey = packageJsonKey.replaceAll("/index", "");
|
|
117337
117408
|
if (!ret[packageJsonKey]) {
|
|
117338
117409
|
ret[packageJsonKey] = {
|
|
117339
117410
|
import: {
|
|
@@ -117440,53 +117511,58 @@ ${(0, import_fs3.readFileSync)(file, "utf-8")}`,
|
|
|
117440
117511
|
})
|
|
117441
117512
|
);
|
|
117442
117513
|
options.plugins.push(environmentPlugin(stormEnv));
|
|
117443
|
-
|
|
117444
|
-
|
|
117445
|
-
|
|
117446
|
-
|
|
117447
|
-
|
|
117448
|
-
|
|
117449
|
-
|
|
117450
|
-
|
|
117451
|
-
|
|
117452
|
-
|
|
117453
|
-
|
|
117454
|
-
|
|
117455
|
-
|
|
117456
|
-
|
|
117457
|
-
|
|
117458
|
-
|
|
117459
|
-
|
|
117460
|
-
|
|
117461
|
-
|
|
117462
|
-
|
|
117463
|
-
|
|
117464
|
-
|
|
117465
|
-
|
|
117466
|
-
|
|
117467
|
-
|
|
117468
|
-
|
|
117469
|
-
|
|
117470
|
-
|
|
117471
|
-
|
|
117472
|
-
|
|
117473
|
-
|
|
117474
|
-
|
|
117514
|
+
console.log("\u26A1 Building with the following entry points: ", entry);
|
|
117515
|
+
const config = (0, import_tsup.defineConfig)(
|
|
117516
|
+
Object.keys(entry).reduce((ret, key) => {
|
|
117517
|
+
const getConfigOptions = {
|
|
117518
|
+
...options,
|
|
117519
|
+
define: {
|
|
117520
|
+
__STORM_CONFIG: JSON.stringify(stormEnv)
|
|
117521
|
+
},
|
|
117522
|
+
env: {
|
|
117523
|
+
__STORM_CONFIG: JSON.stringify(stormEnv),
|
|
117524
|
+
...stormEnv
|
|
117525
|
+
},
|
|
117526
|
+
dtsTsConfig: getNormalizedTsConfig(
|
|
117527
|
+
context.root,
|
|
117528
|
+
options.outputPath,
|
|
117529
|
+
(0, import_tsc.createTypeScriptCompilationOptions)(
|
|
117530
|
+
(0, import_normalize_options.normalizeOptions)(
|
|
117531
|
+
{
|
|
117532
|
+
...options,
|
|
117533
|
+
watch: false,
|
|
117534
|
+
main: entry[key],
|
|
117535
|
+
transformers: []
|
|
117536
|
+
},
|
|
117537
|
+
context.root,
|
|
117538
|
+
sourceRoot,
|
|
117539
|
+
workspaceRoot
|
|
117540
|
+
),
|
|
117541
|
+
context
|
|
117542
|
+
)
|
|
117543
|
+
),
|
|
117544
|
+
banner: options.banner ? {
|
|
117545
|
+
js: `${options.banner}
|
|
117475
117546
|
|
|
117476
117547
|
`,
|
|
117477
|
-
|
|
117548
|
+
css: `/*
|
|
117478
117549
|
${options.banner}
|
|
117479
117550
|
*/
|
|
117480
117551
|
|
|
117481
117552
|
`
|
|
117482
|
-
|
|
117483
|
-
|
|
117484
|
-
|
|
117485
|
-
|
|
117553
|
+
} : void 0,
|
|
117554
|
+
outputPath: options.outputPath,
|
|
117555
|
+
entry: entry[key]
|
|
117556
|
+
};
|
|
117557
|
+
ret.push(
|
|
117558
|
+
getConfig(context.root, projectRoot, legacyConfig, getConfigOptions)
|
|
117559
|
+
);
|
|
117560
|
+
ret.push(
|
|
117561
|
+
getConfig(context.root, projectRoot, modernConfig, getConfigOptions)
|
|
117486
117562
|
);
|
|
117487
117563
|
return ret;
|
|
117488
117564
|
}, [])
|
|
117489
|
-
|
|
117565
|
+
);
|
|
117490
117566
|
if (typeof config === "function") {
|
|
117491
117567
|
await build(await Promise.resolve(config({})));
|
|
117492
117568
|
} else {
|