{"id":31779509,"url":"https://github.com/ember-cli/ember-strict-application-resolver","last_synced_at":"2025-10-10T07:49:19.662Z","repository":{"id":306813487,"uuid":"1027300655","full_name":"ember-cli/ember-strict-application-resolver","owner":"ember-cli","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-06T15:07:10.000Z","size":224,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T17:19:24.717Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ember-cli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"emberjs","open_collective":"emberjs"}},"created_at":"2025-07-27T18:26:05.000Z","updated_at":"2025-10-06T15:01:55.000Z","dependencies_parsed_at":"2025-07-27T20:34:58.013Z","dependency_job_id":"29a053fc-eacf-46d6-9f01-d62798d95a2e","html_url":"https://github.com/ember-cli/ember-strict-application-resolver","commit_stats":null,"previous_names":["nullvoxpopuli/ember-strict-application-resolver","nullvoxpopuli/ember-strict-resolver","ember-cli/ember-strict-application-resolver"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ember-cli/ember-strict-application-resolver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fember-strict-application-resolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fember-strict-application-resolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fember-strict-application-resolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fember-strict-application-resolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ember-cli","download_url":"https://codeload.github.com/ember-cli/ember-strict-application-resolver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fember-strict-application-resolver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003173,"owners_count":26083533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-10T07:49:16.235Z","updated_at":"2025-10-10T07:49:19.657Z","avatar_url":"https://github.com/ember-cli.png","language":"JavaScript","funding_links":["https://github.com/sponsors/emberjs","https://opencollective.com/emberjs"],"categories":[],"sub_categories":[],"readme":"# ember-strict-application-resolver\n\nA polyfill implementation of the upcoming default strict resolver built in to Ember.\n\n## Installation\n\n```\nnpm add ember-strict-application-resolver\n```\n\n## Usage\n\nIn your app.js or app.ts, or wherever you configure your application\n```diff\n- import config from '\u003capp-name\u003e/config/environment';\n- import EmberApp from '@ember/application';\n- import EmberResolver from 'ember-resolver';\n+ import EmberApp from 'ember-strict-application-resolver';\n\n  class YouApp extends EmberApp {\n-   modulePrefix = config.modulePrefix;\n-   podModulePrefix = config.podModulePrefix;\n-   Resolver = EmberResolver.withModules({\n-      [`${config.modulePrefix}/router`]: { default: Router },\n-      [`${config.modulePrefix}/services/manual`]: { default: Manual },\n-    });\n\n+    modules = {\n+      './router': { default: Router },\n+      './services/manual': { default: SomeService },\n+      './services/manual-shorthand': SomeOtherService,\n+\n+      // now import.meta.glob just works\n+      ...import.meta.glob('./services/**/*', { eager: true }),\n+      ...import.meta.glob('./routes/*', { eager: true }),\n+      ...import.meta.glob('./templates/**/*', { eager: true }),\n+    };\n  }\n```\n\nThe type of `modules` is:\n```ts\n{ \n  [modulePath: string]:\n    | ExportableType\n    | { [exportName: string]: ExportableType };\n};\n```\n\n### `buildRegistry`\n\nLibraries may declare `ember-strict-application-resolver` as a `dependencies` entry, and then import from `./build-registry` - to provide helpers for packages all the library's services and other things that need to be in the registry (such as from the library's dependencies as well)\n\nFor example:\n```js\n// in src/registry.ts (or js)\nimport { buildRegistry } from 'ember-strict-application-resolver/build-registry';\nimport TheService from 'from-dependency/services/the-service';\n\nexport default buildRegistry({\n  ...import.meta.glob('./services/*', { eager: true }),\n  './services/the-service': { default: TheService },\n});\n```\n\nThen consumers of your library would either splat this into their `modules` object:\n```js\nimport libraryRegistry from 'your-library/registry';\n// ...\n\nmodules = {\n  // if the app is using ember-strict-application-resolver\n  ...libraryRegistry(),\n  // or if using ember-resolver\n  ...libraryRegistry('name-of-app'),\n}\n```\n\nOr consuming libraries would propagate the configuration for their consumers:\n```js\nimport { buildRegistry } from 'ember-strict-application-resolver/build-registry';\nimport libraryRegistry from 'your-library/registry';\n\nexport default buildRegistry({\n  ...import.meta.glob('./services/*', { eager: true }),\n  // No argument should be passed here\n  ...libraryRegistry(),\n});\n```\n\n## Contributing\n\nSee the [Contributing](CONTRIBUTING.md) guide for details.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fember-cli%2Fember-strict-application-resolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fember-cli%2Fember-strict-application-resolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fember-cli%2Fember-strict-application-resolver/lists"}