Skip to content

Commit

Permalink
fix: replace kbpgp with fork (#28604)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Apr 23, 2024
1 parent 5c0628b commit 01d4d0d
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 50 deletions.
27 changes: 1 addition & 26 deletions lib/config/decrypt/kbpgp.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,7 @@
import kbpgp from 'kbpgp';
import * as kbpgp from '@renovatebot/kbpgp';
import { logger } from '../../logger';
import { regEx } from '../../util/regex';

declare module 'kbpgp' {
export class KeyManager {
static import_from_armored_pgp(
opts: { armored: string },
cb: (err: Error, pk: KeyManager) => void,
): void;
}

// eslint-disable-next-line @typescript-eslint/no-namespace
export namespace keyring {
export class KeyRing {
add_key_manager(pk: KeyManager): void;
}
}

export class Literal {
toString(): string;
}

export function unbox(
opts: { keyfetch: keyring.KeyRing; armored: string },
cb: (err: Error, literals: Literal[]) => void,
): void;
}

export async function tryDecryptKbPgp(
privateKey: string,
encryptedStr: string,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
"@opentelemetry/sdk-trace-node": "1.23.0",
"@opentelemetry/semantic-conventions": "1.23.0",
"@qnighy/marshal": "0.1.3",
"@renovatebot/kbpgp": "3.0.1",
"@renovatebot/osv-offline": "1.5.4",
"@renovatebot/pep440": "3.0.20",
"@renovatebot/ruby-semver": "3.0.23",
Expand Down Expand Up @@ -212,7 +213,6 @@
"json-stringify-pretty-compact": "3.0.0",
"json5": "2.2.3",
"jsonata": "2.0.4",
"kbpgp": "2.1.15",
"klona": "2.0.6",
"lru-cache": "10.2.0",
"luxon": "3.4.4",
Expand Down
127 changes: 104 additions & 23 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 01d4d0d

Please sign in to comment.