YsarocK / fetch-appwrite-types

Generate Typescript file from Appwrite Databases
MIT License
25 stars 2 forks source link

[Issue] Two files when use a dot in filename #59

Closed gtrabanco closed 2 weeks ago

gtrabanco commented 3 weeks ago

I wanted to generate a file with extension .d.ts instead of .ts so I changed the command to:

npx fetch-appwrite-types outDir ./types outFileName appwrite.d hardTypes

And it generated two files:

ls -1 types
appwrite.d.ts
appwrite.ts

appwrite.ts

Contains all enum types and Email, URL types.

appwrite.d.ts

Contains all collections types. The types miss all enums in appwrite.ts file and, of course, the Email and URL types.

Other

Looks like the issue is here:

CreateHardFieldsType has hardcoded filename.

Non related

There should be an option to create camelCase or upper names for enums.

YsarocK commented 3 weeks ago

Hi @gtrabanco

You're right, will give a look at it this week!

Thanks for reporting this

YsarocK commented 2 weeks ago

Hi @gtrabanco,

Should be fixed in 1.8.3!