alchemymvc 1.1.9 → 1.2.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.
@@ -1325,7 +1325,7 @@ Alchemy.setMethod(function exposeStatic(name, value) {
1325
1325
  *
1326
1326
  * @author Jelle De Loecker <jelle@develry.be>
1327
1327
  * @since 1.1.0
1328
- * @version 1.1.0
1328
+ * @version 1.2.1
1329
1329
  */
1330
1330
  Alchemy.setMethod(function exposeDefaultStaticVariables() {
1331
1331
 
@@ -1372,6 +1372,9 @@ Alchemy.setMethod(function exposeDefaultStaticVariables() {
1372
1372
 
1373
1373
  hawkejs.exposeStatic('app_version', app_version);
1374
1374
  hawkejs.app_version = app_version;
1375
+
1376
+ // Emit as a global event so plugins can also expose their data
1377
+ this.emit('generate_static_variables', hawkejs);
1375
1378
  });
1376
1379
 
1377
1380
  /**
@@ -166,7 +166,7 @@ Alchemy.setProperty('default_use_path_options', {
166
166
  *
167
167
  * @author Jelle De Loecker <jelle@develry.be>
168
168
  * @since 0.0.1
169
- * @version 1.0.3
169
+ * @version 1.2.0
170
170
  *
171
171
  * @param {String} dir_path
172
172
  * @param {Object} options
@@ -255,7 +255,8 @@ Alchemy.setMethod(function _usePath(dir_path, options) {
255
255
  parent_path : dir_path,
256
256
  name : file_name,
257
257
  path : file_path,
258
- stat : file_stat
258
+ stat : file_stat,
259
+ local_path : file_path.slice(PATH_APP.length),
259
260
  });
260
261
 
261
262
  continue;
@@ -273,6 +274,11 @@ Alchemy.setMethod(function _usePath(dir_path, options) {
273
274
  for (i = 0; i < directories.length; i++) {
274
275
  entry = directories[i];
275
276
 
277
+ // Don't load migrations
278
+ if (entry.local_path == '/migrations') {
279
+ continue;
280
+ }
281
+
276
282
  // Do not include subfolders of the "config" directory
277
283
  // if it's a modular load
278
284
  if (options.modularParent && /\/config$/.exec(entry.parent_path)) {
@@ -1,97 +1,102 @@
1
- 'use strict';
2
-
3
- /**
4
- * The basic http module, used to create the server.
5
- *
6
- * @link http://nodejs.org/api/http.html
7
- */
8
- alchemy.use('http', 'http');
9
-
10
- /**
11
- * This module contains utilities for handling and transforming file paths.
12
- * Almost all these methods perform only string transformations.
13
- * The file system is not consulted to check whether paths are valid.
14
- *
15
- * @link http://nodejs.org/api/path.html
16
- */
17
- alchemy.use('path', 'path');
18
-
19
- /**
20
- * File I/O is provided by simple wrappers around standard POSIX functions.
21
- *
22
- * @link http://nodejs.org/api/fs.html
23
- */
24
- alchemy.use('graceful-fs', 'fs');
25
-
26
- /**
27
- * Usefull utilities.
28
- *
29
- * @link http://nodejs.org/api/util.html
30
- */
31
- alchemy.use('util', 'util');
32
-
33
- /**
34
- * The native mongodb library
35
- *
36
- * @link https://npmjs.org/package/mongodb
37
- */
38
- alchemy.use('mongodb', 'mongodb');
39
-
40
- /**
41
- * The LESS interpreter.
42
- *
43
- * @link https://npmjs.org/package/less
44
- */
45
- alchemy.use('less', 'less');
46
-
47
- /**
48
- * Hawkejs view engine
49
- *
50
- * @link https://npmjs.org/package/hawkejs
51
- */
52
- alchemy.use('hawkejs', 'hawkejs');
53
- alchemy.hawkejs = new Classes.Hawkejs.Hawkejs;
54
-
55
- /**
56
- * The function to detect when everything is too busy
57
- */
58
- alchemy.toobusy = alchemy.use('toobusy-js', 'toobusy');
59
-
60
- // If the config is a number, use that as the lag threshold
61
- if (typeof alchemy.settings.toobusy === 'number') {
62
- alchemy.toobusy.maxLag(alchemy.settings.toobusy);
63
- }
64
-
65
- /**
66
- * Load Sputnik, the stage-based launcher
67
- */
68
- alchemy.sputnik = new (alchemy.use('sputnik', 'sputnik'))();
69
-
70
- /**
71
- * Real-time apps made cross-browser & easy with a WebSocket-like API.
72
- *
73
- * @link https://npmjs.org/package/socket.io
74
- */
75
- alchemy.use('socket.io', 'io');
76
-
77
- /**
78
- * Recursively mkdir, like `mkdir -p`.
79
- * This is a requirement fetched from express
80
- *
81
- * @link https://npmjs.org/package/mkdirp
82
- */
83
- alchemy.use('mkdirp', 'mkdirp');
84
-
85
- /**
86
- * Base useragent library
87
- *
88
- * @link https://npmjs.org/package/useragent
89
- */
90
- alchemy.use('useragent');
91
-
92
- /**
93
- * Enable the `satisfies` method in the `useragent` library
94
- *
95
- * @link https://www.npmjs.com/package/useragent#adding-more-features-to-the-useragent
96
- */
1
+ 'use strict';
2
+
3
+ /**
4
+ * The basic http module, used to create the server.
5
+ *
6
+ * @link http://nodejs.org/api/http.html
7
+ */
8
+ alchemy.use('http', 'http');
9
+
10
+ /**
11
+ * This module contains utilities for handling and transforming file paths.
12
+ * Almost all these methods perform only string transformations.
13
+ * The file system is not consulted to check whether paths are valid.
14
+ *
15
+ * @link http://nodejs.org/api/path.html
16
+ */
17
+ alchemy.use('path', 'path');
18
+
19
+ /**
20
+ * File I/O is provided by simple wrappers around standard POSIX functions.
21
+ *
22
+ * @link http://nodejs.org/api/fs.html
23
+ */
24
+ alchemy.use('graceful-fs', 'fs');
25
+
26
+ /**
27
+ * Usefull utilities.
28
+ *
29
+ * @link http://nodejs.org/api/util.html
30
+ */
31
+ alchemy.use('util', 'util');
32
+
33
+ /**
34
+ * The native mongodb library
35
+ *
36
+ * @link https://npmjs.org/package/mongodb
37
+ */
38
+ alchemy.use('mongodb', 'mongodb');
39
+
40
+ /**
41
+ * The LESS interpreter.
42
+ *
43
+ * @link https://npmjs.org/package/less
44
+ */
45
+ alchemy.use('less', 'less');
46
+
47
+ /**
48
+ * Hawkejs view engine
49
+ *
50
+ * @link https://npmjs.org/package/hawkejs
51
+ */
52
+ alchemy.use('hawkejs', 'hawkejs');
53
+ alchemy.hawkejs = new Classes.Hawkejs.Hawkejs;
54
+
55
+ /**
56
+ * The function to detect when everything is too busy
57
+ */
58
+ alchemy.toobusy = alchemy.use('toobusy-js', 'toobusy');
59
+
60
+ // If the config is a number, use that as the lag threshold
61
+ if (typeof alchemy.settings.toobusy === 'number') {
62
+ alchemy.toobusy.maxLag(alchemy.settings.toobusy);
63
+ }
64
+
65
+ /**
66
+ * Load Sputnik, the stage-based launcher
67
+ */
68
+ alchemy.sputnik = new (alchemy.use('sputnik', 'sputnik'))();
69
+
70
+ /**
71
+ * Real-time apps made cross-browser & easy with a WebSocket-like API.
72
+ *
73
+ * @link https://npmjs.org/package/socket.io
74
+ */
75
+ alchemy.use('socket.io', 'io');
76
+
77
+ /**
78
+ * Allow streams over a socket.io connection
79
+ */
80
+ alchemy.use('@11ways/socket.io-stream', 'socket.io-stream');
81
+
82
+ /**
83
+ * Recursively mkdir, like `mkdir -p`.
84
+ * This is a requirement fetched from express
85
+ *
86
+ * @link https://npmjs.org/package/mkdirp
87
+ */
88
+ alchemy.use('mkdirp', 'mkdirp');
89
+
90
+ /**
91
+ * Base useragent library
92
+ *
93
+ * @link https://npmjs.org/package/useragent
94
+ */
95
+ alchemy.use('useragent');
96
+
97
+ /**
98
+ * Enable the `satisfies` method in the `useragent` library
99
+ *
100
+ * @link https://www.npmjs.com/package/useragent#adding-more-features-to-the-useragent
101
+ */
97
102
  require('useragent/features');
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.1.9",
4
+ "version": "1.2.1",
5
5
  "author": "Jelle De Loecker <jelle@elevenways.be>",
6
6
  "keywords": [
7
7
  "alchemy",
@@ -14,29 +14,29 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "ansi-256-colors" : "~1.1.0",
17
- "autoprefixer" : "~10.2.5",
17
+ "autoprefixer" : "~10.4.2",
18
18
  "bcrypt" : "~5.0.1",
19
19
  "body" : "~5.1.0",
20
- "body-parser" : "~1.19.0",
21
- "bson" : "~4.3.0",
22
- "chokidar" : "~3.5.1",
20
+ "body-parser" : "~1.19.2",
21
+ "bson" : "~4.6.1",
22
+ "chokidar" : "~3.5.3",
23
23
  "formidable" : "~1.2.2",
24
- "graceful-fs" : "~4.2.6",
25
- "hawkejs" : "~2.1.6",
24
+ "graceful-fs" : "~4.2.9",
25
+ "hawkejs" : "~2.2.3",
26
26
  "jsondiffpatch" : "~0.4.1",
27
- "mime" : "~2.5.2",
27
+ "mime" : "~3.0.0",
28
28
  "minimist" : "~1.2.5",
29
29
  "mkdirp" : "~1.0.4",
30
30
  "mmmagic" : "~0.5.3",
31
31
  "mongodb" : "~3.6.6",
32
32
  "ncp" : "~2.0.0",
33
- "postcss" : "~8.2.13",
34
- "protoblast" : "~0.7.10",
33
+ "postcss" : "~8.4.6",
34
+ "protoblast" : "~0.7.16",
35
35
  "semver" : "~7.3.5",
36
- "socket.io" : "~3.1.0",
36
+ "socket.io" : "~2.4.0",
37
37
  "@11ways/socket.io-stream" : "~0.9.2",
38
38
  "sputnik" : "~0.1.0",
39
- "terser" : "~5.7.0",
39
+ "terser" : "~5.10.0",
40
40
  "toobusy-js" : "~0.5.1",
41
41
  "useragent" : "~2.3.0"
42
42
  },
@@ -47,7 +47,7 @@
47
47
  "optionalDependencies": {
48
48
  "janeway" : "~0.3.5",
49
49
  "less" : "~4.1.1",
50
- "sass" : "~1.39.2",
50
+ "sass" : "~1.49.8",
51
51
  "nodent-compiler" : "~3.2.13",
52
52
  "socket.io-client" : "~2.4.0"
53
53
  },