Skip to content

Commit 20653c5

Browse files
committed
JS driver v1.4.0-rc1: Checking in transpiled files for bower
1 parent 4d628f5 commit 20653c5

File tree

6 files changed

+77
-48
lines changed

6 files changed

+77
-48
lines changed

lib/browser/neo4j-web.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27919,6 +27919,7 @@ var Neo4jError = function (_Error) {
2791927919

2792027920
_this.message = message;
2792127921
_this.code = code;
27922+
_this.name = "Neo4jError";
2792227923
return _this;
2792327924
}
2792427925

@@ -31351,7 +31352,7 @@ var ConnectionHolder = function () {
3135131352

3135231353
/**
3135331354
* Notify this holder that single party does not require current connection any more.
31354-
* @return {Promise<Connection>} promise resolved with the current connection.
31355+
* @return {Promise<Connection>} promise resolved with the current connection, never a rejected promise.
3135531356
*/
3135631357

3135731358
}, {
@@ -35430,10 +35431,6 @@ var _connectionHolder = require('./internal/connection-holder');
3543035431

3543135432
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3543235433

35433-
/**
35434-
* A stream of {@link Record} representing the result of a statement.
35435-
* @access public
35436-
*/
3543735434
/**
3543835435
* Copyright (c) 2002-2017 "Neo Technology,","
3543935436
* Network Engine for Objects in Lund AB [http://neotechnology.com]
@@ -35453,6 +35450,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
3545335450
* limitations under the License.
3545435451
*/
3545535452

35453+
var DEFAULT_ON_ERROR = function DEFAULT_ON_ERROR(error) {
35454+
console.log('Uncaught error when processing result: ' + error);
35455+
};
35456+
var DEFAULT_ON_COMPLETED = function DEFAULT_ON_COMPLETED(summary) {};
35457+
35458+
/**
35459+
* A stream of {@link Record} representing the result of a statement.
35460+
* @access public
35461+
*/
35462+
3545635463
var Result = function () {
3545735464
/**
3545835465
* Inject the observer to be used.
@@ -35554,10 +35561,10 @@ var Result = function () {
3555435561
value: function subscribe(observer) {
3555535562
var _this = this;
3555635563

35557-
var onCompletedOriginal = observer.onCompleted;
3555835564
var self = this;
35559-
var onCompletedWrapper = function onCompletedWrapper(metadata) {
3556035565

35566+
var onCompletedOriginal = observer.onCompleted || DEFAULT_ON_COMPLETED;
35567+
var onCompletedWrapper = function onCompletedWrapper(metadata) {
3556135568
var additionalMeta = self._metaSupplier();
3556235569
for (var key in additionalMeta) {
3556335570
if (additionalMeta.hasOwnProperty(key)) {
@@ -35574,10 +35581,7 @@ var Result = function () {
3557435581
};
3557535582
observer.onCompleted = onCompletedWrapper;
3557635583

35577-
var onErrorOriginal = observer.onError || function (error) {
35578-
console.log("Uncaught error when processing result: " + error);
35579-
};
35580-
35584+
var onErrorOriginal = observer.onError || DEFAULT_ON_ERROR;
3558135585
var onErrorWrapper = function onErrorWrapper(error) {
3558235586
// notify connection holder that the used connection is not needed any more because error happened
3558335587
// and result can't bee consumed any further; call the original onError callback after that

lib/browser/neo4j-web.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/browser/neo4j-web.test.js

Lines changed: 44 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/v1/error.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ var Neo4jError = function (_Error) {
7777

7878
_this.message = message;
7979
_this.code = code;
80+
_this.name = "Neo4jError";
8081
return _this;
8182
}
8283

lib/v1/internal/connection-holder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ var ConnectionHolder = function () {
8484

8585
/**
8686
* Notify this holder that single party does not require current connection any more.
87-
* @return {Promise<Connection>} promise resolved with the current connection.
87+
* @return {Promise<Connection>} promise resolved with the current connection, never a rejected promise.
8888
*/
8989

9090
}, {

lib/v1/result.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ var _connectionHolder = require('./internal/connection-holder');
2424

2525
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2626

27-
/**
28-
* A stream of {@link Record} representing the result of a statement.
29-
* @access public
30-
*/
3127
/**
3228
* Copyright (c) 2002-2017 "Neo Technology,","
3329
* Network Engine for Objects in Lund AB [http://neotechnology.com]
@@ -47,6 +43,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
4743
* limitations under the License.
4844
*/
4945

46+
var DEFAULT_ON_ERROR = function DEFAULT_ON_ERROR(error) {
47+
console.log('Uncaught error when processing result: ' + error);
48+
};
49+
var DEFAULT_ON_COMPLETED = function DEFAULT_ON_COMPLETED(summary) {};
50+
51+
/**
52+
* A stream of {@link Record} representing the result of a statement.
53+
* @access public
54+
*/
55+
5056
var Result = function () {
5157
/**
5258
* Inject the observer to be used.
@@ -148,10 +154,10 @@ var Result = function () {
148154
value: function subscribe(observer) {
149155
var _this = this;
150156

151-
var onCompletedOriginal = observer.onCompleted;
152157
var self = this;
153-
var onCompletedWrapper = function onCompletedWrapper(metadata) {
154158

159+
var onCompletedOriginal = observer.onCompleted || DEFAULT_ON_COMPLETED;
160+
var onCompletedWrapper = function onCompletedWrapper(metadata) {
155161
var additionalMeta = self._metaSupplier();
156162
for (var key in additionalMeta) {
157163
if (additionalMeta.hasOwnProperty(key)) {
@@ -168,10 +174,7 @@ var Result = function () {
168174
};
169175
observer.onCompleted = onCompletedWrapper;
170176

171-
var onErrorOriginal = observer.onError || function (error) {
172-
console.log("Uncaught error when processing result: " + error);
173-
};
174-
177+
var onErrorOriginal = observer.onError || DEFAULT_ON_ERROR;
175178
var onErrorWrapper = function onErrorWrapper(error) {
176179
// notify connection holder that the used connection is not needed any more because error happened
177180
// and result can't bee consumed any further; call the original onError callback after that

0 commit comments

Comments
 (0)