Skip to content

Commit e216f91

Browse files
committed
chore: re-generate ts types
1 parent 7ea0fab commit e216f91

File tree

2 files changed

+25
-21
lines changed

2 files changed

+25
-21
lines changed

v1/typescript-definitions/scripts/generate-types.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,13 @@ async function saveFile(savePath, contents) {
4242
// Ensure the folder exists:
4343
await fs.promises.mkdir(path.dirname(savePath), { recursive: true });
4444

45-
// Replace contents in case of using localhost during testing:
45+
// The ^v_.* are generated as [k: string]: unknown, fix that:
46+
contents = contents.replaceAll(/(v_.+\n.*\n[ \t]+)(\[k: string\]: unknown)/g, '$1[k: `v_${string}`]: unknown')
47+
4648

49+
// Replace contents in case of using localhost during testing:
4750
contents = contents.replaceAll('HttpLocalhost8080', 'HttpsOgrafEbuIo')
51+
contents = contents.replaceAll('Http1270018081V1', 'HttpsOgrafEbuIoV1')
4852

4953
await fs.promises.writeFile(savePath, contents);
5054
}

v1/typescript-definitions/src/generated/graphics-manifest.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ export type HttpsSuperflytvGithubIoGraphicsDataDefinitionGddMetaSchemaV1LibObjec
447447
[k: string]: unknown;
448448
};
449449

450-
export interface HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasGraphicsSchemaJson {
450+
export interface HttpsOgrafEbuIoV1SpecificationJsonSchemasGraphicsSchemaJson {
451451
/**
452452
* Reference to the JSON-schema for this manifest
453453
*/
@@ -492,12 +492,12 @@ export interface HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasGraphicsSchemaJs
492492
* This interface was referenced by `undefined`'s JSON-Schema definition
493493
* via the `patternProperty` "^v_.*".
494494
*/
495-
[k: string]: unknown;
495+
[k: `v_${string}`]: unknown;
496496
};
497497
/**
498498
* Custom Actions that can be invoked on the Graphic.
499499
*/
500-
customActions?: HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasLibActionJson[];
500+
customActions?: HttpsOgrafEbuIoV1SpecificationJsonSchemasLibActionJson[];
501501
/**
502502
* Indicates if the Graphic supports real-time rendering
503503
*/
@@ -519,24 +519,24 @@ export interface HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasGraphicsSchemaJs
519519
* If set, specifies requirements for the resolution of the Renderer.
520520
*/
521521
resolution?: {
522-
width?: HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasLibConstraintsNumberJson;
523-
height?: HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasLibConstraintsNumberJson;
522+
width?: HttpsOgrafEbuIoV1SpecificationJsonSchemasLibConstraintsNumberJson;
523+
height?: HttpsOgrafEbuIoV1SpecificationJsonSchemasLibConstraintsNumberJson;
524524
[k: string]: unknown;
525525
};
526-
frameRate?: HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasLibConstraintsNumberJson1;
526+
frameRate?: HttpsOgrafEbuIoV1SpecificationJsonSchemasLibConstraintsNumberJson1;
527527
/**
528528
* This interface was referenced by `undefined`'s JSON-Schema definition
529529
* via the `patternProperty` "^v_.*".
530530
*/
531-
[k: string]: unknown;
531+
[k: `v_${string}`]: unknown;
532532
}[];
533533
/**
534-
* This interface was referenced by `HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasGraphicsSchemaJson`'s JSON-Schema definition
534+
* This interface was referenced by `HttpsOgrafEbuIoV1SpecificationJsonSchemasGraphicsSchemaJson`'s JSON-Schema definition
535535
* via the `patternProperty` "^v_.*".
536536
*/
537-
[k: string]: unknown;
537+
[k: `v_${string}`]: unknown;
538538
}
539-
export interface HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasLibActionJson {
539+
export interface HttpsOgrafEbuIoV1SpecificationJsonSchemasLibActionJson {
540540
/**
541541
* The identity of the action. The id must be unique within the graphic.
542542
*/
@@ -554,15 +554,15 @@ export interface HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasLibActionJson {
554554
*/
555555
schema?: HttpsSuperflytvGithubIoGraphicsDataDefinitionGddMetaSchemaV1LibObjectJson | null;
556556
/**
557-
* This interface was referenced by `HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasLibActionJson`'s JSON-Schema definition
557+
* This interface was referenced by `HttpsOgrafEbuIoV1SpecificationJsonSchemasLibActionJson`'s JSON-Schema definition
558558
* via the `patternProperty` "^v_.*".
559559
*/
560-
[k: string]: unknown;
560+
[k: `v_${string}`]: unknown;
561561
}
562562
/**
563563
* The number constraint is used to specify a constraint for a numerical property. (Inspired by https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints#constraindouble)
564564
*/
565-
export interface HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasLibConstraintsNumberJson {
565+
export interface HttpsOgrafEbuIoV1SpecificationJsonSchemasLibConstraintsNumberJson {
566566
/**
567567
* A number specifying the largest permissible value of the property it describes. If the value cannot remain equal to or less than this value, matching will fail.
568568
*/
@@ -580,18 +580,18 @@ export interface HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasLibConstraintsNu
580580
*/
581581
ideal?: number;
582582
/**
583-
* This interface was referenced by `HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasLibConstraintsNumberJson`'s JSON-Schema definition
583+
* This interface was referenced by `HttpsOgrafEbuIoV1SpecificationJsonSchemasLibConstraintsNumberJson`'s JSON-Schema definition
584584
* via the `patternProperty` "^v_.*".
585585
*
586-
* This interface was referenced by `HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasLibConstraintsNumberJson1`'s JSON-Schema definition
586+
* This interface was referenced by `HttpsOgrafEbuIoV1SpecificationJsonSchemasLibConstraintsNumberJson1`'s JSON-Schema definition
587587
* via the `patternProperty` "^v_.*".
588588
*/
589-
[k: string]: unknown;
589+
[k: `v_${string}`]: unknown;
590590
}
591591
/**
592592
* The number constraint is used to specify a constraint for a numerical property. (Inspired by https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints#constraindouble)
593593
*/
594-
export interface HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasLibConstraintsNumberJson1 {
594+
export interface HttpsOgrafEbuIoV1SpecificationJsonSchemasLibConstraintsNumberJson1 {
595595
/**
596596
* A number specifying the largest permissible value of the property it describes. If the value cannot remain equal to or less than this value, matching will fail.
597597
*/
@@ -609,11 +609,11 @@ export interface HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasLibConstraintsNu
609609
*/
610610
ideal?: number;
611611
/**
612-
* This interface was referenced by `HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasLibConstraintsNumberJson`'s JSON-Schema definition
612+
* This interface was referenced by `HttpsOgrafEbuIoV1SpecificationJsonSchemasLibConstraintsNumberJson`'s JSON-Schema definition
613613
* via the `patternProperty` "^v_.*".
614614
*
615-
* This interface was referenced by `HttpsOgrafEbuIoV1Draft0SpecificationJsonSchemasLibConstraintsNumberJson1`'s JSON-Schema definition
615+
* This interface was referenced by `HttpsOgrafEbuIoV1SpecificationJsonSchemasLibConstraintsNumberJson1`'s JSON-Schema definition
616616
* via the `patternProperty` "^v_.*".
617617
*/
618-
[k: string]: unknown;
618+
[k: `v_${string}`]: unknown;
619619
}

0 commit comments

Comments
 (0)