@devmoods/express-extras 0.75.0 → 0.76.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/dist/csrf.js
CHANGED
|
@@ -115,8 +115,8 @@ const validateRequest = (req) => {
|
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
117
|
export function doubleCsrfProtection(req) {
|
|
118
|
-
// oxlint-disable-next-line eslint-plugin-react-hooks/rules-of-hooks
|
|
119
118
|
return async () => {
|
|
119
|
+
// oxlint-disable-next-line eslint-plugin-react-hooks/rules-of-hooks
|
|
120
120
|
const { exempt } = useCsrfOptions();
|
|
121
121
|
if (exempt) {
|
|
122
122
|
return;
|
package/dist/redis.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { createClient } from 'redis';
|
|
2
1
|
export interface RedisOptions {
|
|
3
2
|
url?: string;
|
|
4
3
|
onError?: (error: Error) => void;
|
|
5
4
|
}
|
|
6
|
-
export type RedisClient = ReturnType<typeof
|
|
7
|
-
export declare function createRedis({ url, onError, }?: RedisOptions):
|
|
5
|
+
export type RedisClient = ReturnType<typeof createRedis>;
|
|
6
|
+
export declare function createRedis({ url, onError, }?: RedisOptions): import("redis").RedisClientType<{}, {}, {}, 3, {}>;
|
|
@@ -2,7 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { renderToString } from 'react-dom/server';
|
|
3
3
|
import {} from '../../../types.js';
|
|
4
4
|
export async function render(req, options) {
|
|
5
|
-
const helmetContext = {};
|
|
6
5
|
const initialData = await options.getInitialData(req);
|
|
7
6
|
if (initialData.shouldRedirect) {
|
|
8
7
|
throw new Response('redirect', { status: 302 });
|
|
@@ -10,6 +9,6 @@ export async function render(req, options) {
|
|
|
10
9
|
const html = renderToString(_jsxs("html", { lang: "en", children: [_jsxs("head", { children: [options.useDevServer && (_jsx("script", { type: "module", nonce: options.nonce, children: options.preamble })), _jsx("meta", { charSet: "utf-8" }), _jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1, shrink-to-fit=no" }), _jsx("meta", { name: "theme-color", content: "#FFFFFF" }), _jsx("meta", { name: "apple-mobile-web-app-capable", content: "yes" }), _jsx("meta", { name: "apple-mobile-web-app-title", content: "express-extras" }), _jsx("link", { rel: "apple-touch-icon", href: "/apple-touch-icon.png" }), options.placeholders, _jsx("meta", { name: "csrf-token", content: options.csrfToken })] }), _jsxs("body", { children: [_jsx("div", { id: "root", children: _jsx("h1", { children: "Hello World!" }) }), options.useDevServer && (_jsx("script", { type: "module", src: "/src/entry-client.tsx" })), _jsx("script", { defer: true, "data-domain": options.publicUrl.hostname, src: "/analytics.js" }), _jsx("script", { nonce: options.nonce, children: `window.store = ${JSON.stringify(initialData)};` })] })] }));
|
|
11
10
|
return {
|
|
12
11
|
html,
|
|
13
|
-
context:
|
|
12
|
+
context: undefined,
|
|
14
13
|
};
|
|
15
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devmoods/express-extras",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.76.1",
|
|
4
4
|
"description": "Kubernetes-ready utilities for rapid Node.js application development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -61,42 +61,42 @@
|
|
|
61
61
|
],
|
|
62
62
|
"license": "ISC",
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@vitejs/plugin-react": "^6.0.
|
|
65
|
-
"arktype": "^2.2.
|
|
64
|
+
"@vitejs/plugin-react": "^6.0.3",
|
|
65
|
+
"arktype": "^2.2.3",
|
|
66
66
|
"faktory-worker": "^4.7.1",
|
|
67
|
-
"react": "^19.2.
|
|
68
|
-
"react-dom": "^19.2.
|
|
69
|
-
"vite": "^8.
|
|
67
|
+
"react": "^19.2.7",
|
|
68
|
+
"react-dom": "^19.2.7",
|
|
69
|
+
"vite": "^8.1.3"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@devmoods/config": "0.3.0",
|
|
73
73
|
"@devmoods/fetch": "^4.3.1",
|
|
74
74
|
"@devmoods/observability": "0.4.0",
|
|
75
|
-
"@devmoods/postgres": "0.
|
|
76
|
-
"@hey-api/openapi-ts": "^0.
|
|
75
|
+
"@devmoods/postgres": "0.8.0",
|
|
76
|
+
"@hey-api/openapi-ts": "^0.99.0",
|
|
77
77
|
"@rolldown/plugin-babel": "^0.2.3",
|
|
78
78
|
"@standard-schema/spec": "^1.1.0",
|
|
79
79
|
"@types/bcrypt": "^6.0.0",
|
|
80
80
|
"@types/cookie-parser": "^1.4.10",
|
|
81
81
|
"@types/express": "^5.0.6",
|
|
82
82
|
"@types/koa-compose": "^3.2.9",
|
|
83
|
-
"@types/nodemailer": "^8.0.
|
|
84
|
-
"@types/qs": "^6.15.
|
|
83
|
+
"@types/nodemailer": "^8.0.1",
|
|
84
|
+
"@types/qs": "^6.15.1",
|
|
85
85
|
"ajv": "^8.20.0",
|
|
86
86
|
"argon2": "^0.44.0",
|
|
87
87
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
88
88
|
"bcrypt": "^6.0.0",
|
|
89
89
|
"chalk": "^5.6.2",
|
|
90
|
-
"commander": "^
|
|
90
|
+
"commander": "^15.0.0",
|
|
91
91
|
"cookie-parser": "^1.4.7",
|
|
92
92
|
"dotenv": "^17.4.2",
|
|
93
93
|
"express": "^4.21.2",
|
|
94
|
-
"helmet": "^8.
|
|
94
|
+
"helmet": "^8.2.0",
|
|
95
95
|
"jose": "^6.2.3",
|
|
96
|
-
"nodemailer": "^
|
|
97
|
-
"redis": "^
|
|
98
|
-
"sonda": "^0.
|
|
99
|
-
"tough-cookie": "^6.0.
|
|
96
|
+
"nodemailer": "^9.0.3",
|
|
97
|
+
"redis": "^6.1.0",
|
|
98
|
+
"sonda": "^0.14.0",
|
|
99
|
+
"tough-cookie": "^6.0.2",
|
|
100
100
|
"vitest-fail-on-console": "^0.10.1"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
"engines": {
|
|
110
110
|
"node": ">=20 <26"
|
|
111
111
|
},
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "2981e0cfae881922af5b04af07c3d3e641dece37"
|
|
113
113
|
}
|