@limrun/api 0.68.0 → 0.69.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 +49 -0
- package/README.md +2 -1
- package/client.d.mts +10 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -8
- package/client.d.ts.map +1 -1
- package/client.js +2 -0
- package/client.js.map +1 -1
- package/client.mjs +2 -0
- package/client.mjs.map +1 -1
- package/exec-client.d.mts +7 -0
- package/exec-client.d.mts.map +1 -1
- package/exec-client.d.ts +7 -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 -2
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/ios-client.d.mts +2 -4
- package/ios-client.d.mts.map +1 -1
- package/ios-client.d.ts +2 -4
- package/ios-client.d.ts.map +1 -1
- package/ios-client.js +7 -3
- package/ios-client.js.map +1 -1
- package/ios-client.mjs +7 -3
- package/ios-client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/android-instances.d.mts +23 -1
- package/resources/android-instances.d.mts.map +1 -1
- package/resources/android-instances.d.ts +23 -1
- package/resources/android-instances.d.ts.map +1 -1
- package/resources/android-instances.js +9 -0
- package/resources/android-instances.js.map +1 -1
- package/resources/android-instances.mjs +9 -0
- package/resources/android-instances.mjs.map +1 -1
- package/resources/gradle-instances.d.mts +23 -1
- package/resources/gradle-instances.d.mts.map +1 -1
- package/resources/gradle-instances.d.ts +23 -1
- package/resources/gradle-instances.d.ts.map +1 -1
- package/resources/gradle-instances.js +9 -0
- package/resources/gradle-instances.js.map +1 -1
- package/resources/gradle-instances.mjs +9 -0
- package/resources/gradle-instances.mjs.map +1 -1
- package/resources/index.d.mts +5 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/ios-instances.d.mts +23 -6
- package/resources/ios-instances.d.mts.map +1 -1
- package/resources/ios-instances.d.ts +23 -6
- package/resources/ios-instances.d.ts.map +1 -1
- package/resources/ios-instances.js +9 -0
- package/resources/ios-instances.js.map +1 -1
- package/resources/ios-instances.mjs +9 -0
- package/resources/ios-instances.mjs.map +1 -1
- package/resources/snapshots.d.mts +51 -0
- package/resources/snapshots.d.mts.map +1 -0
- package/resources/snapshots.d.ts +51 -0
- package/resources/snapshots.d.ts.map +1 -0
- package/resources/snapshots.js +41 -0
- package/resources/snapshots.js.map +1 -0
- package/resources/snapshots.mjs +36 -0
- package/resources/snapshots.mjs.map +1 -0
- package/resources/xcode-instances-helpers.d.mts +4 -2
- package/resources/xcode-instances-helpers.d.mts.map +1 -1
- package/resources/xcode-instances-helpers.d.ts +4 -2
- package/resources/xcode-instances-helpers.d.ts.map +1 -1
- package/resources/xcode-instances-helpers.js +9 -2
- package/resources/xcode-instances-helpers.js.map +1 -1
- package/resources/xcode-instances-helpers.mjs +9 -2
- package/resources/xcode-instances-helpers.mjs.map +1 -1
- package/resources/xcode-instances.d.mts +23 -1
- package/resources/xcode-instances.d.mts.map +1 -1
- package/resources/xcode-instances.d.ts +23 -1
- package/resources/xcode-instances.d.ts.map +1 -1
- package/resources/xcode-instances.js +9 -0
- package/resources/xcode-instances.js.map +1 -1
- package/resources/xcode-instances.mjs +9 -0
- package/resources/xcode-instances.mjs.map +1 -1
- package/src/client.ts +10 -0
- package/src/exec-client.ts +7 -0
- package/src/index.ts +8 -0
- package/src/ios-client.ts +13 -17
- package/src/resources/android-instances.ts +27 -0
- package/src/resources/gradle-instances.ts +27 -0
- package/src/resources/index.ts +13 -0
- package/src/resources/ios-instances.ts +27 -6
- package/src/resources/snapshots.ts +88 -0
- package/src/resources/xcode-instances-helpers.ts +15 -7
- package/src/resources/xcode-instances.ts +27 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { APIResource } from '../core/resource';
|
|
2
|
+
import { APIPromise } from '../core/api-promise';
|
|
3
|
+
import { buildHeaders } from '../internal/headers';
|
|
4
|
+
import { RequestOptions } from '../internal/request-options';
|
|
5
|
+
import { path } from '../internal/utils/path';
|
|
6
|
+
|
|
7
|
+
export interface SnapshotListParams {
|
|
8
|
+
/** Literal key prefix. Omit to list all keys. */
|
|
9
|
+
prefix?: string;
|
|
10
|
+
/** Page size: 1–500 for Xcode, 1–100 for iOS. */
|
|
11
|
+
limit?: number;
|
|
12
|
+
offset?: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface SnapshotList<Snapshot> {
|
|
16
|
+
snapshots: Snapshot[];
|
|
17
|
+
/** Pass as offset to read the next page. Absent on the last page. */
|
|
18
|
+
nextOffset?: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface XcodeSnapshot {
|
|
22
|
+
key: string;
|
|
23
|
+
directoryKey: string;
|
|
24
|
+
rootName: string;
|
|
25
|
+
paths?: string[];
|
|
26
|
+
xcodeVersionKey: string;
|
|
27
|
+
archiveFormat: string;
|
|
28
|
+
archiveSizeBytes: number;
|
|
29
|
+
sha256: string;
|
|
30
|
+
publishedAt: string;
|
|
31
|
+
sourceInstanceId?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface IOSSnapshot {
|
|
35
|
+
key: string;
|
|
36
|
+
saved: boolean;
|
|
37
|
+
createdAt: string;
|
|
38
|
+
lastUsedAt: string;
|
|
39
|
+
archiveSizeBytes?: number;
|
|
40
|
+
publishedAt?: string;
|
|
41
|
+
iosVersion?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export class XcodeSnapshots extends APIResource {
|
|
45
|
+
/** List saved workspaces, newest publication first. */
|
|
46
|
+
list(
|
|
47
|
+
organizationId: string,
|
|
48
|
+
query: SnapshotListParams = {},
|
|
49
|
+
options?: RequestOptions,
|
|
50
|
+
): APIPromise<SnapshotList<XcodeSnapshot>> {
|
|
51
|
+
return this._client.get(path`/v1/organizations/${organizationId}/xcode_snapshots`, { query, ...options });
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
get(organizationId: string, key: string, options?: RequestOptions): APIPromise<XcodeSnapshot> {
|
|
55
|
+
return this._client.get(path`/v1/organizations/${organizationId}/xcode_snapshots/${key}`, options);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Delete the archive and index entry. Running instances can publish this key again. */
|
|
59
|
+
delete(organizationId: string, key: string, options?: RequestOptions): APIPromise<void> {
|
|
60
|
+
return this._client.delete(path`/v1/organizations/${organizationId}/xcode_snapshots/${key}`, {
|
|
61
|
+
...options,
|
|
62
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export class IOSSnapshots extends APIResource {
|
|
68
|
+
/** List simulator snapshot keys alphabetically, including keys not saved yet. */
|
|
69
|
+
list(
|
|
70
|
+
organizationId: string,
|
|
71
|
+
query: SnapshotListParams = {},
|
|
72
|
+
options?: RequestOptions,
|
|
73
|
+
): APIPromise<SnapshotList<IOSSnapshot>> {
|
|
74
|
+
return this._client.get(path`/v1/organizations/${organizationId}/ios_snapshots`, { query, ...options });
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
get(organizationId: string, key: string, options?: RequestOptions): APIPromise<IOSSnapshot> {
|
|
78
|
+
return this._client.get(path`/v1/organizations/${organizationId}/ios_snapshots/${key}`, options);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** Delete saved apps, data and the index entry. Running simulators can save this key again. */
|
|
82
|
+
delete(organizationId: string, key: string, options?: RequestOptions): APIPromise<void> {
|
|
83
|
+
return this._client.delete(path`/v1/organizations/${organizationId}/ios_snapshots/${key}`, {
|
|
84
|
+
...options,
|
|
85
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
type XcodeInstance,
|
|
6
6
|
type XcodeInstanceCreateParams,
|
|
7
7
|
} from './xcode-instances';
|
|
8
|
-
import { type IosInstance } from './ios-instances';
|
|
8
|
+
import { type IosInstance, type IosInstanceCreateParams } from './ios-instances';
|
|
9
9
|
import { APIPromise } from '../core/api-promise';
|
|
10
10
|
import { RequestOptions } from '../internal/request-options';
|
|
11
11
|
import { path } from '../internal/utils/path';
|
|
@@ -596,8 +596,12 @@ export type XcodeClient = {
|
|
|
596
596
|
* Create a new iOS simulator instance and attach it to this xcode instance.
|
|
597
597
|
* Deletes the simulator if attach fails so it is never leaked. Returns the new
|
|
598
598
|
* simulator's instance id (record it for teardown) and the instance itself.
|
|
599
|
+
* `device` selects the simulator, for example `{ model: 'ipad' }` or an
|
|
600
|
+
* OSVersion clue. The simulator always gets no delegated permissions.
|
|
599
601
|
*/
|
|
600
|
-
attachNewSimulator: (
|
|
602
|
+
attachNewSimulator: (
|
|
603
|
+
device?: Pick<IosInstanceCreateParams.Spec, 'model' | 'clues'>,
|
|
604
|
+
) => Promise<{ iosInstanceId: string; simulator: IosInstance }>;
|
|
601
605
|
|
|
602
606
|
/** Best-effort delete of a simulator instance. Never throws; returns success. */
|
|
603
607
|
deleteSimulator: (iosInstanceId: string) => Promise<boolean>;
|
|
@@ -917,11 +921,15 @@ export class XcodeInstances extends GeneratedXcodeInstances {
|
|
|
917
921
|
}
|
|
918
922
|
};
|
|
919
923
|
|
|
920
|
-
const attachNewSimulatorImpl = async ()
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
924
|
+
const attachNewSimulatorImpl: XcodeClient['attachNewSimulator'] = async (device) => {
|
|
925
|
+
const simulator = await client.iosInstances.create({
|
|
926
|
+
wait: true,
|
|
927
|
+
spec: {
|
|
928
|
+
...(device?.model && { model: device.model }),
|
|
929
|
+
...(device?.clues && { clues: device.clues }),
|
|
930
|
+
role: { permissions: [] },
|
|
931
|
+
},
|
|
932
|
+
});
|
|
925
933
|
// The sim exists from here; if attach fails, delete it so we never leak an
|
|
926
934
|
// orphan the caller can't reap.
|
|
927
935
|
try {
|
|
@@ -36,6 +36,16 @@ export class XcodeInstances extends APIResource {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
/** Update a live instance's labels or role using the ETag returned by get().withResponse(). */
|
|
40
|
+
update(id: string, params: XcodeInstanceUpdateParams, options?: RequestOptions): APIPromise<void> {
|
|
41
|
+
const { ifMatch, ...body } = params;
|
|
42
|
+
return this._client.patch(path`/v1/xcode_instances/${id}`, {
|
|
43
|
+
...options,
|
|
44
|
+
body,
|
|
45
|
+
headers: buildHeaders([options?.headers, { 'If-Match': ifMatch, Accept: '*/*' }]),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
39
49
|
/**
|
|
40
50
|
* Get Xcode instance with given ID
|
|
41
51
|
*/
|
|
@@ -70,6 +80,9 @@ export namespace XcodeInstance {
|
|
|
70
80
|
}
|
|
71
81
|
|
|
72
82
|
export interface Spec {
|
|
83
|
+
/** Current effective permissions. Present on live GETs; historical records may omit it. */
|
|
84
|
+
role?: { permissions: string[] };
|
|
85
|
+
|
|
73
86
|
inactivityTimeout: string;
|
|
74
87
|
|
|
75
88
|
region: string;
|
|
@@ -107,6 +120,19 @@ export namespace XcodeInstance {
|
|
|
107
120
|
}
|
|
108
121
|
}
|
|
109
122
|
|
|
123
|
+
export interface XcodeInstanceUpdateParams {
|
|
124
|
+
/** Quoted ETag from a live GET. A concurrent change returns HTTP 412. */
|
|
125
|
+
ifMatch: string;
|
|
126
|
+
/** Replaces all customer labels. Use {} to clear them. Omission preserves labels. */
|
|
127
|
+
metadata?: { labels: { [key: string]: string } };
|
|
128
|
+
spec?: {
|
|
129
|
+
role: {
|
|
130
|
+
/** Replaces the complete list. Use [] to remove delegated permissions. */
|
|
131
|
+
permissions: string[];
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
110
136
|
export interface XcodeInstanceCreateParams {
|
|
111
137
|
/**
|
|
112
138
|
* Query param: If there is another instance with given labels and region, return
|
|
@@ -245,6 +271,7 @@ export declare namespace XcodeInstances {
|
|
|
245
271
|
export {
|
|
246
272
|
type XcodeInstance as XcodeInstance,
|
|
247
273
|
type XcodeInstancesItems as XcodeInstancesItems,
|
|
274
|
+
type XcodeInstanceUpdateParams as XcodeInstanceUpdateParams,
|
|
248
275
|
type XcodeInstanceCreateParams as XcodeInstanceCreateParams,
|
|
249
276
|
type XcodeInstanceListParams as XcodeInstanceListParams,
|
|
250
277
|
};
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.69.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.69.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.69.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.69.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|