@pnpm/exe 11.0.0-dev.1005 → 11.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node-gyp-bin/node-gyp +6 -0
- package/dist/node-gyp-bin/node-gyp.cmd +5 -0
- package/dist/node_modules/@gar/promise-retry/LICENSE +20 -0
- package/dist/node_modules/@gar/promise-retry/lib/index.js +62 -0
- package/dist/node_modules/@gar/promise-retry/lib/retry.js +109 -0
- package/dist/node_modules/@gar/promise-retry/package.json +45 -0
- package/dist/node_modules/@isaacs/fs-minipass/LICENSE +15 -0
- package/dist/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +430 -0
- package/dist/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +3 -0
- package/dist/node_modules/@isaacs/fs-minipass/dist/esm/index.js +420 -0
- package/dist/node_modules/@isaacs/fs-minipass/dist/esm/package.json +3 -0
- package/dist/node_modules/@isaacs/fs-minipass/package.json +72 -0
- package/dist/node_modules/@npmcli/agent/lib/agents.js +206 -0
- package/dist/node_modules/@npmcli/agent/lib/dns.js +53 -0
- package/dist/node_modules/@npmcli/agent/lib/errors.js +61 -0
- package/dist/node_modules/@npmcli/agent/lib/index.js +56 -0
- package/dist/node_modules/@npmcli/agent/lib/options.js +86 -0
- package/dist/node_modules/@npmcli/agent/lib/proxy.js +88 -0
- package/dist/node_modules/@npmcli/agent/package.json +60 -0
- package/dist/node_modules/@npmcli/fs/lib/common/get-options.js +20 -0
- package/dist/node_modules/@npmcli/fs/lib/common/node.js +9 -0
- package/dist/node_modules/@npmcli/fs/lib/cp/LICENSE +15 -0
- package/dist/node_modules/@npmcli/fs/lib/cp/errors.js +129 -0
- package/dist/node_modules/@npmcli/fs/lib/cp/index.js +22 -0
- package/dist/node_modules/@npmcli/fs/lib/cp/polyfill.js +428 -0
- package/dist/node_modules/@npmcli/fs/lib/index.js +13 -0
- package/dist/node_modules/@npmcli/fs/lib/move-file.js +78 -0
- package/dist/node_modules/@npmcli/fs/lib/readdir-scoped.js +20 -0
- package/dist/node_modules/@npmcli/fs/lib/with-temp-dir.js +39 -0
- package/dist/node_modules/@npmcli/fs/package.json +54 -0
- package/dist/node_modules/@npmcli/redact/LICENSE +21 -0
- package/dist/node_modules/@npmcli/redact/lib/deep-map.js +71 -0
- package/dist/node_modules/@npmcli/redact/lib/error.js +28 -0
- package/dist/node_modules/@npmcli/redact/lib/index.js +44 -0
- package/dist/node_modules/@npmcli/redact/lib/matchers.js +88 -0
- package/dist/node_modules/@npmcli/redact/lib/server.js +59 -0
- package/dist/node_modules/@npmcli/redact/lib/utils.js +202 -0
- package/dist/node_modules/@npmcli/redact/package.json +52 -0
- package/dist/node_modules/abbrev/LICENSE +46 -0
- package/dist/node_modules/abbrev/lib/index.js +53 -0
- package/dist/node_modules/abbrev/package.json +41 -0
- package/dist/node_modules/agent-base/LICENSE +22 -0
- package/dist/node_modules/agent-base/dist/helpers.js +66 -0
- package/dist/node_modules/agent-base/dist/index.js +178 -0
- package/dist/node_modules/agent-base/package.json +46 -0
- package/dist/node_modules/balanced-match/dist/commonjs/index.js +59 -0
- package/dist/node_modules/balanced-match/dist/commonjs/package.json +3 -0
- package/dist/node_modules/balanced-match/dist/esm/index.js +54 -0
- package/dist/node_modules/balanced-match/dist/esm/package.json +3 -0
- package/dist/node_modules/balanced-match/package.json +68 -0
- package/dist/node_modules/brace-expansion/LICENSE +23 -0
- package/dist/node_modules/brace-expansion/dist/commonjs/index.js +201 -0
- package/dist/node_modules/brace-expansion/dist/commonjs/package.json +3 -0
- package/dist/node_modules/brace-expansion/dist/esm/index.js +197 -0
- package/dist/node_modules/brace-expansion/dist/esm/package.json +3 -0
- package/dist/node_modules/brace-expansion/package.json +64 -0
- package/dist/node_modules/cacache/lib/content/path.js +29 -0
- package/dist/node_modules/cacache/lib/content/read.js +165 -0
- package/dist/node_modules/cacache/lib/content/rm.js +18 -0
- package/dist/node_modules/cacache/lib/content/write.js +206 -0
- package/dist/node_modules/cacache/lib/entry-index.js +336 -0
- package/dist/node_modules/cacache/lib/get.js +170 -0
- package/dist/node_modules/cacache/lib/index.js +42 -0
- package/dist/node_modules/cacache/lib/memoization.js +72 -0
- package/dist/node_modules/cacache/lib/put.js +80 -0
- package/dist/node_modules/cacache/lib/rm.js +31 -0
- package/dist/node_modules/cacache/lib/util/glob.js +7 -0
- package/dist/node_modules/cacache/lib/util/hash-to-segments.js +7 -0
- package/dist/node_modules/cacache/lib/util/tmp.js +32 -0
- package/dist/node_modules/cacache/lib/verify.js +258 -0
- package/dist/node_modules/cacache/package.json +81 -0
- package/dist/node_modules/chownr/dist/commonjs/index.js +93 -0
- package/dist/node_modules/chownr/dist/commonjs/package.json +3 -0
- package/dist/node_modules/chownr/dist/esm/index.js +85 -0
- package/dist/node_modules/chownr/dist/esm/package.json +3 -0
- package/dist/node_modules/chownr/package.json +69 -0
- package/dist/node_modules/debug/LICENSE +20 -0
- package/dist/node_modules/debug/package.json +64 -0
- package/dist/node_modules/debug/src/browser.js +272 -0
- package/dist/node_modules/debug/src/common.js +292 -0
- package/dist/node_modules/debug/src/index.js +10 -0
- package/dist/node_modules/debug/src/node.js +263 -0
- package/dist/node_modules/env-paths/index.js +74 -0
- package/dist/node_modules/env-paths/license +9 -0
- package/dist/node_modules/env-paths/package.json +45 -0
- package/dist/node_modules/exponential-backoff/LICENSE +202 -0
- package/dist/node_modules/exponential-backoff/dist/backoff.js +124 -0
- package/dist/node_modules/exponential-backoff/dist/delay/always/always.delay.js +25 -0
- package/dist/node_modules/exponential-backoff/dist/delay/delay.base.js +45 -0
- package/dist/node_modules/exponential-backoff/dist/delay/delay.factory.js +17 -0
- package/dist/node_modules/exponential-backoff/dist/delay/delay.interface.js +3 -0
- package/dist/node_modules/exponential-backoff/dist/delay/skip-first/skip-first.delay.js +82 -0
- package/dist/node_modules/exponential-backoff/dist/jitter/full/full.jitter.js +8 -0
- package/dist/node_modules/exponential-backoff/dist/jitter/jitter.factory.js +15 -0
- package/dist/node_modules/exponential-backoff/dist/jitter/no/no.jitter.js +7 -0
- package/dist/node_modules/exponential-backoff/dist/options.js +31 -0
- package/dist/node_modules/exponential-backoff/package.json +62 -0
- package/dist/node_modules/fdir/LICENSE +7 -0
- package/dist/node_modules/fdir/dist/index.cjs +588 -0
- package/dist/node_modules/fdir/dist/index.d.cts +155 -0
- package/dist/node_modules/fdir/dist/index.d.mts +155 -0
- package/dist/node_modules/fdir/dist/index.mjs +570 -0
- package/dist/node_modules/fdir/package.json +103 -0
- package/dist/node_modules/fs-minipass/LICENSE +15 -0
- package/dist/node_modules/fs-minipass/lib/index.js +443 -0
- package/dist/node_modules/fs-minipass/package.json +54 -0
- package/dist/node_modules/glob/dist/commonjs/glob.js +248 -0
- package/dist/node_modules/glob/dist/commonjs/has-magic.js +27 -0
- package/dist/node_modules/glob/dist/commonjs/ignore.js +119 -0
- package/dist/node_modules/glob/dist/commonjs/index.js +68 -0
- package/dist/node_modules/glob/dist/commonjs/index.min.js +4 -0
- package/dist/node_modules/glob/dist/commonjs/package.json +3 -0
- package/dist/node_modules/glob/dist/commonjs/pattern.js +223 -0
- package/dist/node_modules/glob/dist/commonjs/processor.js +301 -0
- package/dist/node_modules/glob/dist/commonjs/walker.js +387 -0
- package/dist/node_modules/glob/dist/esm/glob.js +244 -0
- package/dist/node_modules/glob/dist/esm/has-magic.js +23 -0
- package/dist/node_modules/glob/dist/esm/ignore.js +115 -0
- package/dist/node_modules/glob/dist/esm/index.js +55 -0
- package/dist/node_modules/glob/dist/esm/index.min.js +4 -0
- package/dist/node_modules/glob/dist/esm/package.json +3 -0
- package/dist/node_modules/glob/dist/esm/pattern.js +219 -0
- package/dist/node_modules/glob/dist/esm/processor.js +294 -0
- package/dist/node_modules/glob/dist/esm/walker.js +381 -0
- package/dist/node_modules/glob/package.json +98 -0
- package/dist/node_modules/graceful-fs/LICENSE +15 -0
- package/dist/node_modules/graceful-fs/clone.js +23 -0
- package/dist/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/dist/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/dist/node_modules/graceful-fs/package.json +53 -0
- package/dist/node_modules/graceful-fs/polyfills.js +355 -0
- package/dist/node_modules/http-cache-semantics/LICENSE +9 -0
- package/dist/node_modules/http-cache-semantics/index.js +928 -0
- package/dist/node_modules/http-cache-semantics/package.json +22 -0
- package/dist/node_modules/http-proxy-agent/LICENSE +22 -0
- package/dist/node_modules/http-proxy-agent/dist/index.js +148 -0
- package/dist/node_modules/http-proxy-agent/package.json +47 -0
- package/dist/node_modules/https-proxy-agent/LICENSE +22 -0
- package/dist/node_modules/https-proxy-agent/dist/index.js +180 -0
- package/dist/node_modules/https-proxy-agent/dist/parse-proxy-response.js +101 -0
- package/dist/node_modules/https-proxy-agent/package.json +50 -0
- package/dist/node_modules/iconv-lite/LICENSE +21 -0
- package/dist/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
- package/dist/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
- package/dist/node_modules/iconv-lite/encodings/index.js +23 -0
- package/dist/node_modules/iconv-lite/encodings/internal.js +218 -0
- package/dist/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
- package/dist/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/dist/node_modules/iconv-lite/encodings/sbcs-data.js +178 -0
- package/dist/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/dist/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/dist/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/dist/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/dist/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/dist/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/dist/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
- package/dist/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/dist/node_modules/iconv-lite/encodings/utf16.js +187 -0
- package/dist/node_modules/iconv-lite/encodings/utf32.js +307 -0
- package/dist/node_modules/iconv-lite/encodings/utf7.js +283 -0
- package/dist/node_modules/iconv-lite/lib/bom-handling.js +48 -0
- package/dist/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
- package/dist/node_modules/iconv-lite/lib/index.js +182 -0
- package/dist/node_modules/iconv-lite/lib/streams.js +105 -0
- package/dist/node_modules/iconv-lite/package.json +70 -0
- package/dist/node_modules/ip-address/LICENSE +19 -0
- package/dist/node_modules/ip-address/dist/address-error.js +12 -0
- package/dist/node_modules/ip-address/dist/common.js +46 -0
- package/dist/node_modules/ip-address/dist/ip-address.js +35 -0
- package/dist/node_modules/ip-address/dist/ipv4.js +360 -0
- package/dist/node_modules/ip-address/dist/ipv6.js +1003 -0
- package/dist/node_modules/ip-address/dist/v4/constants.js +8 -0
- package/dist/node_modules/ip-address/dist/v6/constants.js +76 -0
- package/dist/node_modules/ip-address/dist/v6/helpers.js +45 -0
- package/dist/node_modules/ip-address/dist/v6/regular-expressions.js +95 -0
- package/dist/node_modules/ip-address/package.json +78 -0
- package/dist/node_modules/isexe/dist/commonjs/index.js +56 -0
- package/dist/node_modules/isexe/dist/commonjs/index.min.js +2 -0
- package/dist/node_modules/isexe/dist/commonjs/options.js +3 -0
- package/dist/node_modules/isexe/dist/commonjs/package.json +3 -0
- package/dist/node_modules/isexe/dist/commonjs/posix.js +67 -0
- package/dist/node_modules/isexe/dist/commonjs/win32.js +63 -0
- package/dist/node_modules/isexe/dist/esm/index.js +16 -0
- package/dist/node_modules/isexe/dist/esm/index.min.js +2 -0
- package/dist/node_modules/isexe/dist/esm/options.js +2 -0
- package/dist/node_modules/isexe/dist/esm/package.json +3 -0
- package/dist/node_modules/isexe/dist/esm/posix.js +62 -0
- package/dist/node_modules/isexe/dist/esm/win32.js +58 -0
- package/dist/node_modules/isexe/package.json +78 -0
- package/dist/node_modules/lru-cache/dist/commonjs/index.js +1595 -0
- package/dist/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
- package/dist/node_modules/lru-cache/dist/commonjs/package.json +3 -0
- package/dist/node_modules/lru-cache/dist/esm/index.js +1591 -0
- package/dist/node_modules/lru-cache/dist/esm/index.min.js +2 -0
- package/dist/node_modules/lru-cache/dist/esm/package.json +3 -0
- package/dist/node_modules/lru-cache/package.json +93 -0
- package/dist/node_modules/make-fetch-happen/LICENSE +16 -0
- package/dist/node_modules/make-fetch-happen/lib/cache/entry.js +471 -0
- package/dist/node_modules/make-fetch-happen/lib/cache/errors.js +11 -0
- package/dist/node_modules/make-fetch-happen/lib/cache/index.js +49 -0
- package/dist/node_modules/make-fetch-happen/lib/cache/key.js +17 -0
- package/dist/node_modules/make-fetch-happen/lib/cache/policy.js +161 -0
- package/dist/node_modules/make-fetch-happen/lib/fetch.js +118 -0
- package/dist/node_modules/make-fetch-happen/lib/index.js +41 -0
- package/dist/node_modules/make-fetch-happen/lib/options.js +59 -0
- package/dist/node_modules/make-fetch-happen/lib/pipeline.js +41 -0
- package/dist/node_modules/make-fetch-happen/lib/remote.js +134 -0
- package/dist/node_modules/make-fetch-happen/package.json +75 -0
- package/dist/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- package/dist/node_modules/minimatch/dist/commonjs/ast.js +846 -0
- package/dist/node_modules/minimatch/dist/commonjs/brace-expressions.js +150 -0
- package/dist/node_modules/minimatch/dist/commonjs/escape.js +30 -0
- package/dist/node_modules/minimatch/dist/commonjs/index.js +1121 -0
- package/dist/node_modules/minimatch/dist/commonjs/package.json +3 -0
- package/dist/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
- package/dist/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
- package/dist/node_modules/minimatch/dist/esm/ast.js +842 -0
- package/dist/node_modules/minimatch/dist/esm/brace-expressions.js +146 -0
- package/dist/node_modules/minimatch/dist/esm/escape.js +26 -0
- package/dist/node_modules/minimatch/dist/esm/index.js +1108 -0
- package/dist/node_modules/minimatch/dist/esm/package.json +3 -0
- package/dist/node_modules/minimatch/dist/esm/unescape.js +34 -0
- package/dist/node_modules/minimatch/package.json +67 -0
- package/dist/node_modules/minipass/dist/commonjs/index.js +1038 -0
- package/dist/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/dist/node_modules/minipass/dist/esm/index.js +1020 -0
- package/dist/node_modules/minipass/dist/esm/package.json +3 -0
- package/dist/node_modules/minipass/package.json +77 -0
- package/dist/node_modules/minipass-collect/LICENSE +15 -0
- package/dist/node_modules/minipass-collect/index.js +71 -0
- package/dist/node_modules/minipass-collect/package.json +30 -0
- package/dist/node_modules/minipass-fetch/LICENSE +28 -0
- package/dist/node_modules/minipass-fetch/lib/abort-error.js +17 -0
- package/dist/node_modules/minipass-fetch/lib/blob.js +97 -0
- package/dist/node_modules/minipass-fetch/lib/body.js +360 -0
- package/dist/node_modules/minipass-fetch/lib/fetch-error.js +32 -0
- package/dist/node_modules/minipass-fetch/lib/headers.js +267 -0
- package/dist/node_modules/minipass-fetch/lib/index.js +376 -0
- package/dist/node_modules/minipass-fetch/lib/request.js +282 -0
- package/dist/node_modules/minipass-fetch/lib/response.js +90 -0
- package/dist/node_modules/minipass-fetch/package.json +70 -0
- package/dist/node_modules/minipass-flush/LICENSE +15 -0
- package/dist/node_modules/minipass-flush/index.js +39 -0
- package/dist/node_modules/minipass-flush/node_modules/minipass/LICENSE +15 -0
- package/dist/node_modules/minipass-flush/node_modules/minipass/index.js +649 -0
- package/dist/node_modules/minipass-flush/node_modules/minipass/package.json +56 -0
- package/dist/node_modules/minipass-flush/package.json +39 -0
- package/dist/node_modules/minipass-pipeline/LICENSE +15 -0
- package/dist/node_modules/minipass-pipeline/index.js +128 -0
- package/dist/node_modules/minipass-pipeline/node_modules/minipass/LICENSE +15 -0
- package/dist/node_modules/minipass-pipeline/node_modules/minipass/index.js +649 -0
- package/dist/node_modules/minipass-pipeline/node_modules/minipass/package.json +56 -0
- package/dist/node_modules/minipass-pipeline/package.json +29 -0
- package/dist/node_modules/minipass-sized/LICENSE +15 -0
- package/dist/node_modules/minipass-sized/dist/commonjs/index.js +69 -0
- package/dist/node_modules/minipass-sized/dist/commonjs/package.json +3 -0
- package/dist/node_modules/minipass-sized/dist/esm/index.js +64 -0
- package/dist/node_modules/minipass-sized/dist/esm/package.json +3 -0
- package/dist/node_modules/minipass-sized/package.json +69 -0
- package/dist/node_modules/minizlib/LICENSE +26 -0
- package/dist/node_modules/minizlib/dist/commonjs/constants.js +123 -0
- package/dist/node_modules/minizlib/dist/commonjs/index.js +416 -0
- package/dist/node_modules/minizlib/dist/commonjs/package.json +3 -0
- package/dist/node_modules/minizlib/dist/esm/constants.js +117 -0
- package/dist/node_modules/minizlib/dist/esm/index.js +363 -0
- package/dist/node_modules/minizlib/dist/esm/package.json +3 -0
- package/dist/node_modules/minizlib/package.json +80 -0
- package/dist/node_modules/ms/index.js +162 -0
- package/dist/node_modules/ms/package.json +38 -0
- package/dist/node_modules/negotiator/LICENSE +24 -0
- package/dist/node_modules/negotiator/index.js +83 -0
- package/dist/node_modules/negotiator/lib/charset.js +169 -0
- package/dist/node_modules/negotiator/lib/encoding.js +205 -0
- package/dist/node_modules/negotiator/lib/language.js +179 -0
- package/dist/node_modules/negotiator/lib/mediaType.js +294 -0
- package/dist/node_modules/negotiator/package.json +43 -0
- package/dist/node_modules/node-gyp/.release-please-manifest.json +3 -0
- package/dist/node_modules/node-gyp/LICENSE +24 -0
- package/dist/node_modules/node-gyp/addon.gypi +204 -0
- package/dist/node_modules/node-gyp/bin/node-gyp.js +145 -0
- package/dist/node_modules/node-gyp/eslint.config.js +3 -0
- package/dist/node_modules/node-gyp/gyp/.release-please-manifest.json +3 -0
- package/dist/node_modules/node-gyp/gyp/LICENSE +28 -0
- package/dist/node_modules/node-gyp/gyp/data/ninja/build.ninja +4 -0
- package/dist/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc +12 -0
- package/dist/node_modules/node-gyp/gyp/gyp +8 -0
- package/dist/node_modules/node-gyp/gyp/gyp.bat +5 -0
- package/dist/node_modules/node-gyp/gyp/gyp_main.py +45 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +365 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +206 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +1283 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +1545 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +59 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +152 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +270 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +599 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +707 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/common.py +725 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +186 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +170 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +113 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +55 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py +0 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +805 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +1169 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +1316 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py +128 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +104 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +461 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +88 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +55 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +2755 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +3970 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +44 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +2956 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +67 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +1389 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +26 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/input.py +3097 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +99 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +765 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +1255 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +174 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py +61 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +371 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +1936 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation_test.py +54 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py +301 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +3180 -0
- package/dist/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +64 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/LICENSE +3 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.APACHE +177 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.BSD +23 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/__init__.py +15 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py +107 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py +252 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py +83 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/_parser.py +359 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/_structures.py +61 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py +192 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/markers.py +251 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/metadata.py +824 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/py.typed +0 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/requirements.py +90 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py +1030 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/tags.py +553 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/utils.py +172 -0
- package/dist/node_modules/node-gyp/gyp/pylib/packaging/version.py +563 -0
- package/dist/node_modules/node-gyp/gyp/pyproject.toml +114 -0
- package/dist/node_modules/node-gyp/gyp/release-please-config.json +11 -0
- package/dist/node_modules/node-gyp/gyp/test_gyp.py +260 -0
- package/dist/node_modules/node-gyp/lib/Find-VisualStudio.cs +250 -0
- package/dist/node_modules/node-gyp/lib/build.js +230 -0
- package/dist/node_modules/node-gyp/lib/clean.js +15 -0
- package/dist/node_modules/node-gyp/lib/configure.js +328 -0
- package/dist/node_modules/node-gyp/lib/create-config-gypi.js +153 -0
- package/dist/node_modules/node-gyp/lib/download.js +39 -0
- package/dist/node_modules/node-gyp/lib/find-node-directory.js +63 -0
- package/dist/node_modules/node-gyp/lib/find-python.js +304 -0
- package/dist/node_modules/node-gyp/lib/find-visualstudio.js +606 -0
- package/dist/node_modules/node-gyp/lib/install.js +411 -0
- package/dist/node_modules/node-gyp/lib/list.js +26 -0
- package/dist/node_modules/node-gyp/lib/log.js +168 -0
- package/dist/node_modules/node-gyp/lib/node-gyp.js +199 -0
- package/dist/node_modules/node-gyp/lib/process-release.js +146 -0
- package/dist/node_modules/node-gyp/lib/rebuild.js +12 -0
- package/dist/node_modules/node-gyp/lib/remove.js +43 -0
- package/dist/node_modules/node-gyp/lib/util.js +81 -0
- package/dist/node_modules/node-gyp/macOS_Catalina_acid_test.sh +21 -0
- package/dist/node_modules/node-gyp/package.json +52 -0
- package/dist/node_modules/node-gyp/release-please-config.json +40 -0
- package/dist/node_modules/node-gyp/src/win_delay_load_hook.cc +41 -0
- package/dist/node_modules/nopt/LICENSE +15 -0
- package/dist/node_modules/nopt/bin/nopt.js +29 -0
- package/dist/node_modules/nopt/lib/debug.js +5 -0
- package/dist/node_modules/nopt/lib/nopt-lib.js +514 -0
- package/dist/node_modules/nopt/lib/nopt.js +34 -0
- package/dist/node_modules/nopt/lib/type-defs.js +91 -0
- package/dist/node_modules/nopt/package.json +52 -0
- package/dist/node_modules/p-map/index.js +283 -0
- package/dist/node_modules/p-map/license +9 -0
- package/dist/node_modules/p-map/package.json +57 -0
- package/dist/node_modules/path-scurry/dist/commonjs/index.js +2018 -0
- package/dist/node_modules/path-scurry/dist/commonjs/package.json +3 -0
- package/dist/node_modules/path-scurry/dist/esm/index.js +1983 -0
- package/dist/node_modules/path-scurry/dist/esm/package.json +3 -0
- package/dist/node_modules/path-scurry/package.json +72 -0
- package/dist/node_modules/picomatch/LICENSE +21 -0
- package/dist/node_modules/picomatch/index.js +17 -0
- package/dist/node_modules/picomatch/lib/constants.js +184 -0
- package/dist/node_modules/picomatch/lib/parse.js +1386 -0
- package/dist/node_modules/picomatch/lib/picomatch.js +349 -0
- package/dist/node_modules/picomatch/lib/scan.js +391 -0
- package/dist/node_modules/picomatch/lib/utils.js +72 -0
- package/dist/node_modules/picomatch/package.json +82 -0
- package/dist/node_modules/picomatch/posix.js +3 -0
- package/dist/node_modules/proc-log/LICENSE +15 -0
- package/dist/node_modules/proc-log/lib/index.js +158 -0
- package/dist/node_modules/proc-log/package.json +46 -0
- package/dist/node_modules/safer-buffer/LICENSE +21 -0
- package/dist/node_modules/safer-buffer/dangerous.js +58 -0
- package/dist/node_modules/safer-buffer/package.json +34 -0
- package/dist/node_modules/safer-buffer/safer.js +77 -0
- package/dist/node_modules/safer-buffer/tests.js +406 -0
- package/dist/node_modules/semver/LICENSE +15 -0
- package/dist/node_modules/semver/bin/semver.js +191 -0
- package/dist/node_modules/semver/classes/comparator.js +143 -0
- package/dist/node_modules/semver/classes/index.js +7 -0
- package/dist/node_modules/semver/classes/range.js +557 -0
- package/dist/node_modules/semver/classes/semver.js +333 -0
- package/dist/node_modules/semver/functions/clean.js +8 -0
- package/dist/node_modules/semver/functions/cmp.js +54 -0
- package/dist/node_modules/semver/functions/coerce.js +62 -0
- package/dist/node_modules/semver/functions/compare-build.js +9 -0
- package/dist/node_modules/semver/functions/compare-loose.js +5 -0
- package/dist/node_modules/semver/functions/compare.js +7 -0
- package/dist/node_modules/semver/functions/diff.js +60 -0
- package/dist/node_modules/semver/functions/eq.js +5 -0
- package/dist/node_modules/semver/functions/gt.js +5 -0
- package/dist/node_modules/semver/functions/gte.js +5 -0
- package/dist/node_modules/semver/functions/inc.js +21 -0
- package/dist/node_modules/semver/functions/lt.js +5 -0
- package/dist/node_modules/semver/functions/lte.js +5 -0
- package/dist/node_modules/semver/functions/major.js +5 -0
- package/dist/node_modules/semver/functions/minor.js +5 -0
- package/dist/node_modules/semver/functions/neq.js +5 -0
- package/dist/node_modules/semver/functions/parse.js +18 -0
- package/dist/node_modules/semver/functions/patch.js +5 -0
- package/dist/node_modules/semver/functions/prerelease.js +8 -0
- package/dist/node_modules/semver/functions/rcompare.js +5 -0
- package/dist/node_modules/semver/functions/rsort.js +5 -0
- package/dist/node_modules/semver/functions/satisfies.js +12 -0
- package/dist/node_modules/semver/functions/sort.js +5 -0
- package/dist/node_modules/semver/functions/valid.js +8 -0
- package/dist/node_modules/semver/index.js +91 -0
- package/dist/node_modules/semver/internal/constants.js +37 -0
- package/dist/node_modules/semver/internal/debug.js +11 -0
- package/dist/node_modules/semver/internal/identifiers.js +29 -0
- package/dist/node_modules/semver/internal/lrucache.js +42 -0
- package/dist/node_modules/semver/internal/parse-options.js +17 -0
- package/dist/node_modules/semver/internal/re.js +223 -0
- package/dist/node_modules/semver/package.json +78 -0
- package/dist/node_modules/semver/preload.js +4 -0
- package/dist/node_modules/semver/range.bnf +16 -0
- package/dist/node_modules/semver/ranges/gtr.js +6 -0
- package/dist/node_modules/semver/ranges/intersects.js +9 -0
- package/dist/node_modules/semver/ranges/ltr.js +6 -0
- package/dist/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/dist/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/dist/node_modules/semver/ranges/min-version.js +63 -0
- package/dist/node_modules/semver/ranges/outside.js +82 -0
- package/dist/node_modules/semver/ranges/simplify.js +49 -0
- package/dist/node_modules/semver/ranges/subset.js +249 -0
- package/dist/node_modules/semver/ranges/to-comparators.js +10 -0
- package/dist/node_modules/semver/ranges/valid.js +13 -0
- package/dist/node_modules/smart-buffer/.prettierrc.yaml +5 -0
- package/dist/node_modules/smart-buffer/LICENSE +20 -0
- package/dist/node_modules/smart-buffer/build/smartbuffer.js +1233 -0
- package/dist/node_modules/smart-buffer/build/utils.js +108 -0
- package/dist/node_modules/smart-buffer/package.json +79 -0
- package/dist/node_modules/socks/.eslintrc.cjs +11 -0
- package/dist/node_modules/socks/.prettierrc.yaml +7 -0
- package/dist/node_modules/socks/LICENSE +20 -0
- package/dist/node_modules/socks/build/client/socksclient.js +793 -0
- package/dist/node_modules/socks/build/common/constants.js +108 -0
- package/dist/node_modules/socks/build/common/helpers.js +167 -0
- package/dist/node_modules/socks/build/common/receivebuffer.js +43 -0
- package/dist/node_modules/socks/build/common/util.js +25 -0
- package/dist/node_modules/socks/build/index.js +18 -0
- package/dist/node_modules/socks/package.json +58 -0
- package/dist/node_modules/socks-proxy-agent/LICENSE +22 -0
- package/dist/node_modules/socks-proxy-agent/dist/index.js +195 -0
- package/dist/node_modules/socks-proxy-agent/package.json +142 -0
- package/dist/node_modules/ssri/lib/index.js +550 -0
- package/dist/node_modules/ssri/package.json +66 -0
- package/dist/node_modules/tar/dist/commonjs/create.js +82 -0
- package/dist/node_modules/tar/dist/commonjs/cwd-error.js +18 -0
- package/dist/node_modules/tar/dist/commonjs/extract.js +88 -0
- package/dist/node_modules/tar/dist/commonjs/get-write-flag.js +32 -0
- package/dist/node_modules/tar/dist/commonjs/header.js +312 -0
- package/dist/node_modules/tar/dist/commonjs/index.js +64 -0
- package/dist/node_modules/tar/dist/commonjs/index.min.js +4 -0
- package/dist/node_modules/tar/dist/commonjs/large-numbers.js +99 -0
- package/dist/node_modules/tar/dist/commonjs/list.js +145 -0
- package/dist/node_modules/tar/dist/commonjs/make-command.js +52 -0
- package/dist/node_modules/tar/dist/commonjs/mkdir.js +187 -0
- package/dist/node_modules/tar/dist/commonjs/mode-fix.js +29 -0
- package/dist/node_modules/tar/dist/commonjs/normalize-unicode.js +38 -0
- package/dist/node_modules/tar/dist/commonjs/normalize-windows-path.js +12 -0
- package/dist/node_modules/tar/dist/commonjs/options.js +66 -0
- package/dist/node_modules/tar/dist/commonjs/pack.js +511 -0
- package/dist/node_modules/tar/dist/commonjs/package.json +3 -0
- package/dist/node_modules/tar/dist/commonjs/parse.js +610 -0
- package/dist/node_modules/tar/dist/commonjs/path-reservations.js +170 -0
- package/dist/node_modules/tar/dist/commonjs/pax.js +158 -0
- package/dist/node_modules/tar/dist/commonjs/process-umask.js +7 -0
- package/dist/node_modules/tar/dist/commonjs/read-entry.js +136 -0
- package/dist/node_modules/tar/dist/commonjs/replace.js +227 -0
- package/dist/node_modules/tar/dist/commonjs/strip-absolute-path.js +29 -0
- package/dist/node_modules/tar/dist/commonjs/strip-trailing-slashes.js +18 -0
- package/dist/node_modules/tar/dist/commonjs/symlink-error.js +19 -0
- package/dist/node_modules/tar/dist/commonjs/types.js +50 -0
- package/dist/node_modules/tar/dist/commonjs/unpack.js +932 -0
- package/dist/node_modules/tar/dist/commonjs/update.js +33 -0
- package/dist/node_modules/tar/dist/commonjs/warn-method.js +31 -0
- package/dist/node_modules/tar/dist/commonjs/winchars.js +14 -0
- package/dist/node_modules/tar/dist/commonjs/write-entry.js +698 -0
- package/dist/node_modules/tar/dist/esm/create.js +76 -0
- package/dist/node_modules/tar/dist/esm/cwd-error.js +14 -0
- package/dist/node_modules/tar/dist/esm/extract.js +49 -0
- package/dist/node_modules/tar/dist/esm/get-write-flag.js +26 -0
- package/dist/node_modules/tar/dist/esm/header.js +275 -0
- package/dist/node_modules/tar/dist/esm/index.js +20 -0
- package/dist/node_modules/tar/dist/esm/index.min.js +4 -0
- package/dist/node_modules/tar/dist/esm/large-numbers.js +94 -0
- package/dist/node_modules/tar/dist/esm/list.js +105 -0
- package/dist/node_modules/tar/dist/esm/make-command.js +48 -0
- package/dist/node_modules/tar/dist/esm/mkdir.js +179 -0
- package/dist/node_modules/tar/dist/esm/mode-fix.js +25 -0
- package/dist/node_modules/tar/dist/esm/normalize-unicode.js +34 -0
- package/dist/node_modules/tar/dist/esm/normalize-windows-path.js +9 -0
- package/dist/node_modules/tar/dist/esm/options.js +54 -0
- package/dist/node_modules/tar/dist/esm/pack.js +469 -0
- package/dist/node_modules/tar/dist/esm/package.json +3 -0
- package/dist/node_modules/tar/dist/esm/parse.js +606 -0
- package/dist/node_modules/tar/dist/esm/path-reservations.js +166 -0
- package/dist/node_modules/tar/dist/esm/pax.js +154 -0
- package/dist/node_modules/tar/dist/esm/process-umask.js +3 -0
- package/dist/node_modules/tar/dist/esm/read-entry.js +132 -0
- package/dist/node_modules/tar/dist/esm/replace.js +221 -0
- package/dist/node_modules/tar/dist/esm/strip-absolute-path.js +25 -0
- package/dist/node_modules/tar/dist/esm/strip-trailing-slashes.js +14 -0
- package/dist/node_modules/tar/dist/esm/symlink-error.js +15 -0
- package/dist/node_modules/tar/dist/esm/types.js +45 -0
- package/dist/node_modules/tar/dist/esm/unpack.js +891 -0
- package/dist/node_modules/tar/dist/esm/update.js +30 -0
- package/dist/node_modules/tar/dist/esm/warn-method.js +27 -0
- package/dist/node_modules/tar/dist/esm/winchars.js +9 -0
- package/dist/node_modules/tar/dist/esm/write-entry.js +656 -0
- package/dist/node_modules/tar/node_modules/yallist/dist/commonjs/index.js +384 -0
- package/dist/node_modules/tar/node_modules/yallist/dist/commonjs/package.json +3 -0
- package/dist/node_modules/tar/node_modules/yallist/dist/esm/index.js +379 -0
- package/dist/node_modules/tar/node_modules/yallist/dist/esm/package.json +3 -0
- package/dist/node_modules/tar/node_modules/yallist/package.json +68 -0
- package/dist/node_modules/tar/package.json +297 -0
- package/dist/node_modules/tinyglobby/LICENSE +21 -0
- package/dist/node_modules/tinyglobby/dist/index.cjs +350 -0
- package/dist/node_modules/tinyglobby/dist/index.d.cts +147 -0
- package/dist/node_modules/tinyglobby/dist/index.d.mts +147 -0
- package/dist/node_modules/tinyglobby/dist/index.mjs +318 -0
- package/dist/node_modules/tinyglobby/package.json +73 -0
- package/{LICENSE → dist/node_modules/v8-compile-cache/LICENSE} +1 -2
- package/dist/node_modules/v8-compile-cache/package.json +34 -0
- package/dist/node_modules/v8-compile-cache/v8-compile-cache.js +373 -0
- package/dist/node_modules/which/LICENSE +15 -0
- package/dist/node_modules/which/bin/which.js +52 -0
- package/dist/node_modules/which/lib/index.js +111 -0
- package/dist/node_modules/which/package.json +52 -0
- package/dist/node_modules/yallist/LICENSE +15 -0
- package/dist/node_modules/yallist/iterator.js +8 -0
- package/dist/node_modules/yallist/package.json +29 -0
- package/dist/node_modules/yallist/yallist.js +426 -0
- package/dist/pnpm.mjs +266382 -0
- package/dist/pnpmrc +2 -0
- package/dist/templates/completion.bash +31 -0
- package/dist/templates/completion.fish +22 -0
- package/dist/templates/completion.ps1 +193 -0
- package/dist/templates/completion.zsh +27 -0
- package/dist/vendor/fastlist-0.3.0-x64.exe +0 -0
- package/dist/vendor/fastlist-0.3.0-x86.exe +0 -0
- package/dist/worker.js +10958 -0
- package/package.json +34 -11
- package/pn +2 -0
- package/pn.cmd +2 -0
- package/pn.ps1 +1 -0
- package/pnpx +2 -0
- package/pnpx.cmd +2 -0
- package/pnpx.ps1 +1 -0
- package/pnx +2 -0
- package/pnx.cmd +2 -0
- package/pnx.ps1 +1 -0
- package/prepare.js +26 -3
- package/setup.js +22 -11
- package/CHANGELOG.md +0 -15
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* negotiator
|
|
3
|
+
* Copyright(c) 2012 Isaac Z. Schlueter
|
|
4
|
+
* Copyright(c) 2014 Federico Romero
|
|
5
|
+
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
6
|
+
* MIT Licensed
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
'use strict';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Module exports.
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
module.exports = preferredMediaTypes;
|
|
17
|
+
module.exports.preferredMediaTypes = preferredMediaTypes;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Module variables.
|
|
21
|
+
* @private
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
var simpleMediaTypeRegExp = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Parse the Accept header.
|
|
28
|
+
* @private
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
function parseAccept(accept) {
|
|
32
|
+
var accepts = splitMediaTypes(accept);
|
|
33
|
+
|
|
34
|
+
for (var i = 0, j = 0; i < accepts.length; i++) {
|
|
35
|
+
var mediaType = parseMediaType(accepts[i].trim(), i);
|
|
36
|
+
|
|
37
|
+
if (mediaType) {
|
|
38
|
+
accepts[j++] = mediaType;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// trim accepts
|
|
43
|
+
accepts.length = j;
|
|
44
|
+
|
|
45
|
+
return accepts;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Parse a media type from the Accept header.
|
|
50
|
+
* @private
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
function parseMediaType(str, i) {
|
|
54
|
+
var match = simpleMediaTypeRegExp.exec(str);
|
|
55
|
+
if (!match) return null;
|
|
56
|
+
|
|
57
|
+
var params = Object.create(null);
|
|
58
|
+
var q = 1;
|
|
59
|
+
var subtype = match[2];
|
|
60
|
+
var type = match[1];
|
|
61
|
+
|
|
62
|
+
if (match[3]) {
|
|
63
|
+
var kvps = splitParameters(match[3]).map(splitKeyValuePair);
|
|
64
|
+
|
|
65
|
+
for (var j = 0; j < kvps.length; j++) {
|
|
66
|
+
var pair = kvps[j];
|
|
67
|
+
var key = pair[0].toLowerCase();
|
|
68
|
+
var val = pair[1];
|
|
69
|
+
|
|
70
|
+
// get the value, unwrapping quotes
|
|
71
|
+
var value = val && val[0] === '"' && val[val.length - 1] === '"'
|
|
72
|
+
? val.slice(1, -1)
|
|
73
|
+
: val;
|
|
74
|
+
|
|
75
|
+
if (key === 'q') {
|
|
76
|
+
q = parseFloat(value);
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// store parameter
|
|
81
|
+
params[key] = value;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
type: type,
|
|
87
|
+
subtype: subtype,
|
|
88
|
+
params: params,
|
|
89
|
+
q: q,
|
|
90
|
+
i: i
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Get the priority of a media type.
|
|
96
|
+
* @private
|
|
97
|
+
*/
|
|
98
|
+
|
|
99
|
+
function getMediaTypePriority(type, accepted, index) {
|
|
100
|
+
var priority = {o: -1, q: 0, s: 0};
|
|
101
|
+
|
|
102
|
+
for (var i = 0; i < accepted.length; i++) {
|
|
103
|
+
var spec = specify(type, accepted[i], index);
|
|
104
|
+
|
|
105
|
+
if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
|
|
106
|
+
priority = spec;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return priority;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Get the specificity of the media type.
|
|
115
|
+
* @private
|
|
116
|
+
*/
|
|
117
|
+
|
|
118
|
+
function specify(type, spec, index) {
|
|
119
|
+
var p = parseMediaType(type);
|
|
120
|
+
var s = 0;
|
|
121
|
+
|
|
122
|
+
if (!p) {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if(spec.type.toLowerCase() == p.type.toLowerCase()) {
|
|
127
|
+
s |= 4
|
|
128
|
+
} else if(spec.type != '*') {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if(spec.subtype.toLowerCase() == p.subtype.toLowerCase()) {
|
|
133
|
+
s |= 2
|
|
134
|
+
} else if(spec.subtype != '*') {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
var keys = Object.keys(spec.params);
|
|
139
|
+
if (keys.length > 0) {
|
|
140
|
+
if (keys.every(function (k) {
|
|
141
|
+
return spec.params[k] == '*' || (spec.params[k] || '').toLowerCase() == (p.params[k] || '').toLowerCase();
|
|
142
|
+
})) {
|
|
143
|
+
s |= 1
|
|
144
|
+
} else {
|
|
145
|
+
return null
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return {
|
|
150
|
+
i: index,
|
|
151
|
+
o: spec.i,
|
|
152
|
+
q: spec.q,
|
|
153
|
+
s: s,
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Get the preferred media types from an Accept header.
|
|
159
|
+
* @public
|
|
160
|
+
*/
|
|
161
|
+
|
|
162
|
+
function preferredMediaTypes(accept, provided) {
|
|
163
|
+
// RFC 2616 sec 14.2: no header = */*
|
|
164
|
+
var accepts = parseAccept(accept === undefined ? '*/*' : accept || '');
|
|
165
|
+
|
|
166
|
+
if (!provided) {
|
|
167
|
+
// sorted list of all types
|
|
168
|
+
return accepts
|
|
169
|
+
.filter(isQuality)
|
|
170
|
+
.sort(compareSpecs)
|
|
171
|
+
.map(getFullType);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
var priorities = provided.map(function getPriority(type, index) {
|
|
175
|
+
return getMediaTypePriority(type, accepts, index);
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
// sorted list of accepted types
|
|
179
|
+
return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) {
|
|
180
|
+
return provided[priorities.indexOf(priority)];
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Compare two specs.
|
|
186
|
+
* @private
|
|
187
|
+
*/
|
|
188
|
+
|
|
189
|
+
function compareSpecs(a, b) {
|
|
190
|
+
return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Get full type string.
|
|
195
|
+
* @private
|
|
196
|
+
*/
|
|
197
|
+
|
|
198
|
+
function getFullType(spec) {
|
|
199
|
+
return spec.type + '/' + spec.subtype;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Check if a spec has any quality.
|
|
204
|
+
* @private
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
function isQuality(spec) {
|
|
208
|
+
return spec.q > 0;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Count the number of quotes in a string.
|
|
213
|
+
* @private
|
|
214
|
+
*/
|
|
215
|
+
|
|
216
|
+
function quoteCount(string) {
|
|
217
|
+
var count = 0;
|
|
218
|
+
var index = 0;
|
|
219
|
+
|
|
220
|
+
while ((index = string.indexOf('"', index)) !== -1) {
|
|
221
|
+
count++;
|
|
222
|
+
index++;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
return count;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Split a key value pair.
|
|
230
|
+
* @private
|
|
231
|
+
*/
|
|
232
|
+
|
|
233
|
+
function splitKeyValuePair(str) {
|
|
234
|
+
var index = str.indexOf('=');
|
|
235
|
+
var key;
|
|
236
|
+
var val;
|
|
237
|
+
|
|
238
|
+
if (index === -1) {
|
|
239
|
+
key = str;
|
|
240
|
+
} else {
|
|
241
|
+
key = str.slice(0, index);
|
|
242
|
+
val = str.slice(index + 1);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
return [key, val];
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Split an Accept header into media types.
|
|
250
|
+
* @private
|
|
251
|
+
*/
|
|
252
|
+
|
|
253
|
+
function splitMediaTypes(accept) {
|
|
254
|
+
var accepts = accept.split(',');
|
|
255
|
+
|
|
256
|
+
for (var i = 1, j = 0; i < accepts.length; i++) {
|
|
257
|
+
if (quoteCount(accepts[j]) % 2 == 0) {
|
|
258
|
+
accepts[++j] = accepts[i];
|
|
259
|
+
} else {
|
|
260
|
+
accepts[j] += ',' + accepts[i];
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// trim accepts
|
|
265
|
+
accepts.length = j + 1;
|
|
266
|
+
|
|
267
|
+
return accepts;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Split a string of parameters.
|
|
272
|
+
* @private
|
|
273
|
+
*/
|
|
274
|
+
|
|
275
|
+
function splitParameters(str) {
|
|
276
|
+
var parameters = str.split(';');
|
|
277
|
+
|
|
278
|
+
for (var i = 1, j = 0; i < parameters.length; i++) {
|
|
279
|
+
if (quoteCount(parameters[j]) % 2 == 0) {
|
|
280
|
+
parameters[++j] = parameters[i];
|
|
281
|
+
} else {
|
|
282
|
+
parameters[j] += ';' + parameters[i];
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// trim parameters
|
|
287
|
+
parameters.length = j + 1;
|
|
288
|
+
|
|
289
|
+
for (var i = 0; i < parameters.length; i++) {
|
|
290
|
+
parameters[i] = parameters[i].trim();
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
return parameters;
|
|
294
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "negotiator",
|
|
3
|
+
"description": "HTTP content negotiation",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"contributors": [
|
|
6
|
+
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
7
|
+
"Federico Romero <federico.romero@outboxlabs.com>",
|
|
8
|
+
"Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)"
|
|
9
|
+
],
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"http",
|
|
13
|
+
"content negotiation",
|
|
14
|
+
"accept",
|
|
15
|
+
"accept-language",
|
|
16
|
+
"accept-encoding",
|
|
17
|
+
"accept-charset"
|
|
18
|
+
],
|
|
19
|
+
"repository": "jshttp/negotiator",
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"eslint": "7.32.0",
|
|
22
|
+
"eslint-plugin-markdown": "2.2.1",
|
|
23
|
+
"mocha": "9.1.3",
|
|
24
|
+
"nyc": "15.1.0"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"lib/",
|
|
28
|
+
"HISTORY.md",
|
|
29
|
+
"LICENSE",
|
|
30
|
+
"index.js",
|
|
31
|
+
"README.md"
|
|
32
|
+
],
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">= 0.6"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"lint": "eslint .",
|
|
38
|
+
"test": "mocha --reporter spec --check-leaks --bail test/",
|
|
39
|
+
"test:debug": "mocha --reporter spec --check-leaks --inspect --inspect-brk test/",
|
|
40
|
+
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
41
|
+
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person
|
|
6
|
+
obtaining a copy of this software and associated documentation
|
|
7
|
+
files (the "Software"), to deal in the Software without
|
|
8
|
+
restriction, including without limitation the rights to use,
|
|
9
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the
|
|
11
|
+
Software is furnished to do so, subject to the following
|
|
12
|
+
conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be
|
|
15
|
+
included in all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
18
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
19
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
20
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
21
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
22
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
23
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
24
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
{
|
|
2
|
+
'variables' : {
|
|
3
|
+
'node_engine_include_dir%': 'deps/v8/include',
|
|
4
|
+
'node_host_binary%': 'node',
|
|
5
|
+
'node_with_ltcg%': 'true',
|
|
6
|
+
},
|
|
7
|
+
'target_defaults': {
|
|
8
|
+
'type': 'loadable_module',
|
|
9
|
+
'win_delay_load_hook': 'true',
|
|
10
|
+
'product_prefix': '',
|
|
11
|
+
|
|
12
|
+
'conditions': [
|
|
13
|
+
[ 'node_engine=="chakracore"', {
|
|
14
|
+
'variables': {
|
|
15
|
+
'node_engine_include_dir%': 'deps/chakrashim/include'
|
|
16
|
+
},
|
|
17
|
+
}]
|
|
18
|
+
],
|
|
19
|
+
|
|
20
|
+
'include_dirs': [
|
|
21
|
+
'<(node_root_dir)/include/node',
|
|
22
|
+
'<(node_root_dir)/src',
|
|
23
|
+
'<(node_root_dir)/deps/openssl/config',
|
|
24
|
+
'<(node_root_dir)/deps/openssl/openssl/include',
|
|
25
|
+
'<(node_root_dir)/deps/uv/include',
|
|
26
|
+
'<(node_root_dir)/deps/zlib',
|
|
27
|
+
'<(node_root_dir)/<(node_engine_include_dir)'
|
|
28
|
+
],
|
|
29
|
+
'defines!': [
|
|
30
|
+
'BUILDING_UV_SHARED=1', # Inherited from common.gypi.
|
|
31
|
+
'BUILDING_V8_SHARED=1', # Inherited from common.gypi.
|
|
32
|
+
],
|
|
33
|
+
'defines': [
|
|
34
|
+
'NODE_GYP_MODULE_NAME=>(_target_name)',
|
|
35
|
+
'USING_UV_SHARED=1',
|
|
36
|
+
'USING_V8_SHARED=1',
|
|
37
|
+
# Warn when using deprecated V8 APIs.
|
|
38
|
+
'V8_DEPRECATION_WARNINGS=1'
|
|
39
|
+
],
|
|
40
|
+
|
|
41
|
+
'target_conditions': [
|
|
42
|
+
['_type=="loadable_module"', {
|
|
43
|
+
'product_extension': 'node',
|
|
44
|
+
'defines': [
|
|
45
|
+
'BUILDING_NODE_EXTENSION'
|
|
46
|
+
],
|
|
47
|
+
'xcode_settings': {
|
|
48
|
+
'OTHER_LDFLAGS': [
|
|
49
|
+
'-undefined dynamic_lookup'
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
}],
|
|
53
|
+
|
|
54
|
+
['_type=="static_library"', {
|
|
55
|
+
# set to `1` to *disable* the -T thin archive 'ld' flag.
|
|
56
|
+
# older linkers don't support this flag.
|
|
57
|
+
'standalone_static_library': '<(standalone_static_library)'
|
|
58
|
+
}],
|
|
59
|
+
|
|
60
|
+
['_type!="executable"', {
|
|
61
|
+
'conditions': [
|
|
62
|
+
[ 'OS=="android"', {
|
|
63
|
+
'cflags!': [ '-fPIE' ],
|
|
64
|
+
}]
|
|
65
|
+
]
|
|
66
|
+
}],
|
|
67
|
+
|
|
68
|
+
['_win_delay_load_hook=="true"', {
|
|
69
|
+
# If the addon specifies `'win_delay_load_hook': 'true'` in its
|
|
70
|
+
# binding.gyp, link a delay-load hook into the DLL. This hook ensures
|
|
71
|
+
# that the addon will work regardless of whether the node/iojs binary
|
|
72
|
+
# is named node.exe, iojs.exe, or something else.
|
|
73
|
+
'conditions': [
|
|
74
|
+
[ 'OS=="win"', {
|
|
75
|
+
'defines': [ 'HOST_BINARY=\"<(node_host_binary)<(EXECUTABLE_SUFFIX)\"', ],
|
|
76
|
+
'sources': [
|
|
77
|
+
'<(node_gyp_dir)/src/win_delay_load_hook.cc',
|
|
78
|
+
],
|
|
79
|
+
'msvs_settings': {
|
|
80
|
+
'VCLinkerTool': {
|
|
81
|
+
'DelayLoadDLLs': [ '<(node_host_binary)<(EXECUTABLE_SUFFIX)' ],
|
|
82
|
+
# Don't print a linker warning when no imports from either .exe
|
|
83
|
+
# are used.
|
|
84
|
+
'AdditionalOptions': [ '/ignore:4199' ],
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
}],
|
|
88
|
+
],
|
|
89
|
+
}],
|
|
90
|
+
],
|
|
91
|
+
|
|
92
|
+
'conditions': [
|
|
93
|
+
[ 'OS=="mac"', {
|
|
94
|
+
'defines': [
|
|
95
|
+
'_DARWIN_USE_64_BIT_INODE=1'
|
|
96
|
+
],
|
|
97
|
+
'xcode_settings': {
|
|
98
|
+
'DYLIB_INSTALL_NAME_BASE': '@rpath'
|
|
99
|
+
},
|
|
100
|
+
}],
|
|
101
|
+
[ 'OS=="aix"', {
|
|
102
|
+
'ldflags': [
|
|
103
|
+
'-Wl,-bimport:<(node_exp_file)'
|
|
104
|
+
],
|
|
105
|
+
}],
|
|
106
|
+
[ 'OS=="os400"', {
|
|
107
|
+
'ldflags': [
|
|
108
|
+
'-Wl,-bimport:<(node_exp_file)'
|
|
109
|
+
],
|
|
110
|
+
}],
|
|
111
|
+
[ 'OS=="zos"', {
|
|
112
|
+
'conditions': [
|
|
113
|
+
[ '"<!(echo $CC)" != "clang" and \
|
|
114
|
+
"<!(echo $CC)" != "ibm-clang64" and \
|
|
115
|
+
"<!(echo $CC)" != "ibm-clang"', {
|
|
116
|
+
'cflags': [
|
|
117
|
+
'-q64',
|
|
118
|
+
'-Wc,DLL',
|
|
119
|
+
'-qlonglong',
|
|
120
|
+
'-qenum=int',
|
|
121
|
+
'-qxclang=-fexec-charset=ISO8859-1'
|
|
122
|
+
],
|
|
123
|
+
'ldflags': [
|
|
124
|
+
'-q64',
|
|
125
|
+
'<(node_exp_file)',
|
|
126
|
+
],
|
|
127
|
+
}, {
|
|
128
|
+
'cflags': [
|
|
129
|
+
'-m64',
|
|
130
|
+
],
|
|
131
|
+
'ldflags': [
|
|
132
|
+
'-m64',
|
|
133
|
+
'<(node_exp_file)',
|
|
134
|
+
],
|
|
135
|
+
}],
|
|
136
|
+
],
|
|
137
|
+
'defines': [
|
|
138
|
+
'_ALL_SOURCE',
|
|
139
|
+
'MAP_FAILED=-1',
|
|
140
|
+
'_UNIX03_SOURCE',
|
|
141
|
+
],
|
|
142
|
+
}],
|
|
143
|
+
[ 'OS=="win"', {
|
|
144
|
+
'conditions': [
|
|
145
|
+
['node_engine=="chakracore"', {
|
|
146
|
+
'library_dirs': [ '<(node_root_dir)/$(ConfigurationName)' ],
|
|
147
|
+
'libraries': [ '<@(node_engine_libs)' ],
|
|
148
|
+
}],
|
|
149
|
+
['node_with_ltcg=="true"', {
|
|
150
|
+
'msvs_settings': {
|
|
151
|
+
'VCCLCompilerTool': {
|
|
152
|
+
'WholeProgramOptimization': 'true' # /GL, whole program optimization, needed for LTCG
|
|
153
|
+
},
|
|
154
|
+
'VCLibrarianTool': {
|
|
155
|
+
'AdditionalOptions': [
|
|
156
|
+
'/LTCG:INCREMENTAL', # incremental link-time code generation
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
'VCLinkerTool': {
|
|
160
|
+
'OptimizeReferences': 2, # /OPT:REF
|
|
161
|
+
'EnableCOMDATFolding': 2, # /OPT:ICF
|
|
162
|
+
'LinkIncremental': 1, # disable incremental linking
|
|
163
|
+
'AdditionalOptions': [
|
|
164
|
+
'/LTCG:INCREMENTAL', # incremental link-time code generation
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}]
|
|
169
|
+
],
|
|
170
|
+
'libraries': [
|
|
171
|
+
'-lkernel32.lib',
|
|
172
|
+
'-luser32.lib',
|
|
173
|
+
'-lgdi32.lib',
|
|
174
|
+
'-lwinspool.lib',
|
|
175
|
+
'-lcomdlg32.lib',
|
|
176
|
+
'-ladvapi32.lib',
|
|
177
|
+
'-lshell32.lib',
|
|
178
|
+
'-lole32.lib',
|
|
179
|
+
'-loleaut32.lib',
|
|
180
|
+
'-luuid.lib',
|
|
181
|
+
'-lodbc32.lib',
|
|
182
|
+
'-ldelayimp.lib',
|
|
183
|
+
'-l"<(node_lib_file)"'
|
|
184
|
+
],
|
|
185
|
+
'msvs_disabled_warnings': [
|
|
186
|
+
# warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent<T>'
|
|
187
|
+
# needs to have dll-interface to be used by
|
|
188
|
+
# clients of class 'node::ObjectWrap'
|
|
189
|
+
4251
|
|
190
|
+
],
|
|
191
|
+
}, {
|
|
192
|
+
# OS!="win"
|
|
193
|
+
'defines': [
|
|
194
|
+
'_LARGEFILE_SOURCE',
|
|
195
|
+
'_FILE_OFFSET_BITS=64'
|
|
196
|
+
],
|
|
197
|
+
}],
|
|
198
|
+
[ 'OS in "freebsd openbsd netbsd solaris android openharmony" or \
|
|
199
|
+
(OS=="linux" and target_arch!="ia32")', {
|
|
200
|
+
'cflags': [ '-fPIC' ],
|
|
201
|
+
}],
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
'use strict'
|
|
4
|
+
|
|
5
|
+
process.title = 'node-gyp'
|
|
6
|
+
|
|
7
|
+
const envPaths = require('env-paths')
|
|
8
|
+
const gyp = require('../')
|
|
9
|
+
const log = require('../lib/log')
|
|
10
|
+
const os = require('os')
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Process and execute the selected commands.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const prog = gyp()
|
|
17
|
+
let completed = false
|
|
18
|
+
prog.parseArgv(process.argv)
|
|
19
|
+
prog.devDir = prog.opts.devdir
|
|
20
|
+
|
|
21
|
+
const homeDir = os.homedir()
|
|
22
|
+
if (prog.devDir) {
|
|
23
|
+
prog.devDir = prog.devDir.replace(/^~/, homeDir)
|
|
24
|
+
} else if (homeDir) {
|
|
25
|
+
prog.devDir = envPaths('node-gyp', { suffix: '' }).cache
|
|
26
|
+
} else {
|
|
27
|
+
throw new Error(
|
|
28
|
+
"node-gyp requires that the user's home directory is specified " +
|
|
29
|
+
'in either of the environmental variables HOME or USERPROFILE. ' +
|
|
30
|
+
'Overide with: --devdir /path/to/.node-gyp')
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (prog.todo.length === 0) {
|
|
34
|
+
if (~process.argv.indexOf('-v') || ~process.argv.indexOf('--version')) {
|
|
35
|
+
log.stdout('v%s', prog.version)
|
|
36
|
+
} else {
|
|
37
|
+
log.stdout('%s', prog.usage())
|
|
38
|
+
}
|
|
39
|
+
process.exit(0)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
log.info('it worked if it ends with', 'ok')
|
|
43
|
+
log.verbose('cli', process.argv)
|
|
44
|
+
log.info('using', 'node-gyp@%s', prog.version)
|
|
45
|
+
log.info('using', 'node@%s | %s | %s', process.versions.node, process.platform, process.arch)
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Change dir if -C/--directory was passed.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
const dir = prog.opts.directory
|
|
52
|
+
if (dir) {
|
|
53
|
+
const fs = require('fs')
|
|
54
|
+
try {
|
|
55
|
+
const stat = fs.statSync(dir)
|
|
56
|
+
if (stat.isDirectory()) {
|
|
57
|
+
log.info('chdir', dir)
|
|
58
|
+
process.chdir(dir)
|
|
59
|
+
} else {
|
|
60
|
+
log.warn('chdir', dir + ' is not a directory')
|
|
61
|
+
}
|
|
62
|
+
} catch (e) {
|
|
63
|
+
if (e.code === 'ENOENT') {
|
|
64
|
+
log.warn('chdir', dir + ' is not a directory')
|
|
65
|
+
} else {
|
|
66
|
+
log.warn('chdir', 'error during chdir() "%s"', e.message)
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async function run () {
|
|
72
|
+
const command = prog.todo.shift()
|
|
73
|
+
if (!command) {
|
|
74
|
+
// done!
|
|
75
|
+
completed = true
|
|
76
|
+
log.info('ok')
|
|
77
|
+
return
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
try {
|
|
81
|
+
const args = await prog.commands[command.name](command.args) ?? []
|
|
82
|
+
|
|
83
|
+
if (command.name === 'list') {
|
|
84
|
+
if (args.length) {
|
|
85
|
+
args.forEach((version) => log.stdout(version))
|
|
86
|
+
} else {
|
|
87
|
+
log.stdout('No node development files installed. Use `node-gyp install` to install a version.')
|
|
88
|
+
}
|
|
89
|
+
} else if (args.length >= 1) {
|
|
90
|
+
log.stdout(...args.slice(1))
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// now run the next command in the queue
|
|
94
|
+
return run()
|
|
95
|
+
} catch (err) {
|
|
96
|
+
log.error(command.name + ' error')
|
|
97
|
+
log.error('stack', err.stack)
|
|
98
|
+
errorMessage()
|
|
99
|
+
log.error('not ok')
|
|
100
|
+
return process.exit(1)
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
process.on('exit', function (code) {
|
|
105
|
+
if (!completed && !code) {
|
|
106
|
+
log.error('Completion callback never invoked!')
|
|
107
|
+
issueMessage()
|
|
108
|
+
process.exit(6)
|
|
109
|
+
}
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
process.on('uncaughtException', function (err) {
|
|
113
|
+
log.error('UNCAUGHT EXCEPTION')
|
|
114
|
+
log.error('stack', err.stack)
|
|
115
|
+
issueMessage()
|
|
116
|
+
process.exit(7)
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
function errorMessage () {
|
|
120
|
+
// copied from npm's lib/utils/error-handler.js
|
|
121
|
+
const os = require('os')
|
|
122
|
+
log.error('System', os.type() + ' ' + os.release())
|
|
123
|
+
log.error('command', process.argv
|
|
124
|
+
.map(JSON.stringify).join(' '))
|
|
125
|
+
log.error('cwd', process.cwd())
|
|
126
|
+
log.error('node -v', process.version)
|
|
127
|
+
log.error('node-gyp -v', 'v' + prog.package.version)
|
|
128
|
+
// print the npm package version
|
|
129
|
+
for (const env of ['npm_package_name', 'npm_package_version']) {
|
|
130
|
+
const value = process.env[env]
|
|
131
|
+
if (value != null) {
|
|
132
|
+
log.error(`$${env}`, value)
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function issueMessage () {
|
|
138
|
+
errorMessage()
|
|
139
|
+
log.error('', ['Node-gyp failed to build your package.',
|
|
140
|
+
'Try to update npm and/or node-gyp and if it does not help file an issue with the package author.'
|
|
141
|
+
].join('\n'))
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// start running the given commands!
|
|
145
|
+
run()
|