scip-query 0.10.4 → 0.10.5
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/chunk-ONPCQ2PM.js +6 -0
- package/dist/cli.js +181 -180
- package/dist/postinstall.js +1 -1
- package/dist/reindex-worker.js +8 -8
- package/dist/reindex.d.ts +1 -1
- package/dist/reindex.js +19 -19
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/dist/{scip-cli-a-xOztiK.d.ts → scip-cli-Bh1M_JPu.d.ts} +1 -1
- package/package.json +6 -3
- package/scripts/build-scip-windows.mjs +75 -0
- package/vendor/scip/LICENSE.scip +201 -0
- package/vendor/scip/README.md +6 -0
- package/vendor/scip/win32-arm64/scip.exe +0 -0
- package/vendor/scip/win32-x64/scip.exe +0 -0
- package/dist/chunk-NXIAHE7F.js +0 -5
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{execFileSync as h}from"child_process";import{platform as y}from"os";var b=y()==="win32";function t(e){let r=b?"where":"which";try{return h(r,[e],{stdio:"pipe"}),!0}catch{return!1}}import{execFileSync as c}from"child_process";import{existsSync as g,readFileSync as I}from"fs";import{platform as o,arch as m}from"os";import{dirname as p,join as s}from"path";import{fileURLToPath as v}from"url";var d="v0.8.1",a="https://github.com/scip-code/scip",x={win32:{x64:s("vendor","scip","win32-x64","scip.exe"),arm64:s("vendor","scip","win32-arm64","scip.exe")}};function S(){let e=p(v(import.meta.url));for(;;){let r=s(e,"package.json");if(g(r))try{if(JSON.parse(I(r,"utf-8")).name==="scip-query")return e}catch{}let n=p(e);if(n===e)return null;e=n}}function f(){let e=x[o()]?.[m()];if(!e)return null;let r=S();if(!r)return null;let n=s(r,e);return g(n)?n:null}function w(){return t("scip")?"scip":f()}function H(){return w()!==null}function q(){let e=w();if(!e)return null;try{return c(e,["--version"],{stdio:"pipe"}).toString().trim()}catch{return null}}function $(){let e=o(),r=m(),n,i,l;switch(e){case"darwin":n="darwin",l="tar.gz";break;case"linux":n="linux",l="tar.gz";break;default:return null}switch(r){case"arm64":i="arm64";break;case"x64":i="amd64";break;default:return null}let u=`scip-${n}-${i}.${l}`;return{url:`${a}/releases/download/${d}/${u}`,filename:u}}function U(){let e=$();console.log("\nThe `scip` CLI is required but not found on PATH.\n"),o()==="darwin"?(console.log("Install via Homebrew:"),console.log(` brew install sourcegraph/scip/scip
|
|
2
|
+
`),console.log("Or download manually:")):o()==="win32"?(console.log("Windows installs should include a managed scip.exe in the scip-query package."),console.log("Reinstall scip-query, or build the managed binary from source with:"),console.log(` npm run build:scip-windows
|
|
3
|
+
`),console.log("Upstream release page:")):console.log("Download from:"),console.log(e?` ${e.url}
|
|
4
|
+
`:` ${a}/releases/tag/${d}
|
|
5
|
+
`),console.log("After installing, ensure `scip` is on your PATH and run `scip-query reindex`.")}function D(e){let r=f();if(r)return e(`Using bundled scip CLI at ${r}`),!0;if(o()==="darwin"&&t("brew")){e("Installing scip CLI via Homebrew...");try{if(c("brew",["install","sourcegraph/scip/scip"],{stdio:"inherit",timeout:3e5,env:process.env}),t("scip"))return e("Successfully installed scip CLI via Homebrew"),!0}catch(n){let i=n instanceof Error?n.message:String(n);e(`Homebrew install failed: ${i}`)}}if(t("go")){e("Installing scip CLI via go install...");try{if(c("go",["install","github.com/sourcegraph/scip/cmd/scip@latest"],{stdio:"inherit",timeout:3e5,env:process.env}),t("scip"))return e("Successfully installed scip CLI via go install"),!0}catch(n){let i=n instanceof Error?n.message:String(n);e(`go install failed: ${i}`)}}return e("Could not auto-install scip CLI."),e(`Install manually from: ${a}/releases`),!1}export{t as a,w as b,H as c,q as d,U as e,D as f};
|
|
6
|
+
//# sourceMappingURL=chunk-ONPCQ2PM.js.map
|