@devmoods/express-extras 0.72.0 → 0.72.5
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/auth.js +1 -1
- package/dist/config.js +1 -1
- package/dist/sentry.js +1 -1
- package/dist/vite/ssr.js +29 -12
- package/package.json +9 -9
package/dist/auth.js
CHANGED
|
@@ -103,7 +103,7 @@ export function createAuth({ getUserById, filterUser, tokenStorage, providers, l
|
|
|
103
103
|
const user = useCurrentUser();
|
|
104
104
|
if (!user) {
|
|
105
105
|
setAccessTokenCookie(res, null);
|
|
106
|
-
|
|
106
|
+
return { token: null, user: null };
|
|
107
107
|
}
|
|
108
108
|
const { token } = await providerContext.login(req, res, user, true);
|
|
109
109
|
logger.info('refreshed token');
|
package/dist/config.js
CHANGED
|
@@ -14,7 +14,7 @@ const app = define({
|
|
|
14
14
|
SENTRY_DSN: t.string(),
|
|
15
15
|
SENTRY_TRACES_SAMPLE_RATE: t.number(0.3),
|
|
16
16
|
SENTRY_PROFILES_SAMPLE_RATE: t.number(0.3),
|
|
17
|
-
SENTRY_EVENT_LOOP_THRESHOLD: t.number(
|
|
17
|
+
SENTRY_EVENT_LOOP_THRESHOLD: t.number(750),
|
|
18
18
|
LOG_LEVEL: t.string(),
|
|
19
19
|
LOG_SQL: t.boolean(),
|
|
20
20
|
NODE_ENV: t.string(),
|
package/dist/sentry.js
CHANGED
|
@@ -30,7 +30,7 @@ export async function sentryOptions(options = {}) {
|
|
|
30
30
|
return {
|
|
31
31
|
dsn: config.SENTRY_DSN,
|
|
32
32
|
tracesSampleRate: config.SENTRY_TRACES_SAMPLE_RATE,
|
|
33
|
-
|
|
33
|
+
profileSessionSampleRate: config.SENTRY_PROFILES_SAMPLE_RATE,
|
|
34
34
|
integrations: nativeIntegrations,
|
|
35
35
|
enableLogs: true,
|
|
36
36
|
...options,
|
package/dist/vite/ssr.js
CHANGED
|
@@ -114,23 +114,40 @@ async function getAssetLinks(manifestPath, input, publicPath = '/') {
|
|
|
114
114
|
throw Error('Entry not found in the manifest.json file');
|
|
115
115
|
}
|
|
116
116
|
const chunk = manifest[input];
|
|
117
|
-
|
|
118
|
-
const
|
|
117
|
+
// Collect all transitively imported chunk keys so we can gather their CSS too
|
|
118
|
+
const visited = new Set();
|
|
119
|
+
const collectImports = (key) => {
|
|
120
|
+
/* c8 ignore start */
|
|
121
|
+
if (visited.has(key)) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
/* c8 ignore end */
|
|
125
|
+
visited.add(key);
|
|
126
|
+
const manifestValue = manifest[key];
|
|
127
|
+
if (!manifestValue) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
for (const importKey of manifestValue.imports ?? []) {
|
|
131
|
+
collectImports(importKey);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
collectImports(input);
|
|
135
|
+
const allCss = new Set();
|
|
136
|
+
for (const key of visited) {
|
|
137
|
+
for (const href of manifest[key]?.css ?? []) {
|
|
138
|
+
allCss.add(href);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
const cssHtml = [...allCss]
|
|
119
142
|
.map((href) => `<link rel="stylesheet" href="${publicPath}${href}" />`)
|
|
120
143
|
.join(' ');
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
/* v8 ignore next -- @preserve */
|
|
124
|
-
if (Array.isArray(chunk.imports)) {
|
|
125
|
-
preloadList.push(...chunk.imports);
|
|
126
|
-
}
|
|
127
|
-
const preloadHtml = preloadList
|
|
128
|
-
.map((pre) => {
|
|
144
|
+
const preloadHtml = [...visited]
|
|
145
|
+
.map((key) => {
|
|
129
146
|
/* v8 ignore next -- @preserve */
|
|
130
|
-
if (!manifest[
|
|
147
|
+
if (!manifest[key]?.file) {
|
|
131
148
|
return '';
|
|
132
149
|
}
|
|
133
|
-
return `<link rel="modulepreload" href="${publicPath}${manifest[
|
|
150
|
+
return `<link rel="modulepreload" href="${publicPath}${manifest[key].file}" />`;
|
|
134
151
|
})
|
|
135
152
|
.join(' ');
|
|
136
153
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devmoods/express-extras",
|
|
3
|
-
"version": "0.72.
|
|
3
|
+
"version": "0.72.5",
|
|
4
4
|
"description": "Kubernetes-ready utilities for rapid Node.js application development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -68,15 +68,15 @@
|
|
|
68
68
|
"vite": "^8.0.8"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@devmoods/config": "0.2.
|
|
71
|
+
"@devmoods/config": "0.2.3",
|
|
72
72
|
"@devmoods/fetch": "^4.3.0",
|
|
73
|
-
"@devmoods/observability": "0.1.
|
|
74
|
-
"@devmoods/postgres": "0.4.
|
|
73
|
+
"@devmoods/observability": "0.1.4",
|
|
74
|
+
"@devmoods/postgres": "0.4.2",
|
|
75
75
|
"@hey-api/openapi-ts": "^0.95.0",
|
|
76
76
|
"@rolldown/plugin-babel": "^0.2.2",
|
|
77
|
-
"@sentry/node": "^10.
|
|
78
|
-
"@sentry/node-native": "^10.
|
|
79
|
-
"@sentry/profiling-node": "^10.
|
|
77
|
+
"@sentry/node": "^10.48.0",
|
|
78
|
+
"@sentry/node-native": "^10.48.0",
|
|
79
|
+
"@sentry/profiling-node": "^10.48.0",
|
|
80
80
|
"@standard-schema/spec": "^1.1.0",
|
|
81
81
|
"@types/bcrypt": "^6.0.0",
|
|
82
82
|
"@types/cookie-parser": "^1.4.10",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"vitest-fail-on-console": "^0.10.1"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
|
-
"@vitejs/plugin-react": ">=
|
|
107
|
+
"@vitejs/plugin-react": ">=6.0.1",
|
|
108
108
|
"arktype": ">=2.0.0",
|
|
109
109
|
"express": ">=4.21.2 <5.0.0",
|
|
110
110
|
"faktory-worker": ">=4.5.1",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"engines": {
|
|
114
114
|
"node": ">=20 <26"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "e29bcf8284033887f836a8ca7486b2b80e00852e"
|
|
117
117
|
}
|