@qawolf/run-globals-ios 0.0.18 → 0.0.19
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/LICENSE +21 -0
- package/README.md +16 -16
- package/dist/apple-pay.d.ts +16 -0
- package/dist/apple-pay.d.ts.map +1 -0
- package/dist/apple-pay.js +17 -0
- package/dist/apple-pay.js.map +1 -0
- package/dist/audio.d.ts +2 -2
- package/dist/audio.d.ts.map +1 -1
- package/dist/audio.js +13 -8
- package/dist/audio.js.map +1 -1
- package/dist/barcode.d.ts +8 -8
- package/dist/barcode.d.ts.map +1 -1
- package/dist/barcode.js +3 -1
- package/dist/barcode.js.map +1 -1
- package/dist/beacon.d.ts +4 -4
- package/dist/beacon.d.ts.map +1 -1
- package/dist/beacon.js +2 -3
- package/dist/beacon.js.map +1 -1
- package/dist/configuration-profile.d.ts +1 -1
- package/dist/configuration-profile.d.ts.map +1 -1
- package/dist/configuration-profile.js +4 -2
- package/dist/configuration-profile.js.map +1 -1
- package/dist/gateway.d.ts +110 -110
- package/dist/gateway.d.ts.map +1 -1
- package/dist/gateway.js +78 -74
- package/dist/gateway.js.map +1 -1
- package/dist/index.d.ts +12 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -9
- package/dist/index.js.map +1 -1
- package/dist/injectionHelpers.d.ts +1 -1
- package/dist/injectionHelpers.d.ts.map +1 -1
- package/dist/injectionHelpers.js +11 -4
- package/dist/injectionHelpers.js.map +1 -1
- package/dist/media.d.ts +6 -6
- package/dist/media.d.ts.map +1 -1
- package/dist/media.js +4 -6
- package/dist/media.js.map +1 -1
- package/dist/photo.d.ts +15 -15
- package/dist/photo.d.ts.map +1 -1
- package/dist/photo.js +18 -18
- package/dist/photo.js.map +1 -1
- package/dist/typings.d.ts +292 -278
- package/dist/webview.d.ts.map +1 -1
- package/dist/webview.js.map +1 -1
- package/package.json +36 -39
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 QA Wolf Inc.
|
|
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
CHANGED
|
@@ -21,14 +21,14 @@ npm install webdriverio webdriver
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
23
23
|
```typescript
|
|
24
|
-
import * as ios from
|
|
24
|
+
import * as ios from "@qawolf/run-globals-ios";
|
|
25
25
|
|
|
26
26
|
// Speaker audio recording (captures device audio output)
|
|
27
27
|
const session = await ios.startSpeakerRecording(driver);
|
|
28
28
|
console.log(`Recording started with session ID: ${session.id}`);
|
|
29
29
|
|
|
30
30
|
// Wait for some audio to be recorded
|
|
31
|
-
await new Promise(resolve => setTimeout(resolve, 5000));
|
|
31
|
+
await new Promise((resolve) => setTimeout(resolve, 5000));
|
|
32
32
|
|
|
33
33
|
// Stop recording - this also calculates the fingerprint automatically
|
|
34
34
|
const file = await ios.stopSpeakerRecording(driver, session.id);
|
|
@@ -39,17 +39,17 @@ if (file.fingerprint) {
|
|
|
39
39
|
|
|
40
40
|
// Download the audio file
|
|
41
41
|
const audioBuffer = await ios.downloadSpeakerRecording(driver, file.filename);
|
|
42
|
-
fs.writeFileSync(
|
|
42
|
+
fs.writeFileSync("/tmp/recording.wav", audioBuffer);
|
|
43
43
|
|
|
44
44
|
// Calculate fingerprint for a reference audio file
|
|
45
|
-
const referenceAudio = fs.readFileSync(
|
|
45
|
+
const referenceAudio = fs.readFileSync("/tmp/reference.wav");
|
|
46
46
|
const fingerprint = await ios.calculateAudioFingerprint(driver, referenceAudio);
|
|
47
47
|
console.log(`Reference duration: ${fingerprint.duration}s`);
|
|
48
48
|
|
|
49
49
|
// Save a photo from local filesystem to device Photos library
|
|
50
|
-
const result = await ios.savePhoto(driver,
|
|
50
|
+
const result = await ios.savePhoto(driver, "/Users/me/test-photo.jpg");
|
|
51
51
|
if (result.success) {
|
|
52
|
-
console.log(
|
|
52
|
+
console.log("Photo saved to library");
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
// List all photos in the library
|
|
@@ -58,7 +58,7 @@ console.log(`Found ${photoList.totalCount} photos`);
|
|
|
58
58
|
|
|
59
59
|
// Clean up - delete all photos (useful for test cleanup)
|
|
60
60
|
await ios.deleteAllPhotos(driver);
|
|
61
|
-
console.log(
|
|
61
|
+
console.log("All photos deleted");
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
## API Reference
|
|
@@ -140,8 +140,8 @@ Delete all photos and videos from the Photos library. Useful for test cleanup.
|
|
|
140
140
|
|
|
141
141
|
```typescript
|
|
142
142
|
interface SpeakerRecordingSession {
|
|
143
|
-
id: string;
|
|
144
|
-
status: string;
|
|
143
|
+
id: string; // Unique session identifier
|
|
144
|
+
status: string; // Recording status
|
|
145
145
|
}
|
|
146
146
|
```
|
|
147
147
|
|
|
@@ -149,9 +149,9 @@ interface SpeakerRecordingSession {
|
|
|
149
149
|
|
|
150
150
|
```typescript
|
|
151
151
|
interface SpeakerRecordingFile {
|
|
152
|
-
filename: string;
|
|
153
|
-
fingerprint?: number[];
|
|
154
|
-
duration?: number;
|
|
152
|
+
filename: string; // Name of the audio file
|
|
153
|
+
fingerprint?: number[]; // Optional audio fingerprint (array of integers)
|
|
154
|
+
duration?: number; // Optional duration in seconds
|
|
155
155
|
}
|
|
156
156
|
```
|
|
157
157
|
|
|
@@ -159,8 +159,8 @@ interface SpeakerRecordingFile {
|
|
|
159
159
|
|
|
160
160
|
```typescript
|
|
161
161
|
interface AudioFingerprint {
|
|
162
|
-
fingerprint: number[];
|
|
163
|
-
duration: number;
|
|
162
|
+
fingerprint: number[]; // Audio fingerprint (array of integers)
|
|
163
|
+
duration: number; // Duration in seconds
|
|
164
164
|
}
|
|
165
165
|
```
|
|
166
166
|
|
|
@@ -185,8 +185,8 @@ interface PhotoAsset {
|
|
|
185
185
|
|
|
186
186
|
```typescript
|
|
187
187
|
interface SavePhotoResult {
|
|
188
|
-
success: boolean;
|
|
189
|
-
message?: string;
|
|
188
|
+
success: boolean; // Whether save was successful
|
|
189
|
+
message?: string; // Optional additional information
|
|
190
190
|
}
|
|
191
191
|
```
|
|
192
192
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Browser } from "webdriverio";
|
|
2
|
+
/**
|
|
3
|
+
* Confirms a pending Apple Pay payment on a Face ID device via AssistiveTouch.
|
|
4
|
+
*
|
|
5
|
+
* Preconditions:
|
|
6
|
+
* - The Apple Pay sheet is already visible with the correct card selected
|
|
7
|
+
* (it shows "Confirm with AssistiveTouch").
|
|
8
|
+
* - AssistiveTouch is enabled on the device.
|
|
9
|
+
*
|
|
10
|
+
* This delegates to the native WDA command, which drives the AssistiveTouch
|
|
11
|
+
* menu (nubbit → Device → More → Confirm Pay) and enters the device passcode.
|
|
12
|
+
* No card details are needed here — the sheet/card are already on screen and
|
|
13
|
+
* the passcode is the device's known PIN.
|
|
14
|
+
*/
|
|
15
|
+
export declare function confirmApplePay(driver: Browser): Promise<void>;
|
|
16
|
+
//# sourceMappingURL=apple-pay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-pay.d.ts","sourceRoot":"","sources":["../src/apple-pay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Confirms a pending Apple Pay payment on a Face ID device via AssistiveTouch.
|
|
3
|
+
*
|
|
4
|
+
* Preconditions:
|
|
5
|
+
* - The Apple Pay sheet is already visible with the correct card selected
|
|
6
|
+
* (it shows "Confirm with AssistiveTouch").
|
|
7
|
+
* - AssistiveTouch is enabled on the device.
|
|
8
|
+
*
|
|
9
|
+
* This delegates to the native WDA command, which drives the AssistiveTouch
|
|
10
|
+
* menu (nubbit → Device → More → Confirm Pay) and enters the device passcode.
|
|
11
|
+
* No card details are needed here — the sheet/card are already on screen and
|
|
12
|
+
* the passcode is the device's known PIN.
|
|
13
|
+
*/
|
|
14
|
+
export async function confirmApplePay(driver) {
|
|
15
|
+
await driver.execute("qawolf: confirmApplePay", []);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=apple-pay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-pay.js","sourceRoot":"","sources":["../src/apple-pay.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAAe;IACnD,MAAM,MAAM,CAAC,OAAO,CAAC,yBAAyB,EAAE,EAAE,CAAC,CAAC;AACtD,CAAC"}
|
package/dist/audio.d.ts
CHANGED
|
@@ -15,9 +15,9 @@ export type SpeakerRecordingSession = z.input<typeof SpeakerRecordingSessionSche
|
|
|
15
15
|
* Schema for a recorded audio file with optional fingerprint data
|
|
16
16
|
*/
|
|
17
17
|
export declare const SpeakerRecordingFileSchema: z.ZodObject<{
|
|
18
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
18
19
|
filename: z.ZodString;
|
|
19
20
|
fingerprint: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
20
|
-
duration: z.ZodOptional<z.ZodNumber>;
|
|
21
21
|
}, z.core.$strip>;
|
|
22
22
|
/**
|
|
23
23
|
* Represents a recorded audio file with optional fingerprint data
|
|
@@ -27,8 +27,8 @@ export type SpeakerRecordingFile = z.input<typeof SpeakerRecordingFileSchema>;
|
|
|
27
27
|
* Schema for the audio fingerprint calculation result
|
|
28
28
|
*/
|
|
29
29
|
export declare const AudioFingerprintSchema: z.ZodObject<{
|
|
30
|
-
fingerprint: z.ZodArray<z.ZodNumber>;
|
|
31
30
|
duration: z.ZodNumber;
|
|
31
|
+
fingerprint: z.ZodArray<z.ZodNumber>;
|
|
32
32
|
}, z.core.$strip>;
|
|
33
33
|
/**
|
|
34
34
|
* Represents the audio fingerprint calculation result
|
package/dist/audio.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../src/audio.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../src/audio.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;iBAKxC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;iBAOrC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;iBAKjC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;;;;;;;;;;GAYG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,uBAAuB,CAAC,CAalC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,oBAAoB,CAAC,CAoB/B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,CAMjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,GAAG,MAAM,GACzB,OAAO,CAAC,gBAAgB,CAAC,CAmB3B"}
|
package/dist/audio.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* oxlint-disable eslint/max-lines -- GEN-2250: split into smaller files */
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
/**
|
|
3
4
|
* Schema for an active speaker recording session
|
|
@@ -12,21 +13,21 @@ export const SpeakerRecordingSessionSchema = z.object({
|
|
|
12
13
|
* Schema for a recorded audio file with optional fingerprint data
|
|
13
14
|
*/
|
|
14
15
|
export const SpeakerRecordingFileSchema = z.object({
|
|
16
|
+
/** Optional duration of the recording in seconds */
|
|
17
|
+
duration: z.number().optional(),
|
|
15
18
|
/** Name of the recorded audio file */
|
|
16
19
|
filename: z.string(),
|
|
17
20
|
/** Optional audio fingerprint as an array of integers */
|
|
18
21
|
fingerprint: z.array(z.number()).optional(),
|
|
19
|
-
/** Optional duration of the recording in seconds */
|
|
20
|
-
duration: z.number().optional(),
|
|
21
22
|
});
|
|
22
23
|
/**
|
|
23
24
|
* Schema for the audio fingerprint calculation result
|
|
24
25
|
*/
|
|
25
26
|
export const AudioFingerprintSchema = z.object({
|
|
26
|
-
/** Audio fingerprint as an array of integers */
|
|
27
|
-
fingerprint: z.array(z.number()),
|
|
28
27
|
/** Duration of the audio in seconds */
|
|
29
28
|
duration: z.number(),
|
|
29
|
+
/** Audio fingerprint as an array of integers */
|
|
30
|
+
fingerprint: z.array(z.number()),
|
|
30
31
|
});
|
|
31
32
|
/**
|
|
32
33
|
* Start audio recording on the iOS device.
|
|
@@ -65,15 +66,17 @@ export async function startSpeakerRecording(driver) {
|
|
|
65
66
|
* ```
|
|
66
67
|
*/
|
|
67
68
|
export async function stopSpeakerRecording(driver, sessionId) {
|
|
68
|
-
const result = (await driver.execute("qawolf: stopAudioRecording", [
|
|
69
|
+
const result = (await driver.execute("qawolf: stopAudioRecording", [
|
|
70
|
+
sessionId,
|
|
71
|
+
]));
|
|
69
72
|
// Decode the base64 fingerprint to integer array
|
|
70
73
|
const fingerprint = result.fingerprint && typeof result.fingerprint === "string"
|
|
71
74
|
? decodeBase64Fingerprint(result.fingerprint)
|
|
72
75
|
: undefined;
|
|
73
76
|
return {
|
|
77
|
+
duration: result.duration,
|
|
74
78
|
filename: result.filename,
|
|
75
79
|
fingerprint,
|
|
76
|
-
duration: result.duration,
|
|
77
80
|
};
|
|
78
81
|
}
|
|
79
82
|
/**
|
|
@@ -111,15 +114,17 @@ export async function downloadSpeakerRecording(driver, filename) {
|
|
|
111
114
|
* ```
|
|
112
115
|
*/
|
|
113
116
|
export async function calculateAudioFingerprint(driver, audioData) {
|
|
114
|
-
const base64Data = Buffer.isBuffer(audioData)
|
|
117
|
+
const base64Data = Buffer.isBuffer(audioData)
|
|
118
|
+
? audioData.toString("base64")
|
|
119
|
+
: audioData;
|
|
115
120
|
const result = (await driver.execute("qawolf: calculateAudioFingerprint", [
|
|
116
121
|
{ data: base64Data },
|
|
117
122
|
]));
|
|
118
123
|
// Decode the base64 fingerprint to integer array
|
|
119
124
|
const fingerprint = decodeBase64Fingerprint(result.fingerprint);
|
|
120
125
|
return {
|
|
121
|
-
fingerprint,
|
|
122
126
|
duration: result.duration,
|
|
127
|
+
fingerprint,
|
|
123
128
|
};
|
|
124
129
|
}
|
|
125
130
|
/**
|
package/dist/audio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio.js","sourceRoot":"","sources":["../src/audio.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"audio.js","sourceRoot":"","sources":["../src/audio.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAG3E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,kDAAkD;IAClD,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,8CAA8C;IAC9C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAC;AASH;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,oDAAoD;IACpD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,sCAAsC;IACtC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,yDAAyD;IACzD,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAOH;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB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|
3
3
|
* Configuration for a barcode or QR code to inject.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
6
|
-
/** AVMetadataObjectType constant. Default: "org.iso.QRCode" */
|
|
7
|
-
type?: string;
|
|
8
|
-
/** The barcode/QR code value to inject */
|
|
9
|
-
value: string;
|
|
5
|
+
export type BarcodeConfig = {
|
|
10
6
|
/** Normalized bounds (0.0-1.0) for the detected barcode position */
|
|
11
7
|
bounds?: {
|
|
8
|
+
height: number;
|
|
9
|
+
width: number;
|
|
12
10
|
x: number;
|
|
13
11
|
y: number;
|
|
14
|
-
width: number;
|
|
15
|
-
height: number;
|
|
16
12
|
};
|
|
17
13
|
/** Corner points (0.0-1.0) for the detected barcode shape */
|
|
18
14
|
corners?: {
|
|
@@ -25,7 +21,11 @@ export interface BarcodeConfig {
|
|
|
25
21
|
* injector defaults to the UTF-8 encoding of `value`.
|
|
26
22
|
*/
|
|
27
23
|
rawValue?: Buffer | string;
|
|
28
|
-
|
|
24
|
+
/** AVMetadataObjectType constant. Default: "org.iso.QRCode" */
|
|
25
|
+
type?: string;
|
|
26
|
+
/** The barcode/QR code value to inject */
|
|
27
|
+
value: string;
|
|
28
|
+
};
|
|
29
29
|
/**
|
|
30
30
|
* Inject a barcode or QR code detection into the app's AVCaptureMetadataOutput.
|
|
31
31
|
*
|
package/dist/barcode.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"barcode.d.ts","sourceRoot":"","sources":["../src/barcode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"barcode.d.ts","sourceRoot":"","sources":["../src/barcode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAI3C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,oEAAoE;IACpE,MAAM,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjE,6DAA6D;IAC7D,OAAO,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACrC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,aAAa,GAAG,aAAa,EAAE,GACxC,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAiB9B"}
|
package/dist/barcode.js
CHANGED
|
@@ -35,7 +35,9 @@ export async function injectBarcode(driver, bundleId, barcodes) {
|
|
|
35
35
|
...(b.bounds && { bounds: b.bounds }),
|
|
36
36
|
...(b.corners && { corners: b.corners }),
|
|
37
37
|
...(b.rawValue !== undefined && {
|
|
38
|
-
rawValue: Buffer.isBuffer(b.rawValue)
|
|
38
|
+
rawValue: Buffer.isBuffer(b.rawValue)
|
|
39
|
+
? b.rawValue.toString("base64")
|
|
40
|
+
: b.rawValue,
|
|
39
41
|
}),
|
|
40
42
|
}));
|
|
41
43
|
return pushJsonConfig(driver, bundleId, "metadataobject.json", {
|
package/dist/barcode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"barcode.js","sourceRoot":"","sources":["../src/barcode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"barcode.js","sourceRoot":"","sources":["../src/barcode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAsBvD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,MAAe,EACf,QAAgB,EAChB,QAAyC;IAEzC,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC9D,MAAM,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACxC,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,gBAAgB;QAChC,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,GAAG,CAAC,CAAC,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;QACrC,GAAG,CAAC,CAAC,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;QACxC,GAAG,CAAC,CAAC,CAAC,QAAQ,KAAK,SAAS,IAAI;YAC9B,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;gBACnC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBAC/B,CAAC,CAAC,CAAC,CAAC,QAAQ;SACf,CAAC;KACH,CAAC,CAAC,CAAC;IAEJ,OAAO,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE,qBAAqB,EAAE;QAC7D,eAAe;KAChB,CAAC,CAAC;AACL,CAAC"}
|
package/dist/beacon.d.ts
CHANGED
|
@@ -2,9 +2,7 @@ import type { Browser } from "webdriverio";
|
|
|
2
2
|
/**
|
|
3
3
|
* Configuration for iBeacon injection.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
6
|
-
/** Beacon region UUID */
|
|
7
|
-
uuid: string;
|
|
5
|
+
export type BeaconConfig = {
|
|
8
6
|
/**
|
|
9
7
|
* Beacons to simulate in this region. When omitted or empty, only the
|
|
10
8
|
* `.region` file is pushed — the app receives a region-entry callback but
|
|
@@ -14,7 +12,9 @@ export interface BeaconConfig {
|
|
|
14
12
|
major: number | string;
|
|
15
13
|
minor: number | string;
|
|
16
14
|
}[];
|
|
17
|
-
|
|
15
|
+
/** Beacon region UUID */
|
|
16
|
+
uuid: string;
|
|
17
|
+
};
|
|
18
18
|
/**
|
|
19
19
|
* Inject iBeacon detections into the app's CLLocationManager.
|
|
20
20
|
*
|
package/dist/beacon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beacon.d.ts","sourceRoot":"","sources":["../src/beacon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"beacon.d.ts","sourceRoot":"","sources":["../src/beacon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAI3C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,EAAE,CAAC;IAC/D,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CA2B9B"}
|
package/dist/beacon.js
CHANGED
|
@@ -32,18 +32,17 @@ export async function injectBeacon(driver, bundleId, config) {
|
|
|
32
32
|
const cleanups = [];
|
|
33
33
|
if (config.beacons && config.beacons.length > 0) {
|
|
34
34
|
const beaconData = config.beacons.map((b) => ({
|
|
35
|
-
uuid: config.uuid,
|
|
36
35
|
major: String(b.major),
|
|
37
36
|
minor: String(b.minor),
|
|
37
|
+
uuid: config.uuid,
|
|
38
38
|
}));
|
|
39
39
|
cleanups.push(await pushJsonConfig(driver, bundleId, `${config.uuid}.beacon`, beaconData));
|
|
40
40
|
}
|
|
41
41
|
// Push empty region file: {uuid}.region (triggers region entry)
|
|
42
42
|
cleanups.push(await pushRawContent(driver, bundleId, `${config.uuid}.region`, ""));
|
|
43
43
|
return async () => {
|
|
44
|
-
for (const cleanup of cleanups)
|
|
44
|
+
for (const cleanup of cleanups)
|
|
45
45
|
await cleanup();
|
|
46
|
-
}
|
|
47
46
|
};
|
|
48
47
|
}
|
|
49
48
|
//# sourceMappingURL=beacon.js.map
|
package/dist/beacon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beacon.js","sourceRoot":"","sources":["../src/beacon.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"beacon.js","sourceRoot":"","sources":["../src/beacon.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAgBvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAAe,EACf,QAAgB,EAChB,MAAoB;IAEpB,MAAM,QAAQ,GAA4B,EAAE,CAAC;IAE7C,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChD,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC5C,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;YACtB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;YACtB,IAAI,EAAE,MAAM,CAAC,IAAI;SAClB,CAAC,CAAC,CAAC;QACJ,QAAQ,CAAC,IAAI,CACX,MAAM,cAAc,CAClB,MAAM,EACN,QAAQ,EACR,GAAG,MAAM,CAAC,IAAI,SAAS,EACvB,UAAU,CACX,CACF,CAAC;IACJ,CAAC;IAED,gEAAgE;IAChE,QAAQ,CAAC,IAAI,CACX,MAAM,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC,IAAI,SAAS,EAAE,EAAE,CAAC,CACpE,CAAC;IAEF,OAAO,KAAK,IAAI,EAAE;QAChB,KAAK,MAAM,OAAO,IAAI,QAAQ;YAAE,MAAM,OAAO,EAAE,CAAC;IAClD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration-profile.d.ts","sourceRoot":"","sources":["../src/configuration-profile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"configuration-profile.d.ts","sourceRoot":"","sources":["../src/configuration-profile.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,iCAAiC;;iBAG5C,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,OAAO,EACf,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,CAsBjC"}
|
|
@@ -21,12 +21,14 @@ export const ConfigurationProfileOptionsSchema = z.object({
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
export async function installConfigurationProfile(driver, profileString) {
|
|
24
|
-
const parsedOptions = ConfigurationProfileOptionsSchema.parse({
|
|
24
|
+
const parsedOptions = ConfigurationProfileOptionsSchema.parse({
|
|
25
|
+
profileString,
|
|
26
|
+
});
|
|
25
27
|
try {
|
|
26
28
|
plist.parse(parsedOptions.profileString);
|
|
27
29
|
}
|
|
28
30
|
catch {
|
|
29
|
-
throw
|
|
31
|
+
throw Error("Failed to parse configuration profile. Please make sure it is a valid plist file.");
|
|
30
32
|
}
|
|
31
33
|
await driver.execute("qawolf: installConfigurationProfile", {
|
|
32
34
|
profileString: parsedOptions.profileString,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration-profile.js","sourceRoot":"","sources":["../src/configuration-profile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"configuration-profile.js","sourceRoot":"","sources":["../src/configuration-profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACxD,6CAA6C;IAC7C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAC;AASH;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,MAAe,EACf,aAAqB;IAErB,MAAM,aAAa,GAAG,iCAAiC,CAAC,KAAK,CAAC;QAC5D,aAAa;KACd,CAAC,CAAC;IAEH,IAAI,CAAC;QACH,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IAC3C,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,KAAK,CACT,mFAAmF,CACpF,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,CAAC,OAAO,CAAC,qCAAqC,EAAE;QAC1D,aAAa,EAAE,aAAa,CAAC,aAAa;KAC3C,CAAC,CAAC;IAEH,OAAO,GAAG,EAAE;QACV,OAAO,MAAM,CAAC,OAAO,CAAC,uCAAuC,EAAE;YAC7D,aAAa,EAAE,aAAa,CAAC,aAAa;SAC3C,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
|