-
Notifications
You must be signed in to change notification settings - Fork 10
Description
As described in the README.md, in order to run this nifty tool one needs to use an admin token in order to get output.
I noticed that the output also has all the directu_ collections. Is that needed for using the SDK? Like for the simple-cms starter kit?
As a sidenote, I noticed that the NextJS starter tries to use the PUBLIC_TOKEN. That will inevitably "fail" but perhaps also inspires less known devs to just use an admin token in their configs (not wise perse π). Source: https://github.com/directus-labs/starters/blob/88684eb773f7730dd12b1710583a0e967d49c004/cms/nextjs/src/lib/directus/generateDirectusTypes.ts#L8
Perhaps we could use an option or something to omit certain collections from the output. I haven't looked into the details how the output file gets build, perhaps it would be even possible to only get the types that the token has access to?