kuzzle 2.17.0 → 2.17.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.
- package/lib/api/controllers/authController.js +1 -1
- package/lib/api/controllers/securityController.js +1 -1
- package/lib/api/request/kuzzleRequest.js +5 -7
- package/lib/cluster/state.js +20 -4
- package/lib/core/backend/backend.d.ts +7 -3
- package/lib/core/backend/backend.js +10 -9
- package/lib/core/backend/backendConfig.js +21 -2
- package/lib/core/backend/backendController.js +21 -5
- package/lib/core/backend/backendErrors.d.ts +58 -0
- package/lib/core/backend/backendErrors.js +121 -0
- package/lib/core/backend/backendHook.js +21 -5
- package/lib/core/backend/backendImport.js +21 -5
- package/lib/core/backend/backendOpenApi.js +1 -1
- package/lib/core/backend/backendPipe.js +21 -5
- package/lib/core/backend/backendPlugin.js +22 -3
- package/lib/core/backend/backendVault.js +21 -2
- package/lib/core/backend/index.d.ts +1 -0
- package/lib/core/backend/index.js +1 -0
- package/lib/core/network/protocols/httpwsProtocol.js +15 -2
- package/lib/core/plugin/pluginContext.js +22 -3
- package/lib/core/realtime/channel.js +20 -4
- package/lib/core/realtime/hotelClerk.js +24 -5
- package/lib/core/security/profileRepository.js +26 -7
- package/lib/core/shared/sdk/embeddedSdk.js +21 -2
- package/lib/core/storage/indexCache.js +20 -4
- package/lib/kerror/errors/multipleErrorsError.d.ts +1 -1
- package/lib/kerror/errors/multipleErrorsError.js +3 -3
- package/lib/kerror/index.d.ts +82 -0
- package/lib/kerror/index.js +176 -143
- package/lib/kuzzle/kuzzle.js +23 -4
- package/lib/model/security/profile.js +24 -5
- package/lib/model/security/role.js +21 -5
- package/lib/model/security/user.js +21 -2
- package/lib/types/Plugin.js +20 -4
- package/lib/types/errors/ErrorDefinition.d.ts +27 -0
- package/lib/types/errors/ErrorDefinition.js +3 -0
- package/lib/types/errors/ErrorDomains.d.ts +17 -0
- package/lib/types/errors/ErrorDomains.js +3 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.js +2 -0
- package/lib/util/dump-collection.js +21 -2
- package/lib/util/mutex.js +21 -2
- package/package-lock.json +4 -4
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ErrorDefinition } from './ErrorDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Represents the domains, subdomains and error names with associated definitions
|
|
4
|
+
*/
|
|
5
|
+
export declare type ErrorDomains = {
|
|
6
|
+
[domain: string]: {
|
|
7
|
+
code: number;
|
|
8
|
+
subdomains?: {
|
|
9
|
+
[subDomain: string]: {
|
|
10
|
+
code: number;
|
|
11
|
+
errors: {
|
|
12
|
+
[errorName: string]: ErrorDefinition;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -35,3 +35,5 @@ export * from './config/internalCache/InternalCacheRedisConfiguration';
|
|
|
35
35
|
export * from './config/storageEngine/StorageEngineElasticsearchConfiguration';
|
|
36
36
|
export * from './config/DumpConfiguration';
|
|
37
37
|
export * from './OpenApiDefinition';
|
|
38
|
+
export * from './errors/ErrorDefinition';
|
|
39
|
+
export * from './errors/ErrorDomains';
|
package/lib/types/index.js
CHANGED
|
@@ -67,4 +67,6 @@ __exportStar(require("./config/internalCache/InternalCacheRedisConfiguration"),
|
|
|
67
67
|
__exportStar(require("./config/storageEngine/StorageEngineElasticsearchConfiguration"), exports);
|
|
68
68
|
__exportStar(require("./config/DumpConfiguration"), exports);
|
|
69
69
|
__exportStar(require("./OpenApiDefinition"), exports);
|
|
70
|
+
__exportStar(require("./errors/ErrorDefinition"), exports);
|
|
71
|
+
__exportStar(require("./errors/ErrorDomains"), exports);
|
|
70
72
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
2
21
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
23
|
};
|
|
@@ -7,7 +26,7 @@ exports.dumpCollectionDocuments = void 0;
|
|
|
7
26
|
const ndjson_1 = __importDefault(require("ndjson"));
|
|
8
27
|
const get_1 = __importDefault(require("lodash/get"));
|
|
9
28
|
const isObject_1 = __importDefault(require("lodash/isObject"));
|
|
10
|
-
const
|
|
29
|
+
const kerror = __importStar(require("../kerror"));
|
|
11
30
|
const bufferedPassThrough_1 = require("./bufferedPassThrough");
|
|
12
31
|
const types_1 = require("../types");
|
|
13
32
|
/**
|
|
@@ -104,7 +123,7 @@ class AbstractDumper {
|
|
|
104
123
|
this.writeStream = writeStream;
|
|
105
124
|
this.options = options;
|
|
106
125
|
if (!writeStream) {
|
|
107
|
-
throw
|
|
126
|
+
throw kerror.get('api', 'assert', 'missing_argument', 'writeStream');
|
|
108
127
|
}
|
|
109
128
|
}
|
|
110
129
|
/**
|
package/lib/util/mutex.js
CHANGED
|
@@ -19,6 +19,25 @@
|
|
|
19
19
|
* See the License for the specific language governing permissions and
|
|
20
20
|
* limitations under the License.
|
|
21
21
|
*/
|
|
22
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
25
|
+
}) : (function(o, m, k, k2) {
|
|
26
|
+
if (k2 === undefined) k2 = k;
|
|
27
|
+
o[k2] = m[k];
|
|
28
|
+
}));
|
|
29
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
30
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
31
|
+
}) : function(o, v) {
|
|
32
|
+
o["default"] = v;
|
|
33
|
+
});
|
|
34
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
35
|
+
if (mod && mod.__esModule) return mod;
|
|
36
|
+
var result = {};
|
|
37
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
38
|
+
__setModuleDefault(result, mod);
|
|
39
|
+
return result;
|
|
40
|
+
};
|
|
22
41
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
42
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
43
|
};
|
|
@@ -26,11 +45,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
45
|
exports.Mutex = void 0;
|
|
27
46
|
const crypto_1 = require("crypto");
|
|
28
47
|
const bluebird_1 = __importDefault(require("bluebird"));
|
|
29
|
-
const
|
|
48
|
+
const kerror = __importStar(require("../kerror"));
|
|
30
49
|
const debug_1 = __importDefault(require("./debug"));
|
|
31
50
|
require("../types/Global");
|
|
32
51
|
const debug = (0, debug_1.default)('kuzzle:mutex');
|
|
33
|
-
const fatal =
|
|
52
|
+
const fatal = kerror.wrap('core', 'fatal');
|
|
34
53
|
// LUA script for Redis: we want our mutexes to only delete the lock they
|
|
35
54
|
// acquired. Prevents removing locks acquired by other processes if unlocking
|
|
36
55
|
// occurs after the lock expires
|
package/package-lock.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kuzzle",
|
|
3
|
-
"version": "2.17.
|
|
3
|
+
"version": "2.17.1",
|
|
4
4
|
"lockfileVersion": 1,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"dependencies": {
|
|
@@ -5919,7 +5919,7 @@
|
|
|
5919
5919
|
},
|
|
5920
5920
|
"passport-local": {
|
|
5921
5921
|
"version": "1.0.0",
|
|
5922
|
-
"resolved": "https://
|
|
5922
|
+
"resolved": "https://packages.app.kuzzle.io/passport-local/-/passport-local-1.0.0.tgz",
|
|
5923
5923
|
"integrity": "sha1-H+YyaMkudWBmJkN+O5BmYsFbpu4=",
|
|
5924
5924
|
"requires": {
|
|
5925
5925
|
"passport-strategy": "1.x.x"
|
|
@@ -6584,7 +6584,7 @@
|
|
|
6584
6584
|
},
|
|
6585
6585
|
"argparse": {
|
|
6586
6586
|
"version": "1.0.10",
|
|
6587
|
-
"resolved": "https://
|
|
6587
|
+
"resolved": "https://packages.app.kuzzle.io/argparse/-/argparse-1.0.10.tgz",
|
|
6588
6588
|
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
|
6589
6589
|
"dev": true,
|
|
6590
6590
|
"requires": {
|
|
@@ -6845,7 +6845,7 @@
|
|
|
6845
6845
|
},
|
|
6846
6846
|
"js-yaml": {
|
|
6847
6847
|
"version": "3.14.1",
|
|
6848
|
-
"resolved": "https://
|
|
6848
|
+
"resolved": "https://packages.app.kuzzle.io/js-yaml/-/js-yaml-3.14.1.tgz",
|
|
6849
6849
|
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
|
|
6850
6850
|
"dev": true,
|
|
6851
6851
|
"requires": {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kuzzle",
|
|
3
3
|
"author": "The Kuzzle Team <support@kuzzle.io>",
|
|
4
|
-
"version": "2.17.
|
|
4
|
+
"version": "2.17.1",
|
|
5
5
|
"description": "Kuzzle is an open-source solution that handles all the data management through a secured API, with a large choice of protocols.",
|
|
6
6
|
"bin": {
|
|
7
7
|
"kuzzle": "bin/start-kuzzle-server"
|