kuzzle 2.15.2 → 2.16.0
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/lib/api/controllers/serverController.js +24 -4
- package/lib/api/funnel.js +19 -0
- package/lib/{config → api}/httpRoutes.js +29 -14
- package/lib/api/openApiGenerator.d.ts +6 -0
- package/lib/api/openApiGenerator.js +167 -126
- package/lib/api/openapi/documents/document.d.ts +21 -0
- package/lib/api/openapi/documents/document.js +57 -0
- package/lib/api/openapi/tools.d.ts +2 -0
- package/lib/api/openapi/tools.js +10 -0
- package/lib/api/request/kuzzleRequest.d.ts +30 -32
- package/lib/api/request/kuzzleRequest.js +30 -102
- package/lib/api/request/requestContext.d.ts +17 -22
- package/lib/api/request/requestContext.js +44 -109
- package/lib/api/request/requestInput.d.ts +19 -22
- package/lib/api/request/requestInput.js +115 -173
- package/lib/api/request/requestResponse.d.ts +12 -8
- package/lib/api/request/requestResponse.js +35 -29
- package/lib/config/default.config.js +1 -1
- package/lib/core/network/router.js +33 -0
- package/lib/core/plugin/pluginsManager.js +3 -1
- package/lib/core/realtime/hotelClerk.d.ts +7 -0
- package/lib/core/realtime/hotelClerk.js +14 -0
- package/lib/kuzzle/kuzzle.js +9 -5
- package/package-lock.json +160 -175
- package/package.json +10 -9
package/lib/kuzzle/kuzzle.js
CHANGED
|
@@ -54,21 +54,25 @@ const realtime_1 = __importDefault(require("../core/realtime"));
|
|
|
54
54
|
const cluster_1 = __importDefault(require("../cluster"));
|
|
55
55
|
const package_json_1 = require("../../package.json");
|
|
56
56
|
const BACKEND_IMPORT_KEY = 'backend:init:import';
|
|
57
|
-
|
|
57
|
+
Reflect.defineProperty(global, '_kuzzle', {
|
|
58
|
+
value: null,
|
|
59
|
+
writable: true,
|
|
60
|
+
});
|
|
61
|
+
/* eslint-disable dot-notation */
|
|
58
62
|
Reflect.defineProperty(global, 'kuzzle', {
|
|
59
63
|
configurable: true,
|
|
60
64
|
enumerable: false,
|
|
61
65
|
get() {
|
|
62
|
-
if (_kuzzle === null) {
|
|
66
|
+
if (global['_kuzzle'] === null) {
|
|
63
67
|
throw new Error('Kuzzle instance not found. Did you try to use a live-only feature before starting your application?');
|
|
64
68
|
}
|
|
65
|
-
return _kuzzle;
|
|
69
|
+
return global['_kuzzle'];
|
|
66
70
|
},
|
|
67
71
|
set(value) {
|
|
68
|
-
if (_kuzzle !== null) {
|
|
72
|
+
if (global['_kuzzle'] !== null) {
|
|
69
73
|
throw new Error('Cannot build a Kuzzle instance: another one already exists');
|
|
70
74
|
}
|
|
71
|
-
_kuzzle = value;
|
|
75
|
+
global['_kuzzle'] = value;
|
|
72
76
|
},
|
|
73
77
|
});
|
|
74
78
|
class Kuzzle extends kuzzleEventEmitter_1.default {
|