@ember-data-mirror/rest 5.9.0-alpha.21 → 5.9.0-alpha.22

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.
@@ -0,0 +1,2 @@
1
+ import { createRecord, deleteRecord, findRecord, query, updateRecord } from "@warp-drive-mirror/utilities/rest";
2
+ export { createRecord, deleteRecord, findRecord, query, updateRecord };
package/dist/request.js CHANGED
@@ -1 +1,3 @@
1
- export { createRecord, deleteRecord, findRecord, query, updateRecord } from '@warp-drive-mirror/utilities/rest';
1
+ import { createRecord, deleteRecord, findRecord, query, updateRecord } from "@warp-drive-mirror/utilities/rest";
2
+
3
+ export { createRecord, deleteRecord, findRecord, query, updateRecord };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ember-data-mirror/rest",
3
3
  "description": "(Legacy) REST Format Support for EmberData",
4
- "version": "5.9.0-alpha.21",
4
+ "version": "5.9.0-alpha.22",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "author": "Chris Thoburn <runspired@users.noreply.github.com>",
@@ -20,16 +20,16 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@embroider/macros": "^1.20.6",
23
- "@warp-drive-mirror/core": "5.9.0-alpha.21",
24
- "@warp-drive-mirror/utilities": "5.9.0-alpha.21"
23
+ "@warp-drive-mirror/core": "5.9.0-alpha.22",
24
+ "@warp-drive-mirror/utilities": "5.9.0-alpha.22"
25
25
  },
26
26
  "files": [
27
- "unstable-preview-types",
28
27
  "addon-main.cjs",
29
28
  "dist",
30
29
  "README.md",
31
30
  "LICENSE.md",
32
- "logos"
31
+ "logos",
32
+ "unstable-preview-types"
33
33
  ],
34
34
  "exports": {
35
35
  "./*": {
@@ -49,8 +49,8 @@
49
49
  "@babel/plugin-transform-typescript": "^7.28.0",
50
50
  "@babel/preset-env": "^7.28.3",
51
51
  "@babel/preset-typescript": "^7.27.1",
52
- "@warp-drive/internal-config": "5.9.0-alpha.21",
53
- "vite": "^7.3.1"
52
+ "@warp-drive/internal-config": "5.9.0-alpha.22",
53
+ "tsdown": "^0.22.14"
54
54
  },
55
55
  "ember": {
56
56
  "edition": "octane"
@@ -64,8 +64,9 @@
64
64
  },
65
65
  "scripts": {
66
66
  "lint": "eslint . --quiet --cache --cache-strategy=content",
67
- "build:pkg": "vite build",
67
+ "check:types": "tsc --noEmit",
68
+ "build:pkg": "node node_modules/tsdown/dist/run.mjs",
68
69
  "sync": "echo \"syncing\"",
69
- "start": "vite"
70
+ "start": "node node_modules/tsdown/dist/run.mjs --watch"
70
71
  }
71
72
  }
@@ -1,42 +1,4 @@
1
1
  declare module '@ember-data-mirror/rest/request' {
2
- /**
3
- This package provides utilities for working with **REST**ful APIs with [*Ember***Data**](https://github.com/warp-drive-data/warp-drive/).
4
-
5
- ## Usage
6
-
7
- Request builders are functions that produce [Fetch Options](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
8
- They take a few contextual inputs about the request you want to make, abstracting away the gnarlier details.
9
-
10
- For instance, to fetch a resource from your API
11
-
12
- ```ts
13
- import { findRecord } from '@ember-data-mirror/rest/request';
14
-
15
- const options = findRecord('ember-developer', '1', { include: ['pets', 'friends'] });
16
-
17
- /*
18
- => {
19
- url: 'https://api.example.com/v1/emberDevelopers/1?include=friends,pets',
20
- method: 'GET',
21
- headers: <Headers>, // 'Content-Type': 'application/json;charset=utf-8'
22
- op: 'findRecord';
23
- records: [{ type: 'ember-developer', id: '1' }]
24
- }
25
- * /
26
- ```
27
-
28
- Request builder output is ready to go for use with {@link Store.request | store.request},
29
- {@link RequestManager.request | manager.request} and most conventional REST APIs.
30
-
31
- Resource types are pluralized and camelized for the url.
32
-
33
- URLs are stable. The same query will produce the same URL every time, even if the order of keys in
34
- the query or values in an array changes.
35
-
36
- URLs follow the most common REST format (camelCase pluralized resource types).
37
-
38
- * @module
39
- */
40
- export { findRecord, query, deleteRecord, createRecord, updateRecord } from "@warp-drive-mirror/utilities/rest";
41
-
2
+ import { createRecord, deleteRecord, findRecord, query, updateRecord } from "@warp-drive-mirror/utilities/rest";
3
+ export { createRecord, deleteRecord, findRecord, query, updateRecord };
42
4
  }