@ember-data/legacy-compat 5.4.0-beta.2 → 5.4.0-beta.21

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 (70) hide show
  1. package/LICENSE.md +19 -7
  2. package/README.md +10 -2
  3. package/addon-main.cjs +5 -0
  4. package/{addon/-private-1aicprWG.js → dist/-private-Dlia0pw1.js} +177 -63
  5. package/dist/-private-Dlia0pw1.js.map +1 -0
  6. package/dist/-private.js +1 -0
  7. package/dist/builders.js +323 -0
  8. package/dist/builders.js.map +1 -0
  9. package/{addon → dist}/index.js +250 -84
  10. package/dist/index.js.map +1 -0
  11. package/dist/utils.js +246 -0
  12. package/dist/utils.js.map +1 -0
  13. package/logos/NCC-1701-a-blue.svg +4 -0
  14. package/logos/NCC-1701-a-gold.svg +4 -0
  15. package/logos/NCC-1701-a-gold_100.svg +1 -0
  16. package/logos/NCC-1701-a-gold_base-64.txt +1 -0
  17. package/logos/NCC-1701-a.svg +4 -0
  18. package/logos/README.md +4 -0
  19. package/logos/docs-badge.svg +2 -0
  20. package/logos/github-header.svg +444 -0
  21. package/logos/social1.png +0 -0
  22. package/logos/social2.png +0 -0
  23. package/logos/warp-drive-logo-dark.svg +4 -0
  24. package/logos/warp-drive-logo-gold.svg +4 -0
  25. package/package.json +55 -88
  26. package/unstable-preview-types/-private.d.ts +17 -0
  27. package/unstable-preview-types/-private.d.ts.map +1 -0
  28. package/unstable-preview-types/builders/find-all.d.ts +41 -0
  29. package/unstable-preview-types/builders/find-all.d.ts.map +1 -0
  30. package/unstable-preview-types/builders/find-record.d.ts +62 -0
  31. package/unstable-preview-types/builders/find-record.d.ts.map +1 -0
  32. package/unstable-preview-types/builders/query.d.ts +72 -0
  33. package/unstable-preview-types/builders/query.d.ts.map +1 -0
  34. package/unstable-preview-types/builders/save-record.d.ts +40 -0
  35. package/unstable-preview-types/builders/save-record.d.ts.map +1 -0
  36. package/unstable-preview-types/builders/utils.d.ts +6 -0
  37. package/unstable-preview-types/builders/utils.d.ts.map +1 -0
  38. package/unstable-preview-types/builders.d.ts +18 -0
  39. package/unstable-preview-types/builders.d.ts.map +1 -0
  40. package/unstable-preview-types/index.d.ts +162 -0
  41. package/unstable-preview-types/index.d.ts.map +1 -0
  42. package/unstable-preview-types/legacy-network-handler/fetch-manager.d.ts +49 -0
  43. package/unstable-preview-types/legacy-network-handler/fetch-manager.d.ts.map +1 -0
  44. package/unstable-preview-types/legacy-network-handler/identifier-has-id.d.ts +5 -0
  45. package/unstable-preview-types/legacy-network-handler/identifier-has-id.d.ts.map +1 -0
  46. package/unstable-preview-types/legacy-network-handler/legacy-data-fetch.d.ts +14 -0
  47. package/unstable-preview-types/legacy-network-handler/legacy-data-fetch.d.ts.map +1 -0
  48. package/unstable-preview-types/legacy-network-handler/legacy-data-utils.d.ts +8 -0
  49. package/unstable-preview-types/legacy-network-handler/legacy-data-utils.d.ts.map +1 -0
  50. package/unstable-preview-types/legacy-network-handler/legacy-network-handler.d.ts +5 -0
  51. package/unstable-preview-types/legacy-network-handler/legacy-network-handler.d.ts.map +1 -0
  52. package/unstable-preview-types/legacy-network-handler/minimum-adapter-interface.d.ts +549 -0
  53. package/unstable-preview-types/legacy-network-handler/minimum-adapter-interface.d.ts.map +1 -0
  54. package/unstable-preview-types/legacy-network-handler/minimum-serializer-interface.d.ts +235 -0
  55. package/unstable-preview-types/legacy-network-handler/minimum-serializer-interface.d.ts.map +1 -0
  56. package/unstable-preview-types/legacy-network-handler/serializer-response.d.ts +9 -0
  57. package/unstable-preview-types/legacy-network-handler/serializer-response.d.ts.map +1 -0
  58. package/unstable-preview-types/legacy-network-handler/snapshot-record-array.d.ts +96 -0
  59. package/unstable-preview-types/legacy-network-handler/snapshot-record-array.d.ts.map +1 -0
  60. package/unstable-preview-types/legacy-network-handler/snapshot.d.ts +248 -0
  61. package/unstable-preview-types/legacy-network-handler/snapshot.d.ts.map +1 -0
  62. package/unstable-preview-types/utils.d.ts +161 -0
  63. package/unstable-preview-types/utils.d.ts.map +1 -0
  64. package/addon/-private-1aicprWG.js.map +0 -1
  65. package/addon/-private.js +0 -1
  66. package/addon/index.js.map +0 -1
  67. package/addon-main.js +0 -93
  68. /package/{addon → dist}/-private.js.map +0 -0
  69. /package/{ember-data-logo-dark.svg → logos/ember-data-logo-dark.svg} +0 -0
  70. /package/{ember-data-logo-light.svg → logos/ember-data-logo-light.svg} +0 -0
Binary file
Binary file
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 324 32">
2
+ <path fill="#110819"
3
+ d="M321.58 29.54a41.7 41.7 0 0 1-7.26 1.72c-2.4.36-4.87.53-7.4.53-3.21 0-6.09-.34-8.6-1.03a18.5 18.5 0 0 1-6.34-3.03 13.07 13.07 0 0 1-3.94-4.83c-.9-1.9-1.35-4.06-1.35-6.47a14.32 14.32 0 0 1 5.22-11.19 18.14 18.14 0 0 1 6.06-3.3c2.36-.81 5-1.21 7.9-1.21 2.68 0 5.13.36 7.35 1.1 2.24.71 4.15 1.78 5.74 3.2a14.28 14.28 0 0 1 3.72 5.24 18.12 18.12 0 0 1 1.33 7.17v1.98h-29.1a7.5 7.5 0 0 0 1.28 2.56c.6.77 1.4 1.43 2.42 1.97 1.02.55 2.27.97 3.74 1.27 1.5.3 3.27.45 5.33.45a35.35 35.35 0 0 0 8.23-.96c1.22-.3 2.31-.64 3.29-1 .99-.35 1.78-.7 2.38-1.07v6.9Zm-5.5-15.96a6.73 6.73 0 0 0-.66-2.26 5.82 5.82 0 0 0-1.72-2.13 9.46 9.46 0 0 0-3.1-1.54 15.6 15.6 0 0 0-4.77-.63c-1.79 0-3.33.23-4.64.67-1.3.44-2.4 1-3.29 1.65a8.37 8.37 0 0 0-2.04 2.13c-.48.76-.8 1.46-.94 2.1h21.16ZM271.84 31h-9.28L247.63 1.48h8.9l10.74 22.22 10.72-22.22h8.9L271.83 31ZM234.8 31V1.48h7.97V31h-7.97ZM229.73 8.16l-.94-.28c-.4-.13-.88-.25-1.42-.36a17.88 17.88 0 0 0-3.8-.45c-1.44 0-2.78.18-4.02.53-1.23.35-2.39.81-3.46 1.4a19.48 19.48 0 0 0-3 1.98c-.92.73-1.77 1.48-2.54 2.25V31h-7.97V1.48h7.97v4.8c.96-.72 1.94-1.41 2.94-2.07a25.36 25.36 0 0 1 3.16-1.78 18.9 18.9 0 0 1 3.48-1.23 15.39 15.39 0 0 1 5.44-.39 25 25 0 0 1 4.16.67v6.68ZM197.05 16.22c0 1.89-.2 3.57-.62 5.05a12.7 12.7 0 0 1-1.76 3.82 11.07 11.07 0 0 1-2.7 2.77 13.77 13.77 0 0 1-3.51 1.83c-1.29.46-2.68.8-4.17 1-1.49.21-3.04.31-4.66.31H160.9V1.48h18.69c1.62 0 3.17.1 4.66.32 1.49.2 2.88.53 4.17 1 1.3.45 2.48 1.06 3.54 1.82 1.06.74 1.96 1.67 2.7 2.77a12.7 12.7 0 0 1 1.77 3.82c.42 1.46.62 3.13.62 5Zm-8.03 0c0-1.42-.19-2.65-.56-3.7a5.64 5.64 0 0 0-1.76-2.57 7.66 7.66 0 0 0-3.16-1.53c-1.3-.34-2.9-.52-4.77-.52h-9.9v16.68h9.9c1.88 0 3.47-.17 4.77-.5a7.86 7.86 0 0 0 3.16-1.54c.81-.7 1.4-1.58 1.76-2.63.37-1.04.56-2.27.56-3.7ZM153.98 10.55c0 1.47-.25 2.78-.73 3.9a6.82 6.82 0 0 1-2.26 2.86 10.95 10.95 0 0 1-4 1.77 25.6 25.6 0 0 1-5.86.58h-13.26V31h-2.68V1.48h15.94c2.3 0 4.25.2 5.87.6 1.63.39 2.96.96 4 1.72a6.67 6.67 0 0 1 2.25 2.84c.48 1.13.73 2.43.73 3.9Zm-2.77 0c0-1.4-.24-2.54-.71-3.4a4.53 4.53 0 0 0-2.15-1.97c-.96-.48-2.19-.8-3.68-.95a50.43 50.43 0 0 0-5.26-.24h-11.54v13.15h11.54l2.51.02c.9 0 1.8-.04 2.67-.12.87-.1 1.7-.27 2.5-.5.8-.24 1.5-.6 2.1-1.1a5.05 5.05 0 0 0 1.46-1.9 7 7 0 0 0 .56-3ZM119.76 3.76c-.41-.13-1-.27-1.74-.41-.73-.16-1.67-.24-2.83-.24-1.6 0-3.12.2-4.54.6a17.94 17.94 0 0 0-7.28 3.96 23.73 23.73 0 0 0-2.8 2.83V31H97.9V1.48h2.69V7.5c.96-1 2-1.9 3.11-2.73a21.54 21.54 0 0 1 7.48-3.53 17.47 17.47 0 0 1 5.6-.47c.4.02.77.04 1.1.09a16.6 16.6 0 0 1 1.9.26v2.64ZM85.52 31v-3.27c-1.03.56-2.2 1.08-3.53 1.55a40.4 40.4 0 0 1-13.13 2.3c-1.91 0-3.64-.17-5.17-.52a12.2 12.2 0 0 1-3.87-1.52A7.38 7.38 0 0 1 57.37 27a7.06 7.06 0 0 1-.86-3.52c0-1.32.33-2.48 1-3.48a8.81 8.81 0 0 1 2.85-2.64c1.23-.76 2.71-1.4 4.45-1.91 1.74-.53 3.7-.98 5.84-1.34 2.15-.37 4.47-.67 6.96-.9 2.5-.24 5.14-.44 7.9-.6v-2.26c0-.91-.16-1.72-.5-2.42a5.54 5.54 0 0 0-1.45-1.83 7.97 7.97 0 0 0-2.17-1.31c-.83-.36-1.73-.65-2.7-.86a33.97 33.97 0 0 0-13.54.21c-1.03.25-2.02.53-2.96.86-.95.33-1.9.68-2.86 1.06V2.92c1.99-.53 4.1-.99 6.36-1.38 2.26-.4 4.66-.6 7.2-.6 2.14 0 4.15.19 6.01.56 1.86.36 3.48.94 4.86 1.74A9.16 9.16 0 0 1 87 6.36a8.55 8.55 0 0 1 1.18 4.62V31h-2.66Zm0-16c-4.69.25-8.69.62-12.01 1.09-3.31.47-6.02 1.05-8.12 1.74-2.1.69-3.66 1.49-4.64 2.4a4.18 4.18 0 0 0-1.46 3.12c0 .95.23 1.78.7 2.52a5.86 5.86 0 0 0 2.09 1.84c.9.49 2 .86 3.29 1.12 1.28.24 2.73.37 4.34.37a29.36 29.36 0 0 0 5.95-.6 36.6 36.6 0 0 0 5.71-1.57c.86-.32 1.64-.66 2.34-1.01a11.3 11.3 0 0 0 1.8-1.1v-9.93ZM28.65 1.48l10.53 27.37L50.09 1.48h2.99L41.2 31h-4L26.84 4.34 16.51 31h-4L.63 1.48h2.99l10.91 27.37 10.5-27.37h3.62Z" />
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 324 32">
2
+ <path fill="#FFC474"
3
+ d="M321.58 29.54a41.7 41.7 0 0 1-7.26 1.72c-2.4.36-4.87.53-7.4.53-3.21 0-6.09-.34-8.6-1.03a18.5 18.5 0 0 1-6.34-3.03 13.07 13.07 0 0 1-3.94-4.83c-.9-1.9-1.35-4.06-1.35-6.47a14.32 14.32 0 0 1 5.22-11.19 18.14 18.14 0 0 1 6.06-3.3c2.36-.81 5-1.21 7.9-1.21 2.68 0 5.13.36 7.35 1.1 2.24.71 4.15 1.78 5.74 3.2a14.28 14.28 0 0 1 3.72 5.24 18.12 18.12 0 0 1 1.33 7.17v1.98h-29.1a7.5 7.5 0 0 0 1.28 2.56c.6.77 1.4 1.43 2.42 1.97 1.02.55 2.27.97 3.74 1.27 1.5.3 3.27.45 5.33.45a35.35 35.35 0 0 0 8.23-.96c1.22-.3 2.31-.64 3.29-1 .99-.35 1.78-.7 2.38-1.07v6.9Zm-5.5-15.96a6.73 6.73 0 0 0-.66-2.26 5.82 5.82 0 0 0-1.72-2.13 9.46 9.46 0 0 0-3.1-1.54 15.6 15.6 0 0 0-4.77-.63c-1.79 0-3.33.23-4.64.67-1.3.44-2.4 1-3.29 1.65a8.37 8.37 0 0 0-2.04 2.13c-.48.76-.8 1.46-.94 2.1h21.16ZM271.84 31h-9.28L247.63 1.48h8.9l10.74 22.22 10.72-22.22h8.9L271.83 31ZM234.8 31V1.48h7.97V31h-7.97ZM229.73 8.16l-.94-.28c-.4-.13-.88-.25-1.42-.36a17.88 17.88 0 0 0-3.8-.45c-1.44 0-2.78.18-4.02.53-1.23.35-2.39.81-3.46 1.4a19.48 19.48 0 0 0-3 1.98c-.92.73-1.77 1.48-2.54 2.25V31h-7.97V1.48h7.97v4.8c.96-.72 1.94-1.41 2.94-2.07a25.36 25.36 0 0 1 3.16-1.78 18.9 18.9 0 0 1 3.48-1.23 15.39 15.39 0 0 1 5.44-.39 25 25 0 0 1 4.16.67v6.68ZM197.05 16.22c0 1.89-.2 3.57-.62 5.05a12.7 12.7 0 0 1-1.76 3.82 11.07 11.07 0 0 1-2.7 2.77 13.77 13.77 0 0 1-3.51 1.83c-1.29.46-2.68.8-4.17 1-1.49.21-3.04.31-4.66.31H160.9V1.48h18.69c1.62 0 3.17.1 4.66.32 1.49.2 2.88.53 4.17 1 1.3.45 2.48 1.06 3.54 1.82 1.06.74 1.96 1.67 2.7 2.77a12.7 12.7 0 0 1 1.77 3.82c.42 1.46.62 3.13.62 5Zm-8.03 0c0-1.42-.19-2.65-.56-3.7a5.64 5.64 0 0 0-1.76-2.57 7.66 7.66 0 0 0-3.16-1.53c-1.3-.34-2.9-.52-4.77-.52h-9.9v16.68h9.9c1.88 0 3.47-.17 4.77-.5a7.86 7.86 0 0 0 3.16-1.54c.81-.7 1.4-1.58 1.76-2.63.37-1.04.56-2.27.56-3.7ZM153.98 10.55c0 1.47-.25 2.78-.73 3.9a6.82 6.82 0 0 1-2.26 2.86 10.95 10.95 0 0 1-4 1.77 25.6 25.6 0 0 1-5.86.58h-13.26V31h-2.68V1.48h15.94c2.3 0 4.25.2 5.87.6 1.63.39 2.96.96 4 1.72a6.67 6.67 0 0 1 2.25 2.84c.48 1.13.73 2.43.73 3.9Zm-2.77 0c0-1.4-.24-2.54-.71-3.4a4.53 4.53 0 0 0-2.15-1.97c-.96-.48-2.19-.8-3.68-.95a50.43 50.43 0 0 0-5.26-.24h-11.54v13.15h11.54l2.51.02c.9 0 1.8-.04 2.67-.12.87-.1 1.7-.27 2.5-.5.8-.24 1.5-.6 2.1-1.1a5.05 5.05 0 0 0 1.46-1.9 7 7 0 0 0 .56-3ZM119.76 3.76c-.41-.13-1-.27-1.74-.41-.73-.16-1.67-.24-2.83-.24-1.6 0-3.12.2-4.54.6a17.94 17.94 0 0 0-7.28 3.96 23.73 23.73 0 0 0-2.8 2.83V31H97.9V1.48h2.69V7.5c.96-1 2-1.9 3.11-2.73a21.54 21.54 0 0 1 7.48-3.53 17.47 17.47 0 0 1 5.6-.47c.4.02.77.04 1.1.09a16.6 16.6 0 0 1 1.9.26v2.64ZM85.52 31v-3.27c-1.03.56-2.2 1.08-3.53 1.55a40.4 40.4 0 0 1-13.13 2.3c-1.91 0-3.64-.17-5.17-.52a12.2 12.2 0 0 1-3.87-1.52A7.38 7.38 0 0 1 57.37 27a7.06 7.06 0 0 1-.86-3.52c0-1.32.33-2.48 1-3.48a8.81 8.81 0 0 1 2.85-2.64c1.23-.76 2.71-1.4 4.45-1.91 1.74-.53 3.7-.98 5.84-1.34 2.15-.37 4.47-.67 6.96-.9 2.5-.24 5.14-.44 7.9-.6v-2.26c0-.91-.16-1.72-.5-2.42a5.54 5.54 0 0 0-1.45-1.83 7.97 7.97 0 0 0-2.17-1.31c-.83-.36-1.73-.65-2.7-.86a33.97 33.97 0 0 0-13.54.21c-1.03.25-2.02.53-2.96.86-.95.33-1.9.68-2.86 1.06V2.92c1.99-.53 4.1-.99 6.36-1.38 2.26-.4 4.66-.6 7.2-.6 2.14 0 4.15.19 6.01.56 1.86.36 3.48.94 4.86 1.74A9.16 9.16 0 0 1 87 6.36a8.55 8.55 0 0 1 1.18 4.62V31h-2.66Zm0-16c-4.69.25-8.69.62-12.01 1.09-3.31.47-6.02 1.05-8.12 1.74-2.1.69-3.66 1.49-4.64 2.4a4.18 4.18 0 0 0-1.46 3.12c0 .95.23 1.78.7 2.52a5.86 5.86 0 0 0 2.09 1.84c.9.49 2 .86 3.29 1.12 1.28.24 2.73.37 4.34.37a29.36 29.36 0 0 0 5.95-.6 36.6 36.6 0 0 0 5.71-1.57c.86-.32 1.64-.66 2.34-1.01a11.3 11.3 0 0 0 1.8-1.1v-9.93ZM28.65 1.48l10.53 27.37L50.09 1.48h2.99L41.2 31h-4L26.84 4.34 16.51 31h-4L.63 1.48h2.99l10.91 27.37 10.5-27.37h3.62Z" />
4
+ </svg>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ember-data/legacy-compat",
3
3
  "description": "Compatibility Shims for Older EmberData",
4
- "version": "5.4.0-beta.2",
4
+ "version": "5.4.0-beta.21",
5
5
  "license": "MIT",
6
6
  "author": "Chris Thoburn <runspired@users.noreply.github.com>",
7
7
  "repository": {
@@ -12,7 +12,7 @@
12
12
  "homepage": "https://github.com/emberjs/data",
13
13
  "bugs": "https://github.com/emberjs/data/issues",
14
14
  "engines": {
15
- "node": ">= 18.19.1"
15
+ "node": ">= 18.20.8"
16
16
  },
17
17
  "keywords": [
18
18
  "ember-addon"
@@ -21,70 +21,28 @@
21
21
  "extends": "../../package.json"
22
22
  },
23
23
  "files": [
24
- "addon-main.js",
25
- "addon",
24
+ "unstable-preview-types",
25
+ "addon-main.cjs",
26
+ "dist",
26
27
  "README.md",
27
28
  "LICENSE.md",
28
- "ember-data-logo-dark.svg",
29
- "ember-data-logo-light.svg"
29
+ "logos"
30
30
  ],
31
31
  "exports": {
32
32
  ".": {
33
- "default": "./addon/index.js"
33
+ "default": "./dist/index.js"
34
34
  },
35
35
  "./*": {
36
- "default": "./addon/*.js"
36
+ "default": "./dist/*.js"
37
+ },
38
+ "./unstable-preview-types": {
39
+ "types": "./unstable-preview-types/index.d.ts"
37
40
  }
38
41
  },
39
42
  "ember-addon": {
40
- "main": "addon-main.js",
43
+ "main": "addon-main.cjs",
41
44
  "type": "addon",
42
- "version": 1
43
- },
44
- "dependencies": {
45
- "@ember-data/private-build-infra": "5.4.0-beta.2",
46
- "@embroider/macros": "^1.13.4",
47
- "ember-cli-babel": "^8.2.0",
48
- "pnpm-sync-dependencies-meta-injected": "0.0.10"
49
- },
50
- "dependenciesMeta": {
51
- "@ember-data/private-build-infra": {
52
- "injected": true
53
- },
54
- "@ember-data/request": {
55
- "injected": true
56
- },
57
- "@ember-data/graph": {
58
- "injected": true
59
- },
60
- "@ember-data/json-api": {
61
- "injected": true
62
- },
63
- "@ember-data/store": {
64
- "injected": true
65
- },
66
- "@warp-drive/core-types": {
67
- "injected": true
68
- },
69
- "ember-inflector": {
70
- "injected": true
71
- },
72
- "@ember-data/tracking": {
73
- "injected": true
74
- },
75
- "@ember/string": {
76
- "injected": true
77
- },
78
- "@ember-data/request-utils": {
79
- "injected": true
80
- }
81
- },
82
- "peerDependencies": {
83
- "@ember-data/graph": "5.4.0-beta.2",
84
- "@ember-data/json-api": "5.4.0-beta.2",
85
- "@ember-data/request": "5.4.0-beta.2",
86
- "@ember-data/store": "5.4.0-beta.2",
87
- "@warp-drive/core-types": "0.0.0-beta.2"
45
+ "version": 2
88
46
  },
89
47
  "peerDependenciesMeta": {
90
48
  "@ember-data/graph": {
@@ -94,44 +52,53 @@
94
52
  "optional": true
95
53
  }
96
54
  },
55
+ "dependencies": {
56
+ "@embroider/macros": "^1.16.12",
57
+ "@warp-drive/build-config": "0.0.0-beta.16"
58
+ },
59
+ "peerDependencies": {
60
+ "ember-source": "3.28.12 || ^4.0.4 || ^5.0.0 || ^6.0.0",
61
+ "@ember-data/graph": "5.4.0-beta.21",
62
+ "@ember-data/json-api": "5.4.0-beta.21",
63
+ "@ember-data/request": "5.4.0-beta.21",
64
+ "@ember-data/request-utils": "5.4.0-beta.21",
65
+ "@ember-data/store": "5.4.0-beta.21",
66
+ "@ember/test-waiters": "^3.1.0 || >= 4.0.0",
67
+ "@warp-drive/core-types": "0.0.0-beta.21"
68
+ },
97
69
  "devDependencies": {
98
- "@babel/cli": "^7.23.4",
99
- "@babel/core": "^7.23.7",
100
- "@babel/plugin-proposal-decorators": "^7.23.7",
101
- "@babel/plugin-transform-class-properties": "^7.23.3",
102
- "@babel/plugin-transform-private-methods": "^7.23.3",
103
- "@babel/plugin-transform-runtime": "^7.23.7",
104
- "@babel/plugin-transform-typescript": "^7.23.6",
105
- "@babel/preset-env": "^7.23.8",
106
- "@babel/preset-typescript": "^7.23.3",
107
- "@babel/runtime": "^7.23.8",
108
- "@ember-data/graph": "5.4.0-beta.2",
109
- "@ember-data/json-api": "5.4.0-beta.2",
110
- "@ember-data/request": "5.4.0-beta.2",
111
- "@ember-data/request-utils": "5.4.0-beta.2",
112
- "@ember-data/store": "5.4.0-beta.2",
113
- "@ember-data/tracking": "5.4.0-beta.2",
114
- "@ember/string": "^3.1.1",
115
- "@embroider/addon-dev": "^4.1.2",
116
- "@glimmer/component": "^1.1.2",
117
- "@rollup/plugin-babel": "^6.0.4",
118
- "@rollup/plugin-node-resolve": "^15.2.3",
119
- "@warp-drive/core-types": "0.0.0-beta.2",
120
- "@warp-drive/internal-config": "5.4.0-beta.2",
121
- "ember-inflector": "^4.0.2",
122
- "ember-source": "~5.6.0",
123
- "rollup": "^4.9.6",
124
- "typescript": "^5.3.3",
125
- "walk-sync": "^3.0.0"
70
+ "@babel/core": "^7.26.10",
71
+ "@babel/plugin-transform-typescript": "^7.27.0",
72
+ "@babel/preset-env": "^7.26.9",
73
+ "@babel/preset-typescript": "^7.27.0",
74
+ "@ember-data/graph": "5.4.0-beta.21",
75
+ "@ember-data/json-api": "5.4.0-beta.21",
76
+ "@ember-data/request": "5.4.0-beta.21",
77
+ "@ember-data/request-utils": "5.4.0-beta.21",
78
+ "@ember-data/store": "5.4.0-beta.21",
79
+ "@ember-data/tracking": "5.4.0-beta.21",
80
+ "@ember/test-waiters": "^4.1.0",
81
+ "@glimmer/component": "^2.0.0",
82
+ "@warp-drive/core-types": "0.0.0-beta.21",
83
+ "@warp-drive/internal-config": "5.4.0-beta.21",
84
+ "ember-source": "~6.3.0",
85
+ "typescript": "^5.8.3",
86
+ "vite": "^5.4.15"
126
87
  },
127
88
  "ember": {
128
89
  "edition": "octane"
129
90
  },
91
+ "typesVersions": {
92
+ "*": {
93
+ "unstable-preview-types": [
94
+ "./unstable-preview-types"
95
+ ]
96
+ }
97
+ },
130
98
  "scripts": {
131
- "lint": "eslint . --quiet --cache --cache-strategy=content --ext .js,.ts,.mjs,.cjs --report-unused-disable-directives",
132
- "build:types": "echo \"Types are private\" && exit 0",
133
- "build:client": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
134
- "_build": "bun run build:client && bun run build:types",
135
- "_syncPnpm": "bun run sync-dependencies-meta-injected"
99
+ "lint": "eslint . --quiet --cache --cache-strategy=content",
100
+ "build:pkg": "vite build;",
101
+ "sync": "echo \"syncing\"",
102
+ "start": "vite"
136
103
  }
137
104
  }
@@ -0,0 +1,17 @@
1
+ declare module '@ember-data/legacy-compat/-private' {
2
+ import type Store from '@ember-data/store';
3
+ import type { CompatStore } from '@ember-data/legacy-compat';
4
+ /**
5
+ * Utilities - often temporary - for maintaining backwards compatibility with
6
+ * older parts of EmberData.
7
+ *
8
+ @module @ember-data/legacy-compat
9
+ @main @ember-data/legacy-compat
10
+ */
11
+ export { SnapshotRecordArray } from '@ember-data/legacy-compat/legacy-network-handler/snapshot-record-array';
12
+ export { SaveOp } from '@ember-data/legacy-compat/legacy-network-handler/fetch-manager';
13
+ export { FetchManager } from '@ember-data/legacy-compat/legacy-network-handler/fetch-manager';
14
+ export { Snapshot } from '@ember-data/legacy-compat/legacy-network-handler/snapshot';
15
+ export function upgradeStore(store: Store): asserts store is CompatStore;
16
+ }
17
+ //# sourceMappingURL=-private.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"-private.d.ts","sourceRoot":"","sources":["../src/-private.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC;AAErC;;;;;;EAME;AACF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,WAAW,CAAG"}
@@ -0,0 +1,41 @@
1
+ declare module '@ember-data/legacy-compat/builders/find-all' {
2
+ /**
3
+ * @module @ember-data/legacy-compat/builders
4
+ */
5
+ import type { StoreRequestInput } from '@ember-data/store';
6
+ import type { FindAllOptions } from '@ember-data/store/types';
7
+ import type { TypedRecordInstance, TypeFromInstance } from '@warp-drive/core-types/record';
8
+ import type { RequestSignature } from '@warp-drive/core-types/symbols';
9
+ type FindAllRequestInput<T extends string = string, RT = unknown[]> = StoreRequestInput & {
10
+ op: 'findAll';
11
+ data: {
12
+ type: T;
13
+ options: FindAllBuilderOptions;
14
+ };
15
+ [RequestSignature]?: RT;
16
+ };
17
+ type FindAllBuilderOptions<T = unknown> = FindAllOptions<T>;
18
+ /**
19
+ This function builds a request config to perform a `findAll` request for the given type.
20
+ When passed to `store.request`, this config will result in the same behavior as a `store.findAll` request.
21
+ Additionally, it takes the same options as `store.findAll`.
22
+
23
+ All `@ember-data/legacy-compat` builders exist to enable you to migrate your codebase to using the correct syntax for `store.request` while temporarily preserving legacy behaviors.
24
+ This is useful for quickly upgrading an entire app to a unified syntax while a longer incremental migration is made to shift off of adapters and serializers.
25
+ To that end, these builders are deprecated and will be removed in a future version of Ember Data.
26
+
27
+ @method findAll
28
+ @deprecated
29
+ @public
30
+ @static
31
+ @for @ember-data/legacy-compat/builders
32
+ @param {string} type the name of the resource
33
+ @param {object} query a query to be used by the adapter
34
+ @param {FindAllBuilderOptions} [options] optional, may include `adapterOptions` hash which will be passed to adapter.findAll
35
+ @return {FindAllRequestInput} request config
36
+ */
37
+ export function findAllBuilder<T extends TypedRecordInstance>(type: TypeFromInstance<T>, options?: FindAllBuilderOptions<T>): FindAllRequestInput<TypeFromInstance<T>, T[]>;
38
+ export function findAllBuilder(type: string, options?: FindAllBuilderOptions): FindAllRequestInput;
39
+ export {};
40
+ }
41
+ //# sourceMappingURL=find-all.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-all.d.ts","sourceRoot":"","sources":["../../src/builders/find-all.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAE3F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAIvE,KAAK,mBAAmB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,iBAAiB,GAAG;IACxF,EAAE,EAAE,SAAS,CAAC;IACd,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC,CAAC;QACR,OAAO,EAAE,qBAAqB,CAAC;KAChC,CAAC;IACF,CAAC,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC;CACzB,CAAC;AAEF,KAAK,qBAAqB,CAAC,CAAC,GAAG,OAAO,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC;AAE5D;;;;;;;;;;;;;;;;;;EAkBE;AACF,wBAAgB,cAAc,CAAC,CAAC,SAAS,mBAAmB,EAC1D,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACzB,OAAO,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,GACjC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AACjD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,mBAAmB,CAAC"}
@@ -0,0 +1,62 @@
1
+ declare module '@ember-data/legacy-compat/builders/find-record' {
2
+ /**
3
+ * @module @ember-data/legacy-compat/builders
4
+ */
5
+ import type { StoreRequestInput } from '@ember-data/store';
6
+ import type { FindRecordOptions } from '@ember-data/store/types';
7
+ import type { TypedRecordInstance, TypeFromInstance } from '@warp-drive/core-types/record';
8
+ import type { ResourceIdentifierObject } from '@warp-drive/core-types/spec/json-api-raw';
9
+ import type { RequestSignature } from '@warp-drive/core-types/symbols';
10
+ type FindRecordRequestInput<T extends string = string, RT = unknown> = StoreRequestInput & {
11
+ op: 'findRecord';
12
+ data: {
13
+ record: ResourceIdentifierObject<T>;
14
+ options: FindRecordBuilderOptions;
15
+ };
16
+ [RequestSignature]?: RT;
17
+ };
18
+ type FindRecordBuilderOptions = Omit<FindRecordOptions, 'preload'>;
19
+ /**
20
+ This function builds a request config to find the record for a given identifier or type and id combination.
21
+ When passed to `store.request`, this config will result in the same behavior as a `store.findRecord` request.
22
+ Additionally, it takes the same options as `store.findRecord`, with the exception of `preload` (which is unsupported).
23
+
24
+ **Example 1**
25
+
26
+ ```ts
27
+ import { findRecord } from '@ember-data/legacy-compat/builders';
28
+ const { content: post } = await store.request<Post>(findRecord<Post>('post', '1'));
29
+ ```
30
+
31
+ **Example 2**
32
+
33
+ `findRecord` can be called with a single identifier argument instead of the combination
34
+ of `type` (modelName) and `id` as separate arguments. You may recognize this combo as
35
+ the typical pairing from [JSON:API](https://jsonapi.org/format/#document-resource-object-identification)
36
+
37
+ ```ts
38
+ import { findRecord } from '@ember-data/legacy-compat/builders';
39
+ const { content: post } = await store.request<Post>(findRecord<Post>({ type: 'post', id }));
40
+ ```
41
+
42
+ All `@ember-data/legacy-compat` builders exist to enable you to migrate your codebase to using the correct syntax for `store.request` while temporarily preserving legacy behaviors.
43
+ This is useful for quickly upgrading an entire app to a unified syntax while a longer incremental migration is made to shift off of adapters and serializers.
44
+ To that end, these builders are deprecated and will be removed in a future version of Ember Data.
45
+
46
+ @method findRecord
47
+ @deprecated
48
+ @public
49
+ @static
50
+ @for @ember-data/legacy-compat/builders
51
+ @param {string|object} resource - either a string representing the name of the resource or a ResourceIdentifier object containing both the type (a string) and the id (a string) for the record or an lid (a string) of an existing record
52
+ @param {string|number|object} id - optional object with options for the request only if the first param is a ResourceIdentifier, else the string id of the record to be retrieved
53
+ @param {FindRecordBuilderOptions} [options] - if the first param is a string this will be the optional options for the request. See examples for available options.
54
+ @return {FindRecordRequestInput} request config
55
+ */
56
+ export function findRecordBuilder<T extends TypedRecordInstance>(type: TypeFromInstance<T>, id: string, options?: FindRecordBuilderOptions): FindRecordRequestInput<TypeFromInstance<T>, T>;
57
+ export function findRecordBuilder(type: string, id: string, options?: FindRecordBuilderOptions): FindRecordRequestInput;
58
+ export function findRecordBuilder<T extends TypedRecordInstance>(resource: ResourceIdentifierObject<TypeFromInstance<T>>, options?: FindRecordBuilderOptions): FindRecordRequestInput<TypeFromInstance<T>, T>;
59
+ export function findRecordBuilder(resource: ResourceIdentifierObject, options?: FindRecordBuilderOptions): FindRecordRequestInput;
60
+ export {};
61
+ }
62
+ //# sourceMappingURL=find-record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-record.d.ts","sourceRoot":"","sources":["../../src/builders/find-record.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,KAAK,EAAqB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAE3F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAIvE,KAAK,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EAAE,GAAG,OAAO,IAAI,iBAAiB,GAAG;IACzF,EAAE,EAAE,YAAY,CAAC;IACjB,IAAI,EAAE;QACJ,MAAM,EAAE,wBAAwB,CAAC,CAAC,CAAC,CAAC;QACpC,OAAO,EAAE,wBAAwB,CAAC;KACnC,CAAC;IACF,CAAC,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC;CACzB,CAAC;AAEF,KAAK,wBAAwB,GAAG,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCE;AACF,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,mBAAmB,EAC7D,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACzB,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,wBAAwB,GACjC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAClD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,wBAAwB,GAAG,sBAAsB,CAAC;AACxH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,mBAAmB,EAC7D,QAAQ,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EACvD,OAAO,CAAC,EAAE,wBAAwB,GACjC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAClD,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,wBAAwB,EAClC,OAAO,CAAC,EAAE,wBAAwB,GACjC,sBAAsB,CAAC"}
@@ -0,0 +1,72 @@
1
+ declare module '@ember-data/legacy-compat/builders/query' {
2
+ /**
3
+ * @module @ember-data/legacy-compat/builders
4
+ */
5
+ import type { StoreRequestInput } from '@ember-data/store';
6
+ import type { LegacyResourceQuery, QueryOptions } from '@ember-data/store/types';
7
+ import type { TypedRecordInstance, TypeFromInstance } from '@warp-drive/core-types/record';
8
+ import type { RequestSignature } from '@warp-drive/core-types/symbols';
9
+ type QueryRequestInput<T extends string = string, RT = unknown[]> = StoreRequestInput & {
10
+ op: 'query';
11
+ data: {
12
+ type: T;
13
+ query: LegacyResourceQuery;
14
+ options: QueryBuilderOptions;
15
+ };
16
+ [RequestSignature]?: RT;
17
+ };
18
+ type QueryBuilderOptions = QueryOptions;
19
+ /**
20
+ This function builds a request config for a given type and query object.
21
+ When passed to `store.request`, this config will result in the same behavior as a `store.query` request.
22
+ Additionally, it takes the same options as `store.query`.
23
+
24
+ All `@ember-data/legacy-compat` builders exist to enable you to migrate your codebase to using the correct syntax for `store.request` while temporarily preserving legacy behaviors.
25
+ This is useful for quickly upgrading an entire app to a unified syntax while a longer incremental migration is made to shift off of adapters and serializers.
26
+ To that end, these builders are deprecated and will be removed in a future version of Ember Data.
27
+
28
+ @method query
29
+ @deprecated
30
+ @public
31
+ @static
32
+ @for @ember-data/legacy-compat/builders
33
+ @param {string} type the name of the resource
34
+ @param {object} query a query to be used by the adapter
35
+ @param {QueryBuilderOptions} [options] optional, may include `adapterOptions` hash which will be passed to adapter.query
36
+ @return {QueryRequestInput} request config
37
+ */
38
+ export function queryBuilder<T extends TypedRecordInstance>(type: TypeFromInstance<T>, query: LegacyResourceQuery<T>, options?: QueryBuilderOptions): QueryRequestInput<TypeFromInstance<T>, T[]>;
39
+ export function queryBuilder(type: string, query: LegacyResourceQuery, options?: QueryBuilderOptions): QueryRequestInput;
40
+ type QueryRecordRequestInput<T extends string = string, RT = unknown> = StoreRequestInput & {
41
+ op: 'queryRecord';
42
+ data: {
43
+ type: T;
44
+ query: LegacyResourceQuery;
45
+ options: QueryBuilderOptions;
46
+ };
47
+ [RequestSignature]?: RT;
48
+ };
49
+ /**
50
+ This function builds a request config for a given type and query object.
51
+ When passed to `store.request`, this config will result in the same behavior as a `store.queryRecord` request.
52
+ Additionally, it takes the same options as `store.queryRecord`.
53
+
54
+ All `@ember-data/legacy-compat` builders exist to enable you to migrate your codebase to using the correct syntax for `store.request` while temporarily preserving legacy behaviors.
55
+ This is useful for quickly upgrading an entire app to a unified syntax while a longer incremental migration is made to shift off of adapters and serializers.
56
+ To that end, these builders are deprecated and will be removed in a future version of Ember Data.
57
+
58
+ @method queryRecord
59
+ @deprecated
60
+ @public
61
+ @static
62
+ @for @ember-data/legacy-compat/builders
63
+ @param {string} type the name of the resource
64
+ @param {object} query a query to be used by the adapter
65
+ @param {QueryBuilderOptions} [options] optional, may include `adapterOptions` hash which will be passed to adapter.query
66
+ @return {QueryRecordRequestInput} request config
67
+ */
68
+ export function queryRecordBuilder<T extends TypedRecordInstance>(type: TypeFromInstance<T>, query: LegacyResourceQuery<T>, options?: QueryBuilderOptions): QueryRecordRequestInput<TypeFromInstance<T>, T | null>;
69
+ export function queryRecordBuilder(type: string, query: LegacyResourceQuery, options?: QueryBuilderOptions): QueryRecordRequestInput;
70
+ export {};
71
+ }
72
+ //# sourceMappingURL=query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/builders/query.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAE3F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAIvE,KAAK,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,iBAAiB,GAAG;IACtF,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC,CAAC;QACR,KAAK,EAAE,mBAAmB,CAAC;QAC3B,OAAO,EAAE,mBAAmB,CAAC;KAC9B,CAAC;IACF,CAAC,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC;CACzB,CAAC;AAEF,KAAK,mBAAmB,GAAG,YAAY,CAAC;AAExC;;;;;;;;;;;;;;;;;;EAkBE;AACF,wBAAgB,YAAY,CAAC,CAAC,SAAS,mBAAmB,EACxD,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACzB,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAC7B,OAAO,CAAC,EAAE,mBAAmB,GAC5B,iBAAiB,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC/C,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,mBAAmB,EAC1B,OAAO,CAAC,EAAE,mBAAmB,GAC5B,iBAAiB,CAAC;AAwBrB,KAAK,uBAAuB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EAAE,GAAG,OAAO,IAAI,iBAAiB,GAAG;IAC1F,EAAE,EAAE,aAAa,CAAC;IAClB,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC,CAAC;QACR,KAAK,EAAE,mBAAmB,CAAC;QAC3B,OAAO,EAAE,mBAAmB,CAAC;KAC9B,CAAC;IACF,CAAC,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC;CACzB,CAAC;AAEF;;;;;;;;;;;;;;;;;;EAkBE;AACF,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,mBAAmB,EAC9D,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACzB,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAC7B,OAAO,CAAC,EAAE,mBAAmB,GAC5B,uBAAuB,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;AAC1D,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,mBAAmB,EAC1B,OAAO,CAAC,EAAE,mBAAmB,GAC5B,uBAAuB,CAAC"}
@@ -0,0 +1,40 @@
1
+ declare module '@ember-data/legacy-compat/builders/save-record' {
2
+ /**
3
+ * @module @ember-data/legacy-compat/builders
4
+ */
5
+ import { type StoreRequestInput } from '@ember-data/store';
6
+ import type { StableRecordIdentifier } from '@warp-drive/core-types';
7
+ import type { TypedRecordInstance, TypeFromInstance } from '@warp-drive/core-types/record';
8
+ import type { RequestSignature } from '@warp-drive/core-types/symbols';
9
+ type SaveRecordRequestInput<T extends string = string, RT = unknown> = StoreRequestInput & {
10
+ op: 'createRecord' | 'deleteRecord' | 'updateRecord';
11
+ data: {
12
+ record: StableRecordIdentifier<T>;
13
+ options: SaveRecordBuilderOptions;
14
+ };
15
+ records: [StableRecordIdentifier<T>];
16
+ [RequestSignature]?: RT;
17
+ };
18
+ type SaveRecordBuilderOptions = Record<string, unknown>;
19
+ /**
20
+ This function builds a request config for saving the given record (e.g. creating, updating, or deleting the record).
21
+ When passed to `store.request`, this config will result in the same behavior as a legacy `store.saveRecord` request.
22
+ Additionally, it takes the same options as `store.saveRecord`.
23
+
24
+ All `@ember-data/legacy-compat` builders exist to enable you to migrate your codebase to using the correct syntax for `store.request` while temporarily preserving legacy behaviors.
25
+ This is useful for quickly upgrading an entire app to a unified syntax while a longer incremental migration is made to shift off of adapters and serializers.
26
+ To that end, these builders are deprecated and will be removed in a future version of Ember Data.
27
+
28
+ @method saveRecord
29
+ @deprecated
30
+ @public
31
+ @static
32
+ @for @ember-data/legacy-compat/builders
33
+ @param {object} record a record to save
34
+ @param {SaveRecordBuilderOptions} options optional, may include `adapterOptions` hash which will be passed to adapter.saveRecord
35
+ @return {SaveRecordRequestInput} request config
36
+ */
37
+ export function saveRecordBuilder<T extends TypedRecordInstance>(record: T, options?: Record<string, unknown>): SaveRecordRequestInput<TypeFromInstance<T>, T>;
38
+ export {};
39
+ }
40
+ //# sourceMappingURL=save-record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"save-record.d.ts","sourceRoot":"","sources":["../../src/builders/save-record.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAiC,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG1F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAE3F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,KAAK,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EAAE,GAAG,OAAO,IAAI,iBAAiB,GAAG;IACzF,EAAE,EAAE,cAAc,GAAG,cAAc,GAAG,cAAc,CAAC;IACrD,IAAI,EAAE;QACJ,MAAM,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC;QAClC,OAAO,EAAE,wBAAwB,CAAC;KACnC,CAAC;IACF,OAAO,EAAE,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC;CACzB,CAAC;AAEF,KAAK,wBAAwB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAWxD;;;;;;;;;;;;;;;;;EAiBE;AACF,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,mBAAmB,EAC7D,MAAM,EAAE,CAAC,EACT,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACpC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAuChD"}
@@ -0,0 +1,6 @@
1
+ declare module '@ember-data/legacy-compat/builders/utils' {
2
+ import type { ResourceIdentifierObject } from '@warp-drive/core-types/spec/json-api-raw';
3
+ export function isMaybeIdentifier(maybeIdentifier: string | ResourceIdentifierObject): maybeIdentifier is ResourceIdentifierObject;
4
+ export function normalizeModelName(type: string): string;
5
+ }
6
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/builders/utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAEzF,wBAAgB,iBAAiB,CAC/B,eAAe,EAAE,MAAM,GAAG,wBAAwB,GACjD,eAAe,IAAI,wBAAwB,CAO7C;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAsBvD"}
@@ -0,0 +1,18 @@
1
+ declare module '@ember-data/legacy-compat/builders' {
2
+ /**
3
+ Builders for migrating from `store` methods to `store.request`.
4
+
5
+ These builders enable you to migrate your codebase to using the correct syntax for `store.request` while temporarily preserving legacy behaviors.
6
+ This is useful for quickly upgrading an entire app to a unified syntax while a longer incremental migration is made to shift off of adapters and serializers.
7
+ To that end, these builders are deprecated and will be removed in a future version of Ember Data.
8
+
9
+ @module @ember-data/legacy-compat/builders
10
+ @main @ember-data/legacy-compat/builders
11
+ @deprecated
12
+ */
13
+ export { findAllBuilder as findAll } from '@ember-data/legacy-compat/builders/find-all';
14
+ export { findRecordBuilder as findRecord } from '@ember-data/legacy-compat/builders/find-record';
15
+ export { queryBuilder as query, queryRecordBuilder as queryRecord } from '@ember-data/legacy-compat/builders/query';
16
+ export { saveRecordBuilder as saveRecord } from '@ember-data/legacy-compat/builders/save-record';
17
+ }
18
+ //# sourceMappingURL=builders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,EAAE,cAAc,IAAI,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAE,iBAAiB,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzE,OAAO,EAAE,YAAY,IAAI,KAAK,EAAE,kBAAkB,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE5F,OAAO,EAAE,iBAAiB,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAC"}