create-catalyst-app 0.2.0-beta.3 → 0.3.0-beta.1
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/package.json +1 -1
- package/templates/common/server/server.js +13 -2
- package/templates/none-js/client/index.js +2 -3
- package/templates/none-js/package.json +1 -13
- package/templates/none-js/src/js/containers/App/index.js +1 -1
- package/templates/none-js/src/js/routes/utils.js +1 -1
- package/templates/none-ts/client/index.js +2 -3
- package/templates/none-ts/package.json +1 -13
- package/templates/none-ts/src/js/containers/App/index.js +1 -1
- package/templates/none-ts/src/js/routes/utils.js +1 -1
- package/templates/redux-js/client/index.js +2 -3
- package/templates/redux-js/package.json +1 -13
- package/templates/redux-js/src/js/containers/App/index.js +1 -1
- package/templates/redux-js/src/js/routes/utils.js +1 -1
- package/templates/redux-ts/client/index.js +2 -3
- package/templates/redux-ts/package.json +1 -13
- package/templates/redux-ts/src/js/containers/App/index.js +1 -1
- package/templates/redux-ts/src/js/routes/utils.js +1 -1
- package/templates/rtk-js/client/index.js +2 -3
- package/templates/rtk-js/package.json +1 -13
- package/templates/rtk-js/src/js/containers/App/index.js +1 -1
- package/templates/rtk-js/src/js/routes/utils.js +1 -1
- package/templates/rtk-ts/client/index.js +2 -3
- package/templates/rtk-ts/package.json +1 -13
- package/templates/rtk-ts/src/js/containers/App/index.js +1 -1
- package/templates/rtk-ts/src/js/routes/utils.js +1 -1
package/package.json
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import express from "express"
|
|
2
|
+
import path from "path"
|
|
3
|
+
import expressStaticGzip from "express-static-gzip"
|
|
3
4
|
|
|
4
5
|
// Server middlewares are added here.
|
|
5
6
|
|
|
6
7
|
export function addMiddlewares(app) {
|
|
8
|
+
if (process.env.NODE_ENV === "production") {
|
|
9
|
+
app.use(
|
|
10
|
+
`${process.env.PUBLIC_STATIC_ASSET_PATH}/client`,
|
|
11
|
+
expressStaticGzip(path.join(__dirname, `../${process.env.BUILD_OUTPUT_PATH}/client`), {
|
|
12
|
+
enableBrotli: true,
|
|
13
|
+
orderPreference: ["br", "gz"],
|
|
14
|
+
serveStatic: { maxAge: "1y", etag: true },
|
|
15
|
+
})
|
|
16
|
+
)
|
|
17
|
+
}
|
|
7
18
|
app.use("/favicon.ico", express.static(path.join(__dirname, "../public/favicon.ico")))
|
|
8
19
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import "./styles"
|
|
3
3
|
import { hydrateRoot } from "react-dom/client"
|
|
4
|
-
import {
|
|
5
|
-
import { RouterProvider } from "@tata1mg/router"
|
|
4
|
+
import { RouterProvider, hydrationReady } from "catalyst-core"
|
|
6
5
|
import clientRouter from "catalyst-core/router/ClientRouter"
|
|
7
6
|
|
|
8
7
|
window.addEventListener("load", () => {
|
|
9
|
-
|
|
8
|
+
hydrationReady().then(() => {
|
|
10
9
|
const { __ROUTER_INITIAL_DATA__: routerInitialData } = window
|
|
11
10
|
|
|
12
11
|
const router = clientRouter({ routerInitialState: routerInitialData })
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
"build": "catalyst build",
|
|
7
7
|
"serve": "catalyst serve",
|
|
8
8
|
"lint": "eslint .",
|
|
9
|
-
"devBuild": "catalyst devBuild",
|
|
10
|
-
"devServe": "catalyst devServe",
|
|
11
9
|
"buildApp": "catalyst buildApp",
|
|
12
10
|
"buildApp:ios": "catalyst buildApp:ios",
|
|
13
11
|
"buildApp:android": "catalyst buildApp:android",
|
|
@@ -24,9 +22,7 @@
|
|
|
24
22
|
"@routes": "src/js/routes/"
|
|
25
23
|
},
|
|
26
24
|
"dependencies": {
|
|
27
|
-
"
|
|
28
|
-
"@tata1mg/router": "0.1.0-beta",
|
|
29
|
-
"catalyst-core": "0.2.0-beta.3",
|
|
25
|
+
"catalyst-core": "0.3.0-beta.1",
|
|
30
26
|
"react": "19.0.0",
|
|
31
27
|
"react-dom": "19.0.0"
|
|
32
28
|
},
|
|
@@ -39,14 +35,6 @@
|
|
|
39
35
|
"react-helmet-async": {
|
|
40
36
|
"react": "^16.6.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
41
37
|
"react-dom": "^16.6.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
42
|
-
},
|
|
43
|
-
"@loadable/component": {
|
|
44
|
-
"react": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
45
|
-
"react-dom": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
46
|
-
},
|
|
47
|
-
"@loadable/server": {
|
|
48
|
-
"react": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
49
|
-
"react-dom": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
50
38
|
}
|
|
51
39
|
}
|
|
52
40
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import "./styles"
|
|
3
3
|
import { hydrateRoot } from "react-dom/client"
|
|
4
|
-
import {
|
|
5
|
-
import { RouterProvider } from "@tata1mg/router"
|
|
4
|
+
import { RouterProvider, hydrationReady } from "catalyst-core"
|
|
6
5
|
import clientRouter from "catalyst-core/router/ClientRouter"
|
|
7
6
|
|
|
8
7
|
window.addEventListener("load", () => {
|
|
9
|
-
|
|
8
|
+
hydrationReady().then(() => {
|
|
10
9
|
const { __ROUTER_INITIAL_DATA__: routerInitialData } = window
|
|
11
10
|
|
|
12
11
|
const router = clientRouter({ routerInitialState: routerInitialData })
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
"build": "npm run typecheck && catalyst build",
|
|
7
7
|
"serve": "catalyst serve",
|
|
8
8
|
"lint": "eslint .",
|
|
9
|
-
"devBuild": "catalyst devBuild",
|
|
10
|
-
"devServe": "catalyst devServe",
|
|
11
9
|
"buildApp": "catalyst buildApp",
|
|
12
10
|
"buildApp:ios": "catalyst buildApp:ios",
|
|
13
11
|
"buildApp:android": "catalyst buildApp:android",
|
|
@@ -25,9 +23,7 @@
|
|
|
25
23
|
"@routes": "src/js/routes/"
|
|
26
24
|
},
|
|
27
25
|
"dependencies": {
|
|
28
|
-
"
|
|
29
|
-
"@tata1mg/router": "0.1.0-beta",
|
|
30
|
-
"catalyst-core": "0.2.0-beta.3",
|
|
26
|
+
"catalyst-core": "0.3.0-beta.1",
|
|
31
27
|
"react": "19.0.0",
|
|
32
28
|
"react-dom": "19.0.0"
|
|
33
29
|
},
|
|
@@ -43,14 +39,6 @@
|
|
|
43
39
|
"react-helmet-async": {
|
|
44
40
|
"react": "^16.6.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
45
41
|
"react-dom": "^16.6.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
46
|
-
},
|
|
47
|
-
"@loadable/component": {
|
|
48
|
-
"react": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
49
|
-
"react-dom": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
50
|
-
},
|
|
51
|
-
"@loadable/server": {
|
|
52
|
-
"react": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
53
|
-
"react-dom": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
54
42
|
}
|
|
55
43
|
}
|
|
56
44
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import "./styles"
|
|
3
3
|
import { hydrateRoot } from "react-dom/client"
|
|
4
|
-
import { loadableReady } from "@loadable/component"
|
|
5
4
|
import { Provider } from "react-redux"
|
|
6
|
-
import { RouterProvider } from "
|
|
5
|
+
import { RouterProvider, hydrationReady } from "catalyst-core"
|
|
7
6
|
import clientRouter from "catalyst-core/router/ClientRouter"
|
|
8
7
|
import configureStore from "@store"
|
|
9
8
|
|
|
10
9
|
window.addEventListener("load", () => {
|
|
11
|
-
|
|
10
|
+
hydrationReady().then(() => {
|
|
12
11
|
const { __ROUTER_INITIAL_DATA__: routerInitialData, __INITIAL_STATE__ } = window
|
|
13
12
|
const store = configureStore(__INITIAL_STATE__ || {})
|
|
14
13
|
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
"build": "catalyst build",
|
|
7
7
|
"serve": "catalyst serve",
|
|
8
8
|
"lint": "eslint .",
|
|
9
|
-
"devBuild": "catalyst devBuild",
|
|
10
|
-
"devServe": "catalyst devServe",
|
|
11
9
|
"buildApp": "catalyst buildApp",
|
|
12
10
|
"buildApp:ios": "catalyst buildApp:ios",
|
|
13
11
|
"buildApp:android": "catalyst buildApp:android",
|
|
@@ -25,11 +23,9 @@
|
|
|
25
23
|
"@store": "src/js/store/index.js"
|
|
26
24
|
},
|
|
27
25
|
"dependencies": {
|
|
28
|
-
"@loadable/component": "^5.16.3",
|
|
29
|
-
"@tata1mg/router": "0.1.0-beta",
|
|
30
26
|
"@reduxjs/toolkit": "^2.9.0",
|
|
31
27
|
"react-redux": "^9.2.0",
|
|
32
|
-
"catalyst-core": "0.
|
|
28
|
+
"catalyst-core": "0.3.0-beta.1",
|
|
33
29
|
"react": "19.0.0",
|
|
34
30
|
"react-dom": "19.0.0",
|
|
35
31
|
"redux": "^5.0.1"
|
|
@@ -43,14 +39,6 @@
|
|
|
43
39
|
"react-helmet-async": {
|
|
44
40
|
"react": "^16.6.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
45
41
|
"react-dom": "^16.6.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
46
|
-
},
|
|
47
|
-
"@loadable/component": {
|
|
48
|
-
"react": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
49
|
-
"react-dom": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
50
|
-
},
|
|
51
|
-
"@loadable/server": {
|
|
52
|
-
"react": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
53
|
-
"react-dom": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
54
42
|
}
|
|
55
43
|
}
|
|
56
44
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import "./styles"
|
|
3
3
|
import { hydrateRoot } from "react-dom/client"
|
|
4
|
-
import { loadableReady } from "@loadable/component"
|
|
5
4
|
import { Provider } from "react-redux"
|
|
6
|
-
import { RouterProvider } from "
|
|
5
|
+
import { RouterProvider, hydrationReady } from "catalyst-core"
|
|
7
6
|
import clientRouter from "catalyst-core/router/ClientRouter"
|
|
8
7
|
import configureStore from "@store"
|
|
9
8
|
|
|
10
9
|
window.addEventListener("load", () => {
|
|
11
|
-
|
|
10
|
+
hydrationReady().then(() => {
|
|
12
11
|
const { __ROUTER_INITIAL_DATA__: routerInitialData, __INITIAL_STATE__ } = window
|
|
13
12
|
const store = configureStore(__INITIAL_STATE__ || {})
|
|
14
13
|
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
"build": "npm run typecheck && catalyst build",
|
|
7
7
|
"serve": "catalyst serve",
|
|
8
8
|
"lint": "eslint .",
|
|
9
|
-
"devBuild": "catalyst devBuild",
|
|
10
|
-
"devServe": "catalyst devServe",
|
|
11
9
|
"buildApp": "catalyst buildApp",
|
|
12
10
|
"buildApp:ios": "catalyst buildApp:ios",
|
|
13
11
|
"buildApp:android": "catalyst buildApp:android",
|
|
@@ -26,11 +24,9 @@
|
|
|
26
24
|
"@store": "src/js/store/index.js"
|
|
27
25
|
},
|
|
28
26
|
"dependencies": {
|
|
29
|
-
"@loadable/component": "^5.16.3",
|
|
30
|
-
"@tata1mg/router": "0.1.0-beta",
|
|
31
27
|
"@reduxjs/toolkit": "^2.9.0",
|
|
32
28
|
"react-redux": "^9.2.0",
|
|
33
|
-
"catalyst-core": "0.
|
|
29
|
+
"catalyst-core": "0.3.0-beta.1",
|
|
34
30
|
"react": "19.0.0",
|
|
35
31
|
"react-dom": "19.0.0",
|
|
36
32
|
"redux": "^5.0.1"
|
|
@@ -47,14 +43,6 @@
|
|
|
47
43
|
"react-helmet-async": {
|
|
48
44
|
"react": "^16.6.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
49
45
|
"react-dom": "^16.6.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
50
|
-
},
|
|
51
|
-
"@loadable/component": {
|
|
52
|
-
"react": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
53
|
-
"react-dom": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
54
|
-
},
|
|
55
|
-
"@loadable/server": {
|
|
56
|
-
"react": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
57
|
-
"react-dom": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
58
46
|
}
|
|
59
47
|
}
|
|
60
48
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import "./styles"
|
|
3
3
|
import { hydrateRoot } from "react-dom/client"
|
|
4
|
-
import { loadableReady } from "@loadable/component"
|
|
5
4
|
import { Provider } from "react-redux"
|
|
6
|
-
import { RouterProvider } from "
|
|
5
|
+
import { RouterProvider, hydrationReady } from "catalyst-core"
|
|
7
6
|
import clientRouter from "catalyst-core/router/ClientRouter"
|
|
8
7
|
import configureStore from "@store"
|
|
9
8
|
|
|
10
9
|
window.addEventListener("load", () => {
|
|
11
|
-
|
|
10
|
+
hydrationReady().then(() => {
|
|
12
11
|
const { __ROUTER_INITIAL_DATA__: routerInitialData, __INITIAL_STATE__ } = window
|
|
13
12
|
const store = configureStore(__INITIAL_STATE__ || {})
|
|
14
13
|
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
"build": "catalyst build",
|
|
7
7
|
"serve": "catalyst serve",
|
|
8
8
|
"lint": "eslint .",
|
|
9
|
-
"devBuild": "catalyst devBuild",
|
|
10
|
-
"devServe": "catalyst devServe",
|
|
11
9
|
"buildApp": "catalyst buildApp",
|
|
12
10
|
"buildApp:ios": "catalyst buildApp:ios",
|
|
13
11
|
"buildApp:android": "catalyst buildApp:android",
|
|
@@ -25,11 +23,9 @@
|
|
|
25
23
|
"@store": "src/js/store/index.js"
|
|
26
24
|
},
|
|
27
25
|
"dependencies": {
|
|
28
|
-
"@loadable/component": "^5.16.3",
|
|
29
|
-
"@tata1mg/router": "0.1.0-beta",
|
|
30
26
|
"@reduxjs/toolkit": "^2.9.0",
|
|
31
27
|
"react-redux": "^9.2.0",
|
|
32
|
-
"catalyst-core": "0.
|
|
28
|
+
"catalyst-core": "0.3.0-beta.1",
|
|
33
29
|
"react": "19.0.0",
|
|
34
30
|
"react-dom": "19.0.0",
|
|
35
31
|
"redux": "^5.0.1"
|
|
@@ -43,14 +39,6 @@
|
|
|
43
39
|
"react-helmet-async": {
|
|
44
40
|
"react": "^16.6.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
45
41
|
"react-dom": "^16.6.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
46
|
-
},
|
|
47
|
-
"@loadable/component": {
|
|
48
|
-
"react": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
49
|
-
"react-dom": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
50
|
-
},
|
|
51
|
-
"@loadable/server": {
|
|
52
|
-
"react": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
53
|
-
"react-dom": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
54
42
|
}
|
|
55
43
|
}
|
|
56
44
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import "./styles"
|
|
3
3
|
import { hydrateRoot } from "react-dom/client"
|
|
4
|
-
import { loadableReady } from "@loadable/component"
|
|
5
4
|
import { Provider } from "react-redux"
|
|
6
|
-
import { RouterProvider } from "
|
|
5
|
+
import { RouterProvider, hydrationReady } from "catalyst-core"
|
|
7
6
|
import clientRouter from "catalyst-core/router/ClientRouter"
|
|
8
7
|
import configureStore from "@store"
|
|
9
8
|
|
|
10
9
|
window.addEventListener("load", () => {
|
|
11
|
-
|
|
10
|
+
hydrationReady().then(() => {
|
|
12
11
|
const { __ROUTER_INITIAL_DATA__: routerInitialData, __INITIAL_STATE__ } = window
|
|
13
12
|
const store = configureStore(__INITIAL_STATE__ || {})
|
|
14
13
|
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
"build": "npm run typecheck && catalyst build",
|
|
7
7
|
"serve": "catalyst serve",
|
|
8
8
|
"lint": "eslint .",
|
|
9
|
-
"devBuild": "catalyst devBuild",
|
|
10
|
-
"devServe": "catalyst devServe",
|
|
11
9
|
"buildApp": "catalyst buildApp",
|
|
12
10
|
"buildApp:ios": "catalyst buildApp:ios",
|
|
13
11
|
"buildApp:android": "catalyst buildApp:android",
|
|
@@ -26,11 +24,9 @@
|
|
|
26
24
|
"@store": "src/js/store/index.js"
|
|
27
25
|
},
|
|
28
26
|
"dependencies": {
|
|
29
|
-
"@loadable/component": "^5.16.3",
|
|
30
|
-
"@tata1mg/router": "0.1.0-beta",
|
|
31
27
|
"@reduxjs/toolkit": "^2.9.0",
|
|
32
28
|
"react-redux": "^9.2.0",
|
|
33
|
-
"catalyst-core": "0.
|
|
29
|
+
"catalyst-core": "0.3.0-beta.1",
|
|
34
30
|
"react": "19.0.0",
|
|
35
31
|
"react-dom": "19.0.0",
|
|
36
32
|
"redux": "^5.0.1"
|
|
@@ -47,14 +43,6 @@
|
|
|
47
43
|
"react-helmet-async": {
|
|
48
44
|
"react": "^16.6.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
49
45
|
"react-dom": "^16.6.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
50
|
-
},
|
|
51
|
-
"@loadable/component": {
|
|
52
|
-
"react": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
53
|
-
"react-dom": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
54
|
-
},
|
|
55
|
-
"@loadable/server": {
|
|
56
|
-
"react": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
57
|
-
"react-dom": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
58
46
|
}
|
|
59
47
|
}
|
|
60
48
|
}
|