@openziti/ziti-sdk-nodejs 0.6.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.
Files changed (42) hide show
  1. package/.github/workflows/build.yml +220 -0
  2. package/.github/workflows/codeql-analysis.yml +71 -0
  3. package/.github/workflows/mattermost-ziti-webhook.yml +26 -0
  4. package/.gitmodules +4 -0
  5. package/.travis.yml-obsolete +99 -0
  6. package/CODE_OF_CONDUCT.md +17 -0
  7. package/CONTRIBUTING.md +6 -0
  8. package/LICENSE +201 -0
  9. package/README.md +155 -0
  10. package/appveyor.yml-obsolete +32 -0
  11. package/binding.gyp +227 -0
  12. package/lib/index.js +17 -0
  13. package/lib/ziti.js +40 -0
  14. package/package.json +56 -0
  15. package/scripts/build-appveyor.bat +198 -0
  16. package/scripts/install_node.sh +99 -0
  17. package/scripts/validate_tag.sh +24 -0
  18. package/src/Ziti_https_request.c +960 -0
  19. package/src/Ziti_https_request_data.c +250 -0
  20. package/src/Ziti_https_request_end.c +79 -0
  21. package/src/stack_traces.c +334 -0
  22. package/src/utils.c +108 -0
  23. package/src/utils.h +85 -0
  24. package/src/ziti-add-on.c +88 -0
  25. package/src/ziti-nodejs.h +209 -0
  26. package/src/ziti_close.c +79 -0
  27. package/src/ziti_dial.c +375 -0
  28. package/src/ziti_enroll.c +245 -0
  29. package/src/ziti_hello.c +52 -0
  30. package/src/ziti_init.c +315 -0
  31. package/src/ziti_service_available.c +222 -0
  32. package/src/ziti_shutdown.c +47 -0
  33. package/src/ziti_websocket_connect.c +458 -0
  34. package/src/ziti_websocket_write.c +235 -0
  35. package/src/ziti_write.c +223 -0
  36. package/tests/enroll-test.js +38 -0
  37. package/tests/hello.js +12 -0
  38. package/tests/https-test.js +206 -0
  39. package/tests/mattermost-test.js +124 -0
  40. package/tests/websocket-test.js +119 -0
  41. package/ziti.js +1 -0
  42. package/ziti.png +0 -0
@@ -0,0 +1,220 @@
1
+
2
+ name: Build
3
+
4
+ on:
5
+ push:
6
+ branches: [ main ]
7
+ paths-ignore:
8
+ - 'package.json'
9
+ - 'CHANGELOG.md'
10
+ pull_request:
11
+ branches: [ main ]
12
+ workflow_dispatch:
13
+ inputs:
14
+ tags:
15
+ required: false
16
+ description: 'Misc tags'
17
+
18
+ jobs:
19
+
20
+ # -------------------------------------------------------------------------------
21
+ # Do a clean build, test, and publish
22
+ # -------------------------------------------------------------------------------
23
+ build:
24
+
25
+ runs-on: ${{ matrix.config.os }}
26
+
27
+ env:
28
+ BUILD_NUMBER: ${{ github.run_number }}
29
+
30
+ strategy:
31
+ matrix:
32
+ config:
33
+ # - { name: "Win", os: windows-latest, cc: "cl", cxx: "cl" }
34
+ - { name: "Lnx", os: ubuntu-18.04, cc: "gcc", cxx: "g++" }
35
+ - { name: "Mac", os: macos-latest, cc: "clang", cxx: "clang++" }
36
+ node: [ '12', '13', '14' ]
37
+ architecture:
38
+ - arm64
39
+ - x64
40
+ fail-fast: false
41
+
42
+ steps:
43
+
44
+ - name: Configure AWS Credentials
45
+ uses: aws-actions/configure-aws-credentials@v1
46
+ with:
47
+ aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
48
+ aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
49
+ aws-region: us-east-1
50
+
51
+ - name: Checkout
52
+ uses: actions/checkout@v2
53
+ with:
54
+ fetch-depth: 0
55
+ submodules: 'recursive'
56
+ token: ${{ secrets.ZITI_CI_GH_TOKEN }}
57
+
58
+ - name: Node Version
59
+ uses: actions/setup-node@v2
60
+ with:
61
+ node-version: ${{ matrix.node }}
62
+
63
+ - name: Extract branch name
64
+ shell: bash
65
+ run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
66
+ id: extract_branch
67
+
68
+ - name: Print branch name
69
+ shell: bash
70
+ run: |
71
+ echo "## branch name is: ${{ steps.extract_branch.outputs.branch }}"
72
+
73
+ - name: Get current date
74
+ id: date
75
+ run: echo "##[set-output name=date;]$(echo $(date))"
76
+
77
+ - name: Install Ninja (Linux)
78
+ run: sudo apt-get install -y ninja-build
79
+ if: matrix.config.os == 'ubuntu-18.04'
80
+
81
+ - name: Install Ninja (Mac)
82
+ run: brew install ninja
83
+ if: matrix.config.os == 'macOS-latest'
84
+
85
+ - name: Install Ninja (Windows)
86
+ uses: crazy-max/ghaction-chocolatey@v1
87
+ with:
88
+ args: install ninja
89
+ if: matrix.config.os == 'windows-latest'
90
+
91
+ - name: gcc version
92
+ run: |
93
+ gcc --version
94
+ - name: cmake version
95
+ run: |
96
+ cmake --version
97
+ - name: ninja version
98
+ run: |
99
+ ninja --version
100
+ - name: node version
101
+ run: |
102
+ node --version
103
+ - name: npm version
104
+ run: |
105
+ npm --version
106
+
107
+
108
+ - name: Build (embedded) C-SDK Phase-I (Linux)
109
+ run: |
110
+ mkdir ${{ runner.workspace }}/${{ github.event.repository.name }}/deps/ziti-sdk-c/build
111
+ cd ${{ runner.workspace }}/${{ github.event.repository.name }}/deps/ziti-sdk-c/build
112
+ cmake -G Ninja -DUSE_OPENSSL=on -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} ..
113
+ if: |
114
+ matrix.config.os == 'ubuntu-18.04'
115
+
116
+ - name: Build (embedded) C-SDK Phase-I ( Mac)
117
+ run: |
118
+ mkdir ${{ runner.workspace }}/${{ github.event.repository.name }}/deps/ziti-sdk-c/build
119
+ cd ${{ runner.workspace }}/${{ github.event.repository.name }}/deps/ziti-sdk-c/build
120
+ cmake -G Ninja -DUSE_OPENSSL=on -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib ..
121
+ if: |
122
+ matrix.config.os == 'macOS-latest'
123
+
124
+ - name: Build (embedded) C-SDK Phase-I (Windows)
125
+ run: |
126
+ vcpkg install openssl-windows:x64-windows
127
+ cmake -E make_directory ${{ runner.workspace }}/${{ github.event.repository.name }}/deps/ziti-sdk-c/build
128
+ cmake -S ${{ runner.workspace }}/${{ github.event.repository.name }}/deps/ziti-sdk-c -B ${{ runner.workspace }}/${{ github.event.repository.name }}/deps/ziti-sdk-c/build -DUSE_OPENSSL=on -DOPENSSL_ROOT_DIR=C:\vcpkg\packages\openssl_x64-windows
129
+ cmake --build ${{ runner.workspace }}/${{ github.event.repository.name }}/deps/ziti-sdk-c/build
130
+ if: matrix.config.os == 'windows-latest'
131
+
132
+ # - name: Build (embedded) C-SDK Phase-I (Windows)
133
+ # shell: cmd
134
+ # run: |
135
+ # mkdir ${{ runner.workspace }}\${{ github.event.repository.name }}\deps\ziti-sdk-c\build
136
+ # cd ${{ runner.workspace }}\${{ github.event.repository.name }}\deps\ziti-sdk-c\build
137
+ # call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
138
+ # vcpkg install openssl-windows:x64-windows
139
+ # cmake -G "NMake Makefiles" -DUSE_OPENSSL=on -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=OFF -DOPENSSL_ROOT_DIR=C:\vcpkg\packages\openssl_x64-windows ..
140
+ # if: matrix.config.os == 'windows-latest'
141
+
142
+
143
+
144
+ - name: Build (embedded) C-SDK Phase-II (Linux | Mac)
145
+ run: |
146
+ cd ${{ runner.workspace }}/${{ github.event.repository.name }}/deps/ziti-sdk-c/build
147
+ cmake --build . --target all
148
+ if: |
149
+ matrix.config.os == 'ubuntu-18.04' ||
150
+ matrix.config.os == 'macOS-latest'
151
+
152
+ # - name: Build (embedded) C-SDK Phase-II (Windows)
153
+ # shell: cmd
154
+ # run: |
155
+ # cd ${{ runner.workspace }}\${{ github.event.repository.name }}\deps\ziti-sdk-c\build
156
+ # call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
157
+ # nmake ziti
158
+ # powershell "(Get-Childitem uv_mbed.lib -Recurse -ErrorAction SilentlyContinue).Fullname"
159
+ # if: matrix.config.os == 'windows-latest'
160
+
161
+
162
+ #
163
+
164
+ - name: Build NodeJS-SDK (Linux | Mac)
165
+ run: |
166
+ cd ${{ runner.workspace }}/${{ github.event.repository.name }}
167
+ npm install --build-from-source --BUILD_DATE="$BUILD_DATE" --ZITI_BRANCH="`git branch --show-current`" --ZITI_COMMIT="`git rev-parse --short HEAD`" --ZITI_VERSION="`jq -r .version package.json`" --ZITI_OS="$RUNNER_OS" --ZITI_ARCH="x64"
168
+ env:
169
+ BUILD_DATE: ${{ steps.date.outputs.date }}
170
+ if: |
171
+ matrix.config.os == 'ubuntu-18.04' ||
172
+ matrix.config.os == 'macOS-latest'
173
+
174
+ - name: Build NodeJS-SDK (Windows)
175
+ run: |
176
+ cd ${{ runner.workspace }}/${{ github.event.repository.name }}
177
+ npm install --build-from-source --cd=%CD%
178
+ if: |
179
+ matrix.config.os == 'windows-latest'
180
+
181
+ - name: Hello test
182
+ run: |
183
+ node tests/hello.js
184
+
185
+ - name: Cleanup
186
+ run: |
187
+ npm run build:cleanup
188
+
189
+ - name: Publish Binary to S3 (Mac)
190
+ run: |
191
+ ./node_modules/.bin/node-pre-gyp package unpublish publish
192
+ sleep 5
193
+ if: |
194
+ steps.extract_branch.outputs.branch == 'main' && matrix.config.os == 'macOS-latest'
195
+
196
+ - name: Publish Binary to S3 (Linux)
197
+ run: |
198
+ ./node_modules/.bin/node-pre-gyp package unpublish publish
199
+ sleep 5
200
+ if: |
201
+ steps.extract_branch.outputs.branch == 'main' && matrix.config.os == 'ubuntu-18.04' && matrix.node != '14'
202
+
203
+ - name: Install Binary
204
+ run: |
205
+ npm install --fallback-to-build=false > /dev/null
206
+ sleep 5
207
+ if: |
208
+ steps.extract_branch.outputs.branch == 'main'
209
+
210
+ - name: Fetch Binary info
211
+ run: |
212
+ ./node_modules/.bin/node-pre-gyp info
213
+
214
+ - name: NPM Publish
215
+ uses: JS-DevTools/npm-publish@v1
216
+ with:
217
+ token: ${{ secrets.NPM_TOKEN }}
218
+ access: public
219
+ if: |
220
+ matrix.config.os == 'ubuntu-18.04' && matrix.node == '14' && steps.extract_branch.outputs.branch == 'main'
@@ -0,0 +1,71 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ name: "CodeQL"
7
+
8
+ on:
9
+ push:
10
+ branches: [master]
11
+ pull_request:
12
+ # The branches below must be a subset of the branches above
13
+ branches: [master]
14
+ schedule:
15
+ - cron: '0 12 * * 5'
16
+
17
+ jobs:
18
+ analyze:
19
+ name: Analyze
20
+ runs-on: ubuntu-latest
21
+
22
+ strategy:
23
+ fail-fast: false
24
+ matrix:
25
+ # Override automatic language detection by changing the below list
26
+ # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
27
+ language: ['cpp', 'javascript', 'python']
28
+ # Learn more...
29
+ # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
30
+
31
+ steps:
32
+ - name: Checkout repository
33
+ uses: actions/checkout@v2
34
+ with:
35
+ # We must fetch at least the immediate parents so that if this is
36
+ # a pull request then we can checkout the head.
37
+ fetch-depth: 2
38
+
39
+ # If this run was triggered by a pull request event, then checkout
40
+ # the head of the pull request instead of the merge commit.
41
+ - run: git checkout HEAD^2
42
+ if: ${{ github.event_name == 'pull_request' }}
43
+
44
+ # Initializes the CodeQL tools for scanning.
45
+ - name: Initialize CodeQL
46
+ uses: github/codeql-action/init@v1
47
+ with:
48
+ languages: ${{ matrix.language }}
49
+ # If you wish to specify custom queries, you can do so here or in a config file.
50
+ # By default, queries listed here will override any specified in a config file.
51
+ # Prefix the list here with "+" to use these queries and those in the config file.
52
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
53
+
54
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55
+ # If this step fails, then you should remove it and run the build manually (see below)
56
+ - name: Autobuild
57
+ uses: github/codeql-action/autobuild@v1
58
+
59
+ # ℹ️ Command-line programs to run using the OS shell.
60
+ # 📚 https://git.io/JvXDl
61
+
62
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63
+ # and modify them (or add more) to build your code if your project
64
+ # uses a compiled language
65
+
66
+ #- run: |
67
+ # make bootstrap
68
+ # make release
69
+
70
+ - name: Perform CodeQL Analysis
71
+ uses: github/codeql-action/analyze@v1
@@ -0,0 +1,26 @@
1
+ name: mattermost-ziti-webhook
2
+ on:
3
+ create:
4
+ delete:
5
+ issues:
6
+ issue_comment:
7
+ pull_request_review:
8
+ pull_request_review_comment:
9
+ pull_request:
10
+ push:
11
+ fork:
12
+ release:
13
+
14
+ jobs:
15
+ mattermost-ziti-webhook:
16
+ runs-on: macos-latest
17
+ name: POST Webhook
18
+ env:
19
+ ZITI_LOG: 99
20
+ ZITI_NODEJS_LOG: 99
21
+ steps:
22
+ - uses: openziti/ziti-webhook-action@main
23
+ with:
24
+ ziti-id: ${{ secrets.ZITI_MATTERMOST_IDENTITY }}
25
+ webhook-url: ${{ secrets.ZITI_MATTERMOST_WEBHOOK_URL }}
26
+ webhook-secret: ${{ secrets.ZITI_MATTERMOSTI_WEBHOOK_SECRET }}
package/.gitmodules ADDED
@@ -0,0 +1,4 @@
1
+ [submodule "deps/ziti-sdk-c"]
2
+ path = deps/ziti-sdk-c
3
+ url = https://github.com/netfoundry/ziti-sdk-c
4
+ branch = master
@@ -0,0 +1,99 @@
1
+ language: c
2
+ compiler:
3
+ - gcc
4
+ git:
5
+ depth: 10
6
+ submodules: false
7
+ matrix:
8
+ include:
9
+ - os: osx
10
+ osx_image: xcode11.2
11
+ compiler: gcc
12
+ addons:
13
+ homebrew:
14
+ packages:
15
+ - ninja
16
+ update: true
17
+ env:
18
+ - NODE_VERSION="14.15.3"
19
+ - os: osx
20
+ osx_image: xcode11.2
21
+ compiler: gcc
22
+ addons:
23
+ homebrew:
24
+ packages:
25
+ - ninja
26
+ update: true
27
+ env:
28
+ - NODE_VERSION="13.12.0"
29
+ - os: osx
30
+ osx_image: xcode11.2
31
+ compiler: gcc
32
+ addons:
33
+ homebrew:
34
+ packages:
35
+ - ninja
36
+ update: true
37
+ env: NODE_VERSION="12.16.0"
38
+ - os: linux
39
+ dist: focal
40
+ compiler: gcc
41
+ env:
42
+ - NODE_VERSION="13.12.0"
43
+ - DO_NPM_PUBLISH=true
44
+ addons:
45
+ apt:
46
+ packages:
47
+ - ninja-build
48
+ - os: linux
49
+ dist: focal
50
+ compiler: gcc
51
+ env: NODE_VERSION="12.16.0"
52
+ addons:
53
+ apt:
54
+ packages:
55
+ - ninja-build
56
+ env:
57
+ global:
58
+ - secure: vWZAh/2fhkmV5p5uW7CIqb3KsrXsQhDuiK75hQiRJWBozSHXF1Um/oFmPbT2MGi4Zgo8YZBprrb0lECRFrtzEsTjrhYbCtCGzv4Y1hiIZ0dPl0+vU1yTzHO9FMYohWagXFQNDrWfaLBCIttuNIrH55TiX4Ud9gEoQOFisuyFg/3lE/wKPL55/jaPH9KjpiN1Lv5yFUw4FwYRD57cL6FXOf/9tCkMVmVWU1mHElkkjqhanYqXWkVJ6w/hicu+hsOqV00/jtWJGXLv4lGJLQFgVTHUZDvuXShlIfIyixbsLbS0HbXmHBmxHxl5uAFGeMV8iq+Xf8AHBFQ0IL2T00Grw/8BomIK/Tit+1FDVeIt5yLw4UQP0z6T4Ds6w7jQZDNfaCrTEYbaDi9NF4wWOsoJWTFDSbuYRXwWJ3/r5BSPjPSPv4rDIMQxCt67vYgzOtmwtzkDTi1BciaDzfI+ZWjAIAszGCRsPEfZLdprYnc3SQQ1KTHiR3QZNSq9WElojhRU7+99LeXMYjVW1awb3u9DAx1+u8zSS2xAzOobNjj7lE47M71wIOoFf//kPjwHTdPhzGmi276nFOjqN7h3b45/mOLFngeyjvOlb3nkGx/3oZGt5pZZJaZFZuRxDndO1FP3DoJUozVVvt/91aXGNoUPz7QrtM+BwtLEUVhcTQvnAvg=
59
+ - secure: jqUCQcHHFWnOcAgbYs/iSk25Jjel+CLcfdsuoFeIHFGpB0c3TaDk9TK1rQGOjnpc7Qd04dGxJEg5PM3qEhvVoZD+CGVVuSDJSmwwMGnDDl72B9vpmG2sFJg95rvQevju6pgWK5FdqgqvzWwoEaAk9rugcKFa6pB73O9ByA5zVC+G5J0CfcUmgVWs2NWuBGuBiUgBvSEblsYvIF7ic5gUd8DNhF36BdkR0GpJFFG1ZQYtujmp8bqdLJW14Ob7yeOj6cID+iOjkAFdMD94BBQLqiPbQuso3waa/Pp884VAhNZRWMtefEL7hPfFuRI5UbRLwPa+R0IDi69/rgAx5AMAIFYUUxrZSR0LcMwLZCQx0ThETxHtYih7Gsi/2I5sGHzf8jeD5aVFPZVGXb2uOKBF2iDidvzyLfdCxpyECmaTXBPBmy7mGYmQvKltzMTvlVM3czZaXhs6FWCB8sSmFox1zI25Rr/CZCy+c1qRJ8Wi64R3FSv1MBxnGBfT5iSilv7X5cK0WlmoGnb6NCgmP1oDwzaHyUT1sOhRPg8CJeOf601xr03oVE8VvsgTOMVTumgDMjLtrS60iV7SKK3fzdcl0nGyBDjdAC8pApZSunVMGZNc0DSrokl9U57LWHqSosEQvXf89jOxfyao+ynn/t6RtmJabH5hTDy0ViqRljYvfII=
60
+ before_install:
61
+ - scripts/validate_tag.sh
62
+ - source ./scripts/install_node.sh ${NODE_VERSION}
63
+ - gcc --version
64
+ - cmake --version
65
+ - ninja --version
66
+ - node --version
67
+ - npm --version
68
+ - COMMIT_MESSAGE=$(git show -s --format=%B $TRAVIS_COMMIT | tr -d '\n')
69
+ - export PATH=./node_modules/.bin/:$PATH
70
+ - npm install node-gyp -g
71
+ - PUBLISH_BINARY=false
72
+ - if [[ $TRAVIS_BRANCH == `git describe --tags --always HEAD` ]]; then PUBLISH_BINARY=true; fi;
73
+ - if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then PUBLISH_BINARY=true; fi;
74
+ install:
75
+ - git submodule update --init --recursive
76
+ - npm run build:init
77
+ - npm run build:c-sdk
78
+ - npm install --build-from-source
79
+ - node tests/hello.js
80
+ - npm run build:cleanup
81
+ before_script:
82
+ - if [[ $PUBLISH_BINARY == true ]]; then node-pre-gyp package publish && sleep 10; fi;
83
+ script:
84
+ - sleep 5
85
+ - INSTALL_RESULT=0
86
+ - if [[ $PUBLISH_BINARY == true ]]; then INSTALL_RESULT=$(npm install --fallback-to-build=false > /dev/null)$? || true; fi;
87
+ - if [[ $INSTALL_RESULT != 0 ]]; then echo "returned $INSTALL_RESULT";node-pre-gyp unpublish;false; fi
88
+ after_success:
89
+ - node-pre-gyp info
90
+ deploy:
91
+ provider: npm
92
+ edge: true
93
+ email: curt.tudor@netfoundry.io
94
+ api_key:
95
+ secure: u9BzMSC2P7P/MwQxS6pHneEXSnVRUovzwjgiKEpT1pUvkqTNyUjfycdFVLuH98WKS9V5B+ipOolV1oon66ohl55Gc0I6C9uWtVPPOxNv3l2tq8NsDnO+9y1fZYfjInGxoeBua83HTb1GT4w7TaT2HxHMXqfYtISKlcwdTTFxDRZnnmq2CH/m2/HQM5lwnD1A8ptrP9CDfnnfb1IS06YgxBkT31sK5Z2m7zTBx/qNdCyIKDBVnZwzHE7COzUljrycgUAsLVdep3vs0UcaIB33Nyja+T3GKNagPQQUE47KYFEZ4omaFJJsF1JCwqxzZzjqH2uGe9xtJfDbAfgkouV2hc4EcdIsgy1Bmj1fSLS3U+HHRviouhNnSKXD8t4X/xiactcyydBrFiA+25B9lpftCvQ8l/UP8fqz9Uo5iy4ZklnUq8OPhM/AhAhke86DHagi7LwEYRHMzd9d1Z61YgYqduMbe7MUmZZY9HPADFdnMOs48ZzEuQvyEaK0JHjXhhmuLHLIyYbn52QlAppEJ35iJJls+3h4PxtVTHjk3r8pNs50SMp7iHJObGL1drMCAosSq+f5r/cEa/KRgwHpv+OIs2aZtqiV2DlygB39aNWMTIx0l4YAhpgnNYgWEbi/6YqHE/uKm5Rh7ExoygZEhDa/IYl79iyroS/teYWi9KK4qso=
96
+ on:
97
+ tags: true
98
+ branch: master
99
+ condition: "$DO_NPM_PUBLISH = true"
@@ -0,0 +1,17 @@
1
+ # Code of Conduct
2
+
3
+ All open source projects managed by NetFoundry share a common [code of
4
+ conduct](https://netfoundry.github.io/policies/CODE_OF_CONDUCT.html) which all contributors are expected to follow.
5
+ Please be sure you read, understand and adhere to the thoughts expressed therein.
6
+
7
+ Individuals acting in any way that is considered in violation of the Code of Conduct will receive corrective actions
8
+ appropriate for the violation. It is possible to act in ways which technically do not violate the Code of Conduct but
9
+ are clearly against the spirit of the project. These situations will also be considered on a case by case basis and if
10
+ necessary the Code of Conduct will be revised accordingly and approrpiate notifications will be made to the community
11
+ and to the violator.
12
+
13
+ ## Violations
14
+
15
+ Contributors violating the Code of Conduct will receive public notification of the violation. Continued violations or
16
+ aggregious violations of the Code of Conduct will result in the contributor being removed from the contributors list as
17
+ well as further contributions being declined.
@@ -0,0 +1,6 @@
1
+ # Contributing
2
+
3
+ NetFoundry welcomes all and any contributions. All open source projects managed by NetFoundry share a common
4
+ [guide for contributions](https://netfoundry.github.io/policies/CONTRIBUTING.html).
5
+
6
+ If you are eager to contribute to a NetFoundry-managed open source project please read and act accordingly.
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.