@warp-drive/build-config 5.6.0-alpha.11 → 5.6.0-alpha.13
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/declarations/-private/utils/get-env.d.ts +1 -1
- package/declarations/-private/utils/get-env.d.ts.map +1 -1
- package/declarations/index.d.ts +4 -0
- package/declarations/index.d.ts.map +1 -1
- package/dist/cjs-set-config.cjs +8 -5
- package/dist/cjs-set-config.cjs.map +1 -1
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-env.d.ts","sourceRoot":"","sources":["../../../src/-private/utils/get-env.ts"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,
|
|
1
|
+
{"version":3,"file":"get-env.d.ts","sourceRoot":"","sources":["../../../src/-private/utils/get-env.ts"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,aAAa,GAAG,OAAO,GAAG;IACtF,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,OAAO,CAAC;CACxB,CAmBA"}
|
package/declarations/index.d.ts
CHANGED
|
@@ -77,6 +77,10 @@ export type WarpDriveConfig = {
|
|
|
77
77
|
* @public
|
|
78
78
|
*/
|
|
79
79
|
features?: Partial<InternalWarpDriveConfig['features']>;
|
|
80
|
+
/**
|
|
81
|
+
* @private
|
|
82
|
+
*/
|
|
83
|
+
forceMode?: 'testing' | 'production' | 'development';
|
|
80
84
|
};
|
|
81
85
|
type InternalWarpDriveConfig = {
|
|
82
86
|
debug: typeof LOGGING;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.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EAAE,CAAC;IAEnC;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,cAAc,CAAC,CAAC,CAAC;IAEhE;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC,CAAC;IAExD;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,aAAa,CAAC;CACtD,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,OAAO,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,GAAG,MAAM,IAAI,MAAM,EAAE,GAAG,IAAI,CAAC;IACzC,YAAY,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;IACjD,QAAQ,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;IACzC,aAAa,EAAE,OAAO,OAAO,CAAC;IAC9B,GAAG,EAAE;QACH,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,CAAC;KAChB,CAAC;CACH,CAAC;AAWF,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;AACzE,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC"}
|
package/dist/cjs-set-config.cjs
CHANGED
|
@@ -9,7 +9,10 @@ const path = require('path');
|
|
|
9
9
|
const url = require('url');
|
|
10
10
|
|
|
11
11
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
12
|
-
function getEnv() {
|
|
12
|
+
function getEnv(forceMode) {
|
|
13
|
+
const FORCE_TESTING = forceMode === 'testing' || forceMode === 'development' || forceMode === 'debug';
|
|
14
|
+
const FORCE_DEBUG = forceMode === 'development' || forceMode === 'debug';
|
|
15
|
+
const FORCE_PRODUCTION = forceMode === 'production';
|
|
13
16
|
const {
|
|
14
17
|
EMBER_ENV,
|
|
15
18
|
IS_TESTING,
|
|
@@ -18,9 +21,9 @@ function getEnv() {
|
|
|
18
21
|
CI,
|
|
19
22
|
IS_RECORDING
|
|
20
23
|
} = process.env;
|
|
21
|
-
const PRODUCTION = EMBER_ENV === 'production' || !EMBER_ENV && NODE_ENV === 'production';
|
|
22
|
-
const DEBUG = !PRODUCTION;
|
|
23
|
-
const TESTING = DEBUG || Boolean(EMBER_ENV === 'test' || IS_TESTING || EMBER_CLI_TEST_COMMAND);
|
|
24
|
+
const PRODUCTION = FORCE_PRODUCTION || EMBER_ENV === 'production' || !EMBER_ENV && NODE_ENV === 'production';
|
|
25
|
+
const DEBUG = FORCE_DEBUG || !PRODUCTION;
|
|
26
|
+
const TESTING = FORCE_TESTING || DEBUG || Boolean(EMBER_ENV === 'test' || IS_TESTING || EMBER_CLI_TEST_COMMAND);
|
|
24
27
|
const SHOULD_RECORD = Boolean(!CI || IS_RECORDING);
|
|
25
28
|
return {
|
|
26
29
|
TESTING,
|
|
@@ -604,7 +607,7 @@ function setConfig(context, appRootOrConfig, config) {
|
|
|
604
607
|
// }
|
|
605
608
|
|
|
606
609
|
const debugOptions = Object.assign({}, LOGGING, userConfig.debug);
|
|
607
|
-
const env = getEnv();
|
|
610
|
+
const env = getEnv(userConfig.forceMode);
|
|
608
611
|
const DEPRECATIONS = getDeprecations(userConfig.compatWith || null, userConfig.deprecations);
|
|
609
612
|
const FEATURES = getFeatures(env.PRODUCTION);
|
|
610
613
|
const includeDataAdapterInProduction = typeof userConfig.includeDataAdapterInProduction === 'boolean' ? userConfig.includeDataAdapterInProduction : true;
|
|
@@ -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/-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//\nexport const DEPRECATE_CATCH_ALL = '99.0';\nexport const DEPRECATE_NON_STRICT_TYPES = '5.3';\nexport const DEPRECATE_NON_STRICT_ID = '5.3';\nexport const DEPRECATE_COMPUTED_CHAINS = '7.0';\nexport const DEPRECATE_LEGACY_IMPORTS = '5.3';\nexport const DEPRECATE_NON_UNIQUE_PAYLOADS = '5.3';\nexport const DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE = '5.3';\nexport const DEPRECATE_MANY_ARRAY_DUPLICATES = '5.3';\nexport const DEPRECATE_STORE_EXTENDS_EMBER_OBJECT = '5.4';\nexport const ENABLE_LEGACY_SCHEMA_SERVICE = '5.4';\nexport const DEPRECATE_EMBER_INFLECTOR = '5.3';\nexport const DISABLE_7X_DEPRECATIONS = '7.0';\nexport const DEPRECATE_TRACKING_PACKAGE = '5.5';\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_7X_DEPRECATIONS = deprecations?.DISABLE_7X_DEPRECATIONS ?? true;\n\n keys.forEach((flag) => {\n const deprecatedSince = CURRENT_DEPRECATIONS[flag];\n const isDeactivatedDeprecationNotice = DISABLE_7X_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 *\n * # Canary Features <Badge type=\"warning\" text=\"requires canary\" />\n *\n * ***Warp*Drive** allows users to test upcoming features that are implemented\n * but not yet activated in canary builds.\n *\n * Typically these features represent work that carries higher risk of breaking\n * changes, or are not yet fully ready for production use.\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, beginning the process of it landing in a stable release.\n *\n * ### Installing Canary\n *\n * ::: warning To test a feature guarded behind a flag, you MUST be using a canary build.\n * :::\n *\n * Canary builds are published to `npm` and can be installed using a precise tag\n * (such as `@warp-drive/core@5.6.0-alpha.1`) or by installing the latest dist-tag\n * published to the `canary` channel.\n *\n * Because ***Warp*Drive** packages operate on a strict lockstep policy with each other,\n * you must install the matching canary version of all ***Warp*Drive** packages.\n *\n * Below is an example of installing the latest canary version of all the core\n * packages that are part of the ***Warp*Drive** project when using EmberJS.\n *\n * Add/remove packages from this list to match your project.\n *\n * ::: code-group\n *\n * ```sh [pnpm]\n * pnpm add -E @warp-drive/core@canary \\\n * @warp-drive/json-api@canary \\\n * @warp-drive/ember@canary;\n * ```\n *\n * ```sh [npm]\n * npm add -E @warp-drive/core@canary \\\n * @warp-drive/json-api@canary \\\n * @warp-drive/ember@canary;\n * ```\n *\n * ```sh [yarn]\n * yarn add -E @warp-drive/core@canary \\\n * @warp-drive/json-api@canary \\\n * @warp-drive/ember@canary;\n * ```\n *\n * ```sh [bun]\n * bun add --exact @warp-drive/core@canary \\\n * @warp-drive/json-api@canary \\\n * @warp-drive/ember@canary;\n * ```\n *\n * :::\n *\n * ### Activating a Feature\n *\n * Once you have installed canary, feature-flags can be activated at build-time\n *\n * ```ts\n * setConfig(app, __dirname, {\n * features: {\n * FEATURE_A: false, // utilize existing behavior\n * FEATURE_B: true // utilize the new behavior\n * }\n * })\n * ```\n *\n * by setting an environment variable:\n *\n * ```sh\n * # Activate a single flag\n * export WARP_DRIVE_FEATURE_OVERRIDE=SOME_FLAG;\n *\n * # Activate multiple flags by separating with commas\n * export WARP_DRIVE_FEATURE_OVERRIDE=SOME_FLAG,OTHER_FLAG;\n *\n * # Activate all flags\n * export WARP_DRIVE_FEATURE_OVERRIDE=ENABLE_ALL_OPTIONAL;\n * ```\n *\n * ::: warning To test a feature guarded behind a flag, you MUST be running a development build.\n * :::\n *\n *\n * ### Preparing a Project to use a Canary Feature\n *\n * For most projects and features, simple version detection should be enough.\n *\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('@warp-drive/core', '5.6'))) {\n * // do thing\n * }\n * ```\n *\n * For more complex projects and migrations, configure [@warp-drive/build-config/babel-macros](./babel-macros)\n *\n * The current list of features used at build time for canary releases is defined below.\n *\n * ::: tip 💡 If empty there are no features currently gated by feature flags.\n * :::\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 * @module\n * @public\n */\n\n/**\n * We use this for some tests etc.\n *\n * @internal\n */\nexport const SAMPLE_FEATURE_FLAG: boolean | null = null;\n\n/**\n * This upcoming feature adds a validation step to payloads received\n * by the JSONAPICache implementation.\n *\n * When a request completes and the result is given to the cache via\n * `cache.put`, the cache will validate the payload against registered\n * schemas as well as the JSON:API spec.\n *\n * @since 5.4\n * @public\n */\nexport const JSON_API_CACHE_VALIDATION_ERRORS: boolean | null = false;\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.WARP_DRIVE_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 * # Log Instrumentation <Badge type=\"tip\" text=\"debug only\" />\n *\n * Many portions of the internals are helpfully instrumented with logging.\n * This instrumentation is always removed from production builds.\n *\n * Log instrumentation is \"regionalized\" to specific concepts and concerns\n * to enable you to enable/disable just the areas you are interested in.\n *\n * To activate a particular group of logs set the appropriate flag to `true`\n * either in your build config or via the runtime helper.\n *\n *\n * ## Runtime Activation\n *\n * ::: tip 💡 Just Works in browser Dev Tools!\n * No import is needed, and the logging config is preserved when the page is refreshed\n * :::\n *\n * ```ts\n * setWarpDriveLogging({\n * LOG_CACHE: true,\n * LOG_REQUESTS: true,\n * })\n * ```\n *\n * A runtime helper is attached to `globalThis` to enable activation of the logs\n * from anywhere in your application including from the devtools panel.\n *\n * The runtime helper overrides any build config settings for the given flag\n * for the current browser tab. It stores the configuration you give it in\n * `sessionStorage` so that it persists across page reloads of the current tab,\n * but not across browser tabs or windows.\n *\n * If you need to deactivate the logging, you can call the helper again with the\n * same flag set to `false` or just open a new tab/window.\n *\n * ## Buildtime Activation\n *\n * ```ts\n * setConfig(__dirname, app, {\n * debug: {\n * LOG_CACHE: true,\n * LOG_REQUESTS: false,\n * LOG_NOTIFICATIONS: true,\n * }\n * });\n * ```\n *\n * The build config settings are used to set the default values for the\n * logging flags. Any logging flag that is not set in the build config\n * will default to `false`.\n *\n * @module\n */\n/**\n * log cache updates for both local\n * and remote state. Note in some older versions\n * this was called `LOG_PAYLOADS` and was one\n * of three flags that controlled logging of\n * cache updates. This is now the only flag.\n *\n * The others were `LOG_OPERATIONS` and `LOG_MUTATIONS`.\n *\n * @public\n * @since 5.5\n */\nexport const LOG_CACHE: boolean = false;\n\n/**\n * <Badge type=\"danger\" text=\"removed\" />\n *\n * This flag no longer has any effect.\n *\n * Use {@link LOG_CACHE} instead.\n *\n * @deprecated removed in version 5.5\n * @public\n */\nexport const LOG_PAYLOADS: boolean = false;\n\n/**\n * <Badge type=\"danger\" text=\"removed\" />\n *\n * This flag no longer has any effect.\n *\n * Use {@link LOG_CACHE} instead.\n *\n * @deprecated removed in version 5.5\n * @public\n */\nexport const LOG_OPERATIONS: boolean = false;\n\n/**\n * <Badge type=\"danger\" text=\"removed\" />\n *\n * This flag no longer has any effect.\n *\n * Use {@link LOG_CACHE} instead.\n *\n * @deprecated removed in version 5.5\n * @public\n */\nexport const LOG_MUTATIONS: boolean = false;\n\n/**\n * Log decisions made by the Basic CachePolicy\n *\n * @public\n */\nexport const LOG_CACHE_POLICY: boolean = false;\n\n/**\n * log notifications received by the NotificationManager\n *\n * @public\n */\nexport const LOG_NOTIFICATIONS: boolean = false;\n/**\n * log requests issued by the RequestManager\n *\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 * @public\n */\nexport const LOG_REQUEST_STATUS: boolean = false;\n/**\n * log peek, generation and updates to\n * Record Identifiers.\n *\n\n * @public\n */\nexport const LOG_IDENTIFIERS: boolean = false;\n/**\n * log updates received by the graph (relationship pointer storage)\n *\n * @public\n */\nexport const LOG_GRAPH: boolean = false;\n/**\n * log creation/removal of RecordData and Record\n * instances.\n *\n * @public\n */\nexport const LOG_INSTANCE_CACHE: boolean = false;\n/**\n * Log key count metrics, useful for performance\n * debugging.\n *\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 * @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 * @internal\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","/**\n * This package provides a build-plugin that enables configuration of deprecations,\n * optional features, development/testing support and debug logging.\n *\n * This configuration is done using `setConfig` in `ember-cli-build`.\n *\n * ```ts [ember-cli-build.js]\n * 'use strict';\n *\n * const EmberApp = require('ember-cli/lib/broccoli/ember-app');\n *\n * module.exports = async function (defaults) {\n * const { setConfig } = await import('@warp-drive/build-config'); // [!code focus]\n *\n * const app = new EmberApp(defaults, {});\n *\n * setConfig(app, __dirname, { // [!code focus:3]\n * // settings here\n * });\n *\n * const { Webpack } = require('@embroider/webpack');\n * return require('@embroider/compat').compatBuild(app, Webpack, {});\n * };\n *\n * ```\n *\n * Available settings include:\n *\n * - {@link LOGGING | debugging}\n * - {@link DEPRECATIONS | deprecations}\n * - {@link FEATURES | features}\n * - {@link WarpDriveConfig.polyfillUUID | polyfillUUID}\n * - {@link WarpDriveConfig.includeDataAdapterInProduction | includeDataAdapterInProduction}\n * - {@link WarpDriveConfig.compatWith | compatWith}\n *\n *\n *\n * @module\n */\nimport 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 * as FEATURES from './canary-features.ts';\nimport type * as DEPRECATIONS from './deprecations.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\nexport type WarpDriveConfig = {\n /**\n * An object of key/value pairs of logging flags\n *\n * see {@link LOGGING | debugging} for the available flags.\n *\n * ```ts\n * {\n * LOG_CACHE: true,\n * }\n * ```\n *\n * @public\n */\n debug?: Partial<InternalWarpDriveConfig['debug']>;\n\n /**\n * If you are using the library in an environment that does not\n * support `window.crypto.randomUUID` you can enable a polyfill\n * for it.\n *\n * @public\n */\n polyfillUUID?: boolean;\n\n /**\n * By default, the integration required to support the ember-inspector\n * browser extension is included in production builds only when using\n * the `ember-data` package.\n *\n * Otherwise the default is to exclude it. This setting allows to explicitly\n * enable/disable it in production builds.\n *\n * @public\n */\n includeDataAdapterInProduction?: boolean;\n\n /**\n * The most recent version of the library from which all\n * deprecations have been resolved.\n *\n * For instance if all deprecations released prior to or\n * within `5.3` have been resolved, then setting this to\n * `5.3` will remove all the support for the deprecated\n * features for associated deprecations.\n *\n * See {@link DEPRECATIONS | deprecations} for more details.\n */\n compatWith?: `${number}.${number}`;\n\n /**\n * An object of key/value pairs of logging flags\n *\n * see {@link DEPRECATIONS | deprecations} for the available flags.\n *\n * ```ts\n * {\n * DEPRECATE_THING: false,\n * }\n * ```\n *\n * @public\n */\n deprecations?: Partial<InternalWarpDriveConfig['deprecations']>;\n\n /**\n * An object of key/value pairs of canary feature flags\n * for use when testing new features gated behind a flag\n * in a canary release version.\n *\n * see {@link FEATURES | features} for the available flags.\n *\n * ```ts\n * {\n * FEATURE_A: true,\n * }\n * ```\n *\n * @public\n */\n features?: Partial<InternalWarpDriveConfig['features']>;\n};\n\ntype InternalWarpDriveConfig = {\n debug: typeof LOGGING;\n polyfillUUID: boolean;\n includeDataAdapter: boolean;\n compatWith: `${number}.${number}` | null;\n deprecations: ReturnType<typeof getDeprecations>;\n features: ReturnType<typeof getFeatures>;\n activeLogging: typeof LOGGING;\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(macros: object, config: WarpDriveConfig): void;\nexport function setConfig(context: object, appRoot: string, config: WarpDriveConfig): void;\nexport function setConfig(context: object, appRootOrConfig: string | WarpDriveConfig, config?: WarpDriveConfig): void {\n const isEmberClassicUsage = arguments.length === 3;\n const macros = recastMacrosConfig(\n isEmberClassicUsage ? _MacrosConfig.for(context, appRootOrConfig as string) : context\n );\n\n const userConfig = isEmberClassicUsage ? config! : (appRootOrConfig as WarpDriveConfig);\n\n const isLegacySupport = (userConfig as unknown as { ___legacy_support?: boolean }).___legacy_support;\n const hasDeprecatedConfig = isLegacySupport && Object.keys(userConfig).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 // We don't want to print this just yet because we are going to re-arrange packages\n // and this would be come an import from @warp-drive/core. Better to not deprecate twice.\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, userConfig.debug);\n\n const env = getEnv();\n const DEPRECATIONS = getDeprecations(userConfig.compatWith || null, userConfig.deprecations);\n const FEATURES = getFeatures(env.PRODUCTION);\n\n const includeDataAdapterInProduction =\n typeof userConfig.includeDataAdapterInProduction === 'boolean' ? userConfig.includeDataAdapterInProduction : true;\n const includeDataAdapter = env.PRODUCTION ? includeDataAdapterInProduction : true;\n\n const finalizedConfig: InternalWarpDriveConfig = {\n debug: debugOptions,\n polyfillUUID: userConfig.polyfillUUID ?? false,\n includeDataAdapter,\n compatWith: userConfig.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_NON_STRICT_TYPES","DEPRECATE_NON_STRICT_ID","DEPRECATE_COMPUTED_CHAINS","DEPRECATE_LEGACY_IMPORTS","DEPRECATE_NON_UNIQUE_PAYLOADS","DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE","DEPRECATE_MANY_ARRAY_DUPLICATES","DEPRECATE_STORE_EXTENDS_EMBER_OBJECT","ENABLE_LEGACY_SCHEMA_SERVICE","DEPRECATE_EMBER_INFLECTOR","DISABLE_7X_DEPRECATIONS","DEPRECATE_TRACKING_PACKAGE","deprecationIsResolved","deprecatedSince","compatVersion","semver","lte","minVersion","NextMajorVersion","deprecationIsNextMajorCycle","startsWith","getDeprecations","deprecations","flags","keys","Object","CURRENT_DEPRECATIONS","forEach","flag","isDeactivatedDeprecationNotice","flagState","isResolved","SAMPLE_FEATURE_FLAG","JSON_API_CACHE_VALIDATION_ERRORS","dirname","__dirname","fileURLToPath","relativePkgPath","path","join","version","JSON","parse","fs","readFileSync","isCanary","includes","getFeatures","isProd","features","assign","CURRENT_FEATURES","feature","featureValue","FEATURE_OVERRIDES","WARP_DRIVE_FEATURE_OVERRIDE","forcedFeatures","split","i","length","featureName","Error","LOG_CACHE","LOG_PAYLOADS","LOG_OPERATIONS","LOG_MUTATIONS","LOG_CACHE_POLICY","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","appRootOrConfig","isEmberClassicUsage","arguments","for","userConfig","isLegacySupport","___legacy_support","hasDeprecatedConfig","hasInitiatedConfig","globalConfig","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;AACO,MAAME,mBAAmB,GAAG,MAAM;AAClC,MAAMC,0BAA0B,GAAG,KAAK;AACxC,MAAMC,uBAAuB,GAAG,KAAK;AACrC,MAAMC,yBAAyB,GAAG,KAAK;AACvC,MAAMC,wBAAwB,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,SAAS,GAAGR,YAAY,GAAGM,IAAI,CAAE;OAClC,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACO,MAAMS,mBAAmC,GAAG,IAAI;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,gCAAgD,GAAG,KAAK;;;;;;;;AClIrE,MAAMC,OAAO,GAAG,OAAOC,SAAS,KAAK,WAAW,GAAGA,SAAS,GAAGC,iBAAa,CAAC,IAA6B,GAAA,CAAA,GAAA,EAAA,oQAAA,CAAA,CAAC;AAC3G,MAAMC,eAAe,GAAGC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AACA;AACA;AACA;AACA;;AAEA,EAAA,MAAMqC,YAA8C,GAAGzE,MAAM,CAACyB,MAAM,CAAC,EAAE,EAAE6B,OAAO,EAAEa,UAAU,CAACf,KAAK,CAAC;AAEnG,EAAA,MAAMrF,GAAG,GAAGR,MAAM,EAAE;AACpB,EAAA,MAAMmH,YAAY,GAAG9E,eAAe,CAACuE,UAAU,CAACQ,UAAU,IAAI,IAAI,EAAER,UAAU,CAACtE,YAAY,CAAC;AAC5F,EAAA,MAAM+E,QAAQ,GAAGtD,WAAW,CAACvD,GAAG,CAACC,UAAU,CAAC;AAE5C,EAAA,MAAM6G,8BAA8B,GAClC,OAAOV,UAAU,CAACU,8BAA8B,KAAK,SAAS,GAAGV,UAAU,CAACU,8BAA8B,GAAG,IAAI;EACnH,MAAMC,kBAAkB,GAAG/G,GAAG,CAACC,UAAU,GAAG6G,8BAA8B,GAAG,IAAI;AAEjF,EAAA,MAAME,eAAwC,GAAG;AAC/C3B,IAAAA,KAAK,EAAEqB,YAAY;AACnBO,IAAAA,YAAY,EAAEb,UAAU,CAACa,YAAY,IAAI,KAAK;IAC9CF,kBAAkB;AAClBH,IAAAA,UAAU,EAAER,UAAU,CAACQ,UAAU,IAAI,IAAI;AACzC9E,IAAAA,YAAY,EAAE6E,YAAY;AAC1BlD,IAAAA,QAAQ,EAAEoD,QAAQ;AAClBK,IAAAA,aAAa,EAAE9B,mBAAmB,CAACpF,GAAG,EAAE0G,YAAY,CAAC;AACrD1G,IAAAA;GACD;AAED6F,EAAAA,MAAM,CAACsB,eAAe,CAACC,SAAoB,EAAE,WAAW,EAAEJ,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(forceMode?: 'testing' | 'production' | 'development' | 'debug'): {\n TESTING: boolean;\n PRODUCTION: boolean;\n DEBUG: boolean;\n IS_RECORDING: boolean;\n IS_CI: boolean;\n SHOULD_RECORD: boolean;\n} {\n const FORCE_TESTING = forceMode === 'testing' || forceMode === 'development' || forceMode === 'debug';\n const FORCE_DEBUG = forceMode === 'development' || forceMode === 'debug';\n const FORCE_PRODUCTION = forceMode === 'production';\n\n const { EMBER_ENV, IS_TESTING, EMBER_CLI_TEST_COMMAND, NODE_ENV, CI, IS_RECORDING } = process.env;\n const PRODUCTION = FORCE_PRODUCTION || EMBER_ENV === 'production' || (!EMBER_ENV && NODE_ENV === 'production');\n const DEBUG = FORCE_DEBUG || !PRODUCTION;\n const TESTING = FORCE_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//\nexport const DEPRECATE_CATCH_ALL = '99.0';\nexport const DEPRECATE_NON_STRICT_TYPES = '5.3';\nexport const DEPRECATE_NON_STRICT_ID = '5.3';\nexport const DEPRECATE_COMPUTED_CHAINS = '7.0';\nexport const DEPRECATE_LEGACY_IMPORTS = '5.3';\nexport const DEPRECATE_NON_UNIQUE_PAYLOADS = '5.3';\nexport const DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE = '5.3';\nexport const DEPRECATE_MANY_ARRAY_DUPLICATES = '5.3';\nexport const DEPRECATE_STORE_EXTENDS_EMBER_OBJECT = '5.4';\nexport const ENABLE_LEGACY_SCHEMA_SERVICE = '5.4';\nexport const DEPRECATE_EMBER_INFLECTOR = '5.3';\nexport const DISABLE_7X_DEPRECATIONS = '7.0';\nexport const DEPRECATE_TRACKING_PACKAGE = '5.5';\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_7X_DEPRECATIONS = deprecations?.DISABLE_7X_DEPRECATIONS ?? true;\n\n keys.forEach((flag) => {\n const deprecatedSince = CURRENT_DEPRECATIONS[flag];\n const isDeactivatedDeprecationNotice = DISABLE_7X_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 *\n * # Canary Features <Badge type=\"warning\" text=\"requires canary\" />\n *\n * ***Warp*Drive** allows users to test upcoming features that are implemented\n * but not yet activated in canary builds.\n *\n * Typically these features represent work that carries higher risk of breaking\n * changes, or are not yet fully ready for production use.\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, beginning the process of it landing in a stable release.\n *\n * ### Installing Canary\n *\n * ::: warning To test a feature guarded behind a flag, you MUST be using a canary build.\n * :::\n *\n * Canary builds are published to `npm` and can be installed using a precise tag\n * (such as `@warp-drive/core@5.6.0-alpha.1`) or by installing the latest dist-tag\n * published to the `canary` channel.\n *\n * Because ***Warp*Drive** packages operate on a strict lockstep policy with each other,\n * you must install the matching canary version of all ***Warp*Drive** packages.\n *\n * Below is an example of installing the latest canary version of all the core\n * packages that are part of the ***Warp*Drive** project when using EmberJS.\n *\n * Add/remove packages from this list to match your project.\n *\n * ::: code-group\n *\n * ```sh [pnpm]\n * pnpm add -E @warp-drive/core@canary \\\n * @warp-drive/json-api@canary \\\n * @warp-drive/ember@canary;\n * ```\n *\n * ```sh [npm]\n * npm add -E @warp-drive/core@canary \\\n * @warp-drive/json-api@canary \\\n * @warp-drive/ember@canary;\n * ```\n *\n * ```sh [yarn]\n * yarn add -E @warp-drive/core@canary \\\n * @warp-drive/json-api@canary \\\n * @warp-drive/ember@canary;\n * ```\n *\n * ```sh [bun]\n * bun add --exact @warp-drive/core@canary \\\n * @warp-drive/json-api@canary \\\n * @warp-drive/ember@canary;\n * ```\n *\n * :::\n *\n * ### Activating a Feature\n *\n * Once you have installed canary, feature-flags can be activated at build-time\n *\n * ```ts\n * setConfig(app, __dirname, {\n * features: {\n * FEATURE_A: false, // utilize existing behavior\n * FEATURE_B: true // utilize the new behavior\n * }\n * })\n * ```\n *\n * by setting an environment variable:\n *\n * ```sh\n * # Activate a single flag\n * export WARP_DRIVE_FEATURE_OVERRIDE=SOME_FLAG;\n *\n * # Activate multiple flags by separating with commas\n * export WARP_DRIVE_FEATURE_OVERRIDE=SOME_FLAG,OTHER_FLAG;\n *\n * # Activate all flags\n * export WARP_DRIVE_FEATURE_OVERRIDE=ENABLE_ALL_OPTIONAL;\n * ```\n *\n * ::: warning To test a feature guarded behind a flag, you MUST be running a development build.\n * :::\n *\n *\n * ### Preparing a Project to use a Canary Feature\n *\n * For most projects and features, simple version detection should be enough.\n *\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('@warp-drive/core', '5.6'))) {\n * // do thing\n * }\n * ```\n *\n * For more complex projects and migrations, configure [@warp-drive/build-config/babel-macros](./babel-macros)\n *\n * The current list of features used at build time for canary releases is defined below.\n *\n * ::: tip 💡 If empty there are no features currently gated by feature flags.\n * :::\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 * @module\n * @public\n */\n\n/**\n * We use this for some tests etc.\n *\n * @internal\n */\nexport const SAMPLE_FEATURE_FLAG: boolean | null = null;\n\n/**\n * This upcoming feature adds a validation step to payloads received\n * by the JSONAPICache implementation.\n *\n * When a request completes and the result is given to the cache via\n * `cache.put`, the cache will validate the payload against registered\n * schemas as well as the JSON:API spec.\n *\n * @since 5.4\n * @public\n */\nexport const JSON_API_CACHE_VALIDATION_ERRORS: boolean | null = false;\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.WARP_DRIVE_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 * # Log Instrumentation <Badge type=\"tip\" text=\"debug only\" />\n *\n * Many portions of the internals are helpfully instrumented with logging.\n * This instrumentation is always removed from production builds.\n *\n * Log instrumentation is \"regionalized\" to specific concepts and concerns\n * to enable you to enable/disable just the areas you are interested in.\n *\n * To activate a particular group of logs set the appropriate flag to `true`\n * either in your build config or via the runtime helper.\n *\n *\n * ## Runtime Activation\n *\n * ::: tip 💡 Just Works in browser Dev Tools!\n * No import is needed, and the logging config is preserved when the page is refreshed\n * :::\n *\n * ```ts\n * setWarpDriveLogging({\n * LOG_CACHE: true,\n * LOG_REQUESTS: true,\n * })\n * ```\n *\n * A runtime helper is attached to `globalThis` to enable activation of the logs\n * from anywhere in your application including from the devtools panel.\n *\n * The runtime helper overrides any build config settings for the given flag\n * for the current browser tab. It stores the configuration you give it in\n * `sessionStorage` so that it persists across page reloads of the current tab,\n * but not across browser tabs or windows.\n *\n * If you need to deactivate the logging, you can call the helper again with the\n * same flag set to `false` or just open a new tab/window.\n *\n * ## Buildtime Activation\n *\n * ```ts\n * setConfig(__dirname, app, {\n * debug: {\n * LOG_CACHE: true,\n * LOG_REQUESTS: false,\n * LOG_NOTIFICATIONS: true,\n * }\n * });\n * ```\n *\n * The build config settings are used to set the default values for the\n * logging flags. Any logging flag that is not set in the build config\n * will default to `false`.\n *\n * @module\n */\n/**\n * log cache updates for both local\n * and remote state. Note in some older versions\n * this was called `LOG_PAYLOADS` and was one\n * of three flags that controlled logging of\n * cache updates. This is now the only flag.\n *\n * The others were `LOG_OPERATIONS` and `LOG_MUTATIONS`.\n *\n * @public\n * @since 5.5\n */\nexport const LOG_CACHE: boolean = false;\n\n/**\n * <Badge type=\"danger\" text=\"removed\" />\n *\n * This flag no longer has any effect.\n *\n * Use {@link LOG_CACHE} instead.\n *\n * @deprecated removed in version 5.5\n * @public\n */\nexport const LOG_PAYLOADS: boolean = false;\n\n/**\n * <Badge type=\"danger\" text=\"removed\" />\n *\n * This flag no longer has any effect.\n *\n * Use {@link LOG_CACHE} instead.\n *\n * @deprecated removed in version 5.5\n * @public\n */\nexport const LOG_OPERATIONS: boolean = false;\n\n/**\n * <Badge type=\"danger\" text=\"removed\" />\n *\n * This flag no longer has any effect.\n *\n * Use {@link LOG_CACHE} instead.\n *\n * @deprecated removed in version 5.5\n * @public\n */\nexport const LOG_MUTATIONS: boolean = false;\n\n/**\n * Log decisions made by the Basic CachePolicy\n *\n * @public\n */\nexport const LOG_CACHE_POLICY: boolean = false;\n\n/**\n * log notifications received by the NotificationManager\n *\n * @public\n */\nexport const LOG_NOTIFICATIONS: boolean = false;\n/**\n * log requests issued by the RequestManager\n *\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 * @public\n */\nexport const LOG_REQUEST_STATUS: boolean = false;\n/**\n * log peek, generation and updates to\n * Record Identifiers.\n *\n\n * @public\n */\nexport const LOG_IDENTIFIERS: boolean = false;\n/**\n * log updates received by the graph (relationship pointer storage)\n *\n * @public\n */\nexport const LOG_GRAPH: boolean = false;\n/**\n * log creation/removal of RecordData and Record\n * instances.\n *\n * @public\n */\nexport const LOG_INSTANCE_CACHE: boolean = false;\n/**\n * Log key count metrics, useful for performance\n * debugging.\n *\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 * @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 * @internal\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","/**\n * This package provides a build-plugin that enables configuration of deprecations,\n * optional features, development/testing support and debug logging.\n *\n * This configuration is done using `setConfig` in `ember-cli-build`.\n *\n * ```ts [ember-cli-build.js]\n * 'use strict';\n *\n * const EmberApp = require('ember-cli/lib/broccoli/ember-app');\n *\n * module.exports = async function (defaults) {\n * const { setConfig } = await import('@warp-drive/build-config'); // [!code focus]\n *\n * const app = new EmberApp(defaults, {});\n *\n * setConfig(app, __dirname, { // [!code focus:3]\n * // settings here\n * });\n *\n * const { Webpack } = require('@embroider/webpack');\n * return require('@embroider/compat').compatBuild(app, Webpack, {});\n * };\n *\n * ```\n *\n * Available settings include:\n *\n * - {@link LOGGING | debugging}\n * - {@link DEPRECATIONS | deprecations}\n * - {@link FEATURES | features}\n * - {@link WarpDriveConfig.polyfillUUID | polyfillUUID}\n * - {@link WarpDriveConfig.includeDataAdapterInProduction | includeDataAdapterInProduction}\n * - {@link WarpDriveConfig.compatWith | compatWith}\n *\n *\n *\n * @module\n */\nimport 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 * as FEATURES from './canary-features.ts';\nimport type * as DEPRECATIONS from './deprecations.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\nexport type WarpDriveConfig = {\n /**\n * An object of key/value pairs of logging flags\n *\n * see {@link LOGGING | debugging} for the available flags.\n *\n * ```ts\n * {\n * LOG_CACHE: true,\n * }\n * ```\n *\n * @public\n */\n debug?: Partial<InternalWarpDriveConfig['debug']>;\n\n /**\n * If you are using the library in an environment that does not\n * support `window.crypto.randomUUID` you can enable a polyfill\n * for it.\n *\n * @public\n */\n polyfillUUID?: boolean;\n\n /**\n * By default, the integration required to support the ember-inspector\n * browser extension is included in production builds only when using\n * the `ember-data` package.\n *\n * Otherwise the default is to exclude it. This setting allows to explicitly\n * enable/disable it in production builds.\n *\n * @public\n */\n includeDataAdapterInProduction?: boolean;\n\n /**\n * The most recent version of the library from which all\n * deprecations have been resolved.\n *\n * For instance if all deprecations released prior to or\n * within `5.3` have been resolved, then setting this to\n * `5.3` will remove all the support for the deprecated\n * features for associated deprecations.\n *\n * See {@link DEPRECATIONS | deprecations} for more details.\n */\n compatWith?: `${number}.${number}`;\n\n /**\n * An object of key/value pairs of logging flags\n *\n * see {@link DEPRECATIONS | deprecations} for the available flags.\n *\n * ```ts\n * {\n * DEPRECATE_THING: false,\n * }\n * ```\n *\n * @public\n */\n deprecations?: Partial<InternalWarpDriveConfig['deprecations']>;\n\n /**\n * An object of key/value pairs of canary feature flags\n * for use when testing new features gated behind a flag\n * in a canary release version.\n *\n * see {@link FEATURES | features} for the available flags.\n *\n * ```ts\n * {\n * FEATURE_A: true,\n * }\n * ```\n *\n * @public\n */\n features?: Partial<InternalWarpDriveConfig['features']>;\n\n /**\n * @private\n */\n forceMode?: 'testing' | 'production' | 'development';\n};\n\ntype InternalWarpDriveConfig = {\n debug: typeof LOGGING;\n polyfillUUID: boolean;\n includeDataAdapter: boolean;\n compatWith: `${number}.${number}` | null;\n deprecations: ReturnType<typeof getDeprecations>;\n features: ReturnType<typeof getFeatures>;\n activeLogging: typeof LOGGING;\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(macros: object, config: WarpDriveConfig): void;\nexport function setConfig(context: object, appRoot: string, config: WarpDriveConfig): void;\nexport function setConfig(context: object, appRootOrConfig: string | WarpDriveConfig, config?: WarpDriveConfig): void {\n const isEmberClassicUsage = arguments.length === 3;\n const macros = recastMacrosConfig(\n isEmberClassicUsage ? _MacrosConfig.for(context, appRootOrConfig as string) : context\n );\n\n const userConfig = isEmberClassicUsage ? config! : (appRootOrConfig as WarpDriveConfig);\n\n const isLegacySupport = (userConfig as unknown as { ___legacy_support?: boolean }).___legacy_support;\n const hasDeprecatedConfig = isLegacySupport && Object.keys(userConfig).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 // We don't want to print this just yet because we are going to re-arrange packages\n // and this would be come an import from @warp-drive/core. Better to not deprecate twice.\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, userConfig.debug);\n\n const env = getEnv(userConfig.forceMode);\n const DEPRECATIONS = getDeprecations(userConfig.compatWith || null, userConfig.deprecations);\n const FEATURES = getFeatures(env.PRODUCTION);\n\n const includeDataAdapterInProduction =\n typeof userConfig.includeDataAdapterInProduction === 'boolean' ? userConfig.includeDataAdapterInProduction : true;\n const includeDataAdapter = env.PRODUCTION ? includeDataAdapterInProduction : true;\n\n const finalizedConfig: InternalWarpDriveConfig = {\n debug: debugOptions,\n polyfillUUID: userConfig.polyfillUUID ?? false,\n includeDataAdapter,\n compatWith: userConfig.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","forceMode","FORCE_TESTING","FORCE_DEBUG","FORCE_PRODUCTION","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_NON_STRICT_TYPES","DEPRECATE_NON_STRICT_ID","DEPRECATE_COMPUTED_CHAINS","DEPRECATE_LEGACY_IMPORTS","DEPRECATE_NON_UNIQUE_PAYLOADS","DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE","DEPRECATE_MANY_ARRAY_DUPLICATES","DEPRECATE_STORE_EXTENDS_EMBER_OBJECT","ENABLE_LEGACY_SCHEMA_SERVICE","DEPRECATE_EMBER_INFLECTOR","DISABLE_7X_DEPRECATIONS","DEPRECATE_TRACKING_PACKAGE","deprecationIsResolved","deprecatedSince","compatVersion","semver","lte","minVersion","NextMajorVersion","deprecationIsNextMajorCycle","startsWith","getDeprecations","deprecations","flags","keys","Object","CURRENT_DEPRECATIONS","forEach","flag","isDeactivatedDeprecationNotice","flagState","isResolved","SAMPLE_FEATURE_FLAG","JSON_API_CACHE_VALIDATION_ERRORS","dirname","__dirname","fileURLToPath","relativePkgPath","path","join","version","JSON","parse","fs","readFileSync","isCanary","includes","getFeatures","isProd","features","assign","CURRENT_FEATURES","feature","featureValue","FEATURE_OVERRIDES","WARP_DRIVE_FEATURE_OVERRIDE","forcedFeatures","split","i","length","featureName","Error","LOG_CACHE","LOG_PAYLOADS","LOG_OPERATIONS","LOG_MUTATIONS","LOG_CACHE_POLICY","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","appRootOrConfig","isEmberClassicUsage","arguments","for","userConfig","isLegacySupport","___legacy_support","hasDeprecatedConfig","hasInitiatedConfig","globalConfig","debugOptions","DEPRECATIONS","compatWith","FEATURES","includeDataAdapterInProduction","includeDataAdapter","finalizedConfig","polyfillUUID","activeLogging","setGlobalConfig","import"],"mappings":";;;;;;;;;;;AAAO,SAASA,MAAMA,CAACC,SAA8D,EAOnF;AACA,EAAA,MAAMC,aAAa,GAAGD,SAAS,KAAK,SAAS,IAAIA,SAAS,KAAK,aAAa,IAAIA,SAAS,KAAK,OAAO;EACrG,MAAME,WAAW,GAAGF,SAAS,KAAK,aAAa,IAAIA,SAAS,KAAK,OAAO;AACxE,EAAA,MAAMG,gBAAgB,GAAGH,SAAS,KAAK,YAAY;EAEnD,MAAM;IAAEI,SAAS;IAAEC,UAAU;IAAEC,sBAAsB;IAAEC,QAAQ;IAAEC,EAAE;AAAEC,IAAAA;GAAc,GAAGC,OAAO,CAACC,GAAG;AACjG,EAAA,MAAMC,UAAU,GAAGT,gBAAgB,IAAIC,SAAS,KAAK,YAAY,IAAK,CAACA,SAAS,IAAIG,QAAQ,KAAK,YAAa;AAC9G,EAAA,MAAMM,KAAK,GAAGX,WAAW,IAAI,CAACU,UAAU;AACxC,EAAA,MAAME,OAAO,GAAGb,aAAa,IAAIY,KAAK,IAAIE,OAAO,CAACX,SAAS,KAAK,MAAM,IAAIC,UAAU,IAAIC,sBAAsB,CAAC;EAC/G,MAAMU,a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GC,MAAM,CAACD,IAAI,CAACE,oBAAoB,CAAsB;AACnE,EAAA,MAAMhB,uBAAuB,GAAGY,YAAY,EAAEZ,uBAAuB,IAAI,IAAI;AAE7Ec,EAAAA,IAAI,CAACG,OAAO,CAAEC,IAAI,IAAK;AACrB,IAAA,MAAMf,eAAe,GAAGa,oBAAoB,CAACE,IAAI,CAAC;AAClD,IAAA,MAAMC,8BAA8B,GAAGnB,uBAAuB,IAAIS,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,CAAE;OAClC,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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AAOH,QAAQ;AACjB;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,MAAMa,SAAkB,GAAG,KAAK;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAqB,GAAG,KAAK;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,cAAuB,GAAG,KAAK;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,aAAsB,GAAG,KAAK;;AAE3C;AACA;AACA;AACA;AACA;AACO,MAAMC,gBAAyB,GAAG,KAAK;;AAE9C;AACA;AACA;AACA;AACA;AACO,MAAMC,iBAA0B,GAAG,KAAK;AAC/C;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAqB,GAAG,KAAK;AAC1C;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,kBAA2B,GAAG,KAAK;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACO,MAAMC,eAAwB,GAAG,KAAK;AAC7C;AACA;AACA;AACA;AACA;AACO,MAAMC,SAAkB,GAAG,KAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,kBAA2B,GAAG,KAAK;AAChD;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,iBAA0B,GAAG,KAAK;AAC/C;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,gCAAyC,GAAG,KAAK;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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AAU,CAACQ,UAAU,IAAI,IAAI;AACzC9E,IAAAA,YAAY,EAAE6E,YAAY;AAC1BlD,IAAAA,QAAQ,EAAEoD,QAAQ;AAClBK,IAAAA,aAAa,EAAE9B,mBAAmB,CAACpF,GAAG,EAAE0G,YAAY,CAAC;AACrD1G,IAAAA;GACD;AAED6F,EAAAA,MAAM,CAACsB,eAAe,CAACC,SAAoB,EAAE,WAAW,EAAEJ,eAAe,CAAC;AAC5E;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,10 @@ import { fileURLToPath } from 'url';
|
|
|
6
6
|
import { C as CURRENT_FEATURES } from './canary-features-CuKgaVtX.js';
|
|
7
7
|
import { L as LOGGING } from './debugging-VdsvkNjX.js';
|
|
8
8
|
|
|
9
|
-
function getEnv() {
|
|
9
|
+
function getEnv(forceMode) {
|
|
10
|
+
const FORCE_TESTING = forceMode === 'testing' || forceMode === 'development' || forceMode === 'debug';
|
|
11
|
+
const FORCE_DEBUG = forceMode === 'development' || forceMode === 'debug';
|
|
12
|
+
const FORCE_PRODUCTION = forceMode === 'production';
|
|
10
13
|
const {
|
|
11
14
|
EMBER_ENV,
|
|
12
15
|
IS_TESTING,
|
|
@@ -15,9 +18,9 @@ function getEnv() {
|
|
|
15
18
|
CI,
|
|
16
19
|
IS_RECORDING
|
|
17
20
|
} = process.env;
|
|
18
|
-
const PRODUCTION = EMBER_ENV === 'production' || !EMBER_ENV && NODE_ENV === 'production';
|
|
19
|
-
const DEBUG = !PRODUCTION;
|
|
20
|
-
const TESTING = DEBUG || Boolean(EMBER_ENV === 'test' || IS_TESTING || EMBER_CLI_TEST_COMMAND);
|
|
21
|
+
const PRODUCTION = FORCE_PRODUCTION || EMBER_ENV === 'production' || !EMBER_ENV && NODE_ENV === 'production';
|
|
22
|
+
const DEBUG = FORCE_DEBUG || !PRODUCTION;
|
|
23
|
+
const TESTING = FORCE_TESTING || DEBUG || Boolean(EMBER_ENV === 'test' || IS_TESTING || EMBER_CLI_TEST_COMMAND);
|
|
21
24
|
const SHOULD_RECORD = Boolean(!CI || IS_RECORDING);
|
|
22
25
|
return {
|
|
23
26
|
TESTING,
|
|
@@ -259,7 +262,7 @@ function setConfig(context, appRootOrConfig, config) {
|
|
|
259
262
|
// }
|
|
260
263
|
|
|
261
264
|
const debugOptions = Object.assign({}, LOGGING, userConfig.debug);
|
|
262
|
-
const env = getEnv();
|
|
265
|
+
const env = getEnv(userConfig.forceMode);
|
|
263
266
|
const DEPRECATIONS = getDeprecations(userConfig.compatWith || null, userConfig.deprecations);
|
|
264
267
|
const FEATURES = getFeatures(env.PRODUCTION);
|
|
265
268
|
const includeDataAdapterInProduction = typeof userConfig.includeDataAdapterInProduction === 'boolean' ? userConfig.includeDataAdapterInProduction : true;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/-private/utils/get-env.ts","../src/deprecation-versions.ts","../src/-private/utils/deprecations.ts","../src/-private/utils/features.ts","../src/-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//\nexport const DEPRECATE_CATCH_ALL = '99.0';\nexport const DEPRECATE_NON_STRICT_TYPES = '5.3';\nexport const DEPRECATE_NON_STRICT_ID = '5.3';\nexport const DEPRECATE_COMPUTED_CHAINS = '7.0';\nexport const DEPRECATE_LEGACY_IMPORTS = '5.3';\nexport const DEPRECATE_NON_UNIQUE_PAYLOADS = '5.3';\nexport const DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE = '5.3';\nexport const DEPRECATE_MANY_ARRAY_DUPLICATES = '5.3';\nexport const DEPRECATE_STORE_EXTENDS_EMBER_OBJECT = '5.4';\nexport const ENABLE_LEGACY_SCHEMA_SERVICE = '5.4';\nexport const DEPRECATE_EMBER_INFLECTOR = '5.3';\nexport const DISABLE_7X_DEPRECATIONS = '7.0';\nexport const DEPRECATE_TRACKING_PACKAGE = '5.5';\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_7X_DEPRECATIONS = deprecations?.DISABLE_7X_DEPRECATIONS ?? true;\n\n keys.forEach((flag) => {\n const deprecatedSince = CURRENT_DEPRECATIONS[flag];\n const isDeactivatedDeprecationNotice = DISABLE_7X_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","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.WARP_DRIVE_FEATURE_OVERRIDE;\n if (FEATURE_OVERRIDES === 'ENABLE_ALL_OPTIONAL') {\n // enable all features with a current value of `null`\n for (const feature of keys) {\n let featureValue = features[feature];\n\n if (featureValue === null) {\n features[feature] = true;\n }\n }\n } else if (FEATURE_OVERRIDES === 'DISABLE_ALL') {\n // disable all features, including those with a value of `true`\n for (const feature of keys) {\n features[feature] = false;\n }\n } else if (FEATURE_OVERRIDES) {\n // enable only the specific features listed in the environment\n // variable (comma separated)\n const forcedFeatures = FEATURE_OVERRIDES.split(',');\n for (let i = 0; i < forcedFeatures.length; i++) {\n let featureName = forcedFeatures[i];\n\n if (!keys.includes(featureName as FEATURE)) {\n throw new Error(`Unknown feature flag: ${featureName}`);\n }\n\n features[featureName as FEATURE] = true;\n }\n }\n\n if (isProd) {\n // disable all features with a current value of `null`\n for (const feature of keys) {\n let featureValue = features[feature];\n\n if (featureValue === null) {\n features[feature] = false;\n }\n }\n }\n\n return features;\n}\n","import * 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","/**\n * This package provides a build-plugin that enables configuration of deprecations,\n * optional features, development/testing support and debug logging.\n *\n * This configuration is done using `setConfig` in `ember-cli-build`.\n *\n * ```ts [ember-cli-build.js]\n * 'use strict';\n *\n * const EmberApp = require('ember-cli/lib/broccoli/ember-app');\n *\n * module.exports = async function (defaults) {\n * const { setConfig } = await import('@warp-drive/build-config'); // [!code focus]\n *\n * const app = new EmberApp(defaults, {});\n *\n * setConfig(app, __dirname, { // [!code focus:3]\n * // settings here\n * });\n *\n * const { Webpack } = require('@embroider/webpack');\n * return require('@embroider/compat').compatBuild(app, Webpack, {});\n * };\n *\n * ```\n *\n * Available settings include:\n *\n * - {@link LOGGING | debugging}\n * - {@link DEPRECATIONS | deprecations}\n * - {@link FEATURES | features}\n * - {@link WarpDriveConfig.polyfillUUID | polyfillUUID}\n * - {@link WarpDriveConfig.includeDataAdapterInProduction | includeDataAdapterInProduction}\n * - {@link WarpDriveConfig.compatWith | compatWith}\n *\n *\n *\n * @module\n */\nimport 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 * as FEATURES from './canary-features.ts';\nimport type * as DEPRECATIONS from './deprecations.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\nexport type WarpDriveConfig = {\n /**\n * An object of key/value pairs of logging flags\n *\n * see {@link LOGGING | debugging} for the available flags.\n *\n * ```ts\n * {\n * LOG_CACHE: true,\n * }\n * ```\n *\n * @public\n */\n debug?: Partial<InternalWarpDriveConfig['debug']>;\n\n /**\n * If you are using the library in an environment that does not\n * support `window.crypto.randomUUID` you can enable a polyfill\n * for it.\n *\n * @public\n */\n polyfillUUID?: boolean;\n\n /**\n * By default, the integration required to support the ember-inspector\n * browser extension is included in production builds only when using\n * the `ember-data` package.\n *\n * Otherwise the default is to exclude it. This setting allows to explicitly\n * enable/disable it in production builds.\n *\n * @public\n */\n includeDataAdapterInProduction?: boolean;\n\n /**\n * The most recent version of the library from which all\n * deprecations have been resolved.\n *\n * For instance if all deprecations released prior to or\n * within `5.3` have been resolved, then setting this to\n * `5.3` will remove all the support for the deprecated\n * features for associated deprecations.\n *\n * See {@link DEPRECATIONS | deprecations} for more details.\n */\n compatWith?: `${number}.${number}`;\n\n /**\n * An object of key/value pairs of logging flags\n *\n * see {@link DEPRECATIONS | deprecations} for the available flags.\n *\n * ```ts\n * {\n * DEPRECATE_THING: false,\n * }\n * ```\n *\n * @public\n */\n deprecations?: Partial<InternalWarpDriveConfig['deprecations']>;\n\n /**\n * An object of key/value pairs of canary feature flags\n * for use when testing new features gated behind a flag\n * in a canary release version.\n *\n * see {@link FEATURES | features} for the available flags.\n *\n * ```ts\n * {\n * FEATURE_A: true,\n * }\n * ```\n *\n * @public\n */\n features?: Partial<InternalWarpDriveConfig['features']>;\n};\n\ntype InternalWarpDriveConfig = {\n debug: typeof LOGGING;\n polyfillUUID: boolean;\n includeDataAdapter: boolean;\n compatWith: `${number}.${number}` | null;\n deprecations: ReturnType<typeof getDeprecations>;\n features: ReturnType<typeof getFeatures>;\n activeLogging: typeof LOGGING;\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(macros: object, config: WarpDriveConfig): void;\nexport function setConfig(context: object, appRoot: string, config: WarpDriveConfig): void;\nexport function setConfig(context: object, appRootOrConfig: string | WarpDriveConfig, config?: WarpDriveConfig): void {\n const isEmberClassicUsage = arguments.length === 3;\n const macros = recastMacrosConfig(\n isEmberClassicUsage ? _MacrosConfig.for(context, appRootOrConfig as string) : context\n );\n\n const userConfig = isEmberClassicUsage ? config! : (appRootOrConfig as WarpDriveConfig);\n\n const isLegacySupport = (userConfig as unknown as { ___legacy_support?: boolean }).___legacy_support;\n const hasDeprecatedConfig = isLegacySupport && Object.keys(userConfig).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 // We don't want to print this just yet because we are going to re-arrange packages\n // and this would be come an import from @warp-drive/core. Better to not deprecate twice.\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, userConfig.debug);\n\n const env = getEnv();\n const DEPRECATIONS = getDeprecations(userConfig.compatWith || null, userConfig.deprecations);\n const FEATURES = getFeatures(env.PRODUCTION);\n\n const includeDataAdapterInProduction =\n typeof userConfig.includeDataAdapterInProduction === 'boolean' ? userConfig.includeDataAdapterInProduction : true;\n const includeDataAdapter = env.PRODUCTION ? includeDataAdapterInProduction : true;\n\n const finalizedConfig: InternalWarpDriveConfig = {\n debug: debugOptions,\n polyfillUUID: userConfig.polyfillUUID ?? false,\n includeDataAdapter,\n compatWith: userConfig.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_NON_STRICT_TYPES","DEPRECATE_NON_STRICT_ID","DEPRECATE_COMPUTED_CHAINS","DEPRECATE_LEGACY_IMPORTS","DEPRECATE_NON_UNIQUE_PAYLOADS","DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE","DEPRECATE_MANY_ARRAY_DUPLICATES","DEPRECATE_STORE_EXTENDS_EMBER_OBJECT","ENABLE_LEGACY_SCHEMA_SERVICE","DEPRECATE_EMBER_INFLECTOR","DISABLE_7X_DEPRECATIONS","DEPRECATE_TRACKING_PACKAGE","deprecationIsResolved","deprecatedSince","compatVersion","semver","lte","minVersion","NextMajorVersion","deprecationIsNextMajorCycle","startsWith","getDeprecations","deprecations","flags","keys","Object","CURRENT_DEPRECATIONS","forEach","flag","isDeactivatedDeprecationNotice","flagState","isResolved","dirname","__dirname","fileURLToPath","relativePkgPath","path","join","version","JSON","parse","fs","readFileSync","isCanary","includes","getFeatures","isProd","features","assign","CURRENT_FEATURES","feature","featureValue","FEATURE_OVERRIDES","WARP_DRIVE_FEATURE_OVERRIDE","forcedFeatures","split","i","length","featureName","Error","createLoggingConfig","debug","config","LOGGING","key","_MacrosConfig","EmbroiderMacros","MacrosConfig","recastMacrosConfig","macros","setConfig","context","appRootOrConfig","isEmberClassicUsage","arguments","for","userConfig","isLegacySupport","___legacy_support","hasDeprecatedConfig","hasInitiatedConfig","globalConfig","debugOptions","DEPRECATIONS","compatWith","FEATURES","includeDataAdapterInProduction","includeDataAdapter","finalizedConfig","polyfillUUID","activeLogging","setGlobalConfig","import","meta","filename"],"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,YA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M,CAACuB,MAAM,CAAC,EAAE,EAAEe,OAAO,EAAEa,UAAU,CAACf,KAAK,CAAC;AAEnG,EAAA,MAAMrE,GAAG,GAAGR,MAAM,EAAE;AACpB,EAAA,MAAMmG,YAAY,GAAG9D,eAAe,CAACuD,UAAU,CAACQ,UAAU,IAAI,IAAI,EAAER,UAAU,CAACtD,YAAY,CAAC;AAC5F,EAAA,MAAM+D,QAAQ,GAAGxC,WAAW,CAACrD,GAAG,CAACC,UAAU,CAAC;AAE5C,EAAA,MAAM6F,8BAA8B,GAClC,OAAOV,UAAU,CAACU,8BAA8B,KAAK,SAAS,GAAGV,UAAU,CAACU,8BAA8B,GAAG,IAAI;EACnH,MAAMC,kBAAkB,GAAG/F,GAAG,CAACC,UAAU,GAAG6F,8BAA8B,GAAG,IAAI;AAEjF,EAAA,MAAME,eAAwC,GAAG;AAC/C3B,IAAAA,KAAK,EAAEqB,YAAY;AACnBO,IAAAA,YAAY,EAAEb,UAAU,CAACa,YAAY,IAAI,KAAK;IAC9CF,kBAAkB;AAClBH,IAAAA,UAAU,EAAER,UAAU,CAACQ,UAAU,IAAI,IAAI;AACzC9D,IAAAA,YAAY,EAAE6D,YAAY;AAC1BpC,IAAAA,QAAQ,EAAEsC,QAAQ;AAClBK,IAAAA,aAAa,EAAE9B,mBAAmB,CAACpE,GAAG,EAAE0F,YAAY,CAAC;AACrD1F,IAAAA;GACD;AAED6E,EAAAA,MAAM,CAACsB,eAAe,CAACC,MAAM,CAACC,IAAI,CAACC,QAAQ,EAAE,WAAW,EAAEN,eAAe,CAAC;AAC5E;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/-private/utils/get-env.ts","../src/deprecation-versions.ts","../src/-private/utils/deprecations.ts","../src/-private/utils/features.ts","../src/-private/utils/logging.ts","../src/index.ts"],"sourcesContent":["export function getEnv(forceMode?: 'testing' | 'production' | 'development' | 'debug'): {\n TESTING: boolean;\n PRODUCTION: boolean;\n DEBUG: boolean;\n IS_RECORDING: boolean;\n IS_CI: boolean;\n SHOULD_RECORD: boolean;\n} {\n const FORCE_TESTING = forceMode === 'testing' || forceMode === 'development' || forceMode === 'debug';\n const FORCE_DEBUG = forceMode === 'development' || forceMode === 'debug';\n const FORCE_PRODUCTION = forceMode === 'production';\n\n const { EMBER_ENV, IS_TESTING, EMBER_CLI_TEST_COMMAND, NODE_ENV, CI, IS_RECORDING } = process.env;\n const PRODUCTION = FORCE_PRODUCTION || EMBER_ENV === 'production' || (!EMBER_ENV && NODE_ENV === 'production');\n const DEBUG = FORCE_DEBUG || !PRODUCTION;\n const TESTING = FORCE_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//\nexport const DEPRECATE_CATCH_ALL = '99.0';\nexport const DEPRECATE_NON_STRICT_TYPES = '5.3';\nexport const DEPRECATE_NON_STRICT_ID = '5.3';\nexport const DEPRECATE_COMPUTED_CHAINS = '7.0';\nexport const DEPRECATE_LEGACY_IMPORTS = '5.3';\nexport const DEPRECATE_NON_UNIQUE_PAYLOADS = '5.3';\nexport const DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE = '5.3';\nexport const DEPRECATE_MANY_ARRAY_DUPLICATES = '5.3';\nexport const DEPRECATE_STORE_EXTENDS_EMBER_OBJECT = '5.4';\nexport const ENABLE_LEGACY_SCHEMA_SERVICE = '5.4';\nexport const DEPRECATE_EMBER_INFLECTOR = '5.3';\nexport const DISABLE_7X_DEPRECATIONS = '7.0';\nexport const DEPRECATE_TRACKING_PACKAGE = '5.5';\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_7X_DEPRECATIONS = deprecations?.DISABLE_7X_DEPRECATIONS ?? true;\n\n keys.forEach((flag) => {\n const deprecatedSince = CURRENT_DEPRECATIONS[flag];\n const isDeactivatedDeprecationNotice = DISABLE_7X_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","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.WARP_DRIVE_FEATURE_OVERRIDE;\n if (FEATURE_OVERRIDES === 'ENABLE_ALL_OPTIONAL') {\n // enable all features with a current value of `null`\n for (const feature of keys) {\n let featureValue = features[feature];\n\n if (featureValue === null) {\n features[feature] = true;\n }\n }\n } else if (FEATURE_OVERRIDES === 'DISABLE_ALL') {\n // disable all features, including those with a value of `true`\n for (const feature of keys) {\n features[feature] = false;\n }\n } else if (FEATURE_OVERRIDES) {\n // enable only the specific features listed in the environment\n // variable (comma separated)\n const forcedFeatures = FEATURE_OVERRIDES.split(',');\n for (let i = 0; i < forcedFeatures.length; i++) {\n let featureName = forcedFeatures[i];\n\n if (!keys.includes(featureName as FEATURE)) {\n throw new Error(`Unknown feature flag: ${featureName}`);\n }\n\n features[featureName as FEATURE] = true;\n }\n }\n\n if (isProd) {\n // disable all features with a current value of `null`\n for (const feature of keys) {\n let featureValue = features[feature];\n\n if (featureValue === null) {\n features[feature] = false;\n }\n }\n }\n\n return features;\n}\n","import * 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","/**\n * This package provides a build-plugin that enables configuration of deprecations,\n * optional features, development/testing support and debug logging.\n *\n * This configuration is done using `setConfig` in `ember-cli-build`.\n *\n * ```ts [ember-cli-build.js]\n * 'use strict';\n *\n * const EmberApp = require('ember-cli/lib/broccoli/ember-app');\n *\n * module.exports = async function (defaults) {\n * const { setConfig } = await import('@warp-drive/build-config'); // [!code focus]\n *\n * const app = new EmberApp(defaults, {});\n *\n * setConfig(app, __dirname, { // [!code focus:3]\n * // settings here\n * });\n *\n * const { Webpack } = require('@embroider/webpack');\n * return require('@embroider/compat').compatBuild(app, Webpack, {});\n * };\n *\n * ```\n *\n * Available settings include:\n *\n * - {@link LOGGING | debugging}\n * - {@link DEPRECATIONS | deprecations}\n * - {@link FEATURES | features}\n * - {@link WarpDriveConfig.polyfillUUID | polyfillUUID}\n * - {@link WarpDriveConfig.includeDataAdapterInProduction | includeDataAdapterInProduction}\n * - {@link WarpDriveConfig.compatWith | compatWith}\n *\n *\n *\n * @module\n */\nimport 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 * as FEATURES from './canary-features.ts';\nimport type * as DEPRECATIONS from './deprecations.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\nexport type WarpDriveConfig = {\n /**\n * An object of key/value pairs of logging flags\n *\n * see {@link LOGGING | debugging} for the available flags.\n *\n * ```ts\n * {\n * LOG_CACHE: true,\n * }\n * ```\n *\n * @public\n */\n debug?: Partial<InternalWarpDriveConfig['debug']>;\n\n /**\n * If you are using the library in an environment that does not\n * support `window.crypto.randomUUID` you can enable a polyfill\n * for it.\n *\n * @public\n */\n polyfillUUID?: boolean;\n\n /**\n * By default, the integration required to support the ember-inspector\n * browser extension is included in production builds only when using\n * the `ember-data` package.\n *\n * Otherwise the default is to exclude it. This setting allows to explicitly\n * enable/disable it in production builds.\n *\n * @public\n */\n includeDataAdapterInProduction?: boolean;\n\n /**\n * The most recent version of the library from which all\n * deprecations have been resolved.\n *\n * For instance if all deprecations released prior to or\n * within `5.3` have been resolved, then setting this to\n * `5.3` will remove all the support for the deprecated\n * features for associated deprecations.\n *\n * See {@link DEPRECATIONS | deprecations} for more details.\n */\n compatWith?: `${number}.${number}`;\n\n /**\n * An object of key/value pairs of logging flags\n *\n * see {@link DEPRECATIONS | deprecations} for the available flags.\n *\n * ```ts\n * {\n * DEPRECATE_THING: false,\n * }\n * ```\n *\n * @public\n */\n deprecations?: Partial<InternalWarpDriveConfig['deprecations']>;\n\n /**\n * An object of key/value pairs of canary feature flags\n * for use when testing new features gated behind a flag\n * in a canary release version.\n *\n * see {@link FEATURES | features} for the available flags.\n *\n * ```ts\n * {\n * FEATURE_A: true,\n * }\n * ```\n *\n * @public\n */\n features?: Partial<InternalWarpDriveConfig['features']>;\n\n /**\n * @private\n */\n forceMode?: 'testing' | 'production' | 'development';\n};\n\ntype InternalWarpDriveConfig = {\n debug: typeof LOGGING;\n polyfillUUID: boolean;\n includeDataAdapter: boolean;\n compatWith: `${number}.${number}` | null;\n deprecations: ReturnType<typeof getDeprecations>;\n features: ReturnType<typeof getFeatures>;\n activeLogging: typeof LOGGING;\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(macros: object, config: WarpDriveConfig): void;\nexport function setConfig(context: object, appRoot: string, config: WarpDriveConfig): void;\nexport function setConfig(context: object, appRootOrConfig: string | WarpDriveConfig, config?: WarpDriveConfig): void {\n const isEmberClassicUsage = arguments.length === 3;\n const macros = recastMacrosConfig(\n isEmberClassicUsage ? _MacrosConfig.for(context, appRootOrConfig as string) : context\n );\n\n const userConfig = isEmberClassicUsage ? config! : (appRootOrConfig as WarpDriveConfig);\n\n const isLegacySupport = (userConfig as unknown as { ___legacy_support?: boolean }).___legacy_support;\n const hasDeprecatedConfig = isLegacySupport && Object.keys(userConfig).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 // We don't want to print this just yet because we are going to re-arrange packages\n // and this would be come an import from @warp-drive/core. Better to not deprecate twice.\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, userConfig.debug);\n\n const env = getEnv(userConfig.forceMode);\n const DEPRECATIONS = getDeprecations(userConfig.compatWith || null, userConfig.deprecations);\n const FEATURES = getFeatures(env.PRODUCTION);\n\n const includeDataAdapterInProduction =\n typeof userConfig.includeDataAdapterInProduction === 'boolean' ? userConfig.includeDataAdapterInProduction : true;\n const includeDataAdapter = env.PRODUCTION ? includeDataAdapterInProduction : true;\n\n const finalizedConfig: InternalWarpDriveConfig = {\n debug: debugOptions,\n polyfillUUID: userConfig.polyfillUUID ?? false,\n includeDataAdapter,\n compatWith: userConfig.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","forceMode","FORCE_TESTING","FORCE_DEBUG","FORCE_PRODUCTION","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_NON_STRICT_TYPES","DEPRECATE_NON_STRICT_ID","DEPRECATE_COMPUTED_CHAINS","DEPRECATE_LEGACY_IMPORTS","DEPRECATE_NON_UNIQUE_PAYLOADS","DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE","DEPRECATE_MANY_ARRAY_DUPLICATES","DEPRECATE_STORE_EXTENDS_EMBER_OBJECT","ENABLE_LEGACY_SCHEMA_SERVICE","DEPRECATE_EMBER_INFLECTOR","DISABLE_7X_DEPRECATIONS","DEPRECATE_TRACKING_PACKAGE","deprecationIsResolved","deprecatedSince","compatVersion","semver","lte","minVersion","NextMajorVersion","deprecationIsNextMajorCycle","startsWith","getDeprecations","deprecations","flags","keys","Object","CURRENT_DEPRECATIONS","forEach","flag","isDeactivatedDeprecationNotice","flagState","isResolved","dirname","__dirname","fileURLToPath","relativePkgPath","path","join","version","JSON","parse","fs","readFileSync","isCanary","includes","getFeatures","isProd","features","assign","CURRENT_FEATURES","feature","featureValue","FEATURE_OVERRIDES","WARP_DRIVE_FEATURE_OVERRIDE","forcedFeatures","split","i","length","featureName","Error","createLoggingConfig","debug","config","LOGGING","key","_MacrosConfig","EmbroiderMacros","MacrosConfig","recastMacrosConfig","macros","setConfig","context","appRootOrConfig","isEmberClassicUsage","arguments","for","userConfig","isLegacySupport","___legacy_support","hasDeprecatedConfig","hasInitiatedConfig","globalConfig","debugOptions","DEPRECATIONS","compatWith","FEATURES","includeDataAdapterInProduction","includeDataAdapter","finalizedConfig","polyfillUUID","activeLogging","setGlobalConfig","import","meta","filename"],"mappings":";;;;;;;;AAAO,SAASA,MAAMA,CAACC,SAA8D,EAOnF;AACA,EAAA,MAAMC,aAAa,GAAGD,SAAS,KAAK,SAAS,IAAIA,SAAS,KAAK,aAAa,IAAIA,SAAS,KAAK,OAAO;EACrG,MAAME,WAAW,GAAGF,SAAS,KAAK,aAAa,IAAIA,SAAS,KAAK,OAAO;AACxE,EAAA,MAAMG,gBAAgB,GAAGH,SAAS,KAAK,YAAY;EAEnD,MAAM;IAAEI,SAAS;IAAEC,UAAU;IAAEC,sBAAsB;IAAEC,QAAQ;IAAEC,EAAE;AAAEC,IAAAA;GAAc,GAAGC,OAAO,CAACC,GAAG;AACjG,EAAA,MAAMC,UAAU,GAAGT,gBAAgB,IAAIC,SAAS,KAAK,YAAY,IAAK,CAACA,SAAS,IAAIG,QAAQ,KAAK,YAAa;AAC9G,EAAA,MAAMM,KAAK,GAAGX,WAAW,IAAI,CAACU,UAAU;AACxC,EAAA,MAAME,OAAO,GAAGb,aAAa,IAAIY,KAAK,IAAIE,OAAO,CAACX,SAAS,KAAK,MAAM,IA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MsG,YAAY,GAAG9D,eAAe,CAACuD,UAAU,CAACQ,UAAU,IAAI,IAAI,EAAER,UAAU,CAACtD,YAAY,CAAC;AAC5F,EAAA,MAAM+D,QAAQ,GAAGxC,WAAW,CAACrD,GAAG,CAACC,UAAU,CAAC;AAE5C,EAAA,MAAM6F,8BAA8B,GAClC,OAAOV,UAAU,CAACU,8BAA8B,KAAK,SAAS,GAAGV,UAAU,CAACU,8BAA8B,GAAG,IAAI;EACnH,MAAMC,kBAAkB,GAAG/F,GAAG,CAACC,UAAU,GAAG6F,8BAA8B,GAAG,IAAI;AAEjF,EAAA,MAAME,eAAwC,GAAG;AAC/C3B,IAAAA,KAAK,EAAEqB,YAAY;AACnBO,IAAAA,YAAY,EAAEb,UAAU,CAACa,YAAY,IAAI,KAAK;IAC9CF,kBAAkB;AAClBH,IAAAA,UAAU,EAAER,UAAU,CAACQ,UAAU,IAAI,IAAI;AACzC9D,IAAAA,YAAY,EAAE6D,YAAY;AAC1BpC,IAAAA,QAAQ,EAAEsC,QAAQ;AAClBK,IAAAA,aAAa,EAAE9B,mBAAmB,CAACpE,GAAG,EAAE0F,YAAY,CAAC;AACrD1F,IAAAA;GACD;AAED6E,EAAAA,MAAM,CAACsB,eAAe,CAACC,MAAM,CAACC,IAAI,CAACC,QAAQ,EAAE,WAAW,EAAEN,eAAe,CAAC;AAC5E;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warp-drive/build-config",
|
|
3
|
-
"version": "5.6.0-alpha.
|
|
3
|
+
"version": "5.6.0-alpha.13",
|
|
4
4
|
"description": "Provides Build Configuration for projects using WarpDrive or EmberData",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-data",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"semver": "^7.7.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@warp-drive/internal-config": "5.6.0-alpha.
|
|
45
|
+
"@warp-drive/internal-config": "5.6.0-alpha.13",
|
|
46
46
|
"@types/babel__core": "^7.20.5",
|
|
47
47
|
"@types/node": "^20.17.32",
|
|
48
48
|
"@babel/plugin-transform-typescript": "^7.27.0",
|