{"id":22311512,"url":"https://github.com/vilicvane/entrance-decorator","last_synced_at":"2025-07-29T08:32:14.615Z","repository":{"id":57225749,"uuid":"242038873","full_name":"vilicvane/entrance-decorator","owner":"vilicvane","description":"A minimal solution of dependency injection for projects that scale.","archived":false,"fork":false,"pushed_at":"2023-11-01T14:46:06.000Z","size":553,"stargazers_count":24,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-25T03:07:40.208Z","etag":null,"topics":["dependency-injection"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/vilicvane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-02-21T02:41:13.000Z","updated_at":"2025-06-09T20:40:08.000Z","dependencies_parsed_at":"2022-08-24T11:00:32.812Z","dependency_job_id":"5223abc6-eaf8-4f36-9533-d953260d3da1","html_url":"https://github.com/vilicvane/entrance-decorator","commit_stats":null,"previous_names":["makeflow/entrance-decorator","vilicvane/entrance-decorator"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/vilicvane/entrance-decorator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilicvane%2Fentrance-decorator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilicvane%2Fentrance-decorator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilicvane%2Fentrance-decorator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilicvane%2Fentrance-decorator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vilicvane","download_url":"https://codeload.github.com/vilicvane/entrance-decorator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vilicvane%2Fentrance-decorator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267653229,"owners_count":24122161,"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-07-29T02:00:12.549Z","response_time":2574,"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":["dependency-injection"],"created_at":"2024-12-03T21:20:06.447Z","updated_at":"2025-07-29T08:32:14.270Z","avatar_url":"https://github.com/vilicvane.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Entrance Decorator\n\nA minimal solution of dependency injection for projects that scale.\n\n## Why\n\n🙂\n\n## Installation\n\n```\nyarn add entrance-decorator\n```\n\n## Usage\n\n### Define entrances\n\n```ts\nimport {entrance} from 'entrance-decorator';\n\nexport class Entrances {\n  constructor(private url: string) {}\n\n  @entrance\n  get uiService() {\n    return new UIService(this.errorService);\n  }\n\n  @entrance\n  get errorService() {\n    return new ErrorService({\n      baseURL: this.url,\n    });\n  }\n}\n```\n\n### Extend/override entrances\n\n```ts\nimport {entrance} from 'entrance-decorator';\n\nexport class MobileEntrances extends Entrances {\n  // Extend entrance\n  @entrance\n  get mobileService() {\n    return new MobileService(this.errorService);\n  }\n\n  // Override entrance\n  @entrance\n  get uiService() {\n    return new MobileUIService(this.errorService);\n  }\n}\n```\n\n### Use entrances\n\n```ts\nconst entrances = new Entrances('https://makeflow.com');\n```\n\nYou may use the `entrances` object in whatever way you want. For example, we use `Context` in React (in a decorator manner) and use something like `entrances.launchServer()` in server-side applications.\n\n## What it does\n\nCache and circular dependency check, nothing else.\n\n## License\n\nMIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvilicvane%2Fentrance-decorator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvilicvane%2Fentrance-decorator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvilicvane%2Fentrance-decorator/lists"}