@warp-drive/core-types 0.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +9 -0
- package/NCC-1701-a-blue.svg +4 -0
- package/NCC-1701-a.svg +4 -0
- package/README.md +77 -0
- package/addon/identifier.js +85 -0
- package/addon/identifier.js.map +1 -0
- package/addon/index.js +0 -0
- package/addon/index.js.map +1 -0
- package/addon/request.js +33 -0
- package/addon/request.js.map +1 -0
- package/addon/symbols.js +2 -0
- package/addon/symbols.js.map +1 -0
- package/addon-main.cjs +93 -0
- package/package.json +85 -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,77 @@
|
|
|
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
|
+
### ♥️ Credits
|
|
20
|
+
|
|
21
|
+
<details>
|
|
22
|
+
<summary>Brought to you with ♥️ love by <a href="https://emberjs.com" title="EmberJS">🐹 Ember</a></summary>
|
|
23
|
+
|
|
24
|
+
<style type="text/css">
|
|
25
|
+
img.project-logo {
|
|
26
|
+
padding: 0 5em 1em 5em;
|
|
27
|
+
width: 100px;
|
|
28
|
+
border-bottom: 2px solid #0969da;
|
|
29
|
+
margin: 0 auto;
|
|
30
|
+
display: block;
|
|
31
|
+
}
|
|
32
|
+
details > summary {
|
|
33
|
+
font-size: 1.1rem;
|
|
34
|
+
line-height: 1rem;
|
|
35
|
+
margin-bottom: 1rem;
|
|
36
|
+
}
|
|
37
|
+
details {
|
|
38
|
+
font-size: 1rem;
|
|
39
|
+
}
|
|
40
|
+
details > summary strong {
|
|
41
|
+
display: inline-block;
|
|
42
|
+
padding: .2rem 0;
|
|
43
|
+
color: #000;
|
|
44
|
+
border-bottom: 3px solid #0969da;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
details > details {
|
|
48
|
+
margin-left: 2rem;
|
|
49
|
+
}
|
|
50
|
+
details > details > summary {
|
|
51
|
+
font-size: 1rem;
|
|
52
|
+
line-height: 1rem;
|
|
53
|
+
margin-bottom: 1rem;
|
|
54
|
+
}
|
|
55
|
+
details > details > summary strong {
|
|
56
|
+
display: inline-block;
|
|
57
|
+
padding: .2rem 0;
|
|
58
|
+
color: #555;
|
|
59
|
+
border-bottom: 2px solid #555;
|
|
60
|
+
}
|
|
61
|
+
details > details {
|
|
62
|
+
font-size: .85rem;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@media (prefers-color-scheme: dark) {
|
|
66
|
+
details > summary strong {
|
|
67
|
+
color: #fff;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
@media (prefers-color-scheme: dark) {
|
|
71
|
+
details > details > summary strong {
|
|
72
|
+
color: #afaba0;
|
|
73
|
+
border-bottom: 2px solid #afaba0;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
</style>
|
|
77
|
+
</details>
|
|
@@ -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 extends Identifier {\n id: string;\n type: string;\n}\n\nexport interface NewRecordIdentifier extends Identifier {\n id: string | null;\n type: string;\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 = ExistingRecordIdentifier | NewRecordIdentifier;\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 extends StableIdentifier {\n id: string;\n type: string;\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 extends StableIdentifier {\n id: string | null;\n type: string;\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 = StableExistingRecordIdentifier | StableNewRecordIdentifier;\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/addon/index.js
ADDED
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/addon/request.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const SkipCache = Symbol.for('wd:skip-cache');
|
|
2
|
+
const EnableHydration = Symbol.for('wd:enable-hydration');
|
|
3
|
+
const IS_FUTURE = Symbol('IS_FUTURE');
|
|
4
|
+
const STRUCTURED = Symbol('DOC');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Use these options to adjust CacheHandler behavior for a request.
|
|
8
|
+
*
|
|
9
|
+
* @typedoc
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* JavaScript's native Request class.
|
|
14
|
+
*
|
|
15
|
+
* EmberData provides our own typings due to incompleteness in the native typings.
|
|
16
|
+
*
|
|
17
|
+
* @typedoc
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Extends JavaScript's native {@link Request} object with additional
|
|
22
|
+
* properties specific to the RequestManager's capabilities.
|
|
23
|
+
*
|
|
24
|
+
* @typedoc
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Immutable version of {@link RequestInfo}. This is what is passed to handlers.
|
|
29
|
+
*
|
|
30
|
+
* @typedoc
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
export { EnableHydration, IS_FUTURE, STRUCTURED, SkipCache };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.js","sources":["../src/request.ts"],"sourcesContent":["import type { StableRecordIdentifier } from './identifier';\nimport type { QueryParamsSerializationOptions } from './params';\nimport type { ResourceIdentifierObject } from './spec/raw';\n\ntype Store = unknown;\n\nexport const SkipCache = Symbol.for('wd:skip-cache');\nexport const EnableHydration = Symbol.for('wd:enable-hydration');\nexport const IS_FUTURE = Symbol('IS_FUTURE');\nexport const STRUCTURED = 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 = {\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 LifetimesService 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.\n *\n * @typedoc\n */\n types?: 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]?: true;\n};\nexport type FindRecordRequestOptions = {\n url: string;\n method: 'GET';\n headers: Headers;\n cacheOptions: CacheOptions;\n op: 'findRecord';\n records: [ResourceIdentifierObject];\n};\n\nexport type QueryRequestOptions = {\n url: string;\n method: 'GET';\n headers: Headers;\n cacheOptions: CacheOptions;\n op: 'query';\n};\n\nexport type PostQueryRequestOptions = {\n url: string;\n method: 'POST' | 'QUERY';\n headers: Headers;\n body: string;\n cacheOptions: CacheOptions & { key: string };\n op: 'query';\n};\n\nexport type DeleteRequestOptions = {\n url: string;\n method: 'DELETE';\n headers: Headers;\n op: 'deleteRecord';\n data: {\n record: StableRecordIdentifier;\n };\n records: [ResourceIdentifierObject];\n};\n\ntype ImmutableRequest<T> = Readonly<T> & {\n readonly headers: ImmutableHeaders;\n readonly records: [StableRecordIdentifier];\n};\n\nexport type UpdateRequestOptions = {\n url: string;\n method: 'PATCH' | 'PUT';\n headers: Headers;\n op: 'updateRecord';\n data: {\n record: StableRecordIdentifier;\n };\n records: [ResourceIdentifierObject];\n};\n\nexport type CreateRequestOptions = {\n url: string;\n method: 'POST';\n headers: Headers;\n op: 'createRecord';\n data: {\n record: StableRecordIdentifier;\n };\n records: [ResourceIdentifierObject];\n};\n\nexport type ImmutableDeleteRequestOptions = ImmutableRequest<DeleteRequestOptions>;\nexport type ImmutableUpdateRequestOptions = ImmutableRequest<UpdateRequestOptions>;\nexport type ImmutableCreateRequestOptions = ImmutableRequest<CreateRequestOptions>;\n\nexport type RemotelyAccessibleIdentifier = {\n id: string;\n type: string;\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 = ConstrainedRequestOptions & {\n include?: 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 = 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;\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\n/**\n * Immutable version of {@link RequestInfo}. This is what is passed to handlers.\n *\n * @typedoc\n */\nexport type ImmutableRequestInfo = Readonly<Omit<RequestInfo, 'controller'>> & {\n readonly cacheOptions?: Readonly<CacheOptions>;\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: string;\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): void;\n setResponse(response: Response | ResponseInfo): void;\n}\n"],"names":["SkipCache","Symbol","for","EnableHydration","IS_FUTURE","STRUCTURED"],"mappings":"AAMO,MAAMA,SAAS,GAAGC,MAAM,CAACC,GAAG,CAAC,eAAe,EAAC;AAC7C,MAAMC,eAAe,GAAGF,MAAM,CAACC,GAAG,CAAC,qBAAqB,EAAC;MACnDE,SAAS,GAAGH,MAAM,CAAC,WAAW,EAAC;MAC/BI,UAAU,GAAGJ,MAAM,CAAC,KAAK,EAAC;;AAIvC;AACA;AACA;AACA;AACA;;AAyJA;AACA;AACA;AACA;AACA;AACA;AACA;;AA8DA;AACA;AACA;AACA;AACA;AACA;;AA+CA;AACA;AACA;AACA;AACA;;;;"}
|
package/addon/symbols.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbols.js","sources":["../src/symbols.ts"],"sourcesContent":["export const RecordStore = Symbol('Store');\n"],"names":["RecordStore","Symbol"],"mappings":"MAAaA,WAAW,GAAGC,MAAM,CAAC,OAAO;;;;"}
|
package/addon-main.cjs
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
const requireModule = require('@ember-data/private-build-infra/src/utilities/require-module');
|
|
2
|
+
const getEnv = require('@ember-data/private-build-infra/src/utilities/get-env');
|
|
3
|
+
const detectModule = require('@ember-data/private-build-infra/src/utilities/detect-module');
|
|
4
|
+
|
|
5
|
+
const pkg = require('./package.json');
|
|
6
|
+
|
|
7
|
+
module.exports = {
|
|
8
|
+
name: pkg.name,
|
|
9
|
+
|
|
10
|
+
options: {
|
|
11
|
+
'@embroider/macros': {
|
|
12
|
+
setOwnConfig: {},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
_emberDataConfig: null,
|
|
17
|
+
configureEmberData() {
|
|
18
|
+
if (this._emberDataConfig) {
|
|
19
|
+
return this._emberDataConfig;
|
|
20
|
+
}
|
|
21
|
+
const app = this._findHost();
|
|
22
|
+
const isProd = /production/.test(process.env.EMBER_ENV);
|
|
23
|
+
const hostOptions = app.options?.emberData || {};
|
|
24
|
+
const debugOptions = Object.assign(
|
|
25
|
+
{
|
|
26
|
+
LOG_PAYLOADS: false,
|
|
27
|
+
LOG_OPERATIONS: false,
|
|
28
|
+
LOG_MUTATIONS: false,
|
|
29
|
+
LOG_NOTIFICATIONS: false,
|
|
30
|
+
LOG_REQUESTS: false,
|
|
31
|
+
LOG_REQUEST_STATUS: false,
|
|
32
|
+
LOG_IDENTIFIERS: false,
|
|
33
|
+
LOG_GRAPH: false,
|
|
34
|
+
LOG_INSTANCE_CACHE: false,
|
|
35
|
+
},
|
|
36
|
+
hostOptions.debug || {}
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const HAS_DEBUG_PACKAGE = detectModule(require, '@ember-data/debug', __dirname, pkg);
|
|
40
|
+
const HAS_META_PACKAGE = detectModule(require, 'ember-data', __dirname, pkg);
|
|
41
|
+
|
|
42
|
+
const includeDataAdapterInProduction =
|
|
43
|
+
typeof hostOptions.includeDataAdapterInProduction === 'boolean'
|
|
44
|
+
? hostOptions.includeDataAdapterInProduction
|
|
45
|
+
: HAS_META_PACKAGE;
|
|
46
|
+
|
|
47
|
+
const includeDataAdapter = HAS_DEBUG_PACKAGE ? (isProd ? includeDataAdapterInProduction : true) : false;
|
|
48
|
+
const DEPRECATIONS = require('@ember-data/private-build-infra/src/deprecations')(hostOptions.compatWith || null);
|
|
49
|
+
const FEATURES = require('@ember-data/private-build-infra/src/features')(isProd);
|
|
50
|
+
|
|
51
|
+
const ALL_PACKAGES = requireModule('@ember-data/private-build-infra/virtual-packages/packages.js');
|
|
52
|
+
const MACRO_PACKAGE_FLAGS = Object.assign({}, ALL_PACKAGES.default);
|
|
53
|
+
delete MACRO_PACKAGE_FLAGS['HAS_DEBUG_PACKAGE'];
|
|
54
|
+
|
|
55
|
+
Object.keys(MACRO_PACKAGE_FLAGS).forEach((key) => {
|
|
56
|
+
MACRO_PACKAGE_FLAGS[key] = detectModule(require, MACRO_PACKAGE_FLAGS[key], __dirname, pkg);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// copy configs forward
|
|
60
|
+
const ownConfig = this.options['@embroider/macros'].setOwnConfig;
|
|
61
|
+
ownConfig.compatWith = hostOptions.compatWith || null;
|
|
62
|
+
ownConfig.debug = debugOptions;
|
|
63
|
+
ownConfig.deprecations = Object.assign(DEPRECATIONS, ownConfig.deprecations || {}, hostOptions.deprecations || {});
|
|
64
|
+
ownConfig.features = Object.assign({}, FEATURES);
|
|
65
|
+
ownConfig.includeDataAdapter = includeDataAdapter;
|
|
66
|
+
ownConfig.packages = MACRO_PACKAGE_FLAGS;
|
|
67
|
+
ownConfig.env = getEnv(ownConfig);
|
|
68
|
+
|
|
69
|
+
this._emberDataConfig = ownConfig;
|
|
70
|
+
return ownConfig;
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
included() {
|
|
74
|
+
this.configureEmberData();
|
|
75
|
+
return this._super.included.call(this, ...arguments);
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
treeForVendor() {
|
|
79
|
+
return;
|
|
80
|
+
},
|
|
81
|
+
treeForPublic() {
|
|
82
|
+
return;
|
|
83
|
+
},
|
|
84
|
+
treeForStyles() {
|
|
85
|
+
return;
|
|
86
|
+
},
|
|
87
|
+
treeForAddonStyles() {
|
|
88
|
+
return;
|
|
89
|
+
},
|
|
90
|
+
treeForApp() {
|
|
91
|
+
return;
|
|
92
|
+
},
|
|
93
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@warp-drive/core-types",
|
|
3
|
+
"version": "0.0.0-alpha.3",
|
|
4
|
+
"description": "Provides core logic, utils and types for WarpDrive and EmberData",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ember-addon"
|
|
7
|
+
],
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+ssh://git@github.com:emberjs/data.git",
|
|
11
|
+
"directory": "packages/core-types"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"author": "Chris Thoburn <runspired@users.noreply.github.com>",
|
|
15
|
+
"files": [
|
|
16
|
+
"addon",
|
|
17
|
+
"addon-main.cjs",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE.md",
|
|
20
|
+
"NCC-1701-a.svg",
|
|
21
|
+
"NCC-1701-a-blue.svg"
|
|
22
|
+
],
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"default": "./addon/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./*": {
|
|
28
|
+
"default": "./addon/*.js"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@ember-data/private-build-infra": "5.4.0-alpha.17",
|
|
33
|
+
"ember-cli-babel": "^8.2.0",
|
|
34
|
+
"pnpm-sync-dependencies-meta-injected": "0.0.10"
|
|
35
|
+
},
|
|
36
|
+
"dependenciesMeta": {
|
|
37
|
+
"@ember-data/private-build-infra": {
|
|
38
|
+
"injected": true
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@babel/cli": "^7.23.4",
|
|
43
|
+
"@babel/core": "^7.23.7",
|
|
44
|
+
"@babel/plugin-proposal-decorators": "^7.23.7",
|
|
45
|
+
"@babel/plugin-transform-class-properties": "^7.23.3",
|
|
46
|
+
"@babel/plugin-transform-private-methods": "^7.23.3",
|
|
47
|
+
"@babel/plugin-transform-runtime": "^7.23.7",
|
|
48
|
+
"@babel/plugin-transform-typescript": "^7.23.6",
|
|
49
|
+
"@babel/preset-env": "^7.23.8",
|
|
50
|
+
"@babel/preset-typescript": "^7.23.3",
|
|
51
|
+
"@babel/runtime": "^7.23.8",
|
|
52
|
+
"@embroider/addon-dev": "^4.1.2",
|
|
53
|
+
"@glimmer/component": "^1.1.2",
|
|
54
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
55
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
56
|
+
"@warp-drive/internal-config": "5.4.0-alpha.17",
|
|
57
|
+
"ember-source": "~5.4.0",
|
|
58
|
+
"rollup": "^4.9.6",
|
|
59
|
+
"typescript": "^5.3.3",
|
|
60
|
+
"walk-sync": "^3.0.0",
|
|
61
|
+
"webpack": "^5.89.0"
|
|
62
|
+
},
|
|
63
|
+
"engines": {
|
|
64
|
+
"node": ">= 20.11.0"
|
|
65
|
+
},
|
|
66
|
+
"volta": {
|
|
67
|
+
"extends": "../../package.json"
|
|
68
|
+
},
|
|
69
|
+
"packageManager": "pnpm@8.6.0",
|
|
70
|
+
"ember-addon": {
|
|
71
|
+
"main": "addon-main.cjs",
|
|
72
|
+
"type": "addon",
|
|
73
|
+
"version": 1
|
|
74
|
+
},
|
|
75
|
+
"ember": {
|
|
76
|
+
"edition": "octane"
|
|
77
|
+
},
|
|
78
|
+
"scripts": {
|
|
79
|
+
"lint": "eslint . --quiet --cache --cache-strategy=content --ext .js,.ts,.mjs,.cjs --report-unused-disable-directives",
|
|
80
|
+
"build:types": "echo \"Types are private\" && exit 0",
|
|
81
|
+
"build:client": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
|
|
82
|
+
"_build": "bun run build:client && bun run build:types",
|
|
83
|
+
"_syncPnpm": "bun run sync-dependencies-meta-injected"
|
|
84
|
+
}
|
|
85
|
+
}
|