GithubHelp home page GithubHelp logo

feathers-plus / generator-feathers-plus Goto Github PK

View Code? Open in Web Editor NEW
44.0 12.0 30.0 7.15 MB

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/

License: Other

JavaScript 56.43% HTML 17.39% TypeScript 26.18%

generator-feathers-plus's Introduction

@feathers-plus/generator-feathers-plus

This project is no longer maintained

This Yeoman generator is used with @feathers-plus/cli.

This project started as a heavily refactored version of @feathersjs/cl by David Luecke.

Copyright (c) 2017-18 John J. Szwaronek. Licensed under the MIT license.

generator-feathers-plus's People

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  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

generator-feathers-plus's Issues

schema property oneOf should generate model with appropriate type

Steps to reproduce

Using the following schema snippet:

oneOf: [{
  type: {enum: ['text']},
  body: {type: 'string'}
}, {
  type: {enum: ['media']},
  body: {type: 'string'},
  media: {type: 'string'}
}]

Expected behavior

Create model properties with name(s) of key and appropriate type(s) (sequelize ex.):

type: {type: DataTypes.ENUM('text', 'media')},
body: {type: DataTypes.TEXT},

Actual behavior

Creates model property with name oneOf and type string (sequelize ex.):

oneOf: {type: DataTypes.TEXT}

GraphQL service fails if service incorrectly has no fields configured.

Throw on .listen() or .setup() if a service is included in GraphQL but it has no fields defined in its schema. Of course this service should have specified graphql: false on the prompts.

generate graphql should check for this. It should display a message for each such service found and then terminate without generating files.

Multiple test-expands have no fields for user1. Adding fields will change multiple other files. There is time consuming work to make these test run after this problem is fixed.

to much files been generated for services with db connection

Why are more files been generated as needed, when generating a sevice and selecting an db-connection?

In this example with sequelize and mysql, the files users.mongo.js and users.mongoose.js aren't needed. Same happend when selecting mongodb. Then sequelize and mongoose files aren't needed.
Didn't checked all combinations.
I'm expecting only one of them to be genereated.

? What is the name of the service? users
? What would you call one row in the users database? user
? What kind of service is it? Sequelize
? Place service code in which nested folder, e.g. v1/blog? (optional)
? Which path should the service be registered on? /users
? Should this be served by GraphQL? Yes
skip src\services\users\users.class.js
skip src\services\users\users.interface.js
skip src\app.interface.ts
skip src\typings.d.ts

? Which database are you connecting to? MySQL (MariaDB)
? What is the database connection string? mysql://root:@localhost:3306/xyz
skip src\typings.d.ts
No locked version found for mysql2, installing latest.
skip src\typings.d.ts
force config\default.json
create test\services\users.test.js
create src\models\users.model.js
create src\services\users\users.service.js
create src\services\users\users.schema.js
create src\services\users\users.mongo.js
create src\services\users\users.mongoose.js

create src\services\users\users.sequelize.js
create src\services\users\users.validate.js
create src\services\users\users.hooks.js
force src\services\index.js
force src\app.js
create src\sequelize.js

Schema `type: "object"` fails on generate

Have been attempting some of the json-schema validations here:
https://code.tutsplus.com/tutorials/validating-data-with-json-schema-part-1--cms-25343

Appears to fail whenever using type: 'object' for example:

let schema = {
  properties: {
    address: {
      type: 'object',
      additionalProperties: { type: 'string' },
      maxProperties: 6,
      required: ['street', 'postcode', 'city', 'country']
    },
  }
};

Fails with this console error when running feathers-plus generate all:

events.js:183
      throw er; // Unhandled 'error' event
      ^

TypeError: subTypes.map is not a function

Is this a known/acceptable behaviour?

Write tests for each of the 34 adapter/database combinations

This would check the correct adapter module is create, e.g. app/src/sequelize.js.

All 34 adapter/Db combinations were checked for both f+/cli and f/cli. They need to be rechecked.

A test is needed for each to ensure this doesn't break again.

Const Name are not generated correctly in services index.js file

Steps to reproduce

The issue was found to be solved here: feathersjs/feathers#539
However it seems the issue persist when using feathers-plus generate service

  1. Create a new service feathers-plus generate service

  2. When asked what to name the service use camelCase
    Example: newServiceMethod

  3. Choose custom method, no authentication, yes to GraphQL, leave everything else on defaults.

  4. Check index.js inside services, the system has used dashes to seperate the words where the Uppercases were.

Javascript variables using dashes is invalid.

Expected behavior

I expected it to use the CamelCase words given during the naming of the service inside of the index.js inside the services folder. Like the feathers-plus generate hooks does.

Actual behavior

It used the dashes instead.

I try to work on it myself, but I dont know how the magic of the cli works.
Hooks has no problem with camelCasing when adding itself to the .hooks js file you specify it too.

You should create new connection strings via "generate service"

The normal way to create a connection is to create a service using that connection with `generate service". You will be prompted for the connection params after the service params.

If you create a connection first, say for Sequelize and MySQL, and then create the first service to use it, the sequelize.js module will not be created. You need to either run generate all or rerun generate service for the same service. The generated code correct after this.

Fixing this is a chicken-or-the-egg issue. Its not a critical issue, and we will address it at some later time.

quickValidate in service.validate.ts is generated wrong

Generated code:

let quickValidate = (method: string, data: any, options?: any) => {
  try {
    if (method === 'create') { validateCreate(options)({ type: 'before', method: 'create', data }); }
    if (method === 'update') { validateCreate(options)({ type: 'before', method: 'update', data }); }
    if (method === 'patch') { validateCreate(options)({ type: 'before', method: 'patch', data }); }
  } catch (err) {
    return err;
  }
};

Error:
TS2345: Argument of type '{ type: "before"; method: string; data: any; }' is not assignable to parameter of type 'HookContext<any>'.   Property 'app' is missing in type '{ type: "before"; method: string; data: any; }'.

Upgrade json-schema-fakes when new version settles down.

json-schema-seeder has json-schema-fakes as a dependency. The latter has a breaking change in r16. Its not returning fake data during testing. It may also be mutating its parameters.

We're locked down using r15 ATM. Upgrade to r16 when the time is right.

Support clusters

if (cluster.isMaster) {
  for (let i = 0; i < numCPUs; i++) {
    cluster.fork();
  }
} else {
    const app = express(feathers());
    
    app.configure(socketio({
        transports: ['websocket'], // ensure the same worker handles websocket connections
        pingInterval: 10000,
        pingTimeout: 50000, //setting pingTimeout and pingInterval fixes timer warnings on Android
    }));
    app.configure(configuration());

    app.configure(sync({
        uri: app.get('mongodb'),
        collection: 'events'
    }));
...
    module.exports = app;
}

Generator breaking when adding project sub-directories with node_modules

Steps to reproduce

Hello,
I've been playing around with the generator-feathers-plus and noticed that the generator started breaking after adding the frontend client/ directory.

To reproduce, simply run:

  1. npx create-react-app client
  2. cd client && npm install
  3. cd .. && feathers-plus generate all

From line 45 in code-fragments.js:
${destinationRoot}/**/*.{js,ts}`, { ignore: `${destinationRoot}/node_modules/**` }
We can see that the node_modules directory are not being ignored for subdirectories,
Changing this line to:
${destinationRoot}/**/*.{js,ts}`, { ignore: `${destinationRoot}/**/node_modules/**` }
resolved the issue for me

Expected behavior

The generator should run the prompts

Actual behavior

The generator exits with an error:

Using generator version 0.2.24
{ Error: EISDIR: illegal operation on a directory, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at fs.readFileSync (fs.js:583:19)
    at extractFiles (/Users/joao/.nvm/versions/node/v8.9.0/lib/node_modules/@feathers-plus/cli/node_modules/@feathers-plus/generator-feathers-plus/lib/code-fragments.js:64:25)

System configuration

NodeJS version:
v8.9.0

Operating System:
macOS

Option JWT token to never expire

Actually, you can pass { ignoreExpiration: true } in the jwt options when you setup your authentication.

For actual time "jwt": { expiresIn": "0d" }

Model creation has to change for tests to run

Mongoose fixed with
let returns = mongooseClient.models['users'] || mongooseClient.model('users', users)

Sequelize, Knex, RethinkDB need to be tested and a similar change made if necessary.

Fix test cumulative-6-generators.test

When the generators are called the prompts don't seem to be passed properly, at least for connections. It may be that yeoman's queueing design passes those prompts to the next generator call.

In any case a superious feathers-gen-specs.json#connections["undefined"] is created.

createdAt, updatedAt for Sequelize

JSON-schema is DB agnostic. That implies createdAt and updatedAt should be defined in the schema. Fake data would also be created for them. Unfortunately faker generates date like "Wed Nov 29 2017 23:36:24 GMT-0500 (Eastern Standard Time)", and chance like Fri Aug 16 1985 00:00:00 GMT-0400 (EDT) or '4/1/1968' or 1968/1/4. Do you think mySql would convert one of those strings if it was in the .create() to what it needs?

Otherwise I have to look into creating a custom expression to use Moment to convert one of the above to a compatible format for mySql/sqLite and for Postgress

The JSON-schema format is also available for a random date
// schema
createdAt: { format: 'date-time' },
updatedAt: { format: 'date' },
// data
"createdAt": "2001-12-03T13:58:13.262Z",
"updatedAt": "2001-12-01"

Regenerating service doesn't work (deletes my schema changes)

Steps to reproduce

(First please check that this issue is not already solved as described
here
)

  • [ x] Tell us what broke. The more detailed the better.

I'm following the Get Started-tutorial. When updating the users model by updating the users.schema.js file and running feathers-plus generate service "nothing" happens, my changes are removed.

I'm using js and the following options:

  "options": {
    "ver": "1.0.0",
    "inspectConflicts": true,
    "semicolons": true,
    "freeze": [],
    "ts": false
  },
  • [ x] If you can, please create a simple example that reproduces the issue and link to a gist, jsbin, repo, etc.

Exact code as in the Feathers Models adding the Feathers Model.

Expected behavior

The users.schema.js file should keep the schema changes I added when regenerating the service and fill in the other modules. Command used:

feathers-plus generate service

Actual behavior

The users.schema.js file is reset to default empty state, nothing is generated.

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working):

 "dependencies": {
    "@feathersjs/authentication": "^2.1.7",
    "@feathersjs/authentication-jwt": "^2.0.1",
    "@feathersjs/authentication-local": "^1.2.1",
    "@feathersjs/configuration": "^1.0.2",
    "@feathersjs/errors": "^3.3.0",
    "@feathersjs/express": "^1.2.3",
    "@feathersjs/feathers": "^3.1.7",
    "@feathersjs/primus": "^3.2.1",
    "@feathersjs/socketio": "^3.2.2",
    "ajv": "^6.5.2",
    "compression": "^1.7.2",
    "cors": "^2.8.4",
    "feathers-hooks-common": "^4.11.0",
    "feathers-sequelize": "^3.1.2",
    "helmet": "^3.12.1",
    "lodash.merge": "^4.6.1",
    "mysql2": "^1.5.3",
    "sequelize": "^4.38.0",
    "serve-favicon": "^2.5.0",
    "winston": "^3.0.0",
    "ws": "^5.2.2"
  },

feathers-plus v0.4.11
Using generator version 0.2.16

NodeJS version:
node v8.10.0

Operating System:
Windows 10 Enterprise 1709 build 16299.431

Unable to regenerate validate and mongoose schemas

Expected behavior

The regenerate using feathers-plus g service and then users service should regenerate the mongoose and validate schemas after editing the schema file.

Schema File

// Define the Feathers schema for service `users`. (Can be re-generated.)
// !code: imports // !end
// !code: init // !end

// Define the model using JSON-schema
let schema = {
  // !<DEFAULT> code: schema_header
  title: 'Users',
  description: 'Users database.',
  // !end
  // !code: schema_definitions // !end

  // Required fields.
  required: [
    // !code: schema_required
    'username',
    // !end
  ],
  // Fields with unique values.
  uniqueItemProperties: [
    // !code: schema_unique
    'username',
    // !end
  ],

  // Fields in the model.
  properties: {
    // !code: schema_properties
    id: { type: 'ID' },
    name: {
      type: 'object',
      properties: {
        firstName: {
          type: 'string',
          minLength: 2,
          maxLength: 15,
          faker: 'name.firstName',
        },
        lastName: {
          type: 'string',
          minLength: 2,
          maxLength: 15,
          faker: 'name.lastName',
        },
      },
    },
    username: { type: 'string', faker: 'internet.userName' },
    password: { type: 'string', chance: { hash: { length: 60 } } },
    email: {
      type: 'string',
      minLength: 8,
      maxLength: 40,
      faker: 'internet.email',
    },
    // !end
  },
  // !code: schema_more // !end
};

// Define optional, non-JSON-schema extensions.
let extensions = {
  // GraphQL generation.
  graphql: {
    // !code: graphql_header
    name: 'User',
    service: {
      sort: { _id: 1 },
    },
    // sql: {
    //   sqlTable: 'Users',
    //   uniqueKey: '_id',
    //   sqlColumn: {
    //     __authorId__: '__author_id__',
    //   },
    // },
    // !end
    discard: [
      // !code: graphql_discard // !end
    ],
    add: {
      // !<DEFAULT> code: graphql_add
      // __author__: { type: '__User__!', args: false, relation: { ourTable: '__authorId__', otherTable: '_id' } },
      // !end
    },
    // !code: graphql_more // !end
  },
};

// !code: more // !end

let moduleExports = {
  schema,
  extensions,
  // !code: moduleExports // !end
};

// !code: exports // !end
module.exports = moduleExports;

// !code: funcs // !end
// !code: end // !end

Actual behavior

The mongoose and validate files are not regenerated.

? What is the name of the service? users

We are updating an existing service in dir chatapp-api-plus

Run "feathers-plus generate graphql" afterwards if you want any
schema changes to also be handled in GraphQL.

? What is the name of the service? users
? What would you call one row in the users database? user
? What kind of service is it? Mongoose
? Place service code in which nested folder, e.g. `v1/blog`? (optional) admin
? Which path should the service be registered on? /users
? Does the service require authentication? Yes
? Should this be served by GraphQL? Yes
     skip src/typings.d.ts
     skip src/mongoose.js
     skip src/typings.d.ts
     skip src/mongoose.js
     skip test/services/users.test.js
     skip src/services/admin/users/users.class.js
     skip src/services/admin/users/users.interface.js
     skip src/app.interface.ts
     skip src/typings.d.ts
    force config/default.json
    force src/app.js
    force src/models/admin/users.model.js
    force src/services/admin/users/users.service.js
    force src/services/admin/users/users.schema.js
    force src/services/admin/users/users.mongo.js
    force src/services/admin/users/users.mongoose.js
    force src/services/admin/users/users.sequelize.js
    force src/services/admin/users/users.validate.js
    force src/services/admin/users/users.hooks.js
    force src/services/index.js

NodeJS version:
v10.1.0

Operating System:
Distributor ID: LinuxMint
Description: Linux Mint 18.3 Sylvia
Release: 18.3
Codename: s

TypeScript compilation error after adding the first service - service x.validate has not exported member 'create'

Steps to reproduce

  • Create a configuration with feathers-plus generate options selecting TypeScript and semicolon enabled
  • Generate the app with feathers-plus generate app, all options to default
  • Start the empty application (this works): npm start
  • Stop the application
  • Add a new service called 'messages' with feathers-plus generate service, all options to default
  • Start the application with npm start and the TypeScript compilation error is shown

Expected behavior

I expected that Feathers was started without any problems

Actual behavior

An TypeScript compilation error occurred:

TSError: ⨯ Unable to compile TypeScript:
src/services/messages/messages.hooks.ts(11,10): error TS2305: Module '"[full path]/src/services/messages/messages.validate"' has no exported member 'create'.
src/services/messages/messages.hooks.ts(11,18): error TS2305: Module '"/[full path]/src/services/messages/messages.validate"' has no exported member 'update'.
src/services/messages/messages.hooks.ts(11,26): error TS2305: Module '"[full path]/src/services/messages/messages.validate"' has no exported member 'patch'.
src/services/messages/messages.hooks.ts(11,33): error TS2305: Module '"[full path]/src/services/messages/messages.validate"' has no exported member 'validateCreate'.
src/services/messages/messages.hooks.ts(11,49): error TS2305: Module '"/[full path]/src/services/messages/messages.validate"' has no exported member 'validateUpdate'.
src/services/messages/messages.hooks.ts(11,65): error TS2305: Module '"[full path]/src/services/messages/messages.validate"' has no exported member 'validatePatch'.

After commenting out the import { create, update, patch, validateCreate, validateUpdate, validatePatch } from './messages.validate'; line in messages.hooks.ts, the application starts without any problems.

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working):

"dependencies": {
    "@feathersjs/authentication": "^2.1.7",
    "@feathersjs/authentication-jwt": "^2.0.1",
    "@feathersjs/authentication-local": "^1.2.1",
    "@feathersjs/configuration": "^2.0.2",
    "@feathersjs/errors": "^3.3.2",
    "@feathersjs/express": "^1.2.5",
    "@feathersjs/feathers": "^3.2.1",
    "@feathersjs/socketio": "^3.2.4",
    "ajv": "^5.5.2",
    "compression": "^1.7.3",
    "cors": "^2.8.4",
    "feathers-hooks-common": "^4.16.3",
    "feathers-nedb": "^3.1.0",
    "helmet": "^3.13.0",
    "lodash.merge": "^4.6.1",
    "nedb": "^1.8.0",
    "serve-favicon": "^2.5.0",
    "winston": "^3.0.0"
  },
  "devDependencies": {
    "@types/compression": "0.0.36",
    "@types/cors": "^2.8.4",
    "@types/feathersjs__authentication": "^2.1.1",
    "@types/feathersjs__authentication-jwt": "^1.0.3",
    "@types/feathersjs__authentication-local": "^1.0.2",
    "@types/feathersjs__configuration": "^1.0.1",
    "@types/feathersjs__errors": "^3.2.1",
    "@types/feathersjs__express": "^1.1.4",
    "@types/feathersjs__feathers": "^3.0.4",
    "@types/feathersjs__socketio": "^3.0.3",
    "@types/helmet": "0.0.40",
    "@types/lodash.merge": "^4.6.4",
    "@types/mocha": "^5.2.5",
    "@types/nedb": "^1.8.5",
    "@types/request-promise": "^4.1.42",
    "@types/serve-favicon": "^2.2.30",
    "@types/winston": "^2.4.4",
    "eslint": "^5.5.0",
    "mocha": "^5.2.0",
    "request": "^2.88.0",
    "request-promise": "^4.2.2",
    "ts-mocha": "^2.0.0",
    "ts-node": "^7.0.1",
    "ts-node-dev": "^1.0.0-pre.28",
    "tslint": "^5.11.0",
    "typescript": "^3.0.3"
  }

NodeJS version: v8.11.2

Operating System: macOS 10.13.5

Browser Version:

React Native Version:

Module Loader: TypeScript 3.0.3 with ts-node 7.0.1

JSON-schema Range not supported

Steps to reproduce

src/services/myservice/myservice.schema.js

properties: {
    // !code: schema_properties
    someCount: {
      type: 'integer',
      min: 2,
      max: 10,
    },
    // !end
},

or

properties: {
    // !code: schema_properties
    someCount: {
      type: 'integer',
      minimum: 2,
      maximum: 10,
    },
    // !end
},

Expected behavior

Should support JSON-schema Range, https://json-schema.org/understanding-json-schema/reference/numeric.html#range and validate minumum and maximum for Number/Integer

Actual behavior

Tell us what happens instead

myservice.mongoose.js

    someCount: {
      type: Number,
      required: true
    },

Am able to successfully POST to localhost:3030/myservice with { "someCount" : 200 }. It should return validation error. Thanks!

mysql adapter template missing

When runing 'feathers-plus generate service' i got an file missing error for mysql.ejs adapter.

Using generator version 0.6.37

? What is the name of the service? users...gen service name validate. input= users
...updating service

? What is the name of the service? users
? What would you call one row in the users database? user
? What kind of service is it? Sequelize
? Place service code in which nested folder, e.g. v1/blog? (optional)
? Which path should the service be registered on? /users
? Should this be served by GraphQL? Yes
skip src\services\users\users.class.js
skip src\services\users\users.interface.js
skip src\app.interface.ts
skip src\typings.d.ts
? Which database are you connecting to? MySQL (MariaDB)
? What is the database connection string? mysql://root:@localhost:3306/feathers_graphql
skip src\typings.d.ts
events.js:183
throw er; // Unhandled 'error' event
^

AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules@feathers-plus\generator-feathers-plus\generators\writing\templates\src_adapters\mysql.ejs
at EditionInterface.exports.copy (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules\mem-fs-editor\lib\actions\copy.js:48:3)
at EditionInterface.module.exports [as copyTpl] (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:29:8)
at todos.forEach (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules@feathers-plus\generator-feathers-plus\lib\generator-fs.js:48:24)
at Array.forEach ()
at generatorFs (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules@feathers-plus\generator-feathers-plus\lib\generator-fs.js:26:9)
at connection (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules@feathers-plus\generator-feathers-plus\generators\writing\index.js:848:5)
at generatorWriting (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules@feathers-plus\generator-feathers-plus\generators\writing\index.js:274:7)
at ConnectionGenerator.writing (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules@feathers-plus\generator-feathers-plus\generators\connection\index.js:176:5)
at Object. (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules\yeoman-generator\lib\index.js:424:27)
at C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules\run-async\index.js:25:25
at new Promise ()
at C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules\run-async\index.js:24:19
at self.env.runLoop.add.completed (C:\Users\xyz\AppData\Roaming\npm\node_modules@feathers-plus\cli\node_modules\yeoman-generator\lib\index.js:425:13)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)

Option to prevent user from logging in more than once at al time

daffl:

const locks = {};

app.on('login', ({ accessToken }) => {
const decoded = jwt.decode(accessToken);
const { userId } = decoded;

locks[userId] = accessToken;
});

app.on('logout', ({ accessToken }) => {
const decoded = jwt.decode(accessToken);
const { userId } = decoded;

delete locks[userId];
});

app.service('authentication').hooks({
before: {
create [ /* other hooks first */ (context) {
const { payload = {} } = context.params;

  if (payload.userId && locks[payload.userId]) {
    throw new Error('You must log out first');
  }

  return context;
}

}
})

Default values not being copied to Sequelize model

They are copied into e.g. mongo, but not Sequelize.

*schema.ts

deleted: {
      type: 'boolean',
      default: false
    }

*mongo.ts

deleted: {
        default: false,
        bsonType: "boolean"
      }

*sequelize.ts

deleted: {
      type: DataTypes.BOOLEAN
    }

Allow dot.notation in service names

The present implementation of PR feathersjs-ecosystem/generator-feathers#379 "Fix renaming to preserve dot notation" (feathersjs-ecosystem/generator-feathers@5621a35) has been disabled in generators.service/index.js in f+/cli v0.7.35 using generator v0.6.34.

The JS service name is used to determine if the service already exists or if its new. A rudimentary fix would allow the devto enter base.users for a new service but the dev would have to enter baseUsers to regenerate it. That looks awkward.

Perhaps the service name prompt should be a valid JS name, and a new prompt should allow the developer to specify an optional folder name.

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.