Skip to content

Commit bda23b6

Browse files
committed
[migrate] replace FeiShu API environment variables with Lark ones
[optimize] update Upstream packages & Read Me doucment [fix] 2 SSR props bugs
1 parent e005b7d commit bda23b6

File tree

8 files changed

+1076
-1025
lines changed

8 files changed

+1076
-1025
lines changed

.env

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ NEXT_PUBLIC_SENTRY_DSN = https://03e5d951172f411a04c1bab44022e22b@o4506471366852
55
SENTRY_ORG = idea2app
66
SENTRY_PROJECT = ows
77

8-
NEXT_PUBLIC_LARK_BASE = bascnFeH8Q37XWX0LLlBB9ojQzf
9-
NEXT_PUBLIC_CLIENT_TABLE = tblsb0vx4fqjSrGL
10-
NEXT_PUBLIC_PROJECT_TABLE = tblCxasoUUub3buB
11-
NEXT_PUBLIC_MEMBER_TABLE = tblJ98JHGEX0o6ij
12-
NEXT_PUBLIC_MEMBER_VIEW = vewLf4M0P8
8+
LARK_API_HOST = https://open.larksuite.com/open-apis/
9+
NEXT_PUBLIC_LARK_BASE = McGRbzEInauTTOsWX1blxbN1grh
10+
NEXT_PUBLIC_CLIENT_TABLE = tblRNMvpJ1UZwJW2
11+
NEXT_PUBLIC_PROJECT_TABLE = tblwaxbQ35uX2lUS
12+
NEXT_PUBLIC_MEMBER_TABLE = tblD7p7XAcrinGqO
13+
NEXT_PUBLIC_MEMBER_VIEW = vewLspr5VK

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
## Technology stack
1111

1212
- Language: [TypeScript v5][2] + [MDX v3][10]
13-
- Component engine: [Next.js v14][3]
13+
- Component engine: [Next.js v15][3]
1414
- Component suite: [Bootstrap v5][4]
1515
- PWA framework: [Workbox v6][5]
1616
- State management: [MobX v6][11]
@@ -72,12 +72,15 @@ You can check out [the Next.js GitHub repository][27] - your feedback and contri
7272
| `SENTRY_ORG` | `.env` | [Official document][29] |
7373
| `SENTRY_PROJECT` | `.env` | [Official document][29] |
7474
| `NEXT_PUBLIC_SENTRY_DSN` | `.env` | [Official document][30] |
75+
| `GITHUB_TOKEN` | `.env.local` | [Official document][31] |
76+
| `LARK_APP_ID` | `.env.local` | [Official document][32] |
77+
| `LARK_APP_SECRET` | `.env.local` | [Official document][32] |
7578

7679
### Vercel
7780

7881
The easiest way to deploy your Next.js app is to use the [Vercel Platform][13] from the creators of Next.js.
7982

80-
Check out our [Next.js deployment documentation][31] for more details.
83+
Check out our [Next.js deployment documentation][33] for more details.
8184

8285
### Docker
8386

@@ -116,4 +119,6 @@ pnpm container
116119
[28]: https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-configuration-files-for-source-map-upload
117120
[29]: https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-environment-variables
118121
[30]: https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#create-initialization-config-files
119-
[31]: https://nextjs.org/docs/deployment
122+
[31]: https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api#authenticating-with-a-personal-access-token
123+
[32]: https://open.larksuite.com/document/server-docs/getting-started/api-access-token/app-access-token-development-guide#95c7f5f5
124+
[33]: https://nextjs.org/docs/deployment

next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
5+
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.

package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
{
22
"name": "@idea2app/ows",
3-
"version": "2.0.0-rc",
3+
"version": "2.0.0",
44
"description": "React project scaffold based on TypeScript, Next.js, Bootstrap & Workbox.",
55
"private": true,
66
"dependencies": {
7-
"@sentry/nextjs": "^8.42.0",
7+
"@sentry/nextjs": "^8.45.0",
88
"classnames": "^2.5.1",
99
"core-js": "^3.39.0",
1010
"file-type": "^19.6.0",
1111
"idea-react": "^2.0.0-rc.8",
12-
"koajax": "^3.1.0",
12+
"koajax": "^3.1.1",
1313
"less": "^4.2.1",
1414
"less-loader": "^12.2.0",
1515
"mobx": "^6.13.5",
1616
"mobx-github": "^0.3.5",
1717
"mobx-i18n": "^0.6.0",
1818
"mobx-lark": "^2.0.0",
19-
"mobx-react": "^9.1.1",
19+
"mobx-react": "^9.2.0",
2020
"mobx-restful": "^2.0.0",
2121
"mobx-restful-table": "^2.0.1",
22-
"next": "^15.0.3",
22+
"next": "^15.1.0",
2323
"next-pwa": "~5.6.0",
2424
"next-ssr-middleware": "^0.8.9",
2525
"next-with-less": "^3.0.1",
@@ -28,31 +28,31 @@
2828
"react-dom": "^18.3.1",
2929
"react-marked-renderer": "^2.0.1",
3030
"web-utility": "^4.4.2",
31-
"webpack": "^5.96.1"
31+
"webpack": "^5.97.1"
3232
},
3333
"devDependencies": {
3434
"@babel/plugin-proposal-decorators": "^7.25.9",
35-
"@babel/plugin-transform-typescript": "^7.25.9",
36-
"@babel/preset-react": "^7.25.9",
37-
"@eslint/compat": "^1.2.3",
35+
"@babel/plugin-transform-typescript": "^7.26.3",
36+
"@babel/preset-react": "^7.26.3",
37+
"@eslint/compat": "^1.2.4",
3838
"@eslint/eslintrc": "^3.2.0",
3939
"@softonus/prettier-plugin-duplicate-remover": "^1.1.2",
4040
"@types/eslint-config-prettier": "^6.11.3",
4141
"@types/eslint__eslintrc": "^2.1.2",
4242
"@types/next-pwa": "^5.6.9",
43-
"@types/node": "^20.17.9",
43+
"@types/node": "^20.17.10",
4444
"@types/react": "^18.3.12",
45-
"eslint": "^9.16.0",
46-
"eslint-config-next": "^15.0.3",
45+
"eslint": "^9.17.0",
46+
"eslint-config-next": "^15.1.0",
4747
"eslint-config-prettier": "^9.1.0",
4848
"eslint-plugin-simple-import-sort": "^12.1.1",
4949
"globals": "^15.13.0",
5050
"husky": "^9.1.7",
51-
"lint-staged": "^15.2.10",
52-
"prettier": "^3.4.1",
51+
"lint-staged": "^15.2.11",
52+
"prettier": "^3.4.2",
5353
"prettier-plugin-css-order": "^2.1.2",
5454
"typescript": "~5.7.2",
55-
"typescript-eslint": "^8.17.0"
55+
"typescript-eslint": "^8.18.0"
5656
},
5757
"prettier": {
5858
"singleQuote": true,
@@ -67,7 +67,7 @@
6767
"*.{html,md,less,json,yml,js,mjs,ts,tsx}": "prettier --write"
6868
},
6969
"scripts": {
70-
"prepare": "husky",
70+
"prepare": "husky && touch .env.local",
7171
"dev": "next dev",
7272
"build": "next build",
7373
"export": "next build && next export",

pages/api/Lark/core.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { LarkApp, LarkData } from 'mobx-lark';
33
import { safeAPI } from '../core';
44

55
export const lark = new LarkApp({
6+
host: process.env.LARK_API_HOST,
67
id: process.env.LARK_APP_ID!,
78
secret: process.env.LARK_APP_SECRET!,
89
});

pages/member/[nickname].tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ export const getServerSideProps = compose<{ nickname: string }>(
3232
]);
3333

3434
return {
35-
props: { member, leaderProjects, memberProjects },
35+
props: JSON.parse(
36+
JSON.stringify({ member, leaderProjects, memberProjects }),
37+
),
3638
};
3739
},
3840
);

pages/project/[id].tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@ export const getServerSideProps = compose<
4040
);
4141
}
4242
return {
43-
props: {
44-
project: JSON.parse(JSON.stringify(project)),
45-
repositories,
46-
},
43+
props: JSON.parse(JSON.stringify({ project, repositories })),
4744
};
4845
},
4946
);

0 commit comments

Comments
 (0)