@storm-software/tsdown 0.27.33 → 0.28.0
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/README.md +1 -1
- package/bin/tsdown.cjs +5 -5
- package/dist/build.cjs +3 -3
- package/dist/build.js +2 -2
- package/dist/{chunk-AJHJILKV.cjs → chunk-2G7S4JNP.cjs} +1 -1
- package/dist/{chunk-GWJBIASO.js → chunk-2WT22RMQ.js} +1 -1
- package/dist/{chunk-5SNHQKE6.js → chunk-DYYOJUDM.js} +29 -18
- package/dist/{chunk-XKX45OU2.cjs → chunk-LAOTUQLN.cjs} +109 -98
- package/dist/clean.cjs +2 -2
- package/dist/clean.js +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +2 -2
- package/dist/types.d.cts +2 -2
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/bin/tsdown.cjs
CHANGED
|
@@ -210,10 +210,10 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
210
210
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
211
211
|
clean: userOptions.clean !== false,
|
|
212
212
|
emitOnAll: userOptions.emitOnAll === true,
|
|
213
|
-
dts: userOptions.
|
|
213
|
+
dts: userOptions.dts === true ? {
|
|
214
214
|
transformer: "oxc"
|
|
215
|
-
} : userOptions.
|
|
216
|
-
bundleDts: userOptions.
|
|
215
|
+
} : userOptions.dts,
|
|
216
|
+
bundleDts: userOptions.dts,
|
|
217
217
|
assets: userOptions.assets ?? [],
|
|
218
218
|
shims: userOptions.injectShims !== true,
|
|
219
219
|
bundle: userOptions.bundle !== false,
|
|
@@ -422,10 +422,10 @@ async function createProgram(config) {
|
|
|
422
422
|
const includeSrcOption = new import_commander.Option("--include-src", "Should the source files be included in the output").default(false);
|
|
423
423
|
const verboseOption = new import_commander.Option("--verbose", "Should the build process be verbose").default(false);
|
|
424
424
|
const injectShimsOption = new import_commander.Option("--inject-shims", "Should shims be injected into the output").default(true);
|
|
425
|
-
const
|
|
425
|
+
const dtsOption = new import_commander.Option("--emit-types", "Should types be emitted for the output").default(true);
|
|
426
426
|
program.command("build", {
|
|
427
427
|
isDefault: true
|
|
428
|
-
}).alias("bundle").description("Run a TypeScript build using TSDown, API-Extractor, and TSC (for type generation).").addOption(nameOption).addOption(projectRootOption).addOption(sourceRootOption).addOption(outputPathOption).addOption(platformOption).addOption(formatOption).addOption(targetOption).addOption(bundleOption).addOption(noBundleOption).addOption(cleanOption).addOption(noCleanOption).addOption(watchOption).addOption(debugOption).addOption(bannerOption).addOption(footerOption).addOption(splittingOption).addOption(treeShakingOption).addOption(generatePackageJsonOption).addOption(emitOnAllOption).addOption(metafileOption).addOption(minifyOption).addOption(includeSrcOption).addOption(verboseOption).addOption(injectShimsOption).addOption(
|
|
428
|
+
}).alias("bundle").description("Run a TypeScript build using TSDown, API-Extractor, and TSC (for type generation).").addOption(nameOption).addOption(projectRootOption).addOption(sourceRootOption).addOption(outputPathOption).addOption(platformOption).addOption(formatOption).addOption(targetOption).addOption(bundleOption).addOption(noBundleOption).addOption(cleanOption).addOption(noCleanOption).addOption(watchOption).addOption(debugOption).addOption(bannerOption).addOption(footerOption).addOption(splittingOption).addOption(treeShakingOption).addOption(generatePackageJsonOption).addOption(emitOnAllOption).addOption(metafileOption).addOption(minifyOption).addOption(includeSrcOption).addOption(verboseOption).addOption(injectShimsOption).addOption(dtsOption).action(buildAction(config));
|
|
429
429
|
program.command("clean").alias("clear").description("Clean the output directory of the project. This command will remove the 'dist' folder.").addOption(nameOption).action(cleanAction(config));
|
|
430
430
|
return program;
|
|
431
431
|
} catch (e) {
|
package/dist/build.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkLAOTUQLNcjs = require('./chunk-LAOTUQLN.cjs');
|
|
5
|
+
require('./chunk-2G7S4JNP.cjs');
|
|
6
6
|
require('./chunk-DEWYQH4B.cjs');
|
|
7
7
|
require('./chunk-USNT2KNT.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.build =
|
|
11
|
+
exports.build = _chunkLAOTUQLNcjs.build; exports.cleanOutputPath = _chunkLAOTUQLNcjs.cleanOutputPath;
|
package/dist/build.js
CHANGED
|
@@ -186,7 +186,7 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
186
186
|
"staging",
|
|
187
187
|
"production"
|
|
188
188
|
]).default("production").describe("The current runtime environment mode for the package"),
|
|
189
|
-
workspaceRoot: _zod2.default.string().trim().
|
|
189
|
+
workspaceRoot: _zod2.default.string().trim().describe("The root directory of the workspace"),
|
|
190
190
|
externalPackagePatterns: _zod2.default.array(_zod2.default.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
|
|
191
191
|
skipCache: _zod2.default.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
192
192
|
directories: WorkspaceDirectoryConfigSchema,
|
|
@@ -186,7 +186,7 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
186
186
|
"staging",
|
|
187
187
|
"production"
|
|
188
188
|
]).default("production").describe("The current runtime environment mode for the package"),
|
|
189
|
-
workspaceRoot: z.string().trim().
|
|
189
|
+
workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
|
|
190
190
|
externalPackagePatterns: z.array(z.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
|
|
191
191
|
skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
192
192
|
directories: WorkspaceDirectoryConfigSchema,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
writeSuccess,
|
|
21
21
|
writeTrace,
|
|
22
22
|
writeWarning
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-2WT22RMQ.js";
|
|
24
24
|
import {
|
|
25
25
|
DEFAULT_BUILD_OPTIONS
|
|
26
26
|
} from "./chunk-PR5HLZXS.js";
|
|
@@ -287,7 +287,7 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
|
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
-
if (!config) {
|
|
290
|
+
if (!config || Object.keys(config).length === 0) {
|
|
291
291
|
return void 0;
|
|
292
292
|
}
|
|
293
293
|
config.configFile = configFile;
|
|
@@ -348,12 +348,12 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
348
348
|
configFile: process.env[`${prefix}CONFIG_FILE`] ? correctPaths(process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
349
349
|
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? correctPaths(process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
350
350
|
directories: {
|
|
351
|
-
cache: process.env[`${prefix}CACHE_DIR`] ? correctPaths(process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
352
|
-
data: process.env[`${prefix}DATA_DIR`] ? correctPaths(process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
353
|
-
config: process.env[`${prefix}CONFIG_DIR`] ? correctPaths(process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
354
|
-
temp: process.env[`${prefix}TEMP_DIR`] ? correctPaths(process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
355
|
-
log: process.env[`${prefix}LOG_DIR`] ? correctPaths(process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
356
|
-
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
351
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? correctPaths(process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
352
|
+
data: process.env[`${prefix}DATA_DIR`] ? correctPaths(process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? correctPaths(process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
353
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? correctPaths(process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? correctPaths(process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
354
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? correctPaths(process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? correctPaths(process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
355
|
+
log: process.env[`${prefix}LOG_DIR`] ? correctPaths(process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? correctPaths(process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
356
|
+
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? correctPaths(process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
357
357
|
},
|
|
358
358
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
359
359
|
mode: (process.env[`${prefix}MODE`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT) || void 0,
|
|
@@ -573,21 +573,27 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
573
573
|
if (config.directories) {
|
|
574
574
|
if (!config.skipCache && config.directories.cache) {
|
|
575
575
|
process.env[`${prefix}CACHE_DIR`] = correctPaths(config.directories.cache);
|
|
576
|
+
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
576
577
|
}
|
|
577
578
|
if (config.directories.data) {
|
|
578
579
|
process.env[`${prefix}DATA_DIR`] = correctPaths(config.directories.data);
|
|
580
|
+
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
579
581
|
}
|
|
580
582
|
if (config.directories.config) {
|
|
581
583
|
process.env[`${prefix}CONFIG_DIR`] = correctPaths(config.directories.config);
|
|
584
|
+
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
582
585
|
}
|
|
583
586
|
if (config.directories.temp) {
|
|
584
587
|
process.env[`${prefix}TEMP_DIR`] = correctPaths(config.directories.temp);
|
|
588
|
+
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
585
589
|
}
|
|
586
590
|
if (config.directories.log) {
|
|
587
591
|
process.env[`${prefix}LOG_DIR`] = correctPaths(config.directories.log);
|
|
592
|
+
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
588
593
|
}
|
|
589
594
|
if (config.directories.build) {
|
|
590
595
|
process.env[`${prefix}BUILD_DIR`] = correctPaths(config.directories.build);
|
|
596
|
+
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
591
597
|
}
|
|
592
598
|
}
|
|
593
599
|
if (config.skipCache !== void 0) {
|
|
@@ -755,7 +761,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
|
755
761
|
// ../config-tools/src/create-storm-config.ts
|
|
756
762
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
757
763
|
var _static_cache = void 0;
|
|
758
|
-
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
764
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
759
765
|
let result;
|
|
760
766
|
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
761
767
|
let _workspaceRoot = workspaceRoot;
|
|
@@ -763,13 +769,18 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
|
|
|
763
769
|
_workspaceRoot = findWorkspaceRoot();
|
|
764
770
|
}
|
|
765
771
|
const configEnv = getConfigEnv();
|
|
766
|
-
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
767
772
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
768
|
-
if (!configFile
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
773
|
+
if (!configFile) {
|
|
774
|
+
if (!skipLogs) {
|
|
775
|
+
writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
|
|
776
|
+
logLevel: "all"
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
if (useDefault === false) {
|
|
780
|
+
return void 0;
|
|
781
|
+
}
|
|
772
782
|
}
|
|
783
|
+
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
773
784
|
result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
|
|
774
785
|
result.workspaceRoot ??= _workspaceRoot;
|
|
775
786
|
} else {
|
|
@@ -802,7 +813,7 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
802
813
|
return extension;
|
|
803
814
|
}, "createConfigExtension");
|
|
804
815
|
var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
805
|
-
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
816
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
|
|
806
817
|
setConfigEnv(config);
|
|
807
818
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
808
819
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
@@ -951,10 +962,10 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
951
962
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
952
963
|
clean: userOptions.clean !== false,
|
|
953
964
|
emitOnAll: userOptions.emitOnAll === true,
|
|
954
|
-
dts: userOptions.
|
|
965
|
+
dts: userOptions.dts === true ? {
|
|
955
966
|
transformer: "oxc"
|
|
956
|
-
} : userOptions.
|
|
957
|
-
bundleDts: userOptions.
|
|
967
|
+
} : userOptions.dts,
|
|
968
|
+
bundleDts: userOptions.dts,
|
|
958
969
|
assets: userOptions.assets ?? [],
|
|
959
970
|
shims: userOptions.injectShims !== true,
|
|
960
971
|
bundle: userOptions.bundle !== false,
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunk2G7S4JNPcjs = require('./chunk-2G7S4JNP.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
var _chunkDEWYQH4Bcjs = require('./chunk-DEWYQH4B.cjs');
|
|
@@ -79,8 +79,8 @@ var copyAssets = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (co
|
|
|
79
79
|
output: "src/"
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
82
|
+
_chunk2G7S4JNPcjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
83
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunk2G7S4JNPcjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
84
84
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
85
85
|
projectDir: projectRoot,
|
|
86
86
|
rootDir: config.workspaceRoot,
|
|
@@ -89,12 +89,12 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
89
89
|
});
|
|
90
90
|
await assetHandler.processAllAssetsOnce();
|
|
91
91
|
if (includeSrc === true) {
|
|
92
|
-
|
|
92
|
+
_chunk2G7S4JNPcjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunk2G7S4JNPcjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
93
93
|
const files = await _glob.glob.call(void 0, [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
_chunk2G7S4JNPcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
95
|
+
_chunk2G7S4JNPcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
96
|
+
_chunk2G7S4JNPcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
97
|
+
_chunk2G7S4JNPcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
98
98
|
]);
|
|
99
99
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
100
100
|
|
|
@@ -117,7 +117,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void
|
|
|
117
117
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _ => _.node, 'access', _2 => _2.data, 'optionalAccess', _3 => _3.root]) !== projectRoot && _optionalChain([dep, 'access', _4 => _4.node, 'access', _5 => _5.data, 'optionalAccess', _6 => _6.root]) !== workspaceRoot)) {
|
|
118
118
|
const projectNode = project.node;
|
|
119
119
|
if (projectNode.data.root) {
|
|
120
|
-
const projectPackageJsonPath =
|
|
120
|
+
const projectPackageJsonPath = _chunk2G7S4JNPcjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
|
|
121
121
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
122
122
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
123
123
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -128,8 +128,8 @@ var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
if (localPackages.length > 0) {
|
|
131
|
-
|
|
132
|
-
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
131
|
+
_chunk2G7S4JNPcjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
132
|
+
const projectJsonFile = await _promises.readFile.call(void 0, _chunk2G7S4JNPcjs.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
|
|
133
133
|
const projectJson = JSON.parse(projectJsonFile);
|
|
134
134
|
const projectName2 = projectJson.name;
|
|
135
135
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
@@ -138,7 +138,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void
|
|
|
138
138
|
}
|
|
139
139
|
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _9 => _9.projects, 'optionalAccess', _10 => _10[projectName2], 'access', _11 => _11.implicitDependencies, 'optionalAccess', _12 => _12.reduce, 'call', _13 => _13((ret, dep) => {
|
|
140
140
|
if (_optionalChain([projectConfigurations, 'access', _14 => _14.projects, 'optionalAccess', _15 => _15[dep]])) {
|
|
141
|
-
const depPackageJsonPath =
|
|
141
|
+
const depPackageJsonPath = _chunk2G7S4JNPcjs.joinPaths.call(void 0, workspaceRoot, projectConfigurations.projects[dep].root, "package.json");
|
|
142
142
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
143
143
|
const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
|
|
144
144
|
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
@@ -162,13 +162,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void
|
|
|
162
162
|
return ret;
|
|
163
163
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
164
164
|
} else {
|
|
165
|
-
|
|
165
|
+
_chunk2G7S4JNPcjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
166
166
|
}
|
|
167
167
|
return packageJson;
|
|
168
168
|
}, "addPackageDependencies");
|
|
169
169
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
170
|
-
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot :
|
|
171
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
170
|
+
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunk2G7S4JNPcjs.findWorkspaceRoot.call(void 0, );
|
|
171
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunk2G7S4JNPcjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
|
|
172
172
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
173
173
|
packageJson.type ??= "module";
|
|
174
174
|
packageJson.sideEffects ??= false;
|
|
@@ -177,7 +177,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.cal
|
|
|
177
177
|
if (distSrc.startsWith("/")) {
|
|
178
178
|
distSrc = distSrc.substring(1);
|
|
179
179
|
}
|
|
180
|
-
packageJson.source ??= `${
|
|
180
|
+
packageJson.source ??= `${_chunk2G7S4JNPcjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
181
181
|
}
|
|
182
182
|
packageJson.files ??= [
|
|
183
183
|
"dist/**/*"
|
|
@@ -208,7 +208,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.cal
|
|
|
208
208
|
];
|
|
209
209
|
}
|
|
210
210
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
211
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
211
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunk2G7S4JNPcjs.joinPaths.call(void 0, "packages", projectName);
|
|
212
212
|
return packageJson;
|
|
213
213
|
}, "addWorkspacePackageJsonFields");
|
|
214
214
|
var addPackageJsonExport = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
|
|
@@ -236,7 +236,7 @@ var addPackageJsonExport = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
|
|
|
236
236
|
var _c12 = require('c12');
|
|
237
237
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
238
238
|
var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
|
|
239
|
-
const workspacePath = filePath ||
|
|
239
|
+
const workspacePath = filePath || _chunk2G7S4JNPcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
240
240
|
const configs = await Promise.all([
|
|
241
241
|
_c12.loadConfig.call(void 0, {
|
|
242
242
|
cwd: workspacePath,
|
|
@@ -245,7 +245,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
|
|
|
245
245
|
envName: _optionalChain([fileName, 'optionalAccess', _24 => _24.toUpperCase, 'call', _25 => _25()]),
|
|
246
246
|
jitiOptions: {
|
|
247
247
|
debug: false,
|
|
248
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
248
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk2G7S4JNPcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
249
249
|
},
|
|
250
250
|
...options
|
|
251
251
|
}),
|
|
@@ -256,7 +256,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
|
|
|
256
256
|
envName: _optionalChain([fileName, 'optionalAccess', _26 => _26.toUpperCase, 'call', _27 => _27()]),
|
|
257
257
|
jitiOptions: {
|
|
258
258
|
debug: false,
|
|
259
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
259
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk2G7S4JNPcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
260
260
|
},
|
|
261
261
|
configFile: fileName,
|
|
262
262
|
...options
|
|
@@ -265,12 +265,12 @@ var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
|
|
|
265
265
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
266
266
|
}, "getConfigFileByName");
|
|
267
267
|
var getConfigFile = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
|
|
268
|
-
const workspacePath = filePath ? filePath :
|
|
268
|
+
const workspacePath = filePath ? filePath : _chunk2G7S4JNPcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
269
269
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
270
270
|
let config = result.config;
|
|
271
271
|
const configFile = result.configFile;
|
|
272
272
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
273
|
-
|
|
273
|
+
_chunk2G7S4JNPcjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
274
274
|
logLevel: "all"
|
|
275
275
|
});
|
|
276
276
|
}
|
|
@@ -279,7 +279,7 @@ var getConfigFile = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
279
279
|
for (const result2 of results) {
|
|
280
280
|
if (_optionalChain([result2, 'optionalAccess', _28 => _28.config]) && _optionalChain([result2, 'optionalAccess', _29 => _29.configFile]) && Object.keys(result2.config).length > 0) {
|
|
281
281
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
282
|
-
|
|
282
|
+
_chunk2G7S4JNPcjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
283
283
|
logLevel: "all"
|
|
284
284
|
});
|
|
285
285
|
}
|
|
@@ -287,7 +287,7 @@ var getConfigFile = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
-
if (!config) {
|
|
290
|
+
if (!config || Object.keys(config).length === 0) {
|
|
291
291
|
return void 0;
|
|
292
292
|
}
|
|
293
293
|
config.configFile = configFile;
|
|
@@ -345,15 +345,15 @@ var getConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
|
|
|
345
345
|
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
346
346
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
347
347
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
348
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
349
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
348
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunk2G7S4JNPcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
349
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunk2G7S4JNPcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
350
350
|
directories: {
|
|
351
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
352
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
353
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
354
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
355
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
356
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
351
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunk2G7S4JNPcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunk2G7S4JNPcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
352
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunk2G7S4JNPcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunk2G7S4JNPcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
353
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunk2G7S4JNPcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunk2G7S4JNPcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
354
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunk2G7S4JNPcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunk2G7S4JNPcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
355
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunk2G7S4JNPcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunk2G7S4JNPcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
356
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunk2G7S4JNPcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunk2G7S4JNPcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
357
357
|
},
|
|
358
358
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
359
359
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -376,24 +376,24 @@ var getConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
|
|
|
376
376
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
377
377
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
378
378
|
},
|
|
379
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ?
|
|
379
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? _chunk2G7S4JNPcjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
380
380
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
381
381
|
};
|
|
382
|
-
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
382
|
+
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunk2G7S4JNPcjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
383
383
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
384
384
|
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
385
385
|
return ret;
|
|
386
386
|
}, {}) : getThemeColorConfigEnv(prefix);
|
|
387
|
-
if (config.docs ===
|
|
388
|
-
if (config.homepage ===
|
|
389
|
-
config.docs = `${
|
|
387
|
+
if (config.docs === _chunk2G7S4JNPcjs.STORM_DEFAULT_DOCS) {
|
|
388
|
+
if (config.homepage === _chunk2G7S4JNPcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
389
|
+
config.docs = `${_chunk2G7S4JNPcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
390
390
|
} else {
|
|
391
391
|
config.docs = `${config.homepage}/docs`;
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
if (config.licensing ===
|
|
395
|
-
if (config.homepage ===
|
|
396
|
-
config.licensing = `${
|
|
394
|
+
if (config.licensing === _chunk2G7S4JNPcjs.STORM_DEFAULT_LICENSING) {
|
|
395
|
+
if (config.homepage === _chunk2G7S4JNPcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
396
|
+
config.licensing = `${_chunk2G7S4JNPcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
397
397
|
} else {
|
|
398
398
|
config.licensing = `${config.homepage}/docs`;
|
|
399
399
|
}
|
|
@@ -563,31 +563,37 @@ var setConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config
|
|
|
563
563
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
564
564
|
}
|
|
565
565
|
if (config.configFile) {
|
|
566
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
566
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunk2G7S4JNPcjs.correctPaths.call(void 0, config.configFile);
|
|
567
567
|
}
|
|
568
568
|
if (config.workspaceRoot) {
|
|
569
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
570
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
571
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
569
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunk2G7S4JNPcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
570
|
+
process.env.NX_WORKSPACE_ROOT = _chunk2G7S4JNPcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
571
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunk2G7S4JNPcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
572
572
|
}
|
|
573
573
|
if (config.directories) {
|
|
574
574
|
if (!config.skipCache && config.directories.cache) {
|
|
575
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
575
|
+
process.env[`${prefix}CACHE_DIR`] = _chunk2G7S4JNPcjs.correctPaths.call(void 0, config.directories.cache);
|
|
576
|
+
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
576
577
|
}
|
|
577
578
|
if (config.directories.data) {
|
|
578
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
579
|
+
process.env[`${prefix}DATA_DIR`] = _chunk2G7S4JNPcjs.correctPaths.call(void 0, config.directories.data);
|
|
580
|
+
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
579
581
|
}
|
|
580
582
|
if (config.directories.config) {
|
|
581
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
583
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunk2G7S4JNPcjs.correctPaths.call(void 0, config.directories.config);
|
|
584
|
+
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
582
585
|
}
|
|
583
586
|
if (config.directories.temp) {
|
|
584
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
587
|
+
process.env[`${prefix}TEMP_DIR`] = _chunk2G7S4JNPcjs.correctPaths.call(void 0, config.directories.temp);
|
|
588
|
+
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
585
589
|
}
|
|
586
590
|
if (config.directories.log) {
|
|
587
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
591
|
+
process.env[`${prefix}LOG_DIR`] = _chunk2G7S4JNPcjs.correctPaths.call(void 0, config.directories.log);
|
|
592
|
+
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
588
593
|
}
|
|
589
594
|
if (config.directories.build) {
|
|
590
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
595
|
+
process.env[`${prefix}BUILD_DIR`] = _chunk2G7S4JNPcjs.correctPaths.call(void 0, config.directories.build);
|
|
596
|
+
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
591
597
|
}
|
|
592
598
|
}
|
|
593
599
|
if (config.skipCache !== void 0) {
|
|
@@ -641,8 +647,8 @@ var setConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config
|
|
|
641
647
|
if (config.logLevel) {
|
|
642
648
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
643
649
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
644
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
645
|
-
process.env.RUST_BACKTRACE =
|
|
650
|
+
process.env.NX_VERBOSE_LOGGING = String(_chunk2G7S4JNPcjs.getLogLevel.call(void 0, config.logLevel) >= _chunk2G7S4JNPcjs.LogLevel.DEBUG ? true : false);
|
|
651
|
+
process.env.RUST_BACKTRACE = _chunk2G7S4JNPcjs.getLogLevel.call(void 0, config.logLevel) >= _chunk2G7S4JNPcjs.LogLevel.DEBUG ? "full" : "none";
|
|
646
652
|
}
|
|
647
653
|
if (config.skipConfigLogging !== void 0) {
|
|
648
654
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
@@ -755,22 +761,27 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(v
|
|
|
755
761
|
// ../config-tools/src/create-storm-config.ts
|
|
756
762
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
757
763
|
var _static_cache = void 0;
|
|
758
|
-
var createStormWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
764
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
759
765
|
let result;
|
|
760
766
|
if (!_optionalChain([_static_cache, 'optionalAccess', _52 => _52.data]) || !_optionalChain([_static_cache, 'optionalAccess', _53 => _53.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
761
767
|
let _workspaceRoot = workspaceRoot;
|
|
762
768
|
if (!_workspaceRoot) {
|
|
763
|
-
_workspaceRoot =
|
|
769
|
+
_workspaceRoot = _chunk2G7S4JNPcjs.findWorkspaceRoot.call(void 0, );
|
|
764
770
|
}
|
|
765
771
|
const configEnv = getConfigEnv();
|
|
766
|
-
const defaultConfig = await _chunkAJHJILKVcjs.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
767
772
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
768
|
-
if (!configFile
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
773
|
+
if (!configFile) {
|
|
774
|
+
if (!skipLogs) {
|
|
775
|
+
_chunk2G7S4JNPcjs.writeWarning.call(void 0, "No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
|
|
776
|
+
logLevel: "all"
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
if (useDefault === false) {
|
|
780
|
+
return void 0;
|
|
781
|
+
}
|
|
772
782
|
}
|
|
773
|
-
|
|
783
|
+
const defaultConfig = await _chunk2G7S4JNPcjs.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
784
|
+
result = await _chunk2G7S4JNPcjs.stormWorkspaceConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
774
785
|
result.workspaceRoot ??= _workspaceRoot;
|
|
775
786
|
} else {
|
|
776
787
|
result = _static_cache.data;
|
|
@@ -802,11 +813,11 @@ var createConfigExtension = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0
|
|
|
802
813
|
return extension;
|
|
803
814
|
}, "createConfigExtension");
|
|
804
815
|
var loadStormWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (workspaceRoot, skipLogs = false) => {
|
|
805
|
-
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
816
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
|
|
806
817
|
setConfigEnv(config);
|
|
807
818
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
808
|
-
|
|
809
|
-
${
|
|
819
|
+
_chunk2G7S4JNPcjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
|
|
820
|
+
${_chunk2G7S4JNPcjs.formatLogMessage.call(void 0, config)}`, config);
|
|
810
821
|
}
|
|
811
822
|
return config;
|
|
812
823
|
}, "loadStormWorkspaceConfig");
|
|
@@ -819,7 +830,7 @@ var getConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (workspace
|
|
|
819
830
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
820
831
|
|
|
821
832
|
var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
822
|
-
const workspaceRoot = config.workspaceRoot ||
|
|
833
|
+
const workspaceRoot = config.workspaceRoot || _chunk2G7S4JNPcjs.findWorkspaceRoot.call(void 0, );
|
|
823
834
|
const entryPoints = [];
|
|
824
835
|
if (entry) {
|
|
825
836
|
if (typeof entry === "string") {
|
|
@@ -831,7 +842,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
831
842
|
}
|
|
832
843
|
}
|
|
833
844
|
if (emitOnAll) {
|
|
834
|
-
entryPoints.push(
|
|
845
|
+
entryPoints.push(_chunk2G7S4JNPcjs.joinPaths.call(void 0, workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
835
846
|
}
|
|
836
847
|
const results = await Promise.all(entryPoints.map(async (entryPoint) => {
|
|
837
848
|
const paths = [];
|
|
@@ -843,9 +854,9 @@ var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
843
854
|
]
|
|
844
855
|
});
|
|
845
856
|
paths.push(...files.reduce((ret, filePath) => {
|
|
846
|
-
const result =
|
|
857
|
+
const result = _chunk2G7S4JNPcjs.correctPaths.call(void 0, _chunk2G7S4JNPcjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunk2G7S4JNPcjs.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunk2G7S4JNPcjs.correctPaths.call(void 0, projectRoot), ""));
|
|
847
858
|
if (result) {
|
|
848
|
-
|
|
859
|
+
_chunk2G7S4JNPcjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunk2G7S4JNPcjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
849
860
|
if (!paths.includes(result)) {
|
|
850
861
|
paths.push(result);
|
|
851
862
|
}
|
|
@@ -853,7 +864,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
853
864
|
return ret;
|
|
854
865
|
}, []));
|
|
855
866
|
} else {
|
|
856
|
-
|
|
867
|
+
_chunk2G7S4JNPcjs.writeDebug.call(void 0, `Trying to add entry point ${entryPoint}"`, config);
|
|
857
868
|
if (!paths.includes(entryPoint)) {
|
|
858
869
|
paths.push(entryPoint);
|
|
859
870
|
}
|
|
@@ -904,12 +915,12 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
904
915
|
throw new Error("Cannot find Nx workspace root");
|
|
905
916
|
}
|
|
906
917
|
const config = await getConfig(workspaceRoot.dir);
|
|
907
|
-
|
|
908
|
-
const stopwatch =
|
|
918
|
+
_chunk2G7S4JNPcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
919
|
+
const stopwatch = _chunk2G7S4JNPcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
909
920
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
910
921
|
exitOnError: true
|
|
911
922
|
});
|
|
912
|
-
const projectJsonPath =
|
|
923
|
+
const projectJsonPath = _chunk2G7S4JNPcjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
|
|
913
924
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
914
925
|
throw new Error("Cannot find project.json configuration");
|
|
915
926
|
}
|
|
@@ -923,7 +934,7 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
923
934
|
const options = _defu2.default.call(void 0, userOptions, _chunkDEWYQH4Bcjs.DEFAULT_BUILD_OPTIONS);
|
|
924
935
|
options.name ??= `${projectName}-${options.format}`;
|
|
925
936
|
options.target ??= DEFAULT_TARGET;
|
|
926
|
-
const packageJsonPath =
|
|
937
|
+
const packageJsonPath = _chunk2G7S4JNPcjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
927
938
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
928
939
|
throw new Error("Cannot find package.json configuration");
|
|
929
940
|
}
|
|
@@ -932,29 +943,29 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
932
943
|
...options,
|
|
933
944
|
config,
|
|
934
945
|
...userOptions,
|
|
935
|
-
tsconfig:
|
|
946
|
+
tsconfig: _chunk2G7S4JNPcjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
936
947
|
format: options.format || "cjs",
|
|
937
948
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
938
949
|
"./src/index.ts"
|
|
939
950
|
], userOptions.emitOnAll),
|
|
940
|
-
outdir: userOptions.outputPath ||
|
|
951
|
+
outdir: userOptions.outputPath || _chunk2G7S4JNPcjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
941
952
|
plugins: [],
|
|
942
953
|
name: userOptions.name || projectName,
|
|
943
954
|
projectConfigurations,
|
|
944
955
|
projectName,
|
|
945
956
|
projectGraph,
|
|
946
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
957
|
+
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunk2G7S4JNPcjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
947
958
|
minify: userOptions.minify || !userOptions.debug,
|
|
948
|
-
verbose: userOptions.verbose ||
|
|
959
|
+
verbose: userOptions.verbose || _chunk2G7S4JNPcjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
949
960
|
includeSrc: userOptions.includeSrc === true,
|
|
950
961
|
metafile: userOptions.metafile !== false,
|
|
951
962
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
952
963
|
clean: userOptions.clean !== false,
|
|
953
964
|
emitOnAll: userOptions.emitOnAll === true,
|
|
954
|
-
dts: userOptions.
|
|
965
|
+
dts: userOptions.dts === true ? {
|
|
955
966
|
transformer: "oxc"
|
|
956
|
-
} : userOptions.
|
|
957
|
-
bundleDts: userOptions.
|
|
967
|
+
} : userOptions.dts,
|
|
968
|
+
bundleDts: userOptions.dts,
|
|
958
969
|
assets: _nullishCoalesce(userOptions.assets, () => ( [])),
|
|
959
970
|
shims: userOptions.injectShims !== true,
|
|
960
971
|
bundle: userOptions.bundle !== false,
|
|
@@ -979,14 +990,14 @@ var resolveOptions = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
|
|
|
979
990
|
return result;
|
|
980
991
|
}, "resolveOptions");
|
|
981
992
|
async function generatePackageJson(options) {
|
|
982
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
983
|
-
|
|
984
|
-
const stopwatch =
|
|
985
|
-
const packageJsonPath =
|
|
993
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunk2G7S4JNPcjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
994
|
+
_chunk2G7S4JNPcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
995
|
+
const stopwatch = _chunk2G7S4JNPcjs.getStopwatch.call(void 0, "Write package.json file");
|
|
996
|
+
const packageJsonPath = _chunk2G7S4JNPcjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
986
997
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
987
998
|
throw new Error("Cannot find package.json configuration");
|
|
988
999
|
}
|
|
989
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
1000
|
+
const packageJsonFile = await _promises2.default.readFile(_chunk2G7S4JNPcjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
990
1001
|
if (!packageJsonFile) {
|
|
991
1002
|
throw new Error("Cannot find package.json configuration file");
|
|
992
1003
|
}
|
|
@@ -1025,15 +1036,15 @@ async function generatePackageJson(options) {
|
|
|
1025
1036
|
}
|
|
1026
1037
|
return ret;
|
|
1027
1038
|
}, packageJson.exports);
|
|
1028
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1039
|
+
await _devkit.writeJsonFile.call(void 0, _chunk2G7S4JNPcjs.joinPaths.call(void 0, options.outdir, "package.json"), packageJson);
|
|
1029
1040
|
stopwatch();
|
|
1030
1041
|
}
|
|
1031
1042
|
return options;
|
|
1032
1043
|
}
|
|
1033
1044
|
_chunkUSNT2KNTcjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
1034
1045
|
async function executeTSDown(options) {
|
|
1035
|
-
|
|
1036
|
-
const stopwatch =
|
|
1046
|
+
_chunk2G7S4JNPcjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
|
|
1047
|
+
const stopwatch = _chunk2G7S4JNPcjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
1037
1048
|
await _tsdown.build.call(void 0, {
|
|
1038
1049
|
...options,
|
|
1039
1050
|
entry: options.entryPoints,
|
|
@@ -1045,30 +1056,30 @@ async function executeTSDown(options) {
|
|
|
1045
1056
|
}
|
|
1046
1057
|
_chunkUSNT2KNTcjs.__name.call(void 0, executeTSDown, "executeTSDown");
|
|
1047
1058
|
async function copyBuildAssets(options) {
|
|
1048
|
-
|
|
1049
|
-
const stopwatch =
|
|
1059
|
+
_chunk2G7S4JNPcjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
|
|
1060
|
+
const stopwatch = _chunk2G7S4JNPcjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1050
1061
|
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.sourceRoot, true, false);
|
|
1051
1062
|
stopwatch();
|
|
1052
1063
|
return options;
|
|
1053
1064
|
}
|
|
1054
1065
|
_chunkUSNT2KNTcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
1055
1066
|
async function reportResults(options) {
|
|
1056
|
-
|
|
1067
|
+
_chunk2G7S4JNPcjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
|
|
1057
1068
|
}
|
|
1058
1069
|
_chunkUSNT2KNTcjs.__name.call(void 0, reportResults, "reportResults");
|
|
1059
1070
|
async function cleanOutputPath(options) {
|
|
1060
1071
|
if (options.clean !== false && options.outdir) {
|
|
1061
|
-
|
|
1062
|
-
const stopwatch =
|
|
1063
|
-
await
|
|
1072
|
+
_chunk2G7S4JNPcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${options.name} output path: ${options.outdir}`, options.config);
|
|
1073
|
+
const stopwatch = _chunk2G7S4JNPcjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1074
|
+
await _chunk2G7S4JNPcjs.cleanDirectories.call(void 0, options.name, options.outdir, options.config);
|
|
1064
1075
|
stopwatch();
|
|
1065
1076
|
}
|
|
1066
1077
|
return options;
|
|
1067
1078
|
}
|
|
1068
1079
|
_chunkUSNT2KNTcjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1069
1080
|
async function build(options) {
|
|
1070
|
-
|
|
1071
|
-
const stopwatch =
|
|
1081
|
+
_chunk2G7S4JNPcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
1082
|
+
const stopwatch = _chunk2G7S4JNPcjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
1072
1083
|
try {
|
|
1073
1084
|
const opts = Array.isArray(options) ? options : [
|
|
1074
1085
|
options
|
|
@@ -1086,11 +1097,11 @@ async function build(options) {
|
|
|
1086
1097
|
await reportResults(opt);
|
|
1087
1098
|
}));
|
|
1088
1099
|
} else {
|
|
1089
|
-
|
|
1100
|
+
_chunk2G7S4JNPcjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
|
|
1090
1101
|
}
|
|
1091
|
-
|
|
1102
|
+
_chunk2G7S4JNPcjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
1092
1103
|
} catch (error) {
|
|
1093
|
-
|
|
1104
|
+
_chunk2G7S4JNPcjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
1094
1105
|
throw error;
|
|
1095
1106
|
} finally {
|
|
1096
1107
|
stopwatch();
|
package/dist/clean.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk2G7S4JNPcjs = require('./chunk-2G7S4JNP.cjs');
|
|
5
5
|
require('./chunk-USNT2KNT.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.clean =
|
|
9
|
+
exports.clean = _chunk2G7S4JNPcjs.clean; exports.cleanDirectories = _chunk2G7S4JNPcjs.cleanDirectories;
|
package/dist/clean.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkLAOTUQLNcjs = require('./chunk-LAOTUQLN.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk2G7S4JNPcjs = require('./chunk-2G7S4JNP.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
var _chunkDEWYQH4Bcjs = require('./chunk-DEWYQH4B.cjs');
|
|
@@ -17,4 +17,4 @@ require('./chunk-SFZRYJZ2.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
exports.DEFAULT_BUILD_OPTIONS = _chunkDEWYQH4Bcjs.DEFAULT_BUILD_OPTIONS; exports.build =
|
|
20
|
+
exports.DEFAULT_BUILD_OPTIONS = _chunkDEWYQH4Bcjs.DEFAULT_BUILD_OPTIONS; exports.build = _chunkLAOTUQLNcjs.build; exports.clean = _chunk2G7S4JNPcjs.clean; exports.cleanDirectories = _chunk2G7S4JNPcjs.cleanDirectories; exports.cleanOutputPath = _chunkLAOTUQLNcjs.cleanOutputPath;
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build,
|
|
3
3
|
cleanOutputPath
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DYYOJUDM.js";
|
|
5
5
|
import {
|
|
6
6
|
clean,
|
|
7
7
|
cleanDirectories
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2WT22RMQ.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_BUILD_OPTIONS
|
|
11
11
|
} from "./chunk-PR5HLZXS.js";
|
package/dist/types.d.cts
CHANGED
|
@@ -4,7 +4,7 @@ import { Options } from 'tsdown';
|
|
|
4
4
|
|
|
5
5
|
type ExternalTSDownOptions = Omit<Options, "config" | "outDir" | "entryPoints">;
|
|
6
6
|
type TSDownOptions = Omit<Omit<ExternalTSDownOptions, "dts" | "bundleDts">, "outbase" | "outfile" | "outExtension" | "banner"> & Omit<TypeScriptBuildOptions, "format"> & {
|
|
7
|
-
|
|
7
|
+
dts?: boolean;
|
|
8
8
|
injectShims?: boolean;
|
|
9
9
|
};
|
|
10
10
|
type TSDownResolvedOptions = Omit<TypeScriptBuildResolvedOptions, "target" | "format" | "sourcemap" | "env"> & ExternalTSDownOptions & {
|
|
@@ -14,7 +14,7 @@ type TSDownResolvedOptions = Omit<TypeScriptBuildResolvedOptions, "target" | "fo
|
|
|
14
14
|
projectConfigurations: ProjectsConfigurations;
|
|
15
15
|
entryPoints: string[];
|
|
16
16
|
};
|
|
17
|
-
type TSDownCLIOptions = AdditionalCLIOptions & Pick<TSDownOptions, "name" | "entry" | "outputPath" | "platform" | "format" | "bundle" | "target" | "watch" | "clean" | "debug" | "banner" | "footer" | "splitting" | "treeShaking" | "generatePackageJson" | "emitOnAll" | "metafile" | "minify" | "includeSrc" | "verbose" | "
|
|
17
|
+
type TSDownCLIOptions = AdditionalCLIOptions & Pick<TSDownOptions, "name" | "entry" | "outputPath" | "platform" | "format" | "bundle" | "target" | "watch" | "clean" | "debug" | "banner" | "footer" | "splitting" | "treeShaking" | "generatePackageJson" | "emitOnAll" | "metafile" | "minify" | "includeSrc" | "verbose" | "dts" | "injectShims">;
|
|
18
18
|
type MaybePromise<T> = T | Promise<T>;
|
|
19
19
|
|
|
20
20
|
export type { MaybePromise, TSDownCLIOptions, TSDownOptions, TSDownResolvedOptions };
|
package/dist/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Options } from 'tsdown';
|
|
|
4
4
|
|
|
5
5
|
type ExternalTSDownOptions = Omit<Options, "config" | "outDir" | "entryPoints">;
|
|
6
6
|
type TSDownOptions = Omit<Omit<ExternalTSDownOptions, "dts" | "bundleDts">, "outbase" | "outfile" | "outExtension" | "banner"> & Omit<TypeScriptBuildOptions, "format"> & {
|
|
7
|
-
|
|
7
|
+
dts?: boolean;
|
|
8
8
|
injectShims?: boolean;
|
|
9
9
|
};
|
|
10
10
|
type TSDownResolvedOptions = Omit<TypeScriptBuildResolvedOptions, "target" | "format" | "sourcemap" | "env"> & ExternalTSDownOptions & {
|
|
@@ -14,7 +14,7 @@ type TSDownResolvedOptions = Omit<TypeScriptBuildResolvedOptions, "target" | "fo
|
|
|
14
14
|
projectConfigurations: ProjectsConfigurations;
|
|
15
15
|
entryPoints: string[];
|
|
16
16
|
};
|
|
17
|
-
type TSDownCLIOptions = AdditionalCLIOptions & Pick<TSDownOptions, "name" | "entry" | "outputPath" | "platform" | "format" | "bundle" | "target" | "watch" | "clean" | "debug" | "banner" | "footer" | "splitting" | "treeShaking" | "generatePackageJson" | "emitOnAll" | "metafile" | "minify" | "includeSrc" | "verbose" | "
|
|
17
|
+
type TSDownCLIOptions = AdditionalCLIOptions & Pick<TSDownOptions, "name" | "entry" | "outputPath" | "platform" | "format" | "bundle" | "target" | "watch" | "clean" | "debug" | "banner" | "footer" | "splitting" | "treeShaking" | "generatePackageJson" | "emitOnAll" | "metafile" | "minify" | "includeSrc" | "verbose" | "dts" | "injectShims">;
|
|
18
18
|
type MaybePromise<T> = T | Promise<T>;
|
|
19
19
|
|
|
20
20
|
export type { MaybePromise, TSDownCLIOptions, TSDownOptions, TSDownResolvedOptions };
|