neo4j-driver 6.2.0 → 6.3.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/browser/neo4j-web.esm.js +5512 -3868
- package/lib/browser/neo4j-web.esm.min.js +1 -1
- package/lib/browser/neo4j-web.js +5512 -3868
- package/lib/browser/neo4j-web.min.js +1 -1
- package/lib/index.js +50 -10
- package/lib/version.js +1 -1
- package/package.json +4 -4
- package/types/driver.d.ts +4 -2
- package/types/index.d.ts +35 -4
package/lib/index.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
14
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
15
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -40,7 +51,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
40
51
|
};
|
|
41
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
53
|
exports.UnboundRelationship = exports.Relationship = exports.Node = exports.Record = exports.ServerInfo = exports.GqlStatusObject = exports.Notification = exports.QueryStatistics = exports.ProfiledPlan = exports.Plan = exports.ResultSummary = exports.RxResult = exports.RxManagedTransaction = exports.RxTransaction = exports.RxSession = exports.EagerResult = exports.Result = exports.ManagedTransaction = exports.Transaction = exports.Session = exports.Driver = exports.temporal = exports.spatial = exports.graph = exports.error = exports.routing = exports.session = exports.types = exports.logging = exports.auth = exports.isRetryableError = exports.isRetriableError = exports.Neo4jError = exports.integer = exports.isUnsupportedType = exports.isUnboundRelationship = exports.isRelationship = exports.isPathSegment = exports.isPath = exports.isNode = exports.isDateTime = exports.isLocalDateTime = exports.isDate = exports.isTime = exports.isLocalTime = exports.isDuration = exports.isPoint = exports.isInt = exports.int = exports.authTokenManagers = void 0;
|
|
43
|
-
exports.isUUID = exports.uuid = exports.UUID = exports.ProtocolVersion = exports.StandardCase = exports.RecordObjectMapping = exports.mappingDecorators = exports.rule = exports.Rules = exports.Rule = exports.Vector = exports.vector = exports.isVector = exports.clientCertificateProviders = exports.notificationFilterMinimumSeverityLevel = exports.notificationFilterDisabledClassification = exports.notificationFilterDisabledCategory = exports.notificationSeverityLevel = exports.notificationClassification = exports.notificationCategory = exports.resultTransformers = exports.bookmarkManager = exports.DateTime = exports.LocalDateTime = exports.Date = exports.Time = exports.LocalTime = exports.Duration = exports.Integer = exports.Point = exports.PathSegment = exports.Path = void 0;
|
|
54
|
+
exports.EncryptionProfile = exports.SecretKey = exports.KeyEncapsulationService = exports.EncapsulatedKey = exports.EncapsulatedKeyRecord = exports.UnsupportedType = exports.EncryptionService = exports.EnvelopeEncryptionProfile = exports.EncapsulatedKeyRecordRepository = exports.localKeyEncapsulationService = exports.LocalKeyEncapsulationService = exports.isUUID = exports.uuid = exports.UUID = exports.ProtocolVersion = exports.StandardCase = exports.RecordObjectMapping = exports.mappingDecorators = exports.rule = exports.Rules = exports.Rule = exports.Vector = exports.vector = exports.isVector = exports.clientCertificateProviders = exports.notificationFilterMinimumSeverityLevel = exports.notificationFilterDisabledClassification = exports.notificationFilterDisabledCategory = exports.notificationSeverityLevel = exports.notificationClassification = exports.notificationCategory = exports.resultTransformers = exports.bookmarkManager = exports.DateTime = exports.LocalDateTime = exports.Date = exports.Time = exports.LocalTime = exports.Duration = exports.Integer = exports.Point = exports.PathSegment = exports.Path = void 0;
|
|
44
55
|
exports.driver = driver;
|
|
45
56
|
exports.hasReachableServer = hasReachableServer;
|
|
46
57
|
/**
|
|
@@ -133,6 +144,17 @@ Object.defineProperty(exports, "ProtocolVersion", { enumerable: true, get: funct
|
|
|
133
144
|
Object.defineProperty(exports, "UUID", { enumerable: true, get: function () { return neo4j_driver_core_1.UUID; } });
|
|
134
145
|
Object.defineProperty(exports, "uuid", { enumerable: true, get: function () { return neo4j_driver_core_1.uuid; } });
|
|
135
146
|
Object.defineProperty(exports, "isUUID", { enumerable: true, get: function () { return neo4j_driver_core_1.isUUID; } });
|
|
147
|
+
Object.defineProperty(exports, "LocalKeyEncapsulationService", { enumerable: true, get: function () { return neo4j_driver_core_1.LocalKeyEncapsulationService; } });
|
|
148
|
+
Object.defineProperty(exports, "localKeyEncapsulationService", { enumerable: true, get: function () { return neo4j_driver_core_1.localKeyEncapsulationService; } });
|
|
149
|
+
Object.defineProperty(exports, "EncapsulatedKeyRecordRepository", { enumerable: true, get: function () { return neo4j_driver_core_1.EncapsulatedKeyRecordRepository; } });
|
|
150
|
+
Object.defineProperty(exports, "EnvelopeEncryptionProfile", { enumerable: true, get: function () { return neo4j_driver_core_1.EnvelopeEncryptionProfile; } });
|
|
151
|
+
Object.defineProperty(exports, "EncryptionService", { enumerable: true, get: function () { return neo4j_driver_core_1.EncryptionService; } });
|
|
152
|
+
Object.defineProperty(exports, "UnsupportedType", { enumerable: true, get: function () { return neo4j_driver_core_1.UnsupportedType; } });
|
|
153
|
+
Object.defineProperty(exports, "EncapsulatedKeyRecord", { enumerable: true, get: function () { return neo4j_driver_core_1.EncapsulatedKeyRecord; } });
|
|
154
|
+
Object.defineProperty(exports, "EncapsulatedKey", { enumerable: true, get: function () { return neo4j_driver_core_1.EncapsulatedKey; } });
|
|
155
|
+
Object.defineProperty(exports, "KeyEncapsulationService", { enumerable: true, get: function () { return neo4j_driver_core_1.KeyEncapsulationService; } });
|
|
156
|
+
Object.defineProperty(exports, "SecretKey", { enumerable: true, get: function () { return neo4j_driver_core_1.SecretKey; } });
|
|
157
|
+
Object.defineProperty(exports, "EncryptionProfile", { enumerable: true, get: function () { return neo4j_driver_core_1.EncryptionProfile; } });
|
|
136
158
|
var neo4j_driver_bolt_connection_1 = require("neo4j-driver-bolt-connection");
|
|
137
159
|
var session_rx_1 = __importDefault(require("./session-rx"));
|
|
138
160
|
exports.RxSession = session_rx_1.default;
|
|
@@ -156,10 +178,15 @@ function createAuthManager(authTokenOrManager) {
|
|
|
156
178
|
if (isAuthTokenManager(authTokenOrManager)) {
|
|
157
179
|
return authTokenOrManager;
|
|
158
180
|
}
|
|
159
|
-
var authToken = authTokenOrManager;
|
|
181
|
+
var authToken = __assign({}, authTokenOrManager);
|
|
160
182
|
// Sanitize authority token. Nicer error from server when a scheme is set.
|
|
161
|
-
authToken
|
|
162
|
-
|
|
183
|
+
if (authToken.scheme == null) {
|
|
184
|
+
if (Object.entries(authToken).length !== 0) {
|
|
185
|
+
throw (0, neo4j_driver_core_1.newError)("Auth token is missing 'scheme'. Use neo4j.auth.basic/bearer/kerberos, " +
|
|
186
|
+
'or set scheme explicitly.');
|
|
187
|
+
}
|
|
188
|
+
authToken.scheme = 'none';
|
|
189
|
+
}
|
|
163
190
|
return (0, neo4j_driver_core_1.staticAuthTokenManager)({ authToken: authToken });
|
|
164
191
|
}
|
|
165
192
|
/**
|
|
@@ -175,6 +202,9 @@ function driver(url, authToken, config) {
|
|
|
175
202
|
if (config === void 0) { config = {}; }
|
|
176
203
|
assertString(url, 'Bolt URL');
|
|
177
204
|
var parsedUrl = urlUtil.parseDatabaseUrl(url);
|
|
205
|
+
var boltMap = new Map();
|
|
206
|
+
boltMap.set('1', { version: new neo4j_driver_core_1.ProtocolVersion(1, 0), bolt: new neo4j_driver_bolt_connection_1.BoltProtocol(undefined, undefined, { disableLosslessIntegers: config.disableLosslessIntegers, useBigInt: config.useBigInt }) });
|
|
207
|
+
var boltProvider = new neo4j_driver_core_1.BoltProvider(boltMap, '1', neo4j_driver_bolt_connection_1.channel.alloc);
|
|
178
208
|
// Determine encryption/trust options from the URL.
|
|
179
209
|
var routing = false;
|
|
180
210
|
var encrypted = false;
|
|
@@ -226,7 +256,7 @@ function driver(url, authToken, config) {
|
|
|
226
256
|
typename: routing ? 'Routing' : 'Direct',
|
|
227
257
|
routing: routing
|
|
228
258
|
};
|
|
229
|
-
return new driver_1.Driver(meta, config, createConnectionProviderFunction());
|
|
259
|
+
return new driver_1.Driver(meta, config, createConnectionProviderFunction(), boltProvider);
|
|
230
260
|
function createConnectionProviderFunction() {
|
|
231
261
|
if (routing) {
|
|
232
262
|
return function (id, config, log, hostNameResolver) {
|
|
@@ -297,15 +327,17 @@ function hasReachableServer(url, config) {
|
|
|
297
327
|
/**
|
|
298
328
|
* Object containing predefined logging configurations. These are expected to be used as values of the driver config's `logging` property.
|
|
299
329
|
* @property {function(level: ?string): object} console the function to create a logging config that prints all messages to `console.log` with
|
|
300
|
-
* timestamp, level and message. It takes
|
|
330
|
+
* timestamp, level and message. It takes optional `level` parameter which represents the maximum log level to be logged with default value is 'info'
|
|
331
|
+
* and another `unredactDebugLogs` which changes the output to debug logs to unredact query parameters and record fields.
|
|
301
332
|
*/
|
|
302
333
|
var logging = {
|
|
303
|
-
console: function (level) {
|
|
334
|
+
console: function (level, unredactDebugLogs) {
|
|
304
335
|
return {
|
|
305
336
|
level: level,
|
|
306
337
|
logger: function (level, message) {
|
|
307
338
|
return console.log("".concat(global.Date.now(), " ").concat(level.toUpperCase(), " ").concat(message));
|
|
308
|
-
}
|
|
339
|
+
},
|
|
340
|
+
unredactDebugLogs: unredactDebugLogs
|
|
309
341
|
};
|
|
310
342
|
}
|
|
311
343
|
};
|
|
@@ -334,7 +366,11 @@ var types = {
|
|
|
334
366
|
Vector: neo4j_driver_core_1.Vector,
|
|
335
367
|
Rule: neo4j_driver_core_1.Rule,
|
|
336
368
|
Rules: neo4j_driver_core_1.Rules,
|
|
337
|
-
ProtocolVersion: neo4j_driver_core_1.ProtocolVersion
|
|
369
|
+
ProtocolVersion: neo4j_driver_core_1.ProtocolVersion,
|
|
370
|
+
EncapsulatedKeyRecordRepository: neo4j_driver_core_1.EncapsulatedKeyRecordRepository,
|
|
371
|
+
EnvelopeEncryptionProfile: neo4j_driver_core_1.EnvelopeEncryptionProfile,
|
|
372
|
+
EncapsulatedKeyRecord: neo4j_driver_core_1.EncapsulatedKeyRecord,
|
|
373
|
+
EncryptionService: neo4j_driver_core_1.EncryptionService
|
|
338
374
|
};
|
|
339
375
|
exports.types = types;
|
|
340
376
|
/**
|
|
@@ -467,6 +503,10 @@ var forExport = {
|
|
|
467
503
|
ProtocolVersion: neo4j_driver_core_1.ProtocolVersion,
|
|
468
504
|
UUID: neo4j_driver_core_1.UUID,
|
|
469
505
|
uuid: neo4j_driver_core_1.uuid,
|
|
470
|
-
isUUID: neo4j_driver_core_1.isUUID
|
|
506
|
+
isUUID: neo4j_driver_core_1.isUUID,
|
|
507
|
+
LocalKeyEncapsulationService: neo4j_driver_core_1.LocalKeyEncapsulationService,
|
|
508
|
+
localKeyEncapsulationService: neo4j_driver_core_1.localKeyEncapsulationService,
|
|
509
|
+
EncapsulatedKeyRecordRepository: neo4j_driver_core_1.EncapsulatedKeyRecordRepository,
|
|
510
|
+
EnvelopeEncryptionProfile: neo4j_driver_core_1.EnvelopeEncryptionProfile
|
|
471
511
|
};
|
|
472
512
|
exports.default = forExport;
|
package/lib/version.js
CHANGED
|
@@ -24,4 +24,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
24
24
|
// This is set up this way to keep the version in the code in
|
|
25
25
|
// sync with the npm package version, and to allow the build
|
|
26
26
|
// system to control version names at packaging time.
|
|
27
|
-
exports.default = '6.
|
|
27
|
+
exports.default = '6.3.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neo4j-driver",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "The official Neo4j driver for Javascript",
|
|
5
5
|
"author": "Neo4j",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
"ws": "8.20.0"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"neo4j-driver-bolt-connection": "6.
|
|
90
|
-
"neo4j-driver-core": "6.
|
|
89
|
+
"neo4j-driver-bolt-connection": "6.3.0",
|
|
90
|
+
"neo4j-driver-core": "6.3.0",
|
|
91
91
|
"rxjs": "^7.8.2"
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "169a7d91a52e93161706d09598b73d73d53c89b7"
|
|
94
94
|
}
|
package/types/driver.d.ts
CHANGED
|
@@ -19,7 +19,8 @@ import RxSession from './session-rx'
|
|
|
19
19
|
import {
|
|
20
20
|
Driver as CoreDriver,
|
|
21
21
|
types,
|
|
22
|
-
SessionConfig
|
|
22
|
+
SessionConfig,
|
|
23
|
+
EncapsulatedKeyRecordRepository
|
|
23
24
|
} from 'neo4j-driver-core'
|
|
24
25
|
|
|
25
26
|
declare type AuthToken = types.AuthToken
|
|
@@ -44,7 +45,8 @@ export {
|
|
|
44
45
|
Config,
|
|
45
46
|
EncryptionLevel,
|
|
46
47
|
TrustStrategy,
|
|
47
|
-
SessionMode
|
|
48
|
+
SessionMode,
|
|
49
|
+
EncapsulatedKeyRecordRepository
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
export default Driver
|
package/types/index.d.ts
CHANGED
|
@@ -112,7 +112,18 @@ import {
|
|
|
112
112
|
VectorType,
|
|
113
113
|
uuid,
|
|
114
114
|
UUID,
|
|
115
|
-
isUUID
|
|
115
|
+
isUUID,
|
|
116
|
+
LocalKeyEncapsulationService,
|
|
117
|
+
localKeyEncapsulationService,
|
|
118
|
+
EncapsulatedKeyRecordRepository,
|
|
119
|
+
EnvelopeEncryptionProfile,
|
|
120
|
+
EncryptionService,
|
|
121
|
+
UnsupportedType,
|
|
122
|
+
EncapsulatedKeyRecord,
|
|
123
|
+
EncapsulatedKey,
|
|
124
|
+
KeyEncapsulationService,
|
|
125
|
+
SecretKey,
|
|
126
|
+
EncryptionProfile
|
|
116
127
|
} from 'neo4j-driver-core'
|
|
117
128
|
import {
|
|
118
129
|
AuthToken,
|
|
@@ -152,9 +163,10 @@ declare const auth: {
|
|
|
152
163
|
* timestamp, level and message. It takes an optional `level` parameter which represents the maximum log level to be logged. Default value is 'info'.
|
|
153
164
|
*/
|
|
154
165
|
declare const logging: {
|
|
155
|
-
console: (level: coreTypes.LogLevel) => {
|
|
166
|
+
console: (level: coreTypes.LogLevel, unredactDebugLogs?: boolean) => {
|
|
156
167
|
level: coreTypes.LogLevel
|
|
157
168
|
logger: (level: coreTypes.LogLevel, message: string) => void
|
|
169
|
+
unredactDebugLogs: boolean
|
|
158
170
|
}
|
|
159
171
|
}
|
|
160
172
|
|
|
@@ -236,6 +248,9 @@ declare const graph: {
|
|
|
236
248
|
...
|
|
237
249
|
*/
|
|
238
250
|
|
|
251
|
+
/**
|
|
252
|
+
* @private
|
|
253
|
+
*/
|
|
239
254
|
declare const forExport: {
|
|
240
255
|
authTokenManagers: typeof authTokenManagers
|
|
241
256
|
driver: typeof driver
|
|
@@ -324,6 +339,11 @@ declare const forExport: {
|
|
|
324
339
|
isUUID: typeof isUUID
|
|
325
340
|
uuid: typeof uuid
|
|
326
341
|
UUID: typeof UUID
|
|
342
|
+
LocalKeyEncapsulationService: typeof LocalKeyEncapsulationService
|
|
343
|
+
localKeyEncapsulationService: typeof localKeyEncapsulationService
|
|
344
|
+
EnvelopeEncryptionProfile: typeof EnvelopeEncryptionProfile
|
|
345
|
+
EncryptionService: typeof EncryptionService
|
|
346
|
+
UnsupportedType: typeof UnsupportedType
|
|
327
347
|
}
|
|
328
348
|
|
|
329
349
|
export {
|
|
@@ -413,7 +433,12 @@ export {
|
|
|
413
433
|
rule,
|
|
414
434
|
uuid,
|
|
415
435
|
UUID,
|
|
416
|
-
isUUID
|
|
436
|
+
isUUID,
|
|
437
|
+
LocalKeyEncapsulationService,
|
|
438
|
+
localKeyEncapsulationService,
|
|
439
|
+
EnvelopeEncryptionProfile,
|
|
440
|
+
EncryptionService,
|
|
441
|
+
UnsupportedType
|
|
417
442
|
}
|
|
418
443
|
|
|
419
444
|
export type {
|
|
@@ -442,7 +467,13 @@ export type {
|
|
|
442
467
|
Rules,
|
|
443
468
|
StandardCase,
|
|
444
469
|
MappedQueryResult,
|
|
445
|
-
VectorType
|
|
470
|
+
VectorType,
|
|
471
|
+
EncryptionProfile,
|
|
472
|
+
EncapsulatedKeyRecordRepository,
|
|
473
|
+
EncapsulatedKeyRecord,
|
|
474
|
+
EncapsulatedKey,
|
|
475
|
+
KeyEncapsulationService,
|
|
476
|
+
SecretKey
|
|
446
477
|
}
|
|
447
478
|
|
|
448
479
|
export default forExport
|