single-file-cli 2.0.82 → 2.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.
@@ -0,0 +1,30 @@
1
+ name: Run tests
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ timeout-minutes: 15
12
+ steps:
13
+ -
14
+ name: Checkout sources
15
+ uses: actions/checkout@v4
16
+ -
17
+ name: Set up Node.js
18
+ uses: actions/setup-node@v4
19
+ with:
20
+ node-version: 24
21
+ cache: npm
22
+ -
23
+ name: Install dependencies
24
+ run: npm ci
25
+ -
26
+ name: Run linter
27
+ run: npm run lint
28
+ -
29
+ name: Run tests
30
+ run: npm test
package/build.sh CHANGED
@@ -3,7 +3,7 @@
3
3
  mv package.json package.json.tmp
4
4
  mv deno.json deno.json.tmp
5
5
  mv deno.lock deno.lock.tmp
6
- deno install --vendor --quiet "npm:single-file-core@1.5.59"
6
+ deno install --vendor --quiet --minimum-dependency-age=0 "npm:single-file-core@1.5.85"
7
7
  mv package.json.tmp package.json
8
8
  mv deno.json.tmp deno.json
9
9
  mv deno.lock.tmp deno.lock
package/compile.sh CHANGED
@@ -1,20 +1,26 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- cp ./package.json ./package.json.copy
4
- jq 'del(.dependencies)' ./package.json.copy > ./package.json
5
- mv node_modules node_modules.copy
6
- mv deno.lock deno.lock.copy
3
+ set -e
7
4
 
8
- deno compile --allow-read --allow-write --allow-net --allow-env --allow-run --ext=js --output=./dist/single-file-aarch64-apple-darwin --target=aarch64-apple-darwin ./single-file
9
- deno compile --allow-read --allow-write --allow-net --allow-env --allow-run --ext=js --output=./dist/single-file-x86_64-apple-darwin --target=x86_64-apple-darwin ./single-file
10
- deno compile --allow-read --allow-write --allow-net --allow-env --allow-run --ext=js --output=./dist/single-file-x86_64-linux --target=x86_64-unknown-linux-gnu ./single-file
11
- deno compile --allow-read --allow-write --allow-net --allow-env --allow-run --ext=js --output=./dist/single-file-aarch64-linux --target=aarch64-unknown-linux-gnu ./single-file
12
- deno compile --allow-all --ext=js --output=./dist/single-file.exe --target=x86_64-pc-windows-msvc --icon=./resources/single-file.ico ./single-file
5
+ dist_dir=$(pwd)/dist
6
+ stage_dir=$(mktemp -d)
7
+ trap 'rm -rf "$stage_dir"' EXIT
8
+
9
+ cp ./single-file ./single-file-launcher.js ./single-file-cli-api.js ./options.js ./deno.json "$stage_dir"
10
+ cp -R ./lib "$stage_dir/lib"
11
+ cp -R ./resources "$stage_dir/resources"
12
+ jq 'del(.dependencies, .devDependencies)' ./package.json > "$stage_dir/package.json"
13
+ mkdir -p "$dist_dir"
14
+ cd "$stage_dir"
15
+
16
+ deno compile --allow-read --allow-write --allow-net --allow-env --allow-run --ext=js --output="$dist_dir/single-file-aarch64-apple-darwin" --target=aarch64-apple-darwin ./single-file
17
+ deno compile --allow-read --allow-write --allow-net --allow-env --allow-run --ext=js --output="$dist_dir/single-file-x86_64-apple-darwin" --target=x86_64-apple-darwin ./single-file
18
+ deno compile --allow-read --allow-write --allow-net --allow-env --allow-run --ext=js --output="$dist_dir/single-file-x86_64-linux" --target=x86_64-unknown-linux-gnu ./single-file
19
+ deno compile --allow-read --allow-write --allow-net --allow-env --allow-run --ext=js --output="$dist_dir/single-file-aarch64-linux" --target=aarch64-unknown-linux-gnu ./single-file
20
+ deno compile --allow-all --ext=js --output="$dist_dir/single-file.exe" --target=x86_64-pc-windows-msvc --icon=./resources/single-file.ico ./single-file
21
+
22
+ cd - > /dev/null
13
23
 
14
24
  dev_id=$(security find-identity -p codesigning -v | grep "Apple Development" | awk '{print $2}')
15
25
  codesign -f -s $dev_id ./dist/single-file-aarch64-apple-darwin
16
26
  codesign -f -s $dev_id ./dist/single-file-x86_64-apple-darwin
17
-
18
- mv ./package.json.copy ./package.json
19
- mv node_modules.copy node_modules
20
- mv deno.lock.copy deno.lock
package/deno.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@single-file/single-file-cli",
3
- "version": "2.0.82",
3
+ "version": "2.1.0",
4
4
  "description": "SingleFile CLI",
5
- "nodeModulesDir": "auto",
6
5
  "exports": {
7
6
  ".": "./single-file-cli-api.js"
8
7
  },
9
8
  "imports": {
10
- "simple-cdp": "jsr:@simple-cdp/simple-cdp@^1.8.6",
9
+ "simple-cdp": "jsr:@simple-cdp/simple-cdp@^1.10.0",
11
10
  "path": "jsr:@std/path@^1.1.2"
12
11
  }
13
12
  }