@warp-drive/core-types 0.0.0-alpha.101

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 (92) hide show
  1. package/LICENSE.md +9 -0
  2. package/NCC-1701-a-blue.svg +4 -0
  3. package/NCC-1701-a.svg +4 -0
  4. package/README.md +92 -0
  5. package/addon-main.cjs +4 -0
  6. package/dist/-private.js +79 -0
  7. package/dist/-private.js.map +1 -0
  8. package/dist/cache/aliases.js +0 -0
  9. package/dist/cache/aliases.js.map +1 -0
  10. package/dist/cache/change.js +0 -0
  11. package/dist/cache/change.js.map +1 -0
  12. package/dist/cache/mutations.js +0 -0
  13. package/dist/cache/mutations.js.map +1 -0
  14. package/dist/cache/operations.js +0 -0
  15. package/dist/cache/operations.js.map +1 -0
  16. package/dist/cache/relationship.js +0 -0
  17. package/dist/cache/relationship.js.map +1 -0
  18. package/dist/cache.js +0 -0
  19. package/dist/cache.js.map +1 -0
  20. package/dist/graph.js +0 -0
  21. package/dist/graph.js.map +1 -0
  22. package/dist/identifier.js +85 -0
  23. package/dist/identifier.js.map +1 -0
  24. package/dist/index.js +0 -0
  25. package/dist/index.js.map +1 -0
  26. package/dist/json/raw.js +0 -0
  27. package/dist/json/raw.js.map +1 -0
  28. package/dist/params.js +0 -0
  29. package/dist/params.js.map +1 -0
  30. package/dist/record.js +74 -0
  31. package/dist/record.js.map +1 -0
  32. package/dist/request.js +34 -0
  33. package/dist/request.js.map +1 -0
  34. package/dist/schema/concepts.js +0 -0
  35. package/dist/schema/concepts.js.map +1 -0
  36. package/dist/schema/fields.js +0 -0
  37. package/dist/schema/fields.js.map +1 -0
  38. package/dist/spec/document.js +0 -0
  39. package/dist/spec/document.js.map +1 -0
  40. package/dist/spec/error.js +0 -0
  41. package/dist/spec/error.js.map +1 -0
  42. package/dist/spec/json-api-raw.js +0 -0
  43. package/dist/spec/json-api-raw.js.map +1 -0
  44. package/dist/symbols.js +92 -0
  45. package/dist/symbols.js.map +1 -0
  46. package/dist/utils.js +0 -0
  47. package/dist/utils.js.map +1 -0
  48. package/package.json +70 -0
  49. package/unstable-preview-types/-private.d.ts +16 -0
  50. package/unstable-preview-types/-private.d.ts.map +1 -0
  51. package/unstable-preview-types/cache/aliases.d.ts +4 -0
  52. package/unstable-preview-types/cache/aliases.d.ts.map +1 -0
  53. package/unstable-preview-types/cache/change.d.ts +9 -0
  54. package/unstable-preview-types/cache/change.d.ts.map +1 -0
  55. package/unstable-preview-types/cache/mutations.d.ts +41 -0
  56. package/unstable-preview-types/cache/mutations.d.ts.map +1 -0
  57. package/unstable-preview-types/cache/operations.d.ts +17 -0
  58. package/unstable-preview-types/cache/operations.d.ts.map +1 -0
  59. package/unstable-preview-types/cache/relationship.d.ts +16 -0
  60. package/unstable-preview-types/cache/relationship.d.ts.map +1 -0
  61. package/unstable-preview-types/cache.d.ts +478 -0
  62. package/unstable-preview-types/cache.d.ts.map +1 -0
  63. package/unstable-preview-types/graph.d.ts +70 -0
  64. package/unstable-preview-types/graph.d.ts.map +1 -0
  65. package/unstable-preview-types/identifier.d.ts +111 -0
  66. package/unstable-preview-types/identifier.d.ts.map +1 -0
  67. package/unstable-preview-types/index.d.ts +25 -0
  68. package/unstable-preview-types/index.d.ts.map +1 -0
  69. package/unstable-preview-types/json/raw.d.ts +9 -0
  70. package/unstable-preview-types/json/raw.d.ts.map +1 -0
  71. package/unstable-preview-types/params.d.ts +12 -0
  72. package/unstable-preview-types/params.d.ts.map +1 -0
  73. package/unstable-preview-types/record.d.ts +104 -0
  74. package/unstable-preview-types/record.d.ts.map +1 -0
  75. package/unstable-preview-types/record.type-test.d.ts +4 -0
  76. package/unstable-preview-types/record.type-test.d.ts.map +1 -0
  77. package/unstable-preview-types/request.d.ts +323 -0
  78. package/unstable-preview-types/request.d.ts.map +1 -0
  79. package/unstable-preview-types/schema/concepts.d.ts +19 -0
  80. package/unstable-preview-types/schema/concepts.d.ts.map +1 -0
  81. package/unstable-preview-types/schema/fields.d.ts +810 -0
  82. package/unstable-preview-types/schema/fields.d.ts.map +1 -0
  83. package/unstable-preview-types/spec/document.d.ts +33 -0
  84. package/unstable-preview-types/spec/document.d.ts.map +1 -0
  85. package/unstable-preview-types/spec/error.d.ts +21 -0
  86. package/unstable-preview-types/spec/error.d.ts.map +1 -0
  87. package/unstable-preview-types/spec/json-api-raw.d.ts +144 -0
  88. package/unstable-preview-types/spec/json-api-raw.d.ts.map +1 -0
  89. package/unstable-preview-types/symbols.d.ts +85 -0
  90. package/unstable-preview-types/symbols.d.ts.map +1 -0
  91. package/unstable-preview-types/utils.d.ts +4 -0
  92. package/unstable-preview-types/utils.d.ts.map +1 -0
package/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (C) 2023 EmberData and WarpDrive contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">
3
+ <path fill="#0969da" d="m1096.3 402.82c-53.148-53.008-117.12-79.516-191.93-79.516-67.488 0-126.55 21.938-177.16 65.805-50.617 43.871-80.988 98.285-91.113 163.25l53.57 4.2188c14.625 0.28125 25.449 6.75 32.48 19.406h18.984c11.809 0 17.715 5.7617 17.715 17.293s-5.9062 17.293-17.715 17.293h-17.297c-6.75 14.344-18.137 21.797-34.168 22.359l-53.57 4.6406c10.125 64.68 40.496 118.95 91.113 162.82 50.617 43.871 109.68 65.805 177.16 65.805 74.805 0 138.78-26.574 191.93-79.723 53.152-53.148 79.727-116.98 79.727-191.51 0-75.086-26.574-139.13-79.727-192.14zm-79.422 185.27c0 2.9531 2.3906 5.3477 5.3438 5.3477 2.9531 0 5.3477-2.3945 5.3477-5.3477 0-2.9492-2.3945-5.3438-5.3477-5.3438-2.9531 0-5.3438 2.3945-5.3438 5.3438zm-104.54-111.07c0 2.9531 2.3945 5.3477 5.3438 5.3477 2.9531 0 5.3477-2.3945 5.3477-5.3477s-2.3945-5.3438-5.3477-5.3438c-2.9492 0-5.3438 2.3906-5.3438 5.3438zm-12.473 0c0 2.9531 2.3906 5.3477 5.3438 5.3477s5.3477-2.3945 5.3477-5.3477-2.3945-5.3438-5.3477-5.3438-5.3438 2.3906-5.3438 5.3438zm117.01 123.55c0 2.9492 2.3906 5.3438 5.3438 5.3438 2.9531 0 5.3477-2.3945 5.3477-5.3438 0-2.9531-2.3945-5.3477-5.3477-5.3477-2.9531 0-5.3438 2.3945-5.3438 5.3477zm-104.54 111.66c0 2.9531 2.3945 5.3477 5.3438 5.3477 2.9531 0 5.3477-2.3945 5.3477-5.3477s-2.3945-5.3438-5.3477-5.3438c-2.9492 0-5.3438 2.3906-5.3438 5.3438zm-12.473 0c0 2.9531 2.3906 5.3477 5.3438 5.3477s5.3477-2.3945 5.3477-5.3477-2.3945-5.3438-5.3477-5.3438-5.3438 2.3906-5.3438 5.3438zm-848-318.48c14.062-2.5312 30.934-4.5 50.621-5.9062l-46.402-0.84375zm499.86 169.15c-8.7188-2.25-18.141-8.7188-28.266-19.402l-101.23-103.35h-111.36l173.79 126.12v4.2188c21.652 6.1836 44.008 3.6562 67.07-7.5938zm47.664-148.48c-0.84375 3.3711-2.8125 6.6055-5.9062 9.6992h-5.0625l-6.3242-5.0625h-79.305v-4.6367zm-5.9062-16.031c3.0938 3.0938 5.0625 6.4688 5.9062 10.125h-96.598v-4.6406h79.305l6.3242-5.4844zm-541.62 397.78 4.2188 6.7461 46.402-0.84375c-22.5-2.2461-39.371-4.2148-50.621-5.9023zm499.86-169.15c-23.062-11.531-45.418-14.062-67.07-7.5938v4.2188l-173.79 126.12h111.36l101.23-103.77c10.406-10.684 19.828-17.012 28.266-18.98zm47.664 148.48h-96.598v-4.6406h79.305l6.3242-5.4805h5.0625c3.0938 3.6523 5.0625 7.0273 5.9062 10.121zm-5.9062 15.609h-5.0625l-6.3242-5.0625h-79.305v-4.6406h96.598c-0.84375 3.0938-2.8125 6.3281-5.9062 9.7031zm-102.5 9.6992c3.6562 1.4062 7.4531 2.1094 11.391 2.1094h64.961c24.746 0 37.121-8.4336 37.121-25.309 0-8.4375-4.6406-14.691-13.922-18.77-9.2773-4.0781-17.012-6.1172-23.199-6.1172h-64.961c-4.7812 0-8.5781 0.5625-11.391 1.6875h-333.66c-5.0625 0-28.543 1.6172-70.445 4.8516-41.902 3.2344-62.852 7.3828-62.852 12.441v11.812c0 4.5 20.949 8.5078 62.852 12.023 41.902 3.5156 65.383 5.2695 70.445 5.2695zm125.28-207.54h-42.602c-3.375 1.125-3.375 2.25 0 3.375h42.602zm-43.445 8.4375h-5.4844v-13.5h5.4844c17.152-6.1875 33.605-9.9844 49.352-11.391l4.6406-25.309 4.6406 0.42188c0.5625-4.2188 1.6875-10.262 3.375-18.137-28.684-0.5625-64.398 1.6875-107.14 6.75 3.6562 4.2148 7.4531 7.8711 11.391 10.965 4.7812 3.375 9.4219 5.625 13.918 6.75l12.656 2.9531-11.812 5.9062c-13.496 6.75-30.23 10.121-50.195 10.121-5.0625 0-8.5781-0.14062-10.547-0.42188-4.2188-0.5625-7.5898-1.1211-10.121-1.6836l-3.375-1.2656v-5.4844l-24.043-17.297c-41.34 5.625-69.32 8.5781-83.945 8.8594-31.496 0.28125-47.242 11.953-47.242 35.012 0 22.215 15.746 33.887 47.242 35.012 18.844 0.28125 46.824 3.2344 83.945 8.8594l24.043-17.297v-5.4844l3.375-1.2656c2.5312-0.84375 5.9023-1.4062 10.121-1.6875 1.9688-0.28125 5.4844-0.42187 10.547-0.42187 19.965 0 36.699 3.375 50.195 10.125l11.812 5.4844-12.656 3.375c-4.4961 0.84375-9.1367 3.0938-13.918 6.75-3.6562 2.2461-7.4531 5.7617-11.391 10.543 40.777 5.0625 76.492 7.4531 107.14 7.1719-1.6875-7.3125-2.8125-13.359-3.375-18.137h-4.6406l-4.6406-24.891c-17.434-2.25-33.887-6.043-49.352-11.387zm48.508-20.25c-12.652 1.6875-23.762 3.9375-33.324 6.75h29.105l3.7969-4.2188zm-4.2188 20.25h-29.105c9.5625 2.5312 20.672 4.7812 33.324 6.7461l-0.42188-2.5273zm136.67-8.4375c0-8.4375-4.2188-12.656-12.652-12.656h-21.516c-6.4688-12.652-16.59-18.98-30.371-18.98l-58.211-5.0625-5.9062 29.527-4.2188 5.0625v7.5938l4.2188 5.0625 5.9062 29.105 58.211-5.0625c15.469 0 26.012-7.3125 31.637-21.934h20.25c8.4336 0 12.652-4.2188 12.652-12.656zm-46.82 1.6875c0-11.531-5.9062-17.297-17.719-17.297-11.527 0-17.293 5.7656-17.293 17.297 0 11.812 5.7656 17.715 17.293 17.715 11.812 0 17.719-5.9023 17.719-17.715zm4.6406 0c0 14.902-7.4531 22.355-22.359 22.355-14.902 0-22.355-7.4531-22.355-22.355 0-14.906 7.4531-22.355 22.355-22.355 14.906 0 22.359 7.4492 22.359 22.355zm-13.922 0c0-5.625-2.8125-8.4375-8.4375-8.4375-5.3438 0-8.0156 2.8125-8.0156 8.4375s2.6719 8.4375 8.0156 8.4375c5.625 0 8.4375-2.8125 8.4375-8.4375zm4.6406 0c0 8.7188-4.3594 13.078-13.078 13.078-8.4375 0-12.652-4.3594-12.652-13.078s4.2148-13.078 12.652-13.078c8.7188 0 13.078 4.3594 13.078 13.078zm-43.871-2.1094v4.2188h-35.012v-4.2188zm258.58 2.1094c-0.5625-8.4375-4.7812-12.656-12.656-12.656-8.4336 0-12.652 4.2188-12.652 12.656s4.2188 12.656 12.652 12.656c8.4375 0 12.656-4.2188 12.656-12.656zm4.6406 0c0 11.531-5.7656 17.293-17.297 17.293-11.527 0-17.293-5.7617-17.293-17.293s5.7656-17.297 17.293-17.297c11.531 0 17.297 5.7656 17.297 17.297zm32.48 0c0-13.781-4.9219-25.59-14.766-35.434-9.5586-9.5625-21.23-14.344-35.012-14.344-15.184 0-31.777 5.7656-49.773 17.297-18.559 11.531-27.84 22.355-27.84 32.48 0 9.8438 9.2812 20.668 27.84 32.48 17.996 11.531 34.59 17.293 49.773 17.293 13.781 0 25.453-4.918 35.012-14.762 9.8438-9.5625 14.766-21.234 14.766-35.012zm5.0625 0c0 14.902-5.3438 27.699-16.031 38.387-10.684 10.684-23.621 16.027-38.809 16.027-15.746 0-33.18-6.0469-52.305-18.137-20.246-12.656-30.371-24.746-30.371-36.277s10.125-23.762 30.371-36.699c19.125-12.094 36.559-18.137 52.305-18.137 14.625 0 27.562 5.3398 38.809 16.027 10.688 10.969 16.031 23.902 16.031 38.809zm-54.418-29.105c-3.9336 0-10.262 1.6875-18.98 5.0625-7.875 3.9375-11.812 6.4648-11.812 7.5898v32.48c0 3.0938 3.9375 5.625 11.812 7.5938 7.875 3.375 14.203 5.0625 18.98 5.0625 19.406 0 29.391-9.2812 29.953-27.84 0-19.688-9.9844-29.668-29.953-29.949zm34.59 29.105v0.84375c0 21.371-11.527 32.34-34.59 32.902-4.4961 0-11.527-1.8281-21.09-5.4844-7.0312-3.9375-10.969-6.3281-11.809-7.1719-1.6875-1.4062-2.5312-3.0938-2.5312-5.0625v-32.48c0-1.4062 0.70312-2.9492 2.1094-4.6367 3.0898-2.8125 7.168-5.2031 12.23-7.1719 9-3.6562 16.031-5.4844 21.09-5.4844 22.5 0.28125 34.027 11.531 34.59 33.746zm-448.4-206.27h-333.66c-5.0625 0-28.543 1.6875-70.445 5.0625-41.902 3.375-62.852 7.5938-62.852 12.656v11.387c0 4.7812 20.949 8.8594 62.852 12.234 41.902 3.375 65.383 5.0625 70.445 5.0625h333.66c3.6562 1.4062 7.4531 2.1094 11.391 2.1094h64.961c5.3438 0 12.867-2.25 22.566-6.75 9.7031-4.5 14.555-10.547 14.555-18.137 0.28125-16.875-12.094-25.312-37.121-25.312h-64.961c-4.7812 0-8.5781 0.5625-11.391 1.6875z" fill-rule="evenodd"/>
4
+ </svg>
package/NCC-1701-a.svg ADDED
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">
3
+ <path fill="#FFFFFF" d="m1096.3 402.82c-53.148-53.008-117.12-79.516-191.93-79.516-67.488 0-126.55 21.938-177.16 65.805-50.617 43.871-80.988 98.285-91.113 163.25l53.57 4.2188c14.625 0.28125 25.449 6.75 32.48 19.406h18.984c11.809 0 17.715 5.7617 17.715 17.293s-5.9062 17.293-17.715 17.293h-17.297c-6.75 14.344-18.137 21.797-34.168 22.359l-53.57 4.6406c10.125 64.68 40.496 118.95 91.113 162.82 50.617 43.871 109.68 65.805 177.16 65.805 74.805 0 138.78-26.574 191.93-79.723 53.152-53.148 79.727-116.98 79.727-191.51 0-75.086-26.574-139.13-79.727-192.14zm-79.422 185.27c0 2.9531 2.3906 5.3477 5.3438 5.3477 2.9531 0 5.3477-2.3945 5.3477-5.3477 0-2.9492-2.3945-5.3438-5.3477-5.3438-2.9531 0-5.3438 2.3945-5.3438 5.3438zm-104.54-111.07c0 2.9531 2.3945 5.3477 5.3438 5.3477 2.9531 0 5.3477-2.3945 5.3477-5.3477s-2.3945-5.3438-5.3477-5.3438c-2.9492 0-5.3438 2.3906-5.3438 5.3438zm-12.473 0c0 2.9531 2.3906 5.3477 5.3438 5.3477s5.3477-2.3945 5.3477-5.3477-2.3945-5.3438-5.3477-5.3438-5.3438 2.3906-5.3438 5.3438zm117.01 123.55c0 2.9492 2.3906 5.3438 5.3438 5.3438 2.9531 0 5.3477-2.3945 5.3477-5.3438 0-2.9531-2.3945-5.3477-5.3477-5.3477-2.9531 0-5.3438 2.3945-5.3438 5.3477zm-104.54 111.66c0 2.9531 2.3945 5.3477 5.3438 5.3477 2.9531 0 5.3477-2.3945 5.3477-5.3477s-2.3945-5.3438-5.3477-5.3438c-2.9492 0-5.3438 2.3906-5.3438 5.3438zm-12.473 0c0 2.9531 2.3906 5.3477 5.3438 5.3477s5.3477-2.3945 5.3477-5.3477-2.3945-5.3438-5.3477-5.3438-5.3438 2.3906-5.3438 5.3438zm-848-318.48c14.062-2.5312 30.934-4.5 50.621-5.9062l-46.402-0.84375zm499.86 169.15c-8.7188-2.25-18.141-8.7188-28.266-19.402l-101.23-103.35h-111.36l173.79 126.12v4.2188c21.652 6.1836 44.008 3.6562 67.07-7.5938zm47.664-148.48c-0.84375 3.3711-2.8125 6.6055-5.9062 9.6992h-5.0625l-6.3242-5.0625h-79.305v-4.6367zm-5.9062-16.031c3.0938 3.0938 5.0625 6.4688 5.9062 10.125h-96.598v-4.6406h79.305l6.3242-5.4844zm-541.62 397.78 4.2188 6.7461 46.402-0.84375c-22.5-2.2461-39.371-4.2148-50.621-5.9023zm499.86-169.15c-23.062-11.531-45.418-14.062-67.07-7.5938v4.2188l-173.79 126.12h111.36l101.23-103.77c10.406-10.684 19.828-17.012 28.266-18.98zm47.664 148.48h-96.598v-4.6406h79.305l6.3242-5.4805h5.0625c3.0938 3.6523 5.0625 7.0273 5.9062 10.121zm-5.9062 15.609h-5.0625l-6.3242-5.0625h-79.305v-4.6406h96.598c-0.84375 3.0938-2.8125 6.3281-5.9062 9.7031zm-102.5 9.6992c3.6562 1.4062 7.4531 2.1094 11.391 2.1094h64.961c24.746 0 37.121-8.4336 37.121-25.309 0-8.4375-4.6406-14.691-13.922-18.77-9.2773-4.0781-17.012-6.1172-23.199-6.1172h-64.961c-4.7812 0-8.5781 0.5625-11.391 1.6875h-333.66c-5.0625 0-28.543 1.6172-70.445 4.8516-41.902 3.2344-62.852 7.3828-62.852 12.441v11.812c0 4.5 20.949 8.5078 62.852 12.023 41.902 3.5156 65.383 5.2695 70.445 5.2695zm125.28-207.54h-42.602c-3.375 1.125-3.375 2.25 0 3.375h42.602zm-43.445 8.4375h-5.4844v-13.5h5.4844c17.152-6.1875 33.605-9.9844 49.352-11.391l4.6406-25.309 4.6406 0.42188c0.5625-4.2188 1.6875-10.262 3.375-18.137-28.684-0.5625-64.398 1.6875-107.14 6.75 3.6562 4.2148 7.4531 7.8711 11.391 10.965 4.7812 3.375 9.4219 5.625 13.918 6.75l12.656 2.9531-11.812 5.9062c-13.496 6.75-30.23 10.121-50.195 10.121-5.0625 0-8.5781-0.14062-10.547-0.42188-4.2188-0.5625-7.5898-1.1211-10.121-1.6836l-3.375-1.2656v-5.4844l-24.043-17.297c-41.34 5.625-69.32 8.5781-83.945 8.8594-31.496 0.28125-47.242 11.953-47.242 35.012 0 22.215 15.746 33.887 47.242 35.012 18.844 0.28125 46.824 3.2344 83.945 8.8594l24.043-17.297v-5.4844l3.375-1.2656c2.5312-0.84375 5.9023-1.4062 10.121-1.6875 1.9688-0.28125 5.4844-0.42187 10.547-0.42187 19.965 0 36.699 3.375 50.195 10.125l11.812 5.4844-12.656 3.375c-4.4961 0.84375-9.1367 3.0938-13.918 6.75-3.6562 2.2461-7.4531 5.7617-11.391 10.543 40.777 5.0625 76.492 7.4531 107.14 7.1719-1.6875-7.3125-2.8125-13.359-3.375-18.137h-4.6406l-4.6406-24.891c-17.434-2.25-33.887-6.043-49.352-11.387zm48.508-20.25c-12.652 1.6875-23.762 3.9375-33.324 6.75h29.105l3.7969-4.2188zm-4.2188 20.25h-29.105c9.5625 2.5312 20.672 4.7812 33.324 6.7461l-0.42188-2.5273zm136.67-8.4375c0-8.4375-4.2188-12.656-12.652-12.656h-21.516c-6.4688-12.652-16.59-18.98-30.371-18.98l-58.211-5.0625-5.9062 29.527-4.2188 5.0625v7.5938l4.2188 5.0625 5.9062 29.105 58.211-5.0625c15.469 0 26.012-7.3125 31.637-21.934h20.25c8.4336 0 12.652-4.2188 12.652-12.656zm-46.82 1.6875c0-11.531-5.9062-17.297-17.719-17.297-11.527 0-17.293 5.7656-17.293 17.297 0 11.812 5.7656 17.715 17.293 17.715 11.812 0 17.719-5.9023 17.719-17.715zm4.6406 0c0 14.902-7.4531 22.355-22.359 22.355-14.902 0-22.355-7.4531-22.355-22.355 0-14.906 7.4531-22.355 22.355-22.355 14.906 0 22.359 7.4492 22.359 22.355zm-13.922 0c0-5.625-2.8125-8.4375-8.4375-8.4375-5.3438 0-8.0156 2.8125-8.0156 8.4375s2.6719 8.4375 8.0156 8.4375c5.625 0 8.4375-2.8125 8.4375-8.4375zm4.6406 0c0 8.7188-4.3594 13.078-13.078 13.078-8.4375 0-12.652-4.3594-12.652-13.078s4.2148-13.078 12.652-13.078c8.7188 0 13.078 4.3594 13.078 13.078zm-43.871-2.1094v4.2188h-35.012v-4.2188zm258.58 2.1094c-0.5625-8.4375-4.7812-12.656-12.656-12.656-8.4336 0-12.652 4.2188-12.652 12.656s4.2188 12.656 12.652 12.656c8.4375 0 12.656-4.2188 12.656-12.656zm4.6406 0c0 11.531-5.7656 17.293-17.297 17.293-11.527 0-17.293-5.7617-17.293-17.293s5.7656-17.297 17.293-17.297c11.531 0 17.297 5.7656 17.297 17.297zm32.48 0c0-13.781-4.9219-25.59-14.766-35.434-9.5586-9.5625-21.23-14.344-35.012-14.344-15.184 0-31.777 5.7656-49.773 17.297-18.559 11.531-27.84 22.355-27.84 32.48 0 9.8438 9.2812 20.668 27.84 32.48 17.996 11.531 34.59 17.293 49.773 17.293 13.781 0 25.453-4.918 35.012-14.762 9.8438-9.5625 14.766-21.234 14.766-35.012zm5.0625 0c0 14.902-5.3438 27.699-16.031 38.387-10.684 10.684-23.621 16.027-38.809 16.027-15.746 0-33.18-6.0469-52.305-18.137-20.246-12.656-30.371-24.746-30.371-36.277s10.125-23.762 30.371-36.699c19.125-12.094 36.559-18.137 52.305-18.137 14.625 0 27.562 5.3398 38.809 16.027 10.688 10.969 16.031 23.902 16.031 38.809zm-54.418-29.105c-3.9336 0-10.262 1.6875-18.98 5.0625-7.875 3.9375-11.812 6.4648-11.812 7.5898v32.48c0 3.0938 3.9375 5.625 11.812 7.5938 7.875 3.375 14.203 5.0625 18.98 5.0625 19.406 0 29.391-9.2812 29.953-27.84 0-19.688-9.9844-29.668-29.953-29.949zm34.59 29.105v0.84375c0 21.371-11.527 32.34-34.59 32.902-4.4961 0-11.527-1.8281-21.09-5.4844-7.0312-3.9375-10.969-6.3281-11.809-7.1719-1.6875-1.4062-2.5312-3.0938-2.5312-5.0625v-32.48c0-1.4062 0.70312-2.9492 2.1094-4.6367 3.0898-2.8125 7.168-5.2031 12.23-7.1719 9-3.6562 16.031-5.4844 21.09-5.4844 22.5 0.28125 34.027 11.531 34.59 33.746zm-448.4-206.27h-333.66c-5.0625 0-28.543 1.6875-70.445 5.0625-41.902 3.375-62.852 7.5938-62.852 12.656v11.387c0 4.7812 20.949 8.8594 62.852 12.234 41.902 3.375 65.383 5.0625 70.445 5.0625h333.66c3.6562 1.4062 7.4531 2.1094 11.391 2.1094h64.961c5.3438 0 12.867-2.25 22.566-6.75 9.7031-4.5 14.555-10.547 14.555-18.137 0.28125-16.875-12.094-25.312-37.121-25.312h-64.961c-4.7812 0-8.5781 0.5625-11.391 1.6875z" fill-rule="evenodd"/>
4
+ </svg>
package/README.md ADDED
@@ -0,0 +1,92 @@
1
+ <p align="center">
2
+ <img
3
+ class="project-logo"
4
+ src="./NCC-1701-a-blue.svg#gh-light-mode-only"
5
+ alt="WarpDrive"
6
+ width="120px"
7
+ title="WarpDrive" />
8
+ <img
9
+ class="project-logo"
10
+ src="./NCC-1701-a.svg#gh-dark-mode-only"
11
+ alt="WarpDrive"
12
+ width="120px"
13
+ title="WarpDrive" />
14
+ </p>
15
+
16
+ <h3 align="center">🛸 @warp-drive/core-types</h3>
17
+ <p align="center">Provides core types, type utils and constants for WarpDrive and EmberData</p>
18
+
19
+ ## Installation
20
+
21
+ ```cli
22
+ pnpm install @warp-drive/core-types
23
+ ```
24
+
25
+ **Tagged Releases**
26
+
27
+ - ![NPM Canary Version](https://img.shields.io/npm/v/%40warp-drive/core-types/canary?label=%40canary&color=FFBF00)
28
+ - ![NPM Beta Version](https://img.shields.io/npm/v/%40warp-drive/core-types/beta?label=%40beta&color=ff00ff)
29
+ - ![NPM Stable Version](https://img.shields.io/npm/v/%40warp-drive/core-types/latest?label=%40latest&color=90EE90)
30
+ - ![NPM LTS Version](https://img.shields.io/npm/v/%40warp-drive/core-types/lts?label=%40lts&color=0096FF)
31
+ - ![NPM LTS 4.12 Version](https://img.shields.io/npm/v/%40warp-drive/core-types/lts-4-12?label=%40lts-4-12&color=bbbbbb)
32
+
33
+
34
+ ### ♥️ Credits
35
+
36
+ <details>
37
+ <summary>Brought to you with ♥️ love by <a href="https://emberjs.com" title="EmberJS">🐹 Ember</a></summary>
38
+
39
+ <style type="text/css">
40
+ img.project-logo {
41
+ padding: 0 5em 1em 5em;
42
+ width: 100px;
43
+ border-bottom: 2px solid #0969da;
44
+ margin: 0 auto;
45
+ display: block;
46
+ }
47
+ details > summary {
48
+ font-size: 1.1rem;
49
+ line-height: 1rem;
50
+ margin-bottom: 1rem;
51
+ }
52
+ details {
53
+ font-size: 1rem;
54
+ }
55
+ details > summary strong {
56
+ display: inline-block;
57
+ padding: .2rem 0;
58
+ color: #000;
59
+ border-bottom: 3px solid #0969da;
60
+ }
61
+
62
+ details > details {
63
+ margin-left: 2rem;
64
+ }
65
+ details > details > summary {
66
+ font-size: 1rem;
67
+ line-height: 1rem;
68
+ margin-bottom: 1rem;
69
+ }
70
+ details > details > summary strong {
71
+ display: inline-block;
72
+ padding: .2rem 0;
73
+ color: #555;
74
+ border-bottom: 2px solid #555;
75
+ }
76
+ details > details {
77
+ font-size: .85rem;
78
+ }
79
+
80
+ @media (prefers-color-scheme: dark) {
81
+ details > summary strong {
82
+ color: #fff;
83
+ }
84
+ }
85
+ @media (prefers-color-scheme: dark) {
86
+ details > details > summary strong {
87
+ color: #afaba0;
88
+ border-bottom: 2px solid #afaba0;
89
+ }
90
+ }
91
+ </style>
92
+ </details>
package/addon-main.cjs ADDED
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ const { addonShim } = require('@warp-drive/build-config/addon-shim.cjs');
4
+ module.exports = addonShim(__dirname);
@@ -0,0 +1,79 @@
1
+ import { macroCondition, getGlobalConfig } from '@embroider/macros';
2
+ const name = "@warp-drive/core-types";
3
+ const version = "0.0.0-alpha.101";
4
+
5
+ // in testing mode, we utilize globals to ensure only one copy exists of
6
+ // these maps, due to bugs in ember-auto-import
7
+
8
+ const GlobalRef = globalThis;
9
+ const UniversalCache = GlobalRef.__warpDrive_universalCache = GlobalRef.__warpDrive_universalCache ?? {};
10
+
11
+ // in order to support mirror packages, we ensure that each
12
+ // unique package name has its own global cache
13
+ GlobalRef[name] = GlobalRef[name] ?? {
14
+ __version: version
15
+ };
16
+ const GlobalSink = GlobalRef[name];
17
+ if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {
18
+ if (GlobalSink.__version !== version) {
19
+ throw new Error('Multiple versions of WarpDrive detected, the application will malfunction.');
20
+ }
21
+ }
22
+ const ModuleScopedCaches = GlobalSink.__warpDrive_ModuleScopedCaches ?? {};
23
+ if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {
24
+ if (!GlobalSink.__warpDrive_ModuleScopedCaches) {
25
+ GlobalSink.__warpDrive_ModuleScopedCaches = ModuleScopedCaches;
26
+ } else {
27
+ // eslint-disable-next-line no-console
28
+ console.warn(`
29
+ Multiple copies of EmberData have been detected. This may be due to a bug in ember-auto-import
30
+ in which test assets get their own copy of some v2-addons. This can cause the application to
31
+ malfunction as each copy will maintain its own separate state.`);
32
+ }
33
+ } else {
34
+ if (GlobalSink.__warpDrive_hasOtherCopy) {
35
+ throw new Error('Multiple copies of EmberData detected, the application will malfunction.');
36
+ }
37
+ GlobalSink.__warpDrive_hasOtherCopy = true;
38
+ }
39
+ function getOrSetGlobal(key, value) {
40
+ if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {
41
+ const existing = ModuleScopedCaches[key];
42
+ if (existing === undefined) {
43
+ return ModuleScopedCaches[key] = value;
44
+ } else {
45
+ return existing;
46
+ }
47
+ } else {
48
+ return value;
49
+ }
50
+ }
51
+ function peekTransient(key) {
52
+ const globalKey = `(transient) ${key}`;
53
+ return ModuleScopedCaches[globalKey] ?? null;
54
+ }
55
+ function setTransient(key, value) {
56
+ const globalKey = `(transient) ${key}`;
57
+ return ModuleScopedCaches[globalKey] = value;
58
+ }
59
+ function getOrSetUniversal(key, value) {
60
+ if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {
61
+ const existing = UniversalCache[key];
62
+ if (existing === undefined) {
63
+ return UniversalCache[key] = value;
64
+ } else {
65
+ return existing;
66
+ }
67
+ } else {
68
+ return value;
69
+ }
70
+ }
71
+ function peekUniversalTransient(key) {
72
+ const globalKey = `(transient) ${key}`;
73
+ return UniversalCache[globalKey] ?? null;
74
+ }
75
+ function setUniversalTransient(key, value) {
76
+ const globalKey = `(transient) ${key}`;
77
+ return UniversalCache[globalKey] = value;
78
+ }
79
+ export { getOrSetGlobal, getOrSetUniversal, peekTransient, peekUniversalTransient, setTransient, setUniversalTransient };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"-private.js","sources":["../src/-private.ts"],"sourcesContent":["// in testing mode, we utilize globals to ensure only one copy exists of\n// these maps, due to bugs in ember-auto-import\nimport { DEBUG, TESTING } from '@warp-drive/build-config/env';\n\nimport { name, version } from '../package.json';\n\ntype UniversalTransientKey =\n // @ember-data/request\n 'REQ_ID';\n\ntype UniversalKey =\n | `(transient) ${UniversalTransientKey}`\n // @ember-data/request\n | 'RequestMap'\n | 'PromiseCache'\n | 'RequestCache'\n // @warp-drive/core-types/request\n | 'SkipCache'\n | 'EnableHydration';\n\ntype TransientKey =\n // @ember-data/tracking\n | 'TRANSACTION'\n // @ember-data/graph\n | 'transactionRef'\n // @ember-data/store\n | 'configuredGenerationMethod'\n | 'configuredUpdateMethod'\n | 'configuredForgetMethod'\n | 'configuredResetMethod'\n | 'configuredKeyInfoMethod';\n\ntype GlobalKey =\n | `(transient) ${TransientKey}`\n // @ember-data/adapter\n | 'AdapterError'\n | 'InvalidError'\n | 'TimeoutError'\n | 'AbortError'\n | 'UnauthorizedError'\n | 'ForbiddenError'\n | 'NotFoundError'\n | 'ConflictError'\n | 'ServerError'\n // @ember-data/tracking\n | 'Signals'\n // @ember-data/store LegacySupport\n | 'AvailableShims'\n // @ember-data/store RecordArrayManager\n | 'FAKE_ARR'\n // @ember-data/store IdentifierArray\n | '#signal'\n | '#source'\n | '#update'\n | '#notify'\n | 'IS_COLLECTION'\n // @ember-data/store RequestCache\n | 'Touching'\n | 'RequestPromise'\n // @ember-data/legacy-compat FetchManager\n | 'SaveOp'\n // @ember-data/model\n | 'LEGACY_SUPPORT'\n | 'LegacySupport'\n // @ember-data/graph\n | 'Graphs'\n // @ember-data/request\n | 'IS_FROZEN'\n | 'IS_CACHE_HANDLER'\n // @ember-data/store IdentityCache\n | 'DEBUG_MAP'\n | 'IDENTIFIERS'\n | 'DOCUMENTS'\n // @ember-data/store InstanceCache\n | 'CacheForIdentifierCache'\n | 'RecordCache'\n | 'StoreMap'\n // @warp-drive/core-types/symbols\n | 'Store'\n | '$type'\n | 'TransformName'\n | 'RequestSignature'\n // @warp-drive/core-types/request\n | 'IS_FUTURE'\n | 'DOC'\n // @warp-drive/schema-record\n | 'ManagedArrayMap'\n | 'ManagedObjectMap'\n | 'Support'\n | 'SOURCE'\n | 'MUTATE'\n | 'ARRAY_SIGNAL'\n | 'OBJECT_SIGNAL'\n | 'NOTIFY'\n | 'Destroy'\n | 'Identifier'\n | 'Editable'\n | 'EmbeddedPath'\n | 'EmbeddedType'\n | 'Parent'\n | 'Checkout'\n | 'Legacy';\n\ntype ModuleScopedCaches = Record<GlobalKey, unknown>;\n\nconst GlobalRef = globalThis as unknown as Record<\n string,\n {\n __warpDrive_ModuleScopedCaches?: ModuleScopedCaches;\n __warpDrive_hasOtherCopy?: boolean;\n __version: string;\n }\n> & {\n __warpDrive_universalCache: Record<UniversalKey, unknown>;\n};\nconst UniversalCache = (GlobalRef.__warpDrive_universalCache =\n GlobalRef.__warpDrive_universalCache ?? ({} as Record<UniversalKey, unknown>));\n\n// in order to support mirror packages, we ensure that each\n// unique package name has its own global cache\nGlobalRef[name] = GlobalRef[name] ?? { __version: version };\nconst GlobalSink = GlobalRef[name];\n\nif (DEBUG) {\n if (GlobalSink.__version !== version) {\n throw new Error('Multiple versions of WarpDrive detected, the application will malfunction.');\n }\n}\n\nconst ModuleScopedCaches = GlobalSink.__warpDrive_ModuleScopedCaches ?? ({} as ModuleScopedCaches);\nif (TESTING) {\n if (!GlobalSink.__warpDrive_ModuleScopedCaches) {\n GlobalSink.__warpDrive_ModuleScopedCaches = ModuleScopedCaches;\n } else {\n // eslint-disable-next-line no-console\n console.warn(`\nMultiple copies of EmberData have been detected. This may be due to a bug in ember-auto-import\n in which test assets get their own copy of some v2-addons. This can cause the application to\n malfunction as each copy will maintain its own separate state.`);\n }\n} else {\n if (GlobalSink.__warpDrive_hasOtherCopy) {\n throw new Error('Multiple copies of EmberData detected, the application will malfunction.');\n }\n GlobalSink.__warpDrive_hasOtherCopy = true;\n}\n\ntype UniqueSymbol<T extends string> = `___(unique) Symbol(${T})`;\ntype UniqueSymbolOr<T, K extends string> = T extends symbol ? UniqueSymbol<K> : T;\n\nexport function getOrSetGlobal<T, K extends GlobalKey>(key: K, value: T): UniqueSymbolOr<T, K> {\n if (TESTING) {\n const existing = ModuleScopedCaches[key];\n if (existing === undefined) {\n return (ModuleScopedCaches[key] = value) as UniqueSymbolOr<T, K>;\n } else {\n return existing as UniqueSymbolOr<T, K>;\n }\n } else {\n return value as UniqueSymbolOr<T, K>;\n }\n}\n\nexport function peekTransient<T>(key: TransientKey): T | null {\n const globalKey: `(transient) ${TransientKey}` = `(transient) ${key}`;\n return (ModuleScopedCaches[globalKey] as T) ?? null;\n}\n\nexport function setTransient<T>(key: TransientKey, value: T): T {\n const globalKey: `(transient) ${TransientKey}` = `(transient) ${key}`;\n return (ModuleScopedCaches[globalKey] = value);\n}\n\nexport function getOrSetUniversal<T, K extends UniversalKey>(key: K, value: T): UniqueSymbolOr<T, K> {\n if (TESTING) {\n const existing = UniversalCache[key];\n if (existing === undefined) {\n return (UniversalCache[key] = value) as UniqueSymbolOr<T, K>;\n } else {\n return existing as UniqueSymbolOr<T, K>;\n }\n } else {\n return value as UniqueSymbolOr<T, K>;\n }\n}\n\nexport function peekUniversalTransient<T>(key: UniversalTransientKey): T | null {\n const globalKey: `(transient) ${UniversalTransientKey}` = `(transient) ${key}`;\n return (UniversalCache[globalKey] as T) ?? null;\n}\n\nexport function setUniversalTransient<T>(key: UniversalTransientKey, value: T): T {\n const globalKey: `(transient) ${UniversalTransientKey}` = `(transient) ${key}`;\n return (UniversalCache[globalKey] = value);\n}\n"],"names":["GlobalRef","globalThis","UniversalCache","__warpDrive_universalCache","name","__version","version","GlobalSink","macroCondition","getGlobalConfig","WarpDrive","env","DEBUG","Error","ModuleScopedCaches","__warpDrive_ModuleScopedCaches","TESTING","console","warn","__warpDrive_hasOtherCopy","getOrSetGlobal","key","value","existing","undefined","peekTransient","globalKey","setTransient","getOrSetUniversal","peekUniversalTransient","setUniversalTransient"],"mappings":";;;;;AAAA;AACA;;AAwGA,MAAMA,SAAS,GAAGC,UASjB,CAAA;AACD,MAAMC,cAAc,GAAIF,SAAS,CAACG,0BAA0B,GAC1DH,SAAS,CAACG,0BAA0B,IAAK,EAAqC,CAAA;;AAEhF;AACA;AACAH,SAAS,CAACI,IAAI,CAAC,GAAGJ,SAAS,CAACI,IAAI,CAAC,IAAI;AAAEC,EAAAA,SAAS,EAAEC,OAAAA;AAAQ,CAAC,CAAA;AAC3D,MAAMC,UAAU,GAAGP,SAAS,CAACI,IAAI,CAAC,CAAA;AAElC,IAAAI,cAAA,CAAAC,eAAA,EAAA,CAAAC,SAAA,CAAAC,GAAA,CAAAC,KAAA,CAAW,EAAA;AACT,EAAA,IAAIL,UAAU,CAACF,SAAS,KAAKC,OAAO,EAAE;AACpC,IAAA,MAAM,IAAIO,KAAK,CAAC,4EAA4E,CAAC,CAAA;AAC/F,GAAA;AACF,CAAA;AAEA,MAAMC,kBAAkB,GAAGP,UAAU,CAACQ,8BAA8B,IAAK,EAAyB,CAAA;AAClG,IAAAP,cAAA,CAAAC,eAAA,EAAA,CAAAC,SAAA,CAAAC,GAAA,CAAAK,OAAA,CAAa,EAAA;AACX,EAAA,IAAI,CAACT,UAAU,CAACQ,8BAA8B,EAAE;IAC9CR,UAAU,CAACQ,8BAA8B,GAAGD,kBAAkB,CAAA;AAChE,GAAC,MAAM;AACL;IACAG,OAAO,CAACC,IAAI,CAAE,CAAA;AAClB;AACA;AACA,gEAAA,CAAiE,CAAC,CAAA;AAChE,GAAA;AACF,CAAC,MAAM;EACL,IAAIX,UAAU,CAACY,wBAAwB,EAAE;AACvC,IAAA,MAAM,IAAIN,KAAK,CAAC,0EAA0E,CAAC,CAAA;AAC7F,GAAA;EACAN,UAAU,CAACY,wBAAwB,GAAG,IAAI,CAAA;AAC5C,CAAA;AAKO,SAASC,cAAcA,CAAyBC,GAAM,EAAEC,KAAQ,EAAwB;EAC7F,IAAAd,cAAA,CAAAC,eAAA,EAAA,CAAAC,SAAA,CAAAC,GAAA,CAAAK,OAAA,CAAa,EAAA;AACX,IAAA,MAAMO,QAAQ,GAAGT,kBAAkB,CAACO,GAAG,CAAC,CAAA;IACxC,IAAIE,QAAQ,KAAKC,SAAS,EAAE;AAC1B,MAAA,OAAQV,kBAAkB,CAACO,GAAG,CAAC,GAAGC,KAAK,CAAA;AACzC,KAAC,MAAM;AACL,MAAA,OAAOC,QAAQ,CAAA;AACjB,KAAA;AACF,GAAC,MAAM;AACL,IAAA,OAAOD,KAAK,CAAA;AACd,GAAA;AACF,CAAA;AAEO,SAASG,aAAaA,CAAIJ,GAAiB,EAAY;AAC5D,EAAA,MAAMK,SAAwC,GAAI,CAAcL,YAAAA,EAAAA,GAAI,CAAC,CAAA,CAAA;AACrE,EAAA,OAAQP,kBAAkB,CAACY,SAAS,CAAC,IAAU,IAAI,CAAA;AACrD,CAAA;AAEO,SAASC,YAAYA,CAAIN,GAAiB,EAAEC,KAAQ,EAAK;AAC9D,EAAA,MAAMI,SAAwC,GAAI,CAAcL,YAAAA,EAAAA,GAAI,CAAC,CAAA,CAAA;AACrE,EAAA,OAAQP,kBAAkB,CAACY,SAAS,CAAC,GAAGJ,KAAK,CAAA;AAC/C,CAAA;AAEO,SAASM,iBAAiBA,CAA4BP,GAAM,EAAEC,KAAQ,EAAwB;EACnG,IAAAd,cAAA,CAAAC,eAAA,EAAA,CAAAC,SAAA,CAAAC,GAAA,CAAAK,OAAA,CAAa,EAAA;AACX,IAAA,MAAMO,QAAQ,GAAGrB,cAAc,CAACmB,GAAG,CAAC,CAAA;IACpC,IAAIE,QAAQ,KAAKC,SAAS,EAAE;AAC1B,MAAA,OAAQtB,cAAc,CAACmB,GAAG,CAAC,GAAGC,KAAK,CAAA;AACrC,KAAC,MAAM;AACL,MAAA,OAAOC,QAAQ,CAAA;AACjB,KAAA;AACF,GAAC,MAAM;AACL,IAAA,OAAOD,KAAK,CAAA;AACd,GAAA;AACF,CAAA;AAEO,SAASO,sBAAsBA,CAAIR,GAA0B,EAAY;AAC9E,EAAA,MAAMK,SAAiD,GAAI,CAAcL,YAAAA,EAAAA,GAAI,CAAC,CAAA,CAAA;AAC9E,EAAA,OAAQnB,cAAc,CAACwB,SAAS,CAAC,IAAU,IAAI,CAAA;AACjD,CAAA;AAEO,SAASI,qBAAqBA,CAAIT,GAA0B,EAAEC,KAAQ,EAAK;AAChF,EAAA,MAAMI,SAAiD,GAAI,CAAcL,YAAAA,EAAAA,GAAI,CAAC,CAAA,CAAA;AAC9E,EAAA,OAAQnB,cAAc,CAACwB,SAAS,CAAC,GAAGJ,KAAK,CAAA;AAC3C;;;;"}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aliases.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutations.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relationship.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/cache.js ADDED
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/graph.js ADDED
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,85 @@
1
+ /**
2
+ @module @ember-data/store
3
+ */
4
+
5
+ // provided for additional debuggability
6
+ const DEBUG_CLIENT_ORIGINATED = Symbol('record-originated-on-client');
7
+ const DEBUG_IDENTIFIER_BUCKET = Symbol('identifier-bucket');
8
+ const DEBUG_STALE_CACHE_OWNER = Symbol('warpDriveStaleCache');
9
+
10
+ // also present in production
11
+ const CACHE_OWNER = Symbol('warpDriveCache');
12
+
13
+ /**
14
+ * An Identifier specific to a record which may or may not
15
+ * be present in the cache.
16
+ *
17
+ * The absence of an `id` DOES NOT indicate that this
18
+ * Identifier is for a new client-created record as it
19
+ * may also indicate that it was generated for a secondary
20
+ * index and the primary `id` index is not yet known.
21
+ *
22
+ * @internal
23
+ */
24
+
25
+ /**
26
+ * Used when an Identifier is known to be the stable version
27
+ *
28
+ * @internal
29
+ */
30
+
31
+ /**
32
+ * Used when a StableRecordIdentifier was not created locally as part
33
+ * of a call to store.createRecord
34
+ *
35
+ * Distinguishing between this Identifier and one for a client created
36
+ * record that was created with an ID is generally speaking not possible
37
+ * at runtime, so anything with an ID typically narrows to this.
38
+ *
39
+ * @internal
40
+ */
41
+
42
+ /**
43
+ * Used when a StableRecordIdentifier was created locally
44
+ * (by a call to store.createRecord).
45
+ *
46
+ * It is possible in rare circumstances to have a StableRecordIdentifier
47
+ * that is not for a new record but does not have an ID. This would
48
+ * happen if a user intentionally created one for use with a secondary-index
49
+ * prior to the record having been fully loaded.
50
+ *
51
+ * @internal
52
+ */
53
+
54
+ /**
55
+ * A referentially stable object with a unique string (lid) that can be used
56
+ * as a reference to data in the cache.
57
+ *
58
+ * Every record instance has a unique identifier, and identifiers may refer
59
+ * to data that has never been loaded (for instance, in an async relationship).
60
+ *
61
+ * @class StableRecordIdentifier
62
+ * @public
63
+ */
64
+
65
+ /**
66
+ * A string representing a unique identity.
67
+ *
68
+ * @property {string} lid
69
+ * @public
70
+ */
71
+ /**
72
+ * the primary resource `type` or `modelName` this identity belongs to.
73
+ *
74
+ * @property {string} type
75
+ * @public
76
+ */
77
+ /**
78
+ * the primary id for the record this identity belongs to. `null`
79
+ * if not yet assigned an id.
80
+ *
81
+ * @property {string | null} id
82
+ * @public
83
+ */
84
+
85
+ export { CACHE_OWNER, DEBUG_CLIENT_ORIGINATED, DEBUG_IDENTIFIER_BUCKET, DEBUG_STALE_CACHE_OWNER };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identifier.js","sources":["../src/identifier.ts"],"sourcesContent":["/**\n @module @ember-data/store\n*/\n\n// provided for additional debuggability\nexport const DEBUG_CLIENT_ORIGINATED: unique symbol = Symbol('record-originated-on-client');\nexport const DEBUG_IDENTIFIER_BUCKET: unique symbol = Symbol('identifier-bucket');\nexport const DEBUG_STALE_CACHE_OWNER: unique symbol = Symbol('warpDriveStaleCache');\n\n// also present in production\nexport const CACHE_OWNER: unique symbol = Symbol('warpDriveCache');\n\nexport type IdentifierBucket = 'record' | 'document';\n\nexport interface Identifier {\n lid: string;\n clientId?: string;\n}\n\nexport interface ExistingRecordIdentifier<T extends string = string> extends Identifier {\n id: string;\n type: T;\n}\n\nexport interface NewRecordIdentifier<T extends string = string> extends Identifier {\n id: string | null;\n type: T;\n}\n\nexport type StableDocumentIdentifier = {\n lid: string;\n};\n\n/**\n * An Identifier specific to a record which may or may not\n * be present in the cache.\n *\n * The absence of an `id` DOES NOT indicate that this\n * Identifier is for a new client-created record as it\n * may also indicate that it was generated for a secondary\n * index and the primary `id` index is not yet known.\n *\n * @internal\n */\nexport type RecordIdentifier<T extends string = string> = ExistingRecordIdentifier<T> | NewRecordIdentifier<T>;\n\n/**\n * Used when an Identifier is known to be the stable version\n *\n * @internal\n */\nexport interface StableIdentifier extends Identifier {\n [DEBUG_IDENTIFIER_BUCKET]?: string;\n}\n\n/**\n * Used when a StableRecordIdentifier was not created locally as part\n * of a call to store.createRecord\n *\n * Distinguishing between this Identifier and one for a client created\n * record that was created with an ID is generally speaking not possible\n * at runtime, so anything with an ID typically narrows to this.\n *\n * @internal\n */\nexport interface StableExistingRecordIdentifier<T extends string = string> extends StableIdentifier {\n id: string;\n type: T;\n [DEBUG_CLIENT_ORIGINATED]?: boolean;\n [CACHE_OWNER]: number | undefined;\n [DEBUG_STALE_CACHE_OWNER]?: number | undefined;\n}\n\n/**\n * Used when a StableRecordIdentifier was created locally\n * (by a call to store.createRecord).\n *\n * It is possible in rare circumstances to have a StableRecordIdentifier\n * that is not for a new record but does not have an ID. This would\n * happen if a user intentionally created one for use with a secondary-index\n * prior to the record having been fully loaded.\n *\n * @internal\n */\nexport interface StableNewRecordIdentifier<T extends string = string> extends StableIdentifier {\n id: string | null;\n type: T;\n [DEBUG_CLIENT_ORIGINATED]?: boolean;\n [CACHE_OWNER]: number | undefined;\n [DEBUG_STALE_CACHE_OWNER]?: number | undefined;\n}\n\n/**\n * A referentially stable object with a unique string (lid) that can be used\n * as a reference to data in the cache.\n *\n * Every record instance has a unique identifier, and identifiers may refer\n * to data that has never been loaded (for instance, in an async relationship).\n *\n * @class StableRecordIdentifier\n * @public\n */\n\n/**\n * A string representing a unique identity.\n *\n * @property {string} lid\n * @public\n */\n/**\n * the primary resource `type` or `modelName` this identity belongs to.\n *\n * @property {string} type\n * @public\n */\n/**\n * the primary id for the record this identity belongs to. `null`\n * if not yet assigned an id.\n *\n * @property {string | null} id\n * @public\n */\nexport type StableRecordIdentifier<T extends string = string> =\n | StableExistingRecordIdentifier<T>\n | StableNewRecordIdentifier<T>;\n"],"names":["DEBUG_CLIENT_ORIGINATED","Symbol","DEBUG_IDENTIFIER_BUCKET","DEBUG_STALE_CACHE_OWNER","CACHE_OWNER"],"mappings":"AAAA;AACA;AACA;;AAEA;MACaA,uBAAsC,GAAGC,MAAM,CAAC,6BAA6B,EAAC;MAC9EC,uBAAsC,GAAGD,MAAM,CAAC,mBAAmB,EAAC;MACpEE,uBAAsC,GAAGF,MAAM,CAAC,qBAAqB,EAAC;;AAEnF;MACaG,WAA0B,GAAGH,MAAM,CAAC,gBAAgB,EAAC;;AAuBlE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
package/dist/index.js ADDED
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"raw.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/params.js ADDED
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"params.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/record.js ADDED
@@ -0,0 +1,74 @@
1
+ /*
2
+ * @module @warp-drive/core-types
3
+ */
4
+
5
+ /**
6
+ * Records may be anything, They don't even
7
+ * have to be objects.
8
+ *
9
+ * Whatever they are, if they have a Type
10
+ * property, that property will be used by EmberData
11
+ * and WarpDrive to provide better type safety and
12
+ * intellisense.
13
+ *
14
+ * @class TypedRecordInstance
15
+ * @typedoc
16
+ */
17
+
18
+ /**
19
+ * A type utility that extracts the Type if available,
20
+ * otherwise it returns never.
21
+ *
22
+ * @typedoc
23
+ */
24
+
25
+ /**
26
+ * A type utility that extracts the Type if available,
27
+ * otherwise it returns string
28
+ *
29
+ * @typedoc
30
+ */
31
+
32
+ /**
33
+ * A Utility that extracts either resource types or resource paths from a TypedRecordInstance.
34
+ *
35
+ * Its limitations are mostly around its intentional non-recursiveness. It presumes that APIs which
36
+ * implement includes will not allow cyclical include paths, and will collapse includes by type.
37
+ *
38
+ * This follows closer to the JSON:API fields spec than to the includes spec in nature, but in
39
+ * practice it is so impracticle for an API to allow z-algo include paths that this is probably
40
+ * reasonable.
41
+ *
42
+ * We may need to revisit this in the future, opting to either make this restriction optional or
43
+ * to allow for other strategies.
44
+ *
45
+ * There's a 90% chance this particular implementation belongs being in the JSON:API package instead
46
+ * of core-types, but it's here for now.
47
+ *
48
+ * @typedoc
49
+ */
50
+
51
+ /**
52
+ * A utility that provides the union of all ResourceName for all potential
53
+ * includes for the given TypedRecordInstance.
54
+ *
55
+ * @typedoc
56
+ */
57
+
58
+ // ToPaths<ExpandIgnore<T, true>, false>;
59
+
60
+ /**
61
+ * A utility that provides the union type of all valid include paths for the given
62
+ * TypedRecordInstance.
63
+ *
64
+ * Cyclical paths are filtered out.
65
+ *
66
+ * @typedoc
67
+ */
68
+
69
+ function createIncludeValidator() {
70
+ return function validateIncludes(includes) {
71
+ return includes;
72
+ };
73
+ }
74
+ export { createIncludeValidator };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"record.js","sources":["../src/record.ts"],"sourcesContent":["/*\n * @module @warp-drive/core-types\n */\nimport type { Type } from './symbols';\n\n/**\n * Records may be anything, They don't even\n * have to be objects.\n *\n * Whatever they are, if they have a Type\n * property, that property will be used by EmberData\n * and WarpDrive to provide better type safety and\n * intellisense.\n *\n * @class TypedRecordInstance\n * @typedoc\n */\nexport interface TypedRecordInstance {\n /**\n * The type of the resource.\n *\n * This is an optional feature that can be used by\n * record implementations to provide a typescript\n * hint for the type of the resource.\n *\n * When used, EmberData and WarpDrive APIs can\n * take advantage of this to provide better type\n * safety and intellisense.\n *\n * @property {Type} [Type]\n * @type {string}\n * @typedoc\n */\n [Type]: string;\n}\n\n/**\n * A type utility that extracts the Type if available,\n * otherwise it returns never.\n *\n * @typedoc\n */\nexport type TypeFromInstance<T> = T extends TypedRecordInstance ? T[typeof Type] : never;\n\n/**\n * A type utility that extracts the Type if available,\n * otherwise it returns string\n *\n * @typedoc\n */\nexport type TypeFromInstanceOrString<T> = T extends TypedRecordInstance ? T[typeof Type] : string;\n\ntype IsUniqueSymbol<T> = T extends `___(unique) Symbol(${string})` ? true : false;\ntype Unpacked<T> = T extends (infer U)[] ? U : T;\ntype NONE = { __NONE: never };\n\ntype __InternalExtract<\n MAX_DEPTH extends _DEPTHCOUNT,\n T extends TypedRecordInstance,\n V extends TypedRecordInstance,\n IncludePrefix extends boolean,\n Ignore,\n Pre extends string,\n DEPTH extends _DEPTHCOUNT,\n> =\n // if we extend T, we return the leaf value\n V extends T\n ? IncludePrefix extends false\n ? V[typeof Type]\n : Pre\n : // else if we are in Ignore we add the lead and exit\n V extends Ignore\n ? IncludePrefix extends false\n ? V[typeof Type]\n : Pre\n : // else if we are at max depth, we return never\n IS_MAX_DEPTH<DEPTH, MAX_DEPTH> extends true\n ? Pre\n : // else add T to Ignore and recurse\n ExtractUnion<MAX_DEPTH, V, IncludePrefix, Ignore | T, Pre, INC_DEPTH<DEPTH>>;\n\ntype __ExtractIfRecord<\n MAX_DEPTH extends _DEPTHCOUNT,\n T extends TypedRecordInstance,\n V,\n IncludePrefix extends boolean,\n Ignore,\n Pre extends string,\n DEPTH extends _DEPTHCOUNT,\n> = V extends TypedRecordInstance ? __InternalExtract<MAX_DEPTH, T, V, IncludePrefix, Ignore, Pre, DEPTH> : never;\n\ntype _ExtractUnion<\n MAX_DEPTH extends _DEPTHCOUNT,\n T extends TypedRecordInstance,\n IncludePrefix extends boolean,\n Ignore,\n Pre,\n DEPTH extends _DEPTHCOUNT,\n> = {\n // for each string key in the record,\n [K in keyof T]: IsUniqueSymbol<K> extends true\n ? never\n : K extends string\n ? // we recursively extract any values that resolve to a TypedRecordInstance\n __ExtractIfRecord<\n MAX_DEPTH,\n T,\n Unpacked<Awaited<T[K]>>,\n IncludePrefix,\n Ignore,\n Pre extends string ? `${Pre}.${K}` : K,\n DEPTH\n >\n : never;\n // then we return any value that is not 'never'\n}[keyof T];\n\n/**\n * A Utility that extracts either resource types or resource paths from a TypedRecordInstance.\n *\n * Its limitations are mostly around its intentional non-recursiveness. It presumes that APIs which\n * implement includes will not allow cyclical include paths, and will collapse includes by type.\n *\n * This follows closer to the JSON:API fields spec than to the includes spec in nature, but in\n * practice it is so impracticle for an API to allow z-algo include paths that this is probably\n * reasonable.\n *\n * We may need to revisit this in the future, opting to either make this restriction optional or\n * to allow for other strategies.\n *\n * There's a 90% chance this particular implementation belongs being in the JSON:API package instead\n * of core-types, but it's here for now.\n *\n * @typedoc\n */\ntype ExtractUnion<\n MAX_DEPTH extends _DEPTHCOUNT,\n T extends TypedRecordInstance,\n IncludePrefix extends boolean = false,\n Ignore = NONE,\n Pre = NONE,\n DEPTH extends _DEPTHCOUNT = 1,\n> = Exclude<\n IncludePrefix extends true\n ? // if we want to include prefix, we union with the prefix. Outer Exclude will filter any \"NONE\" types\n _ExtractUnion<MAX_DEPTH, T, IncludePrefix, Ignore, Pre, DEPTH> | Pre\n : // Else we just union the types.\n _ExtractUnion<MAX_DEPTH, T, IncludePrefix, Ignore, Pre, DEPTH> | T[typeof Type],\n NONE\n>;\n\ntype _DEPTHCOUNT = 1 | 2 | 3 | 4 | 5;\ntype INC_DEPTH<START extends _DEPTHCOUNT> = START extends 1 ? 2 : START extends 2 ? 3 : START extends 3 ? 4 : 5;\ntype IS_MAX_DEPTH<\n DEPTH extends _DEPTHCOUNT,\n MAX_DEPTH extends _DEPTHCOUNT = DEFAULT_MAX_DEPTH,\n> = DEPTH extends MAX_DEPTH ? true : false;\ntype DEFAULT_MAX_DEPTH = 3;\n/**\n * A utility that provides the union of all ResourceName for all potential\n * includes for the given TypedRecordInstance.\n *\n * @typedoc\n */\nexport type ExtractSuggestedCacheTypes<\n T extends TypedRecordInstance,\n MAX_DEPTH extends _DEPTHCOUNT = DEFAULT_MAX_DEPTH,\n> = ExtractUnion<MAX_DEPTH, T>; // ToPaths<ExpandIgnore<T, true>, false>;\n\n/**\n * A utility that provides the union type of all valid include paths for the given\n * TypedRecordInstance.\n *\n * Cyclical paths are filtered out.\n *\n * @typedoc\n */\nexport type Includes<T extends TypedRecordInstance, MAX_DEPTH extends _DEPTHCOUNT = DEFAULT_MAX_DEPTH> = ExtractUnion<\n MAX_DEPTH,\n T,\n true\n>;\n\nexport type OpaqueRecordInstance = unknown;\n\nexport type _StringSatisfiesIncludes<T extends string, SET extends string, FT extends string> = T extends SET\n ? FT\n : T extends `${infer U},${infer V}`\n ? U extends SET\n ? _StringSatisfiesIncludes<V, Exclude<SET, U>, FT>\n : never\n : never;\n\nexport type StringSatisfiesIncludes<T extends string, SET extends string> = _StringSatisfiesIncludes<T, SET, T>;\n\nexport function createIncludeValidator<T extends TypedRecordInstance>() {\n return function validateIncludes<U extends string>(includes: StringSatisfiesIncludes<U, Includes<T>>): U {\n return includes;\n };\n}\n"],"names":["createIncludeValidator","validateIncludes","includes"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoBA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAoEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwBA;AACA;AACA;AACA;AACA;AACA;;AAIgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmBO,SAASA,sBAAsBA,GAAkC;AACtE,EAAA,OAAO,SAASC,gBAAgBA,CAAmBC,QAAiD,EAAK;AACvG,IAAA,OAAOA,QAAQ,CAAA;GAChB,CAAA;AACH;;;;"}
@@ -0,0 +1,34 @@
1
+ import { getOrSetUniversal, getOrSetGlobal } from "./-private.js";
2
+ const SkipCache = getOrSetUniversal('SkipCache', Symbol.for('wd:skip-cache'));
3
+ const EnableHydration = getOrSetUniversal('EnableHydration', Symbol.for('wd:enable-hydration'));
4
+ const IS_FUTURE = getOrSetGlobal('IS_FUTURE', Symbol('IS_FUTURE'));
5
+ const STRUCTURED = getOrSetGlobal('DOC', Symbol('DOC'));
6
+
7
+ /**
8
+ * Use these options to adjust CacheHandler behavior for a request.
9
+ *
10
+ * @typedoc
11
+ */
12
+
13
+ /**
14
+ * JavaScript's native Request class.
15
+ *
16
+ * EmberData provides our own typings due to incompleteness in the native typings.
17
+ *
18
+ * @typedoc
19
+ */
20
+
21
+ /**
22
+ * Extends JavaScript's native {@link Request} object with additional
23
+ * properties specific to the RequestManager's capabilities.
24
+ *
25
+ * @typedoc
26
+ */
27
+
28
+ /**
29
+ * Immutable version of {@link RequestInfo}. This is what is passed to handlers.
30
+ *
31
+ * @typedoc
32
+ */
33
+
34
+ export { EnableHydration, IS_FUTURE, STRUCTURED, SkipCache };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sources":["../src/request.ts"],"sourcesContent":["import { getOrSetGlobal, getOrSetUniversal } from './-private';\nimport type { StableRecordIdentifier } from './identifier';\nimport type { QueryParamsSerializationOptions } from './params';\nimport type { ExtractSuggestedCacheTypes, Includes, TypedRecordInstance, TypeFromInstanceOrString } from './record';\nimport type { ResourceIdentifierObject } from './spec/json-api-raw';\nimport type { RequestSignature } from './symbols';\n\ntype Store = unknown;\n\nexport const SkipCache = getOrSetUniversal('SkipCache', Symbol.for('wd:skip-cache'));\nexport const EnableHydration = getOrSetUniversal('EnableHydration', Symbol.for('wd:enable-hydration'));\nexport const IS_FUTURE = getOrSetGlobal('IS_FUTURE', Symbol('IS_FUTURE'));\nexport const STRUCTURED = getOrSetGlobal('DOC', Symbol('DOC'));\n\nexport type HTTPMethod = 'GET' | 'OPTIONS' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD';\n\n/**\n * Use these options to adjust CacheHandler behavior for a request.\n *\n * @typedoc\n */\nexport type CacheOptions<T = unknown> = {\n /**\n * A key that uniquely identifies this request. If not present, the url wil be used\n * as the key for any GET request, while all other requests will not be cached.\n *\n * @typedoc\n */\n key?: string;\n /**\n * If true, the request will be made even if a cached response is present\n * and not expired.\n *\n * @typedoc\n */\n reload?: boolean;\n /**\n * If true, and a cached response is present and not expired, the request\n * will be made in the background and the cached response will be returned.\n *\n * @typedoc\n */\n backgroundReload?: boolean;\n /**\n * Useful for metadata around when to invalidate the cache. Typically used\n * by strategies that invalidate requests by resource type when a new resource\n * of that type has been created. See the CachePolicy implementation\n * provided by `@ember-data/request-utils` for an example.\n *\n * It is recommended to only use this for query/queryRecord requests where\n * new records created later would affect the results, though using it for\n * findRecord requests is also supported if desired where it may be useful\n * when a create may affect the result of a sideloaded relationship.\n *\n * Generally it is better to patch the cache directly for relationship updates\n * than to invalidate findRecord requests for one.\n *\n * @typedoc\n */\n types?: T extends TypedRecordInstance ? ExtractSuggestedCacheTypes<T>[] : string[];\n\n /**\n * If true, the request will never be handled by the cache-manager and thus\n * will never resolve from cache nor update the cache.\n *\n * Generally this is only used for legacy request that manage resource cache\n * updates in a non-standard way via the LegacyNetworkHandler.\n *\n * @typedoc\n */\n [SkipCache]?: boolean;\n};\nexport type FindRecordRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'GET';\n headers: Headers;\n cacheOptions?: CacheOptions<T>;\n op: 'findRecord';\n records: [ResourceIdentifierObject<TypeFromInstanceOrString<T>>];\n [RequestSignature]?: RT;\n};\n\nexport type QueryRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'GET';\n headers: Headers;\n cacheOptions?: CacheOptions<T>;\n op: 'query';\n [RequestSignature]?: RT;\n};\n\nexport type PostQueryRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'POST' | 'QUERY';\n headers: Headers;\n body: string;\n cacheOptions: CacheOptions<T> & { key: string };\n op: 'query';\n [RequestSignature]?: RT;\n};\n\nexport type DeleteRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'DELETE';\n headers: Headers;\n op: 'deleteRecord';\n data: {\n record: StableRecordIdentifier<TypeFromInstanceOrString<T>>;\n };\n records: [ResourceIdentifierObject<TypeFromInstanceOrString<T>>];\n [RequestSignature]?: RT;\n};\n\ntype ImmutableRequest<T> = Readonly<T> & {\n readonly headers: ImmutableHeaders;\n readonly records: [StableRecordIdentifier];\n};\n\nexport type UpdateRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'PATCH' | 'PUT';\n headers: Headers;\n op: 'updateRecord';\n data: {\n record: StableRecordIdentifier<TypeFromInstanceOrString<T>>;\n };\n records: [ResourceIdentifierObject<TypeFromInstanceOrString<T>>];\n [RequestSignature]?: RT;\n};\n\nexport type CreateRequestOptions<T = unknown, RT = unknown> = {\n url: string;\n method: 'POST';\n headers: Headers;\n op: 'createRecord';\n data: {\n record: StableRecordIdentifier<TypeFromInstanceOrString<T>>;\n };\n records: [ResourceIdentifierObject<TypeFromInstanceOrString<T>>];\n [RequestSignature]?: RT;\n};\n\nexport type ImmutableDeleteRequestOptions = ImmutableRequest<DeleteRequestOptions>;\nexport type ImmutableUpdateRequestOptions = ImmutableRequest<UpdateRequestOptions>;\nexport type ImmutableCreateRequestOptions = ImmutableRequest<CreateRequestOptions>;\n\nexport type RemotelyAccessibleIdentifier<T extends string = string> = {\n id: string;\n type: T;\n lid?: string;\n};\n\nexport type ConstrainedRequestOptions = {\n reload?: boolean;\n backgroundReload?: boolean;\n host?: string;\n namespace?: string;\n resourcePath?: string;\n urlParamsSettings?: QueryParamsSerializationOptions;\n};\n\nexport type FindRecordOptions<T = unknown> = ConstrainedRequestOptions & {\n include?: T extends TypedRecordInstance ? Includes<T>[] : string | string[];\n};\n\nexport interface StructuredDataDocument<T> {\n [STRUCTURED]?: true;\n /**\n * @see {@link ImmutableRequestInfo}\n * @typedoc\n */\n request: ImmutableRequestInfo;\n response: Response | ResponseInfo | null;\n content: T;\n}\nexport interface StructuredErrorDocument<T = unknown> extends Error {\n [STRUCTURED]?: true;\n request: ImmutableRequestInfo;\n response: Response | ResponseInfo | null;\n error: string | object;\n content?: T;\n}\nexport type StructuredDocument<T> = StructuredDataDocument<T> | StructuredErrorDocument<T>;\n\n/**\n * JavaScript's native Request class.\n *\n * EmberData provides our own typings due to incompleteness in the native typings.\n *\n * @typedoc\n */\ntype Request = {\n /** Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.\n * @typedoc\n */\n cache?: RequestCache;\n /** Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL.\n * @typedoc\n */\n credentials?: RequestCredentials;\n /** Returns the kind of resource requested by request, e.g., \"document\" or \"script\".\n * @typedoc\n */\n destination?: RequestDestination;\n /** Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the \"Host\" header.\n * @typedoc\n */\n headers?: Headers;\n /** Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI]\n * @typedoc\n */\n integrity?: string;\n /** Returns a boolean indicating whether or not request can outlive the global in which it was created.\n * @typedoc\n */\n keepalive?: boolean;\n /** Returns request's HTTP method, which is \"GET\" by default.\n * @typedoc\n */\n method?: HTTPMethod;\n /** Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs.\n * @typedoc\n */\n mode?: RequestMode;\n /** Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default.\n * @typedoc\n */\n redirect?: RequestRedirect;\n /** Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and \"about:client\" when defaulting to the global's default. This is used during fetching to determine the value of the `Referer` header of the request being made.\n * @typedoc\n */\n referrer?: string;\n /** Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer.\n * @typedoc\n */\n referrerPolicy?: ReferrerPolicy;\n /** Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler.\n * @typedoc\n */\n signal?: AbortSignal;\n /** Returns the URL of request as a string.\n * @typedoc\n */\n url?: string;\n /** Any body that you want to add to your request. Note that a GET or HEAD request may not have a body.\n * @typedoc\n */\n body?: BodyInit | null;\n};\n\nexport type ImmutableHeaders = Headers & { clone?(): Headers; toJSON(): [string, string][] };\n\n/**\n * Extends JavaScript's native {@link Request} object with additional\n * properties specific to the RequestManager's capabilities.\n *\n * @typedoc\n */\nexport type RequestInfo<T = unknown, RT = unknown> = Request & {\n /**\n * If provided, used instead of the AbortController auto-configured for each request by the RequestManager\n *\n * @typedoc\n */\n controller?: AbortController;\n\n /**\n * @see {@link CacheOptions}\n * @typedoc\n */\n cacheOptions?: CacheOptions<T>;\n store?: Store;\n\n op?: string;\n\n /**\n * The identifiers of the primary resources involved in the request\n * (if any). This may be used by handlers to perform transactional\n * operations on the store.\n *\n * @typedoc\n */\n records?: StableRecordIdentifier[];\n\n disableTestWaiter?: boolean;\n /**\n * data that a handler should convert into\n * the query (GET) or body (POST).\n *\n * Note: It is recommended that builders set query params\n * and body directly in most scenarios.\n *\n * @typedoc\n */\n data?: Record<string, unknown>;\n /**\n * options specifically intended for handlers\n * to utilize to process the request\n *\n * @typedoc\n */\n options?: Record<string, unknown>;\n\n [RequestSignature]?: RT;\n};\n\n/**\n * Immutable version of {@link RequestInfo}. This is what is passed to handlers.\n *\n * @typedoc\n */\nexport type ImmutableRequestInfo<T = unknown, RT = unknown> = Readonly<Omit<RequestInfo<T, RT>, 'controller'>> & {\n readonly cacheOptions?: Readonly<CacheOptions<T>>;\n readonly headers?: ImmutableHeaders;\n readonly data?: Readonly<Record<string, unknown>>;\n readonly options?: Readonly<Record<string, unknown>>;\n\n /** Whether the request body has been read.\n * @typedoc\n */\n readonly bodyUsed?: boolean;\n};\n\nexport interface ResponseInfo {\n readonly headers: ImmutableHeaders; // to do, maybe not this?\n readonly ok: boolean;\n readonly redirected: boolean;\n readonly status: number;\n readonly statusText: string;\n readonly type: ResponseType;\n readonly url: string;\n}\n\nexport interface RequestContext {\n /**\n * @see {@link ImmutableRequestInfo}\n * @typedoc\n */\n request: ImmutableRequestInfo;\n id: number;\n\n setStream(stream: ReadableStream | Promise<ReadableStream | null>): void;\n setResponse(response: Response | ResponseInfo | null): void;\n}\n"],"names":["SkipCache","getOrSetUniversal","Symbol","for","EnableHydration","IS_FUTURE","getOrSetGlobal","STRUCTURED"],"mappings":";;AASaA,MAAAA,SAAS,GAAGC,iBAAiB,CAAC,WAAW,EAAEC,MAAM,CAACC,GAAG,CAAC,eAAe,CAAC,EAAC;AACvEC,MAAAA,eAAe,GAAGH,iBAAiB,CAAC,iBAAiB,EAAEC,MAAM,CAACC,GAAG,CAAC,qBAAqB,CAAC,EAAC;AAC/F,MAAME,SAAS,GAAGC,cAAc,CAAC,WAAW,EAAEJ,MAAM,CAAC,WAAW,CAAC,EAAC;AAClE,MAAMK,UAAU,GAAGD,cAAc,CAAC,KAAK,EAAEJ,MAAM,CAAC,KAAK,CAAC,EAAC;;AAI9D;AACA;AACA;AACA;AACA;;AAoKA;AACA;AACA;AACA;AACA;AACA;AACA;;AA8DA;AACA;AACA;AACA;AACA;AACA;;AAiDA;AACA;AACA;AACA;AACA;;;;"}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concepts.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-api-raw.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}