@limrun/api 0.53.1 → 0.55.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 +51 -0
- package/README.md +23 -0
- package/destination-tunnel-dialer.d.mts +7 -0
- package/destination-tunnel-dialer.d.mts.map +1 -1
- package/destination-tunnel-dialer.d.ts +7 -0
- package/destination-tunnel-dialer.d.ts.map +1 -1
- package/destination-tunnel-dialer.js +22 -1
- package/destination-tunnel-dialer.js.map +1 -1
- package/destination-tunnel-dialer.mjs +21 -1
- package/destination-tunnel-dialer.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 +6 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/instance-client.d.mts +2 -17
- package/instance-client.d.mts.map +1 -1
- package/instance-client.d.ts +2 -17
- package/instance-client.d.ts.map +1 -1
- package/instance-client.js +1 -12
- package/instance-client.js.map +1 -1
- package/instance-client.mjs +2 -13
- package/instance-client.mjs.map +1 -1
- package/instance-token.d.mts +15 -0
- package/instance-token.d.mts.map +1 -0
- package/instance-token.d.ts +15 -0
- package/instance-token.d.ts.map +1 -0
- package/instance-token.js +17 -0
- package/instance-token.js.map +1 -0
- package/instance-token.mjs +14 -0
- package/instance-token.mjs.map +1 -0
- package/ios-client.d.mts +2 -8
- package/ios-client.d.mts.map +1 -1
- package/ios-client.d.ts +2 -8
- package/ios-client.d.ts.map +1 -1
- package/ios-client.js +1 -6
- package/ios-client.js.map +1 -1
- package/ios-client.mjs +2 -7
- package/ios-client.mjs.map +1 -1
- package/package.json +21 -1
- package/resources/android-instances.d.mts +13 -1
- package/resources/android-instances.d.mts.map +1 -1
- package/resources/android-instances.d.ts +13 -1
- package/resources/android-instances.d.ts.map +1 -1
- package/resources/gradle-instances-helpers.d.mts.map +1 -1
- package/resources/gradle-instances-helpers.d.ts.map +1 -1
- package/resources/gradle-instances-helpers.js +2 -1
- package/resources/gradle-instances-helpers.js.map +1 -1
- package/resources/gradle-instances-helpers.mjs +2 -1
- package/resources/gradle-instances-helpers.mjs.map +1 -1
- package/resources/gradle-instances.d.mts +6 -1
- package/resources/gradle-instances.d.mts.map +1 -1
- package/resources/gradle-instances.d.ts +6 -1
- package/resources/gradle-instances.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/ios-instances.d.mts +13 -21
- package/resources/ios-instances.d.mts.map +1 -1
- package/resources/ios-instances.d.ts +13 -21
- package/resources/ios-instances.d.ts.map +1 -1
- package/resources/xcode-instances-helpers.d.mts +18 -10
- package/resources/xcode-instances-helpers.d.mts.map +1 -1
- package/resources/xcode-instances-helpers.d.ts +18 -10
- package/resources/xcode-instances-helpers.d.ts.map +1 -1
- package/resources/xcode-instances-helpers.js +30 -9
- package/resources/xcode-instances-helpers.js.map +1 -1
- package/resources/xcode-instances-helpers.mjs +30 -9
- package/resources/xcode-instances-helpers.mjs.map +1 -1
- package/resources/xcode-instances.d.mts +6 -1
- package/resources/xcode-instances.d.mts.map +1 -1
- package/resources/xcode-instances.d.ts +6 -1
- package/resources/xcode-instances.d.ts.map +1 -1
- package/src/destination-tunnel-dialer.ts +33 -1
- package/src/index.ts +18 -0
- package/src/instance-client.ts +12 -32
- package/src/instance-token.ts +15 -0
- package/src/ios-client.ts +12 -13
- package/src/resources/android-instances.ts +14 -1
- package/src/resources/gradle-instances-helpers.ts +2 -1
- package/src/resources/gradle-instances.ts +6 -1
- package/src/resources/index.ts +1 -0
- package/src/resources/ios-instances.ts +14 -27
- package/src/resources/xcode-instances-helpers.ts +53 -13
- package/src/resources/xcode-instances.ts +6 -1
- package/src/version.ts +1 -1
- package/src/xcode-cache.ts +2 -25
- package/src/xcode-snapshot.ts +106 -0
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/xcode-cache.d.mts +2 -25
- package/xcode-cache.d.mts.map +1 -1
- package/xcode-cache.d.ts +2 -25
- package/xcode-cache.d.ts.map +1 -1
- package/xcode-cache.js.map +1 -1
- package/xcode-cache.mjs.map +1 -1
- package/xcode-snapshot.d.mts +47 -0
- package/xcode-snapshot.d.mts.map +1 -0
- package/xcode-snapshot.d.ts +47 -0
- package/xcode-snapshot.d.ts.map +1 -0
- package/xcode-snapshot.js +55 -0
- package/xcode-snapshot.js.map +1 -0
- package/xcode-snapshot.mjs +47 -0
- package/xcode-snapshot.mjs.map +1 -0
|
@@ -7,6 +7,7 @@ import { type IosInstance } from './ios-instances';
|
|
|
7
7
|
import { APIPromise } from '../core/api-promise';
|
|
8
8
|
import { RequestOptions } from '../internal/request-options';
|
|
9
9
|
import { path } from '../internal/utils/path';
|
|
10
|
+
import { instanceToken } from '../instance-token';
|
|
10
11
|
import {
|
|
11
12
|
followXcodeCache,
|
|
12
13
|
type XcodeCacheConfig,
|
|
@@ -14,6 +15,14 @@ import {
|
|
|
14
15
|
type XcodeCacheFollowResult,
|
|
15
16
|
type XcodeInstanceCache,
|
|
16
17
|
} from '../xcode-cache';
|
|
18
|
+
import {
|
|
19
|
+
followXcodeSnapshot,
|
|
20
|
+
snapshotFromCache,
|
|
21
|
+
type XcodeSnapshotConfig,
|
|
22
|
+
type XcodeSnapshotFollowOptions,
|
|
23
|
+
type XcodeSnapshotFollowResult,
|
|
24
|
+
type XcodeInstanceSnapshot,
|
|
25
|
+
} from '../xcode-snapshot';
|
|
17
26
|
import {
|
|
18
27
|
exec,
|
|
19
28
|
observeExecLogs,
|
|
@@ -634,11 +643,18 @@ export type XcodeCreateClientParams =
|
|
|
634
643
|
| { instance: XcodeInstance; logLevel?: LogLevel }
|
|
635
644
|
| { apiUrl: string; token: string; logLevel?: LogLevel };
|
|
636
645
|
|
|
637
|
-
/**
|
|
638
|
-
export type
|
|
639
|
-
spec?: XcodeInstanceCreateParams['spec'] & {
|
|
646
|
+
/** Create an Xcode instance with a persistent disk snapshot. */
|
|
647
|
+
export type XcodeInstanceCreateParamsWithSnapshot = Omit<XcodeInstanceCreateParams, 'spec'> & {
|
|
648
|
+
spec?: XcodeInstanceCreateParams['spec'] & {
|
|
649
|
+
snapshot?: XcodeSnapshotConfig;
|
|
650
|
+
/** @deprecated Use snapshot instead. */
|
|
651
|
+
cache?: XcodeCacheConfig;
|
|
652
|
+
};
|
|
640
653
|
};
|
|
641
654
|
|
|
655
|
+
/** @deprecated Use XcodeInstanceCreateParamsWithSnapshot instead. */
|
|
656
|
+
export type XcodeInstanceCreateParamsWithCache = XcodeInstanceCreateParamsWithSnapshot;
|
|
657
|
+
|
|
642
658
|
function normalizeWorkspaceRelativePath(remotePath: string): string {
|
|
643
659
|
if (
|
|
644
660
|
remotePath === '' ||
|
|
@@ -814,25 +830,48 @@ export class XcodeInstances extends GeneratedXcodeInstances {
|
|
|
814
830
|
return this._client.get(path`/v1/xcode_instances/${id}/bazel_build_logs`, options);
|
|
815
831
|
}
|
|
816
832
|
|
|
817
|
-
/**
|
|
818
|
-
* Create an Xcode instance, optionally with a build cache.
|
|
819
|
-
*
|
|
820
|
-
* Widens the generated signature with `spec.cache`; drop this override once the generator
|
|
821
|
-
* knows about the field. The request body passes through untouched either way.
|
|
822
|
-
*/
|
|
833
|
+
/** Create an Xcode instance, optionally restoring and saving a disk snapshot. */
|
|
823
834
|
override create(
|
|
824
|
-
params:
|
|
835
|
+
params: XcodeInstanceCreateParamsWithSnapshot,
|
|
825
836
|
options?: RequestOptions,
|
|
826
837
|
): APIPromise<XcodeInstance> {
|
|
838
|
+
if (params.spec?.snapshot !== undefined) {
|
|
839
|
+
const { snapshot, cache, ...spec } = params.spec;
|
|
840
|
+
if (cache !== undefined) {
|
|
841
|
+
throw new Error('Use either spec.snapshot or the legacy spec.cache, not both.');
|
|
842
|
+
}
|
|
843
|
+
return super.create(
|
|
844
|
+
{ ...params, spec: { ...spec, cache: snapshot } } as XcodeInstanceCreateParams,
|
|
845
|
+
options,
|
|
846
|
+
);
|
|
847
|
+
}
|
|
827
848
|
return super.create(params as XcodeInstanceCreateParams, options);
|
|
828
849
|
}
|
|
829
850
|
|
|
830
|
-
/** Current
|
|
851
|
+
/** Current snapshot configuration and status. */
|
|
852
|
+
getSnapshot(id: string, options?: RequestOptions): APIPromise<XcodeInstanceSnapshot> {
|
|
853
|
+
return this.getCache(id, options)._thenUnwrap(snapshotFromCache);
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
/** Set the publication key once for an instance created with snapshot configuration. */
|
|
857
|
+
bindSnapshotKey(id: string, key: string, options?: RequestOptions): APIPromise<XcodeInstanceSnapshot> {
|
|
858
|
+
return this.bindCacheKey(id, key, options)._thenUnwrap(snapshotFromCache);
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
/** Follow disk snapshot restoration or publication until it reaches a terminal phase. */
|
|
862
|
+
followSnapshot(id: string, options?: XcodeSnapshotFollowOptions): Promise<XcodeSnapshotFollowResult> {
|
|
863
|
+
const apiKey = this._client.apiKey;
|
|
864
|
+
if (!apiKey) throw new Error('Following disk snapshot status needs an API key on the client');
|
|
865
|
+
return followXcodeSnapshot({ baseURL: this._client.baseURL, apiKey, instanceId: id }, options);
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
/** @deprecated Use getSnapshot instead. */
|
|
831
869
|
getCache(id: string, options?: RequestOptions): APIPromise<XcodeInstanceCache> {
|
|
832
870
|
return this._client.get<XcodeInstanceCache>(path`/v1/xcode_instances/${id}/cache`, options);
|
|
833
871
|
}
|
|
834
872
|
|
|
835
873
|
/**
|
|
874
|
+
* @deprecated Use bindSnapshotKey instead.
|
|
836
875
|
* Bind the destination key this instance publishes under at termination. Set once: binding
|
|
837
876
|
* the same key again is accepted, a different one is rejected.
|
|
838
877
|
*
|
|
@@ -847,6 +886,7 @@ export class XcodeInstances extends GeneratedXcodeInstances {
|
|
|
847
886
|
}
|
|
848
887
|
|
|
849
888
|
/**
|
|
889
|
+
* @deprecated Use followSnapshot instead.
|
|
850
890
|
* Follow an instance's cache status until the chosen side reaches a terminal phase. Reports
|
|
851
891
|
* every phase change through `onUpdate`, so a caller can show a restore as it happens.
|
|
852
892
|
*/
|
|
@@ -866,7 +906,7 @@ export class XcodeInstances extends GeneratedXcodeInstances {
|
|
|
866
906
|
throw new Error('Instance not ready: apiUrl is not available');
|
|
867
907
|
}
|
|
868
908
|
apiUrl = params.instance.status.apiUrl;
|
|
869
|
-
token = params.instance
|
|
909
|
+
token = instanceToken(params.instance);
|
|
870
910
|
} else {
|
|
871
911
|
apiUrl = params.apiUrl;
|
|
872
912
|
token = params.token;
|
|
@@ -893,7 +933,7 @@ export class XcodeInstances extends GeneratedXcodeInstances {
|
|
|
893
933
|
throw new Error('Simulator instance not ready: apiUrl is not available');
|
|
894
934
|
}
|
|
895
935
|
simApiUrl = simulator.status.apiUrl;
|
|
896
|
-
simToken = simulator
|
|
936
|
+
simToken = instanceToken(simulator);
|
|
897
937
|
} else {
|
|
898
938
|
simApiUrl = simulator.apiUrl;
|
|
899
939
|
simToken = simulator.token;
|
|
@@ -78,7 +78,12 @@ export namespace XcodeInstance {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
export interface Status {
|
|
81
|
-
|
|
81
|
+
/**
|
|
82
|
+
* A signed token with full control of this instance, the credential its
|
|
83
|
+
* data-plane endpoints accept. Returned only to callers with full control of the
|
|
84
|
+
* instance: a read-only API key or a viewer seat gets records without it.
|
|
85
|
+
*/
|
|
86
|
+
token?: string;
|
|
82
87
|
|
|
83
88
|
state: 'unknown' | 'creating' | 'assigned' | 'ready' | 'terminated';
|
|
84
89
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.55.0'; // x-release-please-version
|
package/src/xcode-cache.ts
CHANGED
|
@@ -2,31 +2,8 @@ import { createEventSource, type EventSourceMessage } from 'eventsource-client';
|
|
|
2
2
|
|
|
3
3
|
import { nodeProxyTransport } from './internal/proxy-transport';
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
* instance, which resolves nothing, adopts no stable directory, and publishes nothing.
|
|
8
|
-
*/
|
|
9
|
-
export type XcodeCacheConfig = {
|
|
10
|
-
/**
|
|
11
|
-
* Where this instance's workspace is published at termination. Organization-scoped and set
|
|
12
|
-
* once, either here or later through `bindCacheKey`. Reusing a key is normal operation:
|
|
13
|
-
* termination replaces its archive.
|
|
14
|
-
*
|
|
15
|
-
* With no restoreKeys, a key given here also serves as the single restore key.
|
|
16
|
-
*/
|
|
17
|
-
key?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Keys to restore from, tried in exactly this order: exact match first, then literal prefix,
|
|
20
|
-
* newest archive first within a prefix. Immutable after create.
|
|
21
|
-
*/
|
|
22
|
-
restoreKeys?: string[];
|
|
23
|
-
/**
|
|
24
|
-
* Project-root-relative paths to store. Create-only, and it controls what is STORED: the
|
|
25
|
-
* first publication under a key fixes its path set and restores materialize that set.
|
|
26
|
-
* Omitted means the whole deterministic workspace.
|
|
27
|
-
*/
|
|
28
|
-
paths?: string[];
|
|
29
|
-
};
|
|
5
|
+
/** @deprecated Use XcodeSnapshotConfig instead. */
|
|
6
|
+
export type XcodeCacheConfig = import('./xcode-snapshot').XcodeSnapshotConfig;
|
|
30
7
|
|
|
31
8
|
/**
|
|
32
9
|
* How far a restore got. `disabled`, `unsupported` and `skipped` are not failures: they
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import {
|
|
2
|
+
followXcodeCache,
|
|
3
|
+
isRestoreTerminal,
|
|
4
|
+
isSaveTerminal,
|
|
5
|
+
XcodeCacheGoneError,
|
|
6
|
+
XcodeCacheTimeoutError,
|
|
7
|
+
type XcodeCacheFollowOptions,
|
|
8
|
+
type XcodeCacheFollowTarget,
|
|
9
|
+
type XcodeCacheRestorePhase,
|
|
10
|
+
type XcodeCacheRestoreStatus,
|
|
11
|
+
type XcodeCacheSavePhase,
|
|
12
|
+
type XcodeCacheSaveStatus,
|
|
13
|
+
type XcodeCacheSide,
|
|
14
|
+
type XcodeCacheSkippedKey,
|
|
15
|
+
type XcodeInstanceCache,
|
|
16
|
+
} from './xcode-cache';
|
|
17
|
+
|
|
18
|
+
/** A disk snapshot of the Xcode workspace, restored at creation and published at termination. */
|
|
19
|
+
export type XcodeSnapshotConfig = {
|
|
20
|
+
/** Save under this organization-scoped key at termination. Defaults to restoring this key too. */
|
|
21
|
+
key?: string;
|
|
22
|
+
/** Restore in order, trying an exact match then the newest literal-prefix match for each entry. */
|
|
23
|
+
restoreKeys?: string[];
|
|
24
|
+
/** Paths to save, fixed at creation. Omit to preserve the whole workspace. */
|
|
25
|
+
paths?: string[];
|
|
26
|
+
};
|
|
27
|
+
export type XcodeSnapshotRestorePhase = XcodeCacheRestorePhase;
|
|
28
|
+
export type XcodeSnapshotSavePhase = XcodeCacheSavePhase;
|
|
29
|
+
export type XcodeSnapshotRestoreStatus = XcodeCacheRestoreStatus;
|
|
30
|
+
export type XcodeSnapshotSkippedKey = XcodeCacheSkippedKey;
|
|
31
|
+
export type XcodeSnapshotSide = XcodeCacheSide;
|
|
32
|
+
export type XcodeSnapshotFollowTarget = XcodeCacheFollowTarget;
|
|
33
|
+
|
|
34
|
+
export type XcodeSnapshotSaveStatus = Omit<XcodeCacheSaveStatus, 'cacheKey'> & {
|
|
35
|
+
/** Destination key the workspace is published under. */
|
|
36
|
+
snapshotKey?: string;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export type XcodeInstanceSnapshot = {
|
|
40
|
+
config?: XcodeSnapshotConfig;
|
|
41
|
+
restore: XcodeSnapshotRestoreStatus;
|
|
42
|
+
save: XcodeSnapshotSaveStatus;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type XcodeSnapshotFollowOptions = Omit<XcodeCacheFollowOptions, 'onUpdate'> & {
|
|
46
|
+
/** Called once per distinct state, including the initial state. */
|
|
47
|
+
onUpdate?: (snapshot: XcodeInstanceSnapshot) => void;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type XcodeSnapshotFollowResult = {
|
|
51
|
+
snapshot: XcodeInstanceSnapshot;
|
|
52
|
+
/** True if the instance disappeared before reaching a terminal phase. */
|
|
53
|
+
gone: boolean;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** The instance disappeared before reporting its disk snapshot state. */
|
|
57
|
+
export class XcodeSnapshotGoneError extends XcodeCacheGoneError {
|
|
58
|
+
constructor(instanceId: string) {
|
|
59
|
+
super(instanceId);
|
|
60
|
+
this.name = 'XcodeSnapshotGoneError';
|
|
61
|
+
this.message = `Instance ${instanceId} was gone before it reported any disk snapshot status`;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export class XcodeSnapshotTimeoutError extends XcodeCacheTimeoutError {
|
|
66
|
+
readonly snapshot: XcodeInstanceSnapshot | undefined;
|
|
67
|
+
|
|
68
|
+
constructor(error: XcodeCacheTimeoutError) {
|
|
69
|
+
super(error.side, error.timeoutMs, error.cache);
|
|
70
|
+
this.name = 'XcodeSnapshotTimeoutError';
|
|
71
|
+
this.message = error.message.replace('the cache ', 'the disk snapshot ');
|
|
72
|
+
this.snapshot = error.cache ? snapshotFromCache(error.cache) : undefined;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Keep the wire format stable so new clients can use existing servers and saved workspaces.
|
|
77
|
+
export function snapshotFromCache(cache: XcodeInstanceCache): XcodeInstanceSnapshot {
|
|
78
|
+
const { cacheKey, ...save } = cache.save;
|
|
79
|
+
return {
|
|
80
|
+
...cache,
|
|
81
|
+
save: { ...save, ...(cacheKey !== undefined ? { snapshotKey: cacheKey } : {}) },
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function isSnapshotTerminal(snapshot: XcodeInstanceSnapshot, side: XcodeSnapshotSide): boolean {
|
|
86
|
+
return side === 'restore' ? isRestoreTerminal(snapshot.restore.phase) : isSaveTerminal(snapshot.save.phase);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** Follow restoration or publication until it ends, the instance disappears, or the wait times out. */
|
|
90
|
+
export async function followXcodeSnapshot(
|
|
91
|
+
target: XcodeSnapshotFollowTarget,
|
|
92
|
+
options: XcodeSnapshotFollowOptions = {},
|
|
93
|
+
): Promise<XcodeSnapshotFollowResult> {
|
|
94
|
+
const { onUpdate, ...rest } = options;
|
|
95
|
+
try {
|
|
96
|
+
const result = await followXcodeCache(target, {
|
|
97
|
+
...rest,
|
|
98
|
+
...(onUpdate ? { onUpdate: (cache: XcodeInstanceCache) => onUpdate(snapshotFromCache(cache)) } : {}),
|
|
99
|
+
});
|
|
100
|
+
return { snapshot: snapshotFromCache(result.cache), gone: result.gone };
|
|
101
|
+
} catch (error) {
|
|
102
|
+
if (error instanceof XcodeCacheGoneError) throw new XcodeSnapshotGoneError(error.instanceId);
|
|
103
|
+
if (error instanceof XcodeCacheTimeoutError) throw new XcodeSnapshotTimeoutError(error);
|
|
104
|
+
throw error;
|
|
105
|
+
}
|
|
106
|
+
}
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.55.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.55.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.55.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/xcode-cache.d.mts
CHANGED
|
@@ -1,28 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
* instance, which resolves nothing, adopts no stable directory, and publishes nothing.
|
|
4
|
-
*/
|
|
5
|
-
export type XcodeCacheConfig = {
|
|
6
|
-
/**
|
|
7
|
-
* Where this instance's workspace is published at termination. Organization-scoped and set
|
|
8
|
-
* once, either here or later through `bindCacheKey`. Reusing a key is normal operation:
|
|
9
|
-
* termination replaces its archive.
|
|
10
|
-
*
|
|
11
|
-
* With no restoreKeys, a key given here also serves as the single restore key.
|
|
12
|
-
*/
|
|
13
|
-
key?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Keys to restore from, tried in exactly this order: exact match first, then literal prefix,
|
|
16
|
-
* newest archive first within a prefix. Immutable after create.
|
|
17
|
-
*/
|
|
18
|
-
restoreKeys?: string[];
|
|
19
|
-
/**
|
|
20
|
-
* Project-root-relative paths to store. Create-only, and it controls what is STORED: the
|
|
21
|
-
* first publication under a key fixes its path set and restores materialize that set.
|
|
22
|
-
* Omitted means the whole deterministic workspace.
|
|
23
|
-
*/
|
|
24
|
-
paths?: string[];
|
|
25
|
-
};
|
|
1
|
+
/** @deprecated Use XcodeSnapshotConfig instead. */
|
|
2
|
+
export type XcodeCacheConfig = import("./xcode-snapshot.mjs").XcodeSnapshotConfig;
|
|
26
3
|
/**
|
|
27
4
|
* How far a restore got. `disabled`, `unsupported` and `skipped` are not failures: they
|
|
28
5
|
* describe an ordinary cold instance, which is perfectly usable. Only `failed` means the
|
package/xcode-cache.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xcode-cache.d.mts","sourceRoot":"","sources":["src/xcode-cache.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"xcode-cache.d.mts","sourceRoot":"","sources":["src/xcode-cache.ts"],"names":[],"mappings":"AAIA,mDAAmD;AACnD,MAAM,MAAM,gBAAgB,GAAG,+BAA2B,mBAAmB,CAAC;AAE9E;;;;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AAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAQxE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAEvE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAQlE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAExF;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,sBAAsB,EAC9B,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,sBAAsB,CAAC,CAiHjC"}
|
package/xcode-cache.d.ts
CHANGED
|
@@ -1,28 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
* instance, which resolves nothing, adopts no stable directory, and publishes nothing.
|
|
4
|
-
*/
|
|
5
|
-
export type XcodeCacheConfig = {
|
|
6
|
-
/**
|
|
7
|
-
* Where this instance's workspace is published at termination. Organization-scoped and set
|
|
8
|
-
* once, either here or later through `bindCacheKey`. Reusing a key is normal operation:
|
|
9
|
-
* termination replaces its archive.
|
|
10
|
-
*
|
|
11
|
-
* With no restoreKeys, a key given here also serves as the single restore key.
|
|
12
|
-
*/
|
|
13
|
-
key?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Keys to restore from, tried in exactly this order: exact match first, then literal prefix,
|
|
16
|
-
* newest archive first within a prefix. Immutable after create.
|
|
17
|
-
*/
|
|
18
|
-
restoreKeys?: string[];
|
|
19
|
-
/**
|
|
20
|
-
* Project-root-relative paths to store. Create-only, and it controls what is STORED: the
|
|
21
|
-
* first publication under a key fixes its path set and restores materialize that set.
|
|
22
|
-
* Omitted means the whole deterministic workspace.
|
|
23
|
-
*/
|
|
24
|
-
paths?: string[];
|
|
25
|
-
};
|
|
1
|
+
/** @deprecated Use XcodeSnapshotConfig instead. */
|
|
2
|
+
export type XcodeCacheConfig = import("./xcode-snapshot.js").XcodeSnapshotConfig;
|
|
26
3
|
/**
|
|
27
4
|
* How far a restore got. `disabled`, `unsupported` and `skipped` are not failures: they
|
|
28
5
|
* describe an ordinary cold instance, which is perfectly usable. Only `failed` means the
|
package/xcode-cache.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xcode-cache.d.ts","sourceRoot":"","sources":["src/xcode-cache.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"xcode-cache.d.ts","sourceRoot":"","sources":["src/xcode-cache.ts"],"names":[],"mappings":"AAIA,mDAAmD;AACnD,MAAM,MAAM,gBAAgB,GAAG,8BAA2B,mBAAmB,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAC9B,UAAU,GACV,aAAa,GACb,SAAS,GACT,aAAa,GACb,eAAe,GACf,UAAU,GACV,SAAS,GACT,QAAQ,CAAC;AAEb,+BAA+B;AAC/B,MAAM,MAAM,mBAAmB,GAC3B,UAAU,GACV,MAAM,GACN,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,SAAS,GACT,QAAQ,GACR,WAAW,CAAC;AAEhB,8FAA8F;AAC9F,MAAM,MAAM,oBAAoB,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnE,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,sBAAsB,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,WAAW,GAAG,YAAY,CAAC;IACvC,WAAW,CA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AO,EAAE,CAAC;YAC5B,OAAO,EAAE,CAAC;YACV,OAAO;QACT,CAAC;QACD,OAAO,CAAC,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/xcode-cache.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xcode-cache.mjs","sourceRoot":"","sources":["src/xcode-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA2B,MAAM,oBAAoB,CAAC;AAEhF,OAAO,EAAE,kBAAkB,EAAE,uCAAmC;
|
|
1
|
+
{"version":3,"file":"xcode-cache.mjs","sourceRoot":"","sources":["src/xcode-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA2B,MAAM,oBAAoB,CAAC;AAEhF,OAAO,EAAE,kBAAkB,EAAE,uCAAmC;AA4GhE;;;GAGG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC5C,YAAqB,UAAkB;QACrC,KAAK,CAAC,YAAY,UAAU,+CAA+C,CAAC,CAAC;QAD1D,eAAU,GAAV,UAAU,CAAQ;QAErC,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AAED,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC/C,YACW,IAAoB,EACpB,SAAiB,EACjB,KAAqC;QAE9C,KAAK,CACH,mBAAmB,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,2BAA2B,IAAI,YAAY;YACxF,CAAC,KAAK,CAAC,CAAC,CAAC,iBAAiB,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CACvD,CAAC;QAPO,SAAI,GAAJ,IAAI,CAAgB;QACpB,cAAS,GAAT,SAAS,CAAQ;QACjB,UAAK,GAAL,KAAK,C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C,MAAM,IAAI,EACvB,EAAE,CAAC;gBACH,IAAI,GAAG,KAAK,OAAO,EAAE,CAAC;oBACpB,OAAO,GAAG,GAAG,CAAC;oBACd,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;gBAC5B,CAAC;gBACD,IAAI,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC;oBACjC,MAAM,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;gBAChD,CAAC;YACH,CAAC;SACF,CAAC,CAAC;QAEH,IAAI,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;YAC5B,OAAO,EAAE,CAAC;YACV,OAAO;QACT,CAAC;QACD,OAAO,CAAC,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { XcodeCacheGoneError, XcodeCacheTimeoutError, type XcodeCacheFollowOptions, type XcodeCacheFollowTarget, type XcodeCacheRestorePhase, type XcodeCacheRestoreStatus, type XcodeCacheSavePhase, type XcodeCacheSaveStatus, type XcodeCacheSide, type XcodeCacheSkippedKey, type XcodeInstanceCache } from "./xcode-cache.mjs";
|
|
2
|
+
/** A disk snapshot of the Xcode workspace, restored at creation and published at termination. */
|
|
3
|
+
export type XcodeSnapshotConfig = {
|
|
4
|
+
/** Save under this organization-scoped key at termination. Defaults to restoring this key too. */
|
|
5
|
+
key?: string;
|
|
6
|
+
/** Restore in order, trying an exact match then the newest literal-prefix match for each entry. */
|
|
7
|
+
restoreKeys?: string[];
|
|
8
|
+
/** Paths to save, fixed at creation. Omit to preserve the whole workspace. */
|
|
9
|
+
paths?: string[];
|
|
10
|
+
};
|
|
11
|
+
export type XcodeSnapshotRestorePhase = XcodeCacheRestorePhase;
|
|
12
|
+
export type XcodeSnapshotSavePhase = XcodeCacheSavePhase;
|
|
13
|
+
export type XcodeSnapshotRestoreStatus = XcodeCacheRestoreStatus;
|
|
14
|
+
export type XcodeSnapshotSkippedKey = XcodeCacheSkippedKey;
|
|
15
|
+
export type XcodeSnapshotSide = XcodeCacheSide;
|
|
16
|
+
export type XcodeSnapshotFollowTarget = XcodeCacheFollowTarget;
|
|
17
|
+
export type XcodeSnapshotSaveStatus = Omit<XcodeCacheSaveStatus, 'cacheKey'> & {
|
|
18
|
+
/** Destination key the workspace is published under. */
|
|
19
|
+
snapshotKey?: string;
|
|
20
|
+
};
|
|
21
|
+
export type XcodeInstanceSnapshot = {
|
|
22
|
+
config?: XcodeSnapshotConfig;
|
|
23
|
+
restore: XcodeSnapshotRestoreStatus;
|
|
24
|
+
save: XcodeSnapshotSaveStatus;
|
|
25
|
+
};
|
|
26
|
+
export type XcodeSnapshotFollowOptions = Omit<XcodeCacheFollowOptions, 'onUpdate'> & {
|
|
27
|
+
/** Called once per distinct state, including the initial state. */
|
|
28
|
+
onUpdate?: (snapshot: XcodeInstanceSnapshot) => void;
|
|
29
|
+
};
|
|
30
|
+
export type XcodeSnapshotFollowResult = {
|
|
31
|
+
snapshot: XcodeInstanceSnapshot;
|
|
32
|
+
/** True if the instance disappeared before reaching a terminal phase. */
|
|
33
|
+
gone: boolean;
|
|
34
|
+
};
|
|
35
|
+
/** The instance disappeared before reporting its disk snapshot state. */
|
|
36
|
+
export declare class XcodeSnapshotGoneError extends XcodeCacheGoneError {
|
|
37
|
+
constructor(instanceId: string);
|
|
38
|
+
}
|
|
39
|
+
export declare class XcodeSnapshotTimeoutError extends XcodeCacheTimeoutError {
|
|
40
|
+
readonly snapshot: XcodeInstanceSnapshot | undefined;
|
|
41
|
+
constructor(error: XcodeCacheTimeoutError);
|
|
42
|
+
}
|
|
43
|
+
export declare function snapshotFromCache(cache: XcodeInstanceCache): XcodeInstanceSnapshot;
|
|
44
|
+
export declare function isSnapshotTerminal(snapshot: XcodeInstanceSnapshot, side: XcodeSnapshotSide): boolean;
|
|
45
|
+
/** Follow restoration or publication until it ends, the instance disappears, or the wait times out. */
|
|
46
|
+
export declare function followXcodeSnapshot(target: XcodeSnapshotFollowTarget, options?: XcodeSnapshotFollowOptions): Promise<XcodeSnapshotFollowResult>;
|
|
47
|
+
//# sourceMappingURL=xcode-snapshot.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xcode-snapshot.d.mts","sourceRoot":"","sources":["src/xcode-snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,mBAAmB,EACnB,sBAAsB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACxB,0BAAsB;AAEvB,iGAAiG;AACjG,MAAM,MAAM,mBAAmB,GAAG;IAChC,kGAAkG;IAClG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mGAAmG;IACnG,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,sBAAsB,CAAC;AAC/D,MAAM,MAAM,sBAAsB,GAAG,mBAAmB,CAAC;AACzD,MAAM,MAAM,0BAA0B,GAAG,uBAAuB,CAAC;AACjE,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAC3D,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAC/C,MAAM,MAAM,yBAAyB,GAAG,sBAAsB,CAAC;AAE/D,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC,GAAG;IAC7E,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,OAAO,EAAE,0BAA0B,CAAC;IACpC,IAAI,EAAE,uBAAuB,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,uBAAuB,EAAE,UAAU,CAAC,GAAG;IACnF,mEAAmE;IACnE,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,qBAAqB,CAAC;IAChC,yEAAyE;IACzE,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,yEAAyE;AACzE,qBAAa,sBAAuB,SAAQ,mBAAmB;gBACjD,UAAU,EAAE,MAAM;CAK/B;AAED,qBAAa,yBAA0B,SAAQ,sBAAsB;IACnE,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,GAAG,SAAS,CAAC;gBAEzC,KAAK,EAAE,sBAAsB;CAM1C;AAGD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,kBAAkB,GAAG,qBAAqB,CAMlF;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,qBAAqB,EAAE,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAEpG;AAED,uGAAuG;AACvG,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,yBAAyB,EACjC,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAAC,yBAAyB,CAAC,CAapC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { XcodeCacheGoneError, XcodeCacheTimeoutError, type XcodeCacheFollowOptions, type XcodeCacheFollowTarget, type XcodeCacheRestorePhase, type XcodeCacheRestoreStatus, type XcodeCacheSavePhase, type XcodeCacheSaveStatus, type XcodeCacheSide, type XcodeCacheSkippedKey, type XcodeInstanceCache } from "./xcode-cache.js";
|
|
2
|
+
/** A disk snapshot of the Xcode workspace, restored at creation and published at termination. */
|
|
3
|
+
export type XcodeSnapshotConfig = {
|
|
4
|
+
/** Save under this organization-scoped key at termination. Defaults to restoring this key too. */
|
|
5
|
+
key?: string;
|
|
6
|
+
/** Restore in order, trying an exact match then the newest literal-prefix match for each entry. */
|
|
7
|
+
restoreKeys?: string[];
|
|
8
|
+
/** Paths to save, fixed at creation. Omit to preserve the whole workspace. */
|
|
9
|
+
paths?: string[];
|
|
10
|
+
};
|
|
11
|
+
export type XcodeSnapshotRestorePhase = XcodeCacheRestorePhase;
|
|
12
|
+
export type XcodeSnapshotSavePhase = XcodeCacheSavePhase;
|
|
13
|
+
export type XcodeSnapshotRestoreStatus = XcodeCacheRestoreStatus;
|
|
14
|
+
export type XcodeSnapshotSkippedKey = XcodeCacheSkippedKey;
|
|
15
|
+
export type XcodeSnapshotSide = XcodeCacheSide;
|
|
16
|
+
export type XcodeSnapshotFollowTarget = XcodeCacheFollowTarget;
|
|
17
|
+
export type XcodeSnapshotSaveStatus = Omit<XcodeCacheSaveStatus, 'cacheKey'> & {
|
|
18
|
+
/** Destination key the workspace is published under. */
|
|
19
|
+
snapshotKey?: string;
|
|
20
|
+
};
|
|
21
|
+
export type XcodeInstanceSnapshot = {
|
|
22
|
+
config?: XcodeSnapshotConfig;
|
|
23
|
+
restore: XcodeSnapshotRestoreStatus;
|
|
24
|
+
save: XcodeSnapshotSaveStatus;
|
|
25
|
+
};
|
|
26
|
+
export type XcodeSnapshotFollowOptions = Omit<XcodeCacheFollowOptions, 'onUpdate'> & {
|
|
27
|
+
/** Called once per distinct state, including the initial state. */
|
|
28
|
+
onUpdate?: (snapshot: XcodeInstanceSnapshot) => void;
|
|
29
|
+
};
|
|
30
|
+
export type XcodeSnapshotFollowResult = {
|
|
31
|
+
snapshot: XcodeInstanceSnapshot;
|
|
32
|
+
/** True if the instance disappeared before reaching a terminal phase. */
|
|
33
|
+
gone: boolean;
|
|
34
|
+
};
|
|
35
|
+
/** The instance disappeared before reporting its disk snapshot state. */
|
|
36
|
+
export declare class XcodeSnapshotGoneError extends XcodeCacheGoneError {
|
|
37
|
+
constructor(instanceId: string);
|
|
38
|
+
}
|
|
39
|
+
export declare class XcodeSnapshotTimeoutError extends XcodeCacheTimeoutError {
|
|
40
|
+
readonly snapshot: XcodeInstanceSnapshot | undefined;
|
|
41
|
+
constructor(error: XcodeCacheTimeoutError);
|
|
42
|
+
}
|
|
43
|
+
export declare function snapshotFromCache(cache: XcodeInstanceCache): XcodeInstanceSnapshot;
|
|
44
|
+
export declare function isSnapshotTerminal(snapshot: XcodeInstanceSnapshot, side: XcodeSnapshotSide): boolean;
|
|
45
|
+
/** Follow restoration or publication until it ends, the instance disappears, or the wait times out. */
|
|
46
|
+
export declare function followXcodeSnapshot(target: XcodeSnapshotFollowTarget, options?: XcodeSnapshotFollowOptions): Promise<XcodeSnapshotFollowResult>;
|
|
47
|
+
//# sourceMappingURL=xcode-snapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xcode-snapshot.d.ts","sourceRoot":"","sources":["src/xcode-snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,mBAAmB,EACnB,sBAAsB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACxB,yBAAsB;AAEvB,iGAAiG;AACjG,MAAM,MAAM,mBAAmB,GAAG;IAChC,kGAAkG;IAClG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mGAAmG;IACnG,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,sBAAsB,CAAC;AAC/D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mB,CACvC,MAAM,EAAE,yBAAyB,EACjC,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAAC,yBAAyB,CAAC,CAapC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.XcodeSnapshotTimeoutError = exports.XcodeSnapshotGoneError = void 0;
|
|
4
|
+
exports.snapshotFromCache = snapshotFromCache;
|
|
5
|
+
exports.isSnapshotTerminal = isSnapshotTerminal;
|
|
6
|
+
exports.followXcodeSnapshot = followXcodeSnapshot;
|
|
7
|
+
const xcode_cache_1 = require("./xcode-cache.js");
|
|
8
|
+
/** The instance disappeared before reporting its disk snapshot state. */
|
|
9
|
+
class XcodeSnapshotGoneError extends xcode_cache_1.XcodeCacheGoneError {
|
|
10
|
+
constructor(instanceId) {
|
|
11
|
+
super(instanceId);
|
|
12
|
+
this.name = 'XcodeSnapshotGoneError';
|
|
13
|
+
this.message = `Instance ${instanceId} was gone before it reported any disk snapshot status`;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.XcodeSnapshotGoneError = XcodeSnapshotGoneError;
|
|
17
|
+
class XcodeSnapshotTimeoutError extends xcode_cache_1.XcodeCacheTimeoutError {
|
|
18
|
+
constructor(error) {
|
|
19
|
+
super(error.side, error.timeoutMs, error.cache);
|
|
20
|
+
this.name = 'XcodeSnapshotTimeoutError';
|
|
21
|
+
this.message = error.message.replace('the cache ', 'the disk snapshot ');
|
|
22
|
+
this.snapshot = error.cache ? snapshotFromCache(error.cache) : undefined;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.XcodeSnapshotTimeoutError = XcodeSnapshotTimeoutError;
|
|
26
|
+
// Keep the wire format stable so new clients can use existing servers and saved workspaces.
|
|
27
|
+
function snapshotFromCache(cache) {
|
|
28
|
+
const { cacheKey, ...save } = cache.save;
|
|
29
|
+
return {
|
|
30
|
+
...cache,
|
|
31
|
+
save: { ...save, ...(cacheKey !== undefined ? { snapshotKey: cacheKey } : {}) },
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function isSnapshotTerminal(snapshot, side) {
|
|
35
|
+
return side === 'restore' ? (0, xcode_cache_1.isRestoreTerminal)(snapshot.restore.phase) : (0, xcode_cache_1.isSaveTerminal)(snapshot.save.phase);
|
|
36
|
+
}
|
|
37
|
+
/** Follow restoration or publication until it ends, the instance disappears, or the wait times out. */
|
|
38
|
+
async function followXcodeSnapshot(target, options = {}) {
|
|
39
|
+
const { onUpdate, ...rest } = options;
|
|
40
|
+
try {
|
|
41
|
+
const result = await (0, xcode_cache_1.followXcodeCache)(target, {
|
|
42
|
+
...rest,
|
|
43
|
+
...(onUpdate ? { onUpdate: (cache) => onUpdate(snapshotFromCache(cache)) } : {}),
|
|
44
|
+
});
|
|
45
|
+
return { snapshot: snapshotFromCache(result.cache), gone: result.gone };
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
if (error instanceof xcode_cache_1.XcodeCacheGoneError)
|
|
49
|
+
throw new XcodeSnapshotGoneError(error.instanceId);
|
|
50
|
+
if (error instanceof xcode_cache_1.XcodeCacheTimeoutError)
|
|
51
|
+
throw new XcodeSnapshotTimeoutError(error);
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=xcode-snapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xcode-snapshot.js","sourceRoot":"","sources":["src/xcode-snapshot.ts"],"names":[],"mappings":";;;AA4EA,8CAMC;AAED,gDAEC;AAGD,kDAgBC;AAzGD,kDAeuB;AAwCvB,yEAAyE;AACzE,MAAa,sBAAuB,SAAQ,iCAAmB;IAC7D,YAAY,UAAkB;QAC5B,KAAK,CAAC,UAAU,CAAC,CAAC;QAClB,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,YAAY,UAAU,uDAA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