Skip to content

Commit

Permalink
fix imports to relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mkubliniak committed Apr 7, 2021
1 parent 52fb935 commit 3dc670f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/analyseSchemaFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Path from 'path';

import { Settings, ConvertedType, GenerateTypeFile } from './types';
import { getTypeFileNameFromSchema } from './index';
import { Describe, getAllCustomTypes, parseSchema, typeContentToTs } from 'parse';
import { Describe, getAllCustomTypes, parseSchema, typeContentToTs } from './parse';

export function convertSchemaInternal(
settings: Settings,
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { AnySchema } from 'joi';
import Path from 'path';
import { writeFileSync } from 'fs';

import { Settings, ConvertedType } from './types';
import { ConvertedType, Settings } from './types';
import { convertFilesInDirectory } from './convertFilesInDirectory';
import { writeInterfaceFile } from './writeInterfaceFile';
import { convertSchemaInternal } from 'analyseSchemaFile';
import { convertSchemaInternal } from './analyseSchemaFile';

export { Settings };

Expand Down Expand Up @@ -47,7 +47,7 @@ export function convertSchema(

export function getTypeFileNameFromSchema(schemaFileName: string, settings: Settings): string {
return schemaFileName.endsWith(`${settings.schemaFileSuffix}.ts`)
? schemaFileName.substring(0, schemaFileName.length - `${settings.schemaFileSuffix}.ts`.length)
? schemaFileName.substring(0, schemaFileName.length - `${settings.schemaFileSuffix}.ts`.length)
: schemaFileName.replace('.ts', '');
}

Expand Down

0 comments on commit 3dc670f

Please sign in to comment.