@rpcbase/server 0.553.0 → 0.555.0
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/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/initServer.d.ts.map +1 -1
- package/dist/renderSSR.d.ts +1 -0
- package/dist/renderSSR.d.ts.map +1 -1
- package/dist/ssrMiddleware.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createClient } from "redis";
|
|
|
5
5
|
import { MongoClient } from "mongodb";
|
|
6
6
|
import env from "@rpcbase/env";
|
|
7
7
|
import { initApiClient, STATIC_RPCBASE_RTS_HYDRATION_DATA_KEY, RtsSsrRuntimeProvider, SsrErrorFallback, SSR_ERROR_STATE_GLOBAL_KEY, serializeSsrErrorState } from "@rpcbase/client";
|
|
8
|
-
import { getMongoUrl } from "@rpcbase/db/mongo";
|
|
8
|
+
import { getMongoDirectConnection, getMongoUrl } from "@rpcbase/db/mongo";
|
|
9
9
|
import { posix, dirname, sep, isAbsolute, relative } from "path";
|
|
10
10
|
import fs, { createReadStream, readFileSync } from "node:fs";
|
|
11
11
|
import { createInterface } from "node:readline";
|
|
@@ -4254,7 +4254,8 @@ const createMongoSessionStore = async (serverEnv) => {
|
|
|
4254
4254
|
const client2 = await MongoClient.connect(mongoUrl, {
|
|
4255
4255
|
family: 4,
|
|
4256
4256
|
serverSelectionTimeoutMS: 2e3,
|
|
4257
|
-
connectTimeoutMS: 2e3
|
|
4257
|
+
connectTimeoutMS: 2e3,
|
|
4258
|
+
directConnection: getMongoDirectConnection(serverEnv)
|
|
4258
4259
|
});
|
|
4259
4260
|
const store = MongoStore.create({
|
|
4260
4261
|
client: client2,
|
|
@@ -5102,14 +5103,13 @@ const runRtsPrepass = async (element) => {
|
|
|
5102
5103
|
},
|
|
5103
5104
|
onShellError() {
|
|
5104
5105
|
finish(false);
|
|
5105
|
-
abort();
|
|
5106
5106
|
},
|
|
5107
5107
|
onError() {
|
|
5108
5108
|
}
|
|
5109
5109
|
});
|
|
5110
5110
|
timeoutId = setTimeout(() => {
|
|
5111
|
-
abort();
|
|
5112
5111
|
finish(false);
|
|
5112
|
+
abort();
|
|
5113
5113
|
}, RTS_SSR_PREPASS_TIMEOUT_MS);
|
|
5114
5114
|
});
|
|
5115
5115
|
};
|
|
@@ -5377,7 +5377,6 @@ const ssrMiddleware = ({
|
|
|
5377
5377
|
phase: "shell"
|
|
5378
5378
|
});
|
|
5379
5379
|
finalizeWithErrorPage(error);
|
|
5380
|
-
abort();
|
|
5381
5380
|
},
|
|
5382
5381
|
onError(error) {
|
|
5383
5382
|
didError = true;
|