Skip to content

feat(signatures): allow using alternate google-kms client implementation#45

Merged
Mythie merged 1 commit intoLibPDF-js:mainfrom
CloudRaker:feat/google-kms-alternate-client
Mar 6, 2026
Merged

feat(signatures): allow using alternate google-kms client implementation#45
Mythie merged 1 commit intoLibPDF-js:mainfrom
CloudRaker:feat/google-kms-alternate-client

Conversation

@beaulac
Copy link
Contributor

@beaulac beaulac commented Mar 5, 2026

google-cloud-node libraries are a notorious pain to use on serverless runtimes (e.g. CloudFlare Workers).

Importing @google-cloud/kms regardless of whether the client was provided or not brings in the whole google-cloud ecosystem which fails at dynamic-import-time due to various runtime incompatibility reasons (in our case, google-gax relying on __dirname).

This small change adds flexibility by

  • only importing google-cloud libraries if the client was not provided
  • narrowing the interface required for the client passed to the Signer, so that alternate client implementations don't need to stub unused methods

@vercel
Copy link
Contributor

vercel bot commented Mar 5, 2026

@beaulac is attempting to deploy a commit to the mythie's projects Team on Vercel.

A member of the Team first needs to authorize it.

@beaulac beaulac changed the title feat: allow using alternate google-kms client implementation feat(signatures): allow using alternate google-kms client implementation Mar 5, 2026
@Mythie
Copy link
Contributor

Mythie commented Mar 6, 2026

LGTM

@Mythie Mythie merged commit f8891ba into LibPDF-js:main Mar 6, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants