@port-labs/jq-node-bindings 0.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.
Files changed (131) hide show
  1. package/.editorconfig +5 -0
  2. package/.jshintignore +1 -0
  3. package/.jshintrc +23 -0
  4. package/binding.gyp +56 -0
  5. package/configure +26 -0
  6. package/deps/jq/.gitattributes +2 -0
  7. package/deps/jq/.travis.yml +53 -0
  8. package/deps/jq/AUTHORS +73 -0
  9. package/deps/jq/COPYING +70 -0
  10. package/deps/jq/ChangeLog +1349 -0
  11. package/deps/jq/Makefile.am +198 -0
  12. package/deps/jq/NEWS +88 -0
  13. package/deps/jq/README.md +64 -0
  14. package/deps/jq/builtin.c +1684 -0
  15. package/deps/jq/builtin.h +10 -0
  16. package/deps/jq/bytecode.c +161 -0
  17. package/deps/jq/bytecode.h +92 -0
  18. package/deps/jq/compile-ios.sh +102 -0
  19. package/deps/jq/compile.c +1210 -0
  20. package/deps/jq/compile.h +101 -0
  21. package/deps/jq/config/m4/check-math-func.m4 +4 -0
  22. package/deps/jq/config/m4/find-func-no-libs.m4 +8 -0
  23. package/deps/jq/config/m4/find-func-no-libs2.m4 +62 -0
  24. package/deps/jq/config/m4/find-func.m4 +9 -0
  25. package/deps/jq/config/m4/misc.m4 +3 -0
  26. package/deps/jq/configure.ac +221 -0
  27. package/deps/jq/docs/Gemfile +7 -0
  28. package/deps/jq/docs/Gemfile.lock +63 -0
  29. package/deps/jq/docs/README.md +25 -0
  30. package/deps/jq/docs/Rakefile +145 -0
  31. package/deps/jq/docs/content/1.tutorial/default.yml +327 -0
  32. package/deps/jq/docs/content/2.download/default.yml +117 -0
  33. package/deps/jq/docs/content/3.manual/manual.yml +2878 -0
  34. package/deps/jq/docs/content/3.manual/v1.3/manual.yml +1270 -0
  35. package/deps/jq/docs/content/3.manual/v1.4/manual.yml +1672 -0
  36. package/deps/jq/docs/content/index/index.yml +51 -0
  37. package/deps/jq/docs/default_manpage.md +22 -0
  38. package/deps/jq/docs/public/.htaccess +28 -0
  39. package/deps/jq/docs/public/bootstrap/css/bootstrap-responsive.css +1058 -0
  40. package/deps/jq/docs/public/bootstrap/css/bootstrap-responsive.min.css +9 -0
  41. package/deps/jq/docs/public/bootstrap/css/bootstrap.css +5224 -0
  42. package/deps/jq/docs/public/bootstrap/css/bootstrap.min.css +9 -0
  43. package/deps/jq/docs/public/bootstrap/img/glyphicons-halflings-white.png +0 -0
  44. package/deps/jq/docs/public/bootstrap/img/glyphicons-halflings.png +0 -0
  45. package/deps/jq/docs/public/bootstrap/js/bootstrap.js +2027 -0
  46. package/deps/jq/docs/public/bootstrap/js/bootstrap.min.js +6 -0
  47. package/deps/jq/docs/public/css/base.scss +99 -0
  48. package/deps/jq/docs/public/jq.png +0 -0
  49. package/deps/jq/docs/public/robots.txt +2 -0
  50. package/deps/jq/docs/site.yml +18 -0
  51. package/deps/jq/docs/templates/default.liquid +34 -0
  52. package/deps/jq/docs/templates/index.liquid +60 -0
  53. package/deps/jq/docs/templates/manual.liquid +122 -0
  54. package/deps/jq/docs/templates/shared/_footer.liquid +5 -0
  55. package/deps/jq/docs/templates/shared/_head.liquid +12 -0
  56. package/deps/jq/docs/templates/shared/_header.liquid +26 -0
  57. package/deps/jq/exec_stack.h +112 -0
  58. package/deps/jq/execute.c +1155 -0
  59. package/deps/jq/inject_errors.c +112 -0
  60. package/deps/jq/jq.1.default +39 -0
  61. package/deps/jq/jq.1.prebuilt +3075 -0
  62. package/deps/jq/jq.h +60 -0
  63. package/deps/jq/jq.spec +70 -0
  64. package/deps/jq/jq_parser.h +9 -0
  65. package/deps/jq/jq_test.c +346 -0
  66. package/deps/jq/jv.c +1333 -0
  67. package/deps/jq/jv.h +240 -0
  68. package/deps/jq/jv_alloc.c +179 -0
  69. package/deps/jq/jv_alloc.h +27 -0
  70. package/deps/jq/jv_aux.c +619 -0
  71. package/deps/jq/jv_dtoa.c +4275 -0
  72. package/deps/jq/jv_dtoa.h +22 -0
  73. package/deps/jq/jv_file.c +49 -0
  74. package/deps/jq/jv_parse.c +852 -0
  75. package/deps/jq/jv_print.c +348 -0
  76. package/deps/jq/jv_unicode.c +96 -0
  77. package/deps/jq/jv_unicode.h +11 -0
  78. package/deps/jq/jv_utf8_tables.h +37 -0
  79. package/deps/jq/lexer.c +2442 -0
  80. package/deps/jq/lexer.h +362 -0
  81. package/deps/jq/lexer.l +184 -0
  82. package/deps/jq/libm.h +160 -0
  83. package/deps/jq/linker.c +393 -0
  84. package/deps/jq/linker.h +7 -0
  85. package/deps/jq/locfile.c +91 -0
  86. package/deps/jq/locfile.h +29 -0
  87. package/deps/jq/m4/ax_compare_version.m4 +177 -0
  88. package/deps/jq/m4/ax_prog_bison_version.m4 +68 -0
  89. package/deps/jq/main.c +566 -0
  90. package/deps/jq/opcode_list.h +44 -0
  91. package/deps/jq/parser.c +3914 -0
  92. package/deps/jq/parser.h +193 -0
  93. package/deps/jq/parser.y +923 -0
  94. package/deps/jq/scripts/crosscompile +42 -0
  95. package/deps/jq/scripts/gen_utf8_tables.py +32 -0
  96. package/deps/jq/scripts/version +5 -0
  97. package/deps/jq/setup.sh +33 -0
  98. package/deps/jq/tests/jq.test +1235 -0
  99. package/deps/jq/tests/jqtest +5 -0
  100. package/deps/jq/tests/mantest +7 -0
  101. package/deps/jq/tests/modules/.jq +5 -0
  102. package/deps/jq/tests/modules/a.jq +2 -0
  103. package/deps/jq/tests/modules/b/b.jq +2 -0
  104. package/deps/jq/tests/modules/c/c.jq +16 -0
  105. package/deps/jq/tests/modules/c/d.jq +1 -0
  106. package/deps/jq/tests/modules/data.json +4 -0
  107. package/deps/jq/tests/modules/lib/jq/e/e.jq +1 -0
  108. package/deps/jq/tests/modules/lib/jq/f.jq +1 -0
  109. package/deps/jq/tests/modules/syntaxerror/syntaxerror.jq +1 -0
  110. package/deps/jq/tests/modules/test_bind_order.jq +4 -0
  111. package/deps/jq/tests/modules/test_bind_order0.jq +1 -0
  112. package/deps/jq/tests/modules/test_bind_order1.jq +2 -0
  113. package/deps/jq/tests/modules/test_bind_order2.jq +2 -0
  114. package/deps/jq/tests/onig.supp +21 -0
  115. package/deps/jq/tests/onig.test +85 -0
  116. package/deps/jq/tests/onigtest +5 -0
  117. package/deps/jq/tests/setup +36 -0
  118. package/deps/jq/tests/shtest +205 -0
  119. package/deps/jq/tests/torture/input0.json +7 -0
  120. package/deps/jq/util.c +462 -0
  121. package/deps/jq/util.h +64 -0
  122. package/deps/jq.gyp +35 -0
  123. package/index.d.ts +3 -0
  124. package/jest.config.js +10 -0
  125. package/lib/index.js +14 -0
  126. package/package.json +48 -0
  127. package/reports/jest-port-api.xml +35 -0
  128. package/src/binding.cc +177 -0
  129. package/src/binding.h +13 -0
  130. package/test/santiy.test.js +122 -0
  131. package/util/configure.js +27 -0
package/.editorconfig ADDED
@@ -0,0 +1,5 @@
1
+ [*]
2
+ indent_style = space
3
+ indent_size = 2
4
+ trim_trailing_whitespace = true
5
+ insert_final_newline = true
package/.jshintignore ADDED
@@ -0,0 +1 @@
1
+ README.md
package/.jshintrc ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "node": true,
3
+ "mocha": true,
4
+ "browser": false,
5
+ "boss": true,
6
+ "curly": true,
7
+ "debug": false,
8
+ "devel": false,
9
+ "eqeqeq": true,
10
+ "evil": true,
11
+ "forin": false,
12
+ "latedef": false,
13
+ "noarg": true,
14
+ "nonew": true,
15
+ "nomen": false,
16
+ "onevar": false,
17
+ "plusplus": false,
18
+ "regexp": false,
19
+ "undef": true,
20
+ "strict": false,
21
+ "white": false,
22
+ "eqnull": true
23
+ }
package/binding.gyp ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "targets": [
3
+ {
4
+ "target_name": "jq-node-bindings",
5
+ "sources": [
6
+ "src/binding.cc",
7
+ ],
8
+ "include_dirs": [
9
+ "<!(node -e \"require('nan')\")",
10
+ "<(module_root_dir)/",
11
+ "deps/jq"
12
+ ],
13
+ 'conditions': [
14
+ [
15
+ 'OS=="linux"',
16
+ {
17
+ "libraries": [
18
+ "../build/deps/libjq.so.1",
19
+ "-Wl,-rpath='$$ORIGIN/../deps'",
20
+ ],
21
+ 'cflags_cc': [
22
+ '-std=c++17'
23
+ ],
24
+ 'cflags_cc!': [
25
+ '-fno-rtti -fno-exceptions'
26
+ ]
27
+ }
28
+ ],
29
+ [
30
+ 'OS=="mac"',
31
+ {
32
+ "libraries": [
33
+ "../build/deps/libjq.dylib",
34
+ # "../build/deps/libonig.4.dylib",
35
+ # "../build/deps/libonig.dylib",
36
+ ],
37
+ 'xcode_settings': {
38
+ 'MACOSX_DEPLOYMENT_TARGET': '12.0.1',
39
+ 'GCC_ENABLE_CPP_RTTI': 'YES',
40
+ 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
41
+ },
42
+ 'OTHER_CPLUSPLUSFLAGS': [
43
+ '-std=c++17'
44
+ ],
45
+ "include_dirs": [
46
+ "deps/jq"
47
+ ]
48
+ }
49
+ ]
50
+ ],
51
+ "dependencies": [
52
+ "deps/jq.gyp:jq"
53
+ ]
54
+ }
55
+ ]
56
+ }
package/configure ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # autoconf, make, libtool, automake
4
+ scriptdir=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
5
+
6
+ pushd ./deps/jq &> /dev/null
7
+
8
+ echo "building jq"
9
+ echo $scriptdir
10
+
11
+ autoreconf -fi
12
+ CPPFLAGS=-D_REENTRANT ./configure \
13
+ --disable-maintainer-mode \
14
+ --libdir="${scriptdir}/build/deps" \
15
+ --prefix="${scriptdir}/build/deps" $*
16
+ make -j8
17
+ make install-libLTLIBRARIES install-includeHEADERS
18
+
19
+ # cp modules/oniguruma/src/.libs/libonig.a ${scriptdir}/build/deps/libonig.a
20
+ # cp modules/oniguruma/src/.libs/libonig.la ${scriptdir}/build/deps/libonig.la
21
+ # cp modules/oniguruma/src/.libs/libonig.lai ${scriptdir}/build/deps/libonig.lai
22
+ # cp modules/oniguruma/src/.libs/libonig.4.dylib ${scriptdir}/build/deps/libonig.4.dylib
23
+ # cp modules/oniguruma/src/.libs/libonig.dylib ${scriptdir}/build/deps/libonig.dylib
24
+
25
+ echo "finished building jq"
26
+ popd &> /dev/null
@@ -0,0 +1,2 @@
1
+ .gitattributes export-ignore
2
+ .gitignore export-ignore
@@ -0,0 +1,53 @@
1
+ sudo: false
2
+
3
+ language: c
4
+
5
+ compiler:
6
+ - gcc
7
+ - clang
8
+
9
+ matrix:
10
+ include:
11
+ - compiler: gcc
12
+ env: COVERAGE="--disable-valgrind --enable-gcov"
13
+
14
+ addons:
15
+ apt:
16
+ packages:
17
+ - libonig-dev
18
+ - valgrind
19
+
20
+ before_install:
21
+ - rm lexer.h lexer.c parser.h parser.c
22
+
23
+ install:
24
+ - bundle install --gemfile=docs/Gemfile
25
+
26
+ - wget http://ftp.debian.org/debian/pool/main/b/bison/bison_3.0.2.dfsg-2_amd64.deb
27
+ - ar p bison_3.0.2.dfsg-2_amd64.deb data.tar.xz | tar xJ
28
+
29
+ - if [ -n "$COVERAGE" ]; then pip install --user cpp-coveralls; fi
30
+
31
+ before_script:
32
+ - autoreconf -i
33
+ - ./configure
34
+ YACC="usr/bin/bison -y"
35
+ $COVERAGE
36
+
37
+ script:
38
+ - make -j4 BISON_PKGDATADIR=$(pwd)/usr/share/bison
39
+ - make check -j4
40
+
41
+ after_script:
42
+ - |
43
+ if [ -n "$COVERAGE" ]; then
44
+ rm -rf .libs usr # don't care about coverage for libjq and bison
45
+ coveralls -e lexer.c -e parser.c -e jv_dtoa.c --gcov-options '\-lp'
46
+ fi
47
+
48
+ after_failure:
49
+ - cat test-suite.log
50
+ - cat tests/*.log
51
+
52
+ notifications:
53
+ email: false
@@ -0,0 +1,73 @@
1
+ Created By:
2
+ Stephen Dolan <mu@netsoc.tcd.ie>
3
+
4
+ Maintained by:
5
+ Nicolas Williams <nico@cryptonector.com>
6
+ William Langford <wlangfor@gmail.com>
7
+ David Tolnay <dtolnay@gmail.com>
8
+
9
+ Contributions by:
10
+ Andrew Rodland <andrew@cleverdomain.org> - bug fixes
11
+ Ankur <ankz.kothari@gmail.com> - bug fixes
12
+ Anthony Shortland <anthony.shortland@me.com> - rpmbuild target
13
+ Brendan Macmillan <melbourne.research@gmail.com> - bug fixes, load library from ~/.jq
14
+ David R. MacIver <david@drmaciver.com> - bug fixes
15
+ David Tolnay <dtolnay@gmail.com> - destructuring, build improvements
16
+ Filippo Giunchedi <fgiunchedi@gmail.com> - bug fixes
17
+ Filippo Valsorda <filippo.valsorda@gmail.com> - recursive object merge (`*`)
18
+ Jack Pearkes <jackpearkes@gmail.com> - update tutorial
19
+ Jingwen Owen Ou <jingweno@gmail.com> - jqplay.org and link to it
20
+ Joe Littlejohn <joe.littlejohn@nokia.com> - bug fixes
21
+ Juan Guerrero <juan.guerrero.lozano@gmail.com> - bug fixes
22
+ Kenny Shen <kenny.shen@zalora.com> - doc fixes
23
+ Lee Thompson <stagr.lee@gmail.com> - autoconf stuff
24
+ Markus Lanthaler <mark_lanthaler@gmx.net> - doc fixes
25
+ Michael Daines <michael@mdaines.com> - add sqrt; doc fixes
26
+ Mike McCabe <mccabe@archive.org> - math (libm) functions
27
+ Nicolas Pouillard <nicolas.pouillard@gmail.com> - add tests
28
+ Nicolas Williams <nico@cryptonector.com> - library-fication, autoconf stuff, exception handling, various
29
+ Peter van Dijk <peter@7bits.nl> - doc fixes
30
+ Philipp Hagemeister <phihag@phihag.de> - doc fixes
31
+ polyester <paul@cleanclothes.org> - automake version update
32
+ Rémy Léone <remy.leone@gmail.com> - add .travis.yml
33
+ Ryoichi KATO <ryo1kato@gmail.com> - doc fixes
34
+ Santiago Lapresta <santiago.lapresta@gmail.com> - join, arrays, all, any, other filters
35
+ pkoppstein <pkoppstein@gmail.com> - various builtins, improvements
36
+ 13ren <melbourne.research@gmail.com>
37
+ Aaron Peschel <apeschel@zendesk.com>
38
+ Adam Lindberg <hello@alind.io>
39
+ Alex Chamberlain <alex@alexchamberlain.co.uk>
40
+ Andrew O'Brien <obrien.andrew@gmail.com> - docs build
41
+ Assaf Gordon <assafgordon@gmail.com> - error handling
42
+ cdnbacon <mike@busbud.com>
43
+ Charles Merriam <charles.merriam@gmail.com>
44
+ Colin von Heuring <colin@janrain.com>
45
+ Damian Gryski <damian@gryski.com>
46
+ David Haguenauer <ml@kurokatta.org>
47
+ Doug Luce <doug@github.con.com> - build
48
+ Eiichi Sato <sato.eiichi@gmail.com>
49
+ Hanfei Shen <qqshfox@gmail.com>
50
+ Ian Miell <ian.miell@gmail.com>
51
+ i <isomorphisms@sdf.org>
52
+ James Andariese <james.andariese@locationlabs.com> - Dockerfile
53
+ jkleint <jkleint@gmail.com>
54
+ Joel Purra <code+github@joelpurra.com>
55
+ Kim De Mey <kim.demey@gmail.com> - build
56
+ Kim Toms <kim.toms@bplglobal.net>
57
+ LCD 47 <lcd047@gmail.com>
58
+ Lee Thompson <thompson@dtosolutions.com> - rpm
59
+ Marc Abramowitz <marc@marc-abramowitz.com>
60
+ Marc Bruggmann <marcbr@spotify.com>
61
+ Maxime Biais <maxime.biais@gmail.com> - build
62
+ Mike Fletcher <john.m.fletcher@bankofamerica.com>
63
+ Sebastian Freundt <freundt@ga-group.nl> - build
64
+ Shay Elkin <shay@everything.me>
65
+ Simon Elsbrock <simon@iodev.org> - Debian
66
+ Stefan Seemayer <stefan@seemayer.de>
67
+ Stephen Roantree <stroantree@gmail.com>
68
+ Stephen Shaw <stesh@netsoc.tcd.ie>
69
+ Steven Maude <StevenMaude@users.noreply.github.com>
70
+ Steven Penny <svnpenn@gmail.com> - Windows bug fixes
71
+ tal@whatexit.org <tal@whatexit.org>
72
+ Travis Gockel <travis@gockelhut.com>
73
+ Zhiming Wang <zmwangx@gmail.com>
@@ -0,0 +1,70 @@
1
+ jq is copyright (C) 2012 Stephen Dolan
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+
23
+
24
+ jq's documentation (everything found under the docs/ subdirectory in
25
+ the source tree) is licensed under the Creative Commons CC BY 3.0
26
+ license, which can be found at:
27
+
28
+ https://creativecommons.org/licenses/by/3.0/
29
+
30
+ The documentation website includes a copy of Twitter's Boostrap and
31
+ relies on Bonsai, Liquid templates and various other projects, look
32
+ them up for detailed licensing conditions.
33
+
34
+
35
+
36
+ jq incorporates David M. Gay's dtoa.c and g_fmt.c, which bear the
37
+ following notices:
38
+
39
+ dtoa.c:
40
+ The author of this software is David M. Gay.
41
+
42
+ Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
43
+
44
+ Permission to use, copy, modify, and distribute this software for any
45
+ purpose without fee is hereby granted, provided that this entire notice
46
+ is included in all copies of any software which is or includes a copy
47
+ or modification of this software and in all copies of the supporting
48
+ documentation for such software.
49
+
50
+ THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
51
+ WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
52
+ REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
53
+ OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
54
+
55
+ g_fmt.c:
56
+ The author of this software is David M. Gay.
57
+
58
+ Copyright (c) 1991, 1996 by Lucent Technologies.
59
+
60
+ Permission to use, copy, modify, and distribute this software for any
61
+ purpose without fee is hereby granted, provided that this entire notice
62
+ is included in all copies of any software which is or includes a copy
63
+ or modification of this software and in all copies of the supporting
64
+ documentation for such software.
65
+
66
+ THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
67
+ WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
68
+ REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
69
+ OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
70
+