From c9224a9eae6582d2263ad4fa9476fc6a4719515b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=B3=D1=80=D0=B8=D1=81=D0=BA=D0=BE=20=D0=95=D0=B3?= =?UTF-8?q?=D0=BE=D1=80=20=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B8=D1=87?= Date: Tue, 27 Aug 2024 17:38:07 +0300 Subject: [PATCH] fix(server): add generic for function createGetModulesMethod --- .../src/modules/create-get-modules-method.ts | 6 +++--- packages/arui-scripts-server/src/modules/types.ts | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/arui-scripts-server/src/modules/create-get-modules-method.ts b/packages/arui-scripts-server/src/modules/create-get-modules-method.ts index 72e669a5..4df189e1 100644 --- a/packages/arui-scripts-server/src/modules/create-get-modules-method.ts +++ b/packages/arui-scripts-server/src/modules/create-get-modules-method.ts @@ -5,8 +5,8 @@ import { getAppManifest, readAssetsManifest } from '../read-assets-manifest'; import { ModulesConfig } from './types'; -export function createGetModulesMethod( - modules: ModulesConfig, +export function createGetModulesMethod( + modules: ModulesConfig, ) { const assets: Record>> = {}; @@ -14,7 +14,7 @@ export function createGetModulesMethod( method: 'POST', path: '/api/getModuleResources', handler: async ( - getResourcesRequest: GetResourcesRequest, + getResourcesRequest: GetResourcesRequest, ...params: FrameworkParams ): Promise => { const appManifest = await getAppManifest(); diff --git a/packages/arui-scripts-server/src/modules/types.ts b/packages/arui-scripts-server/src/modules/types.ts index d6a2c0b4..eded4b65 100644 --- a/packages/arui-scripts-server/src/modules/types.ts +++ b/packages/arui-scripts-server/src/modules/types.ts @@ -4,15 +4,15 @@ import type { MountMode, } from '@alfalab/scripts-modules'; -export type ModuleDescriptor = { +export type ModuleDescriptor = { mountMode: MountMode; version?: string; getModuleState: ( - getResourcesRequest: GetResourcesRequest, + getResourcesRequest: GetResourcesRequest, ...params: FrameworkParams ) => Promise; }; -export type ModulesConfig = { - [moduleId: string]: ModuleDescriptor; +export type ModulesConfig = { + [moduleId: string]: ModuleDescriptor; };