miolo 3.0.0-beta.190 → 3.0.0-beta.192
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "miolo",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.192",
|
|
4
4
|
"description": "all-in-one koa-based server",
|
|
5
5
|
"author": "Donato Lorenzo <donato@afialapis.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@babel/plugin-proposal-decorators": "^7.29.0",
|
|
48
|
-
"@babel/preset-env": "^7.29.
|
|
48
|
+
"@babel/preset-env": "^7.29.5",
|
|
49
49
|
"@babel/preset-react": "^7.28.5",
|
|
50
|
-
"@dotenvx/dotenvx": "^1.
|
|
50
|
+
"@dotenvx/dotenvx": "^1.65.0",
|
|
51
51
|
"@koa/bodyparser": "^6.1.0",
|
|
52
52
|
"@koa/cors": "^5.0.0",
|
|
53
53
|
"@koa/router": "^15.5.0",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"@rollup/plugin-json": "^6.1.0",
|
|
59
59
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
60
60
|
"@rollup/plugin-replace": "^6.0.3",
|
|
61
|
-
"@tailwindcss/postcss": "^4.
|
|
62
|
-
"@tailwindcss/vite": "^4.
|
|
61
|
+
"@tailwindcss/postcss": "^4.3.0",
|
|
62
|
+
"@tailwindcss/vite": "^4.3.0",
|
|
63
63
|
"@vitejs/plugin-react": "^6.0.1",
|
|
64
64
|
"autoprefixer": "^10.5.0",
|
|
65
65
|
"cacheiro": "^0.5.0-beta.11",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"http-terminator": "^3.2.0",
|
|
71
71
|
"intre": "^3.0.0-beta.4",
|
|
72
72
|
"is-plain-object": "^5.0.0",
|
|
73
|
-
"joi": "^18.1
|
|
73
|
+
"joi": "^18.2.1",
|
|
74
74
|
"jwt-simple": "^0.5.6",
|
|
75
75
|
"koa": "^3.2.0",
|
|
76
76
|
"koa-compress": "^5.2.1",
|
|
@@ -86,15 +86,15 @@
|
|
|
86
86
|
"nodemailer": "^8.0.7",
|
|
87
87
|
"passport-google-oauth20": "^2.0.0",
|
|
88
88
|
"passport-local": "^1.0.0",
|
|
89
|
-
"rollup": "^4.60.
|
|
89
|
+
"rollup": "^4.60.3",
|
|
90
90
|
"rollup-plugin-node-externals": "^9.0.1",
|
|
91
91
|
"rollup-plugin-postcss": "^4.0.2",
|
|
92
92
|
"socket.io": "^4.8.3",
|
|
93
93
|
"socket.io-client": "^4.8.3",
|
|
94
94
|
"statuses": "^2.0.2",
|
|
95
|
-
"tailwindcss": "^4.
|
|
95
|
+
"tailwindcss": "^4.3.0",
|
|
96
96
|
"tinguir": "^0.0.7",
|
|
97
|
-
"vite": "^8.0.
|
|
97
|
+
"vite": "^8.0.12",
|
|
98
98
|
"winston": "^3.19.0",
|
|
99
99
|
"winston-daily-rotate-file": "^5.0.0",
|
|
100
100
|
"yargs-parser": "^22.0.0"
|
|
@@ -56,6 +56,11 @@ const init_headers_middleware = (app, http) => {
|
|
|
56
56
|
})
|
|
57
57
|
|
|
58
58
|
_if_options(http, "proxy", (options) => {
|
|
59
|
+
// Ensure NGINX is setting headers as:
|
|
60
|
+
// proxy_set_header Host $host;
|
|
61
|
+
// proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
62
|
+
// proxy_set_header X-Forwarded-Proto $scheme;
|
|
63
|
+
|
|
59
64
|
if (options === true) {
|
|
60
65
|
app.proxy = true
|
|
61
66
|
logger.debug(`[http] Setting Proxy to true`)
|
package/src/server.mjs
CHANGED
|
@@ -25,11 +25,6 @@ async function miolo(makeConfig, devInit = undefined, devRender = undefined) {
|
|
|
25
25
|
// Init some pieces
|
|
26
26
|
const config = init_config(makeConfig)
|
|
27
27
|
|
|
28
|
-
// Why works here and not in init_headers_middleware
|
|
29
|
-
if (config.http === true) {
|
|
30
|
-
app.proxy = true
|
|
31
|
-
}
|
|
32
|
-
|
|
33
28
|
// attach to app some custom miolo methods
|
|
34
29
|
init_context_middleware(app, config)
|
|
35
30
|
|
package/template/biome.json
CHANGED
package/template/package.json
CHANGED
|
@@ -37,32 +37,32 @@
|
|
|
37
37
|
"@radix-ui/react-slot": "^1.2.4",
|
|
38
38
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
39
39
|
"@stepperize/react": "^6.1.0",
|
|
40
|
-
"@tailwindcss/postcss": "^4.
|
|
40
|
+
"@tailwindcss/postcss": "^4.3.0",
|
|
41
41
|
"@tanstack/react-table": "^8.21.3",
|
|
42
42
|
"class-variance-authority": "^0.7.1",
|
|
43
43
|
"clsx": "^2.1.1",
|
|
44
44
|
"farrapa": "^3.0.0-beta.10",
|
|
45
45
|
"intre": "^3.0.0-beta.4",
|
|
46
|
-
"joi": "^18.1
|
|
46
|
+
"joi": "^18.2.1",
|
|
47
47
|
"lucide-react": "^1.14.0",
|
|
48
|
-
"miolo-cli": "^3.0.0-beta.
|
|
48
|
+
"miolo-cli": "^3.0.0-beta.192",
|
|
49
49
|
"miolo-model": "file:../miolo-model",
|
|
50
|
-
"miolo-react": "^3.0.0-beta.
|
|
50
|
+
"miolo-react": "^3.0.0-beta.192",
|
|
51
51
|
"next-themes": "^0.4.6",
|
|
52
52
|
"radix-ui": "^1.4.3",
|
|
53
|
-
"react": "^19.2.
|
|
54
|
-
"react-dom": "^19.2.
|
|
55
|
-
"react-router": "^7.
|
|
53
|
+
"react": "^19.2.6",
|
|
54
|
+
"react-dom": "^19.2.6",
|
|
55
|
+
"react-router": "^7.15.0",
|
|
56
56
|
"recharts": "^3.8.1",
|
|
57
57
|
"sonner": "^2.0.7",
|
|
58
58
|
"tailwind": "^4.0.0",
|
|
59
|
-
"tailwind-merge": "^3.
|
|
59
|
+
"tailwind-merge": "^3.6.0",
|
|
60
60
|
"tinguir": "^0.0.7",
|
|
61
61
|
"tw-animate-css": "^1.4.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@biomejs/biome": "2.4.
|
|
65
|
-
"miolo": "^3.0.0-beta.
|
|
64
|
+
"@biomejs/biome": "2.4.15",
|
|
65
|
+
"miolo": "^3.0.0-beta.192",
|
|
66
66
|
"sass-embedded": "^1.99.0"
|
|
67
67
|
},
|
|
68
68
|
"overrides": {
|
|
@@ -16,6 +16,7 @@ const TodosProvider = ({ children }) => {
|
|
|
16
16
|
refresh: refreshTodoList,
|
|
17
17
|
ready
|
|
18
18
|
} = useSsrData("todos", {
|
|
19
|
+
model: TodoList,
|
|
19
20
|
loader: useCallback(
|
|
20
21
|
async (_context, fetcher) => {
|
|
21
22
|
//setStatus("loading")
|
|
@@ -26,7 +27,7 @@ const TodosProvider = ({ children }) => {
|
|
|
26
27
|
}
|
|
27
28
|
const data = res?.data || []
|
|
28
29
|
//setStatus("loaded")
|
|
29
|
-
return
|
|
30
|
+
return data.sort((a, b) => b.created_at - a.created_at)
|
|
30
31
|
},
|
|
31
32
|
[useCrud, toast]
|
|
32
33
|
)
|
|
@@ -49,9 +50,9 @@ const TodosProvider = ({ children }) => {
|
|
|
49
50
|
toast.error(`Error adding todo: ${res.error}`)
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
todoObject.id = res?.data?.id
|
|
53
|
+
todoObject.id = useCrud ? res?.data : res?.data?.id
|
|
53
54
|
|
|
54
|
-
setTodoList([todoObject, ...todoList])
|
|
55
|
+
setTodoList([todoObject, ...todoList.getData()])
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
addIt()
|
|
@@ -62,9 +63,9 @@ const TodosProvider = ({ children }) => {
|
|
|
62
63
|
const toggleTodo = useCallback(
|
|
63
64
|
(todoId) => {
|
|
64
65
|
async function toggleIt() {
|
|
65
|
-
const nTodoList = [...todoList]
|
|
66
|
+
const nTodoList = [...todoList.getData()]
|
|
66
67
|
const selectedTodoIndex = nTodoList.findIndex((item) => item.id === todoId)
|
|
67
|
-
nTodoList[selectedTodoIndex].
|
|
68
|
+
nTodoList[selectedTodoIndex].done = !nTodoList[selectedTodoIndex].done
|
|
68
69
|
|
|
69
70
|
setTodoList(nTodoList)
|
|
70
71
|
|
|
@@ -87,7 +88,7 @@ const TodosProvider = ({ children }) => {
|
|
|
87
88
|
|
|
88
89
|
const removeTodo = useCallback(
|
|
89
90
|
async (todoId) => {
|
|
90
|
-
const nTodoList = [...todoList]
|
|
91
|
+
const nTodoList = [...todoList.getData()]
|
|
91
92
|
nTodoList.splice(
|
|
92
93
|
nTodoList.findIndex((item) => item.id === todoId),
|
|
93
94
|
1
|