@openziti/ziti-sdk-nodejs 0.6.0 → 0.7.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/.github/workflows/build.yml +23 -12
- package/README.md +19 -4
- package/binding.gyp +8 -8
- package/package.json +1 -1
|
@@ -31,12 +31,21 @@ jobs:
|
|
|
31
31
|
matrix:
|
|
32
32
|
config:
|
|
33
33
|
# - { name: "Win", os: windows-latest, cc: "cl", cxx: "cl" }
|
|
34
|
-
- {
|
|
35
|
-
- {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
34
|
+
- { os: ubuntu-18.04, cc: "gcc", cxx: "g++", node: '12' }
|
|
35
|
+
- { os: ubuntu-18.04, cc: "gcc", cxx: "g++", node: '13' }
|
|
36
|
+
- { os: ubuntu-18.04, cc: "gcc", cxx: "g++", node: '14' }
|
|
37
|
+
- { os: ubuntu-18.04, cc: "gcc", cxx: "g++", node: '15' }
|
|
38
|
+
- { os: ubuntu-18.04, cc: "gcc", cxx: "g++", node: '16' }
|
|
39
|
+
- { os: ubuntu-18.04, cc: "gcc", cxx: "g++", node: '17' }
|
|
40
|
+
- { os: ubuntu-20.04, cc: "gcc", cxx: "g++", node: '18' }
|
|
41
|
+
- { os: macos-latest, cc: "clang", cxx: "clang++", node: '12' }
|
|
42
|
+
- { os: macos-latest, cc: "clang", cxx: "clang++", node: '13' }
|
|
43
|
+
- { os: macos-latest, cc: "clang", cxx: "clang++", node: '14' }
|
|
44
|
+
- { os: macos-latest, cc: "clang", cxx: "clang++", node: '15' }
|
|
45
|
+
- { os: macos-latest, cc: "clang", cxx: "clang++", node: '16' }
|
|
46
|
+
- { os: macos-latest, cc: "clang", cxx: "clang++", node: '17' }
|
|
47
|
+
- { os: macos-latest, cc: "clang", cxx: "clang++", node: '18' }
|
|
48
|
+
architecture: [x64, arm64]
|
|
40
49
|
fail-fast: false
|
|
41
50
|
|
|
42
51
|
steps:
|
|
@@ -58,7 +67,7 @@ jobs:
|
|
|
58
67
|
- name: Node Version
|
|
59
68
|
uses: actions/setup-node@v2
|
|
60
69
|
with:
|
|
61
|
-
node-version: ${{ matrix.node }}
|
|
70
|
+
node-version: ${{ matrix.config.node }}
|
|
62
71
|
|
|
63
72
|
- name: Extract branch name
|
|
64
73
|
shell: bash
|
|
@@ -76,7 +85,7 @@ jobs:
|
|
|
76
85
|
|
|
77
86
|
- name: Install Ninja (Linux)
|
|
78
87
|
run: sudo apt-get install -y ninja-build
|
|
79
|
-
if: matrix.config.os == 'ubuntu-18.04'
|
|
88
|
+
if: matrix.config.os == 'ubuntu-18.04' || matrix.config.os == 'ubuntu-20.04'
|
|
80
89
|
|
|
81
90
|
- name: Install Ninja (Mac)
|
|
82
91
|
run: brew install ninja
|
|
@@ -111,7 +120,7 @@ jobs:
|
|
|
111
120
|
cd ${{ runner.workspace }}/${{ github.event.repository.name }}/deps/ziti-sdk-c/build
|
|
112
121
|
cmake -G Ninja -DUSE_OPENSSL=on -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} ..
|
|
113
122
|
if: |
|
|
114
|
-
matrix.config.os == 'ubuntu-18.04'
|
|
123
|
+
matrix.config.os == 'ubuntu-18.04' || matrix.config.os == 'ubuntu-20.04'
|
|
115
124
|
|
|
116
125
|
- name: Build (embedded) C-SDK Phase-I ( Mac)
|
|
117
126
|
run: |
|
|
@@ -146,7 +155,8 @@ jobs:
|
|
|
146
155
|
cd ${{ runner.workspace }}/${{ github.event.repository.name }}/deps/ziti-sdk-c/build
|
|
147
156
|
cmake --build . --target all
|
|
148
157
|
if: |
|
|
149
|
-
matrix.config.os == 'ubuntu-18.04' ||
|
|
158
|
+
matrix.config.os == 'ubuntu-18.04' ||
|
|
159
|
+
matrix.config.os == 'ubuntu-20.04' ||
|
|
150
160
|
matrix.config.os == 'macOS-latest'
|
|
151
161
|
|
|
152
162
|
# - name: Build (embedded) C-SDK Phase-II (Windows)
|
|
@@ -169,6 +179,7 @@ jobs:
|
|
|
169
179
|
BUILD_DATE: ${{ steps.date.outputs.date }}
|
|
170
180
|
if: |
|
|
171
181
|
matrix.config.os == 'ubuntu-18.04' ||
|
|
182
|
+
matrix.config.os == 'ubuntu-20.04' ||
|
|
172
183
|
matrix.config.os == 'macOS-latest'
|
|
173
184
|
|
|
174
185
|
- name: Build NodeJS-SDK (Windows)
|
|
@@ -198,7 +209,7 @@ jobs:
|
|
|
198
209
|
./node_modules/.bin/node-pre-gyp package unpublish publish
|
|
199
210
|
sleep 5
|
|
200
211
|
if: |
|
|
201
|
-
steps.extract_branch.outputs.branch == 'main' && matrix.config.os == 'ubuntu-18.04' && matrix.node != '14'
|
|
212
|
+
steps.extract_branch.outputs.branch == 'main' && matrix.config.os == 'ubuntu-18.04' && matrix.config.node != '14'
|
|
202
213
|
|
|
203
214
|
- name: Install Binary
|
|
204
215
|
run: |
|
|
@@ -217,4 +228,4 @@ jobs:
|
|
|
217
228
|
token: ${{ secrets.NPM_TOKEN }}
|
|
218
229
|
access: public
|
|
219
230
|
if: |
|
|
220
|
-
matrix.config.os == 'ubuntu-18.04' && matrix.node == '14' && steps.extract_branch.outputs.branch == 'main'
|
|
231
|
+
matrix.config.os == 'ubuntu-18.04' && matrix.config.node == '14' && steps.extract_branch.outputs.branch == 'main'
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
---
|
|
26
26
|
[]()
|
|
27
27
|
[]()
|
|
28
|
-
[](https://badge.fury.io/js/@openziti%2Fziti-sdk-nodejs)
|
|
28
|
+
[](https://badge.fury.io/js/@openziti%2Fziti-sdk-nodejs.svg)
|
|
29
29
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
30
30
|
[]()
|
|
31
31
|
[](CONTRIBUTING.md)
|
|
@@ -38,9 +38,16 @@
|
|
|
38
38
|
|
|
39
39
|
# Supported platforms
|
|
40
40
|
|
|
41
|
-
The
|
|
41
|
+
The `@openziti/ziti-sdk-nodejs` module works with the following Node.js versions:
|
|
42
|
+
- v12.x
|
|
43
|
+
- v13.x
|
|
44
|
+
- v14.x
|
|
45
|
+
- v15.x
|
|
46
|
+
- v16.x
|
|
47
|
+
- v17.x
|
|
48
|
+
- v18.x
|
|
42
49
|
|
|
43
|
-
Binaries for most Node versions and platforms are provided by default via [node-pre-gyp](https://github.com/mapbox/node-pre-gyp).
|
|
50
|
+
Binaries for most Node versions and platforms are provided by default via [@mapbox/node-pre-gyp](https://github.com/mapbox/node-pre-gyp).
|
|
44
51
|
|
|
45
52
|
# Installing
|
|
46
53
|
|
|
@@ -48,13 +55,21 @@ Binaries for most Node versions and platforms are provided by default via [node-
|
|
|
48
55
|
npm i @openziti/ziti-sdk-nodejs
|
|
49
56
|
```
|
|
50
57
|
|
|
58
|
+
Special note on previous package:
|
|
59
|
+
|
|
60
|
+
On June 7, 2020 @openziti/ziti-sdk-nodejs@0.6.0 was released. Older, unscoped versions that are not part of the @openziti org are deprecated and only @openziti/ziti-sdk-nodejs will see updates going forward. To upgrade to the new package do:
|
|
61
|
+
|
|
62
|
+
``` js
|
|
63
|
+
npm uninstall ziti-sdk-nodejs --save
|
|
64
|
+
npm install @openziti/ziti-sdk-nodejs --save
|
|
65
|
+
```
|
|
51
66
|
|
|
52
67
|
# Usage
|
|
53
68
|
|
|
54
69
|
**Note:** the module must be [installed](#installing) before use.
|
|
55
70
|
|
|
56
71
|
``` js
|
|
57
|
-
var ziti = require('ziti-sdk-nodejs');
|
|
72
|
+
var ziti = require('@openziti/ziti-sdk-nodejs');
|
|
58
73
|
|
|
59
74
|
const ziti_init = async (identity) => {
|
|
60
75
|
return new Promise((resolve) => {
|
package/binding.gyp
CHANGED
|
@@ -8,19 +8,18 @@
|
|
|
8
8
|
# node v0.6.x doesn't give us its build variables,
|
|
9
9
|
# but on Unix it was only possible to use the system OpenSSL library,
|
|
10
10
|
# so default the variable to "true", v0.8.x node and up will overwrite it.
|
|
11
|
-
'node_shared_openssl%': 'true'
|
|
11
|
+
'node_shared_openssl%': 'true',
|
|
12
12
|
|
|
13
13
|
},
|
|
14
14
|
|
|
15
15
|
"targets": [
|
|
16
16
|
{
|
|
17
17
|
'defines': [
|
|
18
|
-
'BUILD_DATE
|
|
19
|
-
'ZITI_BRANCH
|
|
20
|
-
'ZITI_COMMIT
|
|
21
|
-
'ZITI_VERSION
|
|
22
|
-
'
|
|
23
|
-
'ZITI_ARCH=<@(ZITI_ARCH)',
|
|
18
|
+
'BUILD_DATE=<!(echo <!(date))',
|
|
19
|
+
'ZITI_BRANCH=<!(git branch --show-current)',
|
|
20
|
+
'ZITI_COMMIT=<!(git rev-parse --short HEAD)',
|
|
21
|
+
'ZITI_VERSION=<!(jq -r .version package.json)',
|
|
22
|
+
'ZITI_ARCH=<!(arch)',
|
|
24
23
|
],
|
|
25
24
|
|
|
26
25
|
"target_name": "<(module_name)",
|
|
@@ -112,7 +111,8 @@
|
|
|
112
111
|
"-fno-strict-aliasing",
|
|
113
112
|
"-g",
|
|
114
113
|
"-fno-pie",
|
|
115
|
-
"-DSOURCE_PATH_SIZE=3"
|
|
114
|
+
"-DSOURCE_PATH_SIZE=3",
|
|
115
|
+
"-DZITI_OS=macos"
|
|
116
116
|
],
|
|
117
117
|
"OTHER_LDFLAGS": [
|
|
118
118
|
"-g",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openziti/ziti-sdk-nodejs",
|
|
3
3
|
"description": "A NodeJS-based SDK for delivering secure applications over a Ziti Network",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.0",
|
|
5
5
|
"main": "./lib/ziti",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "npm run build:init; npm run build:c-sdk; npm install --build-from-source --clang=1",
|