From c50f9100b74d2139d18fedf2f0052a1971170b93 Mon Sep 17 00:00:00 2001 From: TechQuery Date: Sun, 17 Sep 2023 05:20:03 +0800 Subject: [PATCH] [fix] 3 detail Publishing bug --- .github/workflows/deploy-production.yml | 1 - .github/workflows/publish-type.yml | 10 +++++----- src/controller/index.ts | 3 ++- type/package.json | 4 +++- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml index 66d5bad..644edb9 100644 --- a/.github/workflows/deploy-production.yml +++ b/.github/workflows/deploy-production.yml @@ -7,7 +7,6 @@ on: push: tags: - v* - - type-v* env: ARTIFACT_PATH: /tmp/artifact.tar BOX_NAME: kys-service diff --git a/.github/workflows/publish-type.yml b/.github/workflows/publish-type.yml index d5f76c4..266a8dd 100644 --- a/.github/workflows/publish-type.yml +++ b/.github/workflows/publish-type.yml @@ -20,10 +20,10 @@ jobs: node-version: 18 registry-url: https://npm.pkg.github.com cache: pnpm - - name: Install Dependencies - run: cd type/ && pnpm i - - - name: Build & Publish - run: npm publish + - name: Install, Build & Publish + run: | + cd type/ + pnpm i + npm publish env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/src/controller/index.ts b/src/controller/index.ts index f2af040..2de5b75 100644 --- a/src/controller/index.ts +++ b/src/controller/index.ts @@ -1,10 +1,11 @@ import type {} from 'koa2-swagger-ui'; import { createAPI } from 'koagger'; +import { CheckEventController } from './CheckEvent'; import { CrawlerController } from './Crawler'; import { SessionController } from './Session'; export const { router, swagger, mocker } = createAPI({ mock: true, - controllers: [CrawlerController, SessionController] + controllers: [SessionController, CheckEventController, CrawlerController] }); diff --git a/type/package.json b/type/package.json index 22dd1c0..c9151bb 100644 --- a/type/package.json +++ b/type/package.json @@ -5,7 +5,9 @@ "dependencies": { "@types/jsonwebtoken": "^9.0.3", "@types/koa": "^2.13.9", - "mobx-restful": "^0.6.11", + "mobx-restful": "^0.6.11" + }, + "peerDependencies": { "web-fetch": "^1.3.2" } }