@storm-software/workspace-tools 1.208.0 → 1.209.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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## 1.209.1 (2024-12-23)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **workspace-tools:** Resolved logging issue in `tsup` plugin
6
+ ([0b6bfc9e](https://github.com/storm-software/storm-ops/commit/0b6bfc9e))
7
+
8
+ ## 1.209.0 (2024-12-23)
9
+
10
+ ### Features
11
+
12
+ - **pulumi-tools:** Initial check-in of the `pulumi-tools` package
13
+ ([6b03c2ae](https://github.com/storm-software/storm-ops/commit/6b03c2ae))
14
+
1
15
  ## 1.208.0 (2024-12-23)
2
16
 
3
17
  ### Features
package/meta.json CHANGED
@@ -24797,7 +24797,7 @@
24797
24797
  "format": "esm"
24798
24798
  },
24799
24799
  "packages/workspace-tools/src/plugins/typescript/tsup.ts": {
24800
- "bytes": 4668,
24800
+ "bytes": 5163,
24801
24801
  "imports": [
24802
24802
  {
24803
24803
  "path": "@nx/devkit",
@@ -68548,13 +68548,13 @@
68548
68548
  "entryPoint": "packages/workspace-tools/src/plugins/typescript/tsup.ts",
68549
68549
  "inputs": {
68550
68550
  "packages/workspace-tools/src/plugins/typescript/tsup.ts": {
68551
- "bytesInOutput": 4402
68551
+ "bytesInOutput": 4899
68552
68552
  },
68553
68553
  "packages/workspace-tools/src/utils/project-tags.ts": {
68554
68554
  "bytesInOutput": 2559
68555
68555
  }
68556
68556
  },
68557
- "bytes": 8039
68557
+ "bytes": 8536
68558
68558
  },
68559
68559
  "dist/packages/workspace-tools/src/utils/index.js": {
68560
68560
  "imports": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/workspace-tools",
3
- "version": "1.208.0",
3
+ "version": "1.209.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": {
@@ -126,82 +126,95 @@ var createNodesV2 = [
126
126
  async (configFiles, options, context) => {
127
127
  return await (0, import_devkit.createNodesFromFiles)(
128
128
  (configFile, options2, context2) => {
129
- console.log(`Processing tsup.config.ts file: ${configFile}`);
130
- const projectRoot = createProjectRoot(
131
- configFile,
132
- context2.workspaceRoot
133
- );
134
- if (!projectRoot) {
135
- console.error(
136
- `tsup.config.ts file must be location in the project root directory: ${configFile}`
129
+ try {
130
+ console.log(`Processing tsup.config.ts file: ${configFile}`);
131
+ const projectRoot = createProjectRoot(
132
+ configFile,
133
+ context2.workspaceRoot
137
134
  );
138
- return {};
139
- }
140
- const packageJson = (0, import_devkit.readJsonFile)((0, import_node_path.join)(projectRoot, "package.json"));
141
- if (!packageJson) {
142
- console.error(
143
- `No package.json found in project root: ${projectRoot}`
144
- );
145
- return {};
146
- }
147
- if (!packageJson.devDependencies?.tsup && !packageJson.dependencies?.tsup) {
148
- console.warn(
149
- `No "tsup" dependency or devDependency found in package.json: ${configFile}
150
- Please add it to your dependencies by running "pnpm add tsup -D --filter="${packageJson.name}"`
151
- );
152
- }
153
- const project = createProjectFromPackageJsonNextToProjectJson(
154
- (0, import_node_path.join)(projectRoot, "project.json"),
155
- packageJson
156
- );
157
- const nxJson = (0, import_nx_json.readNxJson)(context2.workspaceRoot);
158
- const targets = (0, import_package_json.readTargetsFromPackageJson)(packageJson, nxJson);
159
- let relativeRoot = projectRoot.replace(context2.workspaceRoot, "").replaceAll("\\", "/");
160
- if (relativeRoot.startsWith("/")) {
161
- relativeRoot = relativeRoot.slice(1);
162
- }
163
- targets["build-base"] = {
164
- cache: true,
165
- inputs: [configFile, "typescript", "^production"],
166
- executor: "nx:run-commands",
167
- dependsOn: ["clean", "^build"],
168
- options: {
169
- command: `tsup --config="${configFile}"`,
170
- cwd: relativeRoot
135
+ if (!projectRoot) {
136
+ console.error(
137
+ `tsup.config.ts file must be location in the project root directory: ${configFile}`
138
+ );
139
+ return {};
171
140
  }
172
- };
173
- targets.build = {
174
- cache: true,
175
- inputs: [configFile, "typescript", "^production"],
176
- executor: "nx:run-commands",
177
- dependsOn: ["build-base"],
178
- options: {
179
- commands: [
180
- `pnpm copyfiles LICENSE dist/${relativeRoot}`,
181
- `pnpm copyfiles --up=2 ./${relativeRoot}/README.md ./${relativeRoot}/package.json dist/${relativeRoot}`,
182
- `pnpm copyfiles --up=3 ./${relativeRoot}/dist/* dist/${relativeRoot}/dist`
183
- ]
141
+ const packageJson = (0, import_devkit.readJsonFile)((0, import_node_path.join)(projectRoot, "package.json"));
142
+ if (!packageJson) {
143
+ console.error(
144
+ `No package.json found in project root: ${projectRoot}`
145
+ );
146
+ return {};
184
147
  }
185
- };
186
- targets.clean = {
187
- executor: "nx:run-commands",
188
- inputs: [configFile, "typescript", "^production"],
189
- options: {
190
- commands: [
191
- `pnpm exec rimraf dist/${relativeRoot}`,
192
- `pnpm exec rimraf ${relativeRoot}/dist`
193
- ]
148
+ if (!packageJson.devDependencies?.tsup && !packageJson.dependencies?.tsup) {
149
+ console.warn(
150
+ `No "tsup" dependency or devDependency found in package.json: ${configFile}
151
+ Please add it to your dependencies by running "pnpm add tsup -D --filter="${packageJson.name}"`
152
+ );
194
153
  }
195
- };
196
- setDefaultProjectTags(project, name);
197
- return project?.name ? {
198
- projects: {
199
- [project.name]: {
200
- ...project,
201
- targets
202
- }
154
+ const project = createProjectFromPackageJsonNextToProjectJson(
155
+ (0, import_node_path.join)(projectRoot, "project.json"),
156
+ packageJson
157
+ );
158
+ const nxJson = (0, import_nx_json.readNxJson)(context2.workspaceRoot);
159
+ const targets = (0, import_package_json.readTargetsFromPackageJson)(packageJson, nxJson);
160
+ let relativeRoot = projectRoot.replace(context2.workspaceRoot, "").replaceAll("\\", "/");
161
+ if (relativeRoot.startsWith("/")) {
162
+ relativeRoot = relativeRoot.slice(1);
203
163
  }
204
- } : {};
164
+ targets["build-base"] ??= {
165
+ cache: true,
166
+ inputs: [
167
+ `{workspaceRoot}/${configFile}`,
168
+ "typescript",
169
+ "^production"
170
+ ],
171
+ executor: "nx:run-commands",
172
+ dependsOn: ["clean", "^build"],
173
+ options: {
174
+ command: `tsup --config="${configFile}"`,
175
+ cwd: relativeRoot
176
+ }
177
+ };
178
+ targets.build ??= {
179
+ cache: true,
180
+ inputs: ["typescript", "^production"],
181
+ executor: "nx:run-commands",
182
+ dependsOn: ["build-base"],
183
+ options: {
184
+ commands: [
185
+ `pnpm copyfiles LICENSE dist/${relativeRoot}`,
186
+ `pnpm copyfiles --up=2 ./${relativeRoot}/README.md ./${relativeRoot}/package.json dist/${relativeRoot}`,
187
+ `pnpm copyfiles --up=3 ./${relativeRoot}/dist/* dist/${relativeRoot}/dist`
188
+ ]
189
+ }
190
+ };
191
+ targets.clean = {
192
+ executor: "nx:run-commands",
193
+ inputs: [
194
+ `{workspaceRoot}/${configFile}`,
195
+ "typescript",
196
+ "^production"
197
+ ],
198
+ options: {
199
+ commands: [
200
+ `pnpm exec rimraf dist/${relativeRoot}`,
201
+ `pnpm exec rimraf ${relativeRoot}/dist`
202
+ ]
203
+ }
204
+ };
205
+ setDefaultProjectTags(project, name);
206
+ return project?.name ? {
207
+ projects: {
208
+ [project.name]: {
209
+ ...project,
210
+ targets
211
+ }
212
+ }
213
+ } : {};
214
+ } catch (e) {
215
+ console.error(e);
216
+ return {};
217
+ }
205
218
  },
206
219
  configFiles,
207
220
  options,
@@ -212,11 +225,14 @@ Please add it to your dependencies by running "pnpm add tsup -D --filter="${pack
212
225
  function createProjectFromPackageJsonNextToProjectJson(projectJsonPath, packageJson) {
213
226
  const { nx, name: name2 } = packageJson;
214
227
  const root = (0, import_node_path.dirname)(projectJsonPath);
228
+ const projectJson = (0, import_devkit.readJsonFile)(projectJsonPath);
215
229
  return {
230
+ targets: {},
231
+ tags: [],
216
232
  ...nx,
233
+ ...projectJson,
217
234
  name: name2,
218
- root,
219
- targets: {}
235
+ root
220
236
  };
221
237
  }
222
238
  function createProjectRoot(configPath, workspaceRoot) {