@storm-software/workspace-tools 1.294.40 → 1.294.41

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.
@@ -1,41 +0,0 @@
1
- import {
2
- withRunExecutor
3
- } from "./chunk-S3RWO7R6.mjs";
4
- import {
5
- buildCargoCommand,
6
- cargoCommand
7
- } from "./chunk-ZTN2676G.mjs";
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 = buildCargoCommand("doc", options, context);
15
- return await cargoCommand(context.root, ...command);
16
- }
17
- var executor_default = withRunExecutor(
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
- export {
39
- cargoDocExecutor,
40
- executor_default
41
- };
@@ -1,32 +0,0 @@
1
- import {
2
- withRunExecutor
3
- } from "./chunk-S3RWO7R6.mjs";
4
- import {
5
- buildCargoCommand,
6
- cargoCommand
7
- } from "./chunk-ZTN2676G.mjs";
8
-
9
- // src/executors/cargo-format/executor.ts
10
- async function cargoFormatExecutor(options, context) {
11
- const command = buildCargoCommand("fmt", options, context);
12
- return await cargoCommand(context.root, ...command);
13
- }
14
- var executor_default = withRunExecutor(
15
- "Cargo - Format",
16
- cargoFormatExecutor,
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
- cargoFormatExecutor,
31
- executor_default
32
- };
@@ -1,116 +0,0 @@
1
- import {
2
- withRunExecutor
3
- } from "./chunk-S3RWO7R6.mjs";
4
- import {
5
- cargoMetadata
6
- } from "./chunk-ZTN2676G.mjs";
7
- import {
8
- correctPaths,
9
- isAbsolute,
10
- joinPaths,
11
- relative
12
- } from "./chunk-TBW5MCN6.mjs";
13
-
14
- // src/executors/napi/executor.ts
15
- import { createJiti } from "jiti";
16
- import { fileExists } from "nx/src/utils/fileutils";
17
- async function napiExecutor(options, context, config) {
18
- const jiti = createJiti(config.workspaceRoot, {
19
- fsCache: config.skipCache ? false : joinPaths(
20
- config.workspaceRoot,
21
- config.directories.cache || "node_modules/.cache/storm",
22
- "jiti"
23
- ),
24
- interopDefault: true
25
- });
26
- const { NapiCli } = await jiti.import(
27
- jiti.esmResolve("@napi-rs/cli")
28
- );
29
- if (!context.projectGraph?.nodes[context.projectName ?? ""]) {
30
- throw new Error(
31
- "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."
32
- );
33
- }
34
- const projectRoot = context.projectGraph?.nodes[context.projectName ?? ""].data.root;
35
- const packageJson = joinPaths(projectRoot ?? ".", "package.json");
36
- if (!fileExists(packageJson)) {
37
- throw new Error(`Could not find package.json at ${packageJson}`);
38
- }
39
- const napi = new NapiCli();
40
- const normalizedOptions = { ...options };
41
- const metadata = cargoMetadata();
42
- normalizedOptions.targetDir = options.targetDir || metadata?.target_directory || joinPaths(config.workspaceRoot, "dist", "target");
43
- normalizedOptions.outputDir = options.outputPath;
44
- normalizedOptions.packageJsonPath = options.packageJsonPath || packageJson;
45
- if (options.cwd) {
46
- normalizedOptions.cwd = correctPaths(options.cwd);
47
- } else {
48
- normalizedOptions.cwd = correctPaths(projectRoot);
49
- const absoluteProjectRoot = joinPaths(
50
- config.workspaceRoot,
51
- projectRoot || "."
52
- );
53
- if (normalizedOptions.outputDir) {
54
- normalizedOptions.outputDir = relative(
55
- absoluteProjectRoot,
56
- correctPaths(
57
- isAbsolute(normalizedOptions.outputDir) ? normalizedOptions.outputDir : joinPaths(config.workspaceRoot, normalizedOptions.outputDir)
58
- )
59
- );
60
- }
61
- if (normalizedOptions.packageJsonPath) {
62
- normalizedOptions.packageJsonPath = relative(
63
- absoluteProjectRoot,
64
- correctPaths(
65
- isAbsolute(normalizedOptions.packageJsonPath) ? normalizedOptions.packageJsonPath : joinPaths(config.workspaceRoot, normalizedOptions.packageJsonPath)
66
- )
67
- );
68
- }
69
- if (normalizedOptions.configPath) {
70
- normalizedOptions.configPath = relative(
71
- absoluteProjectRoot,
72
- correctPaths(
73
- isAbsolute(normalizedOptions.configPath) ? normalizedOptions.configPath : joinPaths(config.workspaceRoot, normalizedOptions.configPath)
74
- )
75
- );
76
- }
77
- if (normalizedOptions.manifestPath) {
78
- normalizedOptions.manifestPath = relative(
79
- absoluteProjectRoot,
80
- correctPaths(
81
- isAbsolute(normalizedOptions.manifestPath) ? normalizedOptions.manifestPath : joinPaths(config.workspaceRoot, normalizedOptions.manifestPath)
82
- )
83
- );
84
- }
85
- }
86
- if (process.env.VERCEL) {
87
- return { success: true };
88
- }
89
- const { task } = await napi.build(normalizedOptions);
90
- return { success: true, terminalOutput: await task };
91
- }
92
- var executor_default = withRunExecutor(
93
- "Napi - Build Bindings",
94
- napiExecutor,
95
- {
96
- skipReadingConfig: false,
97
- hooks: {
98
- applyDefaultOptions: (options) => {
99
- options.outputPath ??= "{sourceRoot}";
100
- options.toolchain ??= "stable";
101
- options.dtsCache ??= true;
102
- options.platform ??= true;
103
- options.constEnum ??= false;
104
- options.verbose ??= false;
105
- options.jsBinding ??= "binding.js";
106
- options.dts ??= "binding.d.ts";
107
- return options;
108
- }
109
- }
110
- }
111
- );
112
-
113
- export {
114
- napiExecutor,
115
- executor_default
116
- };
@@ -1,31 +0,0 @@
1
- import {
2
- withRunExecutor
3
- } from "./chunk-S3RWO7R6.mjs";
4
- import {
5
- buildCargoCommand,
6
- cargoCommand
7
- } from "./chunk-ZTN2676G.mjs";
8
-
9
- // src/executors/cargo-check/executor.ts
10
- async function cargoCheckExecutor(options, context) {
11
- const command = buildCargoCommand("check", options, context);
12
- return await cargoCommand(context.root, ...command);
13
- }
14
- var executor_default = withRunExecutor(
15
- "Cargo - Check",
16
- cargoCheckExecutor,
17
- {
18
- skipReadingConfig: false,
19
- hooks: {
20
- applyDefaultOptions: (options) => {
21
- options.toolchain ??= "stable";
22
- return options;
23
- }
24
- }
25
- }
26
- );
27
-
28
- export {
29
- cargoCheckExecutor,
30
- executor_default
31
- };