(schemaPath: string | undefined, baseDir: string)
| 114 | } |
| 115 | |
| 116 | private async getFeatureFlags(schemaPath: string | undefined, baseDir: string): Promise<string[]> { |
| 117 | try { |
| 118 | const { generators } = await loadSchemaContext({ |
| 119 | schemaPath: createSchemaPathInput({ schemaPathFromConfig: schemaPath, baseDir }), |
| 120 | }) |
| 121 | const generator = generators.find((g) => g.previewFeatures.length > 0) |
| 122 | if (generator) { |
| 123 | return generator.previewFeatures |
| 124 | } |
| 125 | } catch (e) { |
| 126 | // console.error(e) |
| 127 | } |
| 128 | return [] |
| 129 | } |
| 130 | } |
no test coverage detected