FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ZCode/scripts/remote-native-search-tools-config.mjs at main · DeepenKernel/ZCode · GitHub
DeepenKernel
ZCode
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
ZCode
/
scripts
/
remote-native-search-tools-config.mjs
Copy path
More file actions
More file actions
Latest commit
History
History
History
62 lines (58 loc) · 2.37 KB
Breadcrumbs
ZCode
/
scripts
/
remote-native-search-tools-config.mjs
Copy path
File metadata and controls
62 lines (58 loc) · 2.37 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import
{
resolve
}
from
"node:path"
;
import
process
from
"node:process"
;
import
{
NATIVE_SEARCH_DEPENDENCIES_DIR
,
resolveNativeSearchBuildPlan
,
resolveNativeSearchPrebuiltPlan
,
}
from
"./native-search-tools-config.mjs"
;
export
const
LEGACY_REMOTE_RIPGREP_VERSION
=
"v13.0.0-10"
;
export
const
LEGACY_REMOTE_RIPGREP_ARCHIVE_SHA256_BY_TARGET
=
Object
.
freeze
(
{
"darwin-arm64"
:
"de44338ca53677968bdd7403ddc1cf9c735e708f7b63e3b34367f9411010a7db"
,
"darwin-x64"
:
"3b501c05ff9b1d24ae8897dd1c6b5bf842fd12a6f7114264407ac42bc222b25b"
,
"linux-arm64"
:
"705fc9bcd14baa18bd4dda8fe0651bff440fc0fb934fcdb8e745a85efd7b2afa"
,
"linux-x64"
:
"ef820a62c1d6fdc396646762ff0f0e47e127947073ed8b5aa4ceea8b61cb1659"
,
"win32-arm64"
:
"6c12d2c95073a4b981e5706981f42327b6359fc4cd7449ebd11f6769768dea97"
,
"win32-x64"
:
"7b35b95cf3d7f92d8fe087006899617b1b5a6dac4bbed5d4f6ace6f0934799dc"
,
}
)
;
export
function
resolveRemoteNativeSearchPrebuiltPlan
(
{
platform
=
process
.
platform
,
arch
=
process
.
arch
,
outputDir
,
dependenciesDir
=
NATIVE_SEARCH_DEPENDENCIES_DIR
,
}
=
{
}
)
{
const
buildPlan
=
resolveNativeSearchBuildPlan
(
{
platform
,
arch
,
outputDir
}
)
;
if
(
buildPlan
.
platform
===
"linux"
)
{
return
resolveNativeSearchPrebuiltPlan
(
{
platform
,
arch
,
outputDir
,
dependenciesDir
}
)
;
}
if
(
buildPlan
.
platform
!==
"darwin"
)
{
throw
new
Error
(
`unsupported remote native search target
${
buildPlan
.
platformKey
}
`
)
;
}
// macOS remote retains rg13; Desktop and SEA use the default rg14 plan.
const
release
=
LEGACY_REMOTE_RIPGREP_VERSION
;
const
archiveTarget
=
`
${
buildPlan
.
arch
===
"arm64"
?
"aarch64"
:
"x86_64"
}
-apple-darwin.tar.gz`
;
const
releaseFileName
=
`ripgrep-
${
release
}
-
${
archiveTarget
}
`
;
return
{
platform
:
buildPlan
.
platform
,
arch
:
buildPlan
.
arch
,
platformKey
:
buildPlan
.
platformKey
,
outputDir
:
buildPlan
.
outputDir
,
runtimeToolIds
:
[
"ripgrep"
]
,
producerOutputIds
:
[
]
,
binaries
:
{
ripgrep
:
buildPlan
.
rgPath
}
,
rgPath
:
buildPlan
.
rgPath
,
artifacts
:
[
{
toolId
:
"ripgrep"
,
version
:
"13.0.0"
,
release
,
releaseFileName
,
archiveExt
:
"tar.gz"
,
archiveSha256
:
LEGACY_REMOTE_RIPGREP_ARCHIVE_SHA256_BY_TARGET
[
buildPlan
.
platformKey
]
,
binaryName
:
"rg"
,
binaryPath
:
buildPlan
.
rgPath
,
archivePath
:
resolve
(
dependenciesDir
,
`ripgrep-
${
release
}
`
,
releaseFileName
)
,
source
:
"official"
,
}
,
]
,
}
;
}
Back
|
FazBrowse Home
|
New Git URL