backendless 6.7.0 → 6.7.1-dev.2
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.
- package/backendless.d.ts +5 -0
- package/dist/backendless.js +20966 -23929
- package/dist/backendless.js.map +1 -1
- package/dist/backendless.min.js +2 -2
- package/es/bl/constants.js +0 -2
- package/es/bl/custom-services.js +40 -65
- package/es/bl/events.js +30 -52
- package/es/bl/index.js +3 -9
- package/es/cache/index.js +125 -189
- package/es/commerce/index.js +78 -119
- package/es/counters/counter.js +0 -8
- package/es/counters/index.js +171 -258
- package/es/data/data-query-builder.js +2 -39
- package/es/data/geo/geo-constructor.js +5 -26
- package/es/data/geo/geo-json-parser.js +0 -7
- package/es/data/geo/geometry.js +4 -13
- package/es/data/geo/linestring.js +4 -21
- package/es/data/geo/point.js +4 -22
- package/es/data/geo/polygon.js +4 -30
- package/es/data/geo/spatial-reference-system.js +1 -7
- package/es/data/geo/wkt-parser.js +0 -10
- package/es/data/geo/wkt-to-geojson.js +4 -44
- package/es/data/group-query-builder.js +0 -23
- package/es/data/index.js +17 -54
- package/es/data/json-update-builder.js +0 -18
- package/es/data/load-relations-query-builder.js +0 -16
- package/es/data/persmission.js +0 -16
- package/es/data/rt-handlers.js +1 -46
- package/es/data/store.js +316 -518
- package/es/decorators/deprecated.js +2 -5
- package/es/decorators/index.js +0 -2
- package/es/device/index.js +3 -8
- package/es/expression.js +29 -0
- package/es/files/index.js +354 -493
- package/es/files/persmission.js +0 -15
- package/es/files/utils.js +32 -55
- package/es/hive/index.js +1 -13
- package/es/hive/stores/base-store.js +14 -50
- package/es/hive/stores/index.js +0 -10
- package/es/hive/stores/key-value.js +4 -37
- package/es/hive/stores/list.js +0 -32
- package/es/hive/stores/map.js +0 -34
- package/es/hive/stores/set.js +0 -29
- package/es/hive/stores/sorted-set.js +19 -94
- package/es/hive/utils.js +0 -2
- package/es/index.js +51 -71
- package/es/local-cache/index.js +0 -10
- package/es/local-cache/local-storage.js +1 -9
- package/es/local-cache/virtual-storage.js +0 -6
- package/es/logging/index.js +21 -46
- package/es/logging/logger.js +0 -6
- package/es/management/data.js +0 -8
- package/es/management/index.js +3 -7
- package/es/messaging/channel/index.js +0 -27
- package/es/messaging/helpers/body-parts.js +3 -6
- package/es/messaging/helpers/delivery-options.js +3 -6
- package/es/messaging/helpers/email-envelope.js +13 -25
- package/es/messaging/helpers/index.js +10 -16
- package/es/messaging/helpers/publish-options.js +3 -6
- package/es/messaging/index.js +213 -317
- package/es/persmission.js +7 -16
- package/es/request/index.js +2 -16
- package/es/rso/connection.js +3 -34
- package/es/rso/index.js +0 -7
- package/es/rt.js +21 -52
- package/es/unit-of-work/constants.js +1 -1
- package/es/unit-of-work/index.js +27 -145
- package/es/unit-of-work/json-adapter.js +14 -35
- package/es/unit-of-work/op-result-value-reference.js +1 -11
- package/es/unit-of-work/op-result.js +2 -13
- package/es/urls.js +18 -15
- package/es/user-agent.js +0 -7
- package/es/users/index.js +345 -552
- package/es/users/roles.js +79 -128
- package/es/users/social/container.js +0 -16
- package/es/users/social/index.js +166 -250
- package/es/users/user.js +2 -9
- package/es/users/utils.js +0 -3
- package/es/utils.js +0 -17
- package/lib/bl/constants.js +0 -2
- package/lib/bl/custom-services.js +40 -65
- package/lib/bl/events.js +30 -52
- package/lib/bl/index.js +3 -9
- package/lib/cache/index.js +125 -189
- package/lib/commerce/index.js +78 -119
- package/lib/counters/counter.js +0 -8
- package/lib/counters/index.js +171 -258
- package/lib/data/data-query-builder.js +2 -39
- package/lib/data/geo/geo-constructor.js +5 -26
- package/lib/data/geo/geo-json-parser.js +0 -7
- package/lib/data/geo/geometry.js +4 -13
- package/lib/data/geo/linestring.js +4 -21
- package/lib/data/geo/point.js +4 -22
- package/lib/data/geo/polygon.js +4 -30
- package/lib/data/geo/spatial-reference-system.js +1 -7
- package/lib/data/geo/wkt-parser.js +0 -10
- package/lib/data/geo/wkt-to-geojson.js +4 -44
- package/lib/data/group-query-builder.js +0 -23
- package/lib/data/index.js +17 -54
- package/lib/data/json-update-builder.js +0 -18
- package/lib/data/load-relations-query-builder.js +0 -16
- package/lib/data/persmission.js +0 -16
- package/lib/data/rt-handlers.js +1 -46
- package/lib/data/store.js +316 -518
- package/lib/decorators/deprecated.js +2 -5
- package/lib/decorators/index.js +0 -2
- package/lib/device/index.js +3 -8
- package/lib/expression.js +29 -0
- package/lib/files/index.js +354 -493
- package/lib/files/persmission.js +0 -15
- package/lib/files/utils.js +32 -55
- package/lib/hive/index.js +1 -13
- package/lib/hive/stores/base-store.js +14 -50
- package/lib/hive/stores/index.js +0 -10
- package/lib/hive/stores/key-value.js +4 -37
- package/lib/hive/stores/list.js +0 -32
- package/lib/hive/stores/map.js +0 -34
- package/lib/hive/stores/set.js +0 -29
- package/lib/hive/stores/sorted-set.js +19 -94
- package/lib/hive/utils.js +0 -2
- package/lib/index.js +51 -71
- package/lib/local-cache/index.js +0 -10
- package/lib/local-cache/local-storage.js +1 -9
- package/lib/local-cache/virtual-storage.js +0 -6
- package/lib/logging/index.js +21 -46
- package/lib/logging/logger.js +0 -6
- package/lib/management/data.js +0 -8
- package/lib/management/index.js +3 -7
- package/lib/messaging/channel/index.js +0 -27
- package/lib/messaging/helpers/body-parts.js +3 -6
- package/lib/messaging/helpers/delivery-options.js +3 -6
- package/lib/messaging/helpers/email-envelope.js +13 -25
- package/lib/messaging/helpers/index.js +10 -16
- package/lib/messaging/helpers/publish-options.js +3 -6
- package/lib/messaging/index.js +213 -317
- package/lib/persmission.js +7 -16
- package/lib/request/index.js +2 -16
- package/lib/rso/connection.js +3 -34
- package/lib/rso/index.js +0 -7
- package/lib/rt.js +21 -52
- package/lib/unit-of-work/constants.js +1 -1
- package/lib/unit-of-work/index.js +27 -145
- package/lib/unit-of-work/json-adapter.js +14 -35
- package/lib/unit-of-work/op-result-value-reference.js +1 -11
- package/lib/unit-of-work/op-result.js +2 -13
- package/lib/urls.js +18 -15
- package/lib/user-agent.js +0 -7
- package/lib/users/index.js +345 -552
- package/lib/users/roles.js +79 -128
- package/lib/users/social/container.js +0 -16
- package/lib/users/social/index.js +166 -250
- package/lib/users/user.js +2 -9
- package/lib/users/utils.js +0 -3
- package/lib/utils.js +0 -17
- package/package.json +16 -16
- package/src/data/store.js +3 -1
- package/src/expression.js +16 -0
- package/src/files/utils.js +1 -1
- package/src/index.js +5 -0
package/es/cache/index.js
CHANGED
|
@@ -1,29 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
-
|
|
12
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
|
-
|
|
14
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
|
-
|
|
16
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
17
|
-
|
|
18
12
|
var _utils = _interopRequireDefault(require("../utils"));
|
|
19
|
-
|
|
20
13
|
var Cache = /*#__PURE__*/function () {
|
|
21
14
|
function Cache(app) {
|
|
22
15
|
(0, _classCallCheck2["default"])(this, Cache);
|
|
23
16
|
this.app = app;
|
|
24
17
|
this.parsers = {};
|
|
25
18
|
}
|
|
26
|
-
|
|
27
19
|
(0, _createClass2["default"])(Cache, [{
|
|
28
20
|
key: "setObjectFactory",
|
|
29
21
|
value: function setObjectFactory(objectName, factoryMethod) {
|
|
@@ -33,15 +25,12 @@ var Cache = /*#__PURE__*/function () {
|
|
|
33
25
|
key: "parseItem",
|
|
34
26
|
value: function parseItem(item) {
|
|
35
27
|
var className = item && item.___class;
|
|
36
|
-
|
|
37
28
|
if (className) {
|
|
38
29
|
var Class = this.parsers[className];
|
|
39
|
-
|
|
40
30
|
if (Class) {
|
|
41
31
|
item = new Class(item);
|
|
42
32
|
}
|
|
43
33
|
}
|
|
44
|
-
|
|
45
34
|
return item;
|
|
46
35
|
}
|
|
47
36
|
}, {
|
|
@@ -50,7 +39,6 @@ var Cache = /*#__PURE__*/function () {
|
|
|
50
39
|
if (_utils["default"].isCustomClassInstance(item)) {
|
|
51
40
|
item.___class = item.___class || _utils["default"].getClassName(item);
|
|
52
41
|
}
|
|
53
|
-
|
|
54
42
|
return JSON.stringify(item);
|
|
55
43
|
}
|
|
56
44
|
}, {
|
|
@@ -58,48 +46,39 @@ var Cache = /*#__PURE__*/function () {
|
|
|
58
46
|
value: function () {
|
|
59
47
|
var _put = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(key, value, timeToLive) {
|
|
60
48
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
61
|
-
while (1) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
data: this.stringifyItem(value)
|
|
89
|
-
}));
|
|
90
|
-
|
|
91
|
-
case 5:
|
|
92
|
-
case "end":
|
|
93
|
-
return _context.stop();
|
|
94
|
-
}
|
|
49
|
+
while (1) switch (_context.prev = _context.next) {
|
|
50
|
+
case 0:
|
|
51
|
+
if (!(!key || typeof key !== 'string')) {
|
|
52
|
+
_context.next = 2;
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
throw new Error('Cache Key must be provided and must be a string.');
|
|
56
|
+
case 2:
|
|
57
|
+
if (!(timeToLive && (typeof timeToLive !== 'number' || timeToLive < 0))) {
|
|
58
|
+
_context.next = 4;
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
throw new Error('Cache TimeToLive must be a positive number.');
|
|
62
|
+
case 4:
|
|
63
|
+
return _context.abrupt("return", this.app.request.put({
|
|
64
|
+
url: this.app.urls.cacheItem(key),
|
|
65
|
+
query: {
|
|
66
|
+
timeout: timeToLive
|
|
67
|
+
},
|
|
68
|
+
headers: {
|
|
69
|
+
'Content-Type': 'application/json'
|
|
70
|
+
},
|
|
71
|
+
data: this.stringifyItem(value)
|
|
72
|
+
}));
|
|
73
|
+
case 5:
|
|
74
|
+
case "end":
|
|
75
|
+
return _context.stop();
|
|
95
76
|
}
|
|
96
77
|
}, _callee, this);
|
|
97
78
|
}));
|
|
98
|
-
|
|
99
79
|
function put(_x, _x2, _x3) {
|
|
100
80
|
return _put.apply(this, arguments);
|
|
101
81
|
}
|
|
102
|
-
|
|
103
82
|
return put;
|
|
104
83
|
}()
|
|
105
84
|
}, {
|
|
@@ -107,37 +86,29 @@ var Cache = /*#__PURE__*/function () {
|
|
|
107
86
|
value: function () {
|
|
108
87
|
var _get = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(key) {
|
|
109
88
|
var _this = this;
|
|
110
|
-
|
|
111
89
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
112
|
-
while (1) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
return
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
case 3:
|
|
130
|
-
case "end":
|
|
131
|
-
return _context2.stop();
|
|
132
|
-
}
|
|
90
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
91
|
+
case 0:
|
|
92
|
+
if (!(!key || typeof key !== 'string')) {
|
|
93
|
+
_context2.next = 2;
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
throw new Error('Cache Key must be provided and must be a string.');
|
|
97
|
+
case 2:
|
|
98
|
+
return _context2.abrupt("return", this.app.request.get({
|
|
99
|
+
url: this.app.urls.cacheItem(key)
|
|
100
|
+
}).then(function (item) {
|
|
101
|
+
return _this.parseItem(item);
|
|
102
|
+
}));
|
|
103
|
+
case 3:
|
|
104
|
+
case "end":
|
|
105
|
+
return _context2.stop();
|
|
133
106
|
}
|
|
134
107
|
}, _callee2, this);
|
|
135
108
|
}));
|
|
136
|
-
|
|
137
109
|
function get(_x4) {
|
|
138
110
|
return _get.apply(this, arguments);
|
|
139
111
|
}
|
|
140
|
-
|
|
141
112
|
return get;
|
|
142
113
|
}()
|
|
143
114
|
}, {
|
|
@@ -145,33 +116,26 @@ var Cache = /*#__PURE__*/function () {
|
|
|
145
116
|
value: function () {
|
|
146
117
|
var _remove = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(key) {
|
|
147
118
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
148
|
-
while (1) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
case 3:
|
|
164
|
-
case "end":
|
|
165
|
-
return _context3.stop();
|
|
166
|
-
}
|
|
119
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
120
|
+
case 0:
|
|
121
|
+
if (!(!key || typeof key !== 'string')) {
|
|
122
|
+
_context3.next = 2;
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
throw new Error('Cache Key must be provided and must be a string.');
|
|
126
|
+
case 2:
|
|
127
|
+
return _context3.abrupt("return", this.app.request["delete"]({
|
|
128
|
+
url: this.app.urls.cacheItem(key)
|
|
129
|
+
}));
|
|
130
|
+
case 3:
|
|
131
|
+
case "end":
|
|
132
|
+
return _context3.stop();
|
|
167
133
|
}
|
|
168
134
|
}, _callee3, this);
|
|
169
135
|
}));
|
|
170
|
-
|
|
171
136
|
function remove(_x5) {
|
|
172
137
|
return _remove.apply(this, arguments);
|
|
173
138
|
}
|
|
174
|
-
|
|
175
139
|
return remove;
|
|
176
140
|
}()
|
|
177
141
|
}, {
|
|
@@ -179,33 +143,26 @@ var Cache = /*#__PURE__*/function () {
|
|
|
179
143
|
value: function () {
|
|
180
144
|
var _contains = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(key) {
|
|
181
145
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
182
|
-
while (1) {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
case 3:
|
|
198
|
-
case "end":
|
|
199
|
-
return _context4.stop();
|
|
200
|
-
}
|
|
146
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
147
|
+
case 0:
|
|
148
|
+
if (!(!key || typeof key !== 'string')) {
|
|
149
|
+
_context4.next = 2;
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
throw new Error('Cache Key must be provided and must be a string.');
|
|
153
|
+
case 2:
|
|
154
|
+
return _context4.abrupt("return", this.app.request.get({
|
|
155
|
+
url: this.app.urls.cacheItemCheck(key)
|
|
156
|
+
}));
|
|
157
|
+
case 3:
|
|
158
|
+
case "end":
|
|
159
|
+
return _context4.stop();
|
|
201
160
|
}
|
|
202
161
|
}, _callee4, this);
|
|
203
162
|
}));
|
|
204
|
-
|
|
205
163
|
function contains(_x6) {
|
|
206
164
|
return _contains.apply(this, arguments);
|
|
207
165
|
}
|
|
208
|
-
|
|
209
166
|
return contains;
|
|
210
167
|
}()
|
|
211
168
|
}, {
|
|
@@ -213,45 +170,36 @@ var Cache = /*#__PURE__*/function () {
|
|
|
213
170
|
value: function () {
|
|
214
171
|
var _expireIn = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(key, seconds) {
|
|
215
172
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
216
|
-
while (1) {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
data: {}
|
|
241
|
-
}));
|
|
242
|
-
|
|
243
|
-
case 5:
|
|
244
|
-
case "end":
|
|
245
|
-
return _context5.stop();
|
|
246
|
-
}
|
|
173
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
174
|
+
case 0:
|
|
175
|
+
if (!(!key || typeof key !== 'string')) {
|
|
176
|
+
_context5.next = 2;
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
throw new Error('Cache Key must be provided and must be a string.');
|
|
180
|
+
case 2:
|
|
181
|
+
if (!(typeof seconds !== 'number' || seconds <= 0)) {
|
|
182
|
+
_context5.next = 4;
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
throw new Error('Cache Expiration must be provided and must be a number of seconds.');
|
|
186
|
+
case 4:
|
|
187
|
+
return _context5.abrupt("return", this.app.request.put({
|
|
188
|
+
url: this.app.urls.cacheItemExpireIn(key),
|
|
189
|
+
query: {
|
|
190
|
+
timeout: seconds
|
|
191
|
+
},
|
|
192
|
+
data: {}
|
|
193
|
+
}));
|
|
194
|
+
case 5:
|
|
195
|
+
case "end":
|
|
196
|
+
return _context5.stop();
|
|
247
197
|
}
|
|
248
198
|
}, _callee5, this);
|
|
249
199
|
}));
|
|
250
|
-
|
|
251
200
|
function expireIn(_x7, _x8) {
|
|
252
201
|
return _expireIn.apply(this, arguments);
|
|
253
202
|
}
|
|
254
|
-
|
|
255
203
|
return expireIn;
|
|
256
204
|
}()
|
|
257
205
|
}, {
|
|
@@ -259,59 +207,47 @@ var Cache = /*#__PURE__*/function () {
|
|
|
259
207
|
value: function () {
|
|
260
208
|
var _expireAt = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(key, timestamp) {
|
|
261
209
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
262
|
-
while (1) {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
210
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
211
|
+
case 0:
|
|
212
|
+
if (!(!key || typeof key !== 'string')) {
|
|
213
|
+
_context6.next = 2;
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
throw new Error('Cache Key must be provided and must be a string.');
|
|
217
|
+
case 2:
|
|
218
|
+
if (!(timestamp instanceof Date)) {
|
|
219
|
+
_context6.next = 6;
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
timestamp = timestamp.getTime();
|
|
223
|
+
_context6.next = 8;
|
|
224
|
+
break;
|
|
225
|
+
case 6:
|
|
226
|
+
if (!(typeof timestamp !== 'number' || timestamp <= 0)) {
|
|
279
227
|
_context6.next = 8;
|
|
280
228
|
break;
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
timestamp: timestamp
|
|
295
|
-
},
|
|
296
|
-
data: {}
|
|
297
|
-
}));
|
|
298
|
-
|
|
299
|
-
case 9:
|
|
300
|
-
case "end":
|
|
301
|
-
return _context6.stop();
|
|
302
|
-
}
|
|
229
|
+
}
|
|
230
|
+
throw new Error('Cache Expiration must be provided and must be a timestamp or an instance of Date.');
|
|
231
|
+
case 8:
|
|
232
|
+
return _context6.abrupt("return", this.app.request.put({
|
|
233
|
+
url: this.app.urls.cacheItemExpireAt(key),
|
|
234
|
+
query: {
|
|
235
|
+
timestamp: timestamp
|
|
236
|
+
},
|
|
237
|
+
data: {}
|
|
238
|
+
}));
|
|
239
|
+
case 9:
|
|
240
|
+
case "end":
|
|
241
|
+
return _context6.stop();
|
|
303
242
|
}
|
|
304
243
|
}, _callee6, this);
|
|
305
244
|
}));
|
|
306
|
-
|
|
307
245
|
function expireAt(_x9, _x10) {
|
|
308
246
|
return _expireAt.apply(this, arguments);
|
|
309
247
|
}
|
|
310
|
-
|
|
311
248
|
return expireAt;
|
|
312
249
|
}()
|
|
313
250
|
}]);
|
|
314
251
|
return Cache;
|
|
315
252
|
}();
|
|
316
|
-
|
|
317
253
|
exports["default"] = Cache;
|