@famgia/omnify-typescript 0.0.2 → 0.0.6

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@famgia/omnify-typescript",
3
- "version": "0.0.2",
3
+ "version": "0.0.6",
4
4
  "description": "TypeScript type definitions generator for Omnify schemas",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -47,7 +47,7 @@
47
47
  "directory": "packages/typescript-generator"
48
48
  },
49
49
  "dependencies": {
50
- "@famgia/omnify-types": "0.0.10"
50
+ "@famgia/omnify-types": "0.0.14"
51
51
  },
52
52
  "devDependencies": {
53
53
  "tsup": "^8.5.1",
@@ -226,7 +226,8 @@ export default {
226
226
  `;
227
227
 
228
228
  function findProjectRoot() {
229
- let dir = process.cwd();
229
+ // npm/pnpm set INIT_CWD to the directory where the install was run
230
+ let dir = process.env.INIT_CWD || process.cwd();
230
231
  const nodeModulesIndex = dir.indexOf('node_modules');
231
232
  if (nodeModulesIndex !== -1) {
232
233
  dir = dir.substring(0, nodeModulesIndex - 1);
@@ -260,8 +261,9 @@ function main() {
260
261
  return;
261
262
  }
262
263
 
263
- const cwd = process.cwd();
264
- if (cwd.includes('omnify-ts') && !cwd.includes('node_modules')) {
264
+ // Skip if in omnify-ts monorepo (source code), but allow examples/
265
+ const projectDir = process.env.INIT_CWD || process.cwd();
266
+ if (projectDir.includes('omnify-ts') && !projectDir.includes('omnify-ts/examples')) {
265
267
  return;
266
268
  }
267
269