Closed sooraj1002 closed 2 months ago
Current Behaviour:
import { MonitoringModule } from "@samagra-x/stencil" import { PrometheusController } from "@samagra-x/stencil"
Where could I find this and How should I test this ?
// @sooraj1002 @techsavvyash
We have linked to files where the code resides in the issue ticket itself @Savio629. As for if you want to see this in action, just bootstrap a new project with stencil new
and add monitoring to it, you'll see this happening.
I think there are two ways to solve this:
eslint
config as well.Am I running it properly?
There seems to be an error while running it through schematics itself
could you please elaborate on how you are running it through schematics itself?
to just use schematics in a project which has been bootstrapped using @nestjs/cli
, you would need to install @samagra-x/schematics
and then update collection
in nest-cli.json
to @samagra-x/schematics
as it has been done here.
once these changes have been made, commands like nest g monitormodule
should work as expected
Yeah I had followed the same steps Is the following steps right to test it via stencil cli locally?
npm link and npm run build inside schematics npm link and npm run build inside stencil-cli
npm link @samagra/schematics and npm link @samagra/stencil-cli inside a new project ( i also tried npm link @samagra/schematics inside of stencli-cli folder)
Now local changes should work right?
npm run build
in schematicsnpm link
in schematicsnpm link @samgra-x/schematics
in clinpm run build
in clinpm link
in clibe sure to remove the installed samagra-x/schematics
package from the cli before building otherwise changes in schematics wont be reflected
now, stencil new project
and everything else will be available globally in your system
also, could you please share a video showing the steps you followed to get that error?
I have made it to work but we'll have to document it to so anyone can contribute to it easily
Before:
After:
Ref:
Added some more modules and controllers to test
looks good. could you also remove hello from first
being printed in the console as part of the PR for this issue?
Description
Presently the cli imports one object in a single import statements even if they are from the same package. Tweak the CLI to club imports from the same package into a single import statement.
References
Current Behaviour:
Expected Behaviour
LoC to refer: monitoring module schematics and monitoring generation cli