@shell-shock/nx 0.0.5 → 0.0.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/CHANGELOG.md +27 -0
- package/README.md +221 -0
- package/dist/base-executor-BEOdY15z.cjs +107 -0
- package/dist/base-executor-BEOdY15z.cjs.map +1 -0
- package/dist/base-executor-C986ypeP.d.mts +89 -0
- package/dist/base-executor-C986ypeP.d.mts.map +1 -0
- package/dist/base-executor-Dm4OV5-b.d.cts +89 -0
- package/dist/base-executor-Dm4OV5-b.d.cts.map +1 -0
- package/dist/base-executor-WGeWcQ9x.mjs +68 -0
- package/dist/base-executor-WGeWcQ9x.mjs.map +1 -0
- package/dist/executor-4-xDAK3Q.d.cts +94 -0
- package/dist/executor-4-xDAK3Q.d.cts.map +1 -0
- package/dist/executor-96dASirt.d.cts +94 -0
- package/dist/executor-96dASirt.d.cts.map +1 -0
- package/dist/executor-BAfZ_2mt.mjs +24 -0
- package/dist/executor-BAfZ_2mt.mjs.map +1 -0
- package/dist/executor-BB0fklpZ.mjs +24 -0
- package/dist/executor-BB0fklpZ.mjs.map +1 -0
- package/dist/executor-BaLNOEzG.d.mts +94 -0
- package/dist/executor-BaLNOEzG.d.mts.map +1 -0
- package/dist/executor-BbNRVowe.d.cts +94 -0
- package/dist/executor-BbNRVowe.d.cts.map +1 -0
- package/dist/executor-Bbdfz3vU.d.mts +94 -0
- package/dist/executor-Bbdfz3vU.d.mts.map +1 -0
- package/dist/executor-BdDn8ZPU.cjs +36 -0
- package/dist/executor-BdDn8ZPU.cjs.map +1 -0
- package/dist/executor-BpeEDqH7.cjs +36 -0
- package/dist/executor-BpeEDqH7.cjs.map +1 -0
- package/dist/executor-C5QxZhO7.mjs +24 -0
- package/dist/executor-C5QxZhO7.mjs.map +1 -0
- package/dist/executor-COGLRU0m.cjs +35 -0
- package/dist/executor-COGLRU0m.cjs.map +1 -0
- package/dist/executor-CiTDecl1.d.cts +94 -0
- package/dist/executor-CiTDecl1.d.cts.map +1 -0
- package/dist/executor-CqzPUm3D.mjs +24 -0
- package/dist/executor-CqzPUm3D.mjs.map +1 -0
- package/dist/executor-D-CbgdfW.d.cts +94 -0
- package/dist/executor-D-CbgdfW.d.cts.map +1 -0
- package/dist/executor-D2Vww0YS.d.mts +94 -0
- package/dist/executor-D2Vww0YS.d.mts.map +1 -0
- package/dist/executor-DZVLtlig.d.mts +94 -0
- package/dist/executor-DZVLtlig.d.mts.map +1 -0
- package/dist/executor-Df7WIF5r.cjs +36 -0
- package/dist/executor-Df7WIF5r.cjs.map +1 -0
- package/dist/executor-Dih1DtWS.cjs +36 -0
- package/dist/executor-Dih1DtWS.cjs.map +1 -0
- package/dist/executor-MgQPT_ao.d.mts +94 -0
- package/dist/executor-MgQPT_ao.d.mts.map +1 -0
- package/dist/executor-yO6eAP0j.mjs +24 -0
- package/dist/executor-yO6eAP0j.mjs.map +1 -0
- package/dist/executors/build/executor.cjs +6 -1
- package/dist/executors/build/executor.d.cts +3 -0
- package/dist/executors/build/executor.d.mts +3 -0
- package/dist/executors/build/executor.mjs +4 -0
- package/dist/executors/clean/executor.cjs +6 -1
- package/dist/executors/clean/executor.d.cts +3 -0
- package/dist/executors/clean/executor.d.mts +3 -0
- package/dist/executors/clean/executor.mjs +4 -0
- package/dist/executors/docs/executor.cjs +6 -1
- package/dist/executors/docs/executor.d.cts +3 -0
- package/dist/executors/docs/executor.d.mts +3 -0
- package/dist/executors/docs/executor.mjs +4 -0
- package/dist/executors/lint/executor.cjs +6 -1
- package/dist/executors/lint/executor.d.cts +3 -0
- package/dist/executors/lint/executor.d.mts +3 -0
- package/dist/executors/lint/executor.mjs +4 -0
- package/dist/executors/prepare/executor.cjs +6 -1
- package/dist/executors/prepare/executor.d.cts +3 -0
- package/dist/executors/prepare/executor.d.mts +3 -0
- package/dist/executors/prepare/executor.mjs +4 -0
- package/dist/executors-Dvb23_Uh.d.cts +1 -0
- package/dist/executors-DxVudqU1.d.mts +1 -0
- package/dist/executors.cjs +13 -1
- package/dist/executors.d.cts +8 -0
- package/dist/executors.d.mts +8 -0
- package/dist/executors.mjs +9 -0
- package/dist/index-BbciquDs.d.mts +8 -0
- package/dist/index-BbciquDs.d.mts.map +1 -0
- package/dist/index-COXDf824.d.cts +8 -0
- package/dist/index-COXDf824.d.cts.map +1 -0
- package/dist/index.cjs +15 -1
- package/dist/index.d.cts +9 -0
- package/dist/index.d.mts +9 -0
- package/dist/index.mjs +10 -0
- package/dist/plugin/index.cjs +3 -1
- package/dist/plugin/index.d.cts +2 -0
- package/dist/plugin/index.d.mts +2 -0
- package/dist/plugin/index.mjs +3 -0
- package/dist/plugin-BbxHKJnF.mjs +8 -0
- package/dist/plugin-BbxHKJnF.mjs.map +1 -0
- package/dist/plugin-jIPJzmTp.cjs +14 -0
- package/dist/plugin-jIPJzmTp.cjs.map +1 -0
- package/dist/src/base/base-executor.schema.d.ts +3 -3
- package/dist/src/base/base-executor.schema.json +4 -4
- package/dist/src/base-executor-BEOdY15z.cjs +107 -0
- package/dist/src/base-executor-BEOdY15z.cjs.map +1 -0
- package/dist/src/base-executor-C986ypeP.d.mts +89 -0
- package/dist/src/base-executor-C986ypeP.d.mts.map +1 -0
- package/dist/src/base-executor-Dm4OV5-b.d.cts +89 -0
- package/dist/src/base-executor-Dm4OV5-b.d.cts.map +1 -0
- package/dist/src/base-executor-WGeWcQ9x.mjs +68 -0
- package/dist/src/base-executor-WGeWcQ9x.mjs.map +1 -0
- package/dist/src/executor-4-xDAK3Q.d.cts +94 -0
- package/dist/src/executor-4-xDAK3Q.d.cts.map +1 -0
- package/dist/src/executor-96dASirt.d.cts +94 -0
- package/dist/src/executor-96dASirt.d.cts.map +1 -0
- package/dist/src/executor-BAfZ_2mt.mjs +24 -0
- package/dist/src/executor-BAfZ_2mt.mjs.map +1 -0
- package/dist/src/executor-BB0fklpZ.mjs +24 -0
- package/dist/src/executor-BB0fklpZ.mjs.map +1 -0
- package/dist/src/executor-BaLNOEzG.d.mts +94 -0
- package/dist/src/executor-BaLNOEzG.d.mts.map +1 -0
- package/dist/src/executor-BbNRVowe.d.cts +94 -0
- package/dist/src/executor-BbNRVowe.d.cts.map +1 -0
- package/dist/src/executor-Bbdfz3vU.d.mts +94 -0
- package/dist/src/executor-Bbdfz3vU.d.mts.map +1 -0
- package/dist/src/executor-BdDn8ZPU.cjs +36 -0
- package/dist/src/executor-BdDn8ZPU.cjs.map +1 -0
- package/dist/src/executor-BpeEDqH7.cjs +36 -0
- package/dist/src/executor-BpeEDqH7.cjs.map +1 -0
- package/dist/src/executor-C5QxZhO7.mjs +24 -0
- package/dist/src/executor-C5QxZhO7.mjs.map +1 -0
- package/dist/src/executor-COGLRU0m.cjs +35 -0
- package/dist/src/executor-COGLRU0m.cjs.map +1 -0
- package/dist/src/executor-CiTDecl1.d.cts +94 -0
- package/dist/src/executor-CiTDecl1.d.cts.map +1 -0
- package/dist/src/executor-CqzPUm3D.mjs +24 -0
- package/dist/src/executor-CqzPUm3D.mjs.map +1 -0
- package/dist/src/executor-D-CbgdfW.d.cts +94 -0
- package/dist/src/executor-D-CbgdfW.d.cts.map +1 -0
- package/dist/src/executor-D2Vww0YS.d.mts +94 -0
- package/dist/src/executor-D2Vww0YS.d.mts.map +1 -0
- package/dist/src/executor-DZVLtlig.d.mts +94 -0
- package/dist/src/executor-DZVLtlig.d.mts.map +1 -0
- package/dist/src/executor-Df7WIF5r.cjs +36 -0
- package/dist/src/executor-Df7WIF5r.cjs.map +1 -0
- package/dist/src/executor-Dih1DtWS.cjs +36 -0
- package/dist/src/executor-Dih1DtWS.cjs.map +1 -0
- package/dist/src/executor-MgQPT_ao.d.mts +94 -0
- package/dist/src/executor-MgQPT_ao.d.mts.map +1 -0
- package/dist/src/executor-yO6eAP0j.mjs +24 -0
- package/dist/src/executor-yO6eAP0j.mjs.map +1 -0
- package/dist/src/executors/build/executor.cjs +6 -1
- package/dist/src/executors/build/executor.d.cts +3 -0
- package/dist/src/executors/build/executor.d.mts +3 -0
- package/dist/src/executors/build/executor.mjs +4 -0
- package/dist/src/executors/build/schema.d.ts +3 -3
- package/dist/src/executors/build/schema.json +4 -4
- package/dist/src/executors/clean/executor.cjs +6 -1
- package/dist/src/executors/clean/executor.d.cts +3 -0
- package/dist/src/executors/clean/executor.d.mts +3 -0
- package/dist/src/executors/clean/executor.mjs +4 -0
- package/dist/src/executors/clean/schema.d.ts +14 -4
- package/dist/src/executors/clean/schema.json +25 -6
- package/dist/src/executors/docs/executor.cjs +6 -1
- package/dist/src/executors/docs/executor.d.cts +3 -0
- package/dist/src/executors/docs/executor.d.mts +3 -0
- package/dist/src/executors/docs/executor.mjs +4 -0
- package/dist/src/executors/docs/schema.d.ts +13 -3
- package/dist/src/executors/docs/schema.json +24 -5
- package/dist/src/executors/lint/executor.cjs +6 -1
- package/dist/src/executors/lint/executor.d.cts +3 -0
- package/dist/src/executors/lint/executor.d.mts +3 -0
- package/dist/src/executors/lint/executor.mjs +4 -0
- package/dist/src/executors/lint/schema.d.ts +13 -3
- package/dist/src/executors/lint/schema.json +24 -5
- package/dist/src/executors/prepare/executor.cjs +6 -1
- package/dist/src/executors/prepare/executor.d.cts +3 -0
- package/dist/src/executors/prepare/executor.d.mts +3 -0
- package/dist/src/executors/prepare/executor.mjs +4 -0
- package/dist/src/executors/prepare/schema.d.ts +13 -3
- package/dist/src/executors/prepare/schema.json +24 -5
- package/dist/src/executors-0N4uK0Ll.mjs +0 -0
- package/dist/src/executors-BJFR9wj9.cjs +0 -0
- package/dist/src/executors-Dvb23_Uh.d.cts +1 -0
- package/dist/src/executors-DxVudqU1.d.mts +1 -0
- package/dist/src/executors.cjs +13 -1
- package/dist/src/executors.d.cts +8 -0
- package/dist/src/executors.d.mts +8 -0
- package/dist/src/executors.mjs +9 -0
- package/dist/src/index-BbciquDs.d.mts +8 -0
- package/dist/src/index-BbciquDs.d.mts.map +1 -0
- package/dist/src/index-COXDf824.d.cts +8 -0
- package/dist/src/index-COXDf824.d.cts.map +1 -0
- package/dist/src/index.cjs +15 -1
- package/dist/src/index.d.cts +9 -0
- package/dist/src/index.d.mts +9 -0
- package/dist/src/index.mjs +10 -0
- package/dist/src/plugin/index.cjs +3 -1
- package/dist/src/plugin/index.d.cts +2 -0
- package/dist/src/plugin/index.d.mts +2 -0
- package/dist/src/plugin/index.mjs +3 -0
- package/dist/src/plugin-BbxHKJnF.mjs +8 -0
- package/dist/src/plugin-BbxHKJnF.mjs.map +1 -0
- package/dist/src/plugin-jIPJzmTp.cjs +14 -0
- package/dist/src/plugin-jIPJzmTp.cjs.map +1 -0
- package/docs/api/base-executor.schema.md +3 -3
- package/docs/api/build/schema.md +3 -3
- package/docs/api/clean/schema.md +14 -4
- package/docs/api/docs/schema.md +13 -3
- package/docs/api/lint/schema.md +13 -3
- package/docs/api/prepare/schema.md +13 -3
- package/package.json +45 -51
- package/dist/chunk-2BBDUOBX.js +0 -3
- package/dist/chunk-2RWIKK2K.js +0 -1
- package/dist/chunk-4DF5MMDG.cjs +0 -1
- package/dist/chunk-4HG7APNF.cjs +0 -1
- package/dist/chunk-4IUDMC5Q.cjs +0 -1
- package/dist/chunk-5BUJWEAA.js +0 -1
- package/dist/chunk-BJOQ75Z3.js +0 -1
- package/dist/chunk-C4UEVXX6.cjs +0 -3
- package/dist/chunk-HWCVYKPS.cjs +0 -1
- package/dist/chunk-JOC2YT3M.js +0 -1
- package/dist/chunk-KDEQXNLK.cjs +0 -1
- package/dist/chunk-MACMSGKG.cjs +0 -1
- package/dist/chunk-OR6FTGCD.js +0 -1
- package/dist/chunk-PKDDOBUQ.cjs +0 -5
- package/dist/chunk-RIXDDPWQ.js +0 -1
- package/dist/chunk-X2KRD44V.cjs +0 -1
- package/dist/chunk-ZJQUMHFI.js +0 -5
- package/dist/executors/build/executor.js +0 -1
- package/dist/executors/clean/executor.js +0 -1
- package/dist/executors/docs/executor.js +0 -1
- package/dist/executors/lint/executor.js +0 -1
- package/dist/executors/prepare/executor.js +0 -1
- package/dist/executors.js +0 -1
- package/dist/index.js +0 -1
- package/dist/plugin/index.js +0 -1
- package/dist/src/chunk-2BBDUOBX.js +0 -3
- package/dist/src/chunk-2RWIKK2K.js +0 -1
- package/dist/src/chunk-4DF5MMDG.cjs +0 -1
- package/dist/src/chunk-4HG7APNF.cjs +0 -1
- package/dist/src/chunk-4IUDMC5Q.cjs +0 -1
- package/dist/src/chunk-5BUJWEAA.js +0 -1
- package/dist/src/chunk-BJOQ75Z3.js +0 -1
- package/dist/src/chunk-C4UEVXX6.cjs +0 -3
- package/dist/src/chunk-HWCVYKPS.cjs +0 -1
- package/dist/src/chunk-JOC2YT3M.js +0 -1
- package/dist/src/chunk-KDEQXNLK.cjs +0 -1
- package/dist/src/chunk-MACMSGKG.cjs +0 -1
- package/dist/src/chunk-OR6FTGCD.js +0 -1
- package/dist/src/chunk-PKDDOBUQ.cjs +0 -5
- package/dist/src/chunk-RIXDDPWQ.js +0 -1
- package/dist/src/chunk-X2KRD44V.cjs +0 -1
- package/dist/src/chunk-ZJQUMHFI.js +0 -5
- package/dist/src/executors/build/executor.js +0 -1
- package/dist/src/executors/clean/executor.js +0 -1
- package/dist/src/executors/docs/executor.js +0 -1
- package/dist/src/executors/lint/executor.js +0 -1
- package/dist/src/executors/prepare/executor.js +0 -1
- package/dist/src/executors.js +0 -1
- package/dist/src/index.js +0 -1
- package/dist/src/plugin/index.js +0 -1
- /package/dist/{chunk-WNSAXKZ3.js → executors-0N4uK0Ll.mjs} +0 -0
- /package/dist/{src/chunk-WNSAXKZ3.js → executors-BJFR9wj9.cjs} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Shell Shock - Nx
|
|
4
4
|
|
|
5
|
+
## [0.0.6](https://github.com/storm-software/shell-shock/releases/tag/nx%400.0.6) (01/07/2026)
|
|
6
|
+
|
|
7
|
+
### Miscellaneous
|
|
8
|
+
|
|
9
|
+
- **monorepo:** Reformat repository source files
|
|
10
|
+
([f4ad97f](https://github.com/storm-software/shell-shock/commit/f4ad97f))
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- **monorepo:** Updates to repository packages organization
|
|
15
|
+
([2944ef2](https://github.com/storm-software/shell-shock/commit/2944ef2))
|
|
16
|
+
|
|
17
|
+
### Updated Dependencies
|
|
18
|
+
|
|
19
|
+
- Updated **core** to **v0.2.1**
|
|
20
|
+
|
|
21
|
+
## [0.0.5](https://github.com/storm-software/shell-shock/releases/tag/nx%400.0.5) (12/22/2025)
|
|
22
|
+
|
|
23
|
+
### Miscellaneous
|
|
24
|
+
|
|
25
|
+
- **nx:** Cleaned up usage of Shell Shock API in executors
|
|
26
|
+
([8409336](https://github.com/storm-software/shell-shock/commit/8409336))
|
|
27
|
+
|
|
28
|
+
### Updated Dependencies
|
|
29
|
+
|
|
30
|
+
- Updated **core** to **v0.2.0**
|
|
31
|
+
|
|
5
32
|
## [0.0.4](https://github.com/storm-software/shell-shock/releases/tag/nx%400.0.4) (12/21/2025)
|
|
6
33
|
|
|
7
34
|
### Updated Dependencies
|
package/README.md
CHANGED
|
@@ -1,4 +1,52 @@
|
|
|
1
1
|
<!-- START header -->
|
|
2
|
+
<!-- prettier-ignore-start -->
|
|
3
|
+
<!-- markdownlint-disable -->
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
<div align="center">
|
|
7
|
+
<picture>
|
|
8
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/shell-shock/banner-1280x640-dark.gif">
|
|
9
|
+
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/shell-shock/banner-1280x640-light.gif">
|
|
10
|
+
<img src="https://public.storm-cdn.com/shell-shock/banner-1280x640-dark.gif" width="100%" alt="Storm Software" />
|
|
11
|
+
</picture>
|
|
12
|
+
</div>
|
|
13
|
+
<br />
|
|
14
|
+
|
|
15
|
+
<div align="center">
|
|
16
|
+
<b>
|
|
17
|
+
<a href="https://stormsoftware.com" target="_blank">Website</a> •
|
|
18
|
+
<a href="https://github.com/storm-software/shell-shock" target="_blank">GitHub</a> •
|
|
19
|
+
<a href="https://discord.gg/MQ6YVzakM5">Discord</a> • <a href="https://stormstack.github.io/stormstack/" target="_blank">Docs</a> • <a href="https://stormsoftware.com/contact" target="_blank">Contact</a> •
|
|
20
|
+
<a href="https://github.com/storm-software/shell-shock/issues/new?assignees=&labels=bug&template=bug-report.yml&title=Bug Report%3A+">Report a Bug</a>
|
|
21
|
+
</b>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<br />
|
|
25
|
+
This package is part of the ⚡<b>Shell Shock</b> monorepo. The Shell Shock packages include CLI utility applications, tools, and various libraries used to create modern, scalable web applications.
|
|
26
|
+
<br />
|
|
27
|
+
|
|
28
|
+
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
|
+
|
|
30
|
+
[](https://stormsoftware.com/projects/shell-shock/) [](http://commitizen.github.io/cz-cli/)  
|
|
31
|
+
|
|
32
|
+
<!-- prettier-ignore-start -->
|
|
33
|
+
<!-- markdownlint-disable -->
|
|
34
|
+
|
|
35
|
+
> [!IMPORTANT]
|
|
36
|
+
> This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be available through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.
|
|
37
|
+
|
|
38
|
+
<!-- markdownlint-restore -->
|
|
39
|
+
<!-- prettier-ignore-end -->
|
|
40
|
+
|
|
41
|
+
<div align="center">
|
|
42
|
+
<b>Be sure to ⭐ this repository on <a href="https://github.com/storm-software/shell-shock" target="_blank">GitHub</a> so you can keep up to date on any daily progress!</b>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<br />
|
|
46
|
+
|
|
47
|
+
<!-- markdownlint-restore -->
|
|
48
|
+
<!-- prettier-ignore-end -->
|
|
49
|
+
|
|
2
50
|
<!-- END header -->
|
|
3
51
|
|
|
4
52
|
# Shell Shock - Nx Plugin
|
|
@@ -40,4 +88,177 @@ Run `nx build nx` to build the library.
|
|
|
40
88
|
Run `nx test nx` to execute the unit tests via [Jest](https://jestjs.io).
|
|
41
89
|
|
|
42
90
|
<!-- START footer -->
|
|
91
|
+
<!-- prettier-ignore-start -->
|
|
92
|
+
<!-- markdownlint-disable -->
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## Storm Workspaces
|
|
96
|
+
|
|
97
|
+
Storm workspaces are built using
|
|
98
|
+
<a href="https://nx.dev/" target="_blank">Nx</a>, a set of extensible dev tools
|
|
99
|
+
for monorepos, which helps you develop like Google, Facebook, and Microsoft.
|
|
100
|
+
Building on top of Nx, the Open System provides a set of tools and patterns that
|
|
101
|
+
help you scale your monorepo to many teams while keeping the codebase
|
|
102
|
+
maintainable.
|
|
103
|
+
|
|
104
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
105
|
+
<br />
|
|
106
|
+
|
|
107
|
+
## Roadmap
|
|
108
|
+
|
|
109
|
+
See the [open issues](https://github.com/storm-software/shell-shock/issues) for
|
|
110
|
+
a list of proposed features (and known issues).
|
|
111
|
+
|
|
112
|
+
- [Top Feature Requests](https://github.com/storm-software/shell-shock/issues?q=label%3Aenhancement+is%3Aopen+sort%3Areactions-%2B1-desc)
|
|
113
|
+
(Add your votes using the 👍 reaction)
|
|
114
|
+
- [Top Bugs](https://github.com/storm-software/shell-shock/issues?q=is%3Aissue+is%3Aopen+label%3Abug+sort%3Areactions-%2B1-desc)
|
|
115
|
+
(Add your votes using the 👍 reaction)
|
|
116
|
+
- [Newest Bugs](https://github.com/storm-software/shell-shock/issues?q=is%3Aopen+is%3Aissue+label%3Abug)
|
|
117
|
+
|
|
118
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
119
|
+
<br />
|
|
120
|
+
|
|
121
|
+
## Support
|
|
122
|
+
|
|
123
|
+
Reach out to the maintainer at one of the following places:
|
|
124
|
+
|
|
125
|
+
- [Contact](https://stormsoftware.com/contact)
|
|
126
|
+
- [GitHub discussions](https://github.com/storm-software/shell-shock/discussions)
|
|
127
|
+
- <support@stormsoftware.com>
|
|
128
|
+
|
|
129
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
130
|
+
<br />
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
This project is licensed under the **Apache License 2.0**. Feel free to edit and
|
|
135
|
+
distribute this template as you like.
|
|
136
|
+
|
|
137
|
+
See [LICENSE](LICENSE) for more information.
|
|
138
|
+
|
|
139
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
140
|
+
<br />
|
|
141
|
+
|
|
142
|
+
## Changelog
|
|
143
|
+
|
|
144
|
+
This project adheres to
|
|
145
|
+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html). Every release, along
|
|
146
|
+
with the migration instructions, is documented in the [CHANGELOG](CHANGELOG.md)
|
|
147
|
+
file
|
|
148
|
+
|
|
149
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
150
|
+
<br />
|
|
151
|
+
|
|
152
|
+
## Contributing
|
|
153
|
+
|
|
154
|
+
First off, thanks for taking the time to contribute! Contributions are what
|
|
155
|
+
makes the open-source community such an amazing place to learn, inspire, and
|
|
156
|
+
create. Any contributions you make will benefit everybody else and are **greatly
|
|
157
|
+
appreciated**.
|
|
158
|
+
|
|
159
|
+
Please try to create bug reports that are:
|
|
160
|
+
|
|
161
|
+
- _Reproducible._ Include steps to reproduce the problem.
|
|
162
|
+
- _Specific._ Include as much detail as possible: which version, what
|
|
163
|
+
environment, etc.
|
|
164
|
+
- _Unique._ Do not duplicate existing opened issues.
|
|
165
|
+
- _Scoped to a Single Bug._ One bug per report.
|
|
166
|
+
|
|
167
|
+
Please adhere to this project's [code of conduct](.github/CODE_OF_CONDUCT.md).
|
|
168
|
+
|
|
169
|
+
You can use
|
|
170
|
+
[markdownlint-cli](https://github.com/storm-software/shell-shock/markdownlint-cli)
|
|
171
|
+
to check for common markdown style inconsistency.
|
|
172
|
+
|
|
173
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
174
|
+
<br />
|
|
175
|
+
|
|
176
|
+
## Contributors
|
|
177
|
+
|
|
178
|
+
Thanks goes to these wonderful people
|
|
179
|
+
([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
180
|
+
|
|
181
|
+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
182
|
+
|
|
183
|
+
<table>
|
|
184
|
+
<tbody>
|
|
185
|
+
<tr>
|
|
186
|
+
<td align="center" valign="top" width="14.28%"><a href="http://www.sullypat.com/"><img src="https://avatars.githubusercontent.com/u/99053093?v=4?s=100" width="100px;" alt="Patrick Sullivan"/><br /><sub><b>Patrick Sullivan</b></sub></a><br /><a href="#design-sullivanpj" title="Design">🎨</a> <a href="https://github.com/storm-software/shell-shock/commits?author=sullivanpj" title="Code">💻</a> <a href="#tool-sullivanpj" title="Tools">🔧</a> <a href="https://github.com/storm-software/shell-shock/commits?author=sullivanpj" title="Documentation">📖</a> <a href="https://github.com/storm-software/shell-shock/commits?author=sullivanpj" title="Tests">⚠️</a></td>
|
|
187
|
+
<td align="center" valign="top" width="14.28%"><a href="https://tylerbenning.com/"><img src="https://avatars.githubusercontent.com/u/7265547?v=4?s=100" width="100px;" alt="Tyler Benning"/><br /><sub><b>Tyler Benning</b></sub></a><br /><a href="#design-tbenning" title="Design">🎨</a></td>
|
|
188
|
+
<td align="center" valign="top" width="14.28%"><a href="http://stormsoftware.com"><img src="https://avatars.githubusercontent.com/u/149802440?v=4?s=100" width="100px;" alt="Stormie"/><br /><sub><b>Stormie</b></sub></a><br /><a href="#maintenance-stormie-bot" title="Maintenance">🚧</a></td>
|
|
189
|
+
</tr>
|
|
190
|
+
</tbody>
|
|
191
|
+
<tfoot>
|
|
192
|
+
<tr>
|
|
193
|
+
<td align="center" size="13px" colspan="7">
|
|
194
|
+
<img src="https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg" alt="All Contributors">
|
|
195
|
+
<a href="https://all-contributors.js.org/docs/en/bot/usage">Add your contributions</a>
|
|
196
|
+
</img>
|
|
197
|
+
</td>
|
|
198
|
+
</tr>
|
|
199
|
+
</tfoot>
|
|
200
|
+
</table>
|
|
201
|
+
|
|
202
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
203
|
+
|
|
204
|
+
This project follows the
|
|
205
|
+
[all-contributors](https://github.com/all-contributors/all-contributors)
|
|
206
|
+
specification. Contributions of any kind welcome!
|
|
207
|
+
|
|
208
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
209
|
+
<br />
|
|
210
|
+
|
|
211
|
+
<hr />
|
|
212
|
+
<br />
|
|
213
|
+
|
|
214
|
+
<div align="center">
|
|
215
|
+
<picture>
|
|
216
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-dark.webp">
|
|
217
|
+
<source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-light.webp">
|
|
218
|
+
<img src="https://public.storm-cdn.com/storm-software/banner-1280x320-dark.webp" width="100%" alt="Storm Software" />
|
|
219
|
+
</picture>
|
|
220
|
+
</div>
|
|
221
|
+
<br />
|
|
222
|
+
|
|
223
|
+
<div align="center">
|
|
224
|
+
<a href="https://stormsoftware.com" target="_blank">Website</a> • <a href="https://stormsoftware.com/contact" target="_blank">Contact</a> • <a href="https://linkedin.com/in/patrick-sullivan-865526b0" target="_blank">LinkedIn</a> • <a href="https://medium.com/@pat.joseph.sullivan" target="_blank">Medium</a> • <a href="https://github.com/storm-software" target="_blank">GitHub</a> • <a href="https://keybase.io/sullivanp" target="_blank">OpenPGP Key</a>
|
|
225
|
+
</div>
|
|
226
|
+
|
|
227
|
+
<div align="center">
|
|
228
|
+
<b>Fingerprint:</b> 1BD2 7192 7770 2549 F4C9 F238 E6AD C420 DA5C 4C2D
|
|
229
|
+
</div>
|
|
230
|
+
<br />
|
|
231
|
+
|
|
232
|
+
Storm Software is an open source software development organization and creator
|
|
233
|
+
of Acidic, StormStack and StormCloud.
|
|
234
|
+
|
|
235
|
+
Our mission is to make software development more accessible. Our ideal future is
|
|
236
|
+
one where anyone can create software without years of prior development
|
|
237
|
+
experience serving as a barrier to entry. We hope to achieve this via LLMs,
|
|
238
|
+
Generative AI, and intuitive, high-level data modeling/programming languages.
|
|
239
|
+
|
|
240
|
+
Join us on [Discord](https://discord.gg/MQ6YVzakM5) to chat with the team,
|
|
241
|
+
receive release notifications, ask questions, and get involved.
|
|
242
|
+
|
|
243
|
+
If this sounds interesting, and you would like to help us in creating the next
|
|
244
|
+
generation of development tools, please reach out on our
|
|
245
|
+
[website](https://stormsoftware.com/contact) or join our
|
|
246
|
+
[Slack channel](https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA)!
|
|
247
|
+
|
|
248
|
+
<br />
|
|
249
|
+
|
|
250
|
+
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://public.storm-cdn.com/icon-fill.png" alt="Storm Software" width="200px"/></a></div>
|
|
251
|
+
<br />
|
|
252
|
+
<div align="center"><a href="https://stormsoftware.com" target="_blank"><img src="https://public.storm-cdn.com/visit-us-text.svg" alt="Visit us at stormsoftware.com" height="90px"/></a></div>
|
|
253
|
+
|
|
254
|
+
<br />
|
|
255
|
+
|
|
256
|
+
<div align="right">[ <a href="#table-of-contents">Back to top ▲</a> ]</div>
|
|
257
|
+
<br />
|
|
258
|
+
<br />
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
<!-- markdownlint-restore -->
|
|
262
|
+
<!-- prettier-ignore-end -->
|
|
263
|
+
|
|
43
264
|
<!-- END footer -->
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
let defu = require("defu");
|
|
29
|
+
defu = __toESM(defu);
|
|
30
|
+
let __storm_software_config_tools_logger = require("@storm-software/config-tools/logger");
|
|
31
|
+
let __storm_software_workspace_tools_base_base_executor = require("@storm-software/workspace-tools/base/base-executor");
|
|
32
|
+
let __stryke_type_checks_is_error = require("@stryke/type-checks/is-error");
|
|
33
|
+
let jiti = require("jiti");
|
|
34
|
+
|
|
35
|
+
//#region src/base/base-executor.ts
|
|
36
|
+
/**
|
|
37
|
+
* A utility function to create a Shell Shock executor that can be used with the `withRunExecutor` function.
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* This function is designed to simplify the creation of Shell Shock executors by providing a consistent interface and error handling.
|
|
41
|
+
*
|
|
42
|
+
* @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
|
|
43
|
+
* @param executorFn - The function that will be executed when the command is run.
|
|
44
|
+
* @returns A Promise that resolves to the result of the executor function.
|
|
45
|
+
*/
|
|
46
|
+
function withExecutor(command, executorFn) {
|
|
47
|
+
return (0, __storm_software_workspace_tools_base_base_executor.withRunExecutor)(`Shell Shock ${command} command executor`, async (options, context, workspaceConfig) => {
|
|
48
|
+
if (!context.projectName) throw new Error("The executor requires `projectName` on the context object.");
|
|
49
|
+
if (!context.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) throw new Error("The executor requires `projectsConfigurations` on the context object.");
|
|
50
|
+
const projectConfig = context.projectsConfigurations.projects[context.projectName];
|
|
51
|
+
const { createShellShock } = await (0, jiti.createJiti)(context.root, { cache: false }).import("@shell-shock/core/api");
|
|
52
|
+
const api = await createShellShock((0, defu.default)({
|
|
53
|
+
name: projectConfig.name,
|
|
54
|
+
root: projectConfig.root,
|
|
55
|
+
sourceRoot: projectConfig.sourceRoot,
|
|
56
|
+
tsconfig: options.tsconfig,
|
|
57
|
+
logLevel: options.logLevel,
|
|
58
|
+
description: projectConfig.metadata?.description,
|
|
59
|
+
type: projectConfig.projectType,
|
|
60
|
+
mode: options.mode,
|
|
61
|
+
skipCache: options.skipCache,
|
|
62
|
+
autoInstall: options.autoInstall,
|
|
63
|
+
output: { outputPath: options.outputPath ?? projectConfig.targets?.build?.options?.outputPath }
|
|
64
|
+
}, options));
|
|
65
|
+
try {
|
|
66
|
+
return await Promise.resolve(executorFn((0, defu.default)({
|
|
67
|
+
projectName: context.projectName,
|
|
68
|
+
options,
|
|
69
|
+
workspaceConfig,
|
|
70
|
+
inlineConfig: {
|
|
71
|
+
command,
|
|
72
|
+
configFile: options.configFile
|
|
73
|
+
},
|
|
74
|
+
command
|
|
75
|
+
}, context), api));
|
|
76
|
+
} catch (error) {
|
|
77
|
+
(0, __storm_software_config_tools_logger.writeError)(`An error occurred while executing the Shell Shock ${command} command executor: ${(0, __stryke_type_checks_is_error.isError)(error) ? `${error.message}
|
|
78
|
+
|
|
79
|
+
${error.stack}` : "Unknown error"}`);
|
|
80
|
+
return { success: false };
|
|
81
|
+
} finally {
|
|
82
|
+
await api.finalize();
|
|
83
|
+
}
|
|
84
|
+
}, {
|
|
85
|
+
skipReadingConfig: false,
|
|
86
|
+
hooks: { applyDefaultOptions: (options) => {
|
|
87
|
+
options.outputPath ??= "dist/{projectRoot}";
|
|
88
|
+
options.configFile ??= "{projectRoot}/shell-shock.config.ts";
|
|
89
|
+
return options;
|
|
90
|
+
} }
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
Object.defineProperty(exports, '__toESM', {
|
|
96
|
+
enumerable: true,
|
|
97
|
+
get: function () {
|
|
98
|
+
return __toESM;
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
Object.defineProperty(exports, 'withExecutor', {
|
|
102
|
+
enumerable: true,
|
|
103
|
+
get: function () {
|
|
104
|
+
return withExecutor;
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
//# sourceMappingURL=base-executor-BEOdY15z.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-executor-BEOdY15z.cjs","names":[],"sources":["../../src/base/base-executor.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ExecutorContext, PromiseExecutor } from \"@nx/devkit\";\nimport type { ShellShockAPI, UserConfig } from \"@shell-shock/core\";\nimport { writeError } from \"@storm-software/config-tools/logger\";\nimport type { StormWorkspaceConfig } from \"@storm-software/config/types\";\nimport { withRunExecutor } from \"@storm-software/workspace-tools/base/base-executor\";\nimport type { BaseExecutorResult } from \"@storm-software/workspace-tools/types\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport type { InlineConfig, PowerlinesCommand } from \"powerlines/types/config\";\nimport type { BaseExecutorSchema } from \"./base-executor.schema\";\n\nexport type ShellShockExecutorContext<\n TCommand extends PowerlinesCommand = PowerlinesCommand,\n TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema\n> = ExecutorContext & {\n projectName: string;\n command: TCommand;\n options: TExecutorSchema;\n inlineConfig: InlineConfig;\n workspaceConfig: StormWorkspaceConfig;\n};\n\n/**\n * A utility function to create a Shell Shock executor that can be used with the `withRunExecutor` function.\n *\n * @remarks\n * This function is designed to simplify the creation of Shell Shock executors by providing a consistent interface and error handling.\n *\n * @param command - The command that the executor will handle (e.g., \"new\", \"prepare\", \"build\", etc.).\n * @param executorFn - The function that will be executed when the command is run.\n * @returns A Promise that resolves to the result of the executor function.\n */\nexport function withExecutor<\n TCommand extends PowerlinesCommand = PowerlinesCommand,\n TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema\n>(\n command: TCommand,\n executorFn: (\n context: ShellShockExecutorContext<TCommand, TExecutorSchema>,\n api: ShellShockAPI\n ) =>\n | Promise<BaseExecutorResult | null | undefined>\n | BaseExecutorResult\n | null\n | undefined\n): PromiseExecutor<TExecutorSchema> {\n return withRunExecutor(\n `Shell Shock ${command} command executor`,\n async (\n options: TExecutorSchema,\n context: ExecutorContext,\n workspaceConfig: StormWorkspaceConfig\n ): Promise<BaseExecutorResult | null | undefined> => {\n if (!context.projectName) {\n throw new Error(\n \"The executor requires `projectName` on the context object.\"\n );\n }\n\n if (\n !context.projectName ||\n !context.projectsConfigurations?.projects ||\n !context.projectsConfigurations.projects[context.projectName] ||\n !context.projectsConfigurations.projects[context.projectName]?.root\n ) {\n throw new Error(\n \"The executor requires `projectsConfigurations` on the context object.\"\n );\n }\n\n const projectConfig =\n context.projectsConfigurations.projects[context.projectName]!;\n\n const jiti = createJiti(context.root, { cache: false });\n const { createShellShock } = await jiti.import<{\n createShellShock: typeof import(\"@shell-shock/core/api\").createShellShock;\n }>(\"@shell-shock/core/api\");\n\n const api = await createShellShock(\n defu(\n {\n name: projectConfig.name,\n root: projectConfig.root,\n sourceRoot: projectConfig.sourceRoot,\n tsconfig: options.tsconfig,\n logLevel: options.logLevel,\n description: projectConfig.metadata?.description,\n type: projectConfig.projectType,\n mode: options.mode,\n skipCache: options.skipCache,\n autoInstall: options.autoInstall,\n output: {\n outputPath:\n options.outputPath ??\n projectConfig.targets?.build?.options?.outputPath\n }\n },\n options\n ) as Partial<UserConfig>\n );\n\n try {\n return await Promise.resolve(\n executorFn(\n defu(\n {\n projectName: context.projectName,\n options,\n workspaceConfig,\n inlineConfig: {\n command,\n configFile: options.configFile\n },\n command\n },\n context\n ),\n api\n )\n );\n } catch (error) {\n writeError(\n `An error occurred while executing the Shell Shock ${\n command\n } command executor: ${\n isError(error)\n ? `${error.message}\n\n${error.stack}`\n : \"Unknown error\"\n }`\n );\n\n return { success: false };\n } finally {\n await api.finalize();\n }\n },\n {\n skipReadingConfig: false,\n hooks: {\n applyDefaultOptions: (options: Partial<TExecutorSchema>) => {\n options.outputPath ??= \"dist/{projectRoot}\";\n options.configFile ??= \"{projectRoot}/shell-shock.config.ts\";\n\n return options as TExecutorSchema;\n }\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,SAAgB,aAId,SACA,YAQkC;AAClC,iFACE,eAAe,QAAQ,oBACvB,OACE,SACA,SACA,oBACmD;AACnD,MAAI,CAAC,QAAQ,YACX,OAAM,IAAI,MACR,6DACD;AAGH,MACE,CAAC,QAAQ,eACT,CAAC,QAAQ,wBAAwB,YACjC,CAAC,QAAQ,uBAAuB,SAAS,QAAQ,gBACjD,CAAC,QAAQ,uBAAuB,SAAS,QAAQ,cAAc,KAE/D,OAAM,IAAI,MACR,wEACD;EAGH,MAAM,gBACJ,QAAQ,uBAAuB,SAAS,QAAQ;EAGlD,MAAM,EAAE,qBAAqB,2BADL,QAAQ,MAAM,EAAE,OAAO,OAAO,CAAC,CACf,OAErC,wBAAwB;EAE3B,MAAM,MAAM,MAAM,mCAEd;GACE,MAAM,cAAc;GACpB,MAAM,cAAc;GACpB,YAAY,cAAc;GAC1B,UAAU,QAAQ;GAClB,UAAU,QAAQ;GAClB,aAAa,cAAc,UAAU;GACrC,MAAM,cAAc;GACpB,MAAM,QAAQ;GACd,WAAW,QAAQ;GACnB,aAAa,QAAQ;GACrB,QAAQ,EACN,YACE,QAAQ,cACR,cAAc,SAAS,OAAO,SAAS,YAC1C;GACF,EACD,QACD,CACF;AAED,MAAI;AACF,UAAO,MAAM,QAAQ,QACnB,6BAEI;IACE,aAAa,QAAQ;IACrB;IACA;IACA,cAAc;KACZ;KACA,YAAY,QAAQ;KACrB;IACD;IACD,EACD,QACD,EACD,IACD,CACF;WACM,OAAO;AACd,wDACE,qDACE,QACD,gEACS,MAAM,GACV,GAAG,MAAM,QAAQ;;EAE/B,MAAM,UACQ,kBAEP;AAED,UAAO,EAAE,SAAS,OAAO;YACjB;AACR,SAAM,IAAI,UAAU;;IAGxB;EACE,mBAAmB;EACnB,OAAO,EACL,sBAAsB,YAAsC;AAC1D,WAAQ,eAAe;AACvB,WAAQ,eAAe;AAEvB,UAAO;KAEV;EACF,CACF"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
|
|
2
|
+
import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
|
|
3
|
+
import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
4
|
+
import { InlineConfig, PowerlinesCommand } from "powerlines/types/config";
|
|
5
|
+
|
|
6
|
+
//#region src/base/base-executor.schema.d.ts
|
|
7
|
+
// Generated by powerlines
|
|
8
|
+
// Do not edit this file directly
|
|
9
|
+
interface BaseExecutorSchema {
|
|
10
|
+
/**
|
|
11
|
+
* Output Path
|
|
12
|
+
*
|
|
13
|
+
* The output path for the build
|
|
14
|
+
*
|
|
15
|
+
* @default "dist/{projectRoot}"
|
|
16
|
+
*
|
|
17
|
+
* @format path
|
|
18
|
+
*/
|
|
19
|
+
outputPath?: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* TypeScript Configuration File
|
|
23
|
+
*
|
|
24
|
+
* The path to the tsconfig file
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
* @format path
|
|
28
|
+
*/
|
|
29
|
+
tsconfig?: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Shell Shock Configuration File
|
|
33
|
+
*
|
|
34
|
+
* The path to the Shell Shock configuration file
|
|
35
|
+
*
|
|
36
|
+
* @default "{projectRoot}/shell-shock.config.ts"
|
|
37
|
+
*
|
|
38
|
+
* @format path
|
|
39
|
+
*/
|
|
40
|
+
configFile?: string;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Mode
|
|
44
|
+
*
|
|
45
|
+
* The build mode
|
|
46
|
+
*
|
|
47
|
+
*
|
|
48
|
+
* @enum development,test,production
|
|
49
|
+
*/
|
|
50
|
+
mode?: string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Auto Install
|
|
54
|
+
*
|
|
55
|
+
* Automatically install dependencies during prepare stage
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
autoInstall?: boolean;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Skip Cache
|
|
62
|
+
*
|
|
63
|
+
* Skip the caching mechanism during the build process (if required)
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
66
|
+
skipCache?: boolean;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Log Level
|
|
70
|
+
*
|
|
71
|
+
* The log level to use for the build process
|
|
72
|
+
*
|
|
73
|
+
*
|
|
74
|
+
* @enum fatal,error,warn,success,info,debug,trace,silent
|
|
75
|
+
*/
|
|
76
|
+
logLevel?: string;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/base/base-executor.d.ts
|
|
80
|
+
type ShellShockExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
|
|
81
|
+
projectName: string;
|
|
82
|
+
command: TCommand;
|
|
83
|
+
options: TExecutorSchema;
|
|
84
|
+
inlineConfig: InlineConfig;
|
|
85
|
+
workspaceConfig: StormWorkspaceConfig;
|
|
86
|
+
};
|
|
87
|
+
//#endregion
|
|
88
|
+
export { ShellShockExecutorContext as t };
|
|
89
|
+
//# sourceMappingURL=base-executor-C986ypeP.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-executor-C986ypeP.d.mts","names":["BaseExecutorSchema"],"sources":["../../src/base/base-executor.schema.d.ts","../../src/base/base-executor.ts"],"sourcesContent":["\n// Generated by powerlines\n// Do not edit this file directly\n\nexport interface BaseExecutorSchema {\n /**\n * Output Path\n * \n * The output path for the build\n * \n * @default \"dist/{projectRoot}\"\n * \n * @format path\n */\n outputPath?: string,\n\n /**\n * TypeScript Configuration File\n * \n * The path to the tsconfig file\n * \n * \n * @format path\n */\n tsconfig?: string,\n\n /**\n * Shell Shock Configuration File\n * \n * The path to the Shell Shock configuration file\n * \n * @default \"{projectRoot}/shell-shock.config.ts\"\n * \n * @format path\n */\n configFile?: string,\n\n /**\n * Mode\n * \n * The build mode\n * \n * \n * @enum development,test,production\n */\n mode?: string,\n\n /**\n * Auto Install\n * \n * Automatically install dependencies during prepare stage\n * \n */\n autoInstall?: boolean,\n\n /**\n * Skip Cache\n * \n * Skip the caching mechanism during the build process (if required)\n * \n */\n skipCache?: boolean,\n\n /**\n * Log Level\n * \n * The log level to use for the build process\n * \n * \n * @enum fatal,error,warn,success,info,debug,trace,silent\n */\n logLevel?: string,\n}\n\n"],"mappings":";;;;;;;;UAIiBA,kBAAAA;;AAAjB;;;;AC0BA;;;;EAE+C,UAAA,CAAA,EAAA,MAAA;;EAGpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AD/BMA,KC0BL,yBD1BuB,CAAA,iBC2BhB,iBD3BgB,GC2BI,iBD3BJ,EAAA,wBC4BT,kBD5BS,GC4BY,kBD5BZ,CAAA,GC6B/B,eD7B+B,GAAA;;WC+BxB;WACA;EANC,YAAA,EAOI,YAPJ;EACO,eAAA,EAOA,oBAPA;CAAoB"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { ExecutorContext, PromiseExecutor } from "@nx/devkit";
|
|
2
|
+
import { BaseExecutorResult } from "@storm-software/workspace-tools/types";
|
|
3
|
+
import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
4
|
+
import { InlineConfig, PowerlinesCommand } from "powerlines/types/config";
|
|
5
|
+
|
|
6
|
+
//#region src/base/base-executor.schema.d.ts
|
|
7
|
+
// Generated by powerlines
|
|
8
|
+
// Do not edit this file directly
|
|
9
|
+
interface BaseExecutorSchema {
|
|
10
|
+
/**
|
|
11
|
+
* Output Path
|
|
12
|
+
*
|
|
13
|
+
* The output path for the build
|
|
14
|
+
*
|
|
15
|
+
* @default "dist/{projectRoot}"
|
|
16
|
+
*
|
|
17
|
+
* @format path
|
|
18
|
+
*/
|
|
19
|
+
outputPath?: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* TypeScript Configuration File
|
|
23
|
+
*
|
|
24
|
+
* The path to the tsconfig file
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
* @format path
|
|
28
|
+
*/
|
|
29
|
+
tsconfig?: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Shell Shock Configuration File
|
|
33
|
+
*
|
|
34
|
+
* The path to the Shell Shock configuration file
|
|
35
|
+
*
|
|
36
|
+
* @default "{projectRoot}/shell-shock.config.ts"
|
|
37
|
+
*
|
|
38
|
+
* @format path
|
|
39
|
+
*/
|
|
40
|
+
configFile?: string;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Mode
|
|
44
|
+
*
|
|
45
|
+
* The build mode
|
|
46
|
+
*
|
|
47
|
+
*
|
|
48
|
+
* @enum development,test,production
|
|
49
|
+
*/
|
|
50
|
+
mode?: string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Auto Install
|
|
54
|
+
*
|
|
55
|
+
* Automatically install dependencies during prepare stage
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
autoInstall?: boolean;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Skip Cache
|
|
62
|
+
*
|
|
63
|
+
* Skip the caching mechanism during the build process (if required)
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
66
|
+
skipCache?: boolean;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Log Level
|
|
70
|
+
*
|
|
71
|
+
* The log level to use for the build process
|
|
72
|
+
*
|
|
73
|
+
*
|
|
74
|
+
* @enum fatal,error,warn,success,info,debug,trace,silent
|
|
75
|
+
*/
|
|
76
|
+
logLevel?: string;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/base/base-executor.d.ts
|
|
80
|
+
type ShellShockExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
|
|
81
|
+
projectName: string;
|
|
82
|
+
command: TCommand;
|
|
83
|
+
options: TExecutorSchema;
|
|
84
|
+
inlineConfig: InlineConfig;
|
|
85
|
+
workspaceConfig: StormWorkspaceConfig;
|
|
86
|
+
};
|
|
87
|
+
//#endregion
|
|
88
|
+
export { ShellShockExecutorContext as t };
|
|
89
|
+
//# sourceMappingURL=base-executor-Dm4OV5-b.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-executor-Dm4OV5-b.d.cts","names":["BaseExecutorSchema"],"sources":["../../src/base/base-executor.schema.d.ts","../../src/base/base-executor.ts"],"sourcesContent":["\n// Generated by powerlines\n// Do not edit this file directly\n\nexport interface BaseExecutorSchema {\n /**\n * Output Path\n * \n * The output path for the build\n * \n * @default \"dist/{projectRoot}\"\n * \n * @format path\n */\n outputPath?: string,\n\n /**\n * TypeScript Configuration File\n * \n * The path to the tsconfig file\n * \n * \n * @format path\n */\n tsconfig?: string,\n\n /**\n * Shell Shock Configuration File\n * \n * The path to the Shell Shock configuration file\n * \n * @default \"{projectRoot}/shell-shock.config.ts\"\n * \n * @format path\n */\n configFile?: string,\n\n /**\n * Mode\n * \n * The build mode\n * \n * \n * @enum development,test,production\n */\n mode?: string,\n\n /**\n * Auto Install\n * \n * Automatically install dependencies during prepare stage\n * \n */\n autoInstall?: boolean,\n\n /**\n * Skip Cache\n * \n * Skip the caching mechanism during the build process (if required)\n * \n */\n skipCache?: boolean,\n\n /**\n * Log Level\n * \n * The log level to use for the build process\n * \n * \n * @enum fatal,error,warn,success,info,debug,trace,silent\n */\n logLevel?: string,\n}\n\n"],"mappings":";;;;;;;;UAIiBA,kBAAAA;;AAAjB;;;;AC0BA;;;;EAE+C,UAAA,CAAA,EAAA,MAAA;;EAGpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AD/BMA,KC0BL,yBD1BuB,CAAA,iBC2BhB,iBD3BgB,GC2BI,iBD3BJ,EAAA,wBC4BT,kBD5BS,GC4BY,kBD5BZ,CAAA,GC6B/B,eD7B+B,GAAA;;WC+BxB;WACA;EANC,YAAA,EAOI,YAPJ;EACO,eAAA,EAOA,oBAPA;CAAoB"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import defu from "defu";
|
|
2
|
+
import { writeError } from "@storm-software/config-tools/logger";
|
|
3
|
+
import { withRunExecutor } from "@storm-software/workspace-tools/base/base-executor";
|
|
4
|
+
import { isError } from "@stryke/type-checks/is-error";
|
|
5
|
+
import { createJiti } from "jiti";
|
|
6
|
+
|
|
7
|
+
//#region src/base/base-executor.ts
|
|
8
|
+
/**
|
|
9
|
+
* A utility function to create a Shell Shock executor that can be used with the `withRunExecutor` function.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* This function is designed to simplify the creation of Shell Shock executors by providing a consistent interface and error handling.
|
|
13
|
+
*
|
|
14
|
+
* @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
|
|
15
|
+
* @param executorFn - The function that will be executed when the command is run.
|
|
16
|
+
* @returns A Promise that resolves to the result of the executor function.
|
|
17
|
+
*/
|
|
18
|
+
function withExecutor(command, executorFn) {
|
|
19
|
+
return withRunExecutor(`Shell Shock ${command} command executor`, async (options, context, workspaceConfig) => {
|
|
20
|
+
if (!context.projectName) throw new Error("The executor requires `projectName` on the context object.");
|
|
21
|
+
if (!context.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) throw new Error("The executor requires `projectsConfigurations` on the context object.");
|
|
22
|
+
const projectConfig = context.projectsConfigurations.projects[context.projectName];
|
|
23
|
+
const { createShellShock } = await createJiti(context.root, { cache: false }).import("@shell-shock/core/api");
|
|
24
|
+
const api = await createShellShock(defu({
|
|
25
|
+
name: projectConfig.name,
|
|
26
|
+
root: projectConfig.root,
|
|
27
|
+
sourceRoot: projectConfig.sourceRoot,
|
|
28
|
+
tsconfig: options.tsconfig,
|
|
29
|
+
logLevel: options.logLevel,
|
|
30
|
+
description: projectConfig.metadata?.description,
|
|
31
|
+
type: projectConfig.projectType,
|
|
32
|
+
mode: options.mode,
|
|
33
|
+
skipCache: options.skipCache,
|
|
34
|
+
autoInstall: options.autoInstall,
|
|
35
|
+
output: { outputPath: options.outputPath ?? projectConfig.targets?.build?.options?.outputPath }
|
|
36
|
+
}, options));
|
|
37
|
+
try {
|
|
38
|
+
return await Promise.resolve(executorFn(defu({
|
|
39
|
+
projectName: context.projectName,
|
|
40
|
+
options,
|
|
41
|
+
workspaceConfig,
|
|
42
|
+
inlineConfig: {
|
|
43
|
+
command,
|
|
44
|
+
configFile: options.configFile
|
|
45
|
+
},
|
|
46
|
+
command
|
|
47
|
+
}, context), api));
|
|
48
|
+
} catch (error) {
|
|
49
|
+
writeError(`An error occurred while executing the Shell Shock ${command} command executor: ${isError(error) ? `${error.message}
|
|
50
|
+
|
|
51
|
+
${error.stack}` : "Unknown error"}`);
|
|
52
|
+
return { success: false };
|
|
53
|
+
} finally {
|
|
54
|
+
await api.finalize();
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
skipReadingConfig: false,
|
|
58
|
+
hooks: { applyDefaultOptions: (options) => {
|
|
59
|
+
options.outputPath ??= "dist/{projectRoot}";
|
|
60
|
+
options.configFile ??= "{projectRoot}/shell-shock.config.ts";
|
|
61
|
+
return options;
|
|
62
|
+
} }
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
//#endregion
|
|
67
|
+
export { withExecutor as t };
|
|
68
|
+
//# sourceMappingURL=base-executor-WGeWcQ9x.mjs.map
|