nsgm-cli 2.1.42 → 2.1.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/client/layout/index.tsx +1 -1
- package/client/redux/template/manage/reducers.ts +1 -1
- package/client/service/template/manage.ts +1 -1
- package/client/styled/template/manage.ts +1 -1
- package/client/utils/common.ts +1 -1
- package/client/utils/cookie.ts +1 -1
- package/client/utils/sso.ts +1 -1
- package/generation/README.md +11 -11
- package/generation/package.json +4 -0
- package/lib/args.js +35 -5
- package/lib/generate.js +3 -3
- package/lib/generators/file-generator.js +4 -4
- package/lib/index.js +0 -0
- package/lib/server/csrf.d.ts +2 -2
- package/lib/server/graphql.js +36 -3
- package/lib/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +45 -48
- package/pages/_app.tsx +3 -2
- package/pages/index.tsx +1 -1
- package/pages/login.tsx +1 -1
- package/pages/template/manage.tsx +1 -1
- package/scripts/performance-check.sh +0 -0
- package/scripts/shutdown.sh +0 -0
- package/scripts/startup.sh +0 -0
package/package.json
CHANGED
|
@@ -1,42 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nsgm-cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.44",
|
|
4
4
|
"description": "A CLI tool to run Next/Style-components and Graphql/Mysql fullstack project",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"help": "node ./lib/index.js",
|
|
8
|
-
"dev": "npm run tsbuild && node ./lib/index.js dev",
|
|
9
|
-
"tsbuild": "rimraf lib && tsc --build tsconfig.build.json",
|
|
10
|
-
"build": "node ./lib/index.js build",
|
|
11
|
-
"analyze": "cross-env ANALYZE=true npm run build",
|
|
12
|
-
"tsv": "node ./lib/index.js version",
|
|
13
|
-
"start": "node ./lib/index.js start",
|
|
14
|
-
"export": "node ./lib/index.js export",
|
|
15
|
-
"init": "node ./lib/index.js init",
|
|
16
|
-
"upgrade": "node ./lib/index.js upgrade",
|
|
17
|
-
"create": "node ./lib/index.js create",
|
|
18
|
-
"delete": "node ./lib/index.js delete",
|
|
19
|
-
"deletedb": "node ./lib/index.js deletedb",
|
|
20
|
-
"clean": "rimraf .next && rimraf build && rimraf webapp && rimraf lib",
|
|
21
|
-
"lint": "eslint \"src/**/*.{ts,tsx}\" \"client/**/*.{ts,tsx}\" \"pages/**/*.{ts,tsx}\" --fix",
|
|
22
|
-
"lint:check": "eslint \"src/**/*.{ts,tsx}\" \"client/**/*.{ts,tsx}\" \"pages/**/*.{ts,tsx}\"",
|
|
23
|
-
"format": "prettier --write \"src/**/*.{ts,tsx}\" \"client/**/*.{ts,tsx}\" \"pages/**/*.{ts,tsx}\"",
|
|
24
|
-
"check-deps": "npm outdated",
|
|
25
|
-
"update-deps": "npm update",
|
|
26
|
-
"audit-fix": "npm audit fix",
|
|
27
|
-
"prepublishOnly": "npm run lint:check",
|
|
28
|
-
"preversion": "npm run lint:check",
|
|
29
|
-
"version": "npm run format && git add -A src",
|
|
30
|
-
"postversion": "git push && git push --tags",
|
|
31
|
-
"release": "npm run clean && npm run lint && npm run format && npm run tsbuild && npm run build",
|
|
32
|
-
"test": "jest",
|
|
33
|
-
"test:coverage": "jest --coverage",
|
|
34
|
-
"test:watch": "jest --watch",
|
|
35
|
-
"performance": "./scripts/performance-check.sh",
|
|
36
|
-
"generate-password": "node scripts/generate-password-hash.js",
|
|
37
|
-
"vercel-build": "npm run tsbuild && npm run build",
|
|
38
|
-
"vercel-dev": "npm run tsbuild && npm run dev"
|
|
39
|
-
},
|
|
40
6
|
"repository": {
|
|
41
7
|
"type": "git",
|
|
42
8
|
"url": "git+https://github.com/erishen/nsgm.git"
|
|
@@ -83,13 +49,13 @@
|
|
|
83
49
|
"@types/bcrypt": "6.0.0",
|
|
84
50
|
"@types/express-session": "1.18.2",
|
|
85
51
|
"antd": "5.26.6",
|
|
52
|
+
"@ant-design/icons": "5.6.1",
|
|
86
53
|
"axios": "1.13.4",
|
|
87
54
|
"bcrypt": "6.0.0",
|
|
88
55
|
"body-parser": "2.2.2",
|
|
89
56
|
"chalk": "4.1.2",
|
|
90
57
|
"commander": "14.0.0",
|
|
91
58
|
"cors": "2.8.5",
|
|
92
|
-
"critters": "0.0.25",
|
|
93
59
|
"dataloader": "2.2.3",
|
|
94
60
|
"dayjs": "1.11.13",
|
|
95
61
|
"dotenv": "17.2.1",
|
|
@@ -98,7 +64,6 @@
|
|
|
98
64
|
"express-fileupload": "1.5.2",
|
|
99
65
|
"express-session": "1.18.2",
|
|
100
66
|
"file-saver": "2.0.5",
|
|
101
|
-
"glob": "11.1.0",
|
|
102
67
|
"graphql": "16.11.0",
|
|
103
68
|
"graphql-http": "1.22.4",
|
|
104
69
|
"i18next": "24.1.0",
|
|
@@ -119,7 +84,7 @@
|
|
|
119
84
|
"redux": "5.0.1",
|
|
120
85
|
"replace": "1.2.2",
|
|
121
86
|
"replace-in-file": "6.3.5",
|
|
122
|
-
"rimraf": "6.
|
|
87
|
+
"rimraf": "6.1.2",
|
|
123
88
|
"shelljs": "0.10.0",
|
|
124
89
|
"styled-components": "6.1.19",
|
|
125
90
|
"terser-webpack-plugin": "5.3.14",
|
|
@@ -129,28 +94,27 @@
|
|
|
129
94
|
"webpack-simple-progress-plugin": "0.0.5"
|
|
130
95
|
},
|
|
131
96
|
"devDependencies": {
|
|
132
|
-
"@babel/core": "7.28.
|
|
133
|
-
"@
|
|
134
|
-
"@
|
|
135
|
-
"@testing-library/dom": "
|
|
136
|
-
"@testing-library/
|
|
137
|
-
"@testing-library/react": "16.3.0",
|
|
97
|
+
"@babel/core": "7.28.6",
|
|
98
|
+
"@eslint/js": "9.39.2",
|
|
99
|
+
"@testing-library/dom": "10.4.1",
|
|
100
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
101
|
+
"@testing-library/react": "16.3.1",
|
|
138
102
|
"@testing-library/user-event": "14.6.1",
|
|
139
103
|
"@types/body-parser": "1.19.6",
|
|
140
104
|
"@types/express": "5.0.3",
|
|
105
|
+
"@types/express-serve-static-core": "5.1.1",
|
|
141
106
|
"@types/express-fileupload": "1.5.1",
|
|
142
|
-
"@types/
|
|
107
|
+
"@types/qs": "6.14.0",
|
|
143
108
|
"@types/inquirer": "9.0.8",
|
|
144
109
|
"@types/jest": "30.0.0",
|
|
145
110
|
"@types/lodash": "4.17.20",
|
|
146
111
|
"@types/lusca": "1.7.5",
|
|
147
112
|
"@types/mysql": "2.15.27",
|
|
148
|
-
"@types/next": "9.0.0",
|
|
149
113
|
"@types/node": "24.1.0",
|
|
150
114
|
"@types/react": "18.3.23",
|
|
151
115
|
"@types/react-dom": "18.3.7",
|
|
152
116
|
"@types/react-redux": "7.1.34",
|
|
153
|
-
"@types/shelljs": "0.
|
|
117
|
+
"@types/shelljs": "0.10.0",
|
|
154
118
|
"@types/styled-components": "5.1.34",
|
|
155
119
|
"@types/uuid": "10.0.0",
|
|
156
120
|
"@typescript-eslint/eslint-plugin": "8.38.0",
|
|
@@ -167,5 +131,38 @@
|
|
|
167
131
|
"prettier": "3.6.2",
|
|
168
132
|
"typescript": "5.8.3",
|
|
169
133
|
"webpack-bundle-analyzer": "4.10.2"
|
|
134
|
+
},
|
|
135
|
+
"scripts": {
|
|
136
|
+
"help": "node ./lib/index.js",
|
|
137
|
+
"dev": "pnpm run tsbuild && node ./lib/index.js dev",
|
|
138
|
+
"tsbuild": "rimraf lib && tsc --build tsconfig.build.json",
|
|
139
|
+
"build": "node ./lib/index.js build",
|
|
140
|
+
"analyze": "cross-env ANALYZE=true pnpm run build",
|
|
141
|
+
"tsv": "node ./lib/index.js version",
|
|
142
|
+
"start": "node ./lib/index.js start",
|
|
143
|
+
"export": "node ./lib/index.js export",
|
|
144
|
+
"init": "node ./lib/index.js init",
|
|
145
|
+
"upgrade": "node ./lib/index.js upgrade",
|
|
146
|
+
"create": "node ./lib/index.js create",
|
|
147
|
+
"delete": "node ./lib/index.js delete",
|
|
148
|
+
"deletedb": "node ./lib/index.js deletedb",
|
|
149
|
+
"clean": "rimraf .next && rimraf build && rimraf webapp && rimraf lib",
|
|
150
|
+
"lint": "eslint \"src/**/*.{ts,tsx}\" \"client/**/*.{ts,tsx}\" \"pages/**/*.{ts,tsx}\" --fix",
|
|
151
|
+
"lint:check": "eslint \"src/**/*.{ts,tsx}\" \"client/**/*.{ts,tsx}\" \"pages/**/*.{ts,tsx}\"",
|
|
152
|
+
"format": "prettier --write \"src/**/*.{ts,tsx}\" \"client/**/*.{ts,tsx}\" \"pages/**/*.{ts,tsx}\"",
|
|
153
|
+
"check-deps": "pnpm outdated",
|
|
154
|
+
"update-deps": "pnpm update",
|
|
155
|
+
"audit-fix": "pnpm audit fix",
|
|
156
|
+
"preversion": "pnpm run lint:check",
|
|
157
|
+
"version": "pnpm run format && git add -A src",
|
|
158
|
+
"postversion": "git push && git push --tags",
|
|
159
|
+
"release": "pnpm run clean && pnpm run lint && pnpm run format && pnpm run tsbuild && pnpm run build",
|
|
160
|
+
"test": "jest",
|
|
161
|
+
"test:coverage": "jest --coverage",
|
|
162
|
+
"test:watch": "jest --watch",
|
|
163
|
+
"performance": "./scripts/performance-check.sh",
|
|
164
|
+
"generate-password": "node scripts/generate-password-hash.js",
|
|
165
|
+
"vercel-build": "pnpm run tsbuild && pnpm run build",
|
|
166
|
+
"vercel-dev": "pnpm run tsbuild && pnpm run dev"
|
|
170
167
|
}
|
|
171
|
-
}
|
|
168
|
+
}
|
package/pages/_app.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import { useEffect, useState } from "react";
|
|
|
5
5
|
import { Provider } from "react-redux";
|
|
6
6
|
import { Spin } from "antd";
|
|
7
7
|
import { appWithTranslation } from "next-i18next";
|
|
8
|
+
import { AppProps } from "next/app";
|
|
8
9
|
import { useRouter } from "next/router";
|
|
9
10
|
import { useStore } from "@/redux/store";
|
|
10
11
|
import { Loading } from "@/styled/common";
|
|
@@ -23,7 +24,7 @@ const theme = {
|
|
|
23
24
|
},
|
|
24
25
|
};
|
|
25
26
|
|
|
26
|
-
const App = ({ Component, pageProps }) => {
|
|
27
|
+
const App = ({ Component, pageProps }: AppProps) => {
|
|
27
28
|
const store = useStore(pageProps.initialReduxState);
|
|
28
29
|
const router = useRouter();
|
|
29
30
|
const [ssoUser, setSsoUser] = useState(null);
|
|
@@ -142,4 +143,4 @@ const App = ({ Component, pageProps }) => {
|
|
|
142
143
|
};
|
|
143
144
|
|
|
144
145
|
// appWithTranslation 会自动从 next.config.js 读取 i18n 配置
|
|
145
|
-
export default appWithTranslation(App);
|
|
146
|
+
export default appWithTranslation(App) as any;
|
package/pages/index.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _ from "lodash";
|
|
1
|
+
import * as _ from "lodash";
|
|
2
2
|
import { Container } from "../client/styled/common";
|
|
3
3
|
import { Card, Typography, Divider, Row, Col, Tag } from "antd";
|
|
4
4
|
import { CodeOutlined, BookOutlined, DatabaseOutlined, SettingOutlined } from "@ant-design/icons";
|
package/pages/login.tsx
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "@/redux/template/manage/actions";
|
|
25
25
|
import { getTemplateService } from "@/service/template/manage";
|
|
26
26
|
import { RootState, AppDispatch } from "@/redux/store";
|
|
27
|
-
import _ from "lodash";
|
|
27
|
+
import * as _ from "lodash";
|
|
28
28
|
import { useTranslation } from "next-i18next";
|
|
29
29
|
import { getAntdLocale } from "@/utils/i18n";
|
|
30
30
|
import { useRouter } from "next/router";
|
|
File without changes
|
package/scripts/shutdown.sh
CHANGED
|
File without changes
|
package/scripts/startup.sh
CHANGED
|
File without changes
|