@graphprotocol/graph-cli 0.25.2 → 0.26.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/examples/basic-event-handlers/node_modules/@graphprotocol/graph-ts/chain/ethereum.ts +1 -1
- package/examples/basic-event-handlers/node_modules/@graphprotocol/graph-ts/chain/tendermint.ts +554 -0
- package/examples/basic-event-handlers/node_modules/@graphprotocol/graph-ts/common/collections.ts +52 -2
- package/examples/basic-event-handlers/node_modules/@graphprotocol/graph-ts/common/numbers.ts +11 -0
- package/examples/basic-event-handlers/node_modules/@graphprotocol/graph-ts/common/value.ts +47 -0
- package/examples/basic-event-handlers/node_modules/@graphprotocol/graph-ts/global/global.ts +150 -1
- package/examples/basic-event-handlers/node_modules/@graphprotocol/graph-ts/index.ts +2 -0
- package/examples/basic-event-handlers/node_modules/@graphprotocol/graph-ts/package.json +2 -1
- package/examples/basic-event-handlers/node_modules/@graphprotocol/graph-ts/test/test.js +2 -0
- 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/websocket/build/Makefile +1 -1
- package/examples/basic-event-handlers/node_modules/websocket/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d.raw +16 -16
- package/examples/basic-event-handlers/node_modules/websocket/build/bufferutil.target.mk +14 -14
- package/examples/basic-event-handlers/node_modules/websocket/build/config.gypi +1 -1
- package/examples/basic-event-handlers/node_modules/websocket/build/validation.target.mk +14 -14
- 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 +1 -1
- package/src/codegen/schema.js +2 -40
- package/src/codegen/schema.test.js +362 -0
- package/src/codegen/types/conversions.js +19 -19
- package/src/codegen/types/index.js +0 -25
- package/src/codegen/types/index.test.js +0 -22
- package/src/codegen/typescript.js +7 -11
- 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
|
|
@@ -331,7 +331,7 @@ ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
|
331
331
|
endif
|
|
332
332
|
|
|
333
333
|
quiet_cmd_regen_makefile = ACTION Regenerating $@
|
|
334
|
-
cmd_regen_makefile = cd $(srcdir); /usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/Users/
|
|
334
|
+
cmd_regen_makefile = cd $(srcdir); /usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/Users/eva/graph-cli/examples/basic-event-handlers/node_modules/websocket/build/config.gypi -I/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/Users/eva/Library/Caches/node-gyp/14.16.0/include/node/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/eva/Library/Caches/node-gyp/14.16.0" "-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=/Users/eva/Library/Caches/node-gyp/14.16.0/<(target_arch)/node.lib" "-Dmodule_root_dir=/Users/eva/graph-cli/examples/basic-event-handlers/node_modules/websocket" "-Dnode_engine=v8" binding.gyp
|
|
335
335
|
Makefile: $(srcdir)/../../../../../../../usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../../Library/Caches/node-gyp/14.16.0/include/node/common.gypi
|
|
336
336
|
$(call do_cmd,regen_makefile)
|
|
337
337
|
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
Release/obj.target/bufferutil/src/bufferutil.o: ../src/bufferutil.cc \
|
|
2
|
-
/Users/
|
|
3
|
-
/Users/
|
|
4
|
-
/Users/
|
|
5
|
-
/Users/
|
|
6
|
-
/Users/
|
|
7
|
-
/Users/
|
|
8
|
-
/Users/
|
|
9
|
-
/Users/
|
|
10
|
-
/Users/
|
|
11
|
-
/Users/
|
|
2
|
+
/Users/eva/Library/Caches/node-gyp/14.16.0/include/node/v8.h \
|
|
3
|
+
/Users/eva/Library/Caches/node-gyp/14.16.0/include/node/cppgc/common.h \
|
|
4
|
+
/Users/eva/Library/Caches/node-gyp/14.16.0/include/node/v8config.h \
|
|
5
|
+
/Users/eva/Library/Caches/node-gyp/14.16.0/include/node/v8-internal.h \
|
|
6
|
+
/Users/eva/Library/Caches/node-gyp/14.16.0/include/node/v8-version.h \
|
|
7
|
+
/Users/eva/Library/Caches/node-gyp/14.16.0/include/node/node.h \
|
|
8
|
+
/Users/eva/Library/Caches/node-gyp/14.16.0/include/node/v8-platform.h \
|
|
9
|
+
/Users/eva/Library/Caches/node-gyp/14.16.0/include/node/node_version.h \
|
|
10
|
+
/Users/eva/Library/Caches/node-gyp/14.16.0/include/node/node_buffer.h \
|
|
11
|
+
/Users/eva/Library/Caches/node-gyp/14.16.0/include/node/node_object_wrap.h \
|
|
12
12
|
../../nan/nan.h \
|
|
13
|
-
/Users/
|
|
14
|
-
/Users/
|
|
15
|
-
/Users/
|
|
16
|
-
/Users/
|
|
17
|
-
/Users/
|
|
18
|
-
/Users/
|
|
13
|
+
/Users/eva/Library/Caches/node-gyp/14.16.0/include/node/uv.h \
|
|
14
|
+
/Users/eva/Library/Caches/node-gyp/14.16.0/include/node/uv/errno.h \
|
|
15
|
+
/Users/eva/Library/Caches/node-gyp/14.16.0/include/node/uv/version.h \
|
|
16
|
+
/Users/eva/Library/Caches/node-gyp/14.16.0/include/node/uv/unix.h \
|
|
17
|
+
/Users/eva/Library/Caches/node-gyp/14.16.0/include/node/uv/threadpool.h \
|
|
18
|
+
/Users/eva/Library/Caches/node-gyp/14.16.0/include/node/uv/darwin.h \
|
|
19
19
|
../../nan/nan_callbacks.h ../../nan/nan_callbacks_12_inl.h \
|
|
20
20
|
../../nan/nan_maybe_43_inl.h ../../nan/nan_converters.h \
|
|
21
21
|
../../nan/nan_converters_43_inl.h ../../nan/nan_new.h \
|
|
@@ -49,13 +49,13 @@ CFLAGS_OBJC_Debug :=
|
|
|
49
49
|
CFLAGS_OBJCC_Debug :=
|
|
50
50
|
|
|
51
51
|
INCS_Debug := \
|
|
52
|
-
-I/Users/
|
|
53
|
-
-I/Users/
|
|
54
|
-
-I/Users/
|
|
55
|
-
-I/Users/
|
|
56
|
-
-I/Users/
|
|
57
|
-
-I/Users/
|
|
58
|
-
-I/Users/
|
|
52
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/include/node \
|
|
53
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/src \
|
|
54
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/openssl/config \
|
|
55
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/openssl/openssl/include \
|
|
56
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/uv/include \
|
|
57
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/zlib \
|
|
58
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/v8/include \
|
|
59
59
|
-I$(srcdir)/../nan
|
|
60
60
|
|
|
61
61
|
DEFS_Release := \
|
|
@@ -102,13 +102,13 @@ CFLAGS_OBJC_Release :=
|
|
|
102
102
|
CFLAGS_OBJCC_Release :=
|
|
103
103
|
|
|
104
104
|
INCS_Release := \
|
|
105
|
-
-I/Users/
|
|
106
|
-
-I/Users/
|
|
107
|
-
-I/Users/
|
|
108
|
-
-I/Users/
|
|
109
|
-
-I/Users/
|
|
110
|
-
-I/Users/
|
|
111
|
-
-I/Users/
|
|
105
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/include/node \
|
|
106
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/src \
|
|
107
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/openssl/config \
|
|
108
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/openssl/openssl/include \
|
|
109
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/uv/include \
|
|
110
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/zlib \
|
|
111
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/v8/include \
|
|
112
112
|
-I$(srcdir)/../nan
|
|
113
113
|
|
|
114
114
|
OBJS := \
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"v8_use_siphash": 1,
|
|
77
77
|
"want_separate_host_toolset": 0,
|
|
78
78
|
"xcode_version": "11.0",
|
|
79
|
-
"nodedir": "/Users/
|
|
79
|
+
"nodedir": "/Users/eva/Library/Caches/node-gyp/14.16.0",
|
|
80
80
|
"standalone_static_library": 1,
|
|
81
81
|
"version_git_tag": "true",
|
|
82
82
|
"init_license": "MIT",
|
|
@@ -49,13 +49,13 @@ CFLAGS_OBJC_Debug :=
|
|
|
49
49
|
CFLAGS_OBJCC_Debug :=
|
|
50
50
|
|
|
51
51
|
INCS_Debug := \
|
|
52
|
-
-I/Users/
|
|
53
|
-
-I/Users/
|
|
54
|
-
-I/Users/
|
|
55
|
-
-I/Users/
|
|
56
|
-
-I/Users/
|
|
57
|
-
-I/Users/
|
|
58
|
-
-I/Users/
|
|
52
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/include/node \
|
|
53
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/src \
|
|
54
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/openssl/config \
|
|
55
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/openssl/openssl/include \
|
|
56
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/uv/include \
|
|
57
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/zlib \
|
|
58
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/v8/include \
|
|
59
59
|
-I$(srcdir)/../nan
|
|
60
60
|
|
|
61
61
|
DEFS_Release := \
|
|
@@ -102,13 +102,13 @@ CFLAGS_OBJC_Release :=
|
|
|
102
102
|
CFLAGS_OBJCC_Release :=
|
|
103
103
|
|
|
104
104
|
INCS_Release := \
|
|
105
|
-
-I/Users/
|
|
106
|
-
-I/Users/
|
|
107
|
-
-I/Users/
|
|
108
|
-
-I/Users/
|
|
109
|
-
-I/Users/
|
|
110
|
-
-I/Users/
|
|
111
|
-
-I/Users/
|
|
105
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/include/node \
|
|
106
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/src \
|
|
107
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/openssl/config \
|
|
108
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/openssl/openssl/include \
|
|
109
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/uv/include \
|
|
110
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/zlib \
|
|
111
|
+
-I/Users/eva/Library/Caches/node-gyp/14.16.0/deps/v8/include \
|
|
112
112
|
-I$(srcdir)/../nan
|
|
113
113
|
|
|
114
114
|
OBJS := \
|
|
@@ -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
package/src/codegen/schema.js
CHANGED
|
@@ -54,7 +54,7 @@ module.exports = class SchemaCodeGenerator {
|
|
|
54
54
|
let klass = tsCodegen.klass(name, { export: true, extends: 'Entity' })
|
|
55
55
|
|
|
56
56
|
// Generate and add a constructor
|
|
57
|
-
klass.addMethod(this._generateConstructor(name
|
|
57
|
+
klass.addMethod(this._generateConstructor(name))
|
|
58
58
|
|
|
59
59
|
// Generate and add save() and getById() methods
|
|
60
60
|
this._generateStoreMethods(name).forEach(method => klass.addMethod(method))
|
|
@@ -71,44 +71,7 @@ module.exports = class SchemaCodeGenerator {
|
|
|
71
71
|
return klass
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
_generateDefaultFieldValues(fields) {
|
|
76
|
-
const indexOfIdField = fields.findIndex(field => field.getIn(['name', 'value']) === 'id')
|
|
77
|
-
const fieldsWithoutId = fields.remove(indexOfIdField)
|
|
78
|
-
|
|
79
|
-
const fieldsSetCalls = fieldsWithoutId
|
|
80
|
-
.map(field => {
|
|
81
|
-
const name = field.getIn(['name', 'value'])
|
|
82
|
-
const type = this._typeFromGraphQl(field.get('type'))
|
|
83
|
-
|
|
84
|
-
const isNullable = type instanceof tsCodegen.NullableType
|
|
85
|
-
const isPrimitive = type.isPrimitive && type.isPrimitive()
|
|
86
|
-
|
|
87
|
-
const directives = field.get('directives')
|
|
88
|
-
const isDerivedFrom = directives.some(directive => directive.getIn(['name', 'value']) === 'derivedFrom')
|
|
89
|
-
|
|
90
|
-
return { name, type, isNullable, isPrimitive, isDerivedFrom }
|
|
91
|
-
})
|
|
92
|
-
// We only call the setter with the default value in the constructor for fields that are:
|
|
93
|
-
// - Not primitive (such as Int/i32)
|
|
94
|
-
// - Not nullable, so that AS doesn't break when subgraph developers try to access them before a `set`
|
|
95
|
-
// - Not tagged as `derivedFrom`, because they only exist in query time
|
|
96
|
-
.filter(({
|
|
97
|
-
isNullable,
|
|
98
|
-
isPrimitive,
|
|
99
|
-
isDerivedFrom,
|
|
100
|
-
}) => !(isNullable || isPrimitive || isDerivedFrom))
|
|
101
|
-
.map(({ name, type, isNullable }) => {
|
|
102
|
-
const fieldTypeString = isNullable ? type.inner.toString() : type.toString()
|
|
103
|
-
|
|
104
|
-
return `
|
|
105
|
-
this.set('${name}', ${typesCodegen.initializedValueFromAsc(fieldTypeString)})`
|
|
106
|
-
})
|
|
107
|
-
|
|
108
|
-
return fieldsSetCalls.join('')
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
_generateConstructor(entityName, fields) {
|
|
74
|
+
_generateConstructor(entityName) {
|
|
112
75
|
return tsCodegen.method(
|
|
113
76
|
'constructor',
|
|
114
77
|
[tsCodegen.param('id', tsCodegen.namedType('string'))],
|
|
@@ -116,7 +79,6 @@ module.exports = class SchemaCodeGenerator {
|
|
|
116
79
|
`
|
|
117
80
|
super()
|
|
118
81
|
this.set('id', Value.fromString(id))
|
|
119
|
-
${this._generateDefaultFieldValues(fields)}
|
|
120
82
|
`,
|
|
121
83
|
)
|
|
122
84
|
}
|