ember-source 7.2.0-alpha.1 → 7.2.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/blueprints/acceptance-test/index.js +7 -9
  2. package/blueprints/component/index.js +8 -10
  3. package/blueprints/component-addon/index.js +5 -7
  4. package/blueprints/component-class/index.js +6 -8
  5. package/blueprints/component-class-addon/index.js +5 -7
  6. package/blueprints/component-test/index.js +7 -9
  7. package/blueprints/controller/index.js +2 -4
  8. package/blueprints/controller-test/index.js +5 -7
  9. package/blueprints/helper/index.js +3 -5
  10. package/blueprints/helper-addon/index.js +2 -2
  11. package/blueprints/helper-test/index.js +4 -6
  12. package/blueprints/initializer/index.js +2 -4
  13. package/blueprints/initializer-addon/index.js +2 -2
  14. package/blueprints/initializer-test/index.js +5 -7
  15. package/blueprints/instance-initializer/index.js +2 -4
  16. package/blueprints/instance-initializer-addon/index.js +2 -2
  17. package/blueprints/instance-initializer-test/index.js +5 -7
  18. package/blueprints/mixin/index.js +1 -3
  19. package/blueprints/mixin-test/index.js +2 -4
  20. package/blueprints/route/index.js +8 -10
  21. package/blueprints/route-addon/index.js +4 -6
  22. package/blueprints/route-test/index.js +5 -7
  23. package/blueprints/service/index.js +2 -4
  24. package/blueprints/service-test/index.js +3 -5
  25. package/blueprints/template/index.js +1 -3
  26. package/blueprints/util/index.js +2 -4
  27. package/blueprints/util-test/index.js +4 -6
  28. package/build-metadata.json +3 -3
  29. package/dist/dev/packages/@ember/engine/index.js +10 -0
  30. package/dist/dev/packages/@ember/engine/lib/strict-resolver.js +122 -0
  31. package/dist/dev/packages/ember/version.js +1 -1
  32. package/dist/prod/packages/@ember/engine/index.js +10 -0
  33. package/dist/prod/packages/@ember/engine/lib/strict-resolver.js +118 -0
  34. package/dist/prod/packages/ember/version.js +1 -1
  35. package/docs/data.json +28 -17
  36. package/lib/{index.js → index.cjs} +2 -2
  37. package/package.json +11 -9
  38. package/types/stable/@ember/engine/index.d.ts +9 -0
  39. package/types/stable/@ember/engine/lib/strict-resolver.d.ts +16 -0
  40. package/types/stable/index.d.ts +1 -0
  41. /package/lib/{browsers.js → browsers.cjs} +0 -0
  42. /package/lib/{overrides.js → overrides.cjs} +0 -0
@@ -1,14 +1,12 @@
1
- 'use strict';
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import pathUtil from 'ember-cli-path-utils';
4
+ import stringUtils from 'ember-cli-string-utils';
2
5
 
3
- const fs = require('fs');
4
- const path = require('path');
5
- const pathUtil = require('ember-cli-path-utils');
6
- const stringUtils = require('ember-cli-string-utils');
6
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
7
+ import { modulePrefixForProject } from '../-utils.js';
7
8
 
8
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
9
- const { modulePrefixForProject } = require('../-utils');
10
-
11
- module.exports = {
9
+ export default {
12
10
  description: 'Generates an acceptance test for a feature.',
13
11
 
14
12
  shouldTransformTypeScript: true,
@@ -1,16 +1,14 @@
1
- 'use strict';
1
+ import chalk from 'chalk';
2
+ import stringUtil from 'ember-cli-string-utils';
3
+ import getPathOption from 'ember-cli-get-component-path-option';
4
+ import normalizeEntityName from 'ember-cli-normalize-entity-name';
5
+ import SilentError from 'silent-error';
6
+ import { generateComponentSignature } from '../-utils.js';
2
7
 
3
- const chalk = require('chalk');
4
- const stringUtil = require('ember-cli-string-utils');
5
- const getPathOption = require('ember-cli-get-component-path-option');
6
- const normalizeEntityName = require('ember-cli-normalize-entity-name');
7
- const SilentError = require('silent-error');
8
- const { generateComponentSignature } = require('../-utils');
9
-
10
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
8
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
11
9
 
12
10
  // intentionally avoiding use-edition-detector
13
- module.exports = {
11
+ export default {
14
12
  description: 'Generates a component.',
15
13
 
16
14
  shouldTransformTypeScript: true,
@@ -1,11 +1,9 @@
1
- 'use strict';
1
+ import path from 'node:path';
2
+ import stringUtil from 'ember-cli-string-utils';
3
+ import getPathOption from 'ember-cli-get-component-path-option';
4
+ import normalizeEntityName from 'ember-cli-normalize-entity-name';
2
5
 
3
- const path = require('path');
4
- const stringUtil = require('ember-cli-string-utils');
5
- const getPathOption = require('ember-cli-get-component-path-option');
6
- const normalizeEntityName = require('ember-cli-normalize-entity-name');
7
-
8
- module.exports = {
6
+ export default {
9
7
  description: 'Generates a component.',
10
8
 
11
9
  fileMapTokens: function () {
@@ -1,14 +1,12 @@
1
- 'use strict';
1
+ import stringUtil from 'ember-cli-string-utils';
2
+ import getPathOption from 'ember-cli-get-component-path-option';
3
+ import normalizeEntityName from 'ember-cli-normalize-entity-name';
4
+ import { generateComponentSignature } from '../-utils.js';
2
5
 
3
- const stringUtil = require('ember-cli-string-utils');
4
- const getPathOption = require('ember-cli-get-component-path-option');
5
- const normalizeEntityName = require('ember-cli-normalize-entity-name');
6
- const { generateComponentSignature } = require('../-utils');
7
-
8
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
6
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
9
7
 
10
8
  // intentionally avoiding use-edition-detector
11
- module.exports = {
9
+ export default {
12
10
  description: 'Generates a component class.',
13
11
 
14
12
  shouldTransformTypeScript: true,
@@ -1,11 +1,9 @@
1
- 'use strict';
1
+ import path from 'node:path';
2
+ import stringUtil from 'ember-cli-string-utils';
3
+ import getPathOption from 'ember-cli-get-component-path-option';
4
+ import normalizeEntityName from 'ember-cli-normalize-entity-name';
2
5
 
3
- const path = require('path');
4
- const stringUtil = require('ember-cli-string-utils');
5
- const getPathOption = require('ember-cli-get-component-path-option');
6
- const normalizeEntityName = require('ember-cli-normalize-entity-name');
7
-
8
- module.exports = {
6
+ export default {
9
7
  description: 'Generates a component class.',
10
8
 
11
9
  fileMapTokens: function () {
@@ -1,12 +1,10 @@
1
- 'use strict';
1
+ import path from 'node:path';
2
+ import stringUtil from 'ember-cli-string-utils';
3
+ import getPathOption from 'ember-cli-get-component-path-option';
4
+ import semver from 'semver';
2
5
 
3
- const path = require('path');
4
- const stringUtil = require('ember-cli-string-utils');
5
- const getPathOption = require('ember-cli-get-component-path-option');
6
- const semver = require('semver');
7
-
8
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
9
- const { modulePrefixForProject } = require('../-utils');
6
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
7
+ import { modulePrefixForProject } from '../-utils.js';
10
8
 
11
9
  function invocationFor(options) {
12
10
  let parts = options.entity.name.split('/');
@@ -19,7 +17,7 @@ function invocationForStrictComponentAuthoringFormat(options) {
19
17
  return stringUtil.classify(componentName);
20
18
  }
21
19
 
22
- module.exports = {
20
+ export default {
23
21
  description: 'Generates a component integration or unit test.',
24
22
 
25
23
  shouldTransformTypeScript: true,
@@ -1,8 +1,6 @@
1
- 'use strict';
1
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
2
2
 
3
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
4
-
5
- module.exports = {
3
+ export default {
6
4
  description: 'Generates a controller.',
7
5
 
8
6
  shouldTransformTypeScript: true,
@@ -1,13 +1,11 @@
1
- 'use strict';
1
+ import stringUtil from 'ember-cli-string-utils';
2
2
 
3
- const stringUtil = require('ember-cli-string-utils');
3
+ import path from 'node:path';
4
4
 
5
- const path = require('path');
5
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
6
+ import { modulePrefixForProject } from '../-utils.js';
6
7
 
7
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
8
- const { modulePrefixForProject } = require('../-utils');
9
-
10
- module.exports = {
8
+ export default {
11
9
  description: 'Generates a controller unit test.',
12
10
 
13
11
  shouldTransformTypeScript: true,
@@ -1,10 +1,8 @@
1
- 'use strict';
1
+ import normalizeEntityName from 'ember-cli-normalize-entity-name';
2
2
 
3
- const normalizeEntityName = require('ember-cli-normalize-entity-name');
3
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
4
4
 
5
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
6
-
7
- module.exports = {
5
+ export default {
8
6
  description: 'Generates a helper function.',
9
7
 
10
8
  shouldTransformTypeScript: true,
@@ -1,3 +1,3 @@
1
- 'use strict';
1
+ import addonImport from '../-addon-import.js';
2
2
 
3
- module.exports = require('../-addon-import');
3
+ export default addonImport;
@@ -1,11 +1,9 @@
1
- 'use strict';
1
+ import semver from 'semver';
2
2
 
3
- const semver = require('semver');
3
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
4
+ import { modulePrefixForProject } from '../-utils.js';
4
5
 
5
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
6
- const { modulePrefixForProject } = require('../-utils');
7
-
8
- module.exports = {
6
+ export default {
9
7
  description: 'Generates a helper integration test.',
10
8
 
11
9
  shouldTransformTypeScript: true,
@@ -1,8 +1,6 @@
1
- 'use strict';
1
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
2
2
 
3
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
4
-
5
- module.exports = {
3
+ export default {
6
4
  description: 'Generates an initializer.',
7
5
 
8
6
  shouldTransformTypeScript: true,
@@ -1,3 +1,3 @@
1
- 'use strict';
1
+ import addonImport from '../-addon-import.js';
2
2
 
3
- module.exports = require('../-addon-import');
3
+ export default addonImport;
@@ -1,12 +1,10 @@
1
- 'use strict';
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
2
3
 
3
- const fs = require('fs');
4
- const path = require('path');
4
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
5
+ import { modulePrefixForProject } from '../-utils.js';
5
6
 
6
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
7
- const { modulePrefixForProject } = require('../-utils');
8
-
9
- module.exports = {
7
+ export default {
10
8
  description: 'Generates an initializer unit test.',
11
9
 
12
10
  shouldTransformTypeScript: true,
@@ -1,8 +1,6 @@
1
- 'use strict';
1
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
2
2
 
3
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
4
-
5
- module.exports = {
3
+ export default {
6
4
  shouldTransformTypeScript: true,
7
5
 
8
6
  description: 'Generates an instance initializer.',
@@ -1,3 +1,3 @@
1
- 'use strict';
1
+ import addonImport from '../-addon-import.js';
2
2
 
3
- module.exports = require('../-addon-import');
3
+ export default addonImport;
@@ -1,12 +1,10 @@
1
- 'use strict';
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
2
3
 
3
- const fs = require('fs');
4
- const path = require('path');
4
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
5
+ import { modulePrefixForProject } from '../-utils.js';
5
6
 
6
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
7
- const { modulePrefixForProject } = require('../-utils');
8
-
9
- module.exports = {
7
+ export default {
10
8
  description: 'Generates an instance initializer unit test.',
11
9
 
12
10
  shouldTransformTypeScript: true,
@@ -1,6 +1,4 @@
1
- 'use strict';
2
-
3
- module.exports = {
1
+ export default {
4
2
  description: 'Generates a mixin.',
5
3
  normalizeEntityName: function (entityName) {
6
4
  return entityName.replace(/\.js$/, ''); //Prevent generation of ".js.js" files
@@ -1,8 +1,6 @@
1
- 'use strict';
1
+ import path from 'node:path';
2
2
 
3
- const path = require('path');
4
-
5
- module.exports = {
3
+ export default {
6
4
  description: 'Generates a mixin unit test.',
7
5
 
8
6
  fileMapTokens() {
@@ -1,15 +1,13 @@
1
- 'use strict';
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import chalk from 'chalk';
4
+ import stringUtil from 'ember-cli-string-utils';
5
+ import EmberRouterGenerator from 'ember-router-generator';
6
+ import SilentError from 'silent-error';
2
7
 
3
- const fs = require('fs');
4
- const path = require('path');
5
- const chalk = require('chalk');
6
- const stringUtil = require('ember-cli-string-utils');
7
- const EmberRouterGenerator = require('ember-router-generator');
8
- const SilentError = require('silent-error');
8
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
9
9
 
10
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
11
-
12
- module.exports = {
10
+ export default {
13
11
  description: 'Generates a route and a template, and registers the route with the router.',
14
12
 
15
13
  shouldTransformTypeScript: true,
@@ -1,10 +1,8 @@
1
- 'use strict';
1
+ import path from 'node:path';
2
+ import stringUtil from 'ember-cli-string-utils';
3
+ import inflector from 'inflection';
2
4
 
3
- const path = require('path');
4
- const stringUtil = require('ember-cli-string-utils');
5
- const inflector = require('inflection');
6
-
7
- module.exports = {
5
+ export default {
8
6
  description: 'Generates import wrappers for a route and its template.',
9
7
 
10
8
  fileMapTokens: function () {
@@ -1,12 +1,10 @@
1
- 'use strict';
1
+ import path from 'node:path';
2
+ import stringUtil from 'ember-cli-string-utils';
2
3
 
3
- const path = require('path');
4
- const stringUtil = require('ember-cli-string-utils');
4
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
5
+ import { modulePrefixForProject } from '../-utils.js';
5
6
 
6
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
7
- const { modulePrefixForProject } = require('../-utils');
8
-
9
- module.exports = {
7
+ export default {
10
8
  description: 'Generates a route unit test.',
11
9
 
12
10
  shouldTransformTypeScript: true,
@@ -1,8 +1,6 @@
1
- 'use strict';
1
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
2
2
 
3
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
4
-
5
- module.exports = {
3
+ export default {
6
4
  description: 'Generates a service.',
7
5
 
8
6
  shouldTransformTypeScript: true,
@@ -1,9 +1,7 @@
1
- 'use strict';
1
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
2
+ import { modulePrefixForProject } from '../-utils.js';
2
3
 
3
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
4
- const { modulePrefixForProject } = require('../-utils');
5
-
6
- module.exports = {
4
+ export default {
7
5
  description: 'Generates a service unit test.',
8
6
 
9
7
  shouldTransformTypeScript: true,
@@ -1,6 +1,4 @@
1
- 'use strict';
2
-
3
- module.exports = {
1
+ export default {
4
2
  description: 'Generates a template.',
5
3
  normalizeEntityName: function (entityName) {
6
4
  return entityName.replace(/\.hbs$/, ''); //Prevent generation of ".hbs.hbs" files
@@ -1,8 +1,6 @@
1
- 'use strict';
1
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
2
2
 
3
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
4
-
5
- module.exports = {
3
+ export default {
6
4
  description: 'Generates a simple utility module/function.',
7
5
 
8
6
  shouldTransformTypeScript: true,
@@ -1,11 +1,9 @@
1
- 'use strict';
1
+ import path from 'node:path';
2
2
 
3
- const path = require('path');
3
+ import typescriptBlueprintPolyfill from 'ember-cli-typescript-blueprint-polyfill';
4
+ import { modulePrefixForProject } from '../-utils.js';
4
5
 
5
- const typescriptBlueprintPolyfill = require('ember-cli-typescript-blueprint-polyfill');
6
- const { modulePrefixForProject } = require('../-utils');
7
-
8
- module.exports = {
6
+ export default {
9
7
  description: 'Generates a util unit test.',
10
8
 
11
9
  shouldTransformTypeScript: true,
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "7.2.0-alpha.1",
2
+ "version": "7.2.0-alpha.3",
3
3
  "buildType": "tag",
4
- "SHA": "e633fbd20860bd0769a48e8cb51ec1445fbad293",
5
- "assetPath": "/tag/shas/e633fbd20860bd0769a48e8cb51ec1445fbad293.tgz"
4
+ "SHA": "a9f0322b34c292dee9a01d53fc13583d33ee0e57",
5
+ "assetPath": "/tag/shas/a9f0322b34c292dee9a01d53fc13583d33ee0e57.tgz"
6
6
  }
@@ -15,6 +15,7 @@ import '../../shared-chunks/unrecognized-url-error-B3wUTorp.js';
15
15
  import RoutingService from '../routing/lib/routing-service.js';
16
16
  import { a as setupEngineRegistry } from '../../shared-chunks/setup-registry-BC5VMvei.js';
17
17
  import RegistryProxyMixin from '../-internals/runtime/lib/mixins/registry_proxy.js';
18
+ import { StrictResolver } from './lib/strict-resolver.js';
18
19
  import { assert } from '../debug/lib/assert.js';
19
20
 
20
21
  function props(obj) {
@@ -263,6 +264,15 @@ class Engine extends Namespace.extend(RegistryProxyMixin) {
263
264
  @property resolver
264
265
  @public
265
266
  */
267
+ Resolver = StrictResolver;
268
+
269
+ /**
270
+ Set this to opt-in to using a strict resolver that will only return the
271
+ given set of ES modules. The names of the modules should all be relative to
272
+ the root of the app and start with "./"
273
+ @property modules
274
+ @public
275
+ */
266
276
 
267
277
  init(properties) {
268
278
  super.init(properties);
@@ -0,0 +1,122 @@
1
+ import '../../debug/index.js';
2
+ import { assert } from '../../debug/lib/assert.js';
3
+
4
+ class StrictResolver {
5
+ // Ember's router uses this flag to decide whether to auto-generate
6
+ // `${name}_loading` and `${name}_error` substates for routes defined in
7
+ // `Router.map(...)`. Since we always resolve against an ES module registry,
8
+ // we unconditionally opt in.
9
+ moduleBasedResolver = true;
10
+ #modules = new Map();
11
+ original;
12
+ static create({
13
+ namespace
14
+ }) {
15
+ (!(namespace.modules) && assert(`<Application#modules> must be set when using the StrictResolver`, namespace.modules));
16
+ return new StrictResolver(namespace.modules);
17
+ }
18
+ constructor(modules) {
19
+ this.addModules(modules);
20
+ }
21
+ addModules(modules) {
22
+ for (let [moduleName, module] of Object.entries(modules)) {
23
+ this.#modules.set(this.#normalizeModule(moduleName), module);
24
+ }
25
+ }
26
+ #normalizeModule(moduleName) {
27
+ return moduleName.replace(fileExtension, '').replace(leadingDotSlash, '');
28
+ }
29
+ #plural(word) {
30
+ if (word === 'config') {
31
+ return word;
32
+ }
33
+ return word + 's';
34
+ }
35
+ resolve(fullName) {
36
+ let [type, name] = fullName.split(':');
37
+ name = this.#normalizeName(type, name);
38
+ for (let strategy of [this.#resolveSelf, this.#mainLookup, this.#defaultLookup, this.#nestedColocationLookup]) {
39
+ let result = strategy.call(this, type, name);
40
+ if (result) {
41
+ return this.#extractDefaultExport(result.hit);
42
+ }
43
+ }
44
+ return undefined;
45
+ }
46
+ #extractDefaultExport(module) {
47
+ if (module && module['default']) {
48
+ module = module['default'];
49
+ }
50
+ return module;
51
+ }
52
+ normalize(fullName) {
53
+ let [type, name] = fullName.split(':');
54
+ name = this.#normalizeName(type, name);
55
+ return `${type}:${name}`;
56
+ }
57
+ #normalizeName(type, name) {
58
+ if (type === 'component' || type === 'helper' || type === 'modifier' || type === 'template' && name.indexOf('components/') === 0) {
59
+ return name.replace(/_/g, '-');
60
+ } else {
61
+ return dasherize(name.replace(/\./g, '/'));
62
+ }
63
+ }
64
+ #resolveSelf(type, name) {
65
+ if (type === 'resolver' && name === 'current') {
66
+ return {
67
+ hit: {
68
+ create: () => this
69
+ }
70
+ };
71
+ }
72
+ return undefined;
73
+ }
74
+ #mainLookup(type, name) {
75
+ if (name === 'main') {
76
+ let module = this.#modules.get(type);
77
+ if (module) {
78
+ return {
79
+ hit: module
80
+ };
81
+ }
82
+ }
83
+ return undefined;
84
+ }
85
+ #defaultLookup(type, name) {
86
+ let dir = this.#plural(type);
87
+ let target = `${dir}/${name}`;
88
+ let module = this.#modules.get(target);
89
+ if (module) {
90
+ return {
91
+ hit: module
92
+ };
93
+ }
94
+ return undefined;
95
+ }
96
+
97
+ // Supports the nested colocation pattern where `component:my-widget`
98
+ // resolves to `./components/my-widget/index.{js,ts,gjs,gts}`. The index
99
+ // file is typically the component class, and it's commonly paired with a
100
+ // sibling `index.hbs` inside the same folder.
101
+ #nestedColocationLookup(type, name) {
102
+ if (type !== 'component') return undefined;
103
+ let dir = this.#plural(type);
104
+ let target = `${dir}/${name}/index`;
105
+ let module = this.#modules.get(target);
106
+ if (module) {
107
+ return {
108
+ hit: module
109
+ };
110
+ }
111
+ return undefined;
112
+ }
113
+ }
114
+ const fileExtension = /\.\w{1,4}$/;
115
+ const leadingDotSlash = /^\.\//;
116
+ const camelCaseBoundary = /([a-z\d])([A-Z])/g;
117
+ const spacesAndUnderscores = /[ _]/g;
118
+ function dasherize(str) {
119
+ return str.replace(camelCaseBoundary, '$1_$2').toLowerCase().replace(spacesAndUnderscores, '-');
120
+ }
121
+
122
+ export { StrictResolver };
@@ -1,4 +1,4 @@
1
1
  // this file gets replaced with the real value during the build
2
- const VERSION = '7.2.0-alpha.1';
2
+ const VERSION = '7.2.0-alpha.3';
3
3
 
4
4
  export { VERSION as default };
@@ -13,6 +13,7 @@ import '../../shared-chunks/unrecognized-url-error-DDBwfzdm.js';
13
13
  import RoutingService from '../routing/lib/routing-service.js';
14
14
  import { a as setupEngineRegistry } from '../../shared-chunks/setup-registry-C2KfZJWI.js';
15
15
  import RegistryProxyMixin from '../-internals/runtime/lib/mixins/registry_proxy.js';
16
+ import { StrictResolver } from './lib/strict-resolver.js';
16
17
 
17
18
  function props(obj) {
18
19
  let properties = [];
@@ -260,6 +261,15 @@ class Engine extends Namespace.extend(RegistryProxyMixin) {
260
261
  @property resolver
261
262
  @public
262
263
  */
264
+ Resolver = StrictResolver;
265
+
266
+ /**
267
+ Set this to opt-in to using a strict resolver that will only return the
268
+ given set of ES modules. The names of the modules should all be relative to
269
+ the root of the app and start with "./"
270
+ @property modules
271
+ @public
272
+ */
263
273
 
264
274
  init(properties) {
265
275
  super.init(properties);
@@ -0,0 +1,118 @@
1
+ class StrictResolver {
2
+ // Ember's router uses this flag to decide whether to auto-generate
3
+ // `${name}_loading` and `${name}_error` substates for routes defined in
4
+ // `Router.map(...)`. Since we always resolve against an ES module registry,
5
+ // we unconditionally opt in.
6
+ moduleBasedResolver = true;
7
+ #modules = new Map();
8
+ original;
9
+ static create({
10
+ namespace
11
+ }) {
12
+ return new StrictResolver(namespace.modules);
13
+ }
14
+ constructor(modules) {
15
+ this.addModules(modules);
16
+ }
17
+ addModules(modules) {
18
+ for (let [moduleName, module] of Object.entries(modules)) {
19
+ this.#modules.set(this.#normalizeModule(moduleName), module);
20
+ }
21
+ }
22
+ #normalizeModule(moduleName) {
23
+ return moduleName.replace(fileExtension, '').replace(leadingDotSlash, '');
24
+ }
25
+ #plural(word) {
26
+ if (word === 'config') {
27
+ return word;
28
+ }
29
+ return word + 's';
30
+ }
31
+ resolve(fullName) {
32
+ let [type, name] = fullName.split(':');
33
+ name = this.#normalizeName(type, name);
34
+ for (let strategy of [this.#resolveSelf, this.#mainLookup, this.#defaultLookup, this.#nestedColocationLookup]) {
35
+ let result = strategy.call(this, type, name);
36
+ if (result) {
37
+ return this.#extractDefaultExport(result.hit);
38
+ }
39
+ }
40
+ return undefined;
41
+ }
42
+ #extractDefaultExport(module) {
43
+ if (module && module['default']) {
44
+ module = module['default'];
45
+ }
46
+ return module;
47
+ }
48
+ normalize(fullName) {
49
+ let [type, name] = fullName.split(':');
50
+ name = this.#normalizeName(type, name);
51
+ return `${type}:${name}`;
52
+ }
53
+ #normalizeName(type, name) {
54
+ if (type === 'component' || type === 'helper' || type === 'modifier' || type === 'template' && name.indexOf('components/') === 0) {
55
+ return name.replace(/_/g, '-');
56
+ } else {
57
+ return dasherize(name.replace(/\./g, '/'));
58
+ }
59
+ }
60
+ #resolveSelf(type, name) {
61
+ if (type === 'resolver' && name === 'current') {
62
+ return {
63
+ hit: {
64
+ create: () => this
65
+ }
66
+ };
67
+ }
68
+ return undefined;
69
+ }
70
+ #mainLookup(type, name) {
71
+ if (name === 'main') {
72
+ let module = this.#modules.get(type);
73
+ if (module) {
74
+ return {
75
+ hit: module
76
+ };
77
+ }
78
+ }
79
+ return undefined;
80
+ }
81
+ #defaultLookup(type, name) {
82
+ let dir = this.#plural(type);
83
+ let target = `${dir}/${name}`;
84
+ let module = this.#modules.get(target);
85
+ if (module) {
86
+ return {
87
+ hit: module
88
+ };
89
+ }
90
+ return undefined;
91
+ }
92
+
93
+ // Supports the nested colocation pattern where `component:my-widget`
94
+ // resolves to `./components/my-widget/index.{js,ts,gjs,gts}`. The index
95
+ // file is typically the component class, and it's commonly paired with a
96
+ // sibling `index.hbs` inside the same folder.
97
+ #nestedColocationLookup(type, name) {
98
+ if (type !== 'component') return undefined;
99
+ let dir = this.#plural(type);
100
+ let target = `${dir}/${name}/index`;
101
+ let module = this.#modules.get(target);
102
+ if (module) {
103
+ return {
104
+ hit: module
105
+ };
106
+ }
107
+ return undefined;
108
+ }
109
+ }
110
+ const fileExtension = /\.\w{1,4}$/;
111
+ const leadingDotSlash = /^\.\//;
112
+ const camelCaseBoundary = /([a-z\d])([A-Z])/g;
113
+ const spacesAndUnderscores = /[ _]/g;
114
+ function dasherize(str) {
115
+ return str.replace(camelCaseBoundary, '$1_$2').toLowerCase().replace(spacesAndUnderscores, '-');
116
+ }
117
+
118
+ export { StrictResolver };
@@ -1,4 +1,4 @@
1
1
  // this file gets replaced with the real value during the build
2
- const VERSION = '7.2.0-alpha.1';
2
+ const VERSION = '7.2.0-alpha.3';
3
3
 
4
4
  export { VERSION as default };
package/docs/data.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "The Ember API",
4
4
  "description": "The Ember API: a framework for building ambitious web applications",
5
5
  "url": "https://emberjs.com/",
6
- "version": "7.2.0-alpha.1"
6
+ "version": "7.2.0-alpha.3"
7
7
  },
8
8
  "files": {
9
9
  "node_modules/rsvp/lib/rsvp/promise/all.js": {
@@ -4546,7 +4546,7 @@
4546
4546
  "module": "@ember/engine",
4547
4547
  "namespace": "",
4548
4548
  "file": "packages/@ember/engine/index.ts",
4549
- "line": 40,
4549
+ "line": 41,
4550
4550
  "description": "The `Engine` class contains core functionality for both applications and\nengines.\n\nEach engine manages a registry that's used for dependency injection and\nexposed through `RegistryProxy`.\n\nEngines also manage initializers and instance initializers.\n\nEngines can spawn `EngineInstance` instances via `buildInstance()`.",
4551
4551
  "extends": "Ember.Namespace",
4552
4552
  "uses": [
@@ -13646,7 +13646,7 @@
13646
13646
  },
13647
13647
  {
13648
13648
  "file": "packages/@ember/engine/index.ts",
13649
- "line": 62,
13649
+ "line": 63,
13650
13650
  "description": "The goal of initializers should be to register dependencies and injections.\nThis phase runs once. Because these initializers may load code, they are\nallowed to defer application readiness and advance it. If you need to access\nthe container or store you should use an InstanceInitializer that will be run\nafter all initializers and therefore after all code is loaded and the app is\nready.\n\nInitializer receives an object which has the following attributes:\n`name`, `before`, `after`, `initialize`. The only required attribute is\n`initialize`, all others are optional.\n\n* `name` allows you to specify under which name the initializer is registered.\nThis must be a unique name, as trying to register two initializers with the\nsame name will result in an error.\n\n```app/initializer/named-initializer.js\nimport { debug } from '@ember/debug';\n\nexport function initialize() {\n debug('Running namedInitializer!');\n}\n\nexport default {\n name: 'named-initializer',\n initialize\n};\n```\n\n* `before` and `after` are used to ensure that this initializer is ran prior\nor after the one identified by the value. This value can be a single string\nor an array of strings, referencing the `name` of other initializers.\n\nAn example of ordering initializers, we create an initializer named `first`:\n\n```app/initializer/first.js\nimport { debug } from '@ember/debug';\n\nexport function initialize() {\n debug('First initializer!');\n}\n\nexport default {\n name: 'first',\n initialize\n};\n```\n\n```bash\n// DEBUG: First initializer!\n```\n\nWe add another initializer named `second`, specifying that it should run\nafter the initializer named `first`:\n\n```app/initializer/second.js\nimport { debug } from '@ember/debug';\n\nexport function initialize() {\n debug('Second initializer!');\n}\n\nexport default {\n name: 'second',\n after: 'first',\n initialize\n};\n```\n\n```\n// DEBUG: First initializer!\n// DEBUG: Second initializer!\n```\n\nAfterwards we add a further initializer named `pre`, this time specifying\nthat it should run before the initializer named `first`:\n\n```app/initializer/pre.js\nimport { debug } from '@ember/debug';\n\nexport function initialize() {\n debug('Pre initializer!');\n}\n\nexport default {\n name: 'pre',\n before: 'first',\n initialize\n};\n```\n\n```bash\n// DEBUG: Pre initializer!\n// DEBUG: First initializer!\n// DEBUG: Second initializer!\n```\n\nFinally we add an initializer named `post`, specifying it should run after\nboth the `first` and the `second` initializers:\n\n```app/initializer/post.js\nimport { debug } from '@ember/debug';\n\nexport function initialize() {\n debug('Post initializer!');\n}\n\nexport default {\n name: 'post',\n after: ['first', 'second'],\n initialize\n};\n```\n\n```bash\n// DEBUG: Pre initializer!\n// DEBUG: First initializer!\n// DEBUG: Second initializer!\n// DEBUG: Post initializer!\n```\n\n* `initialize` is a callback function that receives one argument,\n `application`, on which you can operate.\n\nExample of using `application` to register an adapter:\n\n```app/initializer/api-adapter.js\nimport ApiAdapter from '../utils/api-adapter';\n\nexport function initialize(application) {\n application.register('api-adapter:main', ApiAdapter);\n}\n\nexport default {\n name: 'post',\n after: ['first', 'second'],\n initialize\n};\n```",
13651
13651
  "itemtype": "method",
13652
13652
  "name": "initializer",
@@ -13664,7 +13664,7 @@
13664
13664
  },
13665
13665
  {
13666
13666
  "file": "packages/@ember/engine/index.ts",
13667
- "line": 209,
13667
+ "line": 210,
13668
13668
  "description": "Instance initializers run after all initializers have run. Because\ninstance initializers run after the app is fully set up. We have access\nto the store, container, and other items. However, these initializers run\nafter code has loaded and are not allowed to defer readiness.\n\nInstance initializer receives an object which has the following attributes:\n`name`, `before`, `after`, `initialize`. The only required attribute is\n`initialize`, all others are optional.\n\n* `name` allows you to specify under which name the instanceInitializer is\nregistered. This must be a unique name, as trying to register two\ninstanceInitializer with the same name will result in an error.\n\n```app/initializer/named-instance-initializer.js\nimport { debug } from '@ember/debug';\n\nexport function initialize() {\n debug('Running named-instance-initializer!');\n}\n\nexport default {\n name: 'named-instance-initializer',\n initialize\n};\n```\n\n* `before` and `after` are used to ensure that this initializer is ran prior\nor after the one identified by the value. This value can be a single string\nor an array of strings, referencing the `name` of other initializers.\n\n* See Application.initializer for discussion on the usage of before\nand after.\n\nExample instanceInitializer to preload data into the store.\n\n```app/initializer/preload-data.js\n\nexport function initialize(application) {\n var userConfig, userConfigEncoded, store;\n // We have a HTML escaped JSON representation of the user's basic\n // configuration generated server side and stored in the DOM of the main\n // index.html file. This allows the app to have access to a set of data\n // without making any additional remote calls. Good for basic data that is\n // needed for immediate rendering of the page. Keep in mind, this data,\n // like all local models and data can be manipulated by the user, so it\n // should not be relied upon for security or authorization.\n\n // Grab the encoded data from the meta tag\n userConfigEncoded = document.querySelector('head meta[name=app-user-config]').attr('content');\n\n // Unescape the text, then parse the resulting JSON into a real object\n userConfig = JSON.parse(unescape(userConfigEncoded));\n\n // Lookup the store\n store = application.lookup('service:store');\n\n // Push the encoded JSON into the store\n store.pushPayload(userConfig);\n}\n\nexport default {\n name: 'named-instance-initializer',\n initialize\n};\n```",
13669
13669
  "itemtype": "method",
13670
13670
  "name": "instanceInitializer",
@@ -13681,7 +13681,7 @@
13681
13681
  },
13682
13682
  {
13683
13683
  "file": "packages/@ember/engine/index.ts",
13684
- "line": 285,
13684
+ "line": 286,
13685
13685
  "description": "This creates a registry with the default Ember naming conventions.\n\nIt also configures the registry:\n\n* registered views are created every time they are looked up (they are\n not singletons)\n* registered templates are not factories; the registered value is\n returned directly.\n* the router receives the application as its `namespace` property\n* all controllers receive the router as their `target` and `controllers`\n properties\n* all controllers receive the application as their `namespace` property\n* the application view receives the application controller as its\n `controller` property\n* the application view receives the application template as its\n `defaultTemplate` property",
13686
13686
  "itemtype": "method",
13687
13687
  "name": "buildRegistry",
@@ -13704,7 +13704,7 @@
13704
13704
  },
13705
13705
  {
13706
13706
  "file": "packages/@ember/engine/index.ts",
13707
- "line": 325,
13707
+ "line": 326,
13708
13708
  "description": "Set this to provide an alternate class to `DefaultResolver`",
13709
13709
  "itemtype": "property",
13710
13710
  "name": "resolver",
@@ -13715,7 +13715,18 @@
13715
13715
  },
13716
13716
  {
13717
13717
  "file": "packages/@ember/engine/index.ts",
13718
- "line": 338,
13718
+ "line": 334,
13719
+ "description": "Set this to opt-in to using a strict resolver that will only return the\ngiven set of ES modules. The names of the modules should all be relative to\nthe root of the app and start with \"./\"",
13720
+ "itemtype": "property",
13721
+ "name": "modules",
13722
+ "access": "public",
13723
+ "tagname": "",
13724
+ "class": "Engine",
13725
+ "module": "@ember/engine"
13726
+ },
13727
+ {
13728
+ "file": "packages/@ember/engine/index.ts",
13729
+ "line": 349,
13719
13730
  "description": "A private flag indicating whether an engine's initializers have run yet.",
13720
13731
  "access": "private",
13721
13732
  "tagname": "",
@@ -13726,7 +13737,7 @@
13726
13737
  },
13727
13738
  {
13728
13739
  "file": "packages/@ember/engine/index.ts",
13729
- "line": 346,
13740
+ "line": 357,
13730
13741
  "description": "Ensure that initializers are run once, and only once, per engine.",
13731
13742
  "access": "private",
13732
13743
  "tagname": "",
@@ -13737,7 +13748,7 @@
13737
13748
  },
13738
13749
  {
13739
13750
  "file": "packages/@ember/engine/index.ts",
13740
- "line": 359,
13751
+ "line": 370,
13741
13752
  "description": "Create an EngineInstance for this engine.",
13742
13753
  "access": "public",
13743
13754
  "tagname": "",
@@ -13752,7 +13763,7 @@
13752
13763
  },
13753
13764
  {
13754
13765
  "file": "packages/@ember/engine/index.ts",
13755
- "line": 371,
13766
+ "line": 382,
13756
13767
  "description": "Build and configure the registry for the current engine.",
13757
13768
  "access": "private",
13758
13769
  "tagname": "",
@@ -13767,7 +13778,7 @@
13767
13778
  },
13768
13779
  {
13769
13780
  "file": "packages/@ember/engine/index.ts",
13770
- "line": 384,
13781
+ "line": 395,
13771
13782
  "access": "private",
13772
13783
  "tagname": "",
13773
13784
  "itemtype": "method",
@@ -13777,7 +13788,7 @@
13777
13788
  },
13778
13789
  {
13779
13790
  "file": "packages/@ember/engine/index.ts",
13780
- "line": 392,
13791
+ "line": 403,
13781
13792
  "access": "private",
13782
13793
  "tagname": "",
13783
13794
  "itemtype": "method",
@@ -13787,7 +13798,7 @@
13787
13798
  },
13788
13799
  {
13789
13800
  "file": "packages/@ember/engine/index.ts",
13790
- "line": 400,
13801
+ "line": 411,
13791
13802
  "access": "private",
13792
13803
  "tagname": "",
13793
13804
  "itemtype": "method",
@@ -13797,7 +13808,7 @@
13797
13808
  },
13798
13809
  {
13799
13810
  "file": "packages/@ember/engine/index.ts",
13800
- "line": 414,
13811
+ "line": 425,
13801
13812
  "access": "private",
13802
13813
  "tagname": "",
13803
13814
  "since": "1.12.0",
@@ -13808,7 +13819,7 @@
13808
13819
  },
13809
13820
  {
13810
13821
  "file": "packages/@ember/engine/index.ts",
13811
- "line": 448,
13822
+ "line": 459,
13812
13823
  "description": "This function defines the default lookup rules for container lookups:\n\n* templates are looked up on `Ember.TEMPLATES`\n* other names are looked up on the application after classifying the name.\n For example, `controller:post` looks up `App.PostController` by default.\n* if the default lookup fails, look for registered classes on the container\n\nThis allows the application to register default injections in the container\nthat could be overridden by the normal naming convention.",
13813
13824
  "access": "private",
13814
13825
  "tagname": "",
@@ -13830,7 +13841,7 @@
13830
13841
  },
13831
13842
  {
13832
13843
  "file": "packages/@ember/engine/index.ts",
13833
- "line": 470,
13844
+ "line": 481,
13834
13845
  "class": "Engine",
13835
13846
  "module": "@ember/engine"
13836
13847
  },
@@ -25248,7 +25259,7 @@
25248
25259
  },
25249
25260
  {
25250
25261
  "message": "Missing item type",
25251
- "line": " packages/@ember/engine/index.ts:470"
25262
+ "line": " packages/@ember/engine/index.ts:481"
25252
25263
  },
25253
25264
  {
25254
25265
  "message": "Missing item type\nUnfortunately, a lot of existing code assumes booting an instance is\nsynchronous – specifically, a lot of tests assume the last call to\n`app.advanceReadiness()` or `app.reset()` will result in a new instance\nbeing fully-booted when the current runloop completes.\n\nWe would like new code (like the `visit` API) to stop making this\nassumption, so we created the asynchronous version above that returns a\npromise. But until we have migrated all the code, we would have to expose\nthis method for use *internally* in places where we need to boot an instance\nsynchronously.",
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  const path = require('path');
4
- const Overrides = require('./overrides');
5
- const SupportedBrowsers = require('./browsers');
4
+ const Overrides = require('./overrides.cjs');
5
+ const SupportedBrowsers = require('./browsers.cjs');
6
6
 
7
7
  const isProduction = process.env.EMBER_ENV === 'production';
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-source",
3
- "version": "7.2.0-alpha.1",
3
+ "version": "7.2.0-alpha.3",
4
4
  "description": "A JavaScript framework for creating ambitious web applications",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -21,7 +21,7 @@
21
21
  "url": "https://github.com/emberjs/ember.js/issues"
22
22
  },
23
23
  "license": "MIT",
24
- "main": "lib/index.js",
24
+ "main": "lib/index.cjs",
25
25
  "files": [
26
26
  "build-metadata.json",
27
27
  "blueprints",
@@ -44,17 +44,17 @@
44
44
  "docs": "ember ember-cli-yuidoc",
45
45
  "start": "vite dev",
46
46
  "lint": "npm-run-all --continue-on-error --aggregate-output --parallel \"lint:!(fix)\"",
47
- "lint:docs": "qunit tests/docs/coverage-test.js",
47
+ "lint:docs": "qunit tests/docs/coverage-test.cjs",
48
48
  "lint:eslint": "eslint --report-unused-disable-directives --cache .",
49
49
  "lint:eslint:fix": "npm-run-all \"lint:eslint --fix\"",
50
50
  "lint:fix": "npm-run-all lint:*:fix",
51
51
  "lint:format": "prettier --check .",
52
52
  "lint:format:fix": "prettier --write .",
53
- "test": "testem ci -f testem.js --host 127.0.0.1 --port 13141",
53
+ "test": "testem ci -f testem.cjs --host 127.0.0.1 --port 13141",
54
54
  "test:blueprints": "mocha node-tests/blueprints/**/*-test.js",
55
- "test:node": "qunit tests/node/**/*-test.js",
55
+ "test:node": "qunit tests/node/**/*-test.cjs",
56
56
  "test:node:vitest": "pnpm --filter ember-test-node-vitest test:node",
57
- "test:browserstack": "node bin/run-browserstack-tests.js",
57
+ "test:browserstack": "node bin/run-browserstack-tests.cjs",
58
58
  "test:wip": "vite build --mode development --minify false && testem ci",
59
59
  "type-check:internals": "tsc --noEmit",
60
60
  "type-check:handlebars": "tsc --noEmit --project packages/@handlebars/parser/tsconfig.json",
@@ -106,7 +106,7 @@
106
106
  "babel-plugin-ember-template-compilation": "^4.0.0",
107
107
  "dag-map": "^2.0.2",
108
108
  "decorator-transforms": "2.3.2",
109
- "ember-cli": "^6.11.1",
109
+ "ember-cli": "^7.0.1",
110
110
  "ember-cli-blueprint-test-helpers": "^0.19.2",
111
111
  "ember-cli-browserstack": "^4.0.0",
112
112
  "ember-cli-dependency-checker": "^3.3.1",
@@ -136,7 +136,7 @@
136
136
  "router_js": "workspace:*",
137
137
  "rsvp": "^4.8.5",
138
138
  "terser": "^5.42.0",
139
- "testem": "^3.10.1",
139
+ "testem": "^3.20.1",
140
140
  "testem-failure-only-reporter": "^1.0.0",
141
141
  "tracerbench": "^8.0.1",
142
142
  "typescript": "^5.7.3",
@@ -151,7 +151,8 @@
151
151
  "rollup": "^4.2.0",
152
152
  "ember-cli-htmlbars": "^7.0.0",
153
153
  "babel-plugin-ember-template-compilation": "^4.0.0",
154
- "ember-cli-babel": "^8.3.1"
154
+ "ember-cli-babel": "^8.3.1",
155
+ "testem": "^3.20.1"
155
156
  },
156
157
  "onlyBuiltDependencies": [
157
158
  "@swc/core",
@@ -233,6 +234,7 @@
233
234
  "@ember/engine/index.js": "ember-source/@ember/engine/index.js",
234
235
  "@ember/engine/instance.js": "ember-source/@ember/engine/instance.js",
235
236
  "@ember/engine/lib/engine-parent.js": "ember-source/@ember/engine/lib/engine-parent.js",
237
+ "@ember/engine/lib/strict-resolver.js": "ember-source/@ember/engine/lib/strict-resolver.js",
236
238
  "@ember/engine/parent.js": "ember-source/@ember/engine/parent.js",
237
239
  "@ember/enumerable/index.js": "ember-source/@ember/enumerable/index.js",
238
240
  "@ember/enumerable/mutable.js": "ember-source/@ember/enumerable/mutable.js",
@@ -287,6 +287,15 @@ declare module '@ember/engine' {
287
287
  @public
288
288
  */
289
289
  Resolver: ResolverClass;
290
+ /**
291
+ Set this to opt-in to using a strict resolver that will only return the
292
+ given set of ES modules. The names of the modules should all be relative to
293
+ the root of the app and start with "./"
294
+
295
+ @property modules
296
+ @public
297
+ */
298
+ modules?: Record<string, unknown>;
290
299
  init(properties: object | undefined): void;
291
300
  /**
292
301
  A private flag indicating whether an engine's initializers have run yet.
@@ -0,0 +1,16 @@
1
+ declare module '@ember/engine/lib/strict-resolver' {
2
+ import type { Factory, Resolver } from "@ember/-internals/owner";
3
+ import type Engine from "..";
4
+ export class StrictResolver implements Resolver {
5
+ #private;
6
+ moduleBasedResolver: boolean;
7
+ original: any;
8
+ static create({ namespace }: {
9
+ namespace: Engine;
10
+ }): StrictResolver;
11
+ constructor(modules: Record<string, unknown>);
12
+ addModules(modules: Record<string, unknown>): void;
13
+ resolve(fullName: string): Factory<object> | object | undefined;
14
+ normalize(fullName: `${string}:${string}`): `${string}:${string}`;
15
+ }
16
+ }
@@ -212,6 +212,7 @@
212
212
  /// <reference path="./@ember/engine/index.d.ts" />
213
213
  /// <reference path="./@ember/engine/instance.d.ts" />
214
214
  /// <reference path="./@ember/engine/lib/engine-parent.d.ts" />
215
+ /// <reference path="./@ember/engine/lib/strict-resolver.d.ts" />
215
216
  /// <reference path="./@ember/engine/parent.d.ts" />
216
217
  /// <reference path="./@ember/enumerable/index.d.ts" />
217
218
  /// <reference path="./@ember/enumerable/mutable.d.ts" />
File without changes
File without changes