@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 +1 -1
- package/dist/build.cjs +3 -3
- package/dist/build.js +2 -2
- package/dist/{chunk-EHVHDVI3.cjs → chunk-2Z7WS4H3.cjs} +20 -16
- package/dist/{chunk-7QXMK5E7.cjs → chunk-GYAZ6EIB.cjs} +318 -306
- package/dist/{chunk-MLTU5LTF.js → chunk-QVK624ZI.js} +18 -14
- package/dist/{chunk-22FHFD4Q.js → chunk-Y4MOS2JM.js} +261 -249
- package/dist/clean.cjs +2 -2
- package/dist/clean.d.cts +13 -13
- package/dist/clean.d.ts +13 -13
- package/dist/clean.js +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +2 -2
- package/dist/tsdown.cjs +5 -5
- package/package.json +4 -4
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/dist/build.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
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 =
|
|
9
|
+
exports.build = _chunkGYAZ6EIBcjs.build;
|
package/dist/build.js
CHANGED
|
@@ -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:
|
|
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().
|
|
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 =
|
|
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 (
|
|
344
|
-
|
|
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',
|
|
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',
|
|
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',
|
|
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.
|
|
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;
|