@limrun/api 0.54.0 → 0.56.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/README.md +23 -0
- 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/ios-client.d.mts +11 -3
- package/ios-client.d.mts.map +1 -1
- package/ios-client.d.ts +11 -3
- package/ios-client.d.ts.map +1 -1
- package/ios-client.js +3 -1
- package/ios-client.js.map +1 -1
- package/ios-client.mjs +3 -1
- package/ios-client.mjs.map +1 -1
- package/package.json +11 -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/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 +27 -7
- package/resources/xcode-instances-helpers.js.map +1 -1
- package/resources/xcode-instances-helpers.mjs +27 -7
- package/resources/xcode-instances-helpers.mjs.map +1 -1
- package/src/index.ts +18 -0
- package/src/ios-client.ts +18 -3
- package/src/resources/index.ts +1 -0
- package/src/resources/xcode-instances-helpers.ts +50 -11
- 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
package/src/ios-client.ts
CHANGED
|
@@ -1024,6 +1024,7 @@ export type InstanceClient = {
|
|
|
1024
1024
|
* @param args Arguments to pass to simctl
|
|
1025
1025
|
* @param opts Options for the simctl execution
|
|
1026
1026
|
* @param opts.disconnectOnExit If true, disconnect from the instance when the command completes
|
|
1027
|
+
* @param opts.stdin Data written to the command's standard input, which is then closed
|
|
1027
1028
|
* @returns A SimctlExecution handle for listening to command output
|
|
1028
1029
|
*
|
|
1029
1030
|
* @example
|
|
@@ -1057,7 +1058,7 @@ export type InstanceClient = {
|
|
|
1057
1058
|
* const execution2 = client.simctl(['status'], { disconnectOnExit: true });
|
|
1058
1059
|
* ```
|
|
1059
1060
|
*/
|
|
1060
|
-
simctl: (args: string[], opts?:
|
|
1061
|
+
simctl: (args: string[], opts?: SimctlOptions) => SimctlExecution;
|
|
1061
1062
|
|
|
1062
1063
|
/**
|
|
1063
1064
|
* Push a local file to the simulator. Returns the path of the file on the simulator host
|
|
@@ -1268,11 +1269,23 @@ type PendingRequest<T> = {
|
|
|
1268
1269
|
transform?: (message: ServerResponse) => T;
|
|
1269
1270
|
};
|
|
1270
1271
|
|
|
1272
|
+
/**
|
|
1273
|
+
* Options for a simctl execution
|
|
1274
|
+
*/
|
|
1275
|
+
export type SimctlOptions = {
|
|
1276
|
+
/** Disconnect from the instance when the command completes */
|
|
1277
|
+
disconnectOnExit?: boolean;
|
|
1278
|
+
/** Data written to the command's standard input, which is then closed */
|
|
1279
|
+
stdin?: string | Buffer;
|
|
1280
|
+
};
|
|
1281
|
+
|
|
1271
1282
|
// Simctl uses streaming, so it's handled separately
|
|
1272
1283
|
type SimctlRequest = {
|
|
1273
1284
|
type: 'simctl';
|
|
1274
1285
|
id: string;
|
|
1275
1286
|
args: string[];
|
|
1287
|
+
/** Base64 of the command's standard input */
|
|
1288
|
+
stdin?: string;
|
|
1276
1289
|
};
|
|
1277
1290
|
|
|
1278
1291
|
/**
|
|
@@ -2609,7 +2622,7 @@ export async function createInstanceClient(options: InstanceClientOptions): Prom
|
|
|
2609
2622
|
// Cached device info, populated during connection
|
|
2610
2623
|
let cachedDeviceInfo: DeviceInfo;
|
|
2611
2624
|
|
|
2612
|
-
const simctl = (args: string[], opts:
|
|
2625
|
+
const simctl = (args: string[], opts: SimctlOptions = {}): SimctlExecution => {
|
|
2613
2626
|
const id = generateId();
|
|
2614
2627
|
|
|
2615
2628
|
const cancelCallback = () => {
|
|
@@ -2651,9 +2664,11 @@ export async function createInstanceClient(options: InstanceClientOptions): Prom
|
|
|
2651
2664
|
type: 'simctl',
|
|
2652
2665
|
id,
|
|
2653
2666
|
args,
|
|
2667
|
+
...(opts.stdin !== undefined && { stdin: Buffer.from(opts.stdin).toString('base64') }),
|
|
2654
2668
|
};
|
|
2655
2669
|
|
|
2656
|
-
|
|
2670
|
+
// stdin can carry secrets such as one-time codes, so it stays out of the log.
|
|
2671
|
+
logger.debug('Sending simctl request:', { ...simctlRequest, stdin: undefined });
|
|
2657
2672
|
ws.send(JSON.stringify(simctlRequest), (err?: Error) => {
|
|
2658
2673
|
if (err) {
|
|
2659
2674
|
logger.error('Failed to send simctl request:', err);
|
package/src/resources/index.ts
CHANGED
|
@@ -83,6 +83,7 @@ export {
|
|
|
83
83
|
type XcodeBuildLog,
|
|
84
84
|
type BazelBuildLog,
|
|
85
85
|
type WebhookConfig,
|
|
86
|
+
type XcodeInstanceCreateParamsWithSnapshot,
|
|
86
87
|
type XcodeInstanceCreateParamsWithCache,
|
|
87
88
|
} from './xcode-instances-helpers';
|
|
88
89
|
// Side-effect import: grafts the createClient/listBuildLogs helpers onto the
|
|
@@ -15,6 +15,14 @@ import {
|
|
|
15
15
|
type XcodeCacheFollowResult,
|
|
16
16
|
type XcodeInstanceCache,
|
|
17
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';
|
|
18
26
|
import {
|
|
19
27
|
exec,
|
|
20
28
|
observeExecLogs,
|
|
@@ -635,11 +643,18 @@ export type XcodeCreateClientParams =
|
|
|
635
643
|
| { instance: XcodeInstance; logLevel?: LogLevel }
|
|
636
644
|
| { apiUrl: string; token: string; logLevel?: LogLevel };
|
|
637
645
|
|
|
638
|
-
/**
|
|
639
|
-
export type
|
|
640
|
-
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
|
+
};
|
|
641
653
|
};
|
|
642
654
|
|
|
655
|
+
/** @deprecated Use XcodeInstanceCreateParamsWithSnapshot instead. */
|
|
656
|
+
export type XcodeInstanceCreateParamsWithCache = XcodeInstanceCreateParamsWithSnapshot;
|
|
657
|
+
|
|
643
658
|
function normalizeWorkspaceRelativePath(remotePath: string): string {
|
|
644
659
|
if (
|
|
645
660
|
remotePath === '' ||
|
|
@@ -815,25 +830,48 @@ export class XcodeInstances extends GeneratedXcodeInstances {
|
|
|
815
830
|
return this._client.get(path`/v1/xcode_instances/${id}/bazel_build_logs`, options);
|
|
816
831
|
}
|
|
817
832
|
|
|
818
|
-
/**
|
|
819
|
-
* Create an Xcode instance, optionally with a build cache.
|
|
820
|
-
*
|
|
821
|
-
* Widens the generated signature with `spec.cache`; drop this override once the generator
|
|
822
|
-
* knows about the field. The request body passes through untouched either way.
|
|
823
|
-
*/
|
|
833
|
+
/** Create an Xcode instance, optionally restoring and saving a disk snapshot. */
|
|
824
834
|
override create(
|
|
825
|
-
params:
|
|
835
|
+
params: XcodeInstanceCreateParamsWithSnapshot,
|
|
826
836
|
options?: RequestOptions,
|
|
827
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
|
+
}
|
|
828
848
|
return super.create(params as XcodeInstanceCreateParams, options);
|
|
829
849
|
}
|
|
830
850
|
|
|
831
|
-
/** 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. */
|
|
832
869
|
getCache(id: string, options?: RequestOptions): APIPromise<XcodeInstanceCache> {
|
|
833
870
|
return this._client.get<XcodeInstanceCache>(path`/v1/xcode_instances/${id}/cache`, options);
|
|
834
871
|
}
|
|
835
872
|
|
|
836
873
|
/**
|
|
874
|
+
* @deprecated Use bindSnapshotKey instead.
|
|
837
875
|
* Bind the destination key this instance publishes under at termination. Set once: binding
|
|
838
876
|
* the same key again is accepted, a different one is rejected.
|
|
839
877
|
*
|
|
@@ -848,6 +886,7 @@ export class XcodeInstances extends GeneratedXcodeInstances {
|
|
|
848
886
|
}
|
|
849
887
|
|
|
850
888
|
/**
|
|
889
|
+
* @deprecated Use followSnapshot instead.
|
|
851
890
|
* Follow an instance's cache status until the chosen side reaches a terminal phase. Reports
|
|
852
891
|
* every phase change through `onUpdate`, so a caller can show a restore as it happens.
|
|
853
892
|
*/
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.56.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.56.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.56.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.56.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;;;;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,CA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,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,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACrC,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,6FAA6F;IAC7F,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,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SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS;gBAFrC,IAAI,EAAE,cAAc,EACpB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,kBAAkB,GAAG,SAAS;CAQjD;AAOD,kDAAkD;AAClD,wBAAgB,iBAAiB,CAAC,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.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xcode-cache.js","sourceRoot":"","sources":["src/xcode-cache.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"xcode-cache.js","sourceRoot":"","sources":["src/xcode-cache.ts"],"names":[],"mappings":";;;AA6IA,8CAQC;AAOD,4CAEC;AAED,wCAQC;AAED,0CAEC;AAeD,4CAoHC;AA/SD,2DAAgF;AAEhF,mEAAgE;AA4GhE;;;GAGG;AACH,MAAa,mBAAoB,SAAQ,KAAK;IAC5C,YAAqB,UAAkB;QACrC,KAAK,CAAC,YAAY,UAAU,+CAA+C,CAAC,CAAC;QAD1D,eAAU,GAAV,UAAU,CAAQ;QAErC,IAAI,CAA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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":[],"m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AAM,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,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;CACt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