@graphprotocol/graph-cli 0.25.2 → 0.27.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.
Files changed (81) hide show
  1. package/examples/basic-event-handlers/node_modules/@graphprotocol/graph-ts/chain/ethereum.ts +1 -1
  2. package/examples/basic-event-handlers/node_modules/@graphprotocol/graph-ts/package.json +1 -1
  3. package/examples/basic-event-handlers/node_modules/chalk/node_modules/supports-color/index.js +50 -0
  4. package/examples/basic-event-handlers/node_modules/chalk/node_modules/supports-color/license +21 -0
  5. package/examples/basic-event-handlers/node_modules/chalk/node_modules/supports-color/package.json +49 -0
  6. package/examples/basic-event-handlers/node_modules/chalk/node_modules/supports-color/readme.md +36 -0
  7. package/examples/basic-event-handlers/node_modules/cliui/node_modules/ansi-regex/index.js +10 -0
  8. package/examples/basic-event-handlers/node_modules/cliui/node_modules/ansi-regex/license +9 -0
  9. package/examples/basic-event-handlers/node_modules/cliui/node_modules/ansi-regex/package.json +53 -0
  10. package/examples/basic-event-handlers/node_modules/cliui/node_modules/ansi-regex/readme.md +46 -0
  11. package/examples/basic-event-handlers/node_modules/cliui/node_modules/strip-ansi/index.js +4 -0
  12. package/examples/basic-event-handlers/node_modules/cliui/node_modules/strip-ansi/license +9 -0
  13. package/examples/basic-event-handlers/node_modules/cliui/node_modules/strip-ansi/package.json +52 -0
  14. package/examples/basic-event-handlers/node_modules/cliui/node_modules/strip-ansi/readme.md +39 -0
  15. package/examples/basic-event-handlers/node_modules/keccak/build/Makefile +342 -0
  16. package/examples/basic-event-handlers/node_modules/keccak/build/Release/.deps/Release/obj.target/keccak/src/addon.o.d.raw +27 -0
  17. package/examples/basic-event-handlers/node_modules/keccak/build/binding.Makefile +6 -0
  18. package/examples/basic-event-handlers/node_modules/keccak/build/config.gypi +207 -0
  19. package/examples/basic-event-handlers/node_modules/keccak/build/gyp-mac-tool +615 -0
  20. package/examples/basic-event-handlers/node_modules/keccak/build/keccak.target.mk +209 -0
  21. package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/.coveralls.yml +1 -0
  22. package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/.eslintrc +14 -0
  23. package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/.travis.yml +20 -0
  24. package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/CHANGELOG.md +395 -0
  25. package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/LICENSE +19 -0
  26. package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/Makefile +58 -0
  27. package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/README.md +368 -0
  28. package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/karma.conf.js +70 -0
  29. package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/node.js +1 -0
  30. package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/package.json +43 -0
  31. package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/src/browser.js +195 -0
  32. package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/src/debug.js +225 -0
  33. package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/src/index.js +10 -0
  34. package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/src/node.js +186 -0
  35. package/examples/basic-event-handlers/node_modules/rimraf/node_modules/glob/LICENSE +15 -0
  36. package/examples/basic-event-handlers/node_modules/rimraf/node_modules/glob/README.md +368 -0
  37. package/examples/basic-event-handlers/node_modules/rimraf/node_modules/glob/changelog.md +67 -0
  38. package/examples/basic-event-handlers/node_modules/rimraf/node_modules/glob/common.js +240 -0
  39. package/examples/basic-event-handlers/node_modules/rimraf/node_modules/glob/glob.js +790 -0
  40. package/examples/basic-event-handlers/node_modules/rimraf/node_modules/glob/package.json +43 -0
  41. package/examples/basic-event-handlers/node_modules/rimraf/node_modules/glob/sync.js +486 -0
  42. package/examples/basic-event-handlers/node_modules/string-width/node_modules/ansi-regex/index.js +10 -0
  43. package/examples/basic-event-handlers/node_modules/string-width/node_modules/ansi-regex/license +9 -0
  44. package/examples/basic-event-handlers/node_modules/string-width/node_modules/ansi-regex/package.json +53 -0
  45. package/examples/basic-event-handlers/node_modules/string-width/node_modules/ansi-regex/readme.md +46 -0
  46. package/examples/basic-event-handlers/node_modules/string-width/node_modules/strip-ansi/index.js +4 -0
  47. package/examples/basic-event-handlers/node_modules/string-width/node_modules/strip-ansi/license +9 -0
  48. package/examples/basic-event-handlers/node_modules/string-width/node_modules/strip-ansi/package.json +52 -0
  49. package/examples/basic-event-handlers/node_modules/string-width/node_modules/strip-ansi/readme.md +39 -0
  50. package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js +46 -0
  51. package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license +21 -0
  52. package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json +45 -0
  53. package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md +39 -0
  54. package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/string-width/index.js +37 -0
  55. package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/string-width/license +21 -0
  56. package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/string-width/package.json +56 -0
  57. package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/string-width/readme.md +42 -0
  58. package/examples/basic-event-handlers/package.json +4 -4
  59. package/examples/basic-event-handlers/yarn.lock +8 -8
  60. package/package.json +27 -24
  61. package/src/codegen/schema.js +12 -9
  62. package/src/codegen/schema.test.js +368 -0
  63. package/src/codegen/typescript.js +7 -11
  64. package/src/commands/deploy.js +3 -1
  65. package/src/commands/init.js +2 -0
  66. package/src/commands/test.js +82 -59
  67. package/src/protocols/ethereum/codegen/abi.js +72 -2
  68. package/src/protocols/ethereum/manifest.graphql +92 -0
  69. package/src/protocols/index.js +17 -7
  70. package/src/protocols/near/manifest.graphql +57 -0
  71. package/src/subgraph.js +18 -13
  72. package/src/validation/manifest.js +12 -8
  73. package/tests/cli/validation/example-values-found.stderr +2 -2
  74. package/tests/cli/validation/invalid-manifest/subgraph.yaml +2 -1
  75. package/tests/cli/validation/invalid-manifest-cannot-infer-protocol/subgraph.yaml +12 -0
  76. package/tests/cli/validation/invalid-manifest-cannot-infer-protocol.stderr +5 -0
  77. package/tests/cli/validation/invalid-manifest.stderr +0 -3
  78. package/tests/cli/validation.test.js +8 -0
  79. package/examples/basic-event-handlers/node_modules/mocha/lib/reporters/base.js.orig +0 -498
  80. package/examples/basic-event-handlers/node_modules/node-fetch/lib/index.js +0 -1416
  81. package/manifest-schema.graphql +0 -122
@@ -356,7 +356,7 @@ export namespace ethereum {
356
356
  public gasLimit: BigInt,
357
357
  public gasPrice: BigInt,
358
358
  public input: Bytes,
359
- public nonce: Bytes,
359
+ public nonce: BigInt,
360
360
  ) {}
361
361
  }
362
362
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@graphprotocol/graph-ts",
3
3
  "description": "TypeScript/AssemblyScript library for writing subgraph mappings for The Graph",
4
- "version": "0.24.0",
4
+ "version": "0.24.1",
5
5
  "module": "index.ts",
6
6
  "types": "index.ts",
7
7
  "main": "index.ts",
@@ -0,0 +1,50 @@
1
+ 'use strict';
2
+ var argv = process.argv;
3
+
4
+ var terminator = argv.indexOf('--');
5
+ var hasFlag = function (flag) {
6
+ flag = '--' + flag;
7
+ var pos = argv.indexOf(flag);
8
+ return pos !== -1 && (terminator !== -1 ? pos < terminator : true);
9
+ };
10
+
11
+ module.exports = (function () {
12
+ if ('FORCE_COLOR' in process.env) {
13
+ return true;
14
+ }
15
+
16
+ if (hasFlag('no-color') ||
17
+ hasFlag('no-colors') ||
18
+ hasFlag('color=false')) {
19
+ return false;
20
+ }
21
+
22
+ if (hasFlag('color') ||
23
+ hasFlag('colors') ||
24
+ hasFlag('color=true') ||
25
+ hasFlag('color=always')) {
26
+ return true;
27
+ }
28
+
29
+ if (process.stdout && !process.stdout.isTTY) {
30
+ return false;
31
+ }
32
+
33
+ if (process.platform === 'win32') {
34
+ return true;
35
+ }
36
+
37
+ if ('COLORTERM' in process.env) {
38
+ return true;
39
+ }
40
+
41
+ if (process.env.TERM === 'dumb') {
42
+ return false;
43
+ }
44
+
45
+ if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
46
+ return true;
47
+ }
48
+
49
+ return false;
50
+ })();
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "supports-color",
3
+ "version": "2.0.0",
4
+ "description": "Detect whether a terminal supports color",
5
+ "license": "MIT",
6
+ "repository": "chalk/supports-color",
7
+ "author": {
8
+ "name": "Sindre Sorhus",
9
+ "email": "sindresorhus@gmail.com",
10
+ "url": "sindresorhus.com"
11
+ },
12
+ "maintainers": [
13
+ "Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
14
+ "Joshua Appelman <jappelman@xebia.com> (jbnicolai.com)"
15
+ ],
16
+ "engines": {
17
+ "node": ">=0.8.0"
18
+ },
19
+ "scripts": {
20
+ "test": "mocha"
21
+ },
22
+ "files": [
23
+ "index.js"
24
+ ],
25
+ "keywords": [
26
+ "color",
27
+ "colour",
28
+ "colors",
29
+ "terminal",
30
+ "console",
31
+ "cli",
32
+ "ansi",
33
+ "styles",
34
+ "tty",
35
+ "rgb",
36
+ "256",
37
+ "shell",
38
+ "xterm",
39
+ "command-line",
40
+ "support",
41
+ "supports",
42
+ "capability",
43
+ "detect"
44
+ ],
45
+ "devDependencies": {
46
+ "mocha": "*",
47
+ "require-uncached": "^1.0.2"
48
+ }
49
+ }
@@ -0,0 +1,36 @@
1
+ # supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color)
2
+
3
+ > Detect whether a terminal supports color
4
+
5
+
6
+ ## Install
7
+
8
+ ```
9
+ $ npm install --save supports-color
10
+ ```
11
+
12
+
13
+ ## Usage
14
+
15
+ ```js
16
+ var supportsColor = require('supports-color');
17
+
18
+ if (supportsColor) {
19
+ console.log('Terminal supports color');
20
+ }
21
+ ```
22
+
23
+ It obeys the `--color` and `--no-color` CLI flags.
24
+
25
+ For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
26
+
27
+
28
+ ## Related
29
+
30
+ - [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module
31
+ - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
32
+
33
+
34
+ ## License
35
+
36
+ MIT © [Sindre Sorhus](http://sindresorhus.com)
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ module.exports = () => {
4
+ const pattern = [
5
+ '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)',
6
+ '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
7
+ ].join('|');
8
+
9
+ return new RegExp(pattern, 'g');
10
+ };
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "ansi-regex",
3
+ "version": "3.0.0",
4
+ "description": "Regular expression for matching ANSI escape codes",
5
+ "license": "MIT",
6
+ "repository": "chalk/ansi-regex",
7
+ "author": {
8
+ "name": "Sindre Sorhus",
9
+ "email": "sindresorhus@gmail.com",
10
+ "url": "sindresorhus.com"
11
+ },
12
+ "engines": {
13
+ "node": ">=4"
14
+ },
15
+ "scripts": {
16
+ "test": "xo && ava",
17
+ "view-supported": "node fixtures/view-codes.js"
18
+ },
19
+ "files": [
20
+ "index.js"
21
+ ],
22
+ "keywords": [
23
+ "ansi",
24
+ "styles",
25
+ "color",
26
+ "colour",
27
+ "colors",
28
+ "terminal",
29
+ "console",
30
+ "cli",
31
+ "string",
32
+ "tty",
33
+ "escape",
34
+ "formatting",
35
+ "rgb",
36
+ "256",
37
+ "shell",
38
+ "xterm",
39
+ "command-line",
40
+ "text",
41
+ "regex",
42
+ "regexp",
43
+ "re",
44
+ "match",
45
+ "test",
46
+ "find",
47
+ "pattern"
48
+ ],
49
+ "devDependencies": {
50
+ "ava": "*",
51
+ "xo": "*"
52
+ }
53
+ }
@@ -0,0 +1,46 @@
1
+ # ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
2
+
3
+ > Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
4
+
5
+
6
+ ## Install
7
+
8
+ ```
9
+ $ npm install ansi-regex
10
+ ```
11
+
12
+
13
+ ## Usage
14
+
15
+ ```js
16
+ const ansiRegex = require('ansi-regex');
17
+
18
+ ansiRegex().test('\u001B[4mcake\u001B[0m');
19
+ //=> true
20
+
21
+ ansiRegex().test('cake');
22
+ //=> false
23
+
24
+ '\u001B[4mcake\u001B[0m'.match(ansiRegex());
25
+ //=> ['\u001B[4m', '\u001B[0m']
26
+ ```
27
+
28
+
29
+ ## FAQ
30
+
31
+ ### Why do you test for codes not in the ECMA 48 standard?
32
+
33
+ Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
34
+
35
+ On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
36
+
37
+
38
+ ## Maintainers
39
+
40
+ - [Sindre Sorhus](https://github.com/sindresorhus)
41
+ - [Josh Junon](https://github.com/qix-)
42
+
43
+
44
+ ## License
45
+
46
+ MIT
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ const ansiRegex = require('ansi-regex');
3
+
4
+ module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "strip-ansi",
3
+ "version": "4.0.0",
4
+ "description": "Strip ANSI escape codes",
5
+ "license": "MIT",
6
+ "repository": "chalk/strip-ansi",
7
+ "author": {
8
+ "name": "Sindre Sorhus",
9
+ "email": "sindresorhus@gmail.com",
10
+ "url": "sindresorhus.com"
11
+ },
12
+ "engines": {
13
+ "node": ">=4"
14
+ },
15
+ "scripts": {
16
+ "test": "xo && ava"
17
+ },
18
+ "files": [
19
+ "index.js"
20
+ ],
21
+ "keywords": [
22
+ "strip",
23
+ "trim",
24
+ "remove",
25
+ "ansi",
26
+ "styles",
27
+ "color",
28
+ "colour",
29
+ "colors",
30
+ "terminal",
31
+ "console",
32
+ "string",
33
+ "tty",
34
+ "escape",
35
+ "formatting",
36
+ "rgb",
37
+ "256",
38
+ "shell",
39
+ "xterm",
40
+ "log",
41
+ "logging",
42
+ "command-line",
43
+ "text"
44
+ ],
45
+ "dependencies": {
46
+ "ansi-regex": "^3.0.0"
47
+ },
48
+ "devDependencies": {
49
+ "ava": "*",
50
+ "xo": "*"
51
+ }
52
+ }
@@ -0,0 +1,39 @@
1
+ # strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
2
+
3
+ > Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
4
+
5
+
6
+ ## Install
7
+
8
+ ```
9
+ $ npm install strip-ansi
10
+ ```
11
+
12
+
13
+ ## Usage
14
+
15
+ ```js
16
+ const stripAnsi = require('strip-ansi');
17
+
18
+ stripAnsi('\u001B[4mUnicorn\u001B[0m');
19
+ //=> 'Unicorn'
20
+ ```
21
+
22
+
23
+ ## Related
24
+
25
+ - [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
26
+ - [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
27
+ - [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
28
+ - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
29
+
30
+
31
+ ## Maintainers
32
+
33
+ - [Sindre Sorhus](https://github.com/sindresorhus)
34
+ - [Josh Junon](https://github.com/qix-)
35
+
36
+
37
+ ## License
38
+
39
+ MIT