neo4j-driver 5.6.0 → 5.8.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/examples/neo4j.html +1 -1
- package/examples/node.js +3 -3
- package/lib/browser/neo4j-web.esm.js +3232 -1217
- package/lib/browser/neo4j-web.esm.min.js +1 -1
- package/lib/browser/neo4j-web.js +3232 -1217
- package/lib/browser/neo4j-web.min.js +1 -1
- package/lib/docs.js +4 -3
- package/lib/driver.js +4 -2
- package/lib/index.js +38 -8
- package/lib/version.js +1 -1
- package/package.json +5 -5
- package/types/index.d.ts +32 -3
package/lib/docs.js
CHANGED
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
* @property {number} timeout - the transaction timeout in **milliseconds**. Transactions that execute longer than the configured timeout will
|
|
31
31
|
* be terminated by the database. This functionality allows to limit query/transaction execution time. Specified timeout overrides the default timeout
|
|
32
32
|
* configured in the database using `dbms.transaction.timeout` setting. Value should not represent a duration of zero or negative duration.
|
|
33
|
-
* @property {Object} metadata - the transaction metadata. Specified metadata will be attached to the executing transaction and visible in the output
|
|
34
|
-
* `
|
|
35
|
-
*
|
|
33
|
+
* @property {Object} metadata - the transaction metadata. Specified metadata will be attached to the executing transaction and visible in the output
|
|
34
|
+
* of `SHOW TRANSACTIONS YIELD *`. It will also get logged to the `query.log` file. This functionality makes it easier to tag transactions and is
|
|
35
|
+
* equivalent to the `dbms.setTXMetaData` procedure, see https://neo4j.com/docs/cypher-manual/current/clauses/transaction-clauses/#query-listing-transactions
|
|
36
|
+
* and https://neo4j.com/docs/operations-manual/current/reference/procedures/ for reference.
|
|
36
37
|
*/
|
package/lib/driver.js
CHANGED
|
@@ -74,16 +74,18 @@ var Driver = /** @class */ (function (_super) {
|
|
|
74
74
|
* @returns {RxSession} new reactive session.
|
|
75
75
|
*/
|
|
76
76
|
Driver.prototype.rxSession = function (_a) {
|
|
77
|
-
var _b = _a === void 0 ? {} : _a, _c = _b.defaultAccessMode, defaultAccessMode = _c === void 0 ? WRITE : _c, bookmarks = _b.bookmarks, _d = _b.database, database = _d === void 0 ? '' : _d, fetchSize = _b.fetchSize, impersonatedUser = _b.impersonatedUser, bookmarkManager = _b.bookmarkManager;
|
|
77
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.defaultAccessMode, defaultAccessMode = _c === void 0 ? WRITE : _c, bookmarks = _b.bookmarks, _d = _b.database, database = _d === void 0 ? '' : _d, fetchSize = _b.fetchSize, impersonatedUser = _b.impersonatedUser, bookmarkManager = _b.bookmarkManager, notificationFilter = _b.notificationFilter, auth = _b.auth;
|
|
78
78
|
return new session_rx_1.default({
|
|
79
79
|
session: this._newSession({
|
|
80
80
|
defaultAccessMode: defaultAccessMode,
|
|
81
81
|
bookmarkOrBookmarks: bookmarks,
|
|
82
82
|
database: database,
|
|
83
83
|
impersonatedUser: impersonatedUser,
|
|
84
|
+
auth: auth,
|
|
84
85
|
reactive: false,
|
|
85
86
|
fetchSize: validateFetchSizeValue(fetchSize, this._config.fetchSize),
|
|
86
|
-
bookmarkManager: bookmarkManager
|
|
87
|
+
bookmarkManager: bookmarkManager,
|
|
88
|
+
notificationFilter: notificationFilter
|
|
87
89
|
}),
|
|
88
90
|
config: this._config
|
|
89
91
|
});
|
package/lib/index.js
CHANGED
|
@@ -40,7 +40,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
40
40
|
};
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
42
|
exports.PathSegment = exports.Path = exports.UnboundRelationship = exports.Relationship = exports.Node = exports.Record = exports.ServerInfo = 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.Neo4jError = exports.integer = 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.hasReachableServer = exports.driver = void 0;
|
|
43
|
-
exports.resultTransformers = exports.bookmarkManager = exports.DateTime = exports.LocalDateTime = exports.Date = exports.Time = exports.LocalTime = exports.Duration = exports.Integer = exports.Point = void 0;
|
|
43
|
+
exports.expirationBasedAuthTokenManager = exports.notificationFilterMinimumSeverityLevel = exports.notificationFilterDisabledCategory = exports.notificationSeverityLevel = exports.notificationCategory = exports.resultTransformers = exports.bookmarkManager = exports.DateTime = exports.LocalDateTime = exports.Date = exports.Time = exports.LocalTime = exports.Duration = exports.Integer = exports.Point = void 0;
|
|
44
44
|
/**
|
|
45
45
|
* Copyright (c) "Neo4j"
|
|
46
46
|
* Neo4j Sweden AB [http://neo4j.com]
|
|
@@ -109,6 +109,11 @@ Object.defineProperty(exports, "ManagedTransaction", { enumerable: true, get: fu
|
|
|
109
109
|
Object.defineProperty(exports, "bookmarkManager", { enumerable: true, get: function () { return neo4j_driver_core_1.bookmarkManager; } });
|
|
110
110
|
Object.defineProperty(exports, "routing", { enumerable: true, get: function () { return neo4j_driver_core_1.routing; } });
|
|
111
111
|
Object.defineProperty(exports, "resultTransformers", { enumerable: true, get: function () { return neo4j_driver_core_1.resultTransformers; } });
|
|
112
|
+
Object.defineProperty(exports, "notificationCategory", { enumerable: true, get: function () { return neo4j_driver_core_1.notificationCategory; } });
|
|
113
|
+
Object.defineProperty(exports, "notificationSeverityLevel", { enumerable: true, get: function () { return neo4j_driver_core_1.notificationSeverityLevel; } });
|
|
114
|
+
Object.defineProperty(exports, "notificationFilterDisabledCategory", { enumerable: true, get: function () { return neo4j_driver_core_1.notificationFilterDisabledCategory; } });
|
|
115
|
+
Object.defineProperty(exports, "notificationFilterMinimumSeverityLevel", { enumerable: true, get: function () { return neo4j_driver_core_1.notificationFilterMinimumSeverityLevel; } });
|
|
116
|
+
Object.defineProperty(exports, "expirationBasedAuthTokenManager", { enumerable: true, get: function () { return neo4j_driver_core_1.expirationBasedAuthTokenManager; } });
|
|
112
117
|
var neo4j_driver_bolt_connection_1 = require("neo4j-driver-bolt-connection");
|
|
113
118
|
var session_rx_1 = __importDefault(require("./session-rx"));
|
|
114
119
|
exports.RxSession = session_rx_1.default;
|
|
@@ -119,6 +124,24 @@ exports.RxManagedTransaction = transaction_managed_rx_1.default;
|
|
|
119
124
|
var result_rx_1 = __importDefault(require("./result-rx"));
|
|
120
125
|
exports.RxResult = result_rx_1.default;
|
|
121
126
|
var _a = neo4j_driver_core_1.internal.util, ENCRYPTION_ON = _a.ENCRYPTION_ON, assertString = _a.assertString, isEmptyObjectOrNull = _a.isEmptyObjectOrNull, ServerAddress = neo4j_driver_core_1.internal.serverAddress.ServerAddress, urlUtil = neo4j_driver_core_1.internal.urlUtil;
|
|
127
|
+
function isAuthTokenManager(value) {
|
|
128
|
+
return typeof value === 'object' &&
|
|
129
|
+
value != null &&
|
|
130
|
+
'getToken' in value &&
|
|
131
|
+
'onTokenExpired' in value &&
|
|
132
|
+
typeof value.getToken === 'function' &&
|
|
133
|
+
typeof value.onTokenExpired === 'function';
|
|
134
|
+
}
|
|
135
|
+
function createAuthManager(authTokenOrManager) {
|
|
136
|
+
if (isAuthTokenManager(authTokenOrManager)) {
|
|
137
|
+
return authTokenOrManager;
|
|
138
|
+
}
|
|
139
|
+
var authToken = authTokenOrManager;
|
|
140
|
+
// Sanitize authority token. Nicer error from server when a scheme is set.
|
|
141
|
+
authToken = authToken || {};
|
|
142
|
+
authToken.scheme = authToken.scheme || 'none';
|
|
143
|
+
return (0, neo4j_driver_core_1.staticAuthTokenManager)({ authToken: authToken });
|
|
144
|
+
}
|
|
122
145
|
/**
|
|
123
146
|
* Construct a new Neo4j Driver. This is your main entry point for this
|
|
124
147
|
* library.
|
|
@@ -240,7 +263,11 @@ var _a = neo4j_driver_core_1.internal.util, ENCRYPTION_ON = _a.ENCRYPTION_ON, as
|
|
|
240
263
|
* return ['127.0.0.1:8888', 'fallback.db.com:7687'];
|
|
241
264
|
* },
|
|
242
265
|
*
|
|
243
|
-
*
|
|
266
|
+
* // Configure filter for Notification objects returned in ResultSummary#notifications.
|
|
267
|
+
* // See SessionConfig#notificationFilter for usage instructions.
|
|
268
|
+
* notificationFilter: undefined,
|
|
269
|
+
*
|
|
270
|
+
* // Optionally override the default user agent name.
|
|
244
271
|
* userAgent: USER_AGENT
|
|
245
272
|
* }
|
|
246
273
|
*
|
|
@@ -293,9 +320,7 @@ function driver(url, authToken, config) {
|
|
|
293
320
|
config.encrypted = ENCRYPTION_ON;
|
|
294
321
|
config.trust = trust;
|
|
295
322
|
}
|
|
296
|
-
|
|
297
|
-
authToken = authToken || {};
|
|
298
|
-
authToken.scheme = authToken.scheme || 'none';
|
|
323
|
+
var authTokenManager = createAuthManager(authToken);
|
|
299
324
|
// Use default user agent or user agent specified by user.
|
|
300
325
|
config.userAgent = config.userAgent || USER_AGENT;
|
|
301
326
|
var address = ServerAddress.fromUrl(parsedUrl.hostAndPort);
|
|
@@ -313,7 +338,7 @@ function driver(url, authToken, config) {
|
|
|
313
338
|
config: config,
|
|
314
339
|
log: log,
|
|
315
340
|
hostNameResolver: hostNameResolver,
|
|
316
|
-
|
|
341
|
+
authTokenManager: authTokenManager,
|
|
317
342
|
address: address,
|
|
318
343
|
userAgent: config.userAgent,
|
|
319
344
|
routingContext: parsedUrl.query
|
|
@@ -329,7 +354,7 @@ function driver(url, authToken, config) {
|
|
|
329
354
|
id: id,
|
|
330
355
|
config: config,
|
|
331
356
|
log: log,
|
|
332
|
-
|
|
357
|
+
authTokenManager: authTokenManager,
|
|
333
358
|
address: address,
|
|
334
359
|
userAgent: config.userAgent
|
|
335
360
|
});
|
|
@@ -522,6 +547,11 @@ var forExport = {
|
|
|
522
547
|
LocalDateTime: neo4j_driver_core_1.LocalDateTime,
|
|
523
548
|
DateTime: neo4j_driver_core_1.DateTime,
|
|
524
549
|
bookmarkManager: neo4j_driver_core_1.bookmarkManager,
|
|
525
|
-
resultTransformers: neo4j_driver_core_1.resultTransformers
|
|
550
|
+
resultTransformers: neo4j_driver_core_1.resultTransformers,
|
|
551
|
+
notificationCategory: neo4j_driver_core_1.notificationCategory,
|
|
552
|
+
notificationSeverityLevel: neo4j_driver_core_1.notificationSeverityLevel,
|
|
553
|
+
notificationFilterDisabledCategory: neo4j_driver_core_1.notificationFilterDisabledCategory,
|
|
554
|
+
notificationFilterMinimumSeverityLevel: neo4j_driver_core_1.notificationFilterMinimumSeverityLevel,
|
|
555
|
+
expirationBasedAuthTokenManager: neo4j_driver_core_1.expirationBasedAuthTokenManager
|
|
526
556
|
};
|
|
527
557
|
exports.default = forExport;
|
package/lib/version.js
CHANGED
|
@@ -26,4 +26,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
// This is set up this way to keep the version in the code in
|
|
27
27
|
// sync with the npm package version, and to allow the build
|
|
28
28
|
// system to control version names at packaging time.
|
|
29
|
-
exports.default = '5.
|
|
29
|
+
exports.default = '5.8.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neo4j-driver",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.0",
|
|
4
4
|
"description": "The official Neo4j driver for Javascript",
|
|
5
5
|
"author": "Neo4j",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -74,14 +74,14 @@
|
|
|
74
74
|
"rollup-plugin-polyfill-node": "^0.11.0",
|
|
75
75
|
"semver": "^7.3.8",
|
|
76
76
|
"tmp": "0.2.1",
|
|
77
|
-
"typescript": "^4.9.
|
|
77
|
+
"typescript": "^4.9.5",
|
|
78
78
|
"vinyl-buffer": "^1.0.1",
|
|
79
79
|
"webpack": "^5.75.0"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"neo4j-driver-bolt-connection": "^5.
|
|
83
|
-
"neo4j-driver-core": "^5.
|
|
82
|
+
"neo4j-driver-bolt-connection": "^5.8.0",
|
|
83
|
+
"neo4j-driver-core": "^5.8.0",
|
|
84
84
|
"rxjs": "^7.8.0"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "d8c4e0f4f9643f99da56bb8f1d179d0ec4b3b3ab"
|
|
87
87
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -74,7 +74,19 @@ import {
|
|
|
74
74
|
RoutingControl,
|
|
75
75
|
routing,
|
|
76
76
|
resultTransformers,
|
|
77
|
-
ResultTransformer
|
|
77
|
+
ResultTransformer,
|
|
78
|
+
notificationCategory,
|
|
79
|
+
notificationSeverityLevel,
|
|
80
|
+
NotificationCategory,
|
|
81
|
+
NotificationSeverityLevel,
|
|
82
|
+
NotificationFilter,
|
|
83
|
+
NotificationFilterDisabledCategory,
|
|
84
|
+
NotificationFilterMinimumSeverityLevel,
|
|
85
|
+
notificationFilterDisabledCategory,
|
|
86
|
+
notificationFilterMinimumSeverityLevel,
|
|
87
|
+
AuthTokenManager,
|
|
88
|
+
AuthTokenAndExpiration,
|
|
89
|
+
expirationBasedAuthTokenManager
|
|
78
90
|
} from 'neo4j-driver-core'
|
|
79
91
|
import {
|
|
80
92
|
AuthToken,
|
|
@@ -252,6 +264,11 @@ declare const forExport: {
|
|
|
252
264
|
isUnboundRelationship: typeof isUnboundRelationship
|
|
253
265
|
bookmarkManager: typeof bookmarkManager
|
|
254
266
|
resultTransformers: typeof resultTransformers
|
|
267
|
+
notificationCategory: typeof notificationCategory
|
|
268
|
+
notificationSeverityLevel: typeof notificationSeverityLevel
|
|
269
|
+
notificationFilterDisabledCategory: typeof notificationFilterDisabledCategory
|
|
270
|
+
notificationFilterMinimumSeverityLevel: typeof notificationFilterMinimumSeverityLevel
|
|
271
|
+
expirationBasedAuthTokenManager: typeof expirationBasedAuthTokenManager
|
|
255
272
|
}
|
|
256
273
|
|
|
257
274
|
export {
|
|
@@ -321,7 +338,12 @@ export {
|
|
|
321
338
|
isRelationship,
|
|
322
339
|
isUnboundRelationship,
|
|
323
340
|
bookmarkManager,
|
|
324
|
-
resultTransformers
|
|
341
|
+
resultTransformers,
|
|
342
|
+
notificationCategory,
|
|
343
|
+
notificationSeverityLevel,
|
|
344
|
+
notificationFilterDisabledCategory,
|
|
345
|
+
notificationFilterMinimumSeverityLevel,
|
|
346
|
+
expirationBasedAuthTokenManager
|
|
325
347
|
}
|
|
326
348
|
|
|
327
349
|
export type {
|
|
@@ -330,7 +352,14 @@ export type {
|
|
|
330
352
|
SessionConfig,
|
|
331
353
|
QueryConfig,
|
|
332
354
|
RoutingControl,
|
|
333
|
-
ResultTransformer
|
|
355
|
+
ResultTransformer,
|
|
356
|
+
NotificationCategory,
|
|
357
|
+
NotificationSeverityLevel,
|
|
358
|
+
NotificationFilter,
|
|
359
|
+
NotificationFilterDisabledCategory,
|
|
360
|
+
NotificationFilterMinimumSeverityLevel,
|
|
361
|
+
AuthTokenManager,
|
|
362
|
+
AuthTokenAndExpiration
|
|
334
363
|
}
|
|
335
364
|
|
|
336
365
|
export default forExport
|