@storm-software/workspace-tools 1.296.18 → 1.296.19
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/README.md +1 -1
- package/dist/chunk-27VV54AU.mjs +31 -0
- package/dist/chunk-2FWYS4LO.mjs +524 -0
- package/dist/{chunk-VZW75NWX.mjs → chunk-374AWLUE.mjs} +1 -1
- package/dist/chunk-3VN2GWX7.js +250 -0
- package/dist/chunk-4QZG36UZ.js +524 -0
- package/dist/{chunk-XIJ6Y5PY.mjs → chunk-4XFDXLL5.mjs} +1 -1
- package/dist/{chunk-TSQI7Z3D.mjs → chunk-5SX7BBOU.mjs} +0 -1
- package/dist/chunk-AD2DJUS6.js +93 -0
- package/dist/chunk-AZIYZ7G2.mjs +41 -0
- package/dist/chunk-B6CXZA7K.mjs +32 -0
- package/dist/chunk-D6XEM3XX.mjs +93 -0
- package/dist/chunk-DSUFN6ZC.mjs +253 -0
- package/dist/chunk-E5RTBBOT.mjs +32 -0
- package/dist/chunk-EC34LBD2.mjs +128 -0
- package/dist/chunk-FE7ZULOD.js +32 -0
- package/dist/{chunk-B2AJRGYN.mjs → chunk-HEEYGPP2.mjs} +1 -1
- package/dist/chunk-I2LXWNCS.js +41 -0
- package/dist/chunk-JEPLNTO7.js +79 -0
- package/dist/chunk-K6ADTQ4I.js +32 -0
- package/dist/chunk-KILRQ3CE.js +32 -0
- package/dist/chunk-O5EFCUR2.js +31 -0
- package/dist/chunk-OZRIT35E.mjs +82 -0
- package/dist/{chunk-II7J52FS.js → chunk-PEO7Z6CZ.js} +0 -1
- package/dist/{chunk-ZS6ZECJY.mjs → chunk-PIKWPSLP.mjs} +1 -1
- package/dist/{chunk-Y56KCTJM.mjs → chunk-QEWWRSPX.mjs} +1 -1
- package/dist/chunk-WIKTNOO2.js +128 -0
- package/dist/chunk-WNGTBFG5.mjs +32 -0
- package/dist/executors.js +2 -2
- package/dist/executors.mjs +2 -2
- package/dist/{generator-BKKfRfw5.d.mts → generator-9L9b-msK.d.mts} +1 -1
- package/dist/{generator-DX2foast.d.ts → generator-BT5Kf5x0.d.ts} +1 -1
- package/dist/{generator-DVJjzR9Q.d.mts → generator-BvhmWt7B.d.mts} +1 -1
- package/dist/{generator-DN9Th4ZG.d.ts → generator-C9QMvagl.d.ts} +1 -1
- package/dist/{generator-rIlu4Sq2.d.mts → generator-CkT060vy.d.mts} +1 -1
- package/dist/{generator-CPAEsIX9.d.ts → generator-Czm2JkrK.d.ts} +1 -1
- package/dist/{generator-Ce5Jjv19.d.mts → generator-DIEJD40Q.d.mts} +1 -1
- package/dist/{generator-B9nl4zZh.d.mts → generator-DdPUFIRV.d.mts} +1 -1
- package/dist/{generator-CKzlyVl8.d.ts → generator-DwHI-Bxg.d.ts} +1 -1
- package/dist/{generator-DMnwA7AM.d.ts → generator-GND3rM-I.d.ts} +1 -1
- package/dist/generators.d.mts +6 -6
- package/dist/generators.d.ts +6 -6
- package/dist/generators.mjs +5 -5
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2 -2
- package/dist/index.mjs +6 -6
- package/dist/src/base/base-executor.d.mts +1 -1
- package/dist/src/base/base-executor.d.ts +1 -1
- package/dist/src/base/base-executor.mjs +1 -1
- package/dist/src/base/base-executor.untyped.mjs +1 -1
- package/dist/src/base/base-generator.d.mts +1 -1
- package/dist/src/base/base-generator.d.ts +1 -1
- package/dist/src/base/base-generator.mjs +1 -1
- package/dist/src/base/base-generator.untyped.mjs +1 -1
- package/dist/src/base/cargo-base-executor.untyped.mjs +1 -1
- package/dist/src/base/index.d.mts +1 -1
- package/dist/src/base/index.d.ts +1 -1
- package/dist/src/base/index.mjs +1 -1
- package/dist/src/base/typescript-build-executor.untyped.mjs +1 -1
- package/dist/src/base/typescript-library-generator.untyped.mjs +1 -1
- package/dist/src/executors/cargo-build/executor.mjs +1 -1
- package/dist/src/executors/cargo-build/untyped.mjs +1 -1
- package/dist/src/executors/cargo-check/executor.mjs +1 -1
- package/dist/src/executors/cargo-check/untyped.mjs +1 -1
- package/dist/src/executors/cargo-clippy/executor.mjs +1 -1
- package/dist/src/executors/cargo-clippy/untyped.mjs +1 -1
- package/dist/src/executors/cargo-doc/executor.mjs +1 -1
- package/dist/src/executors/cargo-doc/untyped.mjs +1 -1
- package/dist/src/executors/cargo-format/executor.mjs +1 -1
- package/dist/src/executors/cargo-format/untyped.mjs +1 -1
- package/dist/src/executors/cargo-publish/executor.mjs +1 -1
- package/dist/src/executors/cargo-publish/untyped.mjs +1 -1
- package/dist/src/executors/clean-package/executor.mjs +1 -1
- package/dist/src/executors/clean-package/untyped.mjs +1 -1
- package/dist/src/executors/esbuild/executor.mjs +1 -1
- package/dist/src/executors/esbuild/untyped.mjs +1 -1
- package/dist/src/executors/napi/executor.mjs +1 -1
- package/dist/src/executors/napi/untyped.mjs +1 -1
- package/dist/src/executors/npm-publish/executor.mjs +1 -1
- package/dist/src/executors/npm-publish/untyped.mjs +1 -1
- package/dist/src/executors/size-limit/executor.mjs +1 -1
- package/dist/src/executors/size-limit/untyped.mjs +1 -1
- package/dist/src/executors/tsdown/executor.js +2 -2
- package/dist/src/executors/tsdown/executor.mjs +2 -2
- package/dist/src/executors/tsdown/untyped.mjs +1 -1
- package/dist/src/executors/typia/executor.mjs +1 -1
- package/dist/src/executors/typia/untyped.mjs +1 -1
- package/dist/src/executors/unbuild/executor.mjs +1 -1
- package/dist/src/executors/unbuild/untyped.mjs +1 -1
- package/dist/src/generators/browser-library/generator.d.mts +2 -2
- package/dist/src/generators/browser-library/generator.d.ts +2 -2
- package/dist/src/generators/browser-library/generator.mjs +2 -2
- package/dist/src/generators/browser-library/untyped.mjs +1 -1
- package/dist/src/generators/config-schema/generator.d.mts +2 -2
- package/dist/src/generators/config-schema/generator.d.ts +2 -2
- package/dist/src/generators/config-schema/generator.mjs +1 -1
- package/dist/src/generators/config-schema/untyped.mjs +1 -1
- package/dist/src/generators/init/init.mjs +1 -1
- package/dist/src/generators/init/untyped.mjs +1 -1
- package/dist/src/generators/neutral-library/generator.d.mts +2 -2
- package/dist/src/generators/neutral-library/generator.d.ts +2 -2
- package/dist/src/generators/neutral-library/generator.mjs +2 -2
- package/dist/src/generators/neutral-library/untyped.mjs +1 -1
- package/dist/src/generators/node-library/generator.d.mts +2 -2
- package/dist/src/generators/node-library/generator.d.ts +2 -2
- package/dist/src/generators/node-library/generator.mjs +2 -2
- package/dist/src/generators/node-library/untyped.mjs +1 -1
- package/dist/src/generators/preset/generator.d.mts +2 -2
- package/dist/src/generators/preset/generator.d.ts +2 -2
- package/dist/src/generators/preset/generator.mjs +2 -2
- package/dist/src/generators/preset/untyped.mjs +1 -1
- package/dist/src/plugins/rust/cargo-toml.mjs +1 -1
- package/dist/src/plugins/rust/index.mjs +1 -1
- package/dist/src/plugins/typescript/index.d.mts +1 -1
- package/dist/src/plugins/typescript/index.d.ts +1 -1
- package/dist/src/plugins/typescript/index.mjs +1 -1
- package/dist/src/plugins/typescript/tsdown.d.mts +1 -1
- package/dist/src/plugins/typescript/tsdown.d.ts +1 -1
- package/dist/src/plugins/typescript/tsdown.mjs +1 -1
- package/dist/src/plugins/typescript/tsup.d.mts +1 -1
- package/dist/src/plugins/typescript/tsup.d.ts +1 -1
- package/dist/src/plugins/typescript/tsup.mjs +1 -1
- package/dist/src/plugins/typescript/untyped-schema.mjs +1 -1
- package/dist/src/release/index.mjs +1 -1
- package/dist/src/release/js-version-actions.mjs +1 -1
- package/dist/src/release/rust-version-actions.mjs +1 -1
- package/dist/src/types.d.mts +1 -1
- package/dist/src/types.d.ts +1 -1
- package/dist/src/types.mjs +1 -1
- package/dist/src/utils/apply-workspace-tokens.mjs +1 -1
- package/dist/src/utils/cargo.mjs +1 -1
- package/dist/src/utils/create-cli-options.mjs +1 -1
- package/dist/src/utils/get-project-configurations.mjs +1 -1
- package/dist/src/utils/github.mjs +1 -1
- package/dist/src/utils/index.mjs +1 -1
- package/dist/src/utils/lock-file.mjs +1 -1
- package/dist/src/utils/nx-json.mjs +1 -1
- package/dist/src/utils/package-helpers.mjs +1 -1
- package/dist/src/utils/plugin-helpers.mjs +1 -1
- package/dist/src/utils/project-tags.mjs +1 -1
- package/dist/src/utils/registry-helpers.mjs +1 -1
- package/dist/src/utils/typia-transform.mjs +1 -1
- package/dist/src/utils/versions.mjs +1 -1
- package/dist/{types-DLXcfy35.d.mts → types-BlCH22NF.d.mts} +1 -1
- package/dist/{types-Bvfw-xMk.d.ts → types-DIIZf_cX.d.ts} +1 -1
- package/package.json +13 -13
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
withRunExecutor
|
|
3
|
+
} from "./chunk-QJ74HYMK.mjs";
|
|
4
|
+
import {
|
|
5
|
+
buildCargoCommand,
|
|
6
|
+
cargoCommand
|
|
7
|
+
} from "./chunk-GKLFEOKK.mjs";
|
|
8
|
+
|
|
9
|
+
// src/executors/cargo-clippy/executor.ts
|
|
10
|
+
async function cargoClippyExecutor(options, context) {
|
|
11
|
+
const command = buildCargoCommand("clippy", options, context);
|
|
12
|
+
return await cargoCommand(context.root, ...command);
|
|
13
|
+
}
|
|
14
|
+
var executor_default = withRunExecutor(
|
|
15
|
+
"Cargo - Clippy",
|
|
16
|
+
cargoClippyExecutor,
|
|
17
|
+
{
|
|
18
|
+
skipReadingConfig: false,
|
|
19
|
+
hooks: {
|
|
20
|
+
applyDefaultOptions: (options) => {
|
|
21
|
+
options.toolchain ??= "stable";
|
|
22
|
+
options.fix ??= false;
|
|
23
|
+
return options;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
cargoClippyExecutor,
|
|
31
|
+
executor_default
|
|
32
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ProjectTagConstants,
|
|
3
|
+
isEqualProjectTag
|
|
4
|
+
} from "./chunk-2GQSCZ3J.mjs";
|
|
5
|
+
import {
|
|
6
|
+
parseCargoToml
|
|
7
|
+
} from "./chunk-AOWBKNHM.mjs";
|
|
8
|
+
import {
|
|
9
|
+
joinPaths
|
|
10
|
+
} from "./chunk-TBW5MCN6.mjs";
|
|
11
|
+
|
|
12
|
+
// src/utils/package-helpers.ts
|
|
13
|
+
import {
|
|
14
|
+
joinPathFragments,
|
|
15
|
+
readJsonFile
|
|
16
|
+
} from "@nx/devkit";
|
|
17
|
+
import { execFileSync } from "child_process";
|
|
18
|
+
import { existsSync } from "node:fs";
|
|
19
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
20
|
+
import { dirname, resolve } from "path";
|
|
21
|
+
import { format } from "prettier";
|
|
22
|
+
var PackageManagerTypes = {
|
|
23
|
+
PackageJson: "package.json",
|
|
24
|
+
CargoToml: "Cargo.toml"
|
|
25
|
+
};
|
|
26
|
+
var getPackageInfo = (project) => {
|
|
27
|
+
if (isEqualProjectTag(
|
|
28
|
+
project,
|
|
29
|
+
ProjectTagConstants.Language.TAG_ID,
|
|
30
|
+
ProjectTagConstants.Language.RUST
|
|
31
|
+
) && existsSync(joinPathFragments(project.root, "Cargo.toml"))) {
|
|
32
|
+
return {
|
|
33
|
+
type: "Cargo.toml",
|
|
34
|
+
content: parseCargoToml(joinPathFragments(project.root, "Cargo.toml"))
|
|
35
|
+
};
|
|
36
|
+
} else if (isEqualProjectTag(
|
|
37
|
+
project,
|
|
38
|
+
ProjectTagConstants.Language.TAG_ID,
|
|
39
|
+
ProjectTagConstants.Language.TYPESCRIPT
|
|
40
|
+
) && existsSync(joinPathFragments(project.root, "package.json"))) {
|
|
41
|
+
return {
|
|
42
|
+
type: "package.json",
|
|
43
|
+
content: readJsonFile(
|
|
44
|
+
joinPathFragments(project.root, "package.json")
|
|
45
|
+
)
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
};
|
|
50
|
+
async function addPackageJsonGitHead(packageRoot) {
|
|
51
|
+
const packageJsonPath = joinPaths(packageRoot, "package.json");
|
|
52
|
+
if (!packageJsonPath) {
|
|
53
|
+
throw new Error(
|
|
54
|
+
"No file path provided. Please provide a valid path to the package.json file."
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
const packageJsonValue = JSON.parse(await readFile(packageJsonPath, "utf8"));
|
|
58
|
+
if (!packageJsonValue || typeof packageJsonValue !== "object") {
|
|
59
|
+
throw new Error(
|
|
60
|
+
`Invalid package.json file at ${packageJsonPath}. Please ensure it is a valid JSON file.`
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
const gitHead = execFileSync("git", ["rev-parse", "HEAD"], {
|
|
64
|
+
cwd: dirname(resolve(packageJsonPath)),
|
|
65
|
+
encoding: "utf8"
|
|
66
|
+
}).trim();
|
|
67
|
+
packageJsonValue.gitHead = gitHead;
|
|
68
|
+
return writeFile(
|
|
69
|
+
packageJsonPath,
|
|
70
|
+
await format(JSON.stringify(packageJsonValue), {
|
|
71
|
+
parser: "json",
|
|
72
|
+
proseWrap: "preserve",
|
|
73
|
+
trailingComma: "none",
|
|
74
|
+
tabWidth: 2,
|
|
75
|
+
semi: true,
|
|
76
|
+
singleQuote: false,
|
|
77
|
+
quoteProps: "as-needed",
|
|
78
|
+
insertPragma: false,
|
|
79
|
+
bracketSameLine: true,
|
|
80
|
+
printWidth: 80,
|
|
81
|
+
bracketSpacing: true,
|
|
82
|
+
arrowParens: "avoid",
|
|
83
|
+
endOfLine: "lf",
|
|
84
|
+
plugins: ["prettier-plugin-packagejson"]
|
|
85
|
+
})
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export {
|
|
90
|
+
PackageManagerTypes,
|
|
91
|
+
getPackageInfo,
|
|
92
|
+
addPackageJsonGitHead
|
|
93
|
+
};
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import {
|
|
2
|
+
withRunGenerator
|
|
3
|
+
} from "./chunk-K4FLM47P.mjs";
|
|
4
|
+
import {
|
|
5
|
+
nodeVersion,
|
|
6
|
+
pnpmVersion
|
|
7
|
+
} from "./chunk-QC5ON3X4.mjs";
|
|
8
|
+
import {
|
|
9
|
+
__dirname
|
|
10
|
+
} from "./chunk-HEEYGPP2.mjs";
|
|
11
|
+
|
|
12
|
+
// src/generators/preset/generator.ts
|
|
13
|
+
import {
|
|
14
|
+
addDependenciesToPackageJson,
|
|
15
|
+
addProjectConfiguration,
|
|
16
|
+
formatFiles,
|
|
17
|
+
generateFiles,
|
|
18
|
+
joinPathFragments,
|
|
19
|
+
updateJson
|
|
20
|
+
} from "@nx/devkit";
|
|
21
|
+
import * as path from "node:path";
|
|
22
|
+
async function presetGeneratorFn(tree, options) {
|
|
23
|
+
const projectRoot = ".";
|
|
24
|
+
options.description ??= `\u26A1The ${options.namespace ? options.namespace : options.name} monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.`;
|
|
25
|
+
options.namespace ??= options.organization;
|
|
26
|
+
addProjectConfiguration(tree, `@${options.namespace}/${options.name}`, {
|
|
27
|
+
root: projectRoot,
|
|
28
|
+
projectType: "application",
|
|
29
|
+
targets: {
|
|
30
|
+
"local-registry": {
|
|
31
|
+
executor: "@nx/js:verdaccio",
|
|
32
|
+
options: {
|
|
33
|
+
port: 4873,
|
|
34
|
+
config: ".verdaccio/config.yml",
|
|
35
|
+
storage: "tmp/local-registry/storage"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
updateJson(tree, "package.json", (json) => {
|
|
41
|
+
json.scripts = json.scripts || {};
|
|
42
|
+
json.version = "0.0.0";
|
|
43
|
+
json.triggerEmptyDevReleaseByIncrementingThisNumber = 0;
|
|
44
|
+
json.private = true;
|
|
45
|
+
json.keywords ??= [
|
|
46
|
+
options.name,
|
|
47
|
+
options.namespace,
|
|
48
|
+
"storm",
|
|
49
|
+
"storm-stack",
|
|
50
|
+
"storm-ops",
|
|
51
|
+
"rust",
|
|
52
|
+
"nx",
|
|
53
|
+
"graphql",
|
|
54
|
+
"sullivanpj",
|
|
55
|
+
"monorepo"
|
|
56
|
+
];
|
|
57
|
+
json.homepage ??= "https://stormsoftware.com";
|
|
58
|
+
json.bugs ??= {
|
|
59
|
+
url: `https://github.com/${options.organization}/${options.name}/issues`,
|
|
60
|
+
email: "support@stormsoftware.com"
|
|
61
|
+
};
|
|
62
|
+
json.license = "Apache-2.0";
|
|
63
|
+
json.author ??= {
|
|
64
|
+
name: "Storm Software",
|
|
65
|
+
email: "contact@stormsoftware.com",
|
|
66
|
+
url: "https://stormsoftware.com"
|
|
67
|
+
};
|
|
68
|
+
json.maintainers ??= [
|
|
69
|
+
{
|
|
70
|
+
name: "Storm Software",
|
|
71
|
+
email: "contact@stormsoftware.com",
|
|
72
|
+
url: "https://stormsoftware.com"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "Pat Sullivan",
|
|
76
|
+
email: "admin@stormsoftware.com",
|
|
77
|
+
url: "https://patsullivan.org"
|
|
78
|
+
}
|
|
79
|
+
];
|
|
80
|
+
json.funding ??= {
|
|
81
|
+
type: "github",
|
|
82
|
+
url: "https://github.com/sponsors/storm-software"
|
|
83
|
+
};
|
|
84
|
+
json.namespace ??= `@${options.namespace}`;
|
|
85
|
+
json.description ??= options.description;
|
|
86
|
+
options.repositoryUrl ??= `https://github.com/${options.organization}/${options.name}`;
|
|
87
|
+
json.repository ??= {
|
|
88
|
+
type: "github",
|
|
89
|
+
url: `${options.repositoryUrl}.git`
|
|
90
|
+
};
|
|
91
|
+
json.packageManager ??= "pnpm@10.3.0";
|
|
92
|
+
json.engines ??= {
|
|
93
|
+
node: ">=20.11.0",
|
|
94
|
+
pnpm: ">=10.3.0"
|
|
95
|
+
};
|
|
96
|
+
json.prettier = "@storm-software/prettier/config.json";
|
|
97
|
+
json.nx ??= {
|
|
98
|
+
includedScripts: [
|
|
99
|
+
"lint-sherif",
|
|
100
|
+
"lint-knip",
|
|
101
|
+
"lint-ls",
|
|
102
|
+
"lint",
|
|
103
|
+
"format",
|
|
104
|
+
"format-sherif",
|
|
105
|
+
"format-readme",
|
|
106
|
+
"format-prettier",
|
|
107
|
+
"format-toml",
|
|
108
|
+
"commit",
|
|
109
|
+
"release"
|
|
110
|
+
]
|
|
111
|
+
};
|
|
112
|
+
json.scripts.adr = "pnpm log4brains adr new";
|
|
113
|
+
json.scripts["adr-preview"] = "pnpm log4brains preview";
|
|
114
|
+
json.scripts.prepare = "pnpm add lefthook -w && pnpm lefthook install";
|
|
115
|
+
json.scripts.preinstall = "npx -y only-allow pnpm";
|
|
116
|
+
json.scripts["install-csb"] = "corepack enable && pnpm install --no-frozen-lockfile";
|
|
117
|
+
json.scripts.clean = "rimraf dist && rimraf --glob packages/**/dist && rimraf --glob tools/**/dist && rimraf --glob docs/**/dist && rimraf --glob apps/**/dist && rimraf --glob libs/**/dist";
|
|
118
|
+
json.scripts.nuke = "nx clear-cache && rimraf .nx/cache && rimraf .nx/workspace-data && pnpm clean && rimraf pnpm-lock.yaml && rimraf --glob packages/**/node_modules && rimraf --glob tools/**/node_modules && rimraf node_modules";
|
|
119
|
+
json.scripts.prebuild = "pnpm clean";
|
|
120
|
+
json.scripts.build = "nx affected -t build --parallel=5";
|
|
121
|
+
json.scripts["build-all"] = "nx run-many -t build --all --parallel=5";
|
|
122
|
+
json.scripts["build-prod"] = "nx run-many -t build --all --prod --parallel=5";
|
|
123
|
+
json.scripts["build-tools"] = "nx run-many -t build --projects=tools/* --parallel=5";
|
|
124
|
+
json.scripts["build-docs"] = "nx run-many -t build --projects=docs/* --parallel=5";
|
|
125
|
+
if (!options.includeApps) {
|
|
126
|
+
json.scripts["build-packages"] = "nx run-many -t build --projects=packages/* --parallel=5";
|
|
127
|
+
} else {
|
|
128
|
+
json.scripts["build-apps"] = "nx run-many -t build --projects=apps/* --parallel=5";
|
|
129
|
+
json.scripts["build-libs"] = "nx run-many -t build --projects=libs/* --parallel=5";
|
|
130
|
+
json.scripts["build-storybook"] = "storybook build -s public";
|
|
131
|
+
}
|
|
132
|
+
json.scripts.nx = "nx";
|
|
133
|
+
json.scripts.graph = "nx graph";
|
|
134
|
+
json.scripts.lint = "pnpm storm-lint all --skip-cspell --skip-alex";
|
|
135
|
+
if (options.includeApps) {
|
|
136
|
+
json.scripts.start = "nx serve";
|
|
137
|
+
json.scripts.storybook = "pnpm storybook dev -p 6006";
|
|
138
|
+
}
|
|
139
|
+
json.scripts.help = "nx help";
|
|
140
|
+
json.scripts["dep-graph"] = "nx dep-graph";
|
|
141
|
+
json.scripts["local-registry"] = `nx local-registry @${options.namespace}/${options.name}`;
|
|
142
|
+
json.scripts.e2e = "nx e2e";
|
|
143
|
+
if (options.includeApps) {
|
|
144
|
+
json.scripts.test = "nx test && pnpm test-storybook";
|
|
145
|
+
json.scripts["test-storybook"] = "pnpm test-storybook";
|
|
146
|
+
} else {
|
|
147
|
+
json.scripts.test = "nx test";
|
|
148
|
+
}
|
|
149
|
+
json.scripts.lint = "pnpm storm-lint all --skip-cspell --skip-alex";
|
|
150
|
+
json.scripts.commit = "pnpm storm-git commit";
|
|
151
|
+
json.scripts["api-extractor"] = 'pnpm storm-docs api-extractor --outputPath="docs/api-reference" --clean';
|
|
152
|
+
json.scripts.release = "pnpm storm-git release";
|
|
153
|
+
json.scripts.format = "nx format:write";
|
|
154
|
+
json.scripts["format-sherif"] = "pnpm exec sherif -f -i typescript -i react -i react-dom";
|
|
155
|
+
json.scripts["format-toml"] = 'pnpm exec taplo format --config="./node_modules/@storm-software/linting-tools/taplo/config.toml" --cache-path="./node_modules/.cache/storm/taplo"';
|
|
156
|
+
json.scripts["format-readme"] = 'pnpm storm-git readme --templates="tools/readme-templates"';
|
|
157
|
+
json.scripts["format-prettier"] = "pnpm exec prettier --write --ignore-unknown --no-error-on-unmatched-pattern --cache && git update-index";
|
|
158
|
+
json.scripts.lint = "pnpm storm-lint all --skip-cspell";
|
|
159
|
+
json.scripts["lint-knip"] = "pnpm exec knip";
|
|
160
|
+
json.scripts["lint-sherif"] = "pnpm exec sherif -i typescript -i react -i react-dom";
|
|
161
|
+
json.scripts["lint-ls"] = 'pnpm exec ls-lint --config="./node_modules/@storm-software/linting-tools/ls-lint/ls-lint.yml"';
|
|
162
|
+
json.packageManager ??= `pnpm@${pnpmVersion}`;
|
|
163
|
+
json.engines = {
|
|
164
|
+
node: `>=${nodeVersion}`,
|
|
165
|
+
pnpm: `>=${pnpmVersion}`
|
|
166
|
+
};
|
|
167
|
+
return json;
|
|
168
|
+
});
|
|
169
|
+
generateFiles(tree, path.join(__dirname, "files"), projectRoot, {
|
|
170
|
+
...options,
|
|
171
|
+
pnpmVersion,
|
|
172
|
+
nodeVersion
|
|
173
|
+
});
|
|
174
|
+
await formatFiles(tree);
|
|
175
|
+
let dependencies = {
|
|
176
|
+
"@ls-lint/ls-lint": "2.2.3",
|
|
177
|
+
"@ltd/j-toml": "1.38.0",
|
|
178
|
+
"@nx/devkit": "^20.2.2",
|
|
179
|
+
"@nx/eslint-plugin": "^20.2.2",
|
|
180
|
+
"@nx/js": "^20.2.2",
|
|
181
|
+
"@nx/workspace": "^20.2.2",
|
|
182
|
+
"@storm-software/config": "latest",
|
|
183
|
+
"@storm-software/git-tools": "latest",
|
|
184
|
+
"@storm-software/linting-tools": "latest",
|
|
185
|
+
"@storm-software/testing-tools": "latest",
|
|
186
|
+
"@storm-software/workspace-tools": "latest",
|
|
187
|
+
"@storm-software/eslint": "latest",
|
|
188
|
+
"@storm-software/cspell": "latest",
|
|
189
|
+
"@storm-software/prettier": "latest",
|
|
190
|
+
"@taplo/cli": "0.7.0",
|
|
191
|
+
"@types/node": "^25.3.0",
|
|
192
|
+
copyfiles: "2.4.1",
|
|
193
|
+
eslint: "9.5.0",
|
|
194
|
+
jest: "29.7.0",
|
|
195
|
+
"jest-environment-node": "29.7.0",
|
|
196
|
+
knip: "5.25.2",
|
|
197
|
+
lefthook: "1.6.18",
|
|
198
|
+
nx: "^20.2.2",
|
|
199
|
+
prettier: "3.3.2",
|
|
200
|
+
"prettier-plugin-prisma": "5.0.0",
|
|
201
|
+
rimraf: "5.0.7",
|
|
202
|
+
sherif: "0.10.0",
|
|
203
|
+
"ts-jest": "29.1.5",
|
|
204
|
+
"ts-node": "10.9.2",
|
|
205
|
+
tslib: "2.6.3",
|
|
206
|
+
typescript: "5.5.3",
|
|
207
|
+
verdaccio: "5.31.1"
|
|
208
|
+
};
|
|
209
|
+
if (options.includeApps) {
|
|
210
|
+
dependencies = {
|
|
211
|
+
...dependencies,
|
|
212
|
+
react: "latest",
|
|
213
|
+
"react-dom": "latest",
|
|
214
|
+
storybook: "latest",
|
|
215
|
+
"@storybook/addons": "latest",
|
|
216
|
+
"@nx/react": "latest",
|
|
217
|
+
"@nx/next": "latest",
|
|
218
|
+
"@nx/node": "latest",
|
|
219
|
+
"@nx/storybook": "latest",
|
|
220
|
+
"jest-environment-jsdom": "29.7.0"
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
if (options.includeRust) {
|
|
224
|
+
dependencies = {
|
|
225
|
+
...dependencies,
|
|
226
|
+
"@monodon/rust": "1.4.0"
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
if (options.nxCloud) {
|
|
230
|
+
dependencies = {
|
|
231
|
+
...dependencies,
|
|
232
|
+
"nx-cloud": "latest"
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
await Promise.resolve(
|
|
236
|
+
addDependenciesToPackageJson(
|
|
237
|
+
tree,
|
|
238
|
+
dependencies,
|
|
239
|
+
{},
|
|
240
|
+
joinPathFragments(projectRoot, "package.json")
|
|
241
|
+
)
|
|
242
|
+
);
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
var generator_default = withRunGenerator(
|
|
246
|
+
"Storm Workspace Preset Generator",
|
|
247
|
+
presetGeneratorFn
|
|
248
|
+
);
|
|
249
|
+
|
|
250
|
+
export {
|
|
251
|
+
presetGeneratorFn,
|
|
252
|
+
generator_default
|
|
253
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
withRunExecutor
|
|
3
|
+
} from "./chunk-QJ74HYMK.mjs";
|
|
4
|
+
import {
|
|
5
|
+
buildCargoCommand,
|
|
6
|
+
cargoCommand
|
|
7
|
+
} from "./chunk-GKLFEOKK.mjs";
|
|
8
|
+
|
|
9
|
+
// src/executors/cargo-build/executor.ts
|
|
10
|
+
async function cargoBuildExecutor(options, context) {
|
|
11
|
+
const command = buildCargoCommand("build", options, context);
|
|
12
|
+
return await cargoCommand(context.root, ...command);
|
|
13
|
+
}
|
|
14
|
+
var executor_default = withRunExecutor(
|
|
15
|
+
"Cargo - Build",
|
|
16
|
+
cargoBuildExecutor,
|
|
17
|
+
{
|
|
18
|
+
skipReadingConfig: false,
|
|
19
|
+
hooks: {
|
|
20
|
+
applyDefaultOptions: (options) => {
|
|
21
|
+
options.outputPath ??= "dist/{projectRoot}/target";
|
|
22
|
+
options.toolchain ??= "stable";
|
|
23
|
+
return options;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
cargoBuildExecutor,
|
|
31
|
+
executor_default
|
|
32
|
+
};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import {
|
|
2
|
+
withRunExecutor
|
|
3
|
+
} from "./chunk-QJ74HYMK.mjs";
|
|
4
|
+
import {
|
|
5
|
+
cargoMetadata
|
|
6
|
+
} from "./chunk-GKLFEOKK.mjs";
|
|
7
|
+
import {
|
|
8
|
+
writeDebug
|
|
9
|
+
} from "./chunk-LOPJYZWJ.mjs";
|
|
10
|
+
import {
|
|
11
|
+
correctPaths,
|
|
12
|
+
isAbsolute,
|
|
13
|
+
joinPaths,
|
|
14
|
+
relative
|
|
15
|
+
} from "./chunk-TBW5MCN6.mjs";
|
|
16
|
+
|
|
17
|
+
// src/executors/napi/executor.ts
|
|
18
|
+
import { createJiti } from "jiti";
|
|
19
|
+
import { fileExists } from "nx/src/utils/fileutils";
|
|
20
|
+
async function napiExecutor(options, context, config) {
|
|
21
|
+
const jiti = createJiti(config.workspaceRoot, {
|
|
22
|
+
fsCache: config.skipCache ? false : joinPaths(
|
|
23
|
+
config.workspaceRoot,
|
|
24
|
+
config.directories.cache || "node_modules/.cache/storm",
|
|
25
|
+
"jiti"
|
|
26
|
+
),
|
|
27
|
+
interopDefault: true
|
|
28
|
+
});
|
|
29
|
+
const { NapiCli } = await jiti.import(
|
|
30
|
+
jiti.esmResolve("@napi-rs/cli")
|
|
31
|
+
);
|
|
32
|
+
if (!context.projectGraph?.nodes[context.projectName ?? ""]) {
|
|
33
|
+
throw new Error(
|
|
34
|
+
"The Napi Build process failed because the project could not be found in the project graph. Please run this command from a workspace root directory."
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
const projectRoot = context.projectGraph?.nodes[context.projectName ?? ""]?.data.root;
|
|
38
|
+
const packageJson = joinPaths(projectRoot ?? ".", "package.json");
|
|
39
|
+
if (!fileExists(packageJson)) {
|
|
40
|
+
throw new Error(`Could not find package.json at ${packageJson}`);
|
|
41
|
+
}
|
|
42
|
+
const napi = new NapiCli();
|
|
43
|
+
const normalizedOptions = { ...options };
|
|
44
|
+
const metadata = cargoMetadata();
|
|
45
|
+
normalizedOptions.targetDir = options.targetDir || metadata?.target_directory || joinPaths(config.workspaceRoot, "dist", "target");
|
|
46
|
+
normalizedOptions.outputDir = options.outputPath;
|
|
47
|
+
normalizedOptions.packageJsonPath ??= packageJson;
|
|
48
|
+
if (options.cwd) {
|
|
49
|
+
normalizedOptions.cwd = correctPaths(options.cwd);
|
|
50
|
+
} else {
|
|
51
|
+
const absoluteProjectRoot = correctPaths(
|
|
52
|
+
joinPaths(config.workspaceRoot, projectRoot || ".")
|
|
53
|
+
);
|
|
54
|
+
normalizedOptions.cwd = absoluteProjectRoot;
|
|
55
|
+
if (normalizedOptions.outputDir) {
|
|
56
|
+
normalizedOptions.outputDir = relative(
|
|
57
|
+
normalizedOptions.cwd,
|
|
58
|
+
correctPaths(
|
|
59
|
+
isAbsolute(normalizedOptions.outputDir) ? normalizedOptions.outputDir : joinPaths(config.workspaceRoot, normalizedOptions.outputDir)
|
|
60
|
+
)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
if (normalizedOptions.packageJsonPath) {
|
|
64
|
+
normalizedOptions.packageJsonPath = relative(
|
|
65
|
+
normalizedOptions.cwd,
|
|
66
|
+
correctPaths(
|
|
67
|
+
isAbsolute(normalizedOptions.packageJsonPath) ? normalizedOptions.packageJsonPath : joinPaths(config.workspaceRoot, normalizedOptions.packageJsonPath)
|
|
68
|
+
)
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
if (normalizedOptions.configPath) {
|
|
72
|
+
normalizedOptions.configPath = relative(
|
|
73
|
+
normalizedOptions.cwd,
|
|
74
|
+
correctPaths(
|
|
75
|
+
isAbsolute(normalizedOptions.configPath) ? normalizedOptions.configPath : joinPaths(config.workspaceRoot, normalizedOptions.configPath)
|
|
76
|
+
)
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
if (normalizedOptions.manifestPath) {
|
|
80
|
+
normalizedOptions.manifestPath = relative(
|
|
81
|
+
normalizedOptions.cwd,
|
|
82
|
+
correctPaths(
|
|
83
|
+
isAbsolute(normalizedOptions.manifestPath) ? normalizedOptions.manifestPath : joinPaths(config.workspaceRoot, normalizedOptions.manifestPath)
|
|
84
|
+
)
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (process.env.VERCEL) {
|
|
89
|
+
return { success: true };
|
|
90
|
+
}
|
|
91
|
+
writeDebug(
|
|
92
|
+
`Normalized Napi Options:
|
|
93
|
+
packageJsonPath: ${normalizedOptions.packageJsonPath}
|
|
94
|
+
outputDir: ${normalizedOptions.outputDir}
|
|
95
|
+
targetDir: ${normalizedOptions.targetDir}
|
|
96
|
+
manifestPath: ${normalizedOptions.manifestPath}
|
|
97
|
+
configPath: ${normalizedOptions.configPath}
|
|
98
|
+
cwd: ${normalizedOptions.cwd}`,
|
|
99
|
+
config
|
|
100
|
+
);
|
|
101
|
+
const { task } = await napi.build(normalizedOptions);
|
|
102
|
+
return { success: true, terminalOutput: await task };
|
|
103
|
+
}
|
|
104
|
+
var executor_default = withRunExecutor(
|
|
105
|
+
"Napi - Build Bindings",
|
|
106
|
+
napiExecutor,
|
|
107
|
+
{
|
|
108
|
+
skipReadingConfig: false,
|
|
109
|
+
hooks: {
|
|
110
|
+
applyDefaultOptions: (options) => {
|
|
111
|
+
options.outputPath ??= "{sourceRoot}";
|
|
112
|
+
options.toolchain ??= "stable";
|
|
113
|
+
options.dtsCache ??= true;
|
|
114
|
+
options.platform ??= true;
|
|
115
|
+
options.constEnum ??= false;
|
|
116
|
+
options.verbose ??= false;
|
|
117
|
+
options.jsBinding ??= "binding.js";
|
|
118
|
+
options.dts ??= "binding.d.ts";
|
|
119
|
+
return options;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
export {
|
|
126
|
+
napiExecutor,
|
|
127
|
+
executor_default
|
|
128
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkULCE72HVjs = require('./chunk-ULCE72HV.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunk32KQVUCFjs = require('./chunk-32KQVUCF.js');
|
|
8
|
+
|
|
9
|
+
// src/executors/cargo-clippy/executor.ts
|
|
10
|
+
async function cargoClippyExecutor(options, context) {
|
|
11
|
+
const command = _chunk32KQVUCFjs.buildCargoCommand.call(void 0, "clippy", options, context);
|
|
12
|
+
return await _chunk32KQVUCFjs.cargoCommand.call(void 0, context.root, ...command);
|
|
13
|
+
}
|
|
14
|
+
var executor_default = _chunkULCE72HVjs.withRunExecutor.call(void 0,
|
|
15
|
+
"Cargo - Clippy",
|
|
16
|
+
cargoClippyExecutor,
|
|
17
|
+
{
|
|
18
|
+
skipReadingConfig: false,
|
|
19
|
+
hooks: {
|
|
20
|
+
applyDefaultOptions: (options) => {
|
|
21
|
+
options.toolchain ??= "stable";
|
|
22
|
+
options.fix ??= false;
|
|
23
|
+
return options;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
exports.cargoClippyExecutor = cargoClippyExecutor; exports.executor_default = executor_default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=
|
|
1
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__c6e5a1ff3e71b7415dce15be46368d04/node_modules/tsup/assets/esm_shims.js
|
|
2
2
|
import { fileURLToPath } from "url";
|
|
3
3
|
import path from "path";
|
|
4
4
|
var getFilename = () => fileURLToPath(import.meta.url);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkULCE72HVjs = require('./chunk-ULCE72HV.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunk32KQVUCFjs = require('./chunk-32KQVUCF.js');
|
|
8
|
+
|
|
9
|
+
// src/executors/cargo-doc/executor.ts
|
|
10
|
+
async function cargoDocExecutor(options, context) {
|
|
11
|
+
const opts = { ...options };
|
|
12
|
+
opts["no-deps"] = opts.noDeps;
|
|
13
|
+
delete opts.noDeps;
|
|
14
|
+
const command = _chunk32KQVUCFjs.buildCargoCommand.call(void 0, "doc", options, context);
|
|
15
|
+
return await _chunk32KQVUCFjs.cargoCommand.call(void 0, context.root, ...command);
|
|
16
|
+
}
|
|
17
|
+
var executor_default = _chunkULCE72HVjs.withRunExecutor.call(void 0,
|
|
18
|
+
"Cargo - Doc",
|
|
19
|
+
cargoDocExecutor,
|
|
20
|
+
{
|
|
21
|
+
skipReadingConfig: false,
|
|
22
|
+
hooks: {
|
|
23
|
+
applyDefaultOptions: (options) => {
|
|
24
|
+
options.outputPath ??= "dist/{projectRoot}/docs";
|
|
25
|
+
options.toolchain ??= "stable";
|
|
26
|
+
options.release ??= options.profile ? false : true;
|
|
27
|
+
options.allFeatures ??= true;
|
|
28
|
+
options.lib ??= true;
|
|
29
|
+
options.bins ??= true;
|
|
30
|
+
options.examples ??= true;
|
|
31
|
+
options.noDeps ??= false;
|
|
32
|
+
return options;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
exports.cargoDocExecutor = cargoDocExecutor; exports.executor_default = executor_default;
|