From d22c3b0c257f5daf5b401988a35ab9ce981a2341 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Fri, 12 Aug 2022 19:54:46 +0200 Subject: refactor(frontend): move from Webpack to Vite Also overhaulds the building and linting for frontend assets. --- subprojects/frontend/src/xtext/xtextMessages.ts | 30 +++++++++++++------------ 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'subprojects/frontend/src/xtext/xtextMessages.ts') diff --git a/subprojects/frontend/src/xtext/xtextMessages.ts b/subprojects/frontend/src/xtext/xtextMessages.ts index 4bf49c17..c4d0c676 100644 --- a/subprojects/frontend/src/xtext/xtextMessages.ts +++ b/subprojects/frontend/src/xtext/xtextMessages.ts @@ -1,40 +1,42 @@ +/* eslint-disable @typescript-eslint/no-redeclare -- Declare types with their companion objects */ + import { z } from 'zod'; -export const xtextWebRequest = z.object({ +export const XtextWebRequest = z.object({ id: z.string().min(1), request: z.unknown(), }); -export type XtextWebRequest = z.infer; +export type XtextWebRequest = z.infer; -export const xtextWebOkResponse = z.object({ +export const XtextWebOkResponse = z.object({ id: z.string().min(1), response: z.unknown(), }); -export type XtextWebOkResponse = z.infer; +export type XtextWebOkResponse = z.infer; -export const xtextWebErrorKind = z.enum(['request', 'server']); +export const XtextWebErrorKind = z.enum(['request', 'server']); -export type XtextWebErrorKind = z.infer; +export type XtextWebErrorKind = z.infer; -export const xtextWebErrorResponse = z.object({ +export const XtextWebErrorResponse = z.object({ id: z.string().min(1), - error: xtextWebErrorKind, + error: XtextWebErrorKind, message: z.string(), }); -export type XtextWebErrorResponse = z.infer; +export type XtextWebErrorResponse = z.infer; -export const xtextWebPushService = z.enum(['highlight', 'validate']); +export const XtextWebPushService = z.enum(['highlight', 'validate']); -export type XtextWebPushService = z.infer; +export type XtextWebPushService = z.infer; -export const xtextWebPushMessage = z.object({ +export const XtextWebPushMessage = z.object({ resource: z.string().min(1), stateId: z.string().min(1), - service: xtextWebPushService, + service: XtextWebPushService, push: z.unknown(), }); -export type XtextWebPushMessage = z.infer; +export type XtextWebPushMessage = z.infer; -- cgit v1.2.3-54-g00ecf