@limrun/api 0.70.1 → 0.71.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 +34 -0
- package/client.d.mts +1 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +1 -0
- package/client.d.ts.map +1 -1
- package/client.js +1 -0
- package/client.js.map +1 -1
- package/client.mjs +1 -0
- package/client.mjs.map +1 -1
- package/exec-client.d.mts +9 -0
- package/exec-client.d.mts.map +1 -1
- package/exec-client.d.ts +9 -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 +2 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +2 -1
- package/index.d.ts.map +1 -1
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/instance-client.d.mts +2 -0
- package/instance-client.d.mts.map +1 -1
- package/instance-client.d.ts +2 -0
- package/instance-client.d.ts.map +1 -1
- package/instance-client.js +6 -2
- package/instance-client.js.map +1 -1
- package/instance-client.mjs +6 -2
- package/instance-client.mjs.map +1 -1
- package/internal/persist-option.d.mts +4 -0
- package/internal/persist-option.d.mts.map +1 -1
- package/internal/persist-option.d.ts +4 -0
- package/internal/persist-option.d.ts.map +1 -1
- package/internal/persist-option.js +10 -3
- package/internal/persist-option.js.map +1 -1
- package/internal/persist-option.mjs +9 -3
- package/internal/persist-option.mjs.map +1 -1
- package/internal/session-stream.d.mts +6 -5
- package/internal/session-stream.d.mts.map +1 -1
- package/internal/session-stream.d.ts +6 -5
- package/internal/session-stream.d.ts.map +1 -1
- package/internal/session-stream.js +6 -5
- package/internal/session-stream.js.map +1 -1
- package/internal/session-stream.mjs +6 -5
- package/internal/session-stream.mjs.map +1 -1
- package/ios-client.d.mts +28 -1
- package/ios-client.d.mts.map +1 -1
- package/ios-client.d.ts +28 -1
- package/ios-client.d.ts.map +1 -1
- package/ios-client.js +27 -14
- package/ios-client.js.map +1 -1
- package/ios-client.mjs +28 -15
- package/ios-client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/android-instances.d.mts +18 -5
- package/resources/android-instances.d.mts.map +1 -1
- package/resources/android-instances.d.ts +18 -5
- package/resources/android-instances.d.ts.map +1 -1
- package/resources/daemon-client-shared.d.mts +3 -0
- package/resources/daemon-client-shared.d.mts.map +1 -1
- package/resources/daemon-client-shared.d.ts +3 -0
- package/resources/daemon-client-shared.d.ts.map +1 -1
- package/resources/daemon-client-shared.js +2 -0
- package/resources/daemon-client-shared.js.map +1 -1
- package/resources/daemon-client-shared.mjs +2 -0
- package/resources/daemon-client-shared.mjs.map +1 -1
- package/resources/gradle-instances-helpers.d.mts +3 -0
- package/resources/gradle-instances-helpers.d.mts.map +1 -1
- package/resources/gradle-instances-helpers.d.ts +3 -0
- package/resources/gradle-instances-helpers.d.ts.map +1 -1
- package/resources/gradle-instances-helpers.js +2 -0
- package/resources/gradle-instances-helpers.js.map +1 -1
- package/resources/gradle-instances-helpers.mjs +2 -0
- package/resources/gradle-instances-helpers.mjs.map +1 -1
- package/resources/gradle-instances.d.mts +21 -5
- package/resources/gradle-instances.d.mts.map +1 -1
- package/resources/gradle-instances.d.ts +21 -5
- package/resources/gradle-instances.d.ts.map +1 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +2 -0
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/ios-instances-helpers.d.mts +4 -0
- package/resources/ios-instances-helpers.d.mts.map +1 -1
- package/resources/ios-instances-helpers.d.ts +4 -0
- package/resources/ios-instances-helpers.d.ts.map +1 -1
- package/resources/ios-instances-helpers.js +6 -0
- package/resources/ios-instances-helpers.js.map +1 -1
- package/resources/ios-instances-helpers.mjs +6 -0
- package/resources/ios-instances-helpers.mjs.map +1 -1
- package/resources/ios-instances.d.mts +18 -5
- package/resources/ios-instances.d.mts.map +1 -1
- package/resources/ios-instances.d.ts +18 -5
- package/resources/ios-instances.d.ts.map +1 -1
- package/resources/secrets.d.mts +66 -0
- package/resources/secrets.d.mts.map +1 -0
- package/resources/secrets.d.ts +66 -0
- package/resources/secrets.d.ts.map +1 -0
- package/resources/secrets.js +141 -0
- package/resources/secrets.js.map +1 -0
- package/resources/secrets.mjs +137 -0
- package/resources/secrets.mjs.map +1 -0
- package/resources/session-artifacts.d.mts +46 -5
- package/resources/session-artifacts.d.mts.map +1 -1
- package/resources/session-artifacts.d.ts +46 -5
- package/resources/session-artifacts.d.ts.map +1 -1
- package/resources/session-artifacts.js +3 -3
- package/resources/session-artifacts.js.map +1 -1
- package/resources/session-artifacts.mjs +3 -3
- package/resources/session-artifacts.mjs.map +1 -1
- package/resources/xcode-instances-helpers.d.mts +3 -0
- package/resources/xcode-instances-helpers.d.mts.map +1 -1
- package/resources/xcode-instances-helpers.d.ts +3 -0
- package/resources/xcode-instances-helpers.d.ts.map +1 -1
- package/resources/xcode-instances-helpers.js +2 -0
- package/resources/xcode-instances-helpers.js.map +1 -1
- package/resources/xcode-instances-helpers.mjs +2 -0
- package/resources/xcode-instances-helpers.mjs.map +1 -1
- package/resources/xcode-instances.d.mts +21 -5
- package/resources/xcode-instances.d.mts.map +1 -1
- package/resources/xcode-instances.d.ts +21 -5
- package/resources/xcode-instances.d.ts.map +1 -1
- package/src/client.ts +1 -0
- package/src/exec-client.ts +9 -0
- package/src/index.ts +4 -0
- package/src/instance-client.ts +9 -3
- package/src/internal/persist-option.ts +10 -5
- package/src/internal/session-stream.ts +6 -5
- package/src/ios-client.ts +87 -28
- package/src/resources/android-instances.ts +19 -5
- package/src/resources/daemon-client-shared.ts +5 -0
- package/src/resources/gradle-instances-helpers.ts +5 -0
- package/src/resources/gradle-instances.ts +22 -5
- package/src/resources/index.ts +4 -0
- package/src/resources/ios-instances-helpers.ts +7 -0
- package/src/resources/ios-instances.ts +19 -5
- package/src/resources/secrets.ts +210 -0
- package/src/resources/session-artifacts.ts +63 -8
- package/src/resources/xcode-instances-helpers.ts +5 -0
- package/src/resources/xcode-instances.ts +22 -5
- 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,210 @@
|
|
|
1
|
+
import { APIResource } from '../core/resource';
|
|
2
|
+
import { APIPromise } from '../core/api-promise';
|
|
3
|
+
import { RequestOptions } from '../internal/request-options';
|
|
4
|
+
import { buildHeaders } from '../internal/headers';
|
|
5
|
+
import { getDefaultFetch } from '../internal/shims';
|
|
6
|
+
|
|
7
|
+
/** Descriptive data stored by Limrun. Never put credentials in metadata. */
|
|
8
|
+
export interface SecretMetadata {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
type: string;
|
|
12
|
+
organizationId: string;
|
|
13
|
+
metadata: Record<string, unknown>;
|
|
14
|
+
storageLocation: 'us' | 'eu';
|
|
15
|
+
state: 'pending' | 'ready' | 'deleting';
|
|
16
|
+
createdAt: string;
|
|
17
|
+
}
|
|
18
|
+
export interface SecretCreateParams {
|
|
19
|
+
name: string;
|
|
20
|
+
type: string;
|
|
21
|
+
metadata?: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
export interface SecretUpdateParams {
|
|
24
|
+
/** Replaces descriptive metadata; does not change the name, type, or value. */
|
|
25
|
+
metadata: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
export interface SecretListParams {
|
|
28
|
+
nameFilter?: string;
|
|
29
|
+
limit?: number;
|
|
30
|
+
offset?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface SecretListResponse {
|
|
33
|
+
secrets: SecretMetadata[];
|
|
34
|
+
}
|
|
35
|
+
export interface SecretAccessToken {
|
|
36
|
+
accessToken: string;
|
|
37
|
+
expiresAt: string;
|
|
38
|
+
resource: string;
|
|
39
|
+
action: 'read' | 'write';
|
|
40
|
+
}
|
|
41
|
+
export interface SecretRequestOptions extends RequestOptions {
|
|
42
|
+
/** Defaults to the organization returned by whoami. */
|
|
43
|
+
organizationId?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface SecretValueOptions extends RequestOptions {
|
|
46
|
+
/** Transport for direct Google requests, separate from the authenticated Limrun transport. */
|
|
47
|
+
storageFetch?: typeof fetch;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const resourcePattern = /^projects\/[a-zA-Z0-9-]+\/secrets\/secret_[0-7][0-9a-hjkmnp-tv-z]{25}$/;
|
|
51
|
+
const maxBytes = 65536;
|
|
52
|
+
|
|
53
|
+
function checksum(bytes: Uint8Array): string {
|
|
54
|
+
let crc = 0xffffffff;
|
|
55
|
+
for (const byte of bytes) {
|
|
56
|
+
crc ^= byte;
|
|
57
|
+
for (let bit = 0; bit < 8; bit++) crc = (crc >>> 1) ^ (crc & 1 ? 0x82f63b78 : 0);
|
|
58
|
+
}
|
|
59
|
+
return String((crc ^ 0xffffffff) >>> 0);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export class Secrets extends APIResource {
|
|
63
|
+
/** Create a container. Duplicate names return 409; values are written separately. */
|
|
64
|
+
create(body: SecretCreateParams, options?: RequestOptions): APIPromise<SecretMetadata> {
|
|
65
|
+
return this._client.post('/v1/secrets', { body, ...options });
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** Update descriptive metadata by TID or name/<exact name>, without accessing its value. */
|
|
69
|
+
update(target: string, body: SecretUpdateParams, options?: RequestOptions): APIPromise<SecretMetadata> {
|
|
70
|
+
return this._client.patch(`/v1/secrets/${encodeURIComponent(target)}`, { body, ...options });
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
private async collection(
|
|
74
|
+
options: SecretRequestOptions = {},
|
|
75
|
+
): Promise<{ path: string; options: RequestOptions }> {
|
|
76
|
+
const { organizationId, ...request } = options;
|
|
77
|
+
let org = organizationId;
|
|
78
|
+
if (!org) {
|
|
79
|
+
const identity = await this._client.get<{
|
|
80
|
+
organization?: { id?: string };
|
|
81
|
+
user?: { defaultOrganization?: { id?: string } };
|
|
82
|
+
}>('/v1/whoami', request);
|
|
83
|
+
org = identity.organization?.id ?? identity.user?.defaultOrganization?.id;
|
|
84
|
+
}
|
|
85
|
+
if (!org) throw new Error('No organization found. Provide organizationId explicitly.');
|
|
86
|
+
return { path: `/v1/organizations/${encodeURIComponent(org)}/secrets`, options: request };
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** List metadata visible to this credential. Values are never included. */
|
|
90
|
+
async list(query: SecretListParams = {}, options?: SecretRequestOptions): Promise<SecretListResponse> {
|
|
91
|
+
const collection = await this.collection(options);
|
|
92
|
+
return this._client.get(collection.path, { ...collection.options, query });
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** Fetch metadata by TID or name/<exact name>. */
|
|
96
|
+
async get(target: string, options?: SecretRequestOptions): Promise<SecretMetadata> {
|
|
97
|
+
if (target.startsWith('name/')) {
|
|
98
|
+
const result = await this.list({ nameFilter: target.slice(5), limit: 1 }, options);
|
|
99
|
+
if (!result.secrets[0]) throw new Error('Secret not found.');
|
|
100
|
+
return result.secrets[0];
|
|
101
|
+
}
|
|
102
|
+
const collection = await this.collection(options);
|
|
103
|
+
return this._client.get(`${collection.path}/${encodeURIComponent(target)}`, collection.options);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Delete the container and all its versions. */
|
|
107
|
+
async delete(target: string, options?: SecretRequestOptions): Promise<void> {
|
|
108
|
+
const id = target.startsWith('name/') ? (await this.get(target, options)).id : target;
|
|
109
|
+
const collection = await this.collection(options);
|
|
110
|
+
await this._client.delete(`${collection.path}/${encodeURIComponent(id)}`, {
|
|
111
|
+
...collection.options,
|
|
112
|
+
headers: buildHeaders([{ Accept: '*/*' }, collection.options.headers]),
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** Mint access to one secret; no metadata-read permission is needed. */
|
|
117
|
+
createAccessToken(
|
|
118
|
+
target: string,
|
|
119
|
+
action: 'read' | 'write',
|
|
120
|
+
options?: RequestOptions,
|
|
121
|
+
): APIPromise<SecretAccessToken> {
|
|
122
|
+
// Debug logging must not expose the provider bearer credential.
|
|
123
|
+
return this._client.withOptions({ logLevel: 'off' }).post('/v1/secrets/access_tokens', {
|
|
124
|
+
...options,
|
|
125
|
+
body: { target, action },
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
private async transfer(
|
|
130
|
+
target: string,
|
|
131
|
+
action: 'read' | 'write',
|
|
132
|
+
bytes: Uint8Array | undefined,
|
|
133
|
+
options: SecretValueOptions = {},
|
|
134
|
+
): Promise<Response> {
|
|
135
|
+
const { storageFetch = getDefaultFetch(), ...request } = options;
|
|
136
|
+
const timeout = AbortSignal.timeout(options.timeout ?? this._client.timeout);
|
|
137
|
+
const signal = options.signal ? AbortSignal.any([options.signal, timeout]) : timeout;
|
|
138
|
+
const grant = await this.createAccessToken(target, action, { ...request, signal });
|
|
139
|
+
if (
|
|
140
|
+
grant.action !== action ||
|
|
141
|
+
!resourcePattern.test(grant.resource) ||
|
|
142
|
+
(!target.startsWith('name/') && !grant.resource.endsWith(`/${target}`))
|
|
143
|
+
) {
|
|
144
|
+
throw new Error('Invalid secret access grant.');
|
|
145
|
+
}
|
|
146
|
+
signal.throwIfAborted();
|
|
147
|
+
let response: Response;
|
|
148
|
+
try {
|
|
149
|
+
response = await storageFetch(
|
|
150
|
+
`https://secretmanager.googleapis.com/v1/${grant.resource}${
|
|
151
|
+
action === 'read' ? '/versions/latest:access' : ':addVersion'
|
|
152
|
+
}`,
|
|
153
|
+
{
|
|
154
|
+
method: action === 'read' ? 'GET' : 'POST',
|
|
155
|
+
credentials: 'omit',
|
|
156
|
+
...{ cache: 'no-store', referrerPolicy: 'no-referrer' },
|
|
157
|
+
redirect: 'error',
|
|
158
|
+
signal,
|
|
159
|
+
headers: {
|
|
160
|
+
Authorization: `Bearer ${grant.accessToken}`,
|
|
161
|
+
...(bytes ? { 'Content-Type': 'application/json' } : {}),
|
|
162
|
+
},
|
|
163
|
+
...(bytes ?
|
|
164
|
+
{
|
|
165
|
+
body: JSON.stringify({
|
|
166
|
+
payload: {
|
|
167
|
+
data: btoa(Array.from(bytes, (b) => String.fromCharCode(b)).join('')),
|
|
168
|
+
dataCrc32c: checksum(bytes),
|
|
169
|
+
},
|
|
170
|
+
}),
|
|
171
|
+
}
|
|
172
|
+
: {}),
|
|
173
|
+
},
|
|
174
|
+
);
|
|
175
|
+
} catch {
|
|
176
|
+
throw new Error(
|
|
177
|
+
signal.aborted ? 'Secret storage request was aborted.' : 'Secret storage request failed.',
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
// Provider error bodies may echo secret material. Never include them in errors or logs.
|
|
181
|
+
if (!response.ok) throw new Error(`Secret storage request failed (HTTP ${response.status}).`);
|
|
182
|
+
return response;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/** Read bytes directly from Google. Does not fetch or cache metadata. */
|
|
186
|
+
async read(target: string, options?: SecretValueOptions): Promise<Uint8Array> {
|
|
187
|
+
const response = await this.transfer(target, 'read', undefined, options);
|
|
188
|
+
let value: { payload?: { data?: string; dataCrc32c?: string } };
|
|
189
|
+
let bytes: Uint8Array;
|
|
190
|
+
try {
|
|
191
|
+
value = (await response.json()) as typeof value;
|
|
192
|
+
if (typeof value.payload?.data !== 'string' || value.payload.data.length > Math.ceil(maxBytes / 3) * 4)
|
|
193
|
+
throw new Error();
|
|
194
|
+
bytes = Uint8Array.from(atob(value.payload.data), (c) => c.charCodeAt(0));
|
|
195
|
+
} catch {
|
|
196
|
+
throw new Error('Secret storage returned an invalid value.');
|
|
197
|
+
}
|
|
198
|
+
if (bytes.length > maxBytes || checksum(bytes) !== String(value.payload?.dataCrc32c))
|
|
199
|
+
throw new Error('Secret integrity check failed.');
|
|
200
|
+
return bytes;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/** Add a version directly in Google. Accepts UTF-8 text or binary data, up to 64 KiB. */
|
|
204
|
+
async write(target: string, value: string | Uint8Array, options?: SecretValueOptions): Promise<void> {
|
|
205
|
+
const bytes = typeof value === 'string' ? new TextEncoder().encode(value) : value;
|
|
206
|
+
if (!bytes.length || bytes.length > maxBytes)
|
|
207
|
+
throw new Error('Secret values must contain between 1 byte and 64 KiB.');
|
|
208
|
+
await this.transfer(target, 'write', bytes, options);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
// Hand-written: the session-artifact list endpoint is not in the generated
|
|
2
2
|
// OpenAPI surface yet. Shared by the iOS and Android instance helpers.
|
|
3
|
-
// SessionLogLine and
|
|
4
|
-
// limrun repo; the runtimes emit the same JSON
|
|
5
|
-
// persisted JSONL artifacts.
|
|
3
|
+
// SessionLogLine, SessionEvent and PerformanceSample mirror
|
|
4
|
+
// pkg/artifacts/contract.go in the limrun repo; the runtimes emit the same JSON
|
|
5
|
+
// over live SSE and into the persisted JSONL artifacts.
|
|
6
6
|
|
|
7
7
|
/** The kind of a persisted session capture. */
|
|
8
|
-
export type SessionArtifactKind = 'recording' | 'appLog' | 'eventLog' | 'networkLog';
|
|
8
|
+
export type SessionArtifactKind = 'recording' | 'appLog' | 'eventLog' | 'networkLog' | 'performance';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* One persisted session capture of an instance: a video recording, an app log
|
|
12
|
-
* capture, a coalesced event log,
|
|
13
|
-
* director's
|
|
14
|
-
*
|
|
12
|
+
* capture, a coalesced event log, a HAR network log, or iOS app performance
|
|
13
|
+
* samples. Returned by the director's
|
|
14
|
+
* GET /v1/{ios,android}_instances/{id}/session_artifacts endpoint, optionally
|
|
15
|
+
* narrowed with its kind query parameter.
|
|
15
16
|
*/
|
|
16
17
|
export interface SessionArtifact {
|
|
17
18
|
id: string;
|
|
@@ -38,7 +39,8 @@ export interface SessionArtifact {
|
|
|
38
39
|
|
|
39
40
|
/**
|
|
40
41
|
* Short-lived presigned GET URL for the raw artifact: MP4 for recordings,
|
|
41
|
-
* JSONL for app logs and
|
|
42
|
+
* JSONL for app logs, event logs and performance samples, HAR for network
|
|
43
|
+
* logs.
|
|
42
44
|
*/
|
|
43
45
|
downloadUrl: string;
|
|
44
46
|
}
|
|
@@ -93,3 +95,56 @@ export interface SessionEvent {
|
|
|
93
95
|
*/
|
|
94
96
|
summary?: string;
|
|
95
97
|
}
|
|
98
|
+
|
|
99
|
+
/** One thread's share of an app's CPU in a {@link PerformanceSample}. */
|
|
100
|
+
export interface PerformanceThread {
|
|
101
|
+
/** The thread's name, `main` for the main thread, or empty. */
|
|
102
|
+
name: string;
|
|
103
|
+
|
|
104
|
+
/** Share of one core; 100 is one fully busy core. */
|
|
105
|
+
cpuPercent: number;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* One running app's resource use at one moment, the figures Xcode's debug
|
|
110
|
+
* gauges show. iOS instances sample every running app they installed once a
|
|
111
|
+
* second, delivered live by `streamPerformance` and stored one-per-line in
|
|
112
|
+
* `performance` artifacts. Rates cover the second since the previous sample of
|
|
113
|
+
* the same process, so a process's first sample has none.
|
|
114
|
+
*/
|
|
115
|
+
export interface PerformanceSample {
|
|
116
|
+
/** Epoch milliseconds, same clock as SessionLogLine. */
|
|
117
|
+
ts: number;
|
|
118
|
+
|
|
119
|
+
bundleId: string;
|
|
120
|
+
|
|
121
|
+
/** Changes when the app relaunches. */
|
|
122
|
+
pid: number;
|
|
123
|
+
|
|
124
|
+
/** The process start in epoch milliseconds. */
|
|
125
|
+
startedAt: number;
|
|
126
|
+
|
|
127
|
+
/** Set for XCTest runners such as WebDriverAgent. */
|
|
128
|
+
testRunner?: boolean;
|
|
129
|
+
|
|
130
|
+
/** One fully busy core is 100, so a multithreaded app can exceed it. */
|
|
131
|
+
cpuPercent?: number;
|
|
132
|
+
|
|
133
|
+
/** Physical footprint, the figure Xcode's memory gauge and iOS's memory limit use. */
|
|
134
|
+
footprintBytes: number;
|
|
135
|
+
|
|
136
|
+
/** The highest footprint over the process lifetime. */
|
|
137
|
+
peakFootprintBytes: number;
|
|
138
|
+
|
|
139
|
+
threadCount: number;
|
|
140
|
+
|
|
141
|
+
diskReadBytesPerSecond?: number;
|
|
142
|
+
|
|
143
|
+
diskWriteBytesPerSecond?: number;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Up to five threads using at least 0.1% of a core, busiest first. They add
|
|
147
|
+
* up to roughly, not exactly, the app's `cpuPercent`.
|
|
148
|
+
*/
|
|
149
|
+
topThreads?: PerformanceThread[];
|
|
150
|
+
}
|
|
@@ -293,6 +293,9 @@ export type XcodeBuildOptions = {
|
|
|
293
293
|
* silently ignore this option.
|
|
294
294
|
*/
|
|
295
295
|
env?: string[];
|
|
296
|
+
/** Secret references resolved by the workload; overrides saved bindings for this operation. */
|
|
297
|
+
envFromSecret?: Record<string, string>;
|
|
298
|
+
fileFromSecret?: Record<string, string>;
|
|
296
299
|
/**
|
|
297
300
|
* Run `git init` in the synced workspace before project generation,
|
|
298
301
|
* dependency resolution, and xcodebuild.
|
|
@@ -1074,6 +1077,8 @@ export class XcodeInstances extends GeneratedXcodeInstances {
|
|
|
1074
1077
|
...(options?.appstore && { testflight: options.appstore }),
|
|
1075
1078
|
...(options?.buildSettings && { buildSettings: options.buildSettings }),
|
|
1076
1079
|
...(options?.env?.length && { env: options.env }),
|
|
1080
|
+
...(options?.envFromSecret && { envFromSecret: options.envFromSecret }),
|
|
1081
|
+
...(options?.fileFromSecret && { fileFromSecret: options.fileFromSecret }),
|
|
1077
1082
|
...(options?.gitInit !== undefined && { gitInit: options.gitInit }),
|
|
1078
1083
|
...(options?.logProcessor && { logProcessor: options.logProcessor }),
|
|
1079
1084
|
...(options?.webhook && { webhook: options.webhook }),
|
|
@@ -77,10 +77,19 @@ export namespace XcodeInstance {
|
|
|
77
77
|
labels?: { [key: string]: string };
|
|
78
78
|
|
|
79
79
|
terminatedAt?: string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Billing cutoff for a deletion requested while the region is unavailable.
|
|
83
|
+
* Absent for normal regional deletions.
|
|
84
|
+
*/
|
|
85
|
+
terminatingAt?: string;
|
|
80
86
|
}
|
|
81
87
|
|
|
82
88
|
export interface Spec {
|
|
83
89
|
/** Current effective permissions. Present on live GETs; historical records may omit it. */
|
|
90
|
+
/** Environment variable names mapped to secret TIDs or name/<exact-name> targets. */
|
|
91
|
+
envFromSecret?: Record<string, string>;
|
|
92
|
+
fileFromSecret?: Record<string, string>;
|
|
84
93
|
role?: { permissions: string[] };
|
|
85
94
|
|
|
86
95
|
inactivityTimeout: string;
|
|
@@ -98,20 +107,22 @@ export namespace XcodeInstance {
|
|
|
98
107
|
*/
|
|
99
108
|
token?: string;
|
|
100
109
|
|
|
101
|
-
state: 'unknown' | 'creating' | 'assigned' | 'ready' | 'terminated';
|
|
110
|
+
state: 'unknown' | 'creating' | 'assigned' | 'ready' | 'terminating' | 'terminated';
|
|
102
111
|
|
|
103
112
|
apiUrl?: string;
|
|
104
113
|
|
|
105
114
|
errorMessage?: string;
|
|
106
115
|
|
|
107
116
|
/**
|
|
108
|
-
* Machine-readable reason
|
|
109
|
-
*
|
|
110
|
-
*
|
|
117
|
+
* Machine-readable reason for instance termination. Present when state is
|
|
118
|
+
* "terminating" or "terminated". New values may be added over time, so treat any
|
|
119
|
+
* unrecognized value as "Unknown". Known values:
|
|
111
120
|
*
|
|
112
121
|
* - "UserRequested": terminated by a delete request to the API.
|
|
113
122
|
* - "InactivityTimeout": the timeout given in spec.inactivityTimeout elapsed.
|
|
114
123
|
* - "HardTimeout": the timeout given in spec.hardTimeout elapsed.
|
|
124
|
+
* - "CapacityTimeout": no instance was free when it was created, and none freed
|
|
125
|
+
* up before its wait for capacity ended.
|
|
115
126
|
* - "Unknown": terminated for a cause the platform did not attribute, including
|
|
116
127
|
* instances that failed to get ready during creation. See errorMessage for
|
|
117
128
|
* details when available.
|
|
@@ -126,7 +137,10 @@ export interface XcodeInstanceUpdateParams {
|
|
|
126
137
|
/** Replaces all customer labels. Use {} to clear them. Omission preserves labels. */
|
|
127
138
|
metadata?: { labels: { [key: string]: string } };
|
|
128
139
|
spec?: {
|
|
129
|
-
|
|
140
|
+
/** Replaces saved bindings. Use {} to clear them. */
|
|
141
|
+
envFromSecret?: Record<string, string>;
|
|
142
|
+
fileFromSecret?: Record<string, string>;
|
|
143
|
+
role?: {
|
|
130
144
|
/** Replaces the complete list. Use [] to remove delegated permissions. */
|
|
131
145
|
permissions: string[];
|
|
132
146
|
};
|
|
@@ -165,6 +179,9 @@ export namespace XcodeInstanceCreateParams {
|
|
|
165
179
|
|
|
166
180
|
export interface Spec {
|
|
167
181
|
/** Inline instance role. Omit for the organization's compatibility default. */
|
|
182
|
+
/** Environment variable names mapped to secret TIDs or name/<exact-name> targets. */
|
|
183
|
+
envFromSecret?: Record<string, string>;
|
|
184
|
+
fileFromSecret?: Record<string, string>;
|
|
168
185
|
role?: {
|
|
169
186
|
/** Asset permissions delegated by the creator. An empty array grants nothing. */
|
|
170
187
|
permissions: Array<string>;
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.71.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.71.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.71.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.71.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|