@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.
Files changed (46) hide show
  1. package/dist/engine/index.d.ts.map +1 -1
  2. package/dist/engine/validation/provider.d.ts +1 -1
  3. package/dist/engine/validation/provider.d.ts.map +1 -1
  4. package/dist/engine/validation/schemas/index.d.ts.map +1 -1
  5. package/dist/file/providers/destination/utils.d.ts.map +1 -1
  6. package/dist/index.js +8 -2
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.mjs +8 -2
  9. package/dist/index.mjs.map +1 -1
  10. package/dist/strapi/providers/local-destination/index.d.ts +2 -2
  11. package/dist/strapi/providers/local-destination/index.d.ts.map +1 -1
  12. package/dist/strapi/providers/local-destination/strategies/restore/configuration.d.ts +2 -2
  13. package/dist/strapi/providers/local-destination/strategies/restore/configuration.d.ts.map +1 -1
  14. package/dist/strapi/providers/local-destination/strategies/restore/entities.d.ts +1 -1
  15. package/dist/strapi/providers/local-destination/strategies/restore/entities.d.ts.map +1 -1
  16. package/dist/strapi/providers/local-destination/strategies/restore/index.d.ts +1 -1
  17. package/dist/strapi/providers/local-destination/strategies/restore/index.d.ts.map +1 -1
  18. package/dist/strapi/providers/local-destination/strategies/restore/links.d.ts +1 -1
  19. package/dist/strapi/providers/local-destination/strategies/restore/links.d.ts.map +1 -1
  20. package/dist/strapi/providers/local-source/assets.d.ts +1 -1
  21. package/dist/strapi/providers/local-source/assets.d.ts.map +1 -1
  22. package/dist/strapi/providers/local-source/configuration.d.ts +1 -1
  23. package/dist/strapi/providers/local-source/configuration.d.ts.map +1 -1
  24. package/dist/strapi/providers/local-source/entities.d.ts +1 -1
  25. package/dist/strapi/providers/local-source/entities.d.ts.map +1 -1
  26. package/dist/strapi/providers/local-source/index.d.ts +2 -2
  27. package/dist/strapi/providers/local-source/index.d.ts.map +1 -1
  28. package/dist/strapi/providers/local-source/links.d.ts +1 -1
  29. package/dist/strapi/providers/local-source/links.d.ts.map +1 -1
  30. package/dist/strapi/providers/remote-source/index.d.ts.map +1 -1
  31. package/dist/strapi/providers/utils.d.ts +1 -1
  32. package/dist/strapi/providers/utils.d.ts.map +1 -1
  33. package/dist/strapi/queries/entity.d.ts +1 -1
  34. package/dist/strapi/queries/entity.d.ts.map +1 -1
  35. package/dist/strapi/queries/link.d.ts +1 -1
  36. package/dist/strapi/queries/link.d.ts.map +1 -1
  37. package/dist/strapi/remote/handlers/utils.d.ts.map +1 -1
  38. package/dist/utils/components.d.ts +3 -74
  39. package/dist/utils/components.d.ts.map +1 -1
  40. package/dist/utils/middleware.d.ts.map +1 -1
  41. package/dist/utils/providers.d.ts +1 -1
  42. package/dist/utils/providers.d.ts.map +1 -1
  43. package/dist/utils/stream.d.ts.map +1 -1
  44. package/dist/utils/transaction.d.ts +1 -1
  45. package/dist/utils/transaction.d.ts.map +1 -1
  46. 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 (!strapi?.server?.httpServer) {
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 (!strapi?.server?.httpServer || !timeouts) {
3130
+ if (!hasHttpServer() || !timeouts) {
3125
3131
  return;
3126
3132
  }
3127
3133
  const { httpServer } = strapi.server;