alchemymvc 1.3.11 → 1.3.12

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.
@@ -352,7 +352,7 @@ Client.setMethod(function createStream() {
352
352
  *
353
353
  * @author Jelle De Loecker <jelle@elevenways.be>
354
354
  * @since 0.2.0
355
- * @version 1.3.10
355
+ * @version 1.3.12
356
356
  *
357
357
  * @param {Function} callback
358
358
  */
@@ -386,7 +386,7 @@ Client.setMethod(function connect(address, data, callback) {
386
386
 
387
387
  if (typeof io != 'undefined') {
388
388
  io_client = io;
389
- } else if (typeof alchemy != 'undefined') {
389
+ } else if (typeof alchemy?.use == 'function') {
390
390
  io_client = alchemy.use('socket.io-client');
391
391
  } else {
392
392
  return callback(new Error('Could not find socket.io client library'));
@@ -9,7 +9,6 @@ const DataProvider = Function.inherits('Alchemy.Base', 'Alchemy.DataProvider', f
9
9
  this.config = config || {};
10
10
  });
11
11
 
12
-
13
12
  /**
14
13
  * Undry
15
14
  *
@@ -47,6 +46,15 @@ DataProvider.setStatic(function addConfig(name, default_value) {
47
46
  });
48
47
  });
49
48
 
49
+ /**
50
+ * Extra context
51
+ *
52
+ * @author Jelle De Loecker <jelle@elevenways.be>
53
+ * @since 1.3.12
54
+ * @version 1.3.12
55
+ */
56
+ DataProvider.addConfig('context');
57
+
50
58
  /**
51
59
  * The wanted page size
52
60
  *
@@ -21,7 +21,7 @@ RemoteDataProvider.addConfig('source');
21
21
  *
22
22
  * @author Jelle De Loecker <jelle@elevenways.be>
23
23
  * @since 1.2.2
24
- * @version 1.2.2
24
+ * @version 1.3.12
25
25
  */
26
26
  RemoteDataProvider.setMethod(async function getAll() {
27
27
 
@@ -29,7 +29,15 @@ RemoteDataProvider.setMethod(async function getAll() {
29
29
  return [];
30
30
  }
31
31
 
32
- let result = await Blast.fetch(this.source);
32
+ let options = {};
33
+
34
+ if (this.context) {
35
+ options.get = {
36
+ context: this.context
37
+ };
38
+ }
39
+
40
+ let result = await alchemy.fetch(this.source, options);
33
41
 
34
42
  return result;
35
43
  });
@@ -111,7 +111,7 @@ PathParamDefinition.enforceProperty(function model_constructor(new_value) {
111
111
  *
112
112
  * @author Jelle De Loecker <jelle@elevenways.be>
113
113
  * @since 1.3.0
114
- * @version 1.3.6
114
+ * @version 1.3.12
115
115
  */
116
116
  PathParamDefinition.setMethod(function parseTypeDefinition() {
117
117
 
@@ -142,7 +142,7 @@ PathParamDefinition.setMethod(function parseTypeDefinition() {
142
142
  current = class_path;
143
143
 
144
144
  for (let piece of this.typedef) {
145
- if (piece[0] != piece[0].toUpperCase()) {
145
+ if (piece[0] != piece[0].toUpperCase() || !String.isLetter(piece[0])) {
146
146
  current = field_path;
147
147
  }
148
148
 
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.11",
4
+ "version": "1.3.12",
5
5
  "author": "Jelle De Loecker <jelle@elevenways.be>",
6
6
  "keywords": [
7
7
  "alchemy",