create-storm-workspace 1.1.0 → 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 +37 -0
- package/README.md +2 -2
- package/bin/index.js +73 -10
- package/bin/index.js.map +1 -1
- package/bin/index.ts +87 -10
- package/package.json +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,40 @@
|
|
|
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
|
+
|
|
1
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)
|
|
2
39
|
|
|
3
40
|
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
15
15
|
|
|
16
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
17
|
|
|
18
|
-
[](https://prettier.io/)
|
|
19
19
|
[](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://docusaurus.io/) 
|
|
20
20
|
|
|
21
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 />
|
|
@@ -128,7 +128,7 @@ This project follows the [all-contributors](https://github.com/all-contributors/
|
|
|
128
128
|
<img src="https://pub-e71cff0f90204755bc910518d63cacf8.r2.dev/logo-opengraph.gif" width="100%"/>
|
|
129
129
|
</div>
|
|
130
130
|
<div align="center">
|
|
131
|
-
<a href="https://www.patsullivan.org" target="_blank">Website</a> | <a href="https://
|
|
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>
|
|
132
132
|
</div>
|
|
133
133
|
|
|
134
134
|
<div align="center">
|
package/bin/index.js
CHANGED
|
@@ -16,11 +16,71 @@ function main() {
|
|
|
16
16
|
});
|
|
17
17
|
name = response.name;
|
|
18
18
|
}
|
|
19
|
-
let
|
|
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
|
|
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
|
|
34
|
-
|
|
35
|
-
const
|
|
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
|
-
|
|
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,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AAG,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
|
|
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
|
|
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
|
|
38
|
-
|
|
39
|
-
|
|
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@${
|
|
115
|
+
`@storm-software/workspace-tools@${packageJson?.version}`,
|
|
44
116
|
{
|
|
45
117
|
name,
|
|
46
|
-
|
|
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.
|
|
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
|
},
|