@ankhorage/repository 0.4.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/LICENSE +21 -0
- package/README.md +53 -0
- package/dist/cli/commands/connect/definitions/ConnectCommandOptions.d.ts +8 -0
- package/dist/cli/commands/connect/definitions/ConnectCommandOptions.d.ts.map +1 -0
- package/dist/cli/commands/connect/definitions/ConnectCommandOptions.js +2 -0
- package/dist/cli/commands/connect/definitions/ConnectCommandOptions.js.map +1 -0
- package/dist/cli/commands/connect/parseConnectCommandOptions.d.ts +4 -0
- package/dist/cli/commands/connect/parseConnectCommandOptions.d.ts.map +1 -0
- package/dist/cli/commands/connect/parseConnectCommandOptions.js +38 -0
- package/dist/cli/commands/connect/parseConnectCommandOptions.js.map +1 -0
- package/dist/cli/commands/connect/runConnectCommandAsync.d.ts +10 -0
- package/dist/cli/commands/connect/runConnectCommandAsync.d.ts.map +1 -0
- package/dist/cli/commands/connect/runConnectCommandAsync.js +29 -0
- package/dist/cli/commands/connect/runConnectCommandAsync.js.map +1 -0
- package/dist/cli/index.d.ts +5 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +5 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/provider/createRepositoryRuntimeProvider.d.ts +25 -0
- package/dist/cli/provider/createRepositoryRuntimeProvider.d.ts.map +1 -0
- package/dist/cli/provider/createRepositoryRuntimeProvider.js +20 -0
- package/dist/cli/provider/createRepositoryRuntimeProvider.js.map +1 -0
- package/dist/cli/provider/createRepositoryRuntimeProvider.test.d.ts +2 -0
- package/dist/cli/provider/createRepositoryRuntimeProvider.test.d.ts.map +1 -0
- package/dist/cli/provider/createRepositoryRuntimeProvider.test.js +12 -0
- package/dist/cli/provider/createRepositoryRuntimeProvider.test.js.map +1 -0
- package/dist/connection/adapters/createLocalProjectSnapshotReader.d.ts +4 -0
- package/dist/connection/adapters/createLocalProjectSnapshotReader.d.ts.map +1 -0
- package/dist/connection/adapters/createLocalProjectSnapshotReader.js +123 -0
- package/dist/connection/adapters/createLocalProjectSnapshotReader.js.map +1 -0
- package/dist/connection/adapters/createLocalRepositoryManifestStore.d.ts +4 -0
- package/dist/connection/adapters/createLocalRepositoryManifestStore.d.ts.map +1 -0
- package/dist/connection/adapters/createLocalRepositoryManifestStore.js +75 -0
- package/dist/connection/adapters/createLocalRepositoryManifestStore.js.map +1 -0
- package/dist/connection/adapters/createLocalRepositoryManifestStore.test.d.ts +2 -0
- package/dist/connection/adapters/createLocalRepositoryManifestStore.test.d.ts.map +1 -0
- package/dist/connection/adapters/createLocalRepositoryManifestStore.test.js +25 -0
- package/dist/connection/adapters/createLocalRepositoryManifestStore.test.js.map +1 -0
- package/dist/connection/definitions/ProjectSnapshot.d.ts +8 -0
- package/dist/connection/definitions/ProjectSnapshot.d.ts.map +1 -0
- package/dist/connection/definitions/ProjectSnapshot.js +2 -0
- package/dist/connection/definitions/ProjectSnapshot.js.map +1 -0
- package/dist/connection/definitions/ProjectSnapshotEntry.d.ts +10 -0
- package/dist/connection/definitions/ProjectSnapshotEntry.d.ts.map +1 -0
- package/dist/connection/definitions/ProjectSnapshotEntry.js +2 -0
- package/dist/connection/definitions/ProjectSnapshotEntry.js.map +1 -0
- package/dist/connection/definitions/RepositoryConnectionOptions.d.ts +8 -0
- package/dist/connection/definitions/RepositoryConnectionOptions.d.ts.map +1 -0
- package/dist/connection/definitions/RepositoryConnectionOptions.js +2 -0
- package/dist/connection/definitions/RepositoryConnectionOptions.js.map +1 -0
- package/dist/connection/definitions/RepositoryConnectionResult.d.ts +17 -0
- package/dist/connection/definitions/RepositoryConnectionResult.d.ts.map +1 -0
- package/dist/connection/definitions/RepositoryConnectionResult.js +2 -0
- package/dist/connection/definitions/RepositoryConnectionResult.js.map +1 -0
- package/dist/connection/ports/ProjectSnapshotReader.d.ts +6 -0
- package/dist/connection/ports/ProjectSnapshotReader.d.ts.map +1 -0
- package/dist/connection/ports/ProjectSnapshotReader.js +2 -0
- package/dist/connection/ports/ProjectSnapshotReader.js.map +1 -0
- package/dist/connection/ports/RepositoryManifestStore.d.ts +6 -0
- package/dist/connection/ports/RepositoryManifestStore.d.ts.map +1 -0
- package/dist/connection/ports/RepositoryManifestStore.js +2 -0
- package/dist/connection/ports/RepositoryManifestStore.js.map +1 -0
- package/dist/connection/services/connectRepositoryAsync.d.ts +5 -0
- package/dist/connection/services/connectRepositoryAsync.d.ts.map +1 -0
- package/dist/connection/services/connectRepositoryAsync.js +55 -0
- package/dist/connection/services/connectRepositoryAsync.js.map +1 -0
- package/dist/connection/services/connectRepositoryAsync.test.d.ts +2 -0
- package/dist/connection/services/connectRepositoryAsync.test.d.ts.map +1 -0
- package/dist/connection/services/connectRepositoryAsync.test.js +27 -0
- package/dist/connection/services/connectRepositoryAsync.test.js.map +1 -0
- package/dist/connection/utils/getProjectSnapshotPaths.d.ts +5 -0
- package/dist/connection/utils/getProjectSnapshotPaths.d.ts.map +1 -0
- package/dist/connection/utils/getProjectSnapshotPaths.js +5 -0
- package/dist/connection/utils/getProjectSnapshotPaths.js.map +1 -0
- package/dist/github/index.d.ts +5 -0
- package/dist/github/index.d.ts.map +1 -0
- package/dist/github/index.js +2 -0
- package/dist/github/index.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.test.d.ts +2 -0
- package/dist/index.test.d.ts.map +1 -0
- package/dist/index.test.js +35 -0
- package/dist/index.test.js.map +1 -0
- package/dist/metadata/index.d.ts +12 -0
- package/dist/metadata/index.d.ts.map +1 -0
- package/dist/metadata/index.js +12 -0
- package/dist/metadata/index.js.map +1 -0
- package/dist/metadata/repositoryPackageMetadata.d.ts +13 -0
- package/dist/metadata/repositoryPackageMetadata.d.ts.map +1 -0
- package/dist/metadata/repositoryPackageMetadata.js +14 -0
- package/dist/metadata/repositoryPackageMetadata.js.map +1 -0
- package/dist/providers/github/adapters/createGhCliRepositoryGateway.d.ts +13 -0
- package/dist/providers/github/adapters/createGhCliRepositoryGateway.d.ts.map +1 -0
- package/dist/providers/github/adapters/createGhCliRepositoryGateway.js +228 -0
- package/dist/providers/github/adapters/createGhCliRepositoryGateway.js.map +1 -0
- package/dist/providers/github/adapters/ghCliJson.d.ts +22 -0
- package/dist/providers/github/adapters/ghCliJson.d.ts.map +1 -0
- package/dist/providers/github/adapters/ghCliJson.js +44 -0
- package/dist/providers/github/adapters/ghCliJson.js.map +1 -0
- package/dist/providers/github/definitions/GitHubRepositoryConnectionOptions.d.ts +16 -0
- package/dist/providers/github/definitions/GitHubRepositoryConnectionOptions.d.ts.map +1 -0
- package/dist/providers/github/definitions/GitHubRepositoryConnectionOptions.js +2 -0
- package/dist/providers/github/definitions/GitHubRepositoryConnectionOptions.js.map +1 -0
- package/dist/providers/github/definitions/GitHubRepositoryConnectionResult.d.ts +23 -0
- package/dist/providers/github/definitions/GitHubRepositoryConnectionResult.d.ts.map +1 -0
- package/dist/providers/github/definitions/GitHubRepositoryConnectionResult.js +2 -0
- package/dist/providers/github/definitions/GitHubRepositoryConnectionResult.js.map +1 -0
- package/dist/providers/github/definitions/GitHubRepositoryVisibility.d.ts +2 -0
- package/dist/providers/github/definitions/GitHubRepositoryVisibility.d.ts.map +1 -0
- package/dist/providers/github/definitions/GitHubRepositoryVisibility.js +2 -0
- package/dist/providers/github/definitions/GitHubRepositoryVisibility.js.map +1 -0
- package/dist/providers/github/definitions/index.d.ts +3 -0
- package/dist/providers/github/definitions/index.d.ts.map +1 -0
- package/dist/providers/github/definitions/index.js +2 -0
- package/dist/providers/github/definitions/index.js.map +1 -0
- package/dist/providers/github/ports/GitHubRepositoryGateway.d.ts +42 -0
- package/dist/providers/github/ports/GitHubRepositoryGateway.d.ts.map +1 -0
- package/dist/providers/github/ports/GitHubRepositoryGateway.js +2 -0
- package/dist/providers/github/ports/GitHubRepositoryGateway.js.map +1 -0
- package/dist/providers/github/services/connectGitHubRepositoryAsync.d.ts +5 -0
- package/dist/providers/github/services/connectGitHubRepositoryAsync.d.ts.map +1 -0
- package/dist/providers/github/services/connectGitHubRepositoryAsync.js +70 -0
- package/dist/providers/github/services/connectGitHubRepositoryAsync.js.map +1 -0
- package/dist/providers/github/services/inspectGitHubRepositoryPreflightAsync.d.ts +21 -0
- package/dist/providers/github/services/inspectGitHubRepositoryPreflightAsync.d.ts.map +1 -0
- package/dist/providers/github/services/inspectGitHubRepositoryPreflightAsync.js +72 -0
- package/dist/providers/github/services/inspectGitHubRepositoryPreflightAsync.js.map +1 -0
- package/dist/providers/github/services/publishGitHubProjectSnapshotAsync.d.ts +8 -0
- package/dist/providers/github/services/publishGitHubProjectSnapshotAsync.d.ts.map +1 -0
- package/dist/providers/github/services/publishGitHubProjectSnapshotAsync.js +12 -0
- package/dist/providers/github/services/publishGitHubProjectSnapshotAsync.js.map +1 -0
- package/dist/readme-usage.d.ts +2 -0
- package/dist/readme-usage.d.ts.map +1 -0
- package/dist/readme-usage.js +32 -0
- package/dist/readme-usage.js.map +1 -0
- package/package.json +89 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RepositoryManifest } from '@ankhorage/contracts/repository';
|
|
2
|
+
import type { ProjectSnapshotEntry } from './ProjectSnapshotEntry.js';
|
|
3
|
+
export interface ProjectSnapshot {
|
|
4
|
+
readonly projectPath: string;
|
|
5
|
+
readonly repository: RepositoryManifest;
|
|
6
|
+
readonly entries: readonly ProjectSnapshotEntry[];
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=ProjectSnapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectSnapshot.d.ts","sourceRoot":"","sources":["../../../src/connection/definitions/ProjectSnapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectSnapshot.js","sourceRoot":"","sources":["../../../src/connection/definitions/ProjectSnapshot.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type ProjectSnapshotEntryMode = '100644' | '100755';
|
|
2
|
+
type ProjectSnapshotEntryEncoding = 'utf-8' | 'base64';
|
|
3
|
+
export interface ProjectSnapshotEntry {
|
|
4
|
+
readonly path: string;
|
|
5
|
+
readonly mode: ProjectSnapshotEntryMode;
|
|
6
|
+
readonly content: string;
|
|
7
|
+
readonly encoding: ProjectSnapshotEntryEncoding;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=ProjectSnapshotEntry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectSnapshotEntry.d.ts","sourceRoot":"","sources":["../../../src/connection/definitions/ProjectSnapshotEntry.ts"],"names":[],"mappings":"AAAA,KAAK,wBAAwB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACpD,KAAK,4BAA4B,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEvD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,4BAA4B,CAAC;CACjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectSnapshotEntry.js","sourceRoot":"","sources":["../../../src/connection/definitions/ProjectSnapshotEntry.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RepositoryManifest } from '@ankhorage/contracts/repository';
|
|
2
|
+
export type RepositoryVisibility = 'private' | 'public';
|
|
3
|
+
export interface RepositoryConnectionOptions {
|
|
4
|
+
readonly repository: RepositoryManifest;
|
|
5
|
+
readonly projectPath?: string;
|
|
6
|
+
readonly visibility?: RepositoryVisibility;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=RepositoryConnectionOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RepositoryConnectionOptions.d.ts","sourceRoot":"","sources":["../../../src/connection/definitions/RepositoryConnectionOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAExD,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,oBAAoB,CAAC;CAC5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RepositoryConnectionOptions.js","sourceRoot":"","sources":["../../../src/connection/definitions/RepositoryConnectionOptions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RepositoryManifest } from '@ankhorage/contracts/repository';
|
|
2
|
+
export type RepositoryConnectionStatus = 'connected' | 'already-connected';
|
|
3
|
+
interface RepositoryConnectionSuccess {
|
|
4
|
+
readonly status: RepositoryConnectionStatus;
|
|
5
|
+
readonly repository: RepositoryManifest;
|
|
6
|
+
readonly appCommitSha?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface RepositoryConnectionFailure {
|
|
9
|
+
readonly status: 'recoverable-failure' | 'conflict';
|
|
10
|
+
readonly stage: string;
|
|
11
|
+
readonly code: string;
|
|
12
|
+
readonly message: string;
|
|
13
|
+
readonly repository?: RepositoryManifest;
|
|
14
|
+
}
|
|
15
|
+
export type RepositoryConnectionResult = RepositoryConnectionSuccess | RepositoryConnectionFailure;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=RepositoryConnectionResult.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RepositoryConnectionResult.d.ts","sourceRoot":"","sources":["../../../src/connection/definitions/RepositoryConnectionResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,MAAM,MAAM,0BAA0B,GAAG,WAAW,GAAG,mBAAmB,CAAC;AAE3E,UAAU,2BAA2B;IACnC,QAAQ,CAAC,MAAM,EAAE,0BAA0B,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,MAAM,EAAE,qBAAqB,GAAG,UAAU,CAAC;IACpD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAED,MAAM,MAAM,0BAA0B,GAAG,2BAA2B,GAAG,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RepositoryConnectionResult.js","sourceRoot":"","sources":["../../../src/connection/definitions/RepositoryConnectionResult.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RepositoryManifest } from '@ankhorage/contracts/repository';
|
|
2
|
+
import type { ProjectSnapshot } from '../definitions/ProjectSnapshot.js';
|
|
3
|
+
export interface ProjectSnapshotReader {
|
|
4
|
+
readAsync(projectPath: string, repository: RepositoryManifest): Promise<ProjectSnapshot>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=ProjectSnapshotReader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectSnapshotReader.d.ts","sourceRoot":"","sources":["../../../src/connection/ports/ProjectSnapshotReader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEzE,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAC1F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectSnapshotReader.js","sourceRoot":"","sources":["../../../src/connection/ports/ProjectSnapshotReader.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RepositoryManifest } from '@ankhorage/contracts/repository';
|
|
2
|
+
export interface RepositoryManifestStore {
|
|
3
|
+
readConfigAsync(projectPath: string): Promise<RepositoryManifest | undefined>;
|
|
4
|
+
updateRepositoryAsync(projectPath: string, repository: RepositoryManifest): Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=RepositoryManifestStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RepositoryManifestStore.d.ts","sourceRoot":"","sources":["../../../src/connection/ports/RepositoryManifestStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,MAAM,WAAW,uBAAuB;IACtC,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAAC;IAC9E,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RepositoryManifestStore.js","sourceRoot":"","sources":["../../../src/connection/ports/RepositoryManifestStore.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RepositoryConnectionOptions } from '../definitions/RepositoryConnectionOptions.js';
|
|
2
|
+
import type { RepositoryConnectionResult } from '../definitions/RepositoryConnectionResult.js';
|
|
3
|
+
/*** Connect the app project repository using only the standalone `RepositoryManifest` slice. */
|
|
4
|
+
export declare function connectRepositoryAsync(options: RepositoryConnectionOptions): Promise<RepositoryConnectionResult>;
|
|
5
|
+
//# sourceMappingURL=connectRepositoryAsync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectRepositoryAsync.d.ts","sourceRoot":"","sources":["../../../src/connection/services/connectRepositoryAsync.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AACjG,OAAO,KAAK,EAEV,0BAA0B,EAC3B,MAAM,8CAA8C,CAAC;AA0DtD,gGAAgG;AAChG,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,0BAA0B,CAAC,CAWrC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { connectGitHubRepositoryAsync } from '../../providers/github/services/connectGitHubRepositoryAsync.js';
|
|
2
|
+
/*** Add the provider discriminant to the canonical repository identity returned by GitHub. */
|
|
3
|
+
function toRepositoryManifest(repository) {
|
|
4
|
+
return { provider: 'github', ...repository };
|
|
5
|
+
}
|
|
6
|
+
/*** Identify the failure branch of the GitHub adapter result union. */
|
|
7
|
+
function isGitHubRepositoryConnectionFailure(result) {
|
|
8
|
+
return result.status === 'recoverable-failure' || result.status === 'conflict';
|
|
9
|
+
}
|
|
10
|
+
/*** Convert the current GitHub adapter result into the provider-neutral repository result. */
|
|
11
|
+
function toRepositoryConnectionResult(result) {
|
|
12
|
+
if (isGitHubRepositoryConnectionFailure(result)) {
|
|
13
|
+
return {
|
|
14
|
+
status: result.status,
|
|
15
|
+
stage: result.stage,
|
|
16
|
+
code: result.code,
|
|
17
|
+
message: result.message,
|
|
18
|
+
...(result.repository === undefined
|
|
19
|
+
? {}
|
|
20
|
+
: { repository: toRepositoryManifest(result.repository) }),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
status: result.status,
|
|
25
|
+
repository: toRepositoryManifest(result.repository),
|
|
26
|
+
...(result.appCommitSha === undefined ? {} : { appCommitSha: result.appCommitSha }),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/*** Validate provider-specific identity fields before any repository side effect occurs. */
|
|
30
|
+
function validateRepositoryManifest(repository) {
|
|
31
|
+
const expectedUrl = `https://github.com/${repository.owner}/${repository.name}`;
|
|
32
|
+
if (repository.url === expectedUrl)
|
|
33
|
+
return null;
|
|
34
|
+
return {
|
|
35
|
+
status: 'conflict',
|
|
36
|
+
stage: 'manifest',
|
|
37
|
+
code: 'repository-url-mismatch',
|
|
38
|
+
message: `Repository URL must match ${expectedUrl}.`,
|
|
39
|
+
repository,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/*** Connect the app project repository using only the standalone `RepositoryManifest` slice. */
|
|
43
|
+
export async function connectRepositoryAsync(options) {
|
|
44
|
+
const invalidManifest = validateRepositoryManifest(options.repository);
|
|
45
|
+
if (invalidManifest)
|
|
46
|
+
return invalidManifest;
|
|
47
|
+
const result = await connectGitHubRepositoryAsync({
|
|
48
|
+
...(options.projectPath === undefined ? {} : { projectPath: options.projectPath }),
|
|
49
|
+
owner: options.repository.owner,
|
|
50
|
+
name: options.repository.name,
|
|
51
|
+
...(options.visibility === undefined ? {} : { visibility: options.visibility }),
|
|
52
|
+
});
|
|
53
|
+
return toRepositoryConnectionResult(result);
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=connectRepositoryAsync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectRepositoryAsync.js","sourceRoot":"","sources":["../../../src/connection/services/connectRepositoryAsync.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,4BAA4B,EAAE,MAAM,iEAAiE,CAAC;AAO/G,8FAA8F;AAC9F,SAAS,oBAAoB,CAAC,UAK7B;IACC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,CAAC;AAC/C,CAAC;AAED,uEAAuE;AACvE,SAAS,mCAAmC,CAC1C,MAAwC;IAExC,OAAO,MAAM,CAAC,MAAM,KAAK,qBAAqB,IAAI,MAAM,CAAC,MAAM,KAAK,UAAU,CAAC;AACjF,CAAC;AAED,8FAA8F;AAC9F,SAAS,4BAA4B,CACnC,MAAwC;IAExC,IAAI,mCAAmC,CAAC,MAAM,CAAC,EAAE,CAAC;QAChD,OAAO;YACL,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,GAAG,CAAC,MAAM,CAAC,UAAU,KAAK,SAAS;gBACjC,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,EAAE,UAAU,EAAE,oBAAoB,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;SAC7D,CAAC;IACJ,CAAC;IAED,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,UAAU,EAAE,oBAAoB,CAAC,MAAM,CAAC,UAAU,CAAC;QACnD,GAAG,CAAC,MAAM,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC;KACpF,CAAC;AACJ,CAAC;AAED,4FAA4F;AAC5F,SAAS,0BAA0B,CACjC,UAA8B;IAE9B,MAAM,WAAW,GAAG,sBAAsB,UAAU,CAAC,KAAK,IAAI,UAAU,CAAC,IAAI,EAAE,CAAC;IAChF,IAAI,UAAU,CAAC,GAAG,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAEhD,OAAO;QACL,MAAM,EAAE,UAAU;QAClB,KAAK,EAAE,UAAU;QACjB,IAAI,EAAE,yBAAyB;QAC/B,OAAO,EAAE,6BAA6B,WAAW,GAAG;QACpD,UAAU;KACX,CAAC;AACJ,CAAC;AAED,gGAAgG;AAChG,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,OAAoC;IAEpC,MAAM,eAAe,GAAG,0BAA0B,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACvE,IAAI,eAAe;QAAE,OAAO,eAAe,CAAC;IAE5C,MAAM,MAAM,GAAG,MAAM,4BAA4B,CAAC;QAChD,GAAG,CAAC,OAAO,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC;QAClF,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;QAC/B,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;QAC7B,GAAG,CAAC,OAAO,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC;KAChF,CAAC,CAAC;IACH,OAAO,4BAA4B,CAAC,MAAM,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectRepositoryAsync.test.d.ts","sourceRoot":"","sources":["../../../src/connection/services/connectRepositoryAsync.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { expect, test } from 'bun:test';
|
|
2
|
+
import { connectRepositoryAsync } from './connectRepositoryAsync.js';
|
|
3
|
+
test('rejects a GitHub repository manifest whose canonical URL does not match identity', async () => {
|
|
4
|
+
const result = await connectRepositoryAsync({
|
|
5
|
+
repository: {
|
|
6
|
+
provider: 'github',
|
|
7
|
+
owner: 'ankhorage',
|
|
8
|
+
name: 'demo',
|
|
9
|
+
url: 'https://github.com/other/demo',
|
|
10
|
+
defaultBranch: 'main',
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
expect(result).toEqual({
|
|
14
|
+
status: 'conflict',
|
|
15
|
+
stage: 'manifest',
|
|
16
|
+
code: 'repository-url-mismatch',
|
|
17
|
+
message: 'Repository URL must match https://github.com/ankhorage/demo.',
|
|
18
|
+
repository: {
|
|
19
|
+
provider: 'github',
|
|
20
|
+
owner: 'ankhorage',
|
|
21
|
+
name: 'demo',
|
|
22
|
+
url: 'https://github.com/other/demo',
|
|
23
|
+
defaultBranch: 'main',
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=connectRepositoryAsync.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectRepositoryAsync.test.js","sourceRoot":"","sources":["../../../src/connection/services/connectRepositoryAsync.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAExC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,IAAI,CAAC,kFAAkF,EAAE,KAAK,IAAI,EAAE;IAClG,MAAM,MAAM,GAAG,MAAM,sBAAsB,CAAC;QAC1C,UAAU,EAAE;YACV,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,MAAM;YACZ,GAAG,EAAE,+BAA+B;YACpC,aAAa,EAAE,MAAM;SACtB;KACF,CAAC,CAAC;IAEH,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;QACrB,MAAM,EAAE,UAAU;QAClB,KAAK,EAAE,UAAU;QACjB,IAAI,EAAE,yBAAyB;QAC/B,OAAO,EAAE,8DAA8D;QACvE,UAAU,EAAE;YACV,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,MAAM;YACZ,GAAG,EAAE,+BAA+B;YACpC,aAAa,EAAE,MAAM;SACtB;KACF,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProjectSnapshotPaths.d.ts","sourceRoot":"","sources":["../../../src/connection/utils/getProjectSnapshotPaths.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,SAAS;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,GAC5C,SAAS,MAAM,EAAE,CAEnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProjectSnapshotPaths.js","sourceRoot":"","sources":["../../../src/connection/utils/getProjectSnapshotPaths.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,MAAM,UAAU,uBAAuB,CACrC,OAA6C;IAE7C,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AAC7F,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { GitHubRepositoryConnectionOptions } from '../providers/github/definitions/GitHubRepositoryConnectionOptions.js';
|
|
2
|
+
export type { GitHubRepositoryConnectionFailure, GitHubRepositoryConnectionResult, GitHubRepositoryConnectionStatus, } from '../providers/github/definitions/GitHubRepositoryConnectionResult.js';
|
|
3
|
+
export type { GitHubRepositoryVisibility } from '../providers/github/definitions/GitHubRepositoryVisibility.js';
|
|
4
|
+
export { connectGitHubRepositoryAsync } from '../providers/github/services/connectGitHubRepositoryAsync.js';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/github/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iCAAiC,EAAE,MAAM,sEAAsE,CAAC;AAC9H,YAAY,EACV,iCAAiC,EACjC,gCAAgC,EAChC,gCAAgC,GACjC,MAAM,qEAAqE,CAAC;AAC7E,YAAY,EAAE,0BAA0B,EAAE,MAAM,+DAA+D,CAAC;AAChH,OAAO,EAAE,4BAA4B,EAAE,MAAM,8DAA8D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/github/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,4BAA4B,EAAE,MAAM,8DAA8D,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { RepositoryConnectionOptions, RepositoryVisibility, } from './connection/definitions/RepositoryConnectionOptions.js';
|
|
2
|
+
export type { RepositoryConnectionFailure, RepositoryConnectionResult, RepositoryConnectionStatus, } from './connection/definitions/RepositoryConnectionResult.js';
|
|
3
|
+
export { connectRepositoryAsync } from './connection/services/connectRepositoryAsync.js';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,yDAAyD,CAAC;AACjE,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { readdir, readFile } from 'node:fs/promises';
|
|
2
|
+
import { extname, join } from 'node:path';
|
|
3
|
+
import { expect, test } from 'bun:test';
|
|
4
|
+
import * as packageApi from './index.js';
|
|
5
|
+
import { REPOSITORY_PACKAGE_METADATA } from './metadata/index.js';
|
|
6
|
+
test('exports only the provider-neutral repository API', () => {
|
|
7
|
+
expect(Object.keys(packageApi).sort()).toEqual(['connectRepositoryAsync']);
|
|
8
|
+
});
|
|
9
|
+
test('publishes repository manifest authoring metadata', () => {
|
|
10
|
+
expect(REPOSITORY_PACKAGE_METADATA).toMatchObject({
|
|
11
|
+
packageName: '@ankhorage/repository',
|
|
12
|
+
manifestProperty: 'repository',
|
|
13
|
+
contractSubpath: '@ankhorage/contracts/repository',
|
|
14
|
+
providers: ['github'],
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
async function collectProductionTypeScriptFiles(directory) {
|
|
18
|
+
const entries = await readdir(directory, { withFileTypes: true });
|
|
19
|
+
const nested = await Promise.all(entries.map(async (entry) => {
|
|
20
|
+
const full = join(directory, entry.name);
|
|
21
|
+
if (entry.isDirectory())
|
|
22
|
+
return collectProductionTypeScriptFiles(full);
|
|
23
|
+
return ['.ts', '.tsx'].includes(extname(entry.name)) && !entry.name.endsWith('.test.ts')
|
|
24
|
+
? [full]
|
|
25
|
+
: [];
|
|
26
|
+
}));
|
|
27
|
+
return nested.flat();
|
|
28
|
+
}
|
|
29
|
+
test('never imports the full app manifest into production source', async () => {
|
|
30
|
+
const forbidden = ['App', 'Manifest'].join('');
|
|
31
|
+
const files = await collectProductionTypeScriptFiles(join(process.cwd(), 'src'));
|
|
32
|
+
const contents = await Promise.all(files.map((file) => readFile(file, 'utf8')));
|
|
33
|
+
expect(contents.some((content) => content.includes(forbidden))).toBe(false);
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=index.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAExC,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAElE,IAAI,CAAC,kDAAkD,EAAE,GAAG,EAAE;IAC5D,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC;AAC7E,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,kDAAkD,EAAE,GAAG,EAAE;IAC5D,MAAM,CAAC,2BAA2B,CAAC,CAAC,aAAa,CAAC;QAChD,WAAW,EAAE,uBAAuB;QACpC,gBAAgB,EAAE,YAAY;QAC9B,eAAe,EAAE,iCAAiC;QAClD,SAAS,EAAE,CAAC,QAAQ,CAAC;KACtB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,KAAK,UAAU,gCAAgC,CAAC,SAAiB;IAC/D,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,SAAS,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAClE,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAC9B,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QAC1B,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,KAAK,CAAC,WAAW,EAAE;YAAE,OAAO,gCAAgC,CAAC,IAAI,CAAC,CAAC;QACvE,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;YACtF,CAAC,CAAC,CAAC,IAAI,CAAC;YACR,CAAC,CAAC,EAAE,CAAC;IACT,CAAC,CAAC,CACH,CAAC;IACF,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;AACvB,CAAC;AAED,IAAI,CAAC,4DAA4D,EAAE,KAAK,IAAI,EAAE;IAC5E,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,MAAM,gCAAgC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;IACjF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAEhF,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const REPOSITORY_PACKAGE_METADATA: {
|
|
2
|
+
readonly packageName: "@ankhorage/repository";
|
|
3
|
+
readonly manifestProperty: "repository";
|
|
4
|
+
readonly contractSubpath: "@ankhorage/contracts/repository";
|
|
5
|
+
readonly providers: readonly ["github"];
|
|
6
|
+
readonly capabilities: readonly ["repository.connect"];
|
|
7
|
+
readonly github: {
|
|
8
|
+
readonly cli: "gh";
|
|
9
|
+
readonly defaultBranch: "main";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/metadata/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B;;;;;;;;;;CAU9B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const REPOSITORY_PACKAGE_METADATA = {
|
|
2
|
+
packageName: '@ankhorage/repository',
|
|
3
|
+
manifestProperty: 'repository',
|
|
4
|
+
contractSubpath: '@ankhorage/contracts/repository',
|
|
5
|
+
providers: ['github'],
|
|
6
|
+
capabilities: ['repository.connect'],
|
|
7
|
+
github: {
|
|
8
|
+
cli: 'gh',
|
|
9
|
+
defaultBranch: 'main',
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/metadata/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,WAAW,EAAE,uBAAuB;IACpC,gBAAgB,EAAE,YAAY;IAC9B,eAAe,EAAE,iCAAiC;IAClD,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,YAAY,EAAE,CAAC,oBAAoB,CAAC;IACpC,MAAM,EAAE;QACN,GAAG,EAAE,IAAI;QACT,aAAa,EAAE,MAAM;KACtB;CACO,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const repositoryPackageMetadata: {
|
|
2
|
+
readonly packageName: string;
|
|
3
|
+
readonly provider: "repository";
|
|
4
|
+
readonly category: "repository";
|
|
5
|
+
readonly version: string;
|
|
6
|
+
readonly capabilities: readonly ["repository.connect"];
|
|
7
|
+
readonly command: {
|
|
8
|
+
readonly path: readonly ["connect"];
|
|
9
|
+
readonly capability: "repository.connect";
|
|
10
|
+
readonly summary: "Create or safely resume a source repository connection.";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=repositoryPackageMetadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repositoryPackageMetadata.d.ts","sourceRoot":"","sources":["../../src/metadata/repositoryPackageMetadata.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,yBAAyB;;;;;;;;;;;CAW5B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import packageJson from '../../package.json';
|
|
2
|
+
export const repositoryPackageMetadata = {
|
|
3
|
+
packageName: packageJson.name,
|
|
4
|
+
provider: 'repository',
|
|
5
|
+
category: 'repository',
|
|
6
|
+
version: packageJson.version,
|
|
7
|
+
capabilities: ['repository.connect'],
|
|
8
|
+
command: {
|
|
9
|
+
path: ['connect'],
|
|
10
|
+
capability: 'repository.connect',
|
|
11
|
+
summary: 'Create or safely resume a source repository connection.',
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=repositoryPackageMetadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repositoryPackageMetadata.js","sourceRoot":"","sources":["../../src/metadata/repositoryPackageMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAE7C,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,WAAW,EAAE,WAAW,CAAC,IAAI;IAC7B,QAAQ,EAAE,YAAqB;IAC/B,QAAQ,EAAE,YAAqB;IAC/B,OAAO,EAAE,WAAW,CAAC,OAAO;IAC5B,YAAY,EAAE,CAAC,oBAAoB,CAAU;IAC7C,OAAO,EAAE;QACP,IAAI,EAAE,CAAC,SAAS,CAAU;QAC1B,UAAU,EAAE,oBAA6B;QACzC,OAAO,EAAE,yDAAyD;KACnE;CACO,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { GitHubRepositoryGateway } from '../ports/GitHubRepositoryGateway.js';
|
|
2
|
+
import { type GhJsonRunner } from './ghCliJson.js';
|
|
3
|
+
interface GhResult {
|
|
4
|
+
readonly stdout: string;
|
|
5
|
+
readonly stderr: string;
|
|
6
|
+
}
|
|
7
|
+
interface GhRunner extends GhJsonRunner {
|
|
8
|
+
runAsync(args: readonly string[], input?: string): Promise<GhResult>;
|
|
9
|
+
}
|
|
10
|
+
/** Create the GitHub gateway backed exclusively by the local `gh` executable. */
|
|
11
|
+
export declare function createGhCliRepositoryGateway(runner?: GhRunner): GitHubRepositoryGateway;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=createGhCliRepositoryGateway.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createGhCliRepositoryGateway.d.ts","sourceRoot":"","sources":["../../../../src/providers/github/adapters/createGhCliRepositoryGateway.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAIV,uBAAuB,EAExB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAEL,KAAK,YAAY,EAOlB,MAAM,gBAAgB,CAAC;AAExB,UAAU,QAAQ;IAChB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,QAAS,SAAQ,YAAY;IACrC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CACtE;AAKD,iFAAiF;AACjF,wBAAgB,4BAA4B,CAC1C,MAAM,GAAE,QAA2B,GAClC,uBAAuB,CA4CzB"}
|