From a60a1d867cfe6a12f1e6fadfa037f022e9385107 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 5 Sep 2023 10:46:06 +0200 Subject: harness: remove deprecated testing APIs --- packages/taler-harness/src/harness/helpers.ts | 326 +++----------------------- 1 file changed, 35 insertions(+), 291 deletions(-) (limited to 'packages/taler-harness/src/harness/helpers.ts') diff --git a/packages/taler-harness/src/harness/helpers.ts b/packages/taler-harness/src/harness/helpers.ts index d1d0ea104..39d411a46 100644 --- a/packages/taler-harness/src/harness/helpers.ts +++ b/packages/taler-harness/src/harness/helpers.ts @@ -53,6 +53,7 @@ import { FakebankService, getPayto, GlobalTestState, + MerchantApiClient, MerchantPrivateApi, MerchantService, MerchantServiceInterface, @@ -107,114 +108,6 @@ export interface EnvOptions { additionalBankConfig?(b: BankService): void; } -/** - * Run a test case with a simple TESTKUDOS Taler environment, consisting - * of one exchange, one bank and one merchant. - * - * @deprecated use {@link createSimpleTestkudosEnvironmentV2} instead - */ -export async function createSimpleTestkudosEnvironment( - t: GlobalTestState, - coinConfig: CoinConfig[] = defaultCoinConfig.map((x) => x("TESTKUDOS")), - opts: EnvOptions = {}, -): Promise { - const db = await setupDb(t); - - const bank = await BankService.create(t, { - allowRegistrations: true, - currency: "TESTKUDOS", - database: db.connStr, - httpPort: 8082, - }); - - const exchange = ExchangeService.create(t, { - name: "testexchange-1", - currency: "TESTKUDOS", - httpPort: 8081, - database: db.connStr, - }); - - const merchant = await MerchantService.create(t, { - name: "testmerchant-1", - currency: "TESTKUDOS", - httpPort: 8083, - database: db.connStr, - }); - - const exchangeBankAccount = await bank.createExchangeAccount( - "myexchange", - "x", - ); - await exchange.addBankAccount("1", exchangeBankAccount); - - bank.setSuggestedExchange(exchange, exchangeBankAccount.accountPaytoUri); - - await bank.start(); - - await bank.pingUntilAvailable(); - - const ageMaskSpec = opts.ageMaskSpec; - - if (ageMaskSpec) { - exchange.enableAgeRestrictions(ageMaskSpec); - // Enable age restriction for all coins. - exchange.addCoinConfigList( - coinConfig.map((x) => ({ - ...x, - name: `${x.name}-age`, - ageRestricted: true, - })), - ); - // For mixed age restrictions, we also offer coins without age restrictions - if (opts.mixedAgeRestriction) { - exchange.addCoinConfigList( - coinConfig.map((x) => ({ ...x, ageRestricted: false })), - ); - } - } else { - exchange.addCoinConfigList(coinConfig); - } - - await exchange.start(); - await exchange.pingUntilAvailable(); - - merchant.addExchange(exchange); - - await merchant.start(); - await merchant.pingUntilAvailable(); - - await merchant.addInstance({ - id: "default", - name: "Default Instance", - paytoUris: [getPayto("merchant-default")], - defaultWireTransferDelay: Duration.toTalerProtocolDuration( - Duration.fromSpec({ minutes: 1 }), - ), - }); - - await merchant.addInstance({ - id: "minst1", - name: "minst1", - paytoUris: [getPayto("minst1")], - defaultWireTransferDelay: Duration.toTalerProtocolDuration( - Duration.fromSpec({ minutes: 1 }), - ), - }); - - console.log("setup done!"); - - const wallet = new WalletCli(t); - - return { - commonDb: db, - exchange, - merchant, - wallet, - bank, - exchangeBankAccount, - }; -} - export function getSharedTestDir(): string { return `/tmp/taler-harness@${process.env.USER}`; } @@ -344,7 +237,7 @@ export async function useSharedTestkudosEnvironment(t: GlobalTestState) { await merchant.pingUntilAvailable(); if (!prevSetupDone) { - await merchant.addInstance({ + await merchant.addInstanceWithWireAccount({ id: "default", name: "Default Instance", paytoUris: [getPayto("merchant-default")], @@ -353,7 +246,7 @@ export async function useSharedTestkudosEnvironment(t: GlobalTestState) { ), }); - await merchant.addInstance({ + await merchant.addInstanceWithWireAccount({ id: "minst1", name: "minst1", paytoUris: [getPayto("minst1")], @@ -476,7 +369,7 @@ export async function createSimpleTestkudosEnvironmentV2( await merchant.start(); await merchant.pingUntilAvailable(); - await merchant.addInstance({ + await merchant.addInstanceWithWireAccount({ id: "default", name: "Default Instance", paytoUris: [getPayto("merchant-default")], @@ -485,7 +378,7 @@ export async function createSimpleTestkudosEnvironmentV2( ), }); - await merchant.addInstance({ + await merchant.addInstanceWithWireAccount({ id: "minst1", name: "minst1", paytoUris: [getPayto("minst1")], @@ -554,7 +447,7 @@ export interface FaultyMerchantTestEnvironment { exchangeBankAccount: HarnessExchangeBankAccount; merchant: MerchantService; faultyMerchant: FaultInjectedMerchantService; - wallet: WalletCli; + walletClient: WalletClient; } /** @@ -620,13 +513,13 @@ export async function createFaultInjectedMerchantTestkudosEnvironment( await merchant.start(); await merchant.pingUntilAvailable(); - await merchant.addInstance({ + await merchant.addInstanceWithWireAccount({ id: "default", name: "Default Instance", paytoUris: [getPayto("merchant-default")], }); - await merchant.addInstance({ + await merchant.addInstanceWithWireAccount({ id: "minst1", name: "minst1", paytoUris: [getPayto("minst1")], @@ -634,13 +527,15 @@ export async function createFaultInjectedMerchantTestkudosEnvironment( console.log("setup done!"); - const wallet = new WalletCli(t); + const { walletClient } = await createWalletDaemonWithClient(t, { + name: "default", + }); return { commonDb: db, exchange, merchant, - wallet, + walletClient, bank, exchangeBankAccount, faultyMerchant, @@ -648,51 +543,6 @@ export async function createFaultInjectedMerchantTestkudosEnvironment( }; } -/** - * Start withdrawing into the wallet. - * - * Only starts the operation, does not wait for it to finish. - */ -export async function startWithdrawViaBank( - t: GlobalTestState, - p: { - wallet: WalletCli; - bank: BankService; - exchange: ExchangeServiceInterface; - amount: AmountString; - restrictAge?: number; - }, -): Promise { - const { wallet, bank, exchange, amount } = p; - - const user = await BankApi.createRandomBankUser(bank); - const wop = await BankAccessApi.createWithdrawalOperation(bank, user, amount); - - // Hand it to the wallet - - await wallet.client.call(WalletApiOperation.GetWithdrawalDetailsForUri, { - talerWithdrawUri: wop.taler_withdraw_uri, - restrictAge: p.restrictAge, - }); - - await wallet.runPending(); - - // Withdraw (AKA select) - - await wallet.client.call(WalletApiOperation.AcceptBankIntegratedWithdrawal, { - exchangeBaseUrl: exchange.baseUrl, - talerWithdrawUri: wop.taler_withdraw_uri, - restrictAge: p.restrictAge, - }); - - // Confirm it - - await BankApi.confirmWithdrawalOperation(bank, user, wop); - - // We do *not* call runPending / runUntilDone on the wallet here. - // Some tests rely on the final withdraw failing. -} - export interface WithdrawViaBankResult { withdrawalFinishedCond: Promise; } @@ -751,131 +601,35 @@ export async function withdrawViaBankV2( }; } -/** - * Withdraw balance. - * - * @deprecated use {@link withdrawViaBankV2 instead} - */ -export async function withdrawViaBank( - t: GlobalTestState, - p: { - wallet: WalletCli; - bank: BankService; - exchange: ExchangeServiceInterface; - amount: AmountString; - restrictAge?: number; - }, -): Promise { - const { wallet } = p; - - await startWithdrawViaBank(t, p); - - await wallet.runUntilDone(); - - // Check balance - - await wallet.client.call(WalletApiOperation.GetBalances, {}); -} - -export async function applyTimeTravel( - timetravelDuration: Duration, +export async function applyTimeTravelV2( + timetravelOffsetMs: number, s: { exchange?: ExchangeService; merchant?: MerchantService; - wallet?: WalletCli; + walletClient?: WalletClient; }, ): Promise { if (s.exchange) { await s.exchange.stop(); - s.exchange.setTimetravel(timetravelDuration); + s.exchange.setTimetravel(timetravelOffsetMs); await s.exchange.start(); await s.exchange.pingUntilAvailable(); } if (s.merchant) { await s.merchant.stop(); - s.merchant.setTimetravel(timetravelDuration); + s.merchant.setTimetravel(timetravelOffsetMs); await s.merchant.start(); await s.merchant.pingUntilAvailable(); } - if (s.wallet) { - s.wallet.setTimetravel(timetravelDuration); + if (s.walletClient) { + s.walletClient.call(WalletApiOperation.TestingSetTimetravel, { + offsetMs: timetravelOffsetMs, + }); } } -/** - * Make a simple payment and check that it succeeded. - * - * @deprecated - */ -export async function makeTestPayment( - t: GlobalTestState, - args: { - merchant: MerchantServiceInterface; - wallet: WalletCli; - order: Partial; - instance?: string; - }, - auth: WithAuthorization = {}, -): Promise { - // Set up order. - - const { wallet, merchant } = args; - const instance = args.instance ?? "default"; - - const orderResp = await MerchantPrivateApi.createOrder( - merchant, - instance, - { - order: args.order, - }, - auth, - ); - - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus( - merchant, - { - orderId: orderResp.order_id, - }, - auth, - ); - - t.assertTrue(orderStatus.order_status === "unpaid"); - - // Make wallet pay for the order - - const preparePayResult = await wallet.client.call( - WalletApiOperation.PreparePayForUri, - { - talerPayUri: orderStatus.taler_pay_uri, - }, - ); - - t.assertTrue( - preparePayResult.status === PreparePayResultType.PaymentPossible, - ); - - const r2 = await wallet.client.call(WalletApiOperation.ConfirmPay, { - proposalId: preparePayResult.proposalId, - }); - - t.assertTrue(r2.type === ConfirmPayResultType.Done); - - // Check if payment was successful. - - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus( - merchant, - { - orderId: orderResp.order_id, - instance, - }, - auth, - ); - - t.assertTrue(orderStatus.order_status === "paid"); -} - /** * Make a simple payment and check that it succeeded. */ @@ -891,25 +645,19 @@ export async function makeTestPaymentV2( ): Promise { // Set up order. - const { walletClient, merchant } = args; - const instance = args.instance ?? "default"; + const { walletClient, merchant, instance } = args; - const orderResp = await MerchantPrivateApi.createOrder( - merchant, - instance, - { - order: args.order, - }, - auth, + const merchantClient = new MerchantApiClient( + merchant.makeInstanceBaseUrl(instance), ); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus( - merchant, - { - orderId: orderResp.order_id, - }, - auth, - ); + const orderResp = await merchantClient.createOrder({ + order: args.order, + }); + + let orderStatus = await merchantClient.queryPrivateOrderStatus({ + orderId: orderResp.order_id, + }); t.assertTrue(orderStatus.order_status === "unpaid"); @@ -934,14 +682,10 @@ export async function makeTestPaymentV2( // Check if payment was successful. - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus( - merchant, - { - orderId: orderResp.order_id, - instance, - }, - auth, - ); + orderStatus = await merchantClient.queryPrivateOrderStatus({ + orderId: orderResp.order_id, + instance, + }); t.assertTrue(orderStatus.order_status === "paid"); } -- cgit v1.2.3 From 49b0f5337c27c5da3e85c512de72e6903e928bc8 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 5 Sep 2023 11:35:06 +0200 Subject: harness: check expected balance in test-pay-expired --- packages/taler-harness/src/harness/harness.ts | 6 ++++- packages/taler-harness/src/harness/helpers.ts | 2 +- .../src/integrationtests/test-payment-expired.ts | 30 ++++++++++++++++++++++ packages/taler-wallet-core/src/remote.ts | 1 + packages/taler-wallet-core/src/wallet.ts | 1 + 5 files changed, 38 insertions(+), 2 deletions(-) (limited to 'packages/taler-harness/src/harness/helpers.ts') diff --git a/packages/taler-harness/src/harness/harness.ts b/packages/taler-harness/src/harness/harness.ts index b5197afd7..7c54c0c47 100644 --- a/packages/taler-harness/src/harness/harness.ts +++ b/packages/taler-harness/src/harness/harness.ts @@ -384,7 +384,11 @@ export class GlobalTestState { logger.warn(`could not start process (${command})`, err); }); proc.on("exit", (code, signal) => { - logger.warn(`process ${logName} exited ${j2s({ code, signal })}`); + if (code == 0 && signal == null) { + logger.info(`process ${logName} exited with success`); + } else { + logger.warn(`process ${logName} exited ${j2s({ code, signal })}`); + } }); const stderrLogFileName = this.testDir + `/${logName}-stderr.log`; const stderrLog = fs.createWriteStream(stderrLogFileName, { diff --git a/packages/taler-harness/src/harness/helpers.ts b/packages/taler-harness/src/harness/helpers.ts index 39d411a46..ece003e1b 100644 --- a/packages/taler-harness/src/harness/helpers.ts +++ b/packages/taler-harness/src/harness/helpers.ts @@ -624,7 +624,7 @@ export async function applyTimeTravelV2( } if (s.walletClient) { - s.walletClient.call(WalletApiOperation.TestingSetTimetravel, { + await s.walletClient.call(WalletApiOperation.TestingSetTimetravel, { offsetMs: timetravelOffsetMs, }); } diff --git a/packages/taler-harness/src/integrationtests/test-payment-expired.ts b/packages/taler-harness/src/integrationtests/test-payment-expired.ts index e4034108f..4817efba5 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-expired.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-expired.ts @@ -20,14 +20,17 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; import { + applyTimeTravelV2, createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, } from "../harness/helpers.js"; import { AbsoluteTime, + ConfirmPayResultType, Duration, MerchantContractTerms, PreparePayResultType, + j2s, } from "@gnu-taler/taler-util"; /** @@ -95,6 +98,33 @@ export async function runPaymentExpiredTest(t: GlobalTestState) { preparePayResult.status, PreparePayResultType.PaymentPossible, ); + + await applyTimeTravelV2( + Duration.toMilliseconds(Duration.fromSpec({ hours: 1 })), + { walletClient, exchange, merchant }, + ); + + const confirmPayResult = await walletClient.call( + WalletApiOperation.ConfirmPay, + { transactionId: preparePayResult.transactionId }, + ); + console.log("confirm pay result:"); + console.log(j2s(confirmPayResult)); + t.assertDeepEqual(confirmPayResult.type, ConfirmPayResultType.Pending); + await walletClient.call(WalletApiOperation.AbortTransaction, { + transactionId: preparePayResult.transactionId, + }); + await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {}); + + const bal = await walletClient.call(WalletApiOperation.GetBalances, {}); + console.log(bal); + + t.assertAmountEquals(bal.balances[0].available, "TESTKUDOS:18.93"); + + const txns = await walletClient.call(WalletApiOperation.GetTransactions, { + includeRefreshes: true, + }); + console.log(j2s(txns)); } runPaymentExpiredTest.suites = ["wallet"]; diff --git a/packages/taler-wallet-core/src/remote.ts b/packages/taler-wallet-core/src/remote.ts index 89348698e..164f7cfe9 100644 --- a/packages/taler-wallet-core/src/remote.ts +++ b/packages/taler-wallet-core/src/remote.ts @@ -65,6 +65,7 @@ export async function createRemoteWallet( const ctx: RemoteWallet = { makeCoreApiRequest(operation, payload) { const id = `req-${nextRequestId}`; + nextRequestId += 1; const req: CoreApiRequestEnvelope = { operation, id, diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 4194ab9eb..f42365c00 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -1680,6 +1680,7 @@ async function dispatchRequestInternal( const req = codecForTestingSetTimetravelRequest().decode(payload); setDangerousTimetravel(req.offsetMs); ws.workAvailable.trigger(); + return {}; } // default: // assertUnreachable(operation); -- cgit v1.2.3 From 9a1a3b350d4147243dbe2ecfcdcb846c0f3c6dcb Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 6 Sep 2023 11:23:33 +0200 Subject: harness: get rid of deprecated merchant API client --- packages/taler-harness/src/harness/harness.ts | 143 ++++++--------------- packages/taler-harness/src/harness/helpers.ts | 1 - .../test-age-restrictions-merchant.ts | 4 +- .../src/integrationtests/test-claim-loop.ts | 27 ++-- .../src/integrationtests/test-denom-unoffered.ts | 11 +- .../test-merchant-exchange-confusion.ts | 18 ++- .../integrationtests/test-merchant-longpolling.ts | 25 +++- .../integrationtests/test-merchant-refund-api.ts | 32 ++--- .../test-merchant-spec-public-orders.ts | 45 +++---- .../src/integrationtests/test-pay-paid.ts | 32 ++--- .../src/integrationtests/test-payment-abort.ts | 8 +- .../src/integrationtests/test-payment-claim.ts | 14 +- .../src/integrationtests/test-payment-fault.ts | 10 +- .../integrationtests/test-payment-idempotency.ts | 10 +- .../src/integrationtests/test-payment-multiple.ts | 11 +- .../src/integrationtests/test-payment-share.ts | 28 ++-- .../src/integrationtests/test-payment-template.ts | 32 +++-- .../src/integrationtests/test-payment-transient.ts | 20 ++- .../src/integrationtests/test-paywall-flow.ts | 26 ++-- .../src/integrationtests/test-refund-auto.ts | 12 +- .../src/integrationtests/test-refund-gone.ts | 14 +- .../integrationtests/test-refund-incremental.ts | 18 +-- .../src/integrationtests/test-refund.ts | 12 +- .../test-timetravel-autorefresh.ts | 58 +++++---- .../src/integrationtests/test-tipping.ts | 12 +- .../test-wallet-backup-doublespend.ts | 9 +- .../src/integrationtests/test-wallet-balance.ts | 8 +- 27 files changed, 306 insertions(+), 334 deletions(-) (limited to 'packages/taler-harness/src/harness/helpers.ts') diff --git a/packages/taler-harness/src/harness/harness.ts b/packages/taler-harness/src/harness/harness.ts index 99151b219..a16cef7ba 100644 --- a/packages/taler-harness/src/harness/harness.ts +++ b/packages/taler-harness/src/harness/harness.ts @@ -1364,6 +1364,9 @@ export const harnessHttpLib = createPlatformHttpLib({ enableThrottling: false, }); +/** + * FIXME: Move this out of the harness. + */ export class MerchantApiClient { /** * Base URL for the particular instance that this merchant API client @@ -1513,95 +1516,32 @@ export class MerchantApiClient { ); } - private makeAuthHeader(): Record { - switch (this.auth.method) { - case "external": - return {}; - case "token": - return { - Authorization: `Bearer ${this.auth.token}`, - }; - } - } -} - -/** - * FIXME: This should be deprecated in favor of MerchantApiClient - * - * @deprecated use MerchantApiClient instead - */ -export namespace MerchantPrivateApi { - export async function createOrder( - merchantService: MerchantServiceInterface, - instanceName: string, - req: MerchantPostOrderRequest, - withAuthorization: WithAuthorization = {}, - ): Promise { - const baseUrl = merchantService.makeInstanceBaseUrl(instanceName); - let url = new URL("private/orders", baseUrl); - const resp = await harnessHttpLib.fetch(url.href, { - method: "POST", - body: req, - headers: withAuthorization as Record, - }); - return readSuccessResponseJsonOrThrow( - resp, - codecForMerchantPostOrderResponse(), - ); - } - - export async function createTemplate( - merchantService: MerchantServiceInterface, - instanceName: string, - req: MerchantTemplateAddDetails, - withAuthorization: WithAuthorization = {}, - ) { - const baseUrl = merchantService.makeInstanceBaseUrl(instanceName); - let url = new URL("private/templates", baseUrl); - const resp = await harnessHttpLib.fetch(url.href, { + async giveTip(req: RewardCreateRequest): Promise { + const reqUrl = new URL(`private/tips`, this.baseUrl); + const resp = await harnessHttpLib.fetch(reqUrl.href, { method: "POST", body: req, - headers: withAuthorization as Record, }); - if (resp.status !== 204) { - throw Error("failed to create template"); - } + // FIXME: validate + return resp.json(); } - export async function queryPrivateOrderStatus( - merchantService: MerchantServiceInterface, - query: PrivateOrderStatusQuery, - withAuthorization: WithAuthorization = {}, - ): Promise { - const reqUrl = new URL( - `private/orders/${query.orderId}`, - merchantService.makeInstanceBaseUrl(query.instance), - ); - if (query.sessionId) { - reqUrl.searchParams.set("session_id", query.sessionId); - } + async queryTippingReserves(): Promise { + const reqUrl = new URL(`private/reserves`, this.baseUrl); const resp = await harnessHttpLib.fetch(reqUrl.href, { - headers: withAuthorization as Record, + headers: this.makeAuthHeader(), }); - return readSuccessResponseJsonOrThrow( - resp, - codecForMerchantOrderPrivateStatusResponse(), - ); + // FIXME: validate + return resp.json(); } - export async function giveRefund( - merchantService: MerchantServiceInterface, - r: { - instance: string; - orderId: string; - amount: string; - justification: string; - }, - ): Promise<{ talerRefundUri: string }> { - const reqUrl = new URL( - `private/orders/${r.orderId}/refund`, - merchantService.makeInstanceBaseUrl(r.instance), - ); + async giveRefund(r: { + instance: string; + orderId: string; + amount: string; + justification: string; + }): Promise<{ talerRefundUri: string }> { + const reqUrl = new URL(`private/orders/${r.orderId}/refund`, this.baseUrl); const resp = await harnessHttpLib.fetch(reqUrl.href, { method: "POST", body: { @@ -1615,34 +1555,27 @@ export namespace MerchantPrivateApi { }; } - export async function queryTippingReserves( - merchantService: MerchantServiceInterface, - instance: string, - ): Promise { - const reqUrl = new URL( - `private/reserves`, - merchantService.makeInstanceBaseUrl(instance), - ); - const resp = await harnessHttpLib.fetch(reqUrl.href); - // FIXME: validate - return resp.json(); - } - - export async function giveTip( - merchantService: MerchantServiceInterface, - instance: string, - req: RewardCreateRequest, - ): Promise { - const reqUrl = new URL( - `private/tips`, - merchantService.makeInstanceBaseUrl(instance), - ); - const resp = await harnessHttpLib.fetch(reqUrl.href, { + async createTemplate(req: MerchantTemplateAddDetails) { + let url = new URL("private/templates", this.baseUrl); + const resp = await harnessHttpLib.fetch(url.href, { method: "POST", body: req, + headers: this.makeAuthHeader(), }); - // FIXME: validate - return resp.json(); + if (resp.status !== 204) { + throw Error("failed to create template"); + } + } + + private makeAuthHeader(): Record { + switch (this.auth.method) { + case "external": + return {}; + case "token": + return { + Authorization: `Bearer ${this.auth.token}`, + }; + } } } diff --git a/packages/taler-harness/src/harness/helpers.ts b/packages/taler-harness/src/harness/helpers.ts index ece003e1b..485e1baba 100644 --- a/packages/taler-harness/src/harness/helpers.ts +++ b/packages/taler-harness/src/harness/helpers.ts @@ -54,7 +54,6 @@ import { getPayto, GlobalTestState, MerchantApiClient, - MerchantPrivateApi, MerchantService, MerchantServiceInterface, setupDb, diff --git a/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts index 3072badc0..45a035cc4 100644 --- a/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts +++ b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts @@ -27,8 +27,6 @@ import { getWireMethodForTest, GlobalTestState, MerchantApiClient, - MerchantPrivateApi, - WalletCli, } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, @@ -214,7 +212,7 @@ export async function runAgeRestrictionsMerchantTest(t: GlobalTestState) { await exchange.runWirewatchOnce(); - const tip = await MerchantPrivateApi.giveTip(merchant, "default", { + const tip = await merchantClient.giveTip({ amount: "TESTKUDOS:5", justification: "why not?", next_url: "https://example.com/after-tip", diff --git a/packages/taler-harness/src/integrationtests/test-claim-loop.ts b/packages/taler-harness/src/integrationtests/test-claim-loop.ts index 32706c28b..52841dbab 100644 --- a/packages/taler-harness/src/integrationtests/test-claim-loop.ts +++ b/packages/taler-harness/src/integrationtests/test-claim-loop.ts @@ -19,7 +19,10 @@ */ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { URL } from "url"; -import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js"; +import { + GlobalTestState, + MerchantApiClient, +} from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, @@ -44,8 +47,10 @@ export async function runClaimLoopTest(t: GlobalTestState) { amount: "TESTKUDOS:20", }); + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + // Set up order. - const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -54,12 +59,9 @@ export async function runClaimLoopTest(t: GlobalTestState) { }); // Query private order status before claiming it. - let orderStatusBefore = await MerchantPrivateApi.queryPrivateOrderStatus( - merchant, - { - orderId: orderResp.order_id, - }, - ); + let orderStatusBefore = await merchantClient.queryPrivateOrderStatus({ + orderId: orderResp.order_id, + }); t.assertTrue(orderStatusBefore.order_status === "unpaid"); let statusUrlBefore = new URL(orderStatusBefore.order_status_url); @@ -71,12 +73,9 @@ export async function runClaimLoopTest(t: GlobalTestState) { }); // Query private order status after claiming it. - let orderStatusAfter = await MerchantPrivateApi.queryPrivateOrderStatus( - merchant, - { - orderId: orderResp.order_id, - }, - ); + let orderStatusAfter = await merchantClient.queryPrivateOrderStatus({ + orderId: orderResp.order_id, + }); t.assertTrue(orderStatusAfter.order_status === "claimed"); await t.shutdown(); diff --git a/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts b/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts index 5a471b9aa..a9282f394 100644 --- a/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts +++ b/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts @@ -19,7 +19,10 @@ */ import { PreparePayResultType, TalerErrorCode } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js"; +import { + GlobalTestState, + MerchantApiClient, +} from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, @@ -62,11 +65,13 @@ export async function runDenomUnofferedTest(t: GlobalTestState) { fulfillment_url: "taler://fulfillment-success/thx", }; - const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + + const orderResp = await merchantClient.createOrder({ order: order, }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); diff --git a/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts b/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts index 2a8ae39d8..3c71e0f7e 100644 --- a/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts @@ -35,10 +35,9 @@ import { getPayto, GlobalTestState, harnessHttpLib, - MerchantPrivateApi, + MerchantApiClient, MerchantService, setupDb, - WalletCli, } from "../harness/harness.js"; import { createWalletDaemonWithClient, @@ -170,7 +169,9 @@ export async function runMerchantExchangeConfusionTest(t: GlobalTestState) { const merchant = faultyMerchant; - let orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + + let orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -178,7 +179,7 @@ export async function runMerchantExchangeConfusionTest(t: GlobalTestState) { }, }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, sessionId: "mysession-one", }); @@ -233,12 +234,9 @@ export async function runMerchantExchangeConfusionTest(t: GlobalTestState) { await publicOrderStatusResp.json(), ); - const confirmPayRes = await walletClient.call( - WalletApiOperation.ConfirmPay, - { - proposalId: proposalId, - }, - ); + const confirmPayRes = await walletClient.call(WalletApiOperation.ConfirmPay, { + proposalId: proposalId, + }); t.assertTrue(confirmPayRes.type === ConfirmPayResultType.Done); } diff --git a/packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts b/packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts index 8d271c5d1..d7ffa28d5 100644 --- a/packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts @@ -24,12 +24,15 @@ import { codecForMerchantOrderStatusUnpaid, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantPrivateApi, harnessHttpLib } from "../harness/harness.js"; +import { + GlobalTestState, + MerchantApiClient, + harnessHttpLib, +} from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, } from "../harness/helpers.js"; -import { createPlatformHttpLib } from "@gnu-taler/taler-util/http"; /** * Run test for basic, bank-integrated withdrawal. @@ -50,6 +53,8 @@ export async function runMerchantLongpollingTest(t: GlobalTestState) { await wres.withdrawalFinishedCond; + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + /** * ========================================================================= * Create an order and let the wallet pay under a session ID @@ -59,7 +64,7 @@ export async function runMerchantLongpollingTest(t: GlobalTestState) { * ========================================================================= */ - let orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + let orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -68,7 +73,7 @@ export async function runMerchantLongpollingTest(t: GlobalTestState) { create_token: false, }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, sessionId: "mysession-one", }); @@ -81,7 +86,9 @@ export async function runMerchantLongpollingTest(t: GlobalTestState) { // First, request order status without longpolling { console.log("requesting", publicOrderStatusUrl.href); - let publicOrderStatusResp = await harnessHttpLib.fetch(publicOrderStatusUrl.href); + let publicOrderStatusResp = await harnessHttpLib.fetch( + publicOrderStatusUrl.href, + ); if (publicOrderStatusResp.status != 402) { throw Error( @@ -94,7 +101,9 @@ export async function runMerchantLongpollingTest(t: GlobalTestState) { publicOrderStatusUrl.searchParams.set("timeout_ms", "500"); console.log("requesting", publicOrderStatusUrl.href); - let publicOrderStatusResp = await harnessHttpLib.fetch(publicOrderStatusUrl.href); + let publicOrderStatusResp = await harnessHttpLib.fetch( + publicOrderStatusUrl.href, + ); if (publicOrderStatusResp.status != 402) { throw Error( @@ -129,7 +138,9 @@ export async function runMerchantLongpollingTest(t: GlobalTestState) { preparePayResp.contractTermsHash, ); - let publicOrderStatusPromise = harnessHttpLib.fetch(publicOrderStatusUrl.href); + let publicOrderStatusPromise = harnessHttpLib.fetch( + publicOrderStatusUrl.href, + ); t.assertTrue(preparePayResp.status === PreparePayResultType.PaymentPossible); diff --git a/packages/taler-harness/src/integrationtests/test-merchant-refund-api.ts b/packages/taler-harness/src/integrationtests/test-merchant-refund-api.ts index bc53cb533..ebca4f769 100644 --- a/packages/taler-harness/src/integrationtests/test-merchant-refund-api.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-refund-api.ts @@ -17,15 +17,13 @@ /** * Imports. */ -import { createPlatformHttpLib } from "@gnu-taler/taler-util/http"; import { GlobalTestState, - MerchantPrivateApi, MerchantServiceInterface, - WalletCli, ExchangeServiceInterface, harnessHttpLib, WalletClient, + MerchantApiClient, } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, @@ -51,10 +49,12 @@ async function testRefundApiWithFulfillmentUrl( exchange: ExchangeServiceInterface; }, ): Promise { - const { walletClient, bank, exchange, merchant } = env; + const { walletClient, merchant } = env; + + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); // Set up order. - const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -65,7 +65,7 @@ async function testRefundApiWithFulfillmentUrl( ), }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); @@ -93,7 +93,7 @@ async function testRefundApiWithFulfillmentUrl( // Check if payment was successful. - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); @@ -110,14 +110,14 @@ async function testRefundApiWithFulfillmentUrl( preparePayResult.status === PreparePayResultType.AlreadyConfirmed, ); - await MerchantPrivateApi.giveRefund(merchant, { + await merchantClient.giveRefund({ amount: "TESTKUDOS:5", instance: "default", justification: "foo", orderId: orderResp.order_id, }); - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); @@ -165,10 +165,12 @@ async function testRefundApiWithFulfillmentMessage( exchange: ExchangeServiceInterface; }, ): Promise { - const { walletClient, bank, exchange, merchant } = env; + const { walletClient, merchant } = env; + + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); // Set up order. - const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -179,7 +181,7 @@ async function testRefundApiWithFulfillmentMessage( ), }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); @@ -207,7 +209,7 @@ async function testRefundApiWithFulfillmentMessage( // Check if payment was successful. - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); @@ -224,14 +226,14 @@ async function testRefundApiWithFulfillmentMessage( preparePayResult.status === PreparePayResultType.AlreadyConfirmed, ); - await MerchantPrivateApi.giveRefund(merchant, { + await merchantClient.giveRefund({ amount: "TESTKUDOS:5", instance: "default", justification: "foo", orderId: orderResp.order_id, }); - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); diff --git a/packages/taler-harness/src/integrationtests/test-merchant-spec-public-orders.ts b/packages/taler-harness/src/integrationtests/test-merchant-spec-public-orders.ts index 08c9d4bb2..599a3fc16 100644 --- a/packages/taler-harness/src/integrationtests/test-merchant-spec-public-orders.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-spec-public-orders.ts @@ -29,9 +29,8 @@ import { BankService, ExchangeService, GlobalTestState, - MerchantPrivateApi, + MerchantApiClient, MerchantService, - WalletCli, harnessHttpLib, } from "../harness/harness.js"; import { @@ -66,7 +65,8 @@ async function testWithClaimToken( }); await wres.withdrawalFinishedCond; const sessionId = "mysession"; - const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + const orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -255,18 +255,14 @@ async function testWithClaimToken( t.assertTrue(confirmPayRes2.type === ConfirmPayResultType.Done); // Create another order with identical fulfillment URL to test the "already paid" flow - const alreadyPaidOrderResp = await MerchantPrivateApi.createOrder( - merchant, - "default", - { - order: { - summary: "Buy me!", - amount: "TESTKUDOS:5", - fulfillment_url: "https://example.com/article42", - public_reorder_url: "https://example.com/article42-share", - }, + const alreadyPaidOrderResp = await merchantClient.createOrder({ + order: { + summary: "Buy me!", + amount: "TESTKUDOS:5", + fulfillment_url: "https://example.com/article42", + public_reorder_url: "https://example.com/article42-share", }, - ); + }); const apOrderId = alreadyPaidOrderResp.order_id; const apToken = alreadyPaidOrderResp.token; @@ -319,6 +315,7 @@ async function testWithoutClaimToken( const sessionId = "mysession2"; const { bank, exchange } = c; const { merchant, merchantBaseUrl } = c; + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); const wres = await withdrawViaBankV2(t, { walletClient, bank, @@ -326,7 +323,7 @@ async function testWithoutClaimToken( amount: "TESTKUDOS:20", }); await wres.withdrawalFinishedCond; - const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -514,18 +511,14 @@ async function testWithoutClaimToken( t.assertTrue(confirmPayRes2.type === ConfirmPayResultType.Done); // Create another order with identical fulfillment URL to test the "already paid" flow - const alreadyPaidOrderResp = await MerchantPrivateApi.createOrder( - merchant, - "default", - { - order: { - summary: "Buy me!", - amount: "TESTKUDOS:5", - fulfillment_url: "https://example.com/article42", - public_reorder_url: "https://example.com/article42-share", - }, + const alreadyPaidOrderResp = await merchantClient.createOrder({ + order: { + summary: "Buy me!", + amount: "TESTKUDOS:5", + fulfillment_url: "https://example.com/article42", + public_reorder_url: "https://example.com/article42-share", }, - ); + }); const apOrderId = alreadyPaidOrderResp.order_id; const apToken = alreadyPaidOrderResp.token; diff --git a/packages/taler-harness/src/integrationtests/test-pay-paid.ts b/packages/taler-harness/src/integrationtests/test-pay-paid.ts index 8d39ad4f6..4fe13b3ae 100644 --- a/packages/taler-harness/src/integrationtests/test-pay-paid.ts +++ b/packages/taler-harness/src/integrationtests/test-pay-paid.ts @@ -19,7 +19,7 @@ */ import { GlobalTestState, - MerchantPrivateApi, + MerchantApiClient, harnessHttpLib, } from "../harness/harness.js"; import { @@ -71,7 +71,9 @@ export async function runPayPaidTest(t: GlobalTestState) { const merchant = faultyMerchant; - let orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + + let orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -80,7 +82,7 @@ export async function runPayPaidTest(t: GlobalTestState) { }, }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, sessionId: "mysession-one", }); @@ -127,12 +129,9 @@ export async function runPayPaidTest(t: GlobalTestState) { publicOrderStatusResp.json(), ); - const confirmPayRes = await walletClient.call( - WalletApiOperation.ConfirmPay, - { - proposalId: proposalId, - }, - ); + const confirmPayRes = await walletClient.call(WalletApiOperation.ConfirmPay, { + proposalId: proposalId, + }); t.assertTrue(confirmPayRes.type === ConfirmPayResultType.Done); @@ -153,7 +152,7 @@ export async function runPayPaidTest(t: GlobalTestState) { * ========================================================================= */ - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, sessionId: "mysession-two", }); @@ -180,7 +179,7 @@ export async function runPayPaidTest(t: GlobalTestState) { }, }); - let orderRespTwo = await MerchantPrivateApi.createOrder(merchant, "default", { + let orderRespTwo = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -189,13 +188,10 @@ export async function runPayPaidTest(t: GlobalTestState) { }, }); - let orderStatusTwo = await MerchantPrivateApi.queryPrivateOrderStatus( - merchant, - { - orderId: orderRespTwo.order_id, - sessionId: "mysession-two", - }, - ); + let orderStatusTwo = await merchantClient.queryPrivateOrderStatus({ + orderId: orderRespTwo.order_id, + sessionId: "mysession-two", + }); t.assertTrue(orderStatusTwo.order_status === "unpaid"); diff --git a/packages/taler-harness/src/integrationtests/test-payment-abort.ts b/packages/taler-harness/src/integrationtests/test-payment-abort.ts index 99140b2ee..22e087161 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-abort.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-abort.ts @@ -19,7 +19,7 @@ */ import { GlobalTestState, - MerchantPrivateApi, + MerchantApiClient, harnessHttpLib, } from "../harness/harness.js"; import { @@ -55,7 +55,9 @@ export async function runPaymentAbortTest(t: GlobalTestState) { const merchant = faultyMerchant; - let orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + + let orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -64,7 +66,7 @@ export async function runPaymentAbortTest(t: GlobalTestState) { }, }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, sessionId: "mysession-one", }); diff --git a/packages/taler-harness/src/integrationtests/test-payment-claim.ts b/packages/taler-harness/src/integrationtests/test-payment-claim.ts index 3e52cb5dd..df86b3cbf 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-claim.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-claim.ts @@ -19,11 +19,7 @@ */ import { PreparePayResultType, TalerErrorCode } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { - GlobalTestState, - MerchantPrivateApi, - WalletCli, -} from "../harness/harness.js"; +import { GlobalTestState, MerchantApiClient, WalletCli } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, @@ -38,6 +34,8 @@ export async function runPaymentClaimTest(t: GlobalTestState) { const { walletClient, bank, exchange, merchant } = await createSimpleTestkudosEnvironmentV2(t); + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + const walletTwo = new WalletCli(t, "two"); // Withdraw digital cash into the wallet. @@ -53,7 +51,7 @@ export async function runPaymentClaimTest(t: GlobalTestState) { // Set up order. - const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -61,7 +59,7 @@ export async function runPaymentClaimTest(t: GlobalTestState) { }, }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); @@ -94,7 +92,7 @@ export async function runPaymentClaimTest(t: GlobalTestState) { // Check if payment was successful. - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); diff --git a/packages/taler-harness/src/integrationtests/test-payment-fault.ts b/packages/taler-harness/src/integrationtests/test-payment-fault.ts index 0cc369a6e..5d0fe6e13 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-fault.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-fault.ts @@ -28,8 +28,8 @@ import { setupDb, BankService, WalletCli, - MerchantPrivateApi, getPayto, + MerchantApiClient, } from "../harness/harness.js"; import { FaultInjectedExchangeService, @@ -120,6 +120,8 @@ export async function runPaymentFaultTest(t: GlobalTestState) { paytoUris: [getPayto("merchant-default")], }); + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + console.log("setup done!"); const wallet = new WalletCli(t); @@ -161,7 +163,7 @@ export async function runPaymentFaultTest(t: GlobalTestState) { // Set up order. - const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -169,7 +171,7 @@ export async function runPaymentFaultTest(t: GlobalTestState) { }, }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); @@ -218,7 +220,7 @@ export async function runPaymentFaultTest(t: GlobalTestState) { // Check if payment was successful. - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); diff --git a/packages/taler-harness/src/integrationtests/test-payment-idempotency.ts b/packages/taler-harness/src/integrationtests/test-payment-idempotency.ts index 6373c2393..e06ef1322 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-idempotency.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-idempotency.ts @@ -19,7 +19,7 @@ */ import { PreparePayResultType } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js"; +import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, @@ -46,9 +46,11 @@ export async function runPaymentIdempotencyTest(t: GlobalTestState) { await wres.withdrawalFinishedCond; + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + // Set up order. - const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -56,7 +58,7 @@ export async function runPaymentIdempotencyTest(t: GlobalTestState) { }, }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); @@ -102,7 +104,7 @@ export async function runPaymentIdempotencyTest(t: GlobalTestState) { // Check if payment was successful. - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); diff --git a/packages/taler-harness/src/integrationtests/test-payment-multiple.ts b/packages/taler-harness/src/integrationtests/test-payment-multiple.ts index 29047e102..b22bba43f 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-multiple.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-multiple.ts @@ -23,9 +23,8 @@ import { BankService, ExchangeService, MerchantService, - WalletCli, - MerchantPrivateApi, getPayto, + MerchantApiClient, } from "../harness/harness.js"; import { coin_ct10, coin_u1 } from "../harness/denomStructures.js"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; @@ -120,6 +119,8 @@ export async function runPaymentMultipleTest(t: GlobalTestState) { name: "default", }); + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + // Withdraw digital cash into the wallet. await withdrawViaBankV2(t, { @@ -131,7 +132,7 @@ export async function runPaymentMultipleTest(t: GlobalTestState) { // Set up order. - const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:80", @@ -139,7 +140,7 @@ export async function runPaymentMultipleTest(t: GlobalTestState) { }, }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); @@ -157,7 +158,7 @@ export async function runPaymentMultipleTest(t: GlobalTestState) { // Check if payment was successful. - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); diff --git a/packages/taler-harness/src/integrationtests/test-payment-share.ts b/packages/taler-harness/src/integrationtests/test-payment-share.ts index 156571372..c12140d06 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-share.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-share.ts @@ -22,7 +22,7 @@ import { PreparePayResultType, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js"; +import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, createWalletDaemonWithClient, @@ -41,6 +41,8 @@ export async function runPaymentShareTest(t: GlobalTestState) { merchant, } = await createSimpleTestkudosEnvironmentV2(t); + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + // Withdraw digital cash into the wallet. await withdrawViaBankV2(t, { walletClient: firstWallet, @@ -62,7 +64,7 @@ export async function runPaymentShareTest(t: GlobalTestState) { }); await secondWallet.call(WalletApiOperation.TestingWaitTransactionsFinal, {}); - //create two orders to pay + // create two orders to pay async function createOrder(amount: string) { const order = { summary: "Buy me!", @@ -70,26 +72,16 @@ export async function runPaymentShareTest(t: GlobalTestState) { fulfillment_url: "taler://fulfillment-success/thx", }; - const instance = "default"; const args = { order }; const auth = {}; - const orderResp = await MerchantPrivateApi.createOrder( - merchant, - instance, - { - order: args.order, - }, - auth, - ); + const orderResp = await merchantClient.createOrder({ + order: args.order, + }); - const orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus( - merchant, - { - orderId: orderResp.order_id, - }, - auth, - ); + const orderStatus = await merchantClient.queryPrivateOrderStatus({ + orderId: orderResp.order_id, + }); t.assertTrue(orderStatus.order_status === "unpaid"); return { id: orderResp.order_id, uri: orderStatus.taler_pay_uri }; diff --git a/packages/taler-harness/src/integrationtests/test-payment-template.ts b/packages/taler-harness/src/integrationtests/test-payment-template.ts index 707be52e1..2058991d0 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-template.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-template.ts @@ -17,12 +17,16 @@ /** * Imports. */ -import { ConfirmPayResultType, Duration, PreparePayResultType } from "@gnu-taler/taler-util"; +import { + ConfirmPayResultType, + Duration, + PreparePayResultType, +} from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js"; +import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, - withdrawViaBankV2 + withdrawViaBankV2, } from "../harness/helpers.js"; /** @@ -34,7 +38,9 @@ export async function runPaymentTemplateTest(t: GlobalTestState) { const { walletClient, bank, exchange, merchant } = await createSimpleTestkudosEnvironmentV2(t); - await MerchantPrivateApi.createTemplate(merchant, "default", { + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + + await merchantClient.createTemplate({ template_id: "template1", template_description: "my test template", template_contract: { @@ -50,7 +56,12 @@ export async function runPaymentTemplateTest(t: GlobalTestState) { // Withdraw digital cash into the wallet. - const wres = await withdrawViaBankV2(t, { walletClient, bank, exchange, amount: "TESTKUDOS:20" }); + const wres = await withdrawViaBankV2(t, { + walletClient, + bank, + exchange, + amount: "TESTKUDOS:20", + }); await wres.withdrawalFinishedCond; // Request a template payment @@ -79,13 +90,10 @@ export async function runPaymentTemplateTest(t: GlobalTestState) { // Check if payment was successful. - const orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus( - merchant, - { - orderId: preparePayResult.contractTerms.order_id, - instance: "default", - }, - ); + const orderStatus = await merchantClient.queryPrivateOrderStatus({ + orderId: preparePayResult.contractTerms.order_id, + instance: "default", + }); t.assertTrue(orderStatus.order_status === "paid"); await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {}); diff --git a/packages/taler-harness/src/integrationtests/test-payment-transient.ts b/packages/taler-harness/src/integrationtests/test-payment-transient.ts index 2cc0af309..3bc59aa8f 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-transient.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-transient.ts @@ -27,12 +27,16 @@ import { } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { FaultInjectionResponseContext } from "../harness/faultInjection.js"; -import { GlobalTestState, MerchantPrivateApi, harnessHttpLib } from "../harness/harness.js"; import { - createFaultInjectedMerchantTestkudosEnvironment, withdrawViaBankV2, + GlobalTestState, + MerchantApiClient, + harnessHttpLib, +} from "../harness/harness.js"; +import { + createFaultInjectedMerchantTestkudosEnvironment, + withdrawViaBankV2, } from "../harness/helpers.js"; - /** * Run test for a payment where the merchant has a transient * failure in /pay @@ -40,9 +44,13 @@ import { export async function runPaymentTransientTest(t: GlobalTestState) { // Set up test environment - const { walletClient, bank, exchange, faultyMerchant, faultyExchange } = + const { walletClient, bank, faultyMerchant, faultyExchange } = await createFaultInjectedMerchantTestkudosEnvironment(t); + const merchantClient = new MerchantApiClient( + faultyMerchant.makeInstanceBaseUrl(), + ); + // Withdraw digital cash into the wallet. await withdrawViaBankV2(t, { @@ -54,7 +62,7 @@ export async function runPaymentTransientTest(t: GlobalTestState) { const merchant = faultyMerchant; - let orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + let orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -63,7 +71,7 @@ export async function runPaymentTransientTest(t: GlobalTestState) { }, }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, sessionId: "mysession-one", }); diff --git a/packages/taler-harness/src/integrationtests/test-paywall-flow.ts b/packages/taler-harness/src/integrationtests/test-paywall-flow.ts index 5f63d4fac..fd13f37d6 100644 --- a/packages/taler-harness/src/integrationtests/test-paywall-flow.ts +++ b/packages/taler-harness/src/integrationtests/test-paywall-flow.ts @@ -17,7 +17,11 @@ /** * Imports. */ -import { GlobalTestState, MerchantPrivateApi, harnessHttpLib } from "../harness/harness.js"; +import { + GlobalTestState, + MerchantApiClient, + harnessHttpLib, +} from "../harness/harness.js"; import { PreparePayResultType, codecForMerchantOrderStatusUnpaid, @@ -39,6 +43,8 @@ export async function runPaywallFlowTest(t: GlobalTestState) { const { walletClient, bank, exchange, merchant } = await createSimpleTestkudosEnvironmentV2(t); + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + // Withdraw digital cash into the wallet. const wres = await withdrawViaBankV2(t, { @@ -59,7 +65,7 @@ export async function runPaywallFlowTest(t: GlobalTestState) { * ========================================================================= */ - let orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + let orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -70,7 +76,7 @@ export async function runPaywallFlowTest(t: GlobalTestState) { const firstOrderId = orderResp.order_id; - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, sessionId: "mysession-one", }); @@ -82,7 +88,9 @@ export async function runPaywallFlowTest(t: GlobalTestState) { t.assertTrue(orderStatus.already_paid_order_id === undefined); let publicOrderStatusUrl = new URL(orderStatus.order_status_url); - let publicOrderStatusResp = await harnessHttpLib.fetch(publicOrderStatusUrl.href); + let publicOrderStatusResp = await harnessHttpLib.fetch( + publicOrderStatusUrl.href, + ); if (publicOrderStatusResp.status != 402) { throw Error( @@ -142,7 +150,7 @@ export async function runPaywallFlowTest(t: GlobalTestState) { * ========================================================================= */ - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, sessionId: "mysession-two", }); @@ -169,7 +177,7 @@ export async function runPaywallFlowTest(t: GlobalTestState) { * ========================================================================= */ - orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -181,7 +189,7 @@ export async function runPaywallFlowTest(t: GlobalTestState) { const secondOrderId = orderResp.order_id; - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: secondOrderId, sessionId: "mysession-three", }); @@ -206,7 +214,7 @@ export async function runPaywallFlowTest(t: GlobalTestState) { // The first order should now be paid under "mysession-three", // as the wallet did re-purchase detection - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: firstOrderId, sessionId: "mysession-three", }); @@ -215,7 +223,7 @@ export async function runPaywallFlowTest(t: GlobalTestState) { // Check that with a completely new session ID, the status would NOT // be paid. - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: firstOrderId, sessionId: "mysession-four", }); diff --git a/packages/taler-harness/src/integrationtests/test-refund-auto.ts b/packages/taler-harness/src/integrationtests/test-refund-auto.ts index 5648835d5..9e1f31af2 100644 --- a/packages/taler-harness/src/integrationtests/test-refund-auto.ts +++ b/packages/taler-harness/src/integrationtests/test-refund-auto.ts @@ -19,7 +19,7 @@ */ import { Duration, durationFromSpec } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js"; +import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, @@ -34,6 +34,8 @@ export async function runRefundAutoTest(t: GlobalTestState) { const { walletClient, bank, exchange, merchant } = await createSimpleTestkudosEnvironmentV2(t); + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + // Withdraw digital cash into the wallet. const wres = await withdrawViaBankV2(t, { @@ -46,7 +48,7 @@ export async function runRefundAutoTest(t: GlobalTestState) { await wres.withdrawalFinishedCond; // Set up order. - const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -60,7 +62,7 @@ export async function runRefundAutoTest(t: GlobalTestState) { ), }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); @@ -78,13 +80,13 @@ export async function runRefundAutoTest(t: GlobalTestState) { // Check if payment was successful. - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); t.assertTrue(orderStatus.order_status === "paid"); - const ref = await MerchantPrivateApi.giveRefund(merchant, { + const ref = await merchantClient.giveRefund({ amount: "TESTKUDOS:5", instance: "default", justification: "foo", diff --git a/packages/taler-harness/src/integrationtests/test-refund-gone.ts b/packages/taler-harness/src/integrationtests/test-refund-gone.ts index 8e402f3fc..954262826 100644 --- a/packages/taler-harness/src/integrationtests/test-refund-gone.ts +++ b/packages/taler-harness/src/integrationtests/test-refund-gone.ts @@ -17,7 +17,7 @@ /** * Imports. */ -import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js"; +import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; import { applyTimeTravelV2, createSimpleTestkudosEnvironmentV2, @@ -39,6 +39,8 @@ export async function runRefundGoneTest(t: GlobalTestState) { const { walletClient, bank, exchange, merchant } = await createSimpleTestkudosEnvironmentV2(t); + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + // Withdraw digital cash into the wallet. await withdrawViaBankV2(t, { @@ -50,7 +52,7 @@ export async function runRefundGoneTest(t: GlobalTestState) { // Set up order. - const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -69,7 +71,7 @@ export async function runRefundGoneTest(t: GlobalTestState) { ), }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); @@ -82,12 +84,12 @@ export async function runRefundGoneTest(t: GlobalTestState) { }); const r2 = await walletClient.call(WalletApiOperation.ConfirmPay, { - proposalId: r1.proposalId, + transactionId: r1.transactionId, }); // Check if payment was successful. - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); @@ -102,7 +104,7 @@ export async function runRefundGoneTest(t: GlobalTestState) { await exchange.runAggregatorOnce(); - const ref = await MerchantPrivateApi.giveRefund(merchant, { + const ref = await merchantClient.giveRefund({ amount: "TESTKUDOS:5", instance: "default", justification: "foo", diff --git a/packages/taler-harness/src/integrationtests/test-refund-incremental.ts b/packages/taler-harness/src/integrationtests/test-refund-incremental.ts index 8ac0948f2..7c895ad2b 100644 --- a/packages/taler-harness/src/integrationtests/test-refund-incremental.ts +++ b/packages/taler-harness/src/integrationtests/test-refund-incremental.ts @@ -26,7 +26,7 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { GlobalTestState, - MerchantPrivateApi, + MerchantApiClient, delayMs, } from "../harness/harness.js"; import { @@ -43,6 +43,8 @@ export async function runRefundIncrementalTest(t: GlobalTestState) { const { walletClient, bank, exchange, merchant } = await createSimpleTestkudosEnvironmentV2(t); + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + // Withdraw digital cash into the wallet. const wres = await withdrawViaBankV2(t, { @@ -56,7 +58,7 @@ export async function runRefundIncrementalTest(t: GlobalTestState) { // Set up order. - const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:10", @@ -67,7 +69,7 @@ export async function runRefundIncrementalTest(t: GlobalTestState) { ), }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); @@ -85,13 +87,13 @@ export async function runRefundIncrementalTest(t: GlobalTestState) { // Check if payment was successful. - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); t.assertTrue(orderStatus.order_status === "paid"); - let ref = await MerchantPrivateApi.giveRefund(merchant, { + let ref = await merchantClient.giveRefund({ amount: "TESTKUDOS:2.5", instance: "default", justification: "foo", @@ -120,7 +122,7 @@ export async function runRefundIncrementalTest(t: GlobalTestState) { // refund will be grouped with the previous one. await delayMs(1200); - ref = await MerchantPrivateApi.giveRefund(merchant, { + ref = await merchantClient.giveRefund({ amount: "TESTKUDOS:5", instance: "default", justification: "bar", @@ -133,7 +135,7 @@ export async function runRefundIncrementalTest(t: GlobalTestState) { // refund will be grouped with the previous one. await delayMs(1200); - ref = await MerchantPrivateApi.giveRefund(merchant, { + ref = await merchantClient.giveRefund({ amount: "TESTKUDOS:10", instance: "default", justification: "bar", @@ -153,7 +155,7 @@ export async function runRefundIncrementalTest(t: GlobalTestState) { console.log(wr); } - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); diff --git a/packages/taler-harness/src/integrationtests/test-refund.ts b/packages/taler-harness/src/integrationtests/test-refund.ts index 44848d88a..3dc2748fe 100644 --- a/packages/taler-harness/src/integrationtests/test-refund.ts +++ b/packages/taler-harness/src/integrationtests/test-refund.ts @@ -24,7 +24,7 @@ import { TransactionMajorState, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js"; +import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, @@ -43,6 +43,8 @@ export async function runRefundTest(t: GlobalTestState) { merchant, } = await createSimpleTestkudosEnvironmentV2(t); + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + // Withdraw digital cash into the wallet. const withdrawalRes = await withdrawViaBankV2(t, { @@ -56,7 +58,7 @@ export async function runRefundTest(t: GlobalTestState) { // Set up order. - const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const orderResp = await merchantClient.createOrder({ order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -67,7 +69,7 @@ export async function runRefundTest(t: GlobalTestState) { ), }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); @@ -85,13 +87,13 @@ export async function runRefundTest(t: GlobalTestState) { // Check if payment was successful. - orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); t.assertTrue(orderStatus.order_status === "paid"); - const ref = await MerchantPrivateApi.giveRefund(merchant, { + const ref = await merchantClient.giveRefund({ amount: "TESTKUDOS:5", instance: "default", justification: "foo", diff --git a/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts b/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts index 602b6629a..420e4fddc 100644 --- a/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts +++ b/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts @@ -32,14 +32,16 @@ import { BankService, ExchangeService, GlobalTestState, - MerchantPrivateApi, MerchantService, setupDb, - WalletCli, getPayto, + MerchantApiClient, } from "../harness/harness.js"; -import { applyTimeTravelV2, createWalletDaemonWithClient, withdrawViaBankV2 } from "../harness/helpers.js"; - +import { + applyTimeTravelV2, + createWalletDaemonWithClient, + withdrawViaBankV2, +} from "../harness/helpers.js"; /** * Basic time travel test. @@ -110,19 +112,29 @@ export async function runTimetravelAutorefreshTest(t: GlobalTestState) { name: "w1", }); + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + // Withdraw digital cash into the wallet. - const wres = await withdrawViaBankV2(t, { walletClient, bank, exchange, amount: "TESTKUDOS:15" }); + const wres = await withdrawViaBankV2(t, { + walletClient, + bank, + exchange, + amount: "TESTKUDOS:15", + }); await wres.withdrawalFinishedCond; // Travel into the future, the deposit expiration is two years // into the future. console.log("applying first time travel"); - await applyTimeTravelV2(Duration.toMilliseconds(durationFromSpec({ days: 400 })), { - walletClient, - exchange, - merchant, - }); + await applyTimeTravelV2( + Duration.toMilliseconds(durationFromSpec({ days: 400 })), + { + walletClient, + exchange, + merchant, + }, + ); await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {}); @@ -144,11 +156,14 @@ export async function runTimetravelAutorefreshTest(t: GlobalTestState) { // Travel into the future, the deposit expiration is two years // into the future. console.log("applying second time travel"); - await applyTimeTravelV2(Duration.toMilliseconds(durationFromSpec({ years: 2, months: 6 })), { - walletClient, - exchange, - merchant, - }); + await applyTimeTravelV2( + Duration.toMilliseconds(durationFromSpec({ years: 2, months: 6 })), + { + walletClient, + exchange, + merchant, + }, + ); // At this point, the original coins should've been refreshed. // It would be too late to refresh them now, as we're past @@ -156,7 +171,7 @@ export async function runTimetravelAutorefreshTest(t: GlobalTestState) { await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {}); - const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const orderResp = await merchantClient.createOrder({ order: { fulfillment_url: "http://example.com", summary: "foo", @@ -164,13 +179,10 @@ export async function runTimetravelAutorefreshTest(t: GlobalTestState) { }, }); - const orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus( - merchant, - { - orderId: orderResp.order_id, - instance: "default", - }, - ); + const orderStatus = await merchantClient.queryPrivateOrderStatus({ + orderId: orderResp.order_id, + instance: "default", + }); t.assertTrue(orderStatus.order_status === "unpaid"); diff --git a/packages/taler-harness/src/integrationtests/test-tipping.ts b/packages/taler-harness/src/integrationtests/test-tipping.ts index 53d7f08c8..93855f546 100644 --- a/packages/taler-harness/src/integrationtests/test-tipping.ts +++ b/packages/taler-harness/src/integrationtests/test-tipping.ts @@ -25,7 +25,6 @@ import { import { GlobalTestState, MerchantApiClient, - MerchantPrivateApi, getWireMethodForTest, } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2 } from "../harness/helpers.js"; @@ -46,12 +45,7 @@ export async function runTippingTest(t: GlobalTestState) { }); const mbu = await bankAccessApiClient.createRandomBankUser(); - const merchantClient = new MerchantApiClient( - merchant.makeInstanceBaseUrl("default"), - { - method: "external", - }, - ); + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); const tipReserveResp = await merchantClient.createTippingReserve({ exchange_url: exchange.baseUrl, @@ -85,7 +79,7 @@ export async function runTippingTest(t: GlobalTestState) { await merchant.start(); await merchant.pingUntilAvailable(); - const r = await MerchantPrivateApi.queryTippingReserves(merchant, "default"); + const r = await merchantClient.queryTippingReserves(); console.log("tipping reserves:", JSON.stringify(r, undefined, 2)); t.assertTrue(r.reserves.length === 1); @@ -94,7 +88,7 @@ export async function runTippingTest(t: GlobalTestState) { r.reserves[0].merchant_initial_amount, ); - const tip = await MerchantPrivateApi.giveTip(merchant, "default", { + const tip = await merchantClient.giveTip({ amount: "TESTKUDOS:5", justification: "why not?", next_url: "https://example.com/after-tip", diff --git a/packages/taler-harness/src/integrationtests/test-wallet-backup-doublespend.ts b/packages/taler-harness/src/integrationtests/test-wallet-backup-doublespend.ts index 99adc1754..62ae89137 100644 --- a/packages/taler-harness/src/integrationtests/test-wallet-backup-doublespend.ts +++ b/packages/taler-harness/src/integrationtests/test-wallet-backup-doublespend.ts @@ -19,7 +19,7 @@ */ import { PreparePayResultType } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js"; +import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, createWalletDaemonWithClient, @@ -34,6 +34,8 @@ export async function runWalletBackupDoublespendTest(t: GlobalTestState) { const { commonDb, merchant, walletClient, bank, exchange } = await createSimpleTestkudosEnvironmentV2(t); + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + const sync = await SyncService.create(t, { currency: "TESTKUDOS", annualFee: "TESTKUDOS:0.5", @@ -116,7 +118,7 @@ export async function runWalletBackupDoublespendTest(t: GlobalTestState) { { const instance = "default"; - const orderResp = await MerchantPrivateApi.createOrder(merchant, instance, { + const orderResp = await merchantClient.createOrder({ order: { amount: "TESTKUDOS:8", summary: "bla", @@ -124,8 +126,7 @@ export async function runWalletBackupDoublespendTest(t: GlobalTestState) { }, }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus( - merchant, + let orderStatus = await merchantClient.queryPrivateOrderStatus( { orderId: orderResp.order_id, }, diff --git a/packages/taler-harness/src/integrationtests/test-wallet-balance.ts b/packages/taler-harness/src/integrationtests/test-wallet-balance.ts index 15b0fd427..9711aff26 100644 --- a/packages/taler-harness/src/integrationtests/test-wallet-balance.ts +++ b/packages/taler-harness/src/integrationtests/test-wallet-balance.ts @@ -19,7 +19,7 @@ */ import { Amounts, PreparePayResultType } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js"; +import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, @@ -37,6 +37,8 @@ export async function runWalletBalanceTest(t: GlobalTestState) { const { merchant, walletClient, exchange, bank } = await createSimpleTestkudosEnvironmentV2(t); + const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); + // Withdraw digital cash into the wallet. const wres = await withdrawViaBankV2(t, { @@ -54,11 +56,11 @@ export async function runWalletBalanceTest(t: GlobalTestState) { fulfillment_url: "taler://fulfillment-success/thx", }; - const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { + const orderResp = await merchantClient.createOrder({ order, }); - let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { + let orderStatus = await merchantClient.queryPrivateOrderStatus({ orderId: orderResp.order_id, }); -- cgit v1.2.3 From 324d9f871c356f48f64c170a793024139ae2694d Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 6 Sep 2023 11:44:07 +0200 Subject: move merchant API client to taler-util --- packages/taler-harness/src/harness/harness.ts | 299 +-------------------- packages/taler-harness/src/harness/helpers.ts | 2 +- packages/taler-harness/src/index.ts | 7 +- .../test-age-restrictions-merchant.ts | 12 +- .../src/integrationtests/test-claim-loop.ts | 6 +- .../src/integrationtests/test-denom-unoffered.ts | 9 +- .../taler-harness/src/integrationtests/test-kyc.ts | 4 +- .../test-merchant-exchange-confusion.ts | 2 +- .../test-merchant-instances-delete.ts | 10 +- .../test-merchant-instances-urls.ts | 6 +- .../integrationtests/test-merchant-instances.ts | 4 +- .../integrationtests/test-merchant-longpolling.ts | 7 +- .../integrationtests/test-merchant-refund-api.ts | 26 +- .../test-merchant-spec-public-orders.ts | 2 +- .../src/integrationtests/test-pay-paid.ts | 19 +- .../src/integrationtests/test-payment-abort.ts | 21 +- .../src/integrationtests/test-payment-claim.ts | 8 +- .../src/integrationtests/test-payment-expired.ts | 15 +- .../src/integrationtests/test-payment-fault.ts | 29 +- .../integrationtests/test-payment-idempotency.ts | 4 +- .../src/integrationtests/test-payment-multiple.ts | 10 +- .../src/integrationtests/test-payment-share.ts | 3 +- .../src/integrationtests/test-payment-template.ts | 3 +- .../src/integrationtests/test-payment-transient.ts | 7 +- .../src/integrationtests/test-paywall-flow.ts | 9 +- .../src/integrationtests/test-refund-auto.ts | 8 +- .../src/integrationtests/test-refund-gone.ts | 13 +- .../integrationtests/test-refund-incremental.ts | 7 +- .../src/integrationtests/test-refund.ts | 3 +- .../test-timetravel-autorefresh.ts | 4 +- .../src/integrationtests/test-tipping.ts | 11 +- .../test-wallet-backup-doublespend.ts | 12 +- .../src/integrationtests/test-wallet-balance.ts | 8 +- packages/taler-util/src/index.ts | 2 + packages/taler-util/src/merchant-api-types.ts | 20 +- 35 files changed, 141 insertions(+), 471 deletions(-) (limited to 'packages/taler-harness/src/harness/helpers.ts') diff --git a/packages/taler-harness/src/harness/harness.ts b/packages/taler-harness/src/harness/harness.ts index a16cef7ba..df3c9b215 100644 --- a/packages/taler-harness/src/harness/harness.ts +++ b/packages/taler-harness/src/harness/harness.ts @@ -57,6 +57,8 @@ import { WalletNotification, codecForAny, AccountAddDetails, + MerchantInstanceConfig, + PartialMerchantInstanceConfig, } from "@gnu-taler/taler-util"; import { createPlatformHttpLib, @@ -1339,23 +1341,12 @@ export interface MerchantConfig { overrideTestDir?: string; } -export interface PrivateOrderStatusQuery { - instance?: string; - orderId: string; - sessionId?: string; -} - export interface MerchantServiceInterface { makeInstanceBaseUrl(instanceName?: string): string; readonly port: number; readonly name: string; } -export interface DeleteTippingReserveArgs { - reservePub: string; - purge?: boolean; -} - /** * Default HTTP client handle for the integration test harness. */ @@ -1364,232 +1355,6 @@ export const harnessHttpLib = createPlatformHttpLib({ enableThrottling: false, }); -/** - * FIXME: Move this out of the harness. - */ -export class MerchantApiClient { - /** - * Base URL for the particular instance that this merchant API client - * is for. - */ - private baseUrl: string; - - readonly auth: MerchantAuthConfiguration; - - constructor(baseUrl: string, auth?: MerchantAuthConfiguration) { - this.baseUrl = baseUrl; - - this.auth = auth ?? { - method: "external", - }; - } - - httpClient = createPlatformHttpLib({ - allowHttp: true, - enableThrottling: false, - }); - - async changeAuth(auth: MerchantAuthConfiguration): Promise { - const url = new URL("private/auth", this.baseUrl); - const res = await this.httpClient.fetch(url.href, { - method: "POST", - body: auth, - headers: this.makeAuthHeader(), - }); - await expectSuccessResponseOrThrow(res); - } - - async deleteTippingReserve(req: DeleteTippingReserveArgs): Promise { - const url = new URL(`private/reserves/${req.reservePub}`, this.baseUrl); - if (req.purge) { - url.searchParams.set("purge", "YES"); - } - const resp = await this.httpClient.fetch(url.href, { - method: "DELETE", - headers: this.makeAuthHeader(), - }); - logger.info(`delete status: ${resp.status}`); - return; - } - - async createTippingReserve( - req: CreateMerchantTippingReserveRequest, - ): Promise { - const url = new URL("private/reserves", this.baseUrl); - const resp = await this.httpClient.fetch(url.href, { - method: "POST", - body: req, - headers: this.makeAuthHeader(), - }); - const respData = readSuccessResponseJsonOrThrow( - resp, - codecForMerchantReserveCreateConfirmation(), - ); - return respData; - } - - async getPrivateInstanceInfo(): Promise { - const url = new URL("private", this.baseUrl); - const resp = await this.httpClient.fetch(url.href, { - method: "GET", - headers: this.makeAuthHeader(), - }); - return await resp.json(); - } - - async getPrivateTipReserves(): Promise { - const url = new URL("private/reserves", this.baseUrl); - const resp = await this.httpClient.fetch(url.href, { - method: "GET", - headers: this.makeAuthHeader(), - }); - // FIXME: Validate! - return await resp.json(); - } - - async deleteInstance(instanceId: string) { - const url = new URL(`management/instances/${instanceId}`, this.baseUrl); - const resp = await this.httpClient.fetch(url.href, { - method: "DELETE", - headers: this.makeAuthHeader(), - }); - await expectSuccessResponseOrThrow(resp); - } - - async createInstance(req: MerchantInstanceConfig): Promise { - const url = new URL("management/instances", this.baseUrl); - await this.httpClient.fetch(url.href, { - method: "POST", - body: req, - headers: this.makeAuthHeader(), - }); - } - - async getInstances(): Promise { - const url = new URL("management/instances", this.baseUrl); - const resp = await this.httpClient.fetch(url.href, { - headers: this.makeAuthHeader(), - }); - return resp.json(); - } - - async getInstanceFullDetails(instanceId: string): Promise { - const url = new URL(`management/instances/${instanceId}`, this.baseUrl); - try { - const resp = await this.httpClient.fetch(url.href, { - headers: this.makeAuthHeader(), - }); - return resp.json(); - } catch (e) { - throw e; - } - } - - async createOrder( - req: MerchantPostOrderRequest, - ): Promise { - let url = new URL("private/orders", this.baseUrl); - const resp = await harnessHttpLib.fetch(url.href, { - method: "POST", - body: req, - headers: this.makeAuthHeader(), - }); - return readSuccessResponseJsonOrThrow( - resp, - codecForMerchantPostOrderResponse(), - ); - } - - async queryPrivateOrderStatus( - query: PrivateOrderStatusQuery, - ): Promise { - const reqUrl = new URL(`private/orders/${query.orderId}`, this.baseUrl); - if (query.sessionId) { - reqUrl.searchParams.set("session_id", query.sessionId); - } - const resp = await harnessHttpLib.fetch(reqUrl.href, { - headers: this.makeAuthHeader(), - }); - return readSuccessResponseJsonOrThrow( - resp, - codecForMerchantOrderPrivateStatusResponse(), - ); - } - - async giveTip(req: RewardCreateRequest): Promise { - const reqUrl = new URL(`private/tips`, this.baseUrl); - const resp = await harnessHttpLib.fetch(reqUrl.href, { - method: "POST", - body: req, - }); - // FIXME: validate - return resp.json(); - } - - async queryTippingReserves(): Promise { - const reqUrl = new URL(`private/reserves`, this.baseUrl); - const resp = await harnessHttpLib.fetch(reqUrl.href, { - headers: this.makeAuthHeader(), - }); - // FIXME: validate - return resp.json(); - } - - async giveRefund(r: { - instance: string; - orderId: string; - amount: string; - justification: string; - }): Promise<{ talerRefundUri: string }> { - const reqUrl = new URL(`private/orders/${r.orderId}/refund`, this.baseUrl); - const resp = await harnessHttpLib.fetch(reqUrl.href, { - method: "POST", - body: { - refund: r.amount, - reason: r.justification, - }, - }); - const respBody = await resp.json(); - return { - talerRefundUri: respBody.taler_refund_uri, - }; - } - - async createTemplate(req: MerchantTemplateAddDetails) { - let url = new URL("private/templates", this.baseUrl); - const resp = await harnessHttpLib.fetch(url.href, { - method: "POST", - body: req, - headers: this.makeAuthHeader(), - }); - if (resp.status !== 204) { - throw Error("failed to create template"); - } - } - - private makeAuthHeader(): Record { - switch (this.auth.method) { - case "external": - return {}; - case "token": - return { - Authorization: `Bearer ${this.auth.token}`, - }; - } - } -} - -export interface CreateMerchantTippingReserveRequest { - // Amount that the merchant promises to put into the reserve - initial_balance: AmountString; - - // Exchange the merchant intends to use for tipping - exchange_url: string; - - // Desired wire method, for example "iban" or "x-taler-bank" - wire_method: string; -} - export class MerchantService implements MerchantServiceInterface { static fromExistingConfig( gc: GlobalTestState, @@ -1814,66 +1579,6 @@ export class MerchantService implements MerchantServiceInterface { } } -export interface MerchantAuthConfiguration { - method: "external" | "token"; - token?: string; -} - -// FIXME: Why do we need this? Describe / fix! -export interface PartialMerchantInstanceConfig { - auth?: MerchantAuthConfiguration; - id: string; - name: string; - paytoUris: string[]; - address?: unknown; - jurisdiction?: unknown; - defaultWireTransferDelay?: TalerProtocolDuration; - defaultPayDelay?: TalerProtocolDuration; -} - -// FIXME: Move all these types into merchant-api-types.ts! - -type FacadeCredentials = NoFacadeCredentials | BasicAuthFacadeCredentials; -interface NoFacadeCredentials { - type: "none"; -} -interface BasicAuthFacadeCredentials { - type: "basic"; - - // Username to use to authenticate - username: string; - - // Password to use to authenticate - password: string; -} - -interface MerchantBankAccount { - // The payto:// URI where the wallet will send coins. - payto_uri: string; - - // Optional base URL for a facade where the - // merchant backend can see incoming wire - // transfers to reconcile its accounting - // with that of the exchange. Used by - // taler-merchant-wirewatch. - credit_facade_url?: string; - - // Credentials for accessing the credit facade. - credit_facade_credentials?: FacadeCredentials; -} - -export interface MerchantInstanceConfig { - accounts: MerchantBankAccount[]; - auth: MerchantAuthConfiguration; - id: string; - name: string; - address: unknown; - jurisdiction: unknown; - use_stefan: boolean; - default_wire_transfer_delay: TalerProtocolDuration; - default_pay_delay: TalerProtocolDuration; -} - type TestStatus = "pass" | "fail" | "skip"; export interface TestRunResult { diff --git a/packages/taler-harness/src/harness/helpers.ts b/packages/taler-harness/src/harness/helpers.ts index 485e1baba..7b2f7d8f1 100644 --- a/packages/taler-harness/src/harness/helpers.ts +++ b/packages/taler-harness/src/harness/helpers.ts @@ -33,6 +33,7 @@ import { WalletNotification, TransactionMajorState, Logger, + MerchantApiClient, } from "@gnu-taler/taler-util"; import { BankAccessApi, @@ -53,7 +54,6 @@ import { FakebankService, getPayto, GlobalTestState, - MerchantApiClient, MerchantService, MerchantServiceInterface, setupDb, diff --git a/packages/taler-harness/src/index.ts b/packages/taler-harness/src/index.ts index 3b50acf75..ed2e545f7 100644 --- a/packages/taler-harness/src/index.ts +++ b/packages/taler-harness/src/index.ts @@ -24,6 +24,7 @@ import { decodeCrock, j2s, Logger, + MerchantApiClient, rsaBlind, setGlobalLogLevelFromString, } from "@gnu-taler/taler-util"; @@ -45,11 +46,7 @@ import { runBench2 } from "./bench2.js"; import { runBench3 } from "./bench3.js"; import { runEnvFull } from "./env-full.js"; import { runEnv1 } from "./env1.js"; -import { - GlobalTestState, - MerchantApiClient, - runTestWithState, -} from "./harness/harness.js"; +import { GlobalTestState, runTestWithState } from "./harness/harness.js"; import { getTestInfo, runTests } from "./integrationtests/testrunner.js"; import { lintExchangeDeployment } from "./lint.js"; diff --git a/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts index 45a035cc4..4e096e0ea 100644 --- a/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts +++ b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts @@ -1,6 +1,6 @@ /* This file is part of GNU Taler - (C) 2022 Taler Systems S.A. + (C) 2022-2023 Taler Systems S.A. GNU Taler is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -23,17 +23,14 @@ import { WireGatewayApiClient, } from "@gnu-taler/taler-wallet-core"; import { defaultCoinConfig } from "../harness/denomStructures.js"; -import { - getWireMethodForTest, - GlobalTestState, - MerchantApiClient, -} from "../harness/harness.js"; +import { getWireMethodForTest, GlobalTestState } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, createWalletDaemonWithClient, makeTestPaymentV2, withdrawViaBankV2, } from "../harness/helpers.js"; +import { MerchantApiClient } from "@gnu-taler/taler-util"; /** * Run test for basic, bank-integrated withdrawal and payment. @@ -57,9 +54,6 @@ export async function runAgeRestrictionsMerchantTest(t: GlobalTestState) { const merchantClient = new MerchantApiClient( merchant.makeInstanceBaseUrl("default"), - { - method: "external", - }, ); const { walletClient: walletClientTwo } = await createWalletDaemonWithClient( diff --git a/packages/taler-harness/src/integrationtests/test-claim-loop.ts b/packages/taler-harness/src/integrationtests/test-claim-loop.ts index 52841dbab..652df72ec 100644 --- a/packages/taler-harness/src/integrationtests/test-claim-loop.ts +++ b/packages/taler-harness/src/integrationtests/test-claim-loop.ts @@ -19,14 +19,12 @@ */ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { URL } from "url"; -import { - GlobalTestState, - MerchantApiClient, -} from "../harness/harness.js"; +import { GlobalTestState } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, } from "../harness/helpers.js"; +import { MerchantApiClient } from "@gnu-taler/taler-util"; /** * Run test for the merchant's order lifecycle. diff --git a/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts b/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts index a9282f394..afd0c901b 100644 --- a/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts +++ b/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts @@ -17,12 +17,13 @@ /** * Imports. */ -import { PreparePayResultType, TalerErrorCode } from "@gnu-taler/taler-util"; -import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { - GlobalTestState, MerchantApiClient, -} from "../harness/harness.js"; + PreparePayResultType, + TalerErrorCode, +} from "@gnu-taler/taler-util"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; +import { GlobalTestState } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, diff --git a/packages/taler-harness/src/integrationtests/test-kyc.ts b/packages/taler-harness/src/integrationtests/test-kyc.ts index 34ad46e03..22c8ce03c 100644 --- a/packages/taler-harness/src/integrationtests/test-kyc.ts +++ b/packages/taler-harness/src/integrationtests/test-kyc.ts @@ -26,11 +26,13 @@ import { TransactionMinorState, TransactionType, } from "@gnu-taler/taler-util"; +import { createPlatformHttpLib } from "@gnu-taler/taler-util/http"; import { BankAccessApi, BankApi, WalletApiOperation, } from "@gnu-taler/taler-wallet-core"; +import * as http from "node:http"; import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures.js"; import { BankService, @@ -43,8 +45,6 @@ import { WalletService, } from "../harness/harness.js"; import { EnvOptions, SimpleTestEnvironmentNg } from "../harness/helpers.js"; -import * as http from "node:http"; -import { createPlatformHttpLib } from "@gnu-taler/taler-util/http"; const logger = new Logger("test-kyc.ts"); diff --git a/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts b/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts index 3c71e0f7e..e8f5a435a 100644 --- a/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts @@ -20,6 +20,7 @@ import { codecForMerchantOrderStatusUnpaid, ConfirmPayResultType, + MerchantApiClient, PreparePayResultType, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; @@ -35,7 +36,6 @@ import { getPayto, GlobalTestState, harnessHttpLib, - MerchantApiClient, MerchantService, setupDb, } from "../harness/harness.js"; diff --git a/packages/taler-harness/src/integrationtests/test-merchant-instances-delete.ts b/packages/taler-harness/src/integrationtests/test-merchant-instances-delete.ts index 1c99dda76..ff567d33d 100644 --- a/packages/taler-harness/src/integrationtests/test-merchant-instances-delete.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-instances-delete.ts @@ -17,17 +17,15 @@ /** * Imports. */ -import { TalerError, URL } from "@gnu-taler/taler-util"; +import { MerchantApiClient, TalerError, URL } from "@gnu-taler/taler-util"; import { ExchangeService, GlobalTestState, - MerchantApiClient, MerchantService, - setupDb, getPayto, harnessHttpLib, + setupDb, } from "../harness/harness.js"; -import { createPlatformHttpLib } from "@gnu-taler/taler-util/http"; /** * Test instance deletion and authentication for it @@ -69,7 +67,9 @@ export async function runMerchantInstancesDeleteTest(t: GlobalTestState) { // Instances should initially be empty { - const r = await harnessHttpLib.fetch(new URL("management/instances", baseUrl).href); + const r = await harnessHttpLib.fetch( + new URL("management/instances", baseUrl).href, + ); const data = await r.json(); t.assertDeepEqual(data.instances, []); } diff --git a/packages/taler-harness/src/integrationtests/test-merchant-instances-urls.ts b/packages/taler-harness/src/integrationtests/test-merchant-instances-urls.ts index 18a09c76b..071288b0f 100644 --- a/packages/taler-harness/src/integrationtests/test-merchant-instances-urls.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-instances-urls.ts @@ -17,17 +17,15 @@ /** * Imports. */ -import { Duration } from "@gnu-taler/taler-util"; +import { Duration, MerchantApiClient } from "@gnu-taler/taler-util"; import { ExchangeService, GlobalTestState, - MerchantApiClient, MerchantService, - setupDb, getPayto, harnessHttpLib, + setupDb, } from "../harness/harness.js"; -import { createPlatformHttpLib } from "@gnu-taler/taler-util/http"; /** * Do basic checks on instance management and authentication. diff --git a/packages/taler-harness/src/integrationtests/test-merchant-instances.ts b/packages/taler-harness/src/integrationtests/test-merchant-instances.ts index 54205e9f2..fd7a8ca3a 100644 --- a/packages/taler-harness/src/integrationtests/test-merchant-instances.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-instances.ts @@ -17,17 +17,15 @@ /** * Imports. */ -import { URL } from "@gnu-taler/taler-util"; +import { MerchantApiClient, URL } from "@gnu-taler/taler-util"; import { ExchangeService, GlobalTestState, - MerchantApiClient, MerchantService, setupDb, getPayto, harnessHttpLib, } from "../harness/harness.js"; -import { createPlatformHttpLib } from "@gnu-taler/taler-util/http"; /** * Do basic checks on instance management and authentication. diff --git a/packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts b/packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts index d7ffa28d5..bd63a8445 100644 --- a/packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts @@ -19,16 +19,13 @@ */ import { ConfirmPayResultType, + MerchantApiClient, PreparePayResultType, URL, codecForMerchantOrderStatusUnpaid, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { - GlobalTestState, - MerchantApiClient, - harnessHttpLib, -} from "../harness/harness.js"; +import { GlobalTestState, harnessHttpLib } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, diff --git a/packages/taler-harness/src/integrationtests/test-merchant-refund-api.ts b/packages/taler-harness/src/integrationtests/test-merchant-refund-api.ts index ebca4f769..369f261dd 100644 --- a/packages/taler-harness/src/integrationtests/test-merchant-refund-api.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-refund-api.ts @@ -18,27 +18,27 @@ * Imports. */ import { + Duration, + MerchantApiClient, + PreparePayResultType, + URL, + durationFromSpec, +} from "@gnu-taler/taler-util"; +import { + BankServiceHandle, + WalletApiOperation, +} from "@gnu-taler/taler-wallet-core"; +import { + ExchangeServiceInterface, GlobalTestState, MerchantServiceInterface, - ExchangeServiceInterface, - harnessHttpLib, WalletClient, - MerchantApiClient, + harnessHttpLib, } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, } from "../harness/helpers.js"; -import { - URL, - durationFromSpec, - PreparePayResultType, - Duration, -} from "@gnu-taler/taler-util"; -import { - WalletApiOperation, - BankServiceHandle, -} from "@gnu-taler/taler-wallet-core"; async function testRefundApiWithFulfillmentUrl( t: GlobalTestState, diff --git a/packages/taler-harness/src/integrationtests/test-merchant-spec-public-orders.ts b/packages/taler-harness/src/integrationtests/test-merchant-spec-public-orders.ts index 599a3fc16..afae8a899 100644 --- a/packages/taler-harness/src/integrationtests/test-merchant-spec-public-orders.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-spec-public-orders.ts @@ -19,6 +19,7 @@ */ import { ConfirmPayResultType, + MerchantApiClient, PreparePayResultType, URL, encodeCrock, @@ -29,7 +30,6 @@ import { BankService, ExchangeService, GlobalTestState, - MerchantApiClient, MerchantService, harnessHttpLib, } from "../harness/harness.js"; diff --git a/packages/taler-harness/src/integrationtests/test-pay-paid.ts b/packages/taler-harness/src/integrationtests/test-pay-paid.ts index 4fe13b3ae..3d93f6e29 100644 --- a/packages/taler-harness/src/integrationtests/test-pay-paid.ts +++ b/packages/taler-harness/src/integrationtests/test-pay-paid.ts @@ -18,22 +18,19 @@ * Imports. */ import { - GlobalTestState, + ConfirmPayResultType, MerchantApiClient, - harnessHttpLib, -} from "../harness/harness.js"; -import { - createFaultInjectedMerchantTestkudosEnvironment, - withdrawViaBankV2, -} from "../harness/helpers.js"; -import { PreparePayResultType, - codecForMerchantOrderStatusUnpaid, - ConfirmPayResultType, URL, + codecForMerchantOrderStatusUnpaid, } from "@gnu-taler/taler-util"; -import { FaultInjectionRequestContext } from "../harness/faultInjection.js"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; +import { FaultInjectionRequestContext } from "../harness/faultInjection.js"; +import { GlobalTestState, harnessHttpLib } from "../harness/harness.js"; +import { + createFaultInjectedMerchantTestkudosEnvironment, + withdrawViaBankV2, +} from "../harness/helpers.js"; /** * Run test for the wallets repurchase detection mechanism diff --git a/packages/taler-harness/src/integrationtests/test-payment-abort.ts b/packages/taler-harness/src/integrationtests/test-payment-abort.ts index 22e087161..3164bbaf3 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-abort.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-abort.ts @@ -18,25 +18,22 @@ * Imports. */ import { - GlobalTestState, - MerchantApiClient, - harnessHttpLib, -} from "../harness/harness.js"; -import { - createFaultInjectedMerchantTestkudosEnvironment, - withdrawViaBankV2, -} from "../harness/helpers.js"; -import { FaultInjectionRequestContext } from "../harness/faultInjection.js"; -import { - codecForMerchantOrderStatusUnpaid, ConfirmPayResultType, - j2s, + MerchantApiClient, PreparePayResultType, TalerErrorCode, TalerErrorDetail, URL, + codecForMerchantOrderStatusUnpaid, + j2s, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; +import { FaultInjectionRequestContext } from "../harness/faultInjection.js"; +import { GlobalTestState, harnessHttpLib } from "../harness/harness.js"; +import { + createFaultInjectedMerchantTestkudosEnvironment, + withdrawViaBankV2, +} from "../harness/helpers.js"; export async function runPaymentAbortTest(t: GlobalTestState) { // Set up test environment diff --git a/packages/taler-harness/src/integrationtests/test-payment-claim.ts b/packages/taler-harness/src/integrationtests/test-payment-claim.ts index df86b3cbf..b5ed89ec3 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-claim.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-claim.ts @@ -17,9 +17,13 @@ /** * Imports. */ -import { PreparePayResultType, TalerErrorCode } from "@gnu-taler/taler-util"; +import { + MerchantApiClient, + PreparePayResultType, + TalerErrorCode, +} from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantApiClient, WalletCli } from "../harness/harness.js"; +import { GlobalTestState, WalletCli } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, diff --git a/packages/taler-harness/src/integrationtests/test-payment-expired.ts b/packages/taler-harness/src/integrationtests/test-payment-expired.ts index 4817efba5..176fc74f7 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-expired.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-expired.ts @@ -17,21 +17,22 @@ /** * Imports. */ -import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; -import { - applyTimeTravelV2, - createSimpleTestkudosEnvironmentV2, - withdrawViaBankV2, -} from "../harness/helpers.js"; import { AbsoluteTime, ConfirmPayResultType, Duration, + MerchantApiClient, MerchantContractTerms, PreparePayResultType, j2s, } from "@gnu-taler/taler-util"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; +import { GlobalTestState } from "../harness/harness.js"; +import { + applyTimeTravelV2, + createSimpleTestkudosEnvironmentV2, + withdrawViaBankV2, +} from "../harness/helpers.js"; /** * Run a test for the following scenario: diff --git a/packages/taler-harness/src/integrationtests/test-payment-fault.ts b/packages/taler-harness/src/integrationtests/test-payment-fault.ts index 5d0fe6e13..70fa587e7 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-fault.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-fault.ts @@ -21,28 +21,27 @@ /** * Imports. */ +import { CoreApiResponse, MerchantApiClient } from "@gnu-taler/taler-util"; import { - GlobalTestState, - MerchantService, - ExchangeService, - setupDb, - BankService, - WalletCli, - getPayto, - MerchantApiClient, -} from "../harness/harness.js"; + BankAccessApi, + BankApi, + WalletApiOperation, +} from "@gnu-taler/taler-wallet-core"; +import { defaultCoinConfig } from "../harness/denomStructures.js"; import { FaultInjectedExchangeService, FaultInjectionRequestContext, FaultInjectionResponseContext, } from "../harness/faultInjection.js"; -import { CoreApiResponse } from "@gnu-taler/taler-util"; -import { defaultCoinConfig } from "../harness/denomStructures.js"; import { - WalletApiOperation, - BankApi, - BankAccessApi, -} from "@gnu-taler/taler-wallet-core"; + BankService, + ExchangeService, + GlobalTestState, + MerchantService, + WalletCli, + getPayto, + setupDb, +} from "../harness/harness.js"; /** * Run test for basic, bank-integrated withdrawal. diff --git a/packages/taler-harness/src/integrationtests/test-payment-idempotency.ts b/packages/taler-harness/src/integrationtests/test-payment-idempotency.ts index e06ef1322..65fd3a562 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-idempotency.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-idempotency.ts @@ -17,9 +17,9 @@ /** * Imports. */ -import { PreparePayResultType } from "@gnu-taler/taler-util"; +import { MerchantApiClient, PreparePayResultType } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; +import { GlobalTestState } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, diff --git a/packages/taler-harness/src/integrationtests/test-payment-multiple.ts b/packages/taler-harness/src/integrationtests/test-payment-multiple.ts index b22bba43f..23972ed63 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-multiple.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-multiple.ts @@ -17,17 +17,17 @@ /** * Imports. */ +import { MerchantApiClient } from "@gnu-taler/taler-util"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; +import { coin_ct10, coin_u1 } from "../harness/denomStructures.js"; import { - GlobalTestState, - setupDb, BankService, ExchangeService, + GlobalTestState, MerchantService, getPayto, - MerchantApiClient, + setupDb, } from "../harness/harness.js"; -import { coin_ct10, coin_u1 } from "../harness/denomStructures.js"; -import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { createWalletDaemonWithClient, withdrawViaBankV2, diff --git a/packages/taler-harness/src/integrationtests/test-payment-share.ts b/packages/taler-harness/src/integrationtests/test-payment-share.ts index c12140d06..c4a82c917 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-share.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-share.ts @@ -19,10 +19,11 @@ */ import { ConfirmPayResultType, + MerchantApiClient, PreparePayResultType, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; +import { GlobalTestState } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, createWalletDaemonWithClient, diff --git a/packages/taler-harness/src/integrationtests/test-payment-template.ts b/packages/taler-harness/src/integrationtests/test-payment-template.ts index 2058991d0..e77236a9a 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-template.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-template.ts @@ -20,10 +20,11 @@ import { ConfirmPayResultType, Duration, + MerchantApiClient, PreparePayResultType, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; +import { GlobalTestState } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, diff --git a/packages/taler-harness/src/integrationtests/test-payment-transient.ts b/packages/taler-harness/src/integrationtests/test-payment-transient.ts index 3bc59aa8f..46e57735f 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-transient.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-transient.ts @@ -19,6 +19,7 @@ */ import { ConfirmPayResultType, + MerchantApiClient, PreparePayResultType, TalerErrorCode, TalerErrorDetail, @@ -27,11 +28,7 @@ import { } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { FaultInjectionResponseContext } from "../harness/faultInjection.js"; -import { - GlobalTestState, - MerchantApiClient, - harnessHttpLib, -} from "../harness/harness.js"; +import { GlobalTestState, harnessHttpLib } from "../harness/harness.js"; import { createFaultInjectedMerchantTestkudosEnvironment, withdrawViaBankV2, diff --git a/packages/taler-harness/src/integrationtests/test-paywall-flow.ts b/packages/taler-harness/src/integrationtests/test-paywall-flow.ts index fd13f37d6..247ec9cad 100644 --- a/packages/taler-harness/src/integrationtests/test-paywall-flow.ts +++ b/packages/taler-harness/src/integrationtests/test-paywall-flow.ts @@ -18,17 +18,14 @@ * Imports. */ import { - GlobalTestState, + ConfirmPayResultType, MerchantApiClient, - harnessHttpLib, -} from "../harness/harness.js"; -import { PreparePayResultType, - codecForMerchantOrderStatusUnpaid, - ConfirmPayResultType, URL, + codecForMerchantOrderStatusUnpaid, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; +import { GlobalTestState, harnessHttpLib } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, diff --git a/packages/taler-harness/src/integrationtests/test-refund-auto.ts b/packages/taler-harness/src/integrationtests/test-refund-auto.ts index 9e1f31af2..e8bfecefa 100644 --- a/packages/taler-harness/src/integrationtests/test-refund-auto.ts +++ b/packages/taler-harness/src/integrationtests/test-refund-auto.ts @@ -17,9 +17,13 @@ /** * Imports. */ -import { Duration, durationFromSpec } from "@gnu-taler/taler-util"; +import { + Duration, + MerchantApiClient, + durationFromSpec, +} from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; +import { GlobalTestState } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, diff --git a/packages/taler-harness/src/integrationtests/test-refund-gone.ts b/packages/taler-harness/src/integrationtests/test-refund-gone.ts index 954262826..9ba078a6d 100644 --- a/packages/taler-harness/src/integrationtests/test-refund-gone.ts +++ b/packages/taler-harness/src/integrationtests/test-refund-gone.ts @@ -17,18 +17,19 @@ /** * Imports. */ -import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; -import { - applyTimeTravelV2, - createSimpleTestkudosEnvironmentV2, - withdrawViaBankV2, -} from "../harness/helpers.js"; import { AbsoluteTime, Duration, + MerchantApiClient, durationFromSpec, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; +import { GlobalTestState } from "../harness/harness.js"; +import { + applyTimeTravelV2, + createSimpleTestkudosEnvironmentV2, + withdrawViaBankV2, +} from "../harness/helpers.js"; /** * Run test for basic, bank-integrated withdrawal. diff --git a/packages/taler-harness/src/integrationtests/test-refund-incremental.ts b/packages/taler-harness/src/integrationtests/test-refund-incremental.ts index 7c895ad2b..e7e041ce6 100644 --- a/packages/taler-harness/src/integrationtests/test-refund-incremental.ts +++ b/packages/taler-harness/src/integrationtests/test-refund-incremental.ts @@ -20,15 +20,12 @@ import { Amounts, Duration, + MerchantApiClient, TransactionType, durationFromSpec, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { - GlobalTestState, - MerchantApiClient, - delayMs, -} from "../harness/harness.js"; +import { GlobalTestState, delayMs } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, diff --git a/packages/taler-harness/src/integrationtests/test-refund.ts b/packages/taler-harness/src/integrationtests/test-refund.ts index 3dc2748fe..aeeb91f38 100644 --- a/packages/taler-harness/src/integrationtests/test-refund.ts +++ b/packages/taler-harness/src/integrationtests/test-refund.ts @@ -20,11 +20,12 @@ import { Duration, durationFromSpec, + MerchantApiClient, NotificationType, TransactionMajorState, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; +import { GlobalTestState } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, diff --git a/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts b/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts index 420e4fddc..b94f7757c 100644 --- a/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts +++ b/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts @@ -21,6 +21,7 @@ import { ConfirmPayResultType, Duration, durationFromSpec, + MerchantApiClient, PreparePayResultType, } from "@gnu-taler/taler-util"; import { @@ -31,11 +32,10 @@ import { makeNoFeeCoinConfig } from "../harness/denomStructures.js"; import { BankService, ExchangeService, + getPayto, GlobalTestState, MerchantService, setupDb, - getPayto, - MerchantApiClient, } from "../harness/harness.js"; import { applyTimeTravelV2, diff --git a/packages/taler-harness/src/integrationtests/test-tipping.ts b/packages/taler-harness/src/integrationtests/test-tipping.ts index 93855f546..f4a7c020e 100644 --- a/packages/taler-harness/src/integrationtests/test-tipping.ts +++ b/packages/taler-harness/src/integrationtests/test-tipping.ts @@ -17,18 +17,17 @@ /** * Imports. */ +import { + MerchantApiClient, + TransactionMajorState, +} from "@gnu-taler/taler-util"; import { BankAccessApiClient, WalletApiOperation, WireGatewayApiClient, } from "@gnu-taler/taler-wallet-core"; -import { - GlobalTestState, - MerchantApiClient, - getWireMethodForTest, -} from "../harness/harness.js"; +import { GlobalTestState, getWireMethodForTest } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2 } from "../harness/helpers.js"; -import { TransactionMajorState } from "@gnu-taler/taler-util"; /** * Run test for basic, bank-integrated withdrawal. diff --git a/packages/taler-harness/src/integrationtests/test-wallet-backup-doublespend.ts b/packages/taler-harness/src/integrationtests/test-wallet-backup-doublespend.ts index 62ae89137..c761c4fb0 100644 --- a/packages/taler-harness/src/integrationtests/test-wallet-backup-doublespend.ts +++ b/packages/taler-harness/src/integrationtests/test-wallet-backup-doublespend.ts @@ -17,9 +17,9 @@ /** * Imports. */ -import { PreparePayResultType } from "@gnu-taler/taler-util"; +import { MerchantApiClient, PreparePayResultType } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; +import { GlobalTestState } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, createWalletDaemonWithClient, @@ -126,11 +126,9 @@ export async function runWalletBackupDoublespendTest(t: GlobalTestState) { }, }); - let orderStatus = await merchantClient.queryPrivateOrderStatus( - { - orderId: orderResp.order_id, - }, - ); + let orderStatus = await merchantClient.queryPrivateOrderStatus({ + orderId: orderResp.order_id, + }); t.assertTrue(orderStatus.order_status === "unpaid"); diff --git a/packages/taler-harness/src/integrationtests/test-wallet-balance.ts b/packages/taler-harness/src/integrationtests/test-wallet-balance.ts index 9711aff26..243c90e2e 100644 --- a/packages/taler-harness/src/integrationtests/test-wallet-balance.ts +++ b/packages/taler-harness/src/integrationtests/test-wallet-balance.ts @@ -17,9 +17,13 @@ /** * Imports. */ -import { Amounts, PreparePayResultType } from "@gnu-taler/taler-util"; +import { + Amounts, + MerchantApiClient, + PreparePayResultType, +} from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { GlobalTestState, MerchantApiClient } from "../harness/harness.js"; +import { GlobalTestState } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2, withdrawViaBankV2, diff --git a/packages/taler-util/src/index.ts b/packages/taler-util/src/index.ts index cfd0f7c47..0b75619ab 100644 --- a/packages/taler-util/src/index.ts +++ b/packages/taler-util/src/index.ts @@ -39,3 +39,5 @@ export * from "./merchant-api-types.js"; export * from "./errors.js"; export * from "./iban.js"; export * from "./transaction-test-data.js"; +export * from "./libeufin-api-types.js"; +export * from "./MerchantApiClient.js"; diff --git a/packages/taler-util/src/merchant-api-types.ts b/packages/taler-util/src/merchant-api-types.ts index ce30aa054..9933b93dc 100644 --- a/packages/taler-util/src/merchant-api-types.ts +++ b/packages/taler-util/src/merchant-api-types.ts @@ -47,7 +47,7 @@ import { WireAccount, codecForWireAccount, codecForList, - HashCodeString, + FacadeCredentials, } from "@gnu-taler/taler-util"; export interface MerchantPostOrderRequest { @@ -401,21 +401,3 @@ export interface AccountAddDetails { // To really delete credentials, set them to the type: "none". credit_facade_credentials?: FacadeCredentials; } - -export type FacadeCredentials = - | NoFacadeCredentials - | BasicAuthFacadeCredentials; - -export interface NoFacadeCredentials { - type: "none"; -} - -export interface BasicAuthFacadeCredentials { - type: "basic"; - - // Username to use to authenticate - username: string; - - // Password to use to authenticate - password: string; -} -- cgit v1.2.3 From 7450bede5b5809f6a496b7e68852a454386850e5 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 6 Sep 2023 12:32:31 +0200 Subject: get rid of deprecated bank API client, change allowHttp to requireTls --- packages/anastasis-core/src/index.ts | 1 - packages/taler-harness/src/bench2.ts | 1 - packages/taler-harness/src/bench3.ts | 1 - packages/taler-harness/src/harness/harness.ts | 51 ++--- packages/taler-harness/src/harness/helpers.ts | 11 +- .../taler-harness/src/harness/libeufin-apis.ts | 5 +- packages/taler-harness/src/index.ts | 15 +- .../test-age-restrictions-merchant.ts | 20 +- .../src/integrationtests/test-bank-api.ts | 28 ++- .../src/integrationtests/test-exchange-deposit.ts | 1 - .../integrationtests/test-exchange-management.ts | 12 +- .../integrationtests/test-exchange-timetravel.ts | 1 - .../taler-harness/src/integrationtests/test-kyc.ts | 12 +- .../src/integrationtests/test-payment-fault.ts | 14 +- .../src/integrationtests/test-tipping.ts | 22 +- .../integrationtests/test-wallet-notifications.ts | 7 +- .../integrationtests/test-withdrawal-abort-bank.ts | 7 +- .../test-withdrawal-bank-integrated.ts | 12 +- .../src/integrationtests/test-withdrawal-fees.ts | 7 +- .../src/integrationtests/test-withdrawal-manual.ts | 22 +- packages/taler-harness/src/lint.ts | 1 - packages/taler-util/src/MerchantApiClient.ts | 5 +- packages/taler-util/src/http-common.ts | 5 +- packages/taler-util/src/http-impl.node.ts | 6 +- packages/taler-util/src/http-impl.qtart.ts | 6 +- packages/taler-wallet-cli/src/index.ts | 7 +- packages/taler-wallet-core/src/bank-api-client.ts | 250 ++++----------------- packages/taler-wallet-core/src/dbless.ts | 26 +-- packages/taler-wallet-core/src/host-impl.node.ts | 2 +- packages/taler-wallet-core/src/host-impl.qtart.ts | 2 +- 30 files changed, 188 insertions(+), 372 deletions(-) (limited to 'packages/taler-harness/src/harness/helpers.ts') diff --git a/packages/anastasis-core/src/index.ts b/packages/anastasis-core/src/index.ts index 88f3bdbe2..89cf186dd 100644 --- a/packages/anastasis-core/src/index.ts +++ b/packages/anastasis-core/src/index.ts @@ -138,7 +138,6 @@ export * as validators from "./validators.js"; export * from "./challenge-feedback-types.js"; const httpLib = createPlatformHttpLib({ - allowHttp: true, enableThrottling: false, }); diff --git a/packages/taler-harness/src/bench2.ts b/packages/taler-harness/src/bench2.ts index 48ac76b9f..53db6f6c1 100644 --- a/packages/taler-harness/src/bench2.ts +++ b/packages/taler-harness/src/bench2.ts @@ -57,7 +57,6 @@ export async function runBench2(configJson: any): Promise { const http = createPlatformHttpLib({ enableThrottling: false, - allowHttp: true, }); const numIter = benchConf.iterations ?? 1; diff --git a/packages/taler-harness/src/bench3.ts b/packages/taler-harness/src/bench3.ts index c7eca90a8..0b5371af5 100644 --- a/packages/taler-harness/src/bench3.ts +++ b/packages/taler-harness/src/bench3.ts @@ -52,7 +52,6 @@ export async function runBench3(configJson: any): Promise { const myHttpLib = createPlatformHttpLib({ enableThrottling: false, - allowHttp: true, }); const numIter = b3conf.iterations ?? 1; diff --git a/packages/taler-harness/src/harness/harness.ts b/packages/taler-harness/src/harness/harness.ts index df3c9b215..d0719b4f7 100644 --- a/packages/taler-harness/src/harness/harness.ts +++ b/packages/taler-harness/src/harness/harness.ts @@ -25,62 +25,46 @@ * Imports */ import { + AccountAddDetails, AmountJson, Amounts, - AmountString, - codecForMerchantOrderPrivateStatusResponse, - codecForMerchantPostOrderResponse, - codecForMerchantReserveCreateConfirmation, Configuration, CoreApiResponse, - createEddsaKeyPair, Duration, - eddsaGetPublic, EddsaKeyPair, + Logger, + MerchantInstanceConfig, + PartialMerchantInstanceConfig, + TalerError, + WalletNotification, + createEddsaKeyPair, + eddsaGetPublic, encodeCrock, hash, j2s, - Logger, - MerchantInstancesResponse, - MerchantOrderPrivateStatusResponse, - MerchantPostOrderRequest, - MerchantPostOrderResponse, - MerchantReserveCreateConfirmation, - MerchantTemplateAddDetails, parsePaytoUri, stringToBytes, - TalerError, - TalerProtocolDuration, - RewardCreateConfirmation, - RewardCreateRequest, - TippingReserveStatus, - WalletNotification, - codecForAny, - AccountAddDetails, - MerchantInstanceConfig, - PartialMerchantInstanceConfig, } from "@gnu-taler/taler-util"; import { createPlatformHttpLib, expectSuccessResponseOrThrow, - readSuccessResponseJsonOrThrow, } from "@gnu-taler/taler-util/http"; import { - BankApi, + BankAccessApiClient, BankServiceHandle, HarnessExchangeBankAccount, - openPromise, WalletCoreApiClient, WalletCoreRequestType, WalletCoreResponseType, WalletOperations, + openPromise, } from "@gnu-taler/taler-wallet-core"; import { + RemoteWallet, + WalletNotificationWaiter, createRemoteWallet, getClientFromRemoteWallet, makeNotificationWaiter, - RemoteWallet, - WalletNotificationWaiter, } from "@gnu-taler/taler-wallet-core/remote"; import { deepStrictEqual } from "assert"; import { ChildProcess, spawn } from "child_process"; @@ -594,7 +578,7 @@ export class FakebankService { proc: ProcessWrapper | undefined; - http = createPlatformHttpLib({ allowHttp: true, enableThrottling: false }); + http = createPlatformHttpLib({ enableThrottling: false }); // We store "created" accounts during setup and // register them after startup. @@ -702,13 +686,9 @@ export class FakebankService "bank", ); await this.pingUntilAvailable(); + const bankClient = new BankAccessApiClient(this.bankAccessApiBaseUrl); for (const acc of this.accounts) { - await BankApi.registerAccount( - this, - acc.accountName, - acc.accountPassword, - {}, - ); + await bankClient.registerAccount(acc.accountName, acc.accountPassword); } } @@ -1351,7 +1331,6 @@ export interface MerchantServiceInterface { * Default HTTP client handle for the integration test harness. */ export const harnessHttpLib = createPlatformHttpLib({ - allowHttp: true, enableThrottling: false, }); diff --git a/packages/taler-harness/src/harness/helpers.ts b/packages/taler-harness/src/harness/helpers.ts index 7b2f7d8f1..f92fd4dd9 100644 --- a/packages/taler-harness/src/harness/helpers.ts +++ b/packages/taler-harness/src/harness/helpers.ts @@ -36,8 +36,7 @@ import { MerchantApiClient, } from "@gnu-taler/taler-util"; import { - BankAccessApi, - BankApi, + BankAccessApiClient, HarnessExchangeBankAccount, WalletApiOperation, } from "@gnu-taler/taler-wallet-core"; @@ -563,8 +562,10 @@ export async function withdrawViaBankV2( ): Promise { const { walletClient: wallet, bank, exchange, amount } = p; - const user = await BankApi.createRandomBankUser(bank); - const wop = await BankAccessApi.createWithdrawalOperation(bank, user, amount); + const bankClient = new BankAccessApiClient(bank.bankAccessApiBaseUrl); + + const user = await bankClient.createRandomBankUser(); + const wop = await bankClient.createWithdrawalOperation(user.username, amount); // Hand it to the wallet @@ -593,7 +594,7 @@ export async function withdrawViaBankV2( // Confirm it - await BankApi.confirmWithdrawalOperation(bank, user, wop); + await bankClient.confirmWithdrawalOperation(user.username, wop); return { withdrawalFinishedCond, diff --git a/packages/taler-harness/src/harness/libeufin-apis.ts b/packages/taler-harness/src/harness/libeufin-apis.ts index 0553223cb..0193f9252 100644 --- a/packages/taler-harness/src/harness/libeufin-apis.ts +++ b/packages/taler-harness/src/harness/libeufin-apis.ts @@ -176,10 +176,7 @@ export interface LibeufinSandboxAddIncomingRequest { direction: string; } -const libeufinHarnessHttpLib = createPlatformHttpLib({ - allowHttp: true, - enableThrottling: false, -}); +const libeufinHarnessHttpLib = createPlatformHttpLib(); /** * APIs spread across Legacy and Access, it is therefore diff --git a/packages/taler-harness/src/index.ts b/packages/taler-harness/src/index.ts index ed2e545f7..185f6226d 100644 --- a/packages/taler-harness/src/index.ts +++ b/packages/taler-harness/src/index.ts @@ -236,14 +236,15 @@ deploymentCli console.log(tipReserveResp); - const bankAccessApiClient = new BankAccessApiClient({ - baseUrl: args.tipTopup.bankAccessUrl, - auth: { - username: args.tipTopup.bankAccount, - password: args.tipTopup.bankPassword, + const bankAccessApiClient = new BankAccessApiClient( + args.tipTopup.bankAccessUrl, + { + auth: { + username: args.tipTopup.bankAccount, + password: args.tipTopup.bankPassword, + }, }, - allowHttp: true, - }); + ); const paytoUri = addPaytoQueryParams(tipReserveResp.accounts[0].payto_uri, { message: `tip-reserve ${tipReserveResp.reserve_pub}`, diff --git a/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts index 4e096e0ea..bff13ae40 100644 --- a/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts +++ b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts @@ -18,7 +18,7 @@ * Imports. */ import { - BankApi, + BankAccessApiClient, WalletApiOperation, WireGatewayApiClient, } from "@gnu-taler/taler-wallet-core"; @@ -179,7 +179,8 @@ export async function runAgeRestrictionsMerchantTest(t: GlobalTestState) { // Pay with coin from tipping { - const mbu = await BankApi.createRandomBankUser(bank); + const bankClient = new BankAccessApiClient(bank.bankAccessApiBaseUrl); + const mbu = await bankClient.createRandomBankUser(); const tipReserveResp = await merchantClient.createTippingReserve({ exchange_url: exchange.baseUrl, initial_balance: "TESTKUDOS:10", @@ -191,12 +192,15 @@ export async function runAgeRestrictionsMerchantTest(t: GlobalTestState) { exchangeBankAccount.accountPaytoUri, ); - const wireGatewayApiClient = new WireGatewayApiClient({ - wireGatewayApiBaseUrl: exchangeBankAccount.wireGatewayApiBaseUrl, - accountName: exchangeBankAccount.accountName, - accountPassword: exchangeBankAccount.accountPassword, - allowHttp: true, - }); + const wireGatewayApiClient = new WireGatewayApiClient( + exchangeBankAccount.wireGatewayApiBaseUrl, + { + auth: { + username: exchangeBankAccount.accountName, + password: exchangeBankAccount.accountPassword, + }, + }, + ); await wireGatewayApiClient.adminAddIncoming({ amount: "TESTKUDOS:10", diff --git a/packages/taler-harness/src/integrationtests/test-bank-api.ts b/packages/taler-harness/src/integrationtests/test-bank-api.ts index e645d60f1..afb06b61a 100644 --- a/packages/taler-harness/src/integrationtests/test-bank-api.ts +++ b/packages/taler-harness/src/integrationtests/test-bank-api.ts @@ -19,8 +19,7 @@ */ import { createEddsaKeyPair, encodeCrock } from "@gnu-taler/taler-util"; import { - BankAccessApi, - BankApi, + BankAccessApiClient, CreditDebitIndicator, WireGatewayApiClient, } from "@gnu-taler/taler-wallet-core"; @@ -99,17 +98,19 @@ export async function runBankApiTest(t: GlobalTestState) { console.log("setup done!"); - const bankUser = await BankApi.registerAccount(bank, "user1", "pw1", {}); + const bankClient = new BankAccessApiClient(bank.bankAccessApiBaseUrl); + + const bankUser = await bankClient.registerAccount("user1", "pw1"); // Make sure that registering twice results in a 409 Conflict { const e = await t.assertThrowsTalerErrorAsync(async () => { - await BankApi.registerAccount(bank, "user1", "pw2", {}); + await bankClient.registerAccount("user1", "pw1"); }); t.assertTrue(e.errorDetail.httpStatusCode === 409); } - let balResp = await BankAccessApi.getAccountBalance(bank, bankUser); + let balResp = await bankClient.getAccountBalance(bankUser.username); console.log(balResp); @@ -121,12 +122,15 @@ export async function runBankApiTest(t: GlobalTestState) { const res = createEddsaKeyPair(); - const wireGatewayApiClient = new WireGatewayApiClient({ - wireGatewayApiBaseUrl: exchangeBankAccount.wireGatewayApiBaseUrl, - accountName: exchangeBankAccount.accountName, - accountPassword: exchangeBankAccount.accountPassword, - allowHttp: true, - }); + const wireGatewayApiClient = new WireGatewayApiClient( + exchangeBankAccount.wireGatewayApiBaseUrl, + { + auth: { + username: exchangeBankAccount.accountName, + password: exchangeBankAccount.accountPassword, + }, + }, + ); await wireGatewayApiClient.adminAddIncoming({ amount: "TESTKUDOS:115", @@ -134,7 +138,7 @@ export async function runBankApiTest(t: GlobalTestState) { reservePub: encodeCrock(res.eddsaPub), }); - balResp = await BankAccessApi.getAccountBalance(bank, bankUser); + balResp = await bankClient.getAccountBalance(bankUser.username); t.assertAmountEquals(balResp.balance.amount, "TESTKUDOS:15"); t.assertTrue( balResp.balance.credit_debit_indicator === CreditDebitIndicator.Debit, diff --git a/packages/taler-harness/src/integrationtests/test-exchange-deposit.ts b/packages/taler-harness/src/integrationtests/test-exchange-deposit.ts index 05bbbfaa1..96255f5b5 100644 --- a/packages/taler-harness/src/integrationtests/test-exchange-deposit.ts +++ b/packages/taler-harness/src/integrationtests/test-exchange-deposit.ts @@ -49,7 +49,6 @@ export async function runExchangeDepositTest(t: GlobalTestState) { const { bank, exchange } = await createSimpleTestkudosEnvironmentV2(t); const http = createPlatformHttpLib({ - allowHttp: true, enableThrottling: false, }); const cryptiDisp = new CryptoDispatcher( diff --git a/packages/taler-harness/src/integrationtests/test-exchange-management.ts b/packages/taler-harness/src/integrationtests/test-exchange-management.ts index 718cee0d7..19be7c962 100644 --- a/packages/taler-harness/src/integrationtests/test-exchange-management.ts +++ b/packages/taler-harness/src/integrationtests/test-exchange-management.ts @@ -28,8 +28,7 @@ import { } from "../harness/harness.js"; import { WalletApiOperation, - BankApi, - BankAccessApi, + BankAccessApiClient, } from "@gnu-taler/taler-wallet-core"; import { ExchangesListResponse, @@ -266,10 +265,11 @@ export async function runExchangeManagementTest( // Create withdrawal operation - const user = await BankApi.createRandomBankUser(bank); - const wop = await BankAccessApi.createWithdrawalOperation( - bank, - user, + const bankClient = new BankAccessApiClient(bank.bankAccessApiBaseUrl); + + const user = await bankClient.createRandomBankUser(); + const wop = await bankClient.createWithdrawalOperation( + user.username, "TESTKUDOS:10", ); diff --git a/packages/taler-harness/src/integrationtests/test-exchange-timetravel.ts b/packages/taler-harness/src/integrationtests/test-exchange-timetravel.ts index 401cc4ff2..2ef7683b3 100644 --- a/packages/taler-harness/src/integrationtests/test-exchange-timetravel.ts +++ b/packages/taler-harness/src/integrationtests/test-exchange-timetravel.ts @@ -94,7 +94,6 @@ function getDenomInfoFromKeys(ek: ExchangeKeysJson): DenomInfo[] { } const http = createPlatformHttpLib({ - allowHttp: true, enableThrottling: false, }); diff --git a/packages/taler-harness/src/integrationtests/test-kyc.ts b/packages/taler-harness/src/integrationtests/test-kyc.ts index 22c8ce03c..88875d4fc 100644 --- a/packages/taler-harness/src/integrationtests/test-kyc.ts +++ b/packages/taler-harness/src/integrationtests/test-kyc.ts @@ -28,8 +28,7 @@ import { } from "@gnu-taler/taler-util"; import { createPlatformHttpLib } from "@gnu-taler/taler-util/http"; import { - BankAccessApi, - BankApi, + BankAccessApiClient, WalletApiOperation, } from "@gnu-taler/taler-wallet-core"; import * as http from "node:http"; @@ -305,9 +304,11 @@ export async function runKycTest(t: GlobalTestState) { // Withdraw digital cash into the wallet. + const bankClient = new BankAccessApiClient(bank.bankAccessApiBaseUrl); + const amount = "TESTKUDOS:20"; - const user = await BankApi.createRandomBankUser(bank); - const wop = await BankAccessApi.createWithdrawalOperation(bank, user, amount); + const user = await bankClient.createRandomBankUser(); + const wop = await bankClient.createWithdrawalOperation(user.username, amount); // Hand it to the wallet @@ -332,7 +333,7 @@ export async function runKycTest(t: GlobalTestState) { // Confirm it - await BankApi.confirmWithdrawalOperation(bank, user, wop); + await bankClient.confirmWithdrawalOperation(user.username, wop); const kycNotificationCond = walletClient.waitForNotificationCond((x) => { if ( @@ -376,7 +377,6 @@ export async function runKycTest(t: GlobalTestState) { // which would usually done in the browser. const httpLib = createPlatformHttpLib({ - allowHttp: true, enableThrottling: false, }); const kycServerResp = await httpLib.fetch(kycUrl); diff --git a/packages/taler-harness/src/integrationtests/test-payment-fault.ts b/packages/taler-harness/src/integrationtests/test-payment-fault.ts index 70fa587e7..3ad11d82d 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-fault.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-fault.ts @@ -23,8 +23,7 @@ */ import { CoreApiResponse, MerchantApiClient } from "@gnu-taler/taler-util"; import { - BankAccessApi, - BankApi, + BankAccessApiClient, WalletApiOperation, } from "@gnu-taler/taler-wallet-core"; import { defaultCoinConfig } from "../harness/denomStructures.js"; @@ -127,10 +126,11 @@ export async function runPaymentFaultTest(t: GlobalTestState) { // Create withdrawal operation - const user = await BankApi.createRandomBankUser(bank); - const wop = await BankAccessApi.createWithdrawalOperation( - bank, - user, + const bankClient = new BankAccessApiClient(bank.bankAccessApiBaseUrl); + + const user = await bankClient.createRandomBankUser(); + const wop = await bankClient.createWithdrawalOperation( + user.username, "TESTKUDOS:20", ); @@ -152,7 +152,7 @@ export async function runPaymentFaultTest(t: GlobalTestState) { // Confirm it - await BankApi.confirmWithdrawalOperation(bank, user, wop); + await bankClient.confirmWithdrawalOperation(user.username, wop); await wallet.runUntilDone(); diff --git a/packages/taler-harness/src/integrationtests/test-tipping.ts b/packages/taler-harness/src/integrationtests/test-tipping.ts index f4a7c020e..9b980acad 100644 --- a/packages/taler-harness/src/integrationtests/test-tipping.ts +++ b/packages/taler-harness/src/integrationtests/test-tipping.ts @@ -38,10 +38,9 @@ export async function runTippingTest(t: GlobalTestState) { const { walletClient, bank, exchange, merchant, exchangeBankAccount } = await createSimpleTestkudosEnvironmentV2(t); - const bankAccessApiClient = new BankAccessApiClient({ - allowHttp: true, - baseUrl: bank.bankAccessApiBaseUrl, - }); + const bankAccessApiClient = new BankAccessApiClient( + bank.bankAccessApiBaseUrl, + ); const mbu = await bankAccessApiClient.createRandomBankUser(); const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl()); @@ -59,12 +58,15 @@ export async function runTippingTest(t: GlobalTestState) { exchangeBankAccount.accountPaytoUri, ); - const wireGatewayApiClient = new WireGatewayApiClient({ - wireGatewayApiBaseUrl: exchangeBankAccount.wireGatewayApiBaseUrl, - accountName: exchangeBankAccount.accountName, - accountPassword: exchangeBankAccount.accountPassword, - allowHttp: true, - }); + const wireGatewayApiClient = new WireGatewayApiClient( + exchangeBankAccount.wireGatewayApiBaseUrl, + { + auth: { + username: exchangeBankAccount.accountName, + password: exchangeBankAccount.accountPassword, + }, + }, + ); await wireGatewayApiClient.adminAddIncoming({ amount: "TESTKUDOS:10", diff --git a/packages/taler-harness/src/integrationtests/test-wallet-notifications.ts b/packages/taler-harness/src/integrationtests/test-wallet-notifications.ts index 3315a71d4..9b35884f0 100644 --- a/packages/taler-harness/src/integrationtests/test-wallet-notifications.ts +++ b/packages/taler-harness/src/integrationtests/test-wallet-notifications.ts @@ -123,10 +123,9 @@ export async function runWalletNotificationsTest(t: GlobalTestState) { skipDefaults: true, }); - const bankAccessApiClient = new BankAccessApiClient({ - allowHttp: true, - baseUrl: bank.bankAccessApiBaseUrl, - }); + const bankAccessApiClient = new BankAccessApiClient( + bank.bankAccessApiBaseUrl, + ); const user = await bankAccessApiClient.createRandomBankUser(); bankAccessApiClient.setAuth(user); const wop = await bankAccessApiClient.createWithdrawalOperation( diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts index 1ba180fc1..c62b98623 100644 --- a/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts @@ -36,10 +36,9 @@ export async function runWithdrawalAbortBankTest(t: GlobalTestState) { // Create a withdrawal operation - const bankAccessApiClient = new BankAccessApiClient({ - allowHttp: true, - baseUrl: bank.bankAccessApiBaseUrl, - }); + const bankAccessApiClient = new BankAccessApiClient( + bank.bankAccessApiBaseUrl, + ); const user = await bankAccessApiClient.createRandomBankUser(); bankAccessApiClient.setAuth(user); const wop = await bankAccessApiClient.createWithdrawalOperation( diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts index 61687ec02..76c973a12 100644 --- a/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts @@ -19,7 +19,10 @@ */ import { GlobalTestState } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2 } from "../harness/helpers.js"; -import { BankAccessApiClient, WalletApiOperation } from "@gnu-taler/taler-wallet-core"; +import { + BankAccessApiClient, + WalletApiOperation, +} from "@gnu-taler/taler-wallet-core"; import { j2s, NotificationType, @@ -40,10 +43,9 @@ export async function runWithdrawalBankIntegratedTest(t: GlobalTestState) { // Create a withdrawal operation - const bankAccessApiClient = new BankAccessApiClient({ - allowHttp: true, - baseUrl: bank.bankAccessApiBaseUrl, - }); + const bankAccessApiClient = new BankAccessApiClient( + bank.bankAccessApiBaseUrl, + ); const user = await bankAccessApiClient.createRandomBankUser(); bankAccessApiClient.setAuth(user); const wop = await bankAccessApiClient.createWithdrawalOperation( diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-fees.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-fees.ts index 34dfb8fc9..9f4631c7e 100644 --- a/packages/taler-harness/src/integrationtests/test-withdrawal-fees.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-fees.ts @@ -110,10 +110,9 @@ export async function runWithdrawalFeesTest(t: GlobalTestState) { const amount = "TESTKUDOS:7.5"; - const bankAccessApiClient = new BankAccessApiClient({ - allowHttp: true, - baseUrl: bank.bankAccessApiBaseUrl, - }); + const bankAccessApiClient = new BankAccessApiClient( + bank.bankAccessApiBaseUrl, + ); const user = await bankAccessApiClient.createRandomBankUser(); bankAccessApiClient.setAuth(user); const wop = await bankAccessApiClient.createWithdrawalOperation( diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts index d49235f89..324b8abc5 100644 --- a/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts @@ -39,10 +39,9 @@ export async function runWithdrawalManualTest(t: GlobalTestState) { // Create a withdrawal operation - const bankAccessApiClient = new BankAccessApiClient({ - baseUrl: bank.bankAccessApiBaseUrl, - allowHttp: true, - }); + const bankAccessApiClient = new BankAccessApiClient( + bank.bankAccessApiBaseUrl, + ); const user = await bankAccessApiClient.createRandomBankUser(); @@ -74,12 +73,15 @@ export async function runWithdrawalManualTest(t: GlobalTestState) { const reservePub: string = wres.reservePub; - const wireGatewayApiClient = new WireGatewayApiClient({ - wireGatewayApiBaseUrl: exchangeBankAccount.wireGatewayApiBaseUrl, - accountName: exchangeBankAccount.accountName, - accountPassword: exchangeBankAccount.accountPassword, - allowHttp: true, - }); + const wireGatewayApiClient = new WireGatewayApiClient( + exchangeBankAccount.wireGatewayApiBaseUrl, + { + auth: { + username: exchangeBankAccount.accountName, + password: exchangeBankAccount.accountPassword, + }, + }, + ); await wireGatewayApiClient.adminAddIncoming({ amount: "TESTKUDOS:10", diff --git a/packages/taler-harness/src/lint.ts b/packages/taler-harness/src/lint.ts index 6d8e679db..a45e6db9d 100644 --- a/packages/taler-harness/src/lint.ts +++ b/packages/taler-harness/src/lint.ts @@ -55,7 +55,6 @@ interface PubkeyConf { const httpLib = createPlatformHttpLib({ enableThrottling: false, - allowHttp: true, }); interface ShellResult { diff --git a/packages/taler-util/src/MerchantApiClient.ts b/packages/taler-util/src/MerchantApiClient.ts index cf4788d9e..cbdcb9fdf 100644 --- a/packages/taler-util/src/MerchantApiClient.ts +++ b/packages/taler-util/src/MerchantApiClient.ts @@ -138,10 +138,7 @@ export class MerchantApiClient { }; } - httpClient = createPlatformHttpLib({ - allowHttp: true, - enableThrottling: false, - }); + httpClient = createPlatformHttpLib(); async changeAuth(auth: MerchantAuthConfiguration): Promise { const url = new URL("private/auth", this.baseUrl); diff --git a/packages/taler-util/src/http-common.ts b/packages/taler-util/src/http-common.ts index 93cf9bba0..02ec8ce72 100644 --- a/packages/taler-util/src/http-common.ts +++ b/packages/taler-util/src/http-common.ts @@ -436,7 +436,10 @@ export function getExpiry( export interface HttpLibArgs { enableThrottling?: boolean; - allowHttp?: boolean; + /** + * Only allow HTTPS connections, not plain http. + */ + requireTls?: boolean; } export function encodeBody(body: any): ArrayBuffer { diff --git a/packages/taler-util/src/http-impl.node.ts b/packages/taler-util/src/http-impl.node.ts index 07648a28d..528d303be 100644 --- a/packages/taler-util/src/http-impl.node.ts +++ b/packages/taler-util/src/http-impl.node.ts @@ -63,11 +63,11 @@ const textDecoder = new TextDecoder(); export class HttpLibImpl implements HttpRequestLibrary { private throttle = new RequestThrottler(); private throttlingEnabled = true; - private allowHttp = false; + private requireTls = false; constructor(args?: HttpLibArgs) { this.throttlingEnabled = args?.enableThrottling ?? false; - this.allowHttp = args?.allowHttp ?? false; + this.requireTls = args?.requireTls ?? false; } /** @@ -94,7 +94,7 @@ export class HttpLibImpl implements HttpRequestLibrary { `request to origin ${parsedUrl.origin} was throttled`, ); } - if (!this.allowHttp && parsedUrl.protocol !== "https:") { + if (this.requireTls && parsedUrl.protocol !== "https:") { throw TalerError.fromDetail( TalerErrorCode.WALLET_NETWORK_ERROR, { diff --git a/packages/taler-util/src/http-impl.qtart.ts b/packages/taler-util/src/http-impl.qtart.ts index 3e076e96d..fb642ac89 100644 --- a/packages/taler-util/src/http-impl.qtart.ts +++ b/packages/taler-util/src/http-impl.qtart.ts @@ -41,11 +41,11 @@ const textDecoder = new TextDecoder(); export class HttpLibImpl implements HttpRequestLibrary { private throttle = new RequestThrottler(); private throttlingEnabled = true; - private allowHttp = false; + private requireTls = false; constructor(args?: HttpLibArgs) { this.throttlingEnabled = args?.enableThrottling ?? false; - this.allowHttp = args?.allowHttp ?? false; + this.requireTls = args?.requireTls ?? false; } /** @@ -72,7 +72,7 @@ export class HttpLibImpl implements HttpRequestLibrary { `request to origin ${parsedUrl.origin} was throttled`, ); } - if (!this.allowHttp && parsedUrl.protocol !== "https:") { + if (this.requireTls && parsedUrl.protocol !== "https:") { throw TalerError.fromDetail( TalerErrorCode.WALLET_NETWORK_ERROR, { diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts index a0f44fb41..943283a36 100644 --- a/packages/taler-wallet-cli/src/index.ts +++ b/packages/taler-wallet-cli/src/index.ts @@ -244,7 +244,7 @@ async function createLocalWallet( const dbPath = walletCliArgs.wallet.walletDbFile ?? defaultWalletDbPath; const myHttpLib = createPlatformHttpLib({ enableThrottling: walletCliArgs.wallet.noThrottle ? false : true, - allowHttp: walletCliArgs.wallet.noHttp ? false : true, + requireTls: walletCliArgs.wallet.noHttp, }); const wallet = await createNativeWalletHost({ persistentStoragePath: dbPath !== ":memory:" ? dbPath : undefined, @@ -1259,10 +1259,7 @@ advancedCli help: "Run the 'bench-internal' benchmark", }) .action(async (args) => { - const myHttpLib = createPlatformHttpLib({ - enableThrottling: false, - allowHttp: true, - }); + const myHttpLib = createPlatformHttpLib(); const res = await createNativeWalletHost2({ // No persistent DB storage. persistentStoragePath: undefined, diff --git a/packages/taler-wallet-core/src/bank-api-client.ts b/packages/taler-wallet-core/src/bank-api-client.ts index 3174667f1..f1289525d 100644 --- a/packages/taler-wallet-core/src/bank-api-client.ts +++ b/packages/taler-wallet-core/src/bank-api-client.ts @@ -99,177 +99,9 @@ const codecForWithdrawalOperationInfo = (): Codec => .property("taler_withdraw_uri", codecForString()) .build("WithdrawalOperationInfo"); -/** - * @deprecated Use BankAccessApiClient or WireGatewayApi - */ -export namespace BankApi { - // FIXME: Move to BankAccessApi?! - export async function registerAccount( - bank: BankServiceHandle, - username: string, - password: string, - options: { - iban?: string; - }, - ): Promise { - const url = new URL("testing/register", bank.bankAccessApiBaseUrl); - const resp = await bank.http.postJson(url.href, { - username, - password, - iban: options?.iban, - }); - let paytoUri = `payto://x-taler-bank/localhost/${username}`; - if (resp.status !== 200 && resp.status !== 202 && resp.status !== 204) { - logger.error(`${j2s(await resp.json())}`); - throw TalerError.fromDetail( - TalerErrorCode.GENERIC_UNEXPECTED_REQUEST_ERROR, - { - httpStatusCode: resp.status, - }, - ); - } - try { - // Pybank has no body, thus this might throw. - const respJson = await resp.json(); - // LibEuFin demobank returns payto URI in response - if (respJson.paytoUri) { - paytoUri = respJson.paytoUri; - } - } catch (e) { - // Do nothing - } - return { - password, - username, - accountPaytoUri: paytoUri, - }; - } - - // FIXME: Move to BankAccessApi?! - export async function createRandomBankUser( - bank: BankServiceHandle, - ): Promise { - const username = "user-" + encodeCrock(getRandomBytes(10)).toLowerCase(); - const password = "pw-" + encodeCrock(getRandomBytes(10)).toLowerCase(); - // FIXME: This is just a temporary workaround, because demobank is running out of short IBANs - const iban = generateIban("DE", 15); - return await registerAccount(bank, username, password, { - iban, - }); - } - - export async function confirmWithdrawalOperation( - bank: BankServiceHandle, - bankUser: BankUser, - wopi: WithdrawalOperationInfo, - ): Promise { - const url = new URL( - `accounts/${bankUser.username}/withdrawals/${wopi.withdrawal_id}/confirm`, - bank.bankAccessApiBaseUrl, - ); - logger.info(`confirming withdrawal operation via ${url.href}`); - const resp = await bank.http.postJson( - url.href, - {}, - { - headers: { - Authorization: makeBasicAuthHeader( - bankUser.username, - bankUser.password, - ), - }, - }, - ); - - logger.info(`response status ${resp.status}`); - const respJson = await readSuccessResponseJsonOrThrow(resp, codecForAny()); - - // FIXME: We don't check the status here! - } - - export async function abortWithdrawalOperation( - bank: BankServiceHandle, - bankUser: BankUser, - wopi: WithdrawalOperationInfo, - ): Promise { - const url = new URL( - `accounts/${bankUser.username}/withdrawals/${wopi.withdrawal_id}/abort`, - bank.bankAccessApiBaseUrl, - ); - const resp = await bank.http.postJson( - url.href, - {}, - { - headers: { - Authorization: makeBasicAuthHeader( - bankUser.username, - bankUser.password, - ), - }, - }, - ); - await readSuccessResponseJsonOrThrow(resp, codecForAny()); - } -} - -/** - * @deprecated use BankAccessApiClient - */ -export namespace BankAccessApi { - export async function getAccountBalance( - bank: BankServiceHandle, - bankUser: BankUser, - ): Promise { - const url = new URL( - `accounts/${bankUser.username}`, - bank.bankAccessApiBaseUrl, - ); - const resp = await bank.http.fetch(url.href, { - headers: { - Authorization: makeBasicAuthHeader( - bankUser.username, - bankUser.password, - ), - }, - }); - return await resp.json(); - } - - export async function createWithdrawalOperation( - bank: BankServiceHandle, - bankUser: BankUser, - amount: string, - ): Promise { - const url = new URL( - `accounts/${bankUser.username}/withdrawals`, - bank.bankAccessApiBaseUrl, - ); - const resp = await bank.http.postJson( - url.href, - { - amount, - }, - { - headers: { - Authorization: makeBasicAuthHeader( - bankUser.username, - bankUser.password, - ), - }, - }, - ); - return readSuccessResponseJsonOrThrow( - resp, - codecForWithdrawalOperationInfo(), - ); - } -} - export interface BankAccessApiClientArgs { - baseUrl: string; auth?: { username: string; password: string }; - enableThrottling?: boolean; - allowHttp?: boolean; + httpClient?: HttpRequestLibrary; } export interface BankAccessApiCreateTransactionRequest { @@ -278,11 +110,11 @@ export interface BankAccessApiCreateTransactionRequest { } export class WireGatewayApiClientArgs { - accountName: string; - accountPassword: string; - wireGatewayApiBaseUrl: string; - enableThrottling?: boolean; - allowHttp?: boolean; + auth?: { + username: string; + password: string; + }; + httpClient?: HttpRequestLibrary; } /** @@ -292,11 +124,21 @@ export class WireGatewayApiClientArgs { export class WireGatewayApiClient { httpLib; - constructor(private args: WireGatewayApiClientArgs) { - this.httpLib = createPlatformHttpLib({ - enableThrottling: !!args.enableThrottling, - allowHttp: !!args.allowHttp, - }); + constructor( + private baseUrl: string, + private args: WireGatewayApiClientArgs = {}, + ) { + this.httpLib = args.httpClient ?? createPlatformHttpLib(); + } + + private makeAuthHeader(): Record { + const auth = this.args.auth; + if (auth) { + return { + Authorization: makeBasicAuthHeader(auth.username, auth.password), + }; + } + return {}; } async adminAddIncoming(params: { @@ -304,7 +146,7 @@ export class WireGatewayApiClient { reservePub: string; debitAccountPayto: string; }): Promise { - let url = new URL(`admin/add-incoming`, this.args.wireGatewayApiBaseUrl); + let url = new URL(`admin/add-incoming`, this.baseUrl); const resp = await this.httpLib.fetch(url.href, { method: "POST", body: { @@ -312,12 +154,7 @@ export class WireGatewayApiClient { reserve_pub: params.reservePub, debit_account: params.debitAccountPayto, }, - headers: { - Authorization: makeBasicAuthHeader( - this.args.accountName, - this.args.accountPassword, - ), - }, + headers: this.makeAuthHeader(), }); logger.info(`add-incoming response status: ${resp.status}`); await checkSuccessResponseOrThrow(resp); @@ -331,11 +168,11 @@ export class WireGatewayApiClient { export class BankAccessApiClient { httpLib: HttpRequestLibrary; - constructor(private args: BankAccessApiClientArgs) { - this.httpLib = createPlatformHttpLib({ - enableThrottling: !!args.enableThrottling, - allowHttp: !!args.allowHttp, - }); + constructor( + private baseUrl: string, + private args: BankAccessApiClientArgs = {}, + ) { + this.httpLib = args.httpClient ?? createPlatformHttpLib(); } setAuth(auth: { username: string; password: string }) { @@ -355,12 +192,18 @@ export class BankAccessApiClient { }; } + async getAccountBalance( + username: string, + ): Promise { + const url = new URL(`accounts/${username}`, this.baseUrl); + const resp = await this.httpLib.fetch(url.href, { + headers: this.makeAuthHeader(), + }); + return await resp.json(); + } + async getTransactions(username: string): Promise { - const auth = this.args.auth; - const reqUrl = new URL( - `accounts/${username}/transactions`, - this.args.baseUrl, - ); + const reqUrl = new URL(`accounts/${username}/transactions`, this.baseUrl); const resp = await this.httpLib.fetch(reqUrl.href, { method: "GET", headers: { @@ -376,10 +219,7 @@ export class BankAccessApiClient { username: string, req: BankAccessApiCreateTransactionRequest, ): Promise { - const reqUrl = new URL( - `accounts/${username}/transactions`, - this.args.baseUrl, - ); + const reqUrl = new URL(`accounts/${username}/transactions`, this.baseUrl); const resp = await this.httpLib.fetch(reqUrl.href, { method: "POST", @@ -395,9 +235,9 @@ export class BankAccessApiClient { password: string, options: { iban?: string; - }, + } = {}, ): Promise { - const url = new URL("testing/register", this.args.baseUrl); + const url = new URL("testing/register", this.baseUrl); const resp = await this.httpLib.fetch(url.href, { method: "POST", body: { @@ -447,7 +287,7 @@ export class BankAccessApiClient { user: string, amount: string, ): Promise { - const url = new URL(`accounts/${user}/withdrawals`, this.args.baseUrl); + const url = new URL(`accounts/${user}/withdrawals`, this.baseUrl); const resp = await this.httpLib.fetch(url.href, { method: "POST", body: { @@ -467,7 +307,7 @@ export class BankAccessApiClient { ): Promise { const url = new URL( `accounts/${username}/withdrawals/${wopi.withdrawal_id}/confirm`, - this.args.baseUrl, + this.baseUrl, ); logger.info(`confirming withdrawal operation via ${url.href}`); const resp = await this.httpLib.fetch(url.href, { @@ -488,7 +328,7 @@ export class BankAccessApiClient { ): Promise { const url = new URL( `accounts/${accountName}/withdrawals/${wopi.withdrawal_id}/abort`, - this.args.baseUrl, + this.baseUrl, ); const resp = await this.httpLib.fetch(url.href, { method: "POST", diff --git a/packages/taler-wallet-core/src/dbless.ts b/packages/taler-wallet-core/src/dbless.ts index 5532345ae..357b7d289 100644 --- a/packages/taler-wallet-core/src/dbless.ts +++ b/packages/taler-wallet-core/src/dbless.ts @@ -48,24 +48,20 @@ import { parsePaytoUri, UnblindedSignature, } from "@gnu-taler/taler-util"; -import { TalerCryptoInterface } from "./crypto/cryptoImplementation.js"; -import { DenominationRecord } from "./db.js"; -import { - BankAccessApi, - BankApi, - BankServiceHandle, -} from "./bank-api-client.js"; import { HttpRequestLibrary, readSuccessResponseJsonOrThrow, } from "@gnu-taler/taler-util/http"; +import { BankAccessApiClient, BankServiceHandle } from "./bank-api-client.js"; +import { TalerCryptoInterface } from "./crypto/cryptoImplementation.js"; +import { DenominationRecord } from "./db.js"; +import { isWithdrawableDenom } from "./index.js"; +import { ExchangeInfo } from "./operations/exchanges.js"; +import { assembleRefreshRevealRequest } from "./operations/refresh.js"; import { getBankStatusUrl, getBankWithdrawalInfo, } from "./operations/withdraw.js"; -import { ExchangeInfo } from "./operations/exchanges.js"; -import { assembleRefreshRevealRequest } from "./operations/refresh.js"; -import { isWithdrawableDenom, WalletConfig } from "./index.js"; const logger = new Logger("dbless.ts"); @@ -125,10 +121,10 @@ export async function topupReserveWithDemobank( bankAccessApiBaseUrl: bankAccessApiBaseUrl, http, }; - const bankUser = await BankApi.createRandomBankUser(bankHandle); - const wopi = await BankAccessApi.createWithdrawalOperation( - bankHandle, - bankUser, + const bankClient = new BankAccessApiClient(bankAccessApiBaseUrl); + const bankUser = await bankClient.createRandomBankUser(); + const wopi = await bankClient.createWithdrawalOperation( + bankUser.username, amount, ); const bankInfo = await getBankWithdrawalInfo(http, wopi.taler_withdraw_uri); @@ -149,7 +145,7 @@ export async function topupReserveWithDemobank( httpResp, codecForBankWithdrawalOperationPostResponse(), ); - await BankApi.confirmWithdrawalOperation(bankHandle, bankUser, wopi); + await bankClient.confirmWithdrawalOperation(bankUser.username, wopi); } export async function withdrawCoin(args: { diff --git a/packages/taler-wallet-core/src/host-impl.node.ts b/packages/taler-wallet-core/src/host-impl.node.ts index 0626b9254..a6dae58a1 100644 --- a/packages/taler-wallet-core/src/host-impl.node.ts +++ b/packages/taler-wallet-core/src/host-impl.node.ts @@ -134,7 +134,7 @@ export async function createNativeWalletHost2( } else { myHttpLib = createPlatformHttpLib({ enableThrottling: true, - allowHttp: args.config?.features?.allowHttp, + requireTls: !args.config?.features?.allowHttp, }); } diff --git a/packages/taler-wallet-core/src/host-impl.qtart.ts b/packages/taler-wallet-core/src/host-impl.qtart.ts index 81dbe0acd..85f8df6e5 100644 --- a/packages/taler-wallet-core/src/host-impl.qtart.ts +++ b/packages/taler-wallet-core/src/host-impl.qtart.ts @@ -188,7 +188,7 @@ export async function createNativeWalletHost2( } else { myHttpLib = createPlatformHttpLib({ enableThrottling: true, - allowHttp: args.config?.features?.allowHttp, + requireTls: !args.config?.features?.allowHttp, }); } -- cgit v1.2.3 From b63937703ce1e269055497ee14ac90a28de2fc74 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 6 Sep 2023 13:24:34 +0200 Subject: move bank API client to taler-util, update typescript config --- .vscode/tasks.json | 33 +- package.json | 3 +- packages/aml-backoffice-ui/package.json | 2 +- packages/aml-backoffice-ui/tsconfig.json | 15 +- packages/anastasis-cli/package.json | 6 +- packages/anastasis-cli/tsconfig.json | 6 +- packages/anastasis-core/package.json | 2 +- packages/anastasis-core/tsconfig.json | 2 +- packages/anastasis-webui/package.json | 2 +- packages/anastasis-webui/tsconfig.json | 6 +- packages/demobank-ui/package.json | 2 +- packages/demobank-ui/tsconfig.json | 15 +- packages/idb-bridge/package.json | 2 +- packages/idb-bridge/tsconfig.json | 4 +- packages/merchant-backend-ui/package.json | 2 +- packages/merchant-backoffice-ui/package.json | 4 +- packages/merchant-backoffice-ui/tsconfig.json | 117 ++- packages/pogen/package.json | 2 +- packages/pogen/tsconfig.json | 2 +- packages/taler-harness/package.json | 2 +- packages/taler-harness/src/harness/harness.ts | 17 +- packages/taler-harness/src/harness/helpers.ts | 24 +- packages/taler-harness/src/index.ts | 2 +- .../test-age-restrictions-merchant.ts | 12 +- .../src/integrationtests/test-bank-api.ts | 5 +- .../integrationtests/test-exchange-management.ts | 26 +- .../taler-harness/src/integrationtests/test-kyc.ts | 6 +- .../src/integrationtests/test-libeufin-basic.ts | 6 +- .../integrationtests/test-merchant-refund-api.ts | 4 +- .../src/integrationtests/test-payment-fault.ts | 7 +- .../src/integrationtests/test-tipping.ts | 4 +- .../integrationtests/test-wallet-notifications.ts | 6 +- .../integrationtests/test-withdrawal-abort-bank.ts | 7 +- .../test-withdrawal-bank-integrated.ts | 8 +- .../src/integrationtests/test-withdrawal-fees.ts | 7 +- .../src/integrationtests/test-withdrawal-manual.ts | 8 +- packages/taler-harness/tsconfig.json | 4 +- packages/taler-util/package.json | 6 +- packages/taler-util/src/bank-api-client.ts | 325 ++++++ packages/taler-util/src/http-common.ts | 2 +- packages/taler-util/src/index.ts | 1 + packages/taler-util/tsconfig.json | 4 +- packages/taler-wallet-cli/package.json | 4 +- packages/taler-wallet-cli/tsconfig.json | 4 +- packages/taler-wallet-core/package.json | 4 +- packages/taler-wallet-core/src/bank-api-client.ts | 340 ------- packages/taler-wallet-core/src/dbless.ts | 6 +- packages/taler-wallet-core/src/index.ts | 2 - packages/taler-wallet-core/src/wallet.ts | 6 +- packages/taler-wallet-core/tsconfig.json | 11 +- packages/taler-wallet-embedded/tsconfig.json | 4 +- packages/taler-wallet-webextension/package.json | 2 +- .../taler-wallet-webextension/src/wxBackend.ts | 11 +- packages/taler-wallet-webextension/tsconfig.json | 19 +- packages/web-util/package.json | 2 +- packages/web-util/tsconfig.json | 17 +- pnpm-lock.yaml | 1042 ++++++++++++++------ 57 files changed, 1279 insertions(+), 915 deletions(-) create mode 100644 packages/taler-util/src/bank-api-client.ts delete mode 100644 packages/taler-wallet-core/src/bank-api-client.ts (limited to 'packages/taler-harness/src/harness/helpers.ts') diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 00c61e8a4..4c931ad04 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,18 +1,17 @@ { - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "2.0.0", - "tasks": [ - { - "type": "typescript", - "tsconfig": "tsconfig.build.json", - "problemMatcher": [ - "$tsc" - ], - "group": { - "kind": "build", - "isDefault": true, - }, - } - ] -} \ No newline at end of file + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "type": "typescript", + "tsconfig": "tsconfig.build.json", + "problemMatcher": ["$tsc"], + "group": { + "kind": "build", + "isDefault": true + }, + "label": "tsc: build - tsconfig.build.json" + } + ] +} diff --git a/package.json b/package.json index 9ce6d628e..e7b4b52d7 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "eslint": "^8.29.0", "eslint-config-prettier": "^8.5.0", "nx": "15.0.1", - "prettier": "^2.8.8" + "prettier": "^2.8.8", + "typescript": "^5.2.2" } } diff --git a/packages/aml-backoffice-ui/package.json b/packages/aml-backoffice-ui/package.json index 3fde72b74..a761374df 100644 --- a/packages/aml-backoffice-ui/package.json +++ b/packages/aml-backoffice-ui/package.json @@ -59,7 +59,7 @@ "postcss": "^8.4.23", "postcss-cli": "^10.1.0", "tailwindcss": "^3.3.2", - "typescript": "5.1.3" + "typescript": "5.2.2" }, "pogen": { "domain": "aml-backoffice" diff --git a/packages/aml-backoffice-ui/tsconfig.json b/packages/aml-backoffice-ui/tsconfig.json index cc5bdf396..9826fac07 100644 --- a/packages/aml-backoffice-ui/tsconfig.json +++ b/packages/aml-backoffice-ui/tsconfig.json @@ -1,12 +1,9 @@ { "compilerOptions": { /* Basic Options */ - "target": "ES5", - "module": "ES6", - "lib": [ - "DOM", - "ES2017" - ], + "target": "ES2020", + "module": "Node16", + "lib": ["DOM", "ES2020"], "allowJs": true /* Allow javascript files to be compiled. */, // "checkJs": true, /* Report errors in .js files. */ "jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, @@ -45,7 +42,5 @@ /* Advanced Options */ "skipLibCheck": true /* Skip type checking of declaration files. */ }, - "include": [ - "src/**/*" - ] -} \ No newline at end of file + "include": ["src/**/*"] +} diff --git a/packages/anastasis-cli/package.json b/packages/anastasis-cli/package.json index 2bbf32c3b..55af7cc06 100644 --- a/packages/anastasis-cli/package.json +++ b/packages/anastasis-cli/package.json @@ -33,12 +33,12 @@ "@types/node": "^18.11.17", "prettier": "^2.8.8", "rimraf": "^3.0.2", - "typedoc": "^0.24.8", - "typescript": "^5.1.3" + "typedoc": "^0.25.1", + "typescript": "^5.2.2" }, "dependencies": { - "@gnu-taler/taler-util": "workspace:*", "@gnu-taler/anastasis-core": "workspace:*", + "@gnu-taler/taler-util": "workspace:*", "tslib": "^2.5.3" } } diff --git a/packages/anastasis-cli/tsconfig.json b/packages/anastasis-cli/tsconfig.json index 83da34277..7675edfbc 100644 --- a/packages/anastasis-cli/tsconfig.json +++ b/packages/anastasis-cli/tsconfig.json @@ -2,11 +2,11 @@ "compileOnSave": true, "compilerOptions": { "composite": true, - "target": "ES2018", - "module": "ESNext", + "target": "ES2020", + "module": "Node16", "moduleResolution": "Node16", "sourceMap": true, - "lib": ["es6"], + "lib": ["ES2020"], "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "strict": true, diff --git a/packages/anastasis-core/package.json b/packages/anastasis-core/package.json index c3a7106fb..aa182e047 100644 --- a/packages/anastasis-core/package.json +++ b/packages/anastasis-core/package.json @@ -18,7 +18,7 @@ "devDependencies": { "ava": "^4.3.3", "rimraf": "^3.0.2", - "typescript": "^5.1.3" + "typescript": "^5.2.2" }, "dependencies": { "@gnu-taler/taler-util": "workspace:*", diff --git a/packages/anastasis-core/tsconfig.json b/packages/anastasis-core/tsconfig.json index 44a159836..a12f2e641 100644 --- a/packages/anastasis-core/tsconfig.json +++ b/packages/anastasis-core/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "composite": true, "target": "ES2020", - "module": "ESNext", + "module": "Node16", "moduleResolution": "Node16", "sourceMap": true, "lib": ["ES2020"], diff --git a/packages/anastasis-webui/package.json b/packages/anastasis-webui/package.json index eff5ba04d..efee9633e 100644 --- a/packages/anastasis-webui/package.json +++ b/packages/anastasis-webui/package.json @@ -44,6 +44,6 @@ "chai": "^4.3.6", "mocha": "^9.2.0", "sass": "1.56.1", - "typescript": "^5.1.3" + "typescript": "^5.2.2" } } diff --git a/packages/anastasis-webui/tsconfig.json b/packages/anastasis-webui/tsconfig.json index 642c34f5a..9e52f2b7e 100644 --- a/packages/anastasis-webui/tsconfig.json +++ b/packages/anastasis-webui/tsconfig.json @@ -1,11 +1,11 @@ { "compilerOptions": { /* Basic Options */ - "target": "ES5", - "module": "ES6", + "target": "ES2020", + "module": "Node16", "lib": [ "DOM", - "ES2017" + "ES2020" ], "allowJs": true /* Allow javascript files to be compiled. */, // "checkJs": true, /* Report errors in .js files. */ diff --git a/packages/demobank-ui/package.json b/packages/demobank-ui/package.json index a584bbf35..d33fae709 100644 --- a/packages/demobank-ui/package.json +++ b/packages/demobank-ui/package.json @@ -60,7 +60,7 @@ "po2json": "^0.4.5", "preact-render-to-string": "^5.2.6", "sass": "1.56.1", - "typescript": "5.1.3" + "typescript": "5.2.2" }, "pogen": { "domain": "bank" diff --git a/packages/demobank-ui/tsconfig.json b/packages/demobank-ui/tsconfig.json index abb9a9f36..9826fac07 100644 --- a/packages/demobank-ui/tsconfig.json +++ b/packages/demobank-ui/tsconfig.json @@ -1,12 +1,9 @@ { "compilerOptions": { /* Basic Options */ - "target": "ES5", - "module": "ES6", - "lib": [ - "DOM", - "ES2016" - ], + "target": "ES2020", + "module": "Node16", + "lib": ["DOM", "ES2020"], "allowJs": true /* Allow javascript files to be compiled. */, // "checkJs": true, /* Report errors in .js files. */ "jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, @@ -45,7 +42,5 @@ /* Advanced Options */ "skipLibCheck": true /* Skip type checking of declaration files. */ }, - "include": [ - "src/**/*" - ] -} \ No newline at end of file + "include": ["src/**/*"] +} diff --git a/packages/idb-bridge/package.json b/packages/idb-bridge/package.json index 1c9c46b02..ce64314ff 100644 --- a/packages/idb-bridge/package.json +++ b/packages/idb-bridge/package.json @@ -29,7 +29,7 @@ "ava": "^5.3.1", "prettier": "^2.8.8", "rimraf": "^5.0.1", - "typescript": "^5.1.6" + "typescript": "^5.2.2" }, "dependencies": { "tslib": "^2.6.0" diff --git a/packages/idb-bridge/tsconfig.json b/packages/idb-bridge/tsconfig.json index 19e9c2a74..44a27284b 100644 --- a/packages/idb-bridge/tsconfig.json +++ b/packages/idb-bridge/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { "composite": true, - "lib": ["es6"], - "module": "ES2020", + "lib": ["ES2020"], + "module": "Node16", "moduleResolution": "Node16", "target": "ES2020", "allowJs": true, diff --git a/packages/merchant-backend-ui/package.json b/packages/merchant-backend-ui/package.json index 23e5007e9..03e64308c 100644 --- a/packages/merchant-backend-ui/package.json +++ b/packages/merchant-backend-ui/package.json @@ -65,6 +65,6 @@ "sirv-cli": "^1.0.11", "ts-node": "^10.9.1", "tslib": "2.5.3", - "typescript": "5.1.3" + "typescript": "5.2.2" } } diff --git a/packages/merchant-backoffice-ui/package.json b/packages/merchant-backoffice-ui/package.json index 3d568a502..12aeb4b0e 100644 --- a/packages/merchant-backoffice-ui/package.json +++ b/packages/merchant-backoffice-ui/package.json @@ -75,8 +75,8 @@ "rimraf": "^3.0.2", "sass": "1.56.1", "source-map-support": "^0.5.21", - "typedoc": "^0.24.8", - "typescript": "5.1.3" + "typedoc": "^0.25.1", + "typescript": "5.2.2" }, "pogen": { "domain": "taler-merchant-backoffice" diff --git a/packages/merchant-backoffice-ui/tsconfig.json b/packages/merchant-backoffice-ui/tsconfig.json index 02c562f96..396f1e9e7 100644 --- a/packages/merchant-backoffice-ui/tsconfig.json +++ b/packages/merchant-backoffice-ui/tsconfig.json @@ -1,61 +1,58 @@ { - "compilerOptions": { - /* Basic Options */ - "target": "ES6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "ESNext", /* Specify module code generation: 'none', commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - "lib": [ - "es2021", - "dom" - ], /* Specify library files to be included in the compilation: */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - "jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "jsxFactory": "h", /* Specify the JSX factory function to use when targeting react JSX emit, e.g. React.createElement or h. */ - "jsxFragmentFactory": "Fragment", // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#custom-jsx-factories - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "removeComments": true, /* Do not emit comments to output. */ - "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - /* Module Resolution Options */ - "moduleResolution": "node16", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - "esModuleInterop": true, /* */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - /* Source Map Options */ - // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */ - "skipLibCheck": true /* Skip type checking of declaration files. */ - }, - "include": [ - "src/**/*", - "tests/**/*" - ] -} \ No newline at end of file + "compilerOptions": { + /* Basic Options */ + "target": "ES2020" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */, + "module": "Node16" /* Specify module code generation: 'none', commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, + "lib": [ + "es2020", + "dom" + ] /* Specify library files to be included in the compilation: */, + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + "jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, + "jsxFactory": "h" /* Specify the JSX factory function to use when targeting react JSX emit, e.g. React.createElement or h. */, + "jsxFragmentFactory": "Fragment", // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#custom-jsx-factories + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "removeComments": true, /* Do not emit comments to output. */ + "noEmit": true /* Do not emit outputs. */, + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + /* Strict Type-Checking Options */ + "strict": true /* Enable all strict type-checking options. */, + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* Module Resolution Options */ + "moduleResolution": "node16" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, + "esModuleInterop": true /* */, + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + /* Source Map Options */ + // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + /* Advanced Options */ + "skipLibCheck": true /* Skip type checking of declaration files. */ + }, + "include": ["src/**/*", "tests/**/*"] +} diff --git a/packages/pogen/package.json b/packages/pogen/package.json index ae1dfac3b..9160e699c 100644 --- a/packages/pogen/package.json +++ b/packages/pogen/package.json @@ -11,7 +11,7 @@ }, "devDependencies": { "po2json": "^0.4.5", - "typescript": "^5.1.3" + "typescript": "^5.2.2" }, "dependencies": { "@types/node": "^18.11.17", diff --git a/packages/pogen/tsconfig.json b/packages/pogen/tsconfig.json index 68225832d..74cdc6ad7 100644 --- a/packages/pogen/tsconfig.json +++ b/packages/pogen/tsconfig.json @@ -7,7 +7,7 @@ "incremental": true, "moduleResolution": "node", "sourceMap": true, - "lib": ["es6"], + "lib": ["ES2020"], "types": ["node"] }, "include": ["src/**/*.ts"] diff --git a/packages/taler-harness/package.json b/packages/taler-harness/package.json index 8916e5e9e..9f2b0d8e3 100644 --- a/packages/taler-harness/package.json +++ b/packages/taler-harness/package.json @@ -35,7 +35,7 @@ "esbuild": "^0.17.7", "prettier": "^2.8.8", "rimraf": "^3.0.2", - "typescript": "^5.1.3" + "typescript": "^5.2.2" }, "dependencies": { "@gnu-taler/taler-util": "workspace:*", diff --git a/packages/taler-harness/src/harness/harness.ts b/packages/taler-harness/src/harness/harness.ts index d0719b4f7..24e42099e 100644 --- a/packages/taler-harness/src/harness/harness.ts +++ b/packages/taler-harness/src/harness/harness.ts @@ -28,6 +28,7 @@ import { AccountAddDetails, AmountJson, Amounts, + BankAccessApiClient, Configuration, CoreApiResponse, Duration, @@ -46,13 +47,11 @@ import { stringToBytes, } from "@gnu-taler/taler-util"; import { + HttpRequestLibrary, createPlatformHttpLib, expectSuccessResponseOrThrow, } from "@gnu-taler/taler-util/http"; import { - BankAccessApiClient, - BankServiceHandle, - HarnessExchangeBankAccount, WalletCoreApiClient, WalletCoreRequestType, WalletCoreResponseType, @@ -569,6 +568,13 @@ class BankServiceBase { ) {} } +export interface HarnessExchangeBankAccount { + accountName: string; + accountPassword: string; + accountPaytoUri: string; + wireGatewayApiBaseUrl: string; +} + /** * Implementation of the bank service using the "taler-fakebank-run" tool. */ @@ -701,6 +707,11 @@ export class FakebankService // Use libeufin bank instead of pybank. const useLibeufinBank = false; +export interface BankServiceHandle { + readonly bankAccessApiBaseUrl: string; + readonly http: HttpRequestLibrary; +} + export type BankService = BankServiceHandle; export const BankService = FakebankService; diff --git a/packages/taler-harness/src/harness/helpers.ts b/packages/taler-harness/src/harness/helpers.ts index f92fd4dd9..9892e600b 100644 --- a/packages/taler-harness/src/harness/helpers.ts +++ b/packages/taler-harness/src/harness/helpers.ts @@ -25,21 +25,18 @@ */ import { AmountString, + BankAccessApiClient, ConfirmPayResultType, - MerchantContractTerms, Duration, - PreparePayResultType, - NotificationType, - WalletNotification, - TransactionMajorState, Logger, MerchantApiClient, + MerchantContractTerms, + NotificationType, + PreparePayResultType, + TransactionMajorState, + WalletNotification, } from "@gnu-taler/taler-util"; -import { - BankAccessApiClient, - HarnessExchangeBankAccount, - WalletApiOperation, -} from "@gnu-taler/taler-wallet-core"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { CoinConfig, defaultCoinConfig } from "./denomStructures.js"; import { FaultInjectedExchangeService, @@ -51,16 +48,17 @@ import { ExchangeService, ExchangeServiceInterface, FakebankService, - getPayto, GlobalTestState, + HarnessExchangeBankAccount, MerchantService, MerchantServiceInterface, - setupDb, - setupSharedDb, WalletCli, WalletClient, WalletService, WithAuthorization, + getPayto, + setupDb, + setupSharedDb, } from "./harness.js"; import * as fs from "fs"; diff --git a/packages/taler-harness/src/index.ts b/packages/taler-harness/src/index.ts index 185f6226d..534aec8c7 100644 --- a/packages/taler-harness/src/index.ts +++ b/packages/taler-harness/src/index.ts @@ -20,6 +20,7 @@ import { addPaytoQueryParams, Amounts, + BankAccessApiClient, Configuration, decodeCrock, j2s, @@ -31,7 +32,6 @@ import { import { clk } from "@gnu-taler/taler-util/clk"; import { createPlatformHttpLib } from "@gnu-taler/taler-util/http"; import { - BankAccessApiClient, CryptoDispatcher, downloadExchangeInfo, SynchronousCryptoWorkerFactoryPlain, diff --git a/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts index bff13ae40..7f936a479 100644 --- a/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts +++ b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts @@ -17,11 +17,7 @@ /** * Imports. */ -import { - BankAccessApiClient, - WalletApiOperation, - WireGatewayApiClient, -} from "@gnu-taler/taler-wallet-core"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { defaultCoinConfig } from "../harness/denomStructures.js"; import { getWireMethodForTest, GlobalTestState } from "../harness/harness.js"; import { @@ -30,7 +26,11 @@ import { makeTestPaymentV2, withdrawViaBankV2, } from "../harness/helpers.js"; -import { MerchantApiClient } from "@gnu-taler/taler-util"; +import { + BankAccessApiClient, + MerchantApiClient, + WireGatewayApiClient, +} from "@gnu-taler/taler-util"; /** * Run test for basic, bank-integrated withdrawal and payment. diff --git a/packages/taler-harness/src/integrationtests/test-bank-api.ts b/packages/taler-harness/src/integrationtests/test-bank-api.ts index afb06b61a..77a13b791 100644 --- a/packages/taler-harness/src/integrationtests/test-bank-api.ts +++ b/packages/taler-harness/src/integrationtests/test-bank-api.ts @@ -17,12 +17,13 @@ /** * Imports. */ -import { createEddsaKeyPair, encodeCrock } from "@gnu-taler/taler-util"; import { BankAccessApiClient, CreditDebitIndicator, WireGatewayApiClient, -} from "@gnu-taler/taler-wallet-core"; + createEddsaKeyPair, + encodeCrock, +} from "@gnu-taler/taler-util"; import { defaultCoinConfig } from "../harness/denomStructures.js"; import { BankService, diff --git a/packages/taler-harness/src/integrationtests/test-exchange-management.ts b/packages/taler-harness/src/integrationtests/test-exchange-management.ts index 19be7c962..9338a8988 100644 --- a/packages/taler-harness/src/integrationtests/test-exchange-management.ts +++ b/packages/taler-harness/src/integrationtests/test-exchange-management.ts @@ -18,29 +18,27 @@ * Imports. */ import { - GlobalTestState, - WalletCli, - setupDb, - BankService, - ExchangeService, - MerchantService, - getPayto, -} from "../harness/harness.js"; -import { - WalletApiOperation, BankAccessApiClient, -} from "@gnu-taler/taler-wallet-core"; -import { ExchangesListResponse, - URL, TalerErrorCode, + URL, j2s, } from "@gnu-taler/taler-util"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; +import { defaultCoinConfig } from "../harness/denomStructures.js"; import { FaultInjectedExchangeService, FaultInjectionResponseContext, } from "../harness/faultInjection.js"; -import { defaultCoinConfig } from "../harness/denomStructures.js"; +import { + BankService, + ExchangeService, + GlobalTestState, + MerchantService, + WalletCli, + getPayto, + setupDb, +} from "../harness/harness.js"; /** * Test if the wallet handles outdated exchange versions correctly. diff --git a/packages/taler-harness/src/integrationtests/test-kyc.ts b/packages/taler-harness/src/integrationtests/test-kyc.ts index 88875d4fc..1f7358b66 100644 --- a/packages/taler-harness/src/integrationtests/test-kyc.ts +++ b/packages/taler-harness/src/integrationtests/test-kyc.ts @@ -18,6 +18,7 @@ * Imports. */ import { + BankAccessApiClient, Duration, j2s, Logger, @@ -27,10 +28,7 @@ import { TransactionType, } from "@gnu-taler/taler-util"; import { createPlatformHttpLib } from "@gnu-taler/taler-util/http"; -import { - BankAccessApiClient, - WalletApiOperation, -} from "@gnu-taler/taler-wallet-core"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import * as http from "node:http"; import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures.js"; import { diff --git a/packages/taler-harness/src/integrationtests/test-libeufin-basic.ts b/packages/taler-harness/src/integrationtests/test-libeufin-basic.ts index 20fa34437..d87278197 100644 --- a/packages/taler-harness/src/integrationtests/test-libeufin-basic.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-basic.ts @@ -22,15 +22,13 @@ import { Duration, MerchantContractTerms, } from "@gnu-taler/taler-util"; -import { - HarnessExchangeBankAccount, - WalletApiOperation, -} from "@gnu-taler/taler-wallet-core"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures.js"; import { DbInfo, ExchangeService, GlobalTestState, + HarnessExchangeBankAccount, MerchantService, WalletClient, setupDb, diff --git a/packages/taler-harness/src/integrationtests/test-merchant-refund-api.ts b/packages/taler-harness/src/integrationtests/test-merchant-refund-api.ts index 369f261dd..1b69b9de6 100644 --- a/packages/taler-harness/src/integrationtests/test-merchant-refund-api.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-refund-api.ts @@ -24,11 +24,9 @@ import { URL, durationFromSpec, } from "@gnu-taler/taler-util"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { BankServiceHandle, - WalletApiOperation, -} from "@gnu-taler/taler-wallet-core"; -import { ExchangeServiceInterface, GlobalTestState, MerchantServiceInterface, diff --git a/packages/taler-harness/src/integrationtests/test-payment-fault.ts b/packages/taler-harness/src/integrationtests/test-payment-fault.ts index 3ad11d82d..e57427fac 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-fault.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-fault.ts @@ -21,11 +21,12 @@ /** * Imports. */ -import { CoreApiResponse, MerchantApiClient } from "@gnu-taler/taler-util"; import { BankAccessApiClient, - WalletApiOperation, -} from "@gnu-taler/taler-wallet-core"; + CoreApiResponse, + MerchantApiClient, +} from "@gnu-taler/taler-util"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { defaultCoinConfig } from "../harness/denomStructures.js"; import { FaultInjectedExchangeService, diff --git a/packages/taler-harness/src/integrationtests/test-tipping.ts b/packages/taler-harness/src/integrationtests/test-tipping.ts index 9b980acad..4140311ab 100644 --- a/packages/taler-harness/src/integrationtests/test-tipping.ts +++ b/packages/taler-harness/src/integrationtests/test-tipping.ts @@ -18,13 +18,13 @@ * Imports. */ import { + BankAccessApiClient, MerchantApiClient, TransactionMajorState, + WireGatewayApiClient, } from "@gnu-taler/taler-util"; import { - BankAccessApiClient, WalletApiOperation, - WireGatewayApiClient, } from "@gnu-taler/taler-wallet-core"; import { GlobalTestState, getWireMethodForTest } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2 } from "../harness/helpers.js"; diff --git a/packages/taler-harness/src/integrationtests/test-wallet-notifications.ts b/packages/taler-harness/src/integrationtests/test-wallet-notifications.ts index 9b35884f0..9a0eb77ae 100644 --- a/packages/taler-harness/src/integrationtests/test-wallet-notifications.ts +++ b/packages/taler-harness/src/integrationtests/test-wallet-notifications.ts @@ -18,14 +18,12 @@ * Imports. */ import { + BankAccessApiClient, Duration, NotificationType, TransactionMajorState, } from "@gnu-taler/taler-util"; -import { - BankAccessApiClient, - WalletApiOperation, -} from "@gnu-taler/taler-wallet-core"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures.js"; import { ExchangeService, diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts index c62b98623..aa5e2b770 100644 --- a/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts @@ -17,11 +17,8 @@ /** * Imports. */ -import { TalerErrorCode } from "@gnu-taler/taler-util"; -import { - WalletApiOperation, - BankAccessApiClient, -} from "@gnu-taler/taler-wallet-core"; +import { BankAccessApiClient, TalerErrorCode } from "@gnu-taler/taler-util"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { GlobalTestState } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2 } from "../harness/helpers.js"; diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts index 76c973a12..232b6d7c2 100644 --- a/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts @@ -17,13 +17,8 @@ /** * Imports. */ -import { GlobalTestState } from "../harness/harness.js"; -import { createSimpleTestkudosEnvironmentV2 } from "../harness/helpers.js"; import { BankAccessApiClient, - WalletApiOperation, -} from "@gnu-taler/taler-wallet-core"; -import { j2s, NotificationType, TransactionMajorState, @@ -31,6 +26,9 @@ import { TransactionType, WithdrawalType, } from "@gnu-taler/taler-util"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; +import { GlobalTestState } from "../harness/harness.js"; +import { createSimpleTestkudosEnvironmentV2 } from "../harness/helpers.js"; /** * Run test for basic, bank-integrated withdrawal. diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-fees.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-fees.ts index 9f4631c7e..bc2946a18 100644 --- a/packages/taler-harness/src/integrationtests/test-withdrawal-fees.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-fees.ts @@ -17,11 +17,8 @@ /** * Imports. */ -import { j2s } from "@gnu-taler/taler-util"; -import { - BankAccessApiClient, - WalletApiOperation, -} from "@gnu-taler/taler-wallet-core"; +import { BankAccessApiClient, j2s } from "@gnu-taler/taler-util"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { CoinConfig } from "../harness/denomStructures.js"; import { BankService, diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts index 324b8abc5..1d98cd46e 100644 --- a/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts @@ -17,12 +17,14 @@ /** * Imports. */ -import { AbsoluteTime, Logger, j2s } from "@gnu-taler/taler-util"; import { + AbsoluteTime, BankAccessApiClient, - WalletApiOperation, + Logger, WireGatewayApiClient, -} from "@gnu-taler/taler-wallet-core"; + j2s, +} from "@gnu-taler/taler-util"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { GlobalTestState } from "../harness/harness.js"; import { createSimpleTestkudosEnvironmentV2 } from "../harness/helpers.js"; diff --git a/packages/taler-harness/tsconfig.json b/packages/taler-harness/tsconfig.json index d022b16e8..ece83a85f 100644 --- a/packages/taler-harness/tsconfig.json +++ b/packages/taler-harness/tsconfig.json @@ -3,10 +3,10 @@ "compilerOptions": { "composite": true, "target": "ES2018", - "module": "ESNext", + "module": "Node16", "moduleResolution": "Node16", "sourceMap": true, - "lib": ["es6"], + "lib": ["ES2020"], "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "strict": true, diff --git a/packages/taler-util/package.json b/packages/taler-util/package.json index 6ac9a2689..0bb98767d 100644 --- a/packages/taler-util/package.json +++ b/packages/taler-util/package.json @@ -68,14 +68,14 @@ "esbuild": "^0.17.7", "prettier": "^2.8.8", "rimraf": "^3.0.2", - "typescript": "^5.1.3" + "typescript": "^5.2.2" }, "dependencies": { "big-integer": "^1.6.51", "fflate": "^0.7.4", + "hash-wasm": "^4.9.0", "jed": "^1.1.1", - "tslib": "^2.5.3", - "hash-wasm": "^4.9.0" + "tslib": "^2.5.3" }, "ava": { "files": [ diff --git a/packages/taler-util/src/bank-api-client.ts b/packages/taler-util/src/bank-api-client.ts new file mode 100644 index 000000000..cc4123500 --- /dev/null +++ b/packages/taler-util/src/bank-api-client.ts @@ -0,0 +1,325 @@ +/* + This file is part of GNU Taler + (C) 2022 Taler Systems S.A. + + GNU Taler is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + GNU Taler; see the file COPYING. If not, see + */ + +/** + * Client for the Taler (demo-)bank. + */ + +/** + * Imports. + */ +import { + AmountString, + base64FromArrayBuffer, + buildCodecForObject, + Codec, + codecForAny, + codecForString, + encodeCrock, + generateIban, + getRandomBytes, + j2s, + Logger, + stringToBytes, + TalerError, + TalerErrorCode, +} from "@gnu-taler/taler-util"; +import { + checkSuccessResponseOrThrow, + createPlatformHttpLib, + HttpRequestLibrary, + readSuccessResponseJsonOrThrow, +} from "@gnu-taler/taler-util/http"; + +const logger = new Logger("bank-api-client.ts"); + +export enum CreditDebitIndicator { + Credit = "credit", + Debit = "debit", +} + +export interface BankAccountBalanceResponse { + balance: { + amount: AmountString; + credit_debit_indicator: CreditDebitIndicator; + }; +} + +export interface BankUser { + username: string; + password: string; + accountPaytoUri: string; +} + +export interface WithdrawalOperationInfo { + withdrawal_id: string; + taler_withdraw_uri: string; +} + +/** + * Helper function to generate the "Authorization" HTTP header. + */ +function makeBasicAuthHeader(username: string, password: string): string { + const auth = `${username}:${password}`; + const authEncoded: string = base64FromArrayBuffer(stringToBytes(auth)); + return `Basic ${authEncoded}`; +} + +const codecForWithdrawalOperationInfo = (): Codec => + buildCodecForObject() + .property("withdrawal_id", codecForString()) + .property("taler_withdraw_uri", codecForString()) + .build("WithdrawalOperationInfo"); + +export interface BankAccessApiClientArgs { + auth?: { username: string; password: string }; + httpClient?: HttpRequestLibrary; +} + +export interface BankAccessApiCreateTransactionRequest { + amount: AmountString; + paytoUri: string; +} + +export class WireGatewayApiClientArgs { + auth?: { + username: string; + password: string; + }; + httpClient?: HttpRequestLibrary; +} + +/** + * This API look like it belongs to harness + * but it will be nice to have in utils to be used by others + */ +export class WireGatewayApiClient { + httpLib; + + constructor( + private baseUrl: string, + private args: WireGatewayApiClientArgs = {}, + ) { + this.httpLib = args.httpClient ?? createPlatformHttpLib(); + } + + private makeAuthHeader(): Record { + const auth = this.args.auth; + if (auth) { + return { + Authorization: makeBasicAuthHeader(auth.username, auth.password), + }; + } + return {}; + } + + async adminAddIncoming(params: { + amount: string; + reservePub: string; + debitAccountPayto: string; + }): Promise { + let url = new URL(`admin/add-incoming`, this.baseUrl); + const resp = await this.httpLib.fetch(url.href, { + method: "POST", + body: { + amount: params.amount, + reserve_pub: params.reservePub, + debit_account: params.debitAccountPayto, + }, + headers: this.makeAuthHeader(), + }); + logger.info(`add-incoming response status: ${resp.status}`); + await checkSuccessResponseOrThrow(resp); + } +} + +/** + * This API look like it belongs to harness + * but it will be nice to have in utils to be used by others + */ +export class BankAccessApiClient { + httpLib: HttpRequestLibrary; + + constructor( + private baseUrl: string, + private args: BankAccessApiClientArgs = {}, + ) { + this.httpLib = args.httpClient ?? createPlatformHttpLib(); + } + + setAuth(auth: { username: string; password: string }) { + this.args.auth = auth; + } + + private makeAuthHeader(): Record { + if (!this.args.auth) { + return {}; + } + const authHeaderValue = makeBasicAuthHeader( + this.args.auth.username, + this.args.auth.password, + ); + return { + Authorization: authHeaderValue, + }; + } + + async getAccountBalance( + username: string, + ): Promise { + const url = new URL(`accounts/${username}`, this.baseUrl); + const resp = await this.httpLib.fetch(url.href, { + headers: this.makeAuthHeader(), + }); + return await resp.json(); + } + + async getTransactions(username: string): Promise { + const reqUrl = new URL(`accounts/${username}/transactions`, this.baseUrl); + const resp = await this.httpLib.fetch(reqUrl.href, { + method: "GET", + headers: { + ...this.makeAuthHeader(), + }, + }); + + const res = await readSuccessResponseJsonOrThrow(resp, codecForAny()); + logger.info(`result: ${j2s(res)}`); + } + + async createTransaction( + username: string, + req: BankAccessApiCreateTransactionRequest, + ): Promise { + const reqUrl = new URL(`accounts/${username}/transactions`, this.baseUrl); + + const resp = await this.httpLib.fetch(reqUrl.href, { + method: "POST", + body: req, + headers: this.makeAuthHeader(), + }); + + return await readSuccessResponseJsonOrThrow(resp, codecForAny()); + } + + async registerAccount( + username: string, + password: string, + options: { + iban?: string; + } = {}, + ): Promise { + const url = new URL("testing/register", this.baseUrl); + const resp = await this.httpLib.fetch(url.href, { + method: "POST", + body: { + username, + password, + iban: options?.iban, + }, + }); + let paytoUri = `payto://x-taler-bank/localhost/${username}`; + if (resp.status !== 200 && resp.status !== 202 && resp.status !== 204) { + logger.error(`${j2s(await resp.json())}`); + throw TalerError.fromDetail( + TalerErrorCode.GENERIC_UNEXPECTED_REQUEST_ERROR, + { + httpStatusCode: resp.status, + }, + ); + } + try { + // Pybank has no body, thus this might throw. + const respJson = await resp.json(); + // LibEuFin demobank returns payto URI in response + if (respJson.paytoUri) { + paytoUri = respJson.paytoUri; + } + } catch (e) { + // Do nothing + } + return { + password, + username, + accountPaytoUri: paytoUri, + }; + } + + async createRandomBankUser(): Promise { + const username = "user-" + encodeCrock(getRandomBytes(10)).toLowerCase(); + const password = "pw-" + encodeCrock(getRandomBytes(10)).toLowerCase(); + // FIXME: This is just a temporary workaround, because demobank is running out of short IBANs + const iban = generateIban("DE", 15); + return await this.registerAccount(username, password, { + iban, + }); + } + + async createWithdrawalOperation( + user: string, + amount: string, + ): Promise { + const url = new URL(`accounts/${user}/withdrawals`, this.baseUrl); + const resp = await this.httpLib.fetch(url.href, { + method: "POST", + body: { + amount, + }, + headers: this.makeAuthHeader(), + }); + return readSuccessResponseJsonOrThrow( + resp, + codecForWithdrawalOperationInfo(), + ); + } + + async confirmWithdrawalOperation( + username: string, + wopi: WithdrawalOperationInfo, + ): Promise { + const url = new URL( + `accounts/${username}/withdrawals/${wopi.withdrawal_id}/confirm`, + this.baseUrl, + ); + logger.info(`confirming withdrawal operation via ${url.href}`); + const resp = await this.httpLib.fetch(url.href, { + method: "POST", + body: {}, + headers: this.makeAuthHeader(), + }); + + logger.info(`response status ${resp.status}`); + const respJson = await readSuccessResponseJsonOrThrow(resp, codecForAny()); + + // FIXME: We don't check the status here! + } + + async abortWithdrawalOperation( + accountName: string, + wopi: WithdrawalOperationInfo, + ): Promise { + const url = new URL( + `accounts/${accountName}/withdrawals/${wopi.withdrawal_id}/abort`, + this.baseUrl, + ); + const resp = await this.httpLib.fetch(url.href, { + method: "POST", + body: {}, + headers: this.makeAuthHeader(), + }); + await readSuccessResponseJsonOrThrow(resp, codecForAny()); + } +} diff --git a/packages/taler-util/src/http-common.ts b/packages/taler-util/src/http-common.ts index 02ec8ce72..f25705545 100644 --- a/packages/taler-util/src/http-common.ts +++ b/packages/taler-util/src/http-common.ts @@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL3.0-or-later */ -import { CancellationToken } from "./CancellationToken.js"; +import type { CancellationToken } from "./CancellationToken.js"; import { Codec } from "./codec.js"; import { j2s } from "./helpers.js"; import { diff --git a/packages/taler-util/src/index.ts b/packages/taler-util/src/index.ts index 0b75619ab..568e2f438 100644 --- a/packages/taler-util/src/index.ts +++ b/packages/taler-util/src/index.ts @@ -41,3 +41,4 @@ export * from "./iban.js"; export * from "./transaction-test-data.js"; export * from "./libeufin-api-types.js"; export * from "./MerchantApiClient.js"; +export * from "./bank-api-client.js"; diff --git a/packages/taler-util/tsconfig.json b/packages/taler-util/tsconfig.json index 34f35d253..2e97142ce 100644 --- a/packages/taler-util/tsconfig.json +++ b/packages/taler-util/tsconfig.json @@ -5,8 +5,8 @@ "declaration": true, "declarationMap": false, "target": "ES2020", - "module": "ES2020", - "moduleResolution": "node16", + "module": "Node16", + "moduleResolution": "Node16", "sourceMap": true, "lib": ["ES2020"], "types": ["node"], diff --git a/packages/taler-wallet-cli/package.json b/packages/taler-wallet-cli/package.json index 06df1da76..6196c8971 100644 --- a/packages/taler-wallet-cli/package.json +++ b/packages/taler-wallet-cli/package.json @@ -33,8 +33,8 @@ "@types/node": "^18.11.17", "prettier": "^2.8.8", "rimraf": "^3.0.2", - "typedoc": "^0.24.8", - "typescript": "^5.1.3" + "typedoc": "^0.25.1", + "typescript": "^5.2.2" }, "dependencies": { "@gnu-taler/taler-util": "workspace:*", diff --git a/packages/taler-wallet-cli/tsconfig.json b/packages/taler-wallet-cli/tsconfig.json index 100339e43..42f0d88a8 100644 --- a/packages/taler-wallet-cli/tsconfig.json +++ b/packages/taler-wallet-cli/tsconfig.json @@ -3,10 +3,10 @@ "compilerOptions": { "composite": true, "target": "ES2018", - "module": "ESNext", + "module": "Node16", "moduleResolution": "Node16", "sourceMap": true, - "lib": ["es6"], + "lib": ["ES2020"], "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "strict": true, diff --git a/packages/taler-wallet-core/package.json b/packages/taler-wallet-core/package.json index 9cd6f6466..fda7b6081 100644 --- a/packages/taler-wallet-core/package.json +++ b/packages/taler-wallet-core/package.json @@ -65,8 +65,8 @@ "po2json": "^0.4.5", "prettier": "^2.8.8", "rimraf": "^3.0.2", - "typedoc": "^0.24.8", - "typescript": "^5.1.3" + "typedoc": "^0.25.1", + "typescript": "^5.2.2" }, "dependencies": { "@gnu-taler/idb-bridge": "workspace:*", diff --git a/packages/taler-wallet-core/src/bank-api-client.ts b/packages/taler-wallet-core/src/bank-api-client.ts deleted file mode 100644 index f1289525d..000000000 --- a/packages/taler-wallet-core/src/bank-api-client.ts +++ /dev/null @@ -1,340 +0,0 @@ -/* - This file is part of GNU Taler - (C) 2022 Taler Systems S.A. - - GNU Taler is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - GNU Taler; see the file COPYING. If not, see - */ - -/** - * Client for the Taler (demo-)bank. - */ - -/** - * Imports. - */ -import { - AmountString, - base64FromArrayBuffer, - buildCodecForObject, - Codec, - codecForAny, - codecForString, - encodeCrock, - generateIban, - getRandomBytes, - j2s, - Logger, - stringToBytes, - TalerError, - TalerErrorCode, -} from "@gnu-taler/taler-util"; -import { - checkSuccessResponseOrThrow, - createPlatformHttpLib, - HttpRequestLibrary, - readSuccessResponseJsonOrThrow, -} from "@gnu-taler/taler-util/http"; - -const logger = new Logger("bank-api-client.ts"); - -export enum CreditDebitIndicator { - Credit = "credit", - Debit = "debit", -} - -export interface BankAccountBalanceResponse { - balance: { - amount: AmountString; - credit_debit_indicator: CreditDebitIndicator; - }; -} - -export interface BankServiceHandle { - readonly bankAccessApiBaseUrl: string; - readonly http: HttpRequestLibrary; -} - -export interface BankUser { - username: string; - password: string; - accountPaytoUri: string; -} - -export interface WithdrawalOperationInfo { - withdrawal_id: string; - taler_withdraw_uri: string; -} - -/** - * FIXME: Rename, this is not part of the integration test harness anymore. - */ -export interface HarnessExchangeBankAccount { - accountName: string; - accountPassword: string; - accountPaytoUri: string; - wireGatewayApiBaseUrl: string; -} - -/** - * Helper function to generate the "Authorization" HTTP header. - */ -function makeBasicAuthHeader(username: string, password: string): string { - const auth = `${username}:${password}`; - const authEncoded: string = base64FromArrayBuffer(stringToBytes(auth)); - return `Basic ${authEncoded}`; -} - -const codecForWithdrawalOperationInfo = (): Codec => - buildCodecForObject() - .property("withdrawal_id", codecForString()) - .property("taler_withdraw_uri", codecForString()) - .build("WithdrawalOperationInfo"); - -export interface BankAccessApiClientArgs { - auth?: { username: string; password: string }; - httpClient?: HttpRequestLibrary; -} - -export interface BankAccessApiCreateTransactionRequest { - amount: AmountString; - paytoUri: string; -} - -export class WireGatewayApiClientArgs { - auth?: { - username: string; - password: string; - }; - httpClient?: HttpRequestLibrary; -} - -/** - * This API look like it belongs to harness - * but it will be nice to have in utils to be used by others - */ -export class WireGatewayApiClient { - httpLib; - - constructor( - private baseUrl: string, - private args: WireGatewayApiClientArgs = {}, - ) { - this.httpLib = args.httpClient ?? createPlatformHttpLib(); - } - - private makeAuthHeader(): Record { - const auth = this.args.auth; - if (auth) { - return { - Authorization: makeBasicAuthHeader(auth.username, auth.password), - }; - } - return {}; - } - - async adminAddIncoming(params: { - amount: string; - reservePub: string; - debitAccountPayto: string; - }): Promise { - let url = new URL(`admin/add-incoming`, this.baseUrl); - const resp = await this.httpLib.fetch(url.href, { - method: "POST", - body: { - amount: params.amount, - reserve_pub: params.reservePub, - debit_account: params.debitAccountPayto, - }, - headers: this.makeAuthHeader(), - }); - logger.info(`add-incoming response status: ${resp.status}`); - await checkSuccessResponseOrThrow(resp); - } -} - -/** - * This API look like it belongs to harness - * but it will be nice to have in utils to be used by others - */ -export class BankAccessApiClient { - httpLib: HttpRequestLibrary; - - constructor( - private baseUrl: string, - private args: BankAccessApiClientArgs = {}, - ) { - this.httpLib = args.httpClient ?? createPlatformHttpLib(); - } - - setAuth(auth: { username: string; password: string }) { - this.args.auth = auth; - } - - private makeAuthHeader(): Record { - if (!this.args.auth) { - return {}; - } - const authHeaderValue = makeBasicAuthHeader( - this.args.auth.username, - this.args.auth.password, - ); - return { - Authorization: authHeaderValue, - }; - } - - async getAccountBalance( - username: string, - ): Promise { - const url = new URL(`accounts/${username}`, this.baseUrl); - const resp = await this.httpLib.fetch(url.href, { - headers: this.makeAuthHeader(), - }); - return await resp.json(); - } - - async getTransactions(username: string): Promise { - const reqUrl = new URL(`accounts/${username}/transactions`, this.baseUrl); - const resp = await this.httpLib.fetch(reqUrl.href, { - method: "GET", - headers: { - ...this.makeAuthHeader(), - }, - }); - - const res = await readSuccessResponseJsonOrThrow(resp, codecForAny()); - logger.info(`result: ${j2s(res)}`); - } - - async createTransaction( - username: string, - req: BankAccessApiCreateTransactionRequest, - ): Promise { - const reqUrl = new URL(`accounts/${username}/transactions`, this.baseUrl); - - const resp = await this.httpLib.fetch(reqUrl.href, { - method: "POST", - body: req, - headers: this.makeAuthHeader(), - }); - - return await readSuccessResponseJsonOrThrow(resp, codecForAny()); - } - - async registerAccount( - username: string, - password: string, - options: { - iban?: string; - } = {}, - ): Promise { - const url = new URL("testing/register", this.baseUrl); - const resp = await this.httpLib.fetch(url.href, { - method: "POST", - body: { - username, - password, - iban: options?.iban, - }, - }); - let paytoUri = `payto://x-taler-bank/localhost/${username}`; - if (resp.status !== 200 && resp.status !== 202 && resp.status !== 204) { - logger.error(`${j2s(await resp.json())}`); - throw TalerError.fromDetail( - TalerErrorCode.GENERIC_UNEXPECTED_REQUEST_ERROR, - { - httpStatusCode: resp.status, - }, - ); - } - try { - // Pybank has no body, thus this might throw. - const respJson = await resp.json(); - // LibEuFin demobank returns payto URI in response - if (respJson.paytoUri) { - paytoUri = respJson.paytoUri; - } - } catch (e) { - // Do nothing - } - return { - password, - username, - accountPaytoUri: paytoUri, - }; - } - - async createRandomBankUser(): Promise { - const username = "user-" + encodeCrock(getRandomBytes(10)).toLowerCase(); - const password = "pw-" + encodeCrock(getRandomBytes(10)).toLowerCase(); - // FIXME: This is just a temporary workaround, because demobank is running out of short IBANs - const iban = generateIban("DE", 15); - return await this.registerAccount(username, password, { - iban, - }); - } - - async createWithdrawalOperation( - user: string, - amount: string, - ): Promise { - const url = new URL(`accounts/${user}/withdrawals`, this.baseUrl); - const resp = await this.httpLib.fetch(url.href, { - method: "POST", - body: { - amount, - }, - headers: this.makeAuthHeader(), - }); - return readSuccessResponseJsonOrThrow( - resp, - codecForWithdrawalOperationInfo(), - ); - } - - async confirmWithdrawalOperation( - username: string, - wopi: WithdrawalOperationInfo, - ): Promise { - const url = new URL( - `accounts/${username}/withdrawals/${wopi.withdrawal_id}/confirm`, - this.baseUrl, - ); - logger.info(`confirming withdrawal operation via ${url.href}`); - const resp = await this.httpLib.fetch(url.href, { - method: "POST", - body: {}, - headers: this.makeAuthHeader(), - }); - - logger.info(`response status ${resp.status}`); - const respJson = await readSuccessResponseJsonOrThrow(resp, codecForAny()); - - // FIXME: We don't check the status here! - } - - async abortWithdrawalOperation( - accountName: string, - wopi: WithdrawalOperationInfo, - ): Promise { - const url = new URL( - `accounts/${accountName}/withdrawals/${wopi.withdrawal_id}/abort`, - this.baseUrl, - ); - const resp = await this.httpLib.fetch(url.href, { - method: "POST", - body: {}, - headers: this.makeAuthHeader(), - }); - await readSuccessResponseJsonOrThrow(resp, codecForAny()); - } -} diff --git a/packages/taler-wallet-core/src/dbless.ts b/packages/taler-wallet-core/src/dbless.ts index 357b7d289..0aad477e4 100644 --- a/packages/taler-wallet-core/src/dbless.ts +++ b/packages/taler-wallet-core/src/dbless.ts @@ -52,7 +52,7 @@ import { HttpRequestLibrary, readSuccessResponseJsonOrThrow, } from "@gnu-taler/taler-util/http"; -import { BankAccessApiClient, BankServiceHandle } from "./bank-api-client.js"; +import { BankAccessApiClient } from "../../taler-util/src/bank-api-client.js"; import { TalerCryptoInterface } from "./crypto/cryptoImplementation.js"; import { DenominationRecord } from "./db.js"; import { isWithdrawableDenom } from "./index.js"; @@ -117,10 +117,6 @@ export async function topupReserveWithDemobank( args: TopupReserveWithDemobankArgs, ) { const { http, bankAccessApiBaseUrl, amount, exchangeInfo, reservePub } = args; - const bankHandle: BankServiceHandle = { - bankAccessApiBaseUrl: bankAccessApiBaseUrl, - http, - }; const bankClient = new BankAccessApiClient(bankAccessApiBaseUrl); const bankUser = await bankClient.createRandomBankUser(); const wopi = await bankClient.createWithdrawalOperation( diff --git a/packages/taler-wallet-core/src/index.ts b/packages/taler-wallet-core/src/index.ts index d64f7d5e6..643d65620 100644 --- a/packages/taler-wallet-core/src/index.ts +++ b/packages/taler-wallet-core/src/index.ts @@ -44,8 +44,6 @@ export * from "./operations/backup/index.js"; export * from "./operations/exchanges.js"; -export * from "./bank-api-client.js"; - export * from "./operations/withdraw.js"; export * from "./operations/refresh.js"; diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index f42365c00..9a3b8f235 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -129,10 +129,8 @@ import { codecForTestingSetTimetravelRequest, setDangerousTimetravel, } from "@gnu-taler/taler-util"; -import { - HttpRequestLibrary, - readSuccessResponseJsonOrThrow, -} from "@gnu-taler/taler-util/http"; +import type { HttpRequestLibrary } from "@gnu-taler/taler-util/http"; +import { readSuccessResponseJsonOrThrow } from "@gnu-taler/taler-util/http"; import { TalerCryptoInterface } from "./crypto/cryptoImplementation.js"; import { CryptoDispatcher, diff --git a/packages/taler-wallet-core/tsconfig.json b/packages/taler-wallet-core/tsconfig.json index 8de28b3d8..663a4dd98 100644 --- a/packages/taler-wallet-core/tsconfig.json +++ b/packages/taler-wallet-core/tsconfig.json @@ -4,12 +4,12 @@ "composite": true, "declaration": true, "declarationMap": false, - "target": "ES2017", - "module": "ESNext", + "target": "ES2020", + "module": "Node16", "moduleResolution": "Node16", "resolveJsonModule": true, "sourceMap": true, - "lib": ["es6"], + "lib": ["ES2020"], "resolvePackageJsonImports": true, "types": ["node"], "noImplicitReturns": true, @@ -33,8 +33,5 @@ "path": "../taler-util/" } ], - "include": [ - "src/**/*", - "src/*.json" - ] + "include": ["src/**/*", "src/*.json", "../taler-util/src/bank-api-client.ts"] } diff --git a/packages/taler-wallet-embedded/tsconfig.json b/packages/taler-wallet-embedded/tsconfig.json index 7b27ca6b7..e8b265fb9 100644 --- a/packages/taler-wallet-embedded/tsconfig.json +++ b/packages/taler-wallet-embedded/tsconfig.json @@ -5,10 +5,10 @@ "declaration": true, "declarationMap": true, "target": "ES6", - "module": "ESNext", + "module": "Node16", "moduleResolution": "Node16", "sourceMap": true, - "lib": ["es6"], + "lib": ["ES2020"], "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "strict": true, diff --git a/packages/taler-wallet-webextension/package.json b/packages/taler-wallet-webextension/package.json index 040878529..f442b1509 100644 --- a/packages/taler-wallet-webextension/package.json +++ b/packages/taler-wallet-webextension/package.json @@ -64,7 +64,7 @@ "preact-cli": "^3.3.5", "preact-render-to-string": "^5.1.19", "rimraf": "^3.0.2", - "typescript": "5.1.3" + "typescript": "5.2.2" }, "nyc": { "include": [ diff --git a/packages/taler-wallet-webextension/src/wxBackend.ts b/packages/taler-wallet-webextension/src/wxBackend.ts index e7385abe5..d5f6ca2cd 100644 --- a/packages/taler-wallet-webextension/src/wxBackend.ts +++ b/packages/taler-wallet-webextension/src/wxBackend.ts @@ -51,14 +51,11 @@ import { importDb, openPromise, } from "@gnu-taler/taler-wallet-core"; -import { - MessageFromBackend, - MessageFromFrontend, - MessageResponse, -} from "./platform/api.js"; +import { MessageFromFrontend, MessageResponse } from "./platform/api.js"; import { platform } from "./platform/background.js"; import { ExtensionOperations } from "./taler-wallet-interaction-loader.js"; import { BackgroundOperations } from "./wxApi.js"; +import { HttpRequestLibrary } from "@gnu-taler/taler-util/http"; /** * Currently active wallet instance. Might be unloaded and @@ -297,7 +294,7 @@ async function reinitWallet(): Promise { } currentDatabase = undefined; // setBadgeText({ text: "" }); - let httpLib; + let httpLib: HttpRequestLibrary; let cryptoWorker; let timer; @@ -318,7 +315,7 @@ async function reinitWallet(): Promise { logger.info("Setting up wallet"); const wallet = await Wallet.create( indexedDB as any, - httpLib, + httpLib as any, timer, cryptoWorker, { diff --git a/packages/taler-wallet-webextension/tsconfig.json b/packages/taler-wallet-webextension/tsconfig.json index 773853302..08cbc871a 100644 --- a/packages/taler-wallet-webextension/tsconfig.json +++ b/packages/taler-wallet-webextension/tsconfig.json @@ -1,15 +1,12 @@ { "compilerOptions": { "composite": true, - "lib": [ - "es2021", - "DOM" - ], - "jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "jsxFactory": "h", /* Specify the JSX factory function to use when targeting react JSX emit, e.g. React.createElement or h. */ + "lib": ["es2020", "DOM"], + "jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, + "jsxFactory": "h" /* Specify the JSX factory function to use when targeting react JSX emit, e.g. React.createElement or h. */, "jsxFragmentFactory": "Fragment", // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#custom-jsx-factories "moduleResolution": "Node16", - "module": "ES2020", + "module": "Node16", "target": "ES6", "skipLibCheck": true, "preserveSymlinks": true, @@ -23,9 +20,7 @@ "esModuleInterop": true, "importHelpers": true, "rootDir": "./src", - "typeRoots": [ - "./node_modules/@types" - ] + "typeRoots": ["./node_modules/@types"] }, "references": [ { @@ -35,7 +30,5 @@ "path": "../taler-util/" } ], - "include": [ - "src/**/*" - ] + "include": ["src/**/*"] } diff --git a/packages/web-util/package.json b/packages/web-util/package.json index 6cfe19258..81eee949a 100644 --- a/packages/web-util/package.json +++ b/packages/web-util/package.json @@ -56,7 +56,7 @@ "sass": "1.56.1", "swr": "2.0.3", "tslib": "^2.5.3", - "typescript": "^5.1.3", + "typescript": "^5.2.2", "ws": "7.4.5" }, "dependencies": { diff --git a/packages/web-util/tsconfig.json b/packages/web-util/tsconfig.json index fc69cad06..a315dda1c 100644 --- a/packages/web-util/tsconfig.json +++ b/packages/web-util/tsconfig.json @@ -3,17 +3,14 @@ "composite": true, "declaration": true, "declarationMap": true, - "target": "ES6", - "module": "ESNext", + "target": "ES2020", + "module": "Node16", "jsx": "react", "jsxFactory": "h", "jsxFragmentFactory": "Fragment", "moduleResolution": "Node16", "sourceMap": true, - "lib": [ - "DOM", - "es6" - ], + "lib": ["DOM", "ES2020"], "outDir": "lib", "preserveSymlinks": true, "skipLibCheck": true, @@ -27,11 +24,7 @@ "esModuleInterop": true, "importHelpers": true, "rootDir": "./src", - "typeRoots": [ - "./node_modules/@types" - ] + "typeRoots": ["./node_modules/@types"] }, - "include": [ - "src/**/*" - ] + "include": ["src/**/*"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9a389bf50..347dbf0a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '6.1' +lockfileVersion: '6.0' settings: autoInstallPeers: true @@ -32,6 +32,9 @@ importers: prettier: specifier: ^2.8.8 version: 2.8.8 + typescript: + specifier: ^5.2.2 + version: 5.2.2 packages/aml-backoffice-ui: dependencies: @@ -92,7 +95,7 @@ importers: version: 0.17.19 eslint-config-preact: specifier: ^1.2.0 - version: 1.3.0(@typescript-eslint/eslint-plugin@5.41.0)(eslint@8.42.0)(typescript@5.1.3) + version: 1.3.0(@typescript-eslint/eslint-plugin@5.41.0)(eslint@8.48.0)(typescript@5.2.2) mocha: specifier: ^9.2.0 version: 9.2.2 @@ -109,8 +112,8 @@ importers: specifier: ^3.3.2 version: 3.3.2 typescript: - specifier: 5.1.3 - version: 5.1.3 + specifier: 5.2.2 + version: 5.2.2 packages/anastasis-cli: dependencies: @@ -134,11 +137,11 @@ importers: specifier: ^3.0.2 version: 3.0.2 typedoc: - specifier: ^0.24.8 - version: 0.24.8(typescript@5.1.3) + specifier: ^0.25.1 + version: 0.25.1(typescript@5.2.2) typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 packages/anastasis-core: dependencies: @@ -159,8 +162,8 @@ importers: specifier: ^3.0.2 version: 3.0.2 typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 packages/anastasis-webui: dependencies: @@ -220,8 +223,8 @@ importers: specifier: 1.56.1 version: 1.56.1 typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 packages/demobank-ui: dependencies: @@ -273,10 +276,10 @@ importers: version: 18.11.17 '@typescript-eslint/eslint-plugin': specifier: ^5.41.0 - version: 5.41.0(@typescript-eslint/parser@5.41.0)(eslint@8.42.0)(typescript@5.1.3) + version: 5.41.0(@typescript-eslint/parser@5.41.0)(eslint@8.48.0)(typescript@5.2.2) '@typescript-eslint/parser': specifier: ^5.41.0 - version: 5.41.0(eslint@8.42.0)(typescript@5.1.3) + version: 5.41.0(eslint@8.48.0)(typescript@5.2.2) bulma: specifier: ^0.9.4 version: 0.9.4 @@ -294,7 +297,7 @@ importers: version: 0.17.7 eslint-config-preact: specifier: ^1.2.0 - version: 1.3.0(@typescript-eslint/eslint-plugin@5.41.0)(eslint@8.42.0)(typescript@5.1.3) + version: 1.3.0(@typescript-eslint/eslint-plugin@5.41.0)(eslint@8.48.0)(typescript@5.2.2) mocha: specifier: ^9.2.0 version: 9.2.2 @@ -308,8 +311,8 @@ importers: specifier: 1.56.1 version: 1.56.1 typescript: - specifier: 5.1.3 - version: 5.1.3 + specifier: 5.2.2 + version: 5.2.2 packages/idb-bridge: dependencies: @@ -319,7 +322,7 @@ importers: optionalDependencies: better-sqlite3: specifier: ^8.4.0 - version: 8.4.0 + version: 8.6.0 devDependencies: '@types/better-sqlite3': specifier: ^7.6.4 @@ -337,8 +340,8 @@ importers: specifier: ^5.0.1 version: 5.0.1 typescript: - specifier: ^5.1.6 - version: 5.1.6 + specifier: ^5.2.2 + version: 5.2.2 packages/merchant-backend-ui: dependencies: @@ -381,10 +384,10 @@ importers: version: 4.2.1 '@typescript-eslint/eslint-plugin': specifier: ^4.22.0 - version: 4.33.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@5.1.3) + version: 4.33.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@5.2.2) '@typescript-eslint/parser': specifier: ^4.22.0 - version: 4.33.0(eslint@7.32.0)(typescript@5.1.3) + version: 4.33.0(eslint@7.32.0)(typescript@5.2.2) babel-loader: specifier: ^8.2.2 version: 8.2.5(@babel/core@7.18.9)(webpack@4.46.0) @@ -396,7 +399,7 @@ importers: version: 7.32.0 eslint-config-preact: specifier: ^1.1.4 - version: 1.3.0(@typescript-eslint/eslint-plugin@4.33.0)(eslint@7.32.0)(typescript@5.1.3) + version: 1.3.0(@typescript-eslint/eslint-plugin@4.33.0)(eslint@7.32.0)(typescript@5.2.2) eslint-plugin-header: specifier: ^3.1.1 version: 3.1.1(eslint@7.32.0) @@ -417,13 +420,13 @@ importers: version: 1.0.14 ts-node: specifier: ^10.9.1 - version: 10.9.1(@types/node@20.4.1)(typescript@5.1.3) + version: 10.9.1(@types/node@20.5.9)(typescript@5.2.2) tslib: specifier: 2.5.3 version: 2.5.3 typescript: - specifier: 5.1.3 - version: 5.1.3 + specifier: 5.2.2 + version: 5.2.2 packages/merchant-backoffice-ui: dependencies: @@ -478,10 +481,10 @@ importers: version: 18.11.17 '@typescript-eslint/eslint-plugin': specifier: ^4.22.0 - version: 4.33.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@5.1.3) + version: 4.33.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@5.2.2) '@typescript-eslint/parser': specifier: ^4.22.0 - version: 4.33.0(eslint@7.32.0)(typescript@5.1.3) + version: 4.33.0(eslint@7.32.0)(typescript@5.2.2) base64-inline-loader: specifier: ^1.1.1 version: 1.1.1(webpack@4.46.0) @@ -517,7 +520,7 @@ importers: version: 7.32.0 eslint-config-preact: specifier: ^1.1.4 - version: 1.3.0(@typescript-eslint/eslint-plugin@4.33.0)(eslint@7.32.0)(typescript@5.1.3) + version: 1.3.0(@typescript-eslint/eslint-plugin@4.33.0)(eslint@7.32.0)(typescript@5.2.2) eslint-plugin-header: specifier: ^3.1.1 version: 3.1.1(eslint@7.32.0) @@ -529,7 +532,7 @@ importers: version: 0.0.10 html-webpack-skip-assets-plugin: specifier: ^1.0.1 - version: 1.0.3(html-webpack-plugin@5.5.1)(webpack@4.46.0) + version: 1.0.3(html-webpack-plugin@5.5.3)(webpack@4.46.0) inline-chunk-html-plugin: specifier: ^1.1.1 version: 1.1.1 @@ -549,11 +552,11 @@ importers: specifier: ^0.5.21 version: 0.5.21 typedoc: - specifier: ^0.24.8 - version: 0.24.8(typescript@5.1.3) + specifier: ^0.25.1 + version: 0.25.1(typescript@5.2.2) typescript: - specifier: 5.1.3 - version: 5.1.3 + specifier: 5.2.2 + version: 5.2.2 packages/pogen: dependencies: @@ -568,8 +571,8 @@ importers: specifier: ^0.4.5 version: 0.4.5 typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 packages/taler-harness: dependencies: @@ -596,8 +599,8 @@ importers: specifier: ^3.0.2 version: 3.0.2 typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 packages/taler-util: dependencies: @@ -633,8 +636,8 @@ importers: specifier: ^3.0.2 version: 3.0.2 typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 packages/taler-wallet-cli: dependencies: @@ -658,11 +661,11 @@ importers: specifier: ^3.0.2 version: 3.0.2 typedoc: - specifier: ^0.24.8 - version: 0.24.8(typescript@5.1.3) + specifier: ^0.25.1 + version: 0.25.1(typescript@5.2.2) typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 packages/taler-wallet-core: dependencies: @@ -693,10 +696,10 @@ importers: version: link:../pogen '@typescript-eslint/eslint-plugin': specifier: ^5.36.1 - version: 5.41.0(@typescript-eslint/parser@5.41.0)(eslint@8.26.0)(typescript@5.1.3) + version: 5.41.0(@typescript-eslint/parser@5.41.0)(eslint@8.26.0)(typescript@5.2.2) '@typescript-eslint/parser': specifier: ^5.36.1 - version: 5.41.0(eslint@8.26.0)(typescript@5.1.3) + version: 5.41.0(eslint@8.26.0)(typescript@5.2.2) ava: specifier: ^4.3.3 version: 4.3.3(@ava/typescript@4.0.0) @@ -734,11 +737,11 @@ importers: specifier: ^3.0.2 version: 3.0.2 typedoc: - specifier: ^0.24.8 - version: 0.24.8(typescript@5.1.3) + specifier: ^0.25.1 + version: 0.25.1(typescript@5.2.2) typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 packages/taler-wallet-embedded: dependencies: @@ -803,10 +806,10 @@ importers: devDependencies: '@babel/preset-react': specifier: ^7.22.3 - version: 7.22.3(@babel/core@7.18.9) + version: 7.22.3(@babel/core@7.22.15) '@babel/preset-typescript': specifier: 7.18.6 - version: 7.18.6(@babel/core@7.18.9) + version: 7.18.6(@babel/core@7.22.15) '@gnu-taler/pogen': specifier: workspace:* version: link:../pogen @@ -865,8 +868,8 @@ importers: specifier: ^3.0.2 version: 3.0.2 typescript: - specifier: 5.1.3 - version: 5.1.3 + specifier: 5.2.2 + version: 5.2.2 packages/web-util: dependencies: @@ -956,14 +959,19 @@ importers: specifier: ^2.5.3 version: 2.5.3 typescript: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^5.2.2 + version: 5.2.2 ws: specifier: 7.4.5 version: 7.4.5 packages: + /@aashutoshrathi/word-wrap@1.2.6: + resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} + engines: {node: '>=0.10.0'} + dev: true + /@alloc/quick-lru@5.2.0: resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} @@ -975,6 +983,14 @@ packages: '@jridgewell/gen-mapping': 0.1.1 '@jridgewell/trace-mapping': 0.3.17 + /@ampproject/remapping@2.2.1: + resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.19 + dev: true + /@apideck/better-ajv-errors@0.3.6(ajv@8.11.0): resolution: {integrity: sha512-P+ZygBLZtkp0qqOAJJVX4oX/sFo5JR3eBWwwuqHHhK0GIgQOKWrAfiAaWX0aArHkRWHMuggFEgAZNxVPwPZYaA==} engines: {node: '>=10'} @@ -1014,6 +1030,14 @@ packages: dependencies: '@babel/highlight': 7.18.6 + /@babel/code-frame@7.22.13: + resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.22.13 + chalk: 2.4.2 + dev: true + /@babel/compat-data@7.19.4: resolution: {integrity: sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw==} engines: {node: '>=6.9.0'} @@ -1028,6 +1052,11 @@ packages: engines: {node: '>=6.9.0'} dev: true + /@babel/compat-data@7.22.9: + resolution: {integrity: sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/core@7.13.16: resolution: {integrity: sha512-sXHpixBiWWFti0AV2Zq7avpTasr6sIAu7Y396c608541qAU2ui4a193m0KSQmfPSKFZLnQ3cvlKDOm3XkuXm3Q==} engines: {node: '>=6.9.0'} @@ -1096,6 +1125,29 @@ packages: - supports-color dev: true + /@babel/core@7.22.15: + resolution: {integrity: sha512-PtZqMmgRrvj8ruoEOIwVA3yoF91O+Hgw9o7DAUTNBA6Mo2jpu31clx9a7Nz/9JznqetTR6zwfC4L3LAjKQXUwA==} + engines: {node: '>=6.9.0'} + dependencies: + '@ampproject/remapping': 2.2.1 + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.22.15 + '@babel/helper-compilation-targets': 7.22.15 + '@babel/helper-module-transforms': 7.22.15(@babel/core@7.22.15) + '@babel/helpers': 7.22.15 + '@babel/parser': 7.22.15 + '@babel/template': 7.22.15 + '@babel/traverse': 7.22.15 + '@babel/types': 7.22.15 + convert-source-map: 1.9.0 + debug: 4.3.4 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/eslint-parser@7.19.1(@babel/core@7.18.9)(eslint@7.32.0): resolution: {integrity: sha512-AqNf2QWt1rtu2/1rLswy6CDP7H9Oh3mMhk177Y67Rg8d7RD9WfOLLv8CGn6tisFvS2htm86yIe1yLF6I1UDaGQ==} engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} @@ -1110,7 +1162,7 @@ packages: semver: 6.3.0 dev: true - /@babel/eslint-parser@7.19.1(@babel/core@7.18.9)(eslint@8.42.0): + /@babel/eslint-parser@7.19.1(@babel/core@7.18.9)(eslint@8.48.0): resolution: {integrity: sha512-AqNf2QWt1rtu2/1rLswy6CDP7H9Oh3mMhk177Y67Rg8d7RD9WfOLLv8CGn6tisFvS2htm86yIe1yLF6I1UDaGQ==} engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} peerDependencies: @@ -1119,7 +1171,7 @@ packages: dependencies: '@babel/core': 7.18.9 '@nicolo-ribaudo/eslint-scope-5-internals': 5.1.1-v1 - eslint: 8.42.0 + eslint: 8.48.0 eslint-visitor-keys: 2.1.0 semver: 6.3.0 dev: true @@ -1142,6 +1194,16 @@ packages: '@jridgewell/trace-mapping': 0.3.17 jsesc: 2.5.2 + /@babel/generator@7.22.15: + resolution: {integrity: sha512-Zu9oWARBqeVOW0dZOjXc3JObrzuqothQ3y/n1kUtrjCoCPLkXUwMvOo/F/TCfoHMbWIFlWwpZtkZVb9ga4U2pA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.22.15 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.19 + jsesc: 2.5.2 + dev: true + /@babel/generator@7.22.3: resolution: {integrity: sha512-C17MW4wlk//ES/CJDL51kPNwl+qiBQyN7b9SKyVp11BLGFeSPoVaHrv+MNt8jwQFhQWowW88z1eeBx3pFz9v8A==} engines: {node: '>=6.9.0'} @@ -1286,6 +1348,17 @@ packages: semver: 6.3.0 dev: true + /@babel/helper-compilation-targets@7.22.15: + resolution: {integrity: sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/compat-data': 7.22.9 + '@babel/helper-validator-option': 7.22.15 + browserslist: 4.21.10 + lru-cache: 5.1.1 + semver: 6.3.1 + dev: true + /@babel/helper-create-class-features-plugin@7.20.12(@babel/core@7.18.9): resolution: {integrity: sha512-9OunRkbT0JQcednL0UFvbfXpAsUXiGjUk0a7sN8fUXX7Mue79cUSMjHGDRRi/Vz9vYlpIhLV5fMD5dKoMhhsNQ==} engines: {node: '>=6.9.0'} @@ -1324,6 +1397,25 @@ packages: - supports-color dev: true + /@babel/helper-create-class-features-plugin@7.20.12(@babel/core@7.22.15): + resolution: {integrity: sha512-9OunRkbT0JQcednL0UFvbfXpAsUXiGjUk0a7sN8fUXX7Mue79cUSMjHGDRRi/Vz9vYlpIhLV5fMD5dKoMhhsNQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.22.15 + '@babel/helper-annotate-as-pure': 7.18.6 + '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-function-name': 7.19.0 + '@babel/helper-member-expression-to-functions': 7.20.7 + '@babel/helper-optimise-call-expression': 7.18.6 + '@babel/helper-replace-supers': 7.20.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.20.0 + '@babel/helper-split-export-declaration': 7.18.6 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/helper-create-class-features-plugin@7.22.1(@babel/core@7.18.9): resolution: {integrity: sha512-SowrZ9BWzYFgzUMwUmowbPSGu6CXL5MSuuCkG3bejahSpSymioPmuLdhPxNOc9MjuNGjy7M/HaXvJ8G82Lywlw==} engines: {node: '>=6.9.0'} @@ -1455,6 +1547,11 @@ packages: resolution: {integrity: sha512-Z2tgopurB/kTbidvzeBrc2To3PUP/9i5MUe+fU6QJCQDyPwSH2oRapkLw3KGECDYSjhQZCNxEvNvZlLw8JjGwA==} engines: {node: '>=6.9.0'} + /@babel/helper-environment-visitor@7.22.5: + resolution: {integrity: sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helper-explode-assignable-expression@7.18.6: resolution: {integrity: sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==} engines: {node: '>=6.9.0'} @@ -1477,12 +1574,27 @@ packages: '@babel/template': 7.21.9 '@babel/types': 7.22.4 + /@babel/helper-function-name@7.22.5: + resolution: {integrity: sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.22.15 + '@babel/types': 7.22.15 + dev: true + /@babel/helper-hoist-variables@7.18.6: resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.4 + /@babel/helper-hoist-variables@7.22.5: + resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.22.15 + dev: true + /@babel/helper-member-expression-to-functions@7.18.9: resolution: {integrity: sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==} engines: {node: '>=6.9.0'} @@ -1517,6 +1629,13 @@ packages: dependencies: '@babel/types': 7.22.4 + /@babel/helper-module-imports@7.22.15: + resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.22.15 + dev: true + /@babel/helper-module-transforms@7.19.6: resolution: {integrity: sha512-fCmcfQo/KYr/VXXDIyd3CBGZ6AFhPFy1TfSEJ+PilGVlQT6jcbqtHAM4C1EciRqMza7/TpOUZliuSH+U6HAhJw==} engines: {node: '>=6.9.0'} @@ -1564,6 +1683,20 @@ packages: - supports-color dev: true + /@babel/helper-module-transforms@7.22.15(@babel/core@7.22.15): + resolution: {integrity: sha512-l1UiX4UyHSFsYt17iQ3Se5pQQZZHa22zyIXURmvkmLCD4t/aU+dvNWHatKac/D9Vm9UES7nvIqHs4jZqKviUmQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.22.15 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-module-imports': 7.22.15 + '@babel/helper-simple-access': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/helper-validator-identifier': 7.22.15 + dev: true + /@babel/helper-optimise-call-expression@7.18.6: resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==} engines: {node: '>=6.9.0'} @@ -1665,6 +1798,13 @@ packages: dependencies: '@babel/types': 7.22.4 + /@babel/helper-simple-access@7.22.5: + resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.22.15 + dev: true + /@babel/helper-skip-transparent-expression-wrappers@7.18.9: resolution: {integrity: sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw==} engines: {node: '>=6.9.0'} @@ -1685,6 +1825,13 @@ packages: dependencies: '@babel/types': 7.22.4 + /@babel/helper-split-export-declaration@7.22.6: + resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.22.15 + dev: true + /@babel/helper-string-parser@7.19.4: resolution: {integrity: sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==} engines: {node: '>=6.9.0'} @@ -1694,10 +1841,20 @@ packages: resolution: {integrity: sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==} engines: {node: '>=6.9.0'} + /@babel/helper-string-parser@7.22.5: + resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helper-validator-identifier@7.19.1: resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} engines: {node: '>=6.9.0'} + /@babel/helper-validator-identifier@7.22.15: + resolution: {integrity: sha512-4E/F9IIEi8WR94324mbDUMo074YTheJmd7eZF5vITTeYchqAi6sYXRLHUVsmkdmY4QjfKTcB2jB7dVP3NaBElQ==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helper-validator-option@7.18.6: resolution: {integrity: sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==} engines: {node: '>=6.9.0'} @@ -1707,6 +1864,11 @@ packages: resolution: {integrity: sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==} engines: {node: '>=6.9.0'} + /@babel/helper-validator-option@7.22.15: + resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helper-wrap-function@7.19.0: resolution: {integrity: sha512-txX8aN8CZyYGTwcLhlk87KRqncAzhh5TpQamZUa0/u3an36NtDpUP6bQgBCBcLeBs09R/OwQu3OjK0k/HwfNDg==} engines: {node: '>=6.9.0'} @@ -1740,6 +1902,17 @@ packages: transitivePeerDependencies: - supports-color + /@babel/helpers@7.22.15: + resolution: {integrity: sha512-7pAjK0aSdxOwR+CcYAqgWOGy5dcfvzsTIfFTb2odQqW47MDfv14UaJDY6eng8ylM2EaeKXdxaSWESbkmaQHTmw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.22.15 + '@babel/traverse': 7.22.15 + '@babel/types': 7.22.15 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/helpers@7.22.3: resolution: {integrity: sha512-jBJ7jWblbgr7r6wYZHMdIqKc73ycaTcCaWRq4/2LpuPHcx7xMlZvpGQkOYc9HeSjn6rcx15CPlgVcBtZ4WZJ2w==} engines: {node: '>=6.9.0'} @@ -1759,6 +1932,15 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 + /@babel/highlight@7.22.13: + resolution: {integrity: sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.22.15 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: true + /@babel/parser@7.19.6: resolution: {integrity: sha512-h1IUp81s2JYJ3mRkdxJgs4UvmSsRvDrx5ICSJbPvtWYv5i1nTBGcBpnog+89rAFMwvvru6E5NUHdBe01UeSzYA==} engines: {node: '>=6.0.0'} @@ -1772,6 +1954,14 @@ packages: dependencies: '@babel/types': 7.21.5 + /@babel/parser@7.22.15: + resolution: {integrity: sha512-RWmQ/sklUN9BvGGpCDgSubhHWfAx24XDTDObup4ffvxaYsptOg2P3KG0j+1eWKLxpkX0j0uHxmpq2Z1SP/VhxA==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.22.15 + dev: true + /@babel/parser@7.22.4: resolution: {integrity: sha512-VLLsx06XkEYqBtE5YGPwfSGwfrjnyPP5oiGty3S8pQLFDFLaS8VwWSIxkTXpcvr5zeYLE6+MBNl2npl/YnfofA==} engines: {node: '>=6.0.0'} @@ -2432,6 +2622,16 @@ packages: '@babel/helper-plugin-utils': 7.21.5 dev: true + /@babel/plugin-syntax-jsx@7.21.4(@babel/core@7.22.15): + resolution: {integrity: sha512-5hewiLct5OKyh6PLKEYaFclcqtIgCb6bmELouxjF6up5q3Sov7rOayW4RwhbaBL0dit8rA80GNfY+UuDp2mBbQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.22.15 + '@babel/helper-plugin-utils': 7.21.5 + dev: true + /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.18.9): resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: @@ -2580,23 +2780,23 @@ packages: '@babel/helper-plugin-utils': 7.21.5 dev: true - /@babel/plugin-syntax-typescript@7.20.0(@babel/core@7.18.9): + /@babel/plugin-syntax-typescript@7.20.0(@babel/core@7.22.1): resolution: {integrity: sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.9 + '@babel/core': 7.22.1 '@babel/helper-plugin-utils': 7.21.5 dev: true - /@babel/plugin-syntax-typescript@7.20.0(@babel/core@7.22.1): + /@babel/plugin-syntax-typescript@7.20.0(@babel/core@7.22.15): resolution: {integrity: sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.1 + '@babel/core': 7.22.15 '@babel/helper-plugin-utils': 7.21.5 dev: true @@ -3520,6 +3720,16 @@ packages: '@babel/helper-plugin-utils': 7.21.5 dev: true + /@babel/plugin-transform-react-display-name@7.18.6(@babel/core@7.22.15): + resolution: {integrity: sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.22.15 + '@babel/helper-plugin-utils': 7.21.5 + dev: true + /@babel/plugin-transform-react-jsx-development@7.18.6(@babel/core@7.18.9): resolution: {integrity: sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA==} engines: {node: '>=6.9.0'} @@ -3530,6 +3740,16 @@ packages: '@babel/plugin-transform-react-jsx': 7.22.3(@babel/core@7.18.9) dev: true + /@babel/plugin-transform-react-jsx-development@7.18.6(@babel/core@7.22.15): + resolution: {integrity: sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.22.15 + '@babel/plugin-transform-react-jsx': 7.22.3(@babel/core@7.22.15) + dev: true + /@babel/plugin-transform-react-jsx@7.19.0(@babel/core@7.22.1): resolution: {integrity: sha512-UVEvX3tXie3Szm3emi1+G63jyw1w5IcMY0FSKM+CRnKRI5Mr1YbCNgsSTwoTwKphQEG9P+QqmuRFneJPZuHNhg==} engines: {node: '>=6.9.0'} @@ -3558,6 +3778,20 @@ packages: '@babel/types': 7.22.4 dev: true + /@babel/plugin-transform-react-jsx@7.22.3(@babel/core@7.22.15): + resolution: {integrity: sha512-JEulRWG2f04a7L8VWaOngWiK6p+JOSpB+DAtwfJgOaej1qdbNxqtK7MwTBHjUA10NeFcszlFNqCdbRcirzh2uQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.22.15 + '@babel/helper-annotate-as-pure': 7.18.6 + '@babel/helper-module-imports': 7.21.4 + '@babel/helper-plugin-utils': 7.21.5 + '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.22.15) + '@babel/types': 7.22.4 + dev: true + /@babel/plugin-transform-react-pure-annotations@7.18.6(@babel/core@7.18.9): resolution: {integrity: sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ==} engines: {node: '>=6.9.0'} @@ -3569,6 +3803,17 @@ packages: '@babel/helper-plugin-utils': 7.21.5 dev: true + /@babel/plugin-transform-react-pure-annotations@7.18.6(@babel/core@7.22.15): + resolution: {integrity: sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.22.15 + '@babel/helper-annotate-as-pure': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 + dev: true + /@babel/plugin-transform-regenerator@7.18.6(@babel/core@7.18.9): resolution: {integrity: sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==} engines: {node: '>=6.9.0'} @@ -3769,30 +4014,30 @@ packages: '@babel/helper-plugin-utils': 7.21.5 dev: true - /@babel/plugin-transform-typescript@7.20.13(@babel/core@7.18.9): + /@babel/plugin-transform-typescript@7.20.13(@babel/core@7.22.1): resolution: {integrity: sha512-O7I/THxarGcDZxkgWKMUrk7NK1/WbHAg3Xx86gqS6x9MTrNL6AwIluuZ96ms4xeDe6AVx6rjHbWHP7x26EPQBA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.9 - '@babel/helper-create-class-features-plugin': 7.20.12(@babel/core@7.18.9) + '@babel/core': 7.22.1 + '@babel/helper-create-class-features-plugin': 7.20.12(@babel/core@7.22.1) '@babel/helper-plugin-utils': 7.21.5 - '@babel/plugin-syntax-typescript': 7.20.0(@babel/core@7.18.9) + '@babel/plugin-syntax-typescript': 7.20.0(@babel/core@7.22.1) transitivePeerDependencies: - supports-color dev: true - /@babel/plugin-transform-typescript@7.20.13(@babel/core@7.22.1): + /@babel/plugin-transform-typescript@7.20.13(@babel/core@7.22.15): resolution: {integrity: sha512-O7I/THxarGcDZxkgWKMUrk7NK1/WbHAg3Xx86gqS6x9MTrNL6AwIluuZ96ms4xeDe6AVx6rjHbWHP7x26EPQBA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.1 - '@babel/helper-create-class-features-plugin': 7.20.12(@babel/core@7.22.1) + '@babel/core': 7.22.15 + '@babel/helper-create-class-features-plugin': 7.20.12(@babel/core@7.22.15) '@babel/helper-plugin-utils': 7.21.5 - '@babel/plugin-syntax-typescript': 7.20.0(@babel/core@7.22.1) + '@babel/plugin-syntax-typescript': 7.20.0(@babel/core@7.22.15) transitivePeerDependencies: - supports-color dev: true @@ -4190,30 +4435,45 @@ packages: '@babel/plugin-transform-react-pure-annotations': 7.18.6(@babel/core@7.18.9) dev: true - /@babel/preset-typescript@7.18.6(@babel/core@7.18.9): + /@babel/preset-react@7.22.3(@babel/core@7.22.15): + resolution: {integrity: sha512-lxDz1mnZ9polqClBCVBjIVUypoB4qV3/tZUDb/IlYbW1kiiLaXaX+bInbRjl+lNQ/iUZraQ3+S8daEmoELMWug==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.22.15 + '@babel/helper-plugin-utils': 7.21.5 + '@babel/helper-validator-option': 7.21.0 + '@babel/plugin-transform-react-display-name': 7.18.6(@babel/core@7.22.15) + '@babel/plugin-transform-react-jsx': 7.22.3(@babel/core@7.22.15) + '@babel/plugin-transform-react-jsx-development': 7.18.6(@babel/core@7.22.15) + '@babel/plugin-transform-react-pure-annotations': 7.18.6(@babel/core@7.22.15) + dev: true + + /@babel/preset-typescript@7.18.6(@babel/core@7.22.1): resolution: {integrity: sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.9 + '@babel/core': 7.22.1 '@babel/helper-plugin-utils': 7.19.0 '@babel/helper-validator-option': 7.18.6 - '@babel/plugin-transform-typescript': 7.20.13(@babel/core@7.18.9) + '@babel/plugin-transform-typescript': 7.20.13(@babel/core@7.22.1) transitivePeerDependencies: - supports-color dev: true - /@babel/preset-typescript@7.18.6(@babel/core@7.22.1): + /@babel/preset-typescript@7.18.6(@babel/core@7.22.15): resolution: {integrity: sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.1 + '@babel/core': 7.22.15 '@babel/helper-plugin-utils': 7.19.0 '@babel/helper-validator-option': 7.18.6 - '@babel/plugin-transform-typescript': 7.20.13(@babel/core@7.22.1) + '@babel/plugin-transform-typescript': 7.20.13(@babel/core@7.22.15) transitivePeerDependencies: - supports-color dev: true @@ -4284,6 +4544,15 @@ packages: '@babel/parser': 7.22.4 '@babel/types': 7.22.4 + /@babel/template@7.22.15: + resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.22.13 + '@babel/parser': 7.22.15 + '@babel/types': 7.22.15 + dev: true + /@babel/traverse@7.19.6: resolution: {integrity: sha512-6l5HrUCzFM04mfbG09AagtYyR2P0B71B1wN7PfSPiksDPz2k5H9CBC1tcZpz2M8OxbKTPccByoOJ22rUKbpmQQ==} engines: {node: '>=6.9.0'} @@ -4319,6 +4588,24 @@ packages: transitivePeerDependencies: - supports-color + /@babel/traverse@7.22.15: + resolution: {integrity: sha512-DdHPwvJY0sEeN4xJU5uRLmZjgMMDIvMPniLuYzUVXj/GGzysPl0/fwt44JBkyUIzGJPV8QgHMcQdQ34XFuKTYQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.22.15 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-function-name': 7.22.5 + '@babel/helper-hoist-variables': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/parser': 7.22.15 + '@babel/types': 7.22.15 + debug: 4.3.4 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/traverse@7.22.4: resolution: {integrity: sha512-Tn1pDsjIcI+JcLKq1AVlZEr4226gpuAQTsLMorsYg9tuS/kG7nuwwJ4AB8jfQuEgb/COBwR/DqJxmoiYFu5/rQ==} engines: {node: '>=6.9.0'} @@ -4353,6 +4640,15 @@ packages: '@babel/helper-validator-identifier': 7.19.1 to-fast-properties: 2.0.0 + /@babel/types@7.22.15: + resolution: {integrity: sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.22.5 + '@babel/helper-validator-identifier': 7.22.15 + to-fast-properties: 2.0.0 + dev: true + /@babel/types@7.22.4: resolution: {integrity: sha512-Tx9x3UBHTTsMSW85WB2kphxYQVvrZ/t1FxD88IpSgIjiUJlCm9z+xWIDwyo1vffTwSqteqyznB8ZE9vYYk16zA==} engines: {node: '>=6.9.0'} @@ -4792,18 +5088,18 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.42.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.48.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.42.0 - eslint-visitor-keys: 3.4.1 + eslint: 8.48.0 + eslint-visitor-keys: 3.4.3 dev: true - /@eslint-community/regexpp@4.5.1: - resolution: {integrity: sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==} + /@eslint-community/regexpp@4.8.0: + resolution: {integrity: sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true @@ -4841,14 +5137,14 @@ packages: - supports-color dev: true - /@eslint/eslintrc@2.0.3: - resolution: {integrity: sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==} + /@eslint/eslintrc@2.1.2: + resolution: {integrity: sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 debug: 4.3.4 - espree: 9.5.2 - globals: 13.20.0 + espree: 9.6.1 + globals: 13.21.0 ignore: 5.2.4 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -4858,8 +5154,8 @@ packages: - supports-color dev: true - /@eslint/js@8.42.0: - resolution: {integrity: sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw==} + /@eslint/js@8.48.0: + resolution: {integrity: sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -4887,8 +5183,8 @@ packages: react: 18.2.0 dev: false - /@humanwhocodes/config-array@0.11.10: - resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} + /@humanwhocodes/config-array@0.11.11: + resolution: {integrity: sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==} engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 @@ -4978,13 +5274,18 @@ packages: dependencies: '@jridgewell/set-array': 1.1.2 '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 dev: true /@jridgewell/resolve-uri@3.1.0: resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} engines: {node: '>=6.0.0'} + /@jridgewell/resolve-uri@3.1.1: + resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} + engines: {node: '>=6.0.0'} + dev: true + /@jridgewell/set-array@1.1.2: resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} engines: {node: '>=6.0.0'} @@ -4996,11 +5297,11 @@ packages: '@jridgewell/trace-mapping': 0.3.17 dev: true - /@jridgewell/source-map@0.3.3: - resolution: {integrity: sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==} + /@jridgewell/source-map@0.3.5: + resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==} dependencies: '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 dev: true /@jridgewell/sourcemap-codec@1.4.14: @@ -5016,11 +5317,11 @@ packages: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.14 - /@jridgewell/trace-mapping@0.3.18: - resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==} + /@jridgewell/trace-mapping@0.3.19: + resolution: {integrity: sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==} dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 dev: true /@jridgewell/trace-mapping@0.3.9: @@ -5731,6 +6032,10 @@ packages: resolution: {integrity: sha512-JIzsAvJeA/5iY6Y/OxZbv1lUcc8dNSE77lb2gnBH+/PJ3lFR1Ccvgwl5JWnHAkNHcRsT0TbpVOsiMKZ1F/yyJg==} dev: true + /@types/node@20.5.9: + resolution: {integrity: sha512-PcGNd//40kHAS3sTlzKB9C9XL4K0sTup8nbG5lC14kzEteTNuAFh9u5nA0o5TWnSG2r/JNPRXFVcHJIIeRlmqQ==} + dev: true + /@types/parse-json@4.0.0: resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} dev: true @@ -5833,7 +6138,7 @@ packages: '@types/node': 18.11.17 dev: true - /@typescript-eslint/eslint-plugin@4.33.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@5.1.3): + /@typescript-eslint/eslint-plugin@4.33.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@5.2.2): resolution: {integrity: sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: @@ -5844,8 +6149,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/experimental-utils': 4.33.0(eslint@7.32.0)(typescript@5.1.3) - '@typescript-eslint/parser': 4.33.0(eslint@7.32.0)(typescript@5.1.3) + '@typescript-eslint/experimental-utils': 4.33.0(eslint@7.32.0)(typescript@5.2.2) + '@typescript-eslint/parser': 4.33.0(eslint@7.32.0)(typescript@5.2.2) '@typescript-eslint/scope-manager': 4.33.0 debug: 4.3.4 eslint: 7.32.0 @@ -5853,13 +6158,13 @@ packages: ignore: 5.2.0 regexpp: 3.2.0 semver: 7.3.8 - tsutils: 3.21.0(typescript@5.1.3) - typescript: 5.1.3 + tsutils: 3.21.0(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/eslint-plugin@5.41.0(@typescript-eslint/parser@5.41.0)(eslint@8.26.0)(typescript@5.1.3): + /@typescript-eslint/eslint-plugin@5.41.0(@typescript-eslint/parser@5.41.0)(eslint@8.26.0)(typescript@5.2.2): resolution: {integrity: sha512-DXUS22Y57/LAFSg3x7Vi6RNAuLpTXwxB9S2nIA7msBb/Zt8p7XqMwdpdc1IU7CkOQUPgAqR5fWvxuKCbneKGmA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -5870,22 +6175,22 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.41.0(eslint@8.26.0)(typescript@5.1.3) + '@typescript-eslint/parser': 5.41.0(eslint@8.26.0)(typescript@5.2.2) '@typescript-eslint/scope-manager': 5.41.0 - '@typescript-eslint/type-utils': 5.41.0(eslint@8.26.0)(typescript@5.1.3) - '@typescript-eslint/utils': 5.41.0(eslint@8.26.0)(typescript@5.1.3) + '@typescript-eslint/type-utils': 5.41.0(eslint@8.26.0)(typescript@5.2.2) + '@typescript-eslint/utils': 5.41.0(eslint@8.26.0)(typescript@5.2.2) debug: 4.3.4 eslint: 8.26.0 ignore: 5.2.0 regexpp: 3.2.0 semver: 7.3.8 - tsutils: 3.21.0(typescript@5.1.3) - typescript: 5.1.3 + tsutils: 3.21.0(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/eslint-plugin@5.41.0(@typescript-eslint/parser@5.41.0)(eslint@8.42.0)(typescript@5.1.3): + /@typescript-eslint/eslint-plugin@5.41.0(@typescript-eslint/parser@5.41.0)(eslint@8.48.0)(typescript@5.2.2): resolution: {integrity: sha512-DXUS22Y57/LAFSg3x7Vi6RNAuLpTXwxB9S2nIA7msBb/Zt8p7XqMwdpdc1IU7CkOQUPgAqR5fWvxuKCbneKGmA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -5896,22 +6201,22 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.41.0(eslint@8.42.0)(typescript@5.1.3) + '@typescript-eslint/parser': 5.41.0(eslint@8.48.0)(typescript@5.2.2) '@typescript-eslint/scope-manager': 5.41.0 - '@typescript-eslint/type-utils': 5.41.0(eslint@8.42.0)(typescript@5.1.3) - '@typescript-eslint/utils': 5.41.0(eslint@8.42.0)(typescript@5.1.3) + '@typescript-eslint/type-utils': 5.41.0(eslint@8.48.0)(typescript@5.2.2) + '@typescript-eslint/utils': 5.41.0(eslint@8.48.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.42.0 + eslint: 8.48.0 ignore: 5.2.0 regexpp: 3.2.0 semver: 7.3.8 - tsutils: 3.21.0(typescript@5.1.3) - typescript: 5.1.3 + tsutils: 3.21.0(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/experimental-utils@4.33.0(eslint@7.32.0)(typescript@5.1.3): + /@typescript-eslint/experimental-utils@4.33.0(eslint@7.32.0)(typescript@5.2.2): resolution: {integrity: sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: @@ -5920,7 +6225,7 @@ packages: '@types/json-schema': 7.0.11 '@typescript-eslint/scope-manager': 4.33.0 '@typescript-eslint/types': 4.33.0 - '@typescript-eslint/typescript-estree': 4.33.0(typescript@5.1.3) + '@typescript-eslint/typescript-estree': 4.33.0(typescript@5.2.2) eslint: 7.32.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0(eslint@7.32.0) @@ -5929,33 +6234,33 @@ packages: - typescript dev: true - /@typescript-eslint/experimental-utils@5.41.0(eslint@7.32.0)(typescript@5.1.3): + /@typescript-eslint/experimental-utils@5.41.0(eslint@7.32.0)(typescript@5.2.2): resolution: {integrity: sha512-/qxT2Kd2q/A22JVIllvws4rvc00/3AT4rAo/0YgEN28y+HPhbJbk6X4+MAHEoZzpNyAOugIT7D/OLnKBW8FfhA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@typescript-eslint/utils': 5.41.0(eslint@7.32.0)(typescript@5.1.3) + '@typescript-eslint/utils': 5.41.0(eslint@7.32.0)(typescript@5.2.2) eslint: 7.32.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/experimental-utils@5.41.0(eslint@8.42.0)(typescript@5.1.3): + /@typescript-eslint/experimental-utils@5.41.0(eslint@8.48.0)(typescript@5.2.2): resolution: {integrity: sha512-/qxT2Kd2q/A22JVIllvws4rvc00/3AT4rAo/0YgEN28y+HPhbJbk6X4+MAHEoZzpNyAOugIT7D/OLnKBW8FfhA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@typescript-eslint/utils': 5.41.0(eslint@8.42.0)(typescript@5.1.3) - eslint: 8.42.0 + '@typescript-eslint/utils': 5.41.0(eslint@8.48.0)(typescript@5.2.2) + eslint: 8.48.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/parser@4.33.0(eslint@7.32.0)(typescript@5.1.3): + /@typescript-eslint/parser@4.33.0(eslint@7.32.0)(typescript@5.2.2): resolution: {integrity: sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: @@ -5967,15 +6272,15 @@ packages: dependencies: '@typescript-eslint/scope-manager': 4.33.0 '@typescript-eslint/types': 4.33.0 - '@typescript-eslint/typescript-estree': 4.33.0(typescript@5.1.3) + '@typescript-eslint/typescript-estree': 4.33.0(typescript@5.2.2) debug: 4.3.4 eslint: 7.32.0 - typescript: 5.1.3 + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@5.41.0(eslint@8.26.0)(typescript@5.1.3): + /@typescript-eslint/parser@5.41.0(eslint@8.26.0)(typescript@5.2.2): resolution: {integrity: sha512-HQVfix4+RL5YRWZboMD1pUfFN8MpRH4laziWkkAzyO1fvNOY/uinZcvo3QiFJVS/siNHupV8E5+xSwQZrl6PZA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -5987,15 +6292,15 @@ packages: dependencies: '@typescript-eslint/scope-manager': 5.41.0 '@typescript-eslint/types': 5.41.0 - '@typescript-eslint/typescript-estree': 5.41.0(typescript@5.1.3) + '@typescript-eslint/typescript-estree': 5.41.0(typescript@5.2.2) debug: 4.3.4 eslint: 8.26.0 - typescript: 5.1.3 + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@5.41.0(eslint@8.42.0)(typescript@5.1.3): + /@typescript-eslint/parser@5.41.0(eslint@8.48.0)(typescript@5.2.2): resolution: {integrity: sha512-HQVfix4+RL5YRWZboMD1pUfFN8MpRH4laziWkkAzyO1fvNOY/uinZcvo3QiFJVS/siNHupV8E5+xSwQZrl6PZA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -6007,10 +6312,10 @@ packages: dependencies: '@typescript-eslint/scope-manager': 5.41.0 '@typescript-eslint/types': 5.41.0 - '@typescript-eslint/typescript-estree': 5.41.0(typescript@5.1.3) + '@typescript-eslint/typescript-estree': 5.41.0(typescript@5.2.2) debug: 4.3.4 - eslint: 8.42.0 - typescript: 5.1.3 + eslint: 8.48.0 + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true @@ -6031,7 +6336,7 @@ packages: '@typescript-eslint/visitor-keys': 5.41.0 dev: true - /@typescript-eslint/type-utils@5.41.0(eslint@8.26.0)(typescript@5.1.3): + /@typescript-eslint/type-utils@5.41.0(eslint@8.26.0)(typescript@5.2.2): resolution: {integrity: sha512-L30HNvIG6A1Q0R58e4hu4h+fZqaO909UcnnPbwKiN6Rc3BUEx6ez2wgN7aC0cBfcAjZfwkzE+E2PQQ9nEuoqfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -6041,17 +6346,17 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.41.0(typescript@5.1.3) - '@typescript-eslint/utils': 5.41.0(eslint@8.26.0)(typescript@5.1.3) + '@typescript-eslint/typescript-estree': 5.41.0(typescript@5.2.2) + '@typescript-eslint/utils': 5.41.0(eslint@8.26.0)(typescript@5.2.2) debug: 4.3.4 eslint: 8.26.0 - tsutils: 3.21.0(typescript@5.1.3) - typescript: 5.1.3 + tsutils: 3.21.0(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/type-utils@5.41.0(eslint@8.42.0)(typescript@5.1.3): + /@typescript-eslint/type-utils@5.41.0(eslint@8.48.0)(typescript@5.2.2): resolution: {integrity: sha512-L30HNvIG6A1Q0R58e4hu4h+fZqaO909UcnnPbwKiN6Rc3BUEx6ez2wgN7aC0cBfcAjZfwkzE+E2PQQ9nEuoqfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -6061,12 +6366,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.41.0(typescript@5.1.3) - '@typescript-eslint/utils': 5.41.0(eslint@8.42.0)(typescript@5.1.3) + '@typescript-eslint/typescript-estree': 5.41.0(typescript@5.2.2) + '@typescript-eslint/utils': 5.41.0(eslint@8.48.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.42.0 - tsutils: 3.21.0(typescript@5.1.3) - typescript: 5.1.3 + eslint: 8.48.0 + tsutils: 3.21.0(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true @@ -6081,7 +6386,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree@4.33.0(typescript@5.1.3): + /@typescript-eslint/typescript-estree@4.33.0(typescript@5.2.2): resolution: {integrity: sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: @@ -6096,13 +6401,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.8 - tsutils: 3.21.0(typescript@5.1.3) - typescript: 5.1.3 + tsutils: 3.21.0(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/typescript-estree@5.41.0(typescript@5.1.3): + /@typescript-eslint/typescript-estree@5.41.0(typescript@5.2.2): resolution: {integrity: sha512-SlzFYRwFSvswzDSQ/zPkIWcHv8O5y42YUskko9c4ki+fV6HATsTODUPbRbcGDFYP86gaJL5xohUEytvyNNcXWg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -6117,13 +6422,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.8 - tsutils: 3.21.0(typescript@5.1.3) - typescript: 5.1.3 + tsutils: 3.21.0(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@5.41.0(eslint@7.32.0)(typescript@5.1.3): + /@typescript-eslint/utils@5.41.0(eslint@7.32.0)(typescript@5.2.2): resolution: {integrity: sha512-QlvfwaN9jaMga9EBazQ+5DDx/4sAdqDkcs05AsQHMaopluVCUyu1bTRUVKzXbgjDlrRAQrYVoi/sXJ9fmG+KLQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -6133,7 +6438,7 @@ packages: '@types/semver': 7.3.12 '@typescript-eslint/scope-manager': 5.41.0 '@typescript-eslint/types': 5.41.0 - '@typescript-eslint/typescript-estree': 5.41.0(typescript@5.1.3) + '@typescript-eslint/typescript-estree': 5.41.0(typescript@5.2.2) eslint: 7.32.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0(eslint@7.32.0) @@ -6143,7 +6448,7 @@ packages: - typescript dev: true - /@typescript-eslint/utils@5.41.0(eslint@8.26.0)(typescript@5.1.3): + /@typescript-eslint/utils@5.41.0(eslint@8.26.0)(typescript@5.2.2): resolution: {integrity: sha512-QlvfwaN9jaMga9EBazQ+5DDx/4sAdqDkcs05AsQHMaopluVCUyu1bTRUVKzXbgjDlrRAQrYVoi/sXJ9fmG+KLQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -6153,7 +6458,7 @@ packages: '@types/semver': 7.3.12 '@typescript-eslint/scope-manager': 5.41.0 '@typescript-eslint/types': 5.41.0 - '@typescript-eslint/typescript-estree': 5.41.0(typescript@5.1.3) + '@typescript-eslint/typescript-estree': 5.41.0(typescript@5.2.2) eslint: 8.26.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0(eslint@8.26.0) @@ -6163,7 +6468,7 @@ packages: - typescript dev: true - /@typescript-eslint/utils@5.41.0(eslint@8.42.0)(typescript@5.1.3): + /@typescript-eslint/utils@5.41.0(eslint@8.48.0)(typescript@5.2.2): resolution: {integrity: sha512-QlvfwaN9jaMga9EBazQ+5DDx/4sAdqDkcs05AsQHMaopluVCUyu1bTRUVKzXbgjDlrRAQrYVoi/sXJ9fmG+KLQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -6173,10 +6478,10 @@ packages: '@types/semver': 7.3.12 '@typescript-eslint/scope-manager': 5.41.0 '@typescript-eslint/types': 5.41.0 - '@typescript-eslint/typescript-estree': 5.41.0(typescript@5.1.3) - eslint: 8.42.0 + '@typescript-eslint/typescript-estree': 5.41.0(typescript@5.2.2) + eslint: 8.48.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0(eslint@8.42.0) + eslint-utils: 3.0.0(eslint@8.48.0) semver: 7.3.8 transitivePeerDependencies: - supports-color @@ -6383,20 +6688,20 @@ packages: acorn: 7.4.1 dev: true - /acorn-jsx@5.3.2(acorn@8.8.1): + /acorn-jsx@5.3.2(acorn@8.10.0): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.8.1 + acorn: 8.10.0 dev: true - /acorn-jsx@5.3.2(acorn@8.8.2): + /acorn-jsx@5.3.2(acorn@8.8.1): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.8.2 + acorn: 8.8.1 dev: true /acorn-walk@6.2.0: @@ -6420,6 +6725,12 @@ packages: engines: {node: '>=0.4.0'} dev: true + /acorn@8.10.0: + resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + /acorn@8.8.1: resolution: {integrity: sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==} engines: {node: '>=0.4.0'} @@ -6546,8 +6857,8 @@ packages: engines: {node: '>=12'} dev: true - /ansi-sequence-parser@1.1.0: - resolution: {integrity: sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==} + /ansi-sequence-parser@1.1.1: + resolution: {integrity: sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==} dev: true /ansi-styles@1.0.0: @@ -6779,8 +7090,8 @@ packages: engines: {node: '>=8'} dev: true - /async-each@1.0.3: - resolution: {integrity: sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==} + /async-each@1.0.6: + resolution: {integrity: sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==} requiresBuild: true dev: true optional: true @@ -6805,6 +7116,7 @@ packages: /atob@2.1.2: resolution: {integrity: sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==} engines: {node: '>= 4.5.0'} + hasBin: true dev: true /autoprefixer@10.4.14(postcss@8.4.23): @@ -7187,8 +7499,8 @@ packages: tweetnacl: 0.14.5 dev: true - /better-sqlite3@8.4.0: - resolution: {integrity: sha512-NmsNW1CQvqMszu/CFAJ3pLct6NEFlNfuGM6vw72KHkjOD1UDnL96XNN1BMQc1hiHo8vE2GbOWQYIpZ+YM5wrZw==} + /better-sqlite3@8.6.0: + resolution: {integrity: sha512-jwAudeiTMTSyby+/SfbHDebShbmC2MCH8mU2+DXi0WJfv13ypEJm47cd3kljmy/H130CazEvkf2Li//ewcMJ1g==} requiresBuild: true dependencies: bindings: 1.5.0 @@ -7368,7 +7680,7 @@ packages: resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} dependencies: cipher-base: 1.0.4 - des.js: 1.0.1 + des.js: 1.1.0 inherits: 2.0.4 safe-buffer: 5.2.1 dev: true @@ -7390,7 +7702,7 @@ packages: elliptic: 6.5.4 inherits: 2.0.4 parse-asn1: 5.1.6 - readable-stream: 3.6.0 + readable-stream: 3.6.2 safe-buffer: 5.2.1 dev: true @@ -7400,6 +7712,17 @@ packages: pako: 1.0.11 dev: true + /browserslist@4.21.10: + resolution: {integrity: sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001527 + electron-to-chromium: 1.4.508 + node-releases: 2.0.13 + update-browserslist-db: 1.0.11(browserslist@4.21.10) + dev: true + /browserslist@4.21.4: resolution: {integrity: sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -7529,7 +7852,7 @@ packages: chownr: 1.1.4 figgy-pudding: 3.5.2 glob: 7.2.3 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 infer-owner: 1.0.4 lru-cache: 5.1.1 mississippi: 3.0.0 @@ -7653,7 +7976,7 @@ packages: resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} dependencies: pascal-case: 3.1.2 - tslib: 2.6.1 + tslib: 2.6.2 dev: true /camelcase-css@2.0.1: @@ -7682,6 +8005,10 @@ packages: /caniuse-lite@1.0.30001482: resolution: {integrity: sha512-F1ZInsg53cegyjroxLNW9DmrEQ1SuGRTO1QlpA0o2/6OpQ0gFeDRoq1yFmnr8Sakn9qwwt9DmbxHB6w167OSuQ==} + /caniuse-lite@1.0.30001527: + resolution: {integrity: sha512-YkJi7RwPgWtXVSgK4lG9AHH57nSzvvOp9MesgXmw4Q7n0C3H04L0foHqfxcmSAm5AcWb8dW9AYj2tR7/5GnddQ==} + dev: true + /caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} dev: true @@ -7776,7 +8103,7 @@ packages: requiresBuild: true dependencies: anymatch: 2.0.0 - async-each: 1.0.3 + async-each: 1.0.6 braces: 2.3.2 glob-parent: 3.1.0 inherits: 2.0.4 @@ -7805,7 +8132,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 /chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} @@ -8134,7 +8461,7 @@ packages: dependencies: buffer-from: 1.1.2 inherits: 2.0.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 typedarray: 0.0.6 dev: true @@ -8667,8 +8994,8 @@ packages: array-find-index: 1.0.2 dev: true - /cyclist@1.0.1: - resolution: {integrity: sha512-NJGVKPS81XejHcLhaLJS7plab0fK3slPh11mESeeDq2W4ZI5kUKK/LRRdVDvjJseojbPB7ZwjnyOybg3Igea/A==} + /cyclist@1.0.2: + resolution: {integrity: sha512-0sVXIohTfLqVIW3kb/0n6IiWF3Ifj5nm2XaSrLq2DI6fKIGa2fYAZdk917rUneaeLVpYfFcyXE2ft0fe3remsA==} dev: true /damerau-levenshtein@1.0.8: @@ -8763,8 +9090,8 @@ packages: engines: {node: '>=10'} dev: true - /decode-uri-component@0.2.0: - resolution: {integrity: sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==} + /decode-uri-component@0.2.2: + resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} engines: {node: '>=0.10'} dev: true @@ -8909,8 +9236,8 @@ packages: engines: {node: '>= 0.6.0'} dev: true - /des.js@1.0.1: - resolution: {integrity: sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==} + /des.js@1.1.0: + resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==} dependencies: inherits: 2.0.4 minimalistic-assert: 1.0.1 @@ -9054,7 +9381,7 @@ packages: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} dependencies: no-case: 3.0.4 - tslib: 2.6.1 + tslib: 2.6.2 dev: true /dot-prop@5.3.0: @@ -9092,7 +9419,7 @@ packages: dependencies: end-of-stream: 1.4.4 inherits: 2.0.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 stream-shift: 1.0.1 dev: true @@ -9128,6 +9455,10 @@ packages: /electron-to-chromium@1.4.284: resolution: {integrity: sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==} + /electron-to-chromium@1.4.508: + resolution: {integrity: sha512-FFa8QKjQK/A5QuFr2167myhMesGrhlOBD+3cYNxO9/S4XzHEXesyTD/1/xF644gC8buFPz3ca6G1LOQD0tZrrg==} + dev: true + /elliptic@6.5.4: resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} dependencies: @@ -9188,7 +9519,7 @@ packages: resolution: {integrity: sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==} engines: {node: '>=6.9.0'} dependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 memory-fs: 0.5.0 tapable: 1.1.3 dev: true @@ -9219,6 +9550,7 @@ packages: /errno@0.1.8: resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} + hasBin: true dependencies: prr: 1.0.1 dev: true @@ -9412,14 +9744,14 @@ packages: eslint: ^7.32.0 || ^8.2.0 eslint-plugin-import: ^2.25.3 dependencies: - '@typescript-eslint/eslint-plugin': 5.41.0(@typescript-eslint/parser@5.41.0)(eslint@8.26.0)(typescript@5.1.3) - '@typescript-eslint/parser': 5.41.0(eslint@8.26.0)(typescript@5.1.3) + '@typescript-eslint/eslint-plugin': 5.41.0(@typescript-eslint/parser@5.41.0)(eslint@8.26.0)(typescript@5.2.2) + '@typescript-eslint/parser': 5.41.0(eslint@8.26.0)(typescript@5.2.2) eslint: 8.26.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.26.0)(eslint@8.26.0) eslint-plugin-import: 2.26.0(@typescript-eslint/parser@5.41.0)(eslint@8.26.0) dev: true - /eslint-config-preact@1.3.0(@typescript-eslint/eslint-plugin@4.33.0)(eslint@7.32.0)(typescript@5.1.3): + /eslint-config-preact@1.3.0(@typescript-eslint/eslint-plugin@4.33.0)(eslint@7.32.0)(typescript@5.2.2): resolution: {integrity: sha512-yHYXg5qNzEJd3D/30AmsIW0W8MuY858KpApXp7xxBF08IYUljSKCOqMx+dVucXHQnAm7+11wOnMkgVHIBAechw==} peerDependencies: eslint: 6.x || 7.x || 8.x @@ -9431,7 +9763,7 @@ packages: '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.18.9) eslint: 7.32.0 eslint-plugin-compat: 4.0.2(eslint@7.32.0) - eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@4.33.0)(eslint@7.32.0)(typescript@5.1.3) + eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@4.33.0)(eslint@7.32.0)(typescript@5.2.2) eslint-plugin-react: 7.31.10(eslint@7.32.0) eslint-plugin-react-hooks: 4.6.0(eslint@7.32.0) transitivePeerDependencies: @@ -9441,21 +9773,21 @@ packages: - typescript dev: true - /eslint-config-preact@1.3.0(@typescript-eslint/eslint-plugin@5.41.0)(eslint@8.42.0)(typescript@5.1.3): + /eslint-config-preact@1.3.0(@typescript-eslint/eslint-plugin@5.41.0)(eslint@8.48.0)(typescript@5.2.2): resolution: {integrity: sha512-yHYXg5qNzEJd3D/30AmsIW0W8MuY858KpApXp7xxBF08IYUljSKCOqMx+dVucXHQnAm7+11wOnMkgVHIBAechw==} peerDependencies: eslint: 6.x || 7.x || 8.x dependencies: '@babel/core': 7.18.9 - '@babel/eslint-parser': 7.19.1(@babel/core@7.18.9)(eslint@8.42.0) + '@babel/eslint-parser': 7.19.1(@babel/core@7.18.9)(eslint@8.48.0) '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.18.9) '@babel/plugin-syntax-decorators': 7.19.0(@babel/core@7.18.9) '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.18.9) - eslint: 8.42.0 - eslint-plugin-compat: 4.0.2(eslint@8.42.0) - eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.41.0)(eslint@8.42.0)(typescript@5.1.3) - eslint-plugin-react: 7.31.10(eslint@8.42.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.42.0) + eslint: 8.48.0 + eslint-plugin-compat: 4.0.2(eslint@8.48.0) + eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.41.0)(eslint@8.48.0)(typescript@5.2.2) + eslint-plugin-react: 7.31.10(eslint@8.48.0) + eslint-plugin-react-hooks: 4.6.0(eslint@8.48.0) transitivePeerDependencies: - '@typescript-eslint/eslint-plugin' - jest @@ -9502,7 +9834,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.41.0(eslint@8.26.0)(typescript@5.1.3) + '@typescript-eslint/parser': 5.41.0(eslint@8.26.0)(typescript@5.2.2) debug: 3.2.7 eslint: 8.26.0 eslint-import-resolver-node: 0.3.6 @@ -9527,7 +9859,7 @@ packages: semver: 7.3.5 dev: true - /eslint-plugin-compat@4.0.2(eslint@8.42.0): + /eslint-plugin-compat@4.0.2(eslint@8.48.0): resolution: {integrity: sha512-xqvoO54CLTVaEYGMzhu35Wzwk/As7rCvz/2dqwnFiWi0OJccEtGIn+5qq3zqIu9nboXlpdBN579fZcItC73Ycg==} engines: {node: '>=9.x'} peerDependencies: @@ -9538,7 +9870,7 @@ packages: browserslist: 4.21.5 caniuse-lite: 1.0.30001482 core-js: 3.26.0 - eslint: 8.42.0 + eslint: 8.48.0 find-up: 5.0.0 lodash.memoize: 4.1.2 semver: 7.3.5 @@ -9562,7 +9894,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.41.0(eslint@8.26.0)(typescript@5.1.3) + '@typescript-eslint/parser': 5.41.0(eslint@8.26.0)(typescript@5.2.2) array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 @@ -9583,7 +9915,7 @@ packages: - supports-color dev: true - /eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@4.33.0)(eslint@7.32.0)(typescript@5.1.3): + /eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@4.33.0)(eslint@7.32.0)(typescript@5.2.2): resolution: {integrity: sha512-PWLUEXeeF7C9QGKqvdSbzLOiLTx+bno7/HC9eefePfEb257QFHg7ye3dh80AZVkaa/RQsBB1Q/ORQvg2X7F0NQ==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} peerDependencies: @@ -9596,15 +9928,15 @@ packages: jest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 4.33.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@5.1.3) - '@typescript-eslint/experimental-utils': 5.41.0(eslint@7.32.0)(typescript@5.1.3) + '@typescript-eslint/eslint-plugin': 4.33.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@5.2.2) + '@typescript-eslint/experimental-utils': 5.41.0(eslint@7.32.0)(typescript@5.2.2) eslint: 7.32.0 transitivePeerDependencies: - supports-color - typescript dev: true - /eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.41.0)(eslint@8.42.0)(typescript@5.1.3): + /eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.41.0)(eslint@8.48.0)(typescript@5.2.2): resolution: {integrity: sha512-PWLUEXeeF7C9QGKqvdSbzLOiLTx+bno7/HC9eefePfEb257QFHg7ye3dh80AZVkaa/RQsBB1Q/ORQvg2X7F0NQ==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} peerDependencies: @@ -9617,9 +9949,9 @@ packages: jest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 5.41.0(@typescript-eslint/parser@5.41.0)(eslint@8.42.0)(typescript@5.1.3) - '@typescript-eslint/experimental-utils': 5.41.0(eslint@8.42.0)(typescript@5.1.3) - eslint: 8.42.0 + '@typescript-eslint/eslint-plugin': 5.41.0(@typescript-eslint/parser@5.41.0)(eslint@8.48.0)(typescript@5.2.2) + '@typescript-eslint/experimental-utils': 5.41.0(eslint@8.48.0)(typescript@5.2.2) + eslint: 8.48.0 transitivePeerDependencies: - supports-color - typescript @@ -9665,13 +9997,13 @@ packages: eslint: 8.26.0 dev: true - /eslint-plugin-react-hooks@4.6.0(eslint@8.42.0): + /eslint-plugin-react-hooks@4.6.0(eslint@8.48.0): resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: - eslint: 8.42.0 + eslint: 8.48.0 dev: true /eslint-plugin-react@7.31.10(eslint@7.32.0): @@ -9720,7 +10052,7 @@ packages: string.prototype.matchall: 4.0.7 dev: true - /eslint-plugin-react@7.31.10(eslint@8.42.0): + /eslint-plugin-react@7.31.10(eslint@8.48.0): resolution: {integrity: sha512-e4N/nc6AAlg4UKW/mXeYWd3R++qUano5/o+t+wnWxIf+bLsOaH3a4q74kX3nDjYym3VBN4HyO9nEn1GcAqgQOA==} engines: {node: '>=4'} peerDependencies: @@ -9729,7 +10061,7 @@ packages: array-includes: 3.1.5 array.prototype.flatmap: 1.3.0 doctrine: 2.1.0 - eslint: 8.42.0 + eslint: 8.48.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.3 minimatch: 3.1.2 @@ -9767,8 +10099,8 @@ packages: estraverse: 5.3.0 dev: true - /eslint-scope@7.2.0: - resolution: {integrity: sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==} + /eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: esrecurse: 4.3.0 @@ -9812,13 +10144,13 @@ packages: eslint-visitor-keys: 2.1.0 dev: true - /eslint-utils@3.0.0(eslint@8.42.0): + /eslint-utils@3.0.0(eslint@8.48.0): resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.42.0 + eslint: 8.48.0 eslint-visitor-keys: 2.1.0 dev: true @@ -9837,8 +10169,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint-visitor-keys@3.4.1: - resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} + /eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -9984,16 +10316,16 @@ packages: - supports-color dev: true - /eslint@8.42.0: - resolution: {integrity: sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A==} + /eslint@8.48.0: + resolution: {integrity: sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.42.0) - '@eslint-community/regexpp': 4.5.1 - '@eslint/eslintrc': 2.0.3 - '@eslint/js': 8.42.0 - '@humanwhocodes/config-array': 0.11.10 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) + '@eslint-community/regexpp': 4.8.0 + '@eslint/eslintrc': 2.1.2 + '@eslint/js': 8.48.0 + '@humanwhocodes/config-array': 0.11.11 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 @@ -10002,19 +10334,18 @@ packages: debug: 4.3.4 doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.0 - eslint-visitor-keys: 3.4.1 - espree: 9.5.2 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 esquery: 1.5.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.20.0 + globals: 13.21.0 graphemer: 1.4.0 ignore: 5.2.4 - import-fresh: 3.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 @@ -10024,9 +10355,8 @@ packages: lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 - optionator: 0.9.1 + optionator: 0.9.3 strip-ansi: 6.0.1 - strip-json-comments: 3.1.1 text-table: 0.2.0 transitivePeerDependencies: - supports-color @@ -10055,13 +10385,13 @@ packages: eslint-visitor-keys: 3.3.0 dev: true - /espree@9.5.2: - resolution: {integrity: sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==} + /espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.8.2 - acorn-jsx: 5.3.2(acorn@8.8.2) - eslint-visitor-keys: 3.4.1 + acorn: 8.10.0 + acorn-jsx: 5.3.2(acorn@8.10.0) + eslint-visitor-keys: 3.4.3 dev: true /esprima@4.0.1: @@ -10492,7 +10822,7 @@ packages: resolution: {integrity: sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==} dependencies: inherits: 2.0.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 dev: true /follow-redirects@1.15.2: @@ -10607,7 +10937,7 @@ packages: resolution: {integrity: sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==} dependencies: inherits: 2.0.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 dev: true /fromentries@1.3.2: @@ -10665,10 +10995,10 @@ packages: /fs-write-stream-atomic@1.0.10: resolution: {integrity: sha512-gehEzmPn2nAwr39eay+x3X34Ra+M2QlVUTLhkXPjWdeO8RF9kszk116avgBJM3ZyNHgHXBNx+VmPaFC36k0PzA==} dependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 iferr: 0.1.5 imurmurhash: 0.1.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 dev: true /fs.realpath@1.0.0: @@ -10686,8 +11016,8 @@ packages: dev: true optional: true - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true @@ -10921,8 +11251,8 @@ packages: type-fest: 0.20.2 dev: true - /globals@13.20.0: - resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} + /globals@13.21.0: + resolution: {integrity: sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==} engines: {node: '>=8'} dependencies: type-fest: 0.20.2 @@ -10985,6 +11315,10 @@ packages: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} dev: true + /graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + dev: true + /grapheme-splitter@1.0.4: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} dev: true @@ -11105,7 +11439,7 @@ packages: engines: {node: '>=4'} dependencies: inherits: 2.0.4 - readable-stream: 3.6.0 + readable-stream: 3.6.2 safe-buffer: 5.2.1 dev: true @@ -11201,7 +11535,7 @@ packages: he: 1.2.0 param-case: 3.0.4 relateurl: 0.2.7 - terser: 5.17.7 + terser: 5.19.4 dev: true /html-minifier@3.5.21: @@ -11253,8 +11587,8 @@ packages: webpack: 4.46.0 dev: true - /html-webpack-plugin@5.5.1(webpack@4.46.0): - resolution: {integrity: sha512-cTUzZ1+NqjGEKjmVgZKLMdiFg3m9MdRXkZW2OEe69WYVi5ONLMmlnSZdXzGGMOq0C8jGDrL6EWyEDDUioHO/pA==} + /html-webpack-plugin@5.5.3(webpack@4.46.0): + resolution: {integrity: sha512-6YrDKTuqaP/TquFH7h4srYWsZx+x6k6+FbsTm0ziCwGHDP78Unr1r9F/H4+sGmMbX08GQcJ+K64x55b+7VM/jg==} engines: {node: '>=10.13.0'} peerDependencies: webpack: ^5.20.0 @@ -11267,13 +11601,13 @@ packages: webpack: 4.46.0 dev: true - /html-webpack-skip-assets-plugin@1.0.3(html-webpack-plugin@5.5.1)(webpack@4.46.0): + /html-webpack-skip-assets-plugin@1.0.3(html-webpack-plugin@5.5.3)(webpack@4.46.0): resolution: {integrity: sha512-vpdh+JZGlE1Df3IftH2gw5P7b6yfTsahcOIJnkkkj5iJU9dUStXgzgALoXWwl8+17wWgFm3edcJzeYTJBYfMAw==} peerDependencies: html-webpack-plugin: '>=3.0.0' webpack: '>=3.0.0' dependencies: - html-webpack-plugin: 5.5.1(webpack@4.46.0) + html-webpack-plugin: 5.5.3(webpack@4.46.0) minimatch: 3.0.4 webpack: 4.46.0 dev: true @@ -12137,6 +12471,13 @@ packages: minimist: 1.2.7 dev: true + /json5@1.0.2: + resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} + hasBin: true + dependencies: + minimist: 1.2.8 + dev: true + /json5@2.2.1: resolution: {integrity: sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==} engines: {node: '>=6'} @@ -12319,6 +12660,15 @@ packages: json5: 1.0.1 dev: true + /loader-utils@1.4.2: + resolution: {integrity: sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==} + engines: {node: '>=4.0.0'} + dependencies: + big.js: 5.2.2 + emojis-list: 3.0.0 + json5: 1.0.2 + dev: true + /loader-utils@2.0.3: resolution: {integrity: sha512-THWqIsn8QRnvLl0shHYVBN9syumU8pYWEHPTmkiVGd+7K5eFNVSY6AJhRvgGF70gg1Dz+l/k8WicvFCxdEs60A==} engines: {node: '>=8.9.0'} @@ -12431,7 +12781,7 @@ packages: /lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} dependencies: - tslib: 2.6.1 + tslib: 2.6.2 dev: true /lowercase-keys@1.0.1: @@ -12483,7 +12833,7 @@ packages: engines: {node: '>=6'} dependencies: pify: 4.0.1 - semver: 5.7.1 + semver: 5.7.2 dev: true /make-dir@3.1.0: @@ -12576,7 +12926,7 @@ packages: resolution: {integrity: sha512-cda4JKCxReDXFXRqOHPQscuIYg1PvxbE2S2GP45rnwfEK+vZaXC8C1OFvdHIbgw0DLzowXGVoxLaAmlgRy14GQ==} dependencies: errno: 0.1.8 - readable-stream: 2.3.7 + readable-stream: 2.3.8 dev: true /memory-fs@0.5.0: @@ -12584,7 +12934,7 @@ packages: engines: {node: '>=4.3.0 <5.0.0 || >=5.10'} dependencies: errno: 0.1.8 - readable-stream: 2.3.7 + readable-stream: 2.3.8 dev: true /merge-descriptors@1.0.1: @@ -12638,6 +12988,7 @@ packages: /miller-rabin@4.0.1: resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} + hasBin: true dependencies: bn.js: 4.12.0 brorand: 1.1.0 @@ -12744,9 +13095,20 @@ packages: brace-expansion: 2.0.1 dev: true + /minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: true + /minimist@1.2.7: resolution: {integrity: sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==} + /minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + dev: true + /minipass-collect@1.0.2: resolution: {integrity: sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==} engines: {node: '>= 8'} @@ -12833,8 +13195,9 @@ packages: /mkdirp@0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} + hasBin: true dependencies: - minimist: 1.2.7 + minimist: 1.2.8 dev: true /mkdirp@1.0.4: @@ -12995,7 +13358,7 @@ packages: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} dependencies: lower-case: 2.0.2 - tslib: 2.6.1 + tslib: 2.6.2 dev: true /node-abi@3.45.0: @@ -13049,13 +13412,13 @@ packages: process: 0.11.10 punycode: 1.4.1 querystring-es3: 0.2.1 - readable-stream: 2.3.7 + readable-stream: 2.3.8 stream-browserify: 2.0.2 stream-http: 2.8.3 string_decoder: 1.3.0 timers-browserify: 2.0.12 tty-browserify: 0.0.0 - url: 0.11.0 + url: 0.11.1 util: 0.11.1 vm-browserify: 1.1.2 dev: true @@ -13070,6 +13433,10 @@ packages: /node-releases@2.0.10: resolution: {integrity: sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==} + /node-releases@2.0.13: + resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} + dev: true + /nofilter@3.1.0: resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==} engines: {node: '>=12.19'} @@ -13420,6 +13787,18 @@ packages: word-wrap: 1.2.3 dev: true + /optionator@0.9.3: + resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} + engines: {node: '>= 0.8.0'} + dependencies: + '@aashutoshrathi/word-wrap': 1.2.6 + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + dev: true + /ora@5.4.1: resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} engines: {node: '>=10'} @@ -13571,9 +13950,9 @@ packages: /parallel-transform@1.2.0: resolution: {integrity: sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==} dependencies: - cyclist: 1.0.1 + cyclist: 1.0.2 inherits: 2.0.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 dev: true /param-case@2.1.1: @@ -13586,7 +13965,7 @@ packages: resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} dependencies: dot-case: 3.0.4 - tslib: 2.6.1 + tslib: 2.6.2 dev: true /parent-module@1.0.1: @@ -13651,7 +14030,7 @@ packages: resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} dependencies: no-case: 3.0.4 - tslib: 2.6.1 + tslib: 2.6.2 dev: true /pascalcase@0.1.1: @@ -14895,10 +15274,6 @@ packages: pump: 2.0.1 dev: true - /punycode@1.3.2: - resolution: {integrity: sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==} - dev: true - /punycode@1.4.1: resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} dev: true @@ -14931,6 +15306,13 @@ packages: side-channel: 1.0.4 dev: true + /qs@6.11.2: + resolution: {integrity: sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==} + engines: {node: '>=0.6'} + dependencies: + side-channel: 1.0.4 + dev: true + /qs@6.5.3: resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==} engines: {node: '>=0.6'} @@ -14941,11 +15323,6 @@ packages: engines: {node: '>=0.4.x'} dev: true - /querystring@0.2.0: - resolution: {integrity: sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==} - engines: {node: '>=0.4.x'} - dev: true - /querystring@0.2.1: resolution: {integrity: sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==} engines: {node: '>=0.4.x'} @@ -15050,6 +15427,18 @@ packages: util-deprecate: 1.0.2 dev: true + /readable-stream@2.3.8: + resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} + dependencies: + core-util-is: 1.0.3 + inherits: 2.0.4 + isarray: 1.0.0 + process-nextick-args: 2.0.1 + safe-buffer: 5.1.2 + string_decoder: 1.1.1 + util-deprecate: 1.0.2 + dev: true + /readable-stream@3.6.0: resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==} engines: {node: '>= 6'} @@ -15058,14 +15447,23 @@ packages: string_decoder: 1.3.0 util-deprecate: 1.0.2 + /readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + dev: true + /readdirp@2.2.1: resolution: {integrity: sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==} engines: {node: '>=0.10'} requiresBuild: true dependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 micromatch: 3.1.10 - readable-stream: 2.3.7 + readable-stream: 2.3.8 transitivePeerDependencies: - supports-color dev: true @@ -15315,6 +15713,7 @@ packages: /resolve-url@0.2.1: resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==} + deprecated: https://github.com/lydell/resolve-url#deprecated dev: true /resolve@1.22.1: @@ -15420,7 +15819,7 @@ packages: resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==} engines: {node: '>=10.0.0'} optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /run-parallel@1.2.0: @@ -15565,9 +15964,19 @@ packages: hasBin: true dev: true + /semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} + hasBin: true + dev: true + /semver@6.3.0: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} + /semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + dev: true + /semver@7.3.4: resolution: {integrity: sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==} engines: {node: '>=10'} @@ -15689,6 +16098,7 @@ packages: /sha.js@2.4.11: resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} + hasBin: true dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 @@ -15725,10 +16135,10 @@ packages: engines: {node: '>=8'} dev: true - /shiki@0.14.2: - resolution: {integrity: sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==} + /shiki@0.14.4: + resolution: {integrity: sha512-IXCRip2IQzKwxArNNq1S+On4KPML3Yyn8Zzs/xRgcgOWIr8ntIK3IKzjFPfjy/7kt9ZMjc+FItfqHRBg8b6tNQ==} dependencies: - ansi-sequence-parser: 1.1.0 + ansi-sequence-parser: 1.1.1 jsonc-parser: 3.2.0 vscode-oniguruma: 1.7.0 vscode-textmate: 8.0.0 @@ -15905,9 +16315,10 @@ packages: /source-map-resolve@0.5.3: resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==} + deprecated: See https://github.com/lydell/source-map-resolve#deprecated dependencies: atob: 2.1.2 - decode-uri-component: 0.2.0 + decode-uri-component: 0.2.2 resolve-url: 0.2.1 source-map-url: 0.4.1 urix: 0.1.0 @@ -16076,7 +16487,7 @@ packages: resolution: {integrity: sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==} dependencies: inherits: 2.0.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 dev: true /stream-each@1.2.3: @@ -16091,7 +16502,7 @@ packages: dependencies: builtin-status-codes: 3.0.0 inherits: 2.0.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 to-arraybuffer: 1.0.1 xtend: 4.0.2 dev: true @@ -16531,8 +16942,9 @@ packages: /terser@4.8.1: resolution: {integrity: sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==} engines: {node: '>=6.0.0'} + hasBin: true dependencies: - acorn: 8.8.2 + acorn: 8.10.0 commander: 2.20.3 source-map: 0.6.1 source-map-support: 0.5.21 @@ -16548,13 +16960,13 @@ packages: source-map-support: 0.5.21 dev: true - /terser@5.17.7: - resolution: {integrity: sha512-/bi0Zm2C6VAexlGgLlVxA0P2lru/sdLyfCVaRMfKVo9nWxbmz7f/sD8VPybPeSUJaJcwmCJis9pBIhcVcG1QcQ==} + /terser@5.19.4: + resolution: {integrity: sha512-6p1DjHeuluwxDXcuT9VR8p64klWJKo1ILiy19s6C9+0Bh2+NWTX6nD9EPppiER4ICkHDVB1RkVpin/YW2nQn/g==} engines: {node: '>=10'} hasBin: true dependencies: - '@jridgewell/source-map': 0.3.3 - acorn: 8.8.2 + '@jridgewell/source-map': 0.3.5 + acorn: 8.10.0 commander: 2.20.3 source-map-support: 0.5.21 dev: true @@ -16590,7 +17002,7 @@ packages: /through2@2.0.5: resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} dependencies: - readable-stream: 2.3.7 + readable-stream: 2.3.8 xtend: 4.0.2 dev: true @@ -16728,7 +17140,7 @@ packages: tslib: 2.6.1 dev: true - /ts-node@10.9.1(@types/node@20.4.1)(typescript@5.1.3): + /ts-node@10.9.1(@types/node@20.5.9)(typescript@5.2.2): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -16747,14 +17159,14 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.3 - '@types/node': 20.4.1 + '@types/node': 20.5.9 acorn: 8.8.1 acorn-walk: 8.2.0 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.1.3 + typescript: 5.2.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true @@ -16799,14 +17211,18 @@ packages: resolution: {integrity: sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==} dev: true - /tsutils@3.21.0(typescript@5.1.3): + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + dev: true + + /tsutils@3.21.0(typescript@5.2.2): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 5.1.3 + typescript: 5.2.2 dev: true /tty-browserify@0.0.0: @@ -16879,18 +17295,18 @@ packages: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: true - /typedoc@0.24.8(typescript@5.1.3): - resolution: {integrity: sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w==} - engines: {node: '>= 14.14'} + /typedoc@0.25.1(typescript@5.2.2): + resolution: {integrity: sha512-c2ye3YUtGIadxN2O6YwPEXgrZcvhlZ6HlhWZ8jQRNzwLPn2ylhdGqdR8HbyDRyALP8J6lmSANILCkkIdNPFxqA==} + engines: {node: '>= 16'} hasBin: true peerDependencies: - typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x dependencies: lunr: 2.3.9 marked: 4.3.0 - minimatch: 9.0.1 - shiki: 0.14.2 - typescript: 5.1.3 + minimatch: 9.0.3 + shiki: 0.14.4 + typescript: 5.2.2 dev: true /typescript@4.6.4: @@ -16899,13 +17315,8 @@ packages: hasBin: true dev: true - /typescript@5.1.3: - resolution: {integrity: sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==} - engines: {node: '>=14.17'} - dev: true - - /typescript@5.1.6: - resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + /typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} engines: {node: '>=14.17'} hasBin: true dev: true @@ -17025,6 +17436,7 @@ packages: /upath@1.2.0: resolution: {integrity: sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==} engines: {node: '>=4'} + requiresBuild: true dev: true /update-browserslist-db@1.0.10(browserslist@4.21.4): @@ -17048,6 +17460,17 @@ packages: escalade: 3.1.1 picocolors: 1.0.0 + /update-browserslist-db@1.0.11(browserslist@4.21.10): + resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.21.10 + escalade: 3.1.1 + picocolors: 1.0.0 + dev: true + /update-notifier@5.1.0: resolution: {integrity: sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==} engines: {node: '>=10'} @@ -17080,6 +17503,7 @@ packages: /urix@0.1.0: resolution: {integrity: sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==} + deprecated: Please see https://github.com/lydell/urix#deprecated dev: true /url-loader@4.1.1(file-loader@6.2.0)(webpack@4.46.0): @@ -17106,11 +17530,11 @@ packages: prepend-http: 2.0.0 dev: true - /url@0.11.0: - resolution: {integrity: sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==} + /url@0.11.1: + resolution: {integrity: sha512-rWS3H04/+mzzJkv0eZ7vEDGiQbgquI1fGfOad6zKvgYQi1SzMmhl7c/DdRGxhaWrVH6z0qWITo8rpnxK/RfEhA==} dependencies: - punycode: 1.3.2 - querystring: 0.2.0 + punycode: 1.4.1 + qs: 6.11.2 dev: true /use-sync-external-store@1.2.0(react@18.2.0): @@ -17260,7 +17684,7 @@ packages: /watchpack@1.7.5: resolution: {integrity: sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==} dependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 neo-async: 2.6.2 optionalDependencies: chokidar: 3.5.3 @@ -17445,7 +17869,7 @@ packages: eslint-scope: 4.0.3 json-parse-better-errors: 1.0.2 loader-runner: 2.4.0 - loader-utils: 1.4.0 + loader-utils: 1.4.2 memory-fs: 0.4.1 micromatch: 3.1.10 mkdirp: 0.5.6 -- cgit v1.2.3