@openziti/ziti-sdk-nodejs 0.15.0 → 0.16.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 +5 -0
- package/lib/close.js +1 -1
- package/lib/dial.js +1 -1
- package/lib/express-listener.js +1 -1
- package/lib/express.js +1 -1
- package/lib/httpRequest.js +1 -1
- package/lib/httpRequestData.js +1 -1
- package/lib/httpRequestEnd.js +1 -1
- package/lib/index.js +1 -1
- package/lib/init.js +1 -1
- package/lib/listen.js +1 -1
- package/lib/serviceAvailable.js +1 -1
- package/lib/servicesRefresh.js +28 -0
- package/lib/setLogLevel.js +1 -1
- package/lib/write.js +1 -1
- package/lib/ziti-socket.js +1 -1
- package/lib/ziti.js +1 -1
- package/package.json +1 -1
- package/src/Ziti_https_request.c +1 -1
- package/src/Ziti_https_request_data.c +1 -1
- package/src/Ziti_https_request_end.c +1 -1
- package/src/stack_traces.c +1 -1
- package/src/utils.c +1 -1
- package/src/utils.h +1 -1
- package/src/ziti-add-on.c +2 -1
- package/src/ziti-nodejs.h +2 -1
- package/src/ziti_close.c +1 -1
- package/src/ziti_dial.c +1 -1
- package/src/ziti_enroll.c +1 -1
- package/src/ziti_init.c +1 -1
- package/src/ziti_listen.c +1 -1
- package/src/ziti_sdk_version.c +1 -1
- package/src/ziti_service_available.c +1 -1
- package/src/ziti_services_refresh.c +62 -0
- package/src/ziti_set_log_level.c +1 -1
- package/src/ziti_shutdown.c +1 -1
- package/src/ziti_websocket_connect.c +1 -1
- package/src/ziti_websocket_write.c +1 -1
- package/src/ziti_write.c +1 -1
|
@@ -57,6 +57,11 @@ jobs:
|
|
|
57
57
|
submodules: 'recursive'
|
|
58
58
|
# token: ${{ secrets.ZITI_CI_GH_TOKEN }}
|
|
59
59
|
|
|
60
|
+
- name: Setup PkgConfig (Windows)
|
|
61
|
+
if: matrix.config.target == 'windows'
|
|
62
|
+
run: |
|
|
63
|
+
choco install pkgconfiglite
|
|
64
|
+
|
|
60
65
|
- name: Get crossbuild tools
|
|
61
66
|
if: matrix.config.target == 'linux' && matrix.config.arch != 'x64'
|
|
62
67
|
run: |
|
package/lib/close.js
CHANGED
package/lib/dial.js
CHANGED
package/lib/express-listener.js
CHANGED
package/lib/express.js
CHANGED
package/lib/httpRequest.js
CHANGED
package/lib/httpRequestData.js
CHANGED
package/lib/httpRequestEnd.js
CHANGED
package/lib/index.js
CHANGED
package/lib/init.js
CHANGED
package/lib/listen.js
CHANGED
package/lib/serviceAvailable.js
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright NetFoundry Inc.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* servicesRefresh()
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
const servicesRefresh = () => {
|
|
23
|
+
|
|
24
|
+
ziti.ziti_services_refresh();
|
|
25
|
+
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.servicesRefresh = servicesRefresh;
|
package/lib/setLogLevel.js
CHANGED
package/lib/write.js
CHANGED
package/lib/ziti-socket.js
CHANGED
package/lib/ziti.js
CHANGED
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.16.0",
|
|
5
5
|
"main": "./lib/ziti",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "npm run build:init && npm run build:configure && npm run build:make",
|
package/src/Ziti_https_request.c
CHANGED
package/src/stack_traces.c
CHANGED
package/src/utils.c
CHANGED
package/src/utils.h
CHANGED
package/src/ziti-add-on.c
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright
|
|
2
|
+
Copyright NetFoundry Inc.
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -76,6 +76,7 @@ napi_value Init(napi_env env, napi_value exports) {
|
|
|
76
76
|
expose_ziti_init(env, exports);
|
|
77
77
|
expose_ziti_listen(env, exports);
|
|
78
78
|
expose_ziti_service_available(env, exports);
|
|
79
|
+
expose_ziti_services_refresh(env, exports);
|
|
79
80
|
expose_ziti_shutdown(env, exports);
|
|
80
81
|
expose_ziti_write(env, exports);
|
|
81
82
|
|
package/src/ziti-nodejs.h
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright NetFoundry
|
|
2
|
+
Copyright NetFoundry Inc.
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -207,6 +207,7 @@ extern void expose_ziti_sdk_version(napi_env env, napi_value exports);
|
|
|
207
207
|
extern void expose_ziti_init(napi_env env, napi_value exports);
|
|
208
208
|
extern void expose_ziti_listen(napi_env env, napi_value exports);
|
|
209
209
|
extern void expose_ziti_service_available(napi_env env, napi_value exports);
|
|
210
|
+
extern void expose_ziti_services_refresh(napi_env env, napi_value exports);
|
|
210
211
|
extern void expose_ziti_set_log_level(napi_env env, napi_value exports);
|
|
211
212
|
extern void expose_ziti_shutdown(napi_env env, napi_value exports);
|
|
212
213
|
extern void expose_ziti_write(napi_env env, napi_value exports);
|
package/src/ziti_close.c
CHANGED
package/src/ziti_dial.c
CHANGED
package/src/ziti_enroll.c
CHANGED
package/src/ziti_init.c
CHANGED
package/src/ziti_listen.c
CHANGED
package/src/ziti_sdk_version.c
CHANGED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright NetFoundry Inc.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
#include "ziti-nodejs.h"
|
|
18
|
+
#include <time.h>
|
|
19
|
+
|
|
20
|
+
void ziti_services_refresh(ziti_context ztx, bool now);
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
napi_value _ziti_services_refresh(napi_env env, const napi_callback_info info) {
|
|
27
|
+
napi_status status;
|
|
28
|
+
napi_value jsRetval;
|
|
29
|
+
|
|
30
|
+
ZITI_NODEJS_LOG(INFO, "ziti_services_refresh initiated");
|
|
31
|
+
|
|
32
|
+
// Now, call the C-SDK to refresh the services list
|
|
33
|
+
ziti_services_refresh(ztx, true);
|
|
34
|
+
|
|
35
|
+
status = napi_create_int32(env, 0 /* always succeed here */, &jsRetval);
|
|
36
|
+
if (status != napi_ok) {
|
|
37
|
+
napi_throw_error(env, NULL, "Unable to create return value");
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return jsRetval;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
void expose_ziti_services_refresh(napi_env env, napi_value exports) {
|
|
48
|
+
napi_status status;
|
|
49
|
+
napi_value fn;
|
|
50
|
+
|
|
51
|
+
status = napi_create_function(env, NULL, 0, _ziti_services_refresh, NULL, &fn);
|
|
52
|
+
if (status != napi_ok) {
|
|
53
|
+
napi_throw_error(env, NULL, "Unable to wrap native function '_ziti_services_refresh");
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
status = napi_set_named_property(env, exports, "ziti_services_refresh", fn);
|
|
57
|
+
if (status != napi_ok) {
|
|
58
|
+
napi_throw_error(env, NULL, "Unable to populate exports for 'ziti_services_refresh");
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
|
package/src/ziti_set_log_level.c
CHANGED
package/src/ziti_shutdown.c
CHANGED
package/src/ziti_write.c
CHANGED