groove-dev 0.27.93 → 0.27.96
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/CLAUDE.md +7 -0
- package/README.md +25 -52
- package/moe-training/package.json +2 -1
- package/node_modules/@groove-dev/cli/package.json +1 -1
- package/node_modules/@groove-dev/daemon/package.json +1 -1
- package/node_modules/@groove-dev/daemon/src/api.js +39 -23
- package/node_modules/@groove-dev/daemon/src/introducer.js +21 -6
- package/node_modules/@groove-dev/daemon/src/process.js +20 -2
- package/node_modules/@groove-dev/daemon/src/providers/gemini.js +27 -28
- package/node_modules/@groove-dev/gui/dist/assets/{index-VB4_k5Pz.js → index-BgTyFy4f.js} +331 -331
- package/node_modules/@groove-dev/gui/dist/assets/{index-Bo6AeNmM.css → index-QADLyUj5.css} +1 -1
- package/node_modules/@groove-dev/gui/dist/index.html +2 -2
- package/node_modules/@groove-dev/gui/package.json +1 -1
- package/node_modules/@groove-dev/gui/src/components/agents/agent-file-tree.jsx +68 -16
- package/node_modules/@groove-dev/gui/src/components/agents/agent-panel.jsx +2 -0
- package/node_modules/@groove-dev/gui/src/components/agents/code-review.jsx +9 -1
- package/node_modules/@groove-dev/gui/src/components/agents/workspace-mode.jsx +2 -2
- package/node_modules/@groove-dev/gui/src/components/editor/code-editor.jsx +1 -1
- package/node_modules/@groove-dev/gui/src/stores/groove.js +40 -26
- package/node_modules/@groove-dev/gui/src/views/agents.jsx +14 -65
- package/node_modules/base64-js/LICENSE +21 -0
- package/node_modules/base64-js/README.md +34 -0
- package/node_modules/base64-js/base64js.min.js +1 -0
- package/node_modules/base64-js/index.d.ts +3 -0
- package/node_modules/base64-js/index.js +150 -0
- package/node_modules/base64-js/package.json +47 -0
- package/node_modules/better-sqlite3/LICENSE +21 -0
- package/node_modules/better-sqlite3/README.md +99 -0
- package/node_modules/better-sqlite3/binding.gyp +38 -0
- package/node_modules/better-sqlite3/deps/common.gypi +68 -0
- package/node_modules/better-sqlite3/deps/copy.js +31 -0
- package/node_modules/better-sqlite3/deps/defines.gypi +41 -0
- package/node_modules/better-sqlite3/deps/download.sh +122 -0
- package/node_modules/better-sqlite3/deps/patches/1208.patch +15 -0
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.c +268845 -0
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.h +14335 -0
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3ext.h +739 -0
- package/node_modules/better-sqlite3/deps/sqlite3.gyp +80 -0
- package/node_modules/better-sqlite3/deps/test_extension.c +21 -0
- package/node_modules/better-sqlite3/lib/database.js +90 -0
- package/node_modules/better-sqlite3/lib/index.js +3 -0
- package/node_modules/better-sqlite3/lib/methods/aggregate.js +43 -0
- package/node_modules/better-sqlite3/lib/methods/backup.js +67 -0
- package/node_modules/better-sqlite3/lib/methods/function.js +31 -0
- package/node_modules/better-sqlite3/lib/methods/inspect.js +7 -0
- package/node_modules/better-sqlite3/lib/methods/pragma.js +12 -0
- package/node_modules/better-sqlite3/lib/methods/serialize.js +16 -0
- package/node_modules/better-sqlite3/lib/methods/table.js +189 -0
- package/node_modules/better-sqlite3/lib/methods/transaction.js +78 -0
- package/node_modules/better-sqlite3/lib/methods/wrappers.js +54 -0
- package/node_modules/better-sqlite3/lib/sqlite-error.js +20 -0
- package/node_modules/better-sqlite3/lib/util.js +12 -0
- package/node_modules/better-sqlite3/package.json +59 -0
- package/node_modules/better-sqlite3/src/addon.cpp +47 -0
- package/node_modules/better-sqlite3/src/better_sqlite3.cpp +74 -0
- package/node_modules/better-sqlite3/src/objects/backup.cpp +120 -0
- package/node_modules/better-sqlite3/src/objects/backup.hpp +36 -0
- package/node_modules/better-sqlite3/src/objects/database.cpp +417 -0
- package/node_modules/better-sqlite3/src/objects/database.hpp +103 -0
- package/node_modules/better-sqlite3/src/objects/statement-iterator.cpp +113 -0
- package/node_modules/better-sqlite3/src/objects/statement-iterator.hpp +50 -0
- package/node_modules/better-sqlite3/src/objects/statement.cpp +383 -0
- package/node_modules/better-sqlite3/src/objects/statement.hpp +58 -0
- package/node_modules/better-sqlite3/src/util/bind-map.cpp +73 -0
- package/node_modules/better-sqlite3/src/util/binder.cpp +193 -0
- package/node_modules/better-sqlite3/src/util/constants.cpp +172 -0
- package/node_modules/better-sqlite3/src/util/custom-aggregate.cpp +121 -0
- package/node_modules/better-sqlite3/src/util/custom-function.cpp +59 -0
- package/node_modules/better-sqlite3/src/util/custom-table.cpp +409 -0
- package/node_modules/better-sqlite3/src/util/data-converter.cpp +17 -0
- package/node_modules/better-sqlite3/src/util/data.cpp +194 -0
- package/node_modules/better-sqlite3/src/util/helpers.cpp +109 -0
- package/node_modules/better-sqlite3/src/util/macros.cpp +83 -0
- package/node_modules/better-sqlite3/src/util/query-macros.cpp +71 -0
- package/node_modules/better-sqlite3/src/util/row-builder.cpp +49 -0
- package/node_modules/bindings/LICENSE.md +22 -0
- package/node_modules/bindings/README.md +98 -0
- package/node_modules/bindings/bindings.js +221 -0
- package/node_modules/bindings/package.json +28 -0
- package/node_modules/bl/.travis.yml +17 -0
- package/node_modules/bl/BufferList.js +396 -0
- package/node_modules/bl/LICENSE.md +13 -0
- package/node_modules/bl/README.md +247 -0
- package/node_modules/bl/bl.js +84 -0
- package/node_modules/bl/package.json +37 -0
- package/node_modules/bl/test/convert.js +21 -0
- package/node_modules/bl/test/indexOf.js +492 -0
- package/node_modules/bl/test/isBufferList.js +32 -0
- package/node_modules/bl/test/test.js +869 -0
- package/node_modules/buffer/AUTHORS.md +70 -0
- package/node_modules/buffer/LICENSE +21 -0
- package/node_modules/buffer/README.md +410 -0
- package/node_modules/buffer/index.d.ts +186 -0
- package/node_modules/buffer/index.js +1817 -0
- package/node_modules/buffer/package.json +96 -0
- package/node_modules/decompress-response/index.d.ts +22 -0
- package/node_modules/decompress-response/index.js +58 -0
- package/node_modules/decompress-response/license +9 -0
- package/node_modules/decompress-response/node_modules/mimic-response/index.d.ts +17 -0
- package/node_modules/decompress-response/node_modules/mimic-response/index.js +77 -0
- package/node_modules/decompress-response/node_modules/mimic-response/license +9 -0
- package/node_modules/decompress-response/node_modules/mimic-response/package.json +42 -0
- package/node_modules/decompress-response/node_modules/mimic-response/readme.md +78 -0
- package/node_modules/decompress-response/package.json +56 -0
- package/node_modules/decompress-response/readme.md +48 -0
- package/node_modules/deep-extend/LICENSE +20 -0
- package/node_modules/deep-extend/README.md +91 -0
- package/node_modules/deep-extend/index.js +1 -0
- package/node_modules/deep-extend/lib/deep-extend.js +150 -0
- package/node_modules/deep-extend/package.json +62 -0
- package/node_modules/end-of-stream/LICENSE +21 -0
- package/node_modules/end-of-stream/README.md +54 -0
- package/node_modules/end-of-stream/index.js +96 -0
- package/node_modules/end-of-stream/package.json +37 -0
- package/node_modules/expand-template/.travis.yml +6 -0
- package/node_modules/expand-template/LICENSE +21 -0
- package/node_modules/expand-template/README.md +43 -0
- package/node_modules/expand-template/index.js +26 -0
- package/node_modules/expand-template/package.json +29 -0
- package/node_modules/expand-template/test.js +67 -0
- package/node_modules/file-uri-to-path/.npmignore +1 -0
- package/node_modules/file-uri-to-path/.travis.yml +30 -0
- package/node_modules/file-uri-to-path/History.md +21 -0
- package/node_modules/file-uri-to-path/LICENSE +20 -0
- package/node_modules/file-uri-to-path/README.md +74 -0
- package/node_modules/file-uri-to-path/index.d.ts +2 -0
- package/node_modules/file-uri-to-path/index.js +66 -0
- package/node_modules/file-uri-to-path/package.json +32 -0
- package/node_modules/file-uri-to-path/test/test.js +24 -0
- package/node_modules/file-uri-to-path/test/tests.json +13 -0
- package/node_modules/fs-constants/LICENSE +21 -0
- package/node_modules/fs-constants/README.md +26 -0
- package/node_modules/fs-constants/browser.js +1 -0
- package/node_modules/fs-constants/index.js +1 -0
- package/node_modules/fs-constants/package.json +19 -0
- package/node_modules/github-from-package/.travis.yml +4 -0
- package/node_modules/github-from-package/LICENSE +18 -0
- package/node_modules/github-from-package/example/package.json +8 -0
- package/node_modules/github-from-package/example/url.js +3 -0
- package/node_modules/github-from-package/index.js +17 -0
- package/node_modules/github-from-package/package.json +30 -0
- package/node_modules/github-from-package/readme.markdown +53 -0
- package/node_modules/github-from-package/test/a.json +8 -0
- package/node_modules/github-from-package/test/b.json +5 -0
- package/node_modules/github-from-package/test/c.json +5 -0
- package/node_modules/github-from-package/test/d.json +7 -0
- package/node_modules/github-from-package/test/e.json +5 -0
- package/node_modules/github-from-package/test/url.js +19 -0
- package/node_modules/ieee754/LICENSE +11 -0
- package/node_modules/ieee754/README.md +51 -0
- package/node_modules/ieee754/index.d.ts +10 -0
- package/node_modules/ieee754/index.js +85 -0
- package/node_modules/ieee754/package.json +52 -0
- package/node_modules/ini/LICENSE +15 -0
- package/node_modules/ini/README.md +102 -0
- package/node_modules/ini/ini.js +206 -0
- package/node_modules/ini/package.json +33 -0
- package/node_modules/minimist/.eslintrc +29 -0
- package/node_modules/minimist/.github/FUNDING.yml +12 -0
- package/node_modules/minimist/.nycrc +14 -0
- package/node_modules/minimist/CHANGELOG.md +298 -0
- package/node_modules/minimist/LICENSE +18 -0
- package/node_modules/minimist/README.md +121 -0
- package/node_modules/minimist/example/parse.js +4 -0
- package/node_modules/minimist/index.js +263 -0
- package/node_modules/minimist/package.json +75 -0
- package/node_modules/minimist/test/all_bool.js +34 -0
- package/node_modules/minimist/test/bool.js +177 -0
- package/node_modules/minimist/test/dash.js +43 -0
- package/node_modules/minimist/test/default_bool.js +37 -0
- package/node_modules/minimist/test/dotted.js +24 -0
- package/node_modules/minimist/test/kv_short.js +32 -0
- package/node_modules/minimist/test/long.js +33 -0
- package/node_modules/minimist/test/num.js +38 -0
- package/node_modules/minimist/test/parse.js +209 -0
- package/node_modules/minimist/test/parse_modified.js +11 -0
- package/node_modules/minimist/test/proto.js +64 -0
- package/node_modules/minimist/test/short.js +69 -0
- package/node_modules/minimist/test/stop_early.js +17 -0
- package/node_modules/minimist/test/unknown.js +104 -0
- package/node_modules/minimist/test/whitespace.js +10 -0
- package/node_modules/mkdirp-classic/LICENSE +21 -0
- package/node_modules/mkdirp-classic/README.md +18 -0
- package/node_modules/mkdirp-classic/index.js +98 -0
- package/node_modules/mkdirp-classic/package.json +18 -0
- package/node_modules/moe-training/DEPLOY_CENTRAL_COMMAND.md +413 -0
- package/node_modules/moe-training/client/consent.js +96 -0
- package/node_modules/moe-training/client/envelope-builder.js +56 -0
- package/node_modules/moe-training/client/index.js +10 -0
- package/node_modules/moe-training/client/parsers/claude-code.js +108 -0
- package/node_modules/moe-training/client/parsers/codex.js +80 -0
- package/node_modules/moe-training/client/parsers/gemini.js +80 -0
- package/node_modules/moe-training/client/parsers/grok.js +16 -0
- package/node_modules/moe-training/client/parsers/index.js +20 -0
- package/node_modules/moe-training/client/scrubber.js +128 -0
- package/node_modules/moe-training/client/session-attestation.js +115 -0
- package/node_modules/moe-training/client/step-classifier.js +68 -0
- package/node_modules/moe-training/client/trajectory-capture.js +307 -0
- package/node_modules/moe-training/client/transmission-queue.js +104 -0
- package/node_modules/moe-training/package.json +21 -0
- package/node_modules/moe-training/server/enrichment.js +24 -0
- package/node_modules/moe-training/server/index.js +119 -0
- package/node_modules/moe-training/server/ledger.js +110 -0
- package/node_modules/moe-training/server/routes/ingest.js +96 -0
- package/node_modules/moe-training/server/routes/sessions.js +43 -0
- package/node_modules/moe-training/server/routes/stats.js +31 -0
- package/node_modules/moe-training/server/scoring.js +63 -0
- package/node_modules/moe-training/server/session-registry.js +156 -0
- package/node_modules/moe-training/server/stats.js +129 -0
- package/node_modules/moe-training/server/stitcher.js +69 -0
- package/node_modules/moe-training/server/storage.js +147 -0
- package/node_modules/moe-training/server/verifier.js +102 -0
- package/node_modules/moe-training/shared/constants.js +30 -0
- package/node_modules/moe-training/shared/crypto.js +45 -0
- package/node_modules/moe-training/shared/envelope-schema.js +220 -0
- package/node_modules/moe-training/test/client/consent.test.js +121 -0
- package/node_modules/moe-training/test/client/envelope-builder.test.js +107 -0
- package/node_modules/moe-training/test/client/parsers/claude-code.test.js +119 -0
- package/node_modules/moe-training/test/client/parsers/codex.test.js +83 -0
- package/node_modules/moe-training/test/client/parsers/gemini.test.js +99 -0
- package/node_modules/moe-training/test/client/scrubber.test.js +143 -0
- package/node_modules/moe-training/test/client/session-attestation-security.test.js +95 -0
- package/node_modules/moe-training/test/client/step-classifier.test.js +135 -0
- package/node_modules/moe-training/test/client/transmission-queue.test.js +33 -0
- package/node_modules/moe-training/test/integration/handshake.test.js +260 -0
- package/node_modules/moe-training/test/server/ingest-security.test.js +166 -0
- package/node_modules/moe-training/test/server/ledger.test.js +131 -0
- package/node_modules/moe-training/test/server/scoring.test.js +242 -0
- package/node_modules/moe-training/test/server/session-registry.test.js +125 -0
- package/node_modules/moe-training/test/server/stitcher.test.js +157 -0
- package/node_modules/moe-training/test/server/verifier.test.js +232 -0
- package/node_modules/moe-training/test/shared/crypto.test.js +87 -0
- package/node_modules/moe-training/test/shared/envelope-schema.test.js +351 -0
- package/node_modules/napi-build-utils/.github/workflows/run-npm-tests.yml +31 -0
- package/node_modules/napi-build-utils/LICENSE +21 -0
- package/node_modules/napi-build-utils/README.md +52 -0
- package/node_modules/napi-build-utils/index.js +214 -0
- package/node_modules/napi-build-utils/index.md +0 -0
- package/node_modules/napi-build-utils/package.json +42 -0
- package/node_modules/prebuild-install/CHANGELOG.md +131 -0
- package/node_modules/prebuild-install/CONTRIBUTING.md +6 -0
- package/node_modules/prebuild-install/LICENSE +21 -0
- package/node_modules/prebuild-install/README.md +163 -0
- package/node_modules/prebuild-install/asset.js +44 -0
- package/node_modules/prebuild-install/bin.js +78 -0
- package/node_modules/prebuild-install/download.js +142 -0
- package/node_modules/prebuild-install/error.js +14 -0
- package/node_modules/prebuild-install/help.txt +16 -0
- package/node_modules/prebuild-install/index.js +1 -0
- package/node_modules/prebuild-install/log.js +33 -0
- package/node_modules/prebuild-install/node_modules/node-abi/LICENSE +21 -0
- package/node_modules/prebuild-install/node_modules/node-abi/README.md +54 -0
- package/node_modules/prebuild-install/node_modules/node-abi/abi_registry.json +439 -0
- package/node_modules/prebuild-install/node_modules/node-abi/index.js +179 -0
- package/node_modules/prebuild-install/node_modules/node-abi/package.json +45 -0
- package/node_modules/prebuild-install/node_modules/semver/LICENSE +15 -0
- package/node_modules/prebuild-install/node_modules/semver/README.md +665 -0
- package/node_modules/prebuild-install/node_modules/semver/bin/semver.js +191 -0
- package/node_modules/prebuild-install/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/prebuild-install/node_modules/semver/classes/index.js +7 -0
- package/node_modules/prebuild-install/node_modules/semver/classes/range.js +557 -0
- package/node_modules/prebuild-install/node_modules/semver/classes/semver.js +333 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/major.js +5 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/prebuild-install/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/prebuild-install/node_modules/semver/index.js +91 -0
- package/node_modules/prebuild-install/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/prebuild-install/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/prebuild-install/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/prebuild-install/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/prebuild-install/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/prebuild-install/node_modules/semver/internal/re.js +223 -0
- package/node_modules/prebuild-install/node_modules/semver/package.json +78 -0
- package/node_modules/prebuild-install/node_modules/semver/preload.js +4 -0
- package/node_modules/prebuild-install/node_modules/semver/range.bnf +16 -0
- package/node_modules/prebuild-install/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/prebuild-install/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/prebuild-install/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/prebuild-install/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/prebuild-install/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/prebuild-install/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/prebuild-install/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/prebuild-install/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/prebuild-install/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/prebuild-install/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/prebuild-install/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/prebuild-install/package.json +67 -0
- package/node_modules/prebuild-install/proxy.js +35 -0
- package/node_modules/prebuild-install/rc.js +64 -0
- package/node_modules/prebuild-install/util.js +143 -0
- package/node_modules/pump/.github/FUNDING.yml +2 -0
- package/node_modules/pump/.travis.yml +5 -0
- package/node_modules/pump/LICENSE +21 -0
- package/node_modules/pump/README.md +74 -0
- package/node_modules/pump/SECURITY.md +5 -0
- package/node_modules/pump/empty.js +1 -0
- package/node_modules/pump/index.js +86 -0
- package/node_modules/pump/package.json +30 -0
- package/node_modules/pump/test-browser.js +66 -0
- package/node_modules/pump/test-node.js +53 -0
- package/node_modules/rc/LICENSE.APACHE2 +15 -0
- package/node_modules/rc/LICENSE.BSD +26 -0
- package/node_modules/rc/LICENSE.MIT +24 -0
- package/node_modules/rc/README.md +227 -0
- package/node_modules/rc/browser.js +7 -0
- package/node_modules/rc/cli.js +4 -0
- package/node_modules/rc/index.js +53 -0
- package/node_modules/rc/lib/utils.js +104 -0
- package/node_modules/rc/package.json +29 -0
- package/node_modules/rc/test/ini.js +16 -0
- package/node_modules/rc/test/nested-env-vars.js +50 -0
- package/node_modules/rc/test/test.js +59 -0
- package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
- package/node_modules/readable-stream/GOVERNANCE.md +136 -0
- package/node_modules/readable-stream/LICENSE +47 -0
- package/node_modules/readable-stream/README.md +106 -0
- package/node_modules/readable-stream/errors-browser.js +127 -0
- package/node_modules/readable-stream/errors.js +116 -0
- package/node_modules/readable-stream/experimentalWarning.js +17 -0
- package/node_modules/readable-stream/lib/_stream_duplex.js +126 -0
- package/node_modules/readable-stream/lib/_stream_passthrough.js +37 -0
- package/node_modules/readable-stream/lib/_stream_readable.js +1027 -0
- package/node_modules/readable-stream/lib/_stream_transform.js +190 -0
- package/node_modules/readable-stream/lib/_stream_writable.js +641 -0
- package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +180 -0
- package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +183 -0
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +96 -0
- package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +86 -0
- package/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
- package/node_modules/readable-stream/lib/internal/streams/from.js +52 -0
- package/node_modules/readable-stream/lib/internal/streams/pipeline.js +86 -0
- package/node_modules/readable-stream/lib/internal/streams/state.js +22 -0
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/node_modules/readable-stream/package.json +68 -0
- package/node_modules/readable-stream/readable-browser.js +9 -0
- package/node_modules/readable-stream/readable.js +16 -0
- package/node_modules/simple-concat/.travis.yml +3 -0
- package/node_modules/simple-concat/LICENSE +20 -0
- package/node_modules/simple-concat/README.md +44 -0
- package/node_modules/simple-concat/index.js +15 -0
- package/node_modules/simple-concat/package.json +47 -0
- package/node_modules/simple-concat/test/basic.js +41 -0
- package/node_modules/simple-get/.github/dependabot.yml +15 -0
- package/node_modules/simple-get/.github/workflows/ci.yml +23 -0
- package/node_modules/simple-get/LICENSE +20 -0
- package/node_modules/simple-get/README.md +333 -0
- package/node_modules/simple-get/index.js +108 -0
- package/node_modules/simple-get/package.json +67 -0
- package/node_modules/string_decoder/LICENSE +48 -0
- package/node_modules/string_decoder/README.md +47 -0
- package/node_modules/string_decoder/lib/string_decoder.js +296 -0
- package/node_modules/string_decoder/package.json +34 -0
- package/node_modules/strip-json-comments/index.js +70 -0
- package/node_modules/strip-json-comments/license +21 -0
- package/node_modules/strip-json-comments/package.json +42 -0
- package/node_modules/strip-json-comments/readme.md +64 -0
- package/node_modules/tar-fs/.travis.yml +6 -0
- package/node_modules/tar-fs/LICENSE +21 -0
- package/node_modules/tar-fs/README.md +165 -0
- package/node_modules/tar-fs/index.js +363 -0
- package/node_modules/tar-fs/node_modules/chownr/LICENSE +15 -0
- package/node_modules/tar-fs/node_modules/chownr/README.md +3 -0
- package/node_modules/tar-fs/node_modules/chownr/chownr.js +167 -0
- package/node_modules/tar-fs/node_modules/chownr/package.json +29 -0
- package/node_modules/tar-fs/package.json +41 -0
- package/node_modules/tar-fs/test/fixtures/a/hello.txt +1 -0
- package/node_modules/tar-fs/test/fixtures/b/a/test.txt +1 -0
- package/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
- package/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
- package/node_modules/tar-fs/test/fixtures/e/file +0 -0
- package/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
- package/node_modules/tar-fs/test/index.js +346 -0
- package/node_modules/tar-stream/LICENSE +21 -0
- package/node_modules/tar-stream/README.md +168 -0
- package/node_modules/tar-stream/extract.js +257 -0
- package/node_modules/tar-stream/headers.js +295 -0
- package/node_modules/tar-stream/index.js +2 -0
- package/node_modules/tar-stream/pack.js +255 -0
- package/node_modules/tar-stream/package.json +58 -0
- package/node_modules/tar-stream/sandbox.js +11 -0
- package/node_modules/tunnel-agent/LICENSE +55 -0
- package/node_modules/tunnel-agent/README.md +4 -0
- package/node_modules/tunnel-agent/index.js +244 -0
- package/node_modules/tunnel-agent/package.json +22 -0
- package/node_modules/util-deprecate/History.md +16 -0
- package/node_modules/util-deprecate/LICENSE +24 -0
- package/node_modules/util-deprecate/README.md +53 -0
- package/node_modules/util-deprecate/browser.js +67 -0
- package/node_modules/util-deprecate/node.js +6 -0
- package/node_modules/util-deprecate/package.json +27 -0
- package/node_modules/uuid/CHANGELOG.md +274 -0
- package/node_modules/uuid/CONTRIBUTING.md +18 -0
- package/node_modules/uuid/LICENSE.md +9 -0
- package/node_modules/uuid/README.md +466 -0
- package/node_modules/uuid/dist/bin/uuid +2 -0
- package/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
- package/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
- package/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
- package/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
- package/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
- package/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
- package/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
- package/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
- package/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
- package/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
- package/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
- package/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
- package/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
- package/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
- package/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
- package/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
- package/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +215 -0
- package/node_modules/uuid/dist/esm-browser/native.js +4 -0
- package/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/node_modules/uuid/dist/esm-browser/rng.js +18 -0
- package/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/node_modules/uuid/dist/esm-browser/stringify.js +33 -0
- package/node_modules/uuid/dist/esm-browser/v1.js +95 -0
- package/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/node_modules/uuid/dist/esm-browser/v35.js +66 -0
- package/node_modules/uuid/dist/esm-browser/v4.js +29 -0
- package/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/node_modules/uuid/dist/esm-node/native.js +4 -0
- package/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/node_modules/uuid/dist/esm-node/stringify.js +33 -0
- package/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/node_modules/uuid/dist/esm-node/v35.js +66 -0
- package/node_modules/uuid/dist/esm-node/v4.js +29 -0
- package/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/node_modules/uuid/dist/index.js +79 -0
- package/node_modules/uuid/dist/md5-browser.js +223 -0
- package/node_modules/uuid/dist/md5.js +23 -0
- package/node_modules/uuid/dist/native-browser.js +11 -0
- package/node_modules/uuid/dist/native.js +15 -0
- package/node_modules/uuid/dist/nil.js +8 -0
- package/node_modules/uuid/dist/parse.js +45 -0
- package/node_modules/uuid/dist/regex.js +8 -0
- package/node_modules/uuid/dist/rng-browser.js +25 -0
- package/node_modules/uuid/dist/rng.js +24 -0
- package/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/node_modules/uuid/dist/sha1.js +23 -0
- package/node_modules/uuid/dist/stringify.js +44 -0
- package/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/node_modules/uuid/dist/v1.js +107 -0
- package/node_modules/uuid/dist/v3.js +16 -0
- package/node_modules/uuid/dist/v35.js +80 -0
- package/node_modules/uuid/dist/v4.js +43 -0
- package/node_modules/uuid/dist/v5.js +16 -0
- package/node_modules/uuid/dist/validate.js +17 -0
- package/node_modules/uuid/dist/version.js +21 -0
- package/node_modules/uuid/package.json +135 -0
- package/node_modules/uuid/wrapper.mjs +10 -0
- package/package.json +5 -3
- package/packages/cli/package.json +1 -1
- package/packages/daemon/package.json +1 -1
- package/packages/daemon/src/api.js +39 -23
- package/packages/daemon/src/introducer.js +21 -6
- package/packages/daemon/src/process.js +20 -2
- package/packages/daemon/src/providers/gemini.js +27 -28
- package/packages/gui/dist/assets/{index-VB4_k5Pz.js → index-BgTyFy4f.js} +331 -331
- package/packages/gui/dist/assets/{index-Bo6AeNmM.css → index-QADLyUj5.css} +1 -1
- package/packages/gui/dist/index.html +2 -2
- package/packages/gui/package.json +1 -1
- package/packages/gui/src/components/agents/agent-file-tree.jsx +68 -16
- package/packages/gui/src/components/agents/agent-panel.jsx +2 -0
- package/packages/gui/src/components/agents/code-review.jsx +9 -1
- package/packages/gui/src/components/agents/workspace-mode.jsx +2 -2
- package/packages/gui/src/components/editor/code-editor.jsx +1 -1
- package/packages/gui/src/stores/groove.js +40 -26
- package/packages/gui/src/views/agents.jsx +14 -65
- package/workspace.png +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 inspiredware
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# napi-build-utils
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/napi-build-utils)
|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
[](http://standardjs.com/)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
|
|
9
|
+
A set of utilities to assist developers of tools that build [Node-API](https://nodejs.org/api/n-api.html#n_api_n_api) native add-ons.
|
|
10
|
+
|
|
11
|
+
## Background
|
|
12
|
+
|
|
13
|
+
This module is targeted to developers creating tools that build Node-API native add-ons.
|
|
14
|
+
|
|
15
|
+
It implements a set of functions that aid in determining the Node-API version supported by the currently running Node instance and the set of Node-API versions against which the Node-API native add-on is designed to be built. Other functions determine whether a particular Node-API version can be built and can issue console warnings for unsupported Node-API versions.
|
|
16
|
+
|
|
17
|
+
Unlike the modules this code is designed to facilitate building, this module is written entirely in JavaScript.
|
|
18
|
+
|
|
19
|
+
## Quick start
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install napi-build-utils
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The module exports a set of functions documented [here](./index.md). For example:
|
|
26
|
+
|
|
27
|
+
```javascript
|
|
28
|
+
var napiBuildUtils = require('napi-build-utils');
|
|
29
|
+
var napiVersion = napiBuildUtils.getNapiVersion(); // Node-API version supported by Node, or undefined.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Declaring supported Node-API versions
|
|
33
|
+
|
|
34
|
+
Native modules that are designed to work with [Node-API](https://nodejs.org/api/n-api.html#n_api_n_api) must explicitly declare the Node-API version(s) against which they are coded to build. This is accomplished by including a `binary.napi_versions` property in the module's `package.json` file. For example:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
"binary": {
|
|
38
|
+
"napi_versions": [2,3]
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
In the absence of a need to compile against a specific Node-API version, the value `3` is a good choice as this is the Node-API version that was supported when Node-API left experimental status.
|
|
43
|
+
|
|
44
|
+
Modules that are built against a specific Node-API version will continue to operate indefinitely, even as later versions of Node-API are introduced.
|
|
45
|
+
|
|
46
|
+
## History
|
|
47
|
+
|
|
48
|
+
**v2.0.0** This version was introduced to address a limitation when the Node-API version reached `10` in NodeJS `v23.6.0`. There was no change in the API, but a SemVer bump to `2.0.0` was made out of an abundance of caution.
|
|
49
|
+
|
|
50
|
+
## Support
|
|
51
|
+
|
|
52
|
+
If you run into problems or limitations, please file an issue and we'll take a look. Pull requests are also welcome.
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
// Copyright (c) 2018 inspiredware
|
|
3
|
+
|
|
4
|
+
var path = require('path')
|
|
5
|
+
var pkg = require(path.resolve('package.json'))
|
|
6
|
+
|
|
7
|
+
var versionArray = process.version
|
|
8
|
+
.substr(1)
|
|
9
|
+
.replace(/-.*$/, '')
|
|
10
|
+
.split('.')
|
|
11
|
+
.map(function (item) {
|
|
12
|
+
return +item
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* A set of utilities to assist developers of tools that build
|
|
18
|
+
* [N-API](https://nodejs.org/api/n-api.html#n_api_n_api) native add-ons.
|
|
19
|
+
*
|
|
20
|
+
* The main repository can be found
|
|
21
|
+
* [here](https://github.com/inspiredware/napi-build-utils#napi-build-utils).
|
|
22
|
+
*
|
|
23
|
+
* @module napi-build-utils
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Implements a consistent name of `napi` for N-API runtimes.
|
|
28
|
+
*
|
|
29
|
+
* @param {string} runtime The runtime string.
|
|
30
|
+
* @returns {boolean}
|
|
31
|
+
*/
|
|
32
|
+
exports.isNapiRuntime = function (runtime) {
|
|
33
|
+
return runtime === 'napi'
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Determines whether the specified N-API version is supported
|
|
38
|
+
* by both the currently running Node instance and the package.
|
|
39
|
+
*
|
|
40
|
+
* @param {string} napiVersion The N-API version to check.
|
|
41
|
+
* @returns {boolean}
|
|
42
|
+
*/
|
|
43
|
+
exports.isSupportedVersion = function (napiVersion) {
|
|
44
|
+
var version = parseInt(napiVersion, 10)
|
|
45
|
+
return version <= exports.getNapiVersion() && exports.packageSupportsVersion(version)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Determines whether the specified N-API version is supported by the package.
|
|
50
|
+
* The N-API version must be present in the `package.json`
|
|
51
|
+
* `binary.napi_versions` array.
|
|
52
|
+
*
|
|
53
|
+
* @param {number} napiVersion The N-API version to check.
|
|
54
|
+
* @returns {boolean}
|
|
55
|
+
* @private
|
|
56
|
+
*/
|
|
57
|
+
exports.packageSupportsVersion = function (napiVersion) {
|
|
58
|
+
if (pkg.binary && pkg.binary.napi_versions &&
|
|
59
|
+
pkg.binary.napi_versions instanceof Array) { // integer array
|
|
60
|
+
for (var i = 0; i < pkg.binary.napi_versions.length; i++) {
|
|
61
|
+
if (pkg.binary.napi_versions[i] === napiVersion) return true
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
return false
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Issues a warning to the supplied log if the N-API version is not supported
|
|
69
|
+
* by the current Node instance or if the N-API version is not supported
|
|
70
|
+
* by the package.
|
|
71
|
+
*
|
|
72
|
+
* @param {string} napiVersion The N-API version to check.
|
|
73
|
+
* @param {Object} log The log object to which the warnings are to be issued.
|
|
74
|
+
* Must implement the `warn` method.
|
|
75
|
+
*/
|
|
76
|
+
exports.logUnsupportedVersion = function (napiVersion, log) {
|
|
77
|
+
if (!exports.isSupportedVersion(napiVersion)) {
|
|
78
|
+
if (exports.packageSupportsVersion(napiVersion)) {
|
|
79
|
+
log.warn('This Node instance does not support N-API version ' + napiVersion)
|
|
80
|
+
} else {
|
|
81
|
+
log.warn('This package does not support N-API version ' + napiVersion)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Issues warnings to the supplied log for those N-API versions not supported
|
|
88
|
+
* by the N-API runtime or the package.
|
|
89
|
+
*
|
|
90
|
+
* Note that this function is specific to the
|
|
91
|
+
* [`prebuild`](https://github.com/prebuild/prebuild#prebuild) package.
|
|
92
|
+
*
|
|
93
|
+
* `target` is the list of targets to be built and is determined in one of
|
|
94
|
+
* three ways from the command line arguments:
|
|
95
|
+
* (1) `--target` specifies a specific target to build.
|
|
96
|
+
* (2) `--all` specifies all N-API versions supported by the package.
|
|
97
|
+
* (3) Neither of these specifies to build the single "best version available."
|
|
98
|
+
*
|
|
99
|
+
* `prebuild` is an array of objects in the form `{runtime: 'napi', target: '2'}`.
|
|
100
|
+
* The array contains the list of N-API versions that are supported by both the
|
|
101
|
+
* package being built and the currently running Node instance.
|
|
102
|
+
*
|
|
103
|
+
* The objective of this function is to issue a warning for those items that appear
|
|
104
|
+
* in the `target` argument but not in the `prebuild` argument.
|
|
105
|
+
* If a specific target is supported by the package (`packageSupportsVersion`) but
|
|
106
|
+
* but note in `prebuild`, the assumption is that the target is not supported by
|
|
107
|
+
* Node.
|
|
108
|
+
*
|
|
109
|
+
* @param {(Array<string>|string)} target The N-API version(s) to check. Target is
|
|
110
|
+
* @param {Array<Object>} prebuild A config object created by the `prebuild` package.
|
|
111
|
+
* @param {Object} log The log object to which the warnings are to be issued.
|
|
112
|
+
* Must implement the `warn` method.
|
|
113
|
+
* @private
|
|
114
|
+
*/
|
|
115
|
+
exports.logMissingNapiVersions = function (target, prebuild, log) {
|
|
116
|
+
if (exports.getNapiBuildVersions()) {
|
|
117
|
+
var targets = [].concat(target)
|
|
118
|
+
targets.forEach(function (napiVersion) {
|
|
119
|
+
if (!prebuildExists(prebuild, napiVersion)) {
|
|
120
|
+
if (exports.packageSupportsVersion(parseInt(napiVersion, 10))) {
|
|
121
|
+
log.warn('This Node instance does not support N-API version ' + napiVersion)
|
|
122
|
+
} else {
|
|
123
|
+
log.warn('This package does not support N-API version ' + napiVersion)
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
})
|
|
127
|
+
} else {
|
|
128
|
+
log.error('Builds with runtime \'napi\' require a binary.napi_versions ' +
|
|
129
|
+
'property on the package.json file')
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Determines whether the specified N-API version exists in the prebuild
|
|
135
|
+
* configuration object.
|
|
136
|
+
*
|
|
137
|
+
* Note that this function is specific to the `prebuild` and `prebuild-install`
|
|
138
|
+
* packages.
|
|
139
|
+
*
|
|
140
|
+
* @param {Object} prebuild A config object created by the `prebuild` package.
|
|
141
|
+
* @param {string} napiVersion The N-APi version to be checked.
|
|
142
|
+
* @return {boolean}
|
|
143
|
+
* @private
|
|
144
|
+
*/
|
|
145
|
+
var prebuildExists = function (prebuild, napiVersion) {
|
|
146
|
+
if (prebuild) {
|
|
147
|
+
for (var i = 0; i < prebuild.length; i++) {
|
|
148
|
+
if (prebuild[i].target === napiVersion) return true
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return false
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Returns the best N-API version to build given the highest N-API
|
|
156
|
+
* version supported by the current Node instance and the N-API versions
|
|
157
|
+
* supported by the package, or undefined if a suitable N-API version
|
|
158
|
+
* cannot be determined.
|
|
159
|
+
*
|
|
160
|
+
* The best build version is the greatest N-API version supported by
|
|
161
|
+
* the package that is less than or equal to the highest N-API version
|
|
162
|
+
* supported by the current Node instance.
|
|
163
|
+
*
|
|
164
|
+
* @returns {number|undefined}
|
|
165
|
+
*/
|
|
166
|
+
exports.getBestNapiBuildVersion = function () {
|
|
167
|
+
var bestNapiBuildVersion = 0
|
|
168
|
+
var napiBuildVersions = exports.getNapiBuildVersions(pkg) // array of integer strings
|
|
169
|
+
if (napiBuildVersions) {
|
|
170
|
+
var ourNapiVersion = exports.getNapiVersion()
|
|
171
|
+
napiBuildVersions.forEach(function (napiBuildVersionStr) {
|
|
172
|
+
var napiBuildVersion = parseInt(napiBuildVersionStr, 10)
|
|
173
|
+
if (napiBuildVersion > bestNapiBuildVersion &&
|
|
174
|
+
napiBuildVersion <= ourNapiVersion) {
|
|
175
|
+
bestNapiBuildVersion = napiBuildVersion
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
}
|
|
179
|
+
return bestNapiBuildVersion === 0 ? undefined : bestNapiBuildVersion
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Returns an array of N-API versions supported by the package.
|
|
184
|
+
*
|
|
185
|
+
* @returns {Array<string>|undefined}
|
|
186
|
+
*/
|
|
187
|
+
exports.getNapiBuildVersions = function () {
|
|
188
|
+
var napiBuildVersions = []
|
|
189
|
+
// remove duplicates, convert to text
|
|
190
|
+
if (pkg.binary && pkg.binary.napi_versions) {
|
|
191
|
+
pkg.binary.napi_versions.forEach(function (napiVersion) {
|
|
192
|
+
var duplicated = napiBuildVersions.indexOf('' + napiVersion) !== -1
|
|
193
|
+
if (!duplicated) {
|
|
194
|
+
napiBuildVersions.push('' + napiVersion)
|
|
195
|
+
}
|
|
196
|
+
})
|
|
197
|
+
}
|
|
198
|
+
return napiBuildVersions.length ? napiBuildVersions : undefined
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Returns the highest N-API version supported by the current node instance
|
|
203
|
+
* or undefined if N-API is not supported.
|
|
204
|
+
*
|
|
205
|
+
* @returns {string|undefined}
|
|
206
|
+
*/
|
|
207
|
+
exports.getNapiVersion = function () {
|
|
208
|
+
var version = process.versions.napi // integer string, can be undefined
|
|
209
|
+
if (!version) { // this code should never need to be updated
|
|
210
|
+
if (versionArray[0] === 9 && versionArray[1] >= 3) version = '2' // 9.3.0+
|
|
211
|
+
else if (versionArray[0] === 8) version = '1' // 8.0.0+
|
|
212
|
+
}
|
|
213
|
+
return version
|
|
214
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "napi-build-utils",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "A set of utilities to assist developers of tools that build N-API native add-ons",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"doc": "jsdoc2md index.js >index.md",
|
|
8
|
+
"test": "mocha test/ && npm run lint",
|
|
9
|
+
"lint": "standard",
|
|
10
|
+
"prepublishOnly": "npm run test"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"n-api",
|
|
14
|
+
"prebuild",
|
|
15
|
+
"prebuild-install"
|
|
16
|
+
],
|
|
17
|
+
"author": "Jim Schlight",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"homepage": "https://github.com/inspiredware/napi-build-utils#readme",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/inspiredware/napi-build-utils.git"
|
|
23
|
+
},
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/inspiredware/napi-build-utils/issues"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"chai": "^4.1.2",
|
|
29
|
+
"jsdoc-to-markdown": "^4.0.1",
|
|
30
|
+
"mocha": "^5.2.0",
|
|
31
|
+
"standard": "^12.0.1"
|
|
32
|
+
},
|
|
33
|
+
"binary": {
|
|
34
|
+
"note": "napi-build-tools is not an N-API module. This entry is for unit testing.",
|
|
35
|
+
"napi_versions": [
|
|
36
|
+
2,
|
|
37
|
+
2,
|
|
38
|
+
3,
|
|
39
|
+
10
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [7.1.3] - 2025-01-22
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Bump napi-build-utils from 1 to 2 ([#204](https://github.com/prebuild/prebuild-install/issues/204)) ([`1bf4a15`](https://github.com/prebuild/prebuild-install/commit/1bf4a15)) (Bailey Pearson)
|
|
8
|
+
|
|
9
|
+
## [7.1.2] - 2024-02-29
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Support environments where MD5 is prohibited ([#191](https://github.com/prebuild/prebuild-install/issues/191)) ([`9140468`](https://github.com/prebuild/prebuild-install/commit/9140468)) (Tomasz Szuba)
|
|
14
|
+
|
|
15
|
+
## [7.1.1] - 2022-06-07
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- Replace use of npmlog dependency with console.error ([#182](https://github.com/prebuild/prebuild-install/issues/182)) ([`4e2284c`](https://github.com/prebuild/prebuild-install/commit/4e2284c)) (Lovell Fuller)
|
|
20
|
+
- Ensure script output can be captured by tests ([#181](https://github.com/prebuild/prebuild-install/issues/181)) ([`d1853cb`](https://github.com/prebuild/prebuild-install/commit/d1853cb)) (Lovell Fuller)
|
|
21
|
+
|
|
22
|
+
## [7.1.0] - 2022-04-20
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- Allow setting libc to glibc on non-glibc platform ([#176](https://github.com/prebuild/prebuild-install/issues/176)) ([`f729abb`](https://github.com/prebuild/prebuild-install/commit/f729abb)) (Joona Heinikoski)
|
|
27
|
+
|
|
28
|
+
## [7.0.1] - 2022-01-28
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- Upgrade to the latest version of `detect-libc` ([#166](https://github.com/prebuild/prebuild-install/issues/166)) ([`f71c6b9`](https://github.com/prebuild/prebuild-install/commit/f71c6b9)) (Lovell Fuller)
|
|
33
|
+
|
|
34
|
+
## [7.0.0] - 2021-11-12
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- **Breaking:** bump `node-abi` so that Electron 14+ gets correct ABI ([#161](https://github.com/prebuild/prebuild-install/issues/161)) ([`477f347`](https://github.com/prebuild/prebuild-install/commit/477f347)) (csett86). Drops support of Node.js < 10.
|
|
39
|
+
- Bump `simple-get` ([`7468c14`](https://github.com/prebuild/prebuild-install/commit/7468c14)) (Vincent Weevers).
|
|
40
|
+
|
|
41
|
+
## [6.1.4] - 2021-08-11
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
|
|
45
|
+
- Move auth token to header instead of query param ([#160](https://github.com/prebuild/prebuild-install/issues/160)) ([`b3fad76`](https://github.com/prebuild/prebuild-install/commit/b3fad76)) (nicolai-nordic)
|
|
46
|
+
- Remove `_` prefix as it isn't allowed by npm config ([#153](https://github.com/prebuild/prebuild-install/issues/153)) ([`a964e5b`](https://github.com/prebuild/prebuild-install/commit/a964e5b)) (Tom Boothman)
|
|
47
|
+
- Make `rc.path` absolute ([#158](https://github.com/prebuild/prebuild-install/issues/158)) ([`57bcc06`](https://github.com/prebuild/prebuild-install/commit/57bcc06)) (George Waters).
|
|
48
|
+
|
|
49
|
+
## [6.1.3] - 2021-06-03
|
|
50
|
+
|
|
51
|
+
### Changed
|
|
52
|
+
|
|
53
|
+
- Inline no longer maintained `noop-logger` ([#155](https://github.com/prebuild/prebuild-install/issues/155)) ([`e08d75a`](https://github.com/prebuild/prebuild-install/commit/e08d75a)) (Alexandru Dima)
|
|
54
|
+
- Point users towards `prebuildify` in README ([#150](https://github.com/prebuild/prebuild-install/issues/150)) ([`5ee1a2f`](https://github.com/prebuild/prebuild-install/commit/5ee1a2f)) (Vincent Weevers)
|
|
55
|
+
|
|
56
|
+
## [6.1.2] - 2021-04-24
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
|
|
60
|
+
- Support URL-safe strings in scoped packages ([#148](https://github.com/prebuild/prebuild-install/issues/148)) ([`db36c7a`](https://github.com/prebuild/prebuild-install/commit/db36c7a)) (Marco)
|
|
61
|
+
|
|
62
|
+
## [6.1.1] - 2021-04-04
|
|
63
|
+
|
|
64
|
+
### Fixed
|
|
65
|
+
|
|
66
|
+
- Support `force` & `buildFromSource` options in yarn ([#140](https://github.com/prebuild/prebuild-install/issues/140)) ([`8cb1ced`](https://github.com/prebuild/prebuild-install/commit/8cb1ced)) (João Moreno)
|
|
67
|
+
- Bump `node-abi` to prevent dedupe (closes [#135](https://github.com/prebuild/prebuild-install/issues/135)) ([`2950fb2`](https://github.com/prebuild/prebuild-install/commit/2950fb2)) (Vincent Weevers)
|
|
68
|
+
|
|
69
|
+
## [6.1.0] - 2021-04-03
|
|
70
|
+
|
|
71
|
+
### Added
|
|
72
|
+
|
|
73
|
+
- Restore local prebuilds feature ([#137](https://github.com/prebuild/prebuild-install/issues/137)) ([`dc4e5ea`](https://github.com/prebuild/prebuild-install/commit/dc4e5ea)) (Wes Roberts). Previously removed in [#81](https://github.com/prebuild/prebuild-install/issues/81) / [`a069253`](https://github.com/prebuild/prebuild-install/commit/a06925378d38ca821bfa93aa4c1fdedc253b2420).
|
|
74
|
+
|
|
75
|
+
## [6.0.1] - 2021-02-14
|
|
76
|
+
|
|
77
|
+
### Fixed
|
|
78
|
+
|
|
79
|
+
- Fixes empty `--tag-prefix` ([#143](https://github.com/prebuild/prebuild-install/issues/143)) ([**@mathiask88**](https://github.com/mathiask88))
|
|
80
|
+
|
|
81
|
+
## [6.0.0] - 2020-10-23
|
|
82
|
+
|
|
83
|
+
### Changed
|
|
84
|
+
|
|
85
|
+
- **Breaking:** don't skip downloads in standalone mode ([`b6f3b36`](https://github.com/prebuild/prebuild-install/commit/b6f3b36)) ([**@vweevers**](https://github.com/vweevers))
|
|
86
|
+
|
|
87
|
+
### Added
|
|
88
|
+
|
|
89
|
+
- Document cross platform options ([`e5c9a5a`](https://github.com/prebuild/prebuild-install/commit/e5c9a5a)) ([**@fishbone1**](https://github.com/fishbone1))
|
|
90
|
+
|
|
91
|
+
### Removed
|
|
92
|
+
|
|
93
|
+
- **Breaking:** remove `--compile` and `--prebuild` options ([`94f2492`](https://github.com/prebuild/prebuild-install/commit/94f2492)) ([**@vweevers**](https://github.com/vweevers))
|
|
94
|
+
|
|
95
|
+
### Fixed
|
|
96
|
+
|
|
97
|
+
- Support npm 7 ([`8acccac`](https://github.com/prebuild/prebuild-install/commit/8acccac), [`08eaf6d`](https://github.com/prebuild/prebuild-install/commit/08eaf6d), [`22175b8`](https://github.com/prebuild/prebuild-install/commit/22175b8)) ([**@vweevers**](https://github.com/vweevers))
|
|
98
|
+
|
|
99
|
+
## [5.3.6] - 2020-10-20
|
|
100
|
+
|
|
101
|
+
### Changed
|
|
102
|
+
|
|
103
|
+
- Replace `mkdirp` dependency with `mkdirp-classic` ([**@ralphtheninja**](https://github.com/ralphtheninja))
|
|
104
|
+
|
|
105
|
+
[7.1.3]: https://github.com/prebuild/prebuild-install/releases/tag/v7.1.3
|
|
106
|
+
|
|
107
|
+
[7.1.2]: https://github.com/prebuild/prebuild-install/releases/tag/v7.1.2
|
|
108
|
+
|
|
109
|
+
[7.1.1]: https://github.com/prebuild/prebuild-install/releases/tag/v7.1.1
|
|
110
|
+
|
|
111
|
+
[7.1.0]: https://github.com/prebuild/prebuild-install/releases/tag/v7.1.0
|
|
112
|
+
|
|
113
|
+
[7.0.1]: https://github.com/prebuild/prebuild-install/releases/tag/v7.0.1
|
|
114
|
+
|
|
115
|
+
[7.0.0]: https://github.com/prebuild/prebuild-install/releases/tag/v7.0.0
|
|
116
|
+
|
|
117
|
+
[6.1.4]: https://github.com/prebuild/prebuild-install/releases/tag/v6.1.4
|
|
118
|
+
|
|
119
|
+
[6.1.3]: https://github.com/prebuild/prebuild-install/releases/tag/v6.1.3
|
|
120
|
+
|
|
121
|
+
[6.1.2]: https://github.com/prebuild/prebuild-install/releases/tag/v6.1.2
|
|
122
|
+
|
|
123
|
+
[6.1.1]: https://github.com/prebuild/prebuild-install/releases/tag/v6.1.1
|
|
124
|
+
|
|
125
|
+
[6.1.0]: https://github.com/prebuild/prebuild-install/releases/tag/v6.1.0
|
|
126
|
+
|
|
127
|
+
[6.0.1]: https://github.com/prebuild/prebuild-install/releases/tag/v6.0.1
|
|
128
|
+
|
|
129
|
+
[6.0.0]: https://github.com/prebuild/prebuild-install/releases/tag/v6.0.0
|
|
130
|
+
|
|
131
|
+
[5.3.6]: https://github.com/prebuild/prebuild-install/releases/tag/v5.3.6
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 Mathias Buus
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# prebuild-install
|
|
2
|
+
|
|
3
|
+
> **A command line tool to easily install prebuilt binaries for multiple versions of Node.js & Electron on a specific platform.**
|
|
4
|
+
> By default it downloads prebuilt binaries from a GitHub release.
|
|
5
|
+
|
|
6
|
+
[](https://www.npmjs.com/package/prebuild-install)
|
|
7
|
+

|
|
8
|
+
[](https://github.com/prebuild/prebuild-install/actions/workflows/test.yml)
|
|
9
|
+
[](https://standardjs.com)
|
|
10
|
+
[](https://common-changelog.org)
|
|
11
|
+
|
|
12
|
+
## Note
|
|
13
|
+
|
|
14
|
+
**Instead of [`prebuild`](https://github.com/prebuild/prebuild) paired with [`prebuild-install`](https://github.com/prebuild/prebuild-install), we recommend [`prebuildify`](https://github.com/prebuild/prebuildify) paired with [`node-gyp-build`](https://github.com/prebuild/node-gyp-build).**
|
|
15
|
+
|
|
16
|
+
With `prebuildify`, all prebuilt binaries are shipped inside the package that is published to npm, which means there's no need for a separate download step like you find in `prebuild`. The irony of this approach is that it is faster to download all prebuilt binaries for every platform when they are bundled than it is to download a single prebuilt binary as an install script.
|
|
17
|
+
|
|
18
|
+
Upsides:
|
|
19
|
+
|
|
20
|
+
1. No extra download step, making it more reliable and faster to install.
|
|
21
|
+
2. Supports changing runtime versions locally and using the same install between Node.js and Electron. Reinstalling or rebuilding is not necessary, as all prebuilt binaries are in the npm tarball and the correct one is simply picked on runtime.
|
|
22
|
+
3. The `node-gyp-build` runtime dependency is dependency-free and will remain so out of principle, because introducing dependencies would negate the shorter install time.
|
|
23
|
+
4. Prebuilt binaries work even if npm install scripts are disabled.
|
|
24
|
+
5. The npm package checksum covers prebuilt binaries too.
|
|
25
|
+
|
|
26
|
+
Downsides:
|
|
27
|
+
|
|
28
|
+
1. The installed npm package is larger on disk. Using [Node-API](https://nodejs.org/api/n-api.html) alleviates this because Node-API binaries are runtime-agnostic and forward-compatible.
|
|
29
|
+
2. Publishing is mildly more complicated, because `npm publish` must be done after compiling and fetching prebuilt binaries (typically in CI).
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
Use [`prebuild`](https://github.com/prebuild/prebuild) to create and upload prebuilt binaries. Then change your package.json install script to:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"scripts": {
|
|
38
|
+
"install": "prebuild-install || node-gyp rebuild"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
When a consumer then installs your package with npm thus triggering the above install script, `prebuild-install` will download a suitable prebuilt binary, or exit with a non-zero exit code if there is none, which triggers `node-gyp rebuild` in order to build from source.
|
|
44
|
+
|
|
45
|
+
Options (see below) can be passed to `prebuild-install` like so:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"scripts": {
|
|
50
|
+
"install": "prebuild-install -r napi || node-gyp rebuild"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Help
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
prebuild-install [options]
|
|
59
|
+
|
|
60
|
+
--download -d [url] (download prebuilds, no url means github)
|
|
61
|
+
--target -t version (version to install for)
|
|
62
|
+
--runtime -r runtime (Node runtime [node, napi or electron] to build or install for, default is node)
|
|
63
|
+
--path -p path (make a prebuild-install here)
|
|
64
|
+
--token -T gh-token (github token for private repos)
|
|
65
|
+
--arch arch (target CPU architecture, see Node OS module docs, default is current arch)
|
|
66
|
+
--platform platform (target platform, see Node OS module docs, default is current platform)
|
|
67
|
+
--tag-prefix <prefix> (github tag prefix, default is "v")
|
|
68
|
+
--build-from-source (skip prebuild download)
|
|
69
|
+
--verbose (log verbosely)
|
|
70
|
+
--libc (use provided libc rather than system default)
|
|
71
|
+
--debug (set Debug or Release configuration)
|
|
72
|
+
--version (print prebuild-install version and exit)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
When `prebuild-install` is run via an `npm` script, options `--build-from-source`, `--debug`, `--download`, `--target`, `--runtime`, `--arch` `--platform` and `--libc` may be passed through via arguments given to the `npm` command.
|
|
76
|
+
|
|
77
|
+
Alternatively you can set environment variables `npm_config_build_from_source=true`, `npm_config_platform`, `npm_config_arch`, `npm_config_target` `npm_config_runtime` and `npm_config_libc`.
|
|
78
|
+
|
|
79
|
+
### Libc
|
|
80
|
+
|
|
81
|
+
On non-glibc Linux platforms, the Libc name is appended to platform name. For example, musl-based environments are called `linuxmusl`. If `--libc=glibc` is passed as option, glibc is discarded and platform is called as just `linux`. This can be used for example to build cross-platform packages on Alpine Linux.
|
|
82
|
+
|
|
83
|
+
### Private Repositories
|
|
84
|
+
|
|
85
|
+
`prebuild-install` supports downloading prebuilds from private GitHub repositories using the `-T <github-token>`:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
$ prebuild-install -T <github-token>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
If you don't want to use the token on cli you can put it in `~/.prebuild-installrc`:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
token=<github-token>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Alternatively you can specify it in the `prebuild-install_token` environment variable.
|
|
98
|
+
|
|
99
|
+
Note that using a GitHub token uses the API to resolve the correct release meaning that you are subject to the ([GitHub Rate Limit](https://developer.github.com/v3/rate_limit/)).
|
|
100
|
+
|
|
101
|
+
### Create GitHub Token
|
|
102
|
+
|
|
103
|
+
To create a token:
|
|
104
|
+
|
|
105
|
+
- Go to [this page](https://github.com/settings/tokens)
|
|
106
|
+
- Click the `Generate new token` button
|
|
107
|
+
- Give the token a name and click the `Generate token` button, see below
|
|
108
|
+
|
|
109
|
+

|
|
110
|
+
|
|
111
|
+
The default scopes should be fine.
|
|
112
|
+
|
|
113
|
+
### Custom binaries
|
|
114
|
+
|
|
115
|
+
The end user can override binary download location through environment variables in their .npmrc file.
|
|
116
|
+
The variable needs to meet the mask `% your package name %_binary_host` or `% your package name %_binary_host_mirror`. For example:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
leveldown_binary_host=http://overriden-host.com/overriden-path
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Note that the package version subpath and file name will still be appended.
|
|
123
|
+
So if you are installing `leveldown@1.2.3` the resulting url will be:
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
http://overriden-host.com/overriden-path/v1.2.3/leveldown-v1.2.3-node-v57-win32-x64.tar.gz
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
#### Local prebuilds
|
|
130
|
+
|
|
131
|
+
If you want to use prebuilds from your local filesystem, you can use the `% your package name %_local_prebuilds` .npmrc variable to set a path to the folder containing prebuilds. For example:
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
leveldown_local_prebuilds=/path/to/prebuilds
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
This option will look directly in that folder for bundles created with `prebuild`, for example:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
/path/to/prebuilds/leveldown-v1.2.3-node-v57-win32-x64.tar.gz
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Non-absolute paths resolve relative to the directory of the package invoking prebuild-install, e.g. for nested dependencies.
|
|
144
|
+
|
|
145
|
+
### Cache
|
|
146
|
+
|
|
147
|
+
All prebuilt binaries are cached to minimize traffic. So first `prebuild-install` picks binaries from the cache and if no binary could be found, it will be downloaded. Depending on the environment, the cache folder is determined in the following order:
|
|
148
|
+
|
|
149
|
+
- `${npm_config_cache}/_prebuilds`
|
|
150
|
+
- `${APP_DATA}/npm-cache/_prebuilds`
|
|
151
|
+
- `${HOME}/.npm/_prebuilds`
|
|
152
|
+
|
|
153
|
+
## Install
|
|
154
|
+
|
|
155
|
+
With [npm](https://npmjs.org) do:
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
npm install prebuild-install
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## License
|
|
162
|
+
|
|
163
|
+
[MIT](./LICENSE)
|