kuzzle 2.50.0-beta.9 → 2.50.1-beta.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/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/lib/api/controllers/securityController.js +2 -1
- package/dist/lib/api/openapi/openApiGenerator.d.ts +1 -1
- package/dist/lib/core/backend/backend.d.ts +2 -1
- package/dist/lib/core/backend/backend.js +7 -7
- package/dist/lib/core/backend/backendImport.d.ts +1 -1
- package/dist/lib/core/backend/backendPlugin.d.ts +1 -1
- package/dist/lib/core/backend/backendVault.d.ts +1 -1
- package/dist/lib/core/backend/backendVault.js +0 -20
- package/dist/lib/kuzzle/Logger.d.ts +1 -1
- package/dist/lib/types/ClientConnection.d.ts +1 -1
- package/dist/lib/types/HttpMessage.d.ts +1 -1
- package/dist/lib/types/Kuzzle.d.ts +1 -1
- package/dist/lib/types/Plugin.d.ts +1 -1
- package/dist/lib/types/config/PluginsConfiguration.d.ts +1 -1
- package/dist/lib/types/config/SecurityConfiguration.d.ts +1 -1
- package/dist/lib/types/config/ServerConfiguration.d.ts +1 -1
- package/dist/lib/types/events/EventGenericDocument.d.ts +2 -1
- package/dist/lib/types/events/EventProtocol.d.ts +2 -1
- package/dist/lib/types/shared/StoreCollectionsDefinition.d.ts +1 -1
- package/dist/lib/util/dump-collection.d.ts +2 -2
- package/dist/lib/util/dump-collection.js +6 -5
- package/dist/package.json +5 -5
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export * from "./lib/kerror/errors";
|
|
|
7
7
|
export * from "./lib/util/mutex";
|
|
8
8
|
export * from "./lib/util/Inflector";
|
|
9
9
|
export { NameGenerator } from "./lib/util/name-generator";
|
|
10
|
-
export * from "kuzzle-sdk";
|
|
11
10
|
export * from "./lib/core/shared/KoncordeWrapper";
|
|
12
11
|
export * from "./lib/core/shared/ObjectRepository";
|
|
13
12
|
export * from "./lib/core/shared/store";
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,6 @@ __exportStar(require("./lib/util/mutex"), exports);
|
|
|
25
25
|
__exportStar(require("./lib/util/Inflector"), exports);
|
|
26
26
|
var name_generator_1 = require("./lib/util/name-generator");
|
|
27
27
|
Object.defineProperty(exports, "NameGenerator", { enumerable: true, get: function () { return name_generator_1.NameGenerator; } });
|
|
28
|
-
__exportStar(require("kuzzle-sdk"), exports);
|
|
29
28
|
__exportStar(require("./lib/core/shared/KoncordeWrapper"), exports);
|
|
30
29
|
__exportStar(require("./lib/core/shared/ObjectRepository"), exports);
|
|
31
30
|
__exportStar(require("./lib/core/shared/store"), exports);
|
|
@@ -888,7 +888,8 @@ class SecurityController extends baseController_1.NativeController {
|
|
|
888
888
|
await validateMethod(request, body, id, strategy, true);
|
|
889
889
|
const updateMethod = this.getStrategyMethod(strategy, "update");
|
|
890
890
|
this.logger.info(`[SECURITY] ${SecurityController.userOrSdk(request.getKuid())} applied action "${request.input.action}" on user "${id}."`);
|
|
891
|
-
|
|
891
|
+
const response = await updateMethod(request, body, id, strategy);
|
|
892
|
+
return response;
|
|
892
893
|
}
|
|
893
894
|
/**
|
|
894
895
|
* @param {Request} request
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { JSONObject } from "kuzzle-sdk";
|
|
1
2
|
import { EmbeddedSDK } from "../shared/sdk/embeddedSdk";
|
|
2
|
-
import { EventDefinition
|
|
3
|
+
import { EventDefinition } from "../../../index";
|
|
3
4
|
import { BackendCluster, BackendConfig, BackendController, BackendHook, BackendImport, BackendPipe, BackendPlugin, BackendStorage, BackendVault, BackendOpenApi, BackendErrors, BackendSubscription } from "./index";
|
|
4
5
|
import { Logger } from "../../kuzzle/Logger";
|
|
5
6
|
export declare class Backend {
|
|
@@ -47,7 +47,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
47
47
|
};
|
|
48
48
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
49
|
exports.Backend = void 0;
|
|
50
|
-
const
|
|
50
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
51
51
|
const kuzzle_1 = __importDefault(require("../../kuzzle"));
|
|
52
52
|
const embeddedSdk_1 = require("../shared/sdk/embeddedSdk");
|
|
53
53
|
const kerror = __importStar(require("../../kerror"));
|
|
@@ -142,7 +142,7 @@ class Backend {
|
|
|
142
142
|
},
|
|
143
143
|
];
|
|
144
144
|
try {
|
|
145
|
-
const info = JSON.parse(
|
|
145
|
+
const info = JSON.parse(node_fs_1.default.readFileSync("./package.json", "utf8"));
|
|
146
146
|
this.version = info.version;
|
|
147
147
|
}
|
|
148
148
|
catch (error) {
|
|
@@ -280,18 +280,18 @@ class Backend {
|
|
|
280
280
|
return null;
|
|
281
281
|
}
|
|
282
282
|
const gitDir = `${dir}/.git`;
|
|
283
|
-
if (!
|
|
283
|
+
if (!node_fs_1.default.existsSync(gitDir) && depth > 0) {
|
|
284
284
|
return this._readCommit(`${dir}/..`, depth - 1);
|
|
285
285
|
}
|
|
286
|
-
if (!
|
|
286
|
+
if (!node_fs_1.default.statSync(gitDir).isDirectory()) {
|
|
287
287
|
return null;
|
|
288
288
|
}
|
|
289
|
-
const ref =
|
|
289
|
+
const ref = node_fs_1.default.readFileSync(`${dir}/.git/HEAD`, "utf8").split("ref: ")[1];
|
|
290
290
|
const refFile = `${dir}/.git/${ref}`.replace("\n", "");
|
|
291
|
-
if (!
|
|
291
|
+
if (!node_fs_1.default.existsSync(refFile)) {
|
|
292
292
|
return null;
|
|
293
293
|
}
|
|
294
|
-
return
|
|
294
|
+
return node_fs_1.default.readFileSync(refFile, "utf8").replace("\n", "");
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
exports.Backend = Backend;
|
|
@@ -1,24 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Kuzzle, a backend software, self-hostable and ready to use
|
|
4
|
-
* to power modern apps
|
|
5
|
-
*
|
|
6
|
-
* Copyright 2015-2022 Kuzzle
|
|
7
|
-
* mailto: support AT kuzzle.io
|
|
8
|
-
* website: http://kuzzle.io
|
|
9
|
-
*
|
|
10
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
-
* you may not use this file except in compliance with the License.
|
|
12
|
-
* You may obtain a copy of the License at
|
|
13
|
-
*
|
|
14
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
*
|
|
16
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
-
* See the License for the specific language governing permissions and
|
|
20
|
-
* limitations under the License.
|
|
21
|
-
*/
|
|
22
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23
3
|
if (k2 === undefined) k2 = k;
|
|
24
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { JSONObject } from "kuzzle-sdk";
|
|
1
2
|
import { PluginContext } from "../core/plugin/pluginContext";
|
|
2
3
|
import { ControllerDefinition } from "./controllers/ControllerDefinition";
|
|
3
4
|
import { PluginManifest } from "./PluginManifest";
|
|
4
5
|
import { StrategyDefinition } from "./StrategyDefinition";
|
|
5
6
|
import { PipeEventHandler, HookEventHandler } from "./EventHandler";
|
|
6
|
-
import { JSONObject } from "../../index";
|
|
7
7
|
import { ImportConfig } from "./Kuzzle";
|
|
8
8
|
/**
|
|
9
9
|
* Allows to define plugins controllers and actions
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
|
-
import { JSONObject
|
|
3
|
+
import { JSONObject } from "kuzzle-sdk";
|
|
4
|
+
import { PipeEventHandler } from "../../../index";
|
|
4
5
|
import { ClientConnection } from "../ClientConnection";
|
|
5
6
|
import { HttpMessage } from "../HttpMessage";
|
|
6
7
|
export type EventHTTPBeforeParsingPayload = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JSONObject } from "
|
|
1
|
+
import { JSONObject } from "kuzzle-sdk";
|
|
2
2
|
import { HttpStream } from "../types";
|
|
3
3
|
/**
|
|
4
4
|
* Flatten an object transform:
|
|
@@ -25,7 +25,7 @@ export declare function flattenObject(target: JSONObject): JSONObject;
|
|
|
25
25
|
* @param mapping
|
|
26
26
|
* @returns
|
|
27
27
|
*/
|
|
28
|
-
export declare function extractMappingFields(mapping: JSONObject):
|
|
28
|
+
export declare function extractMappingFields(mapping: JSONObject): JSONObject;
|
|
29
29
|
/**
|
|
30
30
|
* An iteration-order-safe version of lodash.values
|
|
31
31
|
*
|
|
@@ -27,9 +27,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.dumpCollectionDocuments = exports.pickValues = exports.extractMappingFields = exports.flattenObject = void 0;
|
|
30
|
-
const ndjson_1 = __importDefault(require("ndjson"));
|
|
31
30
|
const get_1 = __importDefault(require("lodash/get"));
|
|
32
31
|
const isObject_1 = __importDefault(require("lodash/isObject"));
|
|
32
|
+
const ndjson_1 = __importDefault(require("ndjson"));
|
|
33
33
|
const kerror = __importStar(require("../kerror"));
|
|
34
34
|
const bufferedPassThrough_1 = require("./bufferedPassThrough");
|
|
35
35
|
const types_1 = require("../types");
|
|
@@ -82,11 +82,12 @@ function extractMappingFields(mapping) {
|
|
|
82
82
|
return extractMappingFields(mapping.properties);
|
|
83
83
|
}
|
|
84
84
|
for (const key of Object.keys(mapping)) {
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
const property = mapping[key];
|
|
86
|
+
if ((0, isObject_1.default)(property) && property.type) {
|
|
87
|
+
newMapping[key] = property.type;
|
|
87
88
|
}
|
|
88
|
-
else if ((0, isObject_1.default)(
|
|
89
|
-
newMapping[key] = extractMappingFields(
|
|
89
|
+
else if ((0, isObject_1.default)(property)) {
|
|
90
|
+
newMapping[key] = extractMappingFields(property);
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
return newMapping;
|
package/dist/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.50.
|
|
4
|
+
"version": "2.50.1-beta.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
|
"scripts": {
|
|
7
7
|
"build": "rm -Rf ./dist && tsc && node ./bin/copy-protobuf.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"koncorde": "4.7.0",
|
|
43
43
|
"kuzzle-logger": "1.4.0",
|
|
44
44
|
"kuzzle-plugin-auth-passport-local": "6.4.1",
|
|
45
|
-
"kuzzle-sdk": ">=7.17.
|
|
45
|
+
"kuzzle-sdk": ">=7.17.1",
|
|
46
46
|
"kuzzle-vault": "2.1.0",
|
|
47
47
|
"lodash": "4.17.21",
|
|
48
48
|
"long": "5.3.2",
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"url": "git://github.com/kuzzleio/kuzzle.git"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@cucumber/cucumber": "12.
|
|
76
|
+
"@cucumber/cucumber": "12.5.0",
|
|
77
77
|
"@types/bluebird": "3.5.42",
|
|
78
78
|
"@types/cookie": "1.0.0",
|
|
79
79
|
"@types/lodash": "4.17.21",
|
|
80
80
|
"@types/mocha": "10.0.10",
|
|
81
81
|
"@types/passport": "1.0.17",
|
|
82
|
-
"@vitest/coverage-v8": "4.0.
|
|
82
|
+
"@vitest/coverage-v8": "4.0.16",
|
|
83
83
|
"async": "3.2.6",
|
|
84
84
|
"eslint-plugin-kuzzle": "0.0.15",
|
|
85
85
|
"mocha": "11.7.5",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"ts-node": "10.9.2",
|
|
96
96
|
"tsx": "4.21.0",
|
|
97
97
|
"typescript": "5.4.5",
|
|
98
|
-
"vitest": "4.0.
|
|
98
|
+
"vitest": "4.0.16",
|
|
99
99
|
"yaml": "2.8.2"
|
|
100
100
|
},
|
|
101
101
|
"engines": {
|
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.50.
|
|
4
|
+
"version": "2.50.1-beta.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
|
"scripts": {
|
|
7
7
|
"build": "rm -Rf ./dist && tsc && node ./bin/copy-protobuf.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"koncorde": "4.7.0",
|
|
43
43
|
"kuzzle-logger": "1.4.0",
|
|
44
44
|
"kuzzle-plugin-auth-passport-local": "6.4.1",
|
|
45
|
-
"kuzzle-sdk": ">=7.17.
|
|
45
|
+
"kuzzle-sdk": ">=7.17.1",
|
|
46
46
|
"kuzzle-vault": "2.1.0",
|
|
47
47
|
"lodash": "4.17.21",
|
|
48
48
|
"long": "5.3.2",
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"url": "git://github.com/kuzzleio/kuzzle.git"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@cucumber/cucumber": "12.
|
|
76
|
+
"@cucumber/cucumber": "12.5.0",
|
|
77
77
|
"@types/bluebird": "3.5.42",
|
|
78
78
|
"@types/cookie": "1.0.0",
|
|
79
79
|
"@types/lodash": "4.17.21",
|
|
80
80
|
"@types/mocha": "10.0.10",
|
|
81
81
|
"@types/passport": "1.0.17",
|
|
82
|
-
"@vitest/coverage-v8": "4.0.
|
|
82
|
+
"@vitest/coverage-v8": "4.0.16",
|
|
83
83
|
"async": "3.2.6",
|
|
84
84
|
"eslint-plugin-kuzzle": "0.0.15",
|
|
85
85
|
"mocha": "11.7.5",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"ts-node": "10.9.2",
|
|
96
96
|
"tsx": "4.21.0",
|
|
97
97
|
"typescript": "5.4.5",
|
|
98
|
-
"vitest": "4.0.
|
|
98
|
+
"vitest": "4.0.16",
|
|
99
99
|
"yaml": "2.8.2"
|
|
100
100
|
},
|
|
101
101
|
"engines": {
|