@storm-software/workspace-tools 1.203.0 → 1.204.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 +7 -0
- package/index.js +22 -18
- package/meta.json +178 -158
- package/package.json +1 -1
- package/src/base/base-executor.js +10 -12
- package/src/base/base-generator.js +10 -12
- package/src/base/index.js +14 -16
- 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 +10 -12
- package/src/executors/cargo-check/executor.js +10 -12
- package/src/executors/cargo-clippy/executor.js +10 -12
- package/src/executors/cargo-doc/executor.js +10 -12
- package/src/executors/cargo-format/executor.js +10 -12
- package/src/executors/clean-package/executor.js +10 -12
- package/src/executors/rolldown/executor.js +10 -12
- package/src/executors/rollup/executor.js +10 -12
- package/src/executors/size-limit/executor.js +10 -12
- package/src/executors/tsup/executor.js +10 -12
- package/src/executors/tsup-browser/executor.js +10 -12
- package/src/executors/tsup-neutral/executor.js +10 -12
- package/src/executors/tsup-node/executor.js +10 -12
- package/src/executors/typia/executor.js +10 -12
- package/src/executors/unbuild/executor.js +10 -12
- package/src/generators/browser-library/generator.d.ts +2 -1
- package/src/generators/browser-library/generator.js +16 -18
- package/src/generators/config-schema/generator.js +10 -12
- package/src/generators/neutral-library/generator.d.ts +2 -1
- package/src/generators/neutral-library/generator.js +16 -18
- package/src/generators/node-library/generator.d.ts +2 -1
- package/src/generators/node-library/generator.js +16 -18
- package/src/generators/preset/generator.js +10 -12
- package/src/generators/release-version/generator.js +10 -12
- package/src/plugins/rust/index.js +6 -0
- package/src/plugins/typescript/index.js +6 -0
- package/src/utils/index.js +16 -12
- package/src/utils/project-tags.js +6 -0
|
@@ -4075,7 +4075,7 @@ var init_schema = __esm({
|
|
|
4075
4075
|
worker: z.string().trim().default("Stormie-Bot").describe(
|
|
4076
4076
|
"The worker of the package (this is the bot that will be used to perform various tasks)"
|
|
4077
4077
|
),
|
|
4078
|
-
|
|
4078
|
+
envName: z.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment name for the package"),
|
|
4079
4079
|
workspaceRoot: z.string().trim().default("").describe("The root directory of the workspace"),
|
|
4080
4080
|
packageDirectory: z.string().trim().optional().describe("The root directory of the package"),
|
|
4081
4081
|
externalPackagePatterns: z.array(z.string()).default([]).describe(
|
|
@@ -66527,19 +66527,17 @@ var init_get_default_config = __esm({
|
|
|
66527
66527
|
}
|
|
66528
66528
|
};
|
|
66529
66529
|
DEFAULT_STORM_CONFIG = {
|
|
66530
|
-
name: "storm",
|
|
66531
66530
|
namespace: "storm-software",
|
|
66532
|
-
license: "Apache
|
|
66531
|
+
license: "Apache-2.0",
|
|
66533
66532
|
homepage: "https://stormsoftware.com",
|
|
66534
|
-
owner: "@storm-software/
|
|
66533
|
+
owner: "@storm-software/admin",
|
|
66535
66534
|
worker: "stormie-bot",
|
|
66536
66535
|
runtimeDirectory: "node_modules/.storm",
|
|
66537
|
-
cacheDirectory: "node_modules/.cache/storm",
|
|
66538
66536
|
skipCache: false,
|
|
66539
|
-
packageManager: "
|
|
66537
|
+
packageManager: "pnpm",
|
|
66540
66538
|
timezone: "America/New_York",
|
|
66541
66539
|
locale: "en-US",
|
|
66542
|
-
|
|
66540
|
+
envName: "production",
|
|
66543
66541
|
branch: "main",
|
|
66544
66542
|
organization: "storm-software",
|
|
66545
66543
|
configFile: null,
|
|
@@ -67039,7 +67037,7 @@ var init_get_env = __esm({
|
|
|
67039
67037
|
cacheDirectory: correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]),
|
|
67040
67038
|
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
67041
67039
|
outputDirectory: correctPaths(process.env[`${prefix}OUTPUT_DIRECTORY`]),
|
|
67042
|
-
|
|
67040
|
+
envName: process.env[`${prefix}ENV_NAME`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
67043
67041
|
// ci:
|
|
67044
67042
|
// process.env[`${prefix}CI`] !== undefined
|
|
67045
67043
|
// ? Boolean(
|
|
@@ -67268,10 +67266,10 @@ var init_set_env = __esm({
|
|
|
67268
67266
|
config.outputDirectory
|
|
67269
67267
|
);
|
|
67270
67268
|
}
|
|
67271
|
-
if (config.
|
|
67272
|
-
process.env[`${prefix}
|
|
67273
|
-
process.env.NODE_ENV = config.
|
|
67274
|
-
process.env.ENVIRONMENT = config.
|
|
67269
|
+
if (config.envName) {
|
|
67270
|
+
process.env[`${prefix}ENV_NAME`] = config.envName;
|
|
67271
|
+
process.env.NODE_ENV = config.envName;
|
|
67272
|
+
process.env.ENVIRONMENT = config.envName;
|
|
67275
67273
|
}
|
|
67276
67274
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
67277
67275
|
for (const key of Object.keys(config.colors)) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Tree } from "@nx/devkit";
|
|
2
|
+
import { StormConfig } from "@storm-software/config";
|
|
2
3
|
import { NeutralLibraryGeneratorSchema } from "./schema";
|
|
3
|
-
export declare function neutralLibraryGeneratorFn(tree: Tree, schema: NeutralLibraryGeneratorSchema): Promise<null>;
|
|
4
|
+
export declare function neutralLibraryGeneratorFn(tree: Tree, schema: NeutralLibraryGeneratorSchema, config?: StormConfig): Promise<null>;
|
|
4
5
|
declare const _default: (tree: Tree, _options: NeutralLibraryGeneratorSchema) => Promise<import("@nx/devkit").GeneratorCallback | import("../../../declarations.d").BaseGeneratorResult>;
|
|
5
6
|
export default _default;
|
|
@@ -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(
|
|
@@ -66527,19 +66527,17 @@ var init_get_default_config = __esm({
|
|
|
66527
66527
|
}
|
|
66528
66528
|
};
|
|
66529
66529
|
DEFAULT_STORM_CONFIG = {
|
|
66530
|
-
name: "storm",
|
|
66531
66530
|
namespace: "storm-software",
|
|
66532
|
-
license: "Apache
|
|
66531
|
+
license: "Apache-2.0",
|
|
66533
66532
|
homepage: "https://stormsoftware.com",
|
|
66534
|
-
owner: "@storm-software/
|
|
66533
|
+
owner: "@storm-software/admin",
|
|
66535
66534
|
worker: "stormie-bot",
|
|
66536
66535
|
runtimeDirectory: "node_modules/.storm",
|
|
66537
|
-
cacheDirectory: "node_modules/.cache/storm",
|
|
66538
66536
|
skipCache: false,
|
|
66539
|
-
packageManager: "
|
|
66537
|
+
packageManager: "pnpm",
|
|
66540
66538
|
timezone: "America/New_York",
|
|
66541
66539
|
locale: "en-US",
|
|
66542
|
-
|
|
66540
|
+
envName: "production",
|
|
66543
66541
|
branch: "main",
|
|
66544
66542
|
organization: "storm-software",
|
|
66545
66543
|
configFile: null,
|
|
@@ -67039,7 +67037,7 @@ var init_get_env = __esm({
|
|
|
67039
67037
|
cacheDirectory: correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]),
|
|
67040
67038
|
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
67041
67039
|
outputDirectory: correctPaths(process.env[`${prefix}OUTPUT_DIRECTORY`]),
|
|
67042
|
-
|
|
67040
|
+
envName: process.env[`${prefix}ENV_NAME`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
67043
67041
|
// ci:
|
|
67044
67042
|
// process.env[`${prefix}CI`] !== undefined
|
|
67045
67043
|
// ? Boolean(
|
|
@@ -67268,10 +67266,10 @@ var init_set_env = __esm({
|
|
|
67268
67266
|
config.outputDirectory
|
|
67269
67267
|
);
|
|
67270
67268
|
}
|
|
67271
|
-
if (config.
|
|
67272
|
-
process.env[`${prefix}
|
|
67273
|
-
process.env.NODE_ENV = config.
|
|
67274
|
-
process.env.ENVIRONMENT = config.
|
|
67269
|
+
if (config.envName) {
|
|
67270
|
+
process.env[`${prefix}ENV_NAME`] = config.envName;
|
|
67271
|
+
process.env.NODE_ENV = config.envName;
|
|
67272
|
+
process.env.ENVIRONMENT = config.envName;
|
|
67275
67273
|
}
|
|
67276
67274
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
67277
67275
|
for (const key of Object.keys(config.colors)) {
|
|
@@ -67781,7 +67779,7 @@ var addProjectTag = (project, variant, value2, options = {
|
|
|
67781
67779
|
var nxVersion = "^18.0.4";
|
|
67782
67780
|
|
|
67783
67781
|
// packages/workspace-tools/src/base/typescript-library-generator.ts
|
|
67784
|
-
async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
67782
|
+
async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
67785
67783
|
const options = await normalizeOptions(tree, { ...schema });
|
|
67786
67784
|
const tasks = [];
|
|
67787
67785
|
tasks.push(
|
|
@@ -67852,15 +67850,15 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
67852
67850
|
projectConfig,
|
|
67853
67851
|
ProjectTagConstants.Platform.TAG_ID,
|
|
67854
67852
|
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,
|
|
67855
|
-
{ overwrite:
|
|
67853
|
+
{ overwrite: false }
|
|
67856
67854
|
);
|
|
67857
67855
|
createProjectTsConfigJson(tree, options);
|
|
67858
67856
|
(0, import_devkit.addProjectConfiguration)(tree, options.name, projectConfig);
|
|
67859
67857
|
let repository = {
|
|
67860
67858
|
type: "github",
|
|
67861
|
-
url:
|
|
67859
|
+
url: config?.repository || `https://github.com/${config?.organization || "storm-software"}/${config?.namespace || config?.name || "repository"}.git`
|
|
67862
67860
|
};
|
|
67863
|
-
let description = schema.description
|
|
67861
|
+
let description = schema.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
67864
67862
|
if (tree.exists("package.json")) {
|
|
67865
67863
|
const packageJson = (0, import_devkit.readJson)(tree, "package.json");
|
|
67866
67864
|
if (packageJson?.repository) {
|
|
@@ -68067,7 +68065,7 @@ async function normalizeOptions(tree, options) {
|
|
|
68067
68065
|
}
|
|
68068
68066
|
|
|
68069
68067
|
// packages/workspace-tools/src/generators/neutral-library/generator.ts
|
|
68070
|
-
async function neutralLibraryGeneratorFn(tree, schema) {
|
|
68068
|
+
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
68071
68069
|
const filesDir = (0, import_devkit2.joinPathFragments)(__dirname, "./files");
|
|
68072
68070
|
const tsLibraryGeneratorOptions = {
|
|
68073
68071
|
...schema,
|
|
@@ -68095,7 +68093,7 @@ async function neutralLibraryGeneratorFn(tree, schema) {
|
|
|
68095
68093
|
buildable: options.bundler && options.bundler !== "none",
|
|
68096
68094
|
hasUnitTestRunner: options.unitTestRunner !== "none"
|
|
68097
68095
|
});
|
|
68098
|
-
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions);
|
|
68096
|
+
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions, config);
|
|
68099
68097
|
await (0, import_devkit2.formatFiles)(tree);
|
|
68100
68098
|
return null;
|
|
68101
68099
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Tree } from "@nx/devkit";
|
|
2
|
+
import { StormConfig } from "@storm-software/config";
|
|
2
3
|
import type { NodeLibraryGeneratorSchema } from "./schema";
|
|
3
|
-
export declare function nodeLibraryGeneratorFn(tree: Tree, schema: NodeLibraryGeneratorSchema): Promise<null>;
|
|
4
|
+
export declare function nodeLibraryGeneratorFn(tree: Tree, schema: NodeLibraryGeneratorSchema, config?: StormConfig): Promise<null>;
|
|
4
5
|
declare const _default: (tree: Tree, _options: NodeLibraryGeneratorSchema) => Promise<import("@nx/devkit").GeneratorCallback | import("../../../declarations.d").BaseGeneratorResult>;
|
|
5
6
|
export default _default;
|
|
@@ -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(
|
|
@@ -66527,19 +66527,17 @@ var init_get_default_config = __esm({
|
|
|
66527
66527
|
}
|
|
66528
66528
|
};
|
|
66529
66529
|
DEFAULT_STORM_CONFIG = {
|
|
66530
|
-
name: "storm",
|
|
66531
66530
|
namespace: "storm-software",
|
|
66532
|
-
license: "Apache
|
|
66531
|
+
license: "Apache-2.0",
|
|
66533
66532
|
homepage: "https://stormsoftware.com",
|
|
66534
|
-
owner: "@storm-software/
|
|
66533
|
+
owner: "@storm-software/admin",
|
|
66535
66534
|
worker: "stormie-bot",
|
|
66536
66535
|
runtimeDirectory: "node_modules/.storm",
|
|
66537
|
-
cacheDirectory: "node_modules/.cache/storm",
|
|
66538
66536
|
skipCache: false,
|
|
66539
|
-
packageManager: "
|
|
66537
|
+
packageManager: "pnpm",
|
|
66540
66538
|
timezone: "America/New_York",
|
|
66541
66539
|
locale: "en-US",
|
|
66542
|
-
|
|
66540
|
+
envName: "production",
|
|
66543
66541
|
branch: "main",
|
|
66544
66542
|
organization: "storm-software",
|
|
66545
66543
|
configFile: null,
|
|
@@ -67039,7 +67037,7 @@ var init_get_env = __esm({
|
|
|
67039
67037
|
cacheDirectory: correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]),
|
|
67040
67038
|
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
67041
67039
|
outputDirectory: correctPaths(process.env[`${prefix}OUTPUT_DIRECTORY`]),
|
|
67042
|
-
|
|
67040
|
+
envName: process.env[`${prefix}ENV_NAME`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
67043
67041
|
// ci:
|
|
67044
67042
|
// process.env[`${prefix}CI`] !== undefined
|
|
67045
67043
|
// ? Boolean(
|
|
@@ -67268,10 +67266,10 @@ var init_set_env = __esm({
|
|
|
67268
67266
|
config.outputDirectory
|
|
67269
67267
|
);
|
|
67270
67268
|
}
|
|
67271
|
-
if (config.
|
|
67272
|
-
process.env[`${prefix}
|
|
67273
|
-
process.env.NODE_ENV = config.
|
|
67274
|
-
process.env.ENVIRONMENT = config.
|
|
67269
|
+
if (config.envName) {
|
|
67270
|
+
process.env[`${prefix}ENV_NAME`] = config.envName;
|
|
67271
|
+
process.env.NODE_ENV = config.envName;
|
|
67272
|
+
process.env.ENVIRONMENT = config.envName;
|
|
67275
67273
|
}
|
|
67276
67274
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
67277
67275
|
for (const key of Object.keys(config.colors)) {
|
|
@@ -67782,7 +67780,7 @@ var typesNodeVersion = "20.9.0";
|
|
|
67782
67780
|
var nxVersion = "^18.0.4";
|
|
67783
67781
|
|
|
67784
67782
|
// packages/workspace-tools/src/base/typescript-library-generator.ts
|
|
67785
|
-
async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
67783
|
+
async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
67786
67784
|
const options = await normalizeOptions(tree, { ...schema });
|
|
67787
67785
|
const tasks = [];
|
|
67788
67786
|
tasks.push(
|
|
@@ -67853,15 +67851,15 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
67853
67851
|
projectConfig,
|
|
67854
67852
|
ProjectTagConstants.Platform.TAG_ID,
|
|
67855
67853
|
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,
|
|
67856
|
-
{ overwrite:
|
|
67854
|
+
{ overwrite: false }
|
|
67857
67855
|
);
|
|
67858
67856
|
createProjectTsConfigJson(tree, options);
|
|
67859
67857
|
(0, import_devkit.addProjectConfiguration)(tree, options.name, projectConfig);
|
|
67860
67858
|
let repository = {
|
|
67861
67859
|
type: "github",
|
|
67862
|
-
url:
|
|
67860
|
+
url: config?.repository || `https://github.com/${config?.organization || "storm-software"}/${config?.namespace || config?.name || "repository"}.git`
|
|
67863
67861
|
};
|
|
67864
|
-
let description = schema.description
|
|
67862
|
+
let description = schema.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
67865
67863
|
if (tree.exists("package.json")) {
|
|
67866
67864
|
const packageJson = (0, import_devkit.readJson)(tree, "package.json");
|
|
67867
67865
|
if (packageJson?.repository) {
|
|
@@ -68068,7 +68066,7 @@ async function normalizeOptions(tree, options) {
|
|
|
68068
68066
|
}
|
|
68069
68067
|
|
|
68070
68068
|
// packages/workspace-tools/src/generators/node-library/generator.ts
|
|
68071
|
-
async function nodeLibraryGeneratorFn(tree, schema) {
|
|
68069
|
+
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
68072
68070
|
const filesDir = (0, import_devkit2.joinPathFragments)(__dirname, "./files");
|
|
68073
68071
|
const tsLibraryGeneratorOptions = {
|
|
68074
68072
|
...schema,
|
|
@@ -68098,7 +68096,7 @@ async function nodeLibraryGeneratorFn(tree, schema) {
|
|
|
68098
68096
|
buildable: options.bundler && options.bundler !== "none",
|
|
68099
68097
|
hasUnitTestRunner: options.unitTestRunner !== "none"
|
|
68100
68098
|
});
|
|
68101
|
-
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions);
|
|
68099
|
+
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions, config);
|
|
68102
68100
|
await (0, import_devkit2.formatFiles)(tree);
|
|
68103
68101
|
return null;
|
|
68104
68102
|
}
|
|
@@ -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(
|
|
@@ -66527,19 +66527,17 @@ var init_get_default_config = __esm({
|
|
|
66527
66527
|
}
|
|
66528
66528
|
};
|
|
66529
66529
|
DEFAULT_STORM_CONFIG = {
|
|
66530
|
-
name: "storm",
|
|
66531
66530
|
namespace: "storm-software",
|
|
66532
|
-
license: "Apache
|
|
66531
|
+
license: "Apache-2.0",
|
|
66533
66532
|
homepage: "https://stormsoftware.com",
|
|
66534
|
-
owner: "@storm-software/
|
|
66533
|
+
owner: "@storm-software/admin",
|
|
66535
66534
|
worker: "stormie-bot",
|
|
66536
66535
|
runtimeDirectory: "node_modules/.storm",
|
|
66537
|
-
cacheDirectory: "node_modules/.cache/storm",
|
|
66538
66536
|
skipCache: false,
|
|
66539
|
-
packageManager: "
|
|
66537
|
+
packageManager: "pnpm",
|
|
66540
66538
|
timezone: "America/New_York",
|
|
66541
66539
|
locale: "en-US",
|
|
66542
|
-
|
|
66540
|
+
envName: "production",
|
|
66543
66541
|
branch: "main",
|
|
66544
66542
|
organization: "storm-software",
|
|
66545
66543
|
configFile: null,
|
|
@@ -67039,7 +67037,7 @@ var init_get_env = __esm({
|
|
|
67039
67037
|
cacheDirectory: correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]),
|
|
67040
67038
|
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
67041
67039
|
outputDirectory: correctPaths(process.env[`${prefix}OUTPUT_DIRECTORY`]),
|
|
67042
|
-
|
|
67040
|
+
envName: process.env[`${prefix}ENV_NAME`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
67043
67041
|
// ci:
|
|
67044
67042
|
// process.env[`${prefix}CI`] !== undefined
|
|
67045
67043
|
// ? Boolean(
|
|
@@ -67268,10 +67266,10 @@ var init_set_env = __esm({
|
|
|
67268
67266
|
config.outputDirectory
|
|
67269
67267
|
);
|
|
67270
67268
|
}
|
|
67271
|
-
if (config.
|
|
67272
|
-
process.env[`${prefix}
|
|
67273
|
-
process.env.NODE_ENV = config.
|
|
67274
|
-
process.env.ENVIRONMENT = config.
|
|
67269
|
+
if (config.envName) {
|
|
67270
|
+
process.env[`${prefix}ENV_NAME`] = config.envName;
|
|
67271
|
+
process.env.NODE_ENV = config.envName;
|
|
67272
|
+
process.env.ENVIRONMENT = config.envName;
|
|
67275
67273
|
}
|
|
67276
67274
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
67277
67275
|
for (const key of Object.keys(config.colors)) {
|
|
@@ -68229,7 +68229,7 @@ var init_schema = __esm({
|
|
|
68229
68229
|
worker: z3.string().trim().default("Stormie-Bot").describe(
|
|
68230
68230
|
"The worker of the package (this is the bot that will be used to perform various tasks)"
|
|
68231
68231
|
),
|
|
68232
|
-
|
|
68232
|
+
envName: z3.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment name for the package"),
|
|
68233
68233
|
workspaceRoot: z3.string().trim().default("").describe("The root directory of the workspace"),
|
|
68234
68234
|
packageDirectory: z3.string().trim().optional().describe("The root directory of the package"),
|
|
68235
68235
|
externalPackagePatterns: z3.array(z3.string()).default([]).describe(
|
|
@@ -68351,19 +68351,17 @@ var init_get_default_config = __esm({
|
|
|
68351
68351
|
}
|
|
68352
68352
|
};
|
|
68353
68353
|
DEFAULT_STORM_CONFIG = {
|
|
68354
|
-
name: "storm",
|
|
68355
68354
|
namespace: "storm-software",
|
|
68356
|
-
license: "Apache
|
|
68355
|
+
license: "Apache-2.0",
|
|
68357
68356
|
homepage: "https://stormsoftware.com",
|
|
68358
|
-
owner: "@storm-software/
|
|
68357
|
+
owner: "@storm-software/admin",
|
|
68359
68358
|
worker: "stormie-bot",
|
|
68360
68359
|
runtimeDirectory: "node_modules/.storm",
|
|
68361
|
-
cacheDirectory: "node_modules/.cache/storm",
|
|
68362
68360
|
skipCache: false,
|
|
68363
|
-
packageManager: "
|
|
68361
|
+
packageManager: "pnpm",
|
|
68364
68362
|
timezone: "America/New_York",
|
|
68365
68363
|
locale: "en-US",
|
|
68366
|
-
|
|
68364
|
+
envName: "production",
|
|
68367
68365
|
branch: "main",
|
|
68368
68366
|
organization: "storm-software",
|
|
68369
68367
|
configFile: null,
|
|
@@ -68863,7 +68861,7 @@ var init_get_env = __esm({
|
|
|
68863
68861
|
cacheDirectory: correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]),
|
|
68864
68862
|
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
68865
68863
|
outputDirectory: correctPaths(process.env[`${prefix}OUTPUT_DIRECTORY`]),
|
|
68866
|
-
|
|
68864
|
+
envName: process.env[`${prefix}ENV_NAME`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
68867
68865
|
// ci:
|
|
68868
68866
|
// process.env[`${prefix}CI`] !== undefined
|
|
68869
68867
|
// ? Boolean(
|
|
@@ -69092,10 +69090,10 @@ var init_set_env = __esm({
|
|
|
69092
69090
|
config.outputDirectory
|
|
69093
69091
|
);
|
|
69094
69092
|
}
|
|
69095
|
-
if (config.
|
|
69096
|
-
process.env[`${prefix}
|
|
69097
|
-
process.env.NODE_ENV = config.
|
|
69098
|
-
process.env.ENVIRONMENT = config.
|
|
69093
|
+
if (config.envName) {
|
|
69094
|
+
process.env[`${prefix}ENV_NAME`] = config.envName;
|
|
69095
|
+
process.env.NODE_ENV = config.envName;
|
|
69096
|
+
process.env.ENVIRONMENT = config.envName;
|
|
69099
69097
|
}
|
|
69100
69098
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
69101
69099
|
for (const key of Object.keys(config.colors)) {
|
|
@@ -151,6 +151,12 @@ var setDefaultProjectTags = (project) => {
|
|
|
151
151
|
project.targets && Object.keys(project.targets).includes("clean-package") ? ProjectTagConstants.DistStyle.CLEAN : ProjectTagConstants.DistStyle.NORMAL,
|
|
152
152
|
{ overwrite: true }
|
|
153
153
|
);
|
|
154
|
+
addProjectTag(
|
|
155
|
+
project,
|
|
156
|
+
ProjectTagConstants.Platform.TAG_ID,
|
|
157
|
+
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,
|
|
158
|
+
{ overwrite: false }
|
|
159
|
+
);
|
|
154
160
|
};
|
|
155
161
|
|
|
156
162
|
// packages/workspace-tools/src/plugins/rust/cargo-toml.ts
|
|
@@ -114,6 +114,12 @@ var setDefaultProjectTags = (project) => {
|
|
|
114
114
|
project.targets && Object.keys(project.targets).includes("clean-package") ? ProjectTagConstants.DistStyle.CLEAN : ProjectTagConstants.DistStyle.NORMAL,
|
|
115
115
|
{ overwrite: true }
|
|
116
116
|
);
|
|
117
|
+
addProjectTag(
|
|
118
|
+
project,
|
|
119
|
+
ProjectTagConstants.Platform.TAG_ID,
|
|
120
|
+
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,
|
|
121
|
+
{ overwrite: false }
|
|
122
|
+
);
|
|
117
123
|
};
|
|
118
124
|
|
|
119
125
|
// packages/workspace-tools/src/plugins/typescript/project-config.ts
|
package/src/utils/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(
|
|
@@ -66527,19 +66527,17 @@ var init_get_default_config = __esm({
|
|
|
66527
66527
|
}
|
|
66528
66528
|
};
|
|
66529
66529
|
DEFAULT_STORM_CONFIG = {
|
|
66530
|
-
name: "storm",
|
|
66531
66530
|
namespace: "storm-software",
|
|
66532
|
-
license: "Apache
|
|
66531
|
+
license: "Apache-2.0",
|
|
66533
66532
|
homepage: "https://stormsoftware.com",
|
|
66534
|
-
owner: "@storm-software/
|
|
66533
|
+
owner: "@storm-software/admin",
|
|
66535
66534
|
worker: "stormie-bot",
|
|
66536
66535
|
runtimeDirectory: "node_modules/.storm",
|
|
66537
|
-
cacheDirectory: "node_modules/.cache/storm",
|
|
66538
66536
|
skipCache: false,
|
|
66539
|
-
packageManager: "
|
|
66537
|
+
packageManager: "pnpm",
|
|
66540
66538
|
timezone: "America/New_York",
|
|
66541
66539
|
locale: "en-US",
|
|
66542
|
-
|
|
66540
|
+
envName: "production",
|
|
66543
66541
|
branch: "main",
|
|
66544
66542
|
organization: "storm-software",
|
|
66545
66543
|
configFile: null,
|
|
@@ -67039,7 +67037,7 @@ var init_get_env = __esm({
|
|
|
67039
67037
|
cacheDirectory: correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]),
|
|
67040
67038
|
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
67041
67039
|
outputDirectory: correctPaths(process.env[`${prefix}OUTPUT_DIRECTORY`]),
|
|
67042
|
-
|
|
67040
|
+
envName: process.env[`${prefix}ENV_NAME`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
67043
67041
|
// ci:
|
|
67044
67042
|
// process.env[`${prefix}CI`] !== undefined
|
|
67045
67043
|
// ? Boolean(
|
|
@@ -67268,10 +67266,10 @@ var init_set_env = __esm({
|
|
|
67268
67266
|
config.outputDirectory
|
|
67269
67267
|
);
|
|
67270
67268
|
}
|
|
67271
|
-
if (config.
|
|
67272
|
-
process.env[`${prefix}
|
|
67273
|
-
process.env.NODE_ENV = config.
|
|
67274
|
-
process.env.ENVIRONMENT = config.
|
|
67269
|
+
if (config.envName) {
|
|
67270
|
+
process.env[`${prefix}ENV_NAME`] = config.envName;
|
|
67271
|
+
process.env.NODE_ENV = config.envName;
|
|
67272
|
+
process.env.ENVIRONMENT = config.envName;
|
|
67275
67273
|
}
|
|
67276
67274
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
67277
67275
|
for (const key of Object.keys(config.colors)) {
|
|
@@ -91307,6 +91305,12 @@ var setDefaultProjectTags = (project) => {
|
|
|
91307
91305
|
project.targets && Object.keys(project.targets).includes("clean-package") ? ProjectTagConstants.DistStyle.CLEAN : ProjectTagConstants.DistStyle.NORMAL,
|
|
91308
91306
|
{ overwrite: true }
|
|
91309
91307
|
);
|
|
91308
|
+
addProjectTag(
|
|
91309
|
+
project,
|
|
91310
|
+
ProjectTagConstants.Platform.TAG_ID,
|
|
91311
|
+
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,
|
|
91312
|
+
{ overwrite: false }
|
|
91313
|
+
);
|
|
91310
91314
|
};
|
|
91311
91315
|
|
|
91312
91316
|
// node_modules/.pnpm/@ltd+j-toml@1.38.0/node_modules/@ltd/j-toml/index.mjs
|
|
@@ -110,6 +110,12 @@ var setDefaultProjectTags = (project) => {
|
|
|
110
110
|
project.targets && Object.keys(project.targets).includes("clean-package") ? ProjectTagConstants.DistStyle.CLEAN : ProjectTagConstants.DistStyle.NORMAL,
|
|
111
111
|
{ overwrite: true }
|
|
112
112
|
);
|
|
113
|
+
addProjectTag(
|
|
114
|
+
project,
|
|
115
|
+
ProjectTagConstants.Platform.TAG_ID,
|
|
116
|
+
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,
|
|
117
|
+
{ overwrite: false }
|
|
118
|
+
);
|
|
113
119
|
};
|
|
114
120
|
// Annotate the CommonJS export names for ESM import in node:
|
|
115
121
|
0 && (module.exports = {
|