components icon indicating copy to clipboard operation
components copied to clipboard

Support for nested components with deeper directory level

Open daaru00 opened this issue 5 years ago • 0 comments

Description

As I understand from fullstack-app example components can be nested in directory and automatically deployed (taking care of dependencies). This seem does not work with nested components in lower directory level, for example this works:

.
├── api
│   └── serverless.yml
├── database
│   └── serverless.yml
├── permissions
│   └── serverless.yml
└── serverless.yml

but this does not:

.
├── databases
│   ├── cart
│   │   └── serverless.yml
│   └── stock
│       └── serverless.yml
├── functions
│   ├── cart
│   │   └── serverless.yml
│   └── stock
│       └── serverless.yml
└── serverless.yml

just deploy the component in the root directory.

Is it possible to add support for a deeper directory tree? This would allow to better organize the repository, for example by declaring the same types of components within the same folder (Lambda functions or IAM Role).

Now the organization of components of the same type becomes a bit verbose, for example:

.
├── database-cart
│   └── serverless.yml
├── database-stock
│   └── serverless.yml
├── function-cart
│   └── serverless.yml
├── function-stock
│   └── serverless.yml
├── role-admin
│   └── serverless.yml
├── role-cart-cron
│   └── serverless.yml
├── role-cart-trigger
│   └── serverless.yml
└── serverless.yml

I would like to organize this with different nested folders instead of using the folder name itself.

Additional Data

Working on Linux with NodeJS v.10.x

Code Reference

I've not found so much details about file loading or dependencies calculation.. if you can point me in the right direction I could try to create a PR with some changes for loading the serverless.yml files into each subdirectory recursively.

daaru00 avatar Oct 13 '20 09:10 daaru00