@storm-software/workspace-tools 1.0.1 → 1.2.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 +81 -0
- package/README.md +15 -10
- package/config/nx.json +22 -53
- package/generators.json +8 -1
- package/index.d.ts +3 -0
- package/index.js +7 -0
- package/index.js.map +1 -0
- package/package.json +14 -5
- package/src/executors/tsup/executor.d.ts +5 -0
- package/src/executors/tsup/executor.js +114 -0
- package/src/executors/tsup/executor.js.map +1 -0
- package/src/executors/tsup/get-config.d.ts +7 -0
- package/src/executors/tsup/get-config.js +28 -0
- package/src/executors/tsup/get-config.js.map +1 -0
- package/src/executors/tsup/hasher.js.map +1 -0
- package/src/executors/tsup/schema.d.ts +19 -0
- package/src/executors/tsup/schema.json +127 -0
- package/src/generators/init/init.d.ts +4 -0
- package/src/generators/init/init.js +21 -0
- package/src/generators/init/init.js.map +1 -0
- package/src/generators/init/schema.d.ts +3 -0
- package/src/generators/init/schema.json +16 -0
- package/src/generators/preset/files/.all-contributorsrc.template +18 -4
- package/src/generators/preset/files/.env.template +14 -35
- package/src/generators/preset/files/.gitattributes +9 -0
- package/src/generators/preset/files/.github/CONTRIBUTING.md.template +1 -1
- package/src/generators/preset/files/.github/ISSUE_TEMPLATE/bug-report.yml.template +38 -7
- package/src/generators/preset/files/.github/ISSUE_TEMPLATE/documentation.yml.template +12 -12
- package/src/generators/preset/files/.github/ISSUE_TEMPLATE/feature-request.yml.template +4 -7
- package/src/generators/preset/files/.github/PULL_REQUEST_TEMPLATE.md.template +1 -1
- package/src/generators/preset/files/.github/actions/node/action.yaml +11 -12
- package/src/generators/preset/files/.github/codecov.yml +1 -1
- package/src/generators/preset/files/.github/renovate.json.template +3 -7
- package/src/generators/preset/files/.github/workflows/ci.yml.template +91 -0
- package/src/generators/preset/files/.github/workflows/codeql.yml +4 -1
- package/src/generators/preset/files/.github/workflows/git-guardian.yml +5 -3
- package/src/generators/preset/files/.github/workflows/labels.yml +6 -5
- package/src/generators/preset/files/.github/workflows/lock.yml +1 -4
- package/src/generators/preset/files/.github/workflows/nextjs-bundle-analysis.yml +12 -28
- package/src/generators/preset/files/.husky/post-checkout +1 -2
- package/src/generators/preset/files/.husky/post-commit +4 -0
- package/src/generators/preset/files/.husky/post-merge +1 -2
- package/src/generators/preset/files/.husky/pre-commit +1 -2
- package/src/generators/preset/files/.husky/pre-push +3 -2
- package/src/generators/preset/files/.markdownlint.json +4 -1
- package/src/generators/preset/files/.verdaccio/config.yml.template +1 -1
- package/src/generators/preset/files/.vscode/extensions.json +1 -1
- package/src/generators/preset/files/.vscode/launch.json +3 -3
- package/src/generators/preset/files/README.md.template +31 -30
- package/src/generators/preset/files/nx.json +98 -0
- package/src/generators/preset/files/pnpm-workspace.yaml +2 -0
- package/src/generators/preset/files/socket.yaml +20 -0
- package/src/generators/preset/files/tsconfig.base.json.template +1 -1
- package/src/generators/preset/generator.js +139 -65
- package/src/generators/preset/generator.js.map +1 -1
- package/src/generators/preset/schema.d.ts +8 -0
- package/src/generators/preset/schema.json +86 -2
- package/src/utils/apply-workspace-tokens.d.ts +2 -0
- package/src/utils/apply-workspace-tokens.js +42 -0
- package/src/utils/apply-workspace-tokens.js.map +1 -0
- package/src/utils/get-workspace-root.d.ts +1 -0
- package/src/utils/get-workspace-root.js +14 -0
- package/src/utils/get-workspace-root.js.map +1 -0
- package/src/utils/versions.d.ts +20 -0
- package/src/executors/build/executor.d.ts +0 -34
- package/src/executors/build/executor.js +0 -51
- package/src/executors/build/executor.js.map +0 -1
- package/src/executors/build/get-config.d.ts +0 -40
- package/src/executors/build/get-config.js +0 -45
- package/src/executors/build/get-config.js.map +0 -1
- package/src/executors/build/hasher.js.map +0 -1
- package/src/executors/build/schema.d.ts +0 -1
- package/src/executors/build/schema.json +0 -9
- package/src/generators/preset/files/.alexignore +0 -4
- package/src/generators/preset/files/.alexrc +0 -39
- package/src/generators/preset/files/.github/workflows/ci.yml +0 -131
- package/src/generators/preset/files/.github/workflows/documentation.yml.template +0 -85
- package/src/generators/preset/files/.husky/commit-msg +0 -4
- package/src/generators/preset/files/commitlint.config.d.ts +0 -2
- package/src/generators/preset/files/commitlint.config.js +0 -3
- package/src/generators/preset/files/commitlint.config.js.map +0 -1
- package/src/generators/preset/files/src/index.ts.template +0 -1
- package/src/index.d.ts +0 -1
- package/src/index.js +0 -5
- package/src/index.js.map +0 -1
- /package/src/executors/{build → tsup}/hasher.d.ts +0 -0
- /package/src/executors/{build → tsup}/hasher.js +0 -0
- /package/src/generators/preset/files/{.log4brains.yml → .log4brains.yml.template} +0 -0
|
@@ -3,26 +3,42 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const path = require("path");
|
|
6
|
+
const versions_1 = require("../../utils/versions");
|
|
6
7
|
function default_1(tree, options) {
|
|
8
|
+
var _a, _b;
|
|
7
9
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
10
|
const projectRoot = `.`;
|
|
9
|
-
(
|
|
11
|
+
(_a = options.description) !== null && _a !== void 0 ? _a : (options.description = `⚡The ${options.namespace ? options.namespace : options.name} monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.`);
|
|
12
|
+
(_b = options.namespace) !== null && _b !== void 0 ? _b : (options.namespace = options.organization);
|
|
13
|
+
(0, devkit_1.addProjectConfiguration)(tree, `@${options.namespace}/${options.name}`, {
|
|
10
14
|
root: projectRoot,
|
|
11
15
|
projectType: "application",
|
|
12
|
-
targets: {
|
|
16
|
+
targets: {
|
|
17
|
+
"local-registry": {
|
|
18
|
+
"executor": "@nx/js:verdaccio",
|
|
19
|
+
"options": {
|
|
20
|
+
"port": 4873,
|
|
21
|
+
"config": ".verdaccio/config.yml",
|
|
22
|
+
"storage": "tmp/local-registry/storage"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
13
26
|
});
|
|
14
27
|
(0, devkit_1.updateJson)(tree, "package.json", json => {
|
|
15
|
-
var _a, _b, _c, _d, _e, _f;
|
|
28
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
16
29
|
json.scripts = json.scripts || {};
|
|
17
30
|
json.version = "0.0.0";
|
|
18
31
|
json.private = true;
|
|
19
32
|
(_a = json.keywords) !== null && _a !== void 0 ? _a : (json.keywords = [
|
|
33
|
+
options.name,
|
|
34
|
+
options.namespace,
|
|
20
35
|
"storm",
|
|
21
36
|
"stormstack",
|
|
22
|
-
"storm-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
37
|
+
"storm-ops",
|
|
38
|
+
"powerplant",
|
|
39
|
+
"power-plant",
|
|
40
|
+
"power-plant-lang",
|
|
41
|
+
"power-plant-model",
|
|
26
42
|
"impact",
|
|
27
43
|
"nextjs",
|
|
28
44
|
"prisma",
|
|
@@ -31,7 +47,6 @@ function default_1(tree, options) {
|
|
|
31
47
|
"strapi",
|
|
32
48
|
"graphql",
|
|
33
49
|
"sullivanpj",
|
|
34
|
-
"open-system",
|
|
35
50
|
"monorepo"
|
|
36
51
|
]);
|
|
37
52
|
(_b = json.homepage) !== null && _b !== void 0 ? _b : (json.homepage = "https://stormsoftware.org");
|
|
@@ -45,59 +60,104 @@ function default_1(tree, options) {
|
|
|
45
60
|
email: "contact@stormsoftware.org",
|
|
46
61
|
url: "https://stormsoftware.org"
|
|
47
62
|
});
|
|
63
|
+
(_f = json.namespace) !== null && _f !== void 0 ? _f : (json.namespace = `@${options.namespace}`);
|
|
64
|
+
(_g = json.description) !== null && _g !== void 0 ? _g : (json.description = options.description);
|
|
65
|
+
(_h = options.repositoryUrl) !== null && _h !== void 0 ? _h : (options.repositoryUrl = `https://github.com/${options.organization}/${options.name}}`);
|
|
66
|
+
(_j = json.repository) !== null && _j !== void 0 ? _j : (json.repository = {
|
|
67
|
+
type: "github",
|
|
68
|
+
url: `${options.repositoryUrl}.git`
|
|
69
|
+
});
|
|
48
70
|
// generate a start script into the package.json
|
|
49
71
|
json.scripts.adr = "pnpm log4brains adr new";
|
|
50
72
|
json.scripts["adr-preview"] = "pnpm log4brains preview";
|
|
51
|
-
json.scripts.prepare = "pnpm
|
|
52
|
-
json.scripts["prepare:husky"] = "is-ci || husky install";
|
|
73
|
+
json.scripts.prepare = "pnpm @storm-software/git-tools/scripts/prepare.js";
|
|
53
74
|
json.scripts.preinstall =
|
|
54
|
-
"pnpm @storm-software/
|
|
75
|
+
"pnpm @storm-software/git-tools/scripts/pre-install.js || npx -y only-allow pnpm";
|
|
55
76
|
json.scripts["install:csb"] =
|
|
56
77
|
"corepack enable && pnpm install --frozen-lockfile";
|
|
57
78
|
json.scripts.clean = "rimraf dist";
|
|
58
79
|
json.scripts.prebuild = "pnpm clean";
|
|
80
|
+
json.scripts["clean:tools"] = "rimraf dist/tools";
|
|
81
|
+
json.scripts["clean:docs"] = "rimraf dist/docs";
|
|
82
|
+
if (!options.includeApps) {
|
|
83
|
+
json.scripts["clean:packages"] = "rimraf dist/packages";
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
json.scripts["clean:apps"] = "rimraf dist/apps";
|
|
87
|
+
json.scripts["clean:libs"] = "rimraf dist/libs";
|
|
88
|
+
json.scripts["clean:storybook"] = "rimraf dist/storybook";
|
|
89
|
+
}
|
|
59
90
|
json.scripts.build = "nx affected -t build --parallel=5";
|
|
60
91
|
json.scripts["build:all"] = "nx run-many -t build --all --parallel=5";
|
|
61
92
|
json.scripts["build:production"] =
|
|
62
93
|
"nx run-many -t build --all --prod --parallel=5";
|
|
94
|
+
json.scripts["build:tools"] =
|
|
95
|
+
"nx run-many -t build --projects=tools/* --parallel=5";
|
|
96
|
+
json.scripts["build:docs"] =
|
|
97
|
+
"nx run-many -t build --projects=docs/* --parallel=5";
|
|
98
|
+
if (!options.includeApps) {
|
|
99
|
+
json.scripts["build:packages"] =
|
|
100
|
+
"nx run-many -t build --projects=packages/* --parallel=5";
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
json.scripts["build:apps"] =
|
|
104
|
+
"nx run-many -t build --projects=apps/* --parallel=5";
|
|
105
|
+
json.scripts["build:libs"] =
|
|
106
|
+
"nx run-many -t build --projects=libs/* --parallel=5";
|
|
107
|
+
json.scripts["build:storybook"] = "storybook build -s public";
|
|
108
|
+
}
|
|
63
109
|
json.scripts.nx = "nx";
|
|
64
110
|
json.scripts.graph = "nx graph";
|
|
65
111
|
json.scripts.lint = "pnpm storm-lint all";
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
112
|
+
if (options.includeApps) {
|
|
113
|
+
json.scripts.start = "nx serve";
|
|
114
|
+
json.scripts.storybook = "pnpm storybook dev -p 6006";
|
|
115
|
+
}
|
|
116
|
+
json.scripts.format = "nx format:write";
|
|
70
117
|
json.scripts.help = "nx help";
|
|
71
118
|
json.scripts["dep-graph"] = "nx dep-graph";
|
|
72
119
|
json.scripts["local-registry"] =
|
|
73
120
|
"nx local-registry @storm-software/storm-ops";
|
|
74
|
-
json.scripts
|
|
75
|
-
|
|
121
|
+
json.scripts.e2e = "nx e2e";
|
|
122
|
+
if (options.includeApps) {
|
|
123
|
+
json.scripts.test = "nx test";
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
json.scripts.test = "nx test && pnpm test:storybook";
|
|
127
|
+
json.scripts["test:storybook"] = "pnpm test-storybook";
|
|
128
|
+
}
|
|
129
|
+
json.scripts.lint = "pnpm storm-lint all --skip-cspell";
|
|
76
130
|
json.scripts.commit = "pnpm storm-git commit";
|
|
131
|
+
json.scripts.readme =
|
|
132
|
+
'pnpm storm-git readme --templates="tools/readme-templates"';
|
|
77
133
|
json.scripts["api-extractor"] =
|
|
78
134
|
"nx g @storm-software/workspace-tools:api-extractor --outputPath 'docs/api-reference' --clean --no-interactive";
|
|
79
135
|
json.scripts.release = "pnpm storm-git release";
|
|
80
|
-
(
|
|
136
|
+
(_k = json.packageManager) !== null && _k !== void 0 ? _k : (json.packageManager = "pnpm@8.10.2");
|
|
81
137
|
json.engines = {
|
|
82
|
-
|
|
83
|
-
pnpm: ">=8.7.4"
|
|
138
|
+
pnpm: `>=${versions_1.pnpmVersion}`
|
|
84
139
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
140
|
+
if (options.includeApps) {
|
|
141
|
+
json.engines.node = `>=${versions_1.nodeVersion}`;
|
|
142
|
+
}
|
|
143
|
+
(_l = json.packageManager) !== null && _l !== void 0 ? _l : (json.packageManager = "pnpm@8.10.2");
|
|
144
|
+
json.prettier = "@storm-software/linting-tools/prettier/config.json";
|
|
145
|
+
if (options.includeApps) {
|
|
146
|
+
json.bundlewatch = {
|
|
147
|
+
files: [
|
|
148
|
+
{
|
|
149
|
+
path: "dist/*/*.js",
|
|
150
|
+
maxSize: "200kB"
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
ci: {
|
|
154
|
+
trackBranches: ["main", "alpha", "beta"]
|
|
95
155
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
}
|
|
156
|
+
};
|
|
157
|
+
json.nextBundleAnalysis = {
|
|
158
|
+
"buildOutputDirectory": "dist/apps/web/app/.next"
|
|
159
|
+
};
|
|
160
|
+
}
|
|
101
161
|
json.nx = {
|
|
102
162
|
includedScripts: ["lint", "format"]
|
|
103
163
|
};
|
|
@@ -105,43 +165,57 @@ function default_1(tree, options) {
|
|
|
105
165
|
});
|
|
106
166
|
(0, devkit_1.generateFiles)(tree, path.join(__dirname, "files"), projectRoot, options);
|
|
107
167
|
yield (0, devkit_1.formatFiles)(tree);
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
nx: "latest",
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
|
|
168
|
+
let dependencies = {
|
|
169
|
+
"nx": "latest",
|
|
170
|
+
"@nx/js": "latest",
|
|
171
|
+
"@nx/workspace": "latest",
|
|
172
|
+
"@nx/devkit": "latest",
|
|
173
|
+
"@nx/eslint": "latest",
|
|
174
|
+
"@nx/eslint-plugin": "latest",
|
|
175
|
+
"@nx/jest": "latest",
|
|
114
176
|
"@storm-software/git-tools": "latest",
|
|
115
177
|
"@storm-software/linting-tools": "latest",
|
|
116
178
|
"@storm-software/workspace-tools": "latest",
|
|
117
179
|
"prettier-plugin-packagejson": "latest",
|
|
118
180
|
"prettier-plugin-prisma": "latest",
|
|
119
|
-
"
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"eslint-plugin-cypress": "latest",
|
|
125
|
-
"eslint-plugin-import": "latest",
|
|
126
|
-
"eslint-plugin-jest": "latest",
|
|
127
|
-
"eslint-plugin-jsx-a11y": "latest",
|
|
128
|
-
"eslint-plugin-react": "latest",
|
|
129
|
-
"eslint-plugin-react-hooks": "latest",
|
|
130
|
-
"eslint-plugin-storybook": "latest",
|
|
131
|
-
"nx-cloud": "latest",
|
|
132
|
-
log4brains: "latest",
|
|
133
|
-
husky: "latest",
|
|
134
|
-
prettier: "latest",
|
|
135
|
-
"is-ci": "latest",
|
|
181
|
+
"tsup": "latest",
|
|
182
|
+
"eslint": "latest",
|
|
183
|
+
"log4brains": "latest",
|
|
184
|
+
"husky": "latest",
|
|
185
|
+
"prettier": "latest",
|
|
136
186
|
"lint-staged": "latest",
|
|
137
|
-
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
|
|
187
|
+
"semantic-release": "latest",
|
|
188
|
+
"@semantic-release/changelog": "latest",
|
|
189
|
+
"@semantic-release/commit-analyzer": "latest",
|
|
190
|
+
"@semantic-release/exec": "latest",
|
|
191
|
+
"@semantic-release/git": "latest",
|
|
192
|
+
"@semantic-release/github": "latest",
|
|
193
|
+
"@semantic-release/npm": "latest",
|
|
194
|
+
"@semantic-release/release-notes-generator": "latest",
|
|
195
|
+
"jest": "latest",
|
|
196
|
+
"jest-environment-jsdom": "latest",
|
|
197
|
+
"jest-environment-node": "latest",
|
|
198
|
+
"ts-jest": "latest",
|
|
199
|
+
"ts-node": "latest",
|
|
200
|
+
"tslib": "latest",
|
|
201
|
+
"typescript": versions_1.typescriptVersion,
|
|
202
|
+
"@swc-node/register": "latest",
|
|
203
|
+
"@swc/cli": "latest",
|
|
204
|
+
"@swc/core": "latest",
|
|
205
|
+
"@swc/helpers": "latest",
|
|
142
206
|
"@types/react": "latest",
|
|
143
|
-
"@types/react-dom": "latest"
|
|
144
|
-
|
|
207
|
+
"@types/react-dom": "latest",
|
|
208
|
+
"@types/jest": "latest",
|
|
209
|
+
"@types/node": "20.8.10",
|
|
210
|
+
"verdaccio": "latest"
|
|
211
|
+
};
|
|
212
|
+
if (options.includeApps) {
|
|
213
|
+
dependencies = Object.assign(Object.assign({}, dependencies), { "bundlewatch": "latest", "react": "latest", "react-dom": "latest", "storybook": "latest", "@storybook/addons": "latest", "@nx/react": "latest", "@nx/next": "latest", "@nx/node": "latest", "@nx/storybook": "latest" });
|
|
214
|
+
}
|
|
215
|
+
if (options.nxCloud) {
|
|
216
|
+
dependencies = Object.assign(Object.assign({}, dependencies), { "nx-cloud": "latest" });
|
|
217
|
+
}
|
|
218
|
+
return (0, devkit_1.addDependenciesToPackageJson)(tree, dependencies, {});
|
|
145
219
|
});
|
|
146
220
|
}
|
|
147
221
|
exports.default = default_1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/workspace-tools/src/generators/preset/generator.ts"],"names":[],"mappings":";;;AAAA,uCAOoB;AACpB,6BAA6B;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/workspace-tools/src/generators/preset/generator.ts"],"names":[],"mappings":";;;AAAA,uCAOoB;AACpB,6BAA6B;AAC7B,mDAI8B;AAG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A,qCAA4B,EAAC,IAAI,EAAE,YAAY,EAAE,EAAE,CAAC,CAAC;;CAC7D;AA5PD,4BA4PC"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
export type NxClientMode = "light" | "dark";
|
|
1
2
|
export interface PresetGeneratorSchema {
|
|
2
3
|
name: string;
|
|
4
|
+
organization: string;
|
|
5
|
+
includeApps: boolean;
|
|
6
|
+
namespace?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
repositoryUrl?: string;
|
|
9
|
+
nxCloud: boolean;
|
|
10
|
+
mode: NxClientMode;
|
|
3
11
|
}
|
|
@@ -2,17 +2,101 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "Preset",
|
|
4
4
|
"title": "Storm Workspace preset",
|
|
5
|
+
"description": "Storm workspace preset generator",
|
|
5
6
|
"type": "object",
|
|
7
|
+
"example": [
|
|
8
|
+
{
|
|
9
|
+
"command": "nx g @storm-software/workspace-tools:preset --name 'example-repo'",
|
|
10
|
+
"description": "Generate a storm workspace with the name: example-repo, namespace: storm-software, organization: storm-software, and repositoryUrl: 'https://github.com/storm-software/example-repo'."
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
{
|
|
14
|
+
"command": "nx g @storm-software/workspace-tools:preset --name 'example-repo' --namespace 'example'",
|
|
15
|
+
"description": "Generate a storm workspace with the name: example-repo, namespace: example, and repositoryUrl: 'https://github.com/storm-software/example-repo'."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"command": "nx g @storm-software/workspace-tools:preset --name 'example-repo' --namespace 'example' --organization 'example-org' --description 'An example workspace'",
|
|
19
|
+
"description": "Generate a storm workspace with the name: example-repo, namespace: example, organization: example-org, description: 'An example workspace', and repositoryUrl: 'https://github.com/example-org/example-repo'."
|
|
20
|
+
}
|
|
21
|
+
],
|
|
6
22
|
"properties": {
|
|
7
23
|
"name": {
|
|
8
24
|
"type": "string",
|
|
9
|
-
"description": "",
|
|
25
|
+
"description": "The name of the workspace root.",
|
|
10
26
|
"$default": {
|
|
11
27
|
"$source": "argv",
|
|
12
28
|
"index": 0
|
|
13
29
|
},
|
|
14
30
|
"x-prompt": "What name would you like to use?"
|
|
31
|
+
},
|
|
32
|
+
"organization": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "The organization that owns the workspace.",
|
|
35
|
+
"default": "storm-software",
|
|
36
|
+
"$default": {
|
|
37
|
+
"$source": "argv",
|
|
38
|
+
"index": 1
|
|
39
|
+
},
|
|
40
|
+
"x-prompt": "What organization owns this repository?"
|
|
41
|
+
},
|
|
42
|
+
"namespace": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "The npm scope used for the workspace. Defaults to the organization name.",
|
|
45
|
+
"$default": {
|
|
46
|
+
"$source": "argv",
|
|
47
|
+
"index": 2
|
|
48
|
+
},
|
|
49
|
+
"x-prompt": "What namespace (npm scope) would you like to use? Defaults to the organization name."
|
|
50
|
+
},
|
|
51
|
+
"includeApps": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"description": "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)?",
|
|
54
|
+
"default": false,
|
|
55
|
+
"$default": {
|
|
56
|
+
"$source": "argv",
|
|
57
|
+
"index": 3
|
|
58
|
+
},
|
|
59
|
+
"x-prompt": "Is the workspace a purely package based repository (one large packages folder) or does it include apps (split between apps and libs folders)?"
|
|
60
|
+
},
|
|
61
|
+
"description": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"description": "The description of the workspace to use in the package.json and README.md files.",
|
|
64
|
+
"$default": {
|
|
65
|
+
"$source": "argv",
|
|
66
|
+
"index": 4
|
|
67
|
+
},
|
|
68
|
+
"x-prompt": "Provide a description of the workspace to use in the package.json and README.md files."
|
|
69
|
+
},
|
|
70
|
+
"repositoryUrl": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"description": "The URL of the workspace in GitHub. Defaults to the https://github.com/<organization>/<name>",
|
|
73
|
+
"$default": {
|
|
74
|
+
"$source": "argv",
|
|
75
|
+
"index": 5
|
|
76
|
+
},
|
|
77
|
+
"x-prompt": "What is the workspace's GitHub repository URL?"
|
|
78
|
+
},
|
|
79
|
+
"nxCloud": {
|
|
80
|
+
"type": "boolean",
|
|
81
|
+
"description": "Should distributed caching with Nx Cloud be enabled for the workspace?",
|
|
82
|
+
"default": false,
|
|
83
|
+
"$default": {
|
|
84
|
+
"$source": "argv",
|
|
85
|
+
"index": 6
|
|
86
|
+
},
|
|
87
|
+
"x-prompt": "Should distributed caching with Nx Cloud be enabled for the workspace?"
|
|
88
|
+
},
|
|
89
|
+
"mode": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"description": "Which client mode should be used for the Nx Task Runner?",
|
|
92
|
+
"default": "dark",
|
|
93
|
+
"enum": ["light", "dark"],
|
|
94
|
+
"$default": {
|
|
95
|
+
"$source": "argv",
|
|
96
|
+
"index": 7
|
|
97
|
+
},
|
|
98
|
+
"x-prompt": "Which client mode should be used for the Nx Task Runner?"
|
|
15
99
|
}
|
|
16
100
|
},
|
|
17
|
-
"required": ["name"]
|
|
101
|
+
"required": ["name", "organization", "includeApps", "nxCloud", "mode"]
|
|
18
102
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applyWorkspaceTokens = void 0;
|
|
4
|
+
const get_workspace_root_1 = require("./get-workspace-root");
|
|
5
|
+
const applyWorkspaceTokens = (option, config) => {
|
|
6
|
+
let result = option;
|
|
7
|
+
if (!result) {
|
|
8
|
+
return result;
|
|
9
|
+
}
|
|
10
|
+
const workspaceRoot = (0, get_workspace_root_1.getWorkspaceRoot)();
|
|
11
|
+
let projectName;
|
|
12
|
+
let projectRoot;
|
|
13
|
+
let sourceRoot;
|
|
14
|
+
if ((config === null || config === void 0 ? void 0 : config.projectsConfigurations) &&
|
|
15
|
+
(config === null || config === void 0 ? void 0 : config.projectName)) {
|
|
16
|
+
const context = config;
|
|
17
|
+
projectName = context.projectName;
|
|
18
|
+
projectRoot = context.projectsConfigurations[projectName].root;
|
|
19
|
+
sourceRoot = context.projectsConfigurations[projectName].sourceRoot;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
const projectConfig = config;
|
|
23
|
+
projectName = projectConfig.name;
|
|
24
|
+
projectRoot = projectConfig.root;
|
|
25
|
+
sourceRoot = projectConfig.sourceRoot;
|
|
26
|
+
}
|
|
27
|
+
if (result.includes("{projectName}")) {
|
|
28
|
+
result = result.replaceAll("{projectName}", projectName);
|
|
29
|
+
}
|
|
30
|
+
if (result.includes("{projectRoot}")) {
|
|
31
|
+
result = result.replaceAll("{projectRoot}", projectRoot);
|
|
32
|
+
}
|
|
33
|
+
if (result.includes("{sourceRoot}")) {
|
|
34
|
+
result = result.replaceAll("{sourceRoot}", sourceRoot);
|
|
35
|
+
}
|
|
36
|
+
if (result.includes("{workspaceRoot}")) {
|
|
37
|
+
result = result.replaceAll("{workspaceRoot}", workspaceRoot);
|
|
38
|
+
}
|
|
39
|
+
return result;
|
|
40
|
+
};
|
|
41
|
+
exports.applyWorkspaceTokens = applyWorkspaceTokens;
|
|
42
|
+
//# sourceMappingURL=apply-workspace-tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-workspace-tokens.js","sourceRoot":"","sources":["../../../../../packages/workspace-tools/src/utils/apply-workspace-tokens.ts"],"names":[],"mappings":";;;AACA,6DAAwD;AAEjD,MAAM,oBAAoB,GAAG,CAClC,MAAc,EACd,MAA8C,EACtC,EAAE;IACV,IAAI,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,MAAM,CAAC;KACf;IAED,MAAM,aAAa,GAAG,IAAA,qCAAgB,GAAE,CAAC;IAEzC,IAAI,WAAoB,CAAC;IACzB,IAAI,WAAoB,CAAC;IACzB,IAAI,UAAmB,CAAC;IACx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@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWorkspaceRoot = void 0;
|
|
4
|
+
const find_workspace_root_js_1 = require("nx/src/utils/find-workspace-root.js");
|
|
5
|
+
const getWorkspaceRoot = () => {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
var _c, _d;
|
|
8
|
+
const root = (0, find_workspace_root_js_1.findWorkspaceRoot)(process.cwd());
|
|
9
|
+
(_a = (_c = process.env).STORM_REPO_ROOT) !== null && _a !== void 0 ? _a : (_c.STORM_REPO_ROOT = root === null || root === void 0 ? void 0 : root.dir);
|
|
10
|
+
(_b = (_d = process.env).NX_WORKSPACE_ROOT_PATH) !== null && _b !== void 0 ? _b : (_d.NX_WORKSPACE_ROOT_PATH = root === null || root === void 0 ? void 0 : root.dir);
|
|
11
|
+
return root === null || root === void 0 ? void 0 : root.dir;
|
|
12
|
+
};
|
|
13
|
+
exports.getWorkspaceRoot = getWorkspaceRoot;
|
|
14
|
+
//# sourceMappingURL=get-workspace-root.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-workspace-root.js","sourceRoot":"","sources":["../../../../../packages/workspace-tools/src/utils/get-workspace-root.ts"],"names":[],"mappings":";;;AAAA,gFAAwE;AAEjE,MAAM,gBAAgB,GAAG,GAAG,EAAE;;;IACnC,MAAM,IAAI,GAAG,IAAA,0CAAiB,EAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAC9C,YAAA,OAAO,CAAC,GAAG,EAAC,eAAe,uCAAf,eAAe,GAAK,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,EAAC;IAC1C,YAAA,OAAO,CAAC,GAAG,EAAC,sBAAsB,uCAAtB,sBAAsB,GAAK,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,EAAC;IAEjD,OAAO,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,CAAC;AACnB,CAAC,CAAC;AANW,QAAA,gBAAgB,oBAM3B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const nxVersion: "^17.0.3";
|
|
2
|
+
export declare const tsupVersion = "^7.2.0";
|
|
3
|
+
export declare const prettierVersion = "^3.0.3";
|
|
4
|
+
export declare const prettierPackageJsonVersion = "2.4.6";
|
|
5
|
+
export declare const prettierPrismaVersion = "5.0.0";
|
|
6
|
+
export declare const prettierVersion = "^3.0.3";
|
|
7
|
+
export declare const swcCliVersion = "~0.1.62";
|
|
8
|
+
export declare const swcCoreVersion = "~1.3.95";
|
|
9
|
+
export declare const swcHelpersVersion = "~0.5.3";
|
|
10
|
+
export declare const swcNodeVersion = "1.6.8";
|
|
11
|
+
export declare const tsLibVersion = "2.6.2";
|
|
12
|
+
export declare const typesNodeVersion = "20.9.0";
|
|
13
|
+
export declare const verdaccioVersion = "5.27.0";
|
|
14
|
+
export declare const typescriptVersion = "~5.2.2";
|
|
15
|
+
export declare const eslintVersion = "~8.53.0";
|
|
16
|
+
export declare const lintStagedVersion = "15.0.2";
|
|
17
|
+
export declare const semanticReleaseVersion = "22.0.7";
|
|
18
|
+
|
|
19
|
+
export declare const nodeVersion = "20.9.0";
|
|
20
|
+
export declare const pnpmVersion = "8.10.2";
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { BuildExecutorSchema } from "./schema";
|
|
2
|
-
export default function runExecutor(options: BuildExecutorSchema): Promise<{
|
|
3
|
-
success: boolean;
|
|
4
|
-
}>;
|
|
5
|
-
/**
|
|
6
|
-
* @param {Object} opts - Options for building configurations.
|
|
7
|
-
* @param {string[]} opts.entry - The entry array.
|
|
8
|
-
* @returns {import('tsup').Options}
|
|
9
|
-
*/
|
|
10
|
-
export declare function modernConfig(opts: any): {
|
|
11
|
-
entry: any;
|
|
12
|
-
format: string[];
|
|
13
|
-
target: string[];
|
|
14
|
-
outDir: string;
|
|
15
|
-
dts: boolean;
|
|
16
|
-
sourcemap: boolean;
|
|
17
|
-
clean: boolean;
|
|
18
|
-
esbuildPlugins: import("esbuild").Plugin[];
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* @param {Object} opts - Options for building configurations.
|
|
22
|
-
* @param {string[]} opts.entry - The entry array.
|
|
23
|
-
* @returns {import('tsup').Options}
|
|
24
|
-
*/
|
|
25
|
-
export declare function legacyConfig(opts: any): {
|
|
26
|
-
entry: any;
|
|
27
|
-
format: string[];
|
|
28
|
-
target: string[];
|
|
29
|
-
outDir: string;
|
|
30
|
-
dts: boolean;
|
|
31
|
-
sourcemap: boolean;
|
|
32
|
-
clean: boolean;
|
|
33
|
-
esbuildPlugins: import("esbuild").Plugin[];
|
|
34
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.legacyConfig = exports.modernConfig = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
function runExecutor(options) {
|
|
6
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
7
|
-
console.log("Executor ran for Build", options);
|
|
8
|
-
return {
|
|
9
|
-
success: true
|
|
10
|
-
};
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
exports.default = runExecutor;
|
|
14
|
-
const esbuild_plugin_file_path_extensions_1 = require("esbuild-plugin-file-path-extensions");
|
|
15
|
-
/**
|
|
16
|
-
* @param {Object} opts - Options for building configurations.
|
|
17
|
-
* @param {string[]} opts.entry - The entry array.
|
|
18
|
-
* @returns {import('tsup').Options}
|
|
19
|
-
*/
|
|
20
|
-
function modernConfig(opts) {
|
|
21
|
-
return {
|
|
22
|
-
entry: opts.entry,
|
|
23
|
-
format: ["cjs", "esm"],
|
|
24
|
-
target: ["chrome91", "firefox90", "edge91", "safari15", "ios15", "opera77"],
|
|
25
|
-
outDir: "build/modern",
|
|
26
|
-
dts: true,
|
|
27
|
-
sourcemap: true,
|
|
28
|
-
clean: true,
|
|
29
|
-
esbuildPlugins: [(0, esbuild_plugin_file_path_extensions_1.esbuildPluginFilePathExtensions)({ esmExtension: "js" })]
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
exports.modernConfig = modernConfig;
|
|
33
|
-
/**
|
|
34
|
-
* @param {Object} opts - Options for building configurations.
|
|
35
|
-
* @param {string[]} opts.entry - The entry array.
|
|
36
|
-
* @returns {import('tsup').Options}
|
|
37
|
-
*/
|
|
38
|
-
function legacyConfig(opts) {
|
|
39
|
-
return {
|
|
40
|
-
entry: opts.entry,
|
|
41
|
-
format: ["cjs", "esm"],
|
|
42
|
-
target: ["es2020", "node16"],
|
|
43
|
-
outDir: "build/legacy",
|
|
44
|
-
dts: true,
|
|
45
|
-
sourcemap: true,
|
|
46
|
-
clean: true,
|
|
47
|
-
esbuildPlugins: [(0, esbuild_plugin_file_path_extensions_1.esbuildPluginFilePathExtensions)({ esmExtension: "js" })]
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
exports.legacyConfig = legacyConfig;
|
|
51
|
-
//# sourceMappingURL=executor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../packages/workspace-tools/src/executors/build/executor.ts"],"names":[],"mappings":";;;;AAEA,SAA8B,WAAW,CAAC,OAA4B;;QACpE,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;QAC/C,OAAO;YACL,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;CAAA;AALD,8BAKC;AACD,6FAAsF;AAEtF;;;;GAIG;AACH,SAAgB,YAAY,CAAC,IAAI;IAC/B,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;QACtB,MAAM,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,CAAC;QAC3E,MAAM,EAAE,cAAc;QACtB,GAAG,EAAE,IAAI;QACT,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,IAAI;QACX,cAAc,EAAE,CAAC,IAAA,qEAA+B,EAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;KAC1E,CAAC;AACJ,CAAC;AAXD,oCAWC;AAED;;;;GAIG;AACH,SAAgB,YAAY,CAAC,IAAI;IAC/B,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;QACtB,MAAM,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;QAC5B,MAAM,EAAE,cAAc;QACtB,GAAG,EAAE,IAAI;QACT,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,IAAI;QACX,cAAc,EAAE,CAAC,IAAA,qEAA+B,EAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;KAC1E,CAAC;AACJ,CAAC;AAXD,oCAWC"}
|