@storm-software/workspace-tools 1.203.0 → 1.205.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 +14 -0
- package/index.js +25 -19
- package/meta.json +178 -158
- package/package.json +1 -1
- package/src/base/base-executor.js +13 -13
- package/src/base/base-generator.js +13 -13
- package/src/base/index.js +17 -17
- package/src/base/typescript-library-generator.d.ts +2 -1
- package/src/base/typescript-library-generator.js +4 -4
- package/src/executors/cargo-build/executor.js +13 -13
- package/src/executors/cargo-check/executor.js +13 -13
- package/src/executors/cargo-clippy/executor.js +13 -13
- package/src/executors/cargo-doc/executor.js +13 -13
- package/src/executors/cargo-format/executor.js +13 -13
- package/src/executors/clean-package/executor.js +13 -13
- package/src/executors/rolldown/executor.js +13 -13
- package/src/executors/rollup/executor.js +13 -13
- package/src/executors/size-limit/executor.js +13 -13
- package/src/executors/tsup/executor.js +13 -13
- package/src/executors/tsup-browser/executor.js +13 -13
- package/src/executors/tsup-neutral/executor.js +13 -13
- package/src/executors/tsup-node/executor.js +13 -13
- package/src/executors/typia/executor.js +13 -13
- package/src/executors/unbuild/executor.js +13 -13
- package/src/generators/browser-library/generator.d.ts +2 -1
- package/src/generators/browser-library/generator.js +19 -19
- package/src/generators/config-schema/generator.js +13 -13
- package/src/generators/neutral-library/generator.d.ts +2 -1
- package/src/generators/neutral-library/generator.js +19 -19
- package/src/generators/node-library/generator.d.ts +2 -1
- package/src/generators/node-library/generator.js +19 -19
- package/src/generators/preset/generator.js +13 -13
- package/src/generators/release-version/generator.js +13 -13
- package/src/plugins/rust/index.js +6 -0
- package/src/plugins/typescript/index.js +6 -0
- package/src/utils/index.js +19 -13
- package/src/utils/project-tags.js +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 1.205.0 (2024-12-19)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- **workspace-tools:** Added `platform` tag to the TypeScript Nx plugin
|
|
6
|
+
([f6911898](https://github.com/storm-software/storm-ops/commit/f6911898))
|
|
7
|
+
|
|
8
|
+
## 1.204.0 (2024-12-19)
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
- **workspace-tools:** Added `platform` to unbuild schema and project tags
|
|
13
|
+
([bfbe9dee](https://github.com/storm-software/storm-ops/commit/bfbe9dee))
|
|
14
|
+
|
|
1
15
|
## 1.203.0 (2024-12-19)
|
|
2
16
|
|
|
3
17
|
### Features
|
package/index.js
CHANGED
|
@@ -66405,7 +66405,7 @@ var init_schema = __esm({
|
|
|
66405
66405
|
worker: z3.string().trim().default("Stormie-Bot").describe(
|
|
66406
66406
|
"The worker of the package (this is the bot that will be used to perform various tasks)"
|
|
66407
66407
|
),
|
|
66408
|
-
|
|
66408
|
+
envName: z3.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment name for the package"),
|
|
66409
66409
|
workspaceRoot: z3.string().trim().default("").describe("The root directory of the workspace"),
|
|
66410
66410
|
packageDirectory: z3.string().trim().optional().describe("The root directory of the package"),
|
|
66411
66411
|
externalPackagePatterns: z3.array(z3.string()).default([]).describe(
|
|
@@ -66426,7 +66426,9 @@ var init_schema = __esm({
|
|
|
66426
66426
|
runtimeVersion: z3.string().trim().regex(
|
|
66427
66427
|
/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
|
|
66428
66428
|
).default("1.0.0").describe("The global version of the Storm runtime"),
|
|
66429
|
-
packageManager: z3.enum(["npm", "yarn", "pnpm", "bun"]).default("
|
|
66429
|
+
packageManager: z3.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
|
|
66430
|
+
"The JavaScript/TypeScript package manager used by the repository"
|
|
66431
|
+
),
|
|
66430
66432
|
timezone: z3.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
66431
66433
|
locale: z3.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
66432
66434
|
logLevel: z3.enum([
|
|
@@ -66527,19 +66529,17 @@ var init_get_default_config = __esm({
|
|
|
66527
66529
|
}
|
|
66528
66530
|
};
|
|
66529
66531
|
DEFAULT_STORM_CONFIG = {
|
|
66530
|
-
name: "storm",
|
|
66531
66532
|
namespace: "storm-software",
|
|
66532
|
-
license: "Apache
|
|
66533
|
+
license: "Apache-2.0",
|
|
66533
66534
|
homepage: "https://stormsoftware.com",
|
|
66534
|
-
owner: "@storm-software/
|
|
66535
|
+
owner: "@storm-software/admin",
|
|
66535
66536
|
worker: "stormie-bot",
|
|
66536
66537
|
runtimeDirectory: "node_modules/.storm",
|
|
66537
|
-
cacheDirectory: "node_modules/.cache/storm",
|
|
66538
66538
|
skipCache: false,
|
|
66539
|
-
packageManager: "
|
|
66539
|
+
packageManager: "pnpm",
|
|
66540
66540
|
timezone: "America/New_York",
|
|
66541
66541
|
locale: "en-US",
|
|
66542
|
-
|
|
66542
|
+
envName: "production",
|
|
66543
66543
|
branch: "main",
|
|
66544
66544
|
organization: "storm-software",
|
|
66545
66545
|
configFile: null,
|
|
@@ -67039,7 +67039,7 @@ var init_get_env = __esm({
|
|
|
67039
67039
|
cacheDirectory: correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]),
|
|
67040
67040
|
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
67041
67041
|
outputDirectory: correctPaths(process.env[`${prefix}OUTPUT_DIRECTORY`]),
|
|
67042
|
-
|
|
67042
|
+
envName: process.env[`${prefix}ENV_NAME`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
67043
67043
|
// ci:
|
|
67044
67044
|
// process.env[`${prefix}CI`] !== undefined
|
|
67045
67045
|
// ? Boolean(
|
|
@@ -67268,10 +67268,10 @@ var init_set_env = __esm({
|
|
|
67268
67268
|
config.outputDirectory
|
|
67269
67269
|
);
|
|
67270
67270
|
}
|
|
67271
|
-
if (config.
|
|
67272
|
-
process.env[`${prefix}
|
|
67273
|
-
process.env.NODE_ENV = config.
|
|
67274
|
-
process.env.ENVIRONMENT = config.
|
|
67271
|
+
if (config.envName) {
|
|
67272
|
+
process.env[`${prefix}ENV_NAME`] = config.envName;
|
|
67273
|
+
process.env.NODE_ENV = config.envName;
|
|
67274
|
+
process.env.ENVIRONMENT = config.envName;
|
|
67275
67275
|
}
|
|
67276
67276
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
67277
67277
|
for (const key of Object.keys(config.colors)) {
|
|
@@ -221170,6 +221170,12 @@ var setDefaultProjectTags = (project) => {
|
|
|
221170
221170
|
project.targets && Object.keys(project.targets).includes("clean-package") ? ProjectTagConstants.DistStyle.CLEAN : ProjectTagConstants.DistStyle.NORMAL,
|
|
221171
221171
|
{ overwrite: true }
|
|
221172
221172
|
);
|
|
221173
|
+
addProjectTag(
|
|
221174
|
+
project,
|
|
221175
|
+
ProjectTagConstants.Platform.TAG_ID,
|
|
221176
|
+
project.targets?.build?.options.platform === "node" ? ProjectTagConstants.Platform.NODE : project.targets?.build?.options.platform === "worker" ? ProjectTagConstants.Platform.WORKER : project.targets?.build?.options.platform === "browser" ? ProjectTagConstants.Platform.BROWSER : ProjectTagConstants.Platform.NEUTRAL,
|
|
221177
|
+
{ overwrite: false }
|
|
221178
|
+
);
|
|
221173
221179
|
};
|
|
221174
221180
|
|
|
221175
221181
|
// packages/workspace-tools/src/utils/versions.ts
|
|
@@ -221193,7 +221199,7 @@ var nodeVersion = "20.11.0";
|
|
|
221193
221199
|
var pnpmVersion = "8.10.2";
|
|
221194
221200
|
|
|
221195
221201
|
// packages/workspace-tools/src/base/typescript-library-generator.ts
|
|
221196
|
-
async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
221202
|
+
async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
221197
221203
|
const options = await normalizeOptions(tree, { ...schema });
|
|
221198
221204
|
const tasks = [];
|
|
221199
221205
|
tasks.push(
|
|
@@ -221264,15 +221270,15 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
221264
221270
|
projectConfig,
|
|
221265
221271
|
ProjectTagConstants.Platform.TAG_ID,
|
|
221266
221272
|
projectConfig.targets.build.options.platform === "node" ? ProjectTagConstants.Platform.NODE : projectConfig.targets.build.options.platform === "worker" ? ProjectTagConstants.Platform.WORKER : projectConfig.targets.build.options.platform === "browser" ? ProjectTagConstants.Platform.BROWSER : ProjectTagConstants.Platform.NEUTRAL,
|
|
221267
|
-
{ overwrite:
|
|
221273
|
+
{ overwrite: false }
|
|
221268
221274
|
);
|
|
221269
221275
|
createProjectTsConfigJson(tree, options);
|
|
221270
221276
|
(0, import_devkit.addProjectConfiguration)(tree, options.name, projectConfig);
|
|
221271
221277
|
let repository = {
|
|
221272
221278
|
type: "github",
|
|
221273
|
-
url:
|
|
221279
|
+
url: config?.repository || `https://github.com/${config?.organization || "storm-software"}/${config?.namespace || config?.name || "repository"}.git`
|
|
221274
221280
|
};
|
|
221275
|
-
let description = schema.description
|
|
221281
|
+
let description = schema.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
221276
221282
|
if (tree.exists("package.json")) {
|
|
221277
221283
|
const packageJson = (0, import_devkit.readJson)(tree, "package.json");
|
|
221278
221284
|
if (packageJson?.repository) {
|
|
@@ -235636,7 +235642,7 @@ async function initGenerator(tree, schema) {
|
|
|
235636
235642
|
|
|
235637
235643
|
// packages/workspace-tools/src/generators/node-library/generator.ts
|
|
235638
235644
|
var import_devkit11 = require("@nx/devkit");
|
|
235639
|
-
async function nodeLibraryGeneratorFn(tree, schema) {
|
|
235645
|
+
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
235640
235646
|
const filesDir = (0, import_devkit11.joinPathFragments)(__dirname, "./files");
|
|
235641
235647
|
const tsLibraryGeneratorOptions = {
|
|
235642
235648
|
...schema,
|
|
@@ -235666,7 +235672,7 @@ async function nodeLibraryGeneratorFn(tree, schema) {
|
|
|
235666
235672
|
buildable: options.bundler && options.bundler !== "none",
|
|
235667
235673
|
hasUnitTestRunner: options.unitTestRunner !== "none"
|
|
235668
235674
|
});
|
|
235669
|
-
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions);
|
|
235675
|
+
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions, config);
|
|
235670
235676
|
await (0, import_devkit11.formatFiles)(tree);
|
|
235671
235677
|
return null;
|
|
235672
235678
|
}
|