dryvPacks

@dryv/nestjs-appv0.3.1

NestJS application shell with bootstrap, package and tooling around the generated AppModule.

NestJS ApplicationBackendUnitPublished 7 days ago2 downloads

dryv pack add @dryv/nestjs-app
1.8 KBRaw ↗
yaml
version: dryv/v1alpha1
sources:
  authoring:
    main:
      type: ir
      path: dryv.ir.yaml
  packs:
    local:
      path: packs
    # The project's own packs, such as its use-cases scaffolds.
    project:
      path: dryv/packs
destinations:
  app:
    path: app
    choose: { js.package_manager: bun }
    imports:
      root: src
      prefix: "@/"
authoring:
  source:
    $ref: "#/sources/authoring/main"
packs:
  # Application shell: main.ts, package.json, tooling and e2e test.
  app:
    source: { $ref: "#/sources/packs/local", path: unit/backend/nestjs }
    destination:
      $ref: "#/destinations/app"
    inputs:
      package_name: dryv-nestjs-fixture
  types:
    source: { $ref: "#/sources/packs/local", path: inject/types/typescript }
    destination:
      $ref: "#/destinations/app"
      root: [src, types]
  dtos:
    source: { $ref: "#/sources/packs/local", path: inject/validation/class-validator }
    destination:
      $ref: "#/destinations/app"
      root: [src, modules]
    bind:
      property.enum.types: { $ref: "#/packs/types" }
      property.types: { $ref: "#/packs/types" }
  # The project's own pack: one ServiceImpl per feature and one use case per operation.
  use-cases:
    source: { $ref: "#/sources/packs/project", path: use-cases }
    destination:
      $ref: "#/destinations/app"
      root: [src, modules]
  # Feature, group and app modules: modules under src/modules, AppModule in src/.
  server:
    source: { $ref: "#/sources/packs/local", path: inject/backend/nestjs }
    destination:
      $ref: "#/destinations/app"
      root: [src, modules]
    destinations:
      app: { $ref: "#/destinations/app", root: [src] }
    bind:
      schema.validation: { $ref: "#/packs/dtos" }
      operation.implementation: { $ref: "#/packs/use-cases" }
      operation.usecase: { $ref: "#/packs/use-cases" }