very-express 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -28,7 +28,8 @@ config.jsonSchemaDir = args.j || args.jsonSchemaDir || config.jsonSchemaDir || "
28
28
  config.rootDir = args.o || args.rootDir || config.rootDir || ".";
29
29
  config.srcDir = config.srcDir || config.rootDir + "/src";
30
30
  config.openapiDir = config.openapiDir || config.rootDir + "./openapi";
31
- config.app.enableSwagger = config.app.enableSwagger || true,
31
+ config.app = config.app || {},
32
+ config.app.enableSwagger = config.app.enableSwagger || true,
32
33
  config.app.useUserSchema = config.app.useUserSchema || true,
33
34
  config.app.useObjectID = config.app.useObjectID || true,
34
35
  config.app.allowApiCreateUpdate_id = config.app.allowApiCreateUpdate_id || false,
@@ -42,7 +43,7 @@ config.useOauth = config.useOauth || {
42
43
  github: false
43
44
  };
44
45
  if (config.app.useObjectID && config.app.allowApiCreateUpdate_id) {
45
- logger_1.default.warn("Not recommended to use \"useObjectID\" with \"allowApiCreateUpdate_id\",\nthis may cause security issues");
46
+ logger_1.default.warn("Not recommended to use \"useObjectID\" with \"allowApiCreateUpdate_id\",\nthis may cause some logic issues");
46
47
  }
47
48
  logger_1.default.process("vex.config.json");
48
49
  (0, utils_1.writeFile)("vex.config", "vex.config.json", JSON.stringify(config, null, 4));
package/dist/index.js CHANGED
@@ -75,7 +75,6 @@ function generate(options) {
75
75
  utils.copyDir(`${__dirname}/templates/services`, dir.serviceDir, options, true);
76
76
  utils.copyDir(`${__dirname}/templates/plugins`, dir.pluginDir, options, true);
77
77
  utils.copyDir(`${__dirname}/templates/roles`, dir.roleDir, options, true);
78
- utils.copyDir(`${__dirname}/templates/middleware`, dir.middlewareDir, options, true);
79
78
  if (options.app.useUserSchema) {
80
79
  userSchemaGen.compile({
81
80
  compilerOptions: options || utils.defaultCompilerOptions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "very-express",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "based on json schema and openapi, generate Express RestApi server with mongoDb ",
5
5
  "author": "justin26l",
6
6
  "license": "MIT",