Generate typed QX bindings and add source editing tools
This commit is contained in:
@@ -22,6 +22,7 @@ const checkoutName = (kind: string, repository: string, commit: string) => {
|
||||
export const createGitCapabilityResolver = async (options: {
|
||||
checkoutRoot: string;
|
||||
snapshotMap?: string;
|
||||
snapshotOnly?: boolean;
|
||||
}): Promise<CapabilityRepositoryResolver> => {
|
||||
await mkdir(options.checkoutRoot, { recursive: true });
|
||||
const checkoutRoot = await realpath(options.checkoutRoot);
|
||||
@@ -52,6 +53,7 @@ export const createGitCapabilityResolver = async (options: {
|
||||
const key = sourceKey(kind, source.repository, source.commit);
|
||||
const snapshot = snapshots.get(key);
|
||||
if (snapshot) return { directory: snapshot };
|
||||
if (options.snapshotOnly) throw new Error(`No offline snapshot for ${kind} ${source.repository}@${source.commit}`);
|
||||
const existing = checkouts.get(key);
|
||||
if (existing) return await existing;
|
||||
const pending = (async () => {
|
||||
|
||||
Reference in New Issue
Block a user