Skip to content
This repository was archived by the owner on Jan 4, 2020. It is now read-only.

Commit f6a9784

Browse files
committed
updating deps
1 parent 17eaa05 commit f6a9784

File tree

2 files changed

+96
-139
lines changed

2 files changed

+96
-139
lines changed

index.js

Lines changed: 85 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -299,118 +299,15 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
299299
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
300300
};
301301

302-
var asyncGenerator = function () {
303-
function AwaitValue(value) {
304-
this.value = value;
305-
}
306-
307-
function AsyncGenerator(gen) {
308-
var front, back;
309-
310-
function send(key, arg) {
311-
return new Promise(function (resolve, reject) {
312-
var request = {
313-
key: key,
314-
arg: arg,
315-
resolve: resolve,
316-
reject: reject,
317-
next: null
318-
};
319-
320-
if (back) {
321-
back = back.next = request;
322-
} else {
323-
front = back = request;
324-
resume(key, arg);
325-
}
326-
});
327-
}
328-
329-
function resume(key, arg) {
330-
try {
331-
var result = gen[key](arg);
332-
var value = result.value;
333-
334-
if (value instanceof AwaitValue) {
335-
Promise.resolve(value.value).then(function (arg) {
336-
resume("next", arg);
337-
}, function (arg) {
338-
resume("throw", arg);
339-
});
340-
} else {
341-
settle(result.done ? "return" : "normal", result.value);
342-
}
343-
} catch (err) {
344-
settle("throw", err);
345-
}
346-
}
347-
348-
function settle(type, value) {
349-
switch (type) {
350-
case "return":
351-
front.resolve({
352-
value: value,
353-
done: true
354-
});
355-
break;
356-
357-
case "throw":
358-
front.reject(value);
359-
break;
360-
361-
default:
362-
front.resolve({
363-
value: value,
364-
done: false
365-
});
366-
break;
367-
}
368302

369-
front = front.next;
370303

371-
if (front) {
372-
resume(front.key, front.arg);
373-
} else {
374-
back = null;
375-
}
376-
}
377304

378-
this._invoke = send;
379305

380-
if (typeof gen.return !== "function") {
381-
this.return = undefined;
382-
}
383-
}
384306

385-
if (typeof Symbol === "function" && Symbol.asyncIterator) {
386-
AsyncGenerator.prototype[Symbol.asyncIterator] = function () {
387-
return this;
388-
};
389-
}
390307

391-
AsyncGenerator.prototype.next = function (arg) {
392-
return this._invoke("next", arg);
393-
};
394308

395-
AsyncGenerator.prototype.throw = function (arg) {
396-
return this._invoke("throw", arg);
397-
};
398309

399-
AsyncGenerator.prototype.return = function (arg) {
400-
return this._invoke("return", arg);
401-
};
402310

403-
return {
404-
wrap: function (fn) {
405-
return function () {
406-
return new AsyncGenerator(fn.apply(this, arguments));
407-
};
408-
},
409-
await: function (value) {
410-
return new AwaitValue(value);
411-
}
412-
};
413-
}();
414311

415312
var classCallCheck = function (instance, Constructor) {
416313
if (!(instance instanceof Constructor)) {
@@ -436,6 +333,10 @@ var createClass = function () {
436333
};
437334
}();
438335

336+
337+
338+
339+
439340
var defineProperty = function (obj, key, value) {
440341
if (key in obj) {
441342
Object.defineProperty(obj, key, {
@@ -451,6 +352,31 @@ var defineProperty = function (obj, key, value) {
451352
return obj;
452353
};
453354

355+
var get$1 = function get$1(object, property, receiver) {
356+
if (object === null) object = Function.prototype;
357+
var desc = Object.getOwnPropertyDescriptor(object, property);
358+
359+
if (desc === undefined) {
360+
var parent = Object.getPrototypeOf(object);
361+
362+
if (parent === null) {
363+
return undefined;
364+
} else {
365+
return get$1(parent, property, receiver);
366+
}
367+
} else if ("value" in desc) {
368+
return desc.value;
369+
} else {
370+
var getter = desc.get;
371+
372+
if (getter === undefined) {
373+
return undefined;
374+
}
375+
376+
return getter.call(receiver);
377+
}
378+
};
379+
454380
var inherits = function (subClass, superClass) {
455381
if (typeof superClass !== "function" && superClass !== null) {
456382
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
@@ -467,6 +393,16 @@ var inherits = function (subClass, superClass) {
467393
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
468394
};
469395

396+
397+
398+
399+
400+
401+
402+
403+
404+
405+
470406
var possibleConstructorReturn = function (self, call) {
471407
if (!self) {
472408
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
@@ -475,6 +411,30 @@ var possibleConstructorReturn = function (self, call) {
475411
return call && (typeof call === "object" || typeof call === "function") ? call : self;
476412
};
477413

414+
415+
416+
var set = function set(object, property, value, receiver) {
417+
var desc = Object.getOwnPropertyDescriptor(object, property);
418+
419+
if (desc === undefined) {
420+
var parent = Object.getPrototypeOf(object);
421+
422+
if (parent !== null) {
423+
set(parent, property, value, receiver);
424+
}
425+
} else if ("value" in desc && desc.writable) {
426+
desc.value = value;
427+
} else {
428+
var setter = desc.set;
429+
430+
if (setter !== undefined) {
431+
setter.call(receiver, value);
432+
}
433+
}
434+
435+
return value;
436+
};
437+
478438
/*
479439
* Options
480440
* {
@@ -887,12 +847,12 @@ var GraphQLFactoryBaseBackend = function () {
887847
return GraphQLFactoryBaseBackend;
888848
}();
889849

890-
function GraphQLFactoryBaseBackend$1 (namespace, graphql, factory) {
850+
var GraphQLFactoryBaseBackend$1 = function (namespace, graphql, factory) {
891851
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
892852
var crud = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
893853

894854
return new GraphQLFactoryBaseBackend(namespace, graphql, factory, config, crud);
895-
}
855+
};
896856

897857
function create() {
898858
return function () {};
@@ -902,15 +862,15 @@ function read() {
902862
return function () {};
903863
}
904864

905-
function update() {
865+
function update$1() {
906866
return function () {};
907867
}
908868

909869
function del() {
910870
return function () {};
911871
}
912872

913-
var crud = { create: create, read: read, update: update, delete: del };
873+
var crud = { create: create, read: read, update: update$1, delete: del };
914874

915875
// extended backend class for RethinkDB
916876
var GraphQLFactoryKnexBackend = function (_GraphQLFactoryBaseBa) {
@@ -938,27 +898,27 @@ var GraphQLFactoryKnexBackend = function (_GraphQLFactoryBaseBa) {
938898
}(GraphQLFactoryBaseBackend$1);
939899

940900
// helper function to instantiate a new backend
941-
function knex (namespace, graphql, factory, knex, config) {
901+
var knex = function (namespace, graphql, factory, knex, config) {
942902
return new GraphQLFactoryKnexBackend(namespace, graphql, factory, knex, config);
943-
}
903+
};
944904

945-
function create$1() {
905+
function create$2() {
946906
return function () {};
947907
}
948908

949909
function read$1() {
950910
return function () {};
951911
}
952912

953-
function update$1() {
913+
function update$2() {
954914
return function () {};
955915
}
956916

957917
function del$1() {
958918
return function () {};
959919
}
960920

961-
var crud$1 = { create: create$1, read: read$1, update: update$1, delete: del$1 };
921+
var crud$1 = { create: create$2, read: read$1, update: update$2, delete: del$1 };
962922

963923
// extended backend class for RethinkDB
964924
var GraphQLFactoryMongoDBBackend = function (_GraphQLFactoryBaseBa) {
@@ -986,11 +946,11 @@ var GraphQLFactoryMongoDBBackend = function (_GraphQLFactoryBaseBa) {
986946
}(GraphQLFactoryBaseBackend$1);
987947

988948
// helper function to instantiate a new backend
989-
function mongodb (namespace, graphql, factory, db, config, connection) {
949+
var mongodb = function (namespace, graphql, factory, db, config, connection) {
990950
return new GraphQLFactoryMongoDBBackend(namespace, graphql, factory, db, config, connection);
991-
}
951+
};
992952

993-
function create$2(type) {
953+
function create$4(type) {
994954
var backend = this;
995955
return function (source, args) {
996956
var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
@@ -1071,7 +1031,7 @@ function read$2(type) {
10711031
};
10721032
}
10731033

1074-
function update$2(type) {
1034+
function update$3(type) {
10751035
var backend = this;
10761036
return function (source, args) {
10771037
var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
@@ -1279,17 +1239,17 @@ function notThisRecord(type, backend, args, filter) {
12791239
});
12801240
}
12811241

1282-
var filter = {
1242+
var filter$1 = {
12831243
getCollectionFilter: getCollectionFilter,
12841244
getRelationFilter: getRelationFilter,
12851245
getArgsFilter: getArgsFilter,
12861246
violatesUnique: violatesUnique,
12871247
notThisRecord: notThisRecord
12881248
};
12891249

1290-
function util (backend) {
1250+
var util = function (backend) {
12911251
return {};
1292-
}
1252+
};
12931253

12941254
var GraphQLFactoryBackendQueryBuilder = function () {
12951255
function GraphQLFactoryBackendQueryBuilder(backend, type) {
@@ -1584,12 +1544,12 @@ var GraphQLFactoryBackendQueryBuilder = function () {
15841544
return GraphQLFactoryBackendQueryBuilder;
15851545
}();
15861546

1587-
function q (backend) {
1547+
var q = function (backend) {
15881548
return new GraphQLFactoryBackendQueryBuilder(backend);
1589-
}
1549+
};
15901550

15911551
// rethinkdb specific modules
1592-
var crud$2 = { create: create$2, read: read$2, update: update$2, delete: del$2, initStore: initStore, filter: filter, util: util, q: q };
1552+
var crud$2 = { create: create$4, read: read$2, update: update$3, delete: del$2, initStore: initStore, filter: filter$1, util: util, q: q };
15931553

15941554
// extended backend class for RethinkDB
15951555
var GraphQLFactoryRethinkDBBackend = function (_GraphQLFactoryBaseBa) {
@@ -1634,9 +1594,9 @@ var GraphQLFactoryRethinkDBBackend = function (_GraphQLFactoryBaseBa) {
16341594
}(GraphQLFactoryBaseBackend$1);
16351595

16361596
// helper function to instantiate a new backend
1637-
function rethinkdb (namespace, graphql, factory, r, config, connection) {
1597+
var rethinkdb = function (namespace, graphql, factory, r, config, connection) {
16381598
return new GraphQLFactoryRethinkDBBackend(namespace, graphql, factory, r, config, connection);
1639-
}
1599+
};
16401600

16411601
var index = {
16421602
base: GraphQLFactoryBaseBackend$1,
@@ -1657,4 +1617,4 @@ exports.mongodb = mongodb;
16571617
exports.GraphQLFactoryMongoDBBackend = GraphQLFactoryMongoDBBackend;
16581618
exports.rethinkdb = rethinkdb;
16591619
exports.GraphQLFactoryRethinkDBBackend = GraphQLFactoryRethinkDBBackend;
1660-
exports['default'] = index;
1620+
exports['default'] = index;

package.json

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,20 @@
2121
},
2222
"devDependencies": {
2323
"chai": "^3.5.0",
24-
"babel-core": "^6.0.0",
25-
"babel-preset-es2015": "^6.14.0",
26-
"babel-preset-stage-2": "^6.0.0",
27-
"babel-plugin-transform-runtime": "^6.0.0",
28-
"babel-runtime": "^6.9.0",
29-
"babel-register": "^6.11.0",
24+
"babel-core": "^6.21.0",
25+
"babel-preset-es2015": "^6.18.0",
26+
"babel-preset-stage-2": "^6.18.0",
27+
"babel-plugin-transform-runtime": "^6.15.0",
28+
"babel-runtime": "^6.20.0",
29+
"babel-register": "^6.18.0",
3030
"bluebird": "^3.4.6",
31-
"graphql": "^0.7.0",
32-
"graphql-factory": "^0.4.4",
33-
"knex": "^0.11.10",
31+
"graphql": "^0.8.0",
32+
"graphql-factory": "^1.0.0",
3433
"mocha": "^3.0.0",
35-
"mongodb": "^2.2.9",
36-
"mysql": "^2.11.1",
3734
"rethinkdbdash": "^2.3.6",
38-
"rollup": "^0.34.0",
39-
"rollup-plugin-babel": "^2.6.0",
40-
"babel-preset-es2015-rollup": "1.1.0"
35+
"rollup": "^0.37.0",
36+
"rollup-plugin-babel": "^2.7.0",
37+
"babel-preset-es2015-rollup": "^3.0.0"
4138
},
4239
"bugs": {
4340
"url": "https://github.com/graphql-factory/graphql-factory-backend/issues"

0 commit comments

Comments
 (0)