@limrun/api 0.28.10 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/build-settings.d.mts +4 -0
- package/build-settings.d.mts.map +1 -0
- package/build-settings.d.ts +4 -0
- package/build-settings.d.ts.map +1 -0
- package/build-settings.js +61 -0
- package/build-settings.js.map +1 -0
- package/build-settings.mjs +56 -0
- package/build-settings.mjs.map +1 -0
- package/exec-client.d.mts +1 -0
- package/exec-client.d.mts.map +1 -1
- package/exec-client.d.ts +1 -0
- package/exec-client.d.ts.map +1 -1
- package/exec-client.js.map +1 -1
- package/exec-client.mjs.map +1 -1
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +5 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/instance-client.d.mts +9 -0
- package/instance-client.d.mts.map +1 -1
- package/instance-client.d.ts +9 -0
- package/instance-client.d.ts.map +1 -1
- package/instance-client.js +22 -0
- package/instance-client.js.map +1 -1
- package/instance-client.mjs +22 -0
- package/instance-client.mjs.map +1 -1
- package/package.json +11 -1
- package/resources/xcode-instances-helpers.d.mts +1 -0
- package/resources/xcode-instances-helpers.d.mts.map +1 -1
- package/resources/xcode-instances-helpers.d.ts +1 -0
- package/resources/xcode-instances-helpers.d.ts.map +1 -1
- package/resources/xcode-instances-helpers.js +5 -0
- package/resources/xcode-instances-helpers.js.map +1 -1
- package/resources/xcode-instances-helpers.mjs +5 -0
- package/resources/xcode-instances-helpers.mjs.map +1 -1
- package/src/build-settings.ts +61 -0
- package/src/exec-client.ts +1 -0
- package/src/index.ts +1 -0
- package/src/instance-client.ts +44 -0
- package/src/resources/xcode-instances-helpers.ts +6 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/src/instance-client.ts
CHANGED
|
@@ -32,6 +32,12 @@ function buildDownloadUrl(apiUrl: string): string {
|
|
|
32
32
|
return `${apiUrl}/files?path=${encodeURIComponent(ANDROID_RECORDING_PATH)}`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
function assertBandwidthKbps(field: keyof WifiBandwidthOptions, value: number): void {
|
|
36
|
+
if (!Number.isInteger(value) || value < 0) {
|
|
37
|
+
throw new Error(`${field} must be a non-negative integer Kbps value`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
35
41
|
/**
|
|
36
42
|
* A client for interacting with a Limbar instance
|
|
37
43
|
*/
|
|
@@ -82,6 +88,11 @@ export type InstanceClient = {
|
|
|
82
88
|
* Open a URL/deeplink on Android.
|
|
83
89
|
*/
|
|
84
90
|
openUrl: (url: string) => Promise<OpenUrlResult>;
|
|
91
|
+
/**
|
|
92
|
+
* Set Android Wi-Fi bandwidth limits in Kbps. Omit a direction to leave it unchanged;
|
|
93
|
+
* pass `0` to clear that direction's limit.
|
|
94
|
+
*/
|
|
95
|
+
setWifiBandwidth: (options: WifiBandwidthOptions) => Promise<void>;
|
|
85
96
|
/**
|
|
86
97
|
* Start recording device video. Use stopRecording() to finish the recording.
|
|
87
98
|
* When provided, `quality` must be one of `5`, `6`, `7`, `8`, `9`, or `10`.
|
|
@@ -276,6 +287,11 @@ export type OpenUrlResult = {
|
|
|
276
287
|
url: string;
|
|
277
288
|
};
|
|
278
289
|
|
|
290
|
+
export type WifiBandwidthOptions = {
|
|
291
|
+
downKbps?: number;
|
|
292
|
+
upKbps?: number;
|
|
293
|
+
};
|
|
294
|
+
|
|
279
295
|
type EmptyCommandResult = Record<string, never>;
|
|
280
296
|
|
|
281
297
|
type ScreenshotErrorResponse = {
|
|
@@ -365,6 +381,13 @@ type OpenUrlResultMessage = {
|
|
|
365
381
|
error?: CommandError;
|
|
366
382
|
};
|
|
367
383
|
|
|
384
|
+
type SetWifiBandwidthResultMessage = {
|
|
385
|
+
type: 'setWifiBandwidthResult';
|
|
386
|
+
id: string;
|
|
387
|
+
payload?: EmptyCommandResult;
|
|
388
|
+
error?: CommandError;
|
|
389
|
+
};
|
|
390
|
+
|
|
368
391
|
type StartVideoRecordingResultMessage = {
|
|
369
392
|
type: 'startRecordingResult';
|
|
370
393
|
id: string;
|
|
@@ -389,6 +412,7 @@ type KnownCommandResultMessage =
|
|
|
389
412
|
| ScrollScreenResultMessage
|
|
390
413
|
| ScrollElementResultMessage
|
|
391
414
|
| OpenUrlResultMessage
|
|
415
|
+
| SetWifiBandwidthResultMessage
|
|
392
416
|
| StartVideoRecordingResultMessage
|
|
393
417
|
| StopVideoRecordingResultMessage;
|
|
394
418
|
|
|
@@ -409,6 +433,7 @@ type CommandRequestMap = {
|
|
|
409
433
|
scrollScreen: { direction: ScrollDirection; amount?: number };
|
|
410
434
|
scrollElement: AndroidElementTarget & { direction: ScrollDirection; amount?: number };
|
|
411
435
|
openUrl: { url: string };
|
|
436
|
+
setWifiBandwidth: WifiBandwidthOptions;
|
|
412
437
|
startRecording: { quality?: RecordingQuality };
|
|
413
438
|
stopRecording: { upload?: { presignedUrl: string } };
|
|
414
439
|
};
|
|
@@ -423,6 +448,7 @@ type CommandResultMap = {
|
|
|
423
448
|
scrollScreen: ScrollResult;
|
|
424
449
|
scrollElement: ScrollResult;
|
|
425
450
|
openUrl: OpenUrlResult;
|
|
451
|
+
setWifiBandwidth: EmptyCommandResult;
|
|
426
452
|
startRecording: EmptyCommandResult;
|
|
427
453
|
stopRecording: EmptyCommandResult;
|
|
428
454
|
};
|
|
@@ -588,6 +614,7 @@ export async function createInstanceClient(options: InstanceClientOptions): Prom
|
|
|
588
614
|
case 'scrollScreenResult':
|
|
589
615
|
case 'scrollElementResult':
|
|
590
616
|
case 'openUrlResult':
|
|
617
|
+
case 'setWifiBandwidthResult':
|
|
591
618
|
case 'startRecordingResult':
|
|
592
619
|
case 'stopRecordingResult':
|
|
593
620
|
return 'id' in message && typeof message.id === 'string';
|
|
@@ -827,6 +854,7 @@ export async function createInstanceClient(options: InstanceClientOptions): Prom
|
|
|
827
854
|
scrollScreen,
|
|
828
855
|
scrollElement,
|
|
829
856
|
openUrl,
|
|
857
|
+
setWifiBandwidth,
|
|
830
858
|
startRecording,
|
|
831
859
|
stopRecording,
|
|
832
860
|
keepAlive,
|
|
@@ -919,6 +947,22 @@ export async function createInstanceClient(options: InstanceClientOptions): Prom
|
|
|
919
947
|
};
|
|
920
948
|
};
|
|
921
949
|
|
|
950
|
+
const setWifiBandwidth = async (bandwidthOptions: WifiBandwidthOptions): Promise<void> => {
|
|
951
|
+
const request: CommandRequestMap['setWifiBandwidth'] = {};
|
|
952
|
+
if (bandwidthOptions.downKbps !== undefined) {
|
|
953
|
+
assertBandwidthKbps('downKbps', bandwidthOptions.downKbps);
|
|
954
|
+
request.downKbps = bandwidthOptions.downKbps;
|
|
955
|
+
}
|
|
956
|
+
if (bandwidthOptions.upKbps !== undefined) {
|
|
957
|
+
assertBandwidthKbps('upKbps', bandwidthOptions.upKbps);
|
|
958
|
+
request.upKbps = bandwidthOptions.upKbps;
|
|
959
|
+
}
|
|
960
|
+
if (request.downKbps === undefined && request.upKbps === undefined) {
|
|
961
|
+
throw new Error('setWifiBandwidth requires downKbps, upKbps, or both');
|
|
962
|
+
}
|
|
963
|
+
await sendRequest('setWifiBandwidth', request);
|
|
964
|
+
};
|
|
965
|
+
|
|
922
966
|
const startRecording = async (recordingOptions?: { quality?: RecordingQuality }): Promise<void> => {
|
|
923
967
|
const request: CommandRequestMap['startRecording'] = {};
|
|
924
968
|
if (recordingOptions?.quality !== undefined) {
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
import { createIgnoreFn } from '../folder-sync-ignore';
|
|
14
14
|
import { nodeProxyTransport } from '../internal/proxy-transport';
|
|
15
15
|
import { directInstanceHttpError } from '../internal/direct-instance-errors';
|
|
16
|
+
import { validateBuildSettings } from '../build-settings';
|
|
16
17
|
|
|
17
18
|
export type LogLevel = 'none' | 'error' | 'warn' | 'info' | 'debug';
|
|
18
19
|
|
|
@@ -88,6 +89,7 @@ export type XcodeBuildOptions = {
|
|
|
88
89
|
upload?: { assetName: string } | { signedUploadUrl: string };
|
|
89
90
|
signing?: XcodeSigningConfig;
|
|
90
91
|
reactNative?: ReactNativeBuildConfig;
|
|
92
|
+
buildSettings?: Record<string, string>;
|
|
91
93
|
};
|
|
92
94
|
|
|
93
95
|
export type SimulatorInstallState =
|
|
@@ -326,11 +328,15 @@ export class XcodeInstances extends GeneratedXcodeInstances {
|
|
|
326
328
|
if (options?.reactNative?.devServerURL && settings?.configuration === 'Release') {
|
|
327
329
|
throw new Error('reactNative.devServerURL is only supported for Debug builds');
|
|
328
330
|
}
|
|
331
|
+
if (options?.buildSettings) {
|
|
332
|
+
validateBuildSettings(options.buildSettings);
|
|
333
|
+
}
|
|
329
334
|
const request: ExecRequest = {
|
|
330
335
|
command: 'xcodebuild',
|
|
331
336
|
...(settings && { xcodebuild: settings }),
|
|
332
337
|
...(options?.reactNative && { reactNative: options.reactNative }),
|
|
333
338
|
...(options?.signing && { signing: options.signing }),
|
|
339
|
+
...(options?.buildSettings && { buildSettings: options.buildSettings }),
|
|
334
340
|
};
|
|
335
341
|
|
|
336
342
|
if (options?.upload && 'assetName' in options.upload) {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.30.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.30.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.30.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.30.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
|