@storm-software/tsdown 0.45.11 → 0.45.13

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 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
- [![Version](https://img.shields.io/badge/version-0.45.9-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-0.45.11-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
package/bin/tsdown.cjs CHANGED
@@ -133207,130 +133207,73 @@ async function createProgram(config) {
133207
133207
  const program = new import_commander.Command("storm-tsdown");
133208
133208
  program.version("1.0.0", "-v --version", "display CLI version");
133209
133209
  program.description("\u26A1 Run the Storm TSDown pipeline").showHelpAfterError().showSuggestionAfterError();
133210
- const projectRootOption = new import_commander.Option(
133210
+ program.command("build", { isDefault: true }).alias("bundle").description(
133211
+ "Run a TypeScript build using ESBuild, API-Extractor, and TSC (for type generation)."
133212
+ ).option("-n --name <value>", "The name of the project to build").option(
133211
133213
  "-p --project-root <path>",
133212
133214
  "The path to the root of the project to build. This path is defined relative to the workspace root."
133213
- ).makeOptionMandatory(true);
133214
- const sourceRootOption = new import_commander.Option(
133215
+ ).option(
133215
133216
  "-s --source-root <path>",
133216
133217
  "The path of the project's source folder to build"
133217
- );
133218
- const nameOption = new import_commander.Option(
133219
- "-n --name <value>",
133220
- "The name of the project to build"
133221
- );
133222
- const outputPathOption = new import_commander.Option(
133218
+ ).option(
133223
133219
  "-o --output-path <path>",
133224
- "The path of the project's source folder to build"
133225
- ).default("dist/{projectRoot}");
133226
- const platformOption = new import_commander.Option(
133220
+ "The path of the project's source folder to build",
133221
+ "dist/{projectRoot}"
133222
+ ).option(
133227
133223
  "-p --platform <value>",
133228
- "The platform to build the distribution for"
133229
- ).choices(["node", "neutral", "browser"]).default("node");
133230
- const formatOption = new import_commander.Option(
133224
+ "The platform to build the distribution for",
133225
+ "node"
133226
+ ).option(
133231
133227
  "-f, --format <value...>",
133232
- "The format to build the distribution in"
133233
- ).choices(["esm", "cjs", "iife"]).argParser((value, previous) => {
133234
- if (previous === void 0) {
133235
- return [value];
133236
- } else if (!previous.includes(value)) {
133237
- previous.push(value);
133238
- }
133239
- return previous;
133240
- }).default("esm");
133241
- const cleanOption = new import_commander.Option(
133228
+ "The format to build the distribution in",
133229
+ (value, previous) => {
133230
+ if (previous === void 0) {
133231
+ return [value];
133232
+ } else if (Array.isArray(previous) && !previous.includes(value)) {
133233
+ previous.push(value);
133234
+ }
133235
+ return previous;
133236
+ },
133237
+ ["esm"]
133238
+ ).option(
133239
+ "-t --target <value>",
133240
+ "The target to build the distribution for",
133241
+ "ESNext"
133242
+ ).option("-b --bundle", "Should the output be bundled", true).option("--no-bundle", "Should the output be bundled").option(
133242
133243
  "-c --clean",
133243
- "Should the output directory be cleaned before building"
133244
- ).default(true);
133245
- const noCleanOption = new import_commander.Option(
133244
+ "Should the output directory be cleaned before building",
133245
+ true
133246
+ ).option(
133246
133247
  "--no-clean",
133247
133248
  "Should the output directory be cleaned before building"
133248
- ).default(false);
133249
- const bundleOption = new import_commander.Option(
133250
- "-b --bundle",
133251
- "Should the output be bundled"
133252
- ).default(true);
133253
- const noBundleOption = new import_commander.Option(
133254
- "--no-bundle",
133255
- "Should the output be bundled"
133256
- ).default(false);
133257
- const targetOption = new import_commander.Option(
133258
- "-t --target <value>",
133259
- "The target to build the distribution for"
133260
- ).choices([
133261
- "ESNext",
133262
- "ES2015",
133263
- "ES2016",
133264
- "ES2017",
133265
- "ES2018",
133266
- "ES2019",
133267
- "ES2020",
133268
- "ES2021",
133269
- "ES2022",
133270
- "ES2023"
133271
- ]).default("ESNext");
133272
- const watchOption = new import_commander.Option(
133273
- "-w --watch",
133274
- "Should the build process watch for changes"
133275
- ).default(false);
133276
- const debugOption = new import_commander.Option(
133277
- "-d --debug",
133278
- "Should the build process run in debug mode"
133279
- ).default(false);
133280
- const bannerOption = new import_commander.Option(
133281
- "--banner <value>",
133282
- "The banner to prepend to the output"
133283
- );
133284
- const footerOption = new import_commander.Option(
133285
- "--footer <value>",
133286
- "The footer to prepend to the output"
133287
- );
133288
- const splittingOption = new import_commander.Option(
133249
+ ).option("-w --watch", "Should the build process watch for changes").option(
133250
+ "-m --mode",
133251
+ "What mode should the build process run in",
133252
+ "production"
133253
+ ).option("--banner <value>", "The banner to prepend to the output").option("--footer <value>", "The footer to prepend to the output").option(
133289
133254
  "--splitting",
133290
- "Should the output be split into multiple files"
133291
- ).default(true);
133292
- const treeShakingOption = new import_commander.Option(
133293
- "--tree-shaking",
133294
- "Should tree shaking be enabled"
133295
- ).default(true);
133296
- const generatePackageJsonOption = new import_commander.Option(
133255
+ "Should the output be split into multiple files",
133256
+ true
133257
+ ).option("--treeshake", "Should tree shaking be enabled", true).option(
133297
133258
  "--generate-package-json",
133298
- "Should a package.json be generated for the output"
133299
- ).default(true);
133300
- const emitOnAllOption = new import_commander.Option(
133301
- "--emit-on-all",
133302
- "Should the output be emitted on all platforms"
133303
- ).default(false);
133304
- const metafileOption = new import_commander.Option(
133259
+ "Should a package.json be generated for the output",
133260
+ true
133261
+ ).option(
133305
133262
  "--metafile",
133306
- "Should a metafile be generated for the output"
133307
- ).default(true);
133308
- const minifyOption = new import_commander.Option(
133309
- "--minify",
133310
- "Should the output be minified"
133311
- ).default(true);
133312
- const includeSrcOption = new import_commander.Option(
133263
+ "Should a metafile be generated for the output",
133264
+ true
133265
+ ).option("--minify", "Should the output be minified", true).option(
133313
133266
  "--include-src",
133314
- "Should the source files be included in the output"
133315
- ).default(false);
133316
- const verboseOption = new import_commander.Option(
133317
- "--verbose",
133318
- "Should the build process be verbose"
133319
- ).default(false);
133320
- const injectShimsOption = new import_commander.Option(
133321
- "--inject-shims",
133322
- "Should shims be injected into the output"
133323
- ).default(true);
133324
- const dtsOption = new import_commander.Option(
133325
- "--emit-types",
133326
- "Should types be emitted for the output"
133327
- ).default(true);
133328
- program.command("build", { isDefault: true }).alias("bundle").description(
133329
- "Run a TypeScript build using TSDown, API-Extractor, and TSC (for type generation)."
133330
- ).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));
133267
+ "Should the source files be included in the output",
133268
+ false
133269
+ ).option("--shims", "Should shims be injected into the output", true).option(
133270
+ "--dts",
133271
+ "Should typescript type declarations be emitted for the output",
133272
+ true
133273
+ ).action(buildAction(config));
133331
133274
  program.command("clean").alias("clear").description(
133332
133275
  "Clean the output directory of the project. This command will remove the 'dist' folder."
133333
- ).addOption(nameOption).action(cleanAction(config));
133276
+ ).option("-n --name <value>", "The name of the project to build").action(cleanAction(config));
133334
133277
  return program;
133335
133278
  } catch (e7) {
133336
133279
  (0, import_console3.writeFatal)(
@@ -133343,8 +133286,7 @@ async function createProgram(config) {
133343
133286
  var buildAction = (config) => async (options8) => {
133344
133287
  try {
133345
133288
  await build({
133346
- ...options8,
133347
- format: options8.format
133289
+ ...options8
133348
133290
  });
133349
133291
  } catch (e7) {
133350
133292
  (0, import_console3.writeFatal)(
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { build, cleanOutputPath } from './build.cjs';
2
2
  export { clean, cleanDirectories } from './clean.cjs';
3
3
  export { getDefaultOptions, toTSDownFormat } from './config.cjs';
4
- export { MaybePromise, TSDownOptions, TSDownResolvedOptions } from './types.cjs';
4
+ export { MaybePromise, TSDownCLIOptions, TSDownOptions, TSDownResolvedOptions } from './types.cjs';
5
5
  import '@storm-software/config';
6
6
  import '@nx/devkit';
7
7
  import '@storm-software/build-tools';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { build, cleanOutputPath } from './build.js';
2
2
  export { clean, cleanDirectories } from './clean.js';
3
3
  export { getDefaultOptions, toTSDownFormat } from './config.js';
4
- export { MaybePromise, TSDownOptions, TSDownResolvedOptions } from './types.js';
4
+ export { MaybePromise, TSDownCLIOptions, TSDownOptions, TSDownResolvedOptions } from './types.js';
5
5
  import '@storm-software/config';
6
6
  import '@nx/devkit';
7
7
  import '@storm-software/build-tools';
package/dist/types.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ProjectGraph, ProjectsConfigurations } from '@nx/devkit';
2
- import { TypeScriptBuildOptions } from '@storm-software/build-tools';
2
+ import { TypeScriptBuildOptions, AdditionalCLIOptions } from '@storm-software/build-tools';
3
3
  import { StormWorkspaceConfig } from '@storm-software/config/types';
4
4
  import { Options } from 'tsdown';
5
5
 
@@ -16,5 +16,6 @@ type TSDownResolvedOptions = Options & Required<Pick<Options, "entry" | "outDir"
16
16
  projectConfigurations?: ProjectsConfigurations;
17
17
  };
18
18
  type MaybePromise<T> = T | Promise<T>;
19
+ type TSDownCLIOptions = AdditionalCLIOptions & TSDownOptions;
19
20
 
20
- export type { MaybePromise, TSDownOptions, TSDownResolvedOptions };
21
+ export type { MaybePromise, TSDownCLIOptions, TSDownOptions, TSDownResolvedOptions };
package/dist/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ProjectGraph, ProjectsConfigurations } from '@nx/devkit';
2
- import { TypeScriptBuildOptions } from '@storm-software/build-tools';
2
+ import { TypeScriptBuildOptions, AdditionalCLIOptions } from '@storm-software/build-tools';
3
3
  import { StormWorkspaceConfig } from '@storm-software/config/types';
4
4
  import { Options } from 'tsdown';
5
5
 
@@ -16,5 +16,6 @@ type TSDownResolvedOptions = Options & Required<Pick<Options, "entry" | "outDir"
16
16
  projectConfigurations?: ProjectsConfigurations;
17
17
  };
18
18
  type MaybePromise<T> = T | Promise<T>;
19
+ type TSDownCLIOptions = AdditionalCLIOptions & TSDownOptions;
19
20
 
20
- export type { MaybePromise, TSDownOptions, TSDownResolvedOptions };
21
+ export type { MaybePromise, TSDownCLIOptions, TSDownOptions, TSDownResolvedOptions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/tsdown",
3
- "version": "0.45.11",
3
+ "version": "0.45.13",
4
4
  "type": "module",
5
5
  "description": "A package containing `tsdown` utilities for building Storm Software libraries and applications",
6
6
  "repository": {
@@ -146,12 +146,12 @@
146
146
  "tsdown": { "optional": false }
147
147
  },
148
148
  "dependencies": {
149
- "@storm-software/build-tools": "^0.158.11",
150
- "@storm-software/config": "^1.134.11",
151
- "@storm-software/config-tools": "^1.188.11",
149
+ "@storm-software/build-tools": "^0.158.13",
150
+ "@storm-software/config": "^1.134.13",
151
+ "@storm-software/config-tools": "^1.188.13",
152
152
  "chokidar": "^4.0.3",
153
153
  "commander": "^12.1.0",
154
- "es-toolkit": "^1.40.0",
154
+ "es-toolkit": "^1.41.0",
155
155
  "globby": "^14.1.0",
156
156
  "nx": "^21.4.1",
157
157
  "rolldown": "1.0.0-beta.1",
@@ -171,5 +171,5 @@
171
171
  },
172
172
  "publishConfig": { "access": "public" },
173
173
  "sideEffects": false,
174
- "gitHead": "2badf6f22c49c7b246ef5d25c0bbdbd31c93f885"
174
+ "gitHead": "029d9e5632710490198e9fac989e7aa85b9dd1b9"
175
175
  }