@strapi/data-transfer 5.30.0 → 5.31.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.
Files changed (57) hide show
  1. package/dist/engine/errors.js.map +1 -1
  2. package/dist/engine/errors.mjs.map +1 -1
  3. package/dist/engine/index.js.map +1 -1
  4. package/dist/engine/index.mjs.map +1 -1
  5. package/dist/engine/validation/provider.js.map +1 -1
  6. package/dist/engine/validation/provider.mjs.map +1 -1
  7. package/dist/errors/base.js.map +1 -1
  8. package/dist/errors/base.mjs.map +1 -1
  9. package/dist/errors/providers.js.map +1 -1
  10. package/dist/errors/providers.mjs.map +1 -1
  11. package/dist/file/providers/destination/index.js.map +1 -1
  12. package/dist/file/providers/destination/index.mjs.map +1 -1
  13. package/dist/file/providers/destination/utils.js.map +1 -1
  14. package/dist/file/providers/destination/utils.mjs.map +1 -1
  15. package/dist/file/providers/source/index.js.map +1 -1
  16. package/dist/file/providers/source/index.mjs.map +1 -1
  17. package/dist/strapi/providers/local-destination/index.js.map +1 -1
  18. package/dist/strapi/providers/local-destination/index.mjs.map +1 -1
  19. package/dist/strapi/providers/local-destination/strategies/restore/configuration.js.map +1 -1
  20. package/dist/strapi/providers/local-destination/strategies/restore/configuration.mjs.map +1 -1
  21. package/dist/strapi/providers/local-source/assets.js.map +1 -1
  22. package/dist/strapi/providers/local-source/assets.mjs.map +1 -1
  23. package/dist/strapi/providers/local-source/index.js.map +1 -1
  24. package/dist/strapi/providers/local-source/index.mjs.map +1 -1
  25. package/dist/strapi/providers/remote-destination/index.js.map +1 -1
  26. package/dist/strapi/providers/remote-destination/index.mjs.map +1 -1
  27. package/dist/strapi/providers/remote-source/index.js.map +1 -1
  28. package/dist/strapi/providers/remote-source/index.mjs.map +1 -1
  29. package/dist/strapi/providers/utils.js.map +1 -1
  30. package/dist/strapi/providers/utils.mjs.map +1 -1
  31. package/dist/strapi/queries/link.js.map +1 -1
  32. package/dist/strapi/queries/link.mjs.map +1 -1
  33. package/dist/strapi/remote/handlers/abstract.d.ts +1 -0
  34. package/dist/strapi/remote/handlers/abstract.d.ts.map +1 -1
  35. package/dist/strapi/remote/handlers/pull.js.map +1 -1
  36. package/dist/strapi/remote/handlers/pull.mjs.map +1 -1
  37. package/dist/strapi/remote/handlers/push.js.map +1 -1
  38. package/dist/strapi/remote/handlers/push.mjs.map +1 -1
  39. package/dist/strapi/remote/handlers/utils.js.map +1 -1
  40. package/dist/strapi/remote/handlers/utils.mjs.map +1 -1
  41. package/dist/utils/diagnostic.js.map +1 -1
  42. package/dist/utils/diagnostic.mjs.map +1 -1
  43. package/dist/utils/encryption/decrypt.d.ts +3 -3
  44. package/dist/utils/encryption/decrypt.d.ts.map +1 -1
  45. package/dist/utils/encryption/decrypt.js +1 -1
  46. package/dist/utils/encryption/decrypt.js.map +1 -1
  47. package/dist/utils/encryption/decrypt.mjs +1 -1
  48. package/dist/utils/encryption/decrypt.mjs.map +1 -1
  49. package/dist/utils/encryption/encrypt.d.ts +3 -3
  50. package/dist/utils/encryption/encrypt.d.ts.map +1 -1
  51. package/dist/utils/encryption/encrypt.js +1 -1
  52. package/dist/utils/encryption/encrypt.js.map +1 -1
  53. package/dist/utils/encryption/encrypt.mjs +1 -1
  54. package/dist/utils/encryption/encrypt.mjs.map +1 -1
  55. package/dist/utils/providers.js.map +1 -1
  56. package/dist/utils/providers.mjs.map +1 -1
  57. package/package.json +7 -7
@@ -36,7 +36,7 @@ const getEncryptionStrategy = (algorithm)=>{
36
36
  * @param key - The encryption key
37
37
  * @param algorithm - The algorithm to use to create the Cipher
38
38
  *
39
- * @returns A {@link Cipher} instance created with the given key & algorithm
39
+ * @returns A {@link Cipheriv} instance created with the given key & algorithm
40
40
  */ const createEncryptionCipher = (key, algorithm = 'aes-128-ecb')=>{
41
41
  return getEncryptionStrategy(algorithm)(key);
42
42
  };
@@ -1 +1 @@
1
- {"version":3,"file":"encrypt.mjs","sources":["../../../src/utils/encryption/encrypt.ts"],"sourcesContent":["import { createCipheriv, Cipher, scryptSync, CipherKey, BinaryLike } from 'crypto';\nimport { EncryptionStrategy, Strategies, Algorithm } from '../../../types';\n\n// different key values depending on algorithm chosen\nconst getEncryptionStrategy = (algorithm: Algorithm): EncryptionStrategy => {\n const strategies: Strategies = {\n 'aes-128-ecb'(key: string): Cipher {\n const hashedKey = scryptSync(key, '', 16);\n const initVector: BinaryLike | null = null;\n const securityKey: CipherKey = hashedKey;\n return createCipheriv(algorithm, securityKey, initVector);\n },\n aes128(key: string): Cipher {\n const hashedKey = scryptSync(key, '', 32);\n const initVector: BinaryLike | null = hashedKey.slice(16);\n const securityKey: CipherKey = hashedKey.slice(0, 16);\n return createCipheriv(algorithm, securityKey, initVector);\n },\n aes192(key: string): Cipher {\n const hashedKey = scryptSync(key, '', 40);\n const initVector: BinaryLike | null = hashedKey.slice(24);\n const securityKey: CipherKey = hashedKey.slice(0, 24);\n return createCipheriv(algorithm, securityKey, initVector);\n },\n aes256(key: string): Cipher {\n const hashedKey = scryptSync(key, '', 48);\n const initVector: BinaryLike | null = hashedKey.slice(32);\n const securityKey: CipherKey = hashedKey.slice(0, 32);\n return createCipheriv(algorithm, securityKey, initVector);\n },\n };\n\n return strategies[algorithm];\n};\n\n/**\n * It creates a cipher instance used for encryption\n *\n * @param key - The encryption key\n * @param algorithm - The algorithm to use to create the Cipher\n *\n * @returns A {@link Cipher} instance created with the given key & algorithm\n */\nexport const createEncryptionCipher = (\n key: string,\n algorithm: Algorithm = 'aes-128-ecb'\n): Cipher => {\n return getEncryptionStrategy(algorithm)(key);\n};\n"],"names":["getEncryptionStrategy","algorithm","strategies","key","hashedKey","scryptSync","initVector","securityKey","createCipheriv","aes128","slice","aes192","aes256","createEncryptionCipher"],"mappings":";;AAGA;AACA,MAAMA,wBAAwB,CAACC,SAAAA,GAAAA;AAC7B,IAAA,MAAMC,UAAyB,GAAA;AAC7B,QAAA,aAAA,CAAA,CAAcC,GAAW,EAAA;YACvB,MAAMC,SAAAA,GAAYC,U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AAaD,EAAAA,UAAAA,CAAAA;AAChD;AACF,KAAA;IAEA,OAAOJ,UAAU,CAACD,SAAU,CAAA;AAC9B,CAAA;AAEA;;;;;;;AAOC,IACYY,MAAAA,sBAAAA,GAAyB,CACpCV,GAAAA,EACAF,YAAuB,aAAa,GAAA;AAEpC,IAAA,OAAOD,sBAAsBC,SAAWE,CAAAA,CAAAA,GAAAA,CAAAA;AAC1C;;;;"}
1
+ {"version":3,"file":"encrypt.mjs","sources":["../../../src/utils/encryption/encrypt.ts"],"sourcesContent":["import { createCipheriv, Cipheriv, scryptSync, CipherKey, BinaryLike } from 'crypto';\nimport { EncryptionStrategy, Strategies, Algorithm } from '../../../types';\n\n// different key values depending on algorithm chosen\nconst getEncryptionStrategy = (algorithm: Algorithm): EncryptionStrategy => {\n const strategies: Strategies = {\n 'aes-128-ecb'(key: string): Cipheriv {\n const hashedKey = scryptSync(key, '', 16);\n const initVector: BinaryLike | null = null;\n const securityKey: CipherKey = hashedKey;\n return createCipheriv(algorithm, securityKey, initVector);\n },\n aes128(key: string): Cipheriv {\n const hashedKey = scryptSync(key, '', 32);\n const initVector: BinaryLike | null = hashedKey.slice(16);\n const securityKey: CipherKey = hashedKey.slice(0, 16);\n return createCipheriv(algorithm, securityKey, initVector);\n },\n aes192(key: string): Cipheriv {\n const hashedKey = scryptSync(key, '', 40);\n const initVector: BinaryLike | null = hashedKey.slice(24);\n const securityKey: CipherKey = hashedKey.slice(0, 24);\n return createCipheriv(algorithm, securityKey, initVector);\n },\n aes256(key: string): Cipheriv {\n const hashedKey = scryptSync(key, '', 48);\n const initVector: BinaryLike | null = hashedKey.slice(32);\n const securityKey: CipherKey = hashedKey.slice(0, 32);\n return createCipheriv(algorithm, securityKey, initVector);\n },\n };\n\n return strategies[algorithm];\n};\n\n/**\n * It creates a cipher instance used for encryption\n *\n * @param key - The encryption key\n * @param algorithm - The algorithm to use to create the Cipher\n *\n * @returns A {@link Cipheriv} instance created with the given key & algorithm\n */\nexport const createEncryptionCipher = (\n key: string,\n algorithm: Algorithm = 'aes-128-ecb'\n): Cipheriv => {\n return getEncryptionStrategy(algorithm)(key);\n};\n"],"names":["getEncryptionStrategy","algorithm","strategies","key","hashedKey","scryptSync","initVector","securityKey","createCipheriv","aes128","slice","aes192","aes256","createEncryptionCipher"],"mappings":";;AAGA;AACA,MAAMA,wBAAwB,CAACC,SAAAA,GAAAA;AAC7B,IAAA,MAAMC,UAAyB,GAAA;AAC7B,QAAA,aAAA,CAAA,CAAcC,GAAW,EAAA;YACvB,MAAMC,SAAAA,GAAYC,UAAWF,CAAAA,GAAAA,EAAK,EAAI,EAAA,EAAA,CAAA;AACtC,YAAA,MAAMG,UAAgC,GAAA,IAAA;AACtC,YAAA,MAAMC,WAAyBH,GAAAA,SAAAA;YAC/B,OAAOI,cAAAA,CAAeP,WAAWM,WAAaD,EAAAA,UAAAA,CAAAA;AAChD,SAAA;AACAG,QAAAA,MAAAA,CAAAA,CAAON,GAAW,EAAA;YAChB,MAAMC,SAAAA,GAAYC,UAAWF,CAAAA,GAAAA,EAAK,EAAI,EAAA,EAAA,CAAA;YACtC,MAAMG,UAAAA,GAAgCF,SAAUM,CAAAA,KAAK,CAAC,EAAA,CAAA;AACtD,YAAA,MAAMH,WAAyBH,GAAAA,SAAAA,CAAUM,KAAK,CAAC,CAAG,EAAA,EAAA,CAAA;YAClD,OAAOF,cAAAA,CAAeP,WAAWM,WAAaD,EAAAA,UAAAA,CAAAA;AAChD,SAAA;AACAK,QAAAA,MAAAA,CAAAA,CAAOR,GAAW,EAAA;YAChB,MAAMC,SAAAA,GAAYC,UAAWF,CAAAA,GAAAA,EAAK,EAAI,EAAA,EAAA,CAAA;YACtC,MAAMG,UAAAA,GAAgCF,SAAUM,CAAAA,KAAK,CAAC,EAAA,CAAA;AACtD,YAAA,MAAMH,WAAyBH,GAAAA,SAAAA,CAAUM,KAAK,CAAC,CAAG,EAAA,EAAA,CAAA;YAClD,OAAOF,cAAAA,CAAeP,WAAWM,WAAaD,EAAAA,UAAAA,CAAAA;AAChD,SAAA;AACAM,QAAAA,MAAAA,CAAAA,CAAOT,GAAW,EAAA;YAChB,MAAMC,SAAAA,GAAYC,UAAWF,CAAAA,GAAAA,EAAK,EAAI,EAAA,EAAA,CAAA;YACtC,MAAMG,UAAAA,GAAgCF,SAAUM,CAAAA,KAAK,CAAC,EAAA,CAAA;AACtD,YAAA,MAAMH,WAAyBH,GAAAA,SAAAA,CAAUM,KAAK,CAAC,CAAG,EAAA,EAAA,CAAA;YAClD,OAAOF,cAAAA,CAAeP,WAAWM,WAAaD,EAAAA,UAAAA,CAAAA;AAChD;AACF,KAAA;IAEA,OAAOJ,UAAU,CAACD,SAAU,CAAA;AAC9B,CAAA;AAEA;;;;;;;AAOC,IACYY,MAAAA,sBAAAA,GAAyB,CACpCV,GAAAA,EACAF,YAAuB,aAAa,GAAA;AAEpC,IAAA,OAAOD,sBAAsBC,SAAWE,CAAAA,CAAAA,GAAAA,CAAAA;AAC1C;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"providers.js","sources":["../../src/utils/providers.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport { ProviderInitializationError } from '../errors/providers';\n\nexport type ValidStrapiAssertion = (strapi: unknown, msg?: string) => asserts strapi is Core.Strapi;\n\nexport const assertValidStrapi: ValidStrapiAssertion = (strapi?: unknown, msg = '') => {\n if (!strapi) {\n throw new ProviderInitializationError(`${msg}. Strapi instance not found.`);\n }\n};\n"],"names":["assertValidStrapi","strapi","msg","ProviderInitializationError"],"mappings":";;;;AAMaA,MAAAA,iBAAAA,GAA0C,CAACC,MAAAA,EAAkBC,MAAM,EAAE,GAAA;AAChF,IAAA,IAAI,CAACD,MAAQ,EAAA;AACX,QAAA,MAAM,IAAIE,qCAA4B,CAAA,CAAC,EAAED,GAAAA,CAAI,4BAA4B,CAAC,CAAA;AAC5E;AACF;;;;"}
1
+ {"version":3,"file":"providers.js","sources":["../../src/utils/providers.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport { ProviderInitializationError } from '../errors/providers';\n\nexport type ValidStrapiAssertion = (strapi: unknown, msg?: string) => asserts strapi is Core.Strapi;\n\nexport const assertValidStrapi: ValidStrapiAssertion = (strapi?: unknown, msg = '') => {\n if (!strapi) {\n throw new ProviderInitializationError(`${msg}. Strapi instance not found.`);\n }\n};\n"],"names":["assertValidStrapi","strapi","msg","ProviderInitializationError"],"mappings":";;;;AAMaA,MAAAA,iBAAAA,GAA0C,CAACC,MAAAA,EAAkBC,MAAM,EAAE,GAAA;AAChF,IAAA,IAAI,CAACD,MAAQ,EAAA;AACX,QAAA,MAAM,IAAIE,qCAAAA,CAA4B,CAAGD,EAAAA,GAAAA,CAAI,4BAA4B,CAAC,CAAA;AAC5E;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"providers.mjs","sources":["../../src/utils/providers.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport { ProviderInitializationError } from '../errors/providers';\n\nexport type ValidStrapiAssertion = (strapi: unknown, msg?: string) => asserts strapi is Core.Strapi;\n\nexport const assertValidStrapi: ValidStrapiAssertion = (strapi?: unknown, msg = '') => {\n if (!strapi) {\n throw new ProviderInitializationError(`${msg}. Strapi instance not found.`);\n }\n};\n"],"names":["assertValidStrapi","strapi","msg","ProviderInitializationError"],"mappings":";;AAMaA,MAAAA,iBAAAA,GAA0C,CAACC,MAAAA,EAAkBC,MAAM,EAAE,GAAA;AAChF,IAAA,IAAI,CAACD,MAAQ,EAAA;AACX,QAAA,MAAM,IAAIE,2BAA4B,CAAA,CAAC,EAAED,GAAAA,CAAI,4BAA4B,CAAC,CAAA;AAC5E;AACF;;;;"}
1
+ {"version":3,"file":"providers.mjs","sources":["../../src/utils/providers.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\n\nimport { ProviderInitializationError } from '../errors/providers';\n\nexport type ValidStrapiAssertion = (strapi: unknown, msg?: string) => asserts strapi is Core.Strapi;\n\nexport const assertValidStrapi: ValidStrapiAssertion = (strapi?: unknown, msg = '') => {\n if (!strapi) {\n throw new ProviderInitializationError(`${msg}. Strapi instance not found.`);\n }\n};\n"],"names":["assertValidStrapi","strapi","msg","ProviderInitializationError"],"mappings":";;AAMaA,MAAAA,iBAAAA,GAA0C,CAACC,MAAAA,EAAkBC,MAAM,EAAE,GAAA;AAChF,IAAA,IAAI,CAACD,MAAQ,EAAA;AACX,QAAA,MAAM,IAAIE,2BAAAA,CAA4B,CAAGD,EAAAA,GAAAA,CAAI,4BAA4B,CAAC,CAAA;AAC5E;AACF;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/data-transfer",
3
- "version": "5.30.0",
3
+ "version": "5.31.0",
4
4
  "description": "Data transfer capabilities for Strapi",
5
5
  "keywords": [
6
6
  "strapi",
@@ -42,9 +42,9 @@
42
42
  "watch": "run -T rollup -c -w"
43
43
  },
44
44
  "dependencies": {
45
- "@strapi/logger": "5.30.0",
46
- "@strapi/types": "5.30.0",
47
- "@strapi/utils": "5.30.0",
45
+ "@strapi/logger": "5.31.0",
46
+ "@strapi/types": "5.31.0",
47
+ "@strapi/utils": "5.31.0",
48
48
  "chalk": "4.1.2",
49
49
  "cli-table3": "0.6.5",
50
50
  "commander": "8.3.0",
@@ -61,12 +61,12 @@
61
61
  "ws": "8.17.1"
62
62
  },
63
63
  "devDependencies": {
64
- "@strapi/database": "5.30.0",
64
+ "@strapi/database": "5.31.0",
65
65
  "@types/fs-extra": "11.0.4",
66
66
  "@types/jest": "29.5.2",
67
67
  "@types/koa": "2.13.4",
68
68
  "@types/lodash": "^4.14.191",
69
- "@types/node": "18.19.24",
69
+ "@types/node": "24.10.0",
70
70
  "@types/semver": "7.5.0",
71
71
  "@types/stream-chain": "2.0.1",
72
72
  "@types/stream-json": "1.7.3",
@@ -79,7 +79,7 @@
79
79
  "typescript": "5.4.4"
80
80
  },
81
81
  "engines": {
82
- "node": ">=18.0.0 <=22.x.x",
82
+ "node": ">=20.0.0 <=24.x.x",
83
83
  "npm": ">=6.0.0"
84
84
  }
85
85
  }