@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 CHANGED
@@ -7,7 +7,7 @@
7
7
  [![license: MIT](https://img.shields.io/github/license/flowscripter/template-bun-executable)](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
- Download and extract zip from:
35
- https://github.com/flowscripter/template-bun-executable/releases
34
+ #### MacOS
36
35
 
37
- Run the executable: `./template-bun-executable`
36
+ Via [Homebrew](https://brew.sh/):
38
37
 
39
- **NOTE**: The executable is 10's of megabytes in size as the entire Bun runtime
40
- is included.
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
- **NOTE**: Due to this issue https://github.com/oven-sh/bun/issues/7208 the MacOS
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
- _"System Settings" > "Privacy & Security" > "Security" > "Allow Anyway"_
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
@@ -2,7 +2,7 @@
2
2
  "name": "@flowscripter/template-bun-executable",
3
3
  "module": "index.ts",
4
4
  "type": "module",
5
- "version": "1.0.3",
5
+ "version": "1.1.0",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
@@ -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."