Giter Club home page Giter Club logo

devon4ts's Introduction

devonfw default community health files

Apache License, Version 2.0

devonfw is a standard development platform and consists of many repositories. This repository is for default community health files of this entire devonfw github organization.

devon4ts's People

Contributors

dependabot[bot] avatar sjimenez77 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

devon4ts's Issues

npm start shouln't restart when you change the code

Category:

Bug

Severity: High

Expected behaviour:

When you start the application, it will remain active even if you change the content of the code. For development it can be useful that the application restarts every time you change the code, so you can add a different script for this purpose.

In nestjs template, this behaviour is present in the start and start:dev scripts.

Actual/current behaviour:

start and start:dev scripts have the same behaviour: restart the application on code change.

Comments:

Plase recover the original nestjs scripts:

"start": "ts-node -r tsconfig-paths/register src/main.ts",
"start:dev": "nodemon",

Database configuration

Category:

Enhancement

Severity:

High

Description of issue:

The configuration of the database is inside the app.module.ts file. To be more flexible this configuration should be in a separate file. For example: using the ormconfig. Typeorm offers this behavior using the ormconfig.json file.

Update coding conventions documentation

Expected behavior

As a < type of user >, I want < some goal > so that < some reason >

Actual behavior

Steps to reproduce (bug) / Use Case of feature request (enhancement)

Related/Dependent Issues

Comments/Hints:

Affected version:

  • OS: Windows/Linux/Mac?
  • Browser: Chrome/Firefox/Safari?

Please, no husky by default

Category:

Enhancement

Severity:

Critical

Description of issue:

Having to wait to pass the tests every time you commit, even if you only change the README.md, is a waste of time. Besides, nothing prevents the developer from deactivating this in his local environment, so in my opinion it's useless. There are other more effective techniques to check that all commits/push pass the tests.

So, please disable husky by default.

The tsconfig.json is not well generated

Expected behavior

tsconfig.json should include custom properties

Actual behavior

Steps to reproduce (bug) / Use Case of feature request (enhancement)

Related/Dependent Issues

Comments/Hints:

Affected version:

  • OS: Windows/Linux/Mac?
  • Browser: Chrome/Firefox/Safari?

Swagger shouldn't be available for all environments

Category:

Bug

Severity:

High

Expected behaviour:

As swagger should only be used for development purposes, it should only be available in development environments and NEVER in a production environment.

Actual/current behaviour:

Swagger is available for all environments.

Comments:

The only thing to do here is to change line 13 of the main.ts file from:

if (hostDomain) {

to:

if (AppModule.isDev) {

Samples step by step

In step by step tutorial, step 4.IV and 5 aren't working due to outdated command lines:
@ApiModelPropertyOptional()
@ApiUseTag

Error when you introduce an application name in camel case

Expected behavior

As a developer, I want to be able to introduce an application name in camel case so that I will create a new application with that name

Actual behavior

When you introduce a name in camel case it throws an error.

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. execute the command: d4n new myApp

Related/Dependent Issues

Comments/Hints:

Affected version:

latest

  • OS: Windows/Linux/Mac?
  • Browser: Chrome/Firefox/Safari?

DISCUSSION: Data transfer object VS view model.

Category:

Question

Severity:

Low

Comments

Currently, all models of the responses are inside a folder called view-model. In addition, they all have a name ending in -vm.ts.

In my opinion, as in this case we have no view and the model is used to transfer the data in the response, those models should be called data transfer objects (dto). Does it make sense? I think in devon4j they use this nomenclature.

My proposal is to change all references from view-model to dto (or to). As the title says, this is a discussion and maybe our main architect @ivanderk can show us the correct way.

CC @sjimenez77

Definition check after usage

Hello,

I was just looking the TODO example when I realised that in the role.guard.ts there is an undefined check of a variable after being accessed in this line.

P.D.: I would do a PR but I don't have time right now sorry :(

Strict mode

Category:

Enhancement

Severity:

Medium

Expected enhacement:

Enable the strict mode in tsconfig.json file. I know that by activating this the creation of entities and data becomes much more complicated, as strict enables strictPropertyInitialization, but nothing prevents us from activating the other 5 properties that strict enables. These are:

  • noImplicitAny
  • noImplicitThis
  • alwaysStrict
  • strictNullChecks
  • strictFunctionTypes

start:prod doesn't work

Category:

Bug

Severity:

Critical

Expected behaviour:

When you start the application for a production environment (compiling the .ts files and using node instead of ts-node -> npm run start:prod) the application should start successfully.

Actual/current behaviour:

The application shows the following error:

C:\Users\darrodri\Documents\Proyectos\devon4node\template (develop) ([email protected])
λ npm run start:prod

> [email protected] prestart:prod C:\Users\darrodri\Documents\Proyectos\devon4node\template
> rm -rf dist && tsc


> [email protected] start:prod C:\Users\darrodri\Documents\Proyectos\devon4node\template
> node dist/main.js

C:\Users\darrodri\Documents\Proyectos\devon4node\template\node_modules\config\lib\config.js:832
    throw new Error("Cannot parse config file: '" + fullFilename + "': " + e3);
    ^

Error: Cannot parse config file: 'C:\Users\darrodri\Documents\Proyectos\devon4node\template\config\default.ts': Error: Cannot find module 'ts-node'
    at Config.util.parseFile (C:\Users\darrodri\Documents\Proyectos\devon4node\template\node_modules\config\lib\config.js:832:11)
    at C:\Users\darrodri\Documents\Proyectos\devon4node\template\node_modules\config\lib\config.js:594:28
    at Array.forEach (<anonymous>)
    at C:\Users\darrodri\Documents\Proyectos\devon4node\template\node_modules\config\lib\config.js:590:14
    at Array.forEach (<anonymous>)
    at Config.util.loadFileConfigs (C:\Users\darrodri\Documents\Proyectos\devon4node\template\node_modules\config\lib\config.js:589:13)
    at new Config (C:\Users\darrodri\Documents\Proyectos\devon4node\template\node_modules\config\lib\config.js:136:27)
    at Object.<anonymous> (C:\Users\darrodri\Documents\Proyectos\devon4node\template\node_modules\config\lib\config.js:1637:31)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start:prod: `node dist/main.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start:prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\darrodri\AppData\Roaming\npm-cache\_logs\2018-11-20T16_39_18_425Z-debug.log

Steps to reproduce:

Execute npm run start:prod in the template folder.

Description of issue:

As you can see in the error, this is related to the config files. We never compile it so node can't run it.

Issue while creating new application

Expected behavior

As a use, I want to create new application using devon4node using command devon4node new myApp .

Actual behavior

As project name is mentioned using camel case project creation fails. I am able to create project with simple name such as employee.

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. Install devon4node CLI
    Execute the command npm i -g @devon4node/cli

  2. Create the new application
    Execute the command devon4node new myApp

Affected version:

  • OS: Windows

Add security by default

Category:

Enhancement

Severity:

Medium

Expected enhacement

Add in the template the security described in the official nestjs documentation..
If some part, like CRSF, we consider not necessary by default, we can leave an example in another part of the repository called, for example, snippets.
In my opionion helmet and cors must be enabled by default (currently only cors is enabled).

Implement search by criteria service

Category: enhancement

Severity: Medium

Description of issue / expected enhacement /Comments

Currently, we have a getTodos service implemented here which returns the complete list of Todos elements. Unfortunately, there is no service implemented for searching Todo items by some criteria.

I don't think it would be hard to implement this and it would be very interesting for our current devon4ng client application, which contains a search by criteria.

Installing schematics fails with package managers other than yarn

Expected behavior

As a developer using npm I want to be able to install schematics.

Actual behavior

When trying to use the convict schematic, package installation fails when npm is configured as package manager.

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. Create a new nest.js project
  2. Select npm as the package manager
  3. install @devon4node/schematics
  4. run nest g -c @devon4node/schematics convict

Related/Dependent Issues

Comments/Hints:

yarn is hard-coded in tree-utils in line 90

Affected version:

@devon4node/schematics: 5.0.1
@nestjs/cli: 9.0.0
node: 18.16.12

Login as waiter waiter

As a developer, I want to be able to log-in using as username waiter and password waiter so that we have an standard way to access every application of devonfw.

In MyThaiStar and CobiGen generated front-ends we are able to log-in using waiter and password waiter. I would like to have the same for devon4node :)

devon4node CLI command autocompletion

Expected behavior

Actual behavior

_yargs_completions() does not work well or at all.

Steps to reproduce (bug) / Use Case of feature request (enhancement)

Related/Dependent Issues

Need for a more in deep explanation on how to configure it.

Comments/Hints:

Affected version:

  • OS: Windows/Linux/Mac?
  • Browser: Chrome/Firefox/Safari?

Obsolete rule causes typescript eslint to fail

Expected behavior

The rule '@typescript-eslint/interface-name-prefix': 'off', defined in .eslintrc.js should enforce an interface naming rule.

Actual behavior

This rule has been removed in @typescript-eslint latest versions, causing the linter to not work as expected. It invalidates all JS files instead.

Comments/Hints:

Use latest recommended rule definition:

https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md#enforce-that-interface-names-do-not-begin-with-an-i

Dockerfile template for devon4node

Category:

enhancement

Severity:

Low

Description of issue

As most projects using devon4node will be deployed in a dockerized environment, it would be nice to have an example Dockerfile for devon4node projects.
This doesn't need to be included in the current template, it could be available elsewhere in the repository.

devon4node cli database command

As it may confuse some people, I would like to see an example about how to execute a database command so that it's clear how it's done.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.