@warp-drive-mirror/build-config 0.0.0-alpha.19 → 0.0.0-alpha.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,821 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const EmbroiderMacros = require('@embroider/macros/src/node.js');
6
+ const semver = require('semver');
7
+ const fs = require('fs');
8
+ const path = require('path');
9
+
10
+ var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
11
+ function getEnv() {
12
+ const {
13
+ EMBER_ENV,
14
+ IS_TESTING,
15
+ EMBER_CLI_TEST_COMMAND,
16
+ NODE_ENV
17
+ } = process.env;
18
+ const PRODUCTION = EMBER_ENV === 'production' || !EMBER_ENV && NODE_ENV === 'production';
19
+ const DEBUG = !PRODUCTION;
20
+ const TESTING = DEBUG || Boolean(EMBER_ENV === 'test' || IS_TESTING || EMBER_CLI_TEST_COMMAND);
21
+ return {
22
+ TESTING,
23
+ PRODUCTION,
24
+ DEBUG
25
+ };
26
+ }
27
+
28
+ // ========================
29
+ // FOR CONTRIBUTING AUTHORS
30
+ //
31
+ // Deprecations here should also have guides PR'd to the emberjs deprecation app
32
+ //
33
+ // github: https://github.com/ember-learn/deprecation-app
34
+ // website: https://deprecations.emberjs.com
35
+ //
36
+ // Each deprecation should also be given an associated URL pointing to the
37
+ // relevant guide.
38
+ //
39
+ // URLs should be of the form: https://deprecations.emberjs.com/v<major>.x#toc_<fileName>
40
+ // where <major> is the major version of the deprecation and <fileName> is the
41
+ // name of the markdown file in the guides repo.
42
+ //
43
+ // ========================
44
+ //
45
+
46
+ /**
47
+ * ## Deprecations
48
+ *
49
+ * EmberData allows users to opt-in and remove code that exists to support deprecated
50
+ * behaviors.
51
+ *
52
+ * If your app has resolved all deprecations present in a given version,
53
+ * you may specify that version as your "compatibility" version to remove
54
+ * the code that supported the deprecated behavior from your app.
55
+ *
56
+ * For instance, if a deprecation was introduced in 3.13, and the app specifies
57
+ * 3.13 as its minimum version compatibility, any deprecations introduced before
58
+ * or during 3.13 would be stripped away.
59
+ *
60
+ * An app can use a different version than what it specifies as it's compatibility
61
+ * version. For instance, an App could be using `3.16` while specifying compatibility
62
+ * with `3.12`. This would remove any deprecations that were present in or before `3.12`
63
+ * but keep support for anything deprecated in or above `3.13`.
64
+ *
65
+ * ### Configuring Compatibility
66
+ *
67
+ * To configure your compatibility version, set the `compatWith` to the version you
68
+ * are compatible with on the `emberData` config in your `ember-cli-build.js` file.
69
+ *
70
+ * ```js
71
+ * let app = new EmberApp(defaults, {
72
+ * emberData: {
73
+ * compatWith: '3.12',
74
+ * },
75
+ * });
76
+ * ```
77
+ *
78
+ * Alternatively, individual deprecations can be resolved (and thus have its support stripped)
79
+ * via one of the flag names listed below. For instance, given a flag named `DEPRECATE_FOO_BEHAVIOR`.
80
+ *
81
+ * This capability is interopable with `compatWith`. You may set `compatWith` and then selectively resolve
82
+ * additional deprecations, or set compatWith and selectively un-resolve specific deprecations.
83
+ *
84
+ * Note: EmberData does not test against permutations of deprecations being stripped, our tests run against
85
+ * "all deprecated code included" and "all deprecated code removed". Unspecified behavior may sometimes occur
86
+ * when removing code for only some deprecations associated to a version number.
87
+ *
88
+ * ```js
89
+ * let app = new EmberApp(defaults, {
90
+ * emberData: {
91
+ * deprecations: {
92
+ * DEPRECATE_FOO_BEHAVIOR: false // set to false to strip this code
93
+ * DEPRECATE_BAR_BEHAVIOR: true // force to true to not strip this code
94
+ * }
95
+ * }
96
+ * })
97
+ * ```
98
+ *
99
+ * The complete list of which versions specific deprecations will be removed in
100
+ * can be found [here](https://github.com/emberjs/data/blob/main/packages/build-config/src/virtual/deprecation-versions.ts "List of EmberData Deprecations")
101
+ *
102
+ * @module @warp-drive-mirror/build-config/deprecations
103
+ * @main @warp-drive-mirror/build-config/deprecations
104
+ */
105
+
106
+ /**
107
+ * The following list represents deprecations currently active.
108
+ *
109
+ * Some deprecation flags guard multiple deprecation IDs. All
110
+ * associated IDs are listed.
111
+ *
112
+ * @class CurrentDeprecations
113
+ * @public
114
+ */
115
+ const DEPRECATE_CATCH_ALL = '99.0';
116
+ /**
117
+ * **id: ember-data:deprecate-non-strict-types**
118
+ *
119
+ * Currently, EmberData expects that the `type` property associated with
120
+ * a resource follows several conventions.
121
+ *
122
+ * - The `type` property must be a non-empty string
123
+ * - The `type` property must be singular
124
+ * - The `type` property must be dasherized
125
+ *
126
+ * We are deprecating support for types that do not match this pattern
127
+ * in order to unlock future improvements in which we can support `type`
128
+ * being any string of your choosing.
129
+ *
130
+ * The goal is that in the future, you will be able to use any string
131
+ * so long as it matches what your configured cache, identifier generation,
132
+ * and schemas expect.
133
+ *
134
+ * E.G. It will matter not that your string is in a specific format like
135
+ * singular, dasherized, etc. so long as everywhere you refer to the type
136
+ * you use the same string.
137
+ *
138
+ * If using @ember-data-mirror/model, there will always be a restriction that the
139
+ * `type` must match the path on disk where the model is defined.
140
+ *
141
+ * e.g. `app/models/foo/bar-bem.js` must have a type of `foo/bar-bem`
142
+ *
143
+ * @property DEPRECATE_NON_STRICT_TYPES
144
+ * @since 5.3
145
+ * @until 6.0
146
+ * @public
147
+ */
148
+ const DEPRECATE_NON_STRICT_TYPES = '5.3';
149
+
150
+ /**
151
+ * **id: ember-data:deprecate-non-strict-id**
152
+ *
153
+ * Currently, EmberData expects that the `id` property associated with
154
+ * a resource is a string.
155
+ *
156
+ * However, for legacy support in many locations we would accept a number
157
+ * which would then immediately be coerced into a string.
158
+ *
159
+ * We are deprecating this legacy support for numeric IDs.
160
+ *
161
+ * The goal is that in the future, you will be able to use any ID format
162
+ * so long as everywhere you refer to the ID you use the same format.
163
+ *
164
+ * However, for identifiers we will always use string IDs and so any
165
+ * custom identifier configuration should provide a string ID.
166
+ *
167
+ * @property DEPRECATE_NON_STRICT_ID
168
+ * @since 5.3
169
+ * @until 6.0
170
+ * @public
171
+ */
172
+ const DEPRECATE_NON_STRICT_ID = '5.3';
173
+
174
+ /**
175
+ * **id: <none yet assigned>**
176
+ *
177
+ * This is a planned deprecation which will trigger when observer or computed
178
+ * chains are used to watch for changes on any EmberData LiveArray, CollectionRecordArray,
179
+ * ManyArray or PromiseManyArray.
180
+ *
181
+ * Support for these chains is currently guarded by the deprecation flag
182
+ * listed here, enabling removal of the behavior if desired.
183
+ *
184
+ * @property DEPRECATE_COMPUTED_CHAINS
185
+ * @since 5.0
186
+ * @until 6.0
187
+ * @public
188
+ */
189
+ const DEPRECATE_COMPUTED_CHAINS = '5.0';
190
+
191
+ /**
192
+ * **id: ember-data:deprecate-legacy-imports**
193
+ *
194
+ * Deprecates when importing from `ember-data/*` instead of `@ember-data/*`
195
+ * in order to prepare for the eventual removal of the legacy `ember-data/*`
196
+ *
197
+ * All imports from `ember-data/*` should be updated to `@ember-data/*`
198
+ * except for `ember-data/store`. When you are using `ember-data` (as opposed to
199
+ * installing the indivudal packages) you should import from `ember-data/store`
200
+ * instead of `@ember-data-mirror/store` in order to receive the appropriate configuration
201
+ * of defaults.
202
+ *
203
+ * @property DEPRECATE_LEGACY_IMPORTS
204
+ * @since 5.3
205
+ * @until 6.0
206
+ * @public
207
+ */
208
+ const DEPRECATE_LEGACY_IMPORTS = '5.3';
209
+
210
+ /**
211
+ * **id: ember-data:deprecate-non-unique-collection-payloads**
212
+ *
213
+ * Deprecates when the data for a hasMany relationship contains
214
+ * duplicate identifiers.
215
+ *
216
+ * Previously, relationships would silently de-dupe the data
217
+ * when received, but this behavior is being removed in favor
218
+ * of erroring if the same related record is included multiple
219
+ * times.
220
+ *
221
+ * For instance, in JSON:API the below relationship data would
222
+ * be considered invalid:
223
+ *
224
+ * ```json
225
+ * {
226
+ * "data": {
227
+ * "type": "article",
228
+ * "id": "1",
229
+ * "relationships": {
230
+ * "comments": {
231
+ * "data": [
232
+ * { "type": "comment", "id": "1" },
233
+ * { "type": "comment", "id": "2" },
234
+ * { "type": "comment", "id": "1" } // duplicate
235
+ * ]
236
+ * }
237
+ * }
238
+ * }
239
+ * ```
240
+ *
241
+ * To resolve this deprecation, either update your server to
242
+ * not include duplicate data, or implement normalization logic
243
+ * in either a request handler or serializer which removes
244
+ * duplicate data from relationship payloads.
245
+ *
246
+ * @property DEPRECATE_NON_UNIQUE_PAYLOADS
247
+ * @since 5.3
248
+ * @until 6.0
249
+ * @public
250
+ */
251
+ const DEPRECATE_NON_UNIQUE_PAYLOADS = '5.3';
252
+
253
+ /**
254
+ * **id: ember-data:deprecate-relationship-remote-update-clearing-local-state**
255
+ *
256
+ * Deprecates when a relationship is updated remotely and the local state
257
+ * is cleared of all changes except for "new" records.
258
+ *
259
+ * Instead, any records not present in the new payload will be considered
260
+ * "removed" while any records present in the new payload will be considered "added".
261
+ *
262
+ * This allows us to "commit" local additions and removals, preserving any additions
263
+ * or removals that are not yet reflected in the remote state.
264
+ *
265
+ * For instance, given the following initial state:
266
+ *
267
+ * remote: A, B, C
268
+ * local: add D, E
269
+ * remove B, C
270
+ * => A, D, E
271
+ *
272
+ *
273
+ * If after an update, the remote state is now A, B, D, F then the new state will be
274
+ *
275
+ * remote: A, B, D, F
276
+ * local: add E
277
+ * remove B
278
+ * => A, D, E, F
279
+ *
280
+ * Under the old behavior the updated local state would instead have been
281
+ * => A, B, D, F
282
+ *
283
+ * Similarly, if a belongsTo remote State was A while its local state was B,
284
+ * then under the old behavior if the remote state changed to C, the local state
285
+ * would be updated to C. Under the new behavior, the local state would remain B.
286
+ *
287
+ * If the remote state was A while its local state was `null`, then under the old
288
+ * behavior if the remote state changed to C, the local state would be updated to C.
289
+ * Under the new behavior, the local state would remain `null`.
290
+ *
291
+ * Thus the new correct mental model is that the state of the relationship at any point
292
+ * in time is whatever the most recent remote state is, plus any local additions or removals
293
+ * you have made that have not yet been reflected by the remote state.
294
+ *
295
+ * > Note: The old behavior extended to modifying the inverse of a relationship. So if
296
+ * > you had local state not reflected in the new remote state, inverses would be notified
297
+ * > and their state reverted as well when "resetting" the relationship.
298
+ * > Under the new behavior, since the local state is preserved the inverses will also
299
+ * > not be reverted.
300
+ *
301
+ * ### Resolving this deprecation
302
+ *
303
+ * Resolving this deprecation can be done individually for each relationship
304
+ * or globally for all relationships.
305
+ *
306
+ * To resolve it globally, set the `DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE`
307
+ * to `false` in ember-cli-build.js
308
+ *
309
+ * ```js
310
+ * let app = new EmberApp(defaults, {
311
+ * emberData: {
312
+ * deprecations: {
313
+ * // set to false to strip the deprecated code (thereby opting into the new behavior)
314
+ * DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE: false
315
+ * }
316
+ * }
317
+ * })
318
+ * ```
319
+ *
320
+ * To resolve this deprecation on an individual relationship, adjust the `options` passed to
321
+ * the relationship. For relationships with inverses, both sides MUST be migrated to the new
322
+ * behavior at the same time.
323
+ *
324
+ * ```js
325
+ * class Person extends Model {
326
+ * @hasMany('person', {
327
+ * async: false,
328
+ * inverse: null,
329
+ * resetOnRemoteUpdate: false
330
+ * }) children;
331
+ *
332
+ * @belongsTo('person', {
333
+ * async: false,
334
+ * inverse: null,
335
+ * resetOnRemoteUpdate: false
336
+ * }) parent;
337
+ * }
338
+ * ```
339
+ *
340
+ * > Note: false is the only valid value here, all other values (including missing)
341
+ * > will be treated as true, where `true` is the legacy behavior that is now deprecated.
342
+ *
343
+ * Once you have migrated all relationships, you can remove the the resetOnRemoteUpdate
344
+ * option and set the deprecation flag to false in ember-cli-build.
345
+ *
346
+ * ### What if I don't want the new behavior?
347
+ *
348
+ * EmberData's philosophy is to not make assumptions about your application. Where possible
349
+ * we seek out "100%" solutions – solutions that work for all use cases - and where that is
350
+ * not possible we default to "90%" solutions – solutions that work for the vast majority of use
351
+ * cases. In the case of "90%" solutions we look for primitives that allow you to resolve the
352
+ * 10% case in your application. If no such primitives exist, we provide an escape hatch that
353
+ * ensures you can build the behavior you need without adopting the cost of the default solution.
354
+ *
355
+ * In this case, the old behavior was a "40%" solution. The inability for an application developer
356
+ * to determine what changes were made locally, and thus what changes should be preserved, made
357
+ * it impossible to build certain features easily, or in some cases at all. The proliferation of
358
+ * feature requests, bug reports (from folks surprised by the prior behavior) and addon attempts
359
+ * in this space are all evidence of this.
360
+ *
361
+ * We believe the new behavior is a "90%" solution. It works for the vast majority of use cases,
362
+ * often without noticeable changes to existing application behavior, and provides primitives that
363
+ * allow you to build the behavior you need for the remaining 10%.
364
+ *
365
+ * The great news is that this behavior defaults to trusting your API similar to the old behavior.
366
+ * If your API is correct, you will not need to make any changes to your application to adopt
367
+ * the new behavior.
368
+ *
369
+ * This means the 10% cases are those where you can't trust your API to provide the correct
370
+ * information. In these cases, because you now have cheap access to a diff of the relationship
371
+ * state, there are a few options that weren't available before:
372
+ *
373
+ * - you can adjust returned API payloads to contain the expected changes that it doesn't include
374
+ * - you can modify local state by adding or removing records on the HasMany record array to remove
375
+ * any local changes that were not returned by the API.
376
+ * - you can use `<Cache>.mutate(mutation)` to directly modify the local cache state of the relationship
377
+ * to match the expected state.
378
+ *
379
+ * What this version (5.3) does not yet provide is a way to directly modify the cache's remote state
380
+ * for the relationship via public APIs other than via the broader action of upserting a response via
381
+ * `<Cache>.put(document)`. However, such an API was sketched in the Cache 2.1 RFC
382
+ * `<Cache>.patch(operation)` and is likely to be added in a future 5.x release of EmberData.
383
+ *
384
+ * This version (5.3) also does not yet provide a way to directly modify the graph (a general purpose
385
+ * subset of cache behaviors specific to relationships) via public APIs. However, during the
386
+ * 5.x release series we will be working on finalizing the Graph API and making it public.
387
+ *
388
+ * If none of these options work for you, you can always opt-out more broadly by implementing
389
+ * a custom Cache with the relationship behaviors you need.
390
+ *
391
+ * @property DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE
392
+ * @since 5.3
393
+ * @until 6.0
394
+ * @public
395
+ */
396
+ const DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE = '5.3';
397
+
398
+ /**
399
+ * **id: ember-data:deprecate-many-array-duplicates**
400
+ *
401
+ * When the flag is `true` (default), adding duplicate records to a `ManyArray`
402
+ * is deprecated in non-production environments. In production environments,
403
+ * duplicate records added to a `ManyArray` will be deduped and no error will
404
+ * be thrown.
405
+ *
406
+ * When the flag is `false`, an error will be thrown when duplicates are added.
407
+ *
408
+ * @property DEPRECATE_MANY_ARRAY_DUPLICATES
409
+ * @since 5.3
410
+ * @until 6.0
411
+ * @public
412
+ */
413
+ const DEPRECATE_MANY_ARRAY_DUPLICATES = '5.3';
414
+
415
+ /**
416
+ * **id: ember-data:deprecate-store-extends-ember-object**
417
+ *
418
+ * When the flag is `true` (default), the Store class will extend from `@ember/object`.
419
+ * When the flag is `false` or `ember-source` is not present, the Store will not extend
420
+ * from EmberObject.
421
+ *
422
+ * @property DEPRECATE_STORE_EXTENDS_EMBER_OBJECT
423
+ * @since 5.4
424
+ * @until 6.0
425
+ * @public
426
+ */
427
+ const DEPRECATE_STORE_EXTENDS_EMBER_OBJECT = '5.4';
428
+
429
+ /**
430
+ * **id: ember-data:schema-service-updates**
431
+ *
432
+ * When the flag is `true` (default), the legacy schema
433
+ * service features will be enabled on the store and
434
+ * the service, and deprecations will be thrown when
435
+ * they are used.
436
+ *
437
+ * Deprecated features include:
438
+ *
439
+ * - `Store.registerSchema` method is deprecated in favor of the `Store.createSchemaService` hook
440
+ * - `Store.registerSchemaDefinitionService` method is deprecated in favor of the `Store.createSchemaService` hook
441
+ * - `Store.getSchemaDefinitionService` method is deprecated in favor of `Store.schema` property
442
+ * - `SchemaService.doesTypeExist` method is deprecated in favor of the `SchemaService.hasResource` method
443
+ * - `SchemaService.attributesDefinitionFor` method is deprecated in favor of the `SchemaService.fields` method
444
+ * - `SchemaService.relationshipsDefinitionFor` method is deprecated in favor of the `SchemaService.fields` method
445
+ *
446
+ * @property ENABLE_LEGACY_SCHEMA_SERVICE
447
+ * @since 5.4
448
+ * @until 6.0
449
+ * @public
450
+ */
451
+ const ENABLE_LEGACY_SCHEMA_SERVICE = '5.4';
452
+
453
+ const CURRENT_DEPRECATIONS = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
454
+ __proto__: null,
455
+ DEPRECATE_CATCH_ALL,
456
+ DEPRECATE_COMPUTED_CHAINS,
457
+ DEPRECATE_LEGACY_IMPORTS,
458
+ DEPRECATE_MANY_ARRAY_DUPLICATES,
459
+ DEPRECATE_NON_STRICT_ID,
460
+ DEPRECATE_NON_STRICT_TYPES,
461
+ DEPRECATE_NON_UNIQUE_PAYLOADS,
462
+ DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE,
463
+ DEPRECATE_STORE_EXTENDS_EMBER_OBJECT,
464
+ ENABLE_LEGACY_SCHEMA_SERVICE
465
+ }, Symbol.toStringTag, { value: 'Module' }));
466
+
467
+ function deprecationIsResolved(deprecatedSince, compatVersion) {
468
+ return semver.lte(semver.minVersion(deprecatedSince), semver.minVersion(compatVersion));
469
+ }
470
+ function getDeprecations(compatVersion) {
471
+ const flags = {};
472
+ const keys = Object.keys(CURRENT_DEPRECATIONS);
473
+ keys.forEach(flag => {
474
+ const deprecatedSince = CURRENT_DEPRECATIONS[flag];
475
+ let flagState = true; // default to no code-stripping
476
+
477
+ // if we are told we are compatible with a version
478
+ // we check if we can strip this flag
479
+ if (compatVersion) {
480
+ const isResolved = deprecationIsResolved(deprecatedSince, compatVersion);
481
+ // if we've resolved, we strip (by setting the flag to false)
482
+ /*
483
+ if (DEPRECATED_FEATURE) {
484
+ // deprecated code path
485
+ } else {
486
+ // if needed a non-deprecated code path
487
+ }
488
+ */
489
+ flagState = !isResolved;
490
+ }
491
+
492
+ // console.log(`${flag}=${flagState} (${deprecatedSince} <= ${compatVersion})`);
493
+ flags[flag] = flagState;
494
+ });
495
+ return flags;
496
+ }
497
+
498
+ /**
499
+ * ## Canary Features
500
+ *
501
+ * EmberData allows users to test features that are implemented but not yet
502
+ * available even in canary.
503
+ *
504
+ * Typically these features represent work that might introduce a new concept,
505
+ * new API, change an API, or risk an unintended change in behavior to consuming
506
+ * applications.
507
+ *
508
+ * Such features have their implementations guarded by a "feature flag", and the
509
+ * flag is only activated once the core-data team is prepared to ship the work
510
+ * in a canary release.
511
+ *
512
+ * ### Installing Canary
513
+ *
514
+ * To test a feature you MUST be using a canary build. Canary builds are published
515
+ * to `npm` and can be installed using a precise tag (such as `ember-data@3.16.0-alpha.1`)
516
+ * or by installing the latest dist-tag published to the `canary` channel using your javascript
517
+ * package manager of choice. For instance with [pnpm](https://pnpm.io/)
518
+
519
+ ```cli
520
+ pnpm add ember-data@canary
521
+ ```
522
+ *
523
+ * ### Activating a Canary Feature
524
+ *
525
+ * Once you have installed canary, feature-flags can be activated at build-time
526
+ *
527
+ * by setting an environment variable:
528
+ *
529
+ * ```cli
530
+ * # Activate a single flag
531
+ * EMBER_DATA_FEATURE_OVERRIDE=SOME_FLAG ember build
532
+ *
533
+ * # Activate multiple flags by separating with commas
534
+ * EMBER_DATA_FEATURE_OVERRIDE=SOME_FLAG,OTHER_FLAG ember build
535
+ *
536
+ * # Activate all flags
537
+ * EMBER_DATA_FEATURE_OVERRIDE=ENABLE_ALL_OPTIONAL ember build
538
+ * ```
539
+ *
540
+ * or by setting the appropriate flag in your `ember-cli-build` file:
541
+ *
542
+ * ```ts
543
+ * let app = new EmberApp(defaults, {
544
+ * emberData: {
545
+ * features: {
546
+ * SAMPLE_FEATURE_FLAG: false // utliize existing behavior, strip code for the new feature
547
+ * OTHER_FEATURE_FLAG: true // utilize this new feature, strip code for the older behavior
548
+ * }
549
+ * }
550
+ * })
551
+ * ```
552
+ *
553
+ * **The "off" branch of feature-flagged code is always stripped from production builds.**
554
+ *
555
+ * The list of available feature-flags is located [here](https://github.com/emberjs/data/tree/main/packages/build-config/src/virtual/canary-features.ts "List of EmberData FeatureFlags")
556
+ *
557
+ *
558
+ * ### Preparing a Project to use a Canary Feature
559
+ *
560
+ * For most projects, simple version detection should be enough.
561
+ * Using the provided version compatibility helpers from [embroider-macros](https://github.com/embroider-build/embroider/tree/main/packages/macros#readme)
562
+ * the following can be done:
563
+ *
564
+ * ```js
565
+ * if (macroCondition(dependencySatisfies('@ember-data-mirror/store', '5.0'))) {
566
+ * // do thing
567
+ * }
568
+ * ```
569
+ *
570
+ @module @warp-drive-mirror/build-config/canary-features
571
+ @main @warp-drive-mirror/build-config/canary-features
572
+ */
573
+ /**
574
+ This is the current list of features used at build time for canary releases.
575
+ If empty there are no features currently gated by feature flags.
576
+
577
+ The valid values are:
578
+
579
+ - `true` | The feature is **enabled** at all times, and cannot be disabled.
580
+ - `false` | The feature is **disabled** at all times, and cannot be enabled.
581
+ - `null` | The feature is **disabled by default**, but can be enabled via configuration.
582
+
583
+ @class CanaryFeatureFlags
584
+ @public
585
+ */
586
+ const SAMPLE_FEATURE_FLAG = null;
587
+
588
+ const CURRENT_FEATURES = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
589
+ __proto__: null,
590
+ SAMPLE_FEATURE_FLAG
591
+ }, Symbol.toStringTag, { value: 'Module' }));
592
+
593
+ const dirname = new URL((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('cjs-set-config.cjs', document.baseURI).href))).pathname;
594
+ const relativePkgPath = path.join(dirname, '../../package.json');
595
+ const version = JSON.parse(fs.readFileSync(relativePkgPath, 'utf-8')).version;
596
+ const isCanary = version.includes('alpha');
597
+ function getFeatures(isProd) {
598
+ const features = Object.assign({}, CURRENT_FEATURES);
599
+ const keys = Object.keys(features);
600
+ if (!isCanary) {
601
+ // disable all features with a current value of `null`
602
+ for (const feature of keys) {
603
+ let featureValue = features[feature];
604
+ if (featureValue === null) {
605
+ features[feature] = false;
606
+ }
607
+ }
608
+ return features;
609
+ }
610
+ const FEATURE_OVERRIDES = process.env.EMBER_DATA_FEATURE_OVERRIDE;
611
+ if (FEATURE_OVERRIDES === 'ENABLE_ALL_OPTIONAL') {
612
+ // enable all features with a current value of `null`
613
+ for (const feature of keys) {
614
+ let featureValue = features[feature];
615
+ if (featureValue === null) {
616
+ features[feature] = true;
617
+ }
618
+ }
619
+ } else if (FEATURE_OVERRIDES === 'DISABLE_ALL') {
620
+ // disable all features, including those with a value of `true`
621
+ for (const feature of keys) {
622
+ features[feature] = false;
623
+ }
624
+ } else if (FEATURE_OVERRIDES) {
625
+ // enable only the specific features listed in the environment
626
+ // variable (comma separated)
627
+ const forcedFeatures = FEATURE_OVERRIDES.split(',');
628
+ for (let i = 0; i < forcedFeatures.length; i++) {
629
+ let featureName = forcedFeatures[i];
630
+ if (!keys.includes(featureName)) {
631
+ throw new Error(`Unknown feature flag: ${featureName}`);
632
+ }
633
+ features[featureName] = true;
634
+ }
635
+ }
636
+ if (isProd) {
637
+ // disable all features with a current value of `null`
638
+ for (const feature of keys) {
639
+ let featureValue = features[feature];
640
+ if (featureValue === null) {
641
+ features[feature] = false;
642
+ }
643
+ }
644
+ }
645
+ return features;
646
+ }
647
+
648
+ /**
649
+ * ## Debugging
650
+ *
651
+ * Many portions of the internals are helpfully instrumented with logging that can be activated
652
+ * at build time. This instrumentation is always removed from production builds or any builds
653
+ * that has not explicitly activated it. To activate it set the appropriate flag to `true`.
654
+ *
655
+ @module @warp-drive-mirror/build-config/debugging
656
+ @main @warp-drive-mirror/build-config/debugging
657
+ */
658
+ /**
659
+ *
660
+ * Many portions of the internals are helpfully instrumented with logging that can be activated
661
+ at build time. This instrumentation is always removed from production builds or any builds
662
+ that has not explicitly activated it. To activate it set the appropriate flag to `true`.
663
+
664
+ ```ts
665
+ let app = new EmberApp(defaults, {
666
+ emberData: {
667
+ debug: {
668
+ LOG_PAYLOADS: false, // data store received to update cache with
669
+ LOG_OPERATIONS: false, // updates to cache remote state
670
+ LOG_MUTATIONS: false, // updates to cache local state
671
+ LOG_NOTIFICATIONS: false,
672
+ LOG_REQUESTS: false,
673
+ LOG_REQUEST_STATUS: false,
674
+ LOG_IDENTIFIERS: false,
675
+ LOG_GRAPH: false,
676
+ LOG_INSTANCE_CACHE: false,
677
+ }
678
+ }
679
+ });
680
+ ```
681
+
682
+ @class DebugLogging
683
+ @public
684
+ */
685
+ /**
686
+ * log payloads received by the store
687
+ * via `push` or returned from a delete/update/create
688
+ * operation.
689
+ *
690
+ * @property {boolean} LOG_PAYLOADS
691
+ * @public
692
+ */
693
+ const LOG_PAYLOADS = false;
694
+ /**
695
+ * log remote-state updates to the cache
696
+ *
697
+ * @property {boolean} LOG_OPERATIONS
698
+ * @public
699
+ */
700
+ const LOG_OPERATIONS = false;
701
+ /**
702
+ * log local-state updates to the cache
703
+ *
704
+ * @property {boolean} LOG_MUTATIONS
705
+ * @public
706
+ */
707
+ const LOG_MUTATIONS = false;
708
+ /**
709
+ * log notifications received by the NotificationManager
710
+ *
711
+ * @property {boolean} LOG_NOTIFICATIONS
712
+ * @public
713
+ */
714
+ const LOG_NOTIFICATIONS = false;
715
+ /**
716
+ * log requests issued by the RequestManager
717
+ *
718
+ * @property {boolean} LOG_REQUESTS
719
+ * @public
720
+ */
721
+ const LOG_REQUESTS = false;
722
+ /**
723
+ * log updates to requests the store has issued to
724
+ * the network (adapter) to fulfill.
725
+ *
726
+ * @property {boolean} LOG_REQUEST_STATUS
727
+ * @public
728
+ */
729
+ const LOG_REQUEST_STATUS = false;
730
+ /**
731
+ * log peek, generation and updates to
732
+ * Record Identifiers.
733
+ *
734
+ * @property {boolean} LOG_IDENTIFIERS
735
+ * @public
736
+ */
737
+ const LOG_IDENTIFIERS = false;
738
+ /**
739
+ * log updates received by the graph (relationship pointer storage)
740
+ *
741
+ * @property {boolean} LOG_GRAPH
742
+ * @public
743
+ */
744
+ const LOG_GRAPH = false;
745
+ /**
746
+ * log creation/removal of RecordData and Record
747
+ * instances.
748
+ *
749
+ * @property {boolean} LOG_INSTANCE_CACHE
750
+ * @public
751
+ */
752
+ const LOG_INSTANCE_CACHE = false;
753
+
754
+ const LOGGING = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
755
+ __proto__: null,
756
+ LOG_GRAPH,
757
+ LOG_IDENTIFIERS,
758
+ LOG_INSTANCE_CACHE,
759
+ LOG_MUTATIONS,
760
+ LOG_NOTIFICATIONS,
761
+ LOG_OPERATIONS,
762
+ LOG_PAYLOADS,
763
+ LOG_REQUESTS,
764
+ LOG_REQUEST_STATUS
765
+ }, Symbol.toStringTag, { value: 'Module' }));
766
+
767
+ const _MacrosConfig = EmbroiderMacros.MacrosConfig;
768
+ function recastMacrosConfig(macros) {
769
+ if (!('globalConfig' in macros)) {
770
+ throw new Error('Expected MacrosConfig to have a globalConfig property');
771
+ }
772
+ return macros;
773
+ }
774
+ function setConfig(context, appRoot, config) {
775
+ const macros = recastMacrosConfig(_MacrosConfig.for(context, appRoot));
776
+ const isLegacySupport = config.___legacy_support;
777
+ const hasDeprecatedConfig = isLegacySupport && Object.keys(config).length > 1;
778
+ const hasInitiatedConfig = macros.globalConfig['WarpDrive'];
779
+
780
+ // setConfig called by user prior to legacy support called
781
+ if (isLegacySupport && hasInitiatedConfig) {
782
+ if (hasDeprecatedConfig) {
783
+ throw new Error('You have provided a config object to setConfig, but are also using the legacy emberData options key in ember-cli-build. Please remove the emberData key from options.');
784
+ }
785
+ return;
786
+ }
787
+
788
+ // legacy support called prior to user setConfig
789
+ if (isLegacySupport && hasDeprecatedConfig) {
790
+ console.warn(`You are using the legacy emberData key in your ember-cli-build.js file. This key is deprecated and will be removed in the next major version of EmberData/WarpDrive. Please use \`import { setConfig } from '@warp-drive-mirror/build-config';\` instead.`);
791
+ }
792
+
793
+ // included hooks run during class initialization of the EmberApp instance
794
+ // so our hook will run before the user has a chance to call setConfig
795
+ // else we could print a useful message here
796
+ // else if (isLegacySupport) {
797
+ // console.warn(
798
+ // `WarpDrive requires your ember-cli-build file to set a base configuration for the project.\n\nUsage:\n\t\`import { setConfig } from '@warp-drive-mirror/build-config';\n\tsetConfig(app, __dirname, {});\``
799
+ // );
800
+ // }
801
+
802
+ const debugOptions = Object.assign({}, LOGGING, config.debug);
803
+ const env = getEnv();
804
+ const DEPRECATIONS = getDeprecations(config.compatWith || null);
805
+ const FEATURES = getFeatures(env.PRODUCTION);
806
+ const includeDataAdapterInProduction = typeof config.includeDataAdapterInProduction === 'boolean' ? config.includeDataAdapterInProduction : false;
807
+ const includeDataAdapter = env.PRODUCTION ? includeDataAdapterInProduction : false;
808
+ const finalizedConfig = {
809
+ debug: debugOptions,
810
+ polyfillUUID: config.polyfillUUID ?? false,
811
+ includeDataAdapter,
812
+ compatWith: config.compatWith ?? null,
813
+ deprecations: DEPRECATIONS,
814
+ features: FEATURES,
815
+ env
816
+ };
817
+ macros.setGlobalConfig(undefined, 'WarpDrive', finalizedConfig);
818
+ }
819
+
820
+ exports.setConfig = setConfig;
821
+ //# sourceMappingURL=cjs-set-config.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cjs-set-config.cjs","sources":["../src/-private/utils/get-env.ts","../src/deprecation-versions.ts","../src/-private/utils/deprecations.ts","../src/canary-features.ts","../src/-private/utils/features.ts","../src/debugging.ts","../src/index.ts"],"sourcesContent":["export function getEnv() {\n const { EMBER_ENV, IS_TESTING, EMBER_CLI_TEST_COMMAND, NODE_ENV } = process.env;\n const PRODUCTION = EMBER_ENV === 'production' || (!EMBER_ENV && NODE_ENV === 'production');\n const DEBUG = !PRODUCTION;\n const TESTING = DEBUG || Boolean(EMBER_ENV === 'test' || IS_TESTING || EMBER_CLI_TEST_COMMAND);\n\n return {\n TESTING,\n PRODUCTION,\n DEBUG,\n };\n}\n","// ========================\n// FOR CONTRIBUTING AUTHORS\n//\n// Deprecations here should also have guides PR'd to the emberjs deprecation app\n//\n// github: https://github.com/ember-learn/deprecation-app\n// website: https://deprecations.emberjs.com\n//\n// Each deprecation should also be given an associated URL pointing to the\n// relevant guide.\n//\n// URLs should be of the form: https://deprecations.emberjs.com/v<major>.x#toc_<fileName>\n// where <major> is the major version of the deprecation and <fileName> is the\n// name of the markdown file in the guides repo.\n//\n// ========================\n//\n\n/**\n * ## Deprecations\n *\n * EmberData allows users to opt-in and remove code that exists to support deprecated\n * behaviors.\n *\n * If your app has resolved all deprecations present in a given version,\n * you may specify that version as your \"compatibility\" version to remove\n * the code that supported the deprecated behavior from your app.\n *\n * For instance, if a deprecation was introduced in 3.13, and the app specifies\n * 3.13 as its minimum version compatibility, any deprecations introduced before\n * or during 3.13 would be stripped away.\n *\n * An app can use a different version than what it specifies as it's compatibility\n * version. For instance, an App could be using `3.16` while specifying compatibility\n * with `3.12`. This would remove any deprecations that were present in or before `3.12`\n * but keep support for anything deprecated in or above `3.13`.\n *\n * ### Configuring Compatibility\n *\n * To configure your compatibility version, set the `compatWith` to the version you\n * are compatible with on the `emberData` config in your `ember-cli-build.js` file.\n *\n * ```js\n * let app = new EmberApp(defaults, {\n * emberData: {\n * compatWith: '3.12',\n * },\n * });\n * ```\n *\n * Alternatively, individual deprecations can be resolved (and thus have its support stripped)\n * via one of the flag names listed below. For instance, given a flag named `DEPRECATE_FOO_BEHAVIOR`.\n *\n * This capability is interopable with `compatWith`. You may set `compatWith` and then selectively resolve\n * additional deprecations, or set compatWith and selectively un-resolve specific deprecations.\n *\n * Note: EmberData does not test against permutations of deprecations being stripped, our tests run against\n * \"all deprecated code included\" and \"all deprecated code removed\". Unspecified behavior may sometimes occur\n * when removing code for only some deprecations associated to a version number.\n *\n * ```js\n * let app = new EmberApp(defaults, {\n * emberData: {\n * deprecations: {\n * DEPRECATE_FOO_BEHAVIOR: false // set to false to strip this code\n * DEPRECATE_BAR_BEHAVIOR: true // force to true to not strip this code\n * }\n * }\n * })\n * ```\n *\n * The complete list of which versions specific deprecations will be removed in\n * can be found [here](https://github.com/emberjs/data/blob/main/packages/build-config/src/virtual/deprecation-versions.ts \"List of EmberData Deprecations\")\n *\n * @module @warp-drive-mirror/build-config/deprecations\n * @main @warp-drive-mirror/build-config/deprecations\n */\n\n/**\n * The following list represents deprecations currently active.\n *\n * Some deprecation flags guard multiple deprecation IDs. All\n * associated IDs are listed.\n *\n * @class CurrentDeprecations\n * @public\n */\nexport const DEPRECATE_CATCH_ALL = '99.0';\n/**\n * **id: ember-data:deprecate-non-strict-types**\n *\n * Currently, EmberData expects that the `type` property associated with\n * a resource follows several conventions.\n *\n * - The `type` property must be a non-empty string\n * - The `type` property must be singular\n * - The `type` property must be dasherized\n *\n * We are deprecating support for types that do not match this pattern\n * in order to unlock future improvements in which we can support `type`\n * being any string of your choosing.\n *\n * The goal is that in the future, you will be able to use any string\n * so long as it matches what your configured cache, identifier generation,\n * and schemas expect.\n *\n * E.G. It will matter not that your string is in a specific format like\n * singular, dasherized, etc. so long as everywhere you refer to the type\n * you use the same string.\n *\n * If using @ember-data-mirror/model, there will always be a restriction that the\n * `type` must match the path on disk where the model is defined.\n *\n * e.g. `app/models/foo/bar-bem.js` must have a type of `foo/bar-bem`\n *\n * @property DEPRECATE_NON_STRICT_TYPES\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_NON_STRICT_TYPES = '5.3';\n\n/**\n * **id: ember-data:deprecate-non-strict-id**\n *\n * Currently, EmberData expects that the `id` property associated with\n * a resource is a string.\n *\n * However, for legacy support in many locations we would accept a number\n * which would then immediately be coerced into a string.\n *\n * We are deprecating this legacy support for numeric IDs.\n *\n * The goal is that in the future, you will be able to use any ID format\n * so long as everywhere you refer to the ID you use the same format.\n *\n * However, for identifiers we will always use string IDs and so any\n * custom identifier configuration should provide a string ID.\n *\n * @property DEPRECATE_NON_STRICT_ID\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_NON_STRICT_ID = '5.3';\n\n/**\n * **id: <none yet assigned>**\n *\n * This is a planned deprecation which will trigger when observer or computed\n * chains are used to watch for changes on any EmberData LiveArray, CollectionRecordArray,\n * ManyArray or PromiseManyArray.\n *\n * Support for these chains is currently guarded by the deprecation flag\n * listed here, enabling removal of the behavior if desired.\n *\n * @property DEPRECATE_COMPUTED_CHAINS\n * @since 5.0\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_COMPUTED_CHAINS = '5.0';\n\n/**\n * **id: ember-data:deprecate-legacy-imports**\n *\n * Deprecates when importing from `ember-data/*` instead of `@ember-data/*`\n * in order to prepare for the eventual removal of the legacy `ember-data/*`\n *\n * All imports from `ember-data/*` should be updated to `@ember-data/*`\n * except for `ember-data/store`. When you are using `ember-data` (as opposed to\n * installing the indivudal packages) you should import from `ember-data/store`\n * instead of `@ember-data-mirror/store` in order to receive the appropriate configuration\n * of defaults.\n *\n * @property DEPRECATE_LEGACY_IMPORTS\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_LEGACY_IMPORTS = '5.3';\n\n/**\n * **id: ember-data:deprecate-non-unique-collection-payloads**\n *\n * Deprecates when the data for a hasMany relationship contains\n * duplicate identifiers.\n *\n * Previously, relationships would silently de-dupe the data\n * when received, but this behavior is being removed in favor\n * of erroring if the same related record is included multiple\n * times.\n *\n * For instance, in JSON:API the below relationship data would\n * be considered invalid:\n *\n * ```json\n * {\n * \"data\": {\n * \"type\": \"article\",\n * \"id\": \"1\",\n * \"relationships\": {\n * \"comments\": {\n * \"data\": [\n * { \"type\": \"comment\", \"id\": \"1\" },\n * { \"type\": \"comment\", \"id\": \"2\" },\n * { \"type\": \"comment\", \"id\": \"1\" } // duplicate\n * ]\n * }\n * }\n * }\n * ```\n *\n * To resolve this deprecation, either update your server to\n * not include duplicate data, or implement normalization logic\n * in either a request handler or serializer which removes\n * duplicate data from relationship payloads.\n *\n * @property DEPRECATE_NON_UNIQUE_PAYLOADS\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_NON_UNIQUE_PAYLOADS = '5.3';\n\n/**\n * **id: ember-data:deprecate-relationship-remote-update-clearing-local-state**\n *\n * Deprecates when a relationship is updated remotely and the local state\n * is cleared of all changes except for \"new\" records.\n *\n * Instead, any records not present in the new payload will be considered\n * \"removed\" while any records present in the new payload will be considered \"added\".\n *\n * This allows us to \"commit\" local additions and removals, preserving any additions\n * or removals that are not yet reflected in the remote state.\n *\n * For instance, given the following initial state:\n *\n * remote: A, B, C\n * local: add D, E\n * remove B, C\n * => A, D, E\n *\n *\n * If after an update, the remote state is now A, B, D, F then the new state will be\n *\n * remote: A, B, D, F\n * local: add E\n * remove B\n * => A, D, E, F\n *\n * Under the old behavior the updated local state would instead have been\n * => A, B, D, F\n *\n * Similarly, if a belongsTo remote State was A while its local state was B,\n * then under the old behavior if the remote state changed to C, the local state\n * would be updated to C. Under the new behavior, the local state would remain B.\n *\n * If the remote state was A while its local state was `null`, then under the old\n * behavior if the remote state changed to C, the local state would be updated to C.\n * Under the new behavior, the local state would remain `null`.\n *\n * Thus the new correct mental model is that the state of the relationship at any point\n * in time is whatever the most recent remote state is, plus any local additions or removals\n * you have made that have not yet been reflected by the remote state.\n *\n * > Note: The old behavior extended to modifying the inverse of a relationship. So if\n * > you had local state not reflected in the new remote state, inverses would be notified\n * > and their state reverted as well when \"resetting\" the relationship.\n * > Under the new behavior, since the local state is preserved the inverses will also\n * > not be reverted.\n *\n * ### Resolving this deprecation\n *\n * Resolving this deprecation can be done individually for each relationship\n * or globally for all relationships.\n *\n * To resolve it globally, set the `DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE`\n * to `false` in ember-cli-build.js\n *\n * ```js\n * let app = new EmberApp(defaults, {\n * emberData: {\n * deprecations: {\n * // set to false to strip the deprecated code (thereby opting into the new behavior)\n * DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE: false\n * }\n * }\n * })\n * ```\n *\n * To resolve this deprecation on an individual relationship, adjust the `options` passed to\n * the relationship. For relationships with inverses, both sides MUST be migrated to the new\n * behavior at the same time.\n *\n * ```js\n * class Person extends Model {\n * @hasMany('person', {\n * async: false,\n * inverse: null,\n * resetOnRemoteUpdate: false\n * }) children;\n *\n * @belongsTo('person', {\n * async: false,\n * inverse: null,\n * resetOnRemoteUpdate: false\n * }) parent;\n * }\n * ```\n *\n * > Note: false is the only valid value here, all other values (including missing)\n * > will be treated as true, where `true` is the legacy behavior that is now deprecated.\n *\n * Once you have migrated all relationships, you can remove the the resetOnRemoteUpdate\n * option and set the deprecation flag to false in ember-cli-build.\n *\n * ### What if I don't want the new behavior?\n *\n * EmberData's philosophy is to not make assumptions about your application. Where possible\n * we seek out \"100%\" solutions – solutions that work for all use cases - and where that is\n * not possible we default to \"90%\" solutions – solutions that work for the vast majority of use\n * cases. In the case of \"90%\" solutions we look for primitives that allow you to resolve the\n * 10% case in your application. If no such primitives exist, we provide an escape hatch that\n * ensures you can build the behavior you need without adopting the cost of the default solution.\n *\n * In this case, the old behavior was a \"40%\" solution. The inability for an application developer\n * to determine what changes were made locally, and thus what changes should be preserved, made\n * it impossible to build certain features easily, or in some cases at all. The proliferation of\n * feature requests, bug reports (from folks surprised by the prior behavior) and addon attempts\n * in this space are all evidence of this.\n *\n * We believe the new behavior is a \"90%\" solution. It works for the vast majority of use cases,\n * often without noticeable changes to existing application behavior, and provides primitives that\n * allow you to build the behavior you need for the remaining 10%.\n *\n * The great news is that this behavior defaults to trusting your API similar to the old behavior.\n * If your API is correct, you will not need to make any changes to your application to adopt\n * the new behavior.\n *\n * This means the 10% cases are those where you can't trust your API to provide the correct\n * information. In these cases, because you now have cheap access to a diff of the relationship\n * state, there are a few options that weren't available before:\n *\n * - you can adjust returned API payloads to contain the expected changes that it doesn't include\n * - you can modify local state by adding or removing records on the HasMany record array to remove\n * any local changes that were not returned by the API.\n * - you can use `<Cache>.mutate(mutation)` to directly modify the local cache state of the relationship\n * to match the expected state.\n *\n * What this version (5.3) does not yet provide is a way to directly modify the cache's remote state\n * for the relationship via public APIs other than via the broader action of upserting a response via\n * `<Cache>.put(document)`. However, such an API was sketched in the Cache 2.1 RFC\n * `<Cache>.patch(operation)` and is likely to be added in a future 5.x release of EmberData.\n *\n * This version (5.3) also does not yet provide a way to directly modify the graph (a general purpose\n * subset of cache behaviors specific to relationships) via public APIs. However, during the\n * 5.x release series we will be working on finalizing the Graph API and making it public.\n *\n * If none of these options work for you, you can always opt-out more broadly by implementing\n * a custom Cache with the relationship behaviors you need.\n *\n * @property DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE = '5.3';\n\n/**\n * **id: ember-data:deprecate-many-array-duplicates**\n *\n * When the flag is `true` (default), adding duplicate records to a `ManyArray`\n * is deprecated in non-production environments. In production environments,\n * duplicate records added to a `ManyArray` will be deduped and no error will\n * be thrown.\n *\n * When the flag is `false`, an error will be thrown when duplicates are added.\n *\n * @property DEPRECATE_MANY_ARRAY_DUPLICATES\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_MANY_ARRAY_DUPLICATES = '5.3';\n\n/**\n * **id: ember-data:deprecate-store-extends-ember-object**\n *\n * When the flag is `true` (default), the Store class will extend from `@ember/object`.\n * When the flag is `false` or `ember-source` is not present, the Store will not extend\n * from EmberObject.\n *\n * @property DEPRECATE_STORE_EXTENDS_EMBER_OBJECT\n * @since 5.4\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_STORE_EXTENDS_EMBER_OBJECT = '5.4';\n\n/**\n * **id: ember-data:schema-service-updates**\n *\n * When the flag is `true` (default), the legacy schema\n * service features will be enabled on the store and\n * the service, and deprecations will be thrown when\n * they are used.\n *\n * Deprecated features include:\n *\n * - `Store.registerSchema` method is deprecated in favor of the `Store.createSchemaService` hook\n * - `Store.registerSchemaDefinitionService` method is deprecated in favor of the `Store.createSchemaService` hook\n * - `Store.getSchemaDefinitionService` method is deprecated in favor of `Store.schema` property\n * - `SchemaService.doesTypeExist` method is deprecated in favor of the `SchemaService.hasResource` method\n * - `SchemaService.attributesDefinitionFor` method is deprecated in favor of the `SchemaService.fields` method\n * - `SchemaService.relationshipsDefinitionFor` method is deprecated in favor of the `SchemaService.fields` method\n *\n * @property ENABLE_LEGACY_SCHEMA_SERVICE\n * @since 5.4\n * @until 6.0\n * @public\n */\nexport const ENABLE_LEGACY_SCHEMA_SERVICE = '5.4';\n","import semver from 'semver';\n\nimport * as CURRENT_DEPRECATIONS from '../../deprecation-versions.ts';\ntype MajorMinor = `${number}.${number}`;\ntype DeprecationFlag = keyof typeof CURRENT_DEPRECATIONS;\n\nfunction deprecationIsResolved(deprecatedSince: MajorMinor, compatVersion: MajorMinor) {\n return semver.lte(semver.minVersion(deprecatedSince)!, semver.minVersion(compatVersion)!);\n}\n\nexport function getDeprecations(compatVersion: MajorMinor | null | undefined): { [key in DeprecationFlag]: boolean } {\n const flags = {} as Record<DeprecationFlag, boolean>;\n const keys = Object.keys(CURRENT_DEPRECATIONS) as DeprecationFlag[];\n\n keys.forEach((flag) => {\n const deprecatedSince = CURRENT_DEPRECATIONS[flag];\n let flagState = true; // default to no code-stripping\n\n // if we are told we are compatible with a version\n // we check if we can strip this flag\n if (compatVersion) {\n const isResolved = deprecationIsResolved(deprecatedSince, compatVersion);\n // if we've resolved, we strip (by setting the flag to false)\n /*\n if (DEPRECATED_FEATURE) {\n // deprecated code path\n } else {\n // if needed a non-deprecated code path\n }\n */\n flagState = !isResolved;\n }\n\n // console.log(`${flag}=${flagState} (${deprecatedSince} <= ${compatVersion})`);\n flags[flag] = flagState;\n });\n\n return flags;\n}\n","/**\n * ## Canary Features\n *\n * EmberData allows users to test features that are implemented but not yet\n * available even in canary.\n *\n * Typically these features represent work that might introduce a new concept,\n * new API, change an API, or risk an unintended change in behavior to consuming\n * applications.\n *\n * Such features have their implementations guarded by a \"feature flag\", and the\n * flag is only activated once the core-data team is prepared to ship the work\n * in a canary release.\n *\n * ### Installing Canary\n *\n * To test a feature you MUST be using a canary build. Canary builds are published\n * to `npm` and can be installed using a precise tag (such as `ember-data@3.16.0-alpha.1`)\n * or by installing the latest dist-tag published to the `canary` channel using your javascript\n * package manager of choice. For instance with [pnpm](https://pnpm.io/)\n\n ```cli\n pnpm add ember-data@canary\n ```\n *\n * ### Activating a Canary Feature\n *\n * Once you have installed canary, feature-flags can be activated at build-time\n *\n * by setting an environment variable:\n *\n * ```cli\n * # Activate a single flag\n * EMBER_DATA_FEATURE_OVERRIDE=SOME_FLAG ember build\n *\n * # Activate multiple flags by separating with commas\n * EMBER_DATA_FEATURE_OVERRIDE=SOME_FLAG,OTHER_FLAG ember build\n *\n * # Activate all flags\n * EMBER_DATA_FEATURE_OVERRIDE=ENABLE_ALL_OPTIONAL ember build\n * ```\n *\n * or by setting the appropriate flag in your `ember-cli-build` file:\n *\n * ```ts\n * let app = new EmberApp(defaults, {\n * emberData: {\n * features: {\n * SAMPLE_FEATURE_FLAG: false // utliize existing behavior, strip code for the new feature\n * OTHER_FEATURE_FLAG: true // utilize this new feature, strip code for the older behavior\n * }\n * }\n * })\n * ```\n *\n * **The \"off\" branch of feature-flagged code is always stripped from production builds.**\n *\n * The list of available feature-flags is located [here](https://github.com/emberjs/data/tree/main/packages/build-config/src/virtual/canary-features.ts \"List of EmberData FeatureFlags\")\n *\n *\n * ### Preparing a Project to use a Canary Feature\n *\n * For most projects, simple version detection should be enough.\n * Using the provided version compatibility helpers from [embroider-macros](https://github.com/embroider-build/embroider/tree/main/packages/macros#readme)\n * the following can be done:\n *\n * ```js\n * if (macroCondition(dependencySatisfies('@ember-data-mirror/store', '5.0'))) {\n * // do thing\n * }\n * ```\n *\n @module @warp-drive-mirror/build-config/canary-features\n @main @warp-drive-mirror/build-config/canary-features\n */\n/**\n This is the current list of features used at build time for canary releases.\n If empty there are no features currently gated by feature flags.\n\n The valid values are:\n\n - `true` | The feature is **enabled** at all times, and cannot be disabled.\n - `false` | The feature is **disabled** at all times, and cannot be enabled.\n - `null` | The feature is **disabled by default**, but can be enabled via configuration.\n\n @class CanaryFeatureFlags\n @public\n*/\nexport const SAMPLE_FEATURE_FLAG: boolean | null = null;\n","import fs from 'fs';\nimport path from 'path';\n\nimport * as CURRENT_FEATURES from '../../canary-features.ts';\ntype FEATURE = keyof typeof CURRENT_FEATURES;\n\nconst dirname = new URL(import.meta.url).pathname;\nconst relativePkgPath = path.join(dirname, '../../package.json');\n\nconst version = JSON.parse(fs.readFileSync(relativePkgPath, 'utf-8')).version;\nconst isCanary = version.includes('alpha');\n\nexport function getFeatures(isProd: boolean): { [key in FEATURE]: boolean } {\n const features = Object.assign({}, CURRENT_FEATURES) as Record<FEATURE, boolean>;\n const keys = Object.keys(features) as FEATURE[];\n\n if (!isCanary) {\n // disable all features with a current value of `null`\n for (const feature of keys) {\n let featureValue = features[feature];\n\n if (featureValue === null) {\n features[feature] = false;\n }\n }\n return features;\n }\n\n const FEATURE_OVERRIDES = process.env.EMBER_DATA_FEATURE_OVERRIDE;\n if (FEATURE_OVERRIDES === 'ENABLE_ALL_OPTIONAL') {\n // enable all features with a current value of `null`\n for (const feature of keys) {\n let featureValue = features[feature];\n\n if (featureValue === null) {\n features[feature] = true;\n }\n }\n } else if (FEATURE_OVERRIDES === 'DISABLE_ALL') {\n // disable all features, including those with a value of `true`\n for (const feature of keys) {\n features[feature] = false;\n }\n } else if (FEATURE_OVERRIDES) {\n // enable only the specific features listed in the environment\n // variable (comma separated)\n const forcedFeatures = FEATURE_OVERRIDES.split(',');\n for (let i = 0; i < forcedFeatures.length; i++) {\n let featureName = forcedFeatures[i];\n\n if (!keys.includes(featureName as FEATURE)) {\n throw new Error(`Unknown feature flag: ${featureName}`);\n }\n\n features[featureName as FEATURE] = true;\n }\n }\n\n if (isProd) {\n // disable all features with a current value of `null`\n for (const feature of keys) {\n let featureValue = features[feature];\n\n if (featureValue === null) {\n features[feature] = false;\n }\n }\n }\n\n return features;\n}\n","/**\n * ## Debugging\n *\n * Many portions of the internals are helpfully instrumented with logging that can be activated\n * at build time. This instrumentation is always removed from production builds or any builds\n * that has not explicitly activated it. To activate it set the appropriate flag to `true`.\n *\n @module @warp-drive-mirror/build-config/debugging\n @main @warp-drive-mirror/build-config/debugging\n */\n/**\n *\n * Many portions of the internals are helpfully instrumented with logging that can be activated\nat build time. This instrumentation is always removed from production builds or any builds\nthat has not explicitly activated it. To activate it set the appropriate flag to `true`.\n\n```ts\n let app = new EmberApp(defaults, {\n emberData: {\n debug: {\n LOG_PAYLOADS: false, // data store received to update cache with\n LOG_OPERATIONS: false, // updates to cache remote state\n LOG_MUTATIONS: false, // updates to cache local state\n LOG_NOTIFICATIONS: false,\n LOG_REQUESTS: false,\n LOG_REQUEST_STATUS: false,\n LOG_IDENTIFIERS: false,\n LOG_GRAPH: false,\n LOG_INSTANCE_CACHE: false,\n }\n }\n });\n ```\n\n @class DebugLogging\n @public\n */\n/**\n * log payloads received by the store\n * via `push` or returned from a delete/update/create\n * operation.\n *\n * @property {boolean} LOG_PAYLOADS\n * @public\n */\nexport const LOG_PAYLOADS: boolean = false;\n/**\n * log remote-state updates to the cache\n *\n * @property {boolean} LOG_OPERATIONS\n * @public\n */\nexport const LOG_OPERATIONS: boolean = false;\n/**\n * log local-state updates to the cache\n *\n * @property {boolean} LOG_MUTATIONS\n * @public\n */\nexport const LOG_MUTATIONS: boolean = false;\n/**\n * log notifications received by the NotificationManager\n *\n * @property {boolean} LOG_NOTIFICATIONS\n * @public\n */\nexport const LOG_NOTIFICATIONS: boolean = false;\n/**\n * log requests issued by the RequestManager\n *\n * @property {boolean} LOG_REQUESTS\n * @public\n */\nexport const LOG_REQUESTS: boolean = false;\n/**\n * log updates to requests the store has issued to\n * the network (adapter) to fulfill.\n *\n * @property {boolean} LOG_REQUEST_STATUS\n * @public\n */\nexport const LOG_REQUEST_STATUS: boolean = false;\n/**\n * log peek, generation and updates to\n * Record Identifiers.\n *\n * @property {boolean} LOG_IDENTIFIERS\n * @public\n */\nexport const LOG_IDENTIFIERS: boolean = false;\n/**\n * log updates received by the graph (relationship pointer storage)\n *\n * @property {boolean} LOG_GRAPH\n * @public\n */\nexport const LOG_GRAPH: boolean = false;\n/**\n * log creation/removal of RecordData and Record\n * instances.\n *\n * @property {boolean} LOG_INSTANCE_CACHE\n * @public\n */\nexport const LOG_INSTANCE_CACHE: boolean = false;\n","import EmbroiderMacros from '@embroider/macros/src/node.js';\nimport { getEnv } from './-private/utils/get-env.ts';\nimport { getDeprecations } from './-private/utils/deprecations.ts';\nimport { getFeatures } from './-private/utils/features.ts';\nimport * as LOGGING from './debugging.ts';\nimport type { MacrosConfig } from '@embroider/macros/src/node.js';\n\nconst _MacrosConfig = EmbroiderMacros.MacrosConfig as unknown as typeof MacrosConfig;\n\ntype LOG_CONFIG_KEY = keyof typeof LOGGING;\n\nexport type WarpDriveConfig = {\n debug?: Partial<InternalWarpDriveConfig['debug']>;\n polyfillUUID?: boolean;\n includeDataAdapterInProduction?: boolean;\n compatWith?: `${number}.${number}`;\n deprecations?: Partial<InternalWarpDriveConfig['deprecations']>;\n features?: Partial<InternalWarpDriveConfig['features']>;\n};\n\ntype InternalWarpDriveConfig = {\n debug: { [key in LOG_CONFIG_KEY]: boolean };\n polyfillUUID: boolean;\n includeDataAdapter: boolean;\n compatWith: `${number}.${number}` | null;\n deprecations: ReturnType<typeof getDeprecations>;\n features: ReturnType<typeof getFeatures>;\n env: {\n TESTING: boolean;\n PRODUCTION: boolean;\n DEBUG: boolean;\n };\n};\n\ntype MacrosWithGlobalConfig = Omit<MacrosConfig, 'globalConfig'> & { globalConfig: Record<string, unknown> };\n\nfunction recastMacrosConfig(macros: object): MacrosWithGlobalConfig {\n if (!('globalConfig' in macros)) {\n throw new Error('Expected MacrosConfig to have a globalConfig property');\n }\n return macros as MacrosWithGlobalConfig;\n}\n\nexport function setConfig(context: object, appRoot: string, config: WarpDriveConfig) {\n const macros = recastMacrosConfig(_MacrosConfig.for(context, appRoot));\n const isLegacySupport = (config as unknown as { ___legacy_support?: boolean }).___legacy_support;\n const hasDeprecatedConfig = isLegacySupport && Object.keys(config).length > 1;\n const hasInitiatedConfig = macros.globalConfig['WarpDrive'];\n\n // setConfig called by user prior to legacy support called\n if (isLegacySupport && hasInitiatedConfig) {\n if (hasDeprecatedConfig) {\n throw new Error(\n 'You have provided a config object to setConfig, but are also using the legacy emberData options key in ember-cli-build. Please remove the emberData key from options.'\n );\n }\n return;\n }\n\n // legacy support called prior to user setConfig\n if (isLegacySupport && hasDeprecatedConfig) {\n console.warn(\n `You are using the legacy emberData key in your ember-cli-build.js file. This key is deprecated and will be removed in the next major version of EmberData/WarpDrive. Please use \\`import { setConfig } from '@warp-drive-mirror/build-config';\\` instead.`\n );\n }\n\n // included hooks run during class initialization of the EmberApp instance\n // so our hook will run before the user has a chance to call setConfig\n // else we could print a useful message here\n // else if (isLegacySupport) {\n // console.warn(\n // `WarpDrive requires your ember-cli-build file to set a base configuration for the project.\\n\\nUsage:\\n\\t\\`import { setConfig } from '@warp-drive-mirror/build-config';\\n\\tsetConfig(app, __dirname, {});\\``\n // );\n // }\n\n const debugOptions: InternalWarpDriveConfig['debug'] = Object.assign({}, LOGGING, config.debug);\n\n const env = getEnv();\n const DEPRECATIONS = getDeprecations(config.compatWith || null);\n const FEATURES = getFeatures(env.PRODUCTION);\n\n const includeDataAdapterInProduction =\n typeof config.includeDataAdapterInProduction === 'boolean' ? config.includeDataAdapterInProduction : false;\n const includeDataAdapter = env.PRODUCTION ? includeDataAdapterInProduction : false;\n\n const finalizedConfig: InternalWarpDriveConfig = {\n debug: debugOptions,\n polyfillUUID: config.polyfillUUID ?? false,\n includeDataAdapter,\n compatWith: config.compatWith ?? null,\n deprecations: DEPRECATIONS,\n features: FEATURES,\n env,\n };\n\n macros.setGlobalConfig(import.meta.filename, 'WarpDrive', finalizedConfig);\n}\n"],"names":["getEnv","EMBER_ENV","IS_TESTING","EMBER_CLI_TEST_COMMAND","NODE_ENV","process","env","PRODUCTION","DEBUG","TESTING","Boolean","DEPRECATE_CATCH_ALL","DEPRECATE_NON_STRICT_TYPES","DEPRECATE_NON_STRICT_ID","DEPRECATE_COMPUTED_CHAINS","DEPRECATE_LEGACY_IMPORTS","DEPRECATE_NON_UNIQUE_PAYLOADS","DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE","DEPRECATE_MANY_ARRAY_DUPLICATES","DEPRECATE_STORE_EXTENDS_EMBER_OBJECT","ENABLE_LEGACY_SCHEMA_SERVICE","deprecationIsResolved","deprecatedSince","compatVersion","semver","lte","minVersion","getDeprecations","flags","keys","Object","CURRENT_DEPRECATIONS","forEach","flag","flagState","isResolved","SAMPLE_FEATURE_FLAG","dirname","URL","import","pathname","relativePkgPath","path","join","version","JSON","parse","fs","readFileSync","isCanary","includes","getFeatures","isProd","features","assign","CURRENT_FEATURES","feature","featureValue","FEATURE_OVERRIDES","EMBER_DATA_FEATURE_OVERRIDE","forcedFeatures","split","i","length","featureName","Error","LOG_PAYLOADS","LOG_OPERATIONS","LOG_MUTATIONS","LOG_NOTIFICATIONS","LOG_REQUESTS","LOG_REQUEST_STATUS","LOG_IDENTIFIERS","LOG_GRAPH","LOG_INSTANCE_CACHE","_MacrosConfig","EmbroiderMacros","MacrosConfig","recastMacrosConfig","macros","setConfig","context","appRoot","config","for","isLegacySupport","___legacy_support","hasDeprecatedConfig","hasInitiatedConfig","globalConfig","console","warn","debugOptions","LOGGING","debug","DEPRECATIONS","compatWith","FEATURES","includeDataAdapterInProduction","includeDataAdapter","finalizedConfig","polyfillUUID","deprecations","setGlobalConfig"],"mappings":";;;;;;;;;;AAAO,SAASA,MAAMA,GAAG;EACvB,MAAM;IAAEC,SAAS;IAAEC,UAAU;IAAEC,sBAAsB;AAAEC,IAAAA,QAAAA;GAAU,GAAGC,OAAO,CAACC,GAAG,CAAA;EAC/E,MAAMC,UAAU,GAAGN,SAAS,KAAK,YAAY,IAAK,CAACA,SAAS,IAAIG,QAAQ,KAAK,YAAa,CAAA;EAC1F,MAAMI,KAAK,GAAG,CAACD,UAAU,CAAA;AACzB,EAAA,MAAME,OAAO,GAAGD,KAAK,IAAIE,OAAO,CAACT,SAAS,KAAK,MAAM,IAAIC,UAAU,IAAIC,sBAAsB,CAAC,CAAA;EAE9F,OAAO;IACLM,OAAO;IACPF,UAAU;AACVC,IAAAA,KAAAA;GACD,CAAA;AACH;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,mBAAmB,GAAG,MAAM,CAAA;AACzC;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;AACO,MAAMC,0BAA0B,GAAG,KAAK,CAAA;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,KAAK,CAAA;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,yBAAyB,GAAG,KAAK,CAAA;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,wBAAwB,GAAG,KAAK,CAAA;;AAE7C;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;AACO,MAAMC,6BAA6B,GAAG,KAAK,CAAA;;AAElD;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;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;AACO,MAAMC,yDAAyD,GAAG,KAAK,CAAA;;AAE9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,+BAA+B,GAAG,KAAK,CAAA;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oCAAoC,GAAG,KAAK,CAAA;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,4BAA4B,GAAG,KAAK;;;;;;;;;;;;;;;;ACjajD,SAASC,qBAAqBA,CAACC,eAA2B,EAAEC,aAAyB,EAAE;AACrF,EAAA,OAAOC,MAAM,CAACC,GAAG,CAACD,MAAM,CAACE,UAAU,CAACJ,eAAe,CAAC,EAAGE,MAAM,CAACE,UAAU,CAACH,aAAa,CAAE,CAAC,CAAA;AAC3F,CAAA;AAEO,SAASI,eAAeA,CAACJ,aAA4C,EAAyC;EACnH,MAAMK,KAAK,GAAG,EAAsC,CAAA;AACpD,EAAA,MAAMC,IAAI,GAAGC,MAAM,CAACD,IAAI,CAACE,oBAAoB,CAAsB,CAAA;AAEnEF,EAAAA,IAAI,CAACG,OAAO,CAAEC,IAAI,IAAK;AACrB,IAAA,MAAMX,eAAe,GAAGS,oBAAoB,CAACE,IAAI,CAAC,CAAA;AAClD,IAAA,IAAIC,SAAS,GAAG,IAAI,CAAC;;AAErB;AACA;AACA,IAAA,IAAIX,aAAa,EAAE;AACjB,MAAA,MAAMY,UAAU,GAAGd,qBAAqB,CAACC,eAAe,EAAEC,aAAa,CAAC,CAAA;AACxE;AACA;AACN;AACA;AACA;AACA;AACA;AACA;MACMW,SAAS,GAAG,CAACC,UAAU,CAAA;AACzB,KAAA;;AAEA;AACAP,IAAAA,KAAK,CAACK,IAAI,CAAC,GAAGC,SAAS,CAAA;AACzB,GAAC,CAAC,CAAA;AAEF,EAAA,OAAON,KAAK,CAAA;AACd;;ACtCA;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;AACO,MAAMQ,mBA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AI,IAAI;AACrCM,IAAAA,YAAY,EAAEP,YAAY;AAC1B1C,IAAAA,QAAQ,EAAE4C,QAAQ;AAClB3F,IAAAA,GAAAA;GACD,CAAA;AAEDyE,EAAAA,MAAM,CAACwB,eAAe,CAAChE,SAAoB,EAAE,WAAW,EAAE6D,eAAe,CAAC,CAAA;AAC5E;;;;"}
package/dist/index.js CHANGED
@@ -556,9 +556,32 @@ function recastMacrosConfig(macros) {
556
556
  }
557
557
  function setConfig(context, appRoot, config) {
558
558
  const macros = recastMacrosConfig(_MacrosConfig.for(context, appRoot));
559
- if (macros.globalConfig['WarpDrive']) {
559
+ const isLegacySupport = config.___legacy_support;
560
+ const hasDeprecatedConfig = isLegacySupport && Object.keys(config).length > 1;
561
+ const hasInitiatedConfig = macros.globalConfig['WarpDrive'];
562
+
563
+ // setConfig called by user prior to legacy support called
564
+ if (isLegacySupport && hasInitiatedConfig) {
565
+ if (hasDeprecatedConfig) {
566
+ throw new Error('You have provided a config object to setConfig, but are also using the legacy emberData options key in ember-cli-build. Please remove the emberData key from options.');
567
+ }
560
568
  return;
561
569
  }
570
+
571
+ // legacy support called prior to user setConfig
572
+ if (isLegacySupport && hasDeprecatedConfig) {
573
+ console.warn(`You are using the legacy emberData key in your ember-cli-build.js file. This key is deprecated and will be removed in the next major version of EmberData/WarpDrive. Please use \`import { setConfig } from '@warp-drive-mirror/build-config';\` instead.`);
574
+ }
575
+
576
+ // included hooks run during class initialization of the EmberApp instance
577
+ // so our hook will run before the user has a chance to call setConfig
578
+ // else we could print a useful message here
579
+ // else if (isLegacySupport) {
580
+ // console.warn(
581
+ // `WarpDrive requires your ember-cli-build file to set a base configuration for the project.\n\nUsage:\n\t\`import { setConfig } from '@warp-drive-mirror/build-config';\n\tsetConfig(app, __dirname, {});\``
582
+ // );
583
+ // }
584
+
562
585
  const debugOptions = Object.assign({}, LOGGING, config.debug);
563
586
  const env = getEnv();
564
587
  const DEPRECATIONS = getDeprecations(config.compatWith || null);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/-private/utils/get-env.ts","../src/deprecation-versions.ts","../src/-private/utils/deprecations.ts","../src/-private/utils/features.ts","../src/index.ts"],"sourcesContent":["export function getEnv() {\n const { EMBER_ENV, IS_TESTING, EMBER_CLI_TEST_COMMAND, NODE_ENV } = process.env;\n const PRODUCTION = EMBER_ENV === 'production' || (!EMBER_ENV && NODE_ENV === 'production');\n const DEBUG = !PRODUCTION;\n const TESTING = DEBUG || Boolean(EMBER_ENV === 'test' || IS_TESTING || EMBER_CLI_TEST_COMMAND);\n\n return {\n TESTING,\n PRODUCTION,\n DEBUG,\n };\n}\n","// ========================\n// FOR CONTRIBUTING AUTHORS\n//\n// Deprecations here should also have guides PR'd to the emberjs deprecation app\n//\n// github: https://github.com/ember-learn/deprecation-app\n// website: https://deprecations.emberjs.com\n//\n// Each deprecation should also be given an associated URL pointing to the\n// relevant guide.\n//\n// URLs should be of the form: https://deprecations.emberjs.com/v<major>.x#toc_<fileName>\n// where <major> is the major version of the deprecation and <fileName> is the\n// name of the markdown file in the guides repo.\n//\n// ========================\n//\n\n/**\n * ## Deprecations\n *\n * EmberData allows users to opt-in and remove code that exists to support deprecated\n * behaviors.\n *\n * If your app has resolved all deprecations present in a given version,\n * you may specify that version as your \"compatibility\" version to remove\n * the code that supported the deprecated behavior from your app.\n *\n * For instance, if a deprecation was introduced in 3.13, and the app specifies\n * 3.13 as its minimum version compatibility, any deprecations introduced before\n * or during 3.13 would be stripped away.\n *\n * An app can use a different version than what it specifies as it's compatibility\n * version. For instance, an App could be using `3.16` while specifying compatibility\n * with `3.12`. This would remove any deprecations that were present in or before `3.12`\n * but keep support for anything deprecated in or above `3.13`.\n *\n * ### Configuring Compatibility\n *\n * To configure your compatibility version, set the `compatWith` to the version you\n * are compatible with on the `emberData` config in your `ember-cli-build.js` file.\n *\n * ```js\n * let app = new EmberApp(defaults, {\n * emberData: {\n * compatWith: '3.12',\n * },\n * });\n * ```\n *\n * Alternatively, individual deprecations can be resolved (and thus have its support stripped)\n * via one of the flag names listed below. For instance, given a flag named `DEPRECATE_FOO_BEHAVIOR`.\n *\n * This capability is interopable with `compatWith`. You may set `compatWith` and then selectively resolve\n * additional deprecations, or set compatWith and selectively un-resolve specific deprecations.\n *\n * Note: EmberData does not test against permutations of deprecations being stripped, our tests run against\n * \"all deprecated code included\" and \"all deprecated code removed\". Unspecified behavior may sometimes occur\n * when removing code for only some deprecations associated to a version number.\n *\n * ```js\n * let app = new EmberApp(defaults, {\n * emberData: {\n * deprecations: {\n * DEPRECATE_FOO_BEHAVIOR: false // set to false to strip this code\n * DEPRECATE_BAR_BEHAVIOR: true // force to true to not strip this code\n * }\n * }\n * })\n * ```\n *\n * The complete list of which versions specific deprecations will be removed in\n * can be found [here](https://github.com/emberjs/data/blob/main/packages/build-config/src/virtual/deprecation-versions.ts \"List of EmberData Deprecations\")\n *\n * @module @warp-drive-mirror/build-config/deprecations\n * @main @warp-drive-mirror/build-config/deprecations\n */\n\n/**\n * The following list represents deprecations currently active.\n *\n * Some deprecation flags guard multiple deprecation IDs. All\n * associated IDs are listed.\n *\n * @class CurrentDeprecations\n * @public\n */\nexport const DEPRECATE_CATCH_ALL = '99.0';\n/**\n * **id: ember-data:deprecate-non-strict-types**\n *\n * Currently, EmberData expects that the `type` property associated with\n * a resource follows several conventions.\n *\n * - The `type` property must be a non-empty string\n * - The `type` property must be singular\n * - The `type` property must be dasherized\n *\n * We are deprecating support for types that do not match this pattern\n * in order to unlock future improvements in which we can support `type`\n * being any string of your choosing.\n *\n * The goal is that in the future, you will be able to use any string\n * so long as it matches what your configured cache, identifier generation,\n * and schemas expect.\n *\n * E.G. It will matter not that your string is in a specific format like\n * singular, dasherized, etc. so long as everywhere you refer to the type\n * you use the same string.\n *\n * If using @ember-data-mirror/model, there will always be a restriction that the\n * `type` must match the path on disk where the model is defined.\n *\n * e.g. `app/models/foo/bar-bem.js` must have a type of `foo/bar-bem`\n *\n * @property DEPRECATE_NON_STRICT_TYPES\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_NON_STRICT_TYPES = '5.3';\n\n/**\n * **id: ember-data:deprecate-non-strict-id**\n *\n * Currently, EmberData expects that the `id` property associated with\n * a resource is a string.\n *\n * However, for legacy support in many locations we would accept a number\n * which would then immediately be coerced into a string.\n *\n * We are deprecating this legacy support for numeric IDs.\n *\n * The goal is that in the future, you will be able to use any ID format\n * so long as everywhere you refer to the ID you use the same format.\n *\n * However, for identifiers we will always use string IDs and so any\n * custom identifier configuration should provide a string ID.\n *\n * @property DEPRECATE_NON_STRICT_ID\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_NON_STRICT_ID = '5.3';\n\n/**\n * **id: <none yet assigned>**\n *\n * This is a planned deprecation which will trigger when observer or computed\n * chains are used to watch for changes on any EmberData LiveArray, CollectionRecordArray,\n * ManyArray or PromiseManyArray.\n *\n * Support for these chains is currently guarded by the deprecation flag\n * listed here, enabling removal of the behavior if desired.\n *\n * @property DEPRECATE_COMPUTED_CHAINS\n * @since 5.0\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_COMPUTED_CHAINS = '5.0';\n\n/**\n * **id: ember-data:deprecate-legacy-imports**\n *\n * Deprecates when importing from `ember-data/*` instead of `@ember-data/*`\n * in order to prepare for the eventual removal of the legacy `ember-data/*`\n *\n * All imports from `ember-data/*` should be updated to `@ember-data/*`\n * except for `ember-data/store`. When you are using `ember-data` (as opposed to\n * installing the indivudal packages) you should import from `ember-data/store`\n * instead of `@ember-data-mirror/store` in order to receive the appropriate configuration\n * of defaults.\n *\n * @property DEPRECATE_LEGACY_IMPORTS\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_LEGACY_IMPORTS = '5.3';\n\n/**\n * **id: ember-data:deprecate-non-unique-collection-payloads**\n *\n * Deprecates when the data for a hasMany relationship contains\n * duplicate identifiers.\n *\n * Previously, relationships would silently de-dupe the data\n * when received, but this behavior is being removed in favor\n * of erroring if the same related record is included multiple\n * times.\n *\n * For instance, in JSON:API the below relationship data would\n * be considered invalid:\n *\n * ```json\n * {\n * \"data\": {\n * \"type\": \"article\",\n * \"id\": \"1\",\n * \"relationships\": {\n * \"comments\": {\n * \"data\": [\n * { \"type\": \"comment\", \"id\": \"1\" },\n * { \"type\": \"comment\", \"id\": \"2\" },\n * { \"type\": \"comment\", \"id\": \"1\" } // duplicate\n * ]\n * }\n * }\n * }\n * ```\n *\n * To resolve this deprecation, either update your server to\n * not include duplicate data, or implement normalization logic\n * in either a request handler or serializer which removes\n * duplicate data from relationship payloads.\n *\n * @property DEPRECATE_NON_UNIQUE_PAYLOADS\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_NON_UNIQUE_PAYLOADS = '5.3';\n\n/**\n * **id: ember-data:deprecate-relationship-remote-update-clearing-local-state**\n *\n * Deprecates when a relationship is updated remotely and the local state\n * is cleared of all changes except for \"new\" records.\n *\n * Instead, any records not present in the new payload will be considered\n * \"removed\" while any records present in the new payload will be considered \"added\".\n *\n * This allows us to \"commit\" local additions and removals, preserving any additions\n * or removals that are not yet reflected in the remote state.\n *\n * For instance, given the following initial state:\n *\n * remote: A, B, C\n * local: add D, E\n * remove B, C\n * => A, D, E\n *\n *\n * If after an update, the remote state is now A, B, D, F then the new state will be\n *\n * remote: A, B, D, F\n * local: add E\n * remove B\n * => A, D, E, F\n *\n * Under the old behavior the updated local state would instead have been\n * => A, B, D, F\n *\n * Similarly, if a belongsTo remote State was A while its local state was B,\n * then under the old behavior if the remote state changed to C, the local state\n * would be updated to C. Under the new behavior, the local state would remain B.\n *\n * If the remote state was A while its local state was `null`, then under the old\n * behavior if the remote state changed to C, the local state would be updated to C.\n * Under the new behavior, the local state would remain `null`.\n *\n * Thus the new correct mental model is that the state of the relationship at any point\n * in time is whatever the most recent remote state is, plus any local additions or removals\n * you have made that have not yet been reflected by the remote state.\n *\n * > Note: The old behavior extended to modifying the inverse of a relationship. So if\n * > you had local state not reflected in the new remote state, inverses would be notified\n * > and their state reverted as well when \"resetting\" the relationship.\n * > Under the new behavior, since the local state is preserved the inverses will also\n * > not be reverted.\n *\n * ### Resolving this deprecation\n *\n * Resolving this deprecation can be done individually for each relationship\n * or globally for all relationships.\n *\n * To resolve it globally, set the `DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE`\n * to `false` in ember-cli-build.js\n *\n * ```js\n * let app = new EmberApp(defaults, {\n * emberData: {\n * deprecations: {\n * // set to false to strip the deprecated code (thereby opting into the new behavior)\n * DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE: false\n * }\n * }\n * })\n * ```\n *\n * To resolve this deprecation on an individual relationship, adjust the `options` passed to\n * the relationship. For relationships with inverses, both sides MUST be migrated to the new\n * behavior at the same time.\n *\n * ```js\n * class Person extends Model {\n * @hasMany('person', {\n * async: false,\n * inverse: null,\n * resetOnRemoteUpdate: false\n * }) children;\n *\n * @belongsTo('person', {\n * async: false,\n * inverse: null,\n * resetOnRemoteUpdate: false\n * }) parent;\n * }\n * ```\n *\n * > Note: false is the only valid value here, all other values (including missing)\n * > will be treated as true, where `true` is the legacy behavior that is now deprecated.\n *\n * Once you have migrated all relationships, you can remove the the resetOnRemoteUpdate\n * option and set the deprecation flag to false in ember-cli-build.\n *\n * ### What if I don't want the new behavior?\n *\n * EmberData's philosophy is to not make assumptions about your application. Where possible\n * we seek out \"100%\" solutions – solutions that work for all use cases - and where that is\n * not possible we default to \"90%\" solutions – solutions that work for the vast majority of use\n * cases. In the case of \"90%\" solutions we look for primitives that allow you to resolve the\n * 10% case in your application. If no such primitives exist, we provide an escape hatch that\n * ensures you can build the behavior you need without adopting the cost of the default solution.\n *\n * In this case, the old behavior was a \"40%\" solution. The inability for an application developer\n * to determine what changes were made locally, and thus what changes should be preserved, made\n * it impossible to build certain features easily, or in some cases at all. The proliferation of\n * feature requests, bug reports (from folks surprised by the prior behavior) and addon attempts\n * in this space are all evidence of this.\n *\n * We believe the new behavior is a \"90%\" solution. It works for the vast majority of use cases,\n * often without noticeable changes to existing application behavior, and provides primitives that\n * allow you to build the behavior you need for the remaining 10%.\n *\n * The great news is that this behavior defaults to trusting your API similar to the old behavior.\n * If your API is correct, you will not need to make any changes to your application to adopt\n * the new behavior.\n *\n * This means the 10% cases are those where you can't trust your API to provide the correct\n * information. In these cases, because you now have cheap access to a diff of the relationship\n * state, there are a few options that weren't available before:\n *\n * - you can adjust returned API payloads to contain the expected changes that it doesn't include\n * - you can modify local state by adding or removing records on the HasMany record array to remove\n * any local changes that were not returned by the API.\n * - you can use `<Cache>.mutate(mutation)` to directly modify the local cache state of the relationship\n * to match the expected state.\n *\n * What this version (5.3) does not yet provide is a way to directly modify the cache's remote state\n * for the relationship via public APIs other than via the broader action of upserting a response via\n * `<Cache>.put(document)`. However, such an API was sketched in the Cache 2.1 RFC\n * `<Cache>.patch(operation)` and is likely to be added in a future 5.x release of EmberData.\n *\n * This version (5.3) also does not yet provide a way to directly modify the graph (a general purpose\n * subset of cache behaviors specific to relationships) via public APIs. However, during the\n * 5.x release series we will be working on finalizing the Graph API and making it public.\n *\n * If none of these options work for you, you can always opt-out more broadly by implementing\n * a custom Cache with the relationship behaviors you need.\n *\n * @property DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE = '5.3';\n\n/**\n * **id: ember-data:deprecate-many-array-duplicates**\n *\n * When the flag is `true` (default), adding duplicate records to a `ManyArray`\n * is deprecated in non-production environments. In production environments,\n * duplicate records added to a `ManyArray` will be deduped and no error will\n * be thrown.\n *\n * When the flag is `false`, an error will be thrown when duplicates are added.\n *\n * @property DEPRECATE_MANY_ARRAY_DUPLICATES\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_MANY_ARRAY_DUPLICATES = '5.3';\n\n/**\n * **id: ember-data:deprecate-store-extends-ember-object**\n *\n * When the flag is `true` (default), the Store class will extend from `@ember/object`.\n * When the flag is `false` or `ember-source` is not present, the Store will not extend\n * from EmberObject.\n *\n * @property DEPRECATE_STORE_EXTENDS_EMBER_OBJECT\n * @since 5.4\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_STORE_EXTENDS_EMBER_OBJECT = '5.4';\n\n/**\n * **id: ember-data:schema-service-updates**\n *\n * When the flag is `true` (default), the legacy schema\n * service features will be enabled on the store and\n * the service, and deprecations will be thrown when\n * they are used.\n *\n * Deprecated features include:\n *\n * - `Store.registerSchema` method is deprecated in favor of the `Store.createSchemaService` hook\n * - `Store.registerSchemaDefinitionService` method is deprecated in favor of the `Store.createSchemaService` hook\n * - `Store.getSchemaDefinitionService` method is deprecated in favor of `Store.schema` property\n * - `SchemaService.doesTypeExist` method is deprecated in favor of the `SchemaService.hasResource` method\n * - `SchemaService.attributesDefinitionFor` method is deprecated in favor of the `SchemaService.fields` method\n * - `SchemaService.relationshipsDefinitionFor` method is deprecated in favor of the `SchemaService.fields` method\n *\n * @property ENABLE_LEGACY_SCHEMA_SERVICE\n * @since 5.4\n * @until 6.0\n * @public\n */\nexport const ENABLE_LEGACY_SCHEMA_SERVICE = '5.4';\n","import semver from 'semver';\n\nimport * as CURRENT_DEPRECATIONS from '../../deprecation-versions.ts';\ntype MajorMinor = `${number}.${number}`;\ntype DeprecationFlag = keyof typeof CURRENT_DEPRECATIONS;\n\nfunction deprecationIsResolved(deprecatedSince: MajorMinor, compatVersion: MajorMinor) {\n return semver.lte(semver.minVersion(deprecatedSince)!, semver.minVersion(compatVersion)!);\n}\n\nexport function getDeprecations(compatVersion: MajorMinor | null | undefined): { [key in DeprecationFlag]: boolean } {\n const flags = {} as Record<DeprecationFlag, boolean>;\n const keys = Object.keys(CURRENT_DEPRECATIONS) as DeprecationFlag[];\n\n keys.forEach((flag) => {\n const deprecatedSince = CURRENT_DEPRECATIONS[flag];\n let flagState = true; // default to no code-stripping\n\n // if we are told we are compatible with a version\n // we check if we can strip this flag\n if (compatVersion) {\n const isResolved = deprecationIsResolved(deprecatedSince, compatVersion);\n // if we've resolved, we strip (by setting the flag to false)\n /*\n if (DEPRECATED_FEATURE) {\n // deprecated code path\n } else {\n // if needed a non-deprecated code path\n }\n */\n flagState = !isResolved;\n }\n\n // console.log(`${flag}=${flagState} (${deprecatedSince} <= ${compatVersion})`);\n flags[flag] = flagState;\n });\n\n return flags;\n}\n","import fs from 'fs';\nimport path from 'path';\n\nimport * as CURRENT_FEATURES from '../../canary-features.ts';\ntype FEATURE = keyof typeof CURRENT_FEATURES;\n\nconst dirname = new URL(import.meta.url).pathname;\nconst relativePkgPath = path.join(dirname, '../../package.json');\n\nconst version = JSON.parse(fs.readFileSync(relativePkgPath, 'utf-8')).version;\nconst isCanary = version.includes('alpha');\n\nexport function getFeatures(isProd: boolean): { [key in FEATURE]: boolean } {\n const features = Object.assign({}, CURRENT_FEATURES) as Record<FEATURE, boolean>;\n const keys = Object.keys(features) as FEATURE[];\n\n if (!isCanary) {\n // disable all features with a current value of `null`\n for (const feature of keys) {\n let featureValue = features[feature];\n\n if (featureValue === null) {\n features[feature] = false;\n }\n }\n return features;\n }\n\n const FEATURE_OVERRIDES = process.env.EMBER_DATA_FEATURE_OVERRIDE;\n if (FEATURE_OVERRIDES === 'ENABLE_ALL_OPTIONAL') {\n // enable all features with a current value of `null`\n for (const feature of keys) {\n let featureValue = features[feature];\n\n if (featureValue === null) {\n features[feature] = true;\n }\n }\n } else if (FEATURE_OVERRIDES === 'DISABLE_ALL') {\n // disable all features, including those with a value of `true`\n for (const feature of keys) {\n features[feature] = false;\n }\n } else if (FEATURE_OVERRIDES) {\n // enable only the specific features listed in the environment\n // variable (comma separated)\n const forcedFeatures = FEATURE_OVERRIDES.split(',');\n for (let i = 0; i < forcedFeatures.length; i++) {\n let featureName = forcedFeatures[i];\n\n if (!keys.includes(featureName as FEATURE)) {\n throw new Error(`Unknown feature flag: ${featureName}`);\n }\n\n features[featureName as FEATURE] = true;\n }\n }\n\n if (isProd) {\n // disable all features with a current value of `null`\n for (const feature of keys) {\n let featureValue = features[feature];\n\n if (featureValue === null) {\n features[feature] = false;\n }\n }\n }\n\n return features;\n}\n","import EmbroiderMacros from '@embroider/macros/src/node.js';\nimport { getEnv } from './-private/utils/get-env.ts';\nimport { getDeprecations } from './-private/utils/deprecations.ts';\nimport { getFeatures } from './-private/utils/features.ts';\nimport * as LOGGING from './debugging.ts';\nimport type { MacrosConfig } from '@embroider/macros/src/node.js';\n\nconst _MacrosConfig = EmbroiderMacros.MacrosConfig as unknown as typeof MacrosConfig;\n\ntype LOG_CONFIG_KEY = keyof typeof LOGGING;\n\nexport type WarpDriveConfig = {\n debug?: Partial<InternalWarpDriveConfig['debug']>;\n polyfillUUID?: boolean;\n includeDataAdapterInProduction?: boolean;\n compatWith?: `${number}.${number}`;\n deprecations?: Partial<InternalWarpDriveConfig['deprecations']>;\n features?: Partial<InternalWarpDriveConfig['features']>;\n};\n\ntype InternalWarpDriveConfig = {\n debug: { [key in LOG_CONFIG_KEY]: boolean };\n polyfillUUID: boolean;\n includeDataAdapter: boolean;\n compatWith: `${number}.${number}` | null;\n deprecations: ReturnType<typeof getDeprecations>;\n features: ReturnType<typeof getFeatures>;\n env: {\n TESTING: boolean;\n PRODUCTION: boolean;\n DEBUG: boolean;\n };\n};\n\ntype MacrosWithGlobalConfig = Omit<MacrosConfig, 'globalConfig'> & { globalConfig: Record<string, unknown> };\n\nfunction recastMacrosConfig(macros: object): MacrosWithGlobalConfig {\n if (!('globalConfig' in macros)) {\n throw new Error('Expected MacrosConfig to have a globalConfig property');\n }\n return macros as MacrosWithGlobalConfig;\n}\n\nexport function setConfig(context: object, appRoot: string, config: WarpDriveConfig) {\n const macros = recastMacrosConfig(_MacrosConfig.for(context, appRoot));\n\n if (macros.globalConfig['WarpDrive']) {\n return;\n }\n\n const debugOptions: InternalWarpDriveConfig['debug'] = Object.assign({}, LOGGING, config.debug);\n\n const env = getEnv();\n const DEPRECATIONS = getDeprecations(config.compatWith || null);\n const FEATURES = getFeatures(env.PRODUCTION);\n\n const includeDataAdapterInProduction =\n typeof config.includeDataAdapterInProduction === 'boolean' ? config.includeDataAdapterInProduction : false;\n const includeDataAdapter = env.PRODUCTION ? includeDataAdapterInProduction : false;\n\n const finalizedConfig: InternalWarpDriveConfig = {\n debug: debugOptions,\n polyfillUUID: config.polyfillUUID ?? false,\n includeDataAdapter,\n compatWith: config.compatWith ?? null,\n deprecations: DEPRECATIONS,\n features: FEATURES,\n env,\n };\n\n macros.setGlobalConfig(import.meta.filename, 'WarpDrive', finalizedConfig);\n}\n"],"names":["getEnv","EMBER_ENV","IS_TESTING","EMBER_CLI_TEST_COMMAND","NODE_ENV","process","env","PRODUCTION","DEBUG","TESTING","Boolean","DEPRECATE_CATCH_ALL","DEPRECATE_NON_STRICT_TYPES","DEPRECATE_NON_STRICT_ID","DEPRECATE_COMPUTED_CHAINS","DEPRECATE_LEGACY_IMPORTS","DEPRECATE_NON_UNIQUE_PAYLOADS","DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE","DEPRECATE_MANY_ARRAY_DUPLICATES","DEPRECATE_STORE_EXTENDS_EMBER_OBJECT","ENABLE_LEGACY_SCHEMA_SERVICE","deprecationIsResolved","deprecatedSince","compatVersion","semver","lte","minVersion","getDeprecations","flags","keys","Object","CURRENT_DEPRECATIONS","forEach","flag","flagState","isResolved","dirname","URL","import","meta","url","pathname","relativePkgPath","path","join","version","JSON","parse","fs","readFileSync","isCanary","includes","getFeatures","isProd","features","assign","CURRENT_FEATURES","feature","featureValue","FEATURE_OVERRIDES","EMBER_DATA_FEATURE_OVERRIDE","forcedFeatures","split","i","length","featureName","Error","_MacrosConfig","EmbroiderMacros","MacrosConfig","recastMacrosConfig","macros","setConfig","context","appRoot","config","for","globalConfig","debugOptions","LOGGING","debug","DEPRECATIONS","compatWith","FEATURES","includeDataAdapterInProduction","includeDataAdapter","finalizedConfig","polyfillUUID","deprecations","setGlobalConfig","filename"],"mappings":";;;;;;;AAAO,SAASA,MAAMA,GAAG;EACvB,MAAM;IAAEC,SAAS;IAAEC,UAAU;IAAEC,sBAAsB;AAAEC,IAAAA,QAAAA;GAAU,GAAGC,OAAO,CAACC,GAAG,CAAA;EAC/E,MAAMC,UAAU,GAAGN,SAAS,KAAK,YAAY,IAAK,CAACA,SAAS,IAAIG,QAAQ,KAAK,YAAa,CAAA;EAC1F,MAAMI,KAAK,GAAG,CAACD,UAAU,CAAA;AACzB,EAAA,MAAME,OAAO,GAAGD,KAAK,IAAIE,OAAO,CAACT,SAAS,KAAK,MAAM,IAAIC,UAAU,IAAIC,sBAAsB,CAAC,CAAA;EAE9F,OAAO;IACLM,OAAO;IACPF,UAAU;AACVC,IAAAA,KAAAA;GACD,CAAA;AACH;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,mBAAmB,GAAG,MAAM,CAAA;AACzC;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;AACO,MAAMC,0BAA0B,GAAG,KAAK,CAAA;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,KAAK,CAAA;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,yBAAyB,GAAG,KAAK,CAAA;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,wBAAwB,GAAG,KAAK,CAAA;;AAE7C;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;AACO,MAAMC,6BAA6B,GAAG,KAAK,CAAA;;AAElD;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;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;AAC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,IAAAA,QAAQ,EAAE6B,QAAQ;AAClB7E,IAAAA,GAAAA;GACD,CAAA;AAEDiE,EAAAA,MAAM,CAACkB,eAAe,CAACnD,MAAM,CAACC,IAAI,CAACmD,QAAQ,EAAE,WAAW,EAAEJ,eAAe,CAAC,CAAA;AAC5E;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/-private/utils/get-env.ts","../src/deprecation-versions.ts","../src/-private/utils/deprecations.ts","../src/-private/utils/features.ts","../src/index.ts"],"sourcesContent":["export function getEnv() {\n const { EMBER_ENV, IS_TESTING, EMBER_CLI_TEST_COMMAND, NODE_ENV } = process.env;\n const PRODUCTION = EMBER_ENV === 'production' || (!EMBER_ENV && NODE_ENV === 'production');\n const DEBUG = !PRODUCTION;\n const TESTING = DEBUG || Boolean(EMBER_ENV === 'test' || IS_TESTING || EMBER_CLI_TEST_COMMAND);\n\n return {\n TESTING,\n PRODUCTION,\n DEBUG,\n };\n}\n","// ========================\n// FOR CONTRIBUTING AUTHORS\n//\n// Deprecations here should also have guides PR'd to the emberjs deprecation app\n//\n// github: https://github.com/ember-learn/deprecation-app\n// website: https://deprecations.emberjs.com\n//\n// Each deprecation should also be given an associated URL pointing to the\n// relevant guide.\n//\n// URLs should be of the form: https://deprecations.emberjs.com/v<major>.x#toc_<fileName>\n// where <major> is the major version of the deprecation and <fileName> is the\n// name of the markdown file in the guides repo.\n//\n// ========================\n//\n\n/**\n * ## Deprecations\n *\n * EmberData allows users to opt-in and remove code that exists to support deprecated\n * behaviors.\n *\n * If your app has resolved all deprecations present in a given version,\n * you may specify that version as your \"compatibility\" version to remove\n * the code that supported the deprecated behavior from your app.\n *\n * For instance, if a deprecation was introduced in 3.13, and the app specifies\n * 3.13 as its minimum version compatibility, any deprecations introduced before\n * or during 3.13 would be stripped away.\n *\n * An app can use a different version than what it specifies as it's compatibility\n * version. For instance, an App could be using `3.16` while specifying compatibility\n * with `3.12`. This would remove any deprecations that were present in or before `3.12`\n * but keep support for anything deprecated in or above `3.13`.\n *\n * ### Configuring Compatibility\n *\n * To configure your compatibility version, set the `compatWith` to the version you\n * are compatible with on the `emberData` config in your `ember-cli-build.js` file.\n *\n * ```js\n * let app = new EmberApp(defaults, {\n * emberData: {\n * compatWith: '3.12',\n * },\n * });\n * ```\n *\n * Alternatively, individual deprecations can be resolved (and thus have its support stripped)\n * via one of the flag names listed below. For instance, given a flag named `DEPRECATE_FOO_BEHAVIOR`.\n *\n * This capability is interopable with `compatWith`. You may set `compatWith` and then selectively resolve\n * additional deprecations, or set compatWith and selectively un-resolve specific deprecations.\n *\n * Note: EmberData does not test against permutations of deprecations being stripped, our tests run against\n * \"all deprecated code included\" and \"all deprecated code removed\". Unspecified behavior may sometimes occur\n * when removing code for only some deprecations associated to a version number.\n *\n * ```js\n * let app = new EmberApp(defaults, {\n * emberData: {\n * deprecations: {\n * DEPRECATE_FOO_BEHAVIOR: false // set to false to strip this code\n * DEPRECATE_BAR_BEHAVIOR: true // force to true to not strip this code\n * }\n * }\n * })\n * ```\n *\n * The complete list of which versions specific deprecations will be removed in\n * can be found [here](https://github.com/emberjs/data/blob/main/packages/build-config/src/virtual/deprecation-versions.ts \"List of EmberData Deprecations\")\n *\n * @module @warp-drive-mirror/build-config/deprecations\n * @main @warp-drive-mirror/build-config/deprecations\n */\n\n/**\n * The following list represents deprecations currently active.\n *\n * Some deprecation flags guard multiple deprecation IDs. All\n * associated IDs are listed.\n *\n * @class CurrentDeprecations\n * @public\n */\nexport const DEPRECATE_CATCH_ALL = '99.0';\n/**\n * **id: ember-data:deprecate-non-strict-types**\n *\n * Currently, EmberData expects that the `type` property associated with\n * a resource follows several conventions.\n *\n * - The `type` property must be a non-empty string\n * - The `type` property must be singular\n * - The `type` property must be dasherized\n *\n * We are deprecating support for types that do not match this pattern\n * in order to unlock future improvements in which we can support `type`\n * being any string of your choosing.\n *\n * The goal is that in the future, you will be able to use any string\n * so long as it matches what your configured cache, identifier generation,\n * and schemas expect.\n *\n * E.G. It will matter not that your string is in a specific format like\n * singular, dasherized, etc. so long as everywhere you refer to the type\n * you use the same string.\n *\n * If using @ember-data-mirror/model, there will always be a restriction that the\n * `type` must match the path on disk where the model is defined.\n *\n * e.g. `app/models/foo/bar-bem.js` must have a type of `foo/bar-bem`\n *\n * @property DEPRECATE_NON_STRICT_TYPES\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_NON_STRICT_TYPES = '5.3';\n\n/**\n * **id: ember-data:deprecate-non-strict-id**\n *\n * Currently, EmberData expects that the `id` property associated with\n * a resource is a string.\n *\n * However, for legacy support in many locations we would accept a number\n * which would then immediately be coerced into a string.\n *\n * We are deprecating this legacy support for numeric IDs.\n *\n * The goal is that in the future, you will be able to use any ID format\n * so long as everywhere you refer to the ID you use the same format.\n *\n * However, for identifiers we will always use string IDs and so any\n * custom identifier configuration should provide a string ID.\n *\n * @property DEPRECATE_NON_STRICT_ID\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_NON_STRICT_ID = '5.3';\n\n/**\n * **id: <none yet assigned>**\n *\n * This is a planned deprecation which will trigger when observer or computed\n * chains are used to watch for changes on any EmberData LiveArray, CollectionRecordArray,\n * ManyArray or PromiseManyArray.\n *\n * Support for these chains is currently guarded by the deprecation flag\n * listed here, enabling removal of the behavior if desired.\n *\n * @property DEPRECATE_COMPUTED_CHAINS\n * @since 5.0\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_COMPUTED_CHAINS = '5.0';\n\n/**\n * **id: ember-data:deprecate-legacy-imports**\n *\n * Deprecates when importing from `ember-data/*` instead of `@ember-data/*`\n * in order to prepare for the eventual removal of the legacy `ember-data/*`\n *\n * All imports from `ember-data/*` should be updated to `@ember-data/*`\n * except for `ember-data/store`. When you are using `ember-data` (as opposed to\n * installing the indivudal packages) you should import from `ember-data/store`\n * instead of `@ember-data-mirror/store` in order to receive the appropriate configuration\n * of defaults.\n *\n * @property DEPRECATE_LEGACY_IMPORTS\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_LEGACY_IMPORTS = '5.3';\n\n/**\n * **id: ember-data:deprecate-non-unique-collection-payloads**\n *\n * Deprecates when the data for a hasMany relationship contains\n * duplicate identifiers.\n *\n * Previously, relationships would silently de-dupe the data\n * when received, but this behavior is being removed in favor\n * of erroring if the same related record is included multiple\n * times.\n *\n * For instance, in JSON:API the below relationship data would\n * be considered invalid:\n *\n * ```json\n * {\n * \"data\": {\n * \"type\": \"article\",\n * \"id\": \"1\",\n * \"relationships\": {\n * \"comments\": {\n * \"data\": [\n * { \"type\": \"comment\", \"id\": \"1\" },\n * { \"type\": \"comment\", \"id\": \"2\" },\n * { \"type\": \"comment\", \"id\": \"1\" } // duplicate\n * ]\n * }\n * }\n * }\n * ```\n *\n * To resolve this deprecation, either update your server to\n * not include duplicate data, or implement normalization logic\n * in either a request handler or serializer which removes\n * duplicate data from relationship payloads.\n *\n * @property DEPRECATE_NON_UNIQUE_PAYLOADS\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_NON_UNIQUE_PAYLOADS = '5.3';\n\n/**\n * **id: ember-data:deprecate-relationship-remote-update-clearing-local-state**\n *\n * Deprecates when a relationship is updated remotely and the local state\n * is cleared of all changes except for \"new\" records.\n *\n * Instead, any records not present in the new payload will be considered\n * \"removed\" while any records present in the new payload will be considered \"added\".\n *\n * This allows us to \"commit\" local additions and removals, preserving any additions\n * or removals that are not yet reflected in the remote state.\n *\n * For instance, given the following initial state:\n *\n * remote: A, B, C\n * local: add D, E\n * remove B, C\n * => A, D, E\n *\n *\n * If after an update, the remote state is now A, B, D, F then the new state will be\n *\n * remote: A, B, D, F\n * local: add E\n * remove B\n * => A, D, E, F\n *\n * Under the old behavior the updated local state would instead have been\n * => A, B, D, F\n *\n * Similarly, if a belongsTo remote State was A while its local state was B,\n * then under the old behavior if the remote state changed to C, the local state\n * would be updated to C. Under the new behavior, the local state would remain B.\n *\n * If the remote state was A while its local state was `null`, then under the old\n * behavior if the remote state changed to C, the local state would be updated to C.\n * Under the new behavior, the local state would remain `null`.\n *\n * Thus the new correct mental model is that the state of the relationship at any point\n * in time is whatever the most recent remote state is, plus any local additions or removals\n * you have made that have not yet been reflected by the remote state.\n *\n * > Note: The old behavior extended to modifying the inverse of a relationship. So if\n * > you had local state not reflected in the new remote state, inverses would be notified\n * > and their state reverted as well when \"resetting\" the relationship.\n * > Under the new behavior, since the local state is preserved the inverses will also\n * > not be reverted.\n *\n * ### Resolving this deprecation\n *\n * Resolving this deprecation can be done individually for each relationship\n * or globally for all relationships.\n *\n * To resolve it globally, set the `DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE`\n * to `false` in ember-cli-build.js\n *\n * ```js\n * let app = new EmberApp(defaults, {\n * emberData: {\n * deprecations: {\n * // set to false to strip the deprecated code (thereby opting into the new behavior)\n * DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE: false\n * }\n * }\n * })\n * ```\n *\n * To resolve this deprecation on an individual relationship, adjust the `options` passed to\n * the relationship. For relationships with inverses, both sides MUST be migrated to the new\n * behavior at the same time.\n *\n * ```js\n * class Person extends Model {\n * @hasMany('person', {\n * async: false,\n * inverse: null,\n * resetOnRemoteUpdate: false\n * }) children;\n *\n * @belongsTo('person', {\n * async: false,\n * inverse: null,\n * resetOnRemoteUpdate: false\n * }) parent;\n * }\n * ```\n *\n * > Note: false is the only valid value here, all other values (including missing)\n * > will be treated as true, where `true` is the legacy behavior that is now deprecated.\n *\n * Once you have migrated all relationships, you can remove the the resetOnRemoteUpdate\n * option and set the deprecation flag to false in ember-cli-build.\n *\n * ### What if I don't want the new behavior?\n *\n * EmberData's philosophy is to not make assumptions about your application. Where possible\n * we seek out \"100%\" solutions – solutions that work for all use cases - and where that is\n * not possible we default to \"90%\" solutions – solutions that work for the vast majority of use\n * cases. In the case of \"90%\" solutions we look for primitives that allow you to resolve the\n * 10% case in your application. If no such primitives exist, we provide an escape hatch that\n * ensures you can build the behavior you need without adopting the cost of the default solution.\n *\n * In this case, the old behavior was a \"40%\" solution. The inability for an application developer\n * to determine what changes were made locally, and thus what changes should be preserved, made\n * it impossible to build certain features easily, or in some cases at all. The proliferation of\n * feature requests, bug reports (from folks surprised by the prior behavior) and addon attempts\n * in this space are all evidence of this.\n *\n * We believe the new behavior is a \"90%\" solution. It works for the vast majority of use cases,\n * often without noticeable changes to existing application behavior, and provides primitives that\n * allow you to build the behavior you need for the remaining 10%.\n *\n * The great news is that this behavior defaults to trusting your API similar to the old behavior.\n * If your API is correct, you will not need to make any changes to your application to adopt\n * the new behavior.\n *\n * This means the 10% cases are those where you can't trust your API to provide the correct\n * information. In these cases, because you now have cheap access to a diff of the relationship\n * state, there are a few options that weren't available before:\n *\n * - you can adjust returned API payloads to contain the expected changes that it doesn't include\n * - you can modify local state by adding or removing records on the HasMany record array to remove\n * any local changes that were not returned by the API.\n * - you can use `<Cache>.mutate(mutation)` to directly modify the local cache state of the relationship\n * to match the expected state.\n *\n * What this version (5.3) does not yet provide is a way to directly modify the cache's remote state\n * for the relationship via public APIs other than via the broader action of upserting a response via\n * `<Cache>.put(document)`. However, such an API was sketched in the Cache 2.1 RFC\n * `<Cache>.patch(operation)` and is likely to be added in a future 5.x release of EmberData.\n *\n * This version (5.3) also does not yet provide a way to directly modify the graph (a general purpose\n * subset of cache behaviors specific to relationships) via public APIs. However, during the\n * 5.x release series we will be working on finalizing the Graph API and making it public.\n *\n * If none of these options work for you, you can always opt-out more broadly by implementing\n * a custom Cache with the relationship behaviors you need.\n *\n * @property DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE = '5.3';\n\n/**\n * **id: ember-data:deprecate-many-array-duplicates**\n *\n * When the flag is `true` (default), adding duplicate records to a `ManyArray`\n * is deprecated in non-production environments. In production environments,\n * duplicate records added to a `ManyArray` will be deduped and no error will\n * be thrown.\n *\n * When the flag is `false`, an error will be thrown when duplicates are added.\n *\n * @property DEPRECATE_MANY_ARRAY_DUPLICATES\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_MANY_ARRAY_DUPLICATES = '5.3';\n\n/**\n * **id: ember-data:deprecate-store-extends-ember-object**\n *\n * When the flag is `true` (default), the Store class will extend from `@ember/object`.\n * When the flag is `false` or `ember-source` is not present, the Store will not extend\n * from EmberObject.\n *\n * @property DEPRECATE_STORE_EXTENDS_EMBER_OBJECT\n * @since 5.4\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_STORE_EXTENDS_EMBER_OBJECT = '5.4';\n\n/**\n * **id: ember-data:schema-service-updates**\n *\n * When the flag is `true` (default), the legacy schema\n * service features will be enabled on the store and\n * the service, and deprecations will be thrown when\n * they are used.\n *\n * Deprecated features include:\n *\n * - `Store.registerSchema` method is deprecated in favor of the `Store.createSchemaService` hook\n * - `Store.registerSchemaDefinitionService` method is deprecated in favor of the `Store.createSchemaService` hook\n * - `Store.getSchemaDefinitionService` method is deprecated in favor of `Store.schema` property\n * - `SchemaService.doesTypeExist` method is deprecated in favor of the `SchemaService.hasResource` method\n * - `SchemaService.attributesDefinitionFor` method is deprecated in favor of the `SchemaService.fields` method\n * - `SchemaService.relationshipsDefinitionFor` method is deprecated in favor of the `SchemaService.fields` method\n *\n * @property ENABLE_LEGACY_SCHEMA_SERVICE\n * @since 5.4\n * @until 6.0\n * @public\n */\nexport const ENABLE_LEGACY_SCHEMA_SERVICE = '5.4';\n","import semver from 'semver';\n\nimport * as CURRENT_DEPRECATIONS from '../../deprecation-versions.ts';\ntype MajorMinor = `${number}.${number}`;\ntype DeprecationFlag = keyof typeof CURRENT_DEPRECATIONS;\n\nfunction deprecationIsResolved(deprecatedSince: MajorMinor, compatVersion: MajorMinor) {\n return semver.lte(semver.minVersion(deprecatedSince)!, semver.minVersion(compatVersion)!);\n}\n\nexport function getDeprecations(compatVersion: MajorMinor | null | undefined): { [key in DeprecationFlag]: boolean } {\n const flags = {} as Record<DeprecationFlag, boolean>;\n const keys = Object.keys(CURRENT_DEPRECATIONS) as DeprecationFlag[];\n\n keys.forEach((flag) => {\n const deprecatedSince = CURRENT_DEPRECATIONS[flag];\n let flagState = true; // default to no code-stripping\n\n // if we are told we are compatible with a version\n // we check if we can strip this flag\n if (compatVersion) {\n const isResolved = deprecationIsResolved(deprecatedSince, compatVersion);\n // if we've resolved, we strip (by setting the flag to false)\n /*\n if (DEPRECATED_FEATURE) {\n // deprecated code path\n } else {\n // if needed a non-deprecated code path\n }\n */\n flagState = !isResolved;\n }\n\n // console.log(`${flag}=${flagState} (${deprecatedSince} <= ${compatVersion})`);\n flags[flag] = flagState;\n });\n\n return flags;\n}\n","import fs from 'fs';\nimport path from 'path';\n\nimport * as CURRENT_FEATURES from '../../canary-features.ts';\ntype FEATURE = keyof typeof CURRENT_FEATURES;\n\nconst dirname = new URL(import.meta.url).pathname;\nconst relativePkgPath = path.join(dirname, '../../package.json');\n\nconst version = JSON.parse(fs.readFileSync(relativePkgPath, 'utf-8')).version;\nconst isCanary = version.includes('alpha');\n\nexport function getFeatures(isProd: boolean): { [key in FEATURE]: boolean } {\n const features = Object.assign({}, CURRENT_FEATURES) as Record<FEATURE, boolean>;\n const keys = Object.keys(features) as FEATURE[];\n\n if (!isCanary) {\n // disable all features with a current value of `null`\n for (const feature of keys) {\n let featureValue = features[feature];\n\n if (featureValue === null) {\n features[feature] = false;\n }\n }\n return features;\n }\n\n const FEATURE_OVERRIDES = process.env.EMBER_DATA_FEATURE_OVERRIDE;\n if (FEATURE_OVERRIDES === 'ENABLE_ALL_OPTIONAL') {\n // enable all features with a current value of `null`\n for (const feature of keys) {\n let featureValue = features[feature];\n\n if (featureValue === null) {\n features[feature] = true;\n }\n }\n } else if (FEATURE_OVERRIDES === 'DISABLE_ALL') {\n // disable all features, including those with a value of `true`\n for (const feature of keys) {\n features[feature] = false;\n }\n } else if (FEATURE_OVERRIDES) {\n // enable only the specific features listed in the environment\n // variable (comma separated)\n const forcedFeatures = FEATURE_OVERRIDES.split(',');\n for (let i = 0; i < forcedFeatures.length; i++) {\n let featureName = forcedFeatures[i];\n\n if (!keys.includes(featureName as FEATURE)) {\n throw new Error(`Unknown feature flag: ${featureName}`);\n }\n\n features[featureName as FEATURE] = true;\n }\n }\n\n if (isProd) {\n // disable all features with a current value of `null`\n for (const feature of keys) {\n let featureValue = features[feature];\n\n if (featureValue === null) {\n features[feature] = false;\n }\n }\n }\n\n return features;\n}\n","import EmbroiderMacros from '@embroider/macros/src/node.js';\nimport { getEnv } from './-private/utils/get-env.ts';\nimport { getDeprecations } from './-private/utils/deprecations.ts';\nimport { getFeatures } from './-private/utils/features.ts';\nimport * as LOGGING from './debugging.ts';\nimport type { MacrosConfig } from '@embroider/macros/src/node.js';\n\nconst _MacrosConfig = EmbroiderMacros.MacrosConfig as unknown as typeof MacrosConfig;\n\ntype LOG_CONFIG_KEY = keyof typeof LOGGING;\n\nexport type WarpDriveConfig = {\n debug?: Partial<InternalWarpDriveConfig['debug']>;\n polyfillUUID?: boolean;\n includeDataAdapterInProduction?: boolean;\n compatWith?: `${number}.${number}`;\n deprecations?: Partial<InternalWarpDriveConfig['deprecations']>;\n features?: Partial<InternalWarpDriveConfig['features']>;\n};\n\ntype InternalWarpDriveConfig = {\n debug: { [key in LOG_CONFIG_KEY]: boolean };\n polyfillUUID: boolean;\n includeDataAdapter: boolean;\n compatWith: `${number}.${number}` | null;\n deprecations: ReturnType<typeof getDeprecations>;\n features: ReturnType<typeof getFeatures>;\n env: {\n TESTING: boolean;\n PRODUCTION: boolean;\n DEBUG: boolean;\n };\n};\n\ntype MacrosWithGlobalConfig = Omit<MacrosConfig, 'globalConfig'> & { globalConfig: Record<string, unknown> };\n\nfunction recastMacrosConfig(macros: object): MacrosWithGlobalConfig {\n if (!('globalConfig' in macros)) {\n throw new Error('Expected MacrosConfig to have a globalConfig property');\n }\n return macros as MacrosWithGlobalConfig;\n}\n\nexport function setConfig(context: object, appRoot: string, config: WarpDriveConfig) {\n const macros = recastMacrosConfig(_MacrosConfig.for(context, appRoot));\n const isLegacySupport = (config as unknown as { ___legacy_support?: boolean }).___legacy_support;\n const hasDeprecatedConfig = isLegacySupport && Object.keys(config).length > 1;\n const hasInitiatedConfig = macros.globalConfig['WarpDrive'];\n\n // setConfig called by user prior to legacy support called\n if (isLegacySupport && hasInitiatedConfig) {\n if (hasDeprecatedConfig) {\n throw new Error(\n 'You have provided a config object to setConfig, but are also using the legacy emberData options key in ember-cli-build. Please remove the emberData key from options.'\n );\n }\n return;\n }\n\n // legacy support called prior to user setConfig\n if (isLegacySupport && hasDeprecatedConfig) {\n console.warn(\n `You are using the legacy emberData key in your ember-cli-build.js file. This key is deprecated and will be removed in the next major version of EmberData/WarpDrive. Please use \\`import { setConfig } from '@warp-drive-mirror/build-config';\\` instead.`\n );\n }\n\n // included hooks run during class initialization of the EmberApp instance\n // so our hook will run before the user has a chance to call setConfig\n // else we could print a useful message here\n // else if (isLegacySupport) {\n // console.warn(\n // `WarpDrive requires your ember-cli-build file to set a base configuration for the project.\\n\\nUsage:\\n\\t\\`import { setConfig } from '@warp-drive-mirror/build-config';\\n\\tsetConfig(app, __dirname, {});\\``\n // );\n // }\n\n const debugOptions: InternalWarpDriveConfig['debug'] = Object.assign({}, LOGGING, config.debug);\n\n const env = getEnv();\n const DEPRECATIONS = getDeprecations(config.compatWith || null);\n const FEATURES = getFeatures(env.PRODUCTION);\n\n const includeDataAdapterInProduction =\n typeof config.includeDataAdapterInProduction === 'boolean' ? config.includeDataAdapterInProduction : false;\n const includeDataAdapter = env.PRODUCTION ? includeDataAdapterInProduction : false;\n\n const finalizedConfig: InternalWarpDriveConfig = {\n debug: debugOptions,\n polyfillUUID: config.polyfillUUID ?? false,\n includeDataAdapter,\n compatWith: config.compatWith ?? null,\n deprecations: DEPRECATIONS,\n features: FEATURES,\n env,\n };\n\n macros.setGlobalConfig(import.meta.filename, 'WarpDrive', finalizedConfig);\n}\n"],"names":["getEnv","EMBER_ENV","IS_TESTING","EMBER_CLI_TEST_COMMAND","NODE_ENV","process","env","PRODUCTION","DEBUG","TESTING","Boolean","DEPRECATE_CATCH_ALL","DEPRECATE_NON_STRICT_TYPES","DEPRECATE_NON_STRICT_ID","DEPRECATE_COMPUTED_CHAINS","DEPRECATE_LEGACY_IMPORTS","DEPRECATE_NON_UNIQUE_PAYLOADS","DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE","DEPRECATE_MANY_ARRAY_DUPLICATES","DEPRECATE_STORE_EXTENDS_EMBER_OBJECT","ENABLE_LEGACY_SCHEMA_SERVICE","deprecationIsResolved","deprecatedSince","compatVersion","semver","lte","minVersion","getDeprecations","flags","keys","Object","CURRENT_DEPRECATIONS","forEach","flag","flagState","isResolved","dirname","URL","import","meta","url","pathname","relativePkgPath","path","join","version","JSON","parse","fs","readFileSync","isCanary","includes","getFeatures","isProd","features","assign","CURRENT_FEATURES","feature","featureValue","FEATURE_OVERRIDES","EMBER_DATA_FEATURE_OVERRIDE","forcedFeatures","split","i","length","featureName","Error","_MacrosConfig","EmbroiderMacros","MacrosConfig","recastMacrosConfig","macros","setConfig","context","appRoot","config","for","isLegacySupport","___legacy_support","hasDeprecatedConfig","hasInitiatedConfig","globalConfig","console","warn","debugOptions","LOGGING","debug","DEPRECATIONS","compatWith","FEATURES","includeDataAdapterInProduction","includeDataAdapter","finalizedConfig","polyfillUUID","deprecations","setGlobalConfig","filename"],"mappings":";;;;;;;AAAO,SAASA,MAAMA,GAAG;EACvB,MAAM;IAAEC,SAAS;IAAEC,UAAU;IAAEC,sBAAsB;AAAEC,IAAAA,QAAAA;GAAU,GAAGC,OAAO,CAACC,GAAG,CAAA;EAC/E,MAAMC,UAAU,GAAGN,SAAS,KAAK,YAAY,IAAK,CAACA,SAAS,IAAIG,QAAQ,KAAK,YAAa,CAAA;EAC1F,MAAMI,KAAK,GAAG,CAACD,UAAU,CAAA;AACzB,EAAA,MAAME,OAAO,GAAGD,KAAK,IAAIE,OAAO,CAACT,SAAS,KAAK,MAAM,IAAIC,UAAU,IAAIC,sBAAsB,CAAC,CAAA;EAE9F,OAAO;IACLM,OAAO;IACPF,UAAU;AACVC,IAAAA,KAAAA;GACD,CAAA;AACH;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,mBAAmB,GAAG,MAAM,CAAA;AACzC;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;AACO,MAAMC,0BAA0B,GAAG,KAAK,CAAA;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,uBAAuB,GAAG,KAAK,CAAA;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,yBAAyB,GAAG,KAAK,CAAA;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,wBAAwB,GAAG,KAAK,CAAA;;AAE7C;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;AACO,MAAMC,6BAA6B,GAAG,KAAK,CAAA;;AAElD;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;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;AACO,MAAMC,yDAAyD,GAAG,KAAK,CAAA;;AAE9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,+BAA+B,GAAG,KAAK,CAAA;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oCAAoC,GAAG,KAAK,CAAA;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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AAY,EAAElB,MAAM,CAACkB,YAAY,IAAI,KAAK;IAC1CF,kBAAkB;AAClBH,IAAAA,UAAU,EAAEb,MAAM,CAACa,UAAU,IAAI,IAAI;AACrCM,IAAAA,YAAY,EAAEP,YAAY;AAC1BjC,IAAAA,QAAQ,EAAEmC,QAAQ;AAClBnF,IAAAA,GAAAA;GACD,CAAA;AAEDiE,EAAAA,MAAM,CAACwB,eAAe,CAACzD,MAAM,CAACC,IAAI,CAACyD,QAAQ,EAAE,WAAW,EAAEJ,eAAe,CAAC,CAAA;AAC5E;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warp-drive-mirror/build-config",
3
- "version": "0.0.0-alpha.19",
3
+ "version": "0.0.0-alpha.21",
4
4
  "description": "Provides Build Configuration for projects using WarpDrive or EmberData",
5
5
  "keywords": [
6
6
  "ember-data-mirror",
@@ -45,7 +45,7 @@
45
45
  "semver": "^7.6.2"
46
46
  },
47
47
  "devDependencies": {
48
- "@warp-drive/internal-config": "5.4.0-alpha.82",
48
+ "@warp-drive/internal-config": "5.4.0-alpha.84",
49
49
  "@types/babel__core": "^7.20.5",
50
50
  "@types/node": "^20.12.12",
51
51
  "@babel/plugin-transform-typescript": "^7.24.5",
@@ -0,0 +1,4 @@
1
+ declare module '@warp-drive-mirror/build-config/cjs-set-config' {
2
+ export { setConfig } from '@warp-drive-mirror/build-config/index.ts';
3
+ }
4
+ //# sourceMappingURL=cjs-set-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cjs-set-config.d.ts","sourceRoot":"","sources":["../src/cjs-set-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC"}
@@ -1,6 +1,7 @@
1
1
  /// <reference path="./macros.d.ts" />
2
2
  /// <reference path="./validate-exports.type-test.d.ts" />
3
3
  /// <reference path="./deprecation-versions.d.ts" />
4
+ /// <reference path="./cjs-set-config.d.ts" />
4
5
  /// <reference path="./canary-features.d.ts" />
5
6
  /// <reference path="./deprecations.d.ts" />
6
7
  /// <reference path="./env.d.ts" />
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAK1C,KAAK,cAAc,GAAG,MAAM,OAAO,OAAO,CAAC;AAE3C,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC;IAClD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,UAAU,CAAC,EAAE,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,cAAc,CAAC,CAAC,CAAC;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC,CAAC;CACzD,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE;SAAG,GAAG,IAAI,cAAc,GAAG,OAAO;KAAE,CAAC;IAC5C,YAAY,EAAE,OAAO,CAAC;IACtB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,GAAG,MAAM,IAAI,MAAM,EAAE,GAAG,IAAI,CAAC;IACzC,YAAY,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;IACjD,QAAQ,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;IACzC,GAAG,EAAE;QACH,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,CAAC;KAChB,CAAC;CACH,CAAC;AAWF,wBAAgB,SAAS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