@flowscripter/template-bun-executable 1.0.3 → 1.1.0
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/README.md +23 -11
- package/package.json +1 -1
- package/script/install.ps1 +31 -0
- package/script/install.sh +25 -0
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://github.com/flowscripter/template-bun-executable/blob/main/LICENSE)
|
|
8
8
|
|
|
9
9
|
> Project template for a cross-platform Bun executable with ffi native library
|
|
10
|
-
> and Bun library dependencies
|
|
10
|
+
> and Bun library dependencies.
|
|
11
11
|
|
|
12
12
|
## Template Usage
|
|
13
13
|
|
|
@@ -31,20 +31,32 @@ world();
|
|
|
31
31
|
|
|
32
32
|
## Binary Executable Usage
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
https://github.com/flowscripter/template-bun-executable/releases
|
|
34
|
+
#### MacOS
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
Via [Homebrew](https://brew.sh/):
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
`brew install flowscripter/tap/template-deno-executable`
|
|
39
|
+
|
|
40
|
+
#### Linux
|
|
41
|
+
|
|
42
|
+
In a terminal:
|
|
43
|
+
|
|
44
|
+
`curl -fsSL https://raw.githubusercontent.com/flowscripter/template-bun-executable/main/script/install.sh | sh`
|
|
45
|
+
|
|
46
|
+
#### Windows
|
|
41
47
|
|
|
42
|
-
|
|
43
|
-
executable is neither signed nor notarised. This means a "Developer cannot be
|
|
44
|
-
verified" error will be displayed when the CLI it is executed. This requires
|
|
45
|
-
explicitly allowing the CLI to be executed via:
|
|
48
|
+
In PowerShell:
|
|
46
49
|
|
|
47
|
-
|
|
50
|
+
`curl -fsSL https://raw.githubusercontent.com/flowscripter/template-bun-executable/main/script/install.ps1 | powershell`
|
|
51
|
+
|
|
52
|
+
#### Manual Install
|
|
53
|
+
|
|
54
|
+
You can download and extract the binary zip files from the
|
|
55
|
+
[releases](https://github.com/flowscripter/template-bun-executable/releases)
|
|
56
|
+
page.
|
|
57
|
+
|
|
58
|
+
**NOTE**: The binaries are 10's of megabytes in size as the entire Bun runtime
|
|
59
|
+
is included.
|
|
48
60
|
|
|
49
61
|
## Functional Tests
|
|
50
62
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Set exit on error
|
|
2
|
+
$ErrorActionPreference = "Stop"
|
|
3
|
+
|
|
4
|
+
# URL of the ZIP file containing the executable
|
|
5
|
+
$zipUrl = "https://github.com/flowscripter/template-bun-executable/releases/latest/download/template-bun-executable_Windows_x86_64.zip"
|
|
6
|
+
$installDir = "$env:ProgramFiles\template-bun-executable"
|
|
7
|
+
|
|
8
|
+
# Create a temporary directory to download the ZIP
|
|
9
|
+
$tempDir = [System.IO.Path]::Combine($env:TEMP, "flowscripter_install")
|
|
10
|
+
New-Item -ItemType Directory -Force -Path $tempDir
|
|
11
|
+
|
|
12
|
+
# Download the ZIP file
|
|
13
|
+
Write-Host "Downloading template-bun-executable..."
|
|
14
|
+
Invoke-WebRequest -Uri $zipUrl -OutFile "$tempDir\executable.zip"
|
|
15
|
+
|
|
16
|
+
# Extract the ZIP file
|
|
17
|
+
Write-Host "Extracting the ZIP file..."
|
|
18
|
+
Expand-Archive -Path "$tempDir\executable.zip" -DestinationPath $tempDir -Force
|
|
19
|
+
|
|
20
|
+
# Install the executable
|
|
21
|
+
Write-Host "Installing the executable..."
|
|
22
|
+
Move-Item -Path "$tempDir\template-bun-executable.exe" -Destination $installDir -Force
|
|
23
|
+
|
|
24
|
+
# Add the executable to the system PATH (for all users)
|
|
25
|
+
$env:Path += ";$installDir"
|
|
26
|
+
[Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
|
|
27
|
+
|
|
28
|
+
# Clean up temporary files
|
|
29
|
+
Remove-Item -Recurse -Force $tempDir
|
|
30
|
+
|
|
31
|
+
Write-Host "✅ Installation complete! You can now run 'template-bun-executable' from any command prompt."
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
set -e # Exit on error
|
|
4
|
+
|
|
5
|
+
# Define the download URL
|
|
6
|
+
URL="https://github.com/flowscripter/template-bun-executable/releases/latest/download/template-bun-executable_Linux_x86_64.zip"
|
|
7
|
+
|
|
8
|
+
# Create a temporary directory
|
|
9
|
+
TMP_DIR=$(mktemp -d)
|
|
10
|
+
cd "$TMP_DIR"
|
|
11
|
+
|
|
12
|
+
# Download and extract
|
|
13
|
+
echo "Downloading template-bun-executable..."
|
|
14
|
+
curl -fsSL "$URL" -o executable.zip
|
|
15
|
+
unzip executable.zip
|
|
16
|
+
|
|
17
|
+
# Install
|
|
18
|
+
chmod +x template-bun-executable
|
|
19
|
+
sudo mv template-bun-executable /usr/local/bin/
|
|
20
|
+
|
|
21
|
+
# Clean up
|
|
22
|
+
cd -
|
|
23
|
+
rm -rf "$TMP_DIR"
|
|
24
|
+
|
|
25
|
+
echo "✅ Installation complete! Run 'template-bun-executable' to get started."
|