Skip to content

Commit d916103

Browse files
authored
[migrate] move Wiki models & pages to idea2app/Wiki-PWA repository (#94)
1 parent 9002038 commit d916103

File tree

12 files changed

+903
-1080
lines changed

12 files changed

+903
-1080
lines changed

.env

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ NEXT_PUBLIC_SITE_SUMMARY = 全行业信息化转型专家
33
NEXT_PUBLIC_LOGO = /idea2app.svg
44

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

87
NEXT_PUBLIC_API_HOST = https://service.idea2.app
98

@@ -18,5 +17,4 @@ NEXT_PUBLIC_MEMBER_TABLE = tblJ98JHGEX0o6ij
1817
NEXT_PUBLIC_MEMBER_VIEW = vewLf4M0P8
1918

2019
NEXT_PUBLIC_LARK_API_HOST = https://open.feishu.cn/open-apis/
21-
NEXT_PUBLIC_LARK_APP_ID = cli_a2c7771153f8900c
22-
NEXT_PUBLIC_LARK_WIKI_URL = https://idea2app.feishu.cn/wiki/space/7318346900506181660
20+
NEXT_PUBLIC_LARK_APP_ID = cli_a2c7771153f8900c

components/Layout/menu.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const PublicMenu = ({ t }: typeof i18n) => [
88
{ title: t('latest_projects'), href: '/project' },
99
{ title: t('member'), href: '/member' },
1010
{ title: t('open_source_project'), href: '/open-source' },
11-
{ title: t('wiki'), href: '/wiki' },
11+
{ title: t('wiki'), href: 'https://wiki.idea2.app' },
1212
{ title: t('github_reward'), href: '/project/reward/issue', target: '_top' },
1313
];
1414

models/Document.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

models/Wiki.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

models/configuration.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const Name = process.env.NEXT_PUBLIC_SITE_NAME,
55

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

8-
export const { VERCEL, VERCEL_URL, JWT_SECRET, GITHUB_TOKEN, CACHE_REPOSITORY } = process.env;
8+
export const { VERCEL, VERCEL_URL, JWT_SECRET, GITHUB_TOKEN } = process.env;
99

1010
export const Own_API_Host = isServer()
1111
? VERCEL_URL
@@ -15,8 +15,7 @@ export const Own_API_Host = isServer()
1515

1616
export const API_HOST = process.env.NEXT_PUBLIC_API_HOST!;
1717

18-
export const CACHE_HOST = process.env.NEXT_PUBLIC_CACHE_HOST!,
19-
CrawlerEmail = `[email protected]`;
18+
export const CACHE_HOST = process.env.NEXT_PUBLIC_CACHE_HOST!;
2019

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

@@ -27,8 +26,3 @@ export const LarkAppMeta = {
2726
secret: process.env.LARK_APP_SECRET!,
2827
};
2928
export const LarkBaseId = process.env.NEXT_PUBLIC_LARK_BASE!;
30-
31-
const { hostname, pathname } = new URL(process.env.NEXT_PUBLIC_LARK_WIKI_URL!);
32-
33-
export const LarkWikiDomain = hostname;
34-
export const LarkWikiId = pathname.split('/').pop()!;

package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,52 +17,52 @@
1717
"@mui/material": "^7.3.4",
1818
"@mui/material-nextjs": "^7.3.3",
1919
"@passwordless-id/webauthn": "^2.3.1",
20-
"@sentry/nextjs": "^10.21.0",
20+
"@sentry/nextjs": "^10.22.0",
2121
"file-type": "^21.0.0",
2222
"idb-keyval": "^6.2.2",
2323
"jsonwebtoken": "^9.0.2",
24-
"koa": "^3.0.3",
24+
"koa": "^3.1.1",
2525
"koa-jwt": "^4.0.4",
2626
"koajax": "^3.1.2",
2727
"lodash.debounce": "^4.0.8",
2828
"marked": "^16.4.1",
2929
"mime": "^4.1.0",
3030
"mobx": "^6.15.0",
31-
"mobx-github": "^0.6.0",
31+
"mobx-github": "^0.6.2",
3232
"mobx-i18n": "^0.7.2",
3333
"mobx-lark": "^2.5.0",
3434
"mobx-react": "^9.2.1",
3535
"mobx-react-helper": "^0.5.1",
3636
"mobx-restful": "^2.1.4",
37-
"next": "^16.0.0",
37+
"next": "^16.0.1",
3838
"next-pwa": "~5.6.0",
3939
"next-ssr-middleware": "^1.0.3",
4040
"react": "^19.2.0",
4141
"react-dom": "^19.2.0",
42-
"web-utility": "^4.6.3",
42+
"web-utility": "^4.6.4",
4343
"webpack": "^5.102.1"
4444
},
4545
"devDependencies": {
4646
"@babel/plugin-proposal-decorators": "^7.28.0",
47-
"@babel/plugin-transform-typescript": "^7.28.0",
48-
"@babel/preset-react": "^7.27.1",
47+
"@babel/plugin-transform-typescript": "^7.28.5",
48+
"@babel/preset-react": "^7.28.5",
4949
"@cspell/eslint-plugin": "^9.2.2",
50-
"@eslint/compat": "^1.4.0",
51-
"@eslint/js": "^9.38.0",
52-
"@idea2app/data-server": "^1.0.0-rc.3",
53-
"@next/eslint-plugin-next": "^16.0.0",
50+
"@eslint/compat": "^1.4.1",
51+
"@eslint/js": "^9.39.0",
52+
"@idea2app/data-server": "^1.0.0-rc.9",
53+
"@next/eslint-plugin-next": "^16.0.1",
5454
"@stylistic/eslint-plugin": "^5.5.0",
55-
"@tailwindcss/postcss": "^4.1.15",
55+
"@tailwindcss/postcss": "^4.1.16",
5656
"@tailwindcss/typography": "^0.5.19",
5757
"@types/eslint-config-prettier": "^6.11.3",
5858
"@types/jsonwebtoken": "^9.0.10",
59-
"@types/koa": "^3.0.0",
59+
"@types/koa": "^3.0.1",
6060
"@types/lodash.debounce": "^4.0.9",
6161
"@types/next-pwa": "^5.6.9",
62-
"@types/node": "^22.18.12",
62+
"@types/node": "^22.18.13",
6363
"@types/react": "^19.2.2",
64-
"eslint": "^9.38.0",
65-
"eslint-config-next": "^16.0.0",
64+
"eslint": "^9.39.0",
65+
"eslint-config-next": "^16.0.1",
6666
"eslint-config-prettier": "^10.1.8",
6767
"eslint-plugin-react": "^7.37.5",
6868
"eslint-plugin-simple-import-sort": "^12.1.1",
@@ -75,7 +75,7 @@
7575
"prettier": "^3.6.2",
7676
"prettier-plugin-css-order": "^2.1.2",
7777
"prettier-plugin-tailwindcss": "^0.7.1",
78-
"tailwindcss": "^4.1.15",
78+
"tailwindcss": "^4.1.16",
7979
"typescript": "~5.9.3",
8080
"typescript-eslint": "^8.46.2"
8181
},

pages/api/Lark/file/[id].ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const downloader: Middleware = async context => {
2222
const token = await lark.getAccessToken();
2323

2424
const response = await fetch(lark.client.baseURI + `drive/v1/medias/${id}/download`, {
25+
method,
2526
headers: { Authorization: `Bearer ${token}` },
2627
});
2728
const { ok, status, headers, body } = response;

pages/api/core.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { HTTPError } from 'koajax';
55
import { cache, KoaOption, withKoa } from 'next-ssr-middleware';
66
import { Month } from 'web-utility';
77

8-
import { CrawlerEmail, JWT_SECRET, VERCEL_URL } from '../../models/configuration';
8+
import { JWT_SECRET, VERCEL_URL } from '../../models/configuration';
99

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

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

22-
if (JWT_SECRET) console.info('🔑 [Crawler JWT]', sign({ email: CrawlerEmail }, JWT_SECRET));
23-
2422
export const safeAPI: Middleware<any, any> = async (context: Context, next) => {
2523
try {
2624
return await next();

pages/api/crawler/task.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

pages/wiki/[node_token].tsx

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)