@hakodb/client 0.5.12
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/LICENSE +21 -0
- package/LICENSE-MIT +21 -0
- package/README.md +25 -0
- package/examples/bun/index.ts +85 -0
- package/examples/bun/package.json +10 -0
- package/examples/node/index.ts +111 -0
- package/examples/node/package-lock.json +533 -0
- package/examples/node/package.json +13 -0
- package/native/.gitkeep +0 -0
- package/package.json +31 -0
- package/src/bun-ffi.d.ts +6 -0
- package/src/client.ts +1123 -0
- package/src/index.ts +38 -0
- package/src/native.ts +993 -0
- package/sync-native.ps1 +30 -0
- package/tsconfig.json +12 -0
package/sync-native.ps1
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#Requires -Version 5.1
|
|
2
|
+
<#
|
|
3
|
+
.SYNOPSIS
|
|
4
|
+
Populate native/ from a core checkout or a release tag asset.
|
|
5
|
+
.EXAMPLE
|
|
6
|
+
.\sync-native.ps1 -CoreDir C:\Dev\libs\firelite
|
|
7
|
+
.\sync-native.ps1 -Tag v0.8.20
|
|
8
|
+
#>
|
|
9
|
+
param(
|
|
10
|
+
[string]$CoreDir = "",
|
|
11
|
+
[string]$Tag = ""
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
$ErrorActionPreference = "Stop"
|
|
15
|
+
$Root = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
16
|
+
$Native = Join-Path $Root "native"
|
|
17
|
+
New-Item -ItemType Directory -Force $Native | Out-Null
|
|
18
|
+
|
|
19
|
+
if ($CoreDir -ne "") {
|
|
20
|
+
$dll = Join-Path $CoreDir "target\release\hakodb.dll"
|
|
21
|
+
if (-not (Test-Path $dll)) { throw "no release DLL at $dll (cargo build --release first)" }
|
|
22
|
+
Copy-Item $dll $Native -Force
|
|
23
|
+
Write-Output "synced from checkout: $CoreDir"
|
|
24
|
+
} elseif ($Tag -ne "") {
|
|
25
|
+
$base = "https://github.com/hakodb/hakodb/releases/download/$Tag"
|
|
26
|
+
Invoke-WebRequest -Uri "$base/hakodb-x86_64-pc-windows-msvc.dll" -OutFile (Join-Path $Native "hakodb.dll")
|
|
27
|
+
Write-Output "synced from release asset: $Tag"
|
|
28
|
+
} else {
|
|
29
|
+
throw "pass -CoreDir or -Tag"
|
|
30
|
+
}
|