diff options
author | Florian Dold <florian@dold.me> | 2024-01-23 22:29:21 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-01-23 22:29:21 +0100 |
commit | 937d9204e6c66bdc13e7b770a125d008bdfc6587 (patch) | |
tree | f41be3147e18011122e315a1fe4f198facd2f9e8 /packages/taler-wallet-core/src/versions.ts | |
parent | 7e7306ec4585c5fd7a2ceb727177e7d249ae6031 (diff) | |
download | wallet-core-937d9204e6c66bdc13e7b770a125d008bdfc6587.tar.gz wallet-core-937d9204e6c66bdc13e7b770a125d008bdfc6587.tar.bz2 wallet-core-937d9204e6c66bdc13e7b770a125d008bdfc6587.zip |
wallet-core: expose build version info via request
Diffstat (limited to 'packages/taler-wallet-core/src/versions.ts')
-rw-r--r-- | packages/taler-wallet-core/src/versions.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/versions.ts b/packages/taler-wallet-core/src/versions.ts index 023cbb1ff..bf8a9f7c8 100644 --- a/packages/taler-wallet-core/src/versions.ts +++ b/packages/taler-wallet-core/src/versions.ts @@ -68,3 +68,19 @@ export const WALLET_CORE_API_IMPLEMENTATION_VERSION = "3:0:2"; * If any interfaces have been removed or changed since the last public * release, then set age to 0. */ + +// Provided either by bundler or in the next lines. +declare global { + const walletCoreBuildInfo: { + implementationSemver: string; + implementationGitHash: string; + }; +} + +// Provide walletCoreBuildInfo if the bundler does not override it. +if (!("walletCoreBuildInfo" in globalThis)) { + (globalThis as any).walletCoreBuildInfo = { + implementationSemver: "unknown", + implementationGitHash: "unknown", + } satisfies typeof walletCoreBuildInfo; +} |