@strapi/data-transfer 4.22.1 → 4.23.1-alpha.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.mjs
CHANGED
|
@@ -3104,8 +3104,11 @@ const transformUpgradeHeader = (header = "") => {
|
|
|
3104
3104
|
return header.split(",").map((s) => s.trim().toLowerCase());
|
|
3105
3105
|
};
|
|
3106
3106
|
let timeouts;
|
|
3107
|
+
const hasHttpServer = () => {
|
|
3108
|
+
return typeof strapi !== "undefined" && !!strapi?.server?.httpServer;
|
|
3109
|
+
};
|
|
3107
3110
|
const disableTimeouts = () => {
|
|
3108
|
-
if (!
|
|
3111
|
+
if (!hasHttpServer()) {
|
|
3109
3112
|
return;
|
|
3110
3113
|
}
|
|
3111
3114
|
const { httpServer } = strapi.server;
|
|
@@ -3120,7 +3123,7 @@ const disableTimeouts = () => {
|
|
|
3120
3123
|
strapi.log.info("[Data transfer] Disabling http timeouts");
|
|
3121
3124
|
};
|
|
3122
3125
|
const resetTimeouts = () => {
|
|
3123
|
-
if (!
|
|
3126
|
+
if (!hasHttpServer() || !timeouts) {
|
|
3124
3127
|
return;
|
|
3125
3128
|
}
|
|
3126
3129
|
const { httpServer } = strapi.server;
|