@limrun/api 0.78.0 → 0.79.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/folder-sync.d.mts +2 -0
  3. package/folder-sync.d.mts.map +1 -1
  4. package/folder-sync.d.ts +2 -0
  5. package/folder-sync.d.ts.map +1 -1
  6. package/folder-sync.js +1 -1
  7. package/folder-sync.js.map +1 -1
  8. package/folder-sync.mjs +1 -1
  9. package/folder-sync.mjs.map +1 -1
  10. package/index.d.mts +1 -0
  11. package/index.d.mts.map +1 -1
  12. package/index.d.ts +1 -0
  13. package/index.d.ts.map +1 -1
  14. package/index.js +5 -2
  15. package/index.js.map +1 -1
  16. package/index.mjs +1 -0
  17. package/index.mjs.map +1 -1
  18. package/package.json +11 -1
  19. package/project-identity.d.mts +20 -0
  20. package/project-identity.d.mts.map +1 -0
  21. package/project-identity.d.ts +20 -0
  22. package/project-identity.d.ts.map +1 -0
  23. package/project-identity.js +197 -0
  24. package/project-identity.js.map +1 -0
  25. package/project-identity.mjs +192 -0
  26. package/project-identity.mjs.map +1 -0
  27. package/resources/android-instances.d.mts +8 -0
  28. package/resources/android-instances.d.mts.map +1 -1
  29. package/resources/android-instances.d.ts +8 -0
  30. package/resources/android-instances.d.ts.map +1 -1
  31. package/resources/ios-instances.d.mts +8 -0
  32. package/resources/ios-instances.d.mts.map +1 -1
  33. package/resources/ios-instances.d.ts +8 -0
  34. package/resources/ios-instances.d.ts.map +1 -1
  35. package/resources/macos-instances.d.mts +8 -0
  36. package/resources/macos-instances.d.mts.map +1 -1
  37. package/resources/macos-instances.d.ts +8 -0
  38. package/resources/macos-instances.d.ts.map +1 -1
  39. package/resources/xcode-instances-helpers.d.mts +6 -0
  40. package/resources/xcode-instances-helpers.d.mts.map +1 -1
  41. package/resources/xcode-instances-helpers.d.ts +6 -0
  42. package/resources/xcode-instances-helpers.d.ts.map +1 -1
  43. package/resources/xcode-instances-helpers.js +5 -0
  44. package/resources/xcode-instances-helpers.js.map +1 -1
  45. package/resources/xcode-instances-helpers.mjs +5 -0
  46. package/resources/xcode-instances-helpers.mjs.map +1 -1
  47. package/src/folder-sync.ts +3 -1
  48. package/src/index.ts +1 -0
  49. package/src/project-identity.ts +178 -0
  50. package/src/resources/android-instances.ts +7 -0
  51. package/src/resources/ios-instances.ts +7 -0
  52. package/src/resources/macos-instances.ts +7 -0
  53. package/src/resources/xcode-instances-helpers.ts +11 -0
  54. package/src/version.ts +1 -1
  55. package/version.d.mts +1 -1
  56. package/version.d.ts +1 -1
  57. package/version.js +1 -1
  58. package/version.mjs +1 -1
@@ -311,6 +311,13 @@ export namespace IosInstanceCreateParams {
311
311
  * holds it, and the instance becomes ready only after the tunnel attaches.
312
312
  */
313
313
  tunnel?: string;
314
+
315
+ /**
316
+ * HTTP headers the instance adds, next to `Limrun-Instance-Id`, to every inspected
317
+ * request it sends through a tunnel, so a service behind one shared tunnel can tell
318
+ * instances apart. The network capture shows them, so do not put secrets here.
319
+ */
320
+ tunnelHeaders?: { [name: string]: string };
314
321
  }
315
322
 
316
323
  export namespace Spec {
@@ -267,6 +267,13 @@ export namespace MacosInstanceCreateParams {
267
267
  * holds it, and the instance becomes ready only after the tunnel attaches.
268
268
  */
269
269
  tunnel?: string;
270
+
271
+ /**
272
+ * HTTP headers the instance adds, next to `Limrun-Instance-Id`, to every inspected
273
+ * request it sends through a tunnel, so a service behind one shared tunnel can tell
274
+ * instances apart. The network capture shows them, so do not put secrets here.
275
+ */
276
+ tunnelHeaders?: { [name: string]: string };
270
277
  }
271
278
 
272
279
  export namespace Spec {
@@ -48,6 +48,7 @@ import {
48
48
  type FolderSyncOptions,
49
49
  } from '../folder-sync';
50
50
  import { createIgnoreFn } from '../folder-sync-ignore';
51
+ import { projectFolderName } from '../project-identity';
51
52
  import {
52
53
  createBuildRun,
53
54
  type BuildRunOptions,
@@ -104,6 +105,12 @@ export type SyncOptions = {
104
105
  additionalFiles?: AdditionalFileSyncEntry[];
105
106
  /** Called after every successful sync, including watch-triggered re-syncs. */
106
107
  onSyncComplete?: FolderSyncOptions['onSyncComplete'];
108
+ /**
109
+ * Folder the project syncs into on the instance. Defaults to a name taken from the Git
110
+ * repository, so every clone and worktree of a project shares one folder and its build state.
111
+ * A project outside Git uses the local folder's name.
112
+ */
113
+ rootName?: string;
107
114
  };
108
115
 
109
116
  export type XcodeRunOptions = BuildRunOptions;
@@ -1021,6 +1028,9 @@ export class XcodeInstances extends GeneratedXcodeInstances {
1021
1028
  },
1022
1029
  async sync(localCodePath: string, opts?: SyncOptions): Promise<SyncResult> {
1023
1030
  const { cacheKey, basisCacheDir } = deriveBasisCache(localCodePath, opts?.basisCacheDir);
1031
+ // Build state on the instance is tied to this folder's path. A name taken from the local
1032
+ // folder gives each worktree its own path, so none could reuse another's snapshot.
1033
+ const rootName = opts?.rootName ?? projectFolderName(localCodePath);
1024
1034
  const codeSyncOpts: FolderSyncOptions = {
1025
1035
  apiUrl,
1026
1036
  token,
@@ -1043,6 +1053,7 @@ export class XcodeInstances extends GeneratedXcodeInstances {
1043
1053
  syncSymlinks: true,
1044
1054
  ...(opts?.additionalFiles && { additionalFiles: opts.additionalFiles }),
1045
1055
  ...(opts?.onSyncComplete ? { onSyncComplete: opts.onSyncComplete } : {}),
1056
+ ...(rootName ? { rootName } : {}),
1046
1057
  };
1047
1058
 
1048
1059
  const result = await syncFolderImpl(localCodePath, codeSyncOpts);
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.78.0'; // x-release-please-version
1
+ export const VERSION = '0.79.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.78.0";
1
+ export declare const VERSION = "0.79.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.78.0";
1
+ export declare const VERSION = "0.79.0";
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.78.0'; // x-release-please-version
4
+ exports.VERSION = '0.79.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.78.0'; // x-release-please-version
1
+ export const VERSION = '0.79.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map