spice-js 2.6.24 → 2.6.26

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.
@@ -2,19 +2,23 @@
2
2
 
3
3
  var _path = _interopRequireDefault(require("path"));
4
4
 
5
+ var _fs = _interopRequireDefault(require("fs"));
6
+
5
7
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
8
 
9
+ var extender = require(_path.default.join(paths, file));
10
+
7
11
  spice.routers = {};
8
12
 
9
13
  var paths = _path.default.join(spice.root_path, "schema_extenders");
10
14
 
11
15
  spice.schemaExtenders = {};
12
16
 
13
- require("fs").readdirSync(paths).forEach(function (file) {
14
- if (file != "index.js") {
15
- var extender = require(_path.default.join(paths, file));
16
-
17
- spice.schemaExtenders[file.split(".")[0]] = extender;
18
- spice.schema_extenders = spice.schemaExtenders;
19
- }
20
- });
17
+ if (_fs.default.existsSync(paths)) {
18
+ _fs.default.readdirSync(paths).forEach(function (file) {
19
+ if (file != "index.js") {
20
+ spice.schemaExtenders[file.split(".")[0]] = extender;
21
+ spice.schema_extenders = spice.schemaExtenders;
22
+ }
23
+ });
24
+ }
package/build/index.js CHANGED
@@ -136,7 +136,9 @@ class Spice {
136
136
  require("koa-qs")(app, "extended");
137
137
 
138
138
  app.use(koaBody({
139
- formLimit: "1gb",
139
+ formLimit: "2gb",
140
+ jsonLimit: "1gb",
141
+ textLimit: "1gb",
140
142
  multipart: true,
141
143
  formidable: {
142
144
  uploadDir: "./storage/uploads",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spice-js",
3
- "version": "2.6.24",
3
+ "version": "2.6.26",
4
4
  "description": "spice",
5
5
  "main": "build/index.js",
6
6
  "repository": {
@@ -1,15 +1,17 @@
1
1
  import path from "path";
2
+ import fs from "fs";
3
+ let extender = require(path.join(paths, file));
2
4
 
3
5
  spice.routers = {};
4
6
 
5
7
  let paths = path.join(spice.root_path, "schema_extenders");
6
8
  spice.schemaExtenders = {};
7
- require("fs")
8
- .readdirSync(paths)
9
- .forEach(function (file) {
9
+
10
+ if (fs.existsSync(paths)) {
11
+ fs.readdirSync(paths).forEach(function (file) {
10
12
  if (file != "index.js") {
11
- let extender = require(path.join(paths, file));
12
13
  spice.schemaExtenders[file.split(".")[0]] = extender;
13
14
  spice.schema_extenders = spice.schemaExtenders;
14
15
  }
15
16
  });
17
+ }
package/src/index.js CHANGED
@@ -62,7 +62,9 @@ export default class Spice {
62
62
 
63
63
  app.use(
64
64
  koaBody({
65
- formLimit: "1gb",
65
+ formLimit: "2gb",
66
+ jsonLimit: "1gb",
67
+ textLimit: "1gb",
66
68
  multipart: true,
67
69
  formidable: {
68
70
  uploadDir: "./storage/uploads",