node-sword-interface 1.0.6 → 1.0.7

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.6",
3
+ "version": "1.0.7",
4
4
  "description": "Javascript (N-API) interface to SWORD library",
5
5
  "keywords": [
6
6
  "C++",
@@ -29,11 +29,19 @@ function unzip {
29
29
  $AllProtocols = [System.Net.SecurityProtocolType]'Tls11,Tls12'
30
30
  [System.Net.ServicePointManager]::SecurityProtocol = $AllProtocols
31
31
 
32
+ $headers = @{}
33
+
34
+ if (Test-Path env:CI) {
35
+ $headers = @{
36
+ Authorization="Bearer ${$secrets.GITHUB_TOKEN}"
37
+ }
38
+ }
39
+
32
40
  # --- Set the uri for the release
33
41
  $URI = "https://api.github.com/repos/ezra-bible-app/sword-build-win32/releases/tags/v1.8.900-2022-11-06"
34
42
 
35
43
  # --- Query the API to get the url of the zip
36
- $Response = Invoke-RestMethod -Method Get -Uri $URI
44
+ $Response = Invoke-RestMethod -Method Get -Uri $URI -Headers $headers
37
45
  $ZipName = $Response.assets[0].name
38
46
  $ZipUrl = $Response.assets[0].browser_download_url
39
47
 
@@ -52,4 +60,4 @@ Remove-Item $OutputPath
52
60
 
53
61
  # --- Rename the extracted folder to a standard name
54
62
  $LibDirName = $ZipName.Replace(".zip", "")
55
- Rename-Item -Path $LibDirName -NewName sword-build-win32
63
+ Rename-Item -Path $LibDirName -NewName sword-build-win32