@graphprotocol/client-polling-live 1.0.0-canary-aa1aef7.0 → 1.0.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.
package/cjs/index.js CHANGED
@@ -50,7 +50,6 @@ function usePollingLive({ config: { defaultInterval = 1000 } = {} } = {}) {
50
50
  intervalMs = parseInt(intervalArgNode.value.value);
51
51
  }
52
52
  setExecuteFn((args) => new repeater_1.Repeater((push, stop) => {
53
- var _a, _b;
54
53
  let finished = false;
55
54
  async function pump() {
56
55
  if (finished) {
@@ -77,12 +76,6 @@ function usePollingLive({ config: { defaultInterval = 1000 } = {} } = {}) {
77
76
  stop.then(() => {
78
77
  finished = true;
79
78
  });
80
- (_a = globalThis.process) === null || _a === void 0 ? void 0 : _a.on('SIGINT', () => {
81
- finished = true;
82
- });
83
- (_b = globalThis.process) === null || _b === void 0 ? void 0 : _b.on('SIGTERM', () => {
84
- finished = true;
85
- });
86
79
  }));
87
80
  }
88
81
  },
package/esm/index.js CHANGED
@@ -48,7 +48,6 @@ export default function usePollingLive({ config: { defaultInterval = 1000 } = {}
48
48
  intervalMs = parseInt(intervalArgNode.value.value);
49
49
  }
50
50
  setExecuteFn((args) => new Repeater((push, stop) => {
51
- var _a, _b;
52
51
  let finished = false;
53
52
  async function pump() {
54
53
  if (finished) {
@@ -75,12 +74,6 @@ export default function usePollingLive({ config: { defaultInterval = 1000 } = {}
75
74
  stop.then(() => {
76
75
  finished = true;
77
76
  });
78
- (_a = globalThis.process) === null || _a === void 0 ? void 0 : _a.on('SIGINT', () => {
79
- finished = true;
80
- });
81
- (_b = globalThis.process) === null || _b === void 0 ? void 0 : _b.on('SIGTERM', () => {
82
- finished = true;
83
- });
84
77
  }));
85
78
  }
86
79
  },
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@graphprotocol/client-polling-live",
3
- "version": "1.0.0-canary-aa1aef7.0",
3
+ "version": "1.0.1",
4
4
  "description": "",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
7
7
  "graphql": "^15.2.0 || ^16.0.0",
8
8
  "@graphql-tools/merge": "^8.3.1",
9
- "@envelop/core": "^2.4.2"
9
+ "@envelop/core": "^2.4.2 || ^3.0.0"
10
10
  },
11
11
  "dependencies": {
12
12
  "@repeaterjs/repeater": "^3.0.4",
13
- "tslib": "2.4.0"
13
+ "tslib": "^2.4.0"
14
14
  },
15
15
  "repository": {
16
16
  "type": "git",
@@ -33,7 +33,7 @@
33
33
  "exports": {
34
34
  ".": {
35
35
  "require": {
36
- "types": "./typings/index.d.ts",
36
+ "types": "./typings/index.d.cts",
37
37
  "default": "./cjs/index.js"
38
38
  },
39
39
  "import": {
@@ -0,0 +1,6 @@
1
+ import { Plugin } from '@envelop/core';
2
+ export default function usePollingLive({ config: { defaultInterval } }?: {
3
+ config?: {
4
+ defaultInterval?: number | undefined;
5
+ } | undefined;
6
+ }): Plugin<{}>;