@storm-software/workspace-tools 1.201.3 → 1.202.1
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 +19 -95
- package/meta.json +70 -140
- package/package.json +1 -1
- package/src/base/base-executor.js +17 -4
- package/src/base/base-generator.js +17 -4
- package/src/base/index.js +18 -94
- package/src/base/typescript-library-generator.d.ts +1 -3
- package/src/base/typescript-library-generator.js +1 -90
- package/src/executors/cargo-build/executor.js +17 -4
- package/src/executors/cargo-check/executor.js +17 -4
- package/src/executors/cargo-clippy/executor.js +17 -4
- package/src/executors/cargo-doc/executor.js +17 -4
- package/src/executors/cargo-format/executor.js +17 -4
- package/src/executors/clean-package/executor.js +17 -4
- package/src/executors/rolldown/executor.js +17 -4
- package/src/executors/rollup/executor.js +17 -4
- package/src/executors/size-limit/executor.js +17 -4
- package/src/executors/tsup/executor.js +17 -4
- package/src/executors/tsup-browser/executor.js +17 -4
- package/src/executors/tsup-neutral/executor.js +17 -4
- package/src/executors/tsup-node/executor.js +17 -4
- package/src/executors/typia/executor.js +17 -4
- package/src/executors/unbuild/executor.js +17 -4
- package/src/generators/browser-library/generator.js +23 -97
- package/src/generators/config-schema/generator.js +17 -4
- package/src/generators/neutral-library/generator.js +19 -93
- package/src/generators/node-library/generator.js +19 -93
- package/src/generators/preset/generator.js +17 -4
- package/src/generators/release-version/generator.js +17 -4
- package/src/utils/index.js +17 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/workspace-tools",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.202.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "Tools for managing a Storm workspace, including various Nx generators and executors for common development tasks.",
|
|
6
6
|
"repository": {
|
|
@@ -66386,7 +66386,12 @@ var init_schema = __esm({
|
|
|
66386
66386
|
extends: z3.string().trim().optional().describe(
|
|
66387
66387
|
"The path to a base JSON file to use as a configuration preset file"
|
|
66388
66388
|
),
|
|
66389
|
-
|
|
66389
|
+
isRoot: z3.boolean().optional().describe(
|
|
66390
|
+
"A flag indicating if the current configuration is the set in the root of the workspace"
|
|
66391
|
+
),
|
|
66392
|
+
name: z3.string().trim().toLowerCase().optional().describe(
|
|
66393
|
+
"The name of the service/package/scope using this configuration"
|
|
66394
|
+
),
|
|
66390
66395
|
namespace: z3.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
66391
66396
|
organization: z3.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
66392
66397
|
repository: z3.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
@@ -66396,7 +66401,7 @@ var init_schema = __esm({
|
|
|
66396
66401
|
licensing: z3.string().trim().url().default(STORM_DEFAULT_LICENSING).describe("The base licensing site for the workspace"),
|
|
66397
66402
|
branch: z3.string().trim().default("main").describe("The branch of the workspace"),
|
|
66398
66403
|
preid: z3.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
66399
|
-
owner: z3.string().trim().default("@storm-software/
|
|
66404
|
+
owner: z3.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
66400
66405
|
worker: z3.string().trim().default("Stormie-Bot").describe(
|
|
66401
66406
|
"The worker of the package (this is the bot that will be used to perform various tasks)"
|
|
66402
66407
|
),
|
|
@@ -66407,7 +66412,15 @@ var init_schema = __esm({
|
|
|
66407
66412
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
66408
66413
|
),
|
|
66409
66414
|
skipCache: z3.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
66410
|
-
cacheDirectory: z3.string().trim().
|
|
66415
|
+
cacheDirectory: z3.string().trim().optional().describe(
|
|
66416
|
+
"The directory used to store the environment's cached file data"
|
|
66417
|
+
),
|
|
66418
|
+
dataDirectory: z3.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
66419
|
+
configDirectory: z3.string().trim().optional().describe(
|
|
66420
|
+
"The directory used to store the environment's configuration files"
|
|
66421
|
+
),
|
|
66422
|
+
tempDirectory: z3.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
66423
|
+
logDirectory: z3.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
66411
66424
|
buildDirectory: z3.string().trim().default("dist").describe("The build directory for the workspace"),
|
|
66412
66425
|
outputDirectory: z3.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
|
|
66413
66426
|
runtimeVersion: z3.string().trim().regex(
|
|
@@ -66425,7 +66438,7 @@ var init_schema = __esm({
|
|
|
66425
66438
|
"debug",
|
|
66426
66439
|
"trace",
|
|
66427
66440
|
"all"
|
|
66428
|
-
]).default("
|
|
66441
|
+
]).default("info").describe(
|
|
66429
66442
|
"The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
|
|
66430
66443
|
),
|
|
66431
66444
|
cloudflareAccountId: z3.string().trim().toLowerCase().length(32).regex(/^([0-9a-fA-F]{32})$/i).nullable().default(null).describe("The default Cloudflare account ID of the workspace"),
|
|
@@ -66386,7 +66386,12 @@ var init_schema = __esm({
|
|
|
66386
66386
|
extends: z3.string().trim().optional().describe(
|
|
66387
66387
|
"The path to a base JSON file to use as a configuration preset file"
|
|
66388
66388
|
),
|
|
66389
|
-
|
|
66389
|
+
isRoot: z3.boolean().optional().describe(
|
|
66390
|
+
"A flag indicating if the current configuration is the set in the root of the workspace"
|
|
66391
|
+
),
|
|
66392
|
+
name: z3.string().trim().toLowerCase().optional().describe(
|
|
66393
|
+
"The name of the service/package/scope using this configuration"
|
|
66394
|
+
),
|
|
66390
66395
|
namespace: z3.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
66391
66396
|
organization: z3.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
66392
66397
|
repository: z3.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
@@ -66396,7 +66401,7 @@ var init_schema = __esm({
|
|
|
66396
66401
|
licensing: z3.string().trim().url().default(STORM_DEFAULT_LICENSING).describe("The base licensing site for the workspace"),
|
|
66397
66402
|
branch: z3.string().trim().default("main").describe("The branch of the workspace"),
|
|
66398
66403
|
preid: z3.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
66399
|
-
owner: z3.string().trim().default("@storm-software/
|
|
66404
|
+
owner: z3.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
66400
66405
|
worker: z3.string().trim().default("Stormie-Bot").describe(
|
|
66401
66406
|
"The worker of the package (this is the bot that will be used to perform various tasks)"
|
|
66402
66407
|
),
|
|
@@ -66407,7 +66412,15 @@ var init_schema = __esm({
|
|
|
66407
66412
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
66408
66413
|
),
|
|
66409
66414
|
skipCache: z3.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
66410
|
-
cacheDirectory: z3.string().trim().
|
|
66415
|
+
cacheDirectory: z3.string().trim().optional().describe(
|
|
66416
|
+
"The directory used to store the environment's cached file data"
|
|
66417
|
+
),
|
|
66418
|
+
dataDirectory: z3.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
66419
|
+
configDirectory: z3.string().trim().optional().describe(
|
|
66420
|
+
"The directory used to store the environment's configuration files"
|
|
66421
|
+
),
|
|
66422
|
+
tempDirectory: z3.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
66423
|
+
logDirectory: z3.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
66411
66424
|
buildDirectory: z3.string().trim().default("dist").describe("The build directory for the workspace"),
|
|
66412
66425
|
outputDirectory: z3.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
|
|
66413
66426
|
runtimeVersion: z3.string().trim().regex(
|
|
@@ -66425,7 +66438,7 @@ var init_schema = __esm({
|
|
|
66425
66438
|
"debug",
|
|
66426
66439
|
"trace",
|
|
66427
66440
|
"all"
|
|
66428
|
-
]).default("
|
|
66441
|
+
]).default("info").describe(
|
|
66429
66442
|
"The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
|
|
66430
66443
|
),
|
|
66431
66444
|
cloudflareAccountId: z3.string().trim().toLowerCase().length(32).regex(/^([0-9a-fA-F]{32})$/i).nullable().default(null).describe("The default Cloudflare account ID of the workspace"),
|
package/src/base/index.js
CHANGED
|
@@ -66386,7 +66386,12 @@ var init_schema = __esm({
|
|
|
66386
66386
|
extends: z3.string().trim().optional().describe(
|
|
66387
66387
|
"The path to a base JSON file to use as a configuration preset file"
|
|
66388
66388
|
),
|
|
66389
|
-
|
|
66389
|
+
isRoot: z3.boolean().optional().describe(
|
|
66390
|
+
"A flag indicating if the current configuration is the set in the root of the workspace"
|
|
66391
|
+
),
|
|
66392
|
+
name: z3.string().trim().toLowerCase().optional().describe(
|
|
66393
|
+
"The name of the service/package/scope using this configuration"
|
|
66394
|
+
),
|
|
66390
66395
|
namespace: z3.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
66391
66396
|
organization: z3.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
66392
66397
|
repository: z3.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
@@ -66396,7 +66401,7 @@ var init_schema = __esm({
|
|
|
66396
66401
|
licensing: z3.string().trim().url().default(STORM_DEFAULT_LICENSING).describe("The base licensing site for the workspace"),
|
|
66397
66402
|
branch: z3.string().trim().default("main").describe("The branch of the workspace"),
|
|
66398
66403
|
preid: z3.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
66399
|
-
owner: z3.string().trim().default("@storm-software/
|
|
66404
|
+
owner: z3.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
66400
66405
|
worker: z3.string().trim().default("Stormie-Bot").describe(
|
|
66401
66406
|
"The worker of the package (this is the bot that will be used to perform various tasks)"
|
|
66402
66407
|
),
|
|
@@ -66407,7 +66412,15 @@ var init_schema = __esm({
|
|
|
66407
66412
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
66408
66413
|
),
|
|
66409
66414
|
skipCache: z3.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
66410
|
-
cacheDirectory: z3.string().trim().
|
|
66415
|
+
cacheDirectory: z3.string().trim().optional().describe(
|
|
66416
|
+
"The directory used to store the environment's cached file data"
|
|
66417
|
+
),
|
|
66418
|
+
dataDirectory: z3.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
66419
|
+
configDirectory: z3.string().trim().optional().describe(
|
|
66420
|
+
"The directory used to store the environment's configuration files"
|
|
66421
|
+
),
|
|
66422
|
+
tempDirectory: z3.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
66423
|
+
logDirectory: z3.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
66411
66424
|
buildDirectory: z3.string().trim().default("dist").describe("The build directory for the workspace"),
|
|
66412
66425
|
outputDirectory: z3.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
|
|
66413
66426
|
runtimeVersion: z3.string().trim().regex(
|
|
@@ -66425,7 +66438,7 @@ var init_schema = __esm({
|
|
|
66425
66438
|
"debug",
|
|
66426
66439
|
"trace",
|
|
66427
66440
|
"all"
|
|
66428
|
-
]).default("
|
|
66441
|
+
]).default("info").describe(
|
|
66429
66442
|
"The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
|
|
66430
66443
|
),
|
|
66431
66444
|
cloudflareAccountId: z3.string().trim().toLowerCase().length(32).regex(/^([0-9a-fA-F]{32})$/i).nullable().default(null).describe("The default Cloudflare account ID of the workspace"),
|
|
@@ -67598,7 +67611,6 @@ var init_src2 = __esm({
|
|
|
67598
67611
|
// packages/workspace-tools/src/base/index.ts
|
|
67599
67612
|
var base_exports = {};
|
|
67600
67613
|
__export(base_exports, {
|
|
67601
|
-
addLint: () => addLint,
|
|
67602
67614
|
createProjectTsConfigJson: () => createProjectTsConfigJson,
|
|
67603
67615
|
getOutputPath: () => getOutputPath,
|
|
67604
67616
|
normalizeOptions: () => normalizeOptions,
|
|
@@ -67980,7 +67992,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
67980
67992
|
type: "github",
|
|
67981
67993
|
url: "https://github.com/storm-software/storm-stack.git"
|
|
67982
67994
|
};
|
|
67983
|
-
let description = schema.description ?? "
|
|
67995
|
+
let description = schema.description ?? "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
67984
67996
|
if (tree.exists("package.json")) {
|
|
67985
67997
|
const packageJson = (0, import_devkit.readJson)(tree, "package.json");
|
|
67986
67998
|
if (packageJson?.repository) {
|
|
@@ -68089,96 +68101,9 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
68089
68101
|
exclude: ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
|
|
68090
68102
|
});
|
|
68091
68103
|
}
|
|
68092
|
-
const lintCallback = await addLint(tree, options);
|
|
68093
|
-
tasks.push(lintCallback);
|
|
68094
68104
|
await (0, import_devkit.formatFiles)(tree);
|
|
68095
68105
|
return null;
|
|
68096
68106
|
}
|
|
68097
|
-
async function addLint(tree, options) {
|
|
68098
|
-
const { lintProjectGenerator } = (0, import_devkit.ensurePackage)("@nx/eslint", nxVersion);
|
|
68099
|
-
const { mapLintPattern } = (
|
|
68100
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
68101
|
-
require("@nx/eslint/src/generators/lint-project/lint-project")
|
|
68102
|
-
);
|
|
68103
|
-
const projectConfiguration = (0, import_devkit.readProjectConfiguration)(tree, options.name);
|
|
68104
|
-
const task = lintProjectGenerator(tree, {
|
|
68105
|
-
project: options.name,
|
|
68106
|
-
linter: options.linter,
|
|
68107
|
-
skipFormat: true,
|
|
68108
|
-
tsConfigPaths: [(0, import_devkit.joinPathFragments)(options.projectRoot, "tsconfig.json")],
|
|
68109
|
-
unitTestRunner: options.unitTestRunner,
|
|
68110
|
-
eslintFilePatterns: [
|
|
68111
|
-
mapLintPattern(
|
|
68112
|
-
options.projectRoot,
|
|
68113
|
-
options.js ? "js" : "ts",
|
|
68114
|
-
options.rootProject
|
|
68115
|
-
)
|
|
68116
|
-
],
|
|
68117
|
-
setParserOptionsProject: options.setParserOptionsProject,
|
|
68118
|
-
rootProject: options.rootProject
|
|
68119
|
-
});
|
|
68120
|
-
const {
|
|
68121
|
-
addOverrideToLintConfig,
|
|
68122
|
-
lintConfigHasOverride,
|
|
68123
|
-
isEslintConfigSupported,
|
|
68124
|
-
updateOverrideInLintConfig
|
|
68125
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
68126
|
-
} = require("@nx/eslint/src/generators/utils/eslint-file");
|
|
68127
|
-
if (!isEslintConfigSupported(tree)) {
|
|
68128
|
-
return task;
|
|
68129
|
-
}
|
|
68130
|
-
addOverrideToLintConfig(tree, "", {
|
|
68131
|
-
files: ["*.json"],
|
|
68132
|
-
parser: "jsonc-eslint-parser",
|
|
68133
|
-
rules: {
|
|
68134
|
-
"@nx/dependency-checks": [
|
|
68135
|
-
"error",
|
|
68136
|
-
{
|
|
68137
|
-
"buildTargets": ["build"],
|
|
68138
|
-
"ignoredFiles": [
|
|
68139
|
-
"{projectRoot}/esbuild.config.{js,ts,mjs,mts}",
|
|
68140
|
-
"{projectRoot}/jest.config.ts"
|
|
68141
|
-
],
|
|
68142
|
-
"checkMissingDependencies": true,
|
|
68143
|
-
"checkObsoleteDependencies": true,
|
|
68144
|
-
"checkVersionMismatches": false
|
|
68145
|
-
}
|
|
68146
|
-
]
|
|
68147
|
-
}
|
|
68148
|
-
});
|
|
68149
|
-
if (lintConfigHasOverride(
|
|
68150
|
-
tree,
|
|
68151
|
-
projectConfiguration.root,
|
|
68152
|
-
(o) => Array.isArray(o.files) ? o.files.some((f2) => f2.match(/\.json$/)) : !!o.files?.match(/\.json$/),
|
|
68153
|
-
true
|
|
68154
|
-
)) {
|
|
68155
|
-
updateOverrideInLintConfig(
|
|
68156
|
-
tree,
|
|
68157
|
-
projectConfiguration.root,
|
|
68158
|
-
(o) => o.rules?.["@nx/dependency-checks"],
|
|
68159
|
-
(o) => {
|
|
68160
|
-
const value2 = o.rules["@nx/dependency-checks"];
|
|
68161
|
-
let ruleSeverity;
|
|
68162
|
-
let ruleOptions;
|
|
68163
|
-
if (Array.isArray(value2)) {
|
|
68164
|
-
ruleSeverity = value2[0];
|
|
68165
|
-
ruleOptions = value2[1];
|
|
68166
|
-
} else {
|
|
68167
|
-
ruleSeverity = value2 ?? "error";
|
|
68168
|
-
ruleOptions = {};
|
|
68169
|
-
}
|
|
68170
|
-
if (options.bundler === "esbuild") {
|
|
68171
|
-
ruleOptions.ignoredFiles = [
|
|
68172
|
-
"{projectRoot}/esbuild.config.{js,ts,mjs,mts}"
|
|
68173
|
-
];
|
|
68174
|
-
o.rules["@nx/dependency-checks"] = [ruleSeverity, ruleOptions];
|
|
68175
|
-
}
|
|
68176
|
-
return o;
|
|
68177
|
-
}
|
|
68178
|
-
);
|
|
68179
|
-
}
|
|
68180
|
-
return task;
|
|
68181
|
-
}
|
|
68182
68107
|
function getOutputPath(options) {
|
|
68183
68108
|
const parts = ["dist"];
|
|
68184
68109
|
if (options.projectRoot === ".") {
|
|
@@ -68274,7 +68199,6 @@ async function normalizeOptions(tree, options) {
|
|
|
68274
68199
|
}
|
|
68275
68200
|
// Annotate the CommonJS export names for ESM import in node:
|
|
68276
68201
|
0 && (module.exports = {
|
|
68277
|
-
addLint,
|
|
68278
68202
|
createProjectTsConfigJson,
|
|
68279
68203
|
getOutputPath,
|
|
68280
68204
|
normalizeOptions,
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type { AddLintOptions } from "@nx/js/src/generators/library/library";
|
|
1
|
+
import { type Tree } from "@nx/devkit";
|
|
3
2
|
import type { TypeScriptLibraryGeneratorNormalizedSchema, TypeScriptLibraryGeneratorSchema } from "../../declarations.d";
|
|
4
3
|
export declare function typeScriptLibraryGeneratorFn(tree: Tree, schema: TypeScriptLibraryGeneratorSchema): Promise<null>;
|
|
5
|
-
export declare function addLint(tree: Tree, options: AddLintOptions): Promise<GeneratorCallback>;
|
|
6
4
|
export declare function getOutputPath(options: TypeScriptLibraryGeneratorNormalizedSchema): string;
|
|
7
5
|
export declare function createProjectTsConfigJson(tree: Tree, options: TypeScriptLibraryGeneratorNormalizedSchema): void;
|
|
8
6
|
export declare function normalizeOptions(tree: Tree, options: TypeScriptLibraryGeneratorSchema): Promise<TypeScriptLibraryGeneratorNormalizedSchema>;
|
|
@@ -29,7 +29,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// packages/workspace-tools/src/base/typescript-library-generator.ts
|
|
30
30
|
var typescript_library_generator_exports = {};
|
|
31
31
|
__export(typescript_library_generator_exports, {
|
|
32
|
-
addLint: () => addLint,
|
|
33
32
|
createProjectTsConfigJson: () => createProjectTsConfigJson,
|
|
34
33
|
getOutputPath: () => getOutputPath,
|
|
35
34
|
normalizeOptions: () => normalizeOptions,
|
|
@@ -120,7 +119,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
120
119
|
type: "github",
|
|
121
120
|
url: "https://github.com/storm-software/storm-stack.git"
|
|
122
121
|
};
|
|
123
|
-
let description = schema.description ?? "
|
|
122
|
+
let description = schema.description ?? "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
124
123
|
if (tree.exists("package.json")) {
|
|
125
124
|
const packageJson = (0, import_devkit.readJson)(tree, "package.json");
|
|
126
125
|
if (packageJson?.repository) {
|
|
@@ -229,96 +228,9 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
229
228
|
exclude: ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
|
|
230
229
|
});
|
|
231
230
|
}
|
|
232
|
-
const lintCallback = await addLint(tree, options);
|
|
233
|
-
tasks.push(lintCallback);
|
|
234
231
|
await (0, import_devkit.formatFiles)(tree);
|
|
235
232
|
return null;
|
|
236
233
|
}
|
|
237
|
-
async function addLint(tree, options) {
|
|
238
|
-
const { lintProjectGenerator } = (0, import_devkit.ensurePackage)("@nx/eslint", nxVersion);
|
|
239
|
-
const { mapLintPattern } = (
|
|
240
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
241
|
-
require("@nx/eslint/src/generators/lint-project/lint-project")
|
|
242
|
-
);
|
|
243
|
-
const projectConfiguration = (0, import_devkit.readProjectConfiguration)(tree, options.name);
|
|
244
|
-
const task = lintProjectGenerator(tree, {
|
|
245
|
-
project: options.name,
|
|
246
|
-
linter: options.linter,
|
|
247
|
-
skipFormat: true,
|
|
248
|
-
tsConfigPaths: [(0, import_devkit.joinPathFragments)(options.projectRoot, "tsconfig.json")],
|
|
249
|
-
unitTestRunner: options.unitTestRunner,
|
|
250
|
-
eslintFilePatterns: [
|
|
251
|
-
mapLintPattern(
|
|
252
|
-
options.projectRoot,
|
|
253
|
-
options.js ? "js" : "ts",
|
|
254
|
-
options.rootProject
|
|
255
|
-
)
|
|
256
|
-
],
|
|
257
|
-
setParserOptionsProject: options.setParserOptionsProject,
|
|
258
|
-
rootProject: options.rootProject
|
|
259
|
-
});
|
|
260
|
-
const {
|
|
261
|
-
addOverrideToLintConfig,
|
|
262
|
-
lintConfigHasOverride,
|
|
263
|
-
isEslintConfigSupported,
|
|
264
|
-
updateOverrideInLintConfig
|
|
265
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
266
|
-
} = require("@nx/eslint/src/generators/utils/eslint-file");
|
|
267
|
-
if (!isEslintConfigSupported(tree)) {
|
|
268
|
-
return task;
|
|
269
|
-
}
|
|
270
|
-
addOverrideToLintConfig(tree, "", {
|
|
271
|
-
files: ["*.json"],
|
|
272
|
-
parser: "jsonc-eslint-parser",
|
|
273
|
-
rules: {
|
|
274
|
-
"@nx/dependency-checks": [
|
|
275
|
-
"error",
|
|
276
|
-
{
|
|
277
|
-
"buildTargets": ["build"],
|
|
278
|
-
"ignoredFiles": [
|
|
279
|
-
"{projectRoot}/esbuild.config.{js,ts,mjs,mts}",
|
|
280
|
-
"{projectRoot}/jest.config.ts"
|
|
281
|
-
],
|
|
282
|
-
"checkMissingDependencies": true,
|
|
283
|
-
"checkObsoleteDependencies": true,
|
|
284
|
-
"checkVersionMismatches": false
|
|
285
|
-
}
|
|
286
|
-
]
|
|
287
|
-
}
|
|
288
|
-
});
|
|
289
|
-
if (lintConfigHasOverride(
|
|
290
|
-
tree,
|
|
291
|
-
projectConfiguration.root,
|
|
292
|
-
(o) => Array.isArray(o.files) ? o.files.some((f) => f.match(/\.json$/)) : !!o.files?.match(/\.json$/),
|
|
293
|
-
true
|
|
294
|
-
)) {
|
|
295
|
-
updateOverrideInLintConfig(
|
|
296
|
-
tree,
|
|
297
|
-
projectConfiguration.root,
|
|
298
|
-
(o) => o.rules?.["@nx/dependency-checks"],
|
|
299
|
-
(o) => {
|
|
300
|
-
const value = o.rules["@nx/dependency-checks"];
|
|
301
|
-
let ruleSeverity;
|
|
302
|
-
let ruleOptions;
|
|
303
|
-
if (Array.isArray(value)) {
|
|
304
|
-
ruleSeverity = value[0];
|
|
305
|
-
ruleOptions = value[1];
|
|
306
|
-
} else {
|
|
307
|
-
ruleSeverity = value ?? "error";
|
|
308
|
-
ruleOptions = {};
|
|
309
|
-
}
|
|
310
|
-
if (options.bundler === "esbuild") {
|
|
311
|
-
ruleOptions.ignoredFiles = [
|
|
312
|
-
"{projectRoot}/esbuild.config.{js,ts,mjs,mts}"
|
|
313
|
-
];
|
|
314
|
-
o.rules["@nx/dependency-checks"] = [ruleSeverity, ruleOptions];
|
|
315
|
-
}
|
|
316
|
-
return o;
|
|
317
|
-
}
|
|
318
|
-
);
|
|
319
|
-
}
|
|
320
|
-
return task;
|
|
321
|
-
}
|
|
322
234
|
function getOutputPath(options) {
|
|
323
235
|
const parts = ["dist"];
|
|
324
236
|
if (options.projectRoot === ".") {
|
|
@@ -414,7 +326,6 @@ async function normalizeOptions(tree, options) {
|
|
|
414
326
|
}
|
|
415
327
|
// Annotate the CommonJS export names for ESM import in node:
|
|
416
328
|
0 && (module.exports = {
|
|
417
|
-
addLint,
|
|
418
329
|
createProjectTsConfigJson,
|
|
419
330
|
getOutputPath,
|
|
420
331
|
normalizeOptions,
|
|
@@ -66386,7 +66386,12 @@ var init_schema = __esm({
|
|
|
66386
66386
|
extends: z3.string().trim().optional().describe(
|
|
66387
66387
|
"The path to a base JSON file to use as a configuration preset file"
|
|
66388
66388
|
),
|
|
66389
|
-
|
|
66389
|
+
isRoot: z3.boolean().optional().describe(
|
|
66390
|
+
"A flag indicating if the current configuration is the set in the root of the workspace"
|
|
66391
|
+
),
|
|
66392
|
+
name: z3.string().trim().toLowerCase().optional().describe(
|
|
66393
|
+
"The name of the service/package/scope using this configuration"
|
|
66394
|
+
),
|
|
66390
66395
|
namespace: z3.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
66391
66396
|
organization: z3.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
66392
66397
|
repository: z3.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
@@ -66396,7 +66401,7 @@ var init_schema = __esm({
|
|
|
66396
66401
|
licensing: z3.string().trim().url().default(STORM_DEFAULT_LICENSING).describe("The base licensing site for the workspace"),
|
|
66397
66402
|
branch: z3.string().trim().default("main").describe("The branch of the workspace"),
|
|
66398
66403
|
preid: z3.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
66399
|
-
owner: z3.string().trim().default("@storm-software/
|
|
66404
|
+
owner: z3.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
66400
66405
|
worker: z3.string().trim().default("Stormie-Bot").describe(
|
|
66401
66406
|
"The worker of the package (this is the bot that will be used to perform various tasks)"
|
|
66402
66407
|
),
|
|
@@ -66407,7 +66412,15 @@ var init_schema = __esm({
|
|
|
66407
66412
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
66408
66413
|
),
|
|
66409
66414
|
skipCache: z3.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
66410
|
-
cacheDirectory: z3.string().trim().
|
|
66415
|
+
cacheDirectory: z3.string().trim().optional().describe(
|
|
66416
|
+
"The directory used to store the environment's cached file data"
|
|
66417
|
+
),
|
|
66418
|
+
dataDirectory: z3.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
66419
|
+
configDirectory: z3.string().trim().optional().describe(
|
|
66420
|
+
"The directory used to store the environment's configuration files"
|
|
66421
|
+
),
|
|
66422
|
+
tempDirectory: z3.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
66423
|
+
logDirectory: z3.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
66411
66424
|
buildDirectory: z3.string().trim().default("dist").describe("The build directory for the workspace"),
|
|
66412
66425
|
outputDirectory: z3.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
|
|
66413
66426
|
runtimeVersion: z3.string().trim().regex(
|
|
@@ -66425,7 +66438,7 @@ var init_schema = __esm({
|
|
|
66425
66438
|
"debug",
|
|
66426
66439
|
"trace",
|
|
66427
66440
|
"all"
|
|
66428
|
-
]).default("
|
|
66441
|
+
]).default("info").describe(
|
|
66429
66442
|
"The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
|
|
66430
66443
|
),
|
|
66431
66444
|
cloudflareAccountId: z3.string().trim().toLowerCase().length(32).regex(/^([0-9a-fA-F]{32})$/i).nullable().default(null).describe("The default Cloudflare account ID of the workspace"),
|
|
@@ -66386,7 +66386,12 @@ var init_schema = __esm({
|
|
|
66386
66386
|
extends: z3.string().trim().optional().describe(
|
|
66387
66387
|
"The path to a base JSON file to use as a configuration preset file"
|
|
66388
66388
|
),
|
|
66389
|
-
|
|
66389
|
+
isRoot: z3.boolean().optional().describe(
|
|
66390
|
+
"A flag indicating if the current configuration is the set in the root of the workspace"
|
|
66391
|
+
),
|
|
66392
|
+
name: z3.string().trim().toLowerCase().optional().describe(
|
|
66393
|
+
"The name of the service/package/scope using this configuration"
|
|
66394
|
+
),
|
|
66390
66395
|
namespace: z3.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
66391
66396
|
organization: z3.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
66392
66397
|
repository: z3.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
@@ -66396,7 +66401,7 @@ var init_schema = __esm({
|
|
|
66396
66401
|
licensing: z3.string().trim().url().default(STORM_DEFAULT_LICENSING).describe("The base licensing site for the workspace"),
|
|
66397
66402
|
branch: z3.string().trim().default("main").describe("The branch of the workspace"),
|
|
66398
66403
|
preid: z3.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
66399
|
-
owner: z3.string().trim().default("@storm-software/
|
|
66404
|
+
owner: z3.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
66400
66405
|
worker: z3.string().trim().default("Stormie-Bot").describe(
|
|
66401
66406
|
"The worker of the package (this is the bot that will be used to perform various tasks)"
|
|
66402
66407
|
),
|
|
@@ -66407,7 +66412,15 @@ var init_schema = __esm({
|
|
|
66407
66412
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
66408
66413
|
),
|
|
66409
66414
|
skipCache: z3.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
66410
|
-
cacheDirectory: z3.string().trim().
|
|
66415
|
+
cacheDirectory: z3.string().trim().optional().describe(
|
|
66416
|
+
"The directory used to store the environment's cached file data"
|
|
66417
|
+
),
|
|
66418
|
+
dataDirectory: z3.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
66419
|
+
configDirectory: z3.string().trim().optional().describe(
|
|
66420
|
+
"The directory used to store the environment's configuration files"
|
|
66421
|
+
),
|
|
66422
|
+
tempDirectory: z3.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
66423
|
+
logDirectory: z3.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
66411
66424
|
buildDirectory: z3.string().trim().default("dist").describe("The build directory for the workspace"),
|
|
66412
66425
|
outputDirectory: z3.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
|
|
66413
66426
|
runtimeVersion: z3.string().trim().regex(
|
|
@@ -66425,7 +66438,7 @@ var init_schema = __esm({
|
|
|
66425
66438
|
"debug",
|
|
66426
66439
|
"trace",
|
|
66427
66440
|
"all"
|
|
66428
|
-
]).default("
|
|
66441
|
+
]).default("info").describe(
|
|
66429
66442
|
"The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
|
|
66430
66443
|
),
|
|
66431
66444
|
cloudflareAccountId: z3.string().trim().toLowerCase().length(32).regex(/^([0-9a-fA-F]{32})$/i).nullable().default(null).describe("The default Cloudflare account ID of the workspace"),
|
|
@@ -66386,7 +66386,12 @@ var init_schema = __esm({
|
|
|
66386
66386
|
extends: z3.string().trim().optional().describe(
|
|
66387
66387
|
"The path to a base JSON file to use as a configuration preset file"
|
|
66388
66388
|
),
|
|
66389
|
-
|
|
66389
|
+
isRoot: z3.boolean().optional().describe(
|
|
66390
|
+
"A flag indicating if the current configuration is the set in the root of the workspace"
|
|
66391
|
+
),
|
|
66392
|
+
name: z3.string().trim().toLowerCase().optional().describe(
|
|
66393
|
+
"The name of the service/package/scope using this configuration"
|
|
66394
|
+
),
|
|
66390
66395
|
namespace: z3.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
66391
66396
|
organization: z3.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
66392
66397
|
repository: z3.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
@@ -66396,7 +66401,7 @@ var init_schema = __esm({
|
|
|
66396
66401
|
licensing: z3.string().trim().url().default(STORM_DEFAULT_LICENSING).describe("The base licensing site for the workspace"),
|
|
66397
66402
|
branch: z3.string().trim().default("main").describe("The branch of the workspace"),
|
|
66398
66403
|
preid: z3.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
66399
|
-
owner: z3.string().trim().default("@storm-software/
|
|
66404
|
+
owner: z3.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
66400
66405
|
worker: z3.string().trim().default("Stormie-Bot").describe(
|
|
66401
66406
|
"The worker of the package (this is the bot that will be used to perform various tasks)"
|
|
66402
66407
|
),
|
|
@@ -66407,7 +66412,15 @@ var init_schema = __esm({
|
|
|
66407
66412
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
66408
66413
|
),
|
|
66409
66414
|
skipCache: z3.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
66410
|
-
cacheDirectory: z3.string().trim().
|
|
66415
|
+
cacheDirectory: z3.string().trim().optional().describe(
|
|
66416
|
+
"The directory used to store the environment's cached file data"
|
|
66417
|
+
),
|
|
66418
|
+
dataDirectory: z3.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
66419
|
+
configDirectory: z3.string().trim().optional().describe(
|
|
66420
|
+
"The directory used to store the environment's configuration files"
|
|
66421
|
+
),
|
|
66422
|
+
tempDirectory: z3.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
66423
|
+
logDirectory: z3.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
66411
66424
|
buildDirectory: z3.string().trim().default("dist").describe("The build directory for the workspace"),
|
|
66412
66425
|
outputDirectory: z3.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
|
|
66413
66426
|
runtimeVersion: z3.string().trim().regex(
|
|
@@ -66425,7 +66438,7 @@ var init_schema = __esm({
|
|
|
66425
66438
|
"debug",
|
|
66426
66439
|
"trace",
|
|
66427
66440
|
"all"
|
|
66428
|
-
]).default("
|
|
66441
|
+
]).default("info").describe(
|
|
66429
66442
|
"The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
|
|
66430
66443
|
),
|
|
66431
66444
|
cloudflareAccountId: z3.string().trim().toLowerCase().length(32).regex(/^([0-9a-fA-F]{32})$/i).nullable().default(null).describe("The default Cloudflare account ID of the workspace"),
|
|
@@ -66386,7 +66386,12 @@ var init_schema = __esm({
|
|
|
66386
66386
|
extends: z3.string().trim().optional().describe(
|
|
66387
66387
|
"The path to a base JSON file to use as a configuration preset file"
|
|
66388
66388
|
),
|
|
66389
|
-
|
|
66389
|
+
isRoot: z3.boolean().optional().describe(
|
|
66390
|
+
"A flag indicating if the current configuration is the set in the root of the workspace"
|
|
66391
|
+
),
|
|
66392
|
+
name: z3.string().trim().toLowerCase().optional().describe(
|
|
66393
|
+
"The name of the service/package/scope using this configuration"
|
|
66394
|
+
),
|
|
66390
66395
|
namespace: z3.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
66391
66396
|
organization: z3.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
66392
66397
|
repository: z3.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
@@ -66396,7 +66401,7 @@ var init_schema = __esm({
|
|
|
66396
66401
|
licensing: z3.string().trim().url().default(STORM_DEFAULT_LICENSING).describe("The base licensing site for the workspace"),
|
|
66397
66402
|
branch: z3.string().trim().default("main").describe("The branch of the workspace"),
|
|
66398
66403
|
preid: z3.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
66399
|
-
owner: z3.string().trim().default("@storm-software/
|
|
66404
|
+
owner: z3.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
66400
66405
|
worker: z3.string().trim().default("Stormie-Bot").describe(
|
|
66401
66406
|
"The worker of the package (this is the bot that will be used to perform various tasks)"
|
|
66402
66407
|
),
|
|
@@ -66407,7 +66412,15 @@ var init_schema = __esm({
|
|
|
66407
66412
|
"The build will use these package patterns to determine if they should be external to the bundle"
|
|
66408
66413
|
),
|
|
66409
66414
|
skipCache: z3.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
66410
|
-
cacheDirectory: z3.string().trim().
|
|
66415
|
+
cacheDirectory: z3.string().trim().optional().describe(
|
|
66416
|
+
"The directory used to store the environment's cached file data"
|
|
66417
|
+
),
|
|
66418
|
+
dataDirectory: z3.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
66419
|
+
configDirectory: z3.string().trim().optional().describe(
|
|
66420
|
+
"The directory used to store the environment's configuration files"
|
|
66421
|
+
),
|
|
66422
|
+
tempDirectory: z3.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
66423
|
+
logDirectory: z3.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
66411
66424
|
buildDirectory: z3.string().trim().default("dist").describe("The build directory for the workspace"),
|
|
66412
66425
|
outputDirectory: z3.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
|
|
66413
66426
|
runtimeVersion: z3.string().trim().regex(
|
|
@@ -66425,7 +66438,7 @@ var init_schema = __esm({
|
|
|
66425
66438
|
"debug",
|
|
66426
66439
|
"trace",
|
|
66427
66440
|
"all"
|
|
66428
|
-
]).default("
|
|
66441
|
+
]).default("info").describe(
|
|
66429
66442
|
"The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
|
|
66430
66443
|
),
|
|
66431
66444
|
cloudflareAccountId: z3.string().trim().toLowerCase().length(32).regex(/^([0-9a-fA-F]{32})$/i).nullable().default(null).describe("The default Cloudflare account ID of the workspace"),
|