@graphprotocol/graph-cli 0.25.0 → 0.26.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.
- package/examples/basic-event-handlers/node_modules/chalk/node_modules/supports-color/index.js +50 -0
- package/examples/basic-event-handlers/node_modules/chalk/node_modules/supports-color/license +21 -0
- package/examples/basic-event-handlers/node_modules/chalk/node_modules/supports-color/package.json +49 -0
- package/examples/basic-event-handlers/node_modules/chalk/node_modules/supports-color/readme.md +36 -0
- package/examples/basic-event-handlers/node_modules/cliui/node_modules/ansi-regex/index.js +10 -0
- package/examples/basic-event-handlers/node_modules/cliui/node_modules/ansi-regex/license +9 -0
- package/examples/basic-event-handlers/node_modules/cliui/node_modules/ansi-regex/package.json +53 -0
- package/examples/basic-event-handlers/node_modules/cliui/node_modules/ansi-regex/readme.md +46 -0
- package/examples/basic-event-handlers/node_modules/cliui/node_modules/strip-ansi/index.js +4 -0
- package/examples/basic-event-handlers/node_modules/cliui/node_modules/strip-ansi/license +9 -0
- package/examples/basic-event-handlers/node_modules/cliui/node_modules/strip-ansi/package.json +52 -0
- package/examples/basic-event-handlers/node_modules/cliui/node_modules/strip-ansi/readme.md +39 -0
- package/examples/basic-event-handlers/node_modules/keccak/build/Makefile +342 -0
- package/examples/basic-event-handlers/node_modules/keccak/build/Release/.deps/Release/obj.target/keccak/src/addon.o.d.raw +27 -0
- package/examples/basic-event-handlers/node_modules/keccak/build/binding.Makefile +6 -0
- package/examples/basic-event-handlers/node_modules/keccak/build/config.gypi +207 -0
- package/examples/basic-event-handlers/node_modules/keccak/build/gyp-mac-tool +615 -0
- package/examples/basic-event-handlers/node_modules/keccak/build/keccak.target.mk +209 -0
- package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/.coveralls.yml +1 -0
- package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/.eslintrc +14 -0
- package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/.travis.yml +20 -0
- package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/CHANGELOG.md +395 -0
- package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/LICENSE +19 -0
- package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/Makefile +58 -0
- package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/README.md +368 -0
- package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/karma.conf.js +70 -0
- package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/node.js +1 -0
- package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/package.json +43 -0
- package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/src/browser.js +195 -0
- package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/src/debug.js +225 -0
- package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/src/index.js +10 -0
- package/examples/basic-event-handlers/node_modules/mocha/node_modules/debug/src/node.js +186 -0
- package/examples/basic-event-handlers/node_modules/rimraf/node_modules/glob/LICENSE +15 -0
- package/examples/basic-event-handlers/node_modules/rimraf/node_modules/glob/README.md +368 -0
- package/examples/basic-event-handlers/node_modules/rimraf/node_modules/glob/changelog.md +67 -0
- package/examples/basic-event-handlers/node_modules/rimraf/node_modules/glob/common.js +240 -0
- package/examples/basic-event-handlers/node_modules/rimraf/node_modules/glob/glob.js +790 -0
- package/examples/basic-event-handlers/node_modules/rimraf/node_modules/glob/package.json +43 -0
- package/examples/basic-event-handlers/node_modules/rimraf/node_modules/glob/sync.js +486 -0
- package/examples/basic-event-handlers/node_modules/string-width/node_modules/ansi-regex/index.js +10 -0
- package/examples/basic-event-handlers/node_modules/string-width/node_modules/ansi-regex/license +9 -0
- package/examples/basic-event-handlers/node_modules/string-width/node_modules/ansi-regex/package.json +53 -0
- package/examples/basic-event-handlers/node_modules/string-width/node_modules/ansi-regex/readme.md +46 -0
- package/examples/basic-event-handlers/node_modules/string-width/node_modules/strip-ansi/index.js +4 -0
- package/examples/basic-event-handlers/node_modules/string-width/node_modules/strip-ansi/license +9 -0
- package/examples/basic-event-handlers/node_modules/string-width/node_modules/strip-ansi/package.json +52 -0
- package/examples/basic-event-handlers/node_modules/string-width/node_modules/strip-ansi/readme.md +39 -0
- package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js +46 -0
- package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license +21 -0
- package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json +45 -0
- package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md +39 -0
- package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/string-width/index.js +37 -0
- package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/string-width/license +21 -0
- package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/string-width/package.json +56 -0
- package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/string-width/readme.md +42 -0
- package/package.json +2 -2
- package/src/codegen/schema.js +15 -5
- package/src/codegen/schema.test.js +368 -0
- package/src/codegen/types/defaults.js +34 -0
- package/src/codegen/typescript.js +7 -11
- package/src/command-helpers/version.js +1 -1
- package/src/command-helpers/version.test.js +1 -1
- package/src/commands/init.js +1 -0
- package/src/commands/test.js +210 -27
- package/src/protocols/index.js +7 -5
- package/examples/basic-event-handlers/node_modules/mocha/lib/reporters/base.js.orig +0 -498
- package/examples/basic-event-handlers/node_modules/node-fetch/lib/index.js +0 -1416
package/examples/basic-event-handlers/node_modules/string-width/node_modules/strip-ansi/package.json
ADDED
|
@@ -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
|
+
}
|
package/examples/basic-event-handlers/node_modules/string-width/node_modules/strip-ansi/readme.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# strip-ansi [](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
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var numberIsNan = require('number-is-nan');
|
|
3
|
+
|
|
4
|
+
module.exports = function (x) {
|
|
5
|
+
if (numberIsNan(x)) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1369
|
|
10
|
+
|
|
11
|
+
// code points are derived from:
|
|
12
|
+
// http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
|
|
13
|
+
if (x >= 0x1100 && (
|
|
14
|
+
x <= 0x115f || // Hangul Jamo
|
|
15
|
+
0x2329 === x || // LEFT-POINTING ANGLE BRACKET
|
|
16
|
+
0x232a === x || // RIGHT-POINTING ANGLE BRACKET
|
|
17
|
+
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
18
|
+
(0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
|
|
19
|
+
// Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
20
|
+
0x3250 <= x && x <= 0x4dbf ||
|
|
21
|
+
// CJK Unified Ideographs .. Yi Radicals
|
|
22
|
+
0x4e00 <= x && x <= 0xa4c6 ||
|
|
23
|
+
// Hangul Jamo Extended-A
|
|
24
|
+
0xa960 <= x && x <= 0xa97c ||
|
|
25
|
+
// Hangul Syllables
|
|
26
|
+
0xac00 <= x && x <= 0xd7a3 ||
|
|
27
|
+
// CJK Compatibility Ideographs
|
|
28
|
+
0xf900 <= x && x <= 0xfaff ||
|
|
29
|
+
// Vertical Forms
|
|
30
|
+
0xfe10 <= x && x <= 0xfe19 ||
|
|
31
|
+
// CJK Compatibility Forms .. Small Form Variants
|
|
32
|
+
0xfe30 <= x && x <= 0xfe6b ||
|
|
33
|
+
// Halfwidth and Fullwidth Forms
|
|
34
|
+
0xff01 <= x && x <= 0xff60 ||
|
|
35
|
+
0xffe0 <= x && x <= 0xffe6 ||
|
|
36
|
+
// Kana Supplement
|
|
37
|
+
0x1b000 <= x && x <= 0x1b001 ||
|
|
38
|
+
// Enclosed Ideographic Supplement
|
|
39
|
+
0x1f200 <= x && x <= 0x1f251 ||
|
|
40
|
+
// CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
41
|
+
0x20000 <= x && x <= 0x3fffd)) {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
@@ -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,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "is-fullwidth-code-point",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Check if the character represented by a given Unicode code point is fullwidth",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "sindresorhus/is-fullwidth-code-point",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Sindre Sorhus",
|
|
9
|
+
"email": "sindresorhus@gmail.com",
|
|
10
|
+
"url": "sindresorhus.com"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=0.10.0"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "node test.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"index.js"
|
|
20
|
+
],
|
|
21
|
+
"keywords": [
|
|
22
|
+
"fullwidth",
|
|
23
|
+
"full-width",
|
|
24
|
+
"full",
|
|
25
|
+
"width",
|
|
26
|
+
"unicode",
|
|
27
|
+
"character",
|
|
28
|
+
"char",
|
|
29
|
+
"string",
|
|
30
|
+
"str",
|
|
31
|
+
"codepoint",
|
|
32
|
+
"code",
|
|
33
|
+
"point",
|
|
34
|
+
"is",
|
|
35
|
+
"detect",
|
|
36
|
+
"check"
|
|
37
|
+
],
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"number-is-nan": "^1.0.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"ava": "0.0.4",
|
|
43
|
+
"code-point-at": "^1.0.0"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# is-fullwidth-code-point [](https://travis-ci.org/sindresorhus/is-fullwidth-code-point)
|
|
2
|
+
|
|
3
|
+
> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
$ npm install --save is-fullwidth-code-point
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
var isFullwidthCodePoint = require('is-fullwidth-code-point');
|
|
17
|
+
|
|
18
|
+
isFullwidthCodePoint('谢'.codePointAt());
|
|
19
|
+
//=> true
|
|
20
|
+
|
|
21
|
+
isFullwidthCodePoint('a'.codePointAt());
|
|
22
|
+
//=> false
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## API
|
|
27
|
+
|
|
28
|
+
### isFullwidthCodePoint(input)
|
|
29
|
+
|
|
30
|
+
#### input
|
|
31
|
+
|
|
32
|
+
Type: `number`
|
|
33
|
+
|
|
34
|
+
[Code point](https://en.wikipedia.org/wiki/Code_point) of a character.
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## License
|
|
38
|
+
|
|
39
|
+
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/string-width/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var stripAnsi = require('strip-ansi');
|
|
3
|
+
var codePointAt = require('code-point-at');
|
|
4
|
+
var isFullwidthCodePoint = require('is-fullwidth-code-point');
|
|
5
|
+
|
|
6
|
+
// https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1345
|
|
7
|
+
module.exports = function (str) {
|
|
8
|
+
if (typeof str !== 'string' || str.length === 0) {
|
|
9
|
+
return 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
var width = 0;
|
|
13
|
+
|
|
14
|
+
str = stripAnsi(str);
|
|
15
|
+
|
|
16
|
+
for (var i = 0; i < str.length; i++) {
|
|
17
|
+
var code = codePointAt(str, i);
|
|
18
|
+
|
|
19
|
+
// ignore control characters
|
|
20
|
+
if (code <= 0x1f || (code >= 0x7f && code <= 0x9f)) {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// surrogates
|
|
25
|
+
if (code >= 0x10000) {
|
|
26
|
+
i++;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (isFullwidthCodePoint(code)) {
|
|
30
|
+
width += 2;
|
|
31
|
+
} else {
|
|
32
|
+
width++;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return width;
|
|
37
|
+
};
|
package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/string-width/license
ADDED
|
@@ -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.
|
package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/string-width/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "string-width",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Get the visual width of a string - the number of columns required to display it",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "sindresorhus/string-width",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Sindre Sorhus",
|
|
9
|
+
"email": "sindresorhus@gmail.com",
|
|
10
|
+
"url": "sindresorhus.com"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=0.10.0"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "xo && ava"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"index.js"
|
|
20
|
+
],
|
|
21
|
+
"keywords": [
|
|
22
|
+
"string",
|
|
23
|
+
"str",
|
|
24
|
+
"character",
|
|
25
|
+
"char",
|
|
26
|
+
"unicode",
|
|
27
|
+
"width",
|
|
28
|
+
"visual",
|
|
29
|
+
"column",
|
|
30
|
+
"columns",
|
|
31
|
+
"fullwidth",
|
|
32
|
+
"full-width",
|
|
33
|
+
"full",
|
|
34
|
+
"ansi",
|
|
35
|
+
"escape",
|
|
36
|
+
"codes",
|
|
37
|
+
"cli",
|
|
38
|
+
"command-line",
|
|
39
|
+
"terminal",
|
|
40
|
+
"console",
|
|
41
|
+
"cjk",
|
|
42
|
+
"chinese",
|
|
43
|
+
"japanese",
|
|
44
|
+
"korean",
|
|
45
|
+
"fixed-width"
|
|
46
|
+
],
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"code-point-at": "^1.0.0",
|
|
49
|
+
"is-fullwidth-code-point": "^1.0.0",
|
|
50
|
+
"strip-ansi": "^3.0.0"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"ava": "*",
|
|
54
|
+
"xo": "*"
|
|
55
|
+
}
|
|
56
|
+
}
|
package/examples/basic-event-handlers/node_modules/wrap-ansi/node_modules/string-width/readme.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# string-width [](https://travis-ci.org/sindresorhus/string-width)
|
|
2
|
+
|
|
3
|
+
> Get the visual width of a string - the number of columns required to display it
|
|
4
|
+
|
|
5
|
+
Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width.
|
|
6
|
+
|
|
7
|
+
Useful to be able to measure the actual width of command-line output.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
$ npm install --save string-width
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
const stringWidth = require('string-width');
|
|
21
|
+
|
|
22
|
+
stringWidth('古');
|
|
23
|
+
//=> 2
|
|
24
|
+
|
|
25
|
+
stringWidth('\u001b[1m古\u001b[22m');
|
|
26
|
+
//=> 2
|
|
27
|
+
|
|
28
|
+
stringWidth('a');
|
|
29
|
+
//=> 1
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## Related
|
|
34
|
+
|
|
35
|
+
- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module
|
|
36
|
+
- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string
|
|
37
|
+
- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## License
|
|
41
|
+
|
|
42
|
+
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphprotocol/graph-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "CLI for building for and deploying to The Graph",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"assemblyscript": "0.19.10",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dockerode": "^2.5.8",
|
|
13
13
|
"fs-extra": "^9.0.0",
|
|
14
14
|
"glob": "^7.1.2",
|
|
15
|
-
"gluegun": "
|
|
15
|
+
"gluegun": "https://github.com/edgeandnode/gluegun#v4.3.1-pin-colors-dep",
|
|
16
16
|
"graphql": "^15.5.0",
|
|
17
17
|
"immutable": "^3.8.2",
|
|
18
18
|
"ipfs-http-client": "^34.0.0",
|
package/src/codegen/schema.js
CHANGED
|
@@ -79,7 +79,8 @@ module.exports = class SchemaCodeGenerator {
|
|
|
79
79
|
const fieldsSetCalls = fieldsWithoutId
|
|
80
80
|
.map(field => {
|
|
81
81
|
const name = field.getIn(['name', 'value'])
|
|
82
|
-
const type = this._typeFromGraphQl(field.get('type'))
|
|
82
|
+
const type = this._typeFromGraphQl(field.get('type'), true, true)
|
|
83
|
+
|
|
83
84
|
const isNullable = type instanceof tsCodegen.NullableType
|
|
84
85
|
|
|
85
86
|
const directives = field.get('directives')
|
|
@@ -89,8 +90,12 @@ module.exports = class SchemaCodeGenerator {
|
|
|
89
90
|
})
|
|
90
91
|
// We only call the setter with the default value in the constructor for fields that are:
|
|
91
92
|
// - Not nullable, so that AS doesn't break when subgraph developers try to access them before a `set`
|
|
93
|
+
// - It doesn't matter if it's primitive or not
|
|
92
94
|
// - Not tagged as `derivedFrom`, because they only exist in query time
|
|
93
|
-
.filter(({
|
|
95
|
+
.filter(({
|
|
96
|
+
isNullable,
|
|
97
|
+
isDerivedFrom,
|
|
98
|
+
}) => !isNullable && !isDerivedFrom)
|
|
94
99
|
.map(({ name, type, isNullable }) => {
|
|
95
100
|
const fieldTypeString = isNullable ? type.inner.toString() : type.toString()
|
|
96
101
|
|
|
@@ -229,7 +234,7 @@ Suggestion: add an '!' to the member type of the List, change from '${fieldValue
|
|
|
229
234
|
: gqlType.getIn(['name', 'value'])
|
|
230
235
|
}
|
|
231
236
|
|
|
232
|
-
_typeFromGraphQl(gqlType, nullable = true) {
|
|
237
|
+
_typeFromGraphQl(gqlType, nullable = true, nullablePrimitive = false) {
|
|
233
238
|
if (gqlType.get('kind') === 'NonNullType') {
|
|
234
239
|
return this._typeFromGraphQl(gqlType.get('type'), false)
|
|
235
240
|
} else if (gqlType.get('kind') === 'ListType') {
|
|
@@ -240,8 +245,13 @@ Suggestion: add an '!' to the member type of the List, change from '${fieldValue
|
|
|
240
245
|
let type = tsCodegen.namedType(
|
|
241
246
|
typesCodegen.ascTypeForValue(gqlType.getIn(['name', 'value'])),
|
|
242
247
|
)
|
|
243
|
-
|
|
244
|
-
|
|
248
|
+
|
|
249
|
+
// Will not wrap primitives into NullableType by default.
|
|
250
|
+
if (!nullablePrimitive && type.isPrimitive()) {
|
|
251
|
+
return type
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
return nullable ? tsCodegen.nullableType(type) : type
|
|
245
255
|
}
|
|
246
256
|
}
|
|
247
257
|
}
|