@reactiive/ennio 0.0.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/EnnioCore.podspec +61 -0
- package/LICENSE +21 -0
- package/README.md +50 -0
- package/android/CMakeLists.txt +40 -0
- package/android/build.gradle +64 -0
- package/cpp/ElementMatcher.cpp +661 -0
- package/cpp/ElementMatcher.hpp +244 -0
- package/cpp/EnnioLog.hpp +182 -0
- package/cpp/HybridEnnio.cpp +1161 -0
- package/cpp/HybridEnnio.hpp +174 -0
- package/cpp/IdleMonitor.hpp +277 -0
- package/cpp/Protocol.cpp +135 -0
- package/cpp/Protocol.hpp +47 -0
- package/cpp/SelectorCriteria.hpp +281 -0
- package/cpp/SelectorParser.cpp +649 -0
- package/cpp/SelectorParser.hpp +94 -0
- package/cpp/ShadowTreeTraverser.cpp +305 -0
- package/cpp/ShadowTreeTraverser.hpp +142 -0
- package/cpp/TestIDRegistry.cpp +109 -0
- package/cpp/TestIDRegistry.hpp +84 -0
- package/dist/cli.js +16221 -0
- package/ios/EnnioAutoInit.mm +338 -0
- package/ios/EnnioDebugBanner.h +19 -0
- package/ios/EnnioDebugBanner.mm +178 -0
- package/ios/EnnioRuntimeHelper.h +264 -0
- package/ios/EnnioRuntimeHelper.mm +2443 -0
- package/lib/Ennio.nitro.d.ts +263 -0
- package/lib/Ennio.nitro.d.ts.map +1 -0
- package/lib/Ennio.nitro.js +2 -0
- package/lib/Ennio.nitro.js.map +1 -0
- package/lib/index.d.ts +16 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +45 -0
- package/lib/index.js.map +1 -0
- package/nitro.json +24 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/EnnioCore+autolinking.cmake +81 -0
- package/nitrogen/generated/android/EnnioCore+autolinking.gradle +27 -0
- package/nitrogen/generated/android/EnnioCoreOnLoad.cpp +49 -0
- package/nitrogen/generated/android/EnnioCoreOnLoad.hpp +34 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/ennio/EnnioCoreOnLoad.kt +35 -0
- package/nitrogen/generated/ios/EnnioCore+autolinking.rb +62 -0
- package/nitrogen/generated/ios/EnnioCore-Swift-Cxx-Bridge.cpp +17 -0
- package/nitrogen/generated/ios/EnnioCore-Swift-Cxx-Bridge.hpp +27 -0
- package/nitrogen/generated/ios/EnnioCore-Swift-Cxx-Umbrella.hpp +38 -0
- package/nitrogen/generated/ios/EnnioCoreAutolinking.mm +35 -0
- package/nitrogen/generated/ios/EnnioCoreAutolinking.swift +16 -0
- package/nitrogen/generated/shared/c++/ExtendedElementInfo.hpp +118 -0
- package/nitrogen/generated/shared/c++/HybridEnnioSpec.cpp +44 -0
- package/nitrogen/generated/shared/c++/HybridEnnioSpec.hpp +93 -0
- package/nitrogen/generated/shared/c++/LayoutMetrics.hpp +103 -0
- package/nitrogen/generated/shared/c++/ScrollDirection.hpp +84 -0
- package/package.json +78 -0
- package/react-native.config.js +14 -0
- package/src/Ennio.nitro.ts +363 -0
- package/src/cli/hid-daemon.py +129 -0
- package/src/index.ts +72 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
+
nitro = JSON.parse(File.read(File.join(__dir__, 'nitro.json')))
|
|
5
|
+
|
|
6
|
+
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1'
|
|
7
|
+
|
|
8
|
+
Pod::Spec.new do |s|
|
|
9
|
+
s.name = 'EnnioCore'
|
|
10
|
+
s.version = package['version']
|
|
11
|
+
s.summary = package['description']
|
|
12
|
+
s.homepage = package['repository']['url']
|
|
13
|
+
s.license = package['license']
|
|
14
|
+
s.authors = { 'Ennio' => 'hello@ennio.dev' }
|
|
15
|
+
s.platforms = { :ios => '13.0', :tvos => '13.0' }
|
|
16
|
+
s.source = { :git => package['repository']['url'], :tag => "v#{s.version}" }
|
|
17
|
+
|
|
18
|
+
# Native C++ implementation files + iOS-specific files
|
|
19
|
+
s.source_files = [
|
|
20
|
+
'cpp/**/*.{h,hpp,c,cpp}',
|
|
21
|
+
'ios/**/*.{h,hpp,mm}'
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
s.compiler_flags = folly_compiler_flags
|
|
25
|
+
|
|
26
|
+
s.pod_target_xcconfig = {
|
|
27
|
+
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++20',
|
|
28
|
+
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) FOLLY_NO_CONFIG=1',
|
|
29
|
+
'HEADER_SEARCH_PATHS' => [
|
|
30
|
+
'"$(PODS_TARGET_SRCROOT)/cpp"',
|
|
31
|
+
'"$(PODS_TARGET_SRCROOT)/ios"',
|
|
32
|
+
'"$(PODS_TARGET_SRCROOT)/nitrogen/generated/shared/c++"',
|
|
33
|
+
'"$(PODS_TARGET_SRCROOT)/nitrogen/generated/ios"',
|
|
34
|
+
'"$(PODS_ROOT)/boost"',
|
|
35
|
+
'"$(PODS_ROOT)/Headers/Private/React-Core"',
|
|
36
|
+
'"$(PODS_ROOT)/Headers/Public/React-Core"',
|
|
37
|
+
'"$(PODS_ROOT)/Headers/Public/React-Fabric"',
|
|
38
|
+
'"$(PODS_ROOT)/Headers/Private/React-Fabric"',
|
|
39
|
+
'"$(PODS_ROOT)/Headers/Public/React-Core-prebuilt/React_Fabric"',
|
|
40
|
+
'"$(PODS_ROOT)/Headers/Public/React-RuntimeApple"',
|
|
41
|
+
'"$(PODS_ROOT)/Headers/Public/React-Core-prebuilt/React_RuntimeApple"',
|
|
42
|
+
].join(' ')
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
# CRITICAL: Force linker to load all ObjC code (needed for +load registration)
|
|
46
|
+
s.user_target_xcconfig = {
|
|
47
|
+
'OTHER_LDFLAGS' => '-ObjC'
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
# Core React Native dependencies - others handled by install_modules_dependencies
|
|
51
|
+
s.dependency 'React-Core'
|
|
52
|
+
|
|
53
|
+
s.frameworks = 'Security'
|
|
54
|
+
|
|
55
|
+
# Add Nitrogen generated files (includes NitroModules dependency)
|
|
56
|
+
load 'nitrogen/generated/ios/EnnioCore+autolinking.rb'
|
|
57
|
+
add_nitrogen_files(s)
|
|
58
|
+
|
|
59
|
+
# Required for proper React Native linking
|
|
60
|
+
install_modules_dependencies(s)
|
|
61
|
+
end
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Enzo Manuel Mangano
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# ennio
|
|
2
|
+
|
|
3
|
+
> [!WARNING]
|
|
4
|
+
> **Experimental.** APIs, package names, internals, and behavior may
|
|
5
|
+
> change without notice. iOS only. Expect rough edges; do not rely on
|
|
6
|
+
> it for production-critical test suites yet.
|
|
7
|
+
|
|
8
|
+
Maestro-compatible E2E test runner for React Native iOS.
|
|
9
|
+
|
|
10
|
+
The CLI drives the in-app runtime through Metro's Hermes Inspector (CDP)
|
|
11
|
+
and actuates real CoreSimulator touches via a persistent `idb` HID
|
|
12
|
+
daemon. No XCTest helper, no `xcodebuild` cold-start, no synthetic
|
|
13
|
+
UITouch that half-fires recognizers — the gesture goes through the same
|
|
14
|
+
path a finger would.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @reactiive/ennio @reactiive/ennio-expo-plugin react-native-nitro-modules
|
|
18
|
+
npx ennio test e2e/01-auth-flow.yaml # one flow
|
|
19
|
+
npx ennio test e2e/ # every *.yaml in the directory
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Requirements
|
|
23
|
+
|
|
24
|
+
- Expo app on React Native ≥ 0.81 (New Architecture, Fabric)
|
|
25
|
+
- iOS 17+ simulator
|
|
26
|
+
- Xcode 16+, Node 18+
|
|
27
|
+
- `idb_companion` (`brew install facebook/fb/idb-companion`)
|
|
28
|
+
|
|
29
|
+
## Setup
|
|
30
|
+
|
|
31
|
+
The accompanying [`@reactiive/ennio-expo-plugin`](https://www.npmjs.com/package/@reactiive/ennio-expo-plugin)
|
|
32
|
+
links the native runtime into **Debug builds only** via CocoaPods
|
|
33
|
+
`:configurations`. Add it to `app.json`:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"plugins": ["expo-router", "@reactiive/ennio-expo-plugin"]
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Then rebuild your app (`npx expo prebuild --clean && npx expo run:ios`).
|
|
42
|
+
|
|
43
|
+
## Docs
|
|
44
|
+
|
|
45
|
+
Full architecture notes, security model, supported Maestro commands, and
|
|
46
|
+
example flows live in the [monorepo README](https://github.com/enzomanuelmangano/ennio#readme).
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
|
|
50
|
+
MIT
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.22)
|
|
2
|
+
project(EnnioCore)
|
|
3
|
+
|
|
4
|
+
set(CMAKE_CXX_STANDARD 20)
|
|
5
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
6
|
+
|
|
7
|
+
# Find packages
|
|
8
|
+
find_package(ReactAndroid REQUIRED CONFIG)
|
|
9
|
+
find_package(fbjni REQUIRED CONFIG)
|
|
10
|
+
find_package(NitroModules REQUIRED CONFIG)
|
|
11
|
+
|
|
12
|
+
# Collect source files
|
|
13
|
+
file(GLOB_RECURSE CPP_SOURCES
|
|
14
|
+
"../cpp/*.cpp"
|
|
15
|
+
"../nitrogen/generated/android/*.cpp"
|
|
16
|
+
"../nitrogen/generated/shared/*.cpp"
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
# Create library
|
|
20
|
+
add_library(EnnioCore SHARED ${CPP_SOURCES})
|
|
21
|
+
|
|
22
|
+
target_include_directories(EnnioCore PRIVATE
|
|
23
|
+
../cpp
|
|
24
|
+
../nitrogen/generated/android
|
|
25
|
+
../nitrogen/generated/shared
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
target_link_libraries(EnnioCore
|
|
29
|
+
ReactAndroid::react_nativemodule_core
|
|
30
|
+
ReactAndroid::runtimeexecutor
|
|
31
|
+
ReactAndroid::fabricjni
|
|
32
|
+
ReactAndroid::react_render_core
|
|
33
|
+
ReactAndroid::react_render_uimanager
|
|
34
|
+
ReactAndroid::react_render_scheduler
|
|
35
|
+
ReactAndroid::react_debug
|
|
36
|
+
ReactAndroid::react_render_componentregistry
|
|
37
|
+
ReactAndroid::jsi
|
|
38
|
+
fbjni::fbjni
|
|
39
|
+
NitroModules::NitroModules
|
|
40
|
+
)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
buildscript {
|
|
2
|
+
repositories {
|
|
3
|
+
google()
|
|
4
|
+
mavenCentral()
|
|
5
|
+
}
|
|
6
|
+
dependencies {
|
|
7
|
+
classpath 'com.android.tools.build:gradle:8.2.1'
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
def getExtOrDefault(name, defaultValue) {
|
|
12
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : defaultValue
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
apply plugin: 'com.android.library'
|
|
16
|
+
|
|
17
|
+
android {
|
|
18
|
+
namespace 'com.ennio.nitro'
|
|
19
|
+
compileSdkVersion getExtOrDefault('compileSdkVersion', 34)
|
|
20
|
+
|
|
21
|
+
defaultConfig {
|
|
22
|
+
minSdkVersion getExtOrDefault('minSdkVersion', 21)
|
|
23
|
+
targetSdkVersion getExtOrDefault('targetSdkVersion', 34)
|
|
24
|
+
|
|
25
|
+
externalNativeBuild {
|
|
26
|
+
cmake {
|
|
27
|
+
cppFlags '-O2 -fexceptions -frtti -std=c++20'
|
|
28
|
+
arguments '-DANDROID_STL=c++_shared'
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
externalNativeBuild {
|
|
34
|
+
cmake {
|
|
35
|
+
path 'CMakeLists.txt'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
buildFeatures {
|
|
40
|
+
prefab true
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
buildTypes {
|
|
44
|
+
release {
|
|
45
|
+
minifyEnabled false
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
sourceSets {
|
|
50
|
+
main {
|
|
51
|
+
java.srcDirs = ['src/main/java']
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
repositories {
|
|
57
|
+
google()
|
|
58
|
+
mavenCentral()
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
dependencies {
|
|
62
|
+
implementation 'com.facebook.react:react-android'
|
|
63
|
+
implementation 'com.margelo.nitro:react-native-nitro-modules'
|
|
64
|
+
}
|