alchemymvc 1.3.20 → 1.3.22

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.
@@ -19,7 +19,7 @@ var fs = alchemy.use('fs'),
19
19
  *
20
20
  * @author Jelle De Loecker <jelle@develry.be>
21
21
  * @since 0.0.1
22
- * @version 1.1.5
22
+ * @version 1.3.22
23
23
  *
24
24
  * @param {String} dirPath The path to load
25
25
  * @param {Object} options
@@ -44,6 +44,7 @@ Alchemy.setMethod(function usePath(dirPath, options) {
44
44
 
45
45
  options._level++;
46
46
  useOptions._level = options._level;
47
+ useOptions.skip = options.skip;
47
48
 
48
49
  // Always ignore .git directories
49
50
  modularRegex.push(/^.git$/);
@@ -166,7 +167,7 @@ Alchemy.setProperty('default_use_path_options', {
166
167
  *
167
168
  * @author Jelle De Loecker <jelle@develry.be>
168
169
  * @since 0.0.1
169
- * @version 1.2.0
170
+ * @version 1.3.22
170
171
  *
171
172
  * @param {String} dir_path
172
173
  * @param {Object} options
@@ -214,6 +215,10 @@ Alchemy.setMethod(function _usePath(dir_path, options) {
214
215
  for (i = 0; i < files.length; i++) {
215
216
  file_name = files[i];
216
217
 
218
+ if (file_name == 'routes.js' && options.skip?.length && options.skip.includes('routes')) {
219
+ continue;
220
+ }
221
+
217
222
  // Skip hidden files or the "empty" file
218
223
  if (file_name[0] == '.' || file_name == 'empty') {
219
224
  continue;
@@ -289,7 +294,8 @@ Alchemy.setMethod(function _usePath(dir_path, options) {
289
294
  ignore : options.ignore,
290
295
  recursive : options.recursive - 1,
291
296
  _level : options._level,
292
- modularParent : options.modularParent
297
+ modularParent : options.modularParent,
298
+ skip : options.skip,
293
299
  });
294
300
  }
295
301
 
package/lib/stages.js CHANGED
@@ -156,11 +156,11 @@ alchemy.sputnik.add(function plugins() {
156
156
  *
157
157
  * @author Jelle De Loecker <jelle@develry.be>
158
158
  * @since 0.0.1
159
- * @version 0.0.1
159
+ * @version 1.3.22
160
160
  */
161
161
  alchemy.sputnik.add(function base_app() {
162
162
  // Load in the app
163
- alchemy.usePath(PATH_APP, {weight: 20});
163
+ alchemy.usePath(PATH_APP, {weight: 20, skip: ['routes']});
164
164
  });
165
165
 
166
166
  /**
@@ -185,7 +185,7 @@ alchemy.sputnik.add(function define_debug() {
185
185
  *
186
186
  * @author Jelle De Loecker <jelle@elevenways.be>
187
187
  * @since 0.0.1
188
- * @version 1.3.3
188
+ * @version 1.3.22
189
189
  */
190
190
  alchemy.sputnik.add(function hawkejs_setup() {
191
191
 
@@ -202,7 +202,8 @@ alchemy.sputnik.add(function hawkejs_setup() {
202
202
  modify_prototypes : true,
203
203
  ua : req.conduit.headers.useragent,
204
204
  create_source_map : alchemy.settings.source_map,
205
- enable_coverage : !!global.__coverage__
205
+ enable_coverage : !!global.__coverage__,
206
+ debug : alchemy.settings.debug,
206
207
  }).done(gotClientFile);
207
208
 
208
209
  function gotClientFile(err, path) {
@@ -244,6 +245,7 @@ alchemy.sputnik.add(function hawkejs_setup() {
244
245
  modify_prototypes : true,
245
246
  ua : req.conduit.headers.useragent,
246
247
  create_source_map : alchemy.settings.source_map,
248
+ debug : alchemy.settings.debug,
247
249
  }).done(gotClientFile);
248
250
  }
249
251
  });
@@ -362,15 +364,15 @@ alchemy.sputnik.add(function middleware() {
362
364
  *
363
365
  * @author Jelle De Loecker <jelle@develry.be>
364
366
  * @since 0.0.1
365
- * @version 0.4.0
367
+ * @version 1.3.22
366
368
  */
367
369
  alchemy.sputnik.add(function routes() {
368
370
  try {
369
- alchemy.useOnce(path.resolve(PATH_APP, 'config', 'routes'));
371
+ alchemy.useOnce(path.resolve(PATH_APP, 'config', 'routes.js'));
370
372
  } catch (err) {
371
373
  // Only output warning when not in client mode
372
374
  if (!alchemy.settings.client_mode) {
373
- log.warn('No route config was found');
375
+ log.warn('No app routes were found:', err);
374
376
  }
375
377
  }
376
378
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "alchemymvc",
3
3
  "description": "MVC framework for Node.js",
4
- "version": "1.3.20",
4
+ "version": "1.3.22",
5
5
  "author": "Jelle De Loecker <jelle@elevenways.be>",
6
6
  "keywords": [
7
7
  "alchemy",
@@ -22,7 +22,7 @@
22
22
  "chokidar" : "~3.5.3",
23
23
  "formidable" : "~3.5.1",
24
24
  "graceful-fs" : "~4.2.11",
25
- "hawkejs" : "~2.3.13",
25
+ "hawkejs" : "~2.3.15",
26
26
  "jsondiffpatch" : "~0.5.0",
27
27
  "mime" : "~3.0.0",
28
28
  "minimist" : "~1.2.5",
@@ -31,7 +31,7 @@
31
31
  "mongodb" : "~6.1.0",
32
32
  "ncp" : "~2.0.0",
33
33
  "postcss" : "~8.4.31",
34
- "protoblast" : "~0.8.14",
34
+ "protoblast" : "~0.8.15",
35
35
  "semver" : "~7.5.4",
36
36
  "socket.io" : "~4.7.2",
37
37
  "@11ways/socket.io-stream" : "~0.9.2",