@storm-software/unbuild 0.36.6 → 0.36.7
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 +8 -9
- package/bin/unbuild.js +8 -9
- package/dist/build.cjs +7 -7
- package/dist/build.js +6 -6
- package/dist/{chunk-AI7YECRT.cjs → chunk-3XO4Q6KJ.cjs} +3 -3
- package/dist/{chunk-4VAP3O4T.js → chunk-55JZXCPU.js} +5 -5
- package/dist/{chunk-R6HJQ5XB.js → chunk-AB6Y2V2J.js} +1 -1
- package/dist/{chunk-5XTLMOFH.cjs → chunk-AGC7TU3A.cjs} +3 -3
- package/dist/{chunk-FLMNRVR2.js → chunk-F3Y4F5GC.js} +1 -1
- package/dist/{chunk-A45F3XCO.cjs → chunk-F6ROPIKU.cjs} +8 -9
- package/dist/{chunk-BZELKGMN.cjs → chunk-FK6HPKVR.cjs} +2 -2
- package/dist/{chunk-FRURXT64.js → chunk-OAIVCYEQ.js} +1 -1
- package/dist/{chunk-MXG2QBLK.cjs → chunk-R2TMH5II.cjs} +2 -2
- package/dist/{chunk-XRMMVXZP.js → chunk-R3UGJCV6.js} +1 -1
- package/dist/{chunk-WIBRZ6QG.cjs → chunk-S27NOB7P.cjs} +99 -99
- package/dist/{chunk-A7ULBMR4.js → chunk-VVCRJ4VH.js} +8 -9
- 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 +1 -1
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
|
@@ -643,55 +643,55 @@ var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}, _c
|
|
|
643
643
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
|
|
644
644
|
return (message) => {
|
|
645
645
|
console.error(`
|
|
646
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)}
|
|
646
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
647
647
|
`);
|
|
648
648
|
};
|
|
649
649
|
}
|
|
650
650
|
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel) {
|
|
651
651
|
return (message) => {
|
|
652
652
|
console.error(`
|
|
653
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)}
|
|
653
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
654
654
|
`);
|
|
655
655
|
};
|
|
656
656
|
}
|
|
657
657
|
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel) {
|
|
658
658
|
return (message) => {
|
|
659
659
|
console.warn(`
|
|
660
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)}
|
|
660
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
661
661
|
`);
|
|
662
662
|
};
|
|
663
663
|
}
|
|
664
664
|
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel) {
|
|
665
665
|
return (message) => {
|
|
666
666
|
console.info(`
|
|
667
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)}
|
|
667
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
668
668
|
`);
|
|
669
669
|
};
|
|
670
670
|
}
|
|
671
671
|
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel) {
|
|
672
672
|
return (message) => {
|
|
673
673
|
console.info(`
|
|
674
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)}
|
|
674
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
675
675
|
`);
|
|
676
676
|
};
|
|
677
677
|
}
|
|
678
678
|
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel) {
|
|
679
679
|
return (message) => {
|
|
680
680
|
console.debug(`
|
|
681
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug]`)}
|
|
681
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
682
682
|
`);
|
|
683
683
|
};
|
|
684
684
|
}
|
|
685
685
|
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel) {
|
|
686
686
|
return (message) => {
|
|
687
687
|
console.debug(`
|
|
688
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace]`)}
|
|
688
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
689
689
|
`);
|
|
690
690
|
};
|
|
691
691
|
}
|
|
692
692
|
return (message) => {
|
|
693
693
|
console.log(`
|
|
694
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)}
|
|
694
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
695
695
|
`);
|
|
696
696
|
};
|
|
697
697
|
}, "getLogFn");
|
|
@@ -708,7 +708,6 @@ var getStopwatch = /* @__PURE__ */ __name((name) => {
|
|
|
708
708
|
const end = process.hrtime(start);
|
|
709
709
|
console.info(`
|
|
710
710
|
> \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(end[0] * 1e3 + end[1] / 1e6)}ms to complete
|
|
711
|
-
|
|
712
711
|
`);
|
|
713
712
|
};
|
|
714
713
|
}, "getStopwatch");
|
package/bin/unbuild.js
CHANGED
|
@@ -622,55 +622,55 @@ var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}, _c
|
|
|
622
622
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
|
|
623
623
|
return (message) => {
|
|
624
624
|
console.error(`
|
|
625
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)}
|
|
625
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
626
626
|
`);
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
629
|
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel) {
|
|
630
630
|
return (message) => {
|
|
631
631
|
console.error(`
|
|
632
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)}
|
|
632
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
633
633
|
`);
|
|
634
634
|
};
|
|
635
635
|
}
|
|
636
636
|
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel) {
|
|
637
637
|
return (message) => {
|
|
638
638
|
console.warn(`
|
|
639
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)}
|
|
639
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
640
640
|
`);
|
|
641
641
|
};
|
|
642
642
|
}
|
|
643
643
|
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel) {
|
|
644
644
|
return (message) => {
|
|
645
645
|
console.info(`
|
|
646
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)}
|
|
646
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
647
647
|
`);
|
|
648
648
|
};
|
|
649
649
|
}
|
|
650
650
|
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel) {
|
|
651
651
|
return (message) => {
|
|
652
652
|
console.info(`
|
|
653
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)}
|
|
653
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
654
654
|
`);
|
|
655
655
|
};
|
|
656
656
|
}
|
|
657
657
|
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel) {
|
|
658
658
|
return (message) => {
|
|
659
659
|
console.debug(`
|
|
660
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug]`)}
|
|
660
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
661
661
|
`);
|
|
662
662
|
};
|
|
663
663
|
}
|
|
664
664
|
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel) {
|
|
665
665
|
return (message) => {
|
|
666
666
|
console.debug(`
|
|
667
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace]`)}
|
|
667
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
668
668
|
`);
|
|
669
669
|
};
|
|
670
670
|
}
|
|
671
671
|
return (message) => {
|
|
672
672
|
console.log(`
|
|
673
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)}
|
|
673
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
674
674
|
`);
|
|
675
675
|
};
|
|
676
676
|
}, "getLogFn");
|
|
@@ -687,7 +687,6 @@ var getStopwatch = /* @__PURE__ */ __name((name) => {
|
|
|
687
687
|
const end = process.hrtime(start);
|
|
688
688
|
console.info(`
|
|
689
689
|
> \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(end[0] * 1e3 + end[1] / 1e6)}ms to complete
|
|
690
|
-
|
|
691
690
|
`);
|
|
692
691
|
};
|
|
693
692
|
}, "getStopwatch");
|
package/dist/build.cjs
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkS27NOB7Pcjs = require('./chunk-S27NOB7P.cjs');
|
|
9
9
|
require('./chunk-OD3ULBE3.cjs');
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
14
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-AGC7TU3A.cjs');
|
|
11
|
+
require('./chunk-R2TMH5II.cjs');
|
|
12
|
+
require('./chunk-3XO4Q6KJ.cjs');
|
|
13
|
+
require('./chunk-FK6HPKVR.cjs');
|
|
14
|
+
require('./chunk-F6ROPIKU.cjs');
|
|
15
15
|
require('./chunk-BGYQAVKQ.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
@@ -20,4 +20,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
exports.build =
|
|
23
|
+
exports.build = _chunkS27NOB7Pcjs.build; exports.cleanOutputPath = _chunkS27NOB7Pcjs.cleanOutputPath; exports.copyBuildAssets = _chunkS27NOB7Pcjs.copyBuildAssets; exports.executeUnbuild = _chunkS27NOB7Pcjs.executeUnbuild; exports.generatePackageJson = _chunkS27NOB7Pcjs.generatePackageJson; exports.resolveOptions = _chunkS27NOB7Pcjs.resolveOptions;
|
package/dist/build.js
CHANGED
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
executeUnbuild,
|
|
6
6
|
generatePackageJson,
|
|
7
7
|
resolveOptions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-55JZXCPU.js";
|
|
9
9
|
import "./chunk-RBYYB7X2.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-F3Y4F5GC.js";
|
|
11
|
+
import "./chunk-R3UGJCV6.js";
|
|
12
|
+
import "./chunk-AB6Y2V2J.js";
|
|
13
|
+
import "./chunk-OAIVCYEQ.js";
|
|
14
|
+
import "./chunk-VVCRJ4VH.js";
|
|
15
15
|
import "./chunk-3GQAWCBQ.js";
|
|
16
16
|
export {
|
|
17
17
|
build,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkF6ROPIKUcjs = require('./chunk-F6ROPIKU.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -10,7 +10,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (optio
|
|
|
10
10
|
name: "storm:on-error",
|
|
11
11
|
buildEnd(error) {
|
|
12
12
|
if (error) {
|
|
13
|
-
|
|
13
|
+
_chunkF6ROPIKUcjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
14
14
|
${error ? error.message : "Unknown build error"}
|
|
15
15
|
|
|
16
16
|
`, options.config);
|
|
@@ -18,7 +18,7 @@ ${error ? error.message : "Unknown build error"}
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
renderError(error) {
|
|
21
|
-
|
|
21
|
+
_chunkF6ROPIKUcjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
22
22
|
${error ? error.message : "Unknown build error"}
|
|
23
23
|
|
|
24
24
|
`, options.config);
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
} from "./chunk-RBYYB7X2.js";
|
|
4
4
|
import {
|
|
5
5
|
cleanDirectories
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-F3Y4F5GC.js";
|
|
7
7
|
import {
|
|
8
8
|
analyzePlugin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-R3UGJCV6.js";
|
|
10
10
|
import {
|
|
11
11
|
onErrorPlugin
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-AB6Y2V2J.js";
|
|
13
13
|
import {
|
|
14
14
|
loadConfig,
|
|
15
15
|
tscPlugin
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-OAIVCYEQ.js";
|
|
17
17
|
import {
|
|
18
18
|
COLOR_KEYS,
|
|
19
19
|
LogLevel,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
writeSuccess,
|
|
37
37
|
writeTrace,
|
|
38
38
|
writeWarning
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-VVCRJ4VH.js";
|
|
40
40
|
import {
|
|
41
41
|
__name
|
|
42
42
|
} from "./chunk-3GQAWCBQ.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkF6ROPIKUcjs = require('./chunk-F6ROPIKU.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -9,8 +9,8 @@ var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
|
9
9
|
// src/clean.ts
|
|
10
10
|
var _promises = require('fs/promises');
|
|
11
11
|
async function clean(name = "Unbuild", directory, config) {
|
|
12
|
-
|
|
13
|
-
const stopwatch =
|
|
12
|
+
_chunkF6ROPIKUcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
13
|
+
const stopwatch = _chunkF6ROPIKUcjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
14
14
|
await cleanDirectories(name, directory, config);
|
|
15
15
|
stopwatch();
|
|
16
16
|
}
|
|
@@ -613,55 +613,55 @@ var getLogFn = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (logLevel =
|
|
|
613
613
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
|
|
614
614
|
return (message) => {
|
|
615
615
|
console.error(`
|
|
616
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)}
|
|
616
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
617
617
|
`);
|
|
618
618
|
};
|
|
619
619
|
}
|
|
620
620
|
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel) {
|
|
621
621
|
return (message) => {
|
|
622
622
|
console.error(`
|
|
623
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)}
|
|
623
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
624
624
|
`);
|
|
625
625
|
};
|
|
626
626
|
}
|
|
627
627
|
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel) {
|
|
628
628
|
return (message) => {
|
|
629
629
|
console.warn(`
|
|
630
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)}
|
|
630
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
631
631
|
`);
|
|
632
632
|
};
|
|
633
633
|
}
|
|
634
634
|
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel) {
|
|
635
635
|
return (message) => {
|
|
636
636
|
console.info(`
|
|
637
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)}
|
|
637
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
638
638
|
`);
|
|
639
639
|
};
|
|
640
640
|
}
|
|
641
641
|
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel) {
|
|
642
642
|
return (message) => {
|
|
643
643
|
console.info(`
|
|
644
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)}
|
|
644
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
645
645
|
`);
|
|
646
646
|
};
|
|
647
647
|
}
|
|
648
648
|
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel) {
|
|
649
649
|
return (message) => {
|
|
650
650
|
console.debug(`
|
|
651
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug]`)}
|
|
651
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
652
652
|
`);
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
655
|
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel) {
|
|
656
656
|
return (message) => {
|
|
657
657
|
console.debug(`
|
|
658
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace]`)}
|
|
658
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
659
659
|
`);
|
|
660
660
|
};
|
|
661
661
|
}
|
|
662
662
|
return (message) => {
|
|
663
663
|
console.log(`
|
|
664
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)}
|
|
664
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
665
665
|
`);
|
|
666
666
|
};
|
|
667
667
|
}, "getLogFn");
|
|
@@ -678,7 +678,6 @@ var getStopwatch = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (name)
|
|
|
678
678
|
const end = process.hrtime(start);
|
|
679
679
|
console.info(`
|
|
680
680
|
> \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(end[0] * 1e3 + end[1] / 1e6)}ms to complete
|
|
681
|
-
|
|
682
681
|
`);
|
|
683
682
|
};
|
|
684
683
|
}, "getStopwatch");
|
|
@@ -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 _chunkF6ROPIKUcjs = require('./chunk-F6ROPIKU.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -32,7 +32,7 @@ async function createTsCompilerOptions(config, tsConfigPath, projectRoot, depend
|
|
|
32
32
|
declaration: true,
|
|
33
33
|
paths: _buildablelibsutils.computeCompilerOptionsPaths.call(void 0, tsConfig, _nullishCoalesce(dependencies, () => ( [])))
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
_chunkF6ROPIKUcjs.writeTrace.call(void 0, compilerOptions, config);
|
|
36
36
|
return compilerOptions;
|
|
37
37
|
}
|
|
38
38
|
_chunkBGYQAVKQcjs.__name.call(void 0, createTsCompilerOptions, "createTsCompilerOptions");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkF6ROPIKUcjs = require('./chunk-F6ROPIKU.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -25,7 +25,7 @@ var analyzePlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (optio
|
|
|
25
25
|
renderChunk(source, chunk) {
|
|
26
26
|
const sourceBytes = formatBytes(source.length);
|
|
27
27
|
const fileName = chunk.fileName;
|
|
28
|
-
|
|
28
|
+
_chunkF6ROPIKUcjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`, options.config);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
}, "analyzePlugin");
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
var _chunkOD3ULBE3cjs = require('./chunk-OD3ULBE3.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkAGC7TU3Acjs = require('./chunk-AGC7TU3A.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkR2TMH5IIcjs = require('./chunk-R2TMH5II.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk3XO4Q6KJcjs = require('./chunk-3XO4Q6KJ.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkFK6HPKVRcjs = require('./chunk-FK6HPKVR.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
@@ -36,7 +36,7 @@ var _chunkBZELKGMNcjs = require('./chunk-BZELKGMN.cjs');
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var _chunkF6ROPIKUcjs = require('./chunk-F6ROPIKU.cjs');
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -89,8 +89,8 @@ var copyAssets = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (co
|
|
|
89
89
|
output: "src/"
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
|
|
93
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
92
|
+
_chunkF6ROPIKUcjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
93
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkF6ROPIKUcjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
94
94
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
95
95
|
projectDir: projectRoot,
|
|
96
96
|
rootDir: config.workspaceRoot,
|
|
@@ -99,12 +99,12 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
99
99
|
});
|
|
100
100
|
await assetHandler.processAllAssetsOnce();
|
|
101
101
|
if (includeSrc === true) {
|
|
102
|
-
|
|
102
|
+
_chunkF6ROPIKUcjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkF6ROPIKUcjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
103
103
|
const files = await _glob.glob.call(void 0, [
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
_chunkF6ROPIKUcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
105
|
+
_chunkF6ROPIKUcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
106
|
+
_chunkF6ROPIKUcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
107
|
+
_chunkF6ROPIKUcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
108
108
|
]);
|
|
109
109
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
110
110
|
|
|
@@ -127,7 +127,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
127
127
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot)) {
|
|
128
128
|
const projectNode = project.node;
|
|
129
129
|
if (projectNode.data.root) {
|
|
130
|
-
const projectPackageJsonPath =
|
|
130
|
+
const projectPackageJsonPath = _chunkF6ROPIKUcjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
|
|
131
131
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
132
132
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
133
133
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -138,8 +138,8 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
if (localPackages.length > 0) {
|
|
141
|
-
|
|
142
|
-
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
141
|
+
_chunkF6ROPIKUcjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
142
|
+
const projectJsonFile = await _promises.readFile.call(void 0, _chunkF6ROPIKUcjs.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
|
|
143
143
|
const projectJson = JSON.parse(projectJsonFile);
|
|
144
144
|
const projectName2 = projectJson.name;
|
|
145
145
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
@@ -148,7 +148,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
148
148
|
}
|
|
149
149
|
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _3 => _3.projects, 'optionalAccess', _4 => _4[projectName2], 'access', _5 => _5.implicitDependencies, 'optionalAccess', _6 => _6.reduce, 'call', _7 => _7((ret, dep) => {
|
|
150
150
|
if (_optionalChain([projectConfigurations, 'access', _8 => _8.projects, 'optionalAccess', _9 => _9[dep]])) {
|
|
151
|
-
const depPackageJsonPath =
|
|
151
|
+
const depPackageJsonPath = _chunkF6ROPIKUcjs.joinPaths.call(void 0, workspaceRoot, projectConfigurations.projects[dep].root, "package.json");
|
|
152
152
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
153
153
|
const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
|
|
154
154
|
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
@@ -172,13 +172,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
172
172
|
return ret;
|
|
173
173
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
174
174
|
} else {
|
|
175
|
-
|
|
175
|
+
_chunkF6ROPIKUcjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
176
176
|
}
|
|
177
177
|
return packageJson;
|
|
178
178
|
}, "addPackageDependencies");
|
|
179
179
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
180
|
-
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot :
|
|
181
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
180
|
+
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkF6ROPIKUcjs.findWorkspaceRoot.call(void 0, );
|
|
181
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkF6ROPIKUcjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
|
|
182
182
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
183
183
|
packageJson.type ??= "module";
|
|
184
184
|
packageJson.sideEffects ??= false;
|
|
@@ -187,7 +187,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.cal
|
|
|
187
187
|
if (distSrc.startsWith("/")) {
|
|
188
188
|
distSrc = distSrc.substring(1);
|
|
189
189
|
}
|
|
190
|
-
packageJson.source ??= `${
|
|
190
|
+
packageJson.source ??= `${_chunkF6ROPIKUcjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
191
191
|
}
|
|
192
192
|
packageJson.files ??= [
|
|
193
193
|
"dist/**/*"
|
|
@@ -218,7 +218,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.cal
|
|
|
218
218
|
];
|
|
219
219
|
}
|
|
220
220
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
221
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
221
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkF6ROPIKUcjs.joinPaths.call(void 0, "packages", projectName);
|
|
222
222
|
return packageJson;
|
|
223
223
|
}, "addWorkspacePackageJsonFields");
|
|
224
224
|
|
|
@@ -226,7 +226,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.cal
|
|
|
226
226
|
var _c12 = require('c12');
|
|
227
227
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
228
228
|
var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
|
|
229
|
-
const workspacePath = filePath ||
|
|
229
|
+
const workspacePath = filePath || _chunkF6ROPIKUcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
230
230
|
const configs = await Promise.all([
|
|
231
231
|
_c12.loadConfig.call(void 0, {
|
|
232
232
|
cwd: workspacePath,
|
|
@@ -235,7 +235,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
235
235
|
envName: _optionalChain([fileName, 'optionalAccess', _14 => _14.toUpperCase, 'call', _15 => _15()]),
|
|
236
236
|
jitiOptions: {
|
|
237
237
|
debug: false,
|
|
238
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
238
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkF6ROPIKUcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
239
239
|
},
|
|
240
240
|
...options
|
|
241
241
|
}),
|
|
@@ -246,7 +246,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
246
246
|
envName: _optionalChain([fileName, 'optionalAccess', _16 => _16.toUpperCase, 'call', _17 => _17()]),
|
|
247
247
|
jitiOptions: {
|
|
248
248
|
debug: false,
|
|
249
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
249
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkF6ROPIKUcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
250
250
|
},
|
|
251
251
|
configFile: fileName,
|
|
252
252
|
...options
|
|
@@ -255,12 +255,12 @@ var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
255
255
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
256
256
|
}, "getConfigFileByName");
|
|
257
257
|
var getConfigFile = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
|
|
258
|
-
const workspacePath = filePath ? filePath :
|
|
258
|
+
const workspacePath = filePath ? filePath : _chunkF6ROPIKUcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
259
259
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
260
260
|
let config = result.config;
|
|
261
261
|
const configFile = result.configFile;
|
|
262
262
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
263
|
-
|
|
263
|
+
_chunkF6ROPIKUcjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
264
264
|
logLevel: "all"
|
|
265
265
|
});
|
|
266
266
|
}
|
|
@@ -269,7 +269,7 @@ var getConfigFile = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
269
269
|
for (const result2 of results) {
|
|
270
270
|
if (_optionalChain([result2, 'optionalAccess', _18 => _18.config]) && _optionalChain([result2, 'optionalAccess', _19 => _19.configFile]) && Object.keys(result2.config).length > 0) {
|
|
271
271
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
272
|
-
|
|
272
|
+
_chunkF6ROPIKUcjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
273
273
|
logLevel: "all"
|
|
274
274
|
});
|
|
275
275
|
}
|
|
@@ -317,15 +317,15 @@ var getConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, () => {
|
|
|
317
317
|
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
318
318
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
319
319
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
320
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
321
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
320
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkF6ROPIKUcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
321
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkF6ROPIKUcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
322
322
|
directories: {
|
|
323
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
324
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
325
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
326
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
327
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
328
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
323
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkF6ROPIKUcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
324
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkF6ROPIKUcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
325
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkF6ROPIKUcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
326
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkF6ROPIKUcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
327
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkF6ROPIKUcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
328
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkF6ROPIKUcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
329
329
|
},
|
|
330
330
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
331
331
|
env: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}ENV`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -348,24 +348,24 @@ var getConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, () => {
|
|
|
348
348
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
349
349
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
350
350
|
},
|
|
351
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ?
|
|
351
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? _chunkF6ROPIKUcjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
352
352
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
353
353
|
};
|
|
354
|
-
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
354
|
+
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkF6ROPIKUcjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
355
355
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
356
356
|
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
357
357
|
return ret;
|
|
358
358
|
}, {}) : getThemeColorConfigEnv(prefix);
|
|
359
|
-
if (config.docs ===
|
|
360
|
-
if (config.homepage ===
|
|
361
|
-
config.docs = `${
|
|
359
|
+
if (config.docs === _chunkF6ROPIKUcjs.STORM_DEFAULT_DOCS) {
|
|
360
|
+
if (config.homepage === _chunkF6ROPIKUcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
361
|
+
config.docs = `${_chunkF6ROPIKUcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
362
362
|
} else {
|
|
363
363
|
config.docs = `${config.homepage}/docs`;
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
if (config.licensing ===
|
|
367
|
-
if (config.homepage ===
|
|
368
|
-
config.licensing = `${
|
|
366
|
+
if (config.licensing === _chunkF6ROPIKUcjs.STORM_DEFAULT_LICENSING) {
|
|
367
|
+
if (config.homepage === _chunkF6ROPIKUcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
368
|
+
config.licensing = `${_chunkF6ROPIKUcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
369
369
|
} else {
|
|
370
370
|
config.licensing = `${config.homepage}/docs`;
|
|
371
371
|
}
|
|
@@ -503,31 +503,31 @@ var setConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config
|
|
|
503
503
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
504
504
|
}
|
|
505
505
|
if (config.configFile) {
|
|
506
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
506
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunkF6ROPIKUcjs.correctPaths.call(void 0, config.configFile);
|
|
507
507
|
}
|
|
508
508
|
if (config.workspaceRoot) {
|
|
509
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
510
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
511
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
509
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkF6ROPIKUcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
510
|
+
process.env.NX_WORKSPACE_ROOT = _chunkF6ROPIKUcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
511
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkF6ROPIKUcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
512
512
|
}
|
|
513
513
|
if (config.directories) {
|
|
514
514
|
if (!config.skipCache && config.directories.cache) {
|
|
515
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
515
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkF6ROPIKUcjs.correctPaths.call(void 0, config.directories.cache);
|
|
516
516
|
}
|
|
517
517
|
if (config.directories.data) {
|
|
518
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
518
|
+
process.env[`${prefix}DATA_DIR`] = _chunkF6ROPIKUcjs.correctPaths.call(void 0, config.directories.data);
|
|
519
519
|
}
|
|
520
520
|
if (config.directories.config) {
|
|
521
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
521
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkF6ROPIKUcjs.correctPaths.call(void 0, config.directories.config);
|
|
522
522
|
}
|
|
523
523
|
if (config.directories.temp) {
|
|
524
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
524
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkF6ROPIKUcjs.correctPaths.call(void 0, config.directories.temp);
|
|
525
525
|
}
|
|
526
526
|
if (config.directories.log) {
|
|
527
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
527
|
+
process.env[`${prefix}LOG_DIR`] = _chunkF6ROPIKUcjs.correctPaths.call(void 0, config.directories.log);
|
|
528
528
|
}
|
|
529
529
|
if (config.directories.build) {
|
|
530
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
530
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkF6ROPIKUcjs.correctPaths.call(void 0, config.directories.build);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
if (config.skipCache !== void 0) {
|
|
@@ -581,8 +581,8 @@ var setConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config
|
|
|
581
581
|
if (config.logLevel) {
|
|
582
582
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
583
583
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
584
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
585
|
-
process.env.RUST_BACKTRACE =
|
|
584
|
+
process.env.NX_VERBOSE_LOGGING = String(_chunkF6ROPIKUcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkF6ROPIKUcjs.LogLevel.DEBUG ? true : false);
|
|
585
|
+
process.env.RUST_BACKTRACE = _chunkF6ROPIKUcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkF6ROPIKUcjs.LogLevel.DEBUG ? "full" : "none";
|
|
586
586
|
}
|
|
587
587
|
if (config.skipConfigLogging !== void 0) {
|
|
588
588
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
@@ -698,17 +698,17 @@ var createStormConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, as
|
|
|
698
698
|
if (!_optionalChain([_static_cache, 'optionalAccess', _42 => _42.data]) || !_optionalChain([_static_cache, 'optionalAccess', _43 => _43.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
699
699
|
let _workspaceRoot = workspaceRoot;
|
|
700
700
|
if (!_workspaceRoot) {
|
|
701
|
-
_workspaceRoot =
|
|
701
|
+
_workspaceRoot = _chunkF6ROPIKUcjs.findWorkspaceRoot.call(void 0, );
|
|
702
702
|
}
|
|
703
703
|
const configEnv = getConfigEnv();
|
|
704
|
-
const defaultConfig = await
|
|
704
|
+
const defaultConfig = await _chunkF6ROPIKUcjs.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
705
705
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
706
706
|
if (!configFile && !skipLogs) {
|
|
707
|
-
|
|
707
|
+
_chunkF6ROPIKUcjs.writeWarning.call(void 0, "No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
|
|
708
708
|
logLevel: "all"
|
|
709
709
|
});
|
|
710
710
|
}
|
|
711
|
-
result = await
|
|
711
|
+
result = await _chunkF6ROPIKUcjs.StormConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
712
712
|
result.workspaceRoot ??= _workspaceRoot;
|
|
713
713
|
} else {
|
|
714
714
|
result = _static_cache.data;
|
|
@@ -743,8 +743,8 @@ var loadStormConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, asyn
|
|
|
743
743
|
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
744
744
|
setConfigEnv(config);
|
|
745
745
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
746
|
-
|
|
747
|
-
${
|
|
746
|
+
_chunkF6ROPIKUcjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
|
|
747
|
+
${_chunkF6ROPIKUcjs.formatLogMessage.call(void 0, config)}`, config);
|
|
748
748
|
}
|
|
749
749
|
return config;
|
|
750
750
|
}, "loadStormConfig");
|
|
@@ -773,24 +773,24 @@ var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
|
773
773
|
var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
|
|
774
774
|
var _unbuild = require('unbuild');
|
|
775
775
|
async function resolveOptions(options, config) {
|
|
776
|
-
|
|
777
|
-
const stopwatch =
|
|
776
|
+
_chunkF6ROPIKUcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
777
|
+
const stopwatch = _chunkF6ROPIKUcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
778
778
|
if (options.configPath) {
|
|
779
|
-
const configFile = await
|
|
779
|
+
const configFile = await _chunkFK6HPKVRcjs.loadConfig.call(void 0, options.configPath);
|
|
780
780
|
if (configFile) {
|
|
781
781
|
options = _defu2.default.call(void 0, options, configFile);
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
|
-
const outputPath = options.outputPath ||
|
|
784
|
+
const outputPath = options.outputPath || _chunkF6ROPIKUcjs.joinPaths.call(void 0, "dist", options.projectRoot);
|
|
785
785
|
const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
786
|
-
const projectJsonPath =
|
|
786
|
+
const projectJsonPath = _chunkF6ROPIKUcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot, "project.json");
|
|
787
787
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
788
788
|
throw new Error("Cannot find project.json configuration");
|
|
789
789
|
}
|
|
790
790
|
const projectJsonContent = await _promises.readFile.call(void 0, projectJsonPath, "utf8");
|
|
791
791
|
const projectJson = JSON.parse(projectJsonContent);
|
|
792
792
|
const projectName = projectJson.name;
|
|
793
|
-
const packageJsonPath =
|
|
793
|
+
const packageJsonPath = _chunkF6ROPIKUcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot, "package.json");
|
|
794
794
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
795
795
|
throw new Error("Cannot find package.json configuration");
|
|
796
796
|
}
|
|
@@ -798,14 +798,14 @@ async function resolveOptions(options, config) {
|
|
|
798
798
|
const packageJson = JSON.parse(packageJsonContent);
|
|
799
799
|
let tsconfig = options.tsconfig;
|
|
800
800
|
if (!tsconfig) {
|
|
801
|
-
tsconfig =
|
|
801
|
+
tsconfig = _chunkF6ROPIKUcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot, "tsconfig.json");
|
|
802
802
|
}
|
|
803
803
|
if (!_fs.existsSync.call(void 0, tsconfig)) {
|
|
804
804
|
throw new Error("Cannot find tsconfig.json configuration");
|
|
805
805
|
}
|
|
806
806
|
let sourceRoot = projectJson.sourceRoot;
|
|
807
807
|
if (!sourceRoot) {
|
|
808
|
-
sourceRoot =
|
|
808
|
+
sourceRoot = _chunkF6ROPIKUcjs.joinPaths.call(void 0, options.projectRoot, "src");
|
|
809
809
|
}
|
|
810
810
|
if (!_fs.existsSync.call(void 0, sourceRoot)) {
|
|
811
811
|
throw new Error("Cannot find sourceRoot directory");
|
|
@@ -841,7 +841,7 @@ async function resolveOptions(options, config) {
|
|
|
841
841
|
while (entryPath.startsWith("/")) {
|
|
842
842
|
entryPath = entryPath.substring(1);
|
|
843
843
|
}
|
|
844
|
-
const outDir =
|
|
844
|
+
const outDir = _chunkF6ROPIKUcjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkF6ROPIKUcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist");
|
|
845
845
|
ret.push({
|
|
846
846
|
name: `${name}-esm`,
|
|
847
847
|
builder: "mkdist",
|
|
@@ -915,7 +915,7 @@ async function resolveOptions(options, config) {
|
|
|
915
915
|
treeShaking: options.treeShaking !== false,
|
|
916
916
|
platform: _nullishCoalesce(options.platform, () => ( "neutral")),
|
|
917
917
|
color: true,
|
|
918
|
-
logLevel: config.logLevel ===
|
|
918
|
+
logLevel: config.logLevel === _chunkF6ROPIKUcjs.LogLevelLabel.FATAL ? _chunkF6ROPIKUcjs.LogLevelLabel.ERROR : _chunkF6ROPIKUcjs.isVerbose.call(void 0, ) ? "verbose" : config.logLevel
|
|
919
919
|
}
|
|
920
920
|
}
|
|
921
921
|
};
|
|
@@ -932,7 +932,7 @@ async function resolveOptions(options, config) {
|
|
|
932
932
|
if (options.rollup) {
|
|
933
933
|
let rollup = {};
|
|
934
934
|
if (typeof options.rollup === "string") {
|
|
935
|
-
const rollupFile = await
|
|
935
|
+
const rollupFile = await _chunkFK6HPKVRcjs.loadConfig.call(void 0, options.rollup);
|
|
936
936
|
if (rollupFile) {
|
|
937
937
|
rollup = rollupFile;
|
|
938
938
|
}
|
|
@@ -944,15 +944,15 @@ async function resolveOptions(options, config) {
|
|
|
944
944
|
resolvedOptions.hooks = {
|
|
945
945
|
"rollup:options": /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (ctx, opts) => {
|
|
946
946
|
if (options.plugins && options.plugins.length > 0) {
|
|
947
|
-
|
|
947
|
+
_chunkF6ROPIKUcjs.writeDebug.call(void 0, ` \u{1F9E9} Found ${options.plugins.length} plugins in provided build options`, config);
|
|
948
948
|
opts.plugins = options.plugins;
|
|
949
949
|
} else {
|
|
950
|
-
|
|
950
|
+
_chunkF6ROPIKUcjs.writeDebug.call(void 0, ` \u{1F9E9} No plugins found in provided build options, using default plugins`, config);
|
|
951
951
|
opts.plugins = await Promise.all([
|
|
952
|
-
|
|
952
|
+
_chunkR2TMH5IIcjs.analyzePlugin.call(void 0, resolvedOptions),
|
|
953
953
|
_chunkOD3ULBE3cjs.typeDefinitionsPlugin.call(void 0, resolvedOptions),
|
|
954
|
-
|
|
955
|
-
|
|
954
|
+
_chunkFK6HPKVRcjs.tscPlugin.call(void 0, resolvedOptions),
|
|
955
|
+
_chunk3XO4Q6KJcjs.onErrorPlugin.call(void 0, resolvedOptions)
|
|
956
956
|
]);
|
|
957
957
|
}
|
|
958
958
|
}, "rollup:options"),
|
|
@@ -1005,14 +1005,14 @@ var addPackageJsonExport = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
1005
1005
|
};
|
|
1006
1006
|
}, "addPackageJsonExport");
|
|
1007
1007
|
async function generatePackageJson(options) {
|
|
1008
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1009
|
-
|
|
1010
|
-
const stopwatch =
|
|
1011
|
-
const packageJsonPath =
|
|
1008
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkF6ROPIKUcjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1009
|
+
_chunkF6ROPIKUcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
1010
|
+
const stopwatch = _chunkF6ROPIKUcjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1011
|
+
const packageJsonPath = _chunkF6ROPIKUcjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1012
1012
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1013
1013
|
throw new Error("Cannot find package.json configuration");
|
|
1014
1014
|
}
|
|
1015
|
-
let packageJsonContent = await _promises.readFile.call(void 0,
|
|
1015
|
+
let packageJsonContent = await _promises.readFile.call(void 0, _chunkF6ROPIKUcjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
1016
1016
|
if (!packageJsonContent) {
|
|
1017
1017
|
throw new Error("Cannot find package.json configuration file");
|
|
1018
1018
|
}
|
|
@@ -1029,7 +1029,7 @@ async function generatePackageJson(options) {
|
|
|
1029
1029
|
while (entryPath.startsWith("/")) {
|
|
1030
1030
|
entryPath = entryPath.substring(1);
|
|
1031
1031
|
}
|
|
1032
|
-
entryPath = `./${
|
|
1032
|
+
entryPath = `./${_chunkF6ROPIKUcjs.joinPaths.call(void 0, options.projectRoot, entryPath)}`;
|
|
1033
1033
|
if (!ret.includes(entryPath)) {
|
|
1034
1034
|
ret.push(entryPath);
|
|
1035
1035
|
}
|
|
@@ -1060,23 +1060,23 @@ async function generatePackageJson(options) {
|
|
|
1060
1060
|
}, packageJson.exports);
|
|
1061
1061
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
1062
1062
|
packageJson.exports["."] ??= addPackageJsonExport("index", packageJson.type, options.sourceRoot, options.projectRoot);
|
|
1063
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1063
|
+
await _devkit.writeJsonFile.call(void 0, _chunkF6ROPIKUcjs.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
|
|
1064
1064
|
stopwatch();
|
|
1065
1065
|
}
|
|
1066
1066
|
return options;
|
|
1067
1067
|
}
|
|
1068
1068
|
_chunkBGYQAVKQcjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
1069
1069
|
async function executeUnbuild(options) {
|
|
1070
|
-
|
|
1071
|
-
const stopwatch =
|
|
1070
|
+
_chunkF6ROPIKUcjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} (${options.projectRoot}) build`, options.config);
|
|
1071
|
+
const stopwatch = _chunkF6ROPIKUcjs.getStopwatch.call(void 0, `${options.name} (${options.projectRoot}) build`);
|
|
1072
1072
|
try {
|
|
1073
1073
|
const config = {
|
|
1074
1074
|
...options,
|
|
1075
1075
|
config: null,
|
|
1076
|
-
rootDir:
|
|
1076
|
+
rootDir: _chunkF6ROPIKUcjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot)
|
|
1077
1077
|
};
|
|
1078
|
-
|
|
1079
|
-
${
|
|
1078
|
+
_chunkF6ROPIKUcjs.writeTrace.call(void 0, `Running with unbuild configuration:
|
|
1079
|
+
${_chunkF6ROPIKUcjs.formatLogMessage.call(void 0, config)}
|
|
1080
1080
|
`, options.config);
|
|
1081
1081
|
await _unbuild.build.call(void 0, options.projectRoot, false, config);
|
|
1082
1082
|
} finally {
|
|
@@ -1086,8 +1086,8 @@ ${_chunkA45F3XCOcjs.formatLogMessage.call(void 0, config)}
|
|
|
1086
1086
|
}
|
|
1087
1087
|
_chunkBGYQAVKQcjs.__name.call(void 0, executeUnbuild, "executeUnbuild");
|
|
1088
1088
|
async function copyBuildAssets(options) {
|
|
1089
|
-
|
|
1090
|
-
const stopwatch =
|
|
1089
|
+
_chunkF6ROPIKUcjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`, options.config);
|
|
1090
|
+
const stopwatch = _chunkF6ROPIKUcjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1091
1091
|
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outDir, options.projectRoot, options.sourceRoot, options.generatePackageJson, options.includeSrc);
|
|
1092
1092
|
stopwatch();
|
|
1093
1093
|
return options;
|
|
@@ -1095,9 +1095,9 @@ async function copyBuildAssets(options) {
|
|
|
1095
1095
|
_chunkBGYQAVKQcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
1096
1096
|
async function cleanOutputPath(options) {
|
|
1097
1097
|
if (options.clean !== false && options.outDir) {
|
|
1098
|
-
|
|
1099
|
-
const stopwatch =
|
|
1100
|
-
await
|
|
1098
|
+
_chunkF6ROPIKUcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${options.name} output path: ${options.outDir}`, options.config);
|
|
1099
|
+
const stopwatch = _chunkF6ROPIKUcjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1100
|
+
await _chunkAGC7TU3Acjs.cleanDirectories.call(void 0, options.name, options.outDir, options.config);
|
|
1101
1101
|
stopwatch();
|
|
1102
1102
|
}
|
|
1103
1103
|
return options;
|
|
@@ -1113,18 +1113,18 @@ async function build(options) {
|
|
|
1113
1113
|
throw new Error("Cannot find workspace root");
|
|
1114
1114
|
}
|
|
1115
1115
|
const config = await getConfig(workspaceRoot.dir);
|
|
1116
|
-
|
|
1117
|
-
const stopwatch =
|
|
1116
|
+
_chunkF6ROPIKUcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm Unbuild pipeline`, config);
|
|
1117
|
+
const stopwatch = _chunkF6ROPIKUcjs.getStopwatch.call(void 0, "Unbuild pipeline");
|
|
1118
1118
|
try {
|
|
1119
|
-
options.projectRoot =
|
|
1119
|
+
options.projectRoot = _chunkF6ROPIKUcjs.correctPaths.call(void 0, projectRoot);
|
|
1120
1120
|
const resolvedOptions = await resolveOptions(options, config);
|
|
1121
1121
|
await cleanOutputPath(resolvedOptions);
|
|
1122
1122
|
await generatePackageJson(resolvedOptions);
|
|
1123
1123
|
await executeUnbuild(resolvedOptions);
|
|
1124
1124
|
await copyBuildAssets(resolvedOptions);
|
|
1125
|
-
|
|
1125
|
+
_chunkF6ROPIKUcjs.writeSuccess.call(void 0, ` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`, config);
|
|
1126
1126
|
} catch (error) {
|
|
1127
|
-
|
|
1127
|
+
_chunkF6ROPIKUcjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.", config);
|
|
1128
1128
|
throw error;
|
|
1129
1129
|
} finally {
|
|
1130
1130
|
stopwatch();
|
|
@@ -613,55 +613,55 @@ var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}, _c
|
|
|
613
613
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
|
|
614
614
|
return (message) => {
|
|
615
615
|
console.error(`
|
|
616
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)}
|
|
616
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
617
617
|
`);
|
|
618
618
|
};
|
|
619
619
|
}
|
|
620
620
|
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel) {
|
|
621
621
|
return (message) => {
|
|
622
622
|
console.error(`
|
|
623
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)}
|
|
623
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
624
624
|
`);
|
|
625
625
|
};
|
|
626
626
|
}
|
|
627
627
|
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel) {
|
|
628
628
|
return (message) => {
|
|
629
629
|
console.warn(`
|
|
630
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)}
|
|
630
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
631
631
|
`);
|
|
632
632
|
};
|
|
633
633
|
}
|
|
634
634
|
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel) {
|
|
635
635
|
return (message) => {
|
|
636
636
|
console.info(`
|
|
637
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)}
|
|
637
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
638
638
|
`);
|
|
639
639
|
};
|
|
640
640
|
}
|
|
641
641
|
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel) {
|
|
642
642
|
return (message) => {
|
|
643
643
|
console.info(`
|
|
644
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)}
|
|
644
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
645
645
|
`);
|
|
646
646
|
};
|
|
647
647
|
}
|
|
648
648
|
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel) {
|
|
649
649
|
return (message) => {
|
|
650
650
|
console.debug(`
|
|
651
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug]`)}
|
|
651
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
652
652
|
`);
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
655
|
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel) {
|
|
656
656
|
return (message) => {
|
|
657
657
|
console.debug(`
|
|
658
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace]`)}
|
|
658
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
659
659
|
`);
|
|
660
660
|
};
|
|
661
661
|
}
|
|
662
662
|
return (message) => {
|
|
663
663
|
console.log(`
|
|
664
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)}
|
|
664
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
665
665
|
`);
|
|
666
666
|
};
|
|
667
667
|
}, "getLogFn");
|
|
@@ -678,7 +678,6 @@ var getStopwatch = /* @__PURE__ */ __name((name) => {
|
|
|
678
678
|
const end = process.hrtime(start);
|
|
679
679
|
console.info(`
|
|
680
680
|
> \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(end[0] * 1e3 + end[1] / 1e6)}ms to complete
|
|
681
|
-
|
|
682
681
|
`);
|
|
683
682
|
};
|
|
684
683
|
}, "getStopwatch");
|
package/dist/clean.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkAGC7TU3Acjs = require('./chunk-AGC7TU3A.cjs');
|
|
5
|
+
require('./chunk-F6ROPIKU.cjs');
|
|
6
6
|
require('./chunk-BGYQAVKQ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.clean =
|
|
10
|
+
exports.clean = _chunkAGC7TU3Acjs.clean; exports.cleanDirectories = _chunkAGC7TU3Acjs.cleanDirectories;
|
package/dist/clean.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -5,20 +5,20 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkS27NOB7Pcjs = require('./chunk-S27NOB7P.cjs');
|
|
9
9
|
require('./chunk-OD3ULBE3.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkAGC7TU3Acjs = require('./chunk-AGC7TU3A.cjs');
|
|
14
14
|
require('./chunk-ORA4UQMU.cjs');
|
|
15
|
-
require('./chunk-
|
|
16
|
-
require('./chunk-
|
|
15
|
+
require('./chunk-R2TMH5II.cjs');
|
|
16
|
+
require('./chunk-3XO4Q6KJ.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
21
|
-
require('./chunk-
|
|
20
|
+
var _chunkFK6HPKVRcjs = require('./chunk-FK6HPKVR.cjs');
|
|
21
|
+
require('./chunk-F6ROPIKU.cjs');
|
|
22
22
|
require('./chunk-BGYQAVKQ.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
@@ -31,4 +31,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
exports.build =
|
|
34
|
+
exports.build = _chunkS27NOB7Pcjs.build; exports.clean = _chunkAGC7TU3Acjs.clean; exports.cleanDirectories = _chunkAGC7TU3Acjs.cleanDirectories; exports.cleanOutputPath = _chunkS27NOB7Pcjs.cleanOutputPath; exports.copyBuildAssets = _chunkS27NOB7Pcjs.copyBuildAssets; exports.createTsCompilerOptions = _chunkFK6HPKVRcjs.createTsCompilerOptions; exports.executeUnbuild = _chunkS27NOB7Pcjs.executeUnbuild; exports.generatePackageJson = _chunkS27NOB7Pcjs.generatePackageJson; exports.loadConfig = _chunkFK6HPKVRcjs.loadConfig; exports.resolveOptions = _chunkS27NOB7Pcjs.resolveOptions;
|
package/dist/index.js
CHANGED
|
@@ -5,20 +5,20 @@ import {
|
|
|
5
5
|
executeUnbuild,
|
|
6
6
|
generatePackageJson,
|
|
7
7
|
resolveOptions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-55JZXCPU.js";
|
|
9
9
|
import "./chunk-RBYYB7X2.js";
|
|
10
10
|
import {
|
|
11
11
|
clean,
|
|
12
12
|
cleanDirectories
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-F3Y4F5GC.js";
|
|
14
14
|
import "./chunk-OULCUN6I.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-R3UGJCV6.js";
|
|
16
|
+
import "./chunk-AB6Y2V2J.js";
|
|
17
17
|
import {
|
|
18
18
|
createTsCompilerOptions,
|
|
19
19
|
loadConfig
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-OAIVCYEQ.js";
|
|
21
|
+
import "./chunk-VVCRJ4VH.js";
|
|
22
22
|
import "./chunk-3GQAWCBQ.js";
|
|
23
23
|
export {
|
|
24
24
|
build,
|
package/dist/plugins/analyze.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkR2TMH5IIcjs = require('../chunk-R2TMH5II.cjs');
|
|
4
|
+
require('../chunk-F6ROPIKU.cjs');
|
|
5
5
|
require('../chunk-BGYQAVKQ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.analyzePlugin =
|
|
8
|
+
exports.analyzePlugin = _chunkR2TMH5IIcjs.analyzePlugin;
|
package/dist/plugins/analyze.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunk3XO4Q6KJcjs = require('../chunk-3XO4Q6KJ.cjs');
|
|
4
|
+
require('../chunk-F6ROPIKU.cjs');
|
|
5
5
|
require('../chunk-BGYQAVKQ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.onErrorPlugin =
|
|
8
|
+
exports.onErrorPlugin = _chunk3XO4Q6KJcjs.onErrorPlugin;
|
package/dist/plugins/on-error.js
CHANGED
package/dist/plugins/tsc.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkFK6HPKVRcjs = require('../chunk-FK6HPKVR.cjs');
|
|
4
|
+
require('../chunk-F6ROPIKU.cjs');
|
|
5
5
|
require('../chunk-BGYQAVKQ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.tscPlugin =
|
|
8
|
+
exports.tscPlugin = _chunkFK6HPKVRcjs.tscPlugin;
|
package/dist/plugins/tsc.js
CHANGED