From 0250aa8e84b19ed6e95b842068eeba957e9fb389 Mon Sep 17 00:00:00 2001 From: Ade Novid Date: Sun, 22 Sep 2024 17:21:47 +0700 Subject: [PATCH] fix: fix runtime config types --- .github/workflows/ci.yml | 3 +++ package.json | 3 ++- src/module.ts | 10 +++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d94c99..c10ea16 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,9 @@ jobs: - name: Install Deps run: yarn install --immutable + - name: Run Build + run: yarn dev:prepare && yarn build + - name: Run Test run: yarn test diff --git a/package.json b/package.json index 26a484d..4426d69 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "dist" ], "scripts": { - "prepack": "nuxt-module-build build", + "prepack": "yarn build", + "build": "nuxt-module-build build", "dev": "nuxi dev playground", "dev:build": "nuxi build playground", "dev:prepare": "nuxt-module-build build --stub && nuxi prepare playground", diff --git a/src/module.ts b/src/module.ts index 97a2c3f..acd8ffd 100644 --- a/src/module.ts +++ b/src/module.ts @@ -33,16 +33,16 @@ export interface ModuleOptions { selfhostPath?: string, } -export interface ModulePrivateRuntimeConfig { +export interface ModuleRuntimeConfig { nupolyon: { features: string[], }, } -export interface ModuleRuntimeConfig { - nuauth: { +export interface ModulePublicRuntimeConfig { + nupolyon: { src: string, - isSelfHost: true, + isSelfHost: boolean, }, } @@ -83,7 +83,7 @@ export default defineNuxtModule({ addServerHandler({ method : 'get', route : options.selfhostPath, - handler: resolver.resolve('./runtime/route/selfhost'), + handler: resolver.resolve('./runtime/server/route/selfhost'), }) }