appium-ios-tuntap 0.0.11 → 0.1.1
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/CHANGELOG.md +17 -0
- package/build/Makefile +2 -2
- package/build/Release/.deps/Release/obj.target/nothing/node_modules/node-addon-api/nothing.o.d +1 -1
- package/build/Release/.deps/Release/obj.target/tuntap/src/tuntap.o.d +21 -21
- package/build/Release/nothing.a +0 -0
- package/build/Release/obj.target/nothing/node_modules/node-addon-api/nothing.o +0 -0
- package/build/Release/obj.target/tuntap/src/tuntap.o +0 -0
- package/build/Release/tuntap.node +0 -0
- package/build/config.gypi +15 -10
- package/build/gyp-mac-tool +97 -99
- package/build/node_modules/node-addon-api/nothing.target.mk +14 -14
- package/build/tuntap.target.mk +14 -14
- package/package.json +8 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## [0.1.1](https://github.com/appium/appium-ios-tuntap/compare/v0.1.0...v0.1.1) (2025-10-17)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* **deps-dev:** bump semantic-release from 24.2.9 to 25.0.0 ([#18](https://github.com/appium/appium-ios-tuntap/issues/18)) ([58a93f9](https://github.com/appium/appium-ios-tuntap/commit/58a93f9a7e0d9882272a943fad63dabb5c00dc33))
|
|
6
|
+
|
|
7
|
+
## [0.1.0](https://github.com/appium/appium-ios-tuntap/compare/v0.0.11...v0.1.0) (2025-08-16)
|
|
8
|
+
|
|
9
|
+
### ⚠ BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* Required Node.js version has been bumped to ^20.19.0 || ^22.12.0 || >=24.0.0
|
|
12
|
+
* Required npm version has been bumped to >=10
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* Set minium Node.js version ([#16](https://github.com/appium/appium-ios-tuntap/issues/16)) ([3493f7b](https://github.com/appium/appium-ios-tuntap/commit/3493f7bb7b66b036f362f5c0780503dd1a324cee))
|
|
17
|
+
|
|
1
18
|
## [0.0.11](https://github.com/appium/appium-ios-tuntap/compare/v0.0.10...v0.0.11) (2025-07-23)
|
|
2
19
|
|
|
3
20
|
### Bug Fixes
|
package/build/Makefile
CHANGED
|
@@ -336,8 +336,8 @@ ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
|
|
336
336
|
endif
|
|
337
337
|
|
|
338
338
|
quiet_cmd_regen_makefile = ACTION Regenerating $@
|
|
339
|
-
cmd_regen_makefile = cd $(srcdir); /Users/runner/work/appium-ios-tuntap/appium-ios-tuntap/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/runner/Library/Caches/node-gyp/22.
|
|
340
|
-
Makefile: $(srcdir)
|
|
339
|
+
cmd_regen_makefile = cd $(srcdir); /Users/runner/work/appium-ios-tuntap/appium-ios-tuntap/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/runner/Library/Caches/node-gyp/22.20.0" "-Dnode_gyp_dir=/Users/runner/work/appium-ios-tuntap/appium-ios-tuntap/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=/Users/runner/Library/Caches/node-gyp/22.20.0/<(target_arch)/node.lib" "-Dmodule_root_dir=/Users/runner/work/appium-ios-tuntap/appium-ios-tuntap" "-Dnode_engine=v8" "--depth=." "-Goutput_dir=." "--generator-output=build" -I/Users/runner/work/appium-ios-tuntap/appium-ios-tuntap/build/config.gypi -I/Users/runner/work/appium-ios-tuntap/appium-ios-tuntap/node_modules/npm/node_modules/node-gyp/addon.gypi -I/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/common.gypi "--toplevel-dir=." binding.gyp
|
|
340
|
+
Makefile: $(srcdir)/../../../Library/Caches/node-gyp/22.20.0/include/node/common.gypi $(srcdir)/binding.gyp $(srcdir)/build/config.gypi $(srcdir)/node_modules/node-addon-api/node_api.gyp $(srcdir)/node_modules/npm/node_modules/node-gyp/addon.gypi
|
|
341
341
|
$(call do_cmd,regen_makefile)
|
|
342
342
|
|
|
343
343
|
# "all" is a concatenation of the "all" targets from all the included
|
package/build/Release/.deps/Release/obj.target/nothing/node_modules/node-addon-api/nothing.o.d
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
cmd_Release/obj.target/nothing/node_modules/node-addon-api/nothing.o := cc -o Release/obj.target/nothing/node_modules/node-addon-api/nothing.o ../node_modules/node-addon-api/nothing.c '-DNODE_GYP_MODULE_NAME=nothing' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_FILE_OFFSET_BITS=64' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' -I/Users/runner/Library/Caches/node-gyp/22.
|
|
1
|
+
cmd_Release/obj.target/nothing/node_modules/node-addon-api/nothing.o := cc -o Release/obj.target/nothing/node_modules/node-addon-api/nothing.o ../node_modules/node-addon-api/nothing.c '-DNODE_GYP_MODULE_NAME=nothing' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_FILE_OFFSET_BITS=64' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' -I/Users/runner/Library/Caches/node-gyp/22.20.0/include/node -I/Users/runner/Library/Caches/node-gyp/22.20.0/src -I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/openssl/config -I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/openssl/openssl/include -I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/uv/include -I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/zlib -I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/v8/include -O3 -gdwarf-2 -fno-strict-aliasing -mmacosx-version-min=11.0 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -MMD -MF ./Release/.deps/Release/obj.target/nothing/node_modules/node-addon-api/nothing.o.d.raw -c
|
|
2
2
|
Release/obj.target/nothing/node_modules/node-addon-api/nothing.o: \
|
|
3
3
|
../node_modules/node-addon-api/nothing.c
|
|
4
4
|
../node_modules/node-addon-api/nothing.c:
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
cmd_Release/obj.target/tuntap/src/tuntap.o := c++ -o Release/obj.target/tuntap/src/tuntap.o ../src/tuntap.cc '-DNODE_GYP_MODULE_NAME=tuntap' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_FILE_OFFSET_BITS=64' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DNAPI_CPP_EXCEPTIONS' '-DNAPI_VERSION=8' '-DBUILDING_NODE_EXTENSION' -I/Users/runner/Library/Caches/node-gyp/22.
|
|
1
|
+
cmd_Release/obj.target/tuntap/src/tuntap.o := c++ -o Release/obj.target/tuntap/src/tuntap.o ../src/tuntap.cc '-DNODE_GYP_MODULE_NAME=tuntap' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_FILE_OFFSET_BITS=64' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DNAPI_CPP_EXCEPTIONS' '-DNAPI_VERSION=8' '-DBUILDING_NODE_EXTENSION' -I/Users/runner/Library/Caches/node-gyp/22.20.0/include/node -I/Users/runner/Library/Caches/node-gyp/22.20.0/src -I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/openssl/config -I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/openssl/openssl/include -I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/uv/include -I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/zlib -I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/v8/include -I/Users/runner/work/appium-ios-tuntap/appium-ios-tuntap/node_modules/node-addon-api -O3 -gdwarf-2 -fno-strict-aliasing -mmacosx-version-min=10.15 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -Wall -Wextra -Wno-unused-parameter -Wno-vla-extension -Wno-error -std=c++17 -stdlib=libc++ -fno-rtti -O3 -fPIC -MMD -MF ./Release/.deps/Release/obj.target/tuntap/src/tuntap.o.d.raw -c
|
|
2
2
|
Release/obj.target/tuntap/src/tuntap.o: ../src/tuntap.cc \
|
|
3
3
|
/Users/runner/work/appium-ios-tuntap/appium-ios-tuntap/node_modules/node-addon-api/napi.h \
|
|
4
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
5
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
6
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
7
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
4
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/node_api.h \
|
|
5
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/js_native_api.h \
|
|
6
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/js_native_api_types.h \
|
|
7
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/node_api_types.h \
|
|
8
8
|
/Users/runner/work/appium-ios-tuntap/appium-ios-tuntap/node_modules/node-addon-api/napi-inl.h \
|
|
9
9
|
/Users/runner/work/appium-ios-tuntap/appium-ios-tuntap/node_modules/node-addon-api/napi-inl.deprecated.h \
|
|
10
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
11
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
12
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
13
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
14
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
15
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
10
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/uv.h \
|
|
11
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/uv/errno.h \
|
|
12
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/uv/version.h \
|
|
13
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/uv/unix.h \
|
|
14
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/uv/threadpool.h \
|
|
15
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/uv/darwin.h
|
|
16
16
|
../src/tuntap.cc:
|
|
17
17
|
/Users/runner/work/appium-ios-tuntap/appium-ios-tuntap/node_modules/node-addon-api/napi.h:
|
|
18
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
19
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
20
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
21
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
18
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/node_api.h:
|
|
19
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/js_native_api.h:
|
|
20
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/js_native_api_types.h:
|
|
21
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/node_api_types.h:
|
|
22
22
|
/Users/runner/work/appium-ios-tuntap/appium-ios-tuntap/node_modules/node-addon-api/napi-inl.h:
|
|
23
23
|
/Users/runner/work/appium-ios-tuntap/appium-ios-tuntap/node_modules/node-addon-api/napi-inl.deprecated.h:
|
|
24
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
25
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
26
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
27
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
28
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
29
|
-
/Users/runner/Library/Caches/node-gyp/22.
|
|
24
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/uv.h:
|
|
25
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/uv/errno.h:
|
|
26
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/uv/version.h:
|
|
27
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/uv/unix.h:
|
|
28
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/uv/threadpool.h:
|
|
29
|
+
/Users/runner/Library/Caches/node-gyp/22.20.0/include/node/uv/darwin.h:
|
package/build/Release/nothing.a
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/build/config.gypi
CHANGED
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
"node_debug_lib": "false",
|
|
86
86
|
"node_enable_d8": "false",
|
|
87
87
|
"node_enable_v8_vtunejit": "false",
|
|
88
|
+
"node_enable_v8windbg": "false",
|
|
88
89
|
"node_fipsinstall": "false",
|
|
89
90
|
"node_install_corepack": "true",
|
|
90
91
|
"node_install_npm": "true",
|
|
@@ -218,6 +219,8 @@
|
|
|
218
219
|
"lib/internal/http2/util.js",
|
|
219
220
|
"lib/internal/inspector/network.js",
|
|
220
221
|
"lib/internal/inspector/network_http.js",
|
|
222
|
+
"lib/internal/inspector/network_http2.js",
|
|
223
|
+
"lib/internal/inspector/network_resources.js",
|
|
221
224
|
"lib/internal/inspector/network_undici.js",
|
|
222
225
|
"lib/internal/inspector_async_hook.js",
|
|
223
226
|
"lib/internal/inspector_network_tracking.js",
|
|
@@ -362,6 +365,7 @@
|
|
|
362
365
|
"lib/internal/util/inspector.js",
|
|
363
366
|
"lib/internal/util/parse_args/parse_args.js",
|
|
364
367
|
"lib/internal/util/parse_args/utils.js",
|
|
368
|
+
"lib/internal/util/trace_sigint.js",
|
|
365
369
|
"lib/internal/util/types.js",
|
|
366
370
|
"lib/internal/v8/startup_snapshot.js",
|
|
367
371
|
"lib/internal/v8_prof_polyfill.js",
|
|
@@ -384,6 +388,7 @@
|
|
|
384
388
|
"lib/internal/webstreams/util.js",
|
|
385
389
|
"lib/internal/webstreams/writablestream.js",
|
|
386
390
|
"lib/internal/worker.js",
|
|
391
|
+
"lib/internal/worker/clone_dom_exception.js",
|
|
387
392
|
"lib/internal/worker/io.js",
|
|
388
393
|
"lib/internal/worker/js_transferable.js",
|
|
389
394
|
"lib/internal/worker/messaging.js",
|
|
@@ -489,18 +494,18 @@
|
|
|
489
494
|
"v8_use_siphash": 1,
|
|
490
495
|
"want_separate_host_toolset": 0,
|
|
491
496
|
"xcode_version": "16.0",
|
|
492
|
-
"nodedir": "/Users/runner/Library/Caches/node-gyp/22.
|
|
497
|
+
"nodedir": "/Users/runner/Library/Caches/node-gyp/22.20.0",
|
|
493
498
|
"python": "/opt/homebrew/opt/python@3.13/bin/python3.13",
|
|
494
499
|
"standalone_static_library": 1,
|
|
495
|
-
"
|
|
496
|
-
"
|
|
497
|
-
"globalconfig": "/Users/runner/hostedtoolcache/node/22.17.1/arm64/etc/npmrc",
|
|
498
|
-
"init_module": "/Users/runner/.npm-init.js",
|
|
499
|
-
"userconfig": "/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/233d71b3d8517d57781a1abc9350a2e7/.npmrc",
|
|
500
|
-
"npm_version": "10.9.2",
|
|
501
|
-
"node_gyp": "/Users/runner/work/appium-ios-tuntap/appium-ios-tuntap/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",
|
|
500
|
+
"prefix": "/Users/runner/hostedtoolcache/node/22.20.0/arm64",
|
|
501
|
+
"user_agent": "npm/10.9.3 node/v22.20.0 darwin arm64 workspaces/false ci/github-actions",
|
|
502
502
|
"cache": "/Users/runner/.npm",
|
|
503
|
-
"
|
|
504
|
-
"
|
|
503
|
+
"node_gyp": "/Users/runner/work/appium-ios-tuntap/appium-ios-tuntap/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",
|
|
504
|
+
"npm_version": "10.9.3",
|
|
505
|
+
"userconfig": "/private/var/folders/q0/wmf37v850txck86cpnvwm_zw0000gn/T/040599518e6430be4b6a25221fdb5e37/.npmrc",
|
|
506
|
+
"init_module": "/Users/runner/.npm-init.js",
|
|
507
|
+
"globalconfig": "/Users/runner/hostedtoolcache/node/22.20.0/arm64/etc/npmrc",
|
|
508
|
+
"local_prefix": "/Users/runner/work/appium-ios-tuntap/appium-ios-tuntap",
|
|
509
|
+
"global_prefix": "/Users/runner/hostedtoolcache/node/22.20.0/arm64"
|
|
505
510
|
}
|
|
506
511
|
}
|
package/build/gyp-mac-tool
CHANGED
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
These functions are executed via gyp-mac-tool when using the Makefile generator.
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
|
-
|
|
13
12
|
import fcntl
|
|
14
13
|
import fnmatch
|
|
15
14
|
import glob
|
|
@@ -26,14 +25,13 @@ import tempfile
|
|
|
26
25
|
|
|
27
26
|
def main(args):
|
|
28
27
|
executor = MacTool()
|
|
29
|
-
exit_code
|
|
30
|
-
if exit_code is not None:
|
|
28
|
+
if (exit_code := executor.Dispatch(args)) is not None:
|
|
31
29
|
sys.exit(exit_code)
|
|
32
30
|
|
|
33
31
|
|
|
34
32
|
class MacTool:
|
|
35
33
|
"""This class performs all the Mac tooling steps. The methods can either be
|
|
36
|
-
|
|
34
|
+
executed directly, or dispatched from an argument list."""
|
|
37
35
|
|
|
38
36
|
def Dispatch(self, args):
|
|
39
37
|
"""Dispatches a string command to a method."""
|
|
@@ -49,7 +47,7 @@ class MacTool:
|
|
|
49
47
|
|
|
50
48
|
def ExecCopyBundleResource(self, source, dest, convert_to_binary):
|
|
51
49
|
"""Copies a resource file to the bundle/Resources directory, performing any
|
|
52
|
-
|
|
50
|
+
necessary compilation on each resource."""
|
|
53
51
|
convert_to_binary = convert_to_binary == "True"
|
|
54
52
|
extension = os.path.splitext(source)[1].lower()
|
|
55
53
|
if os.path.isdir(source):
|
|
@@ -143,7 +141,7 @@ class MacTool:
|
|
|
143
141
|
# CFPropertyListCreateFromXMLData(): Old-style plist parser: missing
|
|
144
142
|
# semicolon in dictionary.
|
|
145
143
|
# on invalid files. Do the same kind of validation.
|
|
146
|
-
import CoreFoundation
|
|
144
|
+
import CoreFoundation # noqa: PLC0415
|
|
147
145
|
|
|
148
146
|
with open(source, "rb") as in_file:
|
|
149
147
|
s = in_file.read()
|
|
@@ -157,15 +155,15 @@ class MacTool:
|
|
|
157
155
|
|
|
158
156
|
def _DetectInputEncoding(self, file_name):
|
|
159
157
|
"""Reads the first few bytes from file_name and tries to guess the text
|
|
160
|
-
|
|
158
|
+
encoding. Returns None as a guess if it can't detect it."""
|
|
161
159
|
with open(file_name, "rb") as fp:
|
|
162
160
|
try:
|
|
163
161
|
header = fp.read(3)
|
|
164
162
|
except Exception:
|
|
165
163
|
return None
|
|
166
|
-
if header.startswith((b"\
|
|
164
|
+
if header.startswith((b"\xfe\xff", b"\xff\xfe")):
|
|
167
165
|
return "UTF-16"
|
|
168
|
-
elif header.startswith(b"\
|
|
166
|
+
elif header.startswith(b"\xef\xbb\xbf"):
|
|
169
167
|
return "UTF-8"
|
|
170
168
|
else:
|
|
171
169
|
return None
|
|
@@ -256,7 +254,7 @@ class MacTool:
|
|
|
256
254
|
|
|
257
255
|
def ExecFilterLibtool(self, *cmd_list):
|
|
258
256
|
"""Calls libtool and filters out '/path/to/libtool: file: foo.o has no
|
|
259
|
-
|
|
257
|
+
symbols'."""
|
|
260
258
|
libtool_re = re.compile(
|
|
261
259
|
r"^.*libtool: (?:for architecture: \S* )?file: .* has no symbols$"
|
|
262
260
|
)
|
|
@@ -305,7 +303,7 @@ class MacTool:
|
|
|
305
303
|
|
|
306
304
|
def ExecPackageFramework(self, framework, version):
|
|
307
305
|
"""Takes a path to Something.framework and the Current version of that and
|
|
308
|
-
|
|
306
|
+
sets up all the symlinks."""
|
|
309
307
|
# Find the name of the binary based on the part before the ".framework".
|
|
310
308
|
binary = os.path.basename(framework).split(".")[0]
|
|
311
309
|
|
|
@@ -334,7 +332,7 @@ class MacTool:
|
|
|
334
332
|
|
|
335
333
|
def _Relink(self, dest, link):
|
|
336
334
|
"""Creates a symlink to |dest| named |link|. If |link| already exists,
|
|
337
|
-
|
|
335
|
+
it is overwritten."""
|
|
338
336
|
if os.path.lexists(link):
|
|
339
337
|
os.remove(link)
|
|
340
338
|
os.symlink(dest, link)
|
|
@@ -359,14 +357,14 @@ class MacTool:
|
|
|
359
357
|
def ExecCompileXcassets(self, keys, *inputs):
|
|
360
358
|
"""Compiles multiple .xcassets files into a single .car file.
|
|
361
359
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
360
|
+
This invokes 'actool' to compile all the inputs .xcassets files. The
|
|
361
|
+
|keys| arguments is a json-encoded dictionary of extra arguments to
|
|
362
|
+
pass to 'actool' when the asset catalogs contains an application icon
|
|
363
|
+
or a launch image.
|
|
366
364
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
365
|
+
Note that 'actool' does not create the Assets.car file if the asset
|
|
366
|
+
catalogs does not contains imageset.
|
|
367
|
+
"""
|
|
370
368
|
command_line = [
|
|
371
369
|
"xcrun",
|
|
372
370
|
"actool",
|
|
@@ -439,13 +437,13 @@ class MacTool:
|
|
|
439
437
|
def ExecCodeSignBundle(self, key, entitlements, provisioning, path, preserve):
|
|
440
438
|
"""Code sign a bundle.
|
|
441
439
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
440
|
+
This function tries to code sign an iOS bundle, following the same
|
|
441
|
+
algorithm as Xcode:
|
|
442
|
+
1. pick the provisioning profile that best match the bundle identifier,
|
|
443
|
+
and copy it into the bundle as embedded.mobileprovision,
|
|
444
|
+
2. copy Entitlements.plist from user or SDK next to the bundle,
|
|
445
|
+
3. code sign the bundle.
|
|
446
|
+
"""
|
|
449
447
|
substitutions, overrides = self._InstallProvisioningProfile(
|
|
450
448
|
provisioning, self._GetCFBundleIdentifier()
|
|
451
449
|
)
|
|
@@ -464,16 +462,16 @@ class MacTool:
|
|
|
464
462
|
def _InstallProvisioningProfile(self, profile, bundle_identifier):
|
|
465
463
|
"""Installs embedded.mobileprovision into the bundle.
|
|
466
464
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
465
|
+
Args:
|
|
466
|
+
profile: string, optional, short name of the .mobileprovision file
|
|
467
|
+
to use, if empty or the file is missing, the best file installed
|
|
468
|
+
will be used
|
|
469
|
+
bundle_identifier: string, value of CFBundleIdentifier from Info.plist
|
|
472
470
|
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
471
|
+
Returns:
|
|
472
|
+
A tuple containing two dictionary: variables substitutions and values
|
|
473
|
+
to overrides when generating the entitlements file.
|
|
474
|
+
"""
|
|
477
475
|
source_path, provisioning_data, team_id = self._FindProvisioningProfile(
|
|
478
476
|
profile, bundle_identifier
|
|
479
477
|
)
|
|
@@ -489,24 +487,24 @@ class MacTool:
|
|
|
489
487
|
def _FindProvisioningProfile(self, profile, bundle_identifier):
|
|
490
488
|
"""Finds the .mobileprovision file to use for signing the bundle.
|
|
491
489
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
490
|
+
Checks all the installed provisioning profiles (or if the user specified
|
|
491
|
+
the PROVISIONING_PROFILE variable, only consult it) and select the most
|
|
492
|
+
specific that correspond to the bundle identifier.
|
|
495
493
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
494
|
+
Args:
|
|
495
|
+
profile: string, optional, short name of the .mobileprovision file
|
|
496
|
+
to use, if empty or the file is missing, the best file installed
|
|
497
|
+
will be used
|
|
498
|
+
bundle_identifier: string, value of CFBundleIdentifier from Info.plist
|
|
501
499
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
500
|
+
Returns:
|
|
501
|
+
A tuple of the path to the selected provisioning profile, the data of
|
|
502
|
+
the embedded plist in the provisioning profile and the team identifier
|
|
503
|
+
to use for code signing.
|
|
506
504
|
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
505
|
+
Raises:
|
|
506
|
+
SystemExit: if no .mobileprovision can be used to sign the bundle.
|
|
507
|
+
"""
|
|
510
508
|
profiles_dir = os.path.join(
|
|
511
509
|
os.environ["HOME"], "Library", "MobileDevice", "Provisioning Profiles"
|
|
512
510
|
)
|
|
@@ -554,12 +552,12 @@ class MacTool:
|
|
|
554
552
|
def _LoadProvisioningProfile(self, profile_path):
|
|
555
553
|
"""Extracts the plist embedded in a provisioning profile.
|
|
556
554
|
|
|
557
|
-
|
|
558
|
-
|
|
555
|
+
Args:
|
|
556
|
+
profile_path: string, path to the .mobileprovision file
|
|
559
557
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
558
|
+
Returns:
|
|
559
|
+
Content of the plist embedded in the provisioning profile as a dictionary.
|
|
560
|
+
"""
|
|
563
561
|
with tempfile.NamedTemporaryFile() as temp:
|
|
564
562
|
subprocess.check_call(
|
|
565
563
|
["security", "cms", "-D", "-i", profile_path, "-o", temp.name]
|
|
@@ -582,16 +580,16 @@ class MacTool:
|
|
|
582
580
|
def _LoadPlistMaybeBinary(self, plist_path):
|
|
583
581
|
"""Loads into a memory a plist possibly encoded in binary format.
|
|
584
582
|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
583
|
+
This is a wrapper around plistlib.readPlist that tries to convert the
|
|
584
|
+
plist to the XML format if it can't be parsed (assuming that it is in
|
|
585
|
+
the binary format).
|
|
588
586
|
|
|
589
|
-
|
|
590
|
-
|
|
587
|
+
Args:
|
|
588
|
+
plist_path: string, path to a plist file, in XML or binary format
|
|
591
589
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
590
|
+
Returns:
|
|
591
|
+
Content of the plist as a dictionary.
|
|
592
|
+
"""
|
|
595
593
|
try:
|
|
596
594
|
# First, try to read the file using plistlib that only supports XML,
|
|
597
595
|
# and if an exception is raised, convert a temporary copy to XML and
|
|
@@ -607,13 +605,13 @@ class MacTool:
|
|
|
607
605
|
def _GetSubstitutions(self, bundle_identifier, app_identifier_prefix):
|
|
608
606
|
"""Constructs a dictionary of variable substitutions for Entitlements.plist.
|
|
609
607
|
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
608
|
+
Args:
|
|
609
|
+
bundle_identifier: string, value of CFBundleIdentifier from Info.plist
|
|
610
|
+
app_identifier_prefix: string, value for AppIdentifierPrefix
|
|
613
611
|
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
612
|
+
Returns:
|
|
613
|
+
Dictionary of substitutions to apply when generating Entitlements.plist.
|
|
614
|
+
"""
|
|
617
615
|
return {
|
|
618
616
|
"CFBundleIdentifier": bundle_identifier,
|
|
619
617
|
"AppIdentifierPrefix": app_identifier_prefix,
|
|
@@ -622,9 +620,9 @@ class MacTool:
|
|
|
622
620
|
def _GetCFBundleIdentifier(self):
|
|
623
621
|
"""Extracts CFBundleIdentifier value from Info.plist in the bundle.
|
|
624
622
|
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
623
|
+
Returns:
|
|
624
|
+
Value of CFBundleIdentifier in the Info.plist located in the bundle.
|
|
625
|
+
"""
|
|
628
626
|
info_plist_path = os.path.join(
|
|
629
627
|
os.environ["TARGET_BUILD_DIR"], os.environ["INFOPLIST_PATH"]
|
|
630
628
|
)
|
|
@@ -634,19 +632,19 @@ class MacTool:
|
|
|
634
632
|
def _InstallEntitlements(self, entitlements, substitutions, overrides):
|
|
635
633
|
"""Generates and install the ${BundleName}.xcent entitlements file.
|
|
636
634
|
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
635
|
+
Expands variables "$(variable)" pattern in the source entitlements file,
|
|
636
|
+
add extra entitlements defined in the .mobileprovision file and the copy
|
|
637
|
+
the generated plist to "${BundlePath}.xcent".
|
|
640
638
|
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
639
|
+
Args:
|
|
640
|
+
entitlements: string, optional, path to the Entitlements.plist template
|
|
641
|
+
to use, defaults to "${SDKROOT}/Entitlements.plist"
|
|
642
|
+
substitutions: dictionary, variable substitutions
|
|
643
|
+
overrides: dictionary, values to add to the entitlements
|
|
646
644
|
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
645
|
+
Returns:
|
|
646
|
+
Path to the generated entitlements file.
|
|
647
|
+
"""
|
|
650
648
|
source_path = entitlements
|
|
651
649
|
target_path = os.path.join(
|
|
652
650
|
os.environ["BUILT_PRODUCTS_DIR"], os.environ["PRODUCT_NAME"] + ".xcent"
|
|
@@ -666,15 +664,15 @@ class MacTool:
|
|
|
666
664
|
def _ExpandVariables(self, data, substitutions):
|
|
667
665
|
"""Expands variables "$(variable)" in data.
|
|
668
666
|
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
667
|
+
Args:
|
|
668
|
+
data: object, can be either string, list or dictionary
|
|
669
|
+
substitutions: dictionary, variable substitutions to perform
|
|
672
670
|
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
671
|
+
Returns:
|
|
672
|
+
Copy of data where each references to "$(variable)" has been replaced
|
|
673
|
+
by the corresponding value found in substitutions, or left intact if
|
|
674
|
+
the key was not found.
|
|
675
|
+
"""
|
|
678
676
|
if isinstance(data, str):
|
|
679
677
|
for key, value in substitutions.items():
|
|
680
678
|
data = data.replace("$(%s)" % key, value)
|
|
@@ -693,15 +691,15 @@ def NextGreaterPowerOf2(x):
|
|
|
693
691
|
def WriteHmap(output_name, filelist):
|
|
694
692
|
"""Generates a header map based on |filelist|.
|
|
695
693
|
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
694
|
+
Per Mark Mentovai:
|
|
695
|
+
A header map is structured essentially as a hash table, keyed by names used
|
|
696
|
+
in #includes, and providing pathnames to the actual files.
|
|
699
697
|
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
698
|
+
The implementation below and the comment above comes from inspecting:
|
|
699
|
+
http://www.opensource.apple.com/source/distcc/distcc-2503/distcc_dist/include_server/headermap.py?txt
|
|
700
|
+
while also looking at the implementation in clang in:
|
|
701
|
+
https://llvm.org/svn/llvm-project/cfe/trunk/lib/Lex/HeaderMap.cpp
|
|
702
|
+
"""
|
|
705
703
|
magic = 1751998832
|
|
706
704
|
version = 1
|
|
707
705
|
_reserved = 0
|
|
@@ -46,13 +46,13 @@ CFLAGS_OBJC_Debug :=
|
|
|
46
46
|
CFLAGS_OBJCC_Debug :=
|
|
47
47
|
|
|
48
48
|
INCS_Debug := \
|
|
49
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
50
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
51
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
52
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
53
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
54
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
55
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
49
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/include/node \
|
|
50
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/src \
|
|
51
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/openssl/config \
|
|
52
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/openssl/openssl/include \
|
|
53
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/uv/include \
|
|
54
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/zlib \
|
|
55
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/v8/include
|
|
56
56
|
|
|
57
57
|
DEFS_Release := \
|
|
58
58
|
'-DNODE_GYP_MODULE_NAME=nothing' \
|
|
@@ -96,13 +96,13 @@ CFLAGS_OBJC_Release :=
|
|
|
96
96
|
CFLAGS_OBJCC_Release :=
|
|
97
97
|
|
|
98
98
|
INCS_Release := \
|
|
99
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
100
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
101
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
102
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
103
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
104
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
105
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
99
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/include/node \
|
|
100
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/src \
|
|
101
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/openssl/config \
|
|
102
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/openssl/openssl/include \
|
|
103
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/uv/include \
|
|
104
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/zlib \
|
|
105
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/v8/include
|
|
106
106
|
|
|
107
107
|
OBJS := \
|
|
108
108
|
$(obj).target/$(TARGET)/node_modules/node-addon-api/nothing.o
|
package/build/tuntap.target.mk
CHANGED
|
@@ -55,13 +55,13 @@ CFLAGS_OBJC_Debug :=
|
|
|
55
55
|
CFLAGS_OBJCC_Debug :=
|
|
56
56
|
|
|
57
57
|
INCS_Debug := \
|
|
58
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
59
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
60
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
61
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
62
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
63
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
64
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
58
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/include/node \
|
|
59
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/src \
|
|
60
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/openssl/config \
|
|
61
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/openssl/openssl/include \
|
|
62
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/uv/include \
|
|
63
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/zlib \
|
|
64
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/v8/include \
|
|
65
65
|
-I/Users/runner/work/appium-ios-tuntap/appium-ios-tuntap/node_modules/node-addon-api
|
|
66
66
|
|
|
67
67
|
DEFS_Release := \
|
|
@@ -115,13 +115,13 @@ CFLAGS_OBJC_Release :=
|
|
|
115
115
|
CFLAGS_OBJCC_Release :=
|
|
116
116
|
|
|
117
117
|
INCS_Release := \
|
|
118
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
119
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
120
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
121
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
122
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
123
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
124
|
-
-I/Users/runner/Library/Caches/node-gyp/22.
|
|
118
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/include/node \
|
|
119
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/src \
|
|
120
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/openssl/config \
|
|
121
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/openssl/openssl/include \
|
|
122
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/uv/include \
|
|
123
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/zlib \
|
|
124
|
+
-I/Users/runner/Library/Caches/node-gyp/22.20.0/deps/v8/include \
|
|
125
125
|
-I/Users/runner/work/appium-ios-tuntap/appium-ios-tuntap/node_modules/node-addon-api
|
|
126
126
|
|
|
127
127
|
OBJS := \
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-ios-tuntap",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Native TUN/TAP interface module for Node.js",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -41,16 +41,20 @@
|
|
|
41
41
|
"license": "Apache-2.0",
|
|
42
42
|
"gypfile": true,
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@appium/support": "^
|
|
44
|
+
"@appium/support": "^7.0.0-rc.1",
|
|
45
45
|
"node-addon-api": "^8.5.0",
|
|
46
46
|
"typescript": "^5.8.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@appium/eslint-config-appium-ts": "^
|
|
49
|
+
"@appium/eslint-config-appium-ts": "^2.0.0-rc.1",
|
|
50
50
|
"@semantic-release/changelog": "^6.0.3",
|
|
51
51
|
"@semantic-release/git": "^10.0.1",
|
|
52
52
|
"@types/node": "^24.1.0",
|
|
53
53
|
"conventional-changelog-conventionalcommits": "^9.0.0",
|
|
54
|
-
"semantic-release": "^
|
|
54
|
+
"semantic-release": "^25.0.0"
|
|
55
|
+
},
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": "^20.19.0 || ^22.12.0 || >=24.0.0",
|
|
58
|
+
"npm": ">=10"
|
|
55
59
|
}
|
|
56
60
|
}
|