@hakodb/client 0.6.2 → 0.6.4

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/sync-native.ps1 CHANGED
@@ -1,55 +1,55 @@
1
- #Requires -Version 5.1
2
- <#
3
- .SYNOPSIS
4
- Populate native/ from a core checkout or a release tag asset (multi-platform).
5
- .EXAMPLE
6
- .\sync-native.ps1 -CoreDir C:\Dev\libs\hakodb
7
- .\sync-native.ps1 -Tag v0.9.0
8
- .\sync-native.ps1 -Tag v0.9.0 -Platform linux
9
- #>
10
- param(
11
- [string]$CoreDir = "",
12
- [string]$Tag = "",
13
- [string]$Platform = "",
14
- [string]$LibTag = "linux-glibc2.28-el8"
15
- )
16
-
17
- $ErrorActionPreference = "Stop"
18
- $Root = Split-Path -Parent $MyInvocation.MyCommand.Path
19
- $Native = Join-Path $Root "native"
20
- New-Item -ItemType Directory -Force $Native | Out-Null
21
-
22
- # No macOS prebuilts (no CI job yet): build from source via -CoreDir on a Mac.
23
-
24
- if ($CoreDir -ne "") {
25
- $dll = Join-Path $CoreDir "target\release\hakodb.dll"
26
- $so = Join-Path $CoreDir "target\release\libhakodb.so"
27
- $dylib = Join-Path $CoreDir "target\release\libhakodb.dylib"
28
- $found = @($dll, $so, $dylib) | Where-Object { Test-Path $_ } | Select-Object -First 1
29
- if (-not $found) { throw "no release library under $CoreDir\target\release (cargo build --release first)" }
30
- Copy-Item $found $Native -Force
31
- Write-Output "synced from checkout: $CoreDir"
32
- } elseif ($Tag -ne "") {
33
- if ($Platform -eq "") {
34
- if ($IsWindows -or $env:OS -eq "Windows_NT") { $Platform = "win32" }
35
- elseif ($IsLinux) { $Platform = "linux" }
36
- elseif ($IsMacOS) { $Platform = "darwin" }
37
- else { $Platform = "win32" }
38
- }
39
- $base = "https://github.com/hakodb/hakodb/releases/download/$Tag"
40
- if ($Platform -eq "win32") {
41
- Invoke-WebRequest -Uri "$base/hakodb-x86_64-pc-windows-msvc.dll" -OutFile (Join-Path $Native "hakodb.dll")
42
- } elseif ($Platform -eq "linux") {
43
- # el8 build runs on glibc >= 2.28 everywhere; override -LibTag for an exact distro.
44
- Invoke-WebRequest -Uri "$base/libhakodb-x86_64-unknown-$LibTag.so" -OutFile (Join-Path $Native "libhakodb.so")
45
- } elseif ($Platform -eq "android") {
46
- Invoke-WebRequest -Uri "$base/libhakodb-aarch64-linux-android.so" -OutFile (Join-Path $Native "libhakodb.so")
47
- } elseif ($Platform -eq "darwin") {
48
- throw "no macOS prebuilt (no CI job yet) - build from source and use -CoreDir on a Mac"
49
- } else {
50
- throw "unknown -Platform '$Platform' (win32|linux|android|darwin)"
51
- }
52
- Write-Output "synced from release asset: $Tag ($Platform)"
53
- } else {
54
- throw "pass -CoreDir or -Tag"
55
- }
1
+ #Requires -Version 5.1
2
+ <#
3
+ .SYNOPSIS
4
+ Populate native/ from a core checkout or a release tag asset (multi-platform).
5
+ .EXAMPLE
6
+ .\sync-native.ps1 -CoreDir C:\Dev\libs\hakodb
7
+ .\sync-native.ps1 -Tag v0.9.0
8
+ .\sync-native.ps1 -Tag v0.9.0 -Platform linux
9
+ #>
10
+ param(
11
+ [string]$CoreDir = "",
12
+ [string]$Tag = "",
13
+ [string]$Platform = "",
14
+ [string]$LibTag = "linux-glibc2.28-el8"
15
+ )
16
+
17
+ $ErrorActionPreference = "Stop"
18
+ $Root = Split-Path -Parent $MyInvocation.MyCommand.Path
19
+ $Native = Join-Path $Root "native"
20
+ New-Item -ItemType Directory -Force $Native | Out-Null
21
+
22
+ # No macOS prebuilts (no CI job yet): build from source via -CoreDir on a Mac.
23
+
24
+ if ($CoreDir -ne "") {
25
+ $dll = Join-Path $CoreDir "target\release\hakodb.dll"
26
+ $so = Join-Path $CoreDir "target\release\libhakodb.so"
27
+ $dylib = Join-Path $CoreDir "target\release\libhakodb.dylib"
28
+ $found = @($dll, $so, $dylib) | Where-Object { Test-Path $_ } | Select-Object -First 1
29
+ if (-not $found) { throw "no release library under $CoreDir\target\release (cargo build --release first)" }
30
+ Copy-Item $found $Native -Force
31
+ Write-Output "synced from checkout: $CoreDir"
32
+ } elseif ($Tag -ne "") {
33
+ if ($Platform -eq "") {
34
+ if ($IsWindows -or $env:OS -eq "Windows_NT") { $Platform = "win32" }
35
+ elseif ($IsLinux) { $Platform = "linux" }
36
+ elseif ($IsMacOS) { $Platform = "darwin" }
37
+ else { $Platform = "win32" }
38
+ }
39
+ $base = "https://github.com/hakodb/hakodb/releases/download/$Tag"
40
+ if ($Platform -eq "win32") {
41
+ Invoke-WebRequest -Uri "$base/hakodb-x86_64-pc-windows-msvc.dll" -OutFile (Join-Path $Native "hakodb.dll")
42
+ } elseif ($Platform -eq "linux") {
43
+ # el8 build runs on glibc >= 2.28 everywhere; override -LibTag for an exact distro.
44
+ Invoke-WebRequest -Uri "$base/libhakodb-x86_64-unknown-$LibTag.so" -OutFile (Join-Path $Native "libhakodb.so")
45
+ } elseif ($Platform -eq "android") {
46
+ Invoke-WebRequest -Uri "$base/libhakodb-aarch64-linux-android.so" -OutFile (Join-Path $Native "libhakodb.so")
47
+ } elseif ($Platform -eq "darwin") {
48
+ throw "no macOS prebuilt (no CI job yet) - build from source and use -CoreDir on a Mac"
49
+ } else {
50
+ throw "unknown -Platform '$Platform' (win32|linux|android|darwin)"
51
+ }
52
+ Write-Output "synced from release asset: $Tag ($Platform)"
53
+ } else {
54
+ throw "pass -CoreDir or -Tag"
55
+ }
package/tsconfig.json CHANGED
@@ -1,12 +1,12 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "ESNext",
5
- "moduleResolution": "Bundler",
6
- "strict": true,
7
- "skipLibCheck": true,
8
- "declaration": true,
9
- "types": ["node"]
10
- },
11
- "include": ["src"]
12
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "Bundler",
6
+ "strict": true,
7
+ "skipLibCheck": true,
8
+ "declaration": true,
9
+ "types": ["node"]
10
+ },
11
+ "include": ["src"]
12
+ }