mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-22 01:22:54 +00:00
feat: more fixes
This commit is contained in:
@@ -24,10 +24,10 @@ export function compileSchema(path: string, tsconfig: string): [schma: JSONSchem
|
||||
Object.assign(fullSchema.definitions, generator.createSchema(schema).definitions);
|
||||
}
|
||||
|
||||
const schemaTypes = `import {JSONSchema7} from 'json-schema';\n\nexport interface SchemaMap {\n${[
|
||||
const schemaTypes = `import {JSONSchema7} from 'json-schema';\nimport * as index from './index.js';\n\nexport interface SchemaMap {\n${[
|
||||
...schemaNames,
|
||||
]
|
||||
.map(schemaName => ` '${schemaName}': core.${schemaName};`)
|
||||
.map(schemaName => ` '${schemaName}': index.${schemaName};`)
|
||||
.join('\n')}\n}\n\nconst schema: JSONSchema7;\nexport default schema;`;
|
||||
|
||||
return [fullSchema, schemaTypes];
|
||||
|
||||
@@ -76,7 +76,7 @@ export function jsonSchemaPlugin(
|
||||
|
||||
return {
|
||||
[schemaName]: JSON.stringify(jsonSchema),
|
||||
[`${schemaName.replace(/\.json$/, '')}.d.ts`]: types,
|
||||
[`${schemaName}.d.ts`]: types,
|
||||
};
|
||||
}).call(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user