fix #7717
This commit is contained in:
parent
e3460de331
commit
efed6b32c5
@ -994,6 +994,9 @@ export interface ExchangeDetailedResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface WalletCoreVersion {
|
export interface WalletCoreVersion {
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
hash: string | undefined;
|
hash: string | undefined;
|
||||||
version: string;
|
version: string;
|
||||||
exchange: string;
|
exchange: string;
|
||||||
|
1
packages/taler-wallet-core/.gitignore
vendored
1
packages/taler-wallet-core/.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
/lib
|
/lib
|
||||||
/coverage
|
/coverage
|
||||||
|
/src/version.json
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
"author": "Florian Dold",
|
"author": "Florian Dold",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"compile": "tsc --build",
|
"compile": "jq '{version}' package.json > src/version.json && tsc --build",
|
||||||
"pretty": "prettier --write src",
|
"pretty": "prettier --write src",
|
||||||
"test": "tsc && ava",
|
"test": "tsc && ava",
|
||||||
"coverage": "tsc && c8 --src src --all ava",
|
"coverage": "tsc && c8 --src src --all ava",
|
||||||
|
@ -310,6 +310,7 @@ import {
|
|||||||
WalletCoreApiClient,
|
WalletCoreApiClient,
|
||||||
WalletCoreResponseType,
|
WalletCoreResponseType,
|
||||||
} from "./wallet-api-types.js";
|
} from "./wallet-api-types.js";
|
||||||
|
import versionInfo from "./version.json" assert { type: 'json' };
|
||||||
|
|
||||||
const logger = new Logger("wallet.ts");
|
const logger = new Logger("wallet.ts");
|
||||||
|
|
||||||
@ -1016,12 +1017,6 @@ export async function getClientFromWalletState(
|
|||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare const __VERSION__: string;
|
|
||||||
declare const __GIT_HASH__: string;
|
|
||||||
|
|
||||||
const VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : "dev";
|
|
||||||
const GIT_HASH = typeof __GIT_HASH__ !== "undefined" ? __GIT_HASH__ : undefined;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of the "wallet-core" API.
|
* Implementation of the "wallet-core" API.
|
||||||
*/
|
*/
|
||||||
@ -1590,15 +1585,15 @@ async function dispatchRequestInternal<Op extends WalletApiOperation>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getVersion(ws: InternalWalletState): WalletCoreVersion {
|
export function getVersion(ws: InternalWalletState): WalletCoreVersion {
|
||||||
const version: WalletCoreVersion = {
|
const result: WalletCoreVersion = {
|
||||||
hash: GIT_HASH,
|
hash: undefined,
|
||||||
version: VERSION,
|
version: versionInfo.version,
|
||||||
exchange: WALLET_EXCHANGE_PROTOCOL_VERSION,
|
exchange: WALLET_EXCHANGE_PROTOCOL_VERSION,
|
||||||
merchant: WALLET_MERCHANT_PROTOCOL_VERSION,
|
merchant: WALLET_MERCHANT_PROTOCOL_VERSION,
|
||||||
bank: WALLET_BANK_INTEGRATION_PROTOCOL_VERSION,
|
bank: WALLET_BANK_INTEGRATION_PROTOCOL_VERSION,
|
||||||
devMode: false,
|
devMode: false,
|
||||||
};
|
};
|
||||||
return version;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,8 +7,10 @@
|
|||||||
"target": "ES2017",
|
"target": "ES2017",
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"moduleResolution": "Node16",
|
"moduleResolution": "Node16",
|
||||||
|
"resolveJsonModule": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"lib": ["es6"],
|
"lib": ["es6"],
|
||||||
|
"resolvePackageJsonImports": true,
|
||||||
"types": ["node"],
|
"types": ["node"],
|
||||||
"noImplicitReturns": true,
|
"noImplicitReturns": true,
|
||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
@ -31,5 +33,8 @@
|
|||||||
"path": "../taler-util/"
|
"path": "../taler-util/"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"include": ["src/**/*"]
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"src/*.json"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
lockfileVersion: '6.0'
|
lockfileVersion: '6.1'
|
||||||
|
|
||||||
settings:
|
settings:
|
||||||
autoInstallPeers: true
|
autoInstallPeers: true
|
||||||
|
Loading…
Reference in New Issue
Block a user