@graphitation/supermassive 0.4.3 → 0.5.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.
@@ -0,0 +1,66 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+
22
+ // src/utilities/mapAsyncIterator.ts
23
+ function mapAsyncIterator(iterable, callback) {
24
+ const iterator = iterable[Symbol.asyncIterator]();
25
+ function mapResult(result) {
26
+ return __async(this, null, function* () {
27
+ if (result.done) {
28
+ return result;
29
+ }
30
+ try {
31
+ return {value: yield callback(result.value), done: false};
32
+ } catch (error) {
33
+ if (typeof iterator.return === "function") {
34
+ try {
35
+ yield iterator.return();
36
+ } catch (_e) {
37
+ }
38
+ }
39
+ throw error;
40
+ }
41
+ });
42
+ }
43
+ return {
44
+ next() {
45
+ return __async(this, null, function* () {
46
+ return mapResult(yield iterator.next());
47
+ });
48
+ },
49
+ return() {
50
+ return __async(this, null, function* () {
51
+ return typeof iterator.return === "function" ? mapResult(yield iterator.return()) : {value: void 0, done: true};
52
+ });
53
+ },
54
+ throw(error) {
55
+ return __async(this, null, function* () {
56
+ return typeof iterator.throw === "function" ? mapResult(yield iterator.throw(error)) : Promise.reject(error);
57
+ });
58
+ },
59
+ [Symbol.asyncIterator]() {
60
+ return this;
61
+ }
62
+ };
63
+ }
64
+ export {
65
+ mapAsyncIterator
66
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@graphitation/supermassive",
3
3
  "license": "MIT",
4
- "version": "0.4.3",
4
+ "version": "0.5.1",
5
5
  "bin": {
6
6
  "supermassive": "./bin/supermassive.js"
7
7
  },
@@ -27,13 +27,14 @@
27
27
  "@types/node-json-db": "^0.9.3",
28
28
  "benchmark": "^2.1.4",
29
29
  "graphql-jit": "^0.5.1",
30
+ "iterall": "^1.3.0",
30
31
  "monorepo-scripts": "*",
31
32
  "node-json-db": "^1.3.0",
32
33
  "ts-node": "^10.0.0"
33
34
  },
34
- "publishConfig": {
35
- "access": "public"
36
- },
35
+ "sideEffects": false,
36
+ "access": "public",
37
+ "publishConfig": {},
37
38
  "dependencies": {
38
39
  "@graphql-tools/schema": "^7.1.5",
39
40
  "commander": "^8.3.0",