node-sword-interface 1.0.47 → 1.0.49

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-sword-interface",
3
- "version": "1.0.47",
3
+ "version": "1.0.49",
4
4
  "description": "Javascript (N-API) interface to SWORD library",
5
5
  "keywords": [
6
6
  "C++",
@@ -35,6 +35,6 @@
35
35
  "devDependencies": {
36
36
  "jest": "^30.0.5",
37
37
  "jsdoc-to-markdown": "^9.1.1",
38
- "node-gyp": "^9.1.0"
38
+ "node-gyp": "^12.1.0"
39
39
  }
40
40
  }
@@ -1,9 +1,21 @@
1
1
  #!/usr/bin/env node
2
- // This file is part of node-sword-interface.
3
- // This script downloads a release asset (zip) from GitHub, extracts it and
4
- // renames the directory to sword-build-win32 inside the current working directory.
5
- //
6
- // License: GPL-2.0+
2
+ /* This file is part of node-sword-interface.
3
+
4
+ Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
5
+
6
+ node-sword-interface is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 2 of the License, or
9
+ (at your option) any later version.
10
+
11
+ node-sword-interface is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
+ See the GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with node-sword-interface. See the file COPYING.
18
+ If not, see <http://www.gnu.org/licenses/>. */
7
19
 
8
20
  const https = require('https');
9
21
  const fs = require('fs');
@@ -1,74 +0,0 @@
1
- # This file is part of node-sword-interface.
2
- #
3
- # Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
4
- #
5
- # node-sword-interface is free software: you can redistribute it and/or modify
6
- # it under the terms of the GNU General Public License as published by
7
- # the Free Software Foundation, either version 2 of the License, or
8
- # (at your option) any later version.
9
- #
10
- # node-sword-interface is distributed in the hope that it will be useful,
11
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
- # See the GNU General Public License for more details.
14
- #
15
- # You should have received a copy of the GNU General Public License
16
- # along with node-sword-interface. See the file COPYING.
17
- # If not, see <http://www.gnu.org/licenses/>.
18
-
19
- # see https://www.helloitscraig.co.uk/2016/02/download-the-latest-repo.html
20
- # see https://www.saotn.org/unzip-file-powershell/
21
-
22
- Add-Type -AssemblyName System.IO.Compression.FileSystem
23
- function unzip {
24
- param( [string]$ziparchive, [string]$extractpath )
25
- [System.IO.Compression.ZipFile]::ExtractToDirectory( $ziparchive, $extractpath )
26
- }
27
-
28
- # --- Only allow TLS1.1 and TLS1.2
29
- $AllProtocols = [System.Net.SecurityProtocolType]'Tls11,Tls12'
30
- [System.Net.ServicePointManager]::SecurityProtocol = $AllProtocols
31
-
32
- $headers = @{}
33
-
34
- $github_token = $env:GITHUB_TOKEN
35
-
36
- # --- Set the uri for the release
37
- $URI = "https://api.github.com/repos/ezra-bible-app/sword-build-win32/releases/tags/v1.8.900-2022-11-06"
38
-
39
- if ($Env:CI -eq "true") {
40
- Write-Host "GitHub actions build ... using GITHUB_TOKEN for authentication!"
41
-
42
- $headers = @{
43
- Authorization="Bearer $github_token"
44
- ContentType='application/json'
45
- }
46
- }
47
-
48
- # --- Query the API to get the url of the zip
49
- $Response = Invoke-RestMethod -Method Get -Uri $URI -Headers $headers
50
-
51
- $ZipName = $Response.assets[0].name
52
- $ZipUrl = $Response.assets[0].browser_download_url
53
-
54
- # --- Remove the existing folder
55
- if (Test-Path sword-build-win32) {
56
- Remove-Item -Recurse -Force sword-build-win32
57
- }
58
-
59
- # --- Download the file to the current location
60
- $OutputPath = Join-Path -Path (Get-Location).Path -ChildPath $ZipName
61
- Invoke-RestMethod -Method Get -Uri $ZipUrl -OutFile $OutputPath -Headers $headers
62
-
63
- Write-Host "OutputPath: $OutputPath"
64
- Write-Host "ZipUrl: $ZipUrl"
65
-
66
- # --- Unzip the zip file and remove it afterwards
67
- unzip $OutputPath $((Get-Location).Path)
68
- Remove-Item $OutputPath
69
-
70
- # --- Rename the extracted folder to a standard name
71
- $LibDirName = $ZipName.Replace(".zip", "")
72
- Rename-Item -Path $LibDirName -NewName sword-build-win32
73
-
74
- Write-Host "Download of Windows library artifacts completed!"