From 852eeaa4c5e4975526649f72ff2d1e5c8191c079 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 8 Sep 2023 11:13:34 -0300 Subject: [PATCH 1/7] authors Signed-off-by: Sebastian --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 1d3ba2cc7..4c9a53431 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,2 +1,3 @@ Florian Dold Gabor Toth +Sebastian Marchano From d96d468f629e2ad761e90d23e792b386d48a2d21 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 12 Sep 2023 10:55:43 -0300 Subject: [PATCH 2/7] typedoc for every project Signed-off-by: Sebastian --- package.json | 2 + packages/aml-backoffice-ui/package.json | 1 + packages/anastasis-cli/package.json | 1 + packages/anastasis-core/package.json | 1 + packages/anastasis-webui/package.json | 1 + packages/demobank-ui/package.json | 1 + packages/idb-bridge/package.json | 1 + packages/merchant-backend-ui/package.json | 1 - packages/merchant-backoffice-ui/package.json | 4 +- packages/taler-harness/package.json | 1 + packages/taler-util/package.json | 1 + packages/taler-wallet-cli/package.json | 1 + packages/taler-wallet-core/package.json | 1 + packages/taler-wallet-embedded/package.json | 1 + .../taler-wallet-webextension/package.json | 3 +- pnpm-lock.yaml | 408 ++---------------- 16 files changed, 59 insertions(+), 370 deletions(-) diff --git a/package.json b/package.json index e7b4b52d7..7b37684fa 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "preinstall": "npx only-allow pnpm", "compile": "pnpm run --filter '@gnu-taler/*' compile", "clean": "pnpm run --filter '@gnu-taler/*' clean", + "typedoc": "pnpm run --filter '@gnu-taler/*' typedoc", "pretty": "pnpm run --filter '@gnu-taler/*' pretty", "check": "pnpm run --filter '@gnu-taler/*' --if-present --sequential test" }, @@ -16,6 +17,7 @@ "eslint-config-prettier": "^8.5.0", "nx": "15.0.1", "prettier": "^2.8.8", + "typedoc": "^0.25.1", "typescript": "^5.2.2" } } diff --git a/packages/aml-backoffice-ui/package.json b/packages/aml-backoffice-ui/package.json index a761374df..d577cead1 100644 --- a/packages/aml-backoffice-ui/package.json +++ b/packages/aml-backoffice-ui/package.json @@ -8,6 +8,7 @@ "type": "module", "scripts": { "build": "./build.mjs", + "typedoc": "typedoc --out dist/typedoc ./src/", "check": "tsc", "compile": "tsc && ./build.mjs", "test": "./test.mjs && mocha --require source-map-support/register 'dist/test/**/*.test.js' 'dist/test/**/test.js'", diff --git a/packages/anastasis-cli/package.json b/packages/anastasis-cli/package.json index 55af7cc06..a0bd47b6e 100644 --- a/packages/anastasis-cli/package.json +++ b/packages/anastasis-cli/package.json @@ -19,6 +19,7 @@ "compile": "tsc && ./build-node.mjs", "test": "tsc", "clean": "rimraf lib dist tsconfig.tsbuildinfo", + "typedoc": "typedoc --out dist/typedoc ./src/", "pretty": "prettier --write src" }, "files": [ diff --git a/packages/anastasis-core/package.json b/packages/anastasis-core/package.json index aa182e047..cbfeedb64 100644 --- a/packages/anastasis-core/package.json +++ b/packages/anastasis-core/package.json @@ -10,6 +10,7 @@ "pretty": "prettier --write src", "test": "tsc && ava", "coverage": "tsc && nyc ava", + "typedoc": "typedoc --out dist/typedoc ./src/", "clean": "rimraf dist lib tsconfig.tsbuildinfo" }, "author": "Florian Dold ", diff --git a/packages/anastasis-webui/package.json b/packages/anastasis-webui/package.json index efee9633e..70293a0df 100644 --- a/packages/anastasis-webui/package.json +++ b/packages/anastasis-webui/package.json @@ -9,6 +9,7 @@ "compile": "tsc && ./build.mjs", "dev": "./dev.mjs", "lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'", + "typedoc": "typedoc --out dist/typedoc ./src/", "test": "./test.mjs && mocha --require source-map-support/register --enable-source-maps 'dist/**/*test.js'", "pretty": "prettier --write src" }, diff --git a/packages/demobank-ui/package.json b/packages/demobank-ui/package.json index d33fae709..827545285 100644 --- a/packages/demobank-ui/package.json +++ b/packages/demobank-ui/package.json @@ -10,6 +10,7 @@ "compile": "tsc && ./build.mjs", "test": "./test.mjs && mocha --require source-map-support/register 'dist/test/**/*.test.js' 'dist/test/**/test.js'", "lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'", + "typedoc": "typedoc --out dist/typedoc ./src/", "i18n:extract": "pogen extract", "i18n:merge": "pogen merge", "i18n:emit": "pogen emit", diff --git a/packages/idb-bridge/package.json b/packages/idb-bridge/package.json index ce64314ff..f7317ae07 100644 --- a/packages/idb-bridge/package.json +++ b/packages/idb-bridge/package.json @@ -11,6 +11,7 @@ "private": false, "scripts": { "test": "tsc && ava", + "typedoc": "typedoc --out dist/typedoc ./src/", "compile": "tsc", "clean": "rimraf dist lib tsconfig.tsbuildinfo", "pretty": "prettier --write src" diff --git a/packages/merchant-backend-ui/package.json b/packages/merchant-backend-ui/package.json index 03e64308c..2166fc3c0 100644 --- a/packages/merchant-backend-ui/package.json +++ b/packages/merchant-backend-ui/package.json @@ -9,7 +9,6 @@ "render-examples": "ts-node -O '{\"module\": \"commonjs\"}' -T render-examples.ts dist/pages dist/examples", "lint-check": "eslint '{src,tests}/**/*.{js,jsx,ts,tsx}'", "lint-fix": "eslint --fix '{src,tests}/**/*.{js,jsx,ts,tsx}'", - "typedoc": "typedoc src", "clean": "rimraf dist", "serve-dist": "sirv --port ${PORT:=8080} --cors --single dist" }, diff --git a/packages/merchant-backoffice-ui/package.json b/packages/merchant-backoffice-ui/package.json index 12aeb4b0e..04b256505 100644 --- a/packages/merchant-backoffice-ui/package.json +++ b/packages/merchant-backoffice-ui/package.json @@ -15,7 +15,7 @@ "i18n:merge": "pogen merge", "i18n:emit": "pogen emit", "i18n": "pnpm i18n:extract && pnpm i18n:merge && pnpm i18n:emit", - "typedoc": "typedoc src", + "typedoc": "typedoc --out dist/typedoc ./src/", "pretty": "prettier --write src" }, "eslintConfig": { @@ -81,4 +81,4 @@ "pogen": { "domain": "taler-merchant-backoffice" } -} \ No newline at end of file +} diff --git a/packages/taler-harness/package.json b/packages/taler-harness/package.json index 9f2b0d8e3..4943b0f38 100644 --- a/packages/taler-harness/package.json +++ b/packages/taler-harness/package.json @@ -19,6 +19,7 @@ "compile": "tsc && ./build.mjs", "check": "tsc", "test": "tsc", + "typedoc": "typedoc --out dist/typedoc ./src/", "clean": "rimraf lib dist tsconfig.tsbuildinfo", "pretty": "prettier --write src" }, diff --git a/packages/taler-util/package.json b/packages/taler-util/package.json index 0bb98767d..e329e1411 100644 --- a/packages/taler-util/package.json +++ b/packages/taler-util/package.json @@ -60,6 +60,7 @@ "compile": "tsc", "test": "tsc && ava", "clean": "rimraf dist lib tsconfig.tsbuildinfo", + "typedoc": "typedoc --out dist/typedoc ./src/", "pretty": "prettier --write src" }, "devDependencies": { diff --git a/packages/taler-wallet-cli/package.json b/packages/taler-wallet-cli/package.json index 6196c8971..d3fe48073 100644 --- a/packages/taler-wallet-cli/package.json +++ b/packages/taler-wallet-cli/package.json @@ -18,6 +18,7 @@ "scripts": { "compile": "tsc && ./build-node.mjs", "test": "tsc", + "typedoc": "typedoc --out dist/typedoc ./src/", "clean": "rimraf lib dist tsconfig.tsbuildinfo", "pretty": "prettier --write src" }, diff --git a/packages/taler-wallet-core/package.json b/packages/taler-wallet-core/package.json index fda7b6081..24e97b115 100644 --- a/packages/taler-wallet-core/package.json +++ b/packages/taler-wallet-core/package.json @@ -15,6 +15,7 @@ "compile": "tsc", "pretty": "prettier --write src", "test": "tsc && ava", + "typedoc": "typedoc --out dist/typedoc ./src/", "coverage": "tsc && c8 --src src --all ava", "coverage:html": "tsc && c8 -r html --src src --all ava", "clean": "rimraf dist lib tsconfig.tsbuildinfo" diff --git a/packages/taler-wallet-embedded/package.json b/packages/taler-wallet-embedded/package.json index b96edff25..d72bde664 100644 --- a/packages/taler-wallet-embedded/package.json +++ b/packages/taler-wallet-embedded/package.json @@ -15,6 +15,7 @@ "scripts": { "compile": "./build.mjs", "pretty": "prettier --write src", + "typedoc": "typedoc --out dist/typedoc ./src/wallet-qjs.ts", "clean": "rimraf lib dist tsconfig.tsbuildinfo", "deps": "pnpm install --frozen-lockfile --filter @gnu-taler/taler-wallet-embedded..." }, diff --git a/packages/taler-wallet-webextension/package.json b/packages/taler-wallet-webextension/package.json index f442b1509..1e393adc7 100644 --- a/packages/taler-wallet-webextension/package.json +++ b/packages/taler-wallet-webextension/package.json @@ -13,6 +13,7 @@ "test": "./test.mjs && mocha --require source-map-support/register 'dist/test/**/*.test.js' 'dist/test/**/test.js'", "test:coverage": "nyc pnpm test", "compile": "./patch-linaria.sh && tsc && ./build.mjs", + "typedoc": "typedoc --out dist/typedoc ./src/ --entryPointStrategy expand", "dev": "./dev.mjs", "pretty": "prettier --write src", "i18n:extract": "pogen extract", @@ -75,4 +76,4 @@ "pogen": { "domain": "taler-wallet-webex" } -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 347dbf0a5..c442ce7ee 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,6 +32,9 @@ importers: prettier: specifier: ^2.8.8 version: 2.8.8 + typedoc: + specifier: ^0.25.1 + version: 0.25.1(typescript@5.2.2) typescript: specifier: ^5.2.2 version: 5.2.2 @@ -806,10 +809,10 @@ importers: devDependencies: '@babel/preset-react': specifier: ^7.22.3 - version: 7.22.3(@babel/core@7.22.15) + version: 7.22.3(@babel/core@7.18.9) '@babel/preset-typescript': specifier: 7.18.6 - version: 7.18.6(@babel/core@7.22.15) + version: 7.18.6(@babel/core@7.18.9) '@gnu-taler/pogen': specifier: workspace:* version: link:../pogen @@ -983,14 +986,6 @@ packages: '@jridgewell/gen-mapping': 0.1.1 '@jridgewell/trace-mapping': 0.3.17 - /@ampproject/remapping@2.2.1: - resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} - engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.19 - dev: true - /@apideck/better-ajv-errors@0.3.6(ajv@8.11.0): resolution: {integrity: sha512-P+ZygBLZtkp0qqOAJJVX4oX/sFo5JR3eBWwwuqHHhK0GIgQOKWrAfiAaWX0aArHkRWHMuggFEgAZNxVPwPZYaA==} engines: {node: '>=10'} @@ -1030,14 +1025,6 @@ packages: dependencies: '@babel/highlight': 7.18.6 - /@babel/code-frame@7.22.13: - resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.22.13 - chalk: 2.4.2 - dev: true - /@babel/compat-data@7.19.4: resolution: {integrity: sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw==} engines: {node: '>=6.9.0'} @@ -1052,11 +1039,6 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/compat-data@7.22.9: - resolution: {integrity: sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==} - engines: {node: '>=6.9.0'} - dev: true - /@babel/core@7.13.16: resolution: {integrity: sha512-sXHpixBiWWFti0AV2Zq7avpTasr6sIAu7Y396c608541qAU2ui4a193m0KSQmfPSKFZLnQ3cvlKDOm3XkuXm3Q==} engines: {node: '>=6.9.0'} @@ -1125,29 +1107,6 @@ packages: - supports-color dev: true - /@babel/core@7.22.15: - resolution: {integrity: sha512-PtZqMmgRrvj8ruoEOIwVA3yoF91O+Hgw9o7DAUTNBA6Mo2jpu31clx9a7Nz/9JznqetTR6zwfC4L3LAjKQXUwA==} - engines: {node: '>=6.9.0'} - dependencies: - '@ampproject/remapping': 2.2.1 - '@babel/code-frame': 7.22.13 - '@babel/generator': 7.22.15 - '@babel/helper-compilation-targets': 7.22.15 - '@babel/helper-module-transforms': 7.22.15(@babel/core@7.22.15) - '@babel/helpers': 7.22.15 - '@babel/parser': 7.22.15 - '@babel/template': 7.22.15 - '@babel/traverse': 7.22.15 - '@babel/types': 7.22.15 - convert-source-map: 1.9.0 - debug: 4.3.4 - gensync: 1.0.0-beta.2 - json5: 2.2.3 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - dev: true - /@babel/eslint-parser@7.19.1(@babel/core@7.18.9)(eslint@7.32.0): resolution: {integrity: sha512-AqNf2QWt1rtu2/1rLswy6CDP7H9Oh3mMhk177Y67Rg8d7RD9WfOLLv8CGn6tisFvS2htm86yIe1yLF6I1UDaGQ==} engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} @@ -1194,16 +1153,6 @@ packages: '@jridgewell/trace-mapping': 0.3.17 jsesc: 2.5.2 - /@babel/generator@7.22.15: - resolution: {integrity: sha512-Zu9oWARBqeVOW0dZOjXc3JObrzuqothQ3y/n1kUtrjCoCPLkXUwMvOo/F/TCfoHMbWIFlWwpZtkZVb9ga4U2pA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.22.15 - '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.19 - jsesc: 2.5.2 - dev: true - /@babel/generator@7.22.3: resolution: {integrity: sha512-C17MW4wlk//ES/CJDL51kPNwl+qiBQyN7b9SKyVp11BLGFeSPoVaHrv+MNt8jwQFhQWowW88z1eeBx3pFz9v8A==} engines: {node: '>=6.9.0'} @@ -1348,17 +1297,6 @@ packages: semver: 6.3.0 dev: true - /@babel/helper-compilation-targets@7.22.15: - resolution: {integrity: sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/compat-data': 7.22.9 - '@babel/helper-validator-option': 7.22.15 - browserslist: 4.21.10 - lru-cache: 5.1.1 - semver: 6.3.1 - dev: true - /@babel/helper-create-class-features-plugin@7.20.12(@babel/core@7.18.9): resolution: {integrity: sha512-9OunRkbT0JQcednL0UFvbfXpAsUXiGjUk0a7sN8fUXX7Mue79cUSMjHGDRRi/Vz9vYlpIhLV5fMD5dKoMhhsNQ==} engines: {node: '>=6.9.0'} @@ -1397,25 +1335,6 @@ packages: - supports-color dev: true - /@babel/helper-create-class-features-plugin@7.20.12(@babel/core@7.22.15): - resolution: {integrity: sha512-9OunRkbT0JQcednL0UFvbfXpAsUXiGjUk0a7sN8fUXX7Mue79cUSMjHGDRRi/Vz9vYlpIhLV5fMD5dKoMhhsNQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.22.15 - '@babel/helper-annotate-as-pure': 7.18.6 - '@babel/helper-environment-visitor': 7.18.9 - '@babel/helper-function-name': 7.19.0 - '@babel/helper-member-expression-to-functions': 7.20.7 - '@babel/helper-optimise-call-expression': 7.18.6 - '@babel/helper-replace-supers': 7.20.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.20.0 - '@babel/helper-split-export-declaration': 7.18.6 - transitivePeerDependencies: - - supports-color - dev: true - /@babel/helper-create-class-features-plugin@7.22.1(@babel/core@7.18.9): resolution: {integrity: sha512-SowrZ9BWzYFgzUMwUmowbPSGu6CXL5MSuuCkG3bejahSpSymioPmuLdhPxNOc9MjuNGjy7M/HaXvJ8G82Lywlw==} engines: {node: '>=6.9.0'} @@ -1547,11 +1466,6 @@ packages: resolution: {integrity: sha512-Z2tgopurB/kTbidvzeBrc2To3PUP/9i5MUe+fU6QJCQDyPwSH2oRapkLw3KGECDYSjhQZCNxEvNvZlLw8JjGwA==} engines: {node: '>=6.9.0'} - /@babel/helper-environment-visitor@7.22.5: - resolution: {integrity: sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==} - engines: {node: '>=6.9.0'} - dev: true - /@babel/helper-explode-assignable-expression@7.18.6: resolution: {integrity: sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==} engines: {node: '>=6.9.0'} @@ -1574,27 +1488,12 @@ packages: '@babel/template': 7.21.9 '@babel/types': 7.22.4 - /@babel/helper-function-name@7.22.5: - resolution: {integrity: sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.22.15 - '@babel/types': 7.22.15 - dev: true - /@babel/helper-hoist-variables@7.18.6: resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.4 - /@babel/helper-hoist-variables@7.22.5: - resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.22.15 - dev: true - /@babel/helper-member-expression-to-functions@7.18.9: resolution: {integrity: sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==} engines: {node: '>=6.9.0'} @@ -1629,13 +1528,6 @@ packages: dependencies: '@babel/types': 7.22.4 - /@babel/helper-module-imports@7.22.15: - resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.22.15 - dev: true - /@babel/helper-module-transforms@7.19.6: resolution: {integrity: sha512-fCmcfQo/KYr/VXXDIyd3CBGZ6AFhPFy1TfSEJ+PilGVlQT6jcbqtHAM4C1EciRqMza7/TpOUZliuSH+U6HAhJw==} engines: {node: '>=6.9.0'} @@ -1683,20 +1575,6 @@ packages: - supports-color dev: true - /@babel/helper-module-transforms@7.22.15(@babel/core@7.22.15): - resolution: {integrity: sha512-l1UiX4UyHSFsYt17iQ3Se5pQQZZHa22zyIXURmvkmLCD4t/aU+dvNWHatKac/D9Vm9UES7nvIqHs4jZqKviUmQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.22.15 - '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-module-imports': 7.22.15 - '@babel/helper-simple-access': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.15 - dev: true - /@babel/helper-optimise-call-expression@7.18.6: resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==} engines: {node: '>=6.9.0'} @@ -1798,13 +1676,6 @@ packages: dependencies: '@babel/types': 7.22.4 - /@babel/helper-simple-access@7.22.5: - resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.22.15 - dev: true - /@babel/helper-skip-transparent-expression-wrappers@7.18.9: resolution: {integrity: sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw==} engines: {node: '>=6.9.0'} @@ -1825,13 +1696,6 @@ packages: dependencies: '@babel/types': 7.22.4 - /@babel/helper-split-export-declaration@7.22.6: - resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.22.15 - dev: true - /@babel/helper-string-parser@7.19.4: resolution: {integrity: sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==} engines: {node: '>=6.9.0'} @@ -1841,20 +1705,10 @@ packages: resolution: {integrity: sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==} engines: {node: '>=6.9.0'} - /@babel/helper-string-parser@7.22.5: - resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} - engines: {node: '>=6.9.0'} - dev: true - /@babel/helper-validator-identifier@7.19.1: resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} engines: {node: '>=6.9.0'} - /@babel/helper-validator-identifier@7.22.15: - resolution: {integrity: sha512-4E/F9IIEi8WR94324mbDUMo074YTheJmd7eZF5vITTeYchqAi6sYXRLHUVsmkdmY4QjfKTcB2jB7dVP3NaBElQ==} - engines: {node: '>=6.9.0'} - dev: true - /@babel/helper-validator-option@7.18.6: resolution: {integrity: sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==} engines: {node: '>=6.9.0'} @@ -1864,11 +1718,6 @@ packages: resolution: {integrity: sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==} engines: {node: '>=6.9.0'} - /@babel/helper-validator-option@7.22.15: - resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} - engines: {node: '>=6.9.0'} - dev: true - /@babel/helper-wrap-function@7.19.0: resolution: {integrity: sha512-txX8aN8CZyYGTwcLhlk87KRqncAzhh5TpQamZUa0/u3an36NtDpUP6bQgBCBcLeBs09R/OwQu3OjK0k/HwfNDg==} engines: {node: '>=6.9.0'} @@ -1902,17 +1751,6 @@ packages: transitivePeerDependencies: - supports-color - /@babel/helpers@7.22.15: - resolution: {integrity: sha512-7pAjK0aSdxOwR+CcYAqgWOGy5dcfvzsTIfFTb2odQqW47MDfv14UaJDY6eng8ylM2EaeKXdxaSWESbkmaQHTmw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.22.15 - '@babel/traverse': 7.22.15 - '@babel/types': 7.22.15 - transitivePeerDependencies: - - supports-color - dev: true - /@babel/helpers@7.22.3: resolution: {integrity: sha512-jBJ7jWblbgr7r6wYZHMdIqKc73ycaTcCaWRq4/2LpuPHcx7xMlZvpGQkOYc9HeSjn6rcx15CPlgVcBtZ4WZJ2w==} engines: {node: '>=6.9.0'} @@ -1932,15 +1770,6 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 - /@babel/highlight@7.22.13: - resolution: {integrity: sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.22.15 - chalk: 2.4.2 - js-tokens: 4.0.0 - dev: true - /@babel/parser@7.19.6: resolution: {integrity: sha512-h1IUp81s2JYJ3mRkdxJgs4UvmSsRvDrx5ICSJbPvtWYv5i1nTBGcBpnog+89rAFMwvvru6E5NUHdBe01UeSzYA==} engines: {node: '>=6.0.0'} @@ -1954,14 +1783,6 @@ packages: dependencies: '@babel/types': 7.21.5 - /@babel/parser@7.22.15: - resolution: {integrity: sha512-RWmQ/sklUN9BvGGpCDgSubhHWfAx24XDTDObup4ffvxaYsptOg2P3KG0j+1eWKLxpkX0j0uHxmpq2Z1SP/VhxA==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@babel/types': 7.22.15 - dev: true - /@babel/parser@7.22.4: resolution: {integrity: sha512-VLLsx06XkEYqBtE5YGPwfSGwfrjnyPP5oiGty3S8pQLFDFLaS8VwWSIxkTXpcvr5zeYLE6+MBNl2npl/YnfofA==} engines: {node: '>=6.0.0'} @@ -2622,16 +2443,6 @@ packages: '@babel/helper-plugin-utils': 7.21.5 dev: true - /@babel/plugin-syntax-jsx@7.21.4(@babel/core@7.22.15): - resolution: {integrity: sha512-5hewiLct5OKyh6PLKEYaFclcqtIgCb6bmELouxjF6up5q3Sov7rOayW4RwhbaBL0dit8rA80GNfY+UuDp2mBbQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.15 - '@babel/helper-plugin-utils': 7.21.5 - dev: true - /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.18.9): resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: @@ -2780,6 +2591,16 @@ packages: '@babel/helper-plugin-utils': 7.21.5 dev: true + /@babel/plugin-syntax-typescript@7.20.0(@babel/core@7.18.9): + resolution: {integrity: sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.18.9 + '@babel/helper-plugin-utils': 7.21.5 + dev: true + /@babel/plugin-syntax-typescript@7.20.0(@babel/core@7.22.1): resolution: {integrity: sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==} engines: {node: '>=6.9.0'} @@ -2790,16 +2611,6 @@ packages: '@babel/helper-plugin-utils': 7.21.5 dev: true - /@babel/plugin-syntax-typescript@7.20.0(@babel/core@7.22.15): - resolution: {integrity: sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.15 - '@babel/helper-plugin-utils': 7.21.5 - dev: true - /@babel/plugin-syntax-typescript@7.21.4(@babel/core@7.18.9): resolution: {integrity: sha512-xz0D39NvhQn4t4RNsHmDnnsaQizIlUkdtYvLs8La1BlfjQ6JEwxkJGeqJMW2tAXx+q6H+WFuUTXNdYVpEya0YA==} engines: {node: '>=6.9.0'} @@ -3720,16 +3531,6 @@ packages: '@babel/helper-plugin-utils': 7.21.5 dev: true - /@babel/plugin-transform-react-display-name@7.18.6(@babel/core@7.22.15): - resolution: {integrity: sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.15 - '@babel/helper-plugin-utils': 7.21.5 - dev: true - /@babel/plugin-transform-react-jsx-development@7.18.6(@babel/core@7.18.9): resolution: {integrity: sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA==} engines: {node: '>=6.9.0'} @@ -3740,16 +3541,6 @@ packages: '@babel/plugin-transform-react-jsx': 7.22.3(@babel/core@7.18.9) dev: true - /@babel/plugin-transform-react-jsx-development@7.18.6(@babel/core@7.22.15): - resolution: {integrity: sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.15 - '@babel/plugin-transform-react-jsx': 7.22.3(@babel/core@7.22.15) - dev: true - /@babel/plugin-transform-react-jsx@7.19.0(@babel/core@7.22.1): resolution: {integrity: sha512-UVEvX3tXie3Szm3emi1+G63jyw1w5IcMY0FSKM+CRnKRI5Mr1YbCNgsSTwoTwKphQEG9P+QqmuRFneJPZuHNhg==} engines: {node: '>=6.9.0'} @@ -3778,20 +3569,6 @@ packages: '@babel/types': 7.22.4 dev: true - /@babel/plugin-transform-react-jsx@7.22.3(@babel/core@7.22.15): - resolution: {integrity: sha512-JEulRWG2f04a7L8VWaOngWiK6p+JOSpB+DAtwfJgOaej1qdbNxqtK7MwTBHjUA10NeFcszlFNqCdbRcirzh2uQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.15 - '@babel/helper-annotate-as-pure': 7.18.6 - '@babel/helper-module-imports': 7.21.4 - '@babel/helper-plugin-utils': 7.21.5 - '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.22.15) - '@babel/types': 7.22.4 - dev: true - /@babel/plugin-transform-react-pure-annotations@7.18.6(@babel/core@7.18.9): resolution: {integrity: sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ==} engines: {node: '>=6.9.0'} @@ -3803,17 +3580,6 @@ packages: '@babel/helper-plugin-utils': 7.21.5 dev: true - /@babel/plugin-transform-react-pure-annotations@7.18.6(@babel/core@7.22.15): - resolution: {integrity: sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.15 - '@babel/helper-annotate-as-pure': 7.18.6 - '@babel/helper-plugin-utils': 7.21.5 - dev: true - /@babel/plugin-transform-regenerator@7.18.6(@babel/core@7.18.9): resolution: {integrity: sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==} engines: {node: '>=6.9.0'} @@ -4014,6 +3780,20 @@ packages: '@babel/helper-plugin-utils': 7.21.5 dev: true + /@babel/plugin-transform-typescript@7.20.13(@babel/core@7.18.9): + resolution: {integrity: sha512-O7I/THxarGcDZxkgWKMUrk7NK1/WbHAg3Xx86gqS6x9MTrNL6AwIluuZ96ms4xeDe6AVx6rjHbWHP7x26EPQBA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.18.9 + '@babel/helper-create-class-features-plugin': 7.20.12(@babel/core@7.18.9) + '@babel/helper-plugin-utils': 7.21.5 + '@babel/plugin-syntax-typescript': 7.20.0(@babel/core@7.18.9) + transitivePeerDependencies: + - supports-color + dev: true + /@babel/plugin-transform-typescript@7.20.13(@babel/core@7.22.1): resolution: {integrity: sha512-O7I/THxarGcDZxkgWKMUrk7NK1/WbHAg3Xx86gqS6x9MTrNL6AwIluuZ96ms4xeDe6AVx6rjHbWHP7x26EPQBA==} engines: {node: '>=6.9.0'} @@ -4028,20 +3808,6 @@ packages: - supports-color dev: true - /@babel/plugin-transform-typescript@7.20.13(@babel/core@7.22.15): - resolution: {integrity: sha512-O7I/THxarGcDZxkgWKMUrk7NK1/WbHAg3Xx86gqS6x9MTrNL6AwIluuZ96ms4xeDe6AVx6rjHbWHP7x26EPQBA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.15 - '@babel/helper-create-class-features-plugin': 7.20.12(@babel/core@7.22.15) - '@babel/helper-plugin-utils': 7.21.5 - '@babel/plugin-syntax-typescript': 7.20.0(@babel/core@7.22.15) - transitivePeerDependencies: - - supports-color - dev: true - /@babel/plugin-transform-typescript@7.22.3(@babel/core@7.18.9): resolution: {integrity: sha512-pyjnCIniO5PNaEuGxT28h0HbMru3qCVrMqVgVOz/krComdIrY9W6FCLBq9NWHY8HDGaUlan+UhmZElDENIfCcw==} engines: {node: '>=6.9.0'} @@ -4435,19 +4201,18 @@ packages: '@babel/plugin-transform-react-pure-annotations': 7.18.6(@babel/core@7.18.9) dev: true - /@babel/preset-react@7.22.3(@babel/core@7.22.15): - resolution: {integrity: sha512-lxDz1mnZ9polqClBCVBjIVUypoB4qV3/tZUDb/IlYbW1kiiLaXaX+bInbRjl+lNQ/iUZraQ3+S8daEmoELMWug==} + /@babel/preset-typescript@7.18.6(@babel/core@7.18.9): + resolution: {integrity: sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.22.15 - '@babel/helper-plugin-utils': 7.21.5 - '@babel/helper-validator-option': 7.21.0 - '@babel/plugin-transform-react-display-name': 7.18.6(@babel/core@7.22.15) - '@babel/plugin-transform-react-jsx': 7.22.3(@babel/core@7.22.15) - '@babel/plugin-transform-react-jsx-development': 7.18.6(@babel/core@7.22.15) - '@babel/plugin-transform-react-pure-annotations': 7.18.6(@babel/core@7.22.15) + '@babel/core': 7.18.9 + '@babel/helper-plugin-utils': 7.19.0 + '@babel/helper-validator-option': 7.18.6 + '@babel/plugin-transform-typescript': 7.20.13(@babel/core@7.18.9) + transitivePeerDependencies: + - supports-color dev: true /@babel/preset-typescript@7.18.6(@babel/core@7.22.1): @@ -4464,20 +4229,6 @@ packages: - supports-color dev: true - /@babel/preset-typescript@7.18.6(@babel/core@7.22.15): - resolution: {integrity: sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.22.15 - '@babel/helper-plugin-utils': 7.19.0 - '@babel/helper-validator-option': 7.18.6 - '@babel/plugin-transform-typescript': 7.20.13(@babel/core@7.22.15) - transitivePeerDependencies: - - supports-color - dev: true - /@babel/preset-typescript@7.21.5(@babel/core@7.18.9): resolution: {integrity: sha512-iqe3sETat5EOrORXiQ6rWfoOg2y68Cs75B9wNxdPW4kixJxh7aXQE1KPdWLDniC24T/6dSnguF33W9j/ZZQcmA==} engines: {node: '>=6.9.0'} @@ -4544,15 +4295,6 @@ packages: '@babel/parser': 7.22.4 '@babel/types': 7.22.4 - /@babel/template@7.22.15: - resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.22.13 - '@babel/parser': 7.22.15 - '@babel/types': 7.22.15 - dev: true - /@babel/traverse@7.19.6: resolution: {integrity: sha512-6l5HrUCzFM04mfbG09AagtYyR2P0B71B1wN7PfSPiksDPz2k5H9CBC1tcZpz2M8OxbKTPccByoOJ22rUKbpmQQ==} engines: {node: '>=6.9.0'} @@ -4588,24 +4330,6 @@ packages: transitivePeerDependencies: - supports-color - /@babel/traverse@7.22.15: - resolution: {integrity: sha512-DdHPwvJY0sEeN4xJU5uRLmZjgMMDIvMPniLuYzUVXj/GGzysPl0/fwt44JBkyUIzGJPV8QgHMcQdQ34XFuKTYQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.22.13 - '@babel/generator': 7.22.15 - '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-function-name': 7.22.5 - '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.22.15 - '@babel/types': 7.22.15 - debug: 4.3.4 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - dev: true - /@babel/traverse@7.22.4: resolution: {integrity: sha512-Tn1pDsjIcI+JcLKq1AVlZEr4226gpuAQTsLMorsYg9tuS/kG7nuwwJ4AB8jfQuEgb/COBwR/DqJxmoiYFu5/rQ==} engines: {node: '>=6.9.0'} @@ -4640,15 +4364,6 @@ packages: '@babel/helper-validator-identifier': 7.19.1 to-fast-properties: 2.0.0 - /@babel/types@7.22.15: - resolution: {integrity: sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.22.5 - '@babel/helper-validator-identifier': 7.22.15 - to-fast-properties: 2.0.0 - dev: true - /@babel/types@7.22.4: resolution: {integrity: sha512-Tx9x3UBHTTsMSW85WB2kphxYQVvrZ/t1FxD88IpSgIjiUJlCm9z+xWIDwyo1vffTwSqteqyznB8ZE9vYYk16zA==} engines: {node: '>=6.9.0'} @@ -7712,17 +7427,6 @@ packages: pako: 1.0.11 dev: true - /browserslist@4.21.10: - resolution: {integrity: sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - dependencies: - caniuse-lite: 1.0.30001527 - electron-to-chromium: 1.4.508 - node-releases: 2.0.13 - update-browserslist-db: 1.0.11(browserslist@4.21.10) - dev: true - /browserslist@4.21.4: resolution: {integrity: sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -8005,10 +7709,6 @@ packages: /caniuse-lite@1.0.30001482: resolution: {integrity: sha512-F1ZInsg53cegyjroxLNW9DmrEQ1SuGRTO1QlpA0o2/6OpQ0gFeDRoq1yFmnr8Sakn9qwwt9DmbxHB6w167OSuQ==} - /caniuse-lite@1.0.30001527: - resolution: {integrity: sha512-YkJi7RwPgWtXVSgK4lG9AHH57nSzvvOp9MesgXmw4Q7n0C3H04L0foHqfxcmSAm5AcWb8dW9AYj2tR7/5GnddQ==} - dev: true - /caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} dev: true @@ -8484,7 +8184,7 @@ packages: engines: {node: '>=8'} dependencies: dot-prop: 5.3.0 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 make-dir: 3.1.0 unique-string: 2.0.0 write-file-atomic: 3.0.3 @@ -9455,10 +9155,6 @@ packages: /electron-to-chromium@1.4.284: resolution: {integrity: sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==} - /electron-to-chromium@1.4.508: - resolution: {integrity: sha512-FFa8QKjQK/A5QuFr2167myhMesGrhlOBD+3cYNxO9/S4XzHEXesyTD/1/xF644gC8buFPz3ca6G1LOQD0tZrrg==} - dev: true - /elliptic@6.5.4: resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} dependencies: @@ -9528,7 +9224,7 @@ packages: resolution: {integrity: sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==} engines: {node: '>=10.13.0'} dependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 tapable: 2.2.1 dev: true @@ -10970,7 +10666,7 @@ packages: engines: {node: '>=10'} dependencies: at-least-node: 1.0.0 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 jsonfile: 6.1.0 universalify: 2.0.0 dev: true @@ -12496,7 +12192,7 @@ packages: dependencies: universalify: 2.0.0 optionalDependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 dev: true /jsonpointer@5.0.1: @@ -13433,10 +13129,6 @@ packages: /node-releases@2.0.10: resolution: {integrity: sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==} - /node-releases@2.0.13: - resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} - dev: true - /nofilter@3.1.0: resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==} engines: {node: '>=12.19'} @@ -13927,7 +13619,7 @@ packages: resolution: {integrity: sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==} engines: {node: '>=8'} dependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 hasha: 5.2.2 lodash.flattendeep: 4.4.0 release-zalgo: 1.0.0 @@ -15972,11 +15664,6 @@ packages: /semver@6.3.0: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} - /semver@6.3.1: - resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} - hasBin: true - dev: true - /semver@7.3.4: resolution: {integrity: sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==} engines: {node: '>=10'} @@ -17460,17 +17147,6 @@ packages: escalade: 3.1.1 picocolors: 1.0.0 - /update-browserslist-db@1.0.11(browserslist@4.21.10): - resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' - dependencies: - browserslist: 4.21.10 - escalade: 3.1.1 - picocolors: 1.0.0 - dev: true - /update-notifier@5.1.0: resolution: {integrity: sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==} engines: {node: '>=10'} From 6b00da518ecb191c7b49ccb98d3771881bf0e4b8 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 12 Sep 2023 11:02:33 -0300 Subject: [PATCH 3/7] use typedoc from pnpm config Signed-off-by: Sebastian --- ci/jobs/2-docs/docs.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/ci/jobs/2-docs/docs.sh b/ci/jobs/2-docs/docs.sh index fed198fba..ee6abc2ac 100755 --- a/ci/jobs/2-docs/docs.sh +++ b/ci/jobs/2-docs/docs.sh @@ -5,11 +5,4 @@ set -exuo pipefail ./configure make -pnpm install --workspace-root typedoc -./node_modules/typedoc/bin/typedoc \ - --out dist/typedoc \ - --tsconfig tsconfig.build.json \ - packages/taler-util/src/index.ts \ - packages/taler-wallet-cli/src/index.ts \ - packages/taler-wallet-android/src/index.ts \ - packages/taler-wallet-core/src/index.ts +pnpm run typedoc From ec040ca15d1a155398d0ee07c63ae7d59d61f0e0 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 12 Sep 2023 16:18:21 -0300 Subject: [PATCH 4/7] remove rimraf since it prevent running make clean when there is no node_modules --- packages/aml-backoffice-ui/package.json | 1 + packages/anastasis-cli/package.json | 3 +- packages/anastasis-core/package.json | 3 +- packages/anastasis-webui/package.json | 1 + packages/demobank-ui/package.json | 1 + packages/idb-bridge/package.json | 3 +- packages/merchant-backend-ui/package.json | 3 +- packages/merchant-backoffice-ui/package.json | 1 - packages/pogen/package.json | 1 + packages/taler-harness/package.json | 3 +- packages/taler-util/package.json | 3 +- packages/taler-wallet-cli/package.json | 3 +- packages/taler-wallet-core/package.json | 3 +- packages/taler-wallet-embedded/package.json | 5 +- .../taler-wallet-webextension/package.json | 3 +- packages/web-util/package.json | 3 +- pnpm-lock.yaml | 154 ++++-------------- 17 files changed, 44 insertions(+), 150 deletions(-) diff --git a/packages/aml-backoffice-ui/package.json b/packages/aml-backoffice-ui/package.json index d577cead1..9ca6312a7 100644 --- a/packages/aml-backoffice-ui/package.json +++ b/packages/aml-backoffice-ui/package.json @@ -10,6 +10,7 @@ "build": "./build.mjs", "typedoc": "typedoc --out dist/typedoc ./src/", "check": "tsc", + "clean": "rm -rf dist lib", "compile": "tsc && ./build.mjs", "test": "./test.mjs && mocha --require source-map-support/register 'dist/test/**/*.test.js' 'dist/test/**/test.js'", "lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'", diff --git a/packages/anastasis-cli/package.json b/packages/anastasis-cli/package.json index a0bd47b6e..e0b154de8 100644 --- a/packages/anastasis-cli/package.json +++ b/packages/anastasis-cli/package.json @@ -18,7 +18,7 @@ "scripts": { "compile": "tsc && ./build-node.mjs", "test": "tsc", - "clean": "rimraf lib dist tsconfig.tsbuildinfo", + "clean": "rm -rf lib dist tsconfig.tsbuildinfo", "typedoc": "typedoc --out dist/typedoc ./src/", "pretty": "prettier --write src" }, @@ -33,7 +33,6 @@ "devDependencies": { "@types/node": "^18.11.17", "prettier": "^2.8.8", - "rimraf": "^3.0.2", "typedoc": "^0.25.1", "typescript": "^5.2.2" }, diff --git a/packages/anastasis-core/package.json b/packages/anastasis-core/package.json index cbfeedb64..14768b178 100644 --- a/packages/anastasis-core/package.json +++ b/packages/anastasis-core/package.json @@ -11,14 +11,13 @@ "test": "tsc && ava", "coverage": "tsc && nyc ava", "typedoc": "typedoc --out dist/typedoc ./src/", - "clean": "rimraf dist lib tsconfig.tsbuildinfo" + "clean": "rm -rf dist lib tsconfig.tsbuildinfo" }, "author": "Florian Dold ", "license": "AGPL-3-or-later", "type": "module", "devDependencies": { "ava": "^4.3.3", - "rimraf": "^3.0.2", "typescript": "^5.2.2" }, "dependencies": { diff --git a/packages/anastasis-webui/package.json b/packages/anastasis-webui/package.json index 70293a0df..0a63a66c4 100644 --- a/packages/anastasis-webui/package.json +++ b/packages/anastasis-webui/package.json @@ -8,6 +8,7 @@ "build": "./build.mjs", "compile": "tsc && ./build.mjs", "dev": "./dev.mjs", + "clean": "rm -rf dist lib tsconfig.tsbuildinfo", "lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'", "typedoc": "typedoc --out dist/typedoc ./src/", "test": "./test.mjs && mocha --require source-map-support/register --enable-source-maps 'dist/**/*test.js'", diff --git a/packages/demobank-ui/package.json b/packages/demobank-ui/package.json index 827545285..8b999aeed 100644 --- a/packages/demobank-ui/package.json +++ b/packages/demobank-ui/package.json @@ -7,6 +7,7 @@ "scripts": { "build": "./build.mjs", "check": "tsc", + "clean": "rm -rf dist lib tsconfig.tsbuildinfo", "compile": "tsc && ./build.mjs", "test": "./test.mjs && mocha --require source-map-support/register 'dist/test/**/*.test.js' 'dist/test/**/test.js'", "lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'", diff --git a/packages/idb-bridge/package.json b/packages/idb-bridge/package.json index f7317ae07..3ed3e76b5 100644 --- a/packages/idb-bridge/package.json +++ b/packages/idb-bridge/package.json @@ -13,7 +13,7 @@ "test": "tsc && ava", "typedoc": "typedoc --out dist/typedoc ./src/", "compile": "tsc", - "clean": "rimraf dist lib tsconfig.tsbuildinfo", + "clean": "rm -rf dist lib tsconfig.tsbuildinfo", "pretty": "prettier --write src" }, "exports": { @@ -29,7 +29,6 @@ "@types/node": "^20.4.1", "ava": "^5.3.1", "prettier": "^2.8.8", - "rimraf": "^5.0.1", "typescript": "^5.2.2" }, "dependencies": { diff --git a/packages/merchant-backend-ui/package.json b/packages/merchant-backend-ui/package.json index 2166fc3c0..bb8114fba 100644 --- a/packages/merchant-backend-ui/package.json +++ b/packages/merchant-backend-ui/package.json @@ -9,7 +9,7 @@ "render-examples": "ts-node -O '{\"module\": \"commonjs\"}' -T render-examples.ts dist/pages dist/examples", "lint-check": "eslint '{src,tests}/**/*.{js,jsx,ts,tsx}'", "lint-fix": "eslint --fix '{src,tests}/**/*.{js,jsx,ts,tsx}'", - "clean": "rimraf dist", + "clean": "rm -rf dist lib tsconfig.tsbuildinfo", "serve-dist": "sirv --port ${PORT:=8080} --cors --single dist" }, "engines": { @@ -60,7 +60,6 @@ "mustache": "^4.2.0", "po2json": "^0.4.5", "preact-render-to-string": "^5.1.19", - "rimraf": "^3.0.2", "sirv-cli": "^1.0.11", "ts-node": "^10.9.1", "tslib": "2.5.3", diff --git a/packages/merchant-backoffice-ui/package.json b/packages/merchant-backoffice-ui/package.json index 04b256505..66e03a65c 100644 --- a/packages/merchant-backoffice-ui/package.json +++ b/packages/merchant-backoffice-ui/package.json @@ -72,7 +72,6 @@ "inline-chunk-html-plugin": "^1.1.1", "mocha": "^9.2.0", "preact-render-to-string": "^5.2.6", - "rimraf": "^3.0.2", "sass": "1.56.1", "source-map-support": "^0.5.21", "typedoc": "^0.25.1", diff --git a/packages/pogen/package.json b/packages/pogen/package.json index 9160e699c..82391a675 100644 --- a/packages/pogen/package.json +++ b/packages/pogen/package.json @@ -7,6 +7,7 @@ "author": "Florian Dold", "license": "GPL-2.0+", "scripts": { + "clean": "rm -rf lib", "compile": "tsc" }, "devDependencies": { diff --git a/packages/taler-harness/package.json b/packages/taler-harness/package.json index 4943b0f38..38f168af4 100644 --- a/packages/taler-harness/package.json +++ b/packages/taler-harness/package.json @@ -20,7 +20,7 @@ "check": "tsc", "test": "tsc", "typedoc": "typedoc --out dist/typedoc ./src/", - "clean": "rimraf lib dist tsconfig.tsbuildinfo", + "clean": "rm -rf lib dist tsconfig.tsbuildinfo", "pretty": "prettier --write src" }, "files": [ @@ -35,7 +35,6 @@ "@types/node": "^18.11.17", "esbuild": "^0.17.7", "prettier": "^2.8.8", - "rimraf": "^3.0.2", "typescript": "^5.2.2" }, "dependencies": { diff --git a/packages/taler-util/package.json b/packages/taler-util/package.json index e329e1411..80e99ae0e 100644 --- a/packages/taler-util/package.json +++ b/packages/taler-util/package.json @@ -59,7 +59,7 @@ "scripts": { "compile": "tsc", "test": "tsc && ava", - "clean": "rimraf dist lib tsconfig.tsbuildinfo", + "clean": "rm -rf dist lib tsconfig.tsbuildinfo", "typedoc": "typedoc --out dist/typedoc ./src/", "pretty": "prettier --write src" }, @@ -68,7 +68,6 @@ "ava": "^4.3.3", "esbuild": "^0.17.7", "prettier": "^2.8.8", - "rimraf": "^3.0.2", "typescript": "^5.2.2" }, "dependencies": { diff --git a/packages/taler-wallet-cli/package.json b/packages/taler-wallet-cli/package.json index d3fe48073..382951223 100644 --- a/packages/taler-wallet-cli/package.json +++ b/packages/taler-wallet-cli/package.json @@ -19,7 +19,7 @@ "compile": "tsc && ./build-node.mjs", "test": "tsc", "typedoc": "typedoc --out dist/typedoc ./src/", - "clean": "rimraf lib dist tsconfig.tsbuildinfo", + "clean": "rm -rf lib dist tsconfig.tsbuildinfo", "pretty": "prettier --write src" }, "files": [ @@ -33,7 +33,6 @@ "devDependencies": { "@types/node": "^18.11.17", "prettier": "^2.8.8", - "rimraf": "^3.0.2", "typedoc": "^0.25.1", "typescript": "^5.2.2" }, diff --git a/packages/taler-wallet-core/package.json b/packages/taler-wallet-core/package.json index 24e97b115..668fe4b92 100644 --- a/packages/taler-wallet-core/package.json +++ b/packages/taler-wallet-core/package.json @@ -18,7 +18,7 @@ "typedoc": "typedoc --out dist/typedoc ./src/", "coverage": "tsc && c8 --src src --all ava", "coverage:html": "tsc && c8 -r html --src src --all ava", - "clean": "rimraf dist lib tsconfig.tsbuildinfo" + "clean": "rm -rf dist lib tsconfig.tsbuildinfo" }, "files": [ "AUTHORS", @@ -65,7 +65,6 @@ "jed": "^1.1.1", "po2json": "^0.4.5", "prettier": "^2.8.8", - "rimraf": "^3.0.2", "typedoc": "^0.25.1", "typescript": "^5.2.2" }, diff --git a/packages/taler-wallet-embedded/package.json b/packages/taler-wallet-embedded/package.json index d72bde664..35a4fcffe 100644 --- a/packages/taler-wallet-embedded/package.json +++ b/packages/taler-wallet-embedded/package.json @@ -16,7 +16,7 @@ "compile": "./build.mjs", "pretty": "prettier --write src", "typedoc": "typedoc --out dist/typedoc ./src/wallet-qjs.ts", - "clean": "rimraf lib dist tsconfig.tsbuildinfo", + "clean": "rm -rf lib dist tsconfig.tsbuildinfo", "deps": "pnpm install --frozen-lockfile --filter @gnu-taler/taler-wallet-embedded..." }, "files": [ @@ -30,8 +30,7 @@ "devDependencies": { "@types/node": "^18.11.17", "esbuild": "^0.17.7", - "prettier": "^2.8.8", - "rimraf": "^3.0.2" + "prettier": "^2.8.8" }, "dependencies": { "@gnu-taler/idb-bridge": "workspace:*", diff --git a/packages/taler-wallet-webextension/package.json b/packages/taler-wallet-webextension/package.json index 1e393adc7..23736729c 100644 --- a/packages/taler-wallet-webextension/package.json +++ b/packages/taler-wallet-webextension/package.json @@ -9,7 +9,7 @@ "license": "AGPL-3.0-or-later", "private": false, "scripts": { - "clean": "rimraf dist lib tsconfig.tsbuildinfo", + "clean": "rm -rf dist lib tsconfig.tsbuildinfo", "test": "./test.mjs && mocha --require source-map-support/register 'dist/test/**/*.test.js' 'dist/test/**/test.js'", "test:coverage": "nyc pnpm test", "compile": "./patch-linaria.sh && tsc && ./build.mjs", @@ -64,7 +64,6 @@ "polished": "^4.1.4", "preact-cli": "^3.3.5", "preact-render-to-string": "^5.1.19", - "rimraf": "^3.0.2", "typescript": "5.2.2" }, "nyc": { diff --git a/packages/web-util/package.json b/packages/web-util/package.json index 81eee949a..ac85fe8eb 100644 --- a/packages/web-util/package.json +++ b/packages/web-util/package.json @@ -28,7 +28,7 @@ }, "scripts": { "compile": "tsc && ./build.mjs", - "clean": "rimraf dist lib tsconfig.tsbuildinfo", + "clean": "rm -rf dist lib tsconfig.tsbuildinfo", "pretty": "prettier --write src" }, "devDependencies": { @@ -52,7 +52,6 @@ "preact": "10.11.3", "preact-render-to-string": "^5.2.6", "prettier": "^2.8.8", - "rimraf": "^3.0.2", "sass": "1.56.1", "swr": "2.0.3", "tslib": "^2.5.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c442ce7ee..3a36e6361 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -136,9 +136,6 @@ importers: prettier: specifier: ^2.8.8 version: 2.8.8 - rimraf: - specifier: ^3.0.2 - version: 3.0.2 typedoc: specifier: ^0.25.1 version: 0.25.1(typescript@5.2.2) @@ -161,9 +158,6 @@ importers: ava: specifier: ^4.3.3 version: 4.3.3(@ava/typescript@4.0.0) - rimraf: - specifier: ^3.0.2 - version: 3.0.2 typescript: specifier: ^5.2.2 version: 5.2.2 @@ -339,9 +333,6 @@ importers: prettier: specifier: ^2.8.8 version: 2.8.8 - rimraf: - specifier: ^5.0.1 - version: 5.0.1 typescript: specifier: ^5.2.2 version: 5.2.2 @@ -415,9 +406,6 @@ importers: preact-render-to-string: specifier: ^5.1.19 version: 5.2.6(preact@10.11.3) - rimraf: - specifier: ^3.0.2 - version: 3.0.2 sirv-cli: specifier: ^1.0.11 version: 1.0.14 @@ -545,9 +533,6 @@ importers: preact-render-to-string: specifier: ^5.2.6 version: 5.2.6(preact@10.11.3) - rimraf: - specifier: ^3.0.2 - version: 3.0.2 sass: specifier: 1.56.1 version: 1.56.1 @@ -598,9 +583,6 @@ importers: prettier: specifier: ^2.8.8 version: 2.8.8 - rimraf: - specifier: ^3.0.2 - version: 3.0.2 typescript: specifier: ^5.2.2 version: 5.2.2 @@ -635,9 +617,6 @@ importers: prettier: specifier: ^2.8.8 version: 2.8.8 - rimraf: - specifier: ^3.0.2 - version: 3.0.2 typescript: specifier: ^5.2.2 version: 5.2.2 @@ -660,9 +639,6 @@ importers: prettier: specifier: ^2.8.8 version: 2.8.8 - rimraf: - specifier: ^3.0.2 - version: 3.0.2 typedoc: specifier: ^0.25.1 version: 0.25.1(typescript@5.2.2) @@ -736,9 +712,6 @@ importers: prettier: specifier: ^2.8.8 version: 2.8.8 - rimraf: - specifier: ^3.0.2 - version: 3.0.2 typedoc: specifier: ^0.25.1 version: 0.25.1(typescript@5.2.2) @@ -773,9 +746,6 @@ importers: prettier: specifier: ^2.8.8 version: 2.8.8 - rimraf: - specifier: ^3.0.2 - version: 3.0.2 packages/taler-wallet-webextension: dependencies: @@ -867,9 +837,6 @@ importers: preact-render-to-string: specifier: ^5.1.19 version: 5.2.6(preact@10.11.3) - rimraf: - specifier: ^3.0.2 - version: 3.0.2 typescript: specifier: 5.2.2 version: 5.2.2 @@ -949,9 +916,6 @@ importers: prettier: specifier: ^2.8.8 version: 2.8.8 - rimraf: - specifier: ^3.0.2 - version: 3.0.2 sass: specifier: 1.56.1 version: 1.56.1 @@ -4940,18 +4904,6 @@ packages: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} dev: true - /@isaacs/cliui@8.0.2: - resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} - engines: {node: '>=12'} - dependencies: - string-width: 5.1.2 - string-width-cjs: /string-width@4.2.3 - strip-ansi: 7.0.1 - strip-ansi-cjs: /strip-ansi@6.0.1 - wrap-ansi: 8.1.0 - wrap-ansi-cjs: /wrap-ansi@7.0.0 - dev: true - /@istanbuljs/load-nyc-config@1.1.0: resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} engines: {node: '>=8'} @@ -5410,6 +5362,7 @@ packages: dependencies: mkdirp: 1.0.4 rimraf: 3.0.2 + rm -rf: 3.0.2 dev: true /@nrwl/cli@15.0.1: @@ -5441,13 +5394,6 @@ packages: node-gyp-build: 4.5.0 dev: true - /@pkgjs/parseargs@0.11.0: - resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} - engines: {node: '>=14'} - requiresBuild: true - dev: true - optional: true - /@polka/url@1.0.0-next.21: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} dev: true @@ -7543,6 +7489,7 @@ packages: istanbul-lib-report: 3.0.0 istanbul-reports: 3.1.5 rimraf: 3.0.2 + rm -rf: 3.0.2 test-exclude: 6.0.0 v8-to-istanbul: 9.0.1 yargs: 16.2.0 @@ -7564,6 +7511,7 @@ packages: move-concurrently: 1.0.1 promise-inflight: 1.0.1(bluebird@3.7.2) rimraf: 2.7.1 + rm -rf: 2.7.1 ssri: 6.0.2 unique-filename: 1.1.1 y18n: 4.0.3 @@ -7588,6 +7536,7 @@ packages: p-map: 4.0.0 promise-inflight: 1.0.1(bluebird@3.7.2) rimraf: 3.0.2 + rm -rf: 3.0.2 ssri: 8.0.1 tar: 6.1.11 unique-filename: 1.1.1 @@ -8250,6 +8199,7 @@ packages: iferr: 0.1.5 mkdirp: 0.5.6 rimraf: 2.7.1 + rm -rf: 2.7.1 run-queue: 1.0.3 dev: true @@ -8913,6 +8863,7 @@ packages: is-path-inside: 3.0.3 p-map: 4.0.0 rimraf: 3.0.2 + rm -rf: 3.0.2 slash: 3.0.0 dev: true @@ -10504,6 +10455,7 @@ packages: dependencies: flatted: 3.2.7 rimraf: 3.0.2 + rm -rf: 3.0.2 dev: true /flat@5.0.2: @@ -10550,14 +10502,6 @@ packages: signal-exit: 3.0.7 dev: true - /foreground-child@3.1.1: - resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} - engines: {node: '>=14'} - dependencies: - cross-spawn: 7.0.3 - signal-exit: 4.1.0 - dev: true - /forever-agent@0.6.1: resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==} dev: true @@ -10864,18 +10808,6 @@ packages: dependencies: is-glob: 4.0.3 - /glob@10.3.3: - resolution: {integrity: sha512-92vPiMb/iqpmEgsOoIDvTjc50wf9CCCvMzsi6W0JLPeUKE8TWP1a73PgqSrqy7iAZxaSD1YdzU7QZR5LF51MJw==} - engines: {node: '>=16 || 14 >=14.17'} - hasBin: true - dependencies: - foreground-child: 3.1.1 - jackspeak: 2.2.3 - minimatch: 9.0.1 - minipass: 7.0.2 - path-scurry: 1.10.1 - dev: true - /glob@7.1.4: resolution: {integrity: sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==} dependencies: @@ -11989,6 +11921,7 @@ packages: istanbul-lib-coverage: 3.2.0 p-map: 3.0.0 rimraf: 3.0.2 + rm -rf: 3.0.2 uuid: 8.3.2 dev: true @@ -12020,15 +11953,6 @@ packages: istanbul-lib-report: 3.0.0 dev: true - /jackspeak@2.2.3: - resolution: {integrity: sha512-pF0kfjmg8DJLxDrizHoCZGUFz4P4czQ3HyfW4BU0ffebYkzAVlBywp5zaxW/TM+r0sGbmrQdi8EQQVTJFxnGsQ==} - engines: {node: '>=14'} - dependencies: - '@isaacs/cliui': 8.0.2 - optionalDependencies: - '@pkgjs/parseargs': 0.11.0 - dev: true - /jake@10.8.5: resolution: {integrity: sha512-sVpxYeuAhWt0OTWITwT98oyV0GsXyMlXCF+3L1SuafBVUIr/uILGRB+NqwkzhgXKvoJpDIpQvqkUALgdmQsQxw==} engines: {node: '>=10'} @@ -12490,11 +12414,6 @@ packages: engines: {node: '>=8'} dev: true - /lru-cache@10.0.0: - resolution: {integrity: sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==} - engines: {node: 14 || >=16.14} - dev: true - /lru-cache@4.1.5: resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} dependencies: @@ -12784,13 +12703,6 @@ packages: brace-expansion: 2.0.1 dev: true - /minimatch@9.0.1: - resolution: {integrity: sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==} - engines: {node: '>=16 || 14 >=14.17'} - dependencies: - brace-expansion: 2.0.1 - dev: true - /minimatch@9.0.3: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} @@ -12840,11 +12752,6 @@ packages: yallist: 4.0.0 dev: true - /minipass@7.0.2: - resolution: {integrity: sha512-eL79dXrE1q9dBbDCLg7xfn/vl7MS4F1gvJAgjJrQli/jbQWdUttuVawphqpffoIYfRdq78LHx6GP4bU/EQ2ATA==} - engines: {node: '>=16 || 14 >=14.17'} - dev: true - /minizlib@1.3.3: resolution: {integrity: sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==} dependencies: @@ -12939,6 +12846,7 @@ packages: fs-write-stream-atomic: 1.0.10 mkdirp: 0.5.6 rimraf: 2.7.1 + rm -rf: 2.7.1 run-queue: 1.0.3 dev: true @@ -13283,6 +13191,7 @@ packages: process-on-spawn: 1.0.0 resolve-from: 5.0.0 rimraf: 3.0.2 + rm -rf: 3.0.2 signal-exit: 3.0.7 spawn-wrap: 2.0.0 test-exclude: 6.0.0 @@ -13772,14 +13681,6 @@ packages: /path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - /path-scurry@1.10.1: - resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} - engines: {node: '>=16 || 14 >=14.17'} - dependencies: - lru-cache: 10.0.0 - minipass: 7.0.2 - dev: true - /path-to-regexp@0.1.7: resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} dev: true @@ -14697,6 +14598,7 @@ packages: raw-loader: 4.0.2(webpack@4.46.0) react-refresh: 0.10.0 rimraf: 3.0.2 + rm -rf: 3.0.2 sade: 1.8.1 size-plugin: 3.0.0(webpack@4.46.0) source-map: 0.7.4 @@ -15476,16 +15378,9 @@ packages: /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - dependencies: - glob: 7.2.3 - dev: true - - /rimraf@5.0.1: - resolution: {integrity: sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==} - engines: {node: '>=14'} hasBin: true dependencies: - glob: 10.3.3 + glob: 7.2.3 dev: true /ripemd160@2.0.2: @@ -15495,6 +15390,19 @@ packages: inherits: 2.0.4 dev: true + /rm -rf@2.7.1: + resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} + hasBin: true + dependencies: + glob: 7.2.3 + dev: true + + /rm -rf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + dependencies: + glob: 7.2.3 + dev: true + /rollup-plugin-terser@7.0.2(rollup@2.79.1): resolution: {integrity: sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==} peerDependencies: @@ -16056,6 +15964,7 @@ packages: is-windows: 1.0.2 make-dir: 3.1.0 rimraf: 3.0.2 + rm -rf: 3.0.2 signal-exit: 3.0.7 which: 2.0.2 dev: true @@ -16735,6 +16644,7 @@ packages: engines: {node: '>=8.17.0'} dependencies: rimraf: 3.0.2 + rm -rf: 3.0.2 dev: true /to-arraybuffer@1.0.1: @@ -17454,6 +17364,7 @@ packages: open: 8.4.0 p-retry: 4.6.2 rimraf: 3.0.2 + rm -rf: 3.0.2 schema-utils: 4.0.0 selfsigned: 2.1.1 serve-index: 1.9.1 @@ -17844,15 +17755,6 @@ packages: strip-ansi: 6.0.1 dev: true - /wrap-ansi@8.1.0: - resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} - engines: {node: '>=12'} - dependencies: - ansi-styles: 6.2.1 - string-width: 5.1.2 - strip-ansi: 7.0.1 - dev: true - /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} From fabe92195ac5a8307b085713929dfea2b4d29a01 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 12 Sep 2023 16:40:02 -0300 Subject: [PATCH 5/7] strange dep in lock file --- pnpm-lock.yaml | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3a36e6361..6c5946a38 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5362,7 +5362,6 @@ packages: dependencies: mkdirp: 1.0.4 rimraf: 3.0.2 - rm -rf: 3.0.2 dev: true /@nrwl/cli@15.0.1: @@ -7489,7 +7488,6 @@ packages: istanbul-lib-report: 3.0.0 istanbul-reports: 3.1.5 rimraf: 3.0.2 - rm -rf: 3.0.2 test-exclude: 6.0.0 v8-to-istanbul: 9.0.1 yargs: 16.2.0 @@ -7511,7 +7509,6 @@ packages: move-concurrently: 1.0.1 promise-inflight: 1.0.1(bluebird@3.7.2) rimraf: 2.7.1 - rm -rf: 2.7.1 ssri: 6.0.2 unique-filename: 1.1.1 y18n: 4.0.3 @@ -7536,7 +7533,6 @@ packages: p-map: 4.0.0 promise-inflight: 1.0.1(bluebird@3.7.2) rimraf: 3.0.2 - rm -rf: 3.0.2 ssri: 8.0.1 tar: 6.1.11 unique-filename: 1.1.1 @@ -8199,7 +8195,6 @@ packages: iferr: 0.1.5 mkdirp: 0.5.6 rimraf: 2.7.1 - rm -rf: 2.7.1 run-queue: 1.0.3 dev: true @@ -8863,7 +8858,6 @@ packages: is-path-inside: 3.0.3 p-map: 4.0.0 rimraf: 3.0.2 - rm -rf: 3.0.2 slash: 3.0.0 dev: true @@ -10455,7 +10449,6 @@ packages: dependencies: flatted: 3.2.7 rimraf: 3.0.2 - rm -rf: 3.0.2 dev: true /flat@5.0.2: @@ -11921,7 +11914,6 @@ packages: istanbul-lib-coverage: 3.2.0 p-map: 3.0.0 rimraf: 3.0.2 - rm -rf: 3.0.2 uuid: 8.3.2 dev: true @@ -12846,7 +12838,6 @@ packages: fs-write-stream-atomic: 1.0.10 mkdirp: 0.5.6 rimraf: 2.7.1 - rm -rf: 2.7.1 run-queue: 1.0.3 dev: true @@ -13191,7 +13182,6 @@ packages: process-on-spawn: 1.0.0 resolve-from: 5.0.0 rimraf: 3.0.2 - rm -rf: 3.0.2 signal-exit: 3.0.7 spawn-wrap: 2.0.0 test-exclude: 6.0.0 @@ -14598,7 +14588,6 @@ packages: raw-loader: 4.0.2(webpack@4.46.0) react-refresh: 0.10.0 rimraf: 3.0.2 - rm -rf: 3.0.2 sade: 1.8.1 size-plugin: 3.0.0(webpack@4.46.0) source-map: 0.7.4 @@ -15378,7 +15367,6 @@ packages: /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - hasBin: true dependencies: glob: 7.2.3 dev: true @@ -15390,19 +15378,6 @@ packages: inherits: 2.0.4 dev: true - /rm -rf@2.7.1: - resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} - hasBin: true - dependencies: - glob: 7.2.3 - dev: true - - /rm -rf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - dependencies: - glob: 7.2.3 - dev: true - /rollup-plugin-terser@7.0.2(rollup@2.79.1): resolution: {integrity: sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==} peerDependencies: @@ -15964,7 +15939,6 @@ packages: is-windows: 1.0.2 make-dir: 3.1.0 rimraf: 3.0.2 - rm -rf: 3.0.2 signal-exit: 3.0.7 which: 2.0.2 dev: true @@ -16644,7 +16618,6 @@ packages: engines: {node: '>=8.17.0'} dependencies: rimraf: 3.0.2 - rm -rf: 3.0.2 dev: true /to-arraybuffer@1.0.1: @@ -17364,7 +17337,6 @@ packages: open: 8.4.0 p-retry: 4.6.2 rimraf: 3.0.2 - rm -rf: 3.0.2 schema-utils: 4.0.0 selfsigned: 2.1.1 serve-index: 1.9.1 From a654c88a584b1249d1e60c0b8de0aeff72e5979e Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 13 Sep 2023 11:09:33 -0300 Subject: [PATCH 6/7] failing p2p test case --- packages/taler-wallet-core/src/dbless.ts | 2 +- .../src/util/coinSelection.test.ts | 64 +++++++++++++++++++ .../src/util/coinSelection.ts | 6 ++ 3 files changed, 71 insertions(+), 1 deletion(-) diff --git a/packages/taler-wallet-core/src/dbless.ts b/packages/taler-wallet-core/src/dbless.ts index 65c293bdf..d70eab888 100644 --- a/packages/taler-wallet-core/src/dbless.ts +++ b/packages/taler-wallet-core/src/dbless.ts @@ -31,6 +31,7 @@ import { AmountJson, Amounts, AmountString, + BankAccessApiClient, codecForAny, codecForBankWithdrawalOperationPostResponse, codecForBatchDepositSuccess, @@ -53,7 +54,6 @@ import { HttpRequestLibrary, readSuccessResponseJsonOrThrow, } from "@gnu-taler/taler-util/http"; -import { BankAccessApiClient } from "../../taler-util/src/bank-api-client.js"; import { TalerCryptoInterface } from "./crypto/cryptoImplementation.js"; import { DenominationRecord } from "./db.js"; import { isWithdrawableDenom } from "./index.js"; diff --git a/packages/taler-wallet-core/src/util/coinSelection.test.ts b/packages/taler-wallet-core/src/util/coinSelection.test.ts index b907eb160..f678e75e7 100644 --- a/packages/taler-wallet-core/src/util/coinSelection.test.ts +++ b/packages/taler-wallet-core/src/util/coinSelection.test.ts @@ -18,8 +18,72 @@ import { AgeRestriction, AmountJson, Amounts, + DenomKeyType, Duration, TransactionAmountMode, } from "@gnu-taler/taler-util"; import test, { ExecutionContext } from "ava"; +import { testing_greedySelectPeer } from "./coinSelection.js" +type Tester = { + deep: { + equal(another: T): ReturnType; + equals(another: T): ReturnType; + } +} + +function expect(t: ExecutionContext, thing: T): Tester { + return { + deep: { + equal: (another: T) => t.deepEqual(thing, another), + equals: (another: T) => t.deepEqual(thing, another), + }, + }; +} + +const inTheDistantFuture = AbsoluteTime.toProtocolTimestamp( + AbsoluteTime.addDuration(AbsoluteTime.now(), Duration.fromSpec({ hours: 1 })) +) +const inThePast = AbsoluteTime.toProtocolTimestamp( + AbsoluteTime.subtractDuraction(AbsoluteTime.now(), Duration.fromSpec({ hours: 1 })) +) +test("should select the coin", (t) => { + const instructedAmount = Amounts.parseOrThrow("LOCAL:2") + const tally = { + amountAcc: Amounts.zeroOfCurrency(instructedAmount.currency), + depositFeesAcc: Amounts.zeroOfCurrency(instructedAmount.currency), + lastDepositFee: Amounts.zeroOfCurrency(instructedAmount.currency), + }; + const coins = testing_greedySelectPeer( + // candidates available + [{ + "denomPub": { + "age_mask": 0, + "cipher": DenomKeyType.Rsa, + "rsa_public_key": "PPP" + }, + "denomPubHash": "XXX", + "value": "LOCAL:10", + "feeDeposit": "LOCAL:0.1", + "feeRefresh": "LOCAL:0", + "feeRefund": "LOCAL:0", + "feeWithdraw": "LOCAL:0", + "stampExpireDeposit": inTheDistantFuture, + "stampExpireLegal": inTheDistantFuture, + "stampExpireWithdraw": inTheDistantFuture, + "stampStart": inThePast, + "exchangeBaseUrl": "http://exchange.localhost/", + "numAvailable": 5, + "maxAge": 32 + }], + instructedAmount, tally); + + expect(t, coins).deep.equal({ + "XXX;32;http://exchange.localhost/": { + exchangeBaseUrl: "http://exchange.localhost/", + denomPubHash: "XXX", + maxAge: 32, + contributions: [Amounts.parseOrThrow("LOCAL:2")], + } + }); +}); \ No newline at end of file diff --git a/packages/taler-wallet-core/src/util/coinSelection.ts b/packages/taler-wallet-core/src/util/coinSelection.ts index 6fd0f1b86..b8ce5e0f2 100644 --- a/packages/taler-wallet-core/src/util/coinSelection.ts +++ b/packages/taler-wallet-core/src/util/coinSelection.ts @@ -894,6 +894,12 @@ interface PeerCoinSelectionTally { lastDepositFee: AmountJson; } +/** + * exporting for testing + */ +export function testing_greedySelectPeer(...args: Parameters): ReturnType { + return greedySelectPeer(...args) +} function greedySelectPeer( candidates: AvailableDenom[], instructedAmount: AmountLike, From a5960665245c4ffb625dd16923019e8c62c20159 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 13 Sep 2023 11:31:15 -0300 Subject: [PATCH 7/7] fixed greedy calculation --- .../src/util/coinSelection.test.ts | 130 +++++++++++++++--- .../src/util/coinSelection.ts | 14 +- 2 files changed, 118 insertions(+), 26 deletions(-) diff --git a/packages/taler-wallet-core/src/util/coinSelection.test.ts b/packages/taler-wallet-core/src/util/coinSelection.test.ts index f678e75e7..2a322c4a9 100644 --- a/packages/taler-wallet-core/src/util/coinSelection.test.ts +++ b/packages/taler-wallet-core/src/util/coinSelection.test.ts @@ -17,13 +17,14 @@ import { AbsoluteTime, AgeRestriction, AmountJson, + AmountString, Amounts, DenomKeyType, Duration, TransactionAmountMode, } from "@gnu-taler/taler-util"; import test, { ExecutionContext } from "ava"; -import { testing_greedySelectPeer } from "./coinSelection.js" +import { AvailableDenom, testing_greedySelectPeer } from "./coinSelection.js" type Tester = { deep: { @@ -47,6 +48,7 @@ const inTheDistantFuture = AbsoluteTime.toProtocolTimestamp( const inThePast = AbsoluteTime.toProtocolTimestamp( AbsoluteTime.subtractDuraction(AbsoluteTime.now(), Duration.fromSpec({ hours: 1 })) ) + test("should select the coin", (t) => { const instructedAmount = Amounts.parseOrThrow("LOCAL:2") const tally = { @@ -55,16 +57,114 @@ test("should select the coin", (t) => { lastDepositFee: Amounts.zeroOfCurrency(instructedAmount.currency), }; const coins = testing_greedySelectPeer( - // candidates available - [{ + createCandidates([{ + amount: "LOCAL:10", + numAvailable: 5, + depositFee: "LOCAL:0.1", + fromExchange: "http://exchange.localhost/", + }]), + instructedAmount, + tally + ); + + expect(t, coins).deep.equal({ + "hash0;32;http://exchange.localhost/": { + exchangeBaseUrl: "http://exchange.localhost/", + denomPubHash: "hash0", + maxAge: 32, + contributions: [Amounts.parseOrThrow("LOCAL:2")], + } + }); + + expect(t, tally).deep.equal({ + amountAcc: Amounts.parseOrThrow("LOCAL:2"), + depositFeesAcc: Amounts.parseOrThrow("LOCAL:0.1"), + lastDepositFee: Amounts.parseOrThrow("LOCAL:0.1"), + }); + +}); + +test("should select 3 coins", (t) => { + const instructedAmount = Amounts.parseOrThrow("LOCAL:20") + const tally = { + amountAcc: Amounts.zeroOfCurrency(instructedAmount.currency), + depositFeesAcc: Amounts.zeroOfCurrency(instructedAmount.currency), + lastDepositFee: Amounts.zeroOfCurrency(instructedAmount.currency), + }; + const coins = testing_greedySelectPeer( + createCandidates([{ + amount: "LOCAL:10", + numAvailable: 5, + depositFee: "LOCAL:0.1", + fromExchange: "http://exchange.localhost/", + }]), + instructedAmount, + tally + ); + + expect(t, coins).deep.equal({ + "hash0;32;http://exchange.localhost/": { + exchangeBaseUrl: "http://exchange.localhost/", + denomPubHash: "hash0", + maxAge: 32, + contributions: [ + Amounts.parseOrThrow("LOCAL:9.9"), + Amounts.parseOrThrow("LOCAL:9.9"), + Amounts.parseOrThrow("LOCAL:0.2") + ], + } + }); + + expect(t, tally).deep.equal({ + amountAcc: Amounts.parseOrThrow("LOCAL:20"), + depositFeesAcc: Amounts.parseOrThrow("LOCAL:0.3"), + lastDepositFee: Amounts.parseOrThrow("LOCAL:0.1"), + }); + +}); + +test("can't select since the instructed amount is too high", (t) => { + const instructedAmount = Amounts.parseOrThrow("LOCAL:60") + const tally = { + amountAcc: Amounts.zeroOfCurrency(instructedAmount.currency), + depositFeesAcc: Amounts.zeroOfCurrency(instructedAmount.currency), + lastDepositFee: Amounts.zeroOfCurrency(instructedAmount.currency), + }; + const coins = testing_greedySelectPeer( + createCandidates([{ + amount: "LOCAL:10", + numAvailable: 5, + depositFee: "LOCAL:0.1", + fromExchange: "http://exchange.localhost/", + }]), + instructedAmount, + tally + ); + + expect(t, coins).deep.equal(undefined); + + expect(t, tally).deep.equal({ + amountAcc: Amounts.parseOrThrow("LOCAL:49.5"), + depositFeesAcc: Amounts.parseOrThrow("LOCAL:0.5"), + lastDepositFee: Amounts.parseOrThrow("LOCAL:0.1"), + }); + +}); + + + + +function createCandidates(ar: {amount: AmountString, depositFee: AmountString, numAvailable: number, fromExchange: string}[]): AvailableDenom[] { + return ar.map((r,idx) => { + return { "denomPub": { "age_mask": 0, "cipher": DenomKeyType.Rsa, "rsa_public_key": "PPP" }, - "denomPubHash": "XXX", - "value": "LOCAL:10", - "feeDeposit": "LOCAL:0.1", + "denomPubHash": `hash${idx}`, + "value": r.amount, + "feeDeposit": r.depositFee, "feeRefresh": "LOCAL:0", "feeRefund": "LOCAL:0", "feeWithdraw": "LOCAL:0", @@ -72,18 +172,10 @@ test("should select the coin", (t) => { "stampExpireLegal": inTheDistantFuture, "stampExpireWithdraw": inTheDistantFuture, "stampStart": inThePast, - "exchangeBaseUrl": "http://exchange.localhost/", - "numAvailable": 5, - "maxAge": 32 - }], - instructedAmount, tally); + "exchangeBaseUrl": r.fromExchange, + "numAvailable": r.numAvailable, + "maxAge": 32, - expect(t, coins).deep.equal({ - "XXX;32;http://exchange.localhost/": { - exchangeBaseUrl: "http://exchange.localhost/", - denomPubHash: "XXX", - maxAge: 32, - contributions: [Amounts.parseOrThrow("LOCAL:2")], } - }); -}); \ No newline at end of file + }) +} diff --git a/packages/taler-wallet-core/src/util/coinSelection.ts b/packages/taler-wallet-core/src/util/coinSelection.ts index b8ce5e0f2..0885215dd 100644 --- a/packages/taler-wallet-core/src/util/coinSelection.ts +++ b/packages/taler-wallet-core/src/util/coinSelection.ts @@ -918,19 +918,19 @@ function greedySelectPeer( instructedAmount, tally.amountAcc, ).amount; - const coinSpend = Amounts.max( - Amounts.min(amountPayRemaining, denom.value), - denom.feeDeposit, - ); + const coinContrib = Amounts.sub(denom.value, denom.feeDeposit).amount + + const coinSpend = Amounts.min(amountPayRemaining, coinContrib) + tally.amountAcc = Amounts.add(tally.amountAcc, coinSpend).amount; - // Since this is a peer payment, there is no merchant to - // potentially cover the deposit fees. - tally.amountAcc = Amounts.sub(tally.amountAcc, denom.feeDeposit).amount; + tally.depositFeesAcc = Amounts.add( tally.depositFeesAcc, denom.feeDeposit, ).amount; + tally.lastDepositFee = Amounts.parseOrThrow(denom.feeDeposit); + contributions.push(coinSpend); } if (contributions.length > 0) {