@ember-data-mirror/serializer 5.4.0-alpha.64 → 5.4.0-alpha.71

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 (58) hide show
  1. package/addon-main.cjs +5 -0
  2. package/blueprints/serializer/index.js +71 -5
  3. package/blueprints/serializer-test/index.js +13 -7
  4. package/blueprints/serializer-test/qunit-files/__root__/__path__/__test__.js +8 -9
  5. package/blueprints/transform/index.js +14 -4
  6. package/blueprints/transform-test/index.js +13 -7
  7. package/blueprints/transform-test/qunit-files/__root__/__path__/__test__.js +3 -4
  8. package/dist/index.js +373 -0
  9. package/dist/index.js.map +1 -0
  10. package/{addon/json.js → dist/json-CsNumir-.js} +26 -7
  11. package/dist/json-CsNumir-.js.map +1 -0
  12. package/{addon → dist}/json-api.js +38 -16
  13. package/dist/json-api.js.map +1 -0
  14. package/dist/json.js +7 -0
  15. package/dist/json.js.map +1 -0
  16. package/dist/rest.js +1271 -0
  17. package/dist/rest.js.map +1 -0
  18. package/{addon/string-Juwz4cu0.js → dist/transform.js} +5 -13
  19. package/dist/transform.js.map +1 -0
  20. package/package.json +36 -43
  21. package/unstable-preview-types/-private/embedded-records-mixin.d.ts +98 -2
  22. package/unstable-preview-types/-private/embedded-records-mixin.d.ts.map +1 -1
  23. package/unstable-preview-types/-private/transforms/boolean.d.ts +1 -1
  24. package/unstable-preview-types/-private/transforms/boolean.d.ts.map +1 -1
  25. package/unstable-preview-types/-private/transforms/date.d.ts +1 -1
  26. package/unstable-preview-types/-private/transforms/date.d.ts.map +1 -1
  27. package/unstable-preview-types/-private/transforms/number.d.ts +1 -1
  28. package/unstable-preview-types/-private/transforms/number.d.ts.map +1 -1
  29. package/unstable-preview-types/-private/transforms/string.d.ts +1 -1
  30. package/unstable-preview-types/-private/transforms/string.d.ts.map +1 -1
  31. package/unstable-preview-types/-private/transforms/transform.d.ts +5 -6
  32. package/unstable-preview-types/-private/transforms/transform.d.ts.map +1 -1
  33. package/unstable-preview-types/index.d.ts +5 -6
  34. package/unstable-preview-types/index.d.ts.map +1 -1
  35. package/unstable-preview-types/json-api.d.ts.map +1 -1
  36. package/unstable-preview-types/json.d.ts.map +1 -1
  37. package/unstable-preview-types/rest.d.ts +1 -1
  38. package/unstable-preview-types/rest.d.ts.map +1 -1
  39. package/unstable-preview-types/transform.d.ts +5 -1
  40. package/unstable-preview-types/transform.d.ts.map +1 -1
  41. package/addon/-private.js +0 -3
  42. package/addon/-private.js.map +0 -1
  43. package/addon/embedded-records-mixin-Lr-0FvWz.js +0 -578
  44. package/addon/embedded-records-mixin-Lr-0FvWz.js.map +0 -1
  45. package/addon/index.js +0 -181
  46. package/addon/index.js.map +0 -1
  47. package/addon/json-api.js.map +0 -1
  48. package/addon/json.js.map +0 -1
  49. package/addon/rest.js +0 -684
  50. package/addon/rest.js.map +0 -1
  51. package/addon/string-Juwz4cu0.js.map +0 -1
  52. package/addon/transform.js +0 -1
  53. package/addon/transform.js.map +0 -1
  54. package/addon/utils-NcVD2Jb5.js +0 -12
  55. package/addon/utils-NcVD2Jb5.js.map +0 -1
  56. package/addon-main.js +0 -94
  57. package/unstable-preview-types/-private.d.ts +0 -13
  58. package/unstable-preview-types/-private.d.ts.map +0 -1
package/addon-main.cjs ADDED
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const { addonShim } = require('@warp-drive-mirror/build-config/addon-shim.cjs');
4
+
5
+ module.exports = addonShim(__dirname);
@@ -1,14 +1,80 @@
1
- const extendFromApplicationEntity = require('@ember-data-mirror/private-build-infra/src/utilities/extend-from-application-entity');
2
- const useEditionDetector = require('@ember-data-mirror/private-build-infra/src/utilities/edition-detector');
1
+ const path = require('path');
2
+ const fs = require('fs');
3
3
 
4
- module.exports = useEditionDetector({
5
- description: 'Generates an ember-data serializer.',
4
+ const stringUtil = require('ember-cli-string-utils');
5
+ const pathUtil = require('ember-cli-path-utils');
6
+
7
+ const { has } = require('@ember/edition-utils');
8
+
9
+ module.exports = {
10
+ description: 'Generates an ember-data Serializer.',
6
11
 
7
12
  availableOptions: [{ name: 'base-class', type: String }],
8
13
 
9
14
  root: __dirname,
10
15
 
16
+ filesPath() {
17
+ let hasOctane = has('octane');
18
+ if (hasOctane && process.env.EMBER_EDITION === 'classic') {
19
+ hasOctane = false; //forcible override
20
+ }
21
+ let rootPath = hasOctane ? 'native-files' : 'files';
22
+ return path.join(__dirname, rootPath);
23
+ },
24
+
11
25
  locals(options) {
12
26
  return extendFromApplicationEntity('serializer', 'JSONAPISerializer', options);
13
27
  },
14
- });
28
+ };
29
+
30
+ function extendFromApplicationEntity(type, baseClass, options) {
31
+ let isAddon = options.inRepoAddon || options.project.isEmberCLIAddon();
32
+
33
+ let entityName = options.entity.name;
34
+ let relativePath = pathUtil.getRelativePath(options.entity.name);
35
+
36
+ if (options.pod && options.podPath) {
37
+ relativePath = pathUtil.getRelativePath(options.podPath + options.entity.name);
38
+ }
39
+
40
+ let applicationEntityPath = path.join(options.project.root, 'app', `${type}s`, 'application.js');
41
+
42
+ let hasApplicationEntity = fs.existsSync(applicationEntityPath);
43
+ if (!isAddon && !options.baseClass && entityName !== 'application' && hasApplicationEntity) {
44
+ options.baseClass = 'application';
45
+ }
46
+
47
+ if (options.baseClass === entityName) {
48
+ throw new Error(
49
+ stringUtil.classify(type) +
50
+ 's cannot extend from themself. To resolve this, remove the `--base-class` option or change to a different base-class.'
51
+ );
52
+ }
53
+
54
+ let importStatement;
55
+
56
+ if (options.baseClass) {
57
+ let baseClassPath = options.baseClass;
58
+ baseClass = stringUtil.classify(baseClassPath.replace('/', '-'));
59
+ baseClass = baseClass + stringUtil.classify(type);
60
+
61
+ importStatement = `import ${baseClass} from '${relativePath}${baseClassPath}';`;
62
+ } else {
63
+ let baseClassPath = `@ember-data/${type}`;
64
+
65
+ if (baseClass.startsWith('JSONAPI')) {
66
+ baseClassPath += '/json-api';
67
+ }
68
+
69
+ if (baseClass.startsWith('REST')) {
70
+ baseClassPath += '/rest';
71
+ }
72
+
73
+ importStatement = `import ${baseClass} from '${baseClassPath}';`;
74
+ }
75
+
76
+ return {
77
+ importStatement,
78
+ baseClass,
79
+ };
80
+ }
@@ -1,15 +1,15 @@
1
1
  const path = require('path');
2
2
 
3
3
  const testInfo = require('ember-cli-test-info');
4
- const useTestFrameworkDetector = require('@ember-data-mirror/private-build-infra/src/utilities/test-framework-detector');
5
- const modulePrefixForProject = require('@ember-data-mirror/private-build-infra/src/utilities/module-prefix-for-project');
4
+ const { dasherize } = require('ember-cli-string-utils');
6
5
 
7
- module.exports = useTestFrameworkDetector({
8
- description: 'Generates a serializer unit test.',
6
+ module.exports = {
7
+ description: 'Generates an EmberData Serializer unit test',
8
+ supportsAddon() { return false; },
9
9
 
10
10
  root: __dirname,
11
11
 
12
- fileMapTokens(options) {
12
+ fileMapTokens() {
13
13
  return {
14
14
  __root__() {
15
15
  return 'tests';
@@ -21,9 +21,15 @@ module.exports = useTestFrameworkDetector({
21
21
  },
22
22
 
23
23
  locals(options) {
24
+ const modulePrefix = dasherize(options.project.config().modulePrefix);
24
25
  return {
25
26
  friendlyTestDescription: testInfo.description(options.entity.name, 'Unit', 'Serializer'),
26
- modulePrefix: modulePrefixForProject(options.project),
27
+ modulePrefix,
27
28
  };
28
29
  },
29
- });
30
+
31
+ filesPath() {
32
+ return path.join(__dirname, 'qunit-files')
33
+ }
34
+ };
35
+
@@ -1,24 +1,23 @@
1
- import { module, test } from 'qunit';
2
-
3
1
  import { setupTest } from '<%= modulePrefix %>/tests/helpers';
2
+ import { module, test } from 'qunit';
4
3
 
5
4
  module('<%= friendlyTestDescription %>', function (hooks) {
6
5
  setupTest(hooks);
7
6
 
8
7
  // Replace this with your real tests.
9
8
  test('it exists', function (assert) {
10
- let store = this.owner.lookup('service:store');
11
- let serializer = store.serializerFor('<%= dasherizedModuleName %>');
9
+ const store = this.owner.lookup('service:store');
10
+ const serializer = store.serializerFor('<%= dasherizedModuleName %>');
12
11
 
13
- assert.ok(serializer);
12
+ assert.ok(serializer, 'serializer exists');
14
13
  });
15
14
 
16
15
  test('it serializes records', function (assert) {
17
- let store = this.owner.lookup('service:store');
18
- let record = store.createRecord('<%= dasherizedModuleName %>', {});
16
+ const store = this.owner.lookup('service:store');
17
+ const record = store.createRecord('<%= dasherizedModuleName %>', {});
19
18
 
20
- let serializedRecord = record.serialize();
19
+ const serializedRecord = record.serialize();
21
20
 
22
- assert.ok(serializedRecord);
21
+ assert.ok(serializedRecord, 'it serializes records');
23
22
  });
24
23
  });
@@ -1,7 +1,17 @@
1
- const useEditionDetector = require('@ember-data-mirror/private-build-infra/src/utilities/edition-detector');
1
+ const path = require('path');
2
2
 
3
- module.exports = useEditionDetector({
4
- description: 'Generates an ember-data value transform.',
3
+ const { has } = require('@ember/edition-utils');
5
4
 
5
+ module.exports = {
6
+ description: 'Generates an ember-data Transform.',
6
7
  root: __dirname,
7
- });
8
+
9
+ filesPath() {
10
+ let hasOctane = has('octane');
11
+ if (hasOctane && process.env.EMBER_EDITION === 'classic') {
12
+ hasOctane = false; //forcible override
13
+ }
14
+ let rootPath = hasOctane ? 'native-files' : 'files';
15
+ return path.join(__dirname, rootPath);
16
+ },
17
+ };
@@ -1,15 +1,15 @@
1
1
  const path = require('path');
2
2
 
3
3
  const testInfo = require('ember-cli-test-info');
4
- const useTestFrameworkDetector = require('@ember-data-mirror/private-build-infra/src/utilities/test-framework-detector');
5
- const modulePrefixForProject = require('@ember-data-mirror/private-build-infra/src/utilities/module-prefix-for-project');
4
+ const { dasherize } = require('ember-cli-string-utils');
6
5
 
7
- module.exports = useTestFrameworkDetector({
8
- description: 'Generates a transform unit test.',
6
+ module.exports = {
7
+ description: 'Generates an EmberData Transform unit test',
8
+ supportsAddon() { return false; },
9
9
 
10
10
  root: __dirname,
11
11
 
12
- fileMapTokens(options) {
12
+ fileMapTokens() {
13
13
  return {
14
14
  __root__() {
15
15
  return 'tests';
@@ -21,9 +21,15 @@ module.exports = useTestFrameworkDetector({
21
21
  },
22
22
 
23
23
  locals(options) {
24
+ const modulePrefix = dasherize(options.project.config().modulePrefix);
24
25
  return {
25
26
  friendlyTestDescription: testInfo.description(options.entity.name, 'Unit', 'Transform'),
26
- modulePrefix: modulePrefixForProject(options.project),
27
+ modulePrefix,
27
28
  };
28
29
  },
29
- });
30
+
31
+ filesPath() {
32
+ return path.join(__dirname, 'qunit-files')
33
+ }
34
+ };
35
+
@@ -1,13 +1,12 @@
1
- import { module, test } from 'qunit';
2
-
3
1
  import { setupTest } from '<%= modulePrefix %>/tests/helpers';
2
+ import { module, test } from 'qunit';
4
3
 
5
4
  module('<%= friendlyTestDescription %>', function (hooks) {
6
5
  setupTest(hooks);
7
6
 
8
7
  // Replace this with your real tests.
9
8
  test('it exists', function (assert) {
10
- let transform = this.owner.lookup('transform:<%= dasherizedModuleName %>');
11
- assert.ok(transform);
9
+ const transform = this.owner.lookup('transform:<%= dasherizedModuleName %>');
10
+ assert.ok(transform, 'transform exists');
12
11
  });
13
12
  });
package/dist/index.js ADDED
@@ -0,0 +1,373 @@
1
+ import EmberObject from '@ember/object';
2
+ import { inject } from '@ember/service';
3
+ var __defProp = Object.defineProperty;
4
+ var __export = (target, all) => {
5
+ for (var name in all) __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true
8
+ });
9
+ };
10
+
11
+ // src/runtime.ts
12
+ var runtime_exports = {};
13
+ __export(runtime_exports, {
14
+ c: () => decorateClass,
15
+ f: () => decorateFieldV1,
16
+ g: () => decorateFieldV2,
17
+ i: () => initializeDeferredDecorator,
18
+ m: () => decorateMethodV1,
19
+ n: () => decorateMethodV2,
20
+ p: () => decoratePOJO
21
+ });
22
+ var deferred = /* @__PURE__ */new WeakMap();
23
+ function deferDecorator(proto, prop, desc) {
24
+ let map = deferred.get(proto);
25
+ if (!map) {
26
+ map = /* @__PURE__ */new Map();
27
+ deferred.set(proto, map);
28
+ }
29
+ map.set(prop, desc);
30
+ }
31
+ function findDeferredDecorator(target, prop) {
32
+ let cursor = target.prototype;
33
+ while (cursor) {
34
+ let desc = deferred.get(cursor)?.get(prop);
35
+ if (desc) {
36
+ return desc;
37
+ }
38
+ cursor = cursor.prototype;
39
+ }
40
+ }
41
+ function decorateFieldV1(target, prop, decorators, initializer) {
42
+ return decorateFieldV2(target.prototype, prop, decorators, initializer);
43
+ }
44
+ function decorateFieldV2(prototype, prop, decorators, initializer) {
45
+ let desc = {
46
+ configurable: true,
47
+ enumerable: true,
48
+ writable: true,
49
+ initializer: null
50
+ };
51
+ if (initializer) {
52
+ desc.initializer = initializer;
53
+ }
54
+ for (let decorator of decorators) {
55
+ desc = decorator(prototype, prop, desc) || desc;
56
+ }
57
+ if (desc.initializer === void 0) {
58
+ Object.defineProperty(prototype, prop, desc);
59
+ } else {
60
+ deferDecorator(prototype, prop, desc);
61
+ }
62
+ }
63
+ function decorateMethodV1({
64
+ prototype
65
+ }, prop, decorators) {
66
+ return decorateMethodV2(prototype, prop, decorators);
67
+ }
68
+ function decorateMethodV2(prototype, prop, decorators) {
69
+ const origDesc = Object.getOwnPropertyDescriptor(prototype, prop);
70
+ let desc = {
71
+ ...origDesc
72
+ };
73
+ for (let decorator of decorators) {
74
+ desc = decorator(prototype, prop, desc) || desc;
75
+ }
76
+ if (desc.initializer !== void 0) {
77
+ desc.value = desc.initializer ? desc.initializer.call(prototype) : void 0;
78
+ desc.initializer = void 0;
79
+ }
80
+ Object.defineProperty(prototype, prop, desc);
81
+ }
82
+ function initializeDeferredDecorator(target, prop) {
83
+ let desc = findDeferredDecorator(target.constructor, prop);
84
+ if (desc) {
85
+ Object.defineProperty(target, prop, {
86
+ enumerable: desc.enumerable,
87
+ configurable: desc.configurable,
88
+ writable: desc.writable,
89
+ value: desc.initializer ? desc.initializer.call(target) : void 0
90
+ });
91
+ }
92
+ }
93
+ function decorateClass(target, decorators) {
94
+ return decorators.reduce((accum, decorator) => decorator(accum) || accum, target);
95
+ }
96
+ function decoratePOJO(pojo, decorated) {
97
+ for (let [type, prop, decorators] of decorated) {
98
+ if (type === "field") {
99
+ decoratePojoField(pojo, prop, decorators);
100
+ } else {
101
+ decorateMethodV2(pojo, prop, decorators);
102
+ }
103
+ }
104
+ return pojo;
105
+ }
106
+ function decoratePojoField(pojo, prop, decorators) {
107
+ let desc = {
108
+ configurable: true,
109
+ enumerable: true,
110
+ writable: true,
111
+ initializer: () => Object.getOwnPropertyDescriptor(pojo, prop)?.value
112
+ };
113
+ for (let decorator of decorators) {
114
+ desc = decorator(pojo, prop, desc) || desc;
115
+ }
116
+ if (desc.initializer) {
117
+ desc.value = desc.initializer.call(pojo);
118
+ delete desc.initializer;
119
+ }
120
+ Object.defineProperty(pojo, prop, desc);
121
+ }
122
+
123
+ /**
124
+ ## Overview
125
+
126
+ <blockquote style="margin: 1em; padding: .1em 1em .1em 1em; border-left: solid 1em #E34C32; background: #e0e0e0;">
127
+ <p>
128
+ ⚠️ <strong>This is LEGACY documentation</strong> for a feature that is no longer encouraged to be used.
129
+ If starting a new app or thinking of implementing a new serializer, consider writing a
130
+ <a href="/ember-data/release/classes/%3CInterface%3E%20Handler">Handler</a> instead to be used with the <a href="https://github.com/emberjs/data/tree/main/packages/request#readme">RequestManager</a>
131
+ </p>
132
+ </blockquote>
133
+
134
+ In order to properly manage and present your data, EmberData
135
+ needs to understand the structure of data it receives.
136
+
137
+ `Serializers` convert data between the server's API format and
138
+ the format EmberData understands.
139
+
140
+ Data received from an API response is **normalized** into
141
+ [JSON:API](https://jsonapi.org/) (the format used internally
142
+ by EmberData), while data sent to an API is **serialized**
143
+ into the format the API expects.
144
+
145
+ ### Implementing a Serializer
146
+
147
+ There are only two required serializer methods, one for
148
+ normalizing data from the server API format into JSON:API, and
149
+ another for serializing records via `Snapshots` into the expected
150
+ server API format.
151
+
152
+ To implement a serializer, export a class that conforms to the structure
153
+ described by [<Interface> Serializer](/ember-data/release/classes/%3CInterface%3E%20Serializer)
154
+ from the `app/serializers/` directory. An example is below.
155
+
156
+ ```ts
157
+ import EmberObject from '@ember/object';
158
+
159
+ export default class ApplicationSerializer extends EmberObject {
160
+ normalizeResponse(store, schema, rawPayload) {
161
+ return rawPayload;
162
+ }
163
+
164
+ serialize(snapshot, options) {
165
+ const serializedResource = {
166
+ id: snapshot.id,
167
+ type: snapshot.modelName,
168
+ attributes: snapshot.attributes()
169
+ };
170
+
171
+ return serializedResource;
172
+ }
173
+ }
174
+ ```
175
+
176
+
177
+ ### Serializer Resolution
178
+
179
+ `store.serializerFor(name)` will lookup serializers defined in
180
+ `app/serializers/` and return an instance. If no serializer is found, an
181
+ error will be thrown.
182
+
183
+ `serializerFor` first attempts to find a serializer with an exact match on `name`,
184
+ then falls back to checking for the presence of a serializer named `application`.
185
+
186
+ ```ts
187
+ store.serializerFor('author');
188
+
189
+ // lookup paths (in order) =>
190
+ // app/serializers/author.js
191
+ // app/serializers/application.js
192
+ ```
193
+
194
+ Most requests in EmberData are made with respect to a particular `type` (or `modelName`)
195
+ (e.g., "get me the full collection of **books**" or "get me the **employee** whose id is 37"). We
196
+ refer to this as the **primary** resource `type`.
197
+
198
+ Typically `serializerFor` will be used to find a serializer with a name matching that of the primary
199
+ resource `type` for the request, falling back to the `application` serializer for those types that
200
+ do not have a defined serializer. This is often described as a `per-model` or `per-type` strategy
201
+ for defining serializers. However, because APIs rarely format payloads per-type but rather
202
+ per-API-version, this may not be a desired strategy.
203
+
204
+ It is recommended that applications define only a single `application` adapter and serializer
205
+ where possible.
206
+
207
+ If you have multiple API formats and the per-type strategy is not viable, one strategy is to
208
+ write an `application` adapter and serializer that make use of `options` to specify the desired
209
+ format when making a request.
210
+
211
+ ### Using a Serializer
212
+
213
+ Any serializer in `app/serializers/` can be looked up by `name` using `store.serializerFor(name)`.
214
+
215
+ ### Default Serializers
216
+
217
+ For applications whose APIs are *very close to* or *exactly* the **REST** format or **JSON:API**
218
+ format the `@ember-data-mirror/serializer` package contains implementations these applications can
219
+ extend. It also contains a simple `JSONSerializer` for serializing to/from very basic JSON objects.
220
+
221
+ Many applications will find writing their own serializer to be more performant and less
222
+ complex than extending these classes even when their API format is very close to that expected
223
+ by these serializers.
224
+
225
+ It is recommended that apps write their own serializer to best suit the needs of their API and
226
+ application.
227
+
228
+ @module @ember-data-mirror/serializer
229
+ @main @ember-data-mirror/serializer
230
+ */
231
+
232
+ /**
233
+ > ⚠️ CAUTION you likely want the docs for [<Interface> Serializer](/ember-data/release/classes/%3CInterface%3E%20Serializer)
234
+ > as extending this abstract class is unnecessary.
235
+
236
+ `Serializer` is an abstract base class that you may override in your
237
+ application to customize it for your backend. The minimum set of methods
238
+ that you should implement is:
239
+
240
+ * `normalizeResponse()`
241
+ * `serialize()`
242
+
243
+ And you can optionally override the following methods:
244
+
245
+ * `normalize()`
246
+
247
+ For an example implementation, see
248
+ [JSONSerializer](JSONSerializer), the included JSON serializer.
249
+
250
+ @class Serializer
251
+ @public
252
+ @extends Ember.EmberObject
253
+ */
254
+
255
+ class Serializer extends EmberObject {
256
+ static {
257
+ decorateFieldV2(this.prototype, "store", [inject]);
258
+ }
259
+ #store = (initializeDeferredDecorator(this, "store"), void 0);
260
+ /**
261
+ The `store` property is the application's `store` that contains
262
+ all records. It can be used to look up serializers for other model
263
+ types that may be nested inside the payload response.
264
+ Example:
265
+ ```js
266
+ Serializer.extend({
267
+ extractRelationship(relationshipModelName, relationshipHash) {
268
+ let modelClass = this.store.modelFor(relationshipModelName);
269
+ let relationshipSerializer = this.store.serializerFor(relationshipModelName);
270
+ return relationshipSerializer.normalize(modelClass, relationshipHash);
271
+ }
272
+ });
273
+ ```
274
+ @property store
275
+ @type {Store}
276
+ @public
277
+ */
278
+
279
+ /**
280
+ The `normalizeResponse` method is used to normalize a payload from the
281
+ server to a JSON-API Document.
282
+ http://jsonapi.org/format/#document-structure
283
+ Example:
284
+ ```js
285
+ Serializer.extend({
286
+ normalizeResponse(store, primaryModelClass, payload, id, requestType) {
287
+ if (requestType === 'findRecord') {
288
+ return this.normalize(primaryModelClass, payload);
289
+ } else {
290
+ return payload.reduce(function(documentHash, item) {
291
+ let { data, included } = this.normalize(primaryModelClass, item);
292
+ documentHash.included.push(...included);
293
+ documentHash.data.push(data);
294
+ return documentHash;
295
+ }, { data: [], included: [] })
296
+ }
297
+ }
298
+ });
299
+ ```
300
+ @since 1.13.0
301
+ @method normalizeResponse
302
+ @public
303
+ @param {Store} store
304
+ @param {Model} primaryModelClass
305
+ @param {Object} payload
306
+ @param {String|Number} id
307
+ @param {String} requestType
308
+ @return {Object} JSON-API Document
309
+ */
310
+
311
+ /**
312
+ The `serialize` method is used when a record is saved in order to convert
313
+ the record into the form that your external data source expects.
314
+ `serialize` takes an optional `options` hash with a single option:
315
+ - `includeId`: If this is `true`, `serialize` should include the ID
316
+ in the serialized object it builds.
317
+ Example:
318
+ ```js
319
+ Serializer.extend({
320
+ serialize(snapshot, options) {
321
+ let json = {
322
+ id: snapshot.id
323
+ };
324
+ snapshot.eachAttribute((key, attribute) => {
325
+ json[key] = snapshot.attr(key);
326
+ });
327
+ snapshot.eachRelationship((key, relationship) => {
328
+ if (relationship.kind === 'belongsTo') {
329
+ json[key] = snapshot.belongsTo(key, { id: true });
330
+ } else if (relationship.kind === 'hasMany') {
331
+ json[key] = snapshot.hasMany(key, { ids: true });
332
+ }
333
+ });
334
+ return json;
335
+ },
336
+ });
337
+ ```
338
+ @method serialize
339
+ @public
340
+ @param {Snapshot} snapshot
341
+ @param {Object} [options]
342
+ @return {Object}
343
+ */
344
+
345
+ /**
346
+ The `normalize` method is used to convert a payload received from your
347
+ external data source into the normalized form `store.push()` expects. You
348
+ should override this method, munge the hash and return the normalized
349
+ payload.
350
+ Example:
351
+ ```js
352
+ Serializer.extend({
353
+ normalize(modelClass, resourceHash) {
354
+ let data = {
355
+ id: resourceHash.id,
356
+ type: modelClass.modelName,
357
+ attributes: resourceHash
358
+ };
359
+ return { data: data };
360
+ }
361
+ })
362
+ ```
363
+ @method normalize
364
+ @public
365
+ @param {Model} typeClass
366
+ @param {Object} hash
367
+ @return {Object}
368
+ */
369
+ normalize(_typeClass, hash) {
370
+ return hash;
371
+ }
372
+ }
373
+ export { Serializer as default };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../node_modules/.pnpm/decorator-transforms@2.0.0_@babel+core@7.24.5/node_modules/decorator-transforms/dist/chunk-3SQBS3Y5.js","../src/index.ts"],"sourcesContent":["import {\n __export\n} from \"./chunk-CSAU5B4Q.js\";\n\n// src/runtime.ts\nvar runtime_exports = {};\n__export(runtime_exports, {\n c: () => decorateClass,\n f: () => decorateFieldV1,\n g: () => decorateFieldV2,\n i: () => initializeDeferredDecorator,\n m: () => decorateMethodV1,\n n: () => decorateMethodV2,\n p: () => decoratePOJO\n});\nvar deferred = /* @__PURE__ */ new WeakMap();\nfunction deferDecorator(proto, prop, desc) {\n let map = deferred.get(proto);\n if (!map) {\n map = /* @__PURE__ */ new Map();\n deferred.set(proto, map);\n }\n map.set(prop, desc);\n}\nfunction findDeferredDecorator(target, prop) {\n let cursor = target.prototype;\n while (cursor) {\n let desc = deferred.get(cursor)?.get(prop);\n if (desc) {\n return desc;\n }\n cursor = cursor.prototype;\n }\n}\nfunction decorateFieldV1(target, prop, decorators, initializer) {\n return decorateFieldV2(target.prototype, prop, decorators, initializer);\n}\nfunction decorateFieldV2(prototype, prop, decorators, initializer) {\n let desc = {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n };\n if (initializer) {\n desc.initializer = initializer;\n }\n for (let decorator of decorators) {\n desc = decorator(prototype, prop, desc) || desc;\n }\n if (desc.initializer === void 0) {\n Object.defineProperty(prototype, prop, desc);\n } else {\n deferDecorator(prototype, prop, desc);\n }\n}\nfunction decorateMethodV1({ prototype }, prop, decorators) {\n return decorateMethodV2(prototype, prop, decorators);\n}\nfunction decorateMethodV2(prototype, prop, decorators) {\n const origDesc = Object.getOwnPropertyDescriptor(prototype, prop);\n let desc = { ...origDesc };\n for (let decorator of decorators) {\n desc = decorator(prototype, prop, desc) || desc;\n }\n if (desc.initializer !== void 0) {\n desc.value = desc.initializer ? desc.initializer.call(prototype) : void 0;\n desc.initializer = void 0;\n }\n Object.defineProperty(prototype, prop, desc);\n}\nfunction initializeDeferredDecorator(target, prop) {\n let desc = findDeferredDecorator(target.constructor, prop);\n if (desc) {\n Object.defineProperty(target, prop, {\n enumerable: desc.enumerable,\n configurable: desc.configurable,\n writable: desc.writable,\n value: desc.initializer ? desc.initializer.call(target) : void 0\n });\n }\n}\nfunction decorateClass(target, decorators) {\n return decorators.reduce(\n (accum, decorator) => decorator(accum) || accum,\n target\n );\n}\nfunction decoratePOJO(pojo, decorated) {\n for (let [type, prop, decorators] of decorated) {\n if (type === \"field\") {\n decoratePojoField(pojo, prop, decorators);\n } else {\n decorateMethodV2(pojo, prop, decorators);\n }\n }\n return pojo;\n}\nfunction decoratePojoField(pojo, prop, decorators) {\n let desc = {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: () => Object.getOwnPropertyDescriptor(pojo, prop)?.value\n };\n for (let decorator of decorators) {\n desc = decorator(pojo, prop, desc) || desc;\n }\n if (desc.initializer) {\n desc.value = desc.initializer.call(pojo);\n delete desc.initializer;\n }\n Object.defineProperty(pojo, prop, desc);\n}\n\nexport {\n decorateFieldV1,\n decorateFieldV2,\n decorateMethodV1,\n decorateMethodV2,\n initializeDeferredDecorator,\n decorateClass,\n decoratePOJO,\n runtime_exports\n};\n//# sourceMappingURL=chunk-3SQBS3Y5.js.map","/**\n ## Overview\n\n <blockquote style=\"margin: 1em; padding: .1em 1em .1em 1em; border-left: solid 1em #E34C32; background: #e0e0e0;\">\n <p>\n ⚠️ <strong>This is LEGACY documentation</strong> for a feature that is no longer encouraged to be used.\n If starting a new app or thinking of implementing a new serializer, consider writing a\n <a href=\"/ember-data/release/classes/%3CInterface%3E%20Handler\">Handler</a> instead to be used with the <a href=\"https://github.com/emberjs/data/tree/main/packages/request#readme\">RequestManager</a>\n </p>\n </blockquote>\n\n In order to properly manage and present your data, EmberData\n needs to understand the structure of data it receives.\n\n `Serializers` convert data between the server's API format and\n the format EmberData understands.\n\n Data received from an API response is **normalized** into\n [JSON:API](https://jsonapi.org/) (the format used internally\n by EmberData), while data sent to an API is **serialized**\n into the format the API expects.\n\n ### Implementing a Serializer\n\n There are only two required serializer methods, one for\n normalizing data from the server API format into JSON:API, and\n another for serializing records via `Snapshots` into the expected\n server API format.\n\n To implement a serializer, export a class that conforms to the structure\n described by [<Interface> Serializer](/ember-data/release/classes/%3CInterface%3E%20Serializer)\n from the `app/serializers/` directory. An example is below.\n\n ```ts\n import EmberObject from '@ember/object';\n\n export default class ApplicationSerializer extends EmberObject {\n normalizeResponse(store, schema, rawPayload) {\n return rawPayload;\n }\n\n serialize(snapshot, options) {\n const serializedResource = {\n id: snapshot.id,\n type: snapshot.modelName,\n attributes: snapshot.attributes()\n };\n\n return serializedResource;\n }\n }\n ```\n\n\n ### Serializer Resolution\n\n `store.serializerFor(name)` will lookup serializers defined in\n `app/serializers/` and return an instance. If no serializer is found, an\n error will be thrown.\n\n `serializerFor` first attempts to find a serializer with an exact match on `name`,\n then falls back to checking for the presence of a serializer named `application`.\n\n ```ts\n store.serializerFor('author');\n\n // lookup paths (in order) =>\n // app/serializers/author.js\n // app/serializers/application.js\n ```\n\n Most requests in EmberData are made with respect to a particular `type` (or `modelName`)\n (e.g., \"get me the full collection of **books**\" or \"get me the **employee** whose id is 37\"). We\n refer to this as the **primary** resource `type`.\n\n Typically `serializerFor` will be used to find a serializer with a name matching that of the primary\n resource `type` for the request, falling back to the `application` serializer for those types that\n do not have a defined serializer. This is often described as a `per-model` or `per-type` strategy\n for defining serializers. However, because APIs rarely format payloads per-type but rather\n per-API-version, this may not be a desired strategy.\n\n It is recommended that applications define only a single `application` adapter and serializer\n where possible.\n\n If you have multiple API formats and the per-type strategy is not viable, one strategy is to\n write an `application` adapter and serializer that make use of `options` to specify the desired\n format when making a request.\n\n ### Using a Serializer\n\n Any serializer in `app/serializers/` can be looked up by `name` using `store.serializerFor(name)`.\n\n ### Default Serializers\n\n For applications whose APIs are *very close to* or *exactly* the **REST** format or **JSON:API**\n format the `@ember-data-mirror/serializer` package contains implementations these applications can\n extend. It also contains a simple `JSONSerializer` for serializing to/from very basic JSON objects.\n\n Many applications will find writing their own serializer to be more performant and less\n complex than extending these classes even when their API format is very close to that expected\n by these serializers.\n\n It is recommended that apps write their own serializer to best suit the needs of their API and\n application.\n\n @module @ember-data-mirror/serializer\n @main @ember-data-mirror/serializer\n*/\n\nimport EmberObject from '@ember/object';\nimport { inject as service } from '@ember/service';\n\nimport type Store from '@ember-data-mirror/store';\nimport type { ModelSchema } from '@ember-data-mirror/store/types';\nimport type { EmptyResourceDocument, SingleResourceDocument } from '@warp-drive-mirror/core-types/spec/json-api-raw';\n\n/**\n > ⚠️ CAUTION you likely want the docs for [<Interface> Serializer](/ember-data/release/classes/%3CInterface%3E%20Serializer)\n > as extending this abstract class is unnecessary.\n\n `Serializer` is an abstract base class that you may override in your\n application to customize it for your backend. The minimum set of methods\n that you should implement is:\n\n * `normalizeResponse()`\n * `serialize()`\n\n And you can optionally override the following methods:\n\n * `normalize()`\n\n For an example implementation, see\n [JSONSerializer](JSONSerializer), the included JSON serializer.\n\n @class Serializer\n @public\n @extends Ember.EmberObject\n*/\n\nexport default class extends EmberObject {\n @service declare store: Store;\n /**\n The `store` property is the application's `store` that contains\n all records. It can be used to look up serializers for other model\n types that may be nested inside the payload response.\n\n Example:\n\n ```js\n Serializer.extend({\n extractRelationship(relationshipModelName, relationshipHash) {\n let modelClass = this.store.modelFor(relationshipModelName);\n let relationshipSerializer = this.store.serializerFor(relationshipModelName);\n return relationshipSerializer.normalize(modelClass, relationshipHash);\n }\n });\n ```\n\n @property store\n @type {Store}\n @public\n */\n\n /**\n The `normalizeResponse` method is used to normalize a payload from the\n server to a JSON-API Document.\n\n http://jsonapi.org/format/#document-structure\n\n Example:\n\n ```js\n Serializer.extend({\n normalizeResponse(store, primaryModelClass, payload, id, requestType) {\n if (requestType === 'findRecord') {\n return this.normalize(primaryModelClass, payload);\n } else {\n return payload.reduce(function(documentHash, item) {\n let { data, included } = this.normalize(primaryModelClass, item);\n documentHash.included.push(...included);\n documentHash.data.push(data);\n return documentHash;\n }, { data: [], included: [] })\n }\n }\n });\n ```\n\n @since 1.13.0\n @method normalizeResponse\n @public\n @param {Store} store\n @param {Model} primaryModelClass\n @param {Object} payload\n @param {String|Number} id\n @param {String} requestType\n @return {Object} JSON-API Document\n */\n\n /**\n The `serialize` method is used when a record is saved in order to convert\n the record into the form that your external data source expects.\n\n `serialize` takes an optional `options` hash with a single option:\n\n - `includeId`: If this is `true`, `serialize` should include the ID\n in the serialized object it builds.\n\n Example:\n\n ```js\n Serializer.extend({\n serialize(snapshot, options) {\n let json = {\n id: snapshot.id\n };\n\n snapshot.eachAttribute((key, attribute) => {\n json[key] = snapshot.attr(key);\n });\n\n snapshot.eachRelationship((key, relationship) => {\n if (relationship.kind === 'belongsTo') {\n json[key] = snapshot.belongsTo(key, { id: true });\n } else if (relationship.kind === 'hasMany') {\n json[key] = snapshot.hasMany(key, { ids: true });\n }\n });\n\n return json;\n },\n });\n ```\n\n @method serialize\n @public\n @param {Snapshot} snapshot\n @param {Object} [options]\n @return {Object}\n */\n\n /**\n The `normalize` method is used to convert a payload received from your\n external data source into the normalized form `store.push()` expects. You\n should override this method, munge the hash and return the normalized\n payload.\n\n Example:\n\n ```js\n Serializer.extend({\n normalize(modelClass, resourceHash) {\n let data = {\n id: resourceHash.id,\n type: modelClass.modelName,\n attributes: resourceHash\n };\n return { data: data };\n }\n })\n ```\n\n @method normalize\n @public\n @param {Model} typeClass\n @param {Object} hash\n @return {Object}\n */\n normalize(_typeClass: ModelSchema, hash: Record<string, unknown>): SingleResourceDocument | EmptyResourceDocument {\n return hash as unknown as SingleResourceDocument;\n }\n}\n"],"names":["runtime_exports","__export","c","decorateClass","f","decorateFieldV1","g","decorateFieldV2","i","initializeDeferredDecorator","m","decorateMethodV1","n","decorateMethodV2","p","decoratePOJO","deferred","WeakMap","deferDecorator","proto","prop","desc","map","get","Map","set","findDeferredDecorator","target","cursor","prototype","decorators","initializer","configurable","enumerable","writable","decorator","Object","defineProperty","origDesc","getOwnPropertyDescriptor","value","call","constructor","reduce","accum","pojo","decorated","type","decoratePojoField","EmberObject","service","void 0","normalize","_typeClass","hash"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,eAAA,GAAA,EAAA,CAAA;AAAAC,QAAA,CAAAD,eAAA,EAAA;EAAAE,CAAA,EAAAA,MAAAC,aAAA;EAAAC,CAAA,EAAAA,MAAAC,eAAA;EAAAC,CAAA,EAAAA,MAAAC,eAAA;EAAAC,CAAA,EAAAA,MAAAC,2BAAA;EAAAC,CAAA,EAAAA,MAAAC,gBAAA;EAAAC,CAAA,EAAAA,MAAAC,gBAAA;EAAAC,CAAA,EAAAA,MAAAC,YAAAA;AAAA,CAAA,CAAA,CAAA;AAuBA,IAAMC,QAAA,kBAGEC,IAAAA,OAAA,EAAQ,CAAA;AAEhB,SAASC,eACPC,KAAA,EACAC,IAAA,EACAC,IAAA,EACM;AACN,EAAA,IAAIC,GAAA,GAAMN,QAAA,CAASO,GAAA,CAAIJ,KAAK,CAAA,CAAA;EAC5B,IAAI,CAACG,GAAA,EAAK;IACRA,GAAA,kBAAUE,IAAAA,GAAA,EAAI,CAAA;AACdR,IAAAA,QAAA,CAASS,GAAA,CAAIN,KAAA,EAAOG,GAAG,CAAA,CAAA;AACzB,GAAA;AACAA,EAAAA,GAAA,CAAIG,GAAA,CAAIL,IAAA,EAAMC,IAAI,CAAA,CAAA;AACpB,CAAA;AAEA,SAASK,qBACPC,CAAAA,MAAA,EACAP,IAAA,EACwB;AACxB,EAAA,IAAIQ,MAAA,GAAkBD,MAAA,CAAeE,SAAA,CAAA;AACrC,EAAA,OAAOD,MAAA,EAAQ;IACb,IAAIP,IAAA,GAAOL,QAAA,CAASO,GAAA,CAAIK,MAAM,CAAA,EAAGL,GAAA,CAAIH,IAAI,CAAA,CAAA;AACzC,IAAA,IAAIC,IAAA,EAAM;AACR,MAAA,OAAOA,IAAA,CAAA;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C,cAAA,CAAeQ,IAAA,EAAMzB,IAAA,EAAMC,IAAI,CAAA,CAAA;AACxC;;AC3KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEe,gBAAA,SAAc4B,WAAW,CAAC;AAAA,EAAA;IAAA3C,eAAA,CAAA,IAAA,CAAAuB,SAAA,EAAA,OAAA,EAAA,CACtCqB,MAAO,CAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAAA,MAAA,IAAA1C,2BAAA,CAAA,IAAA,EAAA,OAAA,CAAA,EAAA2C,KAAA,CAAA,EAAA;AACR;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAME;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIEC,EAAAA,SAASA,CAACC,UAAuB,EAAEC,IAA6B,EAAkD;AAChH,IAAA,OAAOA,IAAI,CAAA;AACb,GAAA;AACF;;;;","x_google_ignoreList":[0]}