@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.
@@ -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
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
package/lib/dial.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
package/lib/express.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
package/lib/init.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
package/lib/listen.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
@@ -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;
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
package/lib/write.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
package/lib/ziti.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
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.15.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",
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
package/src/utils.c CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
package/src/utils.h CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
package/src/ziti-add-on.c CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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, Inc.
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
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
package/src/ziti_dial.c CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
package/src/ziti_enroll.c CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
package/src/ziti_init.c CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
package/src/ziti_listen.c CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
@@ -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
+
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.
package/src/ziti_write.c CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright Netfoundry, Inc.
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.