Files
Sebastian Poxhofer ef557aca81 fix(datasource): replace getJsonUnchecked in Java, Gradle, Dart, and Flutter (#43697)
* fix(datasource): replace getJsonUnchecked with validated getJson in Java, Gradle, Dart, and Flutter datasources

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor: remove .nullable()

* fix linter errors

* chore removed some unused types

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 10:02:09 +00:00

22 lines
656 B
TypeScript

import { z } from 'zod/v4';
import { LooseArray } from '../../../util/schema-utils/index.ts';
export const FlutterRelease = z.object({
hash: z.string().optional(),
channel: z.string(),
version: z.string(),
dart_sdk_version: z.string().optional(),
dart_sdk_arch: z.string().optional(),
release_date: z.string().optional(),
archive: z.string().optional(),
sha256: z.string().optional(),
});
export const FlutterResponse = z.object({
base_url: z.string().optional(),
current_release: z.record(z.string(), z.string()).optional(),
releases: LooseArray(FlutterRelease),
});
export type FlutterResponse = z.infer<typeof FlutterResponse>;