Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ NEXT_PUBLIC_SITE_SUMMARY = 全行业信息化转型专家
NEXT_PUBLIC_LOGO = /idea2app.svg

NEXT_PUBLIC_CACHE_HOST = https://cache.idea2.app
CACHE_REPOSITORY = idea2app/OWS-cache

NEXT_PUBLIC_API_HOST = https://service.idea2.app

Expand All @@ -18,5 +17,4 @@ NEXT_PUBLIC_MEMBER_TABLE = tblJ98JHGEX0o6ij
NEXT_PUBLIC_MEMBER_VIEW = vewLf4M0P8

NEXT_PUBLIC_LARK_API_HOST = https://open.feishu.cn/open-apis/
NEXT_PUBLIC_LARK_APP_ID = cli_a2c7771153f8900c
NEXT_PUBLIC_LARK_WIKI_URL = https://idea2app.feishu.cn/wiki/space/7318346900506181660
NEXT_PUBLIC_LARK_APP_ID = cli_a2c7771153f8900c
2 changes: 1 addition & 1 deletion components/Layout/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const PublicMenu = ({ t }: typeof i18n) => [
{ title: t('latest_projects'), href: '/project' },
{ title: t('member'), href: '/member' },
{ title: t('open_source_project'), href: '/open-source' },
{ title: t('wiki'), href: '/wiki' },
{ title: t('wiki'), href: 'https://wiki.idea2.app' },
{ title: t('github_reward'), href: '/project/reward/issue', target: '_top' },
];

Expand Down
10 changes: 0 additions & 10 deletions models/Document.ts

This file was deleted.

10 changes: 0 additions & 10 deletions models/Wiki.ts

This file was deleted.

10 changes: 2 additions & 8 deletions models/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const Name = process.env.NEXT_PUBLIC_SITE_NAME,

export const isServer = () => typeof window === 'undefined';

export const { VERCEL, VERCEL_URL, JWT_SECRET, GITHUB_TOKEN, CACHE_REPOSITORY } = process.env;
export const { VERCEL, VERCEL_URL, JWT_SECRET, GITHUB_TOKEN } = process.env;

export const Own_API_Host = isServer()
? VERCEL_URL
Expand All @@ -15,8 +15,7 @@ export const Own_API_Host = isServer()

export const API_HOST = process.env.NEXT_PUBLIC_API_HOST!;

export const CACHE_HOST = process.env.NEXT_PUBLIC_CACHE_HOST!,
CrawlerEmail = `crawler@idea2.app`;
export const CACHE_HOST = process.env.NEXT_PUBLIC_CACHE_HOST!;

export const ProxyBaseURL = `https://idea2.app/proxy`;

Expand All @@ -27,8 +26,3 @@ export const LarkAppMeta = {
secret: process.env.LARK_APP_SECRET!,
};
export const LarkBaseId = process.env.NEXT_PUBLIC_LARK_BASE!;

const { hostname, pathname } = new URL(process.env.NEXT_PUBLIC_LARK_WIKI_URL!);

export const LarkWikiDomain = hostname;
export const LarkWikiId = pathname.split('/').pop()!;
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,52 +17,52 @@
"@mui/material": "^7.3.4",
"@mui/material-nextjs": "^7.3.3",
"@passwordless-id/webauthn": "^2.3.1",
"@sentry/nextjs": "^10.21.0",
"@sentry/nextjs": "^10.22.0",
"file-type": "^21.0.0",
"idb-keyval": "^6.2.2",
"jsonwebtoken": "^9.0.2",
"koa": "^3.0.3",
"koa": "^3.1.1",
"koa-jwt": "^4.0.4",
"koajax": "^3.1.2",
"lodash.debounce": "^4.0.8",
"marked": "^16.4.1",
"mime": "^4.1.0",
"mobx": "^6.15.0",
"mobx-github": "^0.6.0",
"mobx-github": "^0.6.2",
"mobx-i18n": "^0.7.2",
"mobx-lark": "^2.5.0",
"mobx-react": "^9.2.1",
"mobx-react-helper": "^0.5.1",
"mobx-restful": "^2.1.4",
"next": "^16.0.0",
"next": "^16.0.1",
"next-pwa": "~5.6.0",
"next-ssr-middleware": "^1.0.3",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"web-utility": "^4.6.3",
"web-utility": "^4.6.4",
"webpack": "^5.102.1"
},
"devDependencies": {
"@babel/plugin-proposal-decorators": "^7.28.0",
"@babel/plugin-transform-typescript": "^7.28.0",
"@babel/preset-react": "^7.27.1",
"@babel/plugin-transform-typescript": "^7.28.5",
"@babel/preset-react": "^7.28.5",
"@cspell/eslint-plugin": "^9.2.2",
"@eslint/compat": "^1.4.0",
"@eslint/js": "^9.38.0",
"@idea2app/data-server": "^1.0.0-rc.3",
"@next/eslint-plugin-next": "^16.0.0",
"@eslint/compat": "^1.4.1",
"@eslint/js": "^9.39.0",
"@idea2app/data-server": "^1.0.0-rc.9",
"@next/eslint-plugin-next": "^16.0.1",
"@stylistic/eslint-plugin": "^5.5.0",
"@tailwindcss/postcss": "^4.1.15",
"@tailwindcss/postcss": "^4.1.16",
"@tailwindcss/typography": "^0.5.19",
"@types/eslint-config-prettier": "^6.11.3",
"@types/jsonwebtoken": "^9.0.10",
"@types/koa": "^3.0.0",
"@types/koa": "^3.0.1",
"@types/lodash.debounce": "^4.0.9",
"@types/next-pwa": "^5.6.9",
"@types/node": "^22.18.12",
"@types/node": "^22.18.13",
"@types/react": "^19.2.2",
"eslint": "^9.38.0",
"eslint-config-next": "^16.0.0",
"eslint": "^9.39.0",
"eslint-config-next": "^16.0.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-simple-import-sort": "^12.1.1",
Expand All @@ -75,7 +75,7 @@
"prettier": "^3.6.2",
"prettier-plugin-css-order": "^2.1.2",
"prettier-plugin-tailwindcss": "^0.7.1",
"tailwindcss": "^4.1.15",
"tailwindcss": "^4.1.16",
"typescript": "~5.9.3",
"typescript-eslint": "^8.46.2"
},
Expand Down
1 change: 1 addition & 0 deletions pages/api/Lark/file/[id].ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const downloader: Middleware = async context => {
const token = await lark.getAccessToken();

const response = await fetch(lark.client.baseURI + `drive/v1/medias/${id}/download`, {
method,
headers: { Authorization: `Bearer ${token}` },
});
const { ok, status, headers, body } = response;
Expand Down
4 changes: 1 addition & 3 deletions pages/api/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { HTTPError } from 'koajax';
import { cache, KoaOption, withKoa } from 'next-ssr-middleware';
import { Month } from 'web-utility';

import { CrawlerEmail, JWT_SECRET, VERCEL_URL } from '../../models/configuration';
import { JWT_SECRET, VERCEL_URL } from '../../models/configuration';

export type JWTContext = ParameterizedContext<
{ jwtOriginalError: JsonWebTokenError } | { user: { email: string } }
Expand All @@ -19,8 +19,6 @@ export const parseJWT = JWT({

export const verifyJWT = JWT({ secret: JWT_SECRET!, cookie: 'token' });

if (JWT_SECRET) console.info('🔑 [Crawler JWT]', sign({ email: CrawlerEmail }, JWT_SECRET));

export const safeAPI: Middleware<any, any> = async (context: Context, next) => {
try {
return await next();
Expand Down
31 changes: 0 additions & 31 deletions pages/api/crawler/task.ts

This file was deleted.

56 changes: 0 additions & 56 deletions pages/wiki/[node_token].tsx

This file was deleted.

52 changes: 0 additions & 52 deletions pages/wiki/index.tsx

This file was deleted.

Loading