@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
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/unbuild.cjs
CHANGED
|
@@ -26,10 +26,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
var import_zod = __toESM(require("zod"), 1);
|
|
27
27
|
|
|
28
28
|
// ../config/src/constants.ts
|
|
29
|
-
var STORM_DEFAULT_DOCS = "https://
|
|
29
|
+
var STORM_DEFAULT_DOCS = "https://stormsoftware.com/docs";
|
|
30
30
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
31
31
|
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
32
|
-
var STORM_DEFAULT_LICENSING = "https://
|
|
32
|
+
var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
|
|
33
33
|
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
34
34
|
var STORM_DEFAULT_RELEASE_BANNER = "https://public.storm-cdn.com/brand-banner.png";
|
|
35
35
|
var STORM_DEFAULT_ACCOUNT_TWITTER = "StormSoftwareHQ";
|
|
@@ -202,10 +202,13 @@ var stormWorkspaceConfigSchema = import_zod.default.object({
|
|
|
202
202
|
organization: import_zod.default.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
203
203
|
repository: import_zod.default.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
204
204
|
license: import_zod.default.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
205
|
-
homepage: import_zod.default.string().trim().url().
|
|
206
|
-
docs: import_zod.default.string().trim().url().
|
|
207
|
-
licensing: import_zod.default.string().trim().url().
|
|
208
|
-
contact: import_zod.default.string().trim().url().
|
|
205
|
+
homepage: import_zod.default.string().trim().url().optional().describe("The homepage of the workspace"),
|
|
206
|
+
docs: import_zod.default.string().trim().url().optional().describe("The documentation site for the workspace"),
|
|
207
|
+
licensing: import_zod.default.string().trim().url().optional().describe("The licensing site for the workspace"),
|
|
208
|
+
contact: import_zod.default.string().trim().url().optional().describe("The contact site for the workspace"),
|
|
209
|
+
support: import_zod.default.string().trim().url().optional().describe(
|
|
210
|
+
"The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
211
|
+
),
|
|
209
212
|
branch: import_zod.default.string().trim().default("main").describe("The branch of the workspace"),
|
|
210
213
|
preid: import_zod.default.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
211
214
|
owner: import_zod.default.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
@@ -557,9 +560,10 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
557
560
|
negative: "#dc2626"
|
|
558
561
|
}
|
|
559
562
|
};
|
|
560
|
-
|
|
563
|
+
async function getPackageJsonConfig(root) {
|
|
561
564
|
let license = STORM_DEFAULT_LICENSE;
|
|
562
|
-
let homepage =
|
|
565
|
+
let homepage = void 0;
|
|
566
|
+
let support = void 0;
|
|
563
567
|
let name = void 0;
|
|
564
568
|
let namespace = void 0;
|
|
565
569
|
let repository = void 0;
|
|
@@ -590,6 +594,13 @@ var getDefaultConfig = async (root) => {
|
|
|
590
594
|
if (packageJson.homepage) {
|
|
591
595
|
homepage = packageJson.homepage;
|
|
592
596
|
}
|
|
597
|
+
if (packageJson.bugs) {
|
|
598
|
+
if (typeof packageJson.bugs === "string") {
|
|
599
|
+
support = packageJson.bugs;
|
|
600
|
+
} else if (packageJson.bugs.url) {
|
|
601
|
+
support = packageJson.bugs.url;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
593
604
|
}
|
|
594
605
|
}
|
|
595
606
|
return {
|
|
@@ -599,13 +610,38 @@ var getDefaultConfig = async (root) => {
|
|
|
599
610
|
repository,
|
|
600
611
|
license,
|
|
601
612
|
homepage,
|
|
602
|
-
|
|
603
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
604
|
-
error: {
|
|
605
|
-
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
606
|
-
}
|
|
613
|
+
support
|
|
607
614
|
};
|
|
608
|
-
}
|
|
615
|
+
}
|
|
616
|
+
function applyDefaultConfig(config) {
|
|
617
|
+
if (!config.support && config.contact) {
|
|
618
|
+
config.support = config.contact;
|
|
619
|
+
}
|
|
620
|
+
if (!config.contact && config.support) {
|
|
621
|
+
config.contact = config.support;
|
|
622
|
+
}
|
|
623
|
+
if (config.homepage) {
|
|
624
|
+
if (!config.docs) {
|
|
625
|
+
config.docs = `${config.homepage}/docs`;
|
|
626
|
+
}
|
|
627
|
+
if (!config.license) {
|
|
628
|
+
config.license = `${config.homepage}/license`;
|
|
629
|
+
}
|
|
630
|
+
if (!config.support) {
|
|
631
|
+
config.support = `${config.homepage}/support`;
|
|
632
|
+
}
|
|
633
|
+
if (!config.contact) {
|
|
634
|
+
config.contact = `${config.homepage}/contact`;
|
|
635
|
+
}
|
|
636
|
+
if (!config.error?.codesFile || !config?.error?.url) {
|
|
637
|
+
config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
638
|
+
if (config.homepage) {
|
|
639
|
+
config.error.url ??= `${config.homepage}/errors`;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
return config;
|
|
644
|
+
}
|
|
609
645
|
|
|
610
646
|
// ../config-tools/src/logger/chalk.ts
|
|
611
647
|
var import_chalk = __toESM(require("chalk"), 1);
|
|
@@ -1011,6 +1047,7 @@ var getConfigEnv = () => {
|
|
|
1011
1047
|
docs: process.env[`${prefix}DOCS`] || void 0,
|
|
1012
1048
|
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
1013
1049
|
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
1050
|
+
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
1014
1051
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
1015
1052
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
1016
1053
|
configFile: process.env[`${prefix}CONFIG_FILE`] ? correctPaths(process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
@@ -1229,6 +1266,9 @@ var setConfigEnv = (config) => {
|
|
|
1229
1266
|
if (config.contact) {
|
|
1230
1267
|
process.env[`${prefix}CONTACT`] = config.contact;
|
|
1231
1268
|
}
|
|
1269
|
+
if (config.support) {
|
|
1270
|
+
process.env[`${prefix}SUPPORT`] = config.support;
|
|
1271
|
+
}
|
|
1232
1272
|
if (config.timezone) {
|
|
1233
1273
|
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
1234
1274
|
process.env.TZ = config.timezone;
|
|
@@ -1478,9 +1518,11 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
1478
1518
|
return void 0;
|
|
1479
1519
|
}
|
|
1480
1520
|
}
|
|
1481
|
-
const defaultConfig = await
|
|
1482
|
-
result =
|
|
1483
|
-
|
|
1521
|
+
const defaultConfig = await getPackageJsonConfig(_workspaceRoot);
|
|
1522
|
+
result = applyDefaultConfig(
|
|
1523
|
+
await stormWorkspaceConfigSchema.parseAsync(
|
|
1524
|
+
(0, import_defu2.default)(configEnv, configFile, defaultConfig)
|
|
1525
|
+
)
|
|
1484
1526
|
);
|
|
1485
1527
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1486
1528
|
} else {
|
package/bin/unbuild.js
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
import z from "zod";
|
|
5
5
|
|
|
6
6
|
// ../config/src/constants.ts
|
|
7
|
-
var STORM_DEFAULT_DOCS = "https://
|
|
7
|
+
var STORM_DEFAULT_DOCS = "https://stormsoftware.com/docs";
|
|
8
8
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
9
9
|
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
10
|
-
var STORM_DEFAULT_LICENSING = "https://
|
|
10
|
+
var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
|
|
11
11
|
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
12
12
|
var STORM_DEFAULT_RELEASE_BANNER = "https://public.storm-cdn.com/brand-banner.png";
|
|
13
13
|
var STORM_DEFAULT_ACCOUNT_TWITTER = "StormSoftwareHQ";
|
|
@@ -180,10 +180,13 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
180
180
|
organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
181
181
|
repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
182
182
|
license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
183
|
-
homepage: z.string().trim().url().
|
|
184
|
-
docs: z.string().trim().url().
|
|
185
|
-
licensing: z.string().trim().url().
|
|
186
|
-
contact: z.string().trim().url().
|
|
183
|
+
homepage: z.string().trim().url().optional().describe("The homepage of the workspace"),
|
|
184
|
+
docs: z.string().trim().url().optional().describe("The documentation site for the workspace"),
|
|
185
|
+
licensing: z.string().trim().url().optional().describe("The licensing site for the workspace"),
|
|
186
|
+
contact: z.string().trim().url().optional().describe("The contact site for the workspace"),
|
|
187
|
+
support: z.string().trim().url().optional().describe(
|
|
188
|
+
"The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
189
|
+
),
|
|
187
190
|
branch: z.string().trim().default("main").describe("The branch of the workspace"),
|
|
188
191
|
preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
189
192
|
owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
@@ -535,9 +538,10 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
535
538
|
negative: "#dc2626"
|
|
536
539
|
}
|
|
537
540
|
};
|
|
538
|
-
|
|
541
|
+
async function getPackageJsonConfig(root) {
|
|
539
542
|
let license = STORM_DEFAULT_LICENSE;
|
|
540
|
-
let homepage =
|
|
543
|
+
let homepage = void 0;
|
|
544
|
+
let support = void 0;
|
|
541
545
|
let name = void 0;
|
|
542
546
|
let namespace = void 0;
|
|
543
547
|
let repository = void 0;
|
|
@@ -568,6 +572,13 @@ var getDefaultConfig = async (root) => {
|
|
|
568
572
|
if (packageJson.homepage) {
|
|
569
573
|
homepage = packageJson.homepage;
|
|
570
574
|
}
|
|
575
|
+
if (packageJson.bugs) {
|
|
576
|
+
if (typeof packageJson.bugs === "string") {
|
|
577
|
+
support = packageJson.bugs;
|
|
578
|
+
} else if (packageJson.bugs.url) {
|
|
579
|
+
support = packageJson.bugs.url;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
571
582
|
}
|
|
572
583
|
}
|
|
573
584
|
return {
|
|
@@ -577,13 +588,38 @@ var getDefaultConfig = async (root) => {
|
|
|
577
588
|
repository,
|
|
578
589
|
license,
|
|
579
590
|
homepage,
|
|
580
|
-
|
|
581
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
582
|
-
error: {
|
|
583
|
-
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
584
|
-
}
|
|
591
|
+
support
|
|
585
592
|
};
|
|
586
|
-
}
|
|
593
|
+
}
|
|
594
|
+
function applyDefaultConfig(config) {
|
|
595
|
+
if (!config.support && config.contact) {
|
|
596
|
+
config.support = config.contact;
|
|
597
|
+
}
|
|
598
|
+
if (!config.contact && config.support) {
|
|
599
|
+
config.contact = config.support;
|
|
600
|
+
}
|
|
601
|
+
if (config.homepage) {
|
|
602
|
+
if (!config.docs) {
|
|
603
|
+
config.docs = `${config.homepage}/docs`;
|
|
604
|
+
}
|
|
605
|
+
if (!config.license) {
|
|
606
|
+
config.license = `${config.homepage}/license`;
|
|
607
|
+
}
|
|
608
|
+
if (!config.support) {
|
|
609
|
+
config.support = `${config.homepage}/support`;
|
|
610
|
+
}
|
|
611
|
+
if (!config.contact) {
|
|
612
|
+
config.contact = `${config.homepage}/contact`;
|
|
613
|
+
}
|
|
614
|
+
if (!config.error?.codesFile || !config?.error?.url) {
|
|
615
|
+
config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
616
|
+
if (config.homepage) {
|
|
617
|
+
config.error.url ??= `${config.homepage}/errors`;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
return config;
|
|
622
|
+
}
|
|
587
623
|
|
|
588
624
|
// ../config-tools/src/logger/chalk.ts
|
|
589
625
|
import chalk from "chalk";
|
|
@@ -989,6 +1025,7 @@ var getConfigEnv = () => {
|
|
|
989
1025
|
docs: process.env[`${prefix}DOCS`] || void 0,
|
|
990
1026
|
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
991
1027
|
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
1028
|
+
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
992
1029
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
993
1030
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
994
1031
|
configFile: process.env[`${prefix}CONFIG_FILE`] ? correctPaths(process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
@@ -1207,6 +1244,9 @@ var setConfigEnv = (config) => {
|
|
|
1207
1244
|
if (config.contact) {
|
|
1208
1245
|
process.env[`${prefix}CONTACT`] = config.contact;
|
|
1209
1246
|
}
|
|
1247
|
+
if (config.support) {
|
|
1248
|
+
process.env[`${prefix}SUPPORT`] = config.support;
|
|
1249
|
+
}
|
|
1210
1250
|
if (config.timezone) {
|
|
1211
1251
|
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
1212
1252
|
process.env.TZ = config.timezone;
|
|
@@ -1456,9 +1496,11 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
1456
1496
|
return void 0;
|
|
1457
1497
|
}
|
|
1458
1498
|
}
|
|
1459
|
-
const defaultConfig = await
|
|
1460
|
-
result =
|
|
1461
|
-
|
|
1499
|
+
const defaultConfig = await getPackageJsonConfig(_workspaceRoot);
|
|
1500
|
+
result = applyDefaultConfig(
|
|
1501
|
+
await stormWorkspaceConfigSchema.parseAsync(
|
|
1502
|
+
defu2(configEnv, configFile, defaultConfig)
|
|
1503
|
+
)
|
|
1462
1504
|
);
|
|
1463
1505
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1464
1506
|
} else {
|
package/dist/build.cjs
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
8
|
+
var _chunkYOFEBICPcjs = require('./chunk-YOFEBICP.cjs');
|
|
9
|
+
require('./chunk-XSOPMWCC.cjs');
|
|
10
|
+
require('./chunk-KJIKKRIX.cjs');
|
|
11
|
+
require('./chunk-HUI55NUC.cjs');
|
|
12
|
+
require('./chunk-5QHOUJSC.cjs');
|
|
13
|
+
require('./chunk-P2WBOEJE.cjs');
|
|
14
14
|
require('./chunk-OBGZSXTJ.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
@@ -19,4 +19,4 @@ require('./chunk-OBGZSXTJ.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
exports.build =
|
|
22
|
+
exports.build = _chunkYOFEBICPcjs.build; exports.cleanOutputPath = _chunkYOFEBICPcjs.cleanOutputPath; exports.copyBuildAssets = _chunkYOFEBICPcjs.copyBuildAssets; exports.executeUnbuild = _chunkYOFEBICPcjs.executeUnbuild; exports.generatePackageJson = _chunkYOFEBICPcjs.generatePackageJson; exports.resolveOptions = _chunkYOFEBICPcjs.resolveOptions;
|
package/dist/build.js
CHANGED
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
executeUnbuild,
|
|
6
6
|
generatePackageJson,
|
|
7
7
|
resolveOptions
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-OQIN5ERP.js";
|
|
9
|
+
import "./chunk-GBXPCTSG.js";
|
|
10
|
+
import "./chunk-ZU57QIGP.js";
|
|
11
|
+
import "./chunk-ROYXERFP.js";
|
|
12
|
+
import "./chunk-VNJUHNMI.js";
|
|
13
|
+
import "./chunk-RJSLIE4Z.js";
|
|
14
14
|
import "./chunk-3RG5ZIWI.js";
|
|
15
15
|
export {
|
|
16
16
|
build,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkP2WBOEJEcjs = require('./chunk-P2WBOEJE.cjs');
|
|
4
4
|
|
|
5
5
|
// src/plugins/tsc.ts
|
|
6
6
|
|
|
@@ -45,7 +45,7 @@ async function createTsCompilerOptions(config, tsConfigPath, projectRoot, depend
|
|
|
45
45
|
declaration: true,
|
|
46
46
|
paths: _buildablelibsutils.computeCompilerOptionsPaths.call(void 0, tsConfig, _nullishCoalesce(dependencies, () => ( [])))
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
_chunkP2WBOEJEcjs.writeTrace.call(void 0, compilerOptions, config);
|
|
49
49
|
return compilerOptions;
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkP2WBOEJEcjs = require('./chunk-P2WBOEJE.cjs');
|
|
4
4
|
|
|
5
5
|
// src/plugins/on-error.ts
|
|
6
6
|
var onErrorPlugin = (options) => ({
|
|
7
7
|
name: "storm:on-error",
|
|
8
8
|
buildEnd(error) {
|
|
9
9
|
if (error) {
|
|
10
|
-
|
|
10
|
+
_chunkP2WBOEJEcjs.writeError.call(void 0,
|
|
11
11
|
`The following errors occurred during the build:
|
|
12
12
|
${error ? error.message : "Unknown build error"}
|
|
13
13
|
|
|
@@ -18,7 +18,7 @@ ${error ? error.message : "Unknown build error"}
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
renderError(error) {
|
|
21
|
-
|
|
21
|
+
_chunkP2WBOEJEcjs.writeError.call(void 0,
|
|
22
22
|
`The following errors occurred during the build:
|
|
23
23
|
${error ? error.message : "Unknown build error"}
|
|
24
24
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkP2WBOEJEcjs = require('./chunk-P2WBOEJE.cjs');
|
|
4
4
|
|
|
5
5
|
// src/plugins/analyze.ts
|
|
6
6
|
var formatBytes = (bytes) => {
|
|
@@ -17,7 +17,7 @@ var analyzePlugin = (options) => {
|
|
|
17
17
|
renderChunk(source, chunk) {
|
|
18
18
|
const sourceBytes = formatBytes(source.length);
|
|
19
19
|
const fileName = chunk.fileName;
|
|
20
|
-
|
|
20
|
+
_chunkP2WBOEJEcjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`, options.config);
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cleanDirectories
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GBXPCTSG.js";
|
|
4
4
|
import {
|
|
5
5
|
analyzePlugin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZU57QIGP.js";
|
|
7
7
|
import {
|
|
8
8
|
onErrorPlugin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ROYXERFP.js";
|
|
10
10
|
import {
|
|
11
11
|
loadConfig,
|
|
12
12
|
tscPlugin
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-VNJUHNMI.js";
|
|
14
14
|
import {
|
|
15
15
|
COLOR_KEYS,
|
|
16
16
|
LogLevel,
|
|
@@ -18,12 +18,13 @@ import {
|
|
|
18
18
|
STORM_DEFAULT_DOCS,
|
|
19
19
|
STORM_DEFAULT_HOMEPAGE,
|
|
20
20
|
STORM_DEFAULT_LICENSING,
|
|
21
|
+
applyDefaultConfig,
|
|
21
22
|
correctPaths,
|
|
22
23
|
findWorkspaceRoot,
|
|
23
24
|
formatLogMessage,
|
|
24
|
-
getDefaultConfig,
|
|
25
25
|
getLogLevel,
|
|
26
26
|
getLogLevelLabel,
|
|
27
|
+
getPackageJsonConfig,
|
|
27
28
|
getStopwatch,
|
|
28
29
|
isVerbose,
|
|
29
30
|
joinPaths,
|
|
@@ -33,7 +34,7 @@ import {
|
|
|
33
34
|
writeSuccess,
|
|
34
35
|
writeTrace,
|
|
35
36
|
writeWarning
|
|
36
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-RJSLIE4Z.js";
|
|
37
38
|
|
|
38
39
|
// src/build.ts
|
|
39
40
|
import {
|
|
@@ -408,6 +409,7 @@ var getConfigEnv = () => {
|
|
|
408
409
|
docs: process.env[`${prefix}DOCS`] || void 0,
|
|
409
410
|
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
410
411
|
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
412
|
+
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
411
413
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
412
414
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
413
415
|
configFile: process.env[`${prefix}CONFIG_FILE`] ? correctPaths(process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
@@ -626,6 +628,9 @@ var setConfigEnv = (config) => {
|
|
|
626
628
|
if (config.contact) {
|
|
627
629
|
process.env[`${prefix}CONTACT`] = config.contact;
|
|
628
630
|
}
|
|
631
|
+
if (config.support) {
|
|
632
|
+
process.env[`${prefix}SUPPORT`] = config.support;
|
|
633
|
+
}
|
|
629
634
|
if (config.timezone) {
|
|
630
635
|
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
631
636
|
process.env.TZ = config.timezone;
|
|
@@ -875,9 +880,11 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
875
880
|
return void 0;
|
|
876
881
|
}
|
|
877
882
|
}
|
|
878
|
-
const defaultConfig = await
|
|
879
|
-
result =
|
|
880
|
-
|
|
883
|
+
const defaultConfig = await getPackageJsonConfig(_workspaceRoot);
|
|
884
|
+
result = applyDefaultConfig(
|
|
885
|
+
await stormWorkspaceConfigSchema.parseAsync(
|
|
886
|
+
defu2(configEnv, configFile, defaultConfig)
|
|
887
|
+
)
|
|
881
888
|
);
|
|
882
889
|
result.workspaceRoot ??= _workspaceRoot;
|
|
883
890
|
} else {
|
|
@@ -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 = _zod2.default.object({
|
|
|
380
380
|
organization: _zod2.default.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
381
381
|
repository: _zod2.default.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
382
382
|
license: _zod2.default.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
383
|
-
homepage: _zod2.default.string().trim().url().
|
|
384
|
-
docs: _zod2.default.string().trim().url().
|
|
385
|
-
licensing: _zod2.default.string().trim().url().
|
|
386
|
-
contact: _zod2.default.string().trim().url().
|
|
383
|
+
homepage: _zod2.default.string().trim().url().optional().describe("The homepage of the workspace"),
|
|
384
|
+
docs: _zod2.default.string().trim().url().optional().describe("The documentation site for the workspace"),
|
|
385
|
+
licensing: _zod2.default.string().trim().url().optional().describe("The licensing site for the workspace"),
|
|
386
|
+
contact: _zod2.default.string().trim().url().optional().describe("The contact site for the workspace"),
|
|
387
|
+
support: _zod2.default.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: _zod2.default.string().trim().default("main").describe("The branch of the workspace"),
|
|
388
391
|
preid: _zod2.default.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
389
392
|
owner: _zod2.default.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 (!_optionalChain([config, 'access', _2 => _2.error, 'optionalAccess', _3 => _3.codesFile]) || !_optionalChain([config, 'optionalAccess', _4 => _4.error, 'optionalAccess', _5 => _5.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
|
var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
|
|
@@ -652,7 +688,7 @@ var chalkDefault = {
|
|
|
652
688
|
};
|
|
653
689
|
var getChalk = () => {
|
|
654
690
|
let _chalk = _chalk3.default;
|
|
655
|
-
if (!_optionalChain([_chalk, 'optionalAccess',
|
|
691
|
+
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])) {
|
|
656
692
|
_chalk = chalkDefault;
|
|
657
693
|
}
|
|
658
694
|
return _chalk;
|
|
@@ -689,7 +725,7 @@ var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
|
|
|
689
725
|
|
|
690
726
|
// ../config-tools/src/logger/console.ts
|
|
691
727
|
var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
692
|
-
const colors = !_optionalChain([config, 'access',
|
|
728
|
+
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;
|
|
693
729
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
694
730
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
695
731
|
return (_) => {
|
|
@@ -805,7 +841,7 @@ ${Object.keys(message).filter((key) => !skip.includes(key)).map(
|
|
|
805
841
|
};
|
|
806
842
|
var _isFunction = (value) => {
|
|
807
843
|
try {
|
|
808
|
-
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess',
|
|
844
|
+
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]));
|
|
809
845
|
} catch (e) {
|
|
810
846
|
return false;
|
|
811
847
|
}
|
|
@@ -835,4 +871,5 @@ var _isFunction = (value) => {
|
|
|
835
871
|
|
|
836
872
|
|
|
837
873
|
|
|
838
|
-
|
|
874
|
+
|
|
875
|
+
exports.LogLevel = LogLevel; exports.LogLevelLabel = LogLevelLabel; exports.STORM_DEFAULT_DOCS = STORM_DEFAULT_DOCS; exports.STORM_DEFAULT_HOMEPAGE = STORM_DEFAULT_HOMEPAGE; exports.STORM_DEFAULT_LICENSING = STORM_DEFAULT_LICENSING; exports.stormWorkspaceConfigSchema = stormWorkspaceConfigSchema; exports.COLOR_KEYS = COLOR_KEYS; exports.correctPaths = correctPaths; exports.joinPaths = joinPaths; exports.findWorkspaceRoot = findWorkspaceRoot; exports.getPackageJsonConfig = getPackageJsonConfig; exports.applyDefaultConfig = applyDefaultConfig; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.isVerbose = isVerbose; exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage;
|