@storm-software/tsdown 0.22.2 → 0.22.4

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.22.1-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.22.3-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/dist/build.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk7QXMK5E7cjs = require('./chunk-7QXMK5E7.cjs');
4
- require('./chunk-EHVHDVI3.cjs');
3
+ var _chunkGYAZ6EIBcjs = require('./chunk-GYAZ6EIB.cjs');
4
+ require('./chunk-2Z7WS4H3.cjs');
5
5
  require('./chunk-5KRF6IVW.cjs');
6
6
  require('./chunk-USNT2KNT.cjs');
7
7
 
8
8
 
9
- exports.build = _chunk7QXMK5E7cjs.build;
9
+ exports.build = _chunkGYAZ6EIBcjs.build;
package/dist/build.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  build
3
- } from "./chunk-22FHFD4Q.js";
4
- import "./chunk-MLTU5LTF.js";
3
+ } from "./chunk-Y4MOS2JM.js";
4
+ import "./chunk-QVK624ZI.js";
5
5
  import "./chunk-UQLCBJOS.js";
6
6
  import "./chunk-SHUYVCID.js";
7
7
  export {
@@ -118,6 +118,8 @@ var ColorConfigMapSchema = _zod2.default.union([
118
118
  }),
119
119
  _zod2.default.record(_zod2.default.string(), ColorConfigSchema)
120
120
  ]);
121
+ var ExtendsItemSchema = _zod2.default.string().trim().describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
122
+ var ExtendsSchema = ExtendsItemSchema.or(_zod2.default.array(ExtendsItemSchema)).describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
121
123
  var WorkspaceBotConfigSchema = _zod2.default.object({
122
124
  name: _zod2.default.string().trim().default("Stormie-Bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
123
125
  email: _zod2.default.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
@@ -132,11 +134,11 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
132
134
  }).describe("Various directories used by the workspace to store data, cache, and configuration files");
133
135
  var StormConfigSchema = _zod2.default.object({
134
136
  $schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
135
- extends: _zod2.default.string().trim().optional().describe("The path to a base JSON file to use as a configuration preset file"),
137
+ extends: ExtendsSchema.optional(),
136
138
  name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
137
139
  namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
138
140
  organization: _zod2.default.string().trim().default("storm-software").describe("The organization of the workspace"),
139
- repository: _zod2.default.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
141
+ repository: _zod2.default.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
140
142
  license: _zod2.default.string().trim().default("Apache-2.0").describe("The license type of the package"),
141
143
  homepage: _zod2.default.string().trim().url().default(STORM_DEFAULT_HOMEPAGE).describe("The homepage of the workspace"),
142
144
  docs: _zod2.default.string().trim().url().default(STORM_DEFAULT_DOCS).describe("The base documentation site for the workspace"),
@@ -200,6 +202,7 @@ var COLOR_KEYS = [
200
202
 
201
203
  // ../config-tools/src/utilities/get-default-config.ts
202
204
  var _fs = require('fs');
205
+ var _promises = require('fs/promises');
203
206
  var _path = require('path');
204
207
 
205
208
  // ../config-tools/src/utilities/correct-paths.ts
@@ -321,17 +324,15 @@ var DEFAULT_COLOR_CONFIG = {
321
324
  "negative": "#dc2626"
322
325
  }
323
326
  };
324
- var getDefaultConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (root) => {
327
+ var getDefaultConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (root) => {
325
328
  let license = STORM_DEFAULT_LICENSE;
326
329
  let homepage = STORM_DEFAULT_HOMEPAGE;
327
- let name;
328
- let namespace;
329
- let repository;
330
+ let name = void 0;
331
+ let namespace = void 0;
332
+ let repository = void 0;
330
333
  const workspaceRoot = findWorkspaceRoot(root);
331
334
  if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
332
- const file = _fs.readFileSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"), {
333
- encoding: "utf8"
334
- });
335
+ const file = await _promises.readFile.call(void 0, joinPaths(workspaceRoot, "package.json"), "utf8");
335
336
  if (file) {
336
337
  const packageJson = JSON.parse(file);
337
338
  if (packageJson.name) {
@@ -340,8 +341,12 @@ var getDefaultConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (ro
340
341
  if (packageJson.namespace) {
341
342
  namespace = packageJson.namespace;
342
343
  }
343
- if (_optionalChain([packageJson, 'access', _2 => _2.repository, 'optionalAccess', _3 => _3.url])) {
344
- repository = _optionalChain([packageJson, 'access', _4 => _4.repository, 'optionalAccess', _5 => _5.url]);
344
+ if (packageJson.repository) {
345
+ if (typeof packageJson.repository === "string") {
346
+ repository = packageJson.repository;
347
+ } else if (packageJson.repository.url) {
348
+ repository = packageJson.repository.url;
349
+ }
345
350
  }
346
351
  if (packageJson.license) {
347
352
  license = packageJson.license;
@@ -386,7 +391,7 @@ var chalkDefault = {
386
391
  };
387
392
  var getChalk = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
388
393
  let _chalk = _chalk3.default;
389
- if (!_optionalChain([_chalk, 'optionalAccess', _6 => _6.hex]) || !_optionalChain([_chalk, 'optionalAccess', _7 => _7.bold, 'optionalAccess', _8 => _8.hex]) || !_optionalChain([_chalk, 'optionalAccess', _9 => _9.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _10 => _10.whiteBright])) {
394
+ if (!_optionalChain([_chalk, 'optionalAccess', _2 => _2.hex]) || !_optionalChain([_chalk, 'optionalAccess', _3 => _3.bold, 'optionalAccess', _4 => _4.hex]) || !_optionalChain([_chalk, 'optionalAccess', _5 => _5.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _6 => _6.whiteBright])) {
390
395
  _chalk = chalkDefault;
391
396
  }
392
397
  return _chalk;
@@ -482,7 +487,7 @@ var isVerbose = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (label = L
482
487
 
483
488
  // ../config-tools/src/logger/console.ts
484
489
  var getLogFn = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
485
- const colors = !_optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12.dark]) && !_optionalChain([config, 'access', _13 => _13.colors, 'optionalAccess', _14 => _14["base"]]) && !_optionalChain([config, 'access', _15 => _15.colors, 'optionalAccess', _16 => _16["base"], 'optionalAccess', _17 => _17.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _18 => _18.colors, 'optionalAccess', _19 => _19.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _20 => _20.colors, 'optionalAccess', _21 => _21["base"], 'optionalAccess', _22 => _22.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _23 => _23.colors, 'optionalAccess', _24 => _24["base"]]) ? _optionalChain([config, 'access', _25 => _25.colors, 'optionalAccess', _26 => _26["base"]]) : DEFAULT_COLOR_CONFIG;
490
+ const colors = !_optionalChain([config, 'access', _7 => _7.colors, 'optionalAccess', _8 => _8.dark]) && !_optionalChain([config, 'access', _9 => _9.colors, 'optionalAccess', _10 => _10["base"]]) && !_optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12["base"], 'optionalAccess', _13 => _13.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _14 => _14.colors, 'optionalAccess', _15 => _15.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17["base"], 'optionalAccess', _18 => _18.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _19 => _19.colors, 'optionalAccess', _20 => _20["base"]]) ? _optionalChain([config, 'access', _21 => _21.colors, 'optionalAccess', _22 => _22["base"]]) : DEFAULT_COLOR_CONFIG;
486
491
  const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
487
492
  if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
488
493
  return (_) => {
@@ -548,7 +553,6 @@ var writeWarning = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (messag
548
553
  var writeSuccess = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.SUCCESS, config)(message), "writeSuccess");
549
554
  var writeDebug = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
550
555
  var writeTrace = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
551
- var writeSystem = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message, config) => getLogFn(LogLevel.ALL, config)(message), "writeSystem");
552
556
  var getStopwatch = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (name) => {
553
557
  const start = process.hrtime();
554
558
  return () => {
@@ -578,7 +582,7 @@ ${Object.keys(message).filter((key) => !skip.includes(key)).map((key) => ` ${pre
578
582
  }, "formatLogMessage");
579
583
  var _isFunction = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (value) => {
580
584
  try {
581
- return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _27 => _27.constructor]) && _optionalChain([value, 'optionalAccess', _28 => _28.call]) && _optionalChain([value, 'optionalAccess', _29 => _29.apply]));
585
+ return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _23 => _23.constructor]) && _optionalChain([value, 'optionalAccess', _24 => _24.call]) && _optionalChain([value, 'optionalAccess', _25 => _25.apply]));
582
586
  } catch (e) {
583
587
  return false;
584
588
  }
@@ -615,4 +619,4 @@ _chunkUSNT2KNTcjs.__name.call(void 0, clean, "clean");
615
619
 
616
620
 
617
621
 
618
- exports.LogLevel = LogLevel; exports.STORM_DEFAULT_DOCS = STORM_DEFAULT_DOCS; exports.STORM_DEFAULT_HOMEPAGE = STORM_DEFAULT_HOMEPAGE; exports.STORM_DEFAULT_LICENSING = STORM_DEFAULT_LICENSING; exports.COLOR_KEYS = COLOR_KEYS; exports.correctPaths = correctPaths; exports.joinPaths = joinPaths; exports.findWorkspaceRoot = findWorkspaceRoot; exports.getDefaultConfig = getDefaultConfig; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.isVerbose = isVerbose; exports.writeFatal = writeFatal; exports.writeWarning = writeWarning; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.writeSystem = writeSystem; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage; exports.clean = clean;
622
+ exports.LogLevel = LogLevel; exports.STORM_DEFAULT_DOCS = STORM_DEFAULT_DOCS; exports.STORM_DEFAULT_HOMEPAGE = STORM_DEFAULT_HOMEPAGE; exports.STORM_DEFAULT_LICENSING = STORM_DEFAULT_LICENSING; exports.StormConfigSchema = StormConfigSchema; exports.COLOR_KEYS = COLOR_KEYS; exports.correctPaths = correctPaths; exports.joinPaths = joinPaths; exports.findWorkspaceRoot = findWorkspaceRoot; exports.getDefaultConfig = getDefaultConfig; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.isVerbose = isVerbose; exports.writeFatal = writeFatal; exports.writeWarning = writeWarning; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage; exports.clean = clean;