Skip to content

Refactor the CLI to be service based #1793

@Shurtu-gal

Description

@Shurtu-gal

Need to change the architecture of CLI so that the services can be reused across multiple clients.

Current proposed architecture (subject to change):

.
├── adapters
│   ├── api
│   │   ├── controllers
│   │   │   ├── generator.controller.ts
│   │   │   └── ping.controller.ts
│   │   └── core
│   │       ├── app.ts
│   │       ├── constants.ts
│   │       ├── exceptions
│   │       ├── interfaces.ts
│   │       ├── logs
│   │       ├── middlewares
│   │       └── server-api.d.ts
│   └── cli
│       ├── commands
│       │   ├── bundle.ts
│       │   ├── config
│       │   ├── convert.ts
│       │   ├── diff.ts
│       │   ├── generate
│       │   ├── new
│       │   ├── optimize.ts
│       │   ├── start
│       │   └── validate.ts
│       └── core
│           ├── base.ts
│           ├── flags
│           ├── global.d.ts
│           ├── globals.ts
│           ├── hooks
│           ├── models
│           └── parser.ts
├── api.ts
├── core
│   └── services
│       ├── archiver.service.ts
│       └── generator.service.ts
├── errors
│   ├── context-error.ts
│   ├── diff-error.ts
│   ├── generator-error.ts
│   ├── specification-file.ts
│   └── validation-error.ts
├── index.ts
├── logs
├── ports
│   └── generator.interface.ts
└── utils
    ├── ajv.ts
    ├── generator.ts
    ├── logger.ts
    └── temp-dir.ts

This Bounty Issue is inextricably linked with #1794 and cannot be completed separately from it.

Metadata

Metadata

Assignees

Labels

bountyAsyncAPI Bounty program related label

Type

Projects

Status

Completed

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions