@storm-software/workspace-tools 1.277.35 → 1.278.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +108 -0
- package/README.md +1 -1
- package/config/base.json +14 -117
- package/dist/{chunk-Y6HJGXM6.mjs → chunk-2AZFAMT2.mjs} +1 -1
- package/dist/chunk-2CDSXWFA.js +311 -0
- package/dist/chunk-2LY7DGBH.mjs +336 -0
- package/dist/{chunk-334J5IXK.js → chunk-452FQZ3B.js} +2 -2
- package/dist/{chunk-XYJH3GTI.mjs → chunk-47VSL76K.mjs} +1 -1
- package/dist/{chunk-FI4YJWQR.mjs → chunk-47X3OTR5.mjs} +2 -2
- package/dist/{chunk-I2JPIOP6.mjs → chunk-5FBIPGPD.mjs} +1 -1
- package/dist/{chunk-QMELEYB5.mjs → chunk-5KP5KWGU.mjs} +1 -1
- package/dist/{chunk-5L75MUAB.js → chunk-63DISBXN.js} +2 -2
- package/dist/{chunk-L4RTU5C6.mjs → chunk-64LWOWPE.mjs} +3 -3
- package/dist/{chunk-GWJER63Y.js → chunk-73IC2JQV.js} +2 -2
- package/dist/{chunk-IMF332I2.mjs → chunk-7DLHAWLG.mjs} +1 -1
- package/dist/{chunk-QSAXCKSA.js → chunk-AH253N44.js} +5 -5
- package/dist/{chunk-BWPSZXXW.js → chunk-ARTBWDR4.js} +2 -2
- package/dist/{chunk-YWOZ2IOU.js → chunk-BZTR7YL6.js} +2 -2
- package/dist/{chunk-T3MDVD7M.mjs → chunk-CCMBHSV7.mjs} +3 -3
- package/dist/{chunk-TXFPVY55.js → chunk-CHSTJ3AR.js} +11 -9
- package/dist/{chunk-QGUKFIB7.mjs → chunk-D26STI4S.mjs} +1 -1
- package/dist/{chunk-NYAM2TPQ.js → chunk-DJLGYPRA.js} +4 -4
- package/dist/{chunk-OFNVRO2Q.js → chunk-DLJY6UOI.js} +7 -7
- package/dist/{chunk-X5VVVLBK.js → chunk-ESFH6QVE.js} +2 -2
- package/dist/{chunk-WMOEEQFZ.mjs → chunk-FVGLL54Y.mjs} +1 -1
- package/dist/{chunk-5BOL6D4L.js → chunk-G3YKHGPE.js} +2 -2
- package/dist/{chunk-G4AFFXLB.mjs → chunk-GNIDPNI3.mjs} +2 -2
- package/dist/{chunk-P7VPITZA.js → chunk-GWT4ZQ6Y.js} +2 -2
- package/dist/chunk-IBTPJDV6.js +336 -0
- package/dist/{chunk-T5J6PFWJ.mjs → chunk-JCEMECUD.mjs} +2 -2
- package/dist/{chunk-Q4VGUJQZ.js → chunk-JX3KVFO5.js} +2 -2
- package/dist/{chunk-VZTL36R3.mjs → chunk-K7FEZWBA.mjs} +1 -1
- package/dist/{chunk-WJ47CTAU.js → chunk-KRAHIMKO.js} +2 -2
- package/dist/{chunk-VK52Z2DT.js → chunk-KX7XTUYW.js} +457 -39
- package/dist/{chunk-MY3L5HV6.mjs → chunk-LVIDSVDC.mjs} +2 -2
- package/dist/{chunk-CBPC6BVR.js → chunk-MZEFNYBT.js} +20 -20
- package/dist/{chunk-ENPVXQZG.mjs → chunk-N46RWKEK.mjs} +1 -1
- package/dist/{chunk-OKEHKFS6.mjs → chunk-PIK7KYVE.mjs} +1 -1
- package/dist/{chunk-ZB76VIIN.mjs → chunk-PYS5P7QE.mjs} +429 -11
- package/dist/{chunk-HTECEOBH.mjs → chunk-R3OLB3C6.mjs} +103 -106
- package/dist/{chunk-ZX3GIY5S.js → chunk-RANQ4TXU.js} +103 -106
- package/dist/{chunk-V3O4MYED.mjs → chunk-RMWG74QA.mjs} +1 -1
- package/dist/{chunk-DYIS436F.mjs → chunk-SVIG7SR3.mjs} +1 -1
- package/dist/{chunk-K42K44IQ.mjs → chunk-UGBVA3KE.mjs} +5 -3
- package/dist/{chunk-IEZIXYOC.js → chunk-UGJVZ6LI.js} +21 -21
- package/dist/{chunk-MOD3ND43.js → chunk-UTAJHUJL.js} +32 -32
- package/dist/{chunk-7BLTZYJ3.mjs → chunk-V2UGPEY2.mjs} +1 -1
- package/dist/chunk-V44DYGWX.mjs +311 -0
- package/dist/{chunk-S62KQPMR.js → chunk-VR3OLKAI.js} +2 -2
- package/dist/{chunk-AZ5HDBYX.mjs → chunk-VVCIYZJD.mjs} +7 -7
- package/dist/{chunk-XSLQUWWH.mjs → chunk-WASXXREW.mjs} +4 -4
- package/dist/{chunk-IQCBMNCA.js → chunk-WRXLSZ6I.js} +2 -2
- package/dist/{chunk-YQHPAR7K.js → chunk-YBUD4GFC.js} +16 -16
- package/dist/{chunk-NPYZUWJH.js → chunk-YEUILWDR.js} +2 -2
- package/dist/{chunk-KE2XVUHC.js → chunk-ZVL2TRR6.js} +6 -6
- package/dist/{executor-oIXMAz-g.d.ts → executor-BZYJEb9V.d.ts} +1 -1
- package/dist/{executor-DPIWxm-x.d.mts → executor-Bez_tWxf.d.mts} +1 -1
- package/dist/{executor-B8wLnXnx.d.mts → executor-CUlX29YN.d.mts} +1 -1
- package/dist/{executor-CFBDS3tc.d.mts → executor-CwENKkEy.d.mts} +1 -1
- package/dist/{executor-L8Jmwybf.d.ts → executor-CysN0MTH.d.ts} +1 -1
- package/dist/{executor-CRnQhNlT.d.ts → executor-D3Tip-ad.d.ts} +1 -1
- package/dist/{executor-BSkPYkkP.d.mts → executor-DJb8r-Zb.d.mts} +1 -1
- package/dist/{executor-BpITPYcR.d.ts → executor-_WT0Qd2F.d.ts} +1 -1
- package/dist/executors.d.mts +5 -5
- package/dist/executors.d.ts +5 -5
- package/dist/executors.js +17 -17
- package/dist/executors.mjs +21 -21
- package/dist/{generator-rgiO0GJQ.d.ts → generator-Biz_Ai4B.d.ts} +1 -1
- package/dist/{generator-Cb58mGnB.d.mts → generator-CVPI52z3.d.mts} +2 -2
- package/dist/{generator-CJABg49g.d.mts → generator-CYCzda2K.d.mts} +2 -2
- package/dist/{generator-Cj8BzNWS.d.ts → generator-CmkSA-dv.d.ts} +2 -2
- package/dist/{generator-CAV7jT3f.d.mts → generator-D7tljo-K.d.mts} +1 -1
- package/dist/{generator-BIMz19YK.d.mts → generator-DKZjOzNw.d.mts} +2 -2
- package/dist/{generator-DTjXg4Lz.d.mts → generator-De9XOTip.d.mts} +2 -2
- package/dist/{generator-mIOdDYVo.d.ts → generator-Dk1ihwF-.d.ts} +2 -2
- package/dist/{generator-Sm7r9ETR.d.ts → generator-DpjPMueC.d.ts} +2 -2
- package/dist/{generator-C0oESGRU.d.ts → generator-Dyk2TjIp.d.ts} +1 -1
- package/dist/{generator-Oe3vHbZC.d.mts → generator-o2v2Q4At.d.mts} +1 -1
- package/dist/{generator-Cf30wgA4.d.ts → generator-ujd2pu2I.d.ts} +2 -2
- package/dist/generators.d.mts +8 -8
- package/dist/generators.d.ts +8 -8
- package/dist/generators.js +12 -12
- package/dist/generators.mjs +14 -14
- package/dist/index.d.mts +13 -12
- package/dist/index.d.ts +13 -12
- package/dist/index.js +34 -26
- package/dist/index.mjs +41 -33
- package/dist/src/base/base-executor.d.mts +2 -2
- package/dist/src/base/base-executor.d.ts +2 -2
- package/dist/src/base/base-executor.js +4 -4
- package/dist/src/base/base-executor.mjs +3 -3
- package/dist/src/base/base-generator.d.mts +2 -2
- package/dist/src/base/base-generator.d.ts +2 -2
- package/dist/src/base/base-generator.js +4 -4
- package/dist/src/base/base-generator.mjs +3 -3
- package/dist/src/base/index.d.mts +2 -2
- package/dist/src/base/index.d.ts +2 -2
- package/dist/src/base/index.js +5 -5
- package/dist/src/base/index.mjs +4 -4
- package/dist/src/executors/cargo-build/executor.js +5 -5
- package/dist/src/executors/cargo-build/executor.mjs +4 -4
- package/dist/src/executors/cargo-check/executor.js +5 -5
- package/dist/src/executors/cargo-check/executor.mjs +4 -4
- package/dist/src/executors/cargo-clippy/executor.js +5 -5
- package/dist/src/executors/cargo-clippy/executor.mjs +4 -4
- package/dist/src/executors/cargo-doc/executor.js +5 -5
- package/dist/src/executors/cargo-doc/executor.mjs +4 -4
- package/dist/src/executors/cargo-format/executor.js +5 -5
- package/dist/src/executors/cargo-format/executor.mjs +4 -4
- package/dist/src/executors/cargo-publish/executor.js +4 -6
- package/dist/src/executors/cargo-publish/executor.mjs +3 -5
- package/dist/src/executors/clean-package/executor.d.mts +1 -1
- package/dist/src/executors/clean-package/executor.d.ts +1 -1
- package/dist/src/executors/clean-package/executor.js +7 -6
- package/dist/src/executors/clean-package/executor.mjs +4 -3
- package/dist/src/executors/esbuild/executor.d.mts +2 -2
- package/dist/src/executors/esbuild/executor.d.ts +2 -2
- package/dist/src/executors/esbuild/executor.js +5 -5
- package/dist/src/executors/esbuild/executor.mjs +4 -4
- package/dist/src/executors/npm-publish/executor.js +5 -6
- package/dist/src/executors/npm-publish/executor.mjs +4 -5
- package/dist/src/executors/size-limit/executor.d.mts +2 -2
- package/dist/src/executors/size-limit/executor.d.ts +2 -2
- package/dist/src/executors/size-limit/executor.js +5 -5
- package/dist/src/executors/size-limit/executor.mjs +4 -4
- package/dist/src/executors/typia/executor.d.mts +2 -2
- package/dist/src/executors/typia/executor.d.ts +2 -2
- package/dist/src/executors/typia/executor.js +5 -5
- package/dist/src/executors/typia/executor.mjs +4 -4
- package/dist/src/executors/unbuild/executor.d.mts +2 -2
- package/dist/src/executors/unbuild/executor.d.ts +2 -2
- package/dist/src/executors/unbuild/executor.js +5 -5
- package/dist/src/executors/unbuild/executor.mjs +4 -4
- package/dist/src/generators/browser-library/generator.d.mts +3 -3
- package/dist/src/generators/browser-library/generator.d.ts +3 -3
- package/dist/src/generators/browser-library/generator.js +5 -5
- package/dist/src/generators/browser-library/generator.mjs +4 -4
- package/dist/src/generators/config-schema/generator.d.mts +3 -3
- package/dist/src/generators/config-schema/generator.d.ts +3 -3
- package/dist/src/generators/config-schema/generator.js +5 -5
- package/dist/src/generators/config-schema/generator.mjs +4 -4
- package/dist/src/generators/neutral-library/generator.d.mts +3 -3
- package/dist/src/generators/neutral-library/generator.d.ts +3 -3
- package/dist/src/generators/neutral-library/generator.js +5 -5
- package/dist/src/generators/neutral-library/generator.mjs +4 -4
- package/dist/src/generators/node-library/generator.d.mts +3 -3
- package/dist/src/generators/node-library/generator.d.ts +3 -3
- package/dist/src/generators/node-library/generator.js +5 -5
- package/dist/src/generators/node-library/generator.mjs +4 -4
- package/dist/src/generators/preset/generator.d.mts +3 -3
- package/dist/src/generators/preset/generator.d.ts +3 -3
- package/dist/src/generators/preset/generator.js +5 -5
- package/dist/src/generators/preset/generator.mjs +4 -4
- package/dist/src/generators/release-version/generator.d.mts +2 -2
- package/dist/src/generators/release-version/generator.d.ts +2 -2
- package/dist/src/generators/release-version/generator.js +5 -5
- package/dist/src/generators/release-version/generator.mjs +4 -4
- package/dist/src/plugins/rust/cargo-toml.js +3 -2
- package/dist/src/plugins/rust/cargo-toml.mjs +2 -1
- package/dist/src/plugins/rust/index.js +3 -2
- package/dist/src/plugins/rust/index.mjs +2 -1
- package/dist/src/plugins/typescript/index.js +2 -2
- package/dist/src/plugins/typescript/index.mjs +1 -1
- package/dist/src/plugins/typescript/project-config.js +2 -2
- package/dist/src/plugins/typescript/project-config.mjs +1 -1
- package/dist/src/types.d.mts +2 -2
- package/dist/src/types.d.ts +2 -2
- package/dist/src/utils/apply-workspace-tokens.d.mts +1 -1
- package/dist/src/utils/apply-workspace-tokens.d.ts +1 -1
- package/dist/src/utils/index.d.mts +3 -2
- package/dist/src/utils/index.d.ts +3 -2
- package/dist/src/utils/index.js +13 -5
- package/dist/src/utils/index.mjs +13 -5
- package/dist/src/utils/nx-json.d.mts +57 -0
- package/dist/src/utils/nx-json.d.ts +57 -0
- package/dist/src/utils/nx-json.js +11 -0
- package/dist/src/utils/nx-json.mjs +11 -0
- package/dist/src/utils/package-helpers.js +4 -5
- package/dist/src/utils/package-helpers.mjs +3 -4
- package/dist/src/utils/project-tags.d.mts +2 -2
- package/dist/src/utils/project-tags.d.ts +2 -2
- package/dist/{types-DvynnIqE.d.ts → types-DWiPwz5j.d.mts} +12 -6
- package/dist/{types-DvynnIqE.d.mts → types-DWiPwz5j.d.ts} +12 -6
- package/dist/{types-jXJWvL7s.d.mts → types-DXRPpxuL.d.mts} +1 -1
- package/dist/{types-SUxfrM7H.d.ts → types-ifEQCCcO.d.ts} +1 -1
- package/package.json +5 -5
- package/dist/chunk-D4QG6XOG.mjs +0 -665
- package/dist/chunk-X5WLGOL5.js +0 -665
- /package/dist/{chunk-JGP4YWZY.js → chunk-DO2X7OZO.js} +0 -0
- /package/dist/{chunk-6YZ3OUJB.mjs → chunk-XCVH63OO.mjs} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,114 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Workspace Tools
|
|
4
4
|
|
|
5
|
+
## [1.278.3](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.278.3) (2025-08-03)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **monorepo:** Updates to package dependencies
|
|
10
|
+
([d3178b9fe](https://github.com/storm-software/storm-ops/commit/d3178b9fe))
|
|
11
|
+
|
|
12
|
+
### Updated Dependencies
|
|
13
|
+
|
|
14
|
+
- Updated prettier to 0.51.65
|
|
15
|
+
- Updated esbuild to 0.45.53
|
|
16
|
+
- Updated unbuild to 0.49.64
|
|
17
|
+
|
|
18
|
+
## [1.278.2](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.278.2) (2025-08-03)
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
- **workspace-tools:** Remove unused import from module
|
|
23
|
+
([cc68ad3a3](https://github.com/storm-software/storm-ops/commit/cc68ad3a3))
|
|
24
|
+
|
|
25
|
+
### Miscellaneous
|
|
26
|
+
|
|
27
|
+
- **monorepo:** Updates to README and dependencies
|
|
28
|
+
([d5fa740ba](https://github.com/storm-software/storm-ops/commit/d5fa740ba))
|
|
29
|
+
|
|
30
|
+
### Updated Dependencies
|
|
31
|
+
|
|
32
|
+
- Updated prettier to 0.51.64
|
|
33
|
+
- Updated esbuild to 0.45.52
|
|
34
|
+
- Updated unbuild to 0.49.63
|
|
35
|
+
|
|
36
|
+
## [1.278.1](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.278.1) (2025-08-03)
|
|
37
|
+
|
|
38
|
+
### Miscellaneous
|
|
39
|
+
|
|
40
|
+
- **workspace-tools:** Handle named inputs in the `withNamedInputs` parameters
|
|
41
|
+
correctly
|
|
42
|
+
([191e4607f](https://github.com/storm-software/storm-ops/commit/191e4607f))
|
|
43
|
+
- **workspace-tools:** Sort the returned array in the `withNamedInputs` helper
|
|
44
|
+
function
|
|
45
|
+
([bc44464cb](https://github.com/storm-software/storm-ops/commit/bc44464cb))
|
|
46
|
+
- **monorepo:** Update workspace dependency links for packages
|
|
47
|
+
([e311f77ef](https://github.com/storm-software/storm-ops/commit/e311f77ef))
|
|
48
|
+
|
|
49
|
+
### Updated Dependencies
|
|
50
|
+
|
|
51
|
+
- Updated prettier to 0.51.63
|
|
52
|
+
- Updated esbuild to 0.45.51
|
|
53
|
+
- Updated unbuild to 0.49.62
|
|
54
|
+
|
|
55
|
+
## [1.278.0](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.278.0) (2025-08-03)
|
|
56
|
+
|
|
57
|
+
### Features
|
|
58
|
+
|
|
59
|
+
- **workspace-tools:** Added the `nx-json` utility module
|
|
60
|
+
([be7ebe1a4](https://github.com/storm-software/storm-ops/commit/be7ebe1a4))
|
|
61
|
+
|
|
62
|
+
### Miscellaneous
|
|
63
|
+
|
|
64
|
+
- **monorepo:** Update README and package dependency versions
|
|
65
|
+
([cf2786e59](https://github.com/storm-software/storm-ops/commit/cf2786e59))
|
|
66
|
+
|
|
67
|
+
### Updated Dependencies
|
|
68
|
+
|
|
69
|
+
- Updated prettier to 0.51.62
|
|
70
|
+
- Updated esbuild to 0.45.50
|
|
71
|
+
- Updated unbuild to 0.49.61
|
|
72
|
+
|
|
73
|
+
## [1.277.36](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.277.36) (2025-08-03)
|
|
74
|
+
|
|
75
|
+
### Bug Fixes
|
|
76
|
+
|
|
77
|
+
- **workspace-tools:** Resolved cache miss issues during tasks and cleaned up
|
|
78
|
+
the plugin definitions
|
|
79
|
+
([8e4fb7977](https://github.com/storm-software/storm-ops/commit/8e4fb7977))
|
|
80
|
+
|
|
81
|
+
### Miscellaneous
|
|
82
|
+
|
|
83
|
+
- **monorepo:** Update workspace package dependencies
|
|
84
|
+
([a51e7f3f5](https://github.com/storm-software/storm-ops/commit/a51e7f3f5))
|
|
85
|
+
- **monorepo:** Regenerate README markdown files
|
|
86
|
+
([bfce1b325](https://github.com/storm-software/storm-ops/commit/bfce1b325))
|
|
87
|
+
|
|
88
|
+
### Updated Dependencies
|
|
89
|
+
|
|
90
|
+
- Updated prettier to 0.51.61
|
|
91
|
+
- Updated esbuild to 0.45.49
|
|
92
|
+
- Updated unbuild to 0.49.60
|
|
93
|
+
|
|
94
|
+
## [1.277.35](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.277.35) (2025-08-03)
|
|
95
|
+
|
|
96
|
+
### Bug Fixes
|
|
97
|
+
|
|
98
|
+
- **workspace-tools:** Resolve issue with `name` used as `projects` key in
|
|
99
|
+
plugins
|
|
100
|
+
([c38920eac](https://github.com/storm-software/storm-ops/commit/c38920eac))
|
|
101
|
+
|
|
102
|
+
### Miscellaneous
|
|
103
|
+
|
|
104
|
+
- **monorepo:** Update workspace package dependencies
|
|
105
|
+
([c6fbbda93](https://github.com/storm-software/storm-ops/commit/c6fbbda93))
|
|
106
|
+
|
|
107
|
+
### Updated Dependencies
|
|
108
|
+
|
|
109
|
+
- Updated prettier to 0.51.60
|
|
110
|
+
- Updated esbuild to 0.45.48
|
|
111
|
+
- Updated unbuild to 0.49.59
|
|
112
|
+
|
|
5
113
|
## [1.277.34](https://github.com/storm-software/storm-ops/releases/tag/workspace-tools%401.277.34) (2025-08-02)
|
|
6
114
|
|
|
7
115
|
### Bug Fixes
|
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/config/base.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"$schema": "https://cdn.jsdelivr.net/npm/nx/schemas/nx-schema.json",
|
|
3
3
|
"extends": "nx/presets/npm.json",
|
|
4
4
|
"namedInputs": {
|
|
5
|
+
"allProjectFiles": ["sharedGlobals", "{projectRoot}/**/*"],
|
|
5
6
|
"sharedGlobals": [
|
|
6
7
|
"{workspaceRoot}/.github/**/*",
|
|
7
8
|
"{workspaceRoot}/.gitattributes",
|
|
@@ -33,12 +34,19 @@
|
|
|
33
34
|
"{workspaceRoot}/storm-workspace.config.ts",
|
|
34
35
|
"{workspaceRoot}/.storm-workspace/config.ts",
|
|
35
36
|
"{workspaceRoot}/.storm-workspace/config.*.ts",
|
|
37
|
+
"{workspaceRoot}/devenv.lock",
|
|
38
|
+
"{workspaceRoot}/devenv.nix",
|
|
39
|
+
"{workspaceRoot}/devenv.yaml",
|
|
40
|
+
"{workspaceRoot}/.devenv.flake.nix",
|
|
41
|
+
"{workspaceRoot}/.devenv",
|
|
42
|
+
"{workspaceRoot}/.direnv",
|
|
36
43
|
"{workspaceRoot}/.env",
|
|
44
|
+
"{workspaceRoot}/.envrc",
|
|
37
45
|
"{workspaceRoot}/.env.*"
|
|
38
46
|
],
|
|
39
|
-
"default": ["sharedGlobals", "{projectRoot}/**/*"],
|
|
40
47
|
"production": [
|
|
41
48
|
"{projectRoot}/**/*",
|
|
49
|
+
"!{projectRoot}/dist/**/*",
|
|
42
50
|
"!{projectRoot}/tools/**/*",
|
|
43
51
|
"!{projectRoot}/scripts/**/*",
|
|
44
52
|
"!{projectRoot}/node_modules/**/*",
|
|
@@ -87,8 +95,6 @@
|
|
|
87
95
|
"{workspaceRoot}/testing/**/*",
|
|
88
96
|
"{workspaceRoot}/coverage/**/*",
|
|
89
97
|
"{projectRoot}/project.json",
|
|
90
|
-
"{projectRoot}/README.md",
|
|
91
|
-
"{projectRoot}/CHANGELOG.md",
|
|
92
98
|
"{projectRoot}/.env",
|
|
93
99
|
"{projectRoot}/.env.local",
|
|
94
100
|
"{projectRoot}/jest.config.ts",
|
|
@@ -134,8 +140,6 @@
|
|
|
134
140
|
"{workspaceRoot}/prettier.config.js",
|
|
135
141
|
"{workspaceRoot}/.prettierignore",
|
|
136
142
|
"{projectRoot}/project.json",
|
|
137
|
-
"{projectRoot}/README.md",
|
|
138
|
-
"{projectRoot}/CHANGELOG.md",
|
|
139
143
|
"{projectRoot}/.env",
|
|
140
144
|
"{projectRoot}/.env.local",
|
|
141
145
|
"{projectRoot}/.eslintignore",
|
|
@@ -239,26 +243,17 @@
|
|
|
239
243
|
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
|
|
240
244
|
"!{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)",
|
|
241
245
|
"!{projectRoot}/node_modules/**/*",
|
|
246
|
+
"!{projectRoot}/dist/**/*",
|
|
242
247
|
"!{projectRoot}/benches/**/*",
|
|
243
248
|
"!{projectRoot}/e2e/**/*",
|
|
244
249
|
"!{projectRoot}/tests/**/*",
|
|
245
250
|
"!{projectRoot}/testing/**/*",
|
|
246
|
-
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
|
|
247
|
-
"!{projectRoot}/tsconfig.spec.json",
|
|
248
|
-
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
|
|
249
|
-
"!{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)",
|
|
250
|
-
"!{projectRoot}/node_modules/**/*",
|
|
251
251
|
"{projectRoot}/package.json",
|
|
252
252
|
"{projectRoot}/tsconfig.json",
|
|
253
253
|
"{projectRoot}/tsconfig.*.json",
|
|
254
254
|
"{projectRoot}/project.json",
|
|
255
|
-
"{projectRoot}/README.md",
|
|
256
|
-
"{projectRoot}/CHANGELOG.md",
|
|
257
255
|
"{projectRoot}/.env",
|
|
258
256
|
"{projectRoot}/.env.*",
|
|
259
|
-
"{projectRoot}/README.md",
|
|
260
|
-
"{projectRoot}/docs/**/*",
|
|
261
|
-
"{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)",
|
|
262
257
|
"{projectRoot}/**/*.proto",
|
|
263
258
|
"{projectRoot}/**/*.acid",
|
|
264
259
|
"{projectRoot}/**/*.acidic",
|
|
@@ -282,76 +277,16 @@
|
|
|
282
277
|
"{projectRoot}/src/**/*.mdx",
|
|
283
278
|
"{projectRoot}/build.*.[jt]s?(x)",
|
|
284
279
|
"{projectRoot}/tsup.*.[jt]s?(x)",
|
|
280
|
+
"{projectRoot}/vite.*.[jt]s?(x)",
|
|
285
281
|
"{projectRoot}/contentlayer.*.[jt]s?(x)",
|
|
286
282
|
"{projectRoot}/bin/**/*",
|
|
287
|
-
"{projectRoot}/
|
|
288
|
-
"{projectRoot}/helpers/**/*",
|
|
289
|
-
"{projectRoot}/scripts/**/*"
|
|
283
|
+
"{projectRoot}/helpers/**/*"
|
|
290
284
|
]
|
|
291
285
|
},
|
|
292
286
|
"targetDefaults": {
|
|
293
|
-
"lint-markdown": {
|
|
294
|
-
"inputs": ["linting", "{projectRoot}/**/*.md", "{projectRoot}/**/*.mdx"],
|
|
295
|
-
"outputs": ["{projectRoot}/**/*.md", "{projectRoot}/**/*.mdx"],
|
|
296
|
-
"dependsOn": ["^lint-markdown"],
|
|
297
|
-
"executor": "nx:run-commands",
|
|
298
|
-
"options": {
|
|
299
|
-
"command": "pnpm exec markdownlint-cli2 \"{projectRoot}/*.{md,mdx}\" \"{projectRoot}/**/*.{md,mdx}\" --config \"node_modules/@storm-software/markdownlint/config/base.markdownlint-cli2.jsonc\" --fix"
|
|
300
|
-
}
|
|
301
|
-
},
|
|
302
|
-
"lint": {
|
|
303
|
-
"dependsOn": ["lint-markdown", "^lint"],
|
|
304
|
-
"executor": "nx:run-commands",
|
|
305
|
-
"options": {
|
|
306
|
-
"command": "echo Linted the project files in \"{projectRoot}\" "
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
"format-toml": {
|
|
310
|
-
"inputs": ["linting", "{projectRoot}/**/*.toml"],
|
|
311
|
-
"outputs": ["{projectRoot}/**/*.toml"],
|
|
312
|
-
"dependsOn": ["^format-toml"],
|
|
313
|
-
"executor": "nx:run-commands",
|
|
314
|
-
"options": {
|
|
315
|
-
"command": "pnpm exec taplo format --config=\"node_modules/@storm-software/linting-tools/taplo/config.toml\" --cache-path=\"node_modules/.cache/taplo/{projectRoot}\" --colors=\"always\" \"{projectRoot}/*.toml\" \"{projectRoot}/**/*.toml\" "
|
|
316
|
-
}
|
|
317
|
-
},
|
|
318
|
-
"format-readme": {
|
|
319
|
-
"inputs": [
|
|
320
|
-
"linting",
|
|
321
|
-
"documentation",
|
|
322
|
-
"{projectRoot}/{README.md,package.json,Cargo.toml,executors.json,generators.json}",
|
|
323
|
-
"default",
|
|
324
|
-
"^production"
|
|
325
|
-
],
|
|
326
|
-
"outputs": ["{projectRoot}/README.md"],
|
|
327
|
-
"dependsOn": ["^format-readme"],
|
|
328
|
-
"executor": "nx:run-commands",
|
|
329
|
-
"options": {
|
|
330
|
-
"command": "pnpm exec storm-git readme --templates=\"tools/readme-templates\" --project=\"{projectName}\""
|
|
331
|
-
}
|
|
332
|
-
},
|
|
333
|
-
"format-prettier": {
|
|
334
|
-
"inputs": ["linting", "default", "^production"],
|
|
335
|
-
"dependsOn": ["^format-prettier"],
|
|
336
|
-
"executor": "nx:run-commands",
|
|
337
|
-
"options": {
|
|
338
|
-
"command": "pnpm exec prettier \"{projectRoot}/**/*\" --write --ignore-unknown --no-error-on-unmatched-pattern --config=\"node_modules/@storm-software/prettier/config.json\" --ignore-path=\"node_modules/@storm-software/prettier/.prettierignore\" --cache --cache-location=\"node_modules/.cache/prettier/{projectRoot}\" "
|
|
339
|
-
}
|
|
340
|
-
},
|
|
341
|
-
"format": {
|
|
342
|
-
"dependsOn": [
|
|
343
|
-
"format-toml",
|
|
344
|
-
"format-readme",
|
|
345
|
-
"format-prettier",
|
|
346
|
-
"^format"
|
|
347
|
-
],
|
|
348
|
-
"options": {
|
|
349
|
-
"command": "echo Formatted the project files in \"{projectRoot}\" "
|
|
350
|
-
}
|
|
351
|
-
},
|
|
352
287
|
"clean": {
|
|
353
|
-
"inputs": ["
|
|
354
|
-
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
|
|
288
|
+
"inputs": ["{workspaceRoot}/dist/{projectRoot}", "{projectRoot}/dist"],
|
|
289
|
+
"outputs": ["{workspaceRoot}/dist/{projectRoot}", "{projectRoot}/dist"],
|
|
355
290
|
"dependsOn": ["^clean"],
|
|
356
291
|
"executor": "nx:run-commands",
|
|
357
292
|
"options": {
|
|
@@ -361,45 +296,7 @@
|
|
|
361
296
|
]
|
|
362
297
|
}
|
|
363
298
|
},
|
|
364
|
-
"build-untyped": {
|
|
365
|
-
"dependsOn": ["^build"]
|
|
366
|
-
},
|
|
367
|
-
"build-base": {
|
|
368
|
-
"dependsOn": ["build-untyped", "^build"]
|
|
369
|
-
},
|
|
370
|
-
"build-compile": {
|
|
371
|
-
"inputs": ["default", "^production"],
|
|
372
|
-
"dependsOn": ["build-base", "build-untyped", "^build"]
|
|
373
|
-
},
|
|
374
|
-
"build": {
|
|
375
|
-
"inputs": ["default", "^production"],
|
|
376
|
-
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
|
|
377
|
-
"dependsOn": ["build-base", "build-compile", "build-untyped", "^build"]
|
|
378
|
-
},
|
|
379
|
-
"rebuild": {
|
|
380
|
-
"inputs": ["default", "^production"],
|
|
381
|
-
"executor": "nx:run-commands",
|
|
382
|
-
"dependsOn": ["clean", "^build"],
|
|
383
|
-
"options": {
|
|
384
|
-
"command": "pnpm exec nx run {projectName}:build",
|
|
385
|
-
"cwd": "{workspaceRoot}"
|
|
386
|
-
}
|
|
387
|
-
},
|
|
388
|
-
"docs": {
|
|
389
|
-
"outputs": ["{options.outputPath}"],
|
|
390
|
-
"inputs": ["linting", "documentation", "default", "^production"],
|
|
391
|
-
"dependsOn": ["build", "format-readme", "lint-docs", "^docs"]
|
|
392
|
-
},
|
|
393
|
-
"test": {
|
|
394
|
-
"inputs": ["testing", "default", "^production"],
|
|
395
|
-
"dependsOn": ["build", "^test"]
|
|
396
|
-
},
|
|
397
|
-
"e2e": {
|
|
398
|
-
"inputs": ["testing", "default", "^production"],
|
|
399
|
-
"dependsOn": ["test", "^e2e"]
|
|
400
|
-
},
|
|
401
299
|
"nx-release-publish": {
|
|
402
|
-
"inputs": ["default", "^production"],
|
|
403
300
|
"dependsOn": ["build", "^nx-release-publish"]
|
|
404
301
|
}
|
|
405
302
|
},
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// ../config-tools/src/types.ts
|
|
2
|
+
var LogLevel = {
|
|
3
|
+
SILENT: 0,
|
|
4
|
+
FATAL: 10,
|
|
5
|
+
ERROR: 20,
|
|
6
|
+
WARN: 30,
|
|
7
|
+
SUCCESS: 35,
|
|
8
|
+
INFO: 40,
|
|
9
|
+
DEBUG: 60,
|
|
10
|
+
TRACE: 70,
|
|
11
|
+
ALL: 100
|
|
12
|
+
};
|
|
13
|
+
var LogLevelLabel = {
|
|
14
|
+
SILENT: "silent",
|
|
15
|
+
FATAL: "fatal",
|
|
16
|
+
ERROR: "error",
|
|
17
|
+
WARN: "warn",
|
|
18
|
+
SUCCESS: "success",
|
|
19
|
+
INFO: "info",
|
|
20
|
+
DEBUG: "debug",
|
|
21
|
+
TRACE: "trace",
|
|
22
|
+
ALL: "all"
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// ../config-tools/src/utilities/colors.ts
|
|
26
|
+
var DEFAULT_COLOR_CONFIG = {
|
|
27
|
+
light: {
|
|
28
|
+
background: "#fafafa",
|
|
29
|
+
foreground: "#1d1e22",
|
|
30
|
+
brand: "#1fb2a6",
|
|
31
|
+
alternate: "#db2777",
|
|
32
|
+
help: "#5C4EE5",
|
|
33
|
+
success: "#087f5b",
|
|
34
|
+
info: "#0550ae",
|
|
35
|
+
warning: "#e3b341",
|
|
36
|
+
danger: "#D8314A",
|
|
37
|
+
fatal: "#51070f",
|
|
38
|
+
link: "#3fa6ff",
|
|
39
|
+
positive: "#22c55e",
|
|
40
|
+
negative: "#dc2626",
|
|
41
|
+
gradient: ["#1fb2a6", "#db2777", "#5C4EE5"]
|
|
42
|
+
},
|
|
43
|
+
dark: {
|
|
44
|
+
background: "#1d1e22",
|
|
45
|
+
foreground: "#cbd5e1",
|
|
46
|
+
brand: "#2dd4bf",
|
|
47
|
+
alternate: "#db2777",
|
|
48
|
+
help: "#818cf8",
|
|
49
|
+
success: "#10b981",
|
|
50
|
+
info: "#58a6ff",
|
|
51
|
+
warning: "#f3d371",
|
|
52
|
+
danger: "#D8314A",
|
|
53
|
+
fatal: "#a40e26",
|
|
54
|
+
link: "#3fa6ff",
|
|
55
|
+
positive: "#22c55e",
|
|
56
|
+
negative: "#dc2626",
|
|
57
|
+
gradient: ["#1fb2a6", "#db2777", "#818cf8"]
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// ../config-tools/src/logger/chalk.ts
|
|
62
|
+
var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
|
|
63
|
+
var chalkDefault = {
|
|
64
|
+
hex: (_) => (message) => message,
|
|
65
|
+
bgHex: (_) => ({
|
|
66
|
+
whiteBright: (message) => message,
|
|
67
|
+
white: (message) => message
|
|
68
|
+
}),
|
|
69
|
+
white: (message) => message,
|
|
70
|
+
whiteBright: (message) => message,
|
|
71
|
+
gray: (message) => message,
|
|
72
|
+
bold: {
|
|
73
|
+
hex: (_) => (message) => message,
|
|
74
|
+
bgHex: (_) => ({
|
|
75
|
+
whiteBright: (message) => message,
|
|
76
|
+
white: (message) => message
|
|
77
|
+
}),
|
|
78
|
+
whiteBright: (message) => message,
|
|
79
|
+
white: (message) => message
|
|
80
|
+
},
|
|
81
|
+
dim: {
|
|
82
|
+
hex: (_) => (message) => message,
|
|
83
|
+
gray: (message) => message
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
var getChalk = () => {
|
|
87
|
+
let _chalk = _chalk3.default;
|
|
88
|
+
if (!_optionalChain([_chalk, 'optionalAccess', _2 => _2.hex]) || !_optionalChain([_chalk, 'optionalAccess', _3 => _3.bold, 'optionalAccess', _4 => _4.hex]) || !_optionalChain([_chalk, 'optionalAccess', _5 => _5.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _6 => _6.whiteBright]) || !_optionalChain([_chalk, 'optionalAccess', _7 => _7.white])) {
|
|
89
|
+
_chalk = chalkDefault;
|
|
90
|
+
}
|
|
91
|
+
return _chalk;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
95
|
+
function isUnicodeSupported() {
|
|
96
|
+
if (process.platform !== "win32") {
|
|
97
|
+
return process.env.TERM !== "linux";
|
|
98
|
+
}
|
|
99
|
+
return Boolean(process.env.WT_SESSION) || // Windows Terminal
|
|
100
|
+
Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
|
|
101
|
+
process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
102
|
+
process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERM === "rxvt-unicode" || process.env.TERM === "rxvt-unicode-256color" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// ../config-tools/src/logger/console-icons.ts
|
|
106
|
+
var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
|
|
107
|
+
var CONSOLE_ICONS = {
|
|
108
|
+
[LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
|
|
109
|
+
[LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
|
|
110
|
+
[LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
|
|
111
|
+
[LogLevelLabel.INFO]: useIcon("\u2139", "i"),
|
|
112
|
+
[LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
|
|
113
|
+
[LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
|
|
114
|
+
[LogLevelLabel.TRACE]: useIcon("\u{1F6E0}", "T"),
|
|
115
|
+
[LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
// ../config-tools/src/logger/format-timestamp.ts
|
|
119
|
+
var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
|
|
120
|
+
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
// ../config-tools/src/logger/get-log-level.ts
|
|
124
|
+
var getLogLevel = (label) => {
|
|
125
|
+
switch (label) {
|
|
126
|
+
case "all":
|
|
127
|
+
return LogLevel.ALL;
|
|
128
|
+
case "trace":
|
|
129
|
+
return LogLevel.TRACE;
|
|
130
|
+
case "debug":
|
|
131
|
+
return LogLevel.DEBUG;
|
|
132
|
+
case "info":
|
|
133
|
+
return LogLevel.INFO;
|
|
134
|
+
case "warn":
|
|
135
|
+
return LogLevel.WARN;
|
|
136
|
+
case "error":
|
|
137
|
+
return LogLevel.ERROR;
|
|
138
|
+
case "fatal":
|
|
139
|
+
return LogLevel.FATAL;
|
|
140
|
+
case "silent":
|
|
141
|
+
return LogLevel.SILENT;
|
|
142
|
+
default:
|
|
143
|
+
return LogLevel.INFO;
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
147
|
+
if (logLevel >= LogLevel.ALL) {
|
|
148
|
+
return LogLevelLabel.ALL;
|
|
149
|
+
}
|
|
150
|
+
if (logLevel >= LogLevel.TRACE) {
|
|
151
|
+
return LogLevelLabel.TRACE;
|
|
152
|
+
}
|
|
153
|
+
if (logLevel >= LogLevel.DEBUG) {
|
|
154
|
+
return LogLevelLabel.DEBUG;
|
|
155
|
+
}
|
|
156
|
+
if (logLevel >= LogLevel.INFO) {
|
|
157
|
+
return LogLevelLabel.INFO;
|
|
158
|
+
}
|
|
159
|
+
if (logLevel >= LogLevel.WARN) {
|
|
160
|
+
return LogLevelLabel.WARN;
|
|
161
|
+
}
|
|
162
|
+
if (logLevel >= LogLevel.ERROR) {
|
|
163
|
+
return LogLevelLabel.ERROR;
|
|
164
|
+
}
|
|
165
|
+
if (logLevel >= LogLevel.FATAL) {
|
|
166
|
+
return LogLevelLabel.FATAL;
|
|
167
|
+
}
|
|
168
|
+
if (logLevel <= LogLevel.SILENT) {
|
|
169
|
+
return LogLevelLabel.SILENT;
|
|
170
|
+
}
|
|
171
|
+
return LogLevelLabel.INFO;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
// ../config-tools/src/logger/console.ts
|
|
175
|
+
var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
176
|
+
const colors = !_optionalChain([config, 'access', _8 => _8.colors, 'optionalAccess', _9 => _9.dark]) && !_optionalChain([config, 'access', _10 => _10.colors, 'optionalAccess', _11 => _11["base"]]) && !_optionalChain([config, 'access', _12 => _12.colors, 'optionalAccess', _13 => _13["base"], 'optionalAccess', _14 => _14.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _15 => _15.colors, 'optionalAccess', _16 => _16.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _17 => _17.colors, 'optionalAccess', _18 => _18["base"], 'optionalAccess', _19 => _19.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _20 => _20.colors, 'optionalAccess', _21 => _21["base"]]) ? _optionalChain([config, 'access', _22 => _22.colors, 'optionalAccess', _23 => _23["base"]]) : DEFAULT_COLOR_CONFIG;
|
|
177
|
+
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
178
|
+
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
179
|
+
return (_) => {
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
|
|
183
|
+
return (message) => {
|
|
184
|
+
console.error(
|
|
185
|
+
`
|
|
186
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( DEFAULT_COLOR_CONFIG.dark.fatal)))(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
187
|
+
`
|
|
188
|
+
);
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel) {
|
|
192
|
+
return (message) => {
|
|
193
|
+
console.error(
|
|
194
|
+
`
|
|
195
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.danger, () => ( DEFAULT_COLOR_CONFIG.dark.danger)))(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
196
|
+
`
|
|
197
|
+
);
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel) {
|
|
201
|
+
return (message) => {
|
|
202
|
+
console.warn(
|
|
203
|
+
`
|
|
204
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.warning, () => ( DEFAULT_COLOR_CONFIG.dark.warning)))(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
205
|
+
`
|
|
206
|
+
);
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel) {
|
|
210
|
+
return (message) => {
|
|
211
|
+
console.info(
|
|
212
|
+
`
|
|
213
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.success, () => ( DEFAULT_COLOR_CONFIG.dark.success)))(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
214
|
+
`
|
|
215
|
+
);
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel) {
|
|
219
|
+
return (message) => {
|
|
220
|
+
console.info(
|
|
221
|
+
`
|
|
222
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( DEFAULT_COLOR_CONFIG.dark.info)))(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
223
|
+
`
|
|
224
|
+
);
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel) {
|
|
228
|
+
return (message) => {
|
|
229
|
+
console.debug(
|
|
230
|
+
`
|
|
231
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( DEFAULT_COLOR_CONFIG.dark.info)))(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
232
|
+
`
|
|
233
|
+
);
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel) {
|
|
237
|
+
return (message) => {
|
|
238
|
+
console.debug(
|
|
239
|
+
`
|
|
240
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( DEFAULT_COLOR_CONFIG.dark.info)))(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
241
|
+
`
|
|
242
|
+
);
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
return (message) => {
|
|
246
|
+
console.log(
|
|
247
|
+
`
|
|
248
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( DEFAULT_COLOR_CONFIG.dark.brand)))(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
249
|
+
`
|
|
250
|
+
);
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
var writeFatal = (message, config) => getLogFn(LogLevel.FATAL, config)(message);
|
|
254
|
+
var writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);
|
|
255
|
+
var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
|
|
256
|
+
var writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
|
|
257
|
+
var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
|
|
258
|
+
var writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);
|
|
259
|
+
var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
|
|
260
|
+
var getStopwatch = (name) => {
|
|
261
|
+
const start = process.hrtime();
|
|
262
|
+
return () => {
|
|
263
|
+
const end = process.hrtime(start);
|
|
264
|
+
console.info(
|
|
265
|
+
`
|
|
266
|
+
> \u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
|
|
267
|
+
end[0] * 1e3 + end[1] / 1e6
|
|
268
|
+
)}ms to complete
|
|
269
|
+
`
|
|
270
|
+
);
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
var MAX_DEPTH = 4;
|
|
274
|
+
var formatLogMessage = (message, options = {}, depth = 0) => {
|
|
275
|
+
if (depth > MAX_DEPTH) {
|
|
276
|
+
return "<max depth>";
|
|
277
|
+
}
|
|
278
|
+
const prefix = _nullishCoalesce(options.prefix, () => ( "-"));
|
|
279
|
+
const skip = _nullishCoalesce(options.skip, () => ( []));
|
|
280
|
+
return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : Array.isArray(message) ? `
|
|
281
|
+
${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, { prefix: `${prefix}-`, skip }, depth + 1)}`).join("\n")}` : typeof message === "object" ? `
|
|
282
|
+
${Object.keys(message).filter((key) => !skip.includes(key)).map(
|
|
283
|
+
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(
|
|
284
|
+
message[key],
|
|
285
|
+
{ prefix: `${prefix}-`, skip },
|
|
286
|
+
depth + 1
|
|
287
|
+
) : message[key]}`
|
|
288
|
+
).join("\n")}` : message;
|
|
289
|
+
};
|
|
290
|
+
var _isFunction = (value) => {
|
|
291
|
+
try {
|
|
292
|
+
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _24 => _24.constructor]) && _optionalChain([value, 'optionalAccess', _25 => _25.call]) && _optionalChain([value, 'optionalAccess', _26 => _26.apply]));
|
|
293
|
+
} catch (e) {
|
|
294
|
+
return false;
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
exports.LogLevel = LogLevel; exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; 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;
|