Skip to content

Commit 7ec60e3

Browse files
committed
feat: add importName option
1 parent 54af0f0 commit 7ec60e3

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

catalog.schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"properties": {
1111
"enabled": { "type": "boolean" },
1212
"name": { "type": "string" },
13+
"importName": { "type": "string" },
1314
"url": { "type": "string" },
1415
"keywords": { "type": "array", "items": { "type": "string" } },
1516
"patches": {

scripts/actions/gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export async function gen() {
3333

3434
if (type.patches?.removeYamlAnchor) dropYamlAnchor(newSchema);
3535

36-
const importName = capitalize(camelize(type.name));
36+
const importName = type.importName ?? capitalize(camelize(type.name));
3737
const oldIndexDef = await readFileIfExists(join(path, "index.d.ts"));
3838
const newIndexDef = await compile(
3939
{

scripts/utils/catalog.type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export interface JsonTypesCatalog {
1212
export interface JsonType {
1313
enabled?: boolean;
1414
name: string;
15+
importName?: string;
1516
url: string;
1617
keywords?: string[];
1718
patches?: {

0 commit comments

Comments
 (0)