@webresto/graphql 1.3.1 → 1.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. package/lib/eventHelper.js +1 -0
  2. package/lib/eventHelper.ts +1 -0
  3. package/package.json +1 -1
  4. package/src/additionalResolvers.js +33 -5
  5. package/src/additionalResolvers.ts +38 -5
  6. package/src/graphql.js +35 -22
  7. package/src/graphql.ts +38 -25
  8. package/src/resolvers/cart.d.ts +225 -7
  9. package/src/resolvers/cart.js +27 -7
  10. package/src/resolvers/cart.ts +24 -8
  11. package/src/resolvers/checkout.js +9 -7
  12. package/src/resolvers/checkout.ts +14 -9
  13. package/test/{_bootstrap.js → bootstrap.js} +6 -7
  14. package/test/bootstrap.ts +3 -0
  15. package/test/fixture/.sailsrc +14 -0
  16. package/test/fixture/api/controllers/.gitkeep +0 -0
  17. package/test/fixture/api/models/.gitkeep +0 -0
  18. package/test/fixture/api/services/.gitkeep +0 -0
  19. package/test/fixture/app-export.js +73 -73
  20. package/test/fixture/app.js +56 -56
  21. package/test/fixture/config/adminpanel.js +25 -3
  22. package/test/fixture/config/bootstrap.js +161 -0
  23. package/test/fixture/config/connections.js +9 -9
  24. package/test/fixture/config/env/development.js +10 -10
  25. package/test/fixture/config/env/production.js +16 -16
  26. package/test/fixture/config/globals.js +16 -16
  27. package/test/fixture/config/hookTimeout.js +8 -8
  28. package/test/fixture/config/http.js +93 -93
  29. package/test/fixture/config/i18n.js +57 -57
  30. package/test/fixture/config/log.js +29 -29
  31. package/test/fixture/config/models.js +8 -8
  32. package/test/fixture/config/modulemanager.js +22 -22
  33. package/test/fixture/config/policies.js +51 -51
  34. package/test/fixture/config/routes.js +49 -49
  35. package/test/fixture/config/session.js +100 -100
  36. package/test/fixture/config/sockets.js +141 -141
  37. package/test/fixture/config/views.js +94 -94
  38. package/test/fixture/hacks/waterline.js +39 -0
  39. package/test/fixture/package.json +33 -30
  40. package/test/fixture/seeds/dish.json +37042 -0
  41. package/test/fixture/seeds/group.json +1418 -0
  42. package/test/fixture/seeds/iikoDiscount.json +365 -0
  43. package/test/fixture/views/403.ejs +68 -68
  44. package/test/fixture/views/404.ejs +68 -68
  45. package/test/fixture/views/500.ejs +73 -73
  46. package/test/fixture/views/homepage.ejs +74 -74
  47. package/test/fixture/views/layout.ejs +91 -91
  48. package/test/integration/graphql.test.js +11 -0
  49. package/test/integration/graphql.test.ts +15 -0
  50. package/test/integration/order.test.js +86 -0
  51. package/test/integration/order.test.ts +108 -0
  52. package/test/{unit → integration}/sails_not_crash.test.js +0 -0
  53. package/test/{unit → integration}/sails_not_crash.test.ts +0 -0
  54. package/test/unit/first.test.js +1 -1
  55. package/test/unit/first.test.ts +1 -1
  56. package/test/fixture/.tmp/localDiskDb/archive.db +0 -1
  57. package/test/fixture/.tmp/localDiskDb/dish.db +0 -1
  58. package/test/fixture/.tmp/localDiskDb/dish_images__image_dish.db +0 -1
  59. package/test/fixture/.tmp/localDiskDb/group.db +0 -1
  60. package/test/fixture/.tmp/localDiskDb/group_images__image_group.db +0 -1
  61. package/test/fixture/.tmp/localDiskDb/image.db +0 -1
  62. package/test/fixture/.tmp/localDiskDb/maintenance.db +0 -1
  63. package/test/fixture/.tmp/localDiskDb/order.db +0 -1
  64. package/test/fixture/.tmp/localDiskDb/orderdish.db +0 -1
  65. package/test/fixture/.tmp/localDiskDb/paymentdocument.db +0 -1
  66. package/test/fixture/.tmp/localDiskDb/paymentmethod.db +0 -2
  67. package/test/fixture/.tmp/localDiskDb/place.db +0 -1
  68. package/test/fixture/.tmp/localDiskDb/settings.db +0 -2
  69. package/test/fixture/.tmp/localDiskDb/street.db +0 -1
  70. package/test/fixture/package-lock.json +0 -9805
  71. package/test.zip +0 -0
@@ -0,0 +1,161 @@
1
+ maintenanceSeed = [
2
+ {
3
+ id: "maintenance1",
4
+ title: "Сайт временно не работает",
5
+ description: "<div>\r\n<p>По техническим причинам доставка сейчас не осуществляется</p>\r\n</div>",
6
+ enable: false,
7
+ startDate: "2019-12-31T21:00:00.000Z",
8
+ stopDate: "2020-12-31T21:00:00.000Z",
9
+ },
10
+ ];
11
+
12
+ const fs = require("fs");
13
+ const path = require("path");
14
+
15
+ module.exports.bootstrap = async function () {
16
+ sails.config.paths.app = process.cwd();
17
+
18
+ /**
19
+ * # Bootsrap seeds from seeds folder
20
+ * Magic: filename.json where filename is model name
21
+ */
22
+
23
+ if (sails.config.models.migrate === "drop" || process.env.FORCE_SEED === "TRUE") {
24
+ sails.log.info("Seeding 🌱 process start")
25
+ try {
26
+ let seedsDir = process.env.SEED_PATH ? process.env.SEED_PATH : __dirname + "/../seeds/";
27
+ // load JSON data
28
+ let seeds = fs.readdirSync(seedsDir).filter(function (file) {
29
+ return path.extname(file).toLowerCase() === ".json";
30
+ });
31
+
32
+ for await (let seed of seeds) {
33
+ try {
34
+ let seedFile = seedsDir + seed;
35
+ let model = seed.split(".")[0].toLowerCase();
36
+ let json_seed_data = require(seedFile);
37
+
38
+ sails.log.info("🌱 Bootstrap > Seed for model: ", model);
39
+
40
+ if (sails.models[model]) {
41
+ await sails.models[model].destroy({}).fetch();
42
+ if (Array.isArray(json_seed_data)) {
43
+ for await (seed_item of json_seed_data) {
44
+ cleanSeedItem(seed_item);
45
+ await sails.models[model].create(seed_item).fetch();
46
+ }
47
+ sails.log.debug(`🌱 Bootstrap seed ${model}: > count: ${json_seed_data.length}`);
48
+ } else {
49
+ sails.log.debug(`🌱 Bootstrap seed ${model}: > one item`);
50
+ cleanSeedItem(seed_item);
51
+ await sails.models[model].create(json_seed_data).fetch();
52
+ }
53
+ sails.log.info(`Bootstrap seed model: > ${model} was seeded, count: ${json_seed_data.length}`);
54
+ } else {
55
+ sails.log.warn(`Bootstrap seed model: > ${model} SKIPED (model not present in sails)`);
56
+ }
57
+ } catch (error) {
58
+ sails.log.error(`🌱 Seeding error: ${error}`);
59
+ }
60
+ }
61
+
62
+ // Load JS files
63
+ seeds = fs.readdirSync(seedsDir).filter(function (file) {
64
+ return path.extname(file).toLowerCase() === ".js";
65
+ });
66
+
67
+ /**
68
+ * If file .queue exist then sort seedqueue by this file
69
+ */
70
+
71
+ if (fs.existsSync(seedsDir + ".queue")) {
72
+ var queuelist = fs
73
+ .readFileSync(seedsDir + ".queue")
74
+ .toString()
75
+ .split("\n");
76
+ let _seeds = [...seeds];
77
+ seeds = [];
78
+
79
+ // Build head loadlist of js seeds files
80
+ queuelist.forEach((qItem) => {
81
+ _seeds.forEach((sItem) => {
82
+ if (sItem.includes(qItem) && !isCommented(qItem)) {
83
+ seeds.push(sItem);
84
+ }
85
+ });
86
+ });
87
+
88
+ // Build foot
89
+ seeds = [...seeds, ..._seeds.filter((n) => !seeds.includes(n))];
90
+ }
91
+
92
+ for await (let seed of seeds) {
93
+ let seedFile = seedsDir + seed;
94
+ if (fs.existsSync(seedFile)) {
95
+ let bootstrap_model_seed = require(seedFile);
96
+ await bootstrap_model_seed.default(sails);
97
+ }
98
+ }
99
+ } catch (error) {
100
+ console.error("Bootstrap seeds error: > ", error);
101
+ }
102
+ }
103
+
104
+ await Settings.set("enableIikoSimpleDiscounts", true);
105
+ //////////////////////////////////////////////////////////
106
+
107
+ setTimeout(() => {
108
+ console.log("ADMINPANEL", sails.config.adminpanel.instances.discount)
109
+ }, 10000)
110
+
111
+ if (sails.config.models.migrate === "drop") {
112
+ // create init params for webresto
113
+ try {
114
+ if ((await Maintenance.count()) === 0) {
115
+ sails.log.verbose("BOOTSTRAP > Start Import Maintenance SEED");
116
+ await Maintenance.createEach(maintenanceSeed).fetch();
117
+ }
118
+
119
+ process.env.TZ = (await Settings.use("timezone")) ? await Settings.use("timezone") : process.env.TZ;
120
+
121
+ return
122
+ } catch (error) {
123
+ console.log(error);
124
+ }
125
+ } else {
126
+ process.env.TZ = (await Settings.use("timezone")) ? await Settings.use("timezone") : process.env.TZ;
127
+ return
128
+ }
129
+ return
130
+ };
131
+
132
+ function isCommented(str) {
133
+ return (Boolean(str) && (
134
+ str
135
+ .split(" ")
136
+ .filter((a) => {
137
+ return Boolean(a);
138
+ })[0]
139
+ .charAt(0) === "#"
140
+ ));
141
+ }
142
+
143
+
144
+ function cleanSeedItem(item) {
145
+
146
+ if(item.createdAt) delete(item.createdAt)
147
+ if(item.updatedAt) delete(item.updatedAt)
148
+ if(typeof item.id === "number") delete(item.id)
149
+
150
+ for (const [key, value] of Object.entries(item)) {
151
+ if (value === null || value === undefined) {
152
+ delete(item[key])
153
+ } else {
154
+ try {
155
+ let json_value = JSON.parse(value);
156
+ item[key] = json_value
157
+ } catch (e) {
158
+ }
159
+ }
160
+ }
161
+ }
@@ -1,9 +1,9 @@
1
- module.exports.connections = {
2
- // postgres: {
3
- // adapter: 'sails-postgresql',
4
- // host: process.env.PG_HOST === undefined ? '127.0.0.1' : process.env.PG_HOST,
5
- // user: process.env.PG_USER === undefined ? 'postgres' : process.env.PG_USER,
6
- // password: process.env.PG_PASSWORD === undefined ? 'postgres' : process.env.PG_PASSWORD,
7
- // database: process.env.PG_DATABASE === undefined ? 'testdb' : process.env.PG_DATABASE
8
- // }
9
- };
1
+ module.exports.connections = {
2
+ // postgres: {
3
+ // adapter: 'sails-postgresql',
4
+ // host: process.env.PG_HOST === undefined ? '127.0.0.1' : process.env.PG_HOST,
5
+ // user: process.env.PG_USER === undefined ? 'postgres' : process.env.PG_USER,
6
+ // password: process.env.PG_PASSWORD === undefined ? 'postgres' : process.env.PG_PASSWORD,
7
+ // database: process.env.PG_DATABASE === undefined ? 'testdb' : process.env.PG_DATABASE
8
+ // }
9
+ };
@@ -1,10 +1,10 @@
1
- module.exports = {
2
- // models: {
3
- // connection: 'postgres'
4
-
5
- // },
6
- port: process.env.PORT === undefined ? 42772 : process.env.PORT,
7
- log: {
8
- level: process.env.LOG_LEVEL === undefined ? 'verbose' : process.env.PORT
9
- }
10
- };
1
+ module.exports = {
2
+ // models: {
3
+ // connection: 'postgres'
4
+
5
+ // },
6
+ port: process.env.PORT === undefined ? 42772 : process.env.PORT,
7
+ log: {
8
+ level: process.env.LOG_LEVEL === undefined ? 'verbose' : process.env.PORT
9
+ }
10
+ };
@@ -1,16 +1,16 @@
1
- module.exports = {
2
- // models: {
3
- // connection: 'postgres',
4
- // migrate: 'safe'
5
- // },
6
- adminpanel:{
7
- auth: true
8
- },
9
- log: {
10
- level: 'info'
11
- },
12
- port: process.env.PORT === undefined ? 42772 : process.env.PORT,
13
- log: {
14
- level: "verbose"
15
- }
16
- };
1
+ module.exports = {
2
+ // models: {
3
+ // connection: 'postgres',
4
+ // migrate: 'safe'
5
+ // },
6
+ adminpanel:{
7
+ auth: true
8
+ },
9
+ log: {
10
+ level: 'info'
11
+ },
12
+ port: process.env.PORT === undefined ? 42772 : process.env.PORT,
13
+ log: {
14
+ level: "verbose"
15
+ }
16
+ };
@@ -1,16 +1,16 @@
1
- /**
2
- * THIS FILE WAS ADDED AUTOMATICALLY by the Sails 1.0 app migration tool.
3
- * The original file was backed up as `config/globals-old.js.txt`
4
- */
5
-
6
- module.exports.globals = {
7
-
8
- _: require('lodash'),
9
-
10
- async: require('async'),
11
-
12
- models: true,
13
-
14
- sails: true
15
-
16
- };
1
+ /**
2
+ * THIS FILE WAS ADDED AUTOMATICALLY by the Sails 1.0 app migration tool.
3
+ * The original file was backed up as `config/globals-old.js.txt`
4
+ */
5
+
6
+ module.exports.globals = {
7
+
8
+ _: require('lodash'),
9
+
10
+ async: require('async'),
11
+
12
+ models: true,
13
+
14
+ sails: true
15
+
16
+ };
@@ -1,8 +1,8 @@
1
- module.exports.orm = {
2
- _hookTimeout: 100000000
3
- };
4
-
5
- module.exports.pubsub = {
6
- _hookTimeout: 100000000
7
- };
8
-
1
+ module.exports.orm = {
2
+ _hookTimeout: 100000000
3
+ };
4
+
5
+ module.exports.pubsub = {
6
+ _hookTimeout: 100000000
7
+ };
8
+
@@ -1,93 +1,93 @@
1
- /**
2
- * HTTP Server Settings
3
- * (sails.config.http)
4
- *
5
- * Configuration for the underlying HTTP server in Sails.
6
- * Only applies to HTTP requests (not WebSockets)
7
- *
8
- * For more information on configuration, check out:
9
- * http://sailsjs.org/#!/documentation/reference/sails.config/sails.config.http.html
10
- */
11
-
12
- module.exports.http = {
13
-
14
- /****************************************************************************
15
- * *
16
- * Express middleware to use for every Sails request. To add custom *
17
- * middleware to the mix, add a function to the middleware config object and *
18
- * add its key to the "order" array. The $custom key is reserved for *
19
- * backwards-compatibility with Sails v0.9.x apps that use the *
20
- * `customMiddleware` config option. *
21
- * *
22
- ****************************************************************************/
23
-
24
- middleware: {
25
-
26
- /***************************************************************************
27
- * *
28
- * The order in which middleware should be run for HTTP request. (the Sails *
29
- * router is invoked by the "router" middleware below.) *
30
- * *
31
- ***************************************************************************/
32
-
33
- // order: [
34
- // 'startRequestTimer',
35
- // 'cookieParser',
36
- // 'session',
37
- // 'myRequestLogger',
38
- // 'bodyParser',
39
- // 'handleBodyParserError',
40
- // 'compress',
41
- // 'methodOverride',
42
- // 'poweredBy',
43
- // '$custom',
44
- // 'router',
45
- // 'www',
46
- // 'favicon',
47
- // '404',
48
- // '500'
49
- // ],
50
-
51
- /****************************************************************************
52
- * *
53
- * Example custom middleware; logs each request to the console. *
54
- * *
55
- ****************************************************************************/
56
-
57
- // myRequestLogger: function (req, res, next) {
58
- // console.log("Requested :: ", req.method, req.url);
59
- // return next();
60
- // }
61
-
62
-
63
- /***************************************************************************
64
- * *
65
- * The body parser that will handle incoming multipart HTTP requests. By *
66
- * default as of v0.10, Sails uses *
67
- * [skipper](http://github.com/balderdashy/skipper). See *
68
- * http://www.senchalabs.org/connect/multipart.html for other options. *
69
- * *
70
- * Note that Sails uses an internal instance of Skipper by default; to *
71
- * override it and specify more options, make sure to "npm install skipper" *
72
- * in your project first. You can also specify a different body parser or *
73
- * a custom function with req, res and next parameters (just like any other *
74
- * middleware function). *
75
- * *
76
- ***************************************************************************/
77
-
78
- // bodyParser: require('skipper')({strict: true})
79
-
80
- },
81
-
82
- /***************************************************************************
83
- * *
84
- * The number of seconds to cache flat files on disk being served by *
85
- * Express static middleware (by default, these files are in `.tmp/public`) *
86
- * *
87
- * The HTTP static cache is only active in a 'production' environment, *
88
- * since that's the only time Express will cache flat-files. *
89
- * *
90
- ***************************************************************************/
91
-
92
- // cache: 31557600000
93
- };
1
+ /**
2
+ * HTTP Server Settings
3
+ * (sails.config.http)
4
+ *
5
+ * Configuration for the underlying HTTP server in Sails.
6
+ * Only applies to HTTP requests (not WebSockets)
7
+ *
8
+ * For more information on configuration, check out:
9
+ * http://sailsjs.org/#!/documentation/reference/sails.config/sails.config.http.html
10
+ */
11
+
12
+ module.exports.http = {
13
+
14
+ /****************************************************************************
15
+ * *
16
+ * Express middleware to use for every Sails request. To add custom *
17
+ * middleware to the mix, add a function to the middleware config object and *
18
+ * add its key to the "order" array. The $custom key is reserved for *
19
+ * backwards-compatibility with Sails v0.9.x apps that use the *
20
+ * `customMiddleware` config option. *
21
+ * *
22
+ ****************************************************************************/
23
+
24
+ middleware: {
25
+
26
+ /***************************************************************************
27
+ * *
28
+ * The order in which middleware should be run for HTTP request. (the Sails *
29
+ * router is invoked by the "router" middleware below.) *
30
+ * *
31
+ ***************************************************************************/
32
+
33
+ // order: [
34
+ // 'startRequestTimer',
35
+ // 'cookieParser',
36
+ // 'session',
37
+ // 'myRequestLogger',
38
+ // 'bodyParser',
39
+ // 'handleBodyParserError',
40
+ // 'compress',
41
+ // 'methodOverride',
42
+ // 'poweredBy',
43
+ // '$custom',
44
+ // 'router',
45
+ // 'www',
46
+ // 'favicon',
47
+ // '404',
48
+ // '500'
49
+ // ],
50
+
51
+ /****************************************************************************
52
+ * *
53
+ * Example custom middleware; logs each request to the console. *
54
+ * *
55
+ ****************************************************************************/
56
+
57
+ // myRequestLogger: function (req, res, next) {
58
+ // console.log("Requested :: ", req.method, req.url);
59
+ // return next();
60
+ // }
61
+
62
+
63
+ /***************************************************************************
64
+ * *
65
+ * The body parser that will handle incoming multipart HTTP requests. By *
66
+ * default as of v0.10, Sails uses *
67
+ * [skipper](http://github.com/balderdashy/skipper). See *
68
+ * http://www.senchalabs.org/connect/multipart.html for other options. *
69
+ * *
70
+ * Note that Sails uses an internal instance of Skipper by default; to *
71
+ * override it and specify more options, make sure to "npm install skipper" *
72
+ * in your project first. You can also specify a different body parser or *
73
+ * a custom function with req, res and next parameters (just like any other *
74
+ * middleware function). *
75
+ * *
76
+ ***************************************************************************/
77
+
78
+ // bodyParser: require('skipper')({strict: true})
79
+
80
+ },
81
+
82
+ /***************************************************************************
83
+ * *
84
+ * The number of seconds to cache flat files on disk being served by *
85
+ * Express static middleware (by default, these files are in `.tmp/public`) *
86
+ * *
87
+ * The HTTP static cache is only active in a 'production' environment, *
88
+ * since that's the only time Express will cache flat-files. *
89
+ * *
90
+ ***************************************************************************/
91
+
92
+ // cache: 31557600000
93
+ };
@@ -1,57 +1,57 @@
1
- /**
2
- * Internationalization / Localization Settings
3
- * (sails.config.i18n)
4
- *
5
- * If your app will touch people from all over the world, i18n (or internationalization)
6
- * may be an important part of your international strategy.
7
- *
8
- *
9
- * For more informationom i18n in Sails, check out:
10
- * http://sailsjs.org/#!/documentation/concepts/Internationalization
11
- *
12
- * For a complete list of i18n options, see:
13
- * https://github.com/mashpie/i18n-node#list-of-configuration-options
14
- *
15
- *
16
- */
17
-
18
- module.exports.i18n = {
19
-
20
- /***************************************************************************
21
- * *
22
- * Which locales are supported? *
23
- * *
24
- ***************************************************************************/
25
-
26
- // locales: ['en', 'es', 'fr', 'de'],
27
-
28
- /****************************************************************************
29
- * *
30
- * What is the default locale for the site? Note that this setting will be *
31
- * overridden for any request that sends an "Accept-Language" header (i.e. *
32
- * most browsers), but it's still useful if you need to localize the *
33
- * response for requests made by non-browser clients (e.g. cURL). *
34
- * *
35
- ****************************************************************************/
36
-
37
- // defaultLocale: 'en',
38
-
39
- /****************************************************************************
40
- * *
41
- * Automatically add new keys to locale (translation) files when they are *
42
- * encountered during a request? *
43
- * *
44
- ****************************************************************************/
45
-
46
- // updateFiles: false,
47
-
48
- /****************************************************************************
49
- * *
50
- * Path (relative to app root) of directory to store locale (translation) *
51
- * files in. *
52
- * *
53
- ****************************************************************************/
54
-
55
- // localesDirectory: '/config/locales'
56
-
57
- };
1
+ /**
2
+ * Internationalization / Localization Settings
3
+ * (sails.config.i18n)
4
+ *
5
+ * If your app will touch people from all over the world, i18n (or internationalization)
6
+ * may be an important part of your international strategy.
7
+ *
8
+ *
9
+ * For more informationom i18n in Sails, check out:
10
+ * http://sailsjs.org/#!/documentation/concepts/Internationalization
11
+ *
12
+ * For a complete list of i18n options, see:
13
+ * https://github.com/mashpie/i18n-node#list-of-configuration-options
14
+ *
15
+ *
16
+ */
17
+
18
+ module.exports.i18n = {
19
+
20
+ /***************************************************************************
21
+ * *
22
+ * Which locales are supported? *
23
+ * *
24
+ ***************************************************************************/
25
+
26
+ // locales: ['en', 'es', 'fr', 'de'],
27
+
28
+ /****************************************************************************
29
+ * *
30
+ * What is the default locale for the site? Note that this setting will be *
31
+ * overridden for any request that sends an "Accept-Language" header (i.e. *
32
+ * most browsers), but it's still useful if you need to localize the *
33
+ * response for requests made by non-browser clients (e.g. cURL). *
34
+ * *
35
+ ****************************************************************************/
36
+
37
+ // defaultLocale: 'en',
38
+
39
+ /****************************************************************************
40
+ * *
41
+ * Automatically add new keys to locale (translation) files when they are *
42
+ * encountered during a request? *
43
+ * *
44
+ ****************************************************************************/
45
+
46
+ // updateFiles: false,
47
+
48
+ /****************************************************************************
49
+ * *
50
+ * Path (relative to app root) of directory to store locale (translation) *
51
+ * files in. *
52
+ * *
53
+ ****************************************************************************/
54
+
55
+ // localesDirectory: '/config/locales'
56
+
57
+ };
@@ -1,29 +1,29 @@
1
- /**
2
- * Built-in Log Configuration
3
- * (sails.config.log)
4
- *
5
- * Configure the log level for your app, as well as the transport
6
- * (Underneath the covers, Sails uses Winston for logging, which
7
- * allows for some pretty neat custom transports/adapters for log messages)
8
- *
9
- * For more information on the Sails logger, check out:
10
- * http://sailsjs.org/#!/documentation/concepts/Logging
11
- */
12
-
13
- module.exports.log = {
14
-
15
- /***************************************************************************
16
- * *
17
- * Valid `level` configs: i.e. the minimum log level to capture with *
18
- * sails.log.*() *
19
- * *
20
- * The order of precedence for log levels from lowest to highest is: *
21
- * silly, verbose, info, debug, warn, error *
22
- * *
23
- * You may also set the level to "silent" to suppress all logs. *
24
- * *
25
- ***************************************************************************/
26
-
27
- level: 'verbose'
28
-
29
- };
1
+ /**
2
+ * Built-in Log Configuration
3
+ * (sails.config.log)
4
+ *
5
+ * Configure the log level for your app, as well as the transport
6
+ * (Underneath the covers, Sails uses Winston for logging, which
7
+ * allows for some pretty neat custom transports/adapters for log messages)
8
+ *
9
+ * For more information on the Sails logger, check out:
10
+ * http://sailsjs.org/#!/documentation/concepts/Logging
11
+ */
12
+
13
+ module.exports.log = {
14
+
15
+ /***************************************************************************
16
+ * *
17
+ * Valid `level` configs: i.e. the minimum log level to capture with *
18
+ * sails.log.*() *
19
+ * *
20
+ * The order of precedence for log levels from lowest to highest is: *
21
+ * silly, verbose, info, debug, warn, error *
22
+ * *
23
+ * You may also set the level to "silent" to suppress all logs. *
24
+ * *
25
+ ***************************************************************************/
26
+
27
+ level: 'debug'
28
+
29
+ };