diff options
author | Florian Dold <florian@dold.me> | 2022-12-23 12:59:29 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-12-23 13:19:41 +0100 |
commit | 083c4cf5d96314c44dd716cf3cc931e95b651bbd (patch) | |
tree | 7f15a46224d5dfe495e26dc6ec66996c889498ff | |
parent | d98711cb51d13bb2da3682014c7c6e75d7fbb4f0 (diff) |
spill extra functionality from wallet-cli into taler-harness
We want to keep taler-wallet-cli smaller and have fewer dependencies.
-rw-r--r-- | packages/demobank-ui/package.json | 2 | ||||
-rw-r--r-- | packages/idb-bridge/package.json | 2 | ||||
-rw-r--r-- | packages/idb-bridge/src/util/structuredClone.ts | 13 | ||||
-rw-r--r-- | packages/merchant-backoffice-ui/package.json | 2 | ||||
-rw-r--r-- | packages/pogen/package.json | 2 | ||||
-rw-r--r-- | packages/taler-harness/Makefile | 30 | ||||
-rwxr-xr-x | packages/taler-harness/bin/taler-harness.mjs | 19 | ||||
-rwxr-xr-x | packages/taler-harness/build.mjs | 70 | ||||
-rw-r--r-- | packages/taler-harness/package.json | 44 | ||||
-rw-r--r-- | packages/taler-harness/src/bench1.ts (renamed from packages/taler-wallet-cli/src/bench1.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/bench2.ts (renamed from packages/taler-wallet-cli/src/bench2.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/bench3.ts (renamed from packages/taler-wallet-cli/src/bench3.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/benchMerchantIDGenerator.ts (renamed from packages/taler-wallet-cli/src/benchMerchantIDGenerator.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/env-full.ts (renamed from packages/taler-wallet-cli/src/env-full.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/env1.ts (renamed from packages/taler-wallet-cli/src/env1.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/harness/denomStructures.ts (renamed from packages/taler-wallet-cli/src/harness/denomStructures.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/harness/faultInjection.ts (renamed from packages/taler-wallet-cli/src/harness/faultInjection.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/harness/harness.ts (renamed from packages/taler-wallet-cli/src/harness/harness.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/harness/helpers.ts (renamed from packages/taler-wallet-cli/src/harness/helpers.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/harness/libeufin-apis.ts (renamed from packages/taler-wallet-cli/src/harness/libeufin-apis.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/harness/libeufin.ts (renamed from packages/taler-wallet-cli/src/harness/libeufin.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/harness/merchantApiTypes.ts (renamed from packages/taler-wallet-cli/src/harness/merchantApiTypes.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/harness/sync.ts (renamed from packages/taler-wallet-cli/src/harness/sync.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/index.ts | 338 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/scenario-prompt-payment.ts (renamed from packages/taler-wallet-cli/src/integrationtests/scenario-prompt-payment.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-age-restrictions-merchant.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-age-restrictions-mixed-merchant.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-age-restrictions-mixed-merchant.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-age-restrictions-peer.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-age-restrictions-peer.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-bank-api.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-claim-loop.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-claim-loop.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-clause-schnorr.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-clause-schnorr.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-denom-unoffered.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-denom-unoffered.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-deposit.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-deposit.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-exchange-management.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-exchange-management.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-exchange-timetravel.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-exchange-timetravel.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-fee-regression.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-fee-regression.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-forced-selection.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-forced-selection.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-api-bankaccount.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-bankaccount.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-api-bankconnection.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-bankconnection.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-api-facade-bad-request.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade-bad-request.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-api-facade.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-api-permissions.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-permissions.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-api-sandbox-camt.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-sandbox-camt.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-api-sandbox-transactions.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-sandbox-transactions.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-api-scheduling.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-scheduling.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-api-users.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-users.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-bad-gateway.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-bad-gateway.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-basic.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-basic.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-c5x.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-c5x.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-facade-anastasis.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-keyrotation.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-keyrotation.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-nexus-balance.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-nexus-balance.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-refund-multiple-users.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund-multiple-users.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-refund.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-sandbox-wire-transfer-cli.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-sandbox-wire-transfer-cli.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-libeufin-tutorial.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-merchant-exchange-confusion.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-merchant-instances-delete.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-merchant-instances-delete.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-merchant-instances-urls.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-merchant-instances-urls.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-merchant-instances.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-merchant-instances.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-merchant-longpolling.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-merchant-refund-api.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-merchant-refund-api.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-merchant-spec-public-orders.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-merchant-spec-public-orders.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-pay-paid.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-pay-paid.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-payment-claim.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-payment-claim.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-payment-fault.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-payment-fault.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-payment-forgettable.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-payment-forgettable.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-payment-idempotency.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-payment-idempotency.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-payment-multiple.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-payment-multiple.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-payment-on-demo.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-payment-on-demo.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-payment-transient.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-payment-transient.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-payment-zero.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-payment-zero.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-payment.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-payment.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-paywall-flow.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-paywall-flow.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-peer-to-peer-pull.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer-pull.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-peer-to-peer-push.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer-push.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-refund-auto.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-refund-auto.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-refund-gone.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-refund-gone.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-refund-incremental.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-refund-incremental.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-refund.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-refund.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-revocation.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-revocation.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-timetravel-autorefresh.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-timetravel-withdraw.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-timetravel-withdraw.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-tipping.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-tipping.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-wallet-backup-basic.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-basic.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-wallet-backup-doublespend.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-doublespend.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-wallet-balance.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-wallet-balance.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-wallet-cryptoworker.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-wallet-cryptoworker.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-wallet-dbless.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-wallet-dbless.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-wallettesting.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-wallettesting.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-withdrawal-abort-bank.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-withdrawal-bank-integrated.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-withdrawal-fakebank.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-withdrawal-fakebank.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-withdrawal-high.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-withdrawal-high.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts (renamed from packages/taler-wallet-cli/src/integrationtests/test-withdrawal-manual.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/integrationtests/testrunner.ts (renamed from packages/taler-wallet-cli/src/integrationtests/testrunner.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/src/lint.ts (renamed from packages/taler-wallet-cli/src/lint.ts) | 0 | ||||
-rw-r--r-- | packages/taler-harness/tsconfig.json | 33 | ||||
-rw-r--r-- | packages/taler-wallet-cli/assets/.gitkeep | 0 | ||||
-rwxr-xr-x | packages/taler-wallet-cli/build.mjs | 11 | ||||
-rw-r--r-- | packages/taler-wallet-cli/package.json | 2 | ||||
-rw-r--r-- | packages/taler-wallet-cli/src/assets.ts | 52 | ||||
-rw-r--r-- | packages/taler-wallet-cli/src/index.ts | 273 | ||||
-rw-r--r-- | packages/taler-wallet-embedded/package.json | 6 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/package.json | 4 | ||||
-rw-r--r-- | packages/web-util/package.json | 2 | ||||
-rw-r--r-- | pnpm-lock.yaml | 160 |
107 files changed, 653 insertions, 412 deletions
diff --git a/packages/demobank-ui/package.json b/packages/demobank-ui/package.json index 8ba3448a4..d915ee31b 100644 --- a/packages/demobank-ui/package.json +++ b/packages/demobank-ui/package.json @@ -47,7 +47,7 @@ "@types/chai": "^4.3.0", "@types/history": "^4.7.8", "@types/mocha": "^10.0.1", - "@types/node": "^18.11.14", + "@types/node": "^18.11.17", "@typescript-eslint/eslint-plugin": "^5.41.0", "@typescript-eslint/parser": "^5.41.0", "async_hooks": "^1.0.0", diff --git a/packages/idb-bridge/package.json b/packages/idb-bridge/package.json index b93ca9f0d..9a58b8695 100644 --- a/packages/idb-bridge/package.json +++ b/packages/idb-bridge/package.json @@ -22,7 +22,7 @@ } }, "devDependencies": { - "@types/node": "^18.8.5", + "@types/node": "^18.11.17", "ava": "^4.3.3", "esm": "^3.2.25", "prettier": "^2.5.1", diff --git a/packages/idb-bridge/src/util/structuredClone.ts b/packages/idb-bridge/src/util/structuredClone.ts index c33dc5e36..5ed269db3 100644 --- a/packages/idb-bridge/src/util/structuredClone.ts +++ b/packages/idb-bridge/src/util/structuredClone.ts @@ -425,6 +425,11 @@ export function structuredRevive(val: any): any { * Structured clone for IndexedDB. */ export function structuredClone(val: any): any { + // @ts-ignore + if (globalThis._tart?.structuredClone) { + // @ts-ignore + return globalThis._tart?.structuredClone(val); + } return mkDeepClone()(val); } @@ -432,5 +437,11 @@ export function structuredClone(val: any): any { * Structured clone for IndexedDB. */ export function checkStructuredCloneOrThrow(val: any): void { - return mkDeepCloneCheckOnly()(val); + // @ts-ignore + if (globalThis._tart?.structuredClone) { + // @ts-ignore + globalThis._tart?.structuredClone(val); + return; + } + mkDeepCloneCheckOnly()(val); } diff --git a/packages/merchant-backoffice-ui/package.json b/packages/merchant-backoffice-ui/package.json index ca8923e05..beacd42f6 100644 --- a/packages/merchant-backoffice-ui/package.json +++ b/packages/merchant-backoffice-ui/package.json @@ -53,7 +53,7 @@ "@types/history": "^4.7.8", "@types/jest": "^26.0.23", "@types/mocha": "^8.2.3", - "@types/node": "^18.8.5", + "@types/node": "^18.11.17", "@typescript-eslint/eslint-plugin": "^4.22.0", "@typescript-eslint/parser": "^4.22.0", "base64-inline-loader": "^1.1.1", diff --git a/packages/pogen/package.json b/packages/pogen/package.json index 9b6daad13..11033c5de 100644 --- a/packages/pogen/package.json +++ b/packages/pogen/package.json @@ -15,7 +15,7 @@ "typescript": "^4.8.4" }, "dependencies": { - "@types/node": "^18.8.5", + "@types/node": "^18.11.17", "glob": "^7.2.0" } } diff --git a/packages/taler-harness/Makefile b/packages/taler-harness/Makefile new file mode 100644 index 000000000..85c146641 --- /dev/null +++ b/packages/taler-harness/Makefile @@ -0,0 +1,30 @@ +# This Makefile has been placed in the public domain. + +-include ../../.config.mk +include .config.mk + +$(info prefix is $(prefix)) + +all: + @echo use 'make install' to build and install taler-harness + +ifndef prefix +.PHONY: warn-noprefix install +warn-noprefix: + @echo "no prefix configured, did you run ./configure?" +install: warn-noprefix +else +install_target = $(prefix)/lib/taler-harness +.PHONY: install install-nodeps +install: + pnpm install --frozen-lockfile --filter @gnu-taler/taler-harness... + install -d $(prefix)/bin + install -d $(install_target)/bin + install -d $(install_target)/node_modules/taler-harness + install -d $(install_target)/node_modules/taler-harness/bin + install -d $(install_target)/node_modules/taler-harness/dist + install ./dist/taler-harness-bundled.cjs $(install_target)/node_modules/taler-harness/dist/ + install ./dist/taler-harness-bundled.cjs.map $(install_target)/node_modules/taler-harness/dist/ + install ./bin/taler-harness.mjs $(install_target)/node_modules/taler-harness/bin/ + ln -sf $(install_target)/node_modules/taler-harness/bin/taler-harness.mjs $(prefix)/bin/taler-harness +endif diff --git a/packages/taler-harness/bin/taler-harness.mjs b/packages/taler-harness/bin/taler-harness.mjs new file mode 100755 index 000000000..f8deebedb --- /dev/null +++ b/packages/taler-harness/bin/taler-harness.mjs @@ -0,0 +1,19 @@ +#!/usr/bin/env node +/* + This file is part of GNU Taler + (C) 2022 Taler Systems SA + + 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. + + 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 + TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> + */ + +import { main } from '../dist/taler-harness-bundled.cjs'; +main(); diff --git a/packages/taler-harness/build.mjs b/packages/taler-harness/build.mjs new file mode 100755 index 000000000..b02d159e1 --- /dev/null +++ b/packages/taler-harness/build.mjs @@ -0,0 +1,70 @@ +#!/usr/bin/env node +/* + 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 <http://www.gnu.org/licenses/> + */ + +import esbuild from 'esbuild' +import path from "path" +import fs from "fs" + +const BASE = process.cwd() + +let GIT_ROOT = BASE +while (!fs.existsSync(path.join(GIT_ROOT, '.git')) && GIT_ROOT !== '/') { + GIT_ROOT = path.join(GIT_ROOT, '../') +} +if (GIT_ROOT === '/') { + console.log("not found") + process.exit(1); +} +const GIT_HASH = GIT_ROOT === '/' ? undefined : git_hash() + + +let _package = JSON.parse(fs.readFileSync(path.join(BASE, 'package.json'))); + +function git_hash() { + const rev = fs.readFileSync(path.join(GIT_ROOT, '.git', 'HEAD')).toString().trim().split(/.*[: ]/).slice(-1)[0]; + if (rev.indexOf('/') === -1) { + return rev; + } else { + return fs.readFileSync(path.join(GIT_ROOT, '.git', rev)).toString().trim(); + } +} + +// Still commonjs, because axios doesn't work properly under mjs +export const buildConfig = { + entryPoints: ["src/index.ts"], + outfile: "dist/taler-harness-bundled.cjs", + bundle: true, + minify: false, + target: [ + 'es2020' + ], + format: 'cjs', + platform: 'node', + sourcemap: true, + define: { + '__VERSION__': `"${_package.version}"`, + '__GIT_HASH__': `"${GIT_HASH}"`, + }, +} + +esbuild + .build(buildConfig) + .catch((e) => { + console.log(e) + process.exit(1) + }); + diff --git a/packages/taler-harness/package.json b/packages/taler-harness/package.json new file mode 100644 index 000000000..f521924c4 --- /dev/null +++ b/packages/taler-harness/package.json @@ -0,0 +1,44 @@ +{ + "name": "@gnu-taler/taler-harness", + "version": "0.9.0-dev.2", + "description": "", + "engines": { + "node": ">=0.12.0" + }, + "repository": { + "type": "git", + "url": "git://git.taler.net/wallet-core.git" + }, + "author": "Florian Dold", + "license": "GPL-3.0", + "bin": { + "taler-harness": "./bin/taler-harness.mjs" + }, + "type": "module", + "scripts": { + "compile": "./build.mjs", + "check": "tsc", + "clean": "rimraf lib dist tsconfig.tsbuildinfo", + "pretty": "prettier --write src" + }, + "files": [ + "AUTHORS", + "README", + "COPYING", + "bin/", + "dist/node", + "src/" + ], + "devDependencies": { + "@types/node": "^18.11.17", + "prettier": "^2.5.1", + "rimraf": "^3.0.2", + "typescript": "^4.8.4" + }, + "dependencies": { + "@gnu-taler/taler-util": "workspace:*", + "@gnu-taler/taler-wallet-core": "workspace:*", + "axios": "^0.27.2", + "tslib": "^2.4.0" + } +} diff --git a/packages/taler-wallet-cli/src/bench1.ts b/packages/taler-harness/src/bench1.ts index 84786d25a..84786d25a 100644 --- a/packages/taler-wallet-cli/src/bench1.ts +++ b/packages/taler-harness/src/bench1.ts diff --git a/packages/taler-wallet-cli/src/bench2.ts b/packages/taler-harness/src/bench2.ts index 196737436..196737436 100644 --- a/packages/taler-wallet-cli/src/bench2.ts +++ b/packages/taler-harness/src/bench2.ts diff --git a/packages/taler-wallet-cli/src/bench3.ts b/packages/taler-harness/src/bench3.ts index 6041c525c..6041c525c 100644 --- a/packages/taler-wallet-cli/src/bench3.ts +++ b/packages/taler-harness/src/bench3.ts diff --git a/packages/taler-wallet-cli/src/benchMerchantIDGenerator.ts b/packages/taler-harness/src/benchMerchantIDGenerator.ts index b83c12bb8..b83c12bb8 100644 --- a/packages/taler-wallet-cli/src/benchMerchantIDGenerator.ts +++ b/packages/taler-harness/src/benchMerchantIDGenerator.ts diff --git a/packages/taler-wallet-cli/src/env-full.ts b/packages/taler-harness/src/env-full.ts index 3a684db0b..3a684db0b 100644 --- a/packages/taler-wallet-cli/src/env-full.ts +++ b/packages/taler-harness/src/env-full.ts diff --git a/packages/taler-wallet-cli/src/env1.ts b/packages/taler-harness/src/env1.ts index aec0b7b8f..aec0b7b8f 100644 --- a/packages/taler-wallet-cli/src/env1.ts +++ b/packages/taler-harness/src/env1.ts diff --git a/packages/taler-wallet-cli/src/harness/denomStructures.ts b/packages/taler-harness/src/harness/denomStructures.ts index b12857c7e..b12857c7e 100644 --- a/packages/taler-wallet-cli/src/harness/denomStructures.ts +++ b/packages/taler-harness/src/harness/denomStructures.ts diff --git a/packages/taler-wallet-cli/src/harness/faultInjection.ts b/packages/taler-harness/src/harness/faultInjection.ts index 4c3d0c123..4c3d0c123 100644 --- a/packages/taler-wallet-cli/src/harness/faultInjection.ts +++ b/packages/taler-harness/src/harness/faultInjection.ts diff --git a/packages/taler-wallet-cli/src/harness/harness.ts b/packages/taler-harness/src/harness/harness.ts index 6f722dc8d..6f722dc8d 100644 --- a/packages/taler-wallet-cli/src/harness/harness.ts +++ b/packages/taler-harness/src/harness/harness.ts diff --git a/packages/taler-wallet-cli/src/harness/helpers.ts b/packages/taler-harness/src/harness/helpers.ts index affaccd61..affaccd61 100644 --- a/packages/taler-wallet-cli/src/harness/helpers.ts +++ b/packages/taler-harness/src/harness/helpers.ts diff --git a/packages/taler-wallet-cli/src/harness/libeufin-apis.ts b/packages/taler-harness/src/harness/libeufin-apis.ts index f55275927..f55275927 100644 --- a/packages/taler-wallet-cli/src/harness/libeufin-apis.ts +++ b/packages/taler-harness/src/harness/libeufin-apis.ts diff --git a/packages/taler-wallet-cli/src/harness/libeufin.ts b/packages/taler-harness/src/harness/libeufin.ts index 638c8ed90..638c8ed90 100644 --- a/packages/taler-wallet-cli/src/harness/libeufin.ts +++ b/packages/taler-harness/src/harness/libeufin.ts diff --git a/packages/taler-wallet-cli/src/harness/merchantApiTypes.ts b/packages/taler-harness/src/harness/merchantApiTypes.ts index 2a59b0160..2a59b0160 100644 --- a/packages/taler-wallet-cli/src/harness/merchantApiTypes.ts +++ b/packages/taler-harness/src/harness/merchantApiTypes.ts diff --git a/packages/taler-wallet-cli/src/harness/sync.ts b/packages/taler-harness/src/harness/sync.ts index a9e8de412..a9e8de412 100644 --- a/packages/taler-wallet-cli/src/harness/sync.ts +++ b/packages/taler-harness/src/harness/sync.ts diff --git a/packages/taler-harness/src/index.ts b/packages/taler-harness/src/index.ts new file mode 100644 index 000000000..632bd5877 --- /dev/null +++ b/packages/taler-harness/src/index.ts @@ -0,0 +1,338 @@ +/* + This file is part of GNU Taler + (C) 2019 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 <http://www.gnu.org/licenses/> + */ + +/** + * Imports. + */ +import { deepStrictEqual } from "assert"; +import fs from "fs"; +import os from "os"; +import path from "path"; +import { + Amounts, + clk, + Configuration, + decodeCrock, + Logger, + rsaBlind, + setGlobalLogLevelFromString, +} from "@gnu-taler/taler-util"; +import { runBench1 } from "./bench1.js"; +import { runBench2 } from "./bench2.js"; +import { runBench3 } from "./bench3.js"; +import { runEnv1 } from "./env1.js"; +import { GlobalTestState, runTestWithState } from "./harness/harness.js"; +import { getTestInfo, runTests } from "./integrationtests/testrunner.js"; +import { lintExchangeDeployment } from "./lint.js"; +import { runEnvFull } from "./env-full.js"; + +const logger = new Logger("taler-harness:index.ts"); + +process.on("unhandledRejection", (error: any) => { + logger.error("unhandledRejection", error.message); + logger.error("stack", error.stack); + process.exit(2); +}); + +declare const __VERSION__: string; +function printVersion(): void { + console.log(__VERSION__); + process.exit(0); +} + +export const testingCli = clk + .program("testing", { + help: "Command line interface for the GNU Taler test/deployment harness.", + }) + .maybeOption("log", ["-L", "--log"], clk.STRING, { + help: "configure log level (NONE, ..., TRACE)", + onPresentHandler: (x) => { + setGlobalLogLevelFromString(x); + }, + }) + .flag("version", ["-v", "--version"], { + onPresentHandler: printVersion, + }) + .flag("verbose", ["-V", "--verbose"], { + help: "Enable verbose output.", + }); + +const advancedCli = testingCli.subcommand("advancedArgs", "advanced", { + help: "Subcommands for advanced operations (only use if you know what you're doing!).", +}); + +advancedCli + .subcommand("bench1", "bench1", { + help: "Run the 'bench1' benchmark", + }) + .requiredOption("configJson", ["--config-json"], clk.STRING) + .action(async (args) => { + let config: any; + try { + config = JSON.parse(args.bench1.configJson); + } catch (e) { + console.log("Could not parse config JSON"); + } + await runBench1(config); + }); + +advancedCli + .subcommand("bench2", "bench2", { + help: "Run the 'bench2' benchmark", + }) + .requiredOption("configJson", ["--config-json"], clk.STRING) + .action(async (args) => { + let config: any; + try { + config = JSON.parse(args.bench2.configJson); + } catch (e) { + console.log("Could not parse config JSON"); + } + await runBench2(config); + }); + +advancedCli + .subcommand("bench3", "bench3", { + help: "Run the 'bench3' benchmark", + }) + .requiredOption("configJson", ["--config-json"], clk.STRING) + .action(async (args) => { + let config: any; + try { + config = JSON.parse(args.bench3.configJson); + } catch (e) { + console.log("Could not parse config JSON"); + } + await runBench3(config); + }); + +advancedCli + .subcommand("envFull", "env-full", { + help: "Run a test environment for bench1", + }) + .action(async (args) => { + const testDir = fs.mkdtempSync(path.join(os.tmpdir(), "taler-env-full-")); + const testState = new GlobalTestState({ + testDir, + }); + await runTestWithState(testState, runEnvFull, "env-full", true); + }); + +advancedCli + .subcommand("env1", "env1", { + help: "Run a test environment for bench1", + }) + .action(async (args) => { + const testDir = fs.mkdtempSync(path.join(os.tmpdir(), "taler-env1-")); + const testState = new GlobalTestState({ + testDir, + }); + await runTestWithState(testState, runEnv1, "env1", true); + }); + +const deploymentCli = testingCli.subcommand("deploymentArgs", "deployment", { + help: "Subcommands for handling GNU Taler deployments.", +}); + +deploymentCli + .subcommand("lintExchange", "lint-exchange", { + help: "Run checks on the exchange deployment.", + }) + .flag("cont", ["--continue"], { + help: "Continue after errors if possible", + }) + .flag("debug", ["--debug"], { + help: "Output extra debug info", + }) + .action(async (args) => { + await lintExchangeDeployment( + args.lintExchange.debug, + args.lintExchange.cont, + ); + }); + +deploymentCli + .subcommand("coincfg", "gen-coin-config", { + help: "Generate a coin/denomination configuration for the exchange.", + }) + .requiredOption("minAmount", ["--min-amount"], clk.STRING, { + help: "Smallest denomination", + }) + .requiredOption("maxAmount", ["--max-amount"], clk.STRING, { + help: "Largest denomination", + }) + .action(async (args) => { + let out = ""; + + const stamp = Math.floor(new Date().getTime() / 1000); + + const min = Amounts.parseOrThrow(args.coincfg.minAmount); + const max = Amounts.parseOrThrow(args.coincfg.maxAmount); + if (min.currency != max.currency) { + console.error("currency mismatch"); + process.exit(1); + } + const currency = min.currency; + let x = min; + let n = 1; + + out += "# Coin configuration for the exchange.\n"; + out += '# Should be placed in "/etc/taler/conf.d/exchange-coins.conf".\n'; + out += "\n"; + + while (Amounts.cmp(x, max) < 0) { + out += `[COIN-${currency}-n${n}-t${stamp}]\n`; + out += `VALUE = ${Amounts.stringify(x)}\n`; + out += `DURATION_WITHDRAW = 7 days\n`; + out += `DURATION_SPEND = 2 years\n`; + out += `DURATION_LEGAL = 6 years\n`; + out += `FEE_WITHDRAW = ${currency}:0\n`; + out += `FEE_DEPOSIT = ${Amounts.stringify(min)}\n`; + out += `FEE_REFRESH = ${currency}:0\n`; + out += `FEE_REFUND = ${currency}:0\n`; + out += `RSA_KEYSIZE = 2048\n`; + out += "\n"; + x = Amounts.add(x, x).amount; + n++; + } + + console.log(out); + }); + +const deploymentConfigCli = deploymentCli.subcommand("configArgs", "config", { + help: "Subcommands the Taler configuration.", +}); + +deploymentConfigCli + .subcommand("show", "show") + .flag("diagnostics", ["-d", "--diagnostics"]) + .maybeArgument("cfgfile", clk.STRING, {}) + .action(async (args) => { + const cfg = Configuration.load(args.show.cfgfile); + console.log( + cfg.stringify({ + diagnostics: args.show.diagnostics, + }), + ); + }); + + +testingCli.subcommand("logtest", "logtest").action(async (args) => { + logger.trace("This is a trace message."); + logger.info("This is an info message."); + logger.warn("This is an warning message."); + logger.error("This is an error message."); +}); + +testingCli + .subcommand("listIntegrationtests", "list-integrationtests") + .action(async (args) => { + for (const t of getTestInfo()) { + let s = t.name; + if (t.suites.length > 0) { + s += ` (suites: ${t.suites.join(",")})`; + } + if (t.excludeByDefault) { + s += ` [excluded by default]`; + } + console.log(s); + } + }); + +testingCli + .subcommand("runIntegrationtests", "run-integrationtests") + .maybeArgument("pattern", clk.STRING, { + help: "Glob pattern to select which tests to run", + }) + .maybeOption("suites", ["--suites"], clk.STRING, { + help: "Only run selected suites (comma-separated list)", + }) + .flag("dryRun", ["--dry"], { + help: "Only print tests that will be selected to run.", + }) + .flag("quiet", ["--quiet"], { + help: "Produce less output.", + }) + .action(async (args) => { + await runTests({ + includePattern: args.runIntegrationtests.pattern, + suiteSpec: args.runIntegrationtests.suites, + dryRun: args.runIntegrationtests.dryRun, + verbosity: args.runIntegrationtests.quiet ? 0 : 1, + }); + }); + +async function read(stream: NodeJS.ReadStream) { + const chunks = []; + for await (const chunk of stream) chunks.push(chunk); + return Buffer.concat(chunks).toString("utf8"); +} + +testingCli.subcommand("tvgcheck", "tvgcheck").action(async (args) => { + const data = await read(process.stdin); + + const lines = data.match(/[^\r\n]+/g); + + if (!lines) { + throw Error("can't split lines"); + } + + const vals: Record<string, string> = {}; + + let inBlindSigningSection = false; + + for (const line of lines) { + if (line === "blind signing:") { + inBlindSigningSection = true; + continue; + } + if (line[0] !== " ") { + inBlindSigningSection = false; + continue; + } + if (inBlindSigningSection) { + const m = line.match(/ (\w+) (\w+)/); + if (!m) { + console.log("bad format"); + process.exit(2); + } + vals[m[1]] = m[2]; + } + } + + console.log(vals); + + const req = (k: string) => { + if (!vals[k]) { + throw Error(`no value for ${k}`); + } + return decodeCrock(vals[k]); + }; + + const myBm = rsaBlind( + req("message_hash"), + req("blinding_key_secret"), + req("rsa_public_key"), + ); + + deepStrictEqual(req("blinded_message"), myBm); + + console.log("check passed!"); +}); + +export function main() { + testingCli.run(); +} diff --git a/packages/taler-wallet-cli/src/integrationtests/scenario-prompt-payment.ts b/packages/taler-harness/src/integrationtests/scenario-prompt-payment.ts index ea05de8e9..ea05de8e9 100644 --- a/packages/taler-wallet-cli/src/integrationtests/scenario-prompt-payment.ts +++ b/packages/taler-harness/src/integrationtests/scenario-prompt-payment.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions-merchant.ts b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts index ff589dd79..ff589dd79 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions-merchant.ts +++ b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions-mixed-merchant.ts b/packages/taler-harness/src/integrationtests/test-age-restrictions-mixed-merchant.ts index 8bf71b63d..8bf71b63d 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions-mixed-merchant.ts +++ b/packages/taler-harness/src/integrationtests/test-age-restrictions-mixed-merchant.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions-peer.ts b/packages/taler-harness/src/integrationtests/test-age-restrictions-peer.ts index af5b4df52..af5b4df52 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions-peer.ts +++ b/packages/taler-harness/src/integrationtests/test-age-restrictions-peer.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts b/packages/taler-harness/src/integrationtests/test-bank-api.ts index c7a23d3ce..c7a23d3ce 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts +++ b/packages/taler-harness/src/integrationtests/test-bank-api.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-claim-loop.ts b/packages/taler-harness/src/integrationtests/test-claim-loop.ts index a509e3b19..a509e3b19 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-claim-loop.ts +++ b/packages/taler-harness/src/integrationtests/test-claim-loop.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-clause-schnorr.ts b/packages/taler-harness/src/integrationtests/test-clause-schnorr.ts index bf42dc4c6..bf42dc4c6 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-clause-schnorr.ts +++ b/packages/taler-harness/src/integrationtests/test-clause-schnorr.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-denom-unoffered.ts b/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts index b5ecbee4a..b5ecbee4a 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-denom-unoffered.ts +++ b/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-deposit.ts b/packages/taler-harness/src/integrationtests/test-deposit.ts index 07382c43e..07382c43e 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-deposit.ts +++ b/packages/taler-harness/src/integrationtests/test-deposit.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-exchange-management.ts b/packages/taler-harness/src/integrationtests/test-exchange-management.ts index 6b63c3741..6b63c3741 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-exchange-management.ts +++ b/packages/taler-harness/src/integrationtests/test-exchange-management.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-exchange-timetravel.ts b/packages/taler-harness/src/integrationtests/test-exchange-timetravel.ts index 074126e9f..074126e9f 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-exchange-timetravel.ts +++ b/packages/taler-harness/src/integrationtests/test-exchange-timetravel.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-fee-regression.ts b/packages/taler-harness/src/integrationtests/test-fee-regression.ts index 8c5a5bea4..8c5a5bea4 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-fee-regression.ts +++ b/packages/taler-harness/src/integrationtests/test-fee-regression.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-forced-selection.ts b/packages/taler-harness/src/integrationtests/test-forced-selection.ts index 91be11a82..91be11a82 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-forced-selection.ts +++ b/packages/taler-harness/src/integrationtests/test-forced-selection.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-bankaccount.ts b/packages/taler-harness/src/integrationtests/test-libeufin-api-bankaccount.ts index c3cbc0608..c3cbc0608 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-bankaccount.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-api-bankaccount.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-bankconnection.ts b/packages/taler-harness/src/integrationtests/test-libeufin-api-bankconnection.ts index 912b7b2ac..912b7b2ac 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-bankconnection.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-api-bankconnection.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade-bad-request.ts b/packages/taler-harness/src/integrationtests/test-libeufin-api-facade-bad-request.ts index a1da9e0da..a1da9e0da 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade-bad-request.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-api-facade-bad-request.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade.ts b/packages/taler-harness/src/integrationtests/test-libeufin-api-facade.ts index 946c565d4..946c565d4 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-facade.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-api-facade.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-permissions.ts b/packages/taler-harness/src/integrationtests/test-libeufin-api-permissions.ts index f8f2d7d80..f8f2d7d80 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-permissions.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-api-permissions.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-sandbox-camt.ts b/packages/taler-harness/src/integrationtests/test-libeufin-api-sandbox-camt.ts index cb85c1ffc..cb85c1ffc 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-sandbox-camt.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-api-sandbox-camt.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-sandbox-transactions.ts b/packages/taler-harness/src/integrationtests/test-libeufin-api-sandbox-transactions.ts index 24fd9d3ef..24fd9d3ef 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-sandbox-transactions.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-api-sandbox-transactions.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-scheduling.ts b/packages/taler-harness/src/integrationtests/test-libeufin-api-scheduling.ts index 95f4bfaa0..95f4bfaa0 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-scheduling.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-api-scheduling.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-users.ts b/packages/taler-harness/src/integrationtests/test-libeufin-api-users.ts index bc3103c7e..bc3103c7e 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-api-users.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-api-users.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-bad-gateway.ts b/packages/taler-harness/src/integrationtests/test-libeufin-bad-gateway.ts index 53aacca84..53aacca84 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-bad-gateway.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-bad-gateway.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-basic.ts b/packages/taler-harness/src/integrationtests/test-libeufin-basic.ts index 94fd76683..94fd76683 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-basic.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-basic.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-c5x.ts b/packages/taler-harness/src/integrationtests/test-libeufin-c5x.ts index 2ba29656a..2ba29656a 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-c5x.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-c5x.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts b/packages/taler-harness/src/integrationtests/test-libeufin-facade-anastasis.ts index 1ed258c3a..1ed258c3a 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-facade-anastasis.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-facade-anastasis.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-keyrotation.ts b/packages/taler-harness/src/integrationtests/test-libeufin-keyrotation.ts index 21bf07de2..21bf07de2 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-keyrotation.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-keyrotation.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-nexus-balance.ts b/packages/taler-harness/src/integrationtests/test-libeufin-nexus-balance.ts index 850b0f1d9..850b0f1d9 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-nexus-balance.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-nexus-balance.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund-multiple-users.ts b/packages/taler-harness/src/integrationtests/test-libeufin-refund-multiple-users.ts index 245f34331..245f34331 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund-multiple-users.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-refund-multiple-users.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts b/packages/taler-harness/src/integrationtests/test-libeufin-refund.ts index 9d90121a0..9d90121a0 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-refund.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-refund.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-sandbox-wire-transfer-cli.ts b/packages/taler-harness/src/integrationtests/test-libeufin-sandbox-wire-transfer-cli.ts index e56cb3d68..e56cb3d68 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-sandbox-wire-transfer-cli.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-sandbox-wire-transfer-cli.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts b/packages/taler-harness/src/integrationtests/test-libeufin-tutorial.ts index 7bc067cfe..7bc067cfe 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-tutorial.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-exchange-confusion.ts b/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts index 30ab1cd4b..30ab1cd4b 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-exchange-confusion.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-exchange-confusion.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances-delete.ts b/packages/taler-harness/src/integrationtests/test-merchant-instances-delete.ts index 09231cdd8..09231cdd8 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances-delete.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-instances-delete.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances-urls.ts b/packages/taler-harness/src/integrationtests/test-merchant-instances-urls.ts index a4e44c7f3..a4e44c7f3 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances-urls.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-instances-urls.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances.ts b/packages/taler-harness/src/integrationtests/test-merchant-instances.ts index 3efe83241..3efe83241 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-instances.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-instances.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-longpolling.ts b/packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts index 4b9f53f05..4b9f53f05 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-longpolling.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-refund-api.ts b/packages/taler-harness/src/integrationtests/test-merchant-refund-api.ts index 5d9b23fa7..5d9b23fa7 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-refund-api.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-refund-api.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-spec-public-orders.ts b/packages/taler-harness/src/integrationtests/test-merchant-spec-public-orders.ts index 70edaaf0c..70edaaf0c 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-spec-public-orders.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-spec-public-orders.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-pay-paid.ts b/packages/taler-harness/src/integrationtests/test-pay-paid.ts index 2ef91e4a8..2ef91e4a8 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-pay-paid.ts +++ b/packages/taler-harness/src/integrationtests/test-pay-paid.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-claim.ts b/packages/taler-harness/src/integrationtests/test-payment-claim.ts index e93d2c44c..e93d2c44c 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-payment-claim.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-claim.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-fault.ts b/packages/taler-harness/src/integrationtests/test-payment-fault.ts index dea538e35..dea538e35 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-payment-fault.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-fault.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-forgettable.ts b/packages/taler-harness/src/integrationtests/test-payment-forgettable.ts index 3bdd6bef3..3bdd6bef3 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-payment-forgettable.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-forgettable.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-idempotency.ts b/packages/taler-harness/src/integrationtests/test-payment-idempotency.ts index 1099a8188..1099a8188 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-payment-idempotency.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-idempotency.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-multiple.ts b/packages/taler-harness/src/integrationtests/test-payment-multiple.ts index 46325c05f..46325c05f 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-payment-multiple.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-multiple.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-on-demo.ts b/packages/taler-harness/src/integrationtests/test-payment-on-demo.ts index 737620ce7..737620ce7 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-payment-on-demo.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-on-demo.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-transient.ts b/packages/taler-harness/src/integrationtests/test-payment-transient.ts index b57b355c6..b57b355c6 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-payment-transient.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-transient.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-zero.ts b/packages/taler-harness/src/integrationtests/test-payment-zero.ts index c38b8b382..c38b8b382 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-payment-zero.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-zero.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment.ts b/packages/taler-harness/src/integrationtests/test-payment.ts index 66d10f996..66d10f996 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-payment.ts +++ b/packages/taler-harness/src/integrationtests/test-payment.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-paywall-flow.ts b/packages/taler-harness/src/integrationtests/test-paywall-flow.ts index a9601c625..a9601c625 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-paywall-flow.ts +++ b/packages/taler-harness/src/integrationtests/test-paywall-flow.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer-pull.ts b/packages/taler-harness/src/integrationtests/test-peer-to-peer-pull.ts index 211f20494..211f20494 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer-pull.ts +++ b/packages/taler-harness/src/integrationtests/test-peer-to-peer-pull.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer-push.ts b/packages/taler-harness/src/integrationtests/test-peer-to-peer-push.ts index 4aaeca624..4aaeca624 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer-push.ts +++ b/packages/taler-harness/src/integrationtests/test-peer-to-peer-push.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-refund-auto.ts b/packages/taler-harness/src/integrationtests/test-refund-auto.ts index 4c2a2f94a..4c2a2f94a 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-refund-auto.ts +++ b/packages/taler-harness/src/integrationtests/test-refund-auto.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-refund-gone.ts b/packages/taler-harness/src/integrationtests/test-refund-gone.ts index b6cefda86..b6cefda86 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-refund-gone.ts +++ b/packages/taler-harness/src/integrationtests/test-refund-gone.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-refund-incremental.ts b/packages/taler-harness/src/integrationtests/test-refund-incremental.ts index 8d1f6e873..8d1f6e873 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-refund-incremental.ts +++ b/packages/taler-harness/src/integrationtests/test-refund-incremental.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-refund.ts b/packages/taler-harness/src/integrationtests/test-refund.ts index b63dad590..b63dad590 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-refund.ts +++ b/packages/taler-harness/src/integrationtests/test-refund.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-revocation.ts b/packages/taler-harness/src/integrationtests/test-revocation.ts index 0fbb4960e..0fbb4960e 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-revocation.ts +++ b/packages/taler-harness/src/integrationtests/test-revocation.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-timetravel-autorefresh.ts b/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts index 54b66e0b2..54b66e0b2 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-timetravel-autorefresh.ts +++ b/packages/taler-harness/src/integrationtests/test-timetravel-autorefresh.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-timetravel-withdraw.ts b/packages/taler-harness/src/integrationtests/test-timetravel-withdraw.ts index 9335af9f5..9335af9f5 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-timetravel-withdraw.ts +++ b/packages/taler-harness/src/integrationtests/test-timetravel-withdraw.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-tipping.ts b/packages/taler-harness/src/integrationtests/test-tipping.ts index d31e0c06b..d31e0c06b 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-tipping.ts +++ b/packages/taler-harness/src/integrationtests/test-tipping.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-basic.ts b/packages/taler-harness/src/integrationtests/test-wallet-backup-basic.ts index fc2f3335d..fc2f3335d 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-basic.ts +++ b/packages/taler-harness/src/integrationtests/test-wallet-backup-basic.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-doublespend.ts b/packages/taler-harness/src/integrationtests/test-wallet-backup-doublespend.ts index 8b52260e9..8b52260e9 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-wallet-backup-doublespend.ts +++ b/packages/taler-harness/src/integrationtests/test-wallet-backup-doublespend.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-wallet-balance.ts b/packages/taler-harness/src/integrationtests/test-wallet-balance.ts index f5226c6c0..f5226c6c0 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-wallet-balance.ts +++ b/packages/taler-harness/src/integrationtests/test-wallet-balance.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-wallet-cryptoworker.ts b/packages/taler-harness/src/integrationtests/test-wallet-cryptoworker.ts index a9f1c4d80..a9f1c4d80 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-wallet-cryptoworker.ts +++ b/packages/taler-harness/src/integrationtests/test-wallet-cryptoworker.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-wallet-dbless.ts b/packages/taler-harness/src/integrationtests/test-wallet-dbless.ts index 269a8b240..269a8b240 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-wallet-dbless.ts +++ b/packages/taler-harness/src/integrationtests/test-wallet-dbless.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-wallettesting.ts b/packages/taler-harness/src/integrationtests/test-wallettesting.ts index 03c446db3..03c446db3 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-wallettesting.ts +++ b/packages/taler-harness/src/integrationtests/test-wallettesting.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-abort-bank.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts index bf2dc0133..bf2dc0133 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-abort-bank.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-abort-bank.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-bank-integrated.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts index dc7298e5d..dc7298e5d 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-bank-integrated.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-fakebank.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-fakebank.ts index ec6e54e6c..ec6e54e6c 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-fakebank.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-fakebank.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-high.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-high.ts index deb0e6dde..deb0e6dde 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-high.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-high.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-manual.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts index b691ae508..b691ae508 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-withdrawal-manual.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts diff --git a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts b/packages/taler-harness/src/integrationtests/testrunner.ts index 4b1c28bde..4b1c28bde 100644 --- a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts +++ b/packages/taler-harness/src/integrationtests/testrunner.ts diff --git a/packages/taler-wallet-cli/src/lint.ts b/packages/taler-harness/src/lint.ts index 49fb9dc86..49fb9dc86 100644 --- a/packages/taler-wallet-cli/src/lint.ts +++ b/packages/taler-harness/src/lint.ts diff --git a/packages/taler-harness/tsconfig.json b/packages/taler-harness/tsconfig.json new file mode 100644 index 000000000..447d3f946 --- /dev/null +++ b/packages/taler-harness/tsconfig.json @@ -0,0 +1,33 @@ +{ + "compileOnSave": true, + "compilerOptions": { + "composite": true, + "target": "ES2018", + "module": "ESNext", + "moduleResolution": "Node16", + "sourceMap": true, + "lib": ["es6"], + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "strict": true, + "strictPropertyInitialization": false, + "outDir": "lib", + "noImplicitAny": true, + "noImplicitThis": true, + "incremental": true, + "esModuleInterop": true, + "importHelpers": true, + "rootDir": "src", + "baseUrl": "./src", + "typeRoots": ["./node_modules/@types"] + }, + "include": ["src/**/*"], + "references": [ + { + "path": "../taler-wallet-core/" + }, + { + "path": "../taler-util/" + } + ] +} diff --git a/packages/taler-wallet-cli/assets/.gitkeep b/packages/taler-wallet-cli/assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 --- a/packages/taler-wallet-cli/assets/.gitkeep +++ /dev/null diff --git a/packages/taler-wallet-cli/build.mjs b/packages/taler-wallet-cli/build.mjs index b6b3f4a16..14b626815 100755 --- a/packages/taler-wallet-cli/build.mjs +++ b/packages/taler-wallet-cli/build.mjs @@ -53,17 +53,15 @@ function git_hash() { export const buildConfig = { entryPoints: ["src/index.ts"], - outfile: "dist/taler-wallet-cli.cjs", + outfile: "dist/taler-wallet-cli.mjs", bundle: true, minify: false, target: [ - 'es6' + 'es2020' ], - format: 'cjs', - platform: 'node', + format: 'esm', + platform: 'neutral', sourcemap: true, - jsxFactory: 'h', - jsxFragment: 'Fragment', define: { '__VERSION__': `"${_package.version}"`, '__GIT_HASH__': `"${GIT_HASH}"`, @@ -76,4 +74,3 @@ esbuild console.log(e) process.exit(1) }); - diff --git a/packages/taler-wallet-cli/package.json b/packages/taler-wallet-cli/package.json index 455c5d0cb..8069cc5dd 100644 --- a/packages/taler-wallet-cli/package.json +++ b/packages/taler-wallet-cli/package.json @@ -35,7 +35,7 @@ "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", - "@types/node": "^18.8.5", + "@types/node": "^18.11.17", "prettier": "^2.5.1", "rimraf": "^3.0.2", "rollup": "^2.79.0", diff --git a/packages/taler-wallet-cli/src/assets.ts b/packages/taler-wallet-cli/src/assets.ts deleted file mode 100644 index 8e9306780..000000000 --- a/packages/taler-wallet-cli/src/assets.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - This file is part of GNU Taler - (C) 2021 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 <http://www.gnu.org/licenses/> - */ - -/** - * Imports. - */ -import path from "path"; -import fs from "fs"; - -const assetFileUrl = import.meta.url; - -/** - * Resolve an asset name into an absolute filename. - * - * The asset file should be placed in the "assets" directory - * at the top level of the package (i.e. next to package.json). - */ -export function resolveAsset(name: string): string { - const n = path.basename(assetFileUrl); - const d = path.dirname(assetFileUrl); - let assetPath: string; - // Currently both asset paths are the same. - // This might change if the file that contains "resolveAsset" - // ever moves. Thus, we're keeping the case distinction. - if (n.endsWith("assets.js")) { - // We're not bundled. Path is relative to the current file. - assetPath = path.resolve(path.join(d, "..", "assets", name)); - } else if (n.endsWith("taler-wallet-cli.js")) { - // We're bundled. Currently, this path is the same - // FIXME: Take into account some ASSETS environment variable? - assetPath = path.resolve(path.join(d, "..", "assets", name)); - } else { - throw Error("Can't resolve asset (unknown)"); - } - if (!fs.existsSync(assetPath)) { - throw Error(`Asset '${name} not found'`); - } - return assetPath; -} diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts index 8fad3bdbf..90dc2fdd1 100644 --- a/packages/taler-wallet-cli/src/index.ts +++ b/packages/taler-wallet-cli/src/index.ts @@ -17,20 +17,13 @@ /** * Imports. */ -import { deepStrictEqual } from "assert"; -import fs from "fs"; -import os from "os"; -import path from "path"; -// Polyfill for encoding which isn't present globally in older nodejs versions import { addPaytoQueryParams, AgeRestriction, - Amounts, classifyTalerUri, clk, codecForList, codecForString, - Configuration, decodeCrock, encodeCrock, getRandomBytes, @@ -39,12 +32,11 @@ import { parsePaytoUri, PreparePayResultType, RecoveryMergeStrategy, - rsaBlind, setDangerousTimetravel, setGlobalLogLevelFromString, TalerUriType, - parseDevExperimentUri, } from "@gnu-taler/taler-util"; +import type { TalerCryptoInterface } from "@gnu-taler/taler-wallet-core"; import { CryptoDispatcher, getDefaultNodeWallet, @@ -60,20 +52,8 @@ import { WalletCoreApiClient, walletCoreDebugFlags, } from "@gnu-taler/taler-wallet-core"; -import type { TalerCryptoInterface } from "@gnu-taler/taler-wallet-core"; -import { TextDecoder, TextEncoder } from "util"; -import { runBench1 } from "./bench1.js"; -import { runBench2 } from "./bench2.js"; -import { runBench3 } from "./bench3.js"; -import { runEnv1 } from "./env1.js"; -import { GlobalTestState, runTestWithState } from "./harness/harness.js"; -import { getTestInfo, runTests } from "./integrationtests/testrunner.js"; -import { lintExchangeDeployment } from "./lint.js"; -import { runEnvFull } from "./env-full.js"; -// @ts-ignore -global.TextEncoder = TextEncoder; -// @ts-ignore -global.TextDecoder = TextDecoder; +import fs from "fs"; +import os from "os"; // This module also serves as the entry point for the crypto // thread worker, and thus must expose these two handlers. @@ -895,75 +875,6 @@ advancedCli }); advancedCli - .subcommand("bench1", "bench1", { - help: "Run the 'bench1' benchmark", - }) - .requiredOption("configJson", ["--config-json"], clk.STRING) - .action(async (args) => { - let config: any; - try { - config = JSON.parse(args.bench1.configJson); - } catch (e) { - console.log("Could not parse config JSON"); - } - await runBench1(config); - }); - -advancedCli - .subcommand("bench2", "bench2", { - help: "Run the 'bench2' benchmark", - }) - .requiredOption("configJson", ["--config-json"], clk.STRING) - .action(async (args) => { - let config: any; - try { - config = JSON.parse(args.bench2.configJson); - } catch (e) { - console.log("Could not parse config JSON"); - } - await runBench2(config); - }); - -advancedCli - .subcommand("bench3", "bench3", { - help: "Run the 'bench3' benchmark", - }) - .requiredOption("configJson", ["--config-json"], clk.STRING) - .action(async (args) => { - let config: any; - try { - config = JSON.parse(args.bench3.configJson); - } catch (e) { - console.log("Could not parse config JSON"); - } - await runBench3(config); - }); - -advancedCli - .subcommand("envFull", "env-full", { - help: "Run a test environment for bench1", - }) - .action(async (args) => { - const testDir = fs.mkdtempSync(path.join(os.tmpdir(), "taler-env-full-")); - const testState = new GlobalTestState({ - testDir, - }); - await runTestWithState(testState, runEnvFull, "env-full", true); - }); - -advancedCli - .subcommand("env1", "env1", { - help: "Run a test environment for bench1", - }) - .action(async (args) => { - const testDir = fs.mkdtempSync(path.join(os.tmpdir(), "taler-env1-")); - const testState = new GlobalTestState({ - testDir, - }); - await runTestWithState(testState, runEnv1, "env1", true); - }); - -advancedCli .subcommand("withdrawFakebank", "withdraw-fakebank", { help: "Withdraw via a fakebank.", }) @@ -992,7 +903,7 @@ advancedCli }) .action((args) => { const enc = fs.readFileSync(0, "utf8"); - fs.writeFileSync(1, decodeCrock(enc.trim())); + console.log(decodeCrock(enc.trim())); }); advancedCli @@ -1207,92 +1118,6 @@ advancedCli }); }); -const deploymentCli = walletCli.subcommand("deploymentArgs", "deployment", { - help: "Subcommands for handling GNU Taler deployments.", -}); - -deploymentCli - .subcommand("lintExchange", "lint-exchange", { - help: "Run checks on the exchange deployment.", - }) - .flag("cont", ["--continue"], { - help: "Continue after errors if possible", - }) - .flag("debug", ["--debug"], { - help: "Output extra debug info", - }) - .action(async (args) => { - await lintExchangeDeployment( - args.lintExchange.debug, - args.lintExchange.cont, - ); - }); - -deploymentCli - .subcommand("coincfg", "gen-coin-config", { - help: "Generate a coin/denomination configuration for the exchange.", - }) - .requiredOption("minAmount", ["--min-amount"], clk.STRING, { - help: "Smallest denomination", - }) - .requiredOption("maxAmount", ["--max-amount"], clk.STRING, { - help: "Largest denomination", - }) - .action(async (args) => { - let out = ""; - - const stamp = Math.floor(new Date().getTime() / 1000); - - const min = Amounts.parseOrThrow(args.coincfg.minAmount); - const max = Amounts.parseOrThrow(args.coincfg.maxAmount); - if (min.currency != max.currency) { - console.error("currency mismatch"); - process.exit(1); - } - const currency = min.currency; - let x = min; - let n = 1; - - out += "# Coin configuration for the exchange.\n"; - out += '# Should be placed in "/etc/taler/conf.d/exchange-coins.conf".\n'; - out += "\n"; - - while (Amounts.cmp(x, max) < 0) { - out += `[COIN-${currency}-n${n}-t${stamp}]\n`; - out += `VALUE = ${Amounts.stringify(x)}\n`; - out += `DURATION_WITHDRAW = 7 days\n`; - out += `DURATION_SPEND = 2 years\n`; - out += `DURATION_LEGAL = 6 years\n`; - out += `FEE_WITHDRAW = ${currency}:0\n`; - out += `FEE_DEPOSIT = ${Amounts.stringify(min)}\n`; - out += `FEE_REFRESH = ${currency}:0\n`; - out += `FEE_REFUND = ${currency}:0\n`; - out += `RSA_KEYSIZE = 2048\n`; - out += "\n"; - x = Amounts.add(x, x).amount; - n++; - } - - console.log(out); - }); - -const deploymentConfigCli = deploymentCli.subcommand("configArgs", "config", { - help: "Subcommands the Taler configuration.", -}); - -deploymentConfigCli - .subcommand("show", "show") - .flag("diagnostics", ["-d", "--diagnostics"]) - .maybeArgument("cfgfile", clk.STRING, {}) - .action(async (args) => { - const cfg = Configuration.load(args.show.cfgfile); - console.log( - cfg.stringify({ - diagnostics: args.show.diagnostics, - }), - ); - }); - const testCli = walletCli.subcommand("testingArgs", "testing", { help: "Subcommands for testing.", }); @@ -1426,102 +1251,12 @@ testCli.subcommand("logtest", "logtest").action(async (args) => { logger.error("This is an error message."); }); -testCli - .subcommand("listIntegrationtests", "list-integrationtests") - .action(async (args) => { - for (const t of getTestInfo()) { - let s = t.name; - if (t.suites.length > 0) { - s += ` (suites: ${t.suites.join(",")})`; - } - if (t.excludeByDefault) { - s += ` [excluded by default]`; - } - console.log(s); - } - }); - -testCli - .subcommand("runIntegrationtests", "run-integrationtests") - .maybeArgument("pattern", clk.STRING, { - help: "Glob pattern to select which tests to run", - }) - .maybeOption("suites", ["--suites"], clk.STRING, { - help: "Only run selected suites (comma-separated list)", - }) - .flag("dryRun", ["--dry"], { - help: "Only print tests that will be selected to run.", - }) - .flag("quiet", ["--quiet"], { - help: "Produce less output.", - }) - .action(async (args) => { - await runTests({ - includePattern: args.runIntegrationtests.pattern, - suiteSpec: args.runIntegrationtests.suites, - dryRun: args.runIntegrationtests.dryRun, - verbosity: args.runIntegrationtests.quiet ? 0 : 1, - }); - }); - async function read(stream: NodeJS.ReadStream) { const chunks = []; for await (const chunk of stream) chunks.push(chunk); return Buffer.concat(chunks).toString("utf8"); } -testCli.subcommand("tvgcheck", "tvgcheck").action(async (args) => { - const data = await read(process.stdin); - - const lines = data.match(/[^\r\n]+/g); - - if (!lines) { - throw Error("can't split lines"); - } - - const vals: Record<string, string> = {}; - - let inBlindSigningSection = false; - - for (const line of lines) { - if (line === "blind signing:") { - inBlindSigningSection = true; - continue; - } - if (line[0] !== " ") { - inBlindSigningSection = false; - continue; - } - if (inBlindSigningSection) { - const m = line.match(/ (\w+) (\w+)/); - if (!m) { - console.log("bad format"); - process.exit(2); - } - vals[m[1]] = m[2]; - } - } - - console.log(vals); - - const req = (k: string) => { - if (!vals[k]) { - throw Error(`no value for ${k}`); - } - return decodeCrock(vals[k]); - }; - - const myBm = rsaBlind( - req("message_hash"), - req("blinding_key_secret"), - req("rsa_public_key"), - ); - - deepStrictEqual(req("blinded_message"), myBm); - - console.log("check passed!"); -}); - testCli .subcommand("cryptoworker", "cryptoworker") .maybeOption("impl", ["--impl"], clk.STRING) diff --git a/packages/taler-wallet-embedded/package.json b/packages/taler-wallet-embedded/package.json index d8cd5db29..01a2378fd 100644 --- a/packages/taler-wallet-embedded/package.json +++ b/packages/taler-wallet-embedded/package.json @@ -17,7 +17,8 @@ "compile": "tsc && rollup -c", "pretty": "prettier --write src", "coverage": "tsc && nyc ava", - "clean": "rimraf lib dist tsconfig.tsbuildinfo" + "clean": "rimraf lib dist tsconfig.tsbuildinfo", + "deps": "pnpm install --frozen-lockfile --filter @gnu-taler/taler-wallet-embedded..." }, "files": [ "AUTHORS", @@ -32,7 +33,7 @@ "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", - "@types/node": "^18.8.5", + "@types/node": "^18.11.17", "prettier": "^2.5.1", "rimraf": "^3.0.2", "rollup": "^2.79.0", @@ -44,7 +45,6 @@ "@gnu-taler/idb-bridge": "workspace:*", "@gnu-taler/taler-util": "workspace:*", "@gnu-taler/taler-wallet-core": "workspace:*", - "@gnu-taler/taler-wallet-embedded": "link:", "tslib": "^2.4.0" } } diff --git a/packages/taler-wallet-webextension/package.json b/packages/taler-wallet-webextension/package.json index 5c6983bfc..8a6c19406 100644 --- a/packages/taler-wallet-webextension/package.json +++ b/packages/taler-wallet-webextension/package.json @@ -43,13 +43,13 @@ } }, "devDependencies": { - "@gnu-taler/web-util": "workspace:*", "@babel/core": "7.18.9", "@babel/plugin-transform-modules-commonjs": "7.18.6", "@babel/plugin-transform-react-jsx-source": "7.18.6", "@babel/preset-typescript": "7.18.6", "@babel/runtime": "7.18.9", "@gnu-taler/pogen": "workspace:*", + "@gnu-taler/web-util": "workspace:*", "@linaria/babel-preset": "3.0.0-beta.22", "@linaria/core": "3.0.0-beta.22", "@linaria/react": "3.0.0-beta.22", @@ -58,7 +58,7 @@ "@types/chrome": "0.0.197", "@types/history": "^4.7.8", "@types/mocha": "^9.0.0", - "@types/node": "^18.8.5", + "@types/node": "^18.11.17", "babel-loader": "^8.2.3", "babel-plugin-transform-react-jsx": "^6.24.1", "chai": "^4.3.6", diff --git a/packages/web-util/package.json b/packages/web-util/package.json index ad87304fe..e6f8195c0 100644 --- a/packages/web-util/package.json +++ b/packages/web-util/package.json @@ -26,7 +26,7 @@ "devDependencies": { "@gnu-taler/taler-util": "workspace:*", "@types/express": "^4.17.14", - "@types/node": "^18.11.9", + "@types/node": "^18.11.17", "@types/web": "^0.0.82", "@types/ws": "^8.5.3", "axios": "^1.2.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9460653d4..3b3814147 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -99,7 +99,7 @@ importers: '@types/chai': ^4.3.0 '@types/history': ^4.7.8 '@types/mocha': ^10.0.1 - '@types/node': ^18.11.14 + '@types/node': ^18.11.17 '@typescript-eslint/eslint-plugin': ^5.41.0 '@typescript-eslint/parser': ^5.41.0 async_hooks: ^1.0.0 @@ -137,7 +137,7 @@ importers: '@types/chai': 4.3.3 '@types/history': 4.7.11 '@types/mocha': 10.0.1 - '@types/node': 18.11.14 + '@types/node': 18.11.17 '@typescript-eslint/eslint-plugin': 5.41.0_2dmizcyfdgb4npqs6z4fehioli '@typescript-eslint/parser': 5.41.0_typescript@4.8.4 async_hooks: 1.0.0 @@ -155,7 +155,7 @@ importers: packages/idb-bridge: specifiers: - '@types/node': ^18.8.5 + '@types/node': ^18.11.17 ava: ^4.3.3 esm: ^3.2.25 prettier: ^2.5.1 @@ -165,7 +165,7 @@ importers: dependencies: tslib: 2.4.0 devDependencies: - '@types/node': 18.11.5 + '@types/node': 18.11.17 ava: 4.3.3 esm: 3.2.25 prettier: 2.7.1 @@ -348,7 +348,7 @@ importers: '@types/history': ^4.7.8 '@types/jest': ^26.0.23 '@types/mocha': ^8.2.3 - '@types/node': ^18.8.5 + '@types/node': ^18.11.17 '@typescript-eslint/eslint-plugin': ^4.22.0 '@typescript-eslint/parser': ^4.22.0 axios: ^0.21.1 @@ -404,7 +404,7 @@ importers: '@types/history': 4.7.11 '@types/jest': 26.0.24 '@types/mocha': 8.2.3 - '@types/node': 18.11.5 + '@types/node': 18.11.17 '@typescript-eslint/eslint-plugin': 4.33.0_k4l66av2tbo6kxzw52jzgbfzii '@typescript-eslint/parser': 4.33.0_3rubbgt5ekhqrcgx4uwls3neim base64-inline-loader: 1.1.1 @@ -434,20 +434,41 @@ importers: packages/pogen: specifiers: - '@types/node': ^18.8.5 + '@types/node': ^18.11.17 glob: ^7.2.0 po2json: ^0.4.5 typescript: ^4.8.4 dependencies: - '@types/node': 18.11.5 + '@types/node': 18.11.17 glob: 7.2.3 devDependencies: po2json: 0.4.5 typescript: 4.8.4 + packages/taler-harness: + specifiers: + '@gnu-taler/taler-util': workspace:* + '@gnu-taler/taler-wallet-core': workspace:* + '@types/node': ^18.11.17 + axios: ^0.27.2 + prettier: ^2.5.1 + rimraf: ^3.0.2 + tslib: ^2.4.0 + typescript: ^4.8.4 + dependencies: + '@gnu-taler/taler-util': link:../taler-util + '@gnu-taler/taler-wallet-core': link:../taler-wallet-core + axios: 0.27.2 + tslib: 2.4.1 + devDependencies: + '@types/node': 18.11.17 + prettier: 2.7.1 + rimraf: 3.0.2 + typescript: 4.8.4 + packages/taler-util: specifiers: - '@types/node': ^18.8.5 + '@types/node': ^18.11.17 ava: ^4.3.3 big-integer: ^1.6.51 esbuild: ^0.14.21 @@ -463,7 +484,7 @@ importers: jed: 1.1.1 tslib: 2.4.0 devDependencies: - '@types/node': 18.11.5 + '@types/node': 18.11.17 ava: 4.3.3 esbuild: 0.14.54 prettier: 2.7.1 @@ -478,7 +499,7 @@ importers: '@rollup/plugin-json': ^4.1.0 '@rollup/plugin-node-resolve': ^13.3.0 '@rollup/plugin-replace': ^4.0.0 - '@types/node': ^18.8.5 + '@types/node': ^18.11.17 axios: ^0.27.2 prettier: ^2.5.1 rimraf: ^3.0.2 @@ -498,11 +519,11 @@ importers: '@rollup/plugin-json': 4.1.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 '@rollup/plugin-replace': 4.0.0_rollup@2.79.1 - '@types/node': 18.11.5 + '@types/node': 18.11.17 prettier: 2.7.1 rimraf: 3.0.2 rollup: 2.79.1 - rollup-plugin-sourcemaps: 0.6.3_cxvqwjbwwnthagk6mnrmqfhepa + rollup-plugin-sourcemaps: 0.6.3_bipou45jdaxtftg6fcql4vnhdm rollup-plugin-terser: 7.0.2_rollup@2.79.1 typedoc: 0.23.18_typescript@4.8.4 typescript: 4.8.4 @@ -513,7 +534,7 @@ importers: '@gnu-taler/idb-bridge': workspace:* '@gnu-taler/pogen': workspace:* '@gnu-taler/taler-util': workspace:* - '@types/node': ^18.8.5 + '@types/node': ^18.11.17 '@typescript-eslint/eslint-plugin': ^5.36.1 '@typescript-eslint/parser': ^5.36.1 ava: ^4.3.3 @@ -537,7 +558,7 @@ importers: dependencies: '@gnu-taler/idb-bridge': link:../idb-bridge '@gnu-taler/taler-util': link:../taler-util - '@types/node': 18.11.5 + '@types/node': 18.11.17 axios: 0.27.2 big-integer: 1.6.51 fflate: 0.7.4 @@ -571,7 +592,7 @@ importers: '@rollup/plugin-json': ^4.1.0 '@rollup/plugin-node-resolve': ^13.3.0 '@rollup/plugin-replace': ^4.0.0 - '@types/node': ^18.8.5 + '@types/node': ^18.11.17 prettier: ^2.5.1 rimraf: ^3.0.2 rollup: ^2.79.0 @@ -589,11 +610,11 @@ importers: '@rollup/plugin-json': 4.1.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 '@rollup/plugin-replace': 4.0.0_rollup@2.79.1 - '@types/node': 18.11.5 + '@types/node': 18.11.17 prettier: 2.7.1 rimraf: 3.0.2 rollup: 2.79.1 - rollup-plugin-sourcemaps: 0.6.3_cxvqwjbwwnthagk6mnrmqfhepa + rollup-plugin-sourcemaps: 0.6.3_bipou45jdaxtftg6fcql4vnhdm rollup-plugin-terser: 7.0.2_rollup@2.79.1 typescript: 4.8.4 @@ -616,7 +637,7 @@ importers: '@types/chrome': 0.0.197 '@types/history': ^4.7.8 '@types/mocha': ^9.0.0 - '@types/node': ^18.8.5 + '@types/node': ^18.11.17 babel-loader: ^8.2.3 babel-plugin-transform-react-jsx: ^6.24.1 chai: ^4.3.6 @@ -661,7 +682,7 @@ importers: '@types/chrome': 0.0.197 '@types/history': 4.7.11 '@types/mocha': 9.1.1 - '@types/node': 18.11.5 + '@types/node': 18.11.17 babel-loader: 8.2.5_@babel+core@7.18.9 babel-plugin-transform-react-jsx: 6.24.1 chai: 4.3.6 @@ -678,7 +699,7 @@ importers: specifiers: '@gnu-taler/taler-util': workspace:* '@types/express': ^4.17.14 - '@types/node': ^18.11.9 + '@types/node': ^18.11.17 '@types/web': ^0.0.82 '@types/ws': ^8.5.3 axios: ^1.2.1 @@ -696,7 +717,7 @@ importers: devDependencies: '@gnu-taler/taler-util': link:../taler-util '@types/express': 4.17.14 - '@types/node': 18.11.9 + '@types/node': 18.11.17 '@types/web': 0.0.82 '@types/ws': 8.5.3 axios: 1.2.1 @@ -3463,7 +3484,7 @@ packages: engines: {node: '>= 10.14.2'} dependencies: '@jest/types': 26.6.2 - '@types/node': 18.11.9 + '@types/node': 18.11.17 chalk: 4.1.2 jest-message-util: 26.6.2 jest-util: 26.6.2 @@ -3475,7 +3496,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 18.11.9 + '@types/node': 18.11.17 chalk: 4.1.2 jest-message-util: 27.5.1 jest-util: 27.5.1 @@ -3491,7 +3512,7 @@ packages: '@jest/test-result': 26.6.2 '@jest/transform': 26.6.2 '@jest/types': 26.6.2 - '@types/node': 18.11.9 + '@types/node': 18.11.17 ansi-escapes: 4.3.2 chalk: 4.1.2 exit: 0.1.2 @@ -3528,7 +3549,7 @@ packages: dependencies: '@jest/fake-timers': 26.6.2 '@jest/types': 26.6.2 - '@types/node': 18.11.9 + '@types/node': 18.11.17 jest-mock: 26.6.2 dev: true @@ -3538,7 +3559,7 @@ packages: dependencies: '@jest/types': 26.6.2 '@sinonjs/fake-timers': 6.0.1 - '@types/node': 18.11.9 + '@types/node': 18.11.17 jest-message-util: 26.6.2 jest-mock: 26.6.2 jest-util: 26.6.2 @@ -3685,7 +3706,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.11.9 + '@types/node': 18.11.17 '@types/yargs': 15.0.14 chalk: 4.1.2 dev: true @@ -3696,7 +3717,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.11.9 + '@types/node': 18.11.17 '@types/yargs': 16.0.4 chalk: 4.1.2 dev: true @@ -5872,13 +5893,13 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 18.11.9 + '@types/node': 18.11.17 dev: true /@types/bonjour/3.5.10: resolution: {integrity: sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.17 dev: true /@types/chai/4.3.3: @@ -5887,7 +5908,7 @@ packages: /@types/cheerio/0.22.31: resolution: {integrity: sha512-Kt7Cdjjdi2XWSfrZ53v4Of0wG3ZcmaegFXjMmz9tfNrZSkzzo36G0AL1YqSdcIA78Etjt6E609pt5h1xnQkPUw==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.14 dev: true /@types/chrome/0.0.197: @@ -5901,13 +5922,13 @@ packages: resolution: {integrity: sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw==} dependencies: '@types/express-serve-static-core': 4.17.31 - '@types/node': 18.11.9 + '@types/node': 18.11.17 dev: true /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.17 dev: true /@types/enzyme/3.10.12: @@ -5946,7 +5967,7 @@ packages: /@types/express-serve-static-core/4.17.31: resolution: {integrity: sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.17 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 dev: true @@ -5974,20 +5995,20 @@ packages: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.11.9 + '@types/node': 18.11.17 dev: true /@types/glob/8.0.0: resolution: {integrity: sha512-l6NQsDDyQUVeoTynNpC9uRvCUint/gSUXQA2euwmTuWGvPY5LSDUu6tkCtJB2SvGQlJQzLaKqcGZP4//7EDveA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.11.9 + '@types/node': 18.11.17 dev: true /@types/graceful-fs/4.1.5: resolution: {integrity: sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.17 dev: true /@types/har-format/1.2.9: @@ -6011,7 +6032,7 @@ packages: /@types/http-proxy/1.17.9: resolution: {integrity: sha512-QsbSjA/fSk7xB+UXlCT3wHBy5ai9wOcNDWwZAtud+jXhwOM3l+EYZh8Lng4+/6n8uar0J7xILzqftJdJ/Wdfkw==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.17 dev: true /@types/is-function/1.0.1: @@ -6052,7 +6073,7 @@ packages: /@types/keyv/3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.17 dev: true /@types/lodash/4.14.186: @@ -6091,7 +6112,7 @@ packages: /@types/node-fetch/2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.17 form-data: 3.0.1 dev: true @@ -6103,12 +6124,8 @@ packages: resolution: {integrity: sha512-0KXV57tENYmmJMl+FekeW9V3O/rlcqGQQJ/hNh9r8pKIj304pskWuEd8fCyNT86g/TpO0gcOTiLzsHLEURFMIQ==} dev: true - /@types/node/18.11.5: - resolution: {integrity: sha512-3JRwhbjI+cHLAkUorhf8RnqUbFXajvzX4q6fMn5JwkgtuwfYtRQYI3u4V92vI6NJuTsbBQWWh3RZjFsuevyMGQ==} - - /@types/node/18.11.9: - resolution: {integrity: sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==} - dev: true + /@types/node/18.11.17: + resolution: {integrity: sha512-HJSUJmni4BeDHhfzn6nF0sVmd1SMezP7/4F0Lq+aXzmp2xm9O7WXrUtHW/CHlYVtZUbByEvWidHqRtcJXGF2Ng==} /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -6165,13 +6182,13 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.17 dev: true /@types/responselike/1.0.0: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.17 dev: true /@types/retry/0.12.0: @@ -6196,13 +6213,13 @@ packages: resolution: {integrity: sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==} dependencies: '@types/mime': 3.0.1 - '@types/node': 18.11.9 + '@types/node': 18.11.17 dev: true /@types/sockjs/0.3.33: resolution: {integrity: sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.17 dev: true /@types/source-list-map/0.1.2: @@ -6242,7 +6259,7 @@ packages: /@types/webpack-sources/3.2.0: resolution: {integrity: sha512-Ft7YH3lEVRQ6ls8k4Ff1oB4jN6oy/XmU6tQISKdhfh+1mR+viZFphS6WL0IrtDOzvefmJg5a0s7ZQoRXwqTEFg==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.17 '@types/source-list-map': 0.1.2 source-map: 0.7.4 dev: true @@ -6250,7 +6267,7 @@ packages: /@types/webpack/4.41.33: resolution: {integrity: sha512-PPajH64Ft2vWevkerISMtnZ8rTs4YmRbs+23c402J0INmxDKCrhZNvwZYtzx96gY2wAtXdrK1BS2fiC8MlLr3g==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.17 '@types/tapable': 1.0.8 '@types/uglify-js': 3.17.1 '@types/webpack-sources': 3.2.0 @@ -6261,7 +6278,7 @@ packages: /@types/ws/8.5.3: resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.17 dev: true /@types/yargs-parser/21.0.0: @@ -14374,7 +14391,7 @@ packages: '@jest/environment': 26.6.2 '@jest/fake-timers': 26.6.2 '@jest/types': 26.6.2 - '@types/node': 18.11.9 + '@types/node': 18.11.17 jest-mock: 26.6.2 jest-util: 26.6.2 jsdom: 16.7.0 @@ -14392,7 +14409,7 @@ packages: '@jest/environment': 26.6.2 '@jest/fake-timers': 26.6.2 '@jest/types': 26.6.2 - '@types/node': 18.11.9 + '@types/node': 18.11.17 jest-mock: 26.6.2 jest-util: 26.6.2 dev: true @@ -14408,7 +14425,7 @@ packages: dependencies: '@jest/types': 26.6.2 '@types/graceful-fs': 4.1.5 - '@types/node': 18.11.9 + '@types/node': 18.11.17 anymatch: 3.1.2 fb-watchman: 2.0.2 graceful-fs: 4.2.10 @@ -14431,7 +14448,7 @@ packages: dependencies: '@jest/types': 27.5.1 '@types/graceful-fs': 4.1.5 - '@types/node': 18.11.9 + '@types/node': 18.11.17 anymatch: 3.1.2 fb-watchman: 2.0.2 graceful-fs: 4.2.10 @@ -14454,7 +14471,7 @@ packages: '@jest/source-map': 26.6.2 '@jest/test-result': 26.6.2 '@jest/types': 26.6.2 - '@types/node': 18.11.9 + '@types/node': 18.11.17 chalk: 4.1.2 co: 4.6.0 expect: 26.6.2 @@ -14528,7 +14545,7 @@ packages: engines: {node: '>= 10.14.2'} dependencies: '@jest/types': 26.6.2 - '@types/node': 18.11.9 + '@types/node': 18.11.17 dev: true /jest-pnp-resolver/1.2.2_jest-resolve@26.6.2: @@ -14634,7 +14651,7 @@ packages: '@jest/environment': 26.6.2 '@jest/test-result': 26.6.2 '@jest/types': 26.6.2 - '@types/node': 18.11.9 + '@types/node': 18.11.17 chalk: 4.1.2 emittery: 0.7.2 exit: 0.1.2 @@ -14702,7 +14719,7 @@ packages: resolution: {integrity: sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==} engines: {node: '>= 10.14.2'} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.17 graceful-fs: 4.2.10 dev: true @@ -14710,7 +14727,7 @@ packages: resolution: {integrity: sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.17 graceful-fs: 4.2.10 dev: true @@ -14743,7 +14760,7 @@ packages: engines: {node: '>= 10.14.2'} dependencies: '@jest/types': 26.6.2 - '@types/node': 18.11.9 + '@types/node': 18.11.17 chalk: 4.1.2 graceful-fs: 4.2.10 is-ci: 2.0.0 @@ -14755,7 +14772,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 18.11.9 + '@types/node': 18.11.17 chalk: 4.1.2 ci-info: 3.5.0 graceful-fs: 4.2.10 @@ -14796,7 +14813,7 @@ packages: dependencies: '@jest/test-result': 26.6.2 '@jest/types': 26.6.2 - '@types/node': 18.11.9 + '@types/node': 18.11.17 ansi-escapes: 4.3.2 chalk: 4.1.2 jest-util: 26.6.2 @@ -14809,7 +14826,7 @@ packages: dependencies: '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 18.11.9 + '@types/node': 18.11.17 ansi-escapes: 4.3.2 chalk: 4.1.2 jest-util: 27.5.1 @@ -14820,7 +14837,7 @@ packages: resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.17 merge-stream: 2.0.0 supports-color: 7.2.0 dev: true @@ -14829,7 +14846,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.11.9 + '@types/node': 18.11.17 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true @@ -18887,7 +18904,7 @@ packages: rollup: 2.79.1 dev: true - /rollup-plugin-sourcemaps/0.6.3_cxvqwjbwwnthagk6mnrmqfhepa: + /rollup-plugin-sourcemaps/0.6.3_bipou45jdaxtftg6fcql4vnhdm: resolution: {integrity: sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==} engines: {node: '>=10.0.0'} peerDependencies: @@ -18898,7 +18915,7 @@ packages: optional: true dependencies: '@rollup/pluginutils': 3.1.0_rollup@2.79.1 - '@types/node': 18.11.5 + '@types/node': 18.11.17 rollup: 2.79.1 source-map-resolve: 0.6.0 dev: true @@ -20538,7 +20555,6 @@ packages: /tslib/2.4.1: resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} - dev: true /tsutils/3.21.0_typescript@4.8.4: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} |