@storm-software/workspace-tools 1.292.15 → 1.292.18
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 +66 -0
- package/README.md +4 -36
- package/config/base.json +13 -14
- package/dist/{chunk-UCXAD2SG.mjs → chunk-6PVCCKX4.mjs} +1 -1
- package/dist/chunk-ANHKV7HZ.js +22 -0
- package/dist/{chunk-PUFTJ2BG.mjs → chunk-D2ENLOCH.mjs} +14 -12
- package/dist/{chunk-MGF3DTWM.js → chunk-EECJXHDA.js} +50 -17
- package/dist/chunk-EGI64HQ2.mjs +22 -0
- package/dist/chunk-EYRX4NM6.mjs +213 -0
- package/dist/{chunk-LOFMB5G3.mjs → chunk-IPWUJVZZ.mjs} +1 -1
- package/dist/{chunk-YNLDYAEE.mjs → chunk-JHJLQ2O7.mjs} +1 -1
- package/dist/{chunk-452FQZ3B.js → chunk-JWFGGMYQ.js} +1 -6
- package/dist/{chunk-Q57UD72U.mjs → chunk-KCVIHYZQ.mjs} +1 -1
- package/dist/{chunk-7DLHAWLG.mjs → chunk-MU6OJDOC.mjs} +1 -1
- package/dist/{chunk-IBTPJDV6.js → chunk-N3YCERS6.js} +5 -2
- package/dist/{chunk-WV5SNA37.js → chunk-O2FPRXPD.js} +17 -15
- package/dist/{chunk-FQSIFEMR.mjs → chunk-OOR7HG4P.mjs} +37 -4
- package/dist/{chunk-2LY7DGBH.mjs → chunk-OV33RACH.mjs} +5 -2
- package/dist/{chunk-WRXLSZ6I.js → chunk-POXELQII.js} +2 -2
- package/dist/{chunk-B4RJUBHW.mjs → chunk-QUHBEE5D.mjs} +1 -1
- package/dist/chunk-SAIDGUHG.mjs +0 -0
- package/dist/chunk-TCGF4GS7.js +213 -0
- package/dist/chunk-TJRQRM4Z.mjs +49 -0
- package/dist/chunk-W4IH547O.js +49 -0
- package/dist/{chunk-2ONEZU6V.mjs → chunk-WH72XZPS.mjs} +1 -1
- package/dist/{chunk-SVIG7SR3.mjs → chunk-X2SLQ73Q.mjs} +1 -6
- package/dist/chunk-YYLV7UA6.js +1 -0
- package/dist/{chunk-7QY4X73C.js → chunk-ZP4B44CQ.js} +2 -2
- package/dist/executors.js +16 -17
- package/dist/executors.mjs +19 -20
- package/dist/generators.d.mts +0 -2
- package/dist/generators.d.ts +0 -2
- package/dist/generators.js +8 -14
- package/dist/generators.mjs +13 -19
- package/dist/index.d.mts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +39 -34
- package/dist/index.mjs +53 -48
- 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.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.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.js +3 -3
- package/dist/src/executors/cargo-publish/executor.mjs +3 -3
- 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/npm-publish/executor.js +4 -5
- package/dist/src/executors/npm-publish/executor.mjs +4 -5
- 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.mjs +1 -1
- 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.mjs +2 -2
- package/dist/src/generators/browser-library/untyped.mjs +1 -1
- 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.mjs +2 -2
- package/dist/src/generators/neutral-library/untyped.mjs +1 -1
- 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.mjs +2 -2
- package/dist/src/generators/preset/untyped.mjs +1 -1
- package/dist/src/plugins/rust/cargo-toml.js +2 -2
- package/dist/src/plugins/rust/cargo-toml.mjs +2 -2
- package/dist/src/plugins/rust/index.js +2 -2
- package/dist/src/plugins/rust/index.mjs +2 -2
- package/dist/src/plugins/typescript/index.js +22 -22
- package/dist/src/plugins/typescript/index.mjs +23 -23
- package/dist/src/plugins/typescript/tsdown.mjs +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.d.mts +11 -0
- package/dist/src/release/index.d.ts +11 -0
- package/dist/src/release/index.js +17 -0
- package/dist/src/release/index.mjs +18 -0
- package/dist/src/release/js-version-actions.d.mts +44 -0
- package/dist/src/release/js-version-actions.d.ts +44 -0
- package/dist/src/release/js-version-actions.js +10 -0
- package/dist/src/release/js-version-actions.mjs +11 -0
- package/dist/src/release/rust-version-actions.d.mts +56 -0
- package/dist/src/release/rust-version-actions.d.ts +56 -0
- package/dist/src/release/rust-version-actions.js +12 -0
- package/dist/src/release/rust-version-actions.mjs +13 -0
- 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/index.js +11 -11
- package/dist/src/utils/index.mjs +18 -18
- package/dist/src/utils/lock-file.d.mts +2 -2
- package/dist/src/utils/lock-file.d.ts +2 -2
- package/dist/src/utils/lock-file.mjs +1 -1
- package/dist/src/utils/nx-json.d.mts +3 -27
- package/dist/src/utils/nx-json.d.ts +3 -27
- package/dist/src/utils/nx-json.js +2 -2
- package/dist/src/utils/nx-json.mjs +2 -2
- package/dist/src/utils/package-helpers.js +3 -3
- package/dist/src/utils/package-helpers.mjs +3 -3
- package/dist/src/utils/plugin-helpers.d.mts +2 -2
- package/dist/src/utils/plugin-helpers.d.ts +2 -2
- package/dist/src/utils/plugin-helpers.mjs +1 -1
- package/dist/src/utils/project-tags.mjs +1 -1
- package/dist/src/utils/registry-helpers.d.mts +11 -0
- package/dist/src/utils/registry-helpers.d.ts +11 -0
- package/dist/src/utils/registry-helpers.js +6 -0
- package/dist/src/utils/registry-helpers.mjs +7 -0
- package/dist/src/utils/typia-transform.mjs +1 -1
- package/dist/src/utils/versions.mjs +1 -1
- package/package.json +47 -18
- package/dist/chunk-J4I6MJT2.js +0 -73
- package/dist/chunk-JLXBL5BC.mjs +0 -73
- package/dist/chunk-WEL4BVFX.js +0 -1049
- package/dist/chunk-ZZWU35JU.mjs +0 -1049
- package/dist/generator-DLXza9BZ.d.ts +0 -186
- package/dist/generator-DVYJZa5j.d.mts +0 -186
- package/dist/src/generators/release-version/generator.d.mts +0 -6
- package/dist/src/generators/release-version/generator.d.ts +0 -6
- package/dist/src/generators/release-version/generator.js +0 -14
- package/dist/src/generators/release-version/generator.mjs +0 -15
- package/dist/src/generators/release-version/schema.d.ts +0 -180
- package/dist/src/generators/release-version/schema.json +0 -158
- package/dist/src/generators/release-version/untyped.d.mts +0 -5
- package/dist/src/generators/release-version/untyped.d.ts +0 -5
- package/dist/src/generators/release-version/untyped.js +0 -159
- package/dist/src/generators/release-version/untyped.mjs +0 -161
- package/docs/api/generators/release-version/schema.md +0 -160
- /package/dist/{chunk-RLIZVCIN.mjs → chunk-5GZC2PF6.mjs} +0 -0
- /package/dist/{chunk-INERRJ6Q.js → chunk-C3TC7AUW.js} +0 -0
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getCrateRegistryVersion
|
|
3
|
+
} from "./chunk-EGI64HQ2.mjs";
|
|
4
|
+
import {
|
|
5
|
+
parseCargoToml,
|
|
6
|
+
parseCargoTomlWithTree,
|
|
7
|
+
stringifyCargoToml
|
|
8
|
+
} from "./chunk-X2SLQ73Q.mjs";
|
|
9
|
+
import {
|
|
10
|
+
getWorkspaceConfig
|
|
11
|
+
} from "./chunk-NOTQLVZP.mjs";
|
|
12
|
+
|
|
13
|
+
// src/release/rust-version-actions.ts
|
|
14
|
+
import {
|
|
15
|
+
joinPathFragments
|
|
16
|
+
} from "@nx/devkit";
|
|
17
|
+
import { VersionActions } from "nx/release";
|
|
18
|
+
var StormRustVersionActions = class extends VersionActions {
|
|
19
|
+
validManifestFilenames = ["Cargo.toml"];
|
|
20
|
+
/**
|
|
21
|
+
* The Storm workspace configuration object, which is loaded from the `storm-workspace.json` file.
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
* This member variable is populated during the {@link init} method.
|
|
25
|
+
*/
|
|
26
|
+
workspaceConfig = null;
|
|
27
|
+
constructor(releaseGroup, projectGraphNode, finalConfigForProject) {
|
|
28
|
+
super(releaseGroup, projectGraphNode, finalConfigForProject);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Asynchronous initialization of the version actions and resolution of manifest paths.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* This does NOT validate that manifest files exist - that happens later in validate().
|
|
35
|
+
*
|
|
36
|
+
* @params tree - The file system tree to read from.
|
|
37
|
+
*/
|
|
38
|
+
async init(tree) {
|
|
39
|
+
this.workspaceConfig = await getWorkspaceConfig();
|
|
40
|
+
return super.init(tree);
|
|
41
|
+
}
|
|
42
|
+
async readCurrentVersionFromSourceManifest(tree) {
|
|
43
|
+
const sourceCargoTomlPath = joinPathFragments(
|
|
44
|
+
this.projectGraphNode.data.root,
|
|
45
|
+
"Cargo.toml"
|
|
46
|
+
);
|
|
47
|
+
try {
|
|
48
|
+
const cargoToml = parseCargoTomlWithTree(
|
|
49
|
+
tree,
|
|
50
|
+
this.projectGraphNode.data.root,
|
|
51
|
+
this.projectGraphNode.name
|
|
52
|
+
);
|
|
53
|
+
return {
|
|
54
|
+
manifestPath: sourceCargoTomlPath,
|
|
55
|
+
currentVersion: cargoToml.package.version
|
|
56
|
+
};
|
|
57
|
+
} catch {
|
|
58
|
+
throw new Error(
|
|
59
|
+
`Unable to determine the current version for project "${this.projectGraphNode.name}" from ${sourceCargoTomlPath}, please ensure that the "version" field is set within the Cargo.toml file`
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
async readCurrentVersionFromRegistry(tree, currentVersionResolverMetadata) {
|
|
64
|
+
const cargoToml = parseCargoTomlWithTree(
|
|
65
|
+
tree,
|
|
66
|
+
this.projectGraphNode.data.root,
|
|
67
|
+
this.projectGraphNode.name
|
|
68
|
+
);
|
|
69
|
+
const crateName = cargoToml.package.name;
|
|
70
|
+
const metadata = currentVersionResolverMetadata;
|
|
71
|
+
const registryArg = typeof metadata?.registry === "string" ? metadata.registry : this.workspaceConfig?.registry?.cargo || "https://crates.io";
|
|
72
|
+
const tagArg = typeof metadata?.tag === "string" ? metadata.tag : "latest";
|
|
73
|
+
let currentVersion = null;
|
|
74
|
+
try {
|
|
75
|
+
currentVersion = await getCrateRegistryVersion(
|
|
76
|
+
crateName,
|
|
77
|
+
tagArg,
|
|
78
|
+
registryArg
|
|
79
|
+
);
|
|
80
|
+
} catch {
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
currentVersion: currentVersion || "0.0.0",
|
|
84
|
+
// Make troubleshooting easier by including the registry and tag data in the log text
|
|
85
|
+
logText: `"cargoRegistry=${registryArg}" tag=${tagArg}`
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
async readCurrentVersionOfDependency(tree, projectGraph, dependencyProjectName) {
|
|
89
|
+
const cargoToml = parseCargoTomlWithTree(
|
|
90
|
+
tree,
|
|
91
|
+
this.projectGraphNode.data.root,
|
|
92
|
+
this.projectGraphNode.name
|
|
93
|
+
);
|
|
94
|
+
if (!projectGraph.nodes[dependencyProjectName]?.data?.root) {
|
|
95
|
+
return {
|
|
96
|
+
currentVersion: null,
|
|
97
|
+
dependencyCollection: null
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
const dependencyCargoToml = parseCargoTomlWithTree(
|
|
101
|
+
tree,
|
|
102
|
+
projectGraph.nodes[dependencyProjectName]?.data.root,
|
|
103
|
+
dependencyProjectName
|
|
104
|
+
);
|
|
105
|
+
if (!dependencyCargoToml?.package?.name) {
|
|
106
|
+
return {
|
|
107
|
+
currentVersion: null,
|
|
108
|
+
dependencyCollection: null
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
let currentVersion = null;
|
|
112
|
+
let dependencyCollection = null;
|
|
113
|
+
for (const depType of ["dependencies", "dev-dependencies"]) {
|
|
114
|
+
if (cargoToml[depType] && cargoToml[depType][dependencyCargoToml.package.name]) {
|
|
115
|
+
currentVersion = typeof cargoToml[depType][dependencyCargoToml.package.name] === "string" ? cargoToml[depType][dependencyCargoToml.package.name] : cargoToml[depType][dependencyCargoToml.package.name].version;
|
|
116
|
+
dependencyCollection = depType;
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
currentVersion,
|
|
122
|
+
dependencyCollection
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
async updateProjectVersion(tree, newVersion) {
|
|
126
|
+
const logMessages = [];
|
|
127
|
+
for (const manifestToUpdate of this.manifestsToUpdate) {
|
|
128
|
+
const cargoTomlString = tree.read(manifestToUpdate.manifestPath)?.toString();
|
|
129
|
+
if (!cargoTomlString) {
|
|
130
|
+
throw new Error(
|
|
131
|
+
`Unable to read Cargo.toml at path: ${manifestToUpdate.manifestPath}`
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
const cargoToml = parseCargoToml(cargoTomlString);
|
|
135
|
+
cargoToml.package.version = newVersion;
|
|
136
|
+
tree.write(manifestToUpdate.manifestPath, stringifyCargoToml(cargoToml));
|
|
137
|
+
logMessages.push(
|
|
138
|
+
`\u270D\uFE0F New version ${newVersion} written to manifest: ${manifestToUpdate.manifestPath}`
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
return logMessages;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Updates the dependencies of the project in the specified Cargo.toml files.
|
|
145
|
+
*
|
|
146
|
+
* @param tree - The file system tree to read from and write to.
|
|
147
|
+
* @param projectGraph - The project graph to use for resolving dependencies.
|
|
148
|
+
* @param dependenciesToUpdate - A mapping of dependency names to their new versions.
|
|
149
|
+
* @returns An array of log messages indicating the results of the updates.
|
|
150
|
+
*/
|
|
151
|
+
async updateProjectDependencies(tree, projectGraph, dependenciesToUpdate = {}) {
|
|
152
|
+
const numDependenciesToUpdate = Object.keys(dependenciesToUpdate).length;
|
|
153
|
+
if (numDependenciesToUpdate === 0) {
|
|
154
|
+
return [];
|
|
155
|
+
}
|
|
156
|
+
const logMessages = [];
|
|
157
|
+
for (const manifestToUpdate of this.manifestsToUpdate) {
|
|
158
|
+
const cargoTomlString = tree.read(manifestToUpdate.manifestPath)?.toString();
|
|
159
|
+
if (!cargoTomlString) {
|
|
160
|
+
throw new Error(
|
|
161
|
+
`Unable to read Cargo.toml at path: ${manifestToUpdate.manifestPath}`
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
const cargoToml = parseCargoToml(cargoTomlString);
|
|
165
|
+
for (const depType of ["dependencies", "dev-dependencies"]) {
|
|
166
|
+
if (cargoToml[depType]) {
|
|
167
|
+
for (const [dep, version] of Object.entries(dependenciesToUpdate)) {
|
|
168
|
+
try {
|
|
169
|
+
const projectRoot = projectGraph.nodes[dep]?.data.root;
|
|
170
|
+
if (!projectRoot) {
|
|
171
|
+
throw new Error(
|
|
172
|
+
`Unable to determine the project root for "${dep}" from the project graph metadata, please ensure that the "@storm-software/workspace-tools" plugin is installed and the project graph has been built. If the issue persists, please report this issue on https://github.com/storm-software/storm-ops/issues`
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
const dependencyCargoTomlString = tree.read(manifestToUpdate.manifestPath)?.toString();
|
|
176
|
+
if (!dependencyCargoTomlString) {
|
|
177
|
+
throw new Error(
|
|
178
|
+
`Unable to read Cargo.toml at path: ${manifestToUpdate.manifestPath}`
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
const dependencyCargoToml = parseCargoToml(
|
|
182
|
+
dependencyCargoTomlString
|
|
183
|
+
);
|
|
184
|
+
const dependencyCrateName = cargoToml[depType][dependencyCargoToml.package.name] ? dependencyCargoToml.package.name : dep;
|
|
185
|
+
if (typeof cargoToml[depType][dependencyCrateName] === "string") {
|
|
186
|
+
cargoToml[depType][dependencyCrateName] = version;
|
|
187
|
+
} else {
|
|
188
|
+
cargoToml[depType][dependencyCrateName].version = version;
|
|
189
|
+
}
|
|
190
|
+
tree.write(
|
|
191
|
+
manifestToUpdate.manifestPath,
|
|
192
|
+
stringifyCargoToml(cargoToml)
|
|
193
|
+
);
|
|
194
|
+
} catch (error) {
|
|
195
|
+
throw new Error(
|
|
196
|
+
`Unable to update ${depType === "dev-dependencies" ? "dev-dependency" : "dependency"} "${dep}" in manifest at path: ${manifestToUpdate.manifestPath}.`,
|
|
197
|
+
{ cause: error }
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
logMessages.push(
|
|
204
|
+
`\u270D\uFE0F Updated ${numDependenciesToUpdate} ${numDependenciesToUpdate === 1 ? "dependency" : "dependencies"} in manifest: ${manifestToUpdate.manifestPath}`
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
return logMessages;
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
export {
|
|
212
|
+
StormRustVersionActions
|
|
213
|
+
};
|
|
@@ -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__ddff3f80acdb8654ef4815831fcbcdde/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);
|
|
@@ -29,14 +29,9 @@ function stringifyCargoToml(cargoToml) {
|
|
|
29
29
|
}
|
|
30
30
|
return tomlString;
|
|
31
31
|
}
|
|
32
|
-
function modifyCargoTable(toml, section, key, value) {
|
|
33
|
-
toml[section] ??= _jtoml2.default.Section({});
|
|
34
|
-
toml[section][key] = typeof value === "object" && !Array.isArray(value) ? _jtoml2.default.inline(value) : typeof value === "function" ? value() : value;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
32
|
|
|
38
33
|
|
|
39
34
|
|
|
40
35
|
|
|
41
36
|
|
|
42
|
-
exports.parseCargoTomlWithTree = parseCargoTomlWithTree; exports.parseCargoToml = parseCargoToml; exports.stringifyCargoToml = stringifyCargoToml;
|
|
37
|
+
exports.parseCargoTomlWithTree = parseCargoTomlWithTree; exports.parseCargoToml = parseCargoToml; exports.stringifyCargoToml = stringifyCargoToml;
|
|
@@ -297,13 +297,16 @@ var RELEASE = {
|
|
|
297
297
|
},
|
|
298
298
|
version: {
|
|
299
299
|
groupPreVersionCommand: "pnpm build",
|
|
300
|
-
generator: "@storm-software/workspace-tools:release-version",
|
|
301
300
|
currentVersionResolver: "git-tag",
|
|
302
301
|
specifierSource: "conventional-commits",
|
|
303
|
-
|
|
302
|
+
versionActions: "@storm-software/workspace-tools:release-version",
|
|
303
|
+
versionActionsOptions: {
|
|
304
304
|
currentVersionResolver: "git-tag",
|
|
305
305
|
specifierSource: "conventional-commits"
|
|
306
306
|
}
|
|
307
|
+
},
|
|
308
|
+
releaseTag: {
|
|
309
|
+
pattern: "{projectName}@{version}"
|
|
307
310
|
}
|
|
308
311
|
}
|
|
309
312
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
var _chunkJ6F3WHRBjs = require('./chunk-J6F3WHRB.js');
|
|
4
4
|
|
|
@@ -18,6 +18,7 @@ var _chunkAX3RSZT7js = require('./chunk-AX3RSZT7.js');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
var _devkit = require('@nx/devkit');
|
|
21
|
+
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
21
22
|
var _fs = require('fs');
|
|
22
23
|
var _path = require('path');
|
|
23
24
|
|
|
@@ -85,7 +86,7 @@ var createNodesV2 = [
|
|
|
85
86
|
if (includeApps === false && project.projectType === "application") {
|
|
86
87
|
continue;
|
|
87
88
|
}
|
|
88
|
-
|
|
89
|
+
const targets = {
|
|
89
90
|
"lint-markdown": {
|
|
90
91
|
cache: true,
|
|
91
92
|
outputs: ["{projectRoot}/**/*.md", "{projectRoot}/**/*.mdx"],
|
|
@@ -234,7 +235,7 @@ var createNodesV2 = [
|
|
|
234
235
|
}
|
|
235
236
|
};
|
|
236
237
|
if (skipDocs != true) {
|
|
237
|
-
|
|
238
|
+
targets.docs = {
|
|
238
239
|
cache: true,
|
|
239
240
|
inputs: ["linting", "documentation", "^production"],
|
|
240
241
|
dependsOn: ["format-readme", "lint-docs", "^docs"],
|
|
@@ -254,7 +255,7 @@ var createNodesV2 = [
|
|
|
254
255
|
_chunkAX3RSZT7js.ProjectTagConstants.Registry.CARGO,
|
|
255
256
|
{ overwrite: true }
|
|
256
257
|
);
|
|
257
|
-
|
|
258
|
+
targets["nx-release-publish"] = {
|
|
258
259
|
cache: true,
|
|
259
260
|
inputs: [
|
|
260
261
|
"linting",
|
|
@@ -279,21 +280,22 @@ var createNodesV2 = [
|
|
|
279
280
|
{ overwrite: true }
|
|
280
281
|
);
|
|
281
282
|
_chunkAX3RSZT7js.setDefaultProjectTags.call(void 0, project, name);
|
|
282
|
-
projects[root] =
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
283
|
+
projects[root] = _defu2.default.call(void 0,
|
|
284
|
+
{
|
|
285
|
+
targets,
|
|
286
|
+
release: {
|
|
287
|
+
version: {
|
|
288
|
+
versionActions: "@storm-software/workspace-tools/release/rust-version-actions"
|
|
289
|
+
}
|
|
289
290
|
}
|
|
290
|
-
}
|
|
291
|
-
|
|
291
|
+
},
|
|
292
|
+
project
|
|
293
|
+
);
|
|
292
294
|
}
|
|
293
295
|
for (const dep of cargoPackage.dependencies) {
|
|
294
296
|
if (_chunkLJDV7HFTjs.isExternal.call(void 0, dep, context2.workspaceRoot)) {
|
|
295
297
|
const externalDepName = `cargo:${dep.name}`;
|
|
296
|
-
if (!_optionalChain([externalNodes, 'optionalAccess',
|
|
298
|
+
if (!_optionalChain([externalNodes, 'optionalAccess', _6 => _6[externalDepName]])) {
|
|
297
299
|
externalNodes[externalDepName] = {
|
|
298
300
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
299
301
|
type: "cargo",
|
|
@@ -301,7 +303,7 @@ var createNodesV2 = [
|
|
|
301
303
|
name: externalDepName,
|
|
302
304
|
data: {
|
|
303
305
|
packageName: dep.name,
|
|
304
|
-
version: _nullishCoalesce(_optionalChain([cargoPackageMap, 'access',
|
|
306
|
+
version: _nullishCoalesce(_optionalChain([cargoPackageMap, 'access', _7 => _7.get, 'call', _8 => _8(dep.name), 'optionalAccess', _9 => _9.version]), () => ( "0.0.0"))
|
|
305
307
|
}
|
|
306
308
|
};
|
|
307
309
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addPackageJsonGitHead
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6PVCCKX4.mjs";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "./chunk-JLXBL5BC.mjs";
|
|
5
|
+
getConfig
|
|
6
|
+
} from "./chunk-NOTQLVZP.mjs";
|
|
8
7
|
import {
|
|
9
8
|
findWorkspaceRoot
|
|
10
9
|
} from "./chunk-VGJEUOUN.mjs";
|
|
@@ -12,6 +11,37 @@ import {
|
|
|
12
11
|
joinPaths
|
|
13
12
|
} from "./chunk-C26A6BXG.mjs";
|
|
14
13
|
|
|
14
|
+
// ../npm-tools/src/helpers/get-registry.ts
|
|
15
|
+
import { exec } from "node:child_process";
|
|
16
|
+
|
|
17
|
+
// ../npm-tools/src/constants.ts
|
|
18
|
+
var DEFAULT_NPM_REGISTRY = "https://registry.npmjs.org";
|
|
19
|
+
|
|
20
|
+
// ../npm-tools/src/helpers/get-registry.ts
|
|
21
|
+
async function getRegistry() {
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
23
|
+
exec("npm config get registry", (error, stdout, stderr) => {
|
|
24
|
+
if (error) {
|
|
25
|
+
return reject(error);
|
|
26
|
+
}
|
|
27
|
+
if (stderr) {
|
|
28
|
+
return reject(stderr);
|
|
29
|
+
}
|
|
30
|
+
return resolve(stdout.trim());
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
async function getNpmRegistry() {
|
|
35
|
+
if (process.env.STORM_REGISTRY_NPM) {
|
|
36
|
+
return process.env.STORM_REGISTRY_NPM;
|
|
37
|
+
}
|
|
38
|
+
const workspaceConfig = await getConfig();
|
|
39
|
+
if (workspaceConfig?.registry?.npm) {
|
|
40
|
+
return workspaceConfig?.registry?.npm;
|
|
41
|
+
}
|
|
42
|
+
return DEFAULT_NPM_REGISTRY;
|
|
43
|
+
}
|
|
44
|
+
|
|
15
45
|
// ../pnpm-tools/src/helpers/replace-deps-aliases.ts
|
|
16
46
|
import {
|
|
17
47
|
createProjectGraphAsync,
|
|
@@ -21,6 +51,9 @@ import { existsSync as existsSync2 } from "node:fs";
|
|
|
21
51
|
import { readFile as readFile2, writeFile as writeFile2 } from "node:fs/promises";
|
|
22
52
|
import { format } from "prettier";
|
|
23
53
|
|
|
54
|
+
// ../npm-tools/src/helpers/get-version.ts
|
|
55
|
+
import { exec as exec2 } from "node:child_process";
|
|
56
|
+
|
|
24
57
|
// ../pnpm-tools/src/helpers/catalog.ts
|
|
25
58
|
import { coerce, gt, valid } from "semver";
|
|
26
59
|
|
|
@@ -297,13 +297,16 @@ var RELEASE = {
|
|
|
297
297
|
},
|
|
298
298
|
version: {
|
|
299
299
|
groupPreVersionCommand: "pnpm build",
|
|
300
|
-
generator: "@storm-software/workspace-tools:release-version",
|
|
301
300
|
currentVersionResolver: "git-tag",
|
|
302
301
|
specifierSource: "conventional-commits",
|
|
303
|
-
|
|
302
|
+
versionActions: "@storm-software/workspace-tools:release-version",
|
|
303
|
+
versionActionsOptions: {
|
|
304
304
|
currentVersionResolver: "git-tag",
|
|
305
305
|
specifierSource: "conventional-commits"
|
|
306
306
|
}
|
|
307
|
+
},
|
|
308
|
+
releaseTag: {
|
|
309
|
+
pattern: "{projectName}@{version}"
|
|
307
310
|
}
|
|
308
311
|
}
|
|
309
312
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJWFGGMYQjs = require('./chunk-JWFGGMYQ.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/cargo-publish/executor.ts
|
|
6
6
|
var _devkit = require('@nx/devkit');
|
|
@@ -25,7 +25,7 @@ async function runExecutor(options, context) {
|
|
|
25
25
|
context.root,
|
|
26
26
|
options.packageRoot ? options.packageRoot : root
|
|
27
27
|
);
|
|
28
|
-
const cargoToml =
|
|
28
|
+
const cargoToml = _chunkJWFGGMYQjs.parseCargoToml.call(void 0,
|
|
29
29
|
_fs.readFileSync.call(void 0, _devkit.joinPathFragments.call(void 0, packageRoot, "Cargo.toml"), "utf-8")
|
|
30
30
|
);
|
|
31
31
|
try {
|
|
File without changes
|