nsgm-cli 2.1.12 → 2.1.14
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 +369 -163
- package/client/components/Button.tsx +3 -5
- package/client/components/__tests__/Button.test.tsx +10 -10
- package/client/layout/index.tsx +149 -137
- package/client/redux/reducers.ts +1 -1
- package/client/redux/store.ts +2 -1
- package/client/redux/template/manage/actions.ts +77 -88
- package/client/redux/template/manage/reducers.ts +25 -37
- package/client/redux/template/manage/types.ts +1 -1
- package/client/service/template/manage.ts +20 -21
- package/client/styled/common.ts +12 -13
- package/client/styled/layout/index.ts +19 -19
- package/client/styled/template/manage.ts +14 -13
- package/client/utils/common.ts +23 -21
- package/client/utils/cookie.ts +18 -19
- package/client/utils/fetch.ts +64 -100
- package/client/utils/menu.tsx +16 -3
- package/client/utils/sso.ts +74 -84
- package/eslint.config.js +38 -1
- package/generation/README.md +25 -18
- package/generation/__tests__/example.test.js +41 -0
- package/generation/client/utils/menu.tsx +9 -2
- package/generation/env.example +3 -0
- package/generation/eslint.config.js +112 -0
- package/generation/gitignore +6 -1
- package/generation/jest.config.js +40 -0
- package/generation/package.json +25 -4
- package/jest.config.js +23 -6
- package/lib/args.js +9 -1
- package/lib/cli/app.d.ts +28 -0
- package/lib/cli/app.js +99 -0
- package/lib/cli/commands/build.d.ts +2 -0
- package/lib/cli/commands/build.js +29 -0
- package/lib/cli/commands/create.d.ts +2 -0
- package/lib/cli/commands/create.js +113 -0
- package/lib/cli/commands/delete.d.ts +3 -0
- package/lib/cli/commands/delete.js +151 -0
- package/lib/cli/commands/export.d.ts +2 -0
- package/lib/cli/commands/export.js +42 -0
- package/lib/cli/commands/help.d.ts +2 -0
- package/lib/cli/commands/help.js +42 -0
- package/lib/cli/commands/init.d.ts +2 -0
- package/lib/cli/commands/init.js +115 -0
- package/lib/cli/commands/server.d.ts +3 -0
- package/lib/cli/commands/server.js +26 -0
- package/lib/cli/commands/upgrade.d.ts +2 -0
- package/lib/cli/commands/upgrade.js +38 -0
- package/lib/cli/commands/version.d.ts +2 -0
- package/lib/cli/commands/version.js +24 -0
- package/lib/cli/index.d.ts +16 -0
- package/lib/cli/index.js +33 -0
- package/lib/cli/parser.d.ts +22 -0
- package/lib/cli/parser.js +115 -0
- package/lib/cli/registry.d.ts +33 -0
- package/lib/cli/registry.js +81 -0
- package/lib/cli/types/project.d.ts +10 -0
- package/lib/cli/types/project.js +2 -0
- package/lib/cli/types.d.ts +31 -0
- package/lib/cli/types.js +20 -0
- package/lib/cli/utils/console.d.ts +62 -0
- package/lib/cli/utils/console.js +148 -0
- package/lib/cli/utils/index.d.ts +2 -0
- package/lib/cli/utils/index.js +7 -0
- package/lib/cli/utils/prompt.d.ts +83 -0
- package/lib/cli/utils/prompt.js +368 -0
- package/lib/constants.d.ts +58 -0
- package/lib/constants.js +162 -0
- package/lib/generate.d.ts +25 -3
- package/lib/generate.js +97 -621
- package/lib/generate_create.d.ts +9 -0
- package/lib/generate_create.js +326 -0
- package/lib/generate_delete.d.ts +8 -0
- package/lib/generate_delete.js +156 -0
- package/lib/generate_init.d.ts +50 -0
- package/lib/generate_init.js +492 -0
- package/lib/generators/base-generator.d.ts +47 -0
- package/lib/generators/base-generator.js +92 -0
- package/lib/generators/generator-factory.d.ts +20 -0
- package/lib/generators/generator-factory.js +25 -0
- package/lib/generators/page-generator.d.ts +41 -0
- package/lib/generators/page-generator.js +552 -0
- package/lib/generators/resolver-generator.d.ts +12 -0
- package/lib/generators/resolver-generator.js +303 -0
- package/lib/generators/schema-generator.d.ts +7 -0
- package/lib/generators/schema-generator.js +57 -0
- package/lib/generators/service-generator.d.ts +7 -0
- package/lib/generators/service-generator.js +119 -0
- package/lib/generators/sql-generator.d.ts +8 -0
- package/lib/generators/sql-generator.js +52 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +14 -193
- package/lib/server/csrf.js +9 -16
- package/lib/server/db.js +6 -7
- package/lib/server/graphql.js +5 -6
- package/lib/server/plugins/date.js +1 -1
- package/lib/server/utils/graphql-cache.js +3 -3
- package/lib/tsconfig.build.tsbuildinfo +1 -1
- package/lib/utils/project-config.d.ts +5 -0
- package/lib/utils/project-config.js +145 -0
- package/lib/utils.js +1 -1
- package/next.config.js +12 -8
- package/package.json +10 -7
- package/pages/_app.tsx +23 -28
- package/pages/_document.tsx +39 -19
- package/pages/index.tsx +84 -39
- package/pages/login.tsx +21 -21
- package/pages/template/manage.tsx +114 -89
- package/public/fonts/font-awesome.min.css +4 -0
- package/public/fonts/fontawesome-webfont.woff +0 -0
- package/public/fonts/fontawesome-webfont.woff2 +0 -0
- package/public/slbhealthcheck.html +1 -1
- package/server/apis/template.js +0 -2
- package/generation/eslintrc.js +0 -16
package/client/layout/index.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
|
-
import { Layout, Menu, Breadcrumb, Image,
|
|
2
|
+
import { Layout, Menu, Breadcrumb, Image, Dropdown, Space, Tooltip } from 'antd'
|
|
3
3
|
import { Container } from '@/styled/layout'
|
|
4
4
|
import styled from 'styled-components'
|
|
5
5
|
import { useRouter } from 'next/router'
|
|
@@ -9,8 +9,20 @@ import { logout } from '@/utils/sso'
|
|
|
9
9
|
import getConfig from 'next/config'
|
|
10
10
|
import { LogoutOutlined, SettingOutlined, BellOutlined, UserOutlined } from '@ant-design/icons'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
interface SubMenuItem {
|
|
13
|
+
key: string
|
|
14
|
+
text: string
|
|
15
|
+
url: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface MenuItem {
|
|
19
|
+
key: string
|
|
20
|
+
text: string
|
|
21
|
+
url: string
|
|
22
|
+
icon?: React.ReactNode
|
|
23
|
+
subMenus?: SubMenuItem[]
|
|
24
|
+
}
|
|
25
|
+
|
|
14
26
|
const { Header, Content, Sider } = Layout
|
|
15
27
|
|
|
16
28
|
const nextConfig = getConfig()
|
|
@@ -19,92 +31,92 @@ const { prefix } = publicRuntimeConfig
|
|
|
19
31
|
|
|
20
32
|
// styled-components
|
|
21
33
|
const FlexLayout = styled(Layout)`
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
34
|
+
display: flex;
|
|
35
|
+
flex: 1;
|
|
36
|
+
`
|
|
25
37
|
const StyledSider = styled(Sider)`
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
box-shadow: 2px 0 8px -4px rgba(0, 0, 0, 0.1);
|
|
41
|
+
z-index: 5;
|
|
42
|
+
position: relative;
|
|
43
|
+
`
|
|
32
44
|
|
|
33
45
|
const SideMenu = styled(Menu)`
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
46
|
+
height: 100%;
|
|
47
|
+
border-right: 0;
|
|
48
|
+
padding: 8px 0;
|
|
49
|
+
`
|
|
38
50
|
|
|
39
51
|
const ContentLayout = styled(Layout)`
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
flex: 1;
|
|
55
|
+
background: #f5f7fa;
|
|
56
|
+
position: relative;
|
|
57
|
+
z-index: 1;
|
|
58
|
+
`
|
|
47
59
|
const StyledHeader = styled(Header)`
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
padding: 0 24px;
|
|
63
|
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
|
|
64
|
+
z-index: 11;
|
|
65
|
+
|
|
66
|
+
.logo {
|
|
67
|
+
margin-right: 24px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.main-menu {
|
|
71
|
+
flex: 1;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.user-actions {
|
|
48
75
|
display: flex;
|
|
49
76
|
align-items: center;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
77
|
+
|
|
78
|
+
.action-icon {
|
|
79
|
+
font-size: 18px;
|
|
80
|
+
color: rgba(255, 255, 255, 0.85);
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
padding: 0 8px;
|
|
83
|
+
transition: color 0.3s;
|
|
84
|
+
|
|
85
|
+
&:hover {
|
|
86
|
+
color: #fff;
|
|
87
|
+
}
|
|
60
88
|
}
|
|
61
|
-
|
|
62
|
-
.user-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
.
|
|
67
|
-
font-size: 18px;
|
|
89
|
+
|
|
90
|
+
.user-dropdown {
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
padding: 0 8px;
|
|
93
|
+
|
|
94
|
+
.username {
|
|
68
95
|
color: rgba(255, 255, 255, 0.85);
|
|
69
|
-
|
|
70
|
-
padding: 0 8px;
|
|
71
|
-
transition: color 0.3s;
|
|
72
|
-
|
|
73
|
-
&:hover {
|
|
74
|
-
color: #fff;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.user-dropdown {
|
|
79
|
-
cursor: pointer;
|
|
80
|
-
padding: 0 8px;
|
|
81
|
-
|
|
82
|
-
.username {
|
|
83
|
-
color: rgba(255, 255, 255, 0.85);
|
|
84
|
-
margin-left: 8px;
|
|
85
|
-
}
|
|
96
|
+
margin-left: 8px;
|
|
86
97
|
}
|
|
87
98
|
}
|
|
88
|
-
|
|
99
|
+
}
|
|
100
|
+
`
|
|
89
101
|
const StyledBreadcrumb = styled(Breadcrumb)`
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
102
|
+
margin: 16px 24px;
|
|
103
|
+
font-size: 14px;
|
|
104
|
+
`
|
|
93
105
|
const StyledContent = styled(Content)`
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
106
|
+
margin: 0 24px 24px;
|
|
107
|
+
padding: 24px;
|
|
108
|
+
background: #fff;
|
|
109
|
+
border-radius: 4px;
|
|
110
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
111
|
+
min-height: calc(100vh - 180px);
|
|
112
|
+
position: relative;
|
|
113
|
+
z-index: 1;
|
|
114
|
+
`
|
|
103
115
|
|
|
104
116
|
const getLocationKey = () => {
|
|
105
|
-
|
|
117
|
+
const result = {
|
|
106
118
|
topMenu: '1',
|
|
107
|
-
slideMenu: '0'
|
|
119
|
+
slideMenu: '0',
|
|
108
120
|
}
|
|
109
121
|
|
|
110
122
|
if (typeof window !== 'undefined') {
|
|
@@ -123,13 +135,11 @@ const getLocationKey = () => {
|
|
|
123
135
|
locationStr = locationStr.split(prefix)[1]
|
|
124
136
|
}
|
|
125
137
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
_.each(menuConfig, (item, index) => {
|
|
138
|
+
_.each(menuConfig, (item) => {
|
|
129
139
|
const { key, url, subMenus } = item
|
|
130
140
|
|
|
131
141
|
if (subMenus) {
|
|
132
|
-
_.each(subMenus, (subItem
|
|
142
|
+
_.each(subMenus, (subItem: MenuItem) => {
|
|
133
143
|
const { key: subKey, url: subUrl } = subItem
|
|
134
144
|
|
|
135
145
|
if (locationStr === subUrl.split('?')[0]) {
|
|
@@ -142,6 +152,7 @@ const getLocationKey = () => {
|
|
|
142
152
|
|
|
143
153
|
return false
|
|
144
154
|
}
|
|
155
|
+
return true
|
|
145
156
|
})
|
|
146
157
|
} else {
|
|
147
158
|
if (url && locationStr === url.split('?')[0]) {
|
|
@@ -149,16 +160,15 @@ const getLocationKey = () => {
|
|
|
149
160
|
return false
|
|
150
161
|
}
|
|
151
162
|
}
|
|
163
|
+
return true
|
|
152
164
|
})
|
|
153
165
|
}
|
|
154
166
|
}
|
|
155
167
|
}
|
|
156
|
-
// console.log('result', result)
|
|
157
168
|
return result
|
|
158
169
|
}
|
|
159
170
|
|
|
160
171
|
const routerPush = (router: any, url: string) => {
|
|
161
|
-
// console.log('routerPush', url)
|
|
162
172
|
if (router && url) {
|
|
163
173
|
if (prefix && url.indexOf(prefix) === -1) {
|
|
164
174
|
url = prefix + url
|
|
@@ -173,8 +183,6 @@ const LayoutComponent = ({ user, children }) => {
|
|
|
173
183
|
const [sliderMenuKey, setSliderMenuKey] = useState('1')
|
|
174
184
|
const [collapsed, setCollapsed] = useState(false)
|
|
175
185
|
|
|
176
|
-
// console.log('topMenuKey: ' + topMenuKey, ', sliderMenuKey: ' + sliderMenuKey, user)
|
|
177
|
-
|
|
178
186
|
useEffect(() => {
|
|
179
187
|
const { topMenu, slideMenu } = getLocationKey()
|
|
180
188
|
setTopMenuKey(topMenu)
|
|
@@ -184,10 +192,10 @@ const LayoutComponent = ({ user, children }) => {
|
|
|
184
192
|
const menuItems: any = []
|
|
185
193
|
const menuItemsVertical: any = []
|
|
186
194
|
|
|
187
|
-
_.each(menuConfig, (item
|
|
195
|
+
_.each(menuConfig, (item) => {
|
|
188
196
|
const { key, text, url, icon, subMenus } = item
|
|
189
197
|
|
|
190
|
-
if (key) {
|
|
198
|
+
if (key && text && url) {
|
|
191
199
|
const menuObj = {
|
|
192
200
|
label: text,
|
|
193
201
|
key,
|
|
@@ -200,7 +208,7 @@ const LayoutComponent = ({ user, children }) => {
|
|
|
200
208
|
} else {
|
|
201
209
|
setSliderMenuKey('0')
|
|
202
210
|
}
|
|
203
|
-
}
|
|
211
|
+
},
|
|
204
212
|
}
|
|
205
213
|
|
|
206
214
|
menuItems.push(menuObj)
|
|
@@ -209,51 +217,53 @@ const LayoutComponent = ({ user, children }) => {
|
|
|
209
217
|
if (subMenus) {
|
|
210
218
|
const subMenusChildren: any = []
|
|
211
219
|
|
|
212
|
-
_.each(subMenus, (subItem
|
|
220
|
+
_.each(subMenus, (subItem: MenuItem) => {
|
|
213
221
|
const { key: subKey, text: subText, url: subUrl } = subItem
|
|
214
222
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
const subKeyArr = subKey.split('_')
|
|
222
|
-
const subKeyArrLen = subKeyArr.length
|
|
223
|
+
if (subKey && subText && subUrl) {
|
|
224
|
+
const subMenusChildrenObj = {
|
|
225
|
+
key: `slider_${subKey}`,
|
|
226
|
+
label: subText,
|
|
227
|
+
onClick: () => {
|
|
228
|
+
routerPush(router, subUrl)
|
|
223
229
|
|
|
224
|
-
|
|
230
|
+
const subKeyArr = subKey.split('_')
|
|
231
|
+
const subKeyArrLen = subKeyArr.length
|
|
225
232
|
|
|
226
|
-
|
|
227
|
-
|
|
233
|
+
if (subKeyArrLen >= 1) setTopMenuKey(subKeyArr[0])
|
|
234
|
+
if (subKeyArrLen >= 2) setSliderMenuKey(subKeyArr[1])
|
|
235
|
+
},
|
|
228
236
|
}
|
|
229
|
-
}
|
|
230
237
|
|
|
231
|
-
|
|
238
|
+
subMenusChildren.push(subMenusChildrenObj)
|
|
239
|
+
}
|
|
232
240
|
})
|
|
233
241
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
if (key && text && icon) {
|
|
243
|
+
const subMenuObjVertical = {
|
|
244
|
+
key: `slider_${key}`,
|
|
245
|
+
icon,
|
|
246
|
+
label: text,
|
|
247
|
+
onTitleClick: () => {
|
|
248
|
+
setTopMenuKey(key)
|
|
249
|
+
setSliderMenuKey('1')
|
|
250
|
+
},
|
|
251
|
+
children: subMenusChildren,
|
|
252
|
+
}
|
|
244
253
|
|
|
245
|
-
|
|
254
|
+
menuItemsVertical.push(subMenuObjVertical)
|
|
255
|
+
}
|
|
246
256
|
} else {
|
|
247
|
-
if (key) {
|
|
257
|
+
if (key && text && url) {
|
|
248
258
|
const menuObjVertical = {
|
|
249
259
|
label: text,
|
|
250
260
|
icon,
|
|
251
|
-
key:
|
|
261
|
+
key: `slider_${key}_0`,
|
|
252
262
|
onClick: () => {
|
|
253
263
|
routerPush(router, url)
|
|
254
264
|
setTopMenuKey(key)
|
|
255
265
|
setSliderMenuKey('0')
|
|
256
|
-
}
|
|
266
|
+
},
|
|
257
267
|
}
|
|
258
268
|
|
|
259
269
|
menuItemsVertical.push(menuObjVertical)
|
|
@@ -266,7 +276,7 @@ const LayoutComponent = ({ user, children }) => {
|
|
|
266
276
|
<Container>
|
|
267
277
|
<StyledHeader>
|
|
268
278
|
<div className="logo">
|
|
269
|
-
<Image width={120} src={prefix
|
|
279
|
+
<Image width={120} src={`${prefix}/images/zhizuotu_1.png`} preview={false} />
|
|
270
280
|
</div>
|
|
271
281
|
<Menu
|
|
272
282
|
theme="dark"
|
|
@@ -329,39 +339,41 @@ const LayoutComponent = ({ user, children }) => {
|
|
|
329
339
|
mode="inline"
|
|
330
340
|
defaultSelectedKeys={['slider_1_0']}
|
|
331
341
|
defaultOpenKeys={['slider_1']}
|
|
332
|
-
selectedKeys={[
|
|
333
|
-
openKeys={[
|
|
342
|
+
selectedKeys={[`slider_${topMenuKey}_${sliderMenuKey}`]}
|
|
343
|
+
openKeys={[`slider_${topMenuKey}`]}
|
|
334
344
|
items={menuItemsVertical}
|
|
335
345
|
className="side-menu"
|
|
336
346
|
/>
|
|
337
347
|
</div>
|
|
338
348
|
</StyledSider>
|
|
339
349
|
<ContentLayout className="content-layout">
|
|
340
|
-
<StyledBreadcrumb
|
|
341
|
-
{_.
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
350
|
+
<StyledBreadcrumb
|
|
351
|
+
items={_.compact(
|
|
352
|
+
_.flatMap(menuConfig, (item, index) => {
|
|
353
|
+
const { key, text, subMenus } = item
|
|
354
|
+
|
|
355
|
+
if (subMenus) {
|
|
356
|
+
const subItems: any = []
|
|
357
|
+
_.each(subMenus, (subItem: MenuItem, subIndex: number) => {
|
|
358
|
+
const { key: subKey, text: subText } = subItem
|
|
359
|
+
if (subKey === `${topMenuKey}_${sliderMenuKey}`) {
|
|
360
|
+
subItems.push({ title: text, key: `breadcrumb${subIndex}` })
|
|
361
|
+
subItems.push({ title: subText, key: `breadcrumb${subIndex}_sub` })
|
|
362
|
+
return false
|
|
363
|
+
}
|
|
364
|
+
return true
|
|
365
|
+
})
|
|
366
|
+
return subItems
|
|
367
|
+
} else {
|
|
368
|
+
if (key && key === topMenuKey) {
|
|
369
|
+
return { title: text, key: `breadcrumb${index}` }
|
|
352
370
|
}
|
|
353
|
-
})
|
|
354
|
-
return subContent
|
|
355
|
-
} else {
|
|
356
|
-
if (key && key === topMenuKey) {
|
|
357
|
-
return <Breadcrumb.Item key={'breadcrumb' + index}>{text}</Breadcrumb.Item>
|
|
358
371
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
</StyledContent>
|
|
372
|
+
return null
|
|
373
|
+
})
|
|
374
|
+
)}
|
|
375
|
+
/>
|
|
376
|
+
<StyledContent>{children}</StyledContent>
|
|
365
377
|
</ContentLayout>
|
|
366
378
|
</FlexLayout>
|
|
367
379
|
</Container>
|
package/client/redux/reducers.ts
CHANGED
package/client/redux/store.ts
CHANGED
|
@@ -16,6 +16,7 @@ if (reducersKeysLen > 0) {
|
|
|
16
16
|
export type RootState = ReturnType<typeof combineReducer>
|
|
17
17
|
|
|
18
18
|
// 创建一个临时 store 实例来获取正确的 dispatch 类型
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
19
20
|
const tempStore = configureStore({
|
|
20
21
|
reducer: combineReducer,
|
|
21
22
|
middleware: (getDefaultMiddleware) =>
|
|
@@ -48,7 +49,7 @@ export const initializeStore = (preloadedState?: any): EnhancedStore => {
|
|
|
48
49
|
if (preloadedState && store) {
|
|
49
50
|
_store = initStore({
|
|
50
51
|
...store.getState(),
|
|
51
|
-
...preloadedState
|
|
52
|
+
...preloadedState,
|
|
52
53
|
})
|
|
53
54
|
store = undefined
|
|
54
55
|
}
|