feathers-plus / generator-feathers-plus

A Yeoman generator to (re)generate a FeathersJS application supporting both REST and GraphQL architectural concepts and their query languages.

Home Page:https://generator.feathers-plus.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid import names generated for sequelize + ts

grbspltt opened this issue · comments

Steps to reproduce

  1. Generate app, then generate sequelize service

Expected behavior

Expect app.ts to properly import sequelize-mssql file.

Actual behavior

In ./src/app.ts imported sequelize-mssql variable name includes a '-' which prevents app from starting. When I regenerate the app the error returns.

// !code: imports // !end
import sequelize-mssql from './sequelize-mssql';

// Configure database adapters
app.configure(sequelize-mssql);`

System configuration

Tell us about the applicable parts of your setup.
{
"options": {
"ver": "1.0.0",
"inspectConflicts": false,
"semicolons": true,
"freeze": [],
"ts": true
},
"app": {
"environmentsAllowingSeedData": "test-dev",
"seedData": true,
"name": "test
"description": "test feathers project",
"src": "src",
"packager": "npm@>= 3.0.0",
"providers": [
"rest",
"socketio"
]
},
"services": {
"users": {
"name": "users",
"nameSingular": "user",
"subFolder": "",
"fileName": "users",
"adapter": "sequelize",
"path": "/users",
"isAuthEntity": true,
"requiresAuth": true,
"graphql": true
},
"roles": {
"name": "roles",
"nameSingular": "role",
"subFolder": "",
"fileName": "roles",
"adapter": "sequelize",
"path": "/roles",
"isAuthEntity": false,
"requiresAuth": true,
"graphql": true
},
"menu": {
"name": "menu",
"nameSingular": "menu",
"subFolder": "",
"fileName": "menu",
"adapter": "sequelize",
"path": "/menu",
"isAuthEntity": false,
"requiresAuth": true,
"graphql": true
}
},
"hooks": {},
"authentication": {
"strategies": [
"local"
],
"entity": "users"
},
"connections": {
"sequelize": {
"database": "mssql",
"adapter": "sequelize",
"connectionString": "mssql://test:test@localhost:1433/test"
}
}
}

Module versions (especially the part that's not working):
feathers-plus version 0.7.76
{
"dependencies": {
"@feathers-plus/test-utils": "^0.3.5",
"@feathersjs/authentication": "^2.1.15",
"@feathersjs/authentication-jwt": "^2.0.9",
"@feathersjs/authentication-local": "^1.2.9",
"@feathersjs/configuration": "^2.0.6",
"@feathersjs/errors": "^3.3.6",
"@feathersjs/express": "^1.3.1",
"@feathersjs/feathers": "^3.3.1",
"@feathersjs/socketio": "^3.2.9",
"ajv": "^5.5.2",
"compression": "^1.7.3",
"cors": "^2.8.5",
"cross-env": "^5.2.0",
"feathers-hooks-common": "^4.20.2",
"feathers-sequelize": "^3.1.3",
"helmet": "^3.15.0",
"lodash.merge": "^4.6.1",
"mssql": "^4.3.0",
"sequelize": "^4.42.0",
"serve-favicon": "^2.5.0",
"winston": "^3.1.0"
},
"devDependencies": {
"@types/compression": "0.0.36",
"@types/cors": "^2.8.4",
"@types/feathersjs__authentication": "^2.1.2",
"@types/feathersjs__authentication-jwt": "^1.0.4",
"@types/feathersjs__authentication-local": "^1.0.3",
"@types/feathersjs__configuration": "^1.0.1",
"@types/feathersjs__errors": "^3.2.1",
"@types/feathersjs__express": "^1.1.4",
"@types/feathersjs__feathers": "^3.1.1",
"@types/feathersjs__socketio": "^3.0.3",
"@types/helmet": "0.0.40",
"@types/lodash.merge": "^4.6.4",
"@types/mocha": "^5.2.5",
"@types/request-promise": "^4.1.42",
"@types/sequelize": "^4.27.34",
"@types/serve-favicon": "^2.2.30",
"@types/winston": "^2.4.4",
"mocha": "^5.2.0",
"nodemon": "^1.18.9",
"request": "^2.88.0",
"request-promise": "^4.2.2",
"ts-mocha": "^2.0.0",
"ts-node": "^7.0.1",
"tslint": "^5.12.1",
"typescript": "^3.2.4"
}
}

NodeJS version:
8.15.0
Operating System:
Windows 10.0.17134.523

Resolved via #181