puerto 0.17.0

Puerto — Rust full-stack DDD framework CLI. Scaffolds Clean Architecture projects with auto-wired DI, SQLx support, and zero manual wiring. Formerly puerto-framework.
// AUTO-GENERATED by puerto. Edit puerto.toml, then run `puerto generate bootstrap`.
//
// The composition root: the only module that imports `infrastructure/`. Screens reach the
// adapters through `useDependencies()`, so a test hands them a fake instead.
{% if entities %}
{% for e in entities -%}
import type { {{ e.pascal }}Repository } from "../../../domain/{{ e.kebab }}/repository";
import { {{ e.camel }}RepositoryHttp } from "../../../infrastructure/{{ e.kebab }}/{{ e.kebab }}-repository-http";
{% endfor -%}
import { createApiClient } from "../../../infrastructure/http/client";

export interface Dependencies {
{%- for e in entities %}
  {{ e.camel }}Repository: {{ e.pascal }}Repository;
{%- endfor %}
}

export function createDependencies(): Dependencies {
  const api = createApiClient();
  return {
{%- for e in entities %}
    {{ e.camel }}Repository: {{ e.camel }}RepositoryHttp(api),
{%- endfor %}
  };
}
{%- else %}
export type Dependencies = Record<string, never>;

export function createDependencies(): Dependencies {
  return {};
}
{%- endif %}