@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,337 @@
|
|
|
1
|
+
headline: Tutorial
|
|
2
|
+
body:
|
|
3
|
+
- text: |
|
|
4
|
+
|
|
5
|
+
GitHub has a JSON API, so let's play with that. This URL gets us the last
|
|
6
|
+
5 commits from the jq repo.
|
|
7
|
+
|
|
8
|
+
- command: "curl 'https://api.github.com/repos/jqlang/jq/commits?per_page=5'"
|
|
9
|
+
result: |
|
|
10
|
+
[
|
|
11
|
+
{
|
|
12
|
+
"sha": "cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",
|
|
13
|
+
"node_id": "C_kwDOAE3WVdoAKGNmZjUzMzZlYzcxYjZmZWUzOTZhOTViYjBlNGJlYTM2NWUwY2QxZTg",
|
|
14
|
+
"commit": {
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "Mattias Wadman",
|
|
17
|
+
"email": "mattias.wadman@gmail.com",
|
|
18
|
+
"date": "2021-06-09T14:02:22Z"
|
|
19
|
+
},
|
|
20
|
+
"committer": {
|
|
21
|
+
"name": "Nico Williams",
|
|
22
|
+
"email": "nico@cryptonector.com",
|
|
23
|
+
"date": "2022-05-26T21:04:32Z"
|
|
24
|
+
},
|
|
25
|
+
"message": "docs: Document repeat(exp)",
|
|
26
|
+
"tree": {
|
|
27
|
+
"sha": "d67d5542df1f16d1a48e1fb75749f60482cd874b",
|
|
28
|
+
"url": "https://api.github.com/repos/jqlang/jq/git/trees/d67d5542df1f16d1a48e1fb75749f60482cd874b"
|
|
29
|
+
},
|
|
30
|
+
"url": "https://api.github.com/repos/jqlang/jq/git/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",
|
|
31
|
+
"comment_count": 0,
|
|
32
|
+
"verification": {
|
|
33
|
+
"verified": false,
|
|
34
|
+
"reason": "unsigned",
|
|
35
|
+
"signature": null,
|
|
36
|
+
"payload": null
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"url": "https://api.github.com/repos/jqlang/jq/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",
|
|
40
|
+
"html_url": "https://github.com/jqlang/jq/commit/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",
|
|
41
|
+
"comments_url": "https://api.github.com/repos/jqlang/jq/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8/comments",
|
|
42
|
+
"author": {
|
|
43
|
+
...
|
|
44
|
+
|
|
45
|
+
- text: |
|
|
46
|
+
|
|
47
|
+
GitHub returns nicely formatted JSON. For servers that don't, it can be
|
|
48
|
+
helpful to pipe the response through jq to pretty-print it. The simplest
|
|
49
|
+
jq program is the expression `.`, which takes the input and produces it
|
|
50
|
+
unchanged as output.
|
|
51
|
+
|
|
52
|
+
- command: "curl 'https://api.github.com/repos/jqlang/jq/commits?per_page=5' | jq '.'"
|
|
53
|
+
result: |
|
|
54
|
+
[
|
|
55
|
+
{
|
|
56
|
+
"sha": "cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",
|
|
57
|
+
"node_id": "C_kwDOAE3WVdoAKGNmZjUzMzZlYzcxYjZmZWUzOTZhOTViYjBlNGJlYTM2NWUwY2QxZTg",
|
|
58
|
+
"commit": {
|
|
59
|
+
"author": {
|
|
60
|
+
"name": "Mattias Wadman",
|
|
61
|
+
"email": "mattias.wadman@gmail.com",
|
|
62
|
+
"date": "2021-06-09T14:02:22Z"
|
|
63
|
+
},
|
|
64
|
+
"committer": {
|
|
65
|
+
"name": "Nico Williams",
|
|
66
|
+
"email": "nico@cryptonector.com",
|
|
67
|
+
"date": "2022-05-26T21:04:32Z"
|
|
68
|
+
},
|
|
69
|
+
"message": "docs: Document repeat(exp)",
|
|
70
|
+
"tree": {
|
|
71
|
+
"sha": "d67d5542df1f16d1a48e1fb75749f60482cd874b",
|
|
72
|
+
"url": "https://api.github.com/repos/jqlang/jq/git/trees/d67d5542df1f16d1a48e1fb75749f60482cd874b"
|
|
73
|
+
},
|
|
74
|
+
"url": "https://api.github.com/repos/jqlang/jq/git/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",
|
|
75
|
+
"comment_count": 0,
|
|
76
|
+
"verification": {
|
|
77
|
+
"verified": false,
|
|
78
|
+
"reason": "unsigned",
|
|
79
|
+
"signature": null,
|
|
80
|
+
"payload": null
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"url": "https://api.github.com/repos/jqlang/jq/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",
|
|
84
|
+
"html_url": "https://github.com/jqlang/jq/commit/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",
|
|
85
|
+
"comments_url": "https://api.github.com/repos/jqlang/jq/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8/comments",
|
|
86
|
+
"author": {
|
|
87
|
+
...
|
|
88
|
+
|
|
89
|
+
- text: |
|
|
90
|
+
|
|
91
|
+
We can use jq to extract just the first commit.
|
|
92
|
+
|
|
93
|
+
- command: "curl 'https://api.github.com/repos/jqlang/jq/commits?per_page=5' | jq '.[0]'"
|
|
94
|
+
result: |
|
|
95
|
+
{
|
|
96
|
+
"sha": "cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",
|
|
97
|
+
"node_id": "C_kwDOAE3WVdoAKGNmZjUzMzZlYzcxYjZmZWUzOTZhOTViYjBlNGJlYTM2NWUwY2QxZTg",
|
|
98
|
+
"commit": {
|
|
99
|
+
"author": {
|
|
100
|
+
"name": "Mattias Wadman",
|
|
101
|
+
"email": "mattias.wadman@gmail.com",
|
|
102
|
+
"date": "2021-06-09T14:02:22Z"
|
|
103
|
+
},
|
|
104
|
+
"committer": {
|
|
105
|
+
"name": "Nico Williams",
|
|
106
|
+
"email": "nico@cryptonector.com",
|
|
107
|
+
"date": "2022-05-26T21:04:32Z"
|
|
108
|
+
},
|
|
109
|
+
"message": "docs: Document repeat(exp)",
|
|
110
|
+
"tree": {
|
|
111
|
+
"sha": "d67d5542df1f16d1a48e1fb75749f60482cd874b",
|
|
112
|
+
"url": "https://api.github.com/repos/jqlang/jq/git/trees/d67d5542df1f16d1a48e1fb75749f60482cd874b"
|
|
113
|
+
},
|
|
114
|
+
"url": "https://api.github.com/repos/jqlang/jq/git/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",
|
|
115
|
+
"comment_count": 0,
|
|
116
|
+
"verification": {
|
|
117
|
+
"verified": false,
|
|
118
|
+
"reason": "unsigned",
|
|
119
|
+
"signature": null,
|
|
120
|
+
"payload": null
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"url": "https://api.github.com/repos/jqlang/jq/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",
|
|
124
|
+
"html_url": "https://github.com/jqlang/jq/commit/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8",
|
|
125
|
+
"comments_url": "https://api.github.com/repos/jqlang/jq/commits/cff5336ec71b6fee396a95bb0e4bea365e0cd1e8/comments",
|
|
126
|
+
"author": {
|
|
127
|
+
"login": "wader",
|
|
128
|
+
"id": 185566,
|
|
129
|
+
"node_id": "MDQ6VXNlcjE4NTU2Ng==",
|
|
130
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/185566?v=4",
|
|
131
|
+
"gravatar_id": "",
|
|
132
|
+
"url": "https://api.github.com/users/wader",
|
|
133
|
+
"html_url": "https://github.com/wader",
|
|
134
|
+
"followers_url": "https://api.github.com/users/wader/followers",
|
|
135
|
+
"following_url": "https://api.github.com/users/wader/following{/other_user}",
|
|
136
|
+
"gists_url": "https://api.github.com/users/wader/gists{/gist_id}",
|
|
137
|
+
"starred_url": "https://api.github.com/users/wader/starred{/owner}{/repo}",
|
|
138
|
+
"subscriptions_url": "https://api.github.com/users/wader/subscriptions",
|
|
139
|
+
"organizations_url": "https://api.github.com/users/wader/orgs",
|
|
140
|
+
"repos_url": "https://api.github.com/users/wader/repos",
|
|
141
|
+
"events_url": "https://api.github.com/users/wader/events{/privacy}",
|
|
142
|
+
"received_events_url": "https://api.github.com/users/wader/received_events",
|
|
143
|
+
"type": "User",
|
|
144
|
+
"site_admin": false
|
|
145
|
+
},
|
|
146
|
+
"committer": {
|
|
147
|
+
"login": "nicowilliams",
|
|
148
|
+
"id": 604851,
|
|
149
|
+
"node_id": "MDQ6VXNlcjYwNDg1MQ==",
|
|
150
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/604851?v=4",
|
|
151
|
+
"gravatar_id": "",
|
|
152
|
+
"url": "https://api.github.com/users/nicowilliams",
|
|
153
|
+
"html_url": "https://github.com/nicowilliams",
|
|
154
|
+
"followers_url": "https://api.github.com/users/nicowilliams/followers",
|
|
155
|
+
"following_url": "https://api.github.com/users/nicowilliams/following{/other_user}",
|
|
156
|
+
"gists_url": "https://api.github.com/users/nicowilliams/gists{/gist_id}",
|
|
157
|
+
"starred_url": "https://api.github.com/users/nicowilliams/starred{/owner}{/repo}",
|
|
158
|
+
"subscriptions_url": "https://api.github.com/users/nicowilliams/subscriptions",
|
|
159
|
+
"organizations_url": "https://api.github.com/users/nicowilliams/orgs",
|
|
160
|
+
"repos_url": "https://api.github.com/users/nicowilliams/repos",
|
|
161
|
+
"events_url": "https://api.github.com/users/nicowilliams/events{/privacy}",
|
|
162
|
+
"received_events_url": "https://api.github.com/users/nicowilliams/received_events",
|
|
163
|
+
"type": "User",
|
|
164
|
+
"site_admin": false
|
|
165
|
+
},
|
|
166
|
+
"parents": [
|
|
167
|
+
{
|
|
168
|
+
"sha": "f2ad9517c72f6267ae317639ab56bbfd4a8653d4",
|
|
169
|
+
"url": "https://api.github.com/repos/jqlang/jq/commits/f2ad9517c72f6267ae317639ab56bbfd4a8653d4",
|
|
170
|
+
"html_url": "https://github.com/jqlang/jq/commit/f2ad9517c72f6267ae317639ab56bbfd4a8653d4"
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
- text: |
|
|
176
|
+
|
|
177
|
+
For the rest of the examples, I'll leave out the `curl` command - it's not
|
|
178
|
+
going to change.
|
|
179
|
+
|
|
180
|
+
There's a lot of info we don't care about there, so we'll restrict it down
|
|
181
|
+
to the most interesting fields.
|
|
182
|
+
|
|
183
|
+
- command: "jq '.[0] | {message: .commit.message, name: .commit.committer.name}'"
|
|
184
|
+
result: |
|
|
185
|
+
{
|
|
186
|
+
"message": "docs: Document repeat(exp)",
|
|
187
|
+
"name": "Nico Williams"
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
- text: |
|
|
191
|
+
|
|
192
|
+
The `|` operator in jq feeds the output of one filter (`.[0]` which gets
|
|
193
|
+
the first element of the array in the response) into the input of another
|
|
194
|
+
(`{...}` which builds an object out of those fields). You can access
|
|
195
|
+
nested attributes, such as `.commit.message`.
|
|
196
|
+
|
|
197
|
+
Now let's get the rest of the commits.
|
|
198
|
+
|
|
199
|
+
- command: "jq '.[] | {message: .commit.message, name: .commit.committer.name}'"
|
|
200
|
+
result: |
|
|
201
|
+
{
|
|
202
|
+
"message": "docs: Document repeat(exp)",
|
|
203
|
+
"name": "Nico Williams"
|
|
204
|
+
}
|
|
205
|
+
{
|
|
206
|
+
"message": "Mention -n in IO-section and for input/inputs",
|
|
207
|
+
"name": "Nico Williams"
|
|
208
|
+
}
|
|
209
|
+
{
|
|
210
|
+
"message": "Fix iteration problem for non decimal string\n\nWhen the string transformation to number failed, all following\ntransformation failed too.\n\nThis happend because status in decNumberFromString function is\nupdated just in error case. Reusing the DEC_CONTEXT that failed\nbefore results into error even if the string is valid number.",
|
|
211
|
+
"name": "Nico Williams"
|
|
212
|
+
}
|
|
213
|
+
{
|
|
214
|
+
"message": "docs: point to Libera.Chat instead of Freenode",
|
|
215
|
+
"name": "Nico Williams"
|
|
216
|
+
}
|
|
217
|
+
{
|
|
218
|
+
"message": "Missing \"va_end\" call. This was found by running the cppcheck static analysis where it shows as error.",
|
|
219
|
+
"name": "Nico Williams"
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
- text: |
|
|
223
|
+
|
|
224
|
+
`.[]` returns each element of the array returned in the response, one at a
|
|
225
|
+
time, which are all fed into
|
|
226
|
+
`{message: .commit.message, name: .commit.committer.name}`.
|
|
227
|
+
|
|
228
|
+
Data in jq is represented as streams of JSON values - every jq
|
|
229
|
+
expression runs for each value in its input stream, and can
|
|
230
|
+
produce any number of values to its output stream.
|
|
231
|
+
|
|
232
|
+
Streams are serialised by just separating JSON values with
|
|
233
|
+
whitespace. This is a `cat`-friendly format - you can just join
|
|
234
|
+
two JSON streams together and get a valid JSON stream.
|
|
235
|
+
|
|
236
|
+
If you want to get the output as a single array, you can tell jq to
|
|
237
|
+
"collect" all of the answers by wrapping the filter in square
|
|
238
|
+
brackets:
|
|
239
|
+
|
|
240
|
+
- command: "jq '[.[] | {message: .commit.message, name: .commit.committer.name}]'"
|
|
241
|
+
result: |
|
|
242
|
+
[
|
|
243
|
+
{
|
|
244
|
+
"message": "docs: Document repeat(exp)",
|
|
245
|
+
"name": "Nico Williams"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"message": "Mention -n in IO-section and for input/inputs",
|
|
249
|
+
"name": "Nico Williams"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"message": "Fix iteration problem for non decimal string\n\nWhen the string transformation to number failed, all following\ntransformation failed too.\n\nThis happend because status in decNumberFromString function is\nupdated just in error case. Reusing the DEC_CONTEXT that failed\nbefore results into error even if the string is valid number.",
|
|
253
|
+
"name": "Nico Williams"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"message": "docs: point to Libera.Chat instead of Freenode",
|
|
257
|
+
"name": "Nico Williams"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"message": "Missing \"va_end\" call. This was found by running the cppcheck static analysis where it shows as error.",
|
|
261
|
+
"name": "Nico Williams"
|
|
262
|
+
}
|
|
263
|
+
]
|
|
264
|
+
|
|
265
|
+
- text: |
|
|
266
|
+
|
|
267
|
+
- - -
|
|
268
|
+
|
|
269
|
+
Next, let's try getting the URLs of the parent commits out of the
|
|
270
|
+
API results as well. In each commit, the GitHub API includes information
|
|
271
|
+
about "parent" commits. There can be one or many.
|
|
272
|
+
|
|
273
|
+
"parents": [
|
|
274
|
+
{
|
|
275
|
+
"sha": "f2ad9517c72f6267ae317639ab56bbfd4a8653d4",
|
|
276
|
+
"url": "https://api.github.com/repos/jqlang/jq/commits/f2ad9517c72f6267ae317639ab56bbfd4a8653d4",
|
|
277
|
+
"html_url": "https://github.com/jqlang/jq/commit/f2ad9517c72f6267ae317639ab56bbfd4a8653d4"
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
|
|
281
|
+
We want to pull out all of the "html_url" fields inside that array of parent
|
|
282
|
+
commits and make a simple list of strings to go along with the
|
|
283
|
+
"message" and "author" fields we already have.
|
|
284
|
+
|
|
285
|
+
- command: "jq '[.[] | {message: .commit.message, name: .commit.committer.name, parents: [.parents[].html_url]}]'"
|
|
286
|
+
result: |
|
|
287
|
+
[
|
|
288
|
+
{
|
|
289
|
+
"message": "docs: Document repeat(exp)",
|
|
290
|
+
"name": "Nico Williams",
|
|
291
|
+
"parents": [
|
|
292
|
+
"https://github.com/jqlang/jq/commit/f2ad9517c72f6267ae317639ab56bbfd4a8653d4"
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"message": "Mention -n in IO-section and for input/inputs",
|
|
297
|
+
"name": "Nico Williams",
|
|
298
|
+
"parents": [
|
|
299
|
+
"https://github.com/jqlang/jq/commit/c4d39c4d22f2b12225ca1b311708f7e084ad9ff8"
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"message": "Fix iteration problem for non decimal string\n\nWhen the string transformation to number failed, all following\ntransformation failed too.\n\nThis happend because status in decNumberFromString function is\nupdated just in error case. Reusing the DEC_CONTEXT that failed\nbefore results into error even if the string is valid number.",
|
|
304
|
+
"name": "Nico Williams",
|
|
305
|
+
"parents": [
|
|
306
|
+
"https://github.com/jqlang/jq/commit/174db0f93552bdb551ae1f3c5c64744df0ad8e2f"
|
|
307
|
+
]
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"message": "docs: point to Libera.Chat instead of Freenode",
|
|
311
|
+
"name": "Nico Williams",
|
|
312
|
+
"parents": [
|
|
313
|
+
"https://github.com/jqlang/jq/commit/29cf77977ef52eec708982b19bf9d2ec17443337"
|
|
314
|
+
]
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"message": "Missing \"va_end\" call. This was found by running the cppcheck static analysis where it shows as error.",
|
|
318
|
+
"name": "Nico Williams",
|
|
319
|
+
"parents": [
|
|
320
|
+
"https://github.com/jqlang/jq/commit/55e6e2c21829bd866bd4b18ee254b05c9020320a"
|
|
321
|
+
]
|
|
322
|
+
}
|
|
323
|
+
]
|
|
324
|
+
|
|
325
|
+
- text: |
|
|
326
|
+
|
|
327
|
+
Here we're making an object as before, but this time the `parents`
|
|
328
|
+
field is being set to `[.parents[].html_url]`, which collects
|
|
329
|
+
all of the parent commit URLs defined in the parents object.
|
|
330
|
+
|
|
331
|
+
- text: |
|
|
332
|
+
|
|
333
|
+
- - -
|
|
334
|
+
|
|
335
|
+
Here endeth the tutorial! There's lots more to play with. Go
|
|
336
|
+
read [the manual](../manual/) if you're interested, and [download
|
|
337
|
+
jq](../download/) if you haven't already.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
type: object
|
|
2
|
+
required:
|
|
3
|
+
- headline
|
|
4
|
+
- body
|
|
5
|
+
- manpage_intro
|
|
6
|
+
- manpage_epilogue
|
|
7
|
+
- sections
|
|
8
|
+
additionalProperties: false
|
|
9
|
+
properties:
|
|
10
|
+
headline:
|
|
11
|
+
type: string
|
|
12
|
+
body:
|
|
13
|
+
type: string
|
|
14
|
+
manpage_intro:
|
|
15
|
+
type: string
|
|
16
|
+
manpage_epilogue:
|
|
17
|
+
type: string
|
|
18
|
+
sections:
|
|
19
|
+
type: array
|
|
20
|
+
items:
|
|
21
|
+
type: object
|
|
22
|
+
required:
|
|
23
|
+
- title
|
|
24
|
+
additionalProperties: false
|
|
25
|
+
properties:
|
|
26
|
+
title:
|
|
27
|
+
type: string
|
|
28
|
+
body:
|
|
29
|
+
type: string
|
|
30
|
+
entries:
|
|
31
|
+
type: array
|
|
32
|
+
items:
|
|
33
|
+
type: object
|
|
34
|
+
required:
|
|
35
|
+
- title
|
|
36
|
+
- body
|
|
37
|
+
additionalProperties: false
|
|
38
|
+
properties:
|
|
39
|
+
title:
|
|
40
|
+
type: string
|
|
41
|
+
body:
|
|
42
|
+
type: string
|
|
43
|
+
examples:
|
|
44
|
+
type: array
|
|
45
|
+
items:
|
|
46
|
+
type: object
|
|
47
|
+
required:
|
|
48
|
+
- program
|
|
49
|
+
- input
|
|
50
|
+
- output
|
|
51
|
+
additionalProperties: false
|
|
52
|
+
properties:
|
|
53
|
+
program:
|
|
54
|
+
type: string
|
|
55
|
+
input:
|
|
56
|
+
type: string
|
|
57
|
+
output:
|
|
58
|
+
type: array
|
|
59
|
+
items:
|
|
60
|
+
type: string
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
main {
|
|
2
|
+
padding: 1rem;
|
|
3
|
+
|
|
4
|
+
& * {
|
|
5
|
+
scroll-margin-top: 4rem;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@media print {
|
|
9
|
+
width: 100%!important;
|
|
10
|
+
--bs-code-color: --bs-body-color;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
header {
|
|
15
|
+
z-index: 1050!important; /* higher than #contents */
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
section[id] {
|
|
19
|
+
display: flow-root;
|
|
20
|
+
|
|
21
|
+
> :first-child {
|
|
22
|
+
.icon-link {
|
|
23
|
+
opacity: 0;
|
|
24
|
+
|
|
25
|
+
&:focus {
|
|
26
|
+
opacity: .8;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:hover .icon-link {
|
|
31
|
+
opacity: 1;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.offcanvas[aria-modal=true] .nav-link {
|
|
37
|
+
padding: .7rem;
|
|
38
|
+
}
|
|
39
|
+
.offcanvas-md {
|
|
40
|
+
--bs-offcanvas-width: auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
ul {
|
|
44
|
+
list-style: none;
|
|
45
|
+
padding-left: 1rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
pre {
|
|
49
|
+
margin: 0 .5rem 1rem;
|
|
50
|
+
padding: .5rem 1rem;
|
|
51
|
+
background-color: var(--bs-secondary-bg-subtle);
|
|
52
|
+
border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
button{
|
|
56
|
+
&[aria-expanded=false] .bi-chevron-down {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&[aria-expanded=true] .bi-chevron-right {
|
|
61
|
+
display: none;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
mark {
|
|
66
|
+
padding: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.container-searchbox {
|
|
70
|
+
position: relative;
|
|
71
|
+
|
|
72
|
+
& input:focus ~ kbd {
|
|
73
|
+
display: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
& ul {
|
|
77
|
+
position: absolute;
|
|
78
|
+
width: 100%;
|
|
79
|
+
top: 100%;
|
|
80
|
+
padding: 0;
|
|
81
|
+
background-color: var(--bs-body-bg);
|
|
82
|
+
border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
& li {
|
|
86
|
+
padding: .3em .6em;
|
|
87
|
+
white-space: nowrap;
|
|
88
|
+
overflow-x: hidden;
|
|
89
|
+
|
|
90
|
+
&[aria-selected=true] {
|
|
91
|
+
background-color: var(--bs-secondary-bg);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&:hover {
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
background-color: var(--bs-secondary-bg-subtle);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="48" height="48" version="1.0" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><style>@media(prefers-color-scheme:dark){g[fill]{filter:invert(1)}}</style><g transform="matrix(.011 0 0 .011 1.94 12)"><g fill="#444"><circle cx="220" cy="1570" r="190"/><path d="m1330 312c-30 41-698 1492-710 1528s25 66 100 101c77 36 102 34 124 3s701-1477 716-1525c15-47-20-73-84-104s-116-44-146-3z"/></g><g fill="#111"><circle cx="2410" cy="200" r="190"/><path d="m1830 655c0 129 0 130 70 130h360v423c0 246-5 474-10 506-19 112-88 176-190 176-59 0-120-27-147-66-51-73-65-84-99-84-31 0-40 8-104 93-84 111-86 129-32 189 227 252 692 187 836-118 53-112 56-153 56-795v-514c0-64-30-100-100-100h-490c-149 0-150 0-150 160zM2867 1233c30 302 250 499 438 527 144 19 244 0 375-90v410c0 81 0 100 150 100 136 0 150-20 150-150v-1420c0-99-19-100-150-100s-139 15-139 82c-103-89-351-149-523-49s-342 278-301 690zm803-107c0 292-105 356-237 356-178 0-249-147-273-296-27-168 25-420 262-420 171 0 248 89 248 360z"/></g></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="400" height="220" version="1.0" viewBox="0 0 400 220" xmlns="http://www.w3.org/2000/svg"><style>@media (prefers-color-scheme:dark){g[fill]{filter:invert(1);stroke:none}}</style><g transform="scale(.1)" stroke="#fff" stroke-width="10"><g fill="#444"><circle cx="220" cy="1570" r="190"/><path d="m1330 312c-30 41-698 1492-710 1528s25 66 100 101c77 36 102 34 124 3s701-1477 716-1525c15-47-20-73-84-104s-116-44-146-3z"/></g><g fill="#111"><circle cx="2410" cy="200" r="190"/><path d="m1830 655c0 129 0 130 70 130h360v423c0 246-5 474-10 506-19 112-88 176-190 176-59 0-120-27-147-66-51-73-65-84-99-84-31 0-40 8-104 93-84 111-86 129-32 189 227 252 692 187 836-118 53-112 56-153 56-795v-514c0-64-30-100-100-100h-490c-149 0-150 0-150 160zM2867 1233c30 302 250 499 438 527 144 19 244 0 375-90v410c0 81 0 100 150 100 136 0 150-20 150-150v-1420c0-99-19-100-150-100s-139 15-139 82c-103-89-351-149-523-49s-342 278-301 690zm803-107c0 292-105 356-237 356-178 0-249-147-273-296-27-168 25-420 262-420 171 0 248 89 248 360z"/></g></g></svg>
|
|
@@ -1,52 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
(() => {
|
|
2
|
+
const searchInput = document.querySelector('input#searchbox');
|
|
3
|
+
const sectionIDs = JSON.parse(document.querySelector('#section-ids').innerText);
|
|
4
|
+
const sanitize = (string) => string.replaceAll('<', '<').replaceAll('>', '>');
|
|
5
|
+
new autoComplete({
|
|
6
|
+
selector: `#${searchInput.id}`,
|
|
7
|
+
wrapper: false,
|
|
8
|
+
data: {
|
|
9
|
+
src: Object.keys(sectionIDs),
|
|
10
|
+
filter: (list) => list.sort((x, y) =>
|
|
11
|
+
x.match.indexOf('<') - y.match.indexOf('<') || x.value.length - y.value.length),
|
|
12
|
+
},
|
|
13
|
+
searchEngine: (query, value) => {
|
|
14
|
+
const index = value.toLowerCase().indexOf(query.toLowerCase());
|
|
15
|
+
if (index >= 0) {
|
|
16
|
+
return sanitize(value.substring(0, index)) +
|
|
17
|
+
`<mark>${sanitize(value.substring(index, index + query.length))}</mark>` +
|
|
18
|
+
sanitize(value.substring(index + query.length));
|
|
19
|
+
}
|
|
20
|
+
},
|
|
15
21
|
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
cb(section_names(q));
|
|
20
|
-
}
|
|
21
|
-
var go_to_section = function() {
|
|
22
|
-
query = $('#searchbox').val();
|
|
23
|
-
results = section_names(query);
|
|
24
|
-
if (results.length == 0) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
result = results[0];
|
|
28
|
-
location.hash = '#' + section_map[result];
|
|
29
|
-
if (result != query) {
|
|
30
|
-
$('#searchbox').val(result);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
$(function(){
|
|
34
|
-
$('#searchbox').typeahead(
|
|
35
|
-
{hint: false, highlight: true, minLength: 1},
|
|
36
|
-
{name: "contents", source: section_names_cb, limit: 6}
|
|
37
|
-
).on('typeahead:selected', function(e, data) {
|
|
38
|
-
go_to_section();
|
|
22
|
+
searchInput.addEventListener('selection', (event) => {
|
|
23
|
+
event.target.value = event.detail.selection.value;
|
|
24
|
+
location.hash = `#${sectionIDs[event.detail.selection.value]}`;
|
|
39
25
|
});
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
var q = $value.find('.jqprogram').text().replace(/^jq /, '').replace(/^'(.+)'$/, '$1');
|
|
48
|
-
var url = 'https://jqplay.org/jq?q=' + encodeURIComponent(q) +'&j=' + encodeURIComponent(j)
|
|
49
|
-
var $last_tr = $value.find('tr:last');
|
|
50
|
-
$last_tr.after('<tr class="jqplay-btn"><th><a href="' + url + '" class="btn btn-primary btn-sm">Run</a></th><th></th></tr><tr><th></th><th></th></tr>');
|
|
26
|
+
document.addEventListener('keydown', (event) => {
|
|
27
|
+
if (event.code === 'Slash' && !event.altKey && !event.ctrlKey && !event.metaKey
|
|
28
|
+
&& !event.shiftKey && !/^(INPUT|TEXTAREA)$/.test(event.target.nodeName)) {
|
|
29
|
+
searchInput.focus();
|
|
30
|
+
searchInput.select();
|
|
31
|
+
event.preventDefault();
|
|
32
|
+
}
|
|
51
33
|
});
|
|
52
|
-
});
|
|
34
|
+
})();
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
{% include "shared/_head.html.j2" %}
|
|
4
|
+
|
|
5
|
+
<body>
|
|
6
|
+
{% include "shared/_navbar.html.j2" %}
|
|
7
|
+
|
|
8
|
+
<main id="main" class="container-lg">
|
|
9
|
+
<h1>{{ headline }}</h1>
|
|
10
|
+
{%- for item in body %}
|
|
11
|
+
{%- if item.text %}
|
|
12
|
+
{{ item.text | markdownify }}
|
|
13
|
+
{%- endif %}
|
|
14
|
+
|
|
15
|
+
{%- if item.command %}
|
|
16
|
+
{%- set resultID = unique_id() %}
|
|
17
|
+
<div class="tutorial-example mb-3">
|
|
18
|
+
<div class="d-flex accordion-heading me-2">
|
|
19
|
+
<pre class="flex-grow-1 me-0 mb-0" tabindex="0">{{ item.command }}</pre>
|
|
20
|
+
<button type="button" class="btn btn-sm btn-secondary text-body-secondary bg-secondary-subtle link-body-emphasis flex-shrink-0 d-flex align-items-center border border-start-0 d-print-none"
|
|
21
|
+
data-bs-toggle="collapse" data-bs-target="#result{{ resultID }}" aria-expanded="false" aria-controls="result{{ resultID }}">Show result</button>
|
|
22
|
+
</div>
|
|
23
|
+
<pre id="result{{ resultID }}" class="accordion-body collapse p-3 border-top-0 d-print-block" tabindex="0">{{ item.result }}</pre>
|
|
24
|
+
</div>
|
|
25
|
+
{%- endif %}
|
|
26
|
+
{%- endfor %}
|
|
27
|
+
</main>
|
|
28
|
+
|
|
29
|
+
{% include "shared/_footer.html.j2" %}
|
|
30
|
+
</body>
|
|
31
|
+
</html>
|