@crossplatformai/dependency-graph 0.9.2 → 0.9.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@crossplatformai/dependency-graph",
3
3
  "description": "Shared dependency graph plugin for CrossPlatform.ai projects",
4
- "version": "0.9.2",
4
+ "version": "0.9.3",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "license": "SEE LICENSE IN LICENSE",
@@ -31,7 +31,7 @@
31
31
  "test": "vitest run",
32
32
  "test:watch": "vitest",
33
33
  "publish:next": "npm publish --tag next",
34
- "publish:production": "npm publish --tag latest"
34
+ "publish:latest": "npm view ${npm_package_name}@${npm_package_version} version >/dev/null 2>&1 && npm dist-tag add ${npm_package_name}@${npm_package_version} latest || npm publish --tag latest"
35
35
  },
36
36
  "dependencies": {
37
37
  "glob": "^11.0.1",
@@ -163,12 +163,14 @@ function discoverPnpmWorkflows(rootDir: string): string[] {
163
163
 
164
164
  /**
165
165
  * Dynamically discover Dockerfiles that install pnpm
166
+ * Scans both root directory and app directories
166
167
  */
167
168
  function discoverPnpmDockerfiles(rootDir: string): string[] {
168
169
  const dockerfiles: string[] = [];
169
- const entries = readdirSync(rootDir);
170
170
 
171
- for (const entry of entries) {
171
+ // Check root-level Dockerfiles
172
+ const rootEntries = readdirSync(rootDir);
173
+ for (const entry of rootEntries) {
172
174
  if (entry.startsWith('Dockerfile')) {
173
175
  const content = readFileSync(join(rootDir, entry), 'utf-8');
174
176
  if (content.includes('pnpm@')) {
@@ -177,6 +179,23 @@ function discoverPnpmDockerfiles(rootDir: string): string[] {
177
179
  }
178
180
  }
179
181
 
182
+ // Check app directories for Dockerfiles
183
+ const appsDir = join(rootDir, 'apps');
184
+ if (existsSync(appsDir)) {
185
+ const appEntries = readdirSync(appsDir, { withFileTypes: true });
186
+ for (const entry of appEntries) {
187
+ if (entry.isDirectory()) {
188
+ const dockerfilePath = join(appsDir, entry.name, 'Dockerfile');
189
+ if (existsSync(dockerfilePath)) {
190
+ const content = readFileSync(dockerfilePath, 'utf-8');
191
+ if (content.includes('pnpm@')) {
192
+ dockerfiles.push(`apps/${entry.name}/Dockerfile`);
193
+ }
194
+ }
195
+ }
196
+ }
197
+ }
198
+
180
199
  return dockerfiles;
181
200
  }
182
201
 
@@ -436,9 +455,15 @@ function getExpectedPaths(
436
455
  }
437
456
 
438
457
  // Auto-discover Dockerfiles for this app
439
- const dockerfileName = `Dockerfile.${appName}`;
440
- if (existsSync(join(rootDir, dockerfileName))) {
441
- paths.push(dockerfileName);
458
+ // Support both root-level (legacy) and app-directory (new) locations
459
+ const rootDockerfile = `Dockerfile.${appName}`;
460
+ const appDockerfile = `apps/${appName}/Dockerfile`;
461
+
462
+ if (existsSync(join(rootDir, rootDockerfile))) {
463
+ paths.push(rootDockerfile);
464
+ }
465
+ if (existsSync(join(rootDir, appDockerfile))) {
466
+ paths.push(appDockerfile);
442
467
  }
443
468
 
444
469
  return paths.sort();