@fuad24/gitbridge 0.1.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/LICENSE +21 -0
- package/README.md +223 -0
- package/dist/bin/gb.js +3275 -0
- package/dist/bin/gitbridge.js +3275 -0
- package/dist/cli/commands/account.d.ts +3 -0
- package/dist/cli/commands/auth.d.ts +7 -0
- package/dist/cli/commands/context.d.ts +2 -0
- package/dist/cli/commands/credential.d.ts +18 -0
- package/dist/cli/commands/doctor.d.ts +2 -0
- package/dist/cli/commands/enable.d.ts +3 -0
- package/dist/cli/commands/hook.d.ts +1 -0
- package/dist/cli/commands/identity.d.ts +11 -0
- package/dist/cli/commands/provider.d.ts +1 -0
- package/dist/cli/commands/push.d.ts +5 -0
- package/dist/cli/commands/remote.d.ts +5 -0
- package/dist/cli/commands/repo.d.ts +2 -0
- package/dist/cli/commands/rule.d.ts +8 -0
- package/dist/cli/commands/setup.d.ts +2 -0
- package/dist/cli/commands/status.d.ts +2 -0
- package/dist/cli/commands/switch.d.ts +4 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/ui/banners.d.ts +2 -0
- package/dist/cli/ui/prompts.d.ts +31 -0
- package/dist/cli/ui/tables.d.ts +6 -0
- package/dist/core/config/config-store.d.ts +56 -0
- package/dist/core/config/path-resolver.d.ts +20 -0
- package/dist/core/config/schema.d.ts +461 -0
- package/dist/core/git/config-generator.d.ts +12 -0
- package/dist/core/git/git-cli.d.ts +32 -0
- package/dist/core/git/gitconfig-injector.d.ts +14 -0
- package/dist/core/git/url-parser.d.ts +16 -0
- package/dist/core/identity/identity-resolver.d.ts +23 -0
- package/dist/core/providers/bitbucket.provider.d.ts +12 -0
- package/dist/core/providers/github.provider.d.ts +15 -0
- package/dist/core/providers/gitlab.provider.d.ts +12 -0
- package/dist/core/providers/provider-registry.d.ts +11 -0
- package/dist/core/providers/provider.interface.d.ts +50 -0
- package/dist/core/safety/identity-guard.d.ts +18 -0
- package/dist/core/ssh/ssh-config-generator.d.ts +6 -0
- package/dist/core/ssh/ssh-injector.d.ts +14 -0
- package/dist/core/ssh/ssh-key-detector.d.ts +10 -0
- package/dist/core/storage/credential-store.d.ts +7 -0
- package/dist/core/storage/encrypted-vault.d.ts +16 -0
- package/dist/core/storage/linux-keyring.d.ts +8 -0
- package/dist/core/storage/macos-keychain.d.ts +8 -0
- package/dist/core/storage/store-factory.d.ts +5 -0
- package/dist/core/storage/windows-cred.d.ts +9 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +3356 -0
- package/dist/index.js.map +7 -0
- package/dist/utils/errors.d.ts +22 -0
- package/dist/utils/http.d.ts +10 -0
- package/dist/utils/logger.d.ts +15 -0
- package/dist/utils/platform.d.ts +8 -0
- package/package.json +62 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ConfigStore } from "../config/config-store";
|
|
2
|
+
export interface GuardCheckResult {
|
|
3
|
+
allowed: boolean;
|
|
4
|
+
expectedEmail: string | null;
|
|
5
|
+
currentEmail: string | null;
|
|
6
|
+
message?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class IdentityGuard {
|
|
9
|
+
private store;
|
|
10
|
+
private resolver;
|
|
11
|
+
constructor(store: ConfigStore);
|
|
12
|
+
check(cwd?: string): Promise<GuardCheckResult>;
|
|
13
|
+
isInstalled(repoPath: string): boolean;
|
|
14
|
+
install(repoPath: string): Promise<boolean>;
|
|
15
|
+
uninstall(repoPath: string): Promise<boolean>;
|
|
16
|
+
installPreCommitHook(repoPath: string): Promise<boolean>;
|
|
17
|
+
uninstallPreCommitHook(repoPath: string): Promise<boolean>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ConfigStore } from "../config/config-store";
|
|
2
|
+
export declare const SSH_BLOCK_START = "# --- BEGIN GITBRIDGE MANAGED BLOCK ---";
|
|
3
|
+
export declare const SSH_BLOCK_END = "# --- END GITBRIDGE MANAGED BLOCK ---";
|
|
4
|
+
export declare class SshInjector {
|
|
5
|
+
private store;
|
|
6
|
+
constructor(store: ConfigStore);
|
|
7
|
+
isInstalled(targetFile?: string): boolean;
|
|
8
|
+
private createBackup;
|
|
9
|
+
inject(targetFile?: string): {
|
|
10
|
+
success: boolean;
|
|
11
|
+
backupPath: string | null;
|
|
12
|
+
};
|
|
13
|
+
remove(targetFile?: string): boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface CredentialStore {
|
|
2
|
+
readonly name: string;
|
|
3
|
+
isAvailable(): Promise<boolean>;
|
|
4
|
+
set(service: string, account: string, secret: string): Promise<void>;
|
|
5
|
+
get(service: string, account: string): Promise<string | null>;
|
|
6
|
+
delete(service: string, account: string): Promise<void>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CredentialStore } from "./credential-store";
|
|
2
|
+
import type { PathResolver } from "../config/path-resolver";
|
|
3
|
+
export declare class EncryptedVaultCredentialStore implements CredentialStore {
|
|
4
|
+
readonly name = "Encrypted Vault (AES-256-GCM)";
|
|
5
|
+
private paths;
|
|
6
|
+
constructor(paths: PathResolver);
|
|
7
|
+
isAvailable(): Promise<boolean>;
|
|
8
|
+
private getMachineSecret;
|
|
9
|
+
private deriveKey;
|
|
10
|
+
private readVault;
|
|
11
|
+
private writeVault;
|
|
12
|
+
private makeKey;
|
|
13
|
+
set(service: string, account: string, secret: string): Promise<void>;
|
|
14
|
+
get(service: string, account: string): Promise<string | null>;
|
|
15
|
+
delete(service: string, account: string): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CredentialStore } from "./credential-store";
|
|
2
|
+
export declare class LinuxKeyringCredentialStore implements CredentialStore {
|
|
3
|
+
readonly name = "Linux Secret Service (secret-tool)";
|
|
4
|
+
isAvailable(): Promise<boolean>;
|
|
5
|
+
set(service: string, account: string, secret: string): Promise<void>;
|
|
6
|
+
get(service: string, account: string): Promise<string | null>;
|
|
7
|
+
delete(service: string, account: string): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CredentialStore } from "./credential-store";
|
|
2
|
+
export declare class MacOSKeychainCredentialStore implements CredentialStore {
|
|
3
|
+
readonly name = "macOS Keychain";
|
|
4
|
+
isAvailable(): Promise<boolean>;
|
|
5
|
+
set(service: string, account: string, secret: string): Promise<void>;
|
|
6
|
+
get(service: string, account: string): Promise<string | null>;
|
|
7
|
+
delete(service: string, account: string): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CredentialStore } from "./credential-store";
|
|
2
|
+
export declare class WindowsCredentialStore implements CredentialStore {
|
|
3
|
+
readonly name = "Windows Credential Manager";
|
|
4
|
+
isAvailable(): Promise<boolean>;
|
|
5
|
+
private targetName;
|
|
6
|
+
set(service: string, account: string, secret: string): Promise<void>;
|
|
7
|
+
get(service: string, account: string): Promise<string | null>;
|
|
8
|
+
delete(service: string, account: string): Promise<void>;
|
|
9
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from "./core/config/schema";
|
|
2
|
+
export * from "./core/config/config-store";
|
|
3
|
+
export * from "./core/config/path-resolver";
|
|
4
|
+
export * from "./core/git/git-cli";
|
|
5
|
+
export * from "./core/git/url-parser";
|
|
6
|
+
export * from "./core/git/config-generator";
|
|
7
|
+
export * from "./core/git/gitconfig-injector";
|
|
8
|
+
export * from "./core/ssh/ssh-config-generator";
|
|
9
|
+
export * from "./core/ssh/ssh-injector";
|
|
10
|
+
export * from "./core/ssh/ssh-key-detector";
|
|
11
|
+
export * from "./core/identity/identity-resolver";
|
|
12
|
+
export * from "./core/providers/provider.interface";
|
|
13
|
+
export * from "./core/providers/provider-registry";
|
|
14
|
+
export * from "./core/providers/github.provider";
|
|
15
|
+
export * from "./core/providers/gitlab.provider";
|
|
16
|
+
export * from "./core/providers/bitbucket.provider";
|
|
17
|
+
export * from "./core/storage/credential-store";
|
|
18
|
+
export * from "./core/storage/store-factory";
|
|
19
|
+
export * from "./core/safety/identity-guard";
|
|
20
|
+
export * from "./cli";
|