create-storm-workspace 1.0.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,47 @@
1
+ ## [1.2.2](https://github.com/storm-software/storm-ops/compare/create-storm-workspace-v1.2.1...create-storm-workspace-v1.2.2) (2023-11-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **create-storm-workspace:** Resolved issues with create workspace script options ([b81eaf2](https://github.com/storm-software/storm-ops/commit/b81eaf2c493dd319458f5ad5b375612fb3b8206f))
7
+ * **storm-ops:** Regenerate pnpm lockfile ([6cc4c75](https://github.com/storm-software/storm-ops/commit/6cc4c75486d843327d8e438e34dd08182bb0e052))
8
+
9
+ ## [1.2.1](https://github.com/storm-software/storm-ops/compare/create-storm-workspace-v1.2.0...create-storm-workspace-v1.2.1) (2023-11-06)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **git-tools:** Added missing GitHub release config and removed failed GitGuardian lines ([4b64698](https://github.com/storm-software/storm-ops/commit/4b646983226fa979c76f8078ffd1cee1d544f1a1))
15
+
16
+ # [1.2.0](https://github.com/storm-software/storm-ops/compare/create-storm-workspace-v1.1.1...create-storm-workspace-v1.2.0) (2023-11-06)
17
+
18
+
19
+ ### Features
20
+
21
+ * **workspace-tools:** Added init generator and enhanced preset template files ([c1ac333](https://github.com/storm-software/storm-ops/commit/c1ac33355520a717df93f157f31bb311dd81b7c6))
22
+
23
+ ## [1.1.1](https://github.com/storm-software/storm-ops/compare/create-storm-workspace-v1.1.0...create-storm-workspace-v1.1.1) (2023-11-06)
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * **storm-ops:** Add @semantic-release/commit-analyzer dependency back to workspace root ([553dd65](https://github.com/storm-software/storm-ops/commit/553dd6548aba57eada49dce635312b2c4bdd474f))
29
+ * **storm-ops:** Resolved issue with prepare script in workspace root ([4caa35a](https://github.com/storm-software/storm-ops/commit/4caa35a09421e0ac48a0d2eddc27843c4dcff6e7))
30
+
31
+ # [1.1.0](https://github.com/storm-software/storm-ops/compare/create-storm-workspace-v1.0.1...create-storm-workspace-v1.1.0) (2023-11-06)
32
+
33
+
34
+ ### Features
35
+
36
+ * **workspace-tools:** Added the init generator and tsup build executor ([e34d64c](https://github.com/storm-software/storm-ops/commit/e34d64c84027d60cb29ca54fa957b5994128b4aa))
37
+
38
+ ## [1.0.1](https://github.com/storm-software/storm-ops/compare/create-storm-workspace-v1.0.0...create-storm-workspace-v1.0.1) (2023-11-06)
39
+
40
+
41
+ ### Bug Fixes
42
+
43
+ * **git-tools:** Updated default README template files used by readme CLI ([77c7c59](https://github.com/storm-software/storm-ops/commit/77c7c5936b614f7a5d3072254ff8065e70ad4d25))
44
+
1
45
  # [1.0.0](https://github.com/storm-software/storm-ops/compare/...create-storm-workspace-v1.0.0) (2023-11-06)
2
46
 
3
47
 
package/README.md CHANGED
@@ -9,14 +9,16 @@
9
9
  <a href="https://stormsoftware.org" target="_blank">Website</a> | <a href="https://stormsoftware.org/contact" target="_blank">Contact</a> | <a href="https://github.com/storm-software/stormstack" target="_blank">Repository</a> | <a href="https://stormstack.github.io/stormstack/" target="_blank">Documentation</a> | <a href="https://github.com/storm-software/stormstack/issues/new?assignees=&labels=bug&template=bug-report.yml&title=Bug Report%3A+">Report a Bug</a> | <a href="https://github.com/storm-software/stormstack/issues/new?assignees=&labels=enhancement&template=feature-request.yml&title=Feature Request%3A+">Request a Feature</a> | <a href="https://github.com/storm-software/stormstack/issues/new?assignees=&labels=documentation&template=documentation.yml&title=Documentation Request%3A+">Request Documentation</a> | <a href="https://github.com/storm-software/stormstack/discussions">Ask a Question</a>
10
10
  </div>
11
11
 
12
- <br />
12
+ <br />
13
13
  This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages include CLI utility applications, tools, and various libraries used to create modern, scalable web applications.
14
14
  <br />
15
15
 
16
- <h4 align="center">💻 Visit <a href="https://stormsoftware.org" target="_blank">stormsoftware.org</a> to stay up to date with this developer<br /><br /></h4>
16
+ <h3 align="center">💻 Visit <a href="https://stormsoftware.org" target="_blank">stormsoftware.org</a> to stay up to date with this developer</h3><br />
17
+
18
+ [![Version](https://img.shields.io/badge/version-1.2.2-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
19
+ [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
17
20
 
18
- [![Version](https://img.shields.io/badge/version-1.0.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
19
- [![Nx](https://img.shields.io/badge/Nx-14.4.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-13.0.5-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![codecov.io](https://img.shields.io/codecov/c/github/commitizen/cz-cli.svg?style=for-the-badge&color=1fb2a6)](https://codecov.io/github/commitizen/cz-cli?branch=master)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
21
+ <h3 align="center" bold="true">⚠️ <b>Attention</b> ⚠️ - 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 availible 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.</h3><br />
20
22
 
21
23
 
22
24
  <!-- markdownlint-restore -->
@@ -100,15 +102,18 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
100
102
  <table>
101
103
  <tbody>
102
104
  <tr>
103
- <td align="center"><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/stormstack/commits?author=sullivanpj" title="Code">💻</a> <a href="#tool-sullivanpj" title="Tools">🔧</a> <a href="https://github.com/storm-software/stormstack/commits?author=sullivanpj" title="Documentation">📖</a> <a href="https://github.com/storm-software/stormstack/commits?author=sullivanpj" title="Tests">⚠️</a></td>
104
- <td align="center"><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>
105
+ <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/storm-ops/commits?author=sullivanpj" title="Code">💻</a> <a href="#tool-sullivanpj" title="Tools">🔧</a> <a href="https://github.com/storm-software/storm-ops/commits?author=sullivanpj" title="Documentation">📖</a> <a href="https://github.com/storm-software/storm-ops/commits?author=sullivanpj" title="Tests">⚠️</a></td>
106
+ <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>
107
+ <td align="center" valign="top" width="14.28%"><a href="http://stormsoftware.org"><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>
105
108
  </tr>
106
109
  </tbody>
107
110
  <tfoot>
108
111
  <tr>
109
112
  <td align="center" size="13px" colspan="7">
110
- <a href="https://all-contributors.js.org/docs/en/bot/usage">Add your contributions</a>
111
- </td>
113
+ <img src="https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg">
114
+ <a href="https://all-contributors.js.org/docs/en/bot/usage">Add your contributions</a>
115
+ </img>
116
+ </td>
112
117
  </tr>
113
118
  </tfoot>
114
119
  </table>
@@ -123,14 +128,14 @@ This project follows the [all-contributors](https://github.com/all-contributors/
123
128
  <img src="https://pub-e71cff0f90204755bc910518d63cacf8.r2.dev/logo-opengraph.gif" width="100%"/>
124
129
  </div>
125
130
  <div align="center">
126
- <a href="https://www.patsullivan.org" target="_blank">Website</a> | <a href="https://stormsoftware.org/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/sullivanpj" target="_blank">GitHub</a> | <a href="https://keybase.io/sullivanp" target="_blank">OpenPGP Key</a>
131
+ <a href="https://www.patsullivan.org" target="_blank">Website</a> | <a href="https://www.patsullivan.org/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/sullivanpj" target="_blank">GitHub</a> | <a href="https://keybase.io/sullivanp" target="_blank">OpenPGP Key</a>
127
132
  </div>
128
133
 
129
134
  <div align="center">
130
135
  <p><b>Fingerprint:</b> 1BD2 7192 7770 2549 F4C9 F238 E6AD C420 DA5C 4C2D</p>
131
136
  </div>
132
137
 
133
- <h4 align="center">💻 Visit <a href="https://www.patsullivan.org" target="_blank">patsullivan.org</a> to stay up to date with this developer<br /><br /></h4>
138
+ <h3 align="center">💻 Visit <a href="https://www.patsullivan.org" target="_blank">patsullivan.org</a> to stay up to date with this developer</h3><br /><br />
134
139
 
135
140
 
136
141
  <!-- markdownlint-restore -->
package/bin/index.js CHANGED
@@ -16,11 +16,71 @@ function main() {
16
16
  });
17
17
  name = response.name;
18
18
  }
19
- let mode = process.argv[3];
19
+ let organization = process.argv[3];
20
+ if (!organization) {
21
+ const response = yield (0, enquirer_1.prompt)({
22
+ type: "input",
23
+ name: "organization",
24
+ message: "What organization owns this repository?",
25
+ initial: "storm-software"
26
+ });
27
+ organization = response.organization;
28
+ }
29
+ let namespace = process.argv[4];
30
+ if (!namespace) {
31
+ const response = yield (0, enquirer_1.prompt)({
32
+ type: "input",
33
+ name: "namespace",
34
+ message: "What organization owns this repository?",
35
+ initial: organization ? organization : "storm-software"
36
+ });
37
+ namespace = response.namespace;
38
+ }
39
+ let includeApps = process.argv[5] ? Boolean(process.argv[3]) : null;
40
+ if (!includeApps && typeof includeApps !== "boolean") {
41
+ const response = yield (0, enquirer_1.prompt)({
42
+ type: "confirm",
43
+ name: "includeApps",
44
+ message: "Should a separate `apps` folder be created for this workspace (if Yes: `apps` and `libs` folders will be added, if No: `packages` folders will be added)?",
45
+ initial: false
46
+ });
47
+ includeApps = response.includeApps;
48
+ }
49
+ let description = process.argv[6];
50
+ if (!description) {
51
+ const response = yield (0, enquirer_1.prompt)({
52
+ type: "input",
53
+ name: "description",
54
+ message: "Provide a description of the workspace to use in the package.json and README.md files.",
55
+ initial: `⚡ The ${namespace ? namespace : name} monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.`
56
+ });
57
+ description = response.description;
58
+ }
59
+ let repositoryUrl = process.argv[7];
60
+ if (!repositoryUrl) {
61
+ const response = yield (0, enquirer_1.prompt)({
62
+ type: "input",
63
+ name: "repositoryUrl",
64
+ message: "What is the workspace's Git repository's URL?",
65
+ initial: `https://github.com/${organization ? organization : "storm-software"}/${name}`
66
+ });
67
+ repositoryUrl = response.repositoryUrl;
68
+ }
69
+ let nxCloud = process.argv[8] ? Boolean(process.argv[3]) : null;
70
+ if (!nxCloud && typeof nxCloud !== "boolean") {
71
+ const response = yield (0, enquirer_1.prompt)({
72
+ type: "confirm",
73
+ name: "nxCloud",
74
+ message: "Should Nx Cloud be enabled for the workspace (allows for remote workspace caching)?",
75
+ initial: false
76
+ });
77
+ nxCloud = response.nxCloud;
78
+ }
79
+ let mode = process.argv[9];
20
80
  if (!mode) {
21
81
  mode = (yield (0, enquirer_1.prompt)({
22
82
  name: "mode",
23
- message: "Which mode to use",
83
+ message: "Which mode should be used?",
24
84
  initial: "dark",
25
85
  type: "autocomplete",
26
86
  choices: [
@@ -29,18 +89,21 @@ function main() {
29
89
  ]
30
90
  })).mode;
31
91
  }
32
- console.log(`⚡Creating the Storm Workspace: ${name}`);
33
- // This assumes "@storm-software/workspace-tools" and "create-storm-workspace" are at the same version
34
- // eslint-disable-next-line @typescript-eslint/no-var-requires
35
- const presetVersion = require("../package.json").version;
36
- // TODO: update below to customize the workspace
37
- const { directory } = yield (0, create_nx_workspace_1.createWorkspace)(`@storm-software/workspace-tools@${presetVersion}`, {
92
+ console.log(`⚡ Creating the Storm Workspace: ${name}`);
93
+ // This assume s "@storm-software/workspace-tools" and "create-storm-workspace" are at the same version
94
+ const packageJson = yield require("@storm-software/workspace-tools/package.json");
95
+ const { directory } = yield (0, create_nx_workspace_1.createWorkspace)(`@storm-software/workspace-tools@${packageJson === null || packageJson === void 0 ? void 0 : packageJson.version}`, {
38
96
  name,
39
- nxCloud: false,
97
+ organization,
98
+ namespace,
99
+ description,
100
+ includeApps,
101
+ repositoryUrl,
102
+ nxCloud: !!nxCloud,
40
103
  packageManager: "pnpm",
41
104
  mode
42
105
  });
43
- console.log(`⚡Successfully created the workspace: ${directory}.`);
106
+ console.log(`⚡ Successfully created the workspace: ${directory}.`);
44
107
  });
45
108
  }
46
109
  main();
package/bin/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/create-storm-workspace/bin/index.ts"],"names":[],"mappings":";;AAEA,uDAAuD;;;AAEvD,6DAAsD;AACtD,uCAAkC;AAElC,SAAe,IAAI;;QACjB,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC3B,IAAI,CAAC,IAAI,EAAE;YACT,MAAM,QAAQ,GAAG,MAAM,IAAA,iBAAM,EAAmB;gBAC9C,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,oCAAoC;aAC9C,CAAC,CAAC;YACH,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;SACtB;QAED,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC3B,IAAI,CAAC,IAAI,EAAE;YACT,IAAI,GAAG,CACL,MAAM,IAAA,iBAAM,EAA6B;gBACvC,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,mBAAmB;gBAC5B,OAAO,EAAE,MAAa;gBACtB,IAAI,EAAE,cAAc;gBACpB,OAAO,EAAE;oBACP,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE;oBACnC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE;iBAClC;aACF,CAAC,CACH,CAAC,IAAI,CAAC;SACR;QAED,OAAO,CAAC,GAAG,CAAC,kCAAkC,IAAI,EAAE,CAAC,CAAC;QAEtD,sGAAsG;QACtG,8DAA8D;QAC9D,MAAM,aAAa,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC;QAEzD,gDAAgD;QAChD,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,IAAA,qCAAe,EACzC,mCAAmC,aAAa,EAAE,EAClD;YACE,IAAI;YACJ,OAAO,EAAE,KAAK;YACd,cAAc,EAAE,MAAM;YACtB,IAAI;SACL,CACF,CAAC;QAEF,OAAO,CAAC,GAAG,CAAC,wCAAwC,SAAS,GAAG,CAAC,CAAC;IACpE,CAAC;CAAA;AAED,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/create-storm-workspace/bin/index.ts"],"names":[],"mappings":";;AAEA,uDAAuD;;;AAEvD,6DAAsD;AACtD,uCAAkC;AAElC,SAAe,IAAI;;QACjB,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC3B,IAAI,CAAC,IAAI,EAAE;YACT,MAAM,QAAQ,GAAG,MAAM,IAAA,iBAAM,EAAmB;gBAC9C,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,oCAAoC;aAC9C,CAAC,CAAC;YACH,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;SACtB;QAED,IAAI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gBACvC,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,4BAA4B;gBACrC,OAAO,EAAE,MAAa;gBACtB,IAAI,EAAE,cAAc;gBACpB,OAAO,EAAE;oBACP,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE;oBACnC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE;iBAClC;aACF,CAAC,CACH,CAAC,IAAI,CAAC;SACR;QAED,OAAO,CAAC,GAAG,CAAC,mCAAmC,IAAI,EAAE,CAAC,CAAC;QAEvD,uGAAuG;QACvG,MAAM,WAAW,GACf,MAAM,OAAO,CAAC,8CAA8C,CAAC,CAAC;QAEhE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,IAAA,qCAAe,EACzC,mCAAmC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,EAAE,EACzD;YACE,IAAI;YACJ,YAAY;YACZ,SAAS;YACT,WAAW;YACX,WAAW;YACX,aAAa;YACb,OAAO,EAAE,CAAC,CAAC,OAAO;YAClB,cAAc,EAAE,MAAM;YACtB,IAAI;SACL,CACF,CAAC;QAEF,OAAO,CAAC,GAAG,CAAC,yCAAyC,SAAS,GAAG,CAAC,CAAC;IACrE,CAAC;CAAA;AAED,IAAI,EAAE,CAAC"}
package/bin/index.ts CHANGED
@@ -16,12 +16,85 @@ async function main() {
16
16
  name = response.name;
17
17
  }
18
18
 
19
- let mode = process.argv[3];
19
+ let organization = process.argv[3];
20
+ if (!organization) {
21
+ const response = await prompt<{ organization: string }>({
22
+ type: "input",
23
+ name: "organization",
24
+ message: "What organization owns this repository?",
25
+ initial: "storm-software"
26
+ });
27
+ organization = response.organization;
28
+ }
29
+
30
+ let namespace = process.argv[4];
31
+ if (!namespace) {
32
+ const response = await prompt<{ namespace: string }>({
33
+ type: "input",
34
+ name: "namespace",
35
+ message: "What organization owns this repository?",
36
+ initial: organization ? organization : "storm-software"
37
+ });
38
+ namespace = response.namespace;
39
+ }
40
+
41
+ let includeApps = process.argv[5] ? Boolean(process.argv[3]) : null;
42
+ if (!includeApps && typeof includeApps !== "boolean") {
43
+ const response = await prompt<{ includeApps: boolean }>({
44
+ type: "confirm",
45
+ name: "includeApps",
46
+ message:
47
+ "Should a separate `apps` folder be created for this workspace (if Yes: `apps` and `libs` folders will be added, if No: `packages` folders will be added)?",
48
+ initial: false
49
+ });
50
+ includeApps = response.includeApps;
51
+ }
52
+
53
+ let description = process.argv[6];
54
+ if (!description) {
55
+ const response = await prompt<{ description: string }>({
56
+ type: "input",
57
+ name: "description",
58
+ message:
59
+ "Provide a description of the workspace to use in the package.json and README.md files.",
60
+ initial: `⚡ The ${
61
+ namespace ? namespace : name
62
+ } monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.`
63
+ });
64
+ description = response.description;
65
+ }
66
+
67
+ let repositoryUrl = process.argv[7];
68
+ if (!repositoryUrl) {
69
+ const response = await prompt<{ repositoryUrl: string }>({
70
+ type: "input",
71
+ name: "repositoryUrl",
72
+ message: "What is the workspace's Git repository's URL?",
73
+ initial: `https://github.com/${
74
+ organization ? organization : "storm-software"
75
+ }/${name}`
76
+ });
77
+ repositoryUrl = response.repositoryUrl;
78
+ }
79
+
80
+ let nxCloud = process.argv[8] ? Boolean(process.argv[3]) : null;
81
+ if (!nxCloud && typeof nxCloud !== "boolean") {
82
+ const response = await prompt<{ nxCloud: boolean }>({
83
+ type: "confirm",
84
+ name: "nxCloud",
85
+ message:
86
+ "Should Nx Cloud be enabled for the workspace (allows for remote workspace caching)?",
87
+ initial: false
88
+ });
89
+ nxCloud = response.nxCloud;
90
+ }
91
+
92
+ let mode = process.argv[9];
20
93
  if (!mode) {
21
94
  mode = (
22
95
  await prompt<{ mode: "light" | "dark" }>({
23
96
  name: "mode",
24
- message: "Which mode to use",
97
+ message: "Which mode should be used?",
25
98
  initial: "dark" as any,
26
99
  type: "autocomplete",
27
100
  choices: [
@@ -32,24 +105,28 @@ async function main() {
32
105
  ).mode;
33
106
  }
34
107
 
35
- console.log(`⚡Creating the Storm Workspace: ${name}`);
108
+ console.log(`⚡ Creating the Storm Workspace: ${name}`);
36
109
 
37
- // This assumes "@storm-software/workspace-tools" and "create-storm-workspace" are at the same version
38
- // eslint-disable-next-line @typescript-eslint/no-var-requires
39
- const presetVersion = require("../package.json").version;
110
+ // This assume s "@storm-software/workspace-tools" and "create-storm-workspace" are at the same version
111
+ const packageJson =
112
+ await require("@storm-software/workspace-tools/package.json");
40
113
 
41
- // TODO: update below to customize the workspace
42
114
  const { directory } = await createWorkspace(
43
- `@storm-software/workspace-tools@${presetVersion}`,
115
+ `@storm-software/workspace-tools@${packageJson?.version}`,
44
116
  {
45
117
  name,
46
- nxCloud: false,
118
+ organization,
119
+ namespace,
120
+ description,
121
+ includeApps,
122
+ repositoryUrl,
123
+ nxCloud: !!nxCloud,
47
124
  packageManager: "pnpm",
48
125
  mode
49
126
  }
50
127
  );
51
128
 
52
- console.log(`⚡Successfully created the workspace: ${directory}.`);
129
+ console.log(`⚡ Successfully created the workspace: ${directory}.`);
53
130
  }
54
131
 
55
132
  main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-storm-workspace",
3
- "version": "1.0.1",
3
+ "version": "1.3.0",
4
4
  "private": false,
5
5
  "description": "⚡A CLI tool used to generate and fully configure a Storm Workspace repository.",
6
6
  "keywords": [
@@ -37,6 +37,12 @@
37
37
  "create-nx-workspace": "17.0.3",
38
38
  "enquirer": "2.4.1"
39
39
  },
40
+ "devDependencies": {
41
+ "@storm-software/workspace-tools": "*"
42
+ },
43
+ "peerDependencies": {
44
+ "@storm-software/workspace-tools": "workspace:*"
45
+ },
40
46
  "publishConfig": {
41
47
  "access": "public"
42
48
  },