@warp-drive/build-config 4.13.0-alpha.4 → 4.13.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +19 -5
- package/README.md +2 -2
- package/dist/babel-macros.js +2 -1
- package/dist/babel-macros.js.map +1 -1
- package/dist/babel-plugin-transform-logging.cjs +46 -3
- package/dist/babel-plugin-transform-logging.cjs.map +1 -1
- package/dist/cjs-set-config.cjs +37 -1
- package/dist/cjs-set-config.cjs.map +1 -1
- package/dist/{debugging-C7V_x5iN.js → debugging-PCb4hczb.js} +25 -3
- package/dist/{debugging-C7V_x5iN.js.map → debugging-PCb4hczb.js.map} +1 -1
- package/dist/debugging.js +1 -1
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/logos/NCC-1701-a-gold.svg +4 -0
- package/logos/NCC-1701-a-gold_100.svg +1 -0
- package/logos/NCC-1701-a-gold_base-64.txt +1 -0
- package/logos/README.md +4 -0
- package/logos/docs-badge.svg +2 -0
- package/logos/ember-data-logo-dark.svg +12 -0
- package/logos/ember-data-logo-light.svg +12 -0
- package/logos/github-header.svg +444 -0
- package/logos/social1.png +0 -0
- package/logos/social2.png +0 -0
- package/logos/warp-drive-logo-dark.svg +4 -0
- package/logos/warp-drive-logo-gold.svg +4 -0
- package/package.json +17 -17
- package/unstable-preview-types/-private/utils/get-env.d.ts.map +1 -1
- package/unstable-preview-types/-private/utils/logging.d.ts +14 -0
- package/unstable-preview-types/-private/utils/logging.d.ts.map +1 -0
- package/unstable-preview-types/babel-macros.d.ts +3 -24
- package/unstable-preview-types/babel-macros.d.ts.map +1 -1
- package/unstable-preview-types/debugging.d.ts +19 -0
- package/unstable-preview-types/debugging.d.ts.map +1 -1
- package/unstable-preview-types/index.d.ts +10 -6
- package/unstable-preview-types/index.d.ts.map +1 -1
- /package/{NCC-1701-a-blue.svg → logos/NCC-1701-a-blue.svg} +0 -0
- /package/{NCC-1701-a.svg → logos/NCC-1701-a.svg} +0 -0
package/LICENSE.md
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (
|
|
3
|
+
Copyright (c) 2017-2025 Ember.js and contributors
|
|
4
|
+
Copyright (c) 2011-2017 Tilde, Inc. and contributors
|
|
5
|
+
Copyright (c) 2011 LivingSocial Inc.
|
|
4
6
|
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
6
13
|
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
copies or substantial portions of the Software.
|
|
8
16
|
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<img
|
|
3
3
|
class="project-logo"
|
|
4
|
-
src="./NCC-1701-a-blue.svg#gh-light-mode-only"
|
|
4
|
+
src="./logos/NCC-1701-a-blue.svg#gh-light-mode-only"
|
|
5
5
|
alt="WarpDrive"
|
|
6
6
|
width="120px"
|
|
7
7
|
title="WarpDrive" />
|
|
8
8
|
<img
|
|
9
9
|
class="project-logo"
|
|
10
|
-
src="./NCC-1701-a.svg#gh-dark-mode-only"
|
|
10
|
+
src="./logos/NCC-1701-a.svg#gh-dark-mode-only"
|
|
11
11
|
alt="WarpDrive"
|
|
12
12
|
width="120px"
|
|
13
13
|
title="WarpDrive" />
|
package/dist/babel-macros.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as LOGGING } from './debugging-
|
|
1
|
+
import { L as LOGGING } from './debugging-PCb4hczb.js';
|
|
2
2
|
import { C as CURRENT_FEATURES } from './canary-features-BzGSGY5j.js';
|
|
3
3
|
import { C as CURRENT_DEPRECATIONS } from './deprecations-BjnhZL6k.js';
|
|
4
4
|
|
|
@@ -29,6 +29,7 @@ function macros() {
|
|
|
29
29
|
}, '@warp-drive/build-config/deprecation-stripping'], [TransformDebugLogging, {
|
|
30
30
|
source: '@warp-drive/build-config/debugging',
|
|
31
31
|
configKey: 'debug',
|
|
32
|
+
runtimeKey: 'activeLogging',
|
|
32
33
|
flags: config.debug
|
|
33
34
|
}, '@warp-drive/build-config/debugging-stripping'], [TransformDebugLogging, {
|
|
34
35
|
source: '@warp-drive/build-config/env',
|
package/dist/babel-macros.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"babel-macros.js","sources":["../src/babel-macros.ts"],"sourcesContent":["import * as LOGGING from './debugging.ts';\nimport * as CURRENT_FEATURES from './canary-features.ts';\nimport * as CURRENT_DEPRECATIONS from './deprecations.ts';\n\ntype FEATURE = keyof typeof CURRENT_FEATURES;\nconst features = Object.keys(CURRENT_FEATURES) as FEATURE[];\nconst FEATURES = Object.assign({}, CURRENT_FEATURES) as Record<FEATURE, boolean>;\nfeatures.forEach((feature) => {\n let featureValue = FEATURES[feature];\n if (featureValue === null) {\n FEATURES[feature] = false;\n }\n});\n\nconst config = {\n features: FEATURES,\n deprecations: Object.assign({}, CURRENT_DEPRECATIONS),\n debug: Object.assign({}, LOGGING),\n};\n\nexport function macros() {\n const TransformAsserts = import.meta.resolve('./babel-plugin-transform-asserts.cjs').slice(7);\n const TransformDeprecations = import.meta.resolve('./babel-plugin-transform-deprecations.cjs').slice(7);\n const TransformDebugLogging = import.meta.resolve('./babel-plugin-transform-logging.cjs').slice(7);\n const TransformFeatures = import.meta.resolve('./babel-plugin-transform-features.cjs').slice(7);\n\n let plugins = [\n [TransformAsserts, {}, '@warp-drive/build-config/asserts-stripping'],\n [\n TransformFeatures,\n {\n source: '@warp-drive/build-config/canary-features',\n flags: config.features,\n },\n '@warp-drive/build-config/canary-features-stripping',\n ],\n [\n TransformDeprecations,\n {\n source: '@warp-drive/build-config/deprecations',\n flags: config.deprecations,\n },\n '@warp-drive/build-config/deprecation-stripping',\n ],\n [\n TransformDebugLogging,\n {\n source: '@warp-drive/build-config/debugging',\n configKey: 'debug',\n flags: config.debug,\n },\n '@warp-drive/build-config/debugging-stripping',\n ],\n [\n TransformDebugLogging,\n {\n source: '@warp-drive/build-config/env',\n configKey: 'env',\n flags: {\n TESTING: true,\n PRODUCTION: true,\n DEBUG: true,\n IS_RECORDING: true,\n IS_CI: true,\n SHOULD_RECORD: true,\n },\n },\n '@warp-drive/build-config/env',\n ],\n ];\n\n return plugins;\n}\n"],"names":["features","Object","keys","CURRENT_FEATURES","FEATURES","assign","forEach","feature","featureValue","config","deprecations","CURRENT_DEPRECATIONS","debug","LOGGING","macros","TransformAsserts","import","meta","resolve","slice","TransformDeprecations","TransformDebugLogging","TransformFeatures","plugins","source","flags","configKey","TESTING","PRODUCTION","DEBUG","IS_RECORDING","IS_CI","SHOULD_RECORD"],"mappings":";;;;AAKA,MAAMA,QAAQ,GAAGC,MAAM,CAACC,IAAI,CAACC,gBAAgB,CAAc;AAC3D,MAAMC,QAAQ,GAAGH,MAAM,CAACI,MAAM,CAAC,EAAE,EAAEF,gBAAgB,CAA6B;AAChFH,QAAQ,CAACM,OAAO,CAAEC,OAAO,IAAK;AAC5B,EAAA,IAAIC,YAAY,GAAGJ,QAAQ,CAACG,OAAO,CAAC;EACpC,IAAIC,YAAY,KAAK,IAAI,EAAE;AACzBJ,IAAAA,QAAQ,CAACG,OAAO,CAAC,GAAG,KAAK;AAC3B;AACF,CAAC,CAAC;AAEF,MAAME,MAAM,GAAG;AACbT,EAAAA,QAAQ,EAAEI,QAAQ;EAClBM,YAAY,EAAET,MAAM,CAACI,MAAM,CAAC,EAAE,EAAEM,oBAAoB,CAAC;EACrDC,KAAK,EAAEX,MAAM,CAACI,MAAM,CAAC,EAAE,EAAEQ,OAAO;AAClC,CAAC;
|
|
1
|
+
{"version":3,"file":"babel-macros.js","sources":["../src/babel-macros.ts"],"sourcesContent":["import * as LOGGING from './debugging.ts';\nimport * as CURRENT_FEATURES from './canary-features.ts';\nimport * as CURRENT_DEPRECATIONS from './deprecations.ts';\n\ntype FEATURE = keyof typeof CURRENT_FEATURES;\nconst features = Object.keys(CURRENT_FEATURES) as FEATURE[];\nconst FEATURES = Object.assign({}, CURRENT_FEATURES) as Record<FEATURE, boolean>;\nfeatures.forEach((feature) => {\n let featureValue = FEATURES[feature];\n if (featureValue === null) {\n FEATURES[feature] = false;\n }\n});\n\nconst config = {\n features: FEATURES,\n deprecations: Object.assign({}, CURRENT_DEPRECATIONS),\n debug: Object.assign({}, LOGGING),\n};\n\ntype BabelPlugin = [string, Record<string, unknown>, string];\n\nexport function macros(): BabelPlugin[] {\n const TransformAsserts = import.meta.resolve('./babel-plugin-transform-asserts.cjs').slice(7);\n const TransformDeprecations = import.meta.resolve('./babel-plugin-transform-deprecations.cjs').slice(7);\n const TransformDebugLogging = import.meta.resolve('./babel-plugin-transform-logging.cjs').slice(7);\n const TransformFeatures = import.meta.resolve('./babel-plugin-transform-features.cjs').slice(7);\n\n let plugins = [\n [TransformAsserts, {}, '@warp-drive/build-config/asserts-stripping'],\n [\n TransformFeatures,\n {\n source: '@warp-drive/build-config/canary-features',\n flags: config.features,\n },\n '@warp-drive/build-config/canary-features-stripping',\n ],\n [\n TransformDeprecations,\n {\n source: '@warp-drive/build-config/deprecations',\n flags: config.deprecations,\n },\n '@warp-drive/build-config/deprecation-stripping',\n ],\n [\n TransformDebugLogging,\n {\n source: '@warp-drive/build-config/debugging',\n configKey: 'debug',\n runtimeKey: 'activeLogging',\n flags: config.debug,\n },\n '@warp-drive/build-config/debugging-stripping',\n ],\n [\n TransformDebugLogging,\n {\n source: '@warp-drive/build-config/env',\n configKey: 'env',\n flags: {\n TESTING: true,\n PRODUCTION: true,\n DEBUG: true,\n IS_RECORDING: true,\n IS_CI: true,\n SHOULD_RECORD: true,\n },\n },\n '@warp-drive/build-config/env',\n ],\n ] satisfies BabelPlugin[];\n\n return plugins;\n}\n"],"names":["features","Object","keys","CURRENT_FEATURES","FEATURES","assign","forEach","feature","featureValue","config","deprecations","CURRENT_DEPRECATIONS","debug","LOGGING","macros","TransformAsserts","import","meta","resolve","slice","TransformDeprecations","TransformDebugLogging","TransformFeatures","plugins","source","flags","configKey","runtimeKey","TESTING","PRODUCTION","DEBUG","IS_RECORDING","IS_CI","SHOULD_RECORD"],"mappings":";;;;AAKA,MAAMA,QAAQ,GAAGC,MAAM,CAACC,IAAI,CAACC,gBAAgB,CAAc;AAC3D,MAAMC,QAAQ,GAAGH,MAAM,CAACI,MAAM,CAAC,EAAE,EAAEF,gBAAgB,CAA6B;AAChFH,QAAQ,CAACM,OAAO,CAAEC,OAAO,IAAK;AAC5B,EAAA,IAAIC,YAAY,GAAGJ,QAAQ,CAACG,OAAO,CAAC;EACpC,IAAIC,YAAY,KAAK,IAAI,EAAE;AACzBJ,IAAAA,QAAQ,CAAC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AAM,CAACG;AAChB,GAAC,EACD,8CAA8C,CAC/C,EACD,CACES,qBAAqB,EACrB;AACEG,IAAAA,MAAM,EAAE,8BAA8B;AACtCE,IAAAA,SAAS,EAAE,KAAK;AAChBD,IAAAA,KAAK,EAAE;AACLG,MAAAA,OAAO,EAAE,IAAI;AACbC,MAAAA,UAAU,EAAE,IAAI;AAChBC,MAAAA,KAAK,EAAE,IAAI;AACXC,MAAAA,YAAY,EAAE,IAAI;AAClBC,MAAAA,KAAK,EAAE,IAAI;AACXC,MAAAA,aAAa,EAAE;AACjB;GACD,EACD,8BAA8B,CAC/B,CACsB;AAEzB,EAAA,OAAOV,OAAO;AAChB;;;;"}
|
|
@@ -27,6 +27,8 @@ function babelPluginTransformLogging (babel) {
|
|
|
27
27
|
}
|
|
28
28
|
let localBindingName = specifier.node.local.name;
|
|
29
29
|
let binding = specifier.scope.getBinding(localBindingName);
|
|
30
|
+
const enableRuntimeActivation = Boolean(state.opts.runtimeKey);
|
|
31
|
+
const strippableKey = enableRuntimeActivation ? state.opts.runtimeKey : state.opts.configKey;
|
|
30
32
|
binding.referencePaths.forEach(p => {
|
|
31
33
|
let negateStatement = false;
|
|
32
34
|
let node = p;
|
|
@@ -34,12 +36,53 @@ function babelPluginTransformLogging (babel) {
|
|
|
34
36
|
negateStatement = true;
|
|
35
37
|
node = p.parentPath;
|
|
36
38
|
}
|
|
37
|
-
let getConfig = t.memberExpression(t.memberExpression(t.memberExpression(t.callExpression(state.importer.import(p, '@embroider/macros', 'getGlobalConfig'), []), t.identifier('WarpDrive')), t.identifier(
|
|
39
|
+
let getConfig = t.memberExpression(t.memberExpression(t.memberExpression(t.callExpression(state.importer.import(p, '@embroider/macros', 'getGlobalConfig'), []), t.identifier('WarpDrive')), t.identifier(strippableKey)), t.identifier(name));
|
|
38
40
|
node.replaceWith(
|
|
39
|
-
// if (LOG_FOO)
|
|
41
|
+
// if (LOG_FOO) {
|
|
42
|
+
// // ...
|
|
43
|
+
// }
|
|
40
44
|
// =>
|
|
41
|
-
// if (macroCondition(getGlobalConfig('WarpDrive').debug.LOG_FOO))
|
|
45
|
+
// if (macroCondition(getGlobalConfig('WarpDrive').debug.LOG_FOO)) {
|
|
46
|
+
// // ...
|
|
47
|
+
// }
|
|
42
48
|
t.callExpression(state.importer.import(p, '@embroider/macros', 'macroCondition'), [negateStatement ? t.unaryExpression('!', getConfig) : getConfig]));
|
|
49
|
+
if (enableRuntimeActivation) {
|
|
50
|
+
// we do not yet support arbitrary runtime activation locations,
|
|
51
|
+
// the only supported locations are `if (LOG)` style statements, no
|
|
52
|
+
// ternaries or other more complex expressions
|
|
53
|
+
const parentIfStatement = node.parentPath.type === 'IfStatement' ? node.parentPath : null;
|
|
54
|
+
if (!parentIfStatement) {
|
|
55
|
+
throw new Error(`Runtime activation of logging flags is only supported in if statements, but found node '${node.parentPath.type}'`);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// if (LOG_FOO) {
|
|
59
|
+
// // ...
|
|
60
|
+
// }
|
|
61
|
+
// =>
|
|
62
|
+
// if (macroCondition(getGlobalConfig('WarpDrive').activeLogging.LOG_FOO)) {
|
|
63
|
+
// if (getGlobalConfig('WarpDrive').debug.LOG_FOO || globalThis.getWarpDriveRuntimeConfig().debug.LOG_FOO) {
|
|
64
|
+
// // ...
|
|
65
|
+
// }
|
|
66
|
+
// }
|
|
67
|
+
//
|
|
68
|
+
// the outer-if is generated by the node-replace above. The inner if is generated here.
|
|
69
|
+
const originalBody = parentIfStatement.node.consequent;
|
|
70
|
+
|
|
71
|
+
// getGlobalConfig('WarpDrive').debug.LOG_FOO
|
|
72
|
+
const getActualConfig = t.memberExpression(t.memberExpression(t.memberExpression(t.callExpression(state.importer.import(p, '@embroider/macros', 'getGlobalConfig'), []), t.identifier('WarpDrive')), t.identifier(state.opts.configKey)), t.identifier(name));
|
|
73
|
+
|
|
74
|
+
// globalThis.getWarpDriveRuntimeConfig().debug.LOG_FOO
|
|
75
|
+
const getRuntimeConfig = t.memberExpression(t.memberExpression(t.callExpression(t.memberExpression(t.identifier('globalThis'), t.identifier('getWarpDriveRuntimeConfig')), []), t.identifier(state.opts.configKey)), t.identifier(name));
|
|
76
|
+
|
|
77
|
+
// <getActualConfig> || <getRuntimeConfig>
|
|
78
|
+
const ifExp = t.logicalExpression('||', getActualConfig, getRuntimeConfig);
|
|
79
|
+
|
|
80
|
+
// if (<negateStatement>(<getActualConfig> || <getRuntimeConfig>)) <originalBody>
|
|
81
|
+
const innerIfStatement = t.ifStatement(negateStatement ? t.unaryExpression('!', ifExp) : ifExp, originalBody);
|
|
82
|
+
|
|
83
|
+
// replace the original body with the new if statement
|
|
84
|
+
parentIfStatement.node.consequent = t.blockStatement([innerIfStatement]);
|
|
85
|
+
}
|
|
43
86
|
});
|
|
44
87
|
specifier.scope.removeOwnBinding(localBindingName);
|
|
45
88
|
specifier.remove();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"babel-plugin-transform-logging.cjs","sources":["../cjs-src/transforms/babel-plugin-transform-logging.js"],"sourcesContent":["import { ImportUtil } from 'babel-import-util';\n\nfunction parentIsUnary(node) {\n if (node.parent.type === 'UnaryExpression' && node.parent.operator === '!') {\n return true;\n }\n return false;\n}\n\nexport default function (babel) {\n const { types: t } = babel;\n\n return {\n name: 'ast-transform', // not required\n visitor: {\n ImportDeclaration(path, state) {\n const importPath = path.node.source.value;\n\n if (importPath === state.opts.source) {\n const specifiers = path.get('specifiers');\n specifiers.forEach((specifier) => {\n let name = specifier.node.imported.name;\n if (!(name in state.opts.flags)) {\n throw new Error(`Unexpected flag ${name} imported from ${state.opts.source}`);\n }\n let localBindingName = specifier.node.local.name;\n let binding = specifier.scope.getBinding(localBindingName);\n binding.referencePaths.forEach((p) => {\n let negateStatement = false;\n let node = p;\n if (parentIsUnary(p)) {\n negateStatement = true;\n node = p.parentPath;\n }\n let getConfig = t.memberExpression(\n t.memberExpression(\n t.memberExpression(\n t.callExpression(state.importer.import(p, '@embroider/macros', 'getGlobalConfig'), []),\n t.identifier('WarpDrive')\n ),\n t.identifier(state.opts.configKey)\n ),\n t.identifier(name)\n );\n node.replaceWith(\n // if (LOG_FOO)\n // =>\n // if (macroCondition(getGlobalConfig('WarpDrive').debug.LOG_FOO))\n t.callExpression(state.importer.import(p, '@embroider/macros', 'macroCondition'), [\n negateStatement ? t.unaryExpression('!', getConfig) : getConfig,\n ])\n );\n });\n specifier.scope.removeOwnBinding(localBindingName);\n specifier.remove();\n });\n if (path.get('specifiers').length === 0) {\n path.remove();\n }\n }\n },\n\n Program(path, state) {\n state.importer = new ImportUtil(t, path);\n },\n },\n };\n}\n"],"names":["parentIsUnary","node","parent","type","operator","babel","types","t","name","visitor","ImportDeclaration","path","state","importPath","source","value","opts","specifiers","get","forEach","specifier","imported","flags","Error","localBindingName","local","binding","scope","getBinding","referencePaths","p","negateStatement","parentPath","getConfig","memberExpression","callExpression","importer","import","identifier","configKey","replaceWith","unaryExpression","removeOwnBinding","remove","length","Program","ImportUtil"],"mappings":";;;;AAEA,SAASA,aAAaA,CAACC,IAAI,EAAE;AAC3B,EAAA,IAAIA,IAAI,CAACC,MAAM,CAACC,IAAI,KAAK,iBAAiB,IAAIF,IAAI,CAACC,MAAM,CAACE,QAAQ,KAAK,GAAG,EAAE;AAC1E,IAAA,OAAO,IAAI;AACb;AACA,EAAA,OAAO,KAAK;AACd;AAEe,oCAAA,EAAUC,KAAK,EAAE;EAC9B,MAAM;AAAEC,IAAAA,KAAK,EAAEC;AAAE,GAAC,GAAGF,KAAK;EAE1B,OAAO;AACLG,IAAAA,IAAI,EAAE,eAAe;AAAE;AACvBC,IAAAA,OAAO,EAAE;AACPC,MAAAA,iBAAiBA,CAACC,IAAI,EAAEC,KAAK,EAAE;QAC7B,MAAMC,UAAU,GAAGF,IAAI,CAACV,IAAI,CAACa,MAAM,CAACC,KAAK;AAEzC,QAAA,IAAIF,UAAU,KAAKD,KAAK,CAACI,IAAI,CAACF,MAAM,EAAE;AACpC,UAAA,MAAMG,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IAAI,CACnB,CAAC;AACDP,cAAAA,IAAI,CAACuC,WAAW;AACd;AACA;AACA;AACAjC,cAAAA,CAAC,CAAC4B,cAAc,CAACvB,KAAK,CAACwB,QAAQ,CAACC,MAAM,CAACP,CAAC,EAAE,mBAAmB,EAAE,gBAAgB,CAAC,EAAE,CAChFC,eAAe,GAAGxB,CAAC,CAACkC,eAAe,CAAC,GAAG,EAAER,SAAS,CAAC,GAAGA,SAAS,CAChE,CACH,CAAC;AACH,aAAC,CAAC;AACFb,YAAAA,SAAS,CAACO,KAAK,CAACe,gBAAgB,CAAClB,gBAAgB,CAAC;YAClDJ,SAAS,CAACuB,MAAM,EAAE;AACpB,WAAC,CAAC;UACF,IAAIhC,IAAI,CAACO,GAAG,CAAC,YAAY,CAAC,CAAC0B,MAAM,KAAK,CAAC,EAAE;YACvCjC,IAAI,CAACgC,MAAM,EAAE;AACf;AACF;OACD;AAEDE,MAAAA,OAAOA,CAAClC,IAAI,EAAEC,KAAK,EAAE;QACnBA,KAAK,CAACwB,QAAQ,GAAG,IAAIU,0BAAU,CAACvC,CAAC,EAAEI,IAAI,CAAC;AAC1C;AACF;GACD;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"babel-plugin-transform-logging.cjs","sources":["../cjs-src/transforms/babel-plugin-transform-logging.js"],"sourcesContent":["import { ImportUtil } from 'babel-import-util';\n\nfunction parentIsUnary(node) {\n if (node.parent.type === 'UnaryExpression' && node.parent.operator === '!') {\n return true;\n }\n return false;\n}\n\nexport default function (babel) {\n const { types: t } = babel;\n\n return {\n name: 'ast-transform', // not required\n visitor: {\n ImportDeclaration(path, state) {\n const importPath = path.node.source.value;\n\n if (importPath === state.opts.source) {\n const specifiers = path.get('specifiers');\n specifiers.forEach((specifier) => {\n let name = specifier.node.imported.name;\n if (!(name in state.opts.flags)) {\n throw new Error(`Unexpected flag ${name} imported from ${state.opts.source}`);\n }\n let localBindingName = specifier.node.local.name;\n let binding = specifier.scope.getBinding(localBindingName);\n const enableRuntimeActivation = Boolean(state.opts.runtimeKey);\n const strippableKey = enableRuntimeActivation ? state.opts.runtimeKey : state.opts.configKey;\n\n binding.referencePaths.forEach((p) => {\n let negateStatement = false;\n let node = p;\n if (parentIsUnary(p)) {\n negateStatement = true;\n node = p.parentPath;\n }\n let getConfig = t.memberExpression(\n t.memberExpression(\n t.memberExpression(\n t.callExpression(state.importer.import(p, '@embroider/macros', 'getGlobalConfig'), []),\n t.identifier('WarpDrive')\n ),\n t.identifier(strippableKey)\n ),\n t.identifier(name)\n );\n\n node.replaceWith(\n // if (LOG_FOO) {\n // // ...\n // }\n // =>\n // if (macroCondition(getGlobalConfig('WarpDrive').debug.LOG_FOO)) {\n // // ...\n // }\n t.callExpression(state.importer.import(p, '@embroider/macros', 'macroCondition'), [\n negateStatement ? t.unaryExpression('!', getConfig) : getConfig,\n ])\n );\n\n if (enableRuntimeActivation) {\n // we do not yet support arbitrary runtime activation locations,\n // the only supported locations are `if (LOG)` style statements, no\n // ternaries or other more complex expressions\n const parentIfStatement = node.parentPath.type === 'IfStatement' ? node.parentPath : null;\n if (!parentIfStatement) {\n throw new Error(\n `Runtime activation of logging flags is only supported in if statements, but found node '${node.parentPath.type}'`\n );\n }\n\n // if (LOG_FOO) {\n // // ...\n // }\n // =>\n // if (macroCondition(getGlobalConfig('WarpDrive').activeLogging.LOG_FOO)) {\n // if (getGlobalConfig('WarpDrive').debug.LOG_FOO || globalThis.getWarpDriveRuntimeConfig().debug.LOG_FOO) {\n // // ...\n // }\n // }\n //\n // the outer-if is generated by the node-replace above. The inner if is generated here.\n const originalBody = parentIfStatement.node.consequent;\n\n // getGlobalConfig('WarpDrive').debug.LOG_FOO\n const getActualConfig = t.memberExpression(\n t.memberExpression(\n t.memberExpression(\n t.callExpression(state.importer.import(p, '@embroider/macros', 'getGlobalConfig'), []),\n t.identifier('WarpDrive')\n ),\n t.identifier(state.opts.configKey)\n ),\n t.identifier(name)\n );\n\n // globalThis.getWarpDriveRuntimeConfig().debug.LOG_FOO\n const getRuntimeConfig = t.memberExpression(\n t.memberExpression(\n t.callExpression(\n t.memberExpression(t.identifier('globalThis'), t.identifier('getWarpDriveRuntimeConfig')),\n []\n ),\n t.identifier(state.opts.configKey)\n ),\n t.identifier(name)\n );\n\n // <getActualConfig> || <getRuntimeConfig>\n const ifExp = t.logicalExpression('||', getActualConfig, getRuntimeConfig);\n\n // if (<negateStatement>(<getActualConfig> || <getRuntimeConfig>)) <originalBody>\n const innerIfStatement = t.ifStatement(\n negateStatement ? t.unaryExpression('!', ifExp) : ifExp,\n originalBody\n );\n\n // replace the original body with the new if statement\n parentIfStatement.node.consequent = t.blockStatement([innerIfStatement]);\n } else {\n }\n });\n specifier.scope.removeOwnBinding(localBindingName);\n specifier.remove();\n });\n if (path.get('specifiers').length === 0) {\n path.remove();\n }\n }\n },\n\n Program(path, state) {\n state.importer = new ImportUtil(t, path);\n },\n },\n };\n}\n"],"names":["parentIsUnary","node","parent","type","operator","babel","types","t","name","visitor","ImportDeclaration","path","state","importPath","source","value","opts","specifiers","get","forEach","specifier","imported","flags","Error","localBindingName","local","binding","scope","getBinding","enableRuntimeActivation","Boolean","runtimeKey","strippableKey","configKey","referencePaths","p","negateStatement","parentPath","getConfig","memberExpression","callExpression","importer","import","identifier","replaceWith","unaryExpression","parentIfStatement","originalBody","consequent","getActualConfig","getRuntimeConfig","ifExp","logicalExpression","innerIfStatement","ifStatement","blockStatement","removeOwnBinding","remove","length","Program","ImportUtil"],"mappings":";;;;AAEA,SAASA,aAAaA,CAACC,IAAI,EAAE;AAC3B,EAAA,IAAIA,IAAI,CAACC,MAAM,CAACC,IAAI,KAAK,iBAAiB,IAAIF,IAAI,CAACC,MAAM,CAACE,QAAQ,KAAK,GAAG,EAAE;AAC1E,IAAA,OAAO,IAAI;AACb;AACA,EAAA,OAAO,KAAK;AACd;AAEe,oCAAA,EAAUC,KAAK,EAAE;EAC9B,MAAM;AAAEC,IAAAA,KAAK,EAAEC;AAAE,GAAC,GAAGF,KAAK;EA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A,SAAS,CAACO,KAAK,CAAC6B,gBAAgB,CAAChC,gBAAgB,CAAC;YAClDJ,SAAS,CAACqC,MAAM,EAAE;AACpB,WAAC,CAAC;UACF,IAAI9C,IAAI,CAACO,GAAG,CAAC,YAAY,CAAC,CAACwC,MAAM,KAAK,CAAC,EAAE;YACvC/C,IAAI,CAAC8C,MAAM,EAAE;AACf;AACF;OACD;AAEDE,MAAAA,OAAOA,CAAChD,IAAI,EAAEC,KAAK,EAAE;QACnBA,KAAK,CAAC6B,QAAQ,GAAG,IAAImB,0BAAU,CAACrD,CAAC,EAAEI,IAAI,CAAC;AAC1C;AACF;GACD;AACH;;;;"}
|
package/dist/cjs-set-config.cjs
CHANGED
|
@@ -1411,9 +1411,30 @@ const LOG_INSTANCE_CACHE = false;
|
|
|
1411
1411
|
* @public
|
|
1412
1412
|
*/
|
|
1413
1413
|
const LOG_METRIC_COUNTS = false;
|
|
1414
|
+
/**
|
|
1415
|
+
* Helps when debugging causes of a change notification
|
|
1416
|
+
* when processing an update to a hasMany relationship.
|
|
1417
|
+
*
|
|
1418
|
+
* @property {boolean} DEBUG_RELATIONSHIP_NOTIFICATIONS
|
|
1419
|
+
* @public
|
|
1420
|
+
*/
|
|
1421
|
+
const DEBUG_RELATIONSHIP_NOTIFICATIONS = false;
|
|
1422
|
+
|
|
1423
|
+
/**
|
|
1424
|
+
* A private flag to enable logging of the native Map/Set
|
|
1425
|
+
* constructor and method calls.
|
|
1426
|
+
*
|
|
1427
|
+
* EXTREMELY MALPERFORMANT
|
|
1428
|
+
*
|
|
1429
|
+
* LOG_METRIC_COUNTS must also be enabled.
|
|
1430
|
+
*
|
|
1431
|
+
* @typedoc
|
|
1432
|
+
*/
|
|
1433
|
+
const __INTERNAL_LOG_NATIVE_MAP_SET_COUNTS = false;
|
|
1414
1434
|
|
|
1415
1435
|
const LOGGING = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1416
1436
|
__proto__: null,
|
|
1437
|
+
DEBUG_RELATIONSHIP_NOTIFICATIONS,
|
|
1417
1438
|
LOG_GRAPH,
|
|
1418
1439
|
LOG_IDENTIFIERS,
|
|
1419
1440
|
LOG_INSTANCE_CACHE,
|
|
@@ -1423,9 +1444,23 @@ const LOGGING = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
1423
1444
|
LOG_OPERATIONS,
|
|
1424
1445
|
LOG_PAYLOADS,
|
|
1425
1446
|
LOG_REQUESTS,
|
|
1426
|
-
LOG_REQUEST_STATUS
|
|
1447
|
+
LOG_REQUEST_STATUS,
|
|
1448
|
+
__INTERNAL_LOG_NATIVE_MAP_SET_COUNTS
|
|
1427
1449
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1428
1450
|
|
|
1451
|
+
function createLoggingConfig(env, debug) {
|
|
1452
|
+
const config = {};
|
|
1453
|
+
const keys = Object.keys(LOGGING);
|
|
1454
|
+
for (const key of keys) {
|
|
1455
|
+
if (env.DEBUG || env.TESTING) {
|
|
1456
|
+
config[key] = true;
|
|
1457
|
+
} else {
|
|
1458
|
+
config[key] = debug[key] || false;
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
return config;
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1429
1464
|
const _MacrosConfig = EmbroiderMacros.MacrosConfig;
|
|
1430
1465
|
function recastMacrosConfig(macros) {
|
|
1431
1466
|
if (!('globalConfig' in macros)) {
|
|
@@ -1474,6 +1509,7 @@ function setConfig(context, appRoot, config) {
|
|
|
1474
1509
|
compatWith: config.compatWith ?? null,
|
|
1475
1510
|
deprecations: DEPRECATIONS,
|
|
1476
1511
|
features: FEATURES,
|
|
1512
|
+
activeLogging: createLoggingConfig(env, debugOptions),
|
|
1477
1513
|
env
|
|
1478
1514
|
};
|
|
1479
1515
|
macros.setGlobalConfig(undefined, 'WarpDrive', finalizedConfig);
|
|
@@ -1 +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, CI, IS_RECORDING } = 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 const SHOULD_RECORD = Boolean(!CI || IS_RECORDING);\n\n return {\n TESTING,\n PRODUCTION,\n DEBUG,\n IS_RECORDING: Boolean(IS_RECORDING),\n IS_CI: Boolean(CI),\n SHOULD_RECORD,\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 * const { setConfig } = await import('@warp-drive/build-config');\n *\n * let app = new EmberApp(defaults, {});\n *\n * setConfig(app, __dirname, { compatWith: '3.12' });\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 * const { setConfig } = await import('@warp-drive/build-config');\n *\n * let app = new EmberApp(defaults, {});\n *\n * setConfig(app, __dirname, {\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 * 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/build-config/deprecations\n * @main @warp-drive/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/**\n * **id: ember-data:rsvp-unresolved-async**\n *\n * Deprecates when a request promise did not resolve prior to the store tearing down.\n *\n * Note: in most cases even with the promise guard that is now being deprecated\n * a test crash would still be encountered.\n *\n * To resolve: Tests or Fastboot instances which crash need to find triggers requests\n * and properly await them before tearing down.\n *\n * @property DEPRECATE_RSVP_PROMISE\n * @since 4.4\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_RSVP_PROMISE = '4.4';\n\n/**\n * **id: ember-data:model-save-promise**\n *\n * Affects\n * - model.save / store.saveRecord\n * - model.reload\n *\n * Deprecates the promise-proxy returned by these methods in favor of\n * a Promise return value.\n *\n * To resolve this deprecation, `await` or `.then` the return value\n * before doing work with the result instead of accessing values via\n * the proxy.\n *\n * To continue utilizing flags such as `isPending` in your templates\n * consider using [ember-promise-helpers](https://github.com/fivetanley/ember-promise-helpers)\n *\n * @property DEPRECATE_SAVE_PROMISE_ACCESS\n * @since 4.4\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_SAVE_PROMISE_ACCESS = '4.4';\n\n/**\n * **id: ember-data:deprecate-snapshot-model-class-access**\n *\n * Deprecates accessing the factory class for a given resource type\n * via properties on various classes.\n *\n * Guards\n *\n * - SnapshotRecordArray.type\n * - Snapshot.type\n * - RecordArray.type\n *\n * Use `store.modelFor(<resource-type>)` instead.\n *\n * @property DEPRECATE_SNAPSHOT_MODEL_CLASS_ACCESS\n * @since 4.5\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_SNAPSHOT_MODEL_CLASS_ACCESS = '4.5';\n\n/**\n * **id: ember-data:deprecate-store-find**\n *\n * Deprecates using `store.find` instead of `store.findRecord`. Typically\n * `store.find` is a mistaken call that occurs when using implicit route behaviors\n * in Ember which attempt to derive how to load data via parsing the route params\n * for a route which does not implement a `model` hook.\n *\n * To resolve, use `store.findRecord`. This may require implementing an associated\n * route's `model() {}` hook.\n *\n * @property DEPRECATE_STORE_FIND\n * @since 4.5\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_STORE_FIND = '4.5';\n\n/**\n * **id: ember-data:deprecate-has-record-for-id**\n *\n * Deprecates `store.hasRecordForId(type, id)` in favor of `store.peekRecord({ type, id }) !== null`.\n *\n * Broadly speaking, while the ability to query for presence is important, a key distinction exists\n * between these methods that make relying on `hasRecordForId` unsafe, as it may report `true` for a\n * record which is not-yet loaded and un-peekable. `peekRecord` offers a safe mechanism by which to check\n * for whether a record is present in a usable manner.\n *\n * @property DEPRECATE_HAS_RECORD\n * @since 4.5\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_HAS_RECORD = '4.5';\n\n/**\n * **id: ember-data:deprecate-string-arg-schemas**\n *\n * Deprecates `schema.attributesDefinitionFor(type)` and\n * `schema.relationshipsDefinitionFor(type)` in favor of\n * a consistent object signature (`identifier | { type }`).\n *\n * To resolve change\n *\n * ```diff\n * - store.getSchemaDefinitionService().attributesDefinitionFor('user')\n * + store.getSchemaDefinitionService().attributesDefinitionFor({ type: 'user' })\n * ```\n *\n * @property DEPRECATE_STRING_ARG_SCHEMAS\n * @since 4.5\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_STRING_ARG_SCHEMAS = '4.5';\n\n/**\n * **id: ember-data:deprecate-secret-adapter-fallback**\n *\n * Deprecates the secret `-json-api` fallback adapter in favor\n * or an explicit \"catch all\" application adapter. In addition\n * to this deprecation ensuring the user has explicitly chosen an\n * adapter, this ensures that the user may choose to use no adapter\n * at all.\n *\n * Simplest fix:\n *\n * *<project>/app/adapters/application.js*\n * ```js\n * export { default } from '@ember-data/adapter/json-api';\n * ```\n *\n * @property DEPRECATE_JSON_API_FALLBACK\n * @since 4.5\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_JSON_API_FALLBACK = '4.5';\n\n/**\n * **id: ember-data:deprecate-model-reopen**\n *\n * ----\n *\n * For properties known ahead of time, instead of\n *\n * ```ts\n * class User extends Model { @attr firstName; }\n *\n * User.reopen({ lastName: attr() });\n * ```\n *\n * Extend `User` again or include it in the initial definition.\n *\n * ```ts\n * class User extends Model { @attr firstName; @attr lastName }\n * ```\n *\n * For properties generated dynamically, consider registering\n * a `SchemaDefinitionService` with the store , as such services\n * are capable of dynamically adjusting their schemas, and utilize\n * the `instantiateRecord` hook to create a Proxy based class that\n * can react to the changes in the schema.\n *\n *\n * Use Foo extends Model to extend your class instead\n *\n *\n *\n *\n * **id: ember-data:deprecate-model-reopenclass**\n *\n * ----\n *\n * Instead of reopenClass, define `static` properties with native class syntax\n * or add them to the final object.\n *\n * ```ts\n * // instead of\n * User.reopenClass({ aStaticMethod() {} });\n *\n * // do this\n * class User {\n * static aStaticMethod() {}\n * }\n *\n * // or do this\n * User.aStaticMethod = function() {}\n * ```\n *\n *\n * @property DEPRECATE_MODEL_REOPEN\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_MODEL_REOPEN = '4.7';\n\n/**\n * **id: ember-data:deprecate-early-static**\n *\n * This deprecation triggers if static computed properties\n * or methods are triggered without looking up the record\n * via the store service's `modelFor` hook. Accessing this\n * static information without looking up the model via the\n * store most commonly occurs when\n *\n * - using ember-cli-mirage (to fix, refactor to not use its auto-discovery of ember-data models)\n * - importing a model class and accessing its static information via the import\n *\n * Instead of\n *\n * ```js\n * import User from 'my-app/models/user';\n *\n * const relationships = User.relationshipsByName;\n * ```\n *\n * Do *at least* this\n *\n * ```js\n * const relationships = store.modelFor('user').relationshipsByName;\n * ```\n *\n * However, the much more future proof refactor is to not use `modelFor` at all but instead\n * to utilize the schema service for this static information.\n *\n * ```js\n * const relationships = store.getSchemaDefinitionService().relationshipsDefinitionFor({ type: 'user' });\n * ```\n *\n *\n * @property DEPRECATE_EARLY_STATIC\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_EARLY_STATIC = '4.7';\n\n/**\n * **id: ember-data:deprecate-errors-hash-to-array-helper**\n * **id: ember-data:deprecate-errors-array-to-hash-helper**\n * **id: ember-data:deprecate-normalize-modelname-helper**\n *\n * Deprecates `errorsHashToArray` `errorsArrayToHash` and `normalizeModelName`\n *\n * Users making use of these (already private) utilities can trivially copy them\n * into their own codebase to continue using them, though we recommend refactoring\n * to a more direct conversion into the expected errors format for the errors helpers.\n *\n * For refactoring normalizeModelName we also recommend following the guidance in\n * [RFC#740 Deprecate Non-Strict Types](https://github.com/emberjs/rfcs/pull/740).\n *\n *\n * @property DEPRECATE_HELPERS\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_HELPERS = '4.7';\n\n/**\n * **id: ember-data:deprecate-promise-many-array-behavior**\n *\n * [RFC Documentation](https://rfcs.emberjs.com/id/0745-ember-data-deprecate-methods-on-promise-many-array)\n *\n * This deprecation deprecates accessing values on the asynchronous proxy\n * in favor of first \"resolving\" or \"awaiting\" the promise to retrieve a\n * synchronous value.\n *\n * Template iteration of the asynchronous value will still work and not trigger\n * the deprecation, but all JS access should be avoided and HBS access for anything\n * but `{{#each}}` should also be refactored.\n *\n * Recommended approaches include using the addon `ember-promise-helpers`, using\n * Ember's `resource` pattern (including potentially the addon `ember-data-resources`),\n * resolving the value in routes/provider components, or using the references API.\n *\n * An example of using the [hasMany](https://api.emberjs.com/ember-data/4.11/classes/Model/methods/hasMany?anchor=hasMany) [reference API](https://api.emberjs.com/ember-data/release/classes/HasManyReference):\n *\n * ```ts\n * // get the synchronous \"ManyArray\" value for the asynchronous \"friends\" relationship.\n * // note, this will return `null` if the relationship has not been loaded yet\n * const value = person.hasMany('friends').value();\n *\n * // to get just the list of related IDs\n * const ids = person.hasMany('friends').ids();\n * ```\n *\n * References participate in autotracking and getters/cached getters etc. which consume them\n * will recompute if the value changes.\n *\n * @property DEPRECATE_PROMISE_MANY_ARRAY_BEHAVIORS\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_PROMISE_MANY_ARRAY_BEHAVIORS = '4.7';\n\n/**\n * **id: ember-data:deprecate-non-strict-relationships**\n *\n * Deprecates when belongsTo and hasMany relationships are defined\n * without specifying the inverse record's type.\n *\n * Instead of\n *\n * ```ts\n * class Company extends Model {\n * @hasMany() employees;\n * }\n * class Employee extends Model {\n * @belongsTo() company;\n * }\n * ```\n *\n * Use\n *\n * ```ts\n * class Company extends Model {\n * @hasMany('employee', { async: true, inverse: 'company' }) employees;\n * }\n *\n * class Employee extends Model {\n * @belongsTo('company', { async: true, inverse: 'employees' }) company;\n * }\n * ```\n *\n * @property DEPRECATE_RELATIONSHIPS_WITHOUT_TYPE\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_RELATIONSHIPS_WITHOUT_TYPE = '4.7';\n\n/**\n * **id: ember-data:deprecate-non-strict-relationships**\n *\n * Deprecates when belongsTo and hasMany relationships are defined\n * without specifying whether the relationship is asynchronous.\n *\n * The current behavior is that relationships which do not define\n * this setting are aschronous (`{ async: true }`).\n *\n * Instead of\n *\n * ```ts\n * class Company extends Model {\n * @hasMany('employee') employees;\n * }\n * class Employee extends Model {\n * @belongsTo('company') company;\n * }\n * ```\n *\n * Use\n *\n * ```ts\n * class Company extends Model {\n * @hasMany('employee', { async: true, inverse: 'company' }) employees;\n * }\n *\n * class Employee extends Model {\n * @belongsTo('company', { async: true, inverse: 'employees' }) company;\n * }\n * ```\n *\n * @property DEPRECATE_RELATIONSHIPS_WITHOUT_ASYNC\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_RELATIONSHIPS_WITHOUT_ASYNC = '4.7';\n\n/**\n * **id: ember-data:deprecate-non-strict-relationships**\n *\n * Deprecates when belongsTo and hasMany relationships are defined\n * without specifying the inverse field on the related type.\n *\n * The current behavior is that relationships which do not define\n * this setting have their inverse determined at runtime, which is\n * potentially non-deterministic when mixins and polymorphism are involved.\n *\n * If an inverse relationship exists and you wish changes on one side to\n * reflect onto the other side, use the inverse key. If you wish to not have\n * changes reflected or no inverse relationship exists, specify `inverse: null`.\n *\n * Instead of\n *\n * ```ts\n * class Company extends Model {\n * @hasMany('employee') employees;\n * }\n * class Employee extends Model {\n * @belongsTo('company') company;\n * }\n * ```\n *\n * Use\n *\n * ```ts\n * class Company extends Model {\n * @hasMany('employee', { async: true, inverse: 'company' }) employees;\n * }\n *\n * class Employee extends Model {\n * @belongsTo('company', { async: true, inverse: 'employees' }) company;\n * }\n * ```\n *\n * Instead of\n *\n * ```ts\n * class Company extends Model {\n * @hasMany('employee') employees;\n * }\n * class Employee extends Model {\n * @attr name;\n * }\n * ```\n *\n * Use\n *\n * ```ts\n * class Company extends Model {\n * @hasMany('employee', { async: true, inverse: null }) employees;\n * }\n *\n * class Employee extends Model {\n * @attr name;\n * }\n * ```\n *\n * @property DEPRECATE_RELATIONSHIPS_WITHOUT_INVERSE\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_RELATIONSHIPS_WITHOUT_INVERSE = '4.7';\n\n/**\n * **id: ember-data:no-a-with-array-like**\n *\n * Deprecates when calling `A()` on an EmberData ArrayLike class\n * is detected. This deprecation may not always trigger due to complexities\n * in ember-source versions and the use (or disabling) of prototype extensions.\n *\n * To fix, just use the native array methods instead of the EmberArray methods\n * and refrain from wrapping the array in `A()`.\n *\n * Note that some computed property macros may themselves utilize `A()`, in which\n * scenario the computed properties need to be upgraded to octane syntax.\n *\n * For instance, instead of:\n *\n * ```ts\n * class extends Component {\n * @filterBy('items', 'isComplete') completedItems;\n * }\n * ```\n *\n * Use the following:\n *\n * ```ts\n * class extends Component {\n * get completedItems() {\n * return this.items.filter(item => item.isComplete);\n * }\n * }\n * ```\n *\n * @property DEPRECATE_A_USAGE\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_A_USAGE = '4.7';\n\n/**\n * **id: ember-data:deprecate-promise-proxies**\n *\n * Additional Reading: [RFC#846 Deprecate Proxies](https://rfcs.emberjs.com/id/0846-ember-data-deprecate-proxies)\n *\n * Deprecates using the proxy object/proxy array capabilities of values returned from\n *\n * - `store.findRecord`\n * - `store.findAll`\n * - `store.query`\n * - `store.queryRecord`\n * - `record.save`\n * - `recordArray.save`\n * - `recordArray.update`\n *\n * These methods will now return a native Promise that resolves with the value.\n *\n * Note that this does not deprecate the proxy behaviors of `PromiseBelongsTo`. See RFC for reasoning.\n * The opportunity should still be taken if available to stop using these proxy behaviors; however, this class\n * will remain until `import Model from '@ember-data/model';` is deprecated more broadly.\n *\n * @property DEPRECATE_PROMISE_PROXIES\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_PROMISE_PROXIES = '4.7';\n\n/**\n * **id: ember-data:deprecate-array-like**\n *\n * Deprecates Ember \"Array-like\" methods on RecordArray and ManyArray.\n *\n * These are the arrays returned respectively by `store.peekAll()`, `store.findAll()`and\n * hasMany relationships on instance of Model or `record.hasMany('relationshipName').value()`.\n *\n * The appropriate refactor is to treat these arrays as native arrays and to use native array methods.\n *\n * For instance, instead of:\n *\n * ```ts\n * users.firstObject;\n * ```\n *\n * Use:\n *\n * ```ts\n * users[0];\n * // or\n * users.at(0);\n * ```\n *\n * @property DEPRECATE_ARRAY_LIKE\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_ARRAY_LIKE = '4.7';\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 RecordArray, ManyArray\n * or PromiseManyArray.\n *\n * Support for these chains is currently guarded by the inactive deprecation flag\n * listed here.\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:non-explicit-relationships**\n *\n * Deprecates when polymorphic relationships are detected via inheritance or mixins\n * and no polymorphic relationship configuration has been setup.\n *\n * For further reading please review [RFC#793](https://rfcs.emberjs.com/id/0793-polymporphic-relations-without-inheritance)\n * which introduced support for explicit relationship polymorphism without\n * mixins or inheritance.\n *\n * You may still use mixins and inheritance to setup your polymorphism; however, the class\n * structure is no longer what drives the design. Instead polymorphism is \"traits\" based or \"structural\":\n * so long as each model which can satisfy the polymorphic relationship defines the inverse in the same\n * way they work.\n *\n * Notably: `inverse: null` relationships can receive any type as a record with no additional configuration\n * at all.\n *\n * Example Polymorphic Relationship Configuration\n *\n * ```ts\n * // polymorphic relationship\n * class Tag extends Model {\n * @hasMany(\"taggable\", { async: false, polymorphic: true, inverse: \"tags\" }) tagged;\n * }\n *\n * // an inverse concrete relationship (e.g. satisfies \"taggable\")\n * class Post extends Model {\n * @hasMany(\"tag\", { async: false, inverse: \"tagged\", as: \"taggable\" }) tags;\n * }\n * ```\n *\n * @property DEPRECATE_NON_EXPLICIT_POLYMORPHISM\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_NON_EXPLICIT_POLYMORPHISM = '4.7';\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 = '4.12'; // '5.3';\n\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/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: 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 * const { setConfig } = await import('@warp-drive/build-config');\n *\n * let app = new EmberApp(defaults, {});\n *\n * setConfig(app, __dirname, {\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 * 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-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\n/**\n * **id: warp-drive.ember-inflector**\n *\n * Deprecates the use of ember-inflector for pluralization and singularization in favor\n * of the `@ember-data/request-utils` package.\n *\n * Rule configuration methods (singular, plural, uncountable, irregular) and\n * usage methods (singularize, pluralize) are are available as imports from\n * `@ember-data/request-utils/string`\n *\n * Notable differences with ember-inflector:\n * - there cannot be multiple inflector instances with separate rules\n * - pluralization does not support a count argument\n * - string caches now default to 10k entries instead of 1k, and this\n * size is now configurable. Additionally, the cache is now a LRU cache\n * instead of a first-N cache.\n *\n * This deprecation can be resolved by removing usage of ember-inflector or by using\n * both ember-inflector and @ember-data/request-utils in parallel and updating your\n * EmberData/WarpDrive build config to mark the deprecation as resolved\n * in ember-cli-build\n *\n * ```js\n * setConfig(app, __dirname, { deprecations: { DEPRECATE_EMBER_INFLECTOR: false }});\n * ```\n *\n * @property DEPRECATE_EMBER_INFLECTOR\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_EMBER_INFLECTOR = '5.3';\n\n/**\n * This is a special flag that can be used to opt-in early to receiving deprecations introduced in 5.x\n * which have had their infra backported to 4.x versions of EmberData.\n *\n * When this flag is not present or set to `true`, the deprecations from the 5.x branch\n * will not print their messages and the deprecation cannot be resolved.\n *\n * When this flag is present and set to `false`, the deprecations from the 5.x branch will\n * print and can be resolved.\n *\n * @property DISABLE_6X_DEPRECATIONS\n * @since 4.13\n * @until 5.0\n * @public\n */\nexport const DISABLE_6X_DEPRECATIONS = '6.0';\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\nconst NextMajorVersion = '6.';\n\nfunction deprecationIsNextMajorCycle(deprecatedSince: MajorMinor) {\n return deprecatedSince.startsWith(NextMajorVersion);\n}\n\nexport function getDeprecations(\n compatVersion: MajorMinor | null | undefined,\n deprecations?: { [key in DeprecationFlag]?: boolean }\n): { [key in DeprecationFlag]: boolean } {\n const flags = {} as Record<DeprecationFlag, boolean>;\n const keys = Object.keys(CURRENT_DEPRECATIONS) as DeprecationFlag[];\n const DISABLE_6X_DEPRECATIONS = deprecations?.DISABLE_6X_DEPRECATIONS ?? true;\n\n keys.forEach((flag) => {\n const deprecatedSince = CURRENT_DEPRECATIONS[flag];\n const isDeactivatedDeprecationNotice = DISABLE_6X_DEPRECATIONS && deprecationIsNextMajorCycle(deprecatedSince);\n let flagState = true; // default to no code-stripping\n\n if (!isDeactivatedDeprecationNotice) {\n // if we have a specific flag setting, use it\n if (typeof deprecations?.[flag] === 'boolean') {\n flagState = deprecations?.[flag];\n } else if (compatVersion) {\n // if we are told we are compatible with a version\n // we check if we can strip this flag\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\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/store', '5.0'))) {\n * // do thing\n * }\n * ```\n *\n @module @warp-drive/build-config/canary-features\n @main @warp-drive/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';\nimport { fileURLToPath } from 'url';\n\nimport * as CURRENT_FEATURES from '../../canary-features.ts';\ntype FEATURE = keyof typeof CURRENT_FEATURES;\n\nconst dirname = typeof __dirname !== 'undefined' ? __dirname : fileURLToPath(new URL('.', import.meta.url));\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/build-config/debugging\n @main @warp-drive/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/**\n * Log key count metrics, useful for performance\n * debugging.\n *\n * @property {boolean} LOG_METRIC_COUNTS\n * @public\n */\nexport const LOG_METRIC_COUNTS: 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/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/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, config.deprecations);\n const FEATURES = getFeatures(env.PRODUCTION);\n\n const includeDataAdapterInProduction =\n typeof config.includeDataAdapterInProduction === 'boolean' ? config.includeDataAdapterInProduction : true;\n const includeDataAdapter = env.PRODUCTION ? includeDataAdapterInProduction : true;\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","CI","IS_RECORDING","process","env","PRODUCTION","DEBUG","TESTING","Boolean","SHOULD_RECORD","IS_CI","DEPRECATE_CATCH_ALL","DEPRECATE_RSVP_PROMISE","DEPRECATE_SAVE_PROMISE_ACCESS","DEPRECATE_SNAPSHOT_MODEL_CLASS_ACCESS","DEPRECATE_STORE_FIND","DEPRECATE_HAS_RECORD","DEPRECATE_STRING_ARG_SCHEMAS","DEPRECATE_JSON_API_FALLBACK","DEPRECATE_MODEL_REOPEN","DEPRECATE_EARLY_STATIC","DEPRECATE_HELPERS","DEPRECATE_PROMISE_MANY_ARRAY_BEHAVIORS","DEPRECATE_RELATIONSHIPS_WITHOUT_TYPE","DEPRECATE_RELATIONSHIPS_WITHOUT_ASYNC","DEPRECATE_RELATIONSHIPS_WITHOUT_INVERSE","DEPRECATE_A_USAGE","DEPRECATE_PROMISE_PROXIES","DEPRECATE_ARRAY_LIKE","DEPRECATE_COMPUTED_CHAINS","DEPRECATE_NON_EXPLICIT_POLYMORPHISM","DEPRECATE_MANY_ARRAY_DUPLICATES","DEPRECATE_NON_STRICT_TYPES","DEPRECATE_NON_STRICT_ID","DEPRECATE_NON_UNIQUE_PAYLOADS","DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE","DEPRECATE_STORE_EXTENDS_EMBER_OBJECT","ENABLE_LEGACY_SCHEMA_SERVICE","DEPRECATE_EMBER_INFLECTOR","DISABLE_6X_DEPRECATIONS","deprecationIsResolved","deprecatedSince","compatVersion","semver","lte","minVersion","NextMajorVersion","deprecationIsNextMajorCycle","startsWith","getDeprecations","deprecations","flags","keys","Object","CURRENT_DEPRECATIONS","forEach","flag","isDeactivatedDeprecationNotice","flagState","isResolved","SAMPLE_FEATURE_FLAG","dirname","__dirname","fileURLToPath","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","LOG_METRIC_COUNTS","_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","setGlobalConfig","import"],"mappings":";;;;;;;;;;;AAAO,SAASA,MAAMA,GAAG;EACvB,MAAM;IAAEC,SAAS;IAAEC,UAAU;IAAEC,sBAAsB;IAAEC,QAAQ;IAAEC,EAAE;AAAEC,IAAAA;GAAc,GAAGC,OAAO,CAACC,GAAG;EACjG,MAAMC,UAAU,GAAGR,SAAS,KAAK,YAAY,IAAK,CAACA,SAAS,IAAIG,QAAQ,KAAK,YAAa;EAC1F,MAAMM,KAAK,GAAG,CAACD,UAAU;AACzB,EAAA,MAAME,OAAO,GAAGD,KAAK,IAAIE,OAAO,CAACX,SAAS,KAAK,MAAM,IAAIC,UAAU,IAAIC,sBAAsB,CAAC;EAC9F,MAAMU,aAAa,GAAGD,OAAO,CAAC,CAACP,EAAE,IAAIC,YAAY,CAAC;EAElD,OAAO;IACLK,OAAO;IACPF,UAAU;IACVC,KAAK;AACLJ,IAAAA,YAAY,EAAEM,OAAO,CAACN,YAAY,CAAC;AACnCQ,IAAAA,KAAK,EAAEF,OAAO,CAACP,EAAE,CAAC;AAClBQ,IAAAA;GACD;AACH;;ACfA;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;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,mBAAmB,GAAG,MAAM;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,sBAAsB,GAAG,KAAK;;AAE3C;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;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,qCAAqC,GAAG,KAAK;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAG,KAAK;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAG,KAAK;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,4BAA4B,GAAG,KAAK;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,2BAA2B,GAAG,KAAK;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,sBAAsB,GAAG,KAAK;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,sBAAsB,GAAG,KAAK;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,iBAAiB,GAAG,KAAK;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,sCAAsC,GAAG,KAAK;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,oCAAoC,GAAG,KAAK;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,qCAAqC,GAAG,KAAK;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,uCAAuC,GAAG,KAAK;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,iBAAiB,GAAG,KAAK;;AAEtC;AACA;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,yBAAyB,GAAG,KAAK;;AAE9C;AACA;AACA;AACA;AACA;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,oBAAoB,GAAG,KAAK;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,yBAAyB,GAAG,KAAK;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,mCAAmC,GAAG,KAAK;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,+BAA+B,GAAG,MAAM,CAAC;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;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;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;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;AACA;AACA;AACO,MAAMC,yDAAyD,GAAG,KAAK;;AAE9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oCAAoC,GAAG,KAAK;;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;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;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,yBAAyB,GAAG,KAAK;;AAE9C;AACA;AACA;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,CAACW,WAAW,CAAY,GAAG,IAAI;AACzC;AACF;AAEA,EAAA,IAAIZ,MAAM,EAAE;AACV;AACA,IAAA,KAAK,MAAMI,OAAO,IAAI3B,IAAI,EAAE;AAC1B,MAAA,IAAI4B,YAAY,GAAGJ,QAAQ,CAACG,OAAO,CAAC;MAEpC,IAAIC,YAAY,KAAK,IAAI,EAAE;AACzBJ,QAAAA,QAAQ,CAACG,OAAO,CAAC,GAAG,KAAK;AAC3B;AACF;AACF;AAEA,EAAA,OAAOH,QAAQ;AACjB;;ACvEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMa,YAAqB,GAAG,KAAK;AAC1C;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,cAAuB,GAAG,KAAK;AAC5C;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,aAAsB,GAAG,KAAK;AAC3C;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,iBAA0B,GAAG,KAAK;AAC/C;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAqB,GAAG,KAAK;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,kBAA2B,GAAG,KAAK;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,eAAwB,GAAG,KAAK;AAC7C;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,SAAkB,GAAG,KAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,kBAA2B,GAAG,KAAK;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,iBAA0B,GAAG,KAAK;;;;;;;;;;;;;;;;ACzG/C,MAAMC,aAAa,GAAGC,eAAe,CAACC,YAA8C;AA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C,UAAU,CAAC;AAE5C,EAAA,MAAMqH,8BAA8B,GAClC,OAAOf,MAAM,CAACe,8BAA8B,KAAK,SAAS,GAAGf,MAAM,CAACe,8BAA8B,GAAG,IAAI;EAC3G,MAAMC,kBAAkB,GAAGvH,GAAG,CAACC,UAAU,GAAGqH,8BAA8B,GAAG,IAAI;AAEjF,EAAA,MAAME,eAAwC,GAAG;AAC/CN,IAAAA,KAAK,EAAEF,YAAY;AACnBS,IAAAA,YAAY,EAAElB,MAAM,CAACkB,YAAY,IAAI,KAAK;IAC1CF,kBAAkB;AAClBH,IAAAA,UAAU,EAAEb,MAAM,CAACa,UAAU,IAAI,IAAI;AACrCtE,IAAAA,YAAY,EAAEqE,YAAY;AAC1B3C,IAAAA,QAAQ,EAAE6C,QAAQ;AAClBrH,IAAAA;GACD;AAEDmG,EAAAA,MAAM,CAACuB,eAAe,CAACC,SAAoB,EAAE,WAAW,EAAEH,eAAe,CAAC;AAC5E;;;;"}
|
|
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/-private/utils/logging.ts","../src/index.ts"],"sourcesContent":["export function getEnv(): {\n TESTING: boolean;\n PRODUCTION: boolean;\n DEBUG: boolean;\n IS_RECORDING: boolean;\n IS_CI: boolean;\n SHOULD_RECORD: boolean;\n} {\n const { EMBER_ENV, IS_TESTING, EMBER_CLI_TEST_COMMAND, NODE_ENV, CI, IS_RECORDING } = 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 const SHOULD_RECORD = Boolean(!CI || IS_RECORDING);\n\n return {\n TESTING,\n PRODUCTION,\n DEBUG,\n IS_RECORDING: Boolean(IS_RECORDING),\n IS_CI: Boolean(CI),\n SHOULD_RECORD,\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 * const { setConfig } = await import('@warp-drive/build-config');\n *\n * let app = new EmberApp(defaults, {});\n *\n * setConfig(app, __dirname, { compatWith: '3.12' });\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 * const { setConfig } = await import('@warp-drive/build-config');\n *\n * let app = new EmberApp(defaults, {});\n *\n * setConfig(app, __dirname, {\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 * 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/build-config/deprecations\n * @main @warp-drive/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/**\n * **id: ember-data:rsvp-unresolved-async**\n *\n * Deprecates when a request promise did not resolve prior to the store tearing down.\n *\n * Note: in most cases even with the promise guard that is now being deprecated\n * a test crash would still be encountered.\n *\n * To resolve: Tests or Fastboot instances which crash need to find triggers requests\n * and properly await them before tearing down.\n *\n * @property DEPRECATE_RSVP_PROMISE\n * @since 4.4\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_RSVP_PROMISE = '4.4';\n\n/**\n * **id: ember-data:model-save-promise**\n *\n * Affects\n * - model.save / store.saveRecord\n * - model.reload\n *\n * Deprecates the promise-proxy returned by these methods in favor of\n * a Promise return value.\n *\n * To resolve this deprecation, `await` or `.then` the return value\n * before doing work with the result instead of accessing values via\n * the proxy.\n *\n * To continue utilizing flags such as `isPending` in your templates\n * consider using [ember-promise-helpers](https://github.com/fivetanley/ember-promise-helpers)\n *\n * @property DEPRECATE_SAVE_PROMISE_ACCESS\n * @since 4.4\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_SAVE_PROMISE_ACCESS = '4.4';\n\n/**\n * **id: ember-data:deprecate-snapshot-model-class-access**\n *\n * Deprecates accessing the factory class for a given resource type\n * via properties on various classes.\n *\n * Guards\n *\n * - SnapshotRecordArray.type\n * - Snapshot.type\n * - RecordArray.type\n *\n * Use `store.modelFor(<resource-type>)` instead.\n *\n * @property DEPRECATE_SNAPSHOT_MODEL_CLASS_ACCESS\n * @since 4.5\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_SNAPSHOT_MODEL_CLASS_ACCESS = '4.5';\n\n/**\n * **id: ember-data:deprecate-store-find**\n *\n * Deprecates using `store.find` instead of `store.findRecord`. Typically\n * `store.find` is a mistaken call that occurs when using implicit route behaviors\n * in Ember which attempt to derive how to load data via parsing the route params\n * for a route which does not implement a `model` hook.\n *\n * To resolve, use `store.findRecord`. This may require implementing an associated\n * route's `model() {}` hook.\n *\n * @property DEPRECATE_STORE_FIND\n * @since 4.5\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_STORE_FIND = '4.5';\n\n/**\n * **id: ember-data:deprecate-has-record-for-id**\n *\n * Deprecates `store.hasRecordForId(type, id)` in favor of `store.peekRecord({ type, id }) !== null`.\n *\n * Broadly speaking, while the ability to query for presence is important, a key distinction exists\n * between these methods that make relying on `hasRecordForId` unsafe, as it may report `true` for a\n * record which is not-yet loaded and un-peekable. `peekRecord` offers a safe mechanism by which to check\n * for whether a record is present in a usable manner.\n *\n * @property DEPRECATE_HAS_RECORD\n * @since 4.5\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_HAS_RECORD = '4.5';\n\n/**\n * **id: ember-data:deprecate-string-arg-schemas**\n *\n * Deprecates `schema.attributesDefinitionFor(type)` and\n * `schema.relationshipsDefinitionFor(type)` in favor of\n * a consistent object signature (`identifier | { type }`).\n *\n * To resolve change\n *\n * ```diff\n * - store.getSchemaDefinitionService().attributesDefinitionFor('user')\n * + store.getSchemaDefinitionService().attributesDefinitionFor({ type: 'user' })\n * ```\n *\n * @property DEPRECATE_STRING_ARG_SCHEMAS\n * @since 4.5\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_STRING_ARG_SCHEMAS = '4.5';\n\n/**\n * **id: ember-data:deprecate-secret-adapter-fallback**\n *\n * Deprecates the secret `-json-api` fallback adapter in favor\n * or an explicit \"catch all\" application adapter. In addition\n * to this deprecation ensuring the user has explicitly chosen an\n * adapter, this ensures that the user may choose to use no adapter\n * at all.\n *\n * Simplest fix:\n *\n * *<project>/app/adapters/application.js*\n * ```js\n * export { default } from '@ember-data/adapter/json-api';\n * ```\n *\n * @property DEPRECATE_JSON_API_FALLBACK\n * @since 4.5\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_JSON_API_FALLBACK = '4.5';\n\n/**\n * **id: ember-data:deprecate-model-reopen**\n *\n * ----\n *\n * For properties known ahead of time, instead of\n *\n * ```ts\n * class User extends Model { @attr firstName; }\n *\n * User.reopen({ lastName: attr() });\n * ```\n *\n * Extend `User` again or include it in the initial definition.\n *\n * ```ts\n * class User extends Model { @attr firstName; @attr lastName }\n * ```\n *\n * For properties generated dynamically, consider registering\n * a `SchemaDefinitionService` with the store , as such services\n * are capable of dynamically adjusting their schemas, and utilize\n * the `instantiateRecord` hook to create a Proxy based class that\n * can react to the changes in the schema.\n *\n *\n * Use Foo extends Model to extend your class instead\n *\n *\n *\n *\n * **id: ember-data:deprecate-model-reopenclass**\n *\n * ----\n *\n * Instead of reopenClass, define `static` properties with native class syntax\n * or add them to the final object.\n *\n * ```ts\n * // instead of\n * User.reopenClass({ aStaticMethod() {} });\n *\n * // do this\n * class User {\n * static aStaticMethod() {}\n * }\n *\n * // or do this\n * User.aStaticMethod = function() {}\n * ```\n *\n *\n * @property DEPRECATE_MODEL_REOPEN\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_MODEL_REOPEN = '4.7';\n\n/**\n * **id: ember-data:deprecate-early-static**\n *\n * This deprecation triggers if static computed properties\n * or methods are triggered without looking up the record\n * via the store service's `modelFor` hook. Accessing this\n * static information without looking up the model via the\n * store most commonly occurs when\n *\n * - using ember-cli-mirage (to fix, refactor to not use its auto-discovery of ember-data models)\n * - importing a model class and accessing its static information via the import\n *\n * Instead of\n *\n * ```js\n * import User from 'my-app/models/user';\n *\n * const relationships = User.relationshipsByName;\n * ```\n *\n * Do *at least* this\n *\n * ```js\n * const relationships = store.modelFor('user').relationshipsByName;\n * ```\n *\n * However, the much more future proof refactor is to not use `modelFor` at all but instead\n * to utilize the schema service for this static information.\n *\n * ```js\n * const relationships = store.getSchemaDefinitionService().relationshipsDefinitionFor({ type: 'user' });\n * ```\n *\n *\n * @property DEPRECATE_EARLY_STATIC\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_EARLY_STATIC = '4.7';\n\n/**\n * **id: ember-data:deprecate-errors-hash-to-array-helper**\n * **id: ember-data:deprecate-errors-array-to-hash-helper**\n * **id: ember-data:deprecate-normalize-modelname-helper**\n *\n * Deprecates `errorsHashToArray` `errorsArrayToHash` and `normalizeModelName`\n *\n * Users making use of these (already private) utilities can trivially copy them\n * into their own codebase to continue using them, though we recommend refactoring\n * to a more direct conversion into the expected errors format for the errors helpers.\n *\n * For refactoring normalizeModelName we also recommend following the guidance in\n * [RFC#740 Deprecate Non-Strict Types](https://github.com/emberjs/rfcs/pull/740).\n *\n *\n * @property DEPRECATE_HELPERS\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_HELPERS = '4.7';\n\n/**\n * **id: ember-data:deprecate-promise-many-array-behavior**\n *\n * [RFC Documentation](https://rfcs.emberjs.com/id/0745-ember-data-deprecate-methods-on-promise-many-array)\n *\n * This deprecation deprecates accessing values on the asynchronous proxy\n * in favor of first \"resolving\" or \"awaiting\" the promise to retrieve a\n * synchronous value.\n *\n * Template iteration of the asynchronous value will still work and not trigger\n * the deprecation, but all JS access should be avoided and HBS access for anything\n * but `{{#each}}` should also be refactored.\n *\n * Recommended approaches include using the addon `ember-promise-helpers`, using\n * Ember's `resource` pattern (including potentially the addon `ember-data-resources`),\n * resolving the value in routes/provider components, or using the references API.\n *\n * An example of using the [hasMany](https://api.emberjs.com/ember-data/4.11/classes/Model/methods/hasMany?anchor=hasMany) [reference API](https://api.emberjs.com/ember-data/release/classes/HasManyReference):\n *\n * ```ts\n * // get the synchronous \"ManyArray\" value for the asynchronous \"friends\" relationship.\n * // note, this will return `null` if the relationship has not been loaded yet\n * const value = person.hasMany('friends').value();\n *\n * // to get just the list of related IDs\n * const ids = person.hasMany('friends').ids();\n * ```\n *\n * References participate in autotracking and getters/cached getters etc. which consume them\n * will recompute if the value changes.\n *\n * @property DEPRECATE_PROMISE_MANY_ARRAY_BEHAVIORS\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_PROMISE_MANY_ARRAY_BEHAVIORS = '4.7';\n\n/**\n * **id: ember-data:deprecate-non-strict-relationships**\n *\n * Deprecates when belongsTo and hasMany relationships are defined\n * without specifying the inverse record's type.\n *\n * Instead of\n *\n * ```ts\n * class Company extends Model {\n * @hasMany() employees;\n * }\n * class Employee extends Model {\n * @belongsTo() company;\n * }\n * ```\n *\n * Use\n *\n * ```ts\n * class Company extends Model {\n * @hasMany('employee', { async: true, inverse: 'company' }) employees;\n * }\n *\n * class Employee extends Model {\n * @belongsTo('company', { async: true, inverse: 'employees' }) company;\n * }\n * ```\n *\n * @property DEPRECATE_RELATIONSHIPS_WITHOUT_TYPE\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_RELATIONSHIPS_WITHOUT_TYPE = '4.7';\n\n/**\n * **id: ember-data:deprecate-non-strict-relationships**\n *\n * Deprecates when belongsTo and hasMany relationships are defined\n * without specifying whether the relationship is asynchronous.\n *\n * The current behavior is that relationships which do not define\n * this setting are aschronous (`{ async: true }`).\n *\n * Instead of\n *\n * ```ts\n * class Company extends Model {\n * @hasMany('employee') employees;\n * }\n * class Employee extends Model {\n * @belongsTo('company') company;\n * }\n * ```\n *\n * Use\n *\n * ```ts\n * class Company extends Model {\n * @hasMany('employee', { async: true, inverse: 'company' }) employees;\n * }\n *\n * class Employee extends Model {\n * @belongsTo('company', { async: true, inverse: 'employees' }) company;\n * }\n * ```\n *\n * @property DEPRECATE_RELATIONSHIPS_WITHOUT_ASYNC\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_RELATIONSHIPS_WITHOUT_ASYNC = '4.7';\n\n/**\n * **id: ember-data:deprecate-non-strict-relationships**\n *\n * Deprecates when belongsTo and hasMany relationships are defined\n * without specifying the inverse field on the related type.\n *\n * The current behavior is that relationships which do not define\n * this setting have their inverse determined at runtime, which is\n * potentially non-deterministic when mixins and polymorphism are involved.\n *\n * If an inverse relationship exists and you wish changes on one side to\n * reflect onto the other side, use the inverse key. If you wish to not have\n * changes reflected or no inverse relationship exists, specify `inverse: null`.\n *\n * Instead of\n *\n * ```ts\n * class Company extends Model {\n * @hasMany('employee') employees;\n * }\n * class Employee extends Model {\n * @belongsTo('company') company;\n * }\n * ```\n *\n * Use\n *\n * ```ts\n * class Company extends Model {\n * @hasMany('employee', { async: true, inverse: 'company' }) employees;\n * }\n *\n * class Employee extends Model {\n * @belongsTo('company', { async: true, inverse: 'employees' }) company;\n * }\n * ```\n *\n * Instead of\n *\n * ```ts\n * class Company extends Model {\n * @hasMany('employee') employees;\n * }\n * class Employee extends Model {\n * @attr name;\n * }\n * ```\n *\n * Use\n *\n * ```ts\n * class Company extends Model {\n * @hasMany('employee', { async: true, inverse: null }) employees;\n * }\n *\n * class Employee extends Model {\n * @attr name;\n * }\n * ```\n *\n * @property DEPRECATE_RELATIONSHIPS_WITHOUT_INVERSE\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_RELATIONSHIPS_WITHOUT_INVERSE = '4.7';\n\n/**\n * **id: ember-data:no-a-with-array-like**\n *\n * Deprecates when calling `A()` on an EmberData ArrayLike class\n * is detected. This deprecation may not always trigger due to complexities\n * in ember-source versions and the use (or disabling) of prototype extensions.\n *\n * To fix, just use the native array methods instead of the EmberArray methods\n * and refrain from wrapping the array in `A()`.\n *\n * Note that some computed property macros may themselves utilize `A()`, in which\n * scenario the computed properties need to be upgraded to octane syntax.\n *\n * For instance, instead of:\n *\n * ```ts\n * class extends Component {\n * @filterBy('items', 'isComplete') completedItems;\n * }\n * ```\n *\n * Use the following:\n *\n * ```ts\n * class extends Component {\n * get completedItems() {\n * return this.items.filter(item => item.isComplete);\n * }\n * }\n * ```\n *\n * @property DEPRECATE_A_USAGE\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_A_USAGE = '4.7';\n\n/**\n * **id: ember-data:deprecate-promise-proxies**\n *\n * Additional Reading: [RFC#846 Deprecate Proxies](https://rfcs.emberjs.com/id/0846-ember-data-deprecate-proxies)\n *\n * Deprecates using the proxy object/proxy array capabilities of values returned from\n *\n * - `store.findRecord`\n * - `store.findAll`\n * - `store.query`\n * - `store.queryRecord`\n * - `record.save`\n * - `recordArray.save`\n * - `recordArray.update`\n *\n * These methods will now return a native Promise that resolves with the value.\n *\n * Note that this does not deprecate the proxy behaviors of `PromiseBelongsTo`. See RFC for reasoning.\n * The opportunity should still be taken if available to stop using these proxy behaviors; however, this class\n * will remain until `import Model from '@ember-data/model';` is deprecated more broadly.\n *\n * @property DEPRECATE_PROMISE_PROXIES\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_PROMISE_PROXIES = '4.7';\n\n/**\n * **id: ember-data:deprecate-array-like**\n *\n * Deprecates Ember \"Array-like\" methods on RecordArray and ManyArray.\n *\n * These are the arrays returned respectively by `store.peekAll()`, `store.findAll()`and\n * hasMany relationships on instance of Model or `record.hasMany('relationshipName').value()`.\n *\n * The appropriate refactor is to treat these arrays as native arrays and to use native array methods.\n *\n * For instance, instead of:\n *\n * ```ts\n * users.firstObject;\n * ```\n *\n * Use:\n *\n * ```ts\n * users[0];\n * // or\n * users.at(0);\n * ```\n *\n * @property DEPRECATE_ARRAY_LIKE\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_ARRAY_LIKE = '4.7';\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 RecordArray, ManyArray\n * or PromiseManyArray.\n *\n * Support for these chains is currently guarded by the inactive deprecation flag\n * listed here.\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:non-explicit-relationships**\n *\n * Deprecates when polymorphic relationships are detected via inheritance or mixins\n * and no polymorphic relationship configuration has been setup.\n *\n * For further reading please review [RFC#793](https://rfcs.emberjs.com/id/0793-polymporphic-relations-without-inheritance)\n * which introduced support for explicit relationship polymorphism without\n * mixins or inheritance.\n *\n * You may still use mixins and inheritance to setup your polymorphism; however, the class\n * structure is no longer what drives the design. Instead polymorphism is \"traits\" based or \"structural\":\n * so long as each model which can satisfy the polymorphic relationship defines the inverse in the same\n * way they work.\n *\n * Notably: `inverse: null` relationships can receive any type as a record with no additional configuration\n * at all.\n *\n * Example Polymorphic Relationship Configuration\n *\n * ```ts\n * // polymorphic relationship\n * class Tag extends Model {\n * @hasMany(\"taggable\", { async: false, polymorphic: true, inverse: \"tags\" }) tagged;\n * }\n *\n * // an inverse concrete relationship (e.g. satisfies \"taggable\")\n * class Post extends Model {\n * @hasMany(\"tag\", { async: false, inverse: \"tagged\", as: \"taggable\" }) tags;\n * }\n * ```\n *\n * @property DEPRECATE_NON_EXPLICIT_POLYMORPHISM\n * @since 4.7\n * @until 5.0\n * @public\n */\nexport const DEPRECATE_NON_EXPLICIT_POLYMORPHISM = '4.7';\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 = '4.12'; // '5.3';\n\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/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: 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 * const { setConfig } = await import('@warp-drive/build-config');\n *\n * let app = new EmberApp(defaults, {});\n *\n * setConfig(app, __dirname, {\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 * 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-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\n/**\n * **id: warp-drive.ember-inflector**\n *\n * Deprecates the use of ember-inflector for pluralization and singularization in favor\n * of the `@ember-data/request-utils` package.\n *\n * Rule configuration methods (singular, plural, uncountable, irregular) and\n * usage methods (singularize, pluralize) are are available as imports from\n * `@ember-data/request-utils/string`\n *\n * Notable differences with ember-inflector:\n * - there cannot be multiple inflector instances with separate rules\n * - pluralization does not support a count argument\n * - string caches now default to 10k entries instead of 1k, and this\n * size is now configurable. Additionally, the cache is now a LRU cache\n * instead of a first-N cache.\n *\n * This deprecation can be resolved by removing usage of ember-inflector or by using\n * both ember-inflector and @ember-data/request-utils in parallel and updating your\n * EmberData/WarpDrive build config to mark the deprecation as resolved\n * in ember-cli-build\n *\n * ```js\n * setConfig(app, __dirname, { deprecations: { DEPRECATE_EMBER_INFLECTOR: false }});\n * ```\n *\n * @property DEPRECATE_EMBER_INFLECTOR\n * @since 5.3\n * @until 6.0\n * @public\n */\nexport const DEPRECATE_EMBER_INFLECTOR = '5.3';\n\n/**\n * This is a special flag that can be used to opt-in early to receiving deprecations introduced in 5.x\n * which have had their infra backported to 4.x versions of EmberData.\n *\n * When this flag is not present or set to `true`, the deprecations from the 5.x branch\n * will not print their messages and the deprecation cannot be resolved.\n *\n * When this flag is present and set to `false`, the deprecations from the 5.x branch will\n * print and can be resolved.\n *\n * @property DISABLE_6X_DEPRECATIONS\n * @since 4.13\n * @until 5.0\n * @public\n */\nexport const DISABLE_6X_DEPRECATIONS = '6.0';\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\nconst NextMajorVersion = '6.';\n\nfunction deprecationIsNextMajorCycle(deprecatedSince: MajorMinor) {\n return deprecatedSince.startsWith(NextMajorVersion);\n}\n\nexport function getDeprecations(\n compatVersion: MajorMinor | null | undefined,\n deprecations?: { [key in DeprecationFlag]?: boolean }\n): { [key in DeprecationFlag]: boolean } {\n const flags = {} as Record<DeprecationFlag, boolean>;\n const keys = Object.keys(CURRENT_DEPRECATIONS) as DeprecationFlag[];\n const DISABLE_6X_DEPRECATIONS = deprecations?.DISABLE_6X_DEPRECATIONS ?? true;\n\n keys.forEach((flag) => {\n const deprecatedSince = CURRENT_DEPRECATIONS[flag];\n const isDeactivatedDeprecationNotice = DISABLE_6X_DEPRECATIONS && deprecationIsNextMajorCycle(deprecatedSince);\n let flagState = true; // default to no code-stripping\n\n if (!isDeactivatedDeprecationNotice) {\n // if we have a specific flag setting, use it\n if (typeof deprecations?.[flag] === 'boolean') {\n flagState = deprecations?.[flag];\n } else if (compatVersion) {\n // if we are told we are compatible with a version\n // we check if we can strip this flag\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\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/store', '5.0'))) {\n * // do thing\n * }\n * ```\n *\n @module @warp-drive/build-config/canary-features\n @main @warp-drive/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';\nimport { fileURLToPath } from 'url';\n\nimport * as CURRENT_FEATURES from '../../canary-features.ts';\ntype FEATURE = keyof typeof CURRENT_FEATURES;\n\nconst dirname = typeof __dirname !== 'undefined' ? __dirname : fileURLToPath(new URL('.', import.meta.url));\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/build-config/debugging\n @main @warp-drive/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/**\n * Log key count metrics, useful for performance\n * debugging.\n *\n * @property {boolean} LOG_METRIC_COUNTS\n * @public\n */\nexport const LOG_METRIC_COUNTS: boolean = false;\n/**\n * Helps when debugging causes of a change notification\n * when processing an update to a hasMany relationship.\n *\n * @property {boolean} DEBUG_RELATIONSHIP_NOTIFICATIONS\n * @public\n */\nexport const DEBUG_RELATIONSHIP_NOTIFICATIONS: boolean = false;\n\n/**\n * A private flag to enable logging of the native Map/Set\n * constructor and method calls.\n *\n * EXTREMELY MALPERFORMANT\n *\n * LOG_METRIC_COUNTS must also be enabled.\n *\n * @typedoc\n */\nexport const __INTERNAL_LOG_NATIVE_MAP_SET_COUNTS: boolean = false;\n","import * as LOGGING from '../../debugging.ts';\n\ntype LOG_CONFIG_KEY = keyof typeof LOGGING;\nexport type LOG_CONFIG = { [key in LOG_CONFIG_KEY]: boolean };\n\nexport function createLoggingConfig(\n env: { DEBUG: boolean; TESTING: boolean; PRODUCTION: boolean },\n debug: LOG_CONFIG\n): LOG_CONFIG {\n const config = {} as LOG_CONFIG;\n const keys = Object.keys(LOGGING) as LOG_CONFIG_KEY[];\n\n for (const key of keys) {\n if (env.DEBUG || env.TESTING) {\n config[key] = true;\n } else {\n config[key] = debug[key] || false;\n }\n }\n\n return config;\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';\nimport { createLoggingConfig } from './-private/utils/logging.ts';\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 activeLogging: { [key in LOG_CONFIG_KEY]: boolean };\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): void {\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/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/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, config.deprecations);\n const FEATURES = getFeatures(env.PRODUCTION);\n\n const includeDataAdapterInProduction =\n typeof config.includeDataAdapterInProduction === 'boolean' ? config.includeDataAdapterInProduction : true;\n const includeDataAdapter = env.PRODUCTION ? includeDataAdapterInProduction : true;\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 activeLogging: createLoggingConfig(env, debugOptions),\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","CI","IS_RECORDING","process","env","PRODUCTION","DEBUG","TESTING","Boolean","SHOULD_RECORD","IS_CI","DEPRECATE_CATCH_ALL","DEPRECATE_RSVP_PROMISE","DEPRECATE_SAVE_PROMISE_ACCESS","DEPRECATE_SNAPSHOT_MODEL_CLASS_ACCESS","DEPRECATE_STORE_FIND","DEPRECATE_HAS_RECORD","DEPRECATE_STRING_ARG_SCHEMAS","DEPRECATE_JSON_API_FALLBACK","DEPRECATE_MODEL_REOPEN","DEPRECATE_EARLY_STATIC","DEPRECATE_HELPERS","DEPRECATE_PROMISE_MANY_ARRAY_BEHAVIORS","DEPRECATE_RELATIONSHIPS_WITHOUT_TYPE","DEPRECATE_RELATIONSHIPS_WITHOUT_ASYNC","DEPRECATE_RELATIONSHIPS_WITHOUT_INVERSE","DEPRECATE_A_USAGE","DEPRECATE_PROMISE_PROXIES","DEPRECATE_ARRAY_LIKE","DEPRECATE_COMPUTED_CHAINS","DEPRECATE_NON_EXPLICIT_POLYMORPHISM","DEPRECATE_MANY_ARRAY_DUPLICATES","DEPRECATE_NON_STRICT_TYPES","DEPRECATE_NON_STRICT_ID","DEPRECATE_NON_UNIQUE_PAYLOADS","DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE","DEPRECATE_STORE_EXTENDS_EMBER_OBJECT","ENABLE_LEGACY_SCHEMA_SERVICE","DEPRECATE_EMBER_INFLECTOR","DISABLE_6X_DEPRECATIONS","deprecationIsResolved","deprecatedSince","compatVersion","semver","lte","minVersion","NextMajorVersion","deprecationIsNextMajorCycle","startsWith","getDeprecations","deprecations","flags","keys","Object","CURRENT_DEPRECATIONS","forEach","flag","isDeactivatedDeprecationNotice","flagState","isResolved","SAMPLE_FEATURE_FLAG","dirname","__dirname","fileURLToPath","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","LOG_METRIC_COUNTS","DEBUG_RELATIONSHIP_NOTIFICATIONS","__INTERNAL_LOG_NATIVE_MAP_SET_COUNTS","createLoggingConfig","debug","config","LOGGING","key","_MacrosConfig","EmbroiderMacros","MacrosConfig","recastMacrosConfig","macros","setConfig","context","appRoot","for","isLegacySupport","___legacy_support","hasDeprecatedConfig","hasInitiatedConfig","globalConfig","console","warn","debugOptions","DEPRECATIONS","compatWith","FEATURES","includeDataAdapterInProduction","includeDataAdapter","finalizedConfig","polyfillUUID","activeLogging","setGlobalConfig","import"],"mappings":";;;;;;;;;;;AAAO,SAASA,MAAMA,GAOpB;EACA,MAAM;IAAEC,SAAS;IAAEC,UAAU;IAAEC,sBAAsB;IAAEC,QAAQ;IAAEC,EAAE;AAAEC,IAAAA;GAAc,GAAGC,OAAO,CAACC,GAAG;EACjG,MAAMC,UAAU,GAAGR,SAAS,KAAK,YAAY,IAAK,CAACA,SAAS,IAAIG,QAAQ,KAAK,YAAa;EAC1F,MAAMM,KAAK,GAAG,CAACD,UAAU;AACzB,EAAA,MAAME,OAAO,GAAGD,KAAK,IAAIE,OAAO,CAACX,SAAS,KAAK,MAAM,IAAIC,UAAU,IAAIC,sBAAsB,CAAC;EAC9F,MAAMU,aAAa,GAAGD,OAAO,CAAC,CAACP,EAAE,IAAIC,YAAY,CAAC;EAElD,OAAO;IACLK,OAAO;IACPF,UAAU;IACVC,KAAK;AACLJ,IAAAA,YAAY,EAAEM,OAAO,CAACN,YAAY,CAAC;AACnCQ,IAAAA,KAAK,EAAEF,OAAO,CAACP,EAAE,CAAC;AAClBQ,IAAAA;GACD;AACH;;ACtBA;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;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,mBAAmB,GAAG,MAAM;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,sBAAsB,GAAG,KAAK;;AAE3C;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;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,qCAAqC,GAAG,KAAK;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAG,KAAK;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAG,KAAK;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,4BAA4B,GAAG,KAAK;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,2BAA2B,GAAG,KAAK;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,sBAAsB,GAAG,KAAK;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,sBAAsB,GAAG,KAAK;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,iBAAiB,GAAG,KAAK;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,sCAAsC,GAAG,KAAK;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,oCAAoC,GAAG,KAAK;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,qCAAqC,GAAG,KAAK;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,uCAAuC,GAAG,KAAK;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,iBAAiB,GAAG,KAAK;;AAEtC;AACA;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,yBAAyB,GAAG,KAAK;;AAE9C;AACA;AACA;AACA;AACA;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,oBAAoB,GAAG,KAAK;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,yBAAyB,GAAG,KAAK;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,mCAAmC,GAAG,KAAK;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,+BAA+B,GAAG,MAAM,CAAC;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;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;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;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;AACA;AACA;AACO,MAAMC,yDAAyD,GAAG,KAAK;;AAE9E;AACA;AACA;AACA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,IAAA,MAAMC,8BAA8B,GAAGlB,uBAAuB,IAAIQ,2BAA2B,CAACN,eAAe,CAAC;AAC9G,IAAA,IAAIiB,SAAS,GAAG,IAAI,CAAC;;IAErB,IAAI,CAACD,8BAA8B,EAAE;AACnC;AACA,MAAA,IAAI,OAAOP,YAAY,GAAGM,IAAI,CAAC,KAAK,SAAS,EAAE;AAC7CE,QAAAA,SAAS,GAAGR,YAAY,GAAGM,IAAI,CAAC;OACjC,MAAM,IAAId,aAAa,EAAE;AACxB;AACA;AACA,QAAA,MAAMiB,UAAU,GAAGnB,qBAAqB,CAACC,eAAe,EAAEC,aAAa,CAAC;AACxE;AACA;AACR;AACA;AACA;AACA;AACA;AACA;QACQgB,SAAS,GAAG,CAACC,UAAU;AACzB;AACF;;AAEA;AACAR,IAAAA,KAAK,CAACK,IAAI,CAAC,GAAGE,SAAS;AACzB,GAAC,CAAC;AAEF,EAAA,OAAOP,KAAK;AACd;;ACtDA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACO,MAAMS,mBAAmC,GAAG,IAAI;;;;;;;ACjFvD,MAAMC,OAAO,GAAG,OAAOC,SAAS,KAAK,WAAW,GAAGA,SAAS,GAAGC,iBAAa,CAAC,IAA6B,GAAA,CAAA,GAAA,EAAA,oQAAA,CAAA,CAAC;AAC3G,MAAMC,eAAe,GAAGC,IAAI,CAACC,IAAI,CAACL,OA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