@limrun/api 0.64.0 → 0.64.2

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/src/client.ts CHANGED
@@ -104,6 +104,12 @@ export interface ClientOptions {
104
104
  */
105
105
  apiKey?: string | null | undefined;
106
106
 
107
+ /**
108
+ * Identify your application before the SDK's default User-Agent, for example "my-app/1.0".
109
+ * Explicit User-Agent headers in defaultHeaders or request options override this value.
110
+ */
111
+ userAgent?: string | undefined;
112
+
107
113
  /**
108
114
  * Override the default base URL for the API, e.g., "https://api.example.com/v2/"
109
115
  *
@@ -195,6 +201,7 @@ export class Limrun {
195
201
  * API Client for interfacing with the Limrun API.
196
202
  *
197
203
  * @param {string | null | undefined} [opts.apiKey=process.env['LIM_API_KEY'] ?? null]
204
+ * @param {string} [opts.userAgent] - Application identifier prepended to the SDK's default User-Agent.
198
205
  * @param {string} [opts.baseURL=process.env['LIMRUN_BASE_URL'] ?? https://api.limrun.com] - Override the default base URL for the API.
199
206
  * @param {number} [opts.timeout=5 minutes] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
200
207
  * @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
@@ -304,7 +311,9 @@ export class Limrun {
304
311
  }
305
312
 
306
313
  private getUserAgent(): string {
307
- return `${this.constructor.name}/JS ${VERSION}`;
314
+ const sdkUserAgent = `${this.constructor.name}/JS ${VERSION}`;
315
+ const userAgent = this._options.userAgent?.trim();
316
+ return userAgent ? `${userAgent} ${sdkUserAgent}` : sdkUserAgent;
308
317
  }
309
318
 
310
319
  protected defaultIdempotencyKey(): string {
@@ -344,6 +344,8 @@ export type XctestSummaryEvent = {
344
344
  export type XctestEvent = XctestCaseEvent | XctestSummaryEvent;
345
345
 
346
346
  export type AppStoreEvent = {
347
+ /** Verified target App Store Connect app ID, present once the target is resolved. */
348
+ appId?: string;
347
349
  /** 'unknown' means an App Store upload event arrived but its payload was unreadable. */
348
350
  state: 'uploading' | 'processing' | 'accepted' | 'failed' | 'unknown';
349
351
  uploadId?: string;
@@ -361,6 +363,12 @@ export type PlaystoreEvent = {
361
363
  };
362
364
 
363
365
  export type AppStoreUploadConfig = {
366
+ /**
367
+ * Optional App Store Connect app ID. Its bundle ID must exactly match the
368
+ * built app. Also used for automatic build-number lookup. Omit to find an
369
+ * exact bundle-ID match automatically.
370
+ */
371
+ appId?: string;
364
372
  /** App Store Connect API key ID, e.g. 2X9R4HXF34. */
365
373
  apiKeyId: string;
366
374
  /** Issuer ID for team API keys. Omit for individual API keys. */
@@ -914,11 +914,6 @@ export class XcodeInstances extends GeneratedXcodeInstances {
914
914
 
915
915
  const log = createDaemonLogger('[XcodeInstance]', params.logLevel ?? 'info');
916
916
  const client = this._client;
917
- let sandboxInfoPromise: Promise<SandboxInfo> | undefined;
918
- const getSandboxInfo = () => {
919
- sandboxInfoPromise ??= fetchSandboxInfo(apiUrl, token);
920
- return sandboxInfoPromise;
921
- };
922
917
 
923
918
  // Shared local closures. The methods below live in an object literal over
924
919
  // these closures (not `this`), so anything reused across methods is defined
@@ -977,15 +972,6 @@ export class XcodeInstances extends GeneratedXcodeInstances {
977
972
  return {
978
973
  async sync(localCodePath: string, opts?: SyncOptions): Promise<SyncResult> {
979
974
  const { cacheKey, basisCacheDir } = deriveBasisCache(localCodePath, opts?.basisCacheDir);
980
- const sandboxInfo =
981
- opts?.additionalFiles && opts.additionalFiles.length > 0 ? await getSandboxInfo() : undefined;
982
- const additionalFiles = opts?.additionalFiles?.map((file) => ({
983
- localPath: file.localPath,
984
- remotePath:
985
- sandboxInfo && file.remotePath.startsWith('~/') ?
986
- `${sandboxInfo.homeDir}/${file.remotePath.slice(2)}`
987
- : file.remotePath,
988
- }));
989
975
  const codeSyncOpts: FolderSyncOptions = {
990
976
  apiUrl,
991
977
  token,
@@ -1006,7 +992,7 @@ export class XcodeInstances extends GeneratedXcodeInstances {
1006
992
  // limulator app-install sync (ios-client.ts) does not and keeps
1007
993
  // the default skip behavior.
1008
994
  syncSymlinks: true,
1009
- ...(additionalFiles ? { additionalFiles } : {}),
995
+ ...(opts?.additionalFiles && { additionalFiles: opts.additionalFiles }),
1010
996
  ...(opts?.onSyncComplete ? { onSyncComplete: opts.onSyncComplete } : {}),
1011
997
  };
1012
998
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.64.0'; // x-release-please-version
1
+ export const VERSION = '0.64.2'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.64.0";
1
+ export declare const VERSION = "0.64.2";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.64.0";
1
+ export declare const VERSION = "0.64.2";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.64.0'; // x-release-please-version
4
+ exports.VERSION = '0.64.2'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.64.0'; // x-release-please-version
1
+ export const VERSION = '0.64.2'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map