@strapi/data-transfer 4.22.1 → 4.23.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 +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/dist/strapi/remote/handlers/utils.d.ts.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -3137,8 +3137,11 @@ const transformUpgradeHeader = (header = "") => {
|
|
|
3137
3137
|
return header.split(",").map((s) => s.trim().toLowerCase());
|
|
3138
3138
|
};
|
|
3139
3139
|
let timeouts;
|
|
3140
|
+
const hasHttpServer = () => {
|
|
3141
|
+
return typeof strapi !== "undefined" && !!strapi?.server?.httpServer;
|
|
3142
|
+
};
|
|
3140
3143
|
const disableTimeouts = () => {
|
|
3141
|
-
if (!
|
|
3144
|
+
if (!hasHttpServer()) {
|
|
3142
3145
|
return;
|
|
3143
3146
|
}
|
|
3144
3147
|
const { httpServer } = strapi.server;
|
|
@@ -3153,7 +3156,7 @@ const disableTimeouts = () => {
|
|
|
3153
3156
|
strapi.log.info("[Data transfer] Disabling http timeouts");
|
|
3154
3157
|
};
|
|
3155
3158
|
const resetTimeouts = () => {
|
|
3156
|
-
if (!
|
|
3159
|
+
if (!hasHttpServer() || !timeouts) {
|
|
3157
3160
|
return;
|
|
3158
3161
|
}
|
|
3159
3162
|
const { httpServer } = strapi.server;
|