@schukai/monster 3.11.0 → 3.12.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schukai/monster",
3
- "version": "3.11.0",
3
+ "version": "3.12.0",
4
4
  "description": "Monster is a simple library for creating fast, robust and lightweight websites.",
5
5
  "keywords": [
6
6
  "framework",
@@ -12,6 +12,16 @@ import { WriteError } from "./restapi/writeerror.mjs";
12
12
 
13
13
  export { RestAPI };
14
14
 
15
+
16
+
17
+ /**
18
+ * @type {symbol}
19
+ * @memberOf Monster
20
+ * @license AGPLv3
21
+ * @since 3.12.0
22
+ */
23
+ const rawDataSymbol = Symbol.for("@schukai/monster/data/datasource/server/restapi/rawdata");
24
+
15
25
  /**
16
26
  * The RestAPI is a class that enables a REST API server.
17
27
  *
@@ -182,6 +192,9 @@ function fetchData(init, key, callback) {
182
192
 
183
193
  try {
184
194
  obj = JSON.parse(body);
195
+
196
+ response[rawDataSymbol] = obj;
197
+
185
198
  } catch (e) {
186
199
  if (body.length > 100) {
187
200
  body = `${body.substring(0, 97)}...`;
@@ -193,6 +206,7 @@ function fetchData(init, key, callback) {
193
206
  if (callback && isFunction(callback)) {
194
207
  callback(obj);
195
208
  }
209
+
196
210
  return response;
197
211
  });
198
212
  }
@@ -142,7 +142,7 @@ function getMonsterVersion() {
142
142
  }
143
143
 
144
144
  /** don't touch, replaced by make with package.json version */
145
- monsterVersion = new Version("3.11.0");
145
+ monsterVersion = new Version("3.12.0");
146
146
 
147
147
  return monsterVersion;
148
148
  }
@@ -7,7 +7,7 @@ describe('Monster', function () {
7
7
  let monsterVersion
8
8
 
9
9
  /** don´t touch, replaced by make with package.json version */
10
- monsterVersion = new Version("3.11.0")
10
+ monsterVersion = new Version("3.12.0")
11
11
 
12
12
  let m = getMonsterVersion();
13
13