@storm-software/unbuild 0.47.8 → 0.48.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/unbuild.cjs +59 -17
- package/bin/unbuild.js +59 -17
- package/dist/build.cjs +7 -7
- package/dist/build.js +6 -6
- package/dist/{chunk-Q4VUCJPK.cjs → chunk-5QHOUJSC.cjs} +2 -2
- package/dist/{chunk-PCGRQKDH.js → chunk-GBXPCTSG.js} +1 -1
- package/dist/{chunk-FAW45G3E.cjs → chunk-HUI55NUC.cjs} +3 -3
- package/dist/{chunk-MO3MUSJO.cjs → chunk-KJIKKRIX.cjs} +2 -2
- package/dist/{chunk-ATN45QRM.js → chunk-OQIN5ERP.js} +16 -9
- package/dist/{chunk-Q2G4VMOW.cjs → chunk-P2WBOEJE.cjs} +55 -18
- package/dist/{chunk-XQLLOGJZ.js → chunk-RJSLIE4Z.js} +52 -15
- package/dist/{chunk-4KHUAP4R.js → chunk-ROYXERFP.js} +1 -1
- package/dist/{chunk-WQLDD6CA.js → chunk-VNJUHNMI.js} +1 -1
- package/dist/{chunk-Q3NBYYR4.cjs → chunk-XSOPMWCC.cjs} +3 -3
- package/dist/{chunk-ALGMIE4E.cjs → chunk-YOFEBICP.cjs} +110 -103
- package/dist/{chunk-XWLZOFQ4.js → chunk-ZU57QIGP.js} +1 -1
- package/dist/clean.cjs +3 -3
- package/dist/clean.js +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.js +6 -6
- package/dist/plugins/analyze.cjs +3 -3
- package/dist/plugins/analyze.js +2 -2
- package/dist/plugins/on-error.cjs +3 -3
- package/dist/plugins/on-error.js +2 -2
- package/dist/plugins/tsc.cjs +3 -3
- package/dist/plugins/tsc.js +2 -2
- package/package.json +4 -4
|
@@ -203,10 +203,10 @@ var isVerbose = (label = LogLevelLabel.SILENT) => {
|
|
|
203
203
|
};
|
|
204
204
|
|
|
205
205
|
// ../config/src/constants.ts
|
|
206
|
-
var STORM_DEFAULT_DOCS = "https://
|
|
206
|
+
var STORM_DEFAULT_DOCS = "https://stormsoftware.com/docs";
|
|
207
207
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
208
208
|
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
209
|
-
var STORM_DEFAULT_LICENSING = "https://
|
|
209
|
+
var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
|
|
210
210
|
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
211
211
|
var STORM_DEFAULT_RELEASE_BANNER = "https://public.storm-cdn.com/brand-banner.png";
|
|
212
212
|
var STORM_DEFAULT_ACCOUNT_TWITTER = "StormSoftwareHQ";
|
|
@@ -380,10 +380,13 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
380
380
|
organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
381
381
|
repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
382
382
|
license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
383
|
-
homepage: z.string().trim().url().
|
|
384
|
-
docs: z.string().trim().url().
|
|
385
|
-
licensing: z.string().trim().url().
|
|
386
|
-
contact: z.string().trim().url().
|
|
383
|
+
homepage: z.string().trim().url().optional().describe("The homepage of the workspace"),
|
|
384
|
+
docs: z.string().trim().url().optional().describe("The documentation site for the workspace"),
|
|
385
|
+
licensing: z.string().trim().url().optional().describe("The licensing site for the workspace"),
|
|
386
|
+
contact: z.string().trim().url().optional().describe("The contact site for the workspace"),
|
|
387
|
+
support: z.string().trim().url().optional().describe(
|
|
388
|
+
"The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
389
|
+
),
|
|
387
390
|
branch: z.string().trim().default("main").describe("The branch of the workspace"),
|
|
388
391
|
preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
389
392
|
owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
@@ -579,9 +582,10 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
579
582
|
negative: "#dc2626"
|
|
580
583
|
}
|
|
581
584
|
};
|
|
582
|
-
|
|
585
|
+
async function getPackageJsonConfig(root) {
|
|
583
586
|
let license = STORM_DEFAULT_LICENSE;
|
|
584
|
-
let homepage =
|
|
587
|
+
let homepage = void 0;
|
|
588
|
+
let support = void 0;
|
|
585
589
|
let name = void 0;
|
|
586
590
|
let namespace = void 0;
|
|
587
591
|
let repository = void 0;
|
|
@@ -612,6 +616,13 @@ var getDefaultConfig = async (root) => {
|
|
|
612
616
|
if (packageJson.homepage) {
|
|
613
617
|
homepage = packageJson.homepage;
|
|
614
618
|
}
|
|
619
|
+
if (packageJson.bugs) {
|
|
620
|
+
if (typeof packageJson.bugs === "string") {
|
|
621
|
+
support = packageJson.bugs;
|
|
622
|
+
} else if (packageJson.bugs.url) {
|
|
623
|
+
support = packageJson.bugs.url;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
615
626
|
}
|
|
616
627
|
}
|
|
617
628
|
return {
|
|
@@ -621,13 +632,38 @@ var getDefaultConfig = async (root) => {
|
|
|
621
632
|
repository,
|
|
622
633
|
license,
|
|
623
634
|
homepage,
|
|
624
|
-
|
|
625
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
626
|
-
error: {
|
|
627
|
-
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
628
|
-
}
|
|
635
|
+
support
|
|
629
636
|
};
|
|
630
|
-
}
|
|
637
|
+
}
|
|
638
|
+
function applyDefaultConfig(config) {
|
|
639
|
+
if (!config.support && config.contact) {
|
|
640
|
+
config.support = config.contact;
|
|
641
|
+
}
|
|
642
|
+
if (!config.contact && config.support) {
|
|
643
|
+
config.contact = config.support;
|
|
644
|
+
}
|
|
645
|
+
if (config.homepage) {
|
|
646
|
+
if (!config.docs) {
|
|
647
|
+
config.docs = `${config.homepage}/docs`;
|
|
648
|
+
}
|
|
649
|
+
if (!config.license) {
|
|
650
|
+
config.license = `${config.homepage}/license`;
|
|
651
|
+
}
|
|
652
|
+
if (!config.support) {
|
|
653
|
+
config.support = `${config.homepage}/support`;
|
|
654
|
+
}
|
|
655
|
+
if (!config.contact) {
|
|
656
|
+
config.contact = `${config.homepage}/contact`;
|
|
657
|
+
}
|
|
658
|
+
if (!config.error?.codesFile || !config?.error?.url) {
|
|
659
|
+
config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
660
|
+
if (config.homepage) {
|
|
661
|
+
config.error.url ??= `${config.homepage}/errors`;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
return config;
|
|
666
|
+
}
|
|
631
667
|
|
|
632
668
|
// ../config-tools/src/logger/chalk.ts
|
|
633
669
|
import chalk from "chalk";
|
|
@@ -822,7 +858,8 @@ export {
|
|
|
822
858
|
correctPaths,
|
|
823
859
|
joinPaths,
|
|
824
860
|
findWorkspaceRoot,
|
|
825
|
-
|
|
861
|
+
getPackageJsonConfig,
|
|
862
|
+
applyDefaultConfig,
|
|
826
863
|
getLogLevel,
|
|
827
864
|
getLogLevelLabel,
|
|
828
865
|
isVerbose,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkP2WBOEJEcjs = require('./chunk-P2WBOEJE.cjs');
|
|
5
5
|
|
|
6
6
|
// src/clean.ts
|
|
7
7
|
var _promises = require('fs/promises');
|
|
8
8
|
async function clean(name = "Unbuild", directory, config) {
|
|
9
|
-
|
|
10
|
-
const stopwatch =
|
|
9
|
+
_chunkP2WBOEJEcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
10
|
+
const stopwatch = _chunkP2WBOEJEcjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
11
11
|
await cleanDirectories(name, directory, config);
|
|
12
12
|
stopwatch();
|
|
13
13
|
}
|