From 3f6b714a07542acd77e484a271662d563e8b40c1 Mon Sep 17 00:00:00 2001 From: Craig Beck Date: Thu, 24 Oct 2024 11:00:48 -0700 Subject: [PATCH] Update AppOptions to include script* attributes referenced by AppForServer --- src/App.ts | 6 +++++- src/AppForServer.ts | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/App.ts b/src/App.ts index 51ea96b7..cffecf65 100644 --- a/src/App.ts +++ b/src/App.ts @@ -39,7 +39,11 @@ export function createAppPage(derby): typeof Page { export interface AppOptions { appMetadata?: Record, - scriptHash?: string, + scriptBaseUrl?: string, + scriptCrossOrigin?: boolean, + scriptHash?: string; + scriptMapBaseUrl?: string, + [key: string]: unknown, } type OnRouteCallback = (this: Page, page: Page, model: Model, params: PageParams, done?: () => void) => void; diff --git a/src/AppForServer.ts b/src/AppForServer.ts index e591ee7e..05a8194d 100644 --- a/src/AppForServer.ts +++ b/src/AppForServer.ts @@ -8,7 +8,7 @@ import * as racer from 'racer'; -import { App } from './App'; +import { App, AppOptions } from './App'; import { type Derby } from './Derby'; import { type StyleCompilerOptions } from './files'; import { PageForServer } from './PageForServer'; @@ -79,7 +79,7 @@ export class AppForServer extends App { watchFiles: boolean; router: any; - constructor(derby: Derby, name: string, filename: string, options) { + constructor(derby: Derby, name: string, filename: string, options?: AppOptions) { super(derby, name, filename, options); this._init(options); }