@strapi/data-transfer 5.0.0-beta.2 → 5.0.0-beta.4
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/engine/index.d.ts.map +1 -1
- package/dist/engine/validation/provider.d.ts +1 -1
- package/dist/engine/validation/provider.d.ts.map +1 -1
- package/dist/engine/validation/schemas/index.d.ts.map +1 -1
- package/dist/file/providers/destination/utils.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/dist/strapi/providers/local-destination/index.d.ts +2 -2
- package/dist/strapi/providers/local-destination/index.d.ts.map +1 -1
- package/dist/strapi/providers/local-destination/strategies/restore/configuration.d.ts +2 -2
- package/dist/strapi/providers/local-destination/strategies/restore/configuration.d.ts.map +1 -1
- package/dist/strapi/providers/local-destination/strategies/restore/entities.d.ts +1 -1
- package/dist/strapi/providers/local-destination/strategies/restore/entities.d.ts.map +1 -1
- package/dist/strapi/providers/local-destination/strategies/restore/index.d.ts +1 -1
- package/dist/strapi/providers/local-destination/strategies/restore/index.d.ts.map +1 -1
- package/dist/strapi/providers/local-destination/strategies/restore/links.d.ts +1 -1
- package/dist/strapi/providers/local-destination/strategies/restore/links.d.ts.map +1 -1
- package/dist/strapi/providers/local-source/assets.d.ts +1 -1
- package/dist/strapi/providers/local-source/assets.d.ts.map +1 -1
- package/dist/strapi/providers/local-source/configuration.d.ts +1 -1
- package/dist/strapi/providers/local-source/configuration.d.ts.map +1 -1
- package/dist/strapi/providers/local-source/entities.d.ts +1 -1
- package/dist/strapi/providers/local-source/entities.d.ts.map +1 -1
- package/dist/strapi/providers/local-source/index.d.ts +2 -2
- package/dist/strapi/providers/local-source/index.d.ts.map +1 -1
- package/dist/strapi/providers/local-source/links.d.ts +1 -1
- package/dist/strapi/providers/local-source/links.d.ts.map +1 -1
- package/dist/strapi/providers/remote-source/index.d.ts.map +1 -1
- package/dist/strapi/providers/utils.d.ts +1 -1
- package/dist/strapi/providers/utils.d.ts.map +1 -1
- package/dist/strapi/queries/entity.d.ts +1 -1
- package/dist/strapi/queries/entity.d.ts.map +1 -1
- package/dist/strapi/queries/link.d.ts +1 -1
- package/dist/strapi/queries/link.d.ts.map +1 -1
- package/dist/strapi/remote/handlers/utils.d.ts.map +1 -1
- package/dist/utils/components.d.ts +3 -74
- package/dist/utils/components.d.ts.map +1 -1
- package/dist/utils/middleware.d.ts.map +1 -1
- package/dist/utils/providers.d.ts +1 -1
- package/dist/utils/providers.d.ts.map +1 -1
- package/dist/utils/stream.d.ts.map +1 -1
- package/dist/utils/transaction.d.ts +1 -1
- package/dist/utils/transaction.d.ts.map +1 -1
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -1532,6 +1532,9 @@ const createLinkQuery = (strapi2, trx) => {
|
|
|
1532
1532
|
const metadata = strapi2.db.metadata.get(left.type);
|
|
1533
1533
|
const attribute = metadata.attributes[left.field];
|
|
1534
1534
|
const payload = {};
|
|
1535
|
+
if (!attribute) {
|
|
1536
|
+
return;
|
|
1537
|
+
}
|
|
1535
1538
|
if (attribute.type !== "relation") {
|
|
1536
1539
|
throw new Error(`Attribute ${left.field} is not a relation`);
|
|
1537
1540
|
}
|
|
@@ -3105,8 +3108,11 @@ const transformUpgradeHeader = (header = "") => {
|
|
|
3105
3108
|
return header.split(",").map((s) => s.trim().toLowerCase());
|
|
3106
3109
|
};
|
|
3107
3110
|
let timeouts;
|
|
3111
|
+
const hasHttpServer = () => {
|
|
3112
|
+
return typeof strapi !== "undefined" && !!strapi?.server?.httpServer;
|
|
3113
|
+
};
|
|
3108
3114
|
const disableTimeouts = () => {
|
|
3109
|
-
if (!
|
|
3115
|
+
if (!hasHttpServer()) {
|
|
3110
3116
|
return;
|
|
3111
3117
|
}
|
|
3112
3118
|
const { httpServer } = strapi.server;
|
|
@@ -3121,7 +3127,7 @@ const disableTimeouts = () => {
|
|
|
3121
3127
|
strapi.log.info("[Data transfer] Disabling http timeouts");
|
|
3122
3128
|
};
|
|
3123
3129
|
const resetTimeouts = () => {
|
|
3124
|
-
if (!
|
|
3130
|
+
if (!hasHttpServer() || !timeouts) {
|
|
3125
3131
|
return;
|
|
3126
3132
|
}
|
|
3127
3133
|
const { httpServer } = strapi.server;
|