@react-native-harness/runtime 1.0.0-canary.1764662948126 → 1.0.0-canary.1766225407244
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/dist/collection.d.ts +39 -0
- package/dist/collection.d.ts.map +1 -0
- package/dist/collection.js +224 -0
- package/dist/getEntryComponent.d.ts +6 -0
- package/dist/getEntryComponent.d.ts.map +1 -0
- package/dist/getEntryComponent.js +6 -0
- package/dist/module.d.ts +3 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +26 -0
- package/dist/module.web.d.ts +2 -0
- package/dist/module.web.d.ts.map +1 -0
- package/dist/module.web.js +12 -0
- package/dist/package.json +37 -0
- package/dist/rntl/client.d.ts +3 -0
- package/dist/rntl/client.d.ts.map +1 -0
- package/dist/rntl/client.js +8 -0
- package/{out-tsc/vitest/src/collector/functions.d.ts → dist/rntl/describe.d.ts} +21 -4
- package/dist/rntl/describe.d.ts.map +1 -0
- package/dist/rntl/describe.js +216 -0
- package/dist/rntl/expect.d.ts +11 -0
- package/dist/rntl/expect.d.ts.map +1 -0
- package/dist/rntl/expect.js +19 -0
- package/dist/rntl/fn.d.ts +2 -0
- package/dist/rntl/fn.d.ts.map +1 -0
- package/dist/rntl/fn.js +1 -0
- package/dist/rntl/render.d.ts +4 -0
- package/dist/rntl/render.d.ts.map +1 -0
- package/dist/rntl/render.js +11 -0
- package/dist/rntl/screen.d.ts +45 -0
- package/dist/rntl/screen.d.ts.map +1 -0
- package/dist/rntl/screen.js +31 -0
- package/dist/rntl/userEvent.d.ts +22 -0
- package/dist/rntl/userEvent.d.ts.map +1 -0
- package/dist/rntl/userEvent.js +19 -0
- package/dist/runner.d.ts +4 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +115 -0
- package/{out-tsc/vitest/src/client/factory.d.ts → dist/runtime.d.ts} +1 -1
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +39 -0
- package/dist/state.d.ts +25 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/state.js +37 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/ui/UI.d.ts +13 -0
- package/dist/ui/UI.d.ts.map +1 -0
- package/dist/ui/UI.js +121 -0
- package/package.json +2 -6
- package/dist/client/store.d.ts +0 -4
- package/dist/client/store.d.ts.map +0 -1
- package/dist/client/store.js +0 -10
- package/dist/expect/expect.d.ts +0 -9
- package/dist/expect/expect.d.ts.map +0 -1
- package/dist/expect/expect.js +0 -77
- package/dist/expect/matchers/toMatchImageSnapshot.d.ts +0 -12
- package/dist/expect/matchers/toMatchImageSnapshot.d.ts.map +0 -1
- package/dist/expect/matchers/toMatchImageSnapshot.js +0 -11
- package/dist/render/queries.d.ts +0 -7
- package/dist/render/queries.d.ts.map +0 -1
- package/dist/render/queries.js +0 -99
- package/dist/runner/context.d.ts +0 -10
- package/dist/runner/context.d.ts.map +0 -1
- package/dist/runner/context.js +0 -6
- package/dist/screen/index.d.ts +0 -8
- package/dist/screen/index.d.ts.map +0 -1
- package/dist/screen/index.js +0 -18
- package/dist/userEvent/index.d.ts +0 -6
- package/dist/userEvent/index.d.ts.map +0 -1
- package/dist/userEvent/index.js +0 -10
- package/out-tsc/vitest/src/__tests__/collector.test.d.ts +0 -2
- package/out-tsc/vitest/src/__tests__/collector.test.d.ts.map +0 -1
- package/out-tsc/vitest/src/__tests__/error-handling.test.d.ts +0 -2
- package/out-tsc/vitest/src/__tests__/error-handling.test.d.ts.map +0 -1
- package/out-tsc/vitest/src/__tests__/expect.test.d.ts +0 -2
- package/out-tsc/vitest/src/__tests__/expect.test.d.ts.map +0 -1
- package/out-tsc/vitest/src/__tests__/spy.test.d.ts +0 -2
- package/out-tsc/vitest/src/__tests__/spy.test.d.ts.map +0 -1
- package/out-tsc/vitest/src/bundler/bundle.d.ts +0 -2
- package/out-tsc/vitest/src/bundler/bundle.d.ts.map +0 -1
- package/out-tsc/vitest/src/bundler/errors.d.ts +0 -15
- package/out-tsc/vitest/src/bundler/errors.d.ts.map +0 -1
- package/out-tsc/vitest/src/bundler/evaluate.d.ts +0 -2
- package/out-tsc/vitest/src/bundler/evaluate.d.ts.map +0 -1
- package/out-tsc/vitest/src/bundler/factory.d.ts +0 -3
- package/out-tsc/vitest/src/bundler/factory.d.ts.map +0 -1
- package/out-tsc/vitest/src/bundler/index.d.ts +0 -4
- package/out-tsc/vitest/src/bundler/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/bundler/types.d.ts +0 -7
- package/out-tsc/vitest/src/bundler/types.d.ts.map +0 -1
- package/out-tsc/vitest/src/client/factory.d.ts.map +0 -1
- package/out-tsc/vitest/src/client/getDeviceDescriptor.d.ts +0 -8
- package/out-tsc/vitest/src/client/getDeviceDescriptor.d.ts.map +0 -1
- package/out-tsc/vitest/src/client/getWSServer.d.ts +0 -2
- package/out-tsc/vitest/src/client/getWSServer.d.ts.map +0 -1
- package/out-tsc/vitest/src/client/index.d.ts +0 -2
- package/out-tsc/vitest/src/client/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/client/setup-files.d.ts +0 -12
- package/out-tsc/vitest/src/client/setup-files.d.ts.map +0 -1
- package/out-tsc/vitest/src/client/store.d.ts +0 -4
- package/out-tsc/vitest/src/client/store.d.ts.map +0 -1
- package/out-tsc/vitest/src/collector/errors.d.ts +0 -8
- package/out-tsc/vitest/src/collector/errors.d.ts.map +0 -1
- package/out-tsc/vitest/src/collector/factory.d.ts +0 -3
- package/out-tsc/vitest/src/collector/factory.d.ts.map +0 -1
- package/out-tsc/vitest/src/collector/functions.d.ts.map +0 -1
- package/out-tsc/vitest/src/collector/index.d.ts +0 -5
- package/out-tsc/vitest/src/collector/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/collector/types.d.ts +0 -10
- package/out-tsc/vitest/src/collector/types.d.ts.map +0 -1
- package/out-tsc/vitest/src/collector/validation.d.ts +0 -4
- package/out-tsc/vitest/src/collector/validation.d.ts.map +0 -1
- package/out-tsc/vitest/src/constants.d.ts +0 -2
- package/out-tsc/vitest/src/constants.d.ts.map +0 -1
- package/out-tsc/vitest/src/entry-point.d.ts +0 -2
- package/out-tsc/vitest/src/entry-point.d.ts.map +0 -1
- package/out-tsc/vitest/src/errors.d.ts +0 -6
- package/out-tsc/vitest/src/errors.d.ts.map +0 -1
- package/out-tsc/vitest/src/expect/index.d.ts +0 -14
- package/out-tsc/vitest/src/expect/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/expect/matchers/toMatchImageSnapshot.d.ts +0 -7
- package/out-tsc/vitest/src/expect/matchers/toMatchImageSnapshot.d.ts.map +0 -1
- package/out-tsc/vitest/src/expect/setup.d.ts +0 -2
- package/out-tsc/vitest/src/expect/setup.d.ts.map +0 -1
- package/out-tsc/vitest/src/filtering/index.d.ts +0 -2
- package/out-tsc/vitest/src/filtering/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/filtering/testNameFilter.d.ts +0 -12
- package/out-tsc/vitest/src/filtering/testNameFilter.d.ts.map +0 -1
- package/out-tsc/vitest/src/globals.d.ts +0 -8
- package/out-tsc/vitest/src/globals.d.ts.map +0 -1
- package/out-tsc/vitest/src/index.d.ts +0 -13
- package/out-tsc/vitest/src/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/initialize.d.ts +0 -2
- package/out-tsc/vitest/src/initialize.d.ts.map +0 -1
- package/out-tsc/vitest/src/jest-mock.d.ts +0 -2
- package/out-tsc/vitest/src/jest-mock.d.ts.map +0 -1
- package/out-tsc/vitest/src/mocker/index.d.ts +0 -2
- package/out-tsc/vitest/src/mocker/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/mocker/registry.d.ts +0 -7
- package/out-tsc/vitest/src/mocker/registry.d.ts.map +0 -1
- package/out-tsc/vitest/src/mocker/types.d.ts +0 -6
- package/out-tsc/vitest/src/mocker/types.d.ts.map +0 -1
- package/out-tsc/vitest/src/namespace.d.ts +0 -18
- package/out-tsc/vitest/src/namespace.d.ts.map +0 -1
- package/out-tsc/vitest/src/render/ErrorBoundary.d.ts +0 -17
- package/out-tsc/vitest/src/render/ErrorBoundary.d.ts.map +0 -1
- package/out-tsc/vitest/src/render/TestComponentOverlay.d.ts +0 -3
- package/out-tsc/vitest/src/render/TestComponentOverlay.d.ts.map +0 -1
- package/out-tsc/vitest/src/render/cleanup.d.ts +0 -2
- package/out-tsc/vitest/src/render/cleanup.d.ts.map +0 -1
- package/out-tsc/vitest/src/render/index.d.ts +0 -6
- package/out-tsc/vitest/src/render/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/render/setup.d.ts +0 -2
- package/out-tsc/vitest/src/render/setup.d.ts.map +0 -1
- package/out-tsc/vitest/src/render/types.d.ts +0 -12
- package/out-tsc/vitest/src/render/types.d.ts.map +0 -1
- package/out-tsc/vitest/src/runner/errors.d.ts +0 -11
- package/out-tsc/vitest/src/runner/errors.d.ts.map +0 -1
- package/out-tsc/vitest/src/runner/factory.d.ts +0 -3
- package/out-tsc/vitest/src/runner/factory.d.ts.map +0 -1
- package/out-tsc/vitest/src/runner/hooks.d.ts +0 -4
- package/out-tsc/vitest/src/runner/hooks.d.ts.map +0 -1
- package/out-tsc/vitest/src/runner/index.d.ts +0 -4
- package/out-tsc/vitest/src/runner/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/runner/runSuite.d.ts +0 -4
- package/out-tsc/vitest/src/runner/runSuite.d.ts.map +0 -1
- package/out-tsc/vitest/src/runner/types.d.ts +0 -13
- package/out-tsc/vitest/src/runner/types.d.ts.map +0 -1
- package/out-tsc/vitest/src/screen/index.d.ts +0 -8
- package/out-tsc/vitest/src/screen/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/spy/index.d.ts +0 -2
- package/out-tsc/vitest/src/spy/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/symbolicate.d.ts +0 -3
- package/out-tsc/vitest/src/symbolicate.d.ts.map +0 -1
- package/out-tsc/vitest/src/ui/ReadyScreen.d.ts +0 -2
- package/out-tsc/vitest/src/ui/ReadyScreen.d.ts.map +0 -1
- package/out-tsc/vitest/src/ui/WrongEnvironmentScreen.d.ts +0 -2
- package/out-tsc/vitest/src/ui/WrongEnvironmentScreen.d.ts.map +0 -1
- package/out-tsc/vitest/src/ui/index.d.ts +0 -2
- package/out-tsc/vitest/src/ui/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/ui/state.d.ts +0 -20
- package/out-tsc/vitest/src/ui/state.d.ts.map +0 -1
- package/out-tsc/vitest/src/userEvent/index.d.ts +0 -6
- package/out-tsc/vitest/src/userEvent/index.d.ts.map +0 -1
- package/out-tsc/vitest/src/utils/dev-server.d.ts +0 -2
- package/out-tsc/vitest/src/utils/dev-server.d.ts.map +0 -1
- package/out-tsc/vitest/src/utils/emitter.d.ts +0 -16
- package/out-tsc/vitest/src/utils/emitter.d.ts.map +0 -1
- package/out-tsc/vitest/src/waitFor.d.ts +0 -21
- package/out-tsc/vitest/src/waitFor.d.ts.map +0 -1
- package/out-tsc/vitest/tsconfig.spec.tsbuildinfo +0 -1
- package/out-tsc/vitest/vite.config.d.ts +0 -3
- package/out-tsc/vitest/vite.config.d.ts.map +0 -1
package/dist/ui/UI.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { View, Text, Image, StyleSheet, ActivityIndicator, StatusBar, Platform, LogBox } from 'react-native';
|
|
3
|
+
import { memo, useEffect } from 'react';
|
|
4
|
+
import { useStore } from 'zustand/react';
|
|
5
|
+
import { state } from '../state.js';
|
|
6
|
+
LogBox.ignoreAllLogs(true);
|
|
7
|
+
const ComponentHarness = memo(function ComponentHarness({ element, options }) {
|
|
8
|
+
const Wrapper = options.wrapper ?? View;
|
|
9
|
+
return (_jsx(View, { style: { flex: 1, alignItems: 'center', justifyContent: 'center' }, children: _jsx(Wrapper, { children: element }) }));
|
|
10
|
+
});
|
|
11
|
+
export const UI = () => {
|
|
12
|
+
const { componentHarness, status, bootstrap } = useStore(state);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
void bootstrap();
|
|
15
|
+
}, [bootstrap]);
|
|
16
|
+
if (componentHarness) {
|
|
17
|
+
return _jsx(ComponentHarness, { element: componentHarness.node, options: componentHarness.options });
|
|
18
|
+
}
|
|
19
|
+
return (_jsx(View, { style: styles.container, children: _jsxs(View, { style: styles.contentContainer, children: [_jsx(View, { style: styles.logoContainer, children: _jsx(Image, { style: styles.logo }) }), _jsx(Text, { style: styles.title, children: "React Native Harness" }), status === 'idle' ? (_jsxs(View, { style: styles.statusIndicator, children: [_jsx(View, { style: styles.statusDot }), _jsx(Text, { style: styles.statusText, children: "Idle" })] })) : status === 'loading' ? (_jsxs(View, { style: styles.loadingContainer, children: [_jsx(ActivityIndicator, { size: "small", color: "#3b82f6", style: styles.loadingSpinner }), _jsx(Text, { style: styles.loadingText, children: "Loading..." })] })) : (_jsxs(View, { style: styles.statusIndicator, children: [_jsx(View, { style: styles.statusDot }), _jsx(Text, { style: styles.statusText, children: "Running..." })] }))] }) }));
|
|
20
|
+
};
|
|
21
|
+
const styles = StyleSheet.create({
|
|
22
|
+
container: {
|
|
23
|
+
flex: 1,
|
|
24
|
+
justifyContent: 'center',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
backgroundColor: '#0a1628',
|
|
27
|
+
position: 'relative',
|
|
28
|
+
},
|
|
29
|
+
safeArea: {
|
|
30
|
+
flex: 1,
|
|
31
|
+
backgroundColor: 'transparent',
|
|
32
|
+
paddingTop: Platform.OS === 'android' ? StatusBar.currentHeight : 0,
|
|
33
|
+
},
|
|
34
|
+
contentContainer: {
|
|
35
|
+
alignItems: 'center',
|
|
36
|
+
padding: 24,
|
|
37
|
+
borderRadius: 24,
|
|
38
|
+
backgroundColor: 'rgba(59, 130, 246, 0.1)',
|
|
39
|
+
borderWidth: 1,
|
|
40
|
+
borderColor: 'rgba(59, 130, 246, 0.2)',
|
|
41
|
+
shadowColor: '#000',
|
|
42
|
+
shadowOffset: {
|
|
43
|
+
width: 0,
|
|
44
|
+
height: 20,
|
|
45
|
+
},
|
|
46
|
+
shadowOpacity: 0.3,
|
|
47
|
+
shadowRadius: 30,
|
|
48
|
+
},
|
|
49
|
+
logoContainer: {
|
|
50
|
+
marginBottom: 12,
|
|
51
|
+
},
|
|
52
|
+
logo: {
|
|
53
|
+
width: 128,
|
|
54
|
+
height: 128,
|
|
55
|
+
},
|
|
56
|
+
title: {
|
|
57
|
+
fontSize: 28,
|
|
58
|
+
fontWeight: '700',
|
|
59
|
+
color: '#38bdf8',
|
|
60
|
+
textAlign: 'center',
|
|
61
|
+
letterSpacing: 1,
|
|
62
|
+
marginBottom: 8,
|
|
63
|
+
},
|
|
64
|
+
subtitle: {
|
|
65
|
+
fontSize: 16,
|
|
66
|
+
fontWeight: '400',
|
|
67
|
+
color: 'rgba(255, 255, 255, 0.7)',
|
|
68
|
+
textAlign: 'center',
|
|
69
|
+
letterSpacing: 0.5,
|
|
70
|
+
marginBottom: 24,
|
|
71
|
+
},
|
|
72
|
+
statusIndicator: {
|
|
73
|
+
flexDirection: 'row',
|
|
74
|
+
alignItems: 'center',
|
|
75
|
+
backgroundColor: 'rgba(34, 211, 238, 0.15)',
|
|
76
|
+
paddingHorizontal: 16,
|
|
77
|
+
paddingVertical: 8,
|
|
78
|
+
height: 36,
|
|
79
|
+
borderRadius: 20,
|
|
80
|
+
borderWidth: 1,
|
|
81
|
+
borderColor: 'rgba(34, 211, 238, 0.4)',
|
|
82
|
+
},
|
|
83
|
+
statusDot: {
|
|
84
|
+
width: 8,
|
|
85
|
+
height: 8,
|
|
86
|
+
borderRadius: 4,
|
|
87
|
+
backgroundColor: '#22d3ee',
|
|
88
|
+
marginRight: 8,
|
|
89
|
+
shadowColor: '#22d3ee',
|
|
90
|
+
shadowOffset: { width: 0, height: 0 },
|
|
91
|
+
shadowOpacity: 0.8,
|
|
92
|
+
shadowRadius: 4,
|
|
93
|
+
},
|
|
94
|
+
statusText: {
|
|
95
|
+
fontSize: 14,
|
|
96
|
+
fontWeight: '500',
|
|
97
|
+
color: '#22d3ee',
|
|
98
|
+
letterSpacing: 0.5,
|
|
99
|
+
},
|
|
100
|
+
loadingContainer: {
|
|
101
|
+
flexDirection: 'row',
|
|
102
|
+
alignItems: 'center',
|
|
103
|
+
backgroundColor: 'rgba(59, 130, 246, 0.15)',
|
|
104
|
+
paddingHorizontal: 16,
|
|
105
|
+
paddingVertical: 8,
|
|
106
|
+
height: 36,
|
|
107
|
+
borderRadius: 20,
|
|
108
|
+
borderWidth: 1,
|
|
109
|
+
borderColor: 'rgba(59, 130, 246, 0.4)',
|
|
110
|
+
},
|
|
111
|
+
loadingSpinner: {
|
|
112
|
+
marginRight: 8,
|
|
113
|
+
},
|
|
114
|
+
loadingText: {
|
|
115
|
+
fontSize: 14,
|
|
116
|
+
fontWeight: '500',
|
|
117
|
+
color: '#3b82f6',
|
|
118
|
+
letterSpacing: 0.5,
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
export default UI;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-harness/runtime",
|
|
3
|
-
"version": "1.0.0-canary.
|
|
3
|
+
"version": "1.0.0-canary.1766225407244",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -30,16 +30,12 @@
|
|
|
30
30
|
"@vitest/spy": "4.0.0-beta.8",
|
|
31
31
|
"chai": "^5.3.1",
|
|
32
32
|
"event-target-shim": "^6.0.2",
|
|
33
|
-
"react-native-url-polyfill": "^2.0.0",
|
|
34
|
-
"sinon": "^21.0.0",
|
|
35
33
|
"use-sync-external-store": "^1.6.0",
|
|
36
|
-
"util": "^0.12.5",
|
|
37
34
|
"zustand": "^5.0.5",
|
|
38
|
-
"@react-native-harness/bridge": "1.0.0-canary.
|
|
35
|
+
"@react-native-harness/bridge": "1.0.0-canary.1766225407244"
|
|
39
36
|
},
|
|
40
37
|
"devDependencies": {
|
|
41
38
|
"@types/chai": "^5.2.2",
|
|
42
|
-
"@types/sinon": "^17.0.4",
|
|
43
39
|
"react": "*",
|
|
44
40
|
"react-native": "*"
|
|
45
41
|
},
|
package/dist/client/store.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/client/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAIxE,eAAO,MAAM,SAAS,GAAI,QAAQ,YAAY,KAAG,IAEhD,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAO,YAOpC,CAAC"}
|
package/dist/client/store.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
let clientInstance = null;
|
|
2
|
-
export const setClient = (client) => {
|
|
3
|
-
clientInstance = client;
|
|
4
|
-
};
|
|
5
|
-
export const getClientInstance = () => {
|
|
6
|
-
if (!clientInstance) {
|
|
7
|
-
throw new Error('Bridge client not initialized. This should not happen in normal operation.');
|
|
8
|
-
}
|
|
9
|
-
return clientInstance;
|
|
10
|
-
};
|
package/dist/expect/expect.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ExpectStatic } from '@vitest/expect';
|
|
2
|
-
import * as chai from 'chai';
|
|
3
|
-
import './setup.js';
|
|
4
|
-
export declare function createExpect(): ExpectStatic;
|
|
5
|
-
declare const globalExpect: ExpectStatic;
|
|
6
|
-
export { assert, should } from 'chai';
|
|
7
|
-
export { chai, globalExpect as expect };
|
|
8
|
-
export type { Assertion, AsymmetricMatchersContaining, DeeplyAllowMatchers, ExpectStatic, JestAssertion, Matchers, } from '@vitest/expect';
|
|
9
|
-
//# sourceMappingURL=expect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"expect.d.ts","sourceRoot":"","sources":["../../src/expect/expect.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAa,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAS5E,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B,OAAO,YAAY,CAAC;AAGpB,wBAAgB,YAAY,IAAI,YAAY,CAwF3C;AAED,QAAA,MAAM,YAAY,EAAE,YAA6B,CAAC;AAQlD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,YAAY,IAAI,MAAM,EAAE,CAAC;AAExC,YAAY,EACV,SAAS,EACT,4BAA4B,EAC5B,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,QAAQ,GACT,MAAM,gBAAgB,CAAC"}
|
package/dist/expect/expect.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
// This is adapted version of https://github.com/vitest-dev/vitest/blob/main/packages/vitest/src/integrations/chai/index.ts
|
|
2
|
-
// Credits to Vitest team for the original implementation.
|
|
3
|
-
import { addCustomEqualityTesters, ASYMMETRIC_MATCHERS_OBJECT, customMatchers, getState, GLOBAL_EXPECT, setState, } from '@vitest/expect';
|
|
4
|
-
import * as chai from 'chai';
|
|
5
|
-
// Setup additional matchers
|
|
6
|
-
import './setup.js';
|
|
7
|
-
import { toMatchImageSnapshot } from './matchers/toMatchImageSnapshot.js';
|
|
8
|
-
export function createExpect() {
|
|
9
|
-
const expect = ((value, message) => {
|
|
10
|
-
const { assertionCalls } = getState(expect);
|
|
11
|
-
setState({ assertionCalls: assertionCalls + 1 }, expect);
|
|
12
|
-
return chai.expect(value, message);
|
|
13
|
-
});
|
|
14
|
-
Object.assign(expect, chai.expect);
|
|
15
|
-
Object.assign(expect, globalThis[ASYMMETRIC_MATCHERS_OBJECT]);
|
|
16
|
-
expect.getState = () => getState(expect);
|
|
17
|
-
expect.setState = (state) => setState(state, expect);
|
|
18
|
-
// @ts-expect-error global is not typed
|
|
19
|
-
const globalState = getState(globalThis[GLOBAL_EXPECT]) || {};
|
|
20
|
-
setState({
|
|
21
|
-
// this should also add "snapshotState" that is added conditionally
|
|
22
|
-
...globalState,
|
|
23
|
-
assertionCalls: 0,
|
|
24
|
-
isExpectingAssertions: false,
|
|
25
|
-
isExpectingAssertionsError: null,
|
|
26
|
-
expectedAssertionsNumber: null,
|
|
27
|
-
expectedAssertionsNumberErrorGen: null,
|
|
28
|
-
}, expect);
|
|
29
|
-
// @ts-expect-error untyped
|
|
30
|
-
expect.extend = (matchers) => chai.expect.extend(expect, matchers);
|
|
31
|
-
// @ts-expect-error untyped
|
|
32
|
-
expect.addEqualityTesters = (customTesters) => addCustomEqualityTesters(customTesters);
|
|
33
|
-
// @ts-expect-error untyped
|
|
34
|
-
expect.soft = (...args) => {
|
|
35
|
-
// @ts-expect-error private soft access
|
|
36
|
-
return expect(...args).withContext({ soft: true });
|
|
37
|
-
};
|
|
38
|
-
// @ts-expect-error untyped
|
|
39
|
-
expect.unreachable = (message) => {
|
|
40
|
-
chai.assert.fail(`expected${message ? ` "${message}" ` : ' '}not to be reached`);
|
|
41
|
-
};
|
|
42
|
-
function assertions(expected) {
|
|
43
|
-
const errorGen = () => new Error(`expected number of assertions to be ${expected}, but got ${expect.getState().assertionCalls}`);
|
|
44
|
-
if (Error.captureStackTrace) {
|
|
45
|
-
Error.captureStackTrace(errorGen(), assertions);
|
|
46
|
-
}
|
|
47
|
-
expect.setState({
|
|
48
|
-
expectedAssertionsNumber: expected,
|
|
49
|
-
expectedAssertionsNumberErrorGen: errorGen,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
function hasAssertions() {
|
|
53
|
-
const error = new Error('expected any number of assertion, but got none');
|
|
54
|
-
if (Error.captureStackTrace) {
|
|
55
|
-
Error.captureStackTrace(error, hasAssertions);
|
|
56
|
-
}
|
|
57
|
-
expect.setState({
|
|
58
|
-
isExpectingAssertions: true,
|
|
59
|
-
isExpectingAssertionsError: error,
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
chai.util.addMethod(expect, 'assertions', assertions);
|
|
63
|
-
chai.util.addMethod(expect, 'hasAssertions', hasAssertions);
|
|
64
|
-
expect.extend(customMatchers);
|
|
65
|
-
expect.extend({
|
|
66
|
-
toMatchImageSnapshot,
|
|
67
|
-
});
|
|
68
|
-
return expect;
|
|
69
|
-
}
|
|
70
|
-
const globalExpect = createExpect();
|
|
71
|
-
Object.defineProperty(globalThis, GLOBAL_EXPECT, {
|
|
72
|
-
value: globalExpect,
|
|
73
|
-
writable: true,
|
|
74
|
-
configurable: true,
|
|
75
|
-
});
|
|
76
|
-
export { assert, should } from 'chai';
|
|
77
|
-
export { chai, globalExpect as expect };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { MatcherState } from '@vitest/expect';
|
|
2
|
-
import type { FileReference, ImageSnapshotOptions } from '@react-native-harness/bridge';
|
|
3
|
-
declare module '@vitest/expect' {
|
|
4
|
-
interface Matchers {
|
|
5
|
-
toMatchImageSnapshot(options: ImageSnapshotOptions): Promise<void>;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
export declare function toMatchImageSnapshot(this: MatcherState, received: FileReference, options: ImageSnapshotOptions): Promise<{
|
|
9
|
-
pass: boolean;
|
|
10
|
-
message: () => string;
|
|
11
|
-
}>;
|
|
12
|
-
//# sourceMappingURL=toMatchImageSnapshot.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toMatchImageSnapshot.d.ts","sourceRoot":"","sources":["../../../src/expect/matchers/toMatchImageSnapshot.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACrB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,QAAQ,gBAAgB,CAAC;IAC9B,UAAU,QAAQ;QAChB,oBAAoB,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;KACpE;CACF;AAED,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,MAAM,CAAA;CAAE,CAAC,CAcnD"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { getClientInstance } from '../../client/store.js';
|
|
2
|
-
import { getHarnessContext } from '../../runner/index.js';
|
|
3
|
-
export async function toMatchImageSnapshot(received, options) {
|
|
4
|
-
const client = getClientInstance();
|
|
5
|
-
const context = getHarnessContext();
|
|
6
|
-
const result = await client.rpc['test.matchImageSnapshot'](received, context.testFilePath, options, context.runner);
|
|
7
|
-
return {
|
|
8
|
-
pass: result.pass,
|
|
9
|
-
message: () => result.message,
|
|
10
|
-
};
|
|
11
|
-
}
|
package/dist/render/queries.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { HostInstance } from 'react-native';
|
|
2
|
-
export declare const setRoot: (rootInstance: HostInstance) => void;
|
|
3
|
-
declare const queryByTestId: (params: string) => import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default | null, queryAllByTestId: (params: string) => import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default[], getByTestId: (params: string) => import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default | null, getAllByTestId: (params: string) => import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default[], findByTestId: (params: string) => Promise<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>, findAllByTestId: (params: string) => Promise<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default[]>;
|
|
4
|
-
declare const queryById: (params: string) => import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default | null, queryAllById: (params: string) => import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default[], getId: (params: string) => import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default | null, getAllById: (params: string) => import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default[], findById: (params: string) => Promise<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>, findAllById: (params: string) => Promise<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default[]>;
|
|
5
|
-
export { queryByTestId, queryAllByTestId, getByTestId, getAllByTestId, findByTestId, findAllByTestId, };
|
|
6
|
-
export { queryById, queryAllById, getId, getAllById, findById, findAllById };
|
|
7
|
-
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/render/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAM5C,eAAO,MAAM,OAAO,GAAI,cAAc,YAAY,SAEjD,CAAC;AA6IF,QAAA,MACW,aAAa,8HACV,gBAAgB,yHACrB,WAAW,8HACR,cAAc,yHAChB,YAAY,gIACT,eAAe,gIAG3B,CAAC;AACF,QAAA,MACW,SAAS,8HACN,YAAY,yHACjB,KAAK,8HACF,UAAU,yHACZ,QAAQ,gIACL,WAAW,gIAC+B,CAAC;AAExD,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,eAAe,GAChB,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/render/queries.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
// import { store } from '../ui/state.js';
|
|
2
|
-
import { waitUntil } from '../waitFor.js';
|
|
3
|
-
let root = null;
|
|
4
|
-
export const setRoot = (rootInstance) => {
|
|
5
|
-
root = rootInstance;
|
|
6
|
-
};
|
|
7
|
-
const getRoot = () => {
|
|
8
|
-
const container = root;
|
|
9
|
-
if (!container) {
|
|
10
|
-
throw new Error('You need to render a component first!');
|
|
11
|
-
}
|
|
12
|
-
const ownerDocument = container.ownerDocument;
|
|
13
|
-
if (!ownerDocument) {
|
|
14
|
-
throw new Error('This feature is supported in React Native 0.82 and later!');
|
|
15
|
-
}
|
|
16
|
-
return ownerDocument.getRootNode();
|
|
17
|
-
};
|
|
18
|
-
const findNodeByPredicate = (predicate) => {
|
|
19
|
-
const queue = [getRoot()];
|
|
20
|
-
while (queue.length > 0) {
|
|
21
|
-
const node = queue.shift();
|
|
22
|
-
if (predicate(node)) {
|
|
23
|
-
return node;
|
|
24
|
-
}
|
|
25
|
-
for (const child of node.children) {
|
|
26
|
-
queue.push(child);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return null;
|
|
30
|
-
};
|
|
31
|
-
const findNodesByPredicate = (predicate) => {
|
|
32
|
-
const nodes = [];
|
|
33
|
-
const queue = [getRoot()];
|
|
34
|
-
while (queue.length > 0) {
|
|
35
|
-
const node = queue.shift();
|
|
36
|
-
if (predicate(node)) {
|
|
37
|
-
nodes.push(node);
|
|
38
|
-
}
|
|
39
|
-
for (const child of node.children) {
|
|
40
|
-
queue.push(child);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return nodes;
|
|
44
|
-
};
|
|
45
|
-
const getFiberOfHostInstance = (hostInstance) => {
|
|
46
|
-
// This should be considered as 'reaching into the implementation details' of React Native.
|
|
47
|
-
// Not perfect, but it's the only way to get the props of the host instance.
|
|
48
|
-
return (hostInstance
|
|
49
|
-
.__internalInstanceHandle || null);
|
|
50
|
-
};
|
|
51
|
-
const getPropsOfHostInstance = (hostInstance) => {
|
|
52
|
-
return getFiberOfHostInstance(hostInstance)?.memoizedProps || {};
|
|
53
|
-
};
|
|
54
|
-
const findBy = (predicate, options) => {
|
|
55
|
-
return waitUntil(() => findNodeByPredicate(predicate), options);
|
|
56
|
-
};
|
|
57
|
-
const findAllBy = (predicate, options) => {
|
|
58
|
-
return waitUntil(() => {
|
|
59
|
-
const nodes = findNodesByPredicate(predicate);
|
|
60
|
-
if (nodes.length === 0) {
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
return nodes;
|
|
64
|
-
}, options);
|
|
65
|
-
};
|
|
66
|
-
const queryBy = (predicate) => {
|
|
67
|
-
return findNodeByPredicate(predicate);
|
|
68
|
-
};
|
|
69
|
-
const queryAllBy = (predicate) => {
|
|
70
|
-
return findNodesByPredicate(predicate);
|
|
71
|
-
};
|
|
72
|
-
const getBy = (predicate) => {
|
|
73
|
-
const node = queryBy(predicate);
|
|
74
|
-
if (!node) {
|
|
75
|
-
throw new Error(`No node found with predicate ${predicate}`);
|
|
76
|
-
}
|
|
77
|
-
return node;
|
|
78
|
-
};
|
|
79
|
-
const getAllBy = (predicate) => {
|
|
80
|
-
const nodes = queryAllBy(predicate);
|
|
81
|
-
if (nodes.length === 0) {
|
|
82
|
-
throw new Error(`No nodes found with predicate ${predicate}`);
|
|
83
|
-
}
|
|
84
|
-
return nodes;
|
|
85
|
-
};
|
|
86
|
-
const createQueries = (predicate) => {
|
|
87
|
-
return {
|
|
88
|
-
findBy: (params) => findBy((node) => predicate(node, params)),
|
|
89
|
-
findAllBy: (params) => findAllBy((node) => predicate(node, params)),
|
|
90
|
-
queryBy: (params) => queryBy((node) => predicate(node, params)),
|
|
91
|
-
queryAllBy: (params) => queryAllBy((node) => predicate(node, params)),
|
|
92
|
-
getBy: (params) => getBy((node) => predicate(node, params)),
|
|
93
|
-
getAllBy: (params) => getAllBy((node) => predicate(node, params)),
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
const { queryBy: queryByTestId, queryAllBy: queryAllByTestId, getBy: getByTestId, getAllBy: getAllByTestId, findBy: findByTestId, findAllBy: findAllByTestId, } = createQueries((node, testId) => getPropsOfHostInstance(node).testID === testId);
|
|
97
|
-
const { queryBy: queryById, queryAllBy: queryAllById, getBy: getId, getAllBy: getAllById, findBy: findById, findAllBy: findAllById, } = createQueries((node, id) => node.id === id);
|
|
98
|
-
export { queryByTestId, queryAllByTestId, getByTestId, getAllByTestId, findByTestId, findAllByTestId, };
|
|
99
|
-
export { queryById, queryAllById, getId, getAllById, findById, findAllById };
|
package/dist/runner/context.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type HarnessContext = {
|
|
2
|
-
testFilePath: string;
|
|
3
|
-
runner: string;
|
|
4
|
-
};
|
|
5
|
-
declare global {
|
|
6
|
-
var HARNESS_CONTEXT: HarnessContext;
|
|
7
|
-
}
|
|
8
|
-
export declare const getHarnessContext: () => HarnessContext;
|
|
9
|
-
export declare const setHarnessContext: (context: HarnessContext) => void;
|
|
10
|
-
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/runner/context.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,eAAe,EAAE,cAAc,CAAC;CACrC;AAED,eAAO,MAAM,iBAAiB,QAAO,cAEpC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,SAAS,cAAc,KAAG,IAE3D,CAAC"}
|
package/dist/runner/context.js
DELETED
package/dist/screen/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ElementReference, FileReference } from '@react-native-harness/bridge';
|
|
2
|
-
export type Screen = {
|
|
3
|
-
findByTestId: (testId: string) => Promise<ElementReference>;
|
|
4
|
-
findAllByTestId: (testId: string) => Promise<ElementReference[]>;
|
|
5
|
-
screenshot: (name?: string) => Promise<FileReference>;
|
|
6
|
-
};
|
|
7
|
-
export declare const screen: Screen;
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/screen/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACd,MAAM,8BAA8B,CAAC;AAGtC,MAAM,MAAM,MAAM,GAAG;IACnB,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC5D,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACjE,UAAU,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;CACvD,CAAC;AAmBF,eAAO,MAAM,MAAM,QAAiB,CAAC"}
|
package/dist/screen/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { getClientInstance } from '../client/store.js';
|
|
2
|
-
const createScreen = () => {
|
|
3
|
-
return {
|
|
4
|
-
findByTestId: async (testId) => {
|
|
5
|
-
const client = getClientInstance();
|
|
6
|
-
return await client.rpc['platform.queries.findByTestId'](testId);
|
|
7
|
-
},
|
|
8
|
-
findAllByTestId: async (testId) => {
|
|
9
|
-
const client = getClientInstance();
|
|
10
|
-
return await client.rpc['platform.queries.findAllByTestId'](testId);
|
|
11
|
-
},
|
|
12
|
-
screenshot: async () => {
|
|
13
|
-
const client = getClientInstance();
|
|
14
|
-
return await client.rpc['platform.actions.screenshot']();
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export const screen = createScreen();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/userEvent/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGrE,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD,CAAC;AAiBF,eAAO,MAAM,SAAS,WAAoB,CAAC"}
|
package/dist/userEvent/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { getClientInstance } from '../client/store.js';
|
|
2
|
-
const createUserEvent = () => {
|
|
3
|
-
return {
|
|
4
|
-
tap: async (element) => {
|
|
5
|
-
const client = getClientInstance();
|
|
6
|
-
await client.rpc['platform.actions.tapElement'](element);
|
|
7
|
-
},
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export const userEvent = createUserEvent();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collector.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/collector.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-handling.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/error-handling.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"expect.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/expect.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spy.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/spy.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../../src/bundler/bundle.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,WAAW,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,MAAM,CAUlE,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare class ModuleNotFoundError extends Error {
|
|
2
|
-
readonly modulePath: string;
|
|
3
|
-
constructor(modulePath: string);
|
|
4
|
-
}
|
|
5
|
-
export declare class MalformedModuleError extends Error {
|
|
6
|
-
readonly modulePath: string;
|
|
7
|
-
readonly reason: string;
|
|
8
|
-
constructor(modulePath: string, reason: string);
|
|
9
|
-
}
|
|
10
|
-
export declare class BundlingFailedError extends Error {
|
|
11
|
-
readonly modulePath: string;
|
|
12
|
-
readonly reason: string;
|
|
13
|
-
constructor(modulePath: string, reason: string);
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/bundler/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,mBAAoB,SAAQ,KAAK;aAChB,UAAU,EAAE,MAAM;gBAAlB,UAAU,EAAE,MAAM;CAI/C;AAED,qBAAa,oBAAqB,SAAQ,KAAK;aAE3B,UAAU,EAAE,MAAM;aAClB,MAAM,EAAE,MAAM;gBADd,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM;CAKjC;AAED,qBAAa,mBAAoB,SAAQ,KAAK;aAE1B,UAAU,EAAE,MAAM;aAClB,MAAM,EAAE,MAAM;gBADd,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM;CAKjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../../../src/bundler/evaluate.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,YAAY,MAAM,KAAG,IAsBrE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/bundler/factory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIrC,eAAO,MAAM,UAAU,QAAO,OAoC7B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bundler/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { BundlerEvents } from '@react-native-harness/bridge';
|
|
2
|
-
import { EventEmitter } from '../utils/emitter.js';
|
|
3
|
-
export type Bundler = {
|
|
4
|
-
events: EventEmitter<BundlerEvents>;
|
|
5
|
-
getModule: (filePath: string) => Promise<string>;
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/bundler/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC;IACpC,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAClD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/client/factory.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,SAAS,2EAmFrB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getDeviceDescriptor.d.ts","sourceRoot":"","sources":["../../../../src/client/getDeviceDescriptor.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,mBAAmB,QAAO,gBA+BtC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getWSServer.d.ts","sourceRoot":"","sources":["../../../../src/client/getWSServer.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,QAAO,MAK9B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '../utils/emitter.js';
|
|
2
|
-
import { Bundler } from '../bundler/index.js';
|
|
3
|
-
import { BundlerEvents } from '@react-native-harness/bridge';
|
|
4
|
-
export type RunSetupFilesOptions = {
|
|
5
|
-
setupFiles: string[];
|
|
6
|
-
setupFilesAfterEnv: string[];
|
|
7
|
-
events: EventEmitter<BundlerEvents>;
|
|
8
|
-
bundler: Bundler;
|
|
9
|
-
evaluateModule: (moduleJs: string, filePath: string) => void;
|
|
10
|
-
};
|
|
11
|
-
export declare const runSetupFiles: ({ setupFiles, setupFilesAfterEnv, events, bundler, evaluateModule, }: RunSetupFilesOptions) => Promise<void>;
|
|
12
|
-
//# sourceMappingURL=setup-files.d.ts.map
|