feat(opsserver): serve embedded frontend bundle from committed ts_bundled instead of using external dist_serve directory

This commit is contained in:
2026-02-24 18:18:40 +00:00
parent 06f447459e
commit 92b0ec179f
11 changed files with 29608 additions and 11 deletions

View File

@@ -2,6 +2,7 @@ import * as plugins from '../plugins.ts';
import { logger } from '../logging.ts';
import type { GitopsApp } from '../classes/gitopsapp.ts';
import * as handlers from './handlers/index.ts';
import { files as bundledFiles } from '../../ts_bundled/bundle.ts';
export class OpsServer {
public gitopsAppRef: GitopsApp;
@@ -22,11 +23,10 @@ export class OpsServer {
}
public async start(port = 3000) {
const absoluteServeDir = plugins.path.resolve('./dist_serve');
this.server = new plugins.typedserver.utilityservers.UtilityWebsiteServer({
domain: 'localhost',
feedMetadata: undefined,
serveDir: absoluteServeDir,
bundledContent: bundledFiles,
});
// Chain typedrouters