@port-labs/jq-node-bindings 0.0.13 → 0.0.15-dev1
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/README.md +6 -1
- package/binding.gyp +41 -19
- package/configure +1 -1
- package/deps/jq/.gitattributes +12 -0
- package/deps/jq/AUTHORS +149 -43
- package/deps/jq/COPYING +75 -1
- package/deps/jq/ChangeLog +2 -2
- package/deps/jq/Makefile.am +106 -65
- package/deps/jq/NEWS.md +391 -0
- package/deps/jq/README.md +54 -52
- package/deps/jq/SECURITY.md +7 -0
- package/deps/jq/compile-ios.sh +106 -102
- package/deps/jq/configure.ac +72 -59
- package/deps/jq/docs/Pipfile +14 -0
- package/deps/jq/docs/Pipfile.lock +415 -0
- package/deps/jq/docs/README.md +15 -14
- package/deps/jq/docs/build_manpage.py +251 -0
- package/deps/jq/docs/build_mantests.py +21 -0
- package/deps/jq/docs/build_website.py +95 -0
- package/deps/jq/docs/content/download/default.yml +249 -0
- package/deps/jq/docs/content/index.yml +83 -0
- package/deps/jq/docs/content/{3.manual/v1.6 → manual/dev}/manual.yml +992 -452
- package/deps/jq/docs/content/{3.manual → manual}/v1.3/manual.yml +105 -116
- package/deps/jq/docs/content/{3.manual → manual}/v1.4/manual.yml +122 -129
- package/deps/jq/docs/content/{3.manual → manual}/v1.5/manual.yml +313 -262
- package/deps/jq/docs/content/{3.manual → manual/v1.6}/manual.yml +407 -332
- package/deps/jq/docs/content/manual/v1.7/manual.yml +3697 -0
- package/deps/jq/docs/content/tutorial/default.yml +337 -0
- package/deps/jq/docs/manual_schema.yml +60 -0
- package/deps/jq/docs/public/css/style.css +99 -0
- package/deps/jq/docs/public/icon.png +0 -0
- package/deps/jq/docs/public/icon.svg +1 -0
- package/deps/jq/docs/public/jq.svg +1 -0
- package/deps/jq/docs/public/js/manual-search.js +31 -49
- package/deps/jq/docs/templates/default.html.j2 +31 -0
- package/deps/jq/docs/templates/index.html.j2 +58 -0
- package/deps/jq/docs/templates/manual.html.j2 +120 -0
- package/deps/jq/docs/templates/shared/_footer.html.j2 +14 -0
- package/deps/jq/docs/templates/shared/_head.html.j2 +23 -0
- package/deps/jq/docs/templates/shared/_navbar.html.j2 +40 -0
- package/deps/jq/docs/validate_manual_schema.py +19 -0
- package/deps/jq/jq.1.prebuilt +1102 -294
- package/deps/jq/jq.spec +2 -3
- package/deps/jq/libjq.pc.in +11 -0
- package/deps/jq/m4/ax_pthread.m4 +522 -0
- package/deps/jq/modules/oniguruma/.travis.yml +17 -0
- package/deps/jq/modules/oniguruma/CMakeLists.txt +206 -41
- package/deps/jq/modules/oniguruma/COPYING +23 -25
- package/deps/jq/modules/oniguruma/HISTORY +368 -23
- package/deps/jq/modules/oniguruma/Makefile.am +61 -7
- package/deps/jq/modules/oniguruma/README +34 -20
- package/deps/jq/modules/oniguruma/README.md +106 -33
- package/deps/jq/modules/oniguruma/README_japanese +183 -0
- package/deps/jq/modules/oniguruma/autogen.sh +9 -0
- package/deps/jq/modules/oniguruma/cmake/Config.cmake.in +4 -0
- package/deps/jq/modules/oniguruma/configure.ac +66 -55
- package/deps/jq/modules/oniguruma/doc/API +485 -42
- package/deps/jq/modules/oniguruma/doc/API.ja +732 -293
- package/deps/jq/modules/oniguruma/doc/CALLOUTS.API +397 -0
- package/deps/jq/modules/oniguruma/doc/CALLOUTS.API.ja +393 -0
- package/deps/jq/modules/oniguruma/doc/CALLOUTS.BUILTIN +95 -0
- package/deps/jq/modules/oniguruma/doc/CALLOUTS.BUILTIN.ja +93 -0
- package/deps/jq/modules/oniguruma/doc/FAQ +3 -3
- package/deps/jq/modules/oniguruma/doc/FAQ.ja +8 -8
- package/deps/jq/modules/oniguruma/doc/RE +223 -63
- package/deps/jq/modules/oniguruma/doc/RE.ja +420 -265
- package/deps/jq/modules/oniguruma/doc/SYNTAX.md +1091 -0
- package/deps/jq/modules/oniguruma/doc/UNICODE_PROPERTIES +840 -697
- package/deps/jq/modules/oniguruma/harnesses/ascii_compatible.dict +113 -0
- package/deps/jq/modules/oniguruma/harnesses/base.c +749 -0
- package/deps/jq/modules/oniguruma/harnesses/deluxe.c +206 -0
- package/deps/jq/modules/oniguruma/harnesses/dict_conv.py +72 -0
- package/deps/jq/modules/oniguruma/harnesses/fuzzer.options +2 -0
- package/deps/jq/modules/oniguruma/harnesses/libfuzzer-onig.cpp +45 -0
- package/deps/jq/modules/oniguruma/harnesses/regset.c +392 -0
- package/deps/jq/modules/oniguruma/index.html +16 -5
- package/deps/jq/modules/oniguruma/index_ja.html +16 -5
- package/deps/jq/modules/oniguruma/make_win.bat +5 -0
- package/deps/jq/modules/oniguruma/make_win32.bat +5 -3
- package/deps/jq/modules/oniguruma/make_win64.bat +5 -3
- package/deps/jq/modules/oniguruma/onig-config.cmake.in +80 -0
- package/deps/jq/modules/oniguruma/onig-config.in +1 -1
- package/deps/jq/modules/oniguruma/oniguruma.pc.cmake.in +1 -1
- package/deps/jq/modules/oniguruma/oniguruma.pc.in +0 -1
- package/deps/jq/modules/oniguruma/sample/CMakeLists.txt +9 -2
- package/deps/jq/modules/oniguruma/sample/Makefile.am +24 -5
- package/deps/jq/modules/oniguruma/sample/bug_fix.c +13 -51
- package/deps/jq/modules/oniguruma/sample/callback_each_match.c +168 -0
- package/deps/jq/modules/oniguruma/sample/callout.c +268 -0
- package/deps/jq/modules/oniguruma/sample/count.c +125 -0
- package/deps/jq/modules/oniguruma/sample/crnl.c +6 -4
- package/deps/jq/modules/oniguruma/sample/echo.c +136 -0
- package/deps/jq/modules/oniguruma/sample/encode.c +53 -146
- package/deps/jq/modules/oniguruma/sample/listcap.c +18 -10
- package/deps/jq/modules/oniguruma/sample/names.c +10 -6
- package/deps/jq/modules/oniguruma/sample/posix.c +13 -2
- package/deps/jq/modules/oniguruma/sample/regset.c +95 -0
- package/deps/jq/modules/oniguruma/sample/scan.c +20 -6
- package/deps/jq/modules/oniguruma/sample/simple.c +8 -4
- package/deps/jq/modules/oniguruma/sample/sql.c +13 -8
- package/deps/jq/modules/oniguruma/sample/syntax.c +11 -10
- package/deps/jq/modules/oniguruma/sample/user_property.c +12 -7
- package/deps/jq/modules/oniguruma/src/Makefile.am +41 -15
- package/deps/jq/modules/oniguruma/src/Makefile.windows +196 -183
- package/deps/jq/modules/oniguruma/src/ascii.c +64 -7
- package/deps/jq/modules/oniguruma/src/big5.c +25 -15
- package/deps/jq/modules/oniguruma/src/config.h.cmake.in +7 -22
- package/deps/jq/modules/oniguruma/src/config.h.win32 +56 -84
- package/deps/jq/modules/oniguruma/src/config.h.win64 +56 -84
- package/deps/jq/modules/oniguruma/src/config.h.windows.in +62 -0
- package/deps/jq/modules/oniguruma/src/cp1251.c +14 -8
- package/deps/jq/modules/oniguruma/src/euc_jp.c +28 -30
- package/deps/jq/modules/oniguruma/src/euc_jp_prop.c +25 -32
- package/deps/jq/modules/oniguruma/src/euc_jp_prop.gperf +1 -2
- package/deps/jq/modules/oniguruma/src/euc_kr.c +27 -15
- package/deps/jq/modules/oniguruma/src/euc_tw.c +40 -17
- package/deps/jq/modules/oniguruma/src/gb18030.c +177 -119
- package/deps/jq/modules/oniguruma/src/gperf_fold_key_conv.py +12 -8
- package/deps/jq/modules/oniguruma/src/gperf_unfold_key_conv.py +8 -6
- package/deps/jq/modules/oniguruma/src/iso8859_1.c +92 -91
- package/deps/jq/modules/oniguruma/src/iso8859_10.c +13 -29
- package/deps/jq/modules/oniguruma/src/iso8859_11.c +4 -2
- package/deps/jq/modules/oniguruma/src/iso8859_13.c +13 -33
- package/deps/jq/modules/oniguruma/src/iso8859_14.c +13 -30
- package/deps/jq/modules/oniguruma/src/iso8859_15.c +13 -34
- package/deps/jq/modules/oniguruma/src/iso8859_16.c +13 -29
- package/deps/jq/modules/oniguruma/src/iso8859_2.c +13 -29
- package/deps/jq/modules/oniguruma/src/iso8859_3.c +13 -33
- package/deps/jq/modules/oniguruma/src/iso8859_4.c +13 -32
- package/deps/jq/modules/oniguruma/src/iso8859_5.c +16 -23
- package/deps/jq/modules/oniguruma/src/iso8859_6.c +4 -2
- package/deps/jq/modules/oniguruma/src/iso8859_7.c +14 -29
- package/deps/jq/modules/oniguruma/src/iso8859_8.c +4 -2
- package/deps/jq/modules/oniguruma/src/iso8859_9.c +13 -33
- package/deps/jq/modules/oniguruma/src/koi8.c +14 -27
- package/deps/jq/modules/oniguruma/src/koi8_r.c +12 -19
- package/deps/jq/modules/oniguruma/src/make_property.sh +21 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_egcb.sh +7 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_egcb_data.py +267 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_fold.sh +25 -11
- package/deps/jq/modules/oniguruma/src/make_unicode_fold_data.py +206 -26
- package/deps/jq/modules/oniguruma/src/make_unicode_property.sh +19 -10
- package/deps/jq/modules/oniguruma/src/make_unicode_property_data.py +474 -375
- package/deps/jq/modules/oniguruma/src/make_unicode_wb.sh +7 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_wb_data.py +267 -0
- package/deps/jq/modules/oniguruma/src/mktable.c +28 -24
- package/deps/jq/modules/oniguruma/src/onig_init.c +2 -2
- package/deps/jq/modules/oniguruma/src/oniggnu.h +7 -5
- package/deps/jq/modules/oniguruma/src/onigposix.h +40 -16
- package/deps/jq/modules/oniguruma/src/oniguruma.h +357 -107
- package/deps/jq/modules/oniguruma/src/regcomp.c +6214 -3933
- package/deps/jq/modules/oniguruma/src/regenc.c +197 -120
- package/deps/jq/modules/oniguruma/src/regenc.h +106 -63
- package/deps/jq/modules/oniguruma/src/regerror.c +112 -91
- package/deps/jq/modules/oniguruma/src/regexec.c +4876 -2010
- package/deps/jq/modules/oniguruma/src/regext.c +8 -8
- package/deps/jq/modules/oniguruma/src/reggnu.c +13 -17
- package/deps/jq/modules/oniguruma/src/regint.h +757 -491
- package/deps/jq/modules/oniguruma/src/regparse.c +7204 -3240
- package/deps/jq/modules/oniguruma/src/regparse.h +361 -218
- package/deps/jq/modules/oniguruma/src/regposerr.c +49 -9
- package/deps/jq/modules/oniguruma/src/regposix.c +106 -24
- package/deps/jq/modules/oniguruma/src/regsyntax.c +66 -13
- package/deps/jq/modules/oniguruma/src/regtrav.c +1 -1
- package/deps/jq/modules/oniguruma/src/regversion.c +6 -4
- package/deps/jq/modules/oniguruma/src/sjis.c +23 -52
- package/deps/jq/modules/oniguruma/src/sjis_prop.c +25 -32
- package/deps/jq/modules/oniguruma/src/sjis_prop.gperf +1 -2
- package/deps/jq/modules/oniguruma/src/st.c +248 -249
- package/deps/jq/modules/oniguruma/src/st.h +4 -5
- package/deps/jq/modules/oniguruma/src/unicode.c +869 -294
- package/deps/jq/modules/oniguruma/src/unicode_egcb_data.c +1419 -0
- package/deps/jq/modules/oniguruma/src/unicode_fold1_key.c +1829 -1300
- package/deps/jq/modules/oniguruma/src/unicode_fold2_key.c +32 -9
- package/deps/jq/modules/oniguruma/src/unicode_fold3_key.c +32 -9
- package/deps/jq/modules/oniguruma/src/unicode_fold_data.c +1210 -984
- package/deps/jq/modules/oniguruma/src/unicode_property_data.c +22480 -15198
- package/deps/jq/modules/oniguruma/src/unicode_property_data_posix.c +1463 -591
- package/deps/jq/modules/oniguruma/src/unicode_unfold_key.c +1958 -1418
- package/deps/jq/modules/oniguruma/src/unicode_wb_data.c +1106 -0
- package/deps/jq/modules/oniguruma/src/utf16_be.c +90 -49
- package/deps/jq/modules/oniguruma/src/utf16_le.c +80 -49
- package/deps/jq/modules/oniguruma/src/utf32_be.c +14 -42
- package/deps/jq/modules/oniguruma/src/utf32_le.c +13 -40
- package/deps/jq/modules/oniguruma/src/utf8.c +33 -78
- package/deps/jq/modules/oniguruma/test/CMakeLists.txt +55 -0
- package/deps/jq/modules/oniguruma/test/Makefile.am +65 -10
- package/deps/jq/modules/oniguruma/test/test.sh +17 -0
- package/deps/jq/modules/oniguruma/test/test_back.c +1450 -0
- package/deps/jq/modules/oniguruma/test/test_options.c +228 -0
- package/deps/jq/modules/oniguruma/test/test_regset.c +466 -0
- package/deps/jq/modules/oniguruma/test/test_syntax.c +365 -0
- package/deps/jq/modules/oniguruma/test/test_utf8.c +1761 -0
- package/deps/jq/modules/oniguruma/test/testc.c +128 -88
- package/deps/jq/modules/oniguruma/test/testp.c +613 -0
- package/deps/jq/modules/oniguruma/test/testu.c +75 -28
- package/deps/jq/modules/oniguruma/tis-ci/stub.c +3 -0
- package/deps/jq/modules/oniguruma/tis-ci/test_back.config +26 -0
- package/deps/jq/modules/oniguruma/tis-ci/test_regset.config +20 -0
- package/deps/jq/modules/oniguruma/tis-ci/test_syntax.config +26 -0
- package/deps/jq/modules/oniguruma/tis-ci/test_utf8.config +25 -0
- package/deps/jq/modules/oniguruma/tis-ci/testc.config +26 -0
- package/deps/jq/modules/oniguruma/tis-ci/testu.config +24 -0
- package/deps/jq/modules/oniguruma/tis.config +1336 -0
- package/deps/jq/modules/oniguruma/windows/CMakeLists.txt +8 -0
- package/deps/jq/modules/oniguruma/windows/testc.c +865 -869
- package/deps/jq/scripts/update-website +6 -5
- package/deps/jq/scripts/version +10 -7
- package/deps/jq/sig/jq-release-new.key +29 -0
- package/deps/jq/sig/v1.4/sha256sum.txt +1 -0
- package/deps/jq/sig/v1.5/sha256sum.txt +2 -0
- package/deps/jq/sig/v1.5rc1/sha256sum.txt +1 -0
- package/deps/jq/sig/v1.5rc2/sha256sum.txt +2 -0
- package/deps/jq/sig/v1.6/sha256sum.txt +2 -0
- package/deps/jq/sig/v1.7/jq-1.7.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.7/jq-1.7.zip.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.7/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.7/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.7/sha256sum.txt +23 -0
- package/deps/jq/sig/v1.7.1/jq-1.7.1.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-1.7.1.zip.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-osx-amd64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-win64.exe.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.7.1/sha256sum.txt +26 -0
- package/deps/jq/sig/v1.7rc1/jq-1.7rc1.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-1.7rc1.zip.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.7rc1/sha256sum.txt +23 -0
- package/deps/jq/sig/v1.7rc2/jq-1.7rc2.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-1.7rc2.zip.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.7rc2/sha256sum.txt +23 -0
- package/deps/jq/src/builtin.c +537 -343
- package/deps/jq/src/builtin.h +18 -0
- package/deps/jq/src/builtin.jq +116 -143
- package/deps/jq/src/bytecode.h +8 -4
- package/deps/jq/src/compile.c +157 -143
- package/deps/jq/src/compile.h +3 -4
- package/deps/jq/src/decNumber/ICU-license.html +45 -0
- package/deps/jq/src/decNumber/decBasic.c +3908 -0
- package/deps/jq/src/decNumber/decCommon.c +1835 -0
- package/deps/jq/src/decNumber/decContext.c +437 -0
- package/deps/jq/src/decNumber/decContext.h +254 -0
- package/deps/jq/src/decNumber/decDPD.h +1185 -0
- package/deps/jq/src/decNumber/decDouble.c +140 -0
- package/deps/jq/src/decNumber/decDouble.h +155 -0
- package/deps/jq/src/decNumber/decNumber.c +8143 -0
- package/deps/jq/src/decNumber/decNumber.h +182 -0
- package/deps/jq/src/decNumber/decNumberLocal.h +757 -0
- package/deps/jq/src/decNumber/decPacked.c +220 -0
- package/deps/jq/src/decNumber/decPacked.h +52 -0
- package/deps/jq/src/decNumber/decQuad.c +135 -0
- package/deps/jq/src/decNumber/decQuad.h +177 -0
- package/deps/jq/src/decNumber/decSingle.c +71 -0
- package/deps/jq/src/decNumber/decSingle.h +86 -0
- package/deps/jq/src/decNumber/decimal128.c +553 -0
- package/deps/jq/src/decNumber/decimal128.h +81 -0
- package/deps/jq/src/decNumber/decimal32.c +476 -0
- package/deps/jq/src/decNumber/decimal32.h +81 -0
- package/deps/jq/src/decNumber/decimal64.c +839 -0
- package/deps/jq/src/decNumber/decimal64.h +83 -0
- package/deps/jq/src/decNumber/decnumber.pdf +0 -0
- package/deps/jq/src/decNumber/example1.c +38 -0
- package/deps/jq/src/decNumber/example2.c +52 -0
- package/deps/jq/src/decNumber/example3.c +64 -0
- package/deps/jq/src/decNumber/example4.c +61 -0
- package/deps/jq/src/decNumber/example5.c +36 -0
- package/deps/jq/src/decNumber/example6.c +61 -0
- package/deps/jq/src/decNumber/example7.c +35 -0
- package/deps/jq/src/decNumber/example8.c +39 -0
- package/deps/jq/src/decNumber/readme.txt +81 -0
- package/deps/jq/src/exec_stack.h +5 -3
- package/deps/jq/src/execute.c +126 -44
- package/deps/jq/src/inject_errors.c +0 -2
- package/deps/jq/src/jq.h +10 -1
- package/deps/jq/src/jq_test.c +222 -11
- package/deps/jq/src/jv.c +807 -176
- package/deps/jq/src/jv.h +22 -1
- package/deps/jq/src/jv_alloc.c +33 -26
- package/deps/jq/src/jv_alloc.h +0 -11
- package/deps/jq/src/jv_aux.c +153 -67
- package/deps/jq/src/jv_dtoa.c +12 -2
- package/deps/jq/src/jv_dtoa_tsd.c +51 -0
- package/deps/jq/src/jv_dtoa_tsd.h +4 -0
- package/deps/jq/src/jv_parse.c +70 -15
- package/deps/jq/src/jv_print.c +56 -60
- package/deps/jq/src/jv_private.h +7 -0
- package/deps/jq/src/jv_thread.h +76 -0
- package/deps/jq/src/jv_unicode.c +18 -0
- package/deps/jq/src/jv_unicode.h +2 -0
- package/deps/jq/src/lexer.c +782 -543
- package/deps/jq/src/lexer.h +438 -64
- package/deps/jq/src/lexer.l +10 -3
- package/deps/jq/src/libm.h +16 -6
- package/deps/jq/src/linker.c +97 -40
- package/deps/jq/src/locfile.c +2 -1
- package/deps/jq/src/main.c +384 -336
- package/deps/jq/src/opcode_list.h +5 -2
- package/deps/jq/src/parser.c +2260 -1898
- package/deps/jq/src/parser.h +115 -98
- package/deps/jq/src/parser.y +124 -89
- package/deps/jq/src/util.c +854 -55
- package/deps/jq/src/util.h +6 -4
- package/deps/jq/tests/jq.test +762 -26
- package/deps/jq/tests/jq_fuzz_compile.c +27 -0
- package/deps/jq/tests/jq_fuzz_execute.cpp +42 -0
- package/deps/jq/tests/jq_fuzz_fixed.cpp +297 -0
- package/deps/jq/tests/jq_fuzz_load_file.c +28 -0
- package/deps/jq/tests/jq_fuzz_parse.c +21 -0
- package/deps/jq/tests/jq_fuzz_parse_extended.c +36 -0
- package/deps/jq/tests/jq_fuzz_parse_stream.c +21 -0
- package/deps/jq/tests/local.supp +14 -0
- package/deps/jq/tests/man.test +979 -0
- package/deps/jq/tests/manonig.test +76 -0
- package/deps/jq/tests/manonigtest +5 -0
- package/deps/jq/tests/mantest +1 -2
- package/deps/jq/tests/modules/home2/.jq/g.jq +1 -0
- package/deps/jq/tests/modules/shadow1.jq +2 -0
- package/deps/jq/tests/modules/shadow2.jq +1 -0
- package/deps/jq/tests/modules/test_bind_order0.jq +1 -0
- package/deps/jq/tests/modules/test_bind_order1.jq +1 -1
- package/deps/jq/tests/modules/test_bind_order2.jq +0 -1
- package/deps/jq/tests/no-main-program.jq +1 -0
- package/deps/jq/tests/onig.test +77 -2
- package/deps/jq/tests/setup +7 -2
- package/deps/jq/tests/shtest +478 -59
- package/deps/jq/tests/uri.test +38 -0
- package/deps/jq/tests/uritest +5 -0
- package/deps/jq/tests/yes-main-program.jq +2 -0
- package/lib/index.js +3 -0
- package/lib/jq.js +15 -1
- package/lib/templateAsync.js +137 -0
- package/package.json +7 -7
- package/src/binding.cc +623 -146
- package/src/binding.h +3 -4
- package/test/santiy-async.test.js +171 -0
- package/test/santiy.test.js +2 -2
- package/test/template-async.test.js +182 -0
- package/test/template.test.js +3 -3
- package/deps/jq/.travis.yml +0 -202
- package/deps/jq/NEWS +0 -89
- package/deps/jq/appveyor.yml +0 -53
- package/deps/jq/docs/Gemfile +0 -7
- package/deps/jq/docs/Gemfile.lock +0 -63
- package/deps/jq/docs/Rakefile +0 -24
- package/deps/jq/docs/Rakefile.manual +0 -49
- package/deps/jq/docs/Rakefile.website +0 -76
- package/deps/jq/docs/content/1.tutorial/default.yml +0 -327
- package/deps/jq/docs/content/2.download/default.yml +0 -193
- package/deps/jq/docs/content/index/index.yml +0 -73
- package/deps/jq/docs/public/css/base.scss +0 -181
- package/deps/jq/docs/public/jq.png +0 -0
- package/deps/jq/docs/site.yml +0 -9
- package/deps/jq/docs/templates/default.liquid +0 -34
- package/deps/jq/docs/templates/index.liquid +0 -73
- package/deps/jq/docs/templates/manual.liquid +0 -99
- package/deps/jq/docs/templates/shared/_footer.liquid +0 -10
- package/deps/jq/docs/templates/shared/_head.liquid +0 -17
- package/deps/jq/docs/templates/shared/_navbar.liquid +0 -27
- package/deps/jq/modules/oniguruma/README.ja +0 -195
- package/deps/jq/modules/oniguruma/cmake/dist.cmake +0 -321
- package/deps/jq/modules/oniguruma/contributed/libfuzzer-onig.cpp +0 -31
- package/deps/jq/modules/oniguruma/dist.info +0 -10
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold1_key.c +0 -2250
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold2_key.c +0 -203
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold3_key.c +0 -113
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold_data.c +0 -1225
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data.c +0 -24742
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data_posix.c +0 -4846
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_unfold_key.c +0 -2571
- /package/deps/jq/sig/{jq-release.key → jq-release-old.key} +0 -0
- /package/deps/jq/tests/modules/{.jq → home1/.jq} +0 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
from datetime import date
|
|
3
|
+
from io import StringIO
|
|
4
|
+
from lxml import etree
|
|
5
|
+
import markdown
|
|
6
|
+
from markdown.extensions import Extension
|
|
7
|
+
import re
|
|
8
|
+
import sys
|
|
9
|
+
import yaml
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# Prevent our markdown parser from trying to help by interpreting things in angle brackets as HTML tags.
|
|
13
|
+
class EscapeHtml(Extension):
|
|
14
|
+
|
|
15
|
+
def extendMarkdown(self, md):
|
|
16
|
+
md.preprocessors.deregister('html_block')
|
|
17
|
+
md.inlinePatterns.deregister('html')
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class RoffWalker(object):
|
|
21
|
+
|
|
22
|
+
def __init__(self, tree, output=sys.stdout):
|
|
23
|
+
self.tree = tree
|
|
24
|
+
self.target = output
|
|
25
|
+
self.f = StringIO()
|
|
26
|
+
|
|
27
|
+
def walk(self):
|
|
28
|
+
self._walk(self.tree, parent_tag=None)
|
|
29
|
+
# We don't want to start lines with \. because that can confuse man
|
|
30
|
+
# For lines that start with \., we need to prefix them with \& so it
|
|
31
|
+
# knows not to treat that line as a directive
|
|
32
|
+
data = re.sub(r'^\\\.', r'\&.', self.f.getvalue(), flags=re.MULTILINE)
|
|
33
|
+
self.target.write(data)
|
|
34
|
+
|
|
35
|
+
def _ul_is_special(self, root):
|
|
36
|
+
if len(root) != 1:
|
|
37
|
+
return False
|
|
38
|
+
child = root[0]
|
|
39
|
+
if child.tag != 'li':
|
|
40
|
+
return False
|
|
41
|
+
msg = ''.join(child.itertext()).strip()
|
|
42
|
+
return msg.endswith(':')
|
|
43
|
+
|
|
44
|
+
def _walk_child(self, root):
|
|
45
|
+
if len(root) > 0:
|
|
46
|
+
self._walk(root[0], parent_tag=root.tag)
|
|
47
|
+
|
|
48
|
+
def _write_element(self, root, ensure_newline=True):
|
|
49
|
+
if root.text is not None:
|
|
50
|
+
text = self._sanitize(root.text)
|
|
51
|
+
self.__write_raw(text)
|
|
52
|
+
self._walk_child(root)
|
|
53
|
+
self._write_tail(root, ensure_newline=ensure_newline)
|
|
54
|
+
|
|
55
|
+
def _write_tail(self, root, ensure_newline=False, inline=False):
|
|
56
|
+
if root.tail is not None:
|
|
57
|
+
if inline or root.tail != '\n':
|
|
58
|
+
text = self._sanitize(root.tail)
|
|
59
|
+
if text.endswith('\n'):
|
|
60
|
+
ensure_newline = False
|
|
61
|
+
self.__write_raw(text)
|
|
62
|
+
if ensure_newline:
|
|
63
|
+
self.__write_raw('\n')
|
|
64
|
+
|
|
65
|
+
def _walk(self, root, parent_tag=None):
|
|
66
|
+
last_tag = None
|
|
67
|
+
while root is not None:
|
|
68
|
+
if root.tag == 'h1':
|
|
69
|
+
self.__write_cmd('.TH "JQ" "1" "{}" "" ""'.format(
|
|
70
|
+
date.today().strftime('%B %Y')))
|
|
71
|
+
self.__write_cmd('.SH "NAME"')
|
|
72
|
+
# TODO: properly parse this
|
|
73
|
+
self.__write_raw(r'\fBjq\fR \- Command\-line JSON processor' +
|
|
74
|
+
"\n")
|
|
75
|
+
|
|
76
|
+
elif root.tag == 'h2':
|
|
77
|
+
self.__write_cmd('.SH "{}"'.format(''.join(
|
|
78
|
+
root.itertext()).strip()))
|
|
79
|
+
|
|
80
|
+
elif root.tag == 'h3':
|
|
81
|
+
text = ''.join(root.itertext()).strip()
|
|
82
|
+
self.__write_cmd('.SS "{}"'.format(self._h3_sanitize(text)))
|
|
83
|
+
|
|
84
|
+
elif root.tag == 'p':
|
|
85
|
+
if last_tag not in ['h2', 'h3'] and parent_tag not in ['li']:
|
|
86
|
+
self.__write_cmd('.P')
|
|
87
|
+
self._write_element(root, ensure_newline=(parent_tag != 'li'))
|
|
88
|
+
|
|
89
|
+
elif root.tag == 'a':
|
|
90
|
+
self._write_element(root, ensure_newline=(parent_tag != 'li'))
|
|
91
|
+
|
|
92
|
+
elif root.tag == 'ul':
|
|
93
|
+
if self._ul_is_special(root):
|
|
94
|
+
li = root[0]
|
|
95
|
+
self.__write_cmd('.TP')
|
|
96
|
+
self._write_element(li)
|
|
97
|
+
next = root.getnext()
|
|
98
|
+
while next is not None and next.tag == 'p':
|
|
99
|
+
if next.getnext() is not None and next.getnext(
|
|
100
|
+
).tag == 'pre':
|
|
101
|
+
# we don't want to .IP these, because it'll look funny with the code indent
|
|
102
|
+
break
|
|
103
|
+
self.__write_cmd('.IP')
|
|
104
|
+
self._write_element(next)
|
|
105
|
+
root = next
|
|
106
|
+
next = root.getnext()
|
|
107
|
+
else:
|
|
108
|
+
self._walk_child(root)
|
|
109
|
+
self._write_tail(root)
|
|
110
|
+
# A pre tag after the end of a list doesn't want two of the indentation commands
|
|
111
|
+
if root.getnext() is None or root.getnext().tag != 'pre':
|
|
112
|
+
self.__write_cmd('.IP "" 0')
|
|
113
|
+
|
|
114
|
+
elif root.tag == 'li':
|
|
115
|
+
self.__write_cmd(r'.IP "\(bu" 4')
|
|
116
|
+
if root.text is not None and root.text.strip() != '':
|
|
117
|
+
text = self._sanitize(root.text)
|
|
118
|
+
self.__write_raw(text)
|
|
119
|
+
self._walk_child(root)
|
|
120
|
+
self._write_tail(root, ensure_newline=True)
|
|
121
|
+
|
|
122
|
+
elif root.tag == 'strong':
|
|
123
|
+
if root.text is not None:
|
|
124
|
+
text = self._sanitize(root.text)
|
|
125
|
+
self.__write_raw('\\fB{}\\fR'.format(text))
|
|
126
|
+
|
|
127
|
+
self._write_tail(root, inline=True)
|
|
128
|
+
|
|
129
|
+
elif root.tag == 'em':
|
|
130
|
+
if root.text is not None:
|
|
131
|
+
text = self._sanitize(root.text)
|
|
132
|
+
self.__write_raw('\\fI{}\\fR'.format(text))
|
|
133
|
+
self._write_tail(root, inline=True)
|
|
134
|
+
|
|
135
|
+
elif root.tag == 'code':
|
|
136
|
+
if root.text is not None:
|
|
137
|
+
text = self._code_sanitize(root.text)
|
|
138
|
+
self.__write_raw('\\fB{}\\fR'.format(text))
|
|
139
|
+
self._write_tail(root, inline=True)
|
|
140
|
+
|
|
141
|
+
elif root.tag == 'pre':
|
|
142
|
+
self.__write_cmd('.IP "" 4')
|
|
143
|
+
self.__write_cmd('.nf\n') # extra newline for spacing reasons
|
|
144
|
+
next = root
|
|
145
|
+
first = True
|
|
146
|
+
while next is not None and next.tag == 'pre':
|
|
147
|
+
if not first:
|
|
148
|
+
self.__write_raw('\n')
|
|
149
|
+
text = ''.join(next.itertext(with_tail=False))
|
|
150
|
+
self.__write_raw(self._pre_sanitize(text))
|
|
151
|
+
first = False
|
|
152
|
+
root = next
|
|
153
|
+
next = next.getnext()
|
|
154
|
+
self.__write_cmd('.fi')
|
|
155
|
+
self.__write_cmd('.IP "" 0')
|
|
156
|
+
|
|
157
|
+
else:
|
|
158
|
+
self._walk_child(root)
|
|
159
|
+
|
|
160
|
+
last_tag = root.tag
|
|
161
|
+
root = root.getnext()
|
|
162
|
+
|
|
163
|
+
def _base_sanitize(self, text):
|
|
164
|
+
text = re.sub(r'\\', r'\\e', text)
|
|
165
|
+
text = re.sub(r'\.', r'\\.', text)
|
|
166
|
+
text = re.sub("'", r"\'", text)
|
|
167
|
+
text = re.sub('-', r'\-', text)
|
|
168
|
+
return text
|
|
169
|
+
|
|
170
|
+
def _pre_sanitize(self, text):
|
|
171
|
+
return self._base_sanitize(text)
|
|
172
|
+
|
|
173
|
+
def _code_sanitize(self, text):
|
|
174
|
+
text = self._base_sanitize(text)
|
|
175
|
+
text = re.sub(r'\s', ' ', text)
|
|
176
|
+
return text
|
|
177
|
+
|
|
178
|
+
def _h3_sanitize(self, text):
|
|
179
|
+
text = self._base_sanitize(text)
|
|
180
|
+
text = re.sub(' \n|\n ', ' ', text)
|
|
181
|
+
text = re.sub('\n', ' ', text)
|
|
182
|
+
return text
|
|
183
|
+
|
|
184
|
+
def _sanitize(self, text):
|
|
185
|
+
text = self._base_sanitize(text)
|
|
186
|
+
text = re.sub(r'<([^>]+)>', r'\\fI\1\\fR', text)
|
|
187
|
+
text = re.sub(r' +', ' ', text)
|
|
188
|
+
text = re.sub('\n', ' ', text)
|
|
189
|
+
return text
|
|
190
|
+
|
|
191
|
+
def __write_cmd(self, dat):
|
|
192
|
+
print('.', dat, sep='\n', file=self.f)
|
|
193
|
+
pass
|
|
194
|
+
|
|
195
|
+
def __write_raw(self, dat):
|
|
196
|
+
print(dat, sep='', end='', file=self.f)
|
|
197
|
+
pass
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
def load_yml_file(fn):
|
|
201
|
+
with open(fn) as f:
|
|
202
|
+
return yaml.safe_load(f)
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
def dedent_body(body):
|
|
206
|
+
lines = [re.sub(r'^ (\S)', r'\1', l) for l in body.split('\n')]
|
|
207
|
+
return '\n'.join(lines)
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
def convert_manual_to_markdown():
|
|
211
|
+
f = StringIO()
|
|
212
|
+
manual = load_yml_file("content/manual/dev/manual.yml")
|
|
213
|
+
f.write(manual.get('manpage_intro', '\n'))
|
|
214
|
+
f.write(dedent_body(manual.get('body', '\n')))
|
|
215
|
+
for section in manual.get('sections', []):
|
|
216
|
+
f.write('## {}\n'.format(section.get('title', '').upper()))
|
|
217
|
+
f.write(dedent_body(section.get('body', '\n')))
|
|
218
|
+
f.write('\n')
|
|
219
|
+
for entry in section.get('entries', []):
|
|
220
|
+
f.write('### {}\n'.format(entry.get('title', '')))
|
|
221
|
+
f.write(dedent_body(entry.get('body', '\n')))
|
|
222
|
+
f.write('\n')
|
|
223
|
+
if entry.get('examples') is not None:
|
|
224
|
+
f.write("~~~~\n")
|
|
225
|
+
first = True
|
|
226
|
+
for example in entry.get('examples'):
|
|
227
|
+
if not first:
|
|
228
|
+
f.write('\n')
|
|
229
|
+
f.write("jq '{}'\n".format(example.get('program', '')))
|
|
230
|
+
f.write(" {}\n".format(example.get('input', '')))
|
|
231
|
+
output = [str(x) for x in example.get('output', [])]
|
|
232
|
+
f.write("=> {}\n".format(', '.join(output)))
|
|
233
|
+
first = False
|
|
234
|
+
f.write("~~~~\n")
|
|
235
|
+
f.write('\n')
|
|
236
|
+
f.write(manual.get('manpage_epilogue', ''))
|
|
237
|
+
return f.getvalue()
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
# Convert manual.yml to our special markdown format
|
|
241
|
+
markdown_data = convert_manual_to_markdown()
|
|
242
|
+
|
|
243
|
+
# Convert markdown to html
|
|
244
|
+
html_data = markdown.markdown(markdown_data,
|
|
245
|
+
extensions=[EscapeHtml(), 'fenced_code'])
|
|
246
|
+
|
|
247
|
+
# Parse the html into a tree so we can walk it
|
|
248
|
+
tr = etree.HTML(html_data, etree.HTMLParser())
|
|
249
|
+
|
|
250
|
+
# Convert the markdown to ROFF
|
|
251
|
+
RoffWalker(tr).walk()
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
import yaml
|
|
3
|
+
import re
|
|
4
|
+
|
|
5
|
+
regex_program_pattern = re.compile(
|
|
6
|
+
r'\b(?:test|match|capture|scan|split|splits|sub|gsub)\s*\(')
|
|
7
|
+
|
|
8
|
+
with open('content/manual/dev/manual.yml') as source, \
|
|
9
|
+
open('../tests/man.test', 'w') as man, \
|
|
10
|
+
open('../tests/manonig.test', 'w') as manonig:
|
|
11
|
+
manual = yaml.safe_load(source)
|
|
12
|
+
for section in manual.get('sections', []):
|
|
13
|
+
for entry in section.get('entries', []):
|
|
14
|
+
for example in entry.get('examples', []):
|
|
15
|
+
program = example.get('program', '').replace('\n', ' ')
|
|
16
|
+
out = manonig if regex_program_pattern.search(program) else man
|
|
17
|
+
print(program, file=out)
|
|
18
|
+
print(example.get('input', ''), file=out)
|
|
19
|
+
for s in example.get('output', []):
|
|
20
|
+
print(s, file=out)
|
|
21
|
+
print('', file=out)
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
import argparse
|
|
3
|
+
import glob
|
|
4
|
+
import itertools
|
|
5
|
+
from jinja2 import Environment, FileSystemLoader, select_autoescape, pass_context
|
|
6
|
+
from markdown import markdown
|
|
7
|
+
from markupsafe import Markup
|
|
8
|
+
import os
|
|
9
|
+
import os.path
|
|
10
|
+
import re
|
|
11
|
+
import shutil
|
|
12
|
+
import yaml
|
|
13
|
+
|
|
14
|
+
parser = argparse.ArgumentParser()
|
|
15
|
+
parser.add_argument('--root', default='/jq')
|
|
16
|
+
args = parser.parse_args()
|
|
17
|
+
|
|
18
|
+
env = Environment(
|
|
19
|
+
loader=FileSystemLoader('templates'),
|
|
20
|
+
autoescape=select_autoescape(['html.j2']),
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def load_yml_file(fn):
|
|
25
|
+
with open(fn) as f:
|
|
26
|
+
return yaml.safe_load(f)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
env.globals['url'] = 'https://jqlang.github.io/jq'
|
|
30
|
+
env.globals['root'] = args.root
|
|
31
|
+
|
|
32
|
+
env.filters['search_id'] = lambda input: input.replace(r'`', '')
|
|
33
|
+
env.filters['section_id'] = lambda input: re.sub(
|
|
34
|
+
r'[^-a-zA-Z0-9_]', '', input.replace(' ', '-')).lower()
|
|
35
|
+
env.filters['entry_id'] = lambda input: re.sub(
|
|
36
|
+
r'^(split|first-last-nth)$',
|
|
37
|
+
r'\1' + ('-1' if ';' not in input else '-2'), # avoid id conflict
|
|
38
|
+
re.sub(
|
|
39
|
+
r'\b([^-]+)(?:-\1)+\b',
|
|
40
|
+
r'\1', # e.g. range-range-range -> range
|
|
41
|
+
re.sub(r' ?/ ?|,? ', '-',
|
|
42
|
+
re.sub(r'[`;]|: .*|\(.*?\)| \[.+\]', '', input)))).lower()
|
|
43
|
+
env.filters['markdownify'] = lambda input: Markup(markdown(input))
|
|
44
|
+
env.filters['no_paragraph'] = lambda input: Markup(re.sub(r'</?p>', '', input))
|
|
45
|
+
|
|
46
|
+
env.globals['unique_id'] = pass_context(
|
|
47
|
+
lambda ctx: str(next(ctx['unique_ctr'])))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def raise_handler(message):
|
|
51
|
+
raise Exception(message)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
env.globals['raise'] = raise_handler
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def generate_file(env, fname):
|
|
58
|
+
path, base = os.path.split(fname)
|
|
59
|
+
path = os.path.relpath(path, 'content')
|
|
60
|
+
if path == '.':
|
|
61
|
+
path = ''
|
|
62
|
+
permalink = ''
|
|
63
|
+
else:
|
|
64
|
+
permalink = path + '/'
|
|
65
|
+
|
|
66
|
+
output_dir = os.path.join('output', path)
|
|
67
|
+
output_path = os.path.join(output_dir, 'index.html')
|
|
68
|
+
|
|
69
|
+
template_name = re.sub(r'.yml$', '.html.j2', base)
|
|
70
|
+
|
|
71
|
+
ctx = load_yml_file(fname)
|
|
72
|
+
ctx.update(unique_ctr=itertools.count(1),
|
|
73
|
+
permalink=permalink,
|
|
74
|
+
navitem=path)
|
|
75
|
+
os.makedirs(output_dir, exist_ok=True)
|
|
76
|
+
env.get_template(template_name).stream(ctx).dump(output_path,
|
|
77
|
+
encoding='utf-8')
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def copy_public_files(root=''):
|
|
81
|
+
for f in os.scandir(os.path.join('public', root)):
|
|
82
|
+
src = os.path.join(root, f.name)
|
|
83
|
+
dst = os.path.join('output', src)
|
|
84
|
+
if f.is_dir():
|
|
85
|
+
os.makedirs(dst, exist_ok=True)
|
|
86
|
+
copy_public_files(src)
|
|
87
|
+
else:
|
|
88
|
+
shutil.copyfile(f.path, dst)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
os.makedirs('output', exist_ok=True)
|
|
92
|
+
copy_public_files()
|
|
93
|
+
|
|
94
|
+
for fn in glob.glob('content/**/*.yml', recursive=True):
|
|
95
|
+
generate_file(env, fn)
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
headline: Download jq
|
|
2
|
+
body:
|
|
3
|
+
- text: |
|
|
4
|
+
|
|
5
|
+
jq is written in C and has no runtime dependencies, so it should be
|
|
6
|
+
possible to build it for nearly any platform. Prebuilt binaries are
|
|
7
|
+
available for Linux, macOS and Windows.
|
|
8
|
+
|
|
9
|
+
The binaries should just run, but on macOS and Linux you may need
|
|
10
|
+
to make them executable first using `chmod +x jq`.
|
|
11
|
+
|
|
12
|
+
jq is licensed under the MIT license. For all of the gory
|
|
13
|
+
details, read the file `COPYING` in the source distribution.
|
|
14
|
+
|
|
15
|
+
jq uses a C library for decimal number support. This is an ICU 1.8.1
|
|
16
|
+
licensed code obtained from the ICU downloads archive.
|
|
17
|
+
<https://download.icu-project.org/files/decNumber/decNumber-icu-368.zip>
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Linux
|
|
21
|
+
|
|
22
|
+
* jq is in the official [Debian](https://packages.debian.org/jq) and
|
|
23
|
+
[Ubuntu](https://packages.ubuntu.com/jq) repositories. Install using
|
|
24
|
+
`sudo apt-get install jq`.
|
|
25
|
+
|
|
26
|
+
* jq is in the official [Fedora](https://src.fedoraproject.org/rpms/jq) repository.
|
|
27
|
+
Install using `sudo dnf install jq`.
|
|
28
|
+
|
|
29
|
+
* jq is in the official [openSUSE](https://software.opensuse.org/package/jq) repository.
|
|
30
|
+
Install using `sudo zypper install jq`.
|
|
31
|
+
|
|
32
|
+
* jq is in the official [Arch](https://archlinux.org/packages/?q=jq) repository.
|
|
33
|
+
Install using `sudo pacman -S jq`.
|
|
34
|
+
|
|
35
|
+
* jq 1.7.1 binaries for
|
|
36
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64)
|
|
37
|
+
or
|
|
38
|
+
[ARM64](https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-arm64)
|
|
39
|
+
or
|
|
40
|
+
[i386](https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-i386).
|
|
41
|
+
|
|
42
|
+
* jq 1.7 binaries for
|
|
43
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.7/jq-linux-amd64)
|
|
44
|
+
or
|
|
45
|
+
[ARM64](https://github.com/jqlang/jq/releases/download/jq-1.7/jq-linux-arm64)
|
|
46
|
+
or
|
|
47
|
+
[i386](https://github.com/jqlang/jq/releases/download/jq-1.7/jq-linux-i386).
|
|
48
|
+
|
|
49
|
+
* jq 1.6 binaries for
|
|
50
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64)
|
|
51
|
+
or
|
|
52
|
+
[i386](https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux32).
|
|
53
|
+
|
|
54
|
+
* jq 1.5 binaries for
|
|
55
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.5/jq-linux64)
|
|
56
|
+
or
|
|
57
|
+
[i386](https://github.com/jqlang/jq/releases/download/jq-1.5/jq-linux32).
|
|
58
|
+
|
|
59
|
+
* jq 1.4 binaries for
|
|
60
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.4/jq-linux-x86_64)
|
|
61
|
+
or
|
|
62
|
+
[i386](https://github.com/jqlang/jq/releases/download/jq-1.4/jq-linux-x86).
|
|
63
|
+
|
|
64
|
+
* jq 1.3 binaries for
|
|
65
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.3/jq-linux-x86_64)
|
|
66
|
+
or
|
|
67
|
+
[i386](https://github.com/jqlang/jq/releases/download/jq-1.3/jq-linux-x86).
|
|
68
|
+
|
|
69
|
+
### macOS
|
|
70
|
+
|
|
71
|
+
* Use [Homebrew](https://brew.sh/) to install jq with `brew install jq`.
|
|
72
|
+
|
|
73
|
+
* Use [MacPorts](https://www.macports.org) to install jq with `port install jq`.
|
|
74
|
+
|
|
75
|
+
* Use [Fink](https://finkproject.org) to install jq with `fink install jq`.
|
|
76
|
+
|
|
77
|
+
* jq 1.7.1 binaries for
|
|
78
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-macos-amd64)
|
|
79
|
+
or
|
|
80
|
+
[ARM64](https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-macos-arm64).
|
|
81
|
+
|
|
82
|
+
* jq 1.7 binaries for
|
|
83
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.7/jq-macos-amd64)
|
|
84
|
+
or
|
|
85
|
+
[ARM64](https://github.com/jqlang/jq/releases/download/jq-1.7/jq-macos-arm64).
|
|
86
|
+
|
|
87
|
+
* jq 1.6 binary for
|
|
88
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.6/jq-osx-amd64).
|
|
89
|
+
|
|
90
|
+
* jq 1.5 binary for
|
|
91
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.5/jq-osx-amd64).
|
|
92
|
+
|
|
93
|
+
* jq 1.4 binaries for
|
|
94
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.4/jq-osx-x86_64)
|
|
95
|
+
or
|
|
96
|
+
[i386](https://github.com/jqlang/jq/releases/download/jq-1.4/jq-osx-x86).
|
|
97
|
+
|
|
98
|
+
* jq 1.3 binaries for
|
|
99
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.3/jq-osx-x86_64)
|
|
100
|
+
or
|
|
101
|
+
[i386](https://github.com/jqlang/jq/releases/download/jq-1.3/jq-osx-x86).
|
|
102
|
+
|
|
103
|
+
### FreeBSD
|
|
104
|
+
|
|
105
|
+
* `pkg install jq` as root installs a pre-built
|
|
106
|
+
[binary package](https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/pkgng-intro.html).
|
|
107
|
+
|
|
108
|
+
* `make -C /usr/ports/textproc/jq install clean` as root installs the
|
|
109
|
+
[jq](https://www.freshports.org/textproc/jq/)
|
|
110
|
+
[port](https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html)
|
|
111
|
+
from source.
|
|
112
|
+
|
|
113
|
+
### Solaris
|
|
114
|
+
|
|
115
|
+
* `pkgutil -i jq` in [OpenCSW](https://www.opencsw.org/p/jq) for Solaris
|
|
116
|
+
10+, Sparc and x86.
|
|
117
|
+
|
|
118
|
+
* jq 1.4 binaries for Solaris 11
|
|
119
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.4/jq-solaris11-64)
|
|
120
|
+
or
|
|
121
|
+
[i386](https://github.com/jqlang/jq/releases/download/jq-1.4/jq-solaris11-32).
|
|
122
|
+
|
|
123
|
+
### Windows
|
|
124
|
+
|
|
125
|
+
* Use [winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/)
|
|
126
|
+
to install jq with `winget install jqlang.jq`.
|
|
127
|
+
|
|
128
|
+
* Use [scoop](https://scoop.sh/) to install jq with `scoop install jq`.
|
|
129
|
+
|
|
130
|
+
* Use [Chocolatey NuGet](https://chocolatey.org/) to install jq with
|
|
131
|
+
`choco install jq`.
|
|
132
|
+
|
|
133
|
+
* jq 1.7.1 executables for
|
|
134
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-windows-amd64.exe)
|
|
135
|
+
or
|
|
136
|
+
[i386](https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-windows-i386.exe).
|
|
137
|
+
|
|
138
|
+
* jq 1.7 executables for
|
|
139
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.7/jq-windows-amd64.exe)
|
|
140
|
+
or
|
|
141
|
+
[i386](https://github.com/jqlang/jq/releases/download/jq-1.7/jq-windows-i386.exe).
|
|
142
|
+
|
|
143
|
+
* jq 1.6 executables for
|
|
144
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.6/jq-win64.exe)
|
|
145
|
+
or
|
|
146
|
+
[i386](https://github.com/jqlang/jq/releases/download/jq-1.6/jq-win32.exe).
|
|
147
|
+
|
|
148
|
+
* jq 1.5 executables for
|
|
149
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.5/jq-win64.exe)
|
|
150
|
+
or
|
|
151
|
+
[i386](https://github.com/jqlang/jq/releases/download/jq-1.5/jq-win32.exe).
|
|
152
|
+
|
|
153
|
+
* jq 1.4 executables for
|
|
154
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.4/jq-win64.exe)
|
|
155
|
+
or
|
|
156
|
+
[i386](https://github.com/jqlang/jq/releases/download/jq-1.4/jq-win32.exe).
|
|
157
|
+
|
|
158
|
+
* jq 1.3 executables for
|
|
159
|
+
[AMD64](https://github.com/jqlang/jq/releases/download/jq-1.3/jq-win64.exe)
|
|
160
|
+
or
|
|
161
|
+
[i386](https://github.com/jqlang/jq/releases/download/jq-1.3/jq-win32.exe).
|
|
162
|
+
|
|
163
|
+
### Checksums and signatures
|
|
164
|
+
|
|
165
|
+
SHA-256 checksums are provided for all release and pre-release binaries.
|
|
166
|
+
They can be found under
|
|
167
|
+
[sig/v1.x/sha256sum.txt](https://github.com/jqlang/jq/tree/master/sig).
|
|
168
|
+
The checksums for jq 1.7.1 are in
|
|
169
|
+
[sig/v1.7.1/sha256sum.txt](https://raw.githubusercontent.com/jqlang/jq/master/sig/v1.7.1/sha256sum.txt).
|
|
170
|
+
The checksums for jq 1.7 are in
|
|
171
|
+
[sig/v1.7/sha256sum.txt](https://raw.githubusercontent.com/jqlang/jq/master/sig/v1.7/sha256sum.txt).
|
|
172
|
+
The checksums for jq 1.6 are in
|
|
173
|
+
[sig/v1.6/sha256sum.txt](https://raw.githubusercontent.com/jqlang/jq/master/sig/v1.6/sha256sum.txt).
|
|
174
|
+
The checksums for jq 1.5 are in
|
|
175
|
+
[sig/v1.5/sha256sum.txt](https://raw.githubusercontent.com/jqlang/jq/master/sig/v1.5/sha256sum.txt).
|
|
176
|
+
|
|
177
|
+
Additionally, all release artifacts are signed by a jq release key. We have two release keys, [one for 1.6 and older releases](https://raw.githubusercontent.com/jqlang/jq/master/sig/jq-release-old.key), and [one for 1.7 and newer releases](https://raw.githubusercontent.com/jqlang/jq/master/sig/jq-release-new.key).
|
|
178
|
+
Signatures can be found under
|
|
179
|
+
[sig/v1.x/\*.asc](https://github.com/jqlang/jq/tree/master/sig).
|
|
180
|
+
The signatures for jq 1.7.1 are in
|
|
181
|
+
[sig/v1.7.1/\*.asc](https://github.com/jqlang/jq/tree/master/sig/v1.7.1).
|
|
182
|
+
The signatures for jq 1.7 are in
|
|
183
|
+
[sig/v1.7/\*.asc](https://github.com/jqlang/jq/tree/master/sig/v1.7).
|
|
184
|
+
The signatures for jq 1.6 are in
|
|
185
|
+
[sig/v1.6/\*.asc](https://github.com/jqlang/jq/tree/master/sig/v1.6).
|
|
186
|
+
The signatures for jq 1.5 are in
|
|
187
|
+
[sig/v1.5/\*.asc](https://github.com/jqlang/jq/tree/master/sig/v1.5).
|
|
188
|
+
You can use [GnuPG](https://gnupg.org/) to verify a signature by downloading
|
|
189
|
+
the signature and running `gpg --verify signature.asc`.
|
|
190
|
+
|
|
191
|
+
### From source on Linux, macOS, Cygwin, and other POSIX-like operating systems
|
|
192
|
+
|
|
193
|
+
* [Source tarball for jq 1.7.1](https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-1.7.1.tar.gz)
|
|
194
|
+
* [Source tarball for jq 1.7](https://github.com/jqlang/jq/releases/download/jq-1.7/jq-1.7.tar.gz)
|
|
195
|
+
* [Source tarball for jq 1.6](https://github.com/jqlang/jq/releases/download/jq-1.6/jq-1.6.tar.gz)
|
|
196
|
+
* [Source tarball for jq 1.5](https://github.com/jqlang/jq/releases/download/jq-1.5/jq-1.5.tar.gz)
|
|
197
|
+
|
|
198
|
+
You can build it using the usual `./configure && make && sudo
|
|
199
|
+
make install` rigmarole.
|
|
200
|
+
|
|
201
|
+
If you're interested in using the latest development version, try:
|
|
202
|
+
|
|
203
|
+
git clone --recursive https://github.com/jqlang/jq.git
|
|
204
|
+
cd jq
|
|
205
|
+
autoreconf -i
|
|
206
|
+
./configure
|
|
207
|
+
make
|
|
208
|
+
sudo make install
|
|
209
|
+
|
|
210
|
+
To build it from a git clone, you'll need to install a few
|
|
211
|
+
packages first:
|
|
212
|
+
|
|
213
|
+
* [GCC](https://gcc.gnu.org)
|
|
214
|
+
* [Make](https://www.gnu.org/software/make/)
|
|
215
|
+
* [Autotools](https://www.gnu.org/software/automake/)
|
|
216
|
+
|
|
217
|
+
For Linux systems, these will all be in your system's package
|
|
218
|
+
manager, and if you do development on the machine they're most
|
|
219
|
+
likely already installed.
|
|
220
|
+
|
|
221
|
+
On macOS, these are all included in Apple's command line tools, which can
|
|
222
|
+
be installed from [Xcode](https://developer.apple.com/xcode/). However,
|
|
223
|
+
you may find that you need a newer version of Bison than the one provided
|
|
224
|
+
by Apple. This can be found in [Homebrew](https://brew.sh/) or
|
|
225
|
+
[MacPorts](https://macports.org/).
|
|
226
|
+
|
|
227
|
+
If you want to generate the lexer and parser from source you can use the
|
|
228
|
+
`--enable-maintainer-mode` configure flag. This requires bison to be installed.
|
|
229
|
+
[Flex](https://github.com/westes/flex) and
|
|
230
|
+
[Bison](https://www.gnu.org/software/bison/).
|
|
231
|
+
|
|
232
|
+
### Docker
|
|
233
|
+
|
|
234
|
+
Docker image is available from
|
|
235
|
+
[GitHub Container Registry](https://github.com/jqlang/jq/pkgs/container/jq).
|
|
236
|
+
|
|
237
|
+
docker run -i --rm ghcr.io/jqlang/jq -n 'range(3)'
|
|
238
|
+
|
|
239
|
+
#### Building the documentation
|
|
240
|
+
|
|
241
|
+
jq's documentation is compiled into static HTML using Python.
|
|
242
|
+
To build the docs, run `pipenv run python3 build_website.py --root /output`
|
|
243
|
+
in the `docs/` directory. To serve them locally, you can run
|
|
244
|
+
`python3 -m http.server`. You'll need a few Python dependencies,
|
|
245
|
+
which can be installed by following the instructions in `docs/README.md`.
|
|
246
|
+
|
|
247
|
+
The man page is built by `make jq.1`, or just `make`, also from
|
|
248
|
+
the YAML docs, and you'll still need the Python dependencies to
|
|
249
|
+
build the manpage.
|