@limrun/api 0.46.13 → 0.47.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 +43 -0
- package/exec-client.d.mts +13 -1
- package/exec-client.d.mts.map +1 -1
- package/exec-client.d.ts +13 -1
- package/exec-client.d.ts.map +1 -1
- package/exec-client.js.map +1 -1
- package/exec-client.mjs.map +1 -1
- package/folder-sync-ignore.d.mts +4 -3
- package/folder-sync-ignore.d.mts.map +1 -1
- package/folder-sync-ignore.d.ts +4 -3
- package/folder-sync-ignore.d.ts.map +1 -1
- package/folder-sync-ignore.js +13 -7
- package/folder-sync-ignore.js.map +1 -1
- package/folder-sync-ignore.mjs +13 -7
- package/folder-sync-ignore.mjs.map +1 -1
- package/instance-client.d.mts +51 -1
- package/instance-client.d.mts.map +1 -1
- package/instance-client.d.ts +51 -1
- package/instance-client.d.ts.map +1 -1
- package/instance-client.js +46 -0
- package/instance-client.js.map +1 -1
- package/instance-client.mjs +46 -0
- package/instance-client.mjs.map +1 -1
- package/ios-client.d.mts +21 -0
- package/ios-client.d.mts.map +1 -1
- package/ios-client.d.ts +21 -0
- package/ios-client.d.ts.map +1 -1
- package/ios-client.js +27 -0
- package/ios-client.js.map +1 -1
- package/ios-client.mjs +27 -0
- package/ios-client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/daemon-client-shared.d.mts +9 -0
- package/resources/daemon-client-shared.d.mts.map +1 -1
- package/resources/daemon-client-shared.d.ts +9 -0
- package/resources/daemon-client-shared.d.ts.map +1 -1
- package/resources/daemon-client-shared.js +11 -1
- package/resources/daemon-client-shared.js.map +1 -1
- package/resources/daemon-client-shared.mjs +10 -1
- package/resources/daemon-client-shared.mjs.map +1 -1
- package/resources/gradle-instances-helpers.d.mts +8 -0
- package/resources/gradle-instances-helpers.d.mts.map +1 -1
- package/resources/gradle-instances-helpers.d.ts +8 -0
- package/resources/gradle-instances-helpers.d.ts.map +1 -1
- package/resources/gradle-instances-helpers.js +1 -1
- package/resources/gradle-instances-helpers.js.map +1 -1
- package/resources/gradle-instances-helpers.mjs +1 -1
- package/resources/gradle-instances-helpers.mjs.map +1 -1
- package/resources/xcode-instances-helpers.d.mts +46 -3
- package/resources/xcode-instances-helpers.d.mts.map +1 -1
- package/resources/xcode-instances-helpers.d.ts +46 -3
- package/resources/xcode-instances-helpers.d.ts.map +1 -1
- package/resources/xcode-instances-helpers.js +2 -1
- package/resources/xcode-instances-helpers.js.map +1 -1
- package/resources/xcode-instances-helpers.mjs +2 -1
- package/resources/xcode-instances-helpers.mjs.map +1 -1
- package/src/exec-client.ts +13 -1
- package/src/folder-sync-ignore.ts +12 -7
- package/src/instance-client.ts +114 -1
- package/src/ios-client.ts +51 -0
- package/src/resources/daemon-client-shared.ts +11 -1
- package/src/resources/gradle-instances-helpers.ts +22 -8
- package/src/resources/xcode-instances-helpers.ts +48 -4
- 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/ios-client.ts
CHANGED
|
@@ -270,6 +270,18 @@ export type ContainerTargetOptions = {
|
|
|
270
270
|
containerType?: string;
|
|
271
271
|
};
|
|
272
272
|
|
|
273
|
+
/** A file or directory inside the simulator staging folder or an app container. */
|
|
274
|
+
export type IosFileEntry = {
|
|
275
|
+
/** Entry name within the listed directory. */
|
|
276
|
+
name: string;
|
|
277
|
+
/** Entry path relative to the selected storage root; usable with pullFile/pushFile/deleteFile. */
|
|
278
|
+
path: string;
|
|
279
|
+
/** Whether the entry is a directory. */
|
|
280
|
+
isDirectory: boolean;
|
|
281
|
+
/** File size in bytes. Omitted for directories. */
|
|
282
|
+
size?: number;
|
|
283
|
+
};
|
|
284
|
+
|
|
273
285
|
/**
|
|
274
286
|
* Options for playing a video file as the simulated camera feed.
|
|
275
287
|
*/
|
|
@@ -949,6 +961,17 @@ export type InstanceClient = {
|
|
|
949
961
|
*/
|
|
950
962
|
pullFile: (name: string, opts?: ContainerTargetOptions) => Promise<Buffer>;
|
|
951
963
|
|
|
964
|
+
/**
|
|
965
|
+
* List a directory in the simulator staging folder or an app container.
|
|
966
|
+
*
|
|
967
|
+
* Returned paths are relative to the selected storage root and can be passed
|
|
968
|
+
* directly to `pullFile`, `pushFile`, or `deleteFile` with the same options.
|
|
969
|
+
*
|
|
970
|
+
* @param path Relative directory to list. Empty or `.` lists the storage root.
|
|
971
|
+
* @param opts Optional app container targeting (see `pushFile`).
|
|
972
|
+
*/
|
|
973
|
+
listFiles: (path?: string, opts?: ContainerTargetOptions) => Promise<IosFileEntry[]>;
|
|
974
|
+
|
|
952
975
|
/**
|
|
953
976
|
* Delete a file or folder (recursively) on the simulator.
|
|
954
977
|
*
|
|
@@ -2023,6 +2046,7 @@ export async function createInstanceClient(options: InstanceClientOptions): Prom
|
|
|
2023
2046
|
xcodebuild,
|
|
2024
2047
|
pushFile,
|
|
2025
2048
|
pullFile,
|
|
2049
|
+
listFiles,
|
|
2026
2050
|
deleteFile,
|
|
2027
2051
|
setCameraVideo,
|
|
2028
2052
|
clearCameraVideo,
|
|
@@ -2612,6 +2636,33 @@ export async function createInstanceClient(options: InstanceClientOptions): Prom
|
|
|
2612
2636
|
return Buffer.from(await response.arrayBuffer());
|
|
2613
2637
|
};
|
|
2614
2638
|
|
|
2639
|
+
const listFiles = async (path = '.', opts?: ContainerTargetOptions): Promise<IosFileEntry[]> => {
|
|
2640
|
+
const params = new URLSearchParams();
|
|
2641
|
+
if (path && path !== '.') {
|
|
2642
|
+
params.set('path', path);
|
|
2643
|
+
}
|
|
2644
|
+
if (opts?.bundleId) {
|
|
2645
|
+
params.set('bundleId', opts.bundleId);
|
|
2646
|
+
if (opts.containerType) {
|
|
2647
|
+
params.set('containerType', opts.containerType);
|
|
2648
|
+
}
|
|
2649
|
+
}
|
|
2650
|
+
const query = params.toString();
|
|
2651
|
+
const url = `${options.apiUrl}/files/list${query ? `?${query}` : ''}`;
|
|
2652
|
+
const response = await nodeProxyTransport.fetch(url, {
|
|
2653
|
+
method: 'GET',
|
|
2654
|
+
headers: {
|
|
2655
|
+
Authorization: `Bearer ${options.token}`,
|
|
2656
|
+
},
|
|
2657
|
+
});
|
|
2658
|
+
if (!response.ok) {
|
|
2659
|
+
const errorBody = await response.text();
|
|
2660
|
+
throw new Error(`Listing of '${path}' failed: ${response.status} ${errorBody}`);
|
|
2661
|
+
}
|
|
2662
|
+
const result = (await response.json()) as { entries: IosFileEntry[] };
|
|
2663
|
+
return result.entries;
|
|
2664
|
+
};
|
|
2665
|
+
|
|
2615
2666
|
const deleteFile = async (name: string, opts?: ContainerTargetOptions): Promise<void> => {
|
|
2616
2667
|
const response = await nodeProxyTransport.fetch(buildFilesUrl(name, opts), {
|
|
2617
2668
|
method: 'DELETE',
|
|
@@ -88,9 +88,19 @@ export type AssetUploadOptions = {
|
|
|
88
88
|
deeplink?: string;
|
|
89
89
|
};
|
|
90
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Default TTL for build-product uploads. Every build upload without an
|
|
93
|
+
* explicit ttl pushes the asset's expiry to 14 days from that upload, so
|
|
94
|
+
* abandoned build artifacts don't accumulate in Asset Storage forever.
|
|
95
|
+
* Assets uploaded through the general asset API keep no expiry by default.
|
|
96
|
+
*/
|
|
97
|
+
export const DEFAULT_BUILD_ASSET_TTL = '336h';
|
|
98
|
+
|
|
91
99
|
/**
|
|
92
100
|
* Mints presigned upload/download URLs for a named asset via assets.getOrCreate,
|
|
93
101
|
* wrapping failures with the asset name (and the original error as cause).
|
|
102
|
+
* All build-product upload paths (xcodebuild, gradlebuild, RBE) go through
|
|
103
|
+
* here, which is what scopes DEFAULT_BUILD_ASSET_TTL to build uploads.
|
|
94
104
|
*/
|
|
95
105
|
export function mintAssetUploadUrls(
|
|
96
106
|
assets: {
|
|
@@ -100,7 +110,7 @@ export function mintAssetUploadUrls(
|
|
|
100
110
|
ttl?: string,
|
|
101
111
|
uploadOptions?: AssetUploadOptions,
|
|
102
112
|
): Promise<AssetUploadUrls> {
|
|
103
|
-
return assets.getOrCreate({ name,
|
|
113
|
+
return assets.getOrCreate({ name, ttl: ttl || DEFAULT_BUILD_ASSET_TTL, ...uploadOptions }).catch((err) => {
|
|
104
114
|
const message = `Failed to create upload URL for asset '${name}': ${
|
|
105
115
|
err instanceof Error ? err.message : err
|
|
106
116
|
}`;
|
|
@@ -56,7 +56,19 @@ export type GradleBuildOptions = {
|
|
|
56
56
|
/** Relative path to the Gradle root when auto-discovery is ambiguous. */
|
|
57
57
|
projectPath?: string;
|
|
58
58
|
/** Upload the built artifact as a named org asset, or to a presigned URL. */
|
|
59
|
-
upload?:
|
|
59
|
+
upload?:
|
|
60
|
+
| {
|
|
61
|
+
assetName: string;
|
|
62
|
+
/**
|
|
63
|
+
* Asset TTL as a Go duration (e.g. "24h", "30m"; "1d" is invalid),
|
|
64
|
+
* forwarded to assets.getOrCreate. Defaults to 336h (14 days): each
|
|
65
|
+
* build upload without an explicit ttl pushes the asset's expiry to
|
|
66
|
+
* 14 days from that upload.
|
|
67
|
+
*/
|
|
68
|
+
ttl?: string;
|
|
69
|
+
signedUploadUrl?: never;
|
|
70
|
+
}
|
|
71
|
+
| { signedUploadUrl: string; assetName?: never; ttl?: never };
|
|
60
72
|
/** React Native / Expo tuning. */
|
|
61
73
|
reactNative?: GradleReactNativeConfig;
|
|
62
74
|
/** Release signing config; presence makes bundleRelease the default task. */
|
|
@@ -183,13 +195,15 @@ class GradleInstancesHelpers extends GradleInstances {
|
|
|
183
195
|
};
|
|
184
196
|
|
|
185
197
|
if (options?.upload && 'assetName' in options.upload) {
|
|
186
|
-
const requestPromise = mintAssetUploadUrls(
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
198
|
+
const requestPromise = mintAssetUploadUrls(
|
|
199
|
+
client.assets,
|
|
200
|
+
options.upload.assetName,
|
|
201
|
+
options.upload.ttl,
|
|
202
|
+
).then((asset) => {
|
|
203
|
+
request.signedUploadUrl = asset.signedUploadUrl;
|
|
204
|
+
request.additionalMetadata = { signedDownloadUrl: asset.signedDownloadUrl };
|
|
205
|
+
return request;
|
|
206
|
+
});
|
|
193
207
|
return exec(requestPromise, { apiUrl, token, log });
|
|
194
208
|
}
|
|
195
209
|
|
|
@@ -90,8 +90,12 @@ export type SyncOptions = {
|
|
|
90
90
|
export type XcodeRunOptions = {
|
|
91
91
|
/** Working directory relative to the synced workspace root. Defaults to ".". */
|
|
92
92
|
cwd?: string;
|
|
93
|
-
/**
|
|
94
|
-
|
|
93
|
+
/**
|
|
94
|
+
* Ordered KEY=VALUE entries added to limbuild's curated sandbox
|
|
95
|
+
* environment. Server-managed variables (PATH, HOME, ...) cannot be
|
|
96
|
+
* overridden; when a key repeats, the last entry wins.
|
|
97
|
+
*/
|
|
98
|
+
env?: string[];
|
|
95
99
|
/** Server-side timeout in seconds. Defaults to 3600; maximum 21600. */
|
|
96
100
|
timeoutSeconds?: number;
|
|
97
101
|
};
|
|
@@ -105,6 +109,14 @@ export type XcodeProjectConfig = {
|
|
|
105
109
|
* Debug for native Xcode builds and Release for React Native / Expo builds.
|
|
106
110
|
*/
|
|
107
111
|
configuration?: 'Debug' | 'Release';
|
|
112
|
+
/**
|
|
113
|
+
* Full filename of the built app bundle, including the .app extension
|
|
114
|
+
* (e.g. "MyApp-dev.app"). When set, limbuild takes the artifact from
|
|
115
|
+
* this name in the built products directory verbatim, skipping artifact
|
|
116
|
+
* discovery. Use when the scheme name differs from the product name and
|
|
117
|
+
* discovery picks the wrong bundle.
|
|
118
|
+
*/
|
|
119
|
+
artifactName?: string;
|
|
108
120
|
};
|
|
109
121
|
|
|
110
122
|
export type XcodeGenConfig = {
|
|
@@ -173,12 +185,28 @@ export type ReactNativeBuildConfig = {
|
|
|
173
185
|
* server URL you want opened.
|
|
174
186
|
*/
|
|
175
187
|
devServerURL?: string;
|
|
188
|
+
/**
|
|
189
|
+
* Run `expo prebuild` even when the synced workspace already contains the
|
|
190
|
+
* native ios/ tree, regenerating it in place. Use when the tree holds
|
|
191
|
+
* client-synced files the server treats as user-owned (for example
|
|
192
|
+
* committed Podfile customizations) while the Xcode project itself is
|
|
193
|
+
* generated and gitignored. Requires a detectable Expo project. Older
|
|
194
|
+
* limbuild servers silently ignore this option.
|
|
195
|
+
*/
|
|
196
|
+
expoForcePrebuild?: boolean;
|
|
176
197
|
};
|
|
177
198
|
|
|
178
199
|
export type XcodeBuildOptions = {
|
|
179
200
|
upload?:
|
|
180
201
|
| {
|
|
181
202
|
assetName: string;
|
|
203
|
+
/**
|
|
204
|
+
* Asset TTL as a Go duration (e.g. "24h", "30m"; "1d" is invalid),
|
|
205
|
+
* forwarded to assets.getOrCreate. Defaults to 336h (14 days): each
|
|
206
|
+
* build upload without an explicit ttl pushes the asset's expiry to
|
|
207
|
+
* 14 days from that upload.
|
|
208
|
+
*/
|
|
209
|
+
ttl?: string;
|
|
182
210
|
/**
|
|
183
211
|
* App metadata to record on the asset up front. limbuild extracts
|
|
184
212
|
* the same metadata from the built bundle after the build and
|
|
@@ -207,6 +235,16 @@ export type XcodeBuildOptions = {
|
|
|
207
235
|
*/
|
|
208
236
|
xcodegen?: XcodeGenConfig;
|
|
209
237
|
buildSettings?: Record<string, string>;
|
|
238
|
+
/**
|
|
239
|
+
* Ordered KEY=VALUE entries added to the environment of every build
|
|
240
|
+
* pipeline command (dependency installs, expo prebuild, pod install,
|
|
241
|
+
* xcodebuild and its script phases). Server-managed variables (PATH,
|
|
242
|
+
* HOME, ...) cannot be overridden; when a key repeats, the last entry
|
|
243
|
+
* wins. Dependency installs always include devDependencies, so
|
|
244
|
+
* NODE_ENV=production cannot break them. Older limbuild servers
|
|
245
|
+
* silently ignore this option.
|
|
246
|
+
*/
|
|
247
|
+
env?: string[];
|
|
210
248
|
/**
|
|
211
249
|
* Run `git init` in the synced workspace before project generation,
|
|
212
250
|
* dependency resolution, and xcodebuild.
|
|
@@ -323,7 +361,12 @@ export type RbeUploadOptions =
|
|
|
323
361
|
| {
|
|
324
362
|
/** Upload as a named asset: the SDK mints the presigned upload URL via assets.getOrCreate. */
|
|
325
363
|
assetName: string;
|
|
326
|
-
/**
|
|
364
|
+
/**
|
|
365
|
+
* Optional asset TTL as a Go duration (e.g. "24h", "30m"; "1d" is
|
|
366
|
+
* invalid), forwarded to assets.getOrCreate. Defaults to 336h (14
|
|
367
|
+
* days): each upload without an explicit ttl pushes the asset's
|
|
368
|
+
* expiry to 14 days from that upload.
|
|
369
|
+
*/
|
|
327
370
|
ttl?: string;
|
|
328
371
|
signedUploadUrl?: never;
|
|
329
372
|
}
|
|
@@ -813,6 +856,7 @@ export class XcodeInstances extends GeneratedXcodeInstances {
|
|
|
813
856
|
// testflight until the exec API is revised separately.
|
|
814
857
|
...(options?.appstore && { testflight: options.appstore }),
|
|
815
858
|
...(options?.buildSettings && { buildSettings: options.buildSettings }),
|
|
859
|
+
...(options?.env?.length && { env: options.env }),
|
|
816
860
|
...(options?.gitInit !== undefined && { gitInit: options.gitInit }),
|
|
817
861
|
...(options?.webhook && { webhook: options.webhook }),
|
|
818
862
|
};
|
|
@@ -821,7 +865,7 @@ export class XcodeInstances extends GeneratedXcodeInstances {
|
|
|
821
865
|
const requestPromise = mintAssetUploadUrls(
|
|
822
866
|
client.assets,
|
|
823
867
|
options.upload.assetName,
|
|
824
|
-
|
|
868
|
+
options.upload.ttl,
|
|
825
869
|
options.upload.uploadOptions,
|
|
826
870
|
).then((asset) => {
|
|
827
871
|
request.signedUploadUrl = asset.signedUploadUrl;
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.47.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.47.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.47.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.47.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"}
|