@ankhorage/repository 0.6.15 → 0.7.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 +12 -0
- package/README.md +1 -1
- package/dist/github/index.d.ts +3 -0
- package/dist/github/index.d.ts.map +1 -1
- package/dist/github/index.js +2 -0
- package/dist/github/index.js.map +1 -1
- package/dist/providers/github/adapters/createGitHubHttpClient.d.ts +17 -0
- package/dist/providers/github/adapters/createGitHubHttpClient.d.ts.map +1 -0
- package/dist/providers/github/adapters/createGitHubHttpClient.js +209 -0
- package/dist/providers/github/adapters/createGitHubHttpClient.js.map +1 -0
- package/dist/providers/github/adapters/createGitHubHttpClient.test.d.ts +2 -0
- package/dist/providers/github/adapters/createGitHubHttpClient.test.d.ts.map +1 -0
- package/dist/providers/github/adapters/createGitHubHttpClient.test.js +195 -0
- package/dist/providers/github/adapters/createGitHubHttpClient.test.js.map +1 -0
- package/dist/providers/github/adapters/createGitHubHttpRepositoryDiscoveryGateway.d.ts +9 -0
- package/dist/providers/github/adapters/createGitHubHttpRepositoryDiscoveryGateway.d.ts.map +1 -0
- package/dist/providers/github/adapters/createGitHubHttpRepositoryDiscoveryGateway.js +91 -0
- package/dist/providers/github/adapters/createGitHubHttpRepositoryDiscoveryGateway.js.map +1 -0
- package/dist/providers/github/adapters/createGitHubHttpRepositoryReadGateway.d.ts +3 -1
- package/dist/providers/github/adapters/createGitHubHttpRepositoryReadGateway.d.ts.map +1 -1
- package/dist/providers/github/adapters/createGitHubHttpRepositoryReadGateway.js +27 -58
- package/dist/providers/github/adapters/createGitHubHttpRepositoryReadGateway.js.map +1 -1
- package/dist/providers/github/adapters/createGitHubHttpRepositoryReadGateway.test.js +162 -0
- package/dist/providers/github/adapters/createGitHubHttpRepositoryReadGateway.test.js.map +1 -1
- package/dist/providers/github/adapters/rateLimitResponseAsync.d.ts +9 -0
- package/dist/providers/github/adapters/rateLimitResponseAsync.d.ts.map +1 -0
- package/dist/providers/github/adapters/rateLimitResponseAsync.js +44 -0
- package/dist/providers/github/adapters/rateLimitResponseAsync.js.map +1 -0
- package/dist/providers/github/definitions/GitHubRepositoryDiscoveryOptions.d.ts +10 -0
- package/dist/providers/github/definitions/GitHubRepositoryDiscoveryOptions.d.ts.map +1 -0
- package/dist/providers/github/definitions/GitHubRepositoryDiscoveryOptions.js +2 -0
- package/dist/providers/github/definitions/GitHubRepositoryDiscoveryOptions.js.map +1 -0
- package/dist/providers/github/definitions/GitHubRepositoryDiscoveryResult.d.ts +25 -0
- package/dist/providers/github/definitions/GitHubRepositoryDiscoveryResult.d.ts.map +1 -0
- package/dist/providers/github/definitions/GitHubRepositoryDiscoveryResult.js +12 -0
- package/dist/providers/github/definitions/GitHubRepositoryDiscoveryResult.js.map +1 -0
- package/dist/providers/github/definitions/GitHubRepositoryMaterializationOptions.d.ts +1 -0
- package/dist/providers/github/definitions/GitHubRepositoryMaterializationOptions.d.ts.map +1 -1
- package/dist/providers/github/ports/GitHubRepositoryDiscoveryGateway.d.ts +18 -0
- package/dist/providers/github/ports/GitHubRepositoryDiscoveryGateway.d.ts.map +1 -0
- package/dist/providers/github/ports/GitHubRepositoryDiscoveryGateway.js +2 -0
- package/dist/providers/github/ports/GitHubRepositoryDiscoveryGateway.js.map +1 -0
- package/dist/providers/github/ports/GitHubRepositoryReadGateway.d.ts +4 -4
- package/dist/providers/github/ports/GitHubRepositoryReadGateway.d.ts.map +1 -1
- package/dist/providers/github/services/discoverGitHubRepositoriesAsync.d.ts +5 -0
- package/dist/providers/github/services/discoverGitHubRepositoriesAsync.d.ts.map +1 -0
- package/dist/providers/github/services/discoverGitHubRepositoriesAsync.js +9 -0
- package/dist/providers/github/services/discoverGitHubRepositoriesAsync.js.map +1 -0
- package/dist/providers/github/services/discoverGitHubRepositoriesWithGatewayAsync.d.ts +6 -0
- package/dist/providers/github/services/discoverGitHubRepositoriesWithGatewayAsync.d.ts.map +1 -0
- package/dist/providers/github/services/discoverGitHubRepositoriesWithGatewayAsync.js +91 -0
- package/dist/providers/github/services/discoverGitHubRepositoriesWithGatewayAsync.js.map +1 -0
- package/dist/providers/github/services/discoverGitHubRepositoriesWithGatewayAsync.test.d.ts +2 -0
- package/dist/providers/github/services/discoverGitHubRepositoriesWithGatewayAsync.test.d.ts.map +1 -0
- package/dist/providers/github/services/discoverGitHubRepositoriesWithGatewayAsync.test.js +55 -0
- package/dist/providers/github/services/discoverGitHubRepositoriesWithGatewayAsync.test.js.map +1 -0
- package/dist/providers/github/services/materializeGitHubRepositoryWithGatewayAsync.d.ts.map +1 -1
- package/dist/providers/github/services/materializeGitHubRepositoryWithGatewayAsync.js +21 -13
- package/dist/providers/github/services/materializeGitHubRepositoryWithGatewayAsync.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discoverGitHubRepositoriesAsync.d.ts","sourceRoot":"","sources":["../../../../src/providers/github/services/discoverGitHubRepositoriesAsync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,oDAAoD,CAAC;AAC3G,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AAGzG,qGAAqG;AACrG,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,+BAA+B,CAAC,CAO1C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createGitHubHttpRepositoryReadGateway } from '../adapters/createGitHubHttpRepositoryReadGateway.js';
|
|
2
|
+
import { discoverGitHubRepositoriesWithGatewayAsync } from './discoverGitHubRepositoriesWithGatewayAsync.js';
|
|
3
|
+
/** Discover accessible repositories through the canonical anonymous-capable GitHub HTTPS adapter. */
|
|
4
|
+
export function discoverGitHubRepositoriesAsync(options) {
|
|
5
|
+
return discoverGitHubRepositoriesWithGatewayAsync(options, createGitHubHttpRepositoryReadGateway(fetch, {
|
|
6
|
+
authentication: options.authentication ?? 'anonymous',
|
|
7
|
+
}));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=discoverGitHubRepositoriesAsync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discoverGitHubRepositoriesAsync.js","sourceRoot":"","sources":["../../../../src/providers/github/services/discoverGitHubRepositoriesAsync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qCAAqC,EAAE,MAAM,sDAAsD,CAAC;AAG7G,OAAO,EAAE,0CAA0C,EAAE,MAAM,iDAAiD,CAAC;AAE7G,qGAAqG;AACrG,MAAM,UAAU,+BAA+B,CAC7C,OAAyC;IAEzC,OAAO,0CAA0C,CAC/C,OAAO,EACP,qCAAqC,CAAC,KAAK,EAAE;QAC3C,cAAc,EAAE,OAAO,CAAC,cAAc,IAAI,WAAW;KACtD,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { GitHubRepositoryDiscoveryOptions } from '../definitions/GitHubRepositoryDiscoveryOptions.js';
|
|
2
|
+
import { type GitHubRepositoryDiscoveryResult } from '../definitions/GitHubRepositoryDiscoveryResult.js';
|
|
3
|
+
import type { GitHubRepositoryDiscoveryGateway } from '../ports/GitHubRepositoryDiscoveryGateway.js';
|
|
4
|
+
/** Discover every accessible repository for a normalized GitHub owner source. */
|
|
5
|
+
export declare function discoverGitHubRepositoriesWithGatewayAsync(options: GitHubRepositoryDiscoveryOptions, gateway: GitHubRepositoryDiscoveryGateway): Promise<GitHubRepositoryDiscoveryResult>;
|
|
6
|
+
//# sourceMappingURL=discoverGitHubRepositoriesWithGatewayAsync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discoverGitHubRepositoriesWithGatewayAsync.d.ts","sourceRoot":"","sources":["../../../../src/providers/github/services/discoverGitHubRepositoriesWithGatewayAsync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,oDAAoD,CAAC;AAC3G,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,mDAAmD,CAAC;AAC3D,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,8CAA8C,CAAC;AAOrG,iFAAiF;AACjF,wBAAsB,0CAA0C,CAC9D,OAAO,EAAE,gCAAgC,EACzC,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,+BAA+B,CAAC,CAc1C"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { GitHubRepositoryDiscoveryError, } from '../definitions/GitHubRepositoryDiscoveryResult.js';
|
|
2
|
+
/** Discover every accessible repository for a normalized GitHub owner source. */
|
|
3
|
+
export async function discoverGitHubRepositoriesWithGatewayAsync(options, gateway) {
|
|
4
|
+
const source = parseGitHubSource(options.source);
|
|
5
|
+
throwIfAborted(options.signal);
|
|
6
|
+
const owner = await gateway.resolveOwnerAsync(source.owner, options.signal);
|
|
7
|
+
const repositories = [...(await gateway.listOwnerRepositoriesAsync(owner, options.signal))].sort(compareRepositories);
|
|
8
|
+
const selectedRepository = source.selectedRepositoryName
|
|
9
|
+
? repositories.find((repository) => repository.name.toLowerCase() === source.selectedRepositoryName?.toLowerCase())
|
|
10
|
+
: undefined;
|
|
11
|
+
return { owner, repositories, ...(selectedRepository ? { selectedRepository } : {}) };
|
|
12
|
+
}
|
|
13
|
+
/** Preserve a deterministic canonical owner/name ordering across gateway implementations. */
|
|
14
|
+
function compareRepositories(left, right) {
|
|
15
|
+
const leftIdentity = `${left.owner.toLowerCase()}/${left.name.toLowerCase()}`;
|
|
16
|
+
const rightIdentity = `${right.owner.toLowerCase()}/${right.name.toLowerCase()}`;
|
|
17
|
+
return leftIdentity < rightIdentity ? -1 : leftIdentity > rightIdentity ? 1 : 0;
|
|
18
|
+
}
|
|
19
|
+
/** Parse supported owner and repository source forms without accepting arbitrary GitHub pages. */
|
|
20
|
+
function parseGitHubSource(value) {
|
|
21
|
+
const trimmed = value.trim();
|
|
22
|
+
if (trimmed === '')
|
|
23
|
+
throw invalidSource();
|
|
24
|
+
if (isOwnerTokenSource(trimmed))
|
|
25
|
+
return { owner: normalizeOwner(trimmed) };
|
|
26
|
+
return parseGitHubUrlSource(trimmed);
|
|
27
|
+
}
|
|
28
|
+
/** Identify a bare owner form before interpreting the remaining input as a URL. */
|
|
29
|
+
function isOwnerTokenSource(value) {
|
|
30
|
+
return !value.includes('/') && !value.includes(':');
|
|
31
|
+
}
|
|
32
|
+
/** Parse supported GitHub owner and repository URLs without accepting arbitrary GitHub pages. */
|
|
33
|
+
function parseGitHubUrlSource(value) {
|
|
34
|
+
const url = parseSourceUrl(value);
|
|
35
|
+
if (url.protocol !== 'https:' || url.hostname.toLowerCase() !== 'github.com')
|
|
36
|
+
throw invalidSource();
|
|
37
|
+
if (url.username !== '' || url.password !== '' || url.search !== '' || url.hash !== '')
|
|
38
|
+
throw invalidSource();
|
|
39
|
+
const segments = url.pathname.split('/').filter(Boolean).map(decodeSegment);
|
|
40
|
+
if (segments.length < 1 || segments.length > 2)
|
|
41
|
+
throw invalidSource();
|
|
42
|
+
const [owner = '', repository = undefined] = segments;
|
|
43
|
+
const normalizedOwner = normalizeOwner(owner);
|
|
44
|
+
const selectedRepositoryName = repository === undefined ? undefined : normalizeRepositoryName(repository);
|
|
45
|
+
return { owner: normalizedOwner, ...(selectedRepositoryName ? { selectedRepositoryName } : {}) };
|
|
46
|
+
}
|
|
47
|
+
/** Parse a scheme-less GitHub host form as HTTPS while retaining strict URL validation. */
|
|
48
|
+
function parseSourceUrl(value) {
|
|
49
|
+
try {
|
|
50
|
+
return new URL(value.startsWith('github.com/') ? `https://${value}` : value);
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
throw new GitHubRepositoryDiscoveryError('invalid-source', 'GitHub source is invalid.');
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/** Validate an owner token accepted by GitHub's owner routes. */
|
|
57
|
+
function normalizeOwner(value) {
|
|
58
|
+
const normalized = value.startsWith('@') ? value.slice(1) : value;
|
|
59
|
+
if (!/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38}[A-Za-z0-9])?$/u.test(normalized)) {
|
|
60
|
+
throw invalidSource();
|
|
61
|
+
}
|
|
62
|
+
return normalized;
|
|
63
|
+
}
|
|
64
|
+
/** Validate a repository segment while retaining GitHub's case-insensitive identity. */
|
|
65
|
+
function normalizeRepositoryName(value) {
|
|
66
|
+
const normalized = value.endsWith('.git') ? value.slice(0, -4) : value;
|
|
67
|
+
if (!/^[A-Za-z0-9._-]{1,100}$/u.test(normalized) || normalized === '.' || normalized === '..') {
|
|
68
|
+
throw invalidSource();
|
|
69
|
+
}
|
|
70
|
+
return normalized;
|
|
71
|
+
}
|
|
72
|
+
/** Decode one path segment and surface malformed encodings as an invalid source. */
|
|
73
|
+
function decodeSegment(value) {
|
|
74
|
+
try {
|
|
75
|
+
return decodeURIComponent(value);
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
throw invalidSource();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/** Construct the stable caller-facing invalid-source error. */
|
|
82
|
+
function invalidSource() {
|
|
83
|
+
return new GitHubRepositoryDiscoveryError('invalid-source', 'GitHub source must be an owner, github.com owner URL, or GitHub repository URL.');
|
|
84
|
+
}
|
|
85
|
+
/** Stop before starting an adapter request when cancellation has already been requested. */
|
|
86
|
+
function throwIfAborted(signal) {
|
|
87
|
+
if (signal?.aborted) {
|
|
88
|
+
throw new GitHubRepositoryDiscoveryError('cancelled', 'GitHub repository discovery was cancelled.');
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=discoverGitHubRepositoriesWithGatewayAsync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discoverGitHubRepositoriesWithGatewayAsync.js","sourceRoot":"","sources":["../../../../src/providers/github/services/discoverGitHubRepositoriesWithGatewayAsync.ts"],"names":[],"mappings":"AACA,OAAO,EACL,8BAA8B,GAE/B,MAAM,mD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C,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACvE,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,UAAU,KAAK,GAAG,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QAC9F,MAAM,aAAa,EAAE,CAAC;IACxB,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,oFAAoF;AACpF,SAAS,aAAa,CAAC,KAAa;IAClC,IAAI,CAAC;QACH,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,aAAa,EAAE,CAAC;IACxB,CAAC;AACH,CAAC;AAED,+DAA+D;AAC/D,SAAS,aAAa;IACpB,OAAO,IAAI,8BAA8B,CACvC,gBAAgB,EAChB,iFAAiF,CAClF,CAAC;AACJ,CAAC;AAED,4FAA4F;AAC5F,SAAS,cAAc,CAAC,MAA+B;IACrD,IAAI,MAAM,EAAE,OAAO,EAAE,CAAC;QACpB,MAAM,IAAI,8BAA8B,CACtC,WAAW,EACX,4CAA4C,CAC7C,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/providers/github/services/discoverGitHubRepositoriesWithGatewayAsync.test.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discoverGitHubRepositoriesWithGatewayAsync.test.d.ts","sourceRoot":"","sources":["../../../../src/providers/github/services/discoverGitHubRepositoriesWithGatewayAsync.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { expect, test } from 'bun:test';
|
|
2
|
+
import { discoverGitHubRepositoriesWithGatewayAsync } from './discoverGitHubRepositoriesWithGatewayAsync.js';
|
|
3
|
+
test.each(['ankhorage', '@ankhorage', 'github.com/ankhorage', 'https://github.com/ankhorage'])('normalizes the GitHub owner source %s', async (source) => {
|
|
4
|
+
const requests = [];
|
|
5
|
+
const result = await discoverGitHubRepositoriesWithGatewayAsync({ source }, createGateway(requests));
|
|
6
|
+
expect(requests).toEqual(['ankhorage']);
|
|
7
|
+
expect(result.owner).toEqual({
|
|
8
|
+
login: 'Ankhorage',
|
|
9
|
+
type: 'organization',
|
|
10
|
+
url: 'https://github.com/Ankhorage',
|
|
11
|
+
});
|
|
12
|
+
expect(result.repositories.map((repository) => repository.name)).toEqual(['atlas', 'zora']);
|
|
13
|
+
});
|
|
14
|
+
test('preselects a repository URL without narrowing the owner repository list', async () => {
|
|
15
|
+
const result = await discoverGitHubRepositoriesWithGatewayAsync({ source: 'https://github.com/ankhorage/zora' }, createGateway([]));
|
|
16
|
+
expect(result.selectedRepository?.name).toBe('zora');
|
|
17
|
+
expect(result.repositories).toHaveLength(2);
|
|
18
|
+
});
|
|
19
|
+
test('rejects malformed and cancelled discovery before an adapter request', () => {
|
|
20
|
+
const requests = [];
|
|
21
|
+
const controller = new AbortController();
|
|
22
|
+
controller.abort();
|
|
23
|
+
expect(discoverGitHubRepositoriesWithGatewayAsync({ source: 'https://example.com/ankhorage' }, createGateway(requests))).rejects.toMatchObject({ code: 'invalid-source' });
|
|
24
|
+
expect(discoverGitHubRepositoriesWithGatewayAsync({ source: 'ankhorage', signal: controller.signal }, createGateway(requests))).rejects.toMatchObject({ code: 'cancelled' });
|
|
25
|
+
expect(requests).toEqual([]);
|
|
26
|
+
});
|
|
27
|
+
function createGateway(requests) {
|
|
28
|
+
return {
|
|
29
|
+
resolveOwnerAsync: (owner) => {
|
|
30
|
+
requests.push(owner);
|
|
31
|
+
return Promise.resolve({
|
|
32
|
+
login: 'Ankhorage',
|
|
33
|
+
type: 'organization',
|
|
34
|
+
url: 'https://github.com/Ankhorage',
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
listOwnerRepositoriesAsync: () => Promise.resolve([
|
|
38
|
+
{
|
|
39
|
+
id: '2',
|
|
40
|
+
name: 'zora',
|
|
41
|
+
owner: 'Ankhorage',
|
|
42
|
+
url: 'https://github.com/Ankhorage/zora',
|
|
43
|
+
visibility: 'public',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: '1',
|
|
47
|
+
name: 'atlas',
|
|
48
|
+
owner: 'Ankhorage',
|
|
49
|
+
url: 'https://github.com/Ankhorage/atlas',
|
|
50
|
+
visibility: 'public',
|
|
51
|
+
},
|
|
52
|
+
]),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=discoverGitHubRepositoriesWithGatewayAsync.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discoverGitHubRepositoriesWithGatewayAsync.test.js","sourceRoot":"","sources":["../../../../src/providers/github/services/discoverGitHubRepositoriesWithGatewayAsync.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGxC,OAAO,EAAE,0CAA0C,EAAE,MAAM,iDAAiD,CAAC;AAE7G,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,sBAAsB,EAAE,8BAA8B,CAAC,CAAC,CAC5F,uCAAuC,EACvC,KAAK,EAAE,MAAM,EAAE,EAAE;IACf,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,MAAM,MAAM,GAAG,MAAM,0CAA0C,CAC7D,EAAE,MAAM,EAAE,EACV,aAAa,CAAC,QAAQ,CAAC,CACxB,CAAC;IAEF,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;IACxC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;QAC3B,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,cAAc;QACpB,GAAG,EAAE,8BAA8B;KACpC,CAAC,CAAC;IACH,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAA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,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACrB,OAAO,OAAO,CAAC,OAAO,CAAC;gBACrB,KAAK,EAAE,WAAW;gBAClB,IAAI,EAAE,cAAc;gBACpB,GAAG,EAAE,8BAA8B;aACpC,CAAC,CAAC;QACL,CAAC;QACD,0BAA0B,EAAE,GAAG,EAAE,CAC/B,OAAO,CAAC,OAAO,CAAC;YACd;gBACE,EAAE,EAAE,GAAG;gBACP,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,WAAW;gBAClB,GAAG,EAAE,mCAAmC;gBACxC,UAAU,EAAE,QAAQ;aACrB;YACD;gBACE,EAAE,EAAE,GAAG;gBACP,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,WAAW;gBAClB,GAAG,EAAE,oCAAoC;gBACzC,UAAU,EAAE,QAAQ;aACrB;SACF,CAAC;KACL,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"materializeGitHubRepositoryWithGatewayAsync.d.ts","sourceRoot":"","sources":["../../../../src/providers/github/services/materializeGitHubRepositoryWithGatewayAsync.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"materializeGitHubRepositoryWithGatewayAsync.d.ts","sourceRoot":"","sources":["../../../../src/providers/github/services/materializeGitHubRepositoryWithGatewayAsync.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,0DAA0D,CAAC;AACvH,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,yDAAyD,CAAC;AACrH,OAAO,KAAK,EACV,2BAA2B,EAI5B,MAAM,yCAAyC,CAAC;AAEjD,mGAAmG;AACnG,wBAAsB,2CAA2C,CAC/D,OAAO,EAAE,sCAAsC,EAC/C,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,qCAAqC,CAAC,CAsChD"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { chmod, mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises';
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
3
|
import { dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
4
|
+
import { GitHubRepositoryDiscoveryError } from '../definitions/GitHubRepositoryDiscoveryResult.js';
|
|
4
5
|
/*** Materialize a GitHub repository through an injected read gateway for deterministic testing. */
|
|
5
6
|
export async function materializeGitHubRepositoryWithGatewayAsync(options, gateway) {
|
|
6
7
|
const parsed = parseGitHubRepositoryUrl(options.url);
|
|
7
|
-
const repository = await gateway.inspectRepositoryAsync(parsed.target);
|
|
8
|
+
const repository = await gateway.inspectRepositoryAsync(parsed.target, options.signal);
|
|
8
9
|
const explicitRef = normalizeRef(options.ref);
|
|
9
10
|
const revision = explicitRef === undefined
|
|
10
|
-
? await resolveUrlRevisionAsync(gateway, parsed, repository.defaultBranch)
|
|
11
|
-
: await gateway.resolveRevisionAsync(parsed.target, explicitRef);
|
|
12
|
-
const tree = await gateway.readTreeAsync(parsed.target, revision.treeSha);
|
|
11
|
+
? await resolveUrlRevisionAsync(gateway, parsed, repository.defaultBranch, options.signal)
|
|
12
|
+
: await gateway.resolveRevisionAsync(parsed.target, explicitRef, options.signal);
|
|
13
|
+
const tree = await gateway.readTreeAsync(parsed.target, revision.treeSha, options.signal);
|
|
13
14
|
const validated = validateTree(tree.entries, tree.truncated);
|
|
14
15
|
const rootPath = await createMaterializationRootAsync(options.destinationPath);
|
|
15
16
|
try {
|
|
16
|
-
await writeFileBatchesAsync(gateway, parsed.target, revision.commitSha, rootPath, validated.files);
|
|
17
|
+
await writeFileBatchesAsync(gateway, parsed.target, revision.commitSha, rootPath, validated.files, options.signal);
|
|
17
18
|
}
|
|
18
19
|
catch (error) {
|
|
19
20
|
await rm(rootPath, { force: true, recursive: true });
|
|
@@ -107,20 +108,27 @@ function createRefCandidates(segments) {
|
|
|
107
108
|
return Array.from({ length: segments.length }, (_, index) => segments.slice(0, segments.length - index).join('/'));
|
|
108
109
|
}
|
|
109
110
|
/*** Resolve URL-derived ref candidates, falling back to the repository default branch. */
|
|
110
|
-
async function resolveUrlRevisionAsync(gateway, parsed, defaultBranch) {
|
|
111
|
+
async function resolveUrlRevisionAsync(gateway, parsed, defaultBranch, signal) {
|
|
111
112
|
if (parsed.refCandidates.length === 0) {
|
|
112
|
-
return gateway.resolveRevisionAsync(parsed.target, defaultBranch);
|
|
113
|
+
return gateway.resolveRevisionAsync(parsed.target, defaultBranch, signal);
|
|
113
114
|
}
|
|
114
115
|
for (const candidate of parsed.refCandidates) {
|
|
115
116
|
try {
|
|
116
|
-
return await gateway.resolveRevisionAsync(parsed.target, candidate);
|
|
117
|
+
return await gateway.resolveRevisionAsync(parsed.target, candidate, signal);
|
|
117
118
|
}
|
|
118
|
-
catch {
|
|
119
|
+
catch (error) {
|
|
120
|
+
if (isCancellationError(error))
|
|
121
|
+
throw error;
|
|
119
122
|
// GitHub tree/blob URLs can contain both slash-containing refs and trailing repository paths.
|
|
120
123
|
}
|
|
121
124
|
}
|
|
122
125
|
throw new Error('GitHub repository URL does not resolve to a branch, tag, or commit.');
|
|
123
126
|
}
|
|
127
|
+
/*** Preserve caller cancellation and deadlines instead of mistaking them for an ambiguous URL ref. */
|
|
128
|
+
function isCancellationError(error) {
|
|
129
|
+
return (error instanceof GitHubRepositoryDiscoveryError &&
|
|
130
|
+
(error.code === 'cancelled' || error.code === 'timeout'));
|
|
131
|
+
}
|
|
124
132
|
/*** Create the consistent public error for unsupported GitHub URL shapes. */
|
|
125
133
|
function invalidRepositoryUrl() {
|
|
126
134
|
return new Error('Repository URL must be a GitHub repository, tree, blob, or commit HTTPS URL.');
|
|
@@ -183,16 +191,16 @@ async function createMaterializationRootAsync(destinationPath) {
|
|
|
183
191
|
return rootPath;
|
|
184
192
|
}
|
|
185
193
|
/*** Download and write bounded groups so large repositories do not fan out unbounded requests. */
|
|
186
|
-
async function writeFileBatchesAsync(gateway, target, revision, rootPath, entries) {
|
|
194
|
+
async function writeFileBatchesAsync(gateway, target, revision, rootPath, entries, signal) {
|
|
187
195
|
const batches = Array.from({ length: Math.ceil(entries.length / WRITE_BATCH_SIZE) }, (_, index) => entries.slice(index * WRITE_BATCH_SIZE, (index + 1) * WRITE_BATCH_SIZE));
|
|
188
196
|
for (const batch of batches) {
|
|
189
|
-
await Promise.all(batch.map((entry) => materializeFileAsync(gateway, target, revision, rootPath, entry)));
|
|
197
|
+
await Promise.all(batch.map((entry) => materializeFileAsync(gateway, target, revision, rootPath, entry, signal)));
|
|
190
198
|
}
|
|
191
199
|
}
|
|
192
200
|
/*** Materialize one ordinary Git blob beneath the isolated root and preserve executable mode. */
|
|
193
|
-
async function materializeFileAsync(gateway, target, revision, rootPath, entry) {
|
|
201
|
+
async function materializeFileAsync(gateway, target, revision, rootPath, entry, signal) {
|
|
194
202
|
const destination = resolveMaterializationPath(rootPath, entry.path);
|
|
195
|
-
const content = await gateway.readFileAsync(target, revision, entry.path);
|
|
203
|
+
const content = await gateway.readFileAsync(target, revision, entry.path, signal);
|
|
196
204
|
if (entry.size !== content.byteLength) {
|
|
197
205
|
throw new Error(`GitHub repository file size changed while reading ${entry.path}.`);
|
|
198
206
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"materializeGitHubRepositoryWithGatewayAsync.js","sourceRoot":"","sources":["../../../../src/providers/github/services/materializeGitHubRepositoryWithGatewayAsync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"materializeGitHubRepositoryWithGatewayAsync.js","sourceRoot":"","sources":["../../../../src/providers/github/services/materializeGitHubRepositoryWithGatewayAsync.ts"],"names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cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,EAAE,CAAC,EAC/E,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,kCAAkC,cAAc,GAAG,CAAC,CAAC;IACvE,CAAC;IACD,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,EAAE,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IACpE,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAC9C,IAAI,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,UAAU,CAAC,KAAK,GAAG,EAAE,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QACxF,MAAM,IAAI,KAAK,CAAC,kCAAkC,cAAc,GAAG,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/repository",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Standalone repository capability for connecting and managing an app project's source repository.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -108,15 +108,15 @@
|
|
|
108
108
|
"knip:check": "ankhorage-knip"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
|
-
"@ankhorage/devtools": "^2.3.
|
|
112
|
-
"@ankhorage/paradox": "^0.3.
|
|
111
|
+
"@ankhorage/devtools": "^2.3.45",
|
|
112
|
+
"@ankhorage/paradox": "^0.3.6",
|
|
113
113
|
"@types/bun": "^1.4.2",
|
|
114
114
|
"@types/node": "^26.6.6",
|
|
115
115
|
"typescript": "~6.0.3"
|
|
116
116
|
},
|
|
117
117
|
"packageManager": "bun@1.4.2",
|
|
118
118
|
"dependencies": {
|
|
119
|
-
"@ankhorage/ankh": "^0.13.
|
|
119
|
+
"@ankhorage/ankh": "^0.13.3",
|
|
120
120
|
"@ankhorage/capability": "^0.2.2",
|
|
121
121
|
"@ankhorage/contracts": "^26.3.0",
|
|
122
122
|
"ignore": "^7.0.14"
|