diff --git a/.prettierrc.json b/.prettierrc.json index 544138be4..c1a6f6671 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,3 +1,4 @@ { - "singleQuote": true + "singleQuote": true, + "trailingComma": "es5" } diff --git a/examples/accounts.ts b/examples/accounts.ts index fb1cfc3f6..e9289a33e 100644 --- a/examples/accounts.ts +++ b/examples/accounts.ts @@ -49,7 +49,7 @@ async function main() { }); await client.sendRawTransaction(fundMsigTxn.signTxn(funder.privateKey)).do(); - await algosdk.waitForConfirmation(client, fundMsigTxn.txID().toString(), 3); + await algosdk.waitForConfirmation(client, fundMsigTxn.txID(), 3); // example: MULTISIG_SIGN const msigTxn = algosdk.makePaymentTxnWithSuggestedParamsFromObject({ @@ -74,7 +74,7 @@ async function main() { ).blob; await client.sendRawTransaction(msigWithSecondSig).do(); - await algosdk.waitForConfirmation(client, msigTxn.txID().toString(), 3); + await algosdk.waitForConfirmation(client, msigTxn.txID(), 3); // example: MULTISIG_SIGN // example: ACCOUNT_GENERATE @@ -96,7 +96,7 @@ async function main() { }); await client.sendRawTransaction(rekeyTxn.signTxn(acct1.privateKey)).do(); - await algosdk.waitForConfirmation(client, rekeyTxn.txID().toString(), 3); + await algosdk.waitForConfirmation(client, rekeyTxn.txID(), 3); const acctInfo = await client.accountInformation(acct1.addr).do(); diff --git a/examples/app.ts b/examples/app.ts index b2420fffc..14999f0ef 100644 --- a/examples/app.ts +++ b/examples/app.ts @@ -66,7 +66,7 @@ async function main() { .do(); const result = await algosdk.waitForConfirmation( algodClient, - appCreateTxn.txID().toString(), + appCreateTxn.txID(), 3 ); // Grab app id from confirmed transaction result @@ -86,11 +86,7 @@ async function main() { await algodClient .sendRawTransaction(appOptInTxn.signTxn(caller.privateKey)) .do(); - await algosdk.waitForConfirmation( - algodClient, - appOptInTxn.txID().toString(), - 3 - ); + await algosdk.waitForConfirmation(algodClient, appOptInTxn.txID(), 3); // example: APP_OPTIN // example: APP_NOOP @@ -103,11 +99,7 @@ async function main() { await algodClient .sendRawTransaction(appNoOpTxn.signTxn(caller.privateKey)) .do(); - await algosdk.waitForConfirmation( - algodClient, - appNoOpTxn.txID().toString(), - 3 - ); + await algosdk.waitForConfirmation(algodClient, appNoOpTxn.txID(), 3); // example: APP_NOOP const anotherCaller = accounts[2]; @@ -121,11 +113,7 @@ async function main() { await algodClient .sendRawTransaction(anotherAppOptInTxn.signTxn(anotherCaller.privateKey)) .do(); - await algosdk.waitForConfirmation( - algodClient, - anotherAppOptInTxn.txID().toString(), - 3 - ); + await algosdk.waitForConfirmation(algodClient, anotherAppOptInTxn.txID(), 3); // example: APP_CALL const now = new Date().toString(); @@ -139,11 +127,7 @@ async function main() { await algodClient .sendRawTransaction(simpleAddTxn.signTxn(caller.privateKey)) .do(); - await algosdk.waitForConfirmation( - algodClient, - simpleAddTxn.txID().toString(), - 3 - ); + await algosdk.waitForConfirmation(algodClient, simpleAddTxn.txID(), 3); // example: APP_CALL // example: APP_READ_STATE @@ -183,11 +167,7 @@ async function main() { await algodClient .sendRawTransaction(appCloseOutTxn.signTxn(caller.privateKey)) .do(); - await algosdk.waitForConfirmation( - algodClient, - appCloseOutTxn.txID().toString(), - 3 - ); + await algosdk.waitForConfirmation(algodClient, appCloseOutTxn.txID(), 3); // example: APP_CLOSEOUT // example: APP_UPDATE @@ -209,11 +189,7 @@ async function main() { await algodClient .sendRawTransaction(appUpdateTxn.signTxn(creator.privateKey)) .do(); - await algosdk.waitForConfirmation( - algodClient, - appUpdateTxn.txID().toString(), - 3 - ); + await algosdk.waitForConfirmation(algodClient, appUpdateTxn.txID(), 3); // example: APP_UPDATE // example: APP_CLEAR @@ -226,11 +202,7 @@ async function main() { await algodClient .sendRawTransaction(appClearTxn.signTxn(anotherCaller.privateKey)) .do(); - await algosdk.waitForConfirmation( - algodClient, - appClearTxn.txID().toString(), - 3 - ); + await algosdk.waitForConfirmation(algodClient, appClearTxn.txID(), 3); // example: APP_CLEAR // example: APP_DELETE @@ -243,11 +215,7 @@ async function main() { await algodClient .sendRawTransaction(appDeleteTxn.signTxn(creator.privateKey)) .do(); - await algosdk.waitForConfirmation( - algodClient, - appDeleteTxn.txID().toString(), - 3 - ); + await algosdk.waitForConfirmation(algodClient, appDeleteTxn.txID(), 3); // example: APP_DELETE } diff --git a/examples/asa.ts b/examples/asa.ts index 38c13d47b..93855ac45 100644 --- a/examples/asa.ts +++ b/examples/asa.ts @@ -33,11 +33,7 @@ async function main() { const signedTxn = txn.signTxn(creator.privateKey); await algodClient.sendRawTransaction(signedTxn).do(); - const result = await algosdk.waitForConfirmation( - algodClient, - txn.txID().toString(), - 3 - ); + const result = await algosdk.waitForConfirmation(algodClient, txn.txID(), 3); const assetIndex = Number(result.assetIndex); console.log(`Asset ID created: ${assetIndex}`); @@ -76,7 +72,7 @@ async function main() { await algodClient.sendRawTransaction(signedConfigTxn).do(); const configResult = await algosdk.waitForConfirmation( algodClient, - txn.txID().toString(), + txn.txID(), 3 ); console.log(`Result confirmed in round: ${configResult.confirmedRound}`); @@ -96,7 +92,7 @@ async function main() { const signedOptInTxn = optInTxn.signTxn(receiver.privateKey); await algodClient.sendRawTransaction(signedOptInTxn).do(); - await algosdk.waitForConfirmation(algodClient, optInTxn.txID().toString(), 3); + await algosdk.waitForConfirmation(algodClient, optInTxn.txID(), 3); // example: ASSET_OPTIN // example: ASSET_XFER @@ -110,7 +106,7 @@ async function main() { const signedXferTxn = xferTxn.signTxn(creator.privateKey); await algodClient.sendRawTransaction(signedXferTxn).do(); - await algosdk.waitForConfirmation(algodClient, xferTxn.txID().toString(), 3); + await algosdk.waitForConfirmation(algodClient, xferTxn.txID(), 3); // example: ASSET_XFER // example: ASSET_FREEZE @@ -126,11 +122,7 @@ async function main() { const signedFreezeTxn = freezeTxn.signTxn(manager.privateKey); await algodClient.sendRawTransaction(signedFreezeTxn).do(); - await algosdk.waitForConfirmation( - algodClient, - freezeTxn.txID().toString(), - 3 - ); + await algosdk.waitForConfirmation(algodClient, freezeTxn.txID(), 3); // example: ASSET_FREEZE // example: ASSET_CLAWBACK @@ -148,11 +140,7 @@ async function main() { const signedClawbackTxn = clawbackTxn.signTxn(manager.privateKey); await algodClient.sendRawTransaction(signedClawbackTxn).do(); - await algosdk.waitForConfirmation( - algodClient, - clawbackTxn.txID().toString(), - 3 - ); + await algosdk.waitForConfirmation(algodClient, clawbackTxn.txID(), 3); // example: ASSET_CLAWBACK // example: ASSET_OPT_OUT @@ -171,11 +159,7 @@ async function main() { const signedOptOutTxn = optOutTxn.signTxn(receiver.privateKey); await algodClient.sendRawTransaction(signedOptOutTxn).do(); - await algosdk.waitForConfirmation( - algodClient, - optOutTxn.txID().toString(), - 3 - ); + await algosdk.waitForConfirmation(algodClient, optOutTxn.txID(), 3); // example: ASSET_OPT_OUT // example: ASSET_DELETE @@ -187,11 +171,7 @@ async function main() { const signedDeleteTxn = deleteTxn.signTxn(manager.privateKey); await algodClient.sendRawTransaction(signedDeleteTxn).do(); - await algosdk.waitForConfirmation( - algodClient, - deleteTxn.txID().toString(), - 3 - ); + await algosdk.waitForConfirmation(algodClient, deleteTxn.txID(), 3); // example: ASSET_DELETE } diff --git a/examples/atc.ts b/examples/atc.ts index cee37a44d..b65710130 100644 --- a/examples/atc.ts +++ b/examples/atc.ts @@ -42,7 +42,7 @@ async function main() { await client.sendRawTransaction(createTxn.signTxn(sender.privateKey)).do(); const response = await algosdk.waitForConfirmation( client, - createTxn.txID().toString(), + createTxn.txID(), 3 ); const appIndex = Number(response.applicationIndex); diff --git a/examples/atomics.ts b/examples/atomics.ts index d2318bc0a..b410f5c60 100644 --- a/examples/atomics.ts +++ b/examples/atomics.ts @@ -47,11 +47,12 @@ async function main() { // example: ATOMIC_GROUP_SEND await client.sendRawTransaction(signedTxns).do(); - await algosdk.waitForConfirmation(client, alicesTxn.txID().toString(), 3); + await algosdk.waitForConfirmation(client, alicesTxn.txID(), 3); // example: ATOMIC_GROUP_SEND // example: CONST_MIN_FEE const minFee = algosdk.ALGORAND_MIN_TX_FEE; + console.log(minFee); // example: CONST_MIN_FEE // example: TRANSACTION_FEE_OVERRIDE @@ -61,7 +62,8 @@ async function main() { // example: TRANSACTION_FEE_OVERRIDE // example: SP_MIN_FEE - // Not supported because getTransactionParams erases the information + const params = await client.getTransactionParams().do(); + console.log(params.minFee); // example: SP_MIN_FEE } diff --git a/examples/indexer.ts b/examples/indexer.ts index 73021b69f..e2fba35c9 100644 --- a/examples/indexer.ts +++ b/examples/indexer.ts @@ -72,7 +72,7 @@ async function main() { }); await client.sendRawTransaction(txn.signTxn(sender.privateKey)).do(); - await algosdk.waitForConfirmation(client, txn.txID().toString(), 3); + await algosdk.waitForConfirmation(client, txn.txID(), 3); await new Promise((f) => setTimeout(f, 1000)); // sleep to ensure indexer is caught up diff --git a/examples/lsig.ts b/examples/lsig.ts index 3d14971e4..a01742f4a 100644 --- a/examples/lsig.ts +++ b/examples/lsig.ts @@ -42,11 +42,7 @@ async function main() { await client .sendRawTransaction(fundSmartSigTxn.signTxn(funder.privateKey)) .do(); - await algosdk.waitForConfirmation( - client, - fundSmartSigTxn.txID().toString(), - 3 - ); + await algosdk.waitForConfirmation(client, fundSmartSigTxn.txID(), 3); // example: LSIG_SIGN_FULL const smartSigTxn = algosdk.makePaymentTxnWithSuggestedParamsFromObject({ diff --git a/examples/participation.ts b/examples/participation.ts index 0581e5417..c0ad4466b 100644 --- a/examples/participation.ts +++ b/examples/participation.ts @@ -25,8 +25,8 @@ async function main() { const keyDilution = numRounds ** 0.5; // create transaction - const onlineKeyreg = algosdk.makeKeyRegistrationTxnWithSuggestedParamsFromObject( - { + const onlineKeyreg = + algosdk.makeKeyRegistrationTxnWithSuggestedParamsFromObject({ sender: addr, voteKey, selectionKey, @@ -35,8 +35,7 @@ async function main() { voteLast: params.firstValid + numRounds, voteKeyDilution: keyDilution, suggestedParams: params, - } - ); + }); console.log(onlineKeyreg.get_obj_for_encoding()); // example: TRANSACTION_KEYREG_ONLINE_CREATE @@ -45,13 +44,12 @@ async function main() { // get suggested parameters const suggestedParams = await algodClient.getTransactionParams().do(); // create keyreg transaction to take this account offline - const offlineKeyReg = algosdk.makeKeyRegistrationTxnWithSuggestedParamsFromObject( - { + const offlineKeyReg = + algosdk.makeKeyRegistrationTxnWithSuggestedParamsFromObject({ sender: addr, suggestedParams, nonParticipation: true, - } - ); + }); console.log(offlineKeyReg.get_obj_for_encoding()); // example: TRANSACTION_KEYREG_OFFLINE_CREATE } diff --git a/examples/utils.ts b/examples/utils.ts index 7c9133c55..a33c73225 100644 --- a/examples/utils.ts +++ b/examples/utils.ts @@ -127,7 +127,7 @@ export async function deployCalculatorApp( const result = await algosdk.waitForConfirmation( algodClient, - appCreateTxn.txID().toString(), + appCreateTxn.txID(), 3 ); const appId = Number(result.applicationIndex); diff --git a/package-lock.json b/package-lock.json index a630e121a..6db0857cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,35 +21,36 @@ "devDependencies": { "@types/json-bigint": "^1.0.0", "@types/mocha": "^8.2.2", - "@typescript-eslint/eslint-plugin": "^5.59.2", - "@typescript-eslint/parser": "^5.59.2", + "@types/node": "^20.11.5", + "@typescript-eslint/eslint-plugin": "^6.18.1", + "@typescript-eslint/parser": "^6.18.1", "assert": "^2.0.0", - "chromedriver": "^116.0.0", + "chromedriver": "^120.0.1", "concurrently": "^6.2.0", "cucumber": "^5.1.0", "es-abstract": "^1.18.3", "eslint": "8.22.0", "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-prettier": "^8.1.0", + "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.25.2", "eslint-plugin-tsdoc": "^0.2.11", "express": "^4.17.1", - "geckodriver": "^3.0.1", + "geckodriver": "^4.3.0", "husky": "^4.3.8", "lint-staged": "^10.5.4", "mocha": "^9.0.0", "mock-http-server": "^1.4.3", - "prettier": "2.2.1", + "prettier": "^3.2.1", "selenium-webdriver": "^4.10.0", "source-map-loader": "^2.0.2", "ts-loader": "^9.3.1", "tsx": "^4.7.0", - "typedoc": "^0.23.8", - "typedoc-plugin-missing-exports": "^0.23.0", - "typedoc-plugin-rename-defaults": "^0.6.4", - "typescript": "^4.7.4", - "webpack": "^5.75.0", + "typedoc": "^0.25.7", + "typedoc-plugin-missing-exports": "^2.1.0", + "typedoc-plugin-rename-defaults": "^0.7.0", + "typescript": "^5.3.3", + "webpack": "^5.89.0", "webpack-cli": "^5.0.1" }, "engines": { @@ -783,48 +784,12 @@ "node": ">= 8" } }, - "node_modules/@sindresorhus/is": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", - "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/is?sponsor=1" - } - }, - "node_modules/@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", - "dev": true, - "dependencies": { - "defer-to-connect": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@testim/chrome-version": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.3.tgz", - "integrity": "sha512-g697J3WxV/Zytemz8aTuKjTGYtta9+02kva3C1xc7KXB8GdbfE1akGJIsZLyY/FSh2QrnE+fiB7vmWU3XNcb6A==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.4.tgz", + "integrity": "sha512-kIhULpw9TrGYnHp/8VfdcneIcxKnLixmADtukQRtJUmsVlMg0niMkwV0xZmi8hqa57xqilIHjWFA0GKvEjVU5g==", "dev": true }, - "node_modules/@types/cacheable-request": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", - "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", - "dev": true, - "dependencies": { - "@types/http-cache-semantics": "*", - "@types/keyv": "^3.1.4", - "@types/node": "*", - "@types/responselike": "^1.0.0" - } - }, "node_modules/@types/eslint": { "version": "8.4.10", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.10.tgz", @@ -851,12 +816,6 @@ "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", "dev": true }, - "node_modules/@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", - "dev": true - }, "node_modules/@types/json-bigint": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.0.tgz", @@ -864,9 +823,9 @@ "dev": true }, "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, "node_modules/@types/json5": { @@ -875,15 +834,6 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "node_modules/@types/keyv": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", - "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/mocha": { "version": "8.2.2", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.2.tgz", @@ -891,10 +841,13 @@ "dev": true }, "node_modules/@types/node": { - "version": "15.12.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.12.2.tgz", - "integrity": "sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww==", - "dev": true + "version": "20.11.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.5.tgz", + "integrity": "sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/parse-json": { "version": "4.0.0", @@ -902,19 +855,10 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, - "node_modules/@types/responselike": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", - "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/semver": { - "version": "7.3.13", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", + "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", "dev": true }, "node_modules/@types/yauzl": { @@ -928,32 +872,33 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.2.tgz", - "integrity": "sha512-yVrXupeHjRxLDcPKL10sGQ/QlVrA8J5IYOEWVqk0lJaSZP7X5DfnP7Ns3cc74/blmbipQ1htFNVGsHX6wsYm0A==", + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.18.1.tgz", + "integrity": "sha512-nISDRYnnIpk7VCFrGcu1rnZfM1Dh9LRHnfgdkjcbi/l7g16VYRri3TjXi9Ir4lOZSw5N/gnV/3H7jIPQ8Q4daA==", "dev": true, "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/type-utils": "5.59.2", - "@typescript-eslint/utils": "5.59.2", + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.18.1", + "@typescript-eslint/type-utils": "6.18.1", + "@typescript-eslint/utils": "6.18.1", + "@typescript-eslint/visitor-keys": "6.18.1", "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -979,25 +924,26 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.2.tgz", - "integrity": "sha512-uq0sKyw6ao1iFOZZGk9F8Nro/8+gfB5ezl1cA06SrqbgJAt0SRoFhb9pXaHvkrxUpZaoLxt8KlovHNk8Gp6/HQ==", + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.18.1.tgz", + "integrity": "sha512-zct/MdJnVaRRNy9e84XnVtRv9Vf91/qqe+hZJtKanjojud4wAVy/7lXxJmMyX6X6J+xc6c//YEWvpeif8cAhWA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/typescript-estree": "5.59.2", + "@typescript-eslint/scope-manager": "6.18.1", + "@typescript-eslint/types": "6.18.1", + "@typescript-eslint/typescript-estree": "6.18.1", + "@typescript-eslint/visitor-keys": "6.18.1", "debug": "^4.3.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1023,16 +969,16 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.2.tgz", - "integrity": "sha512-dB1v7ROySwQWKqQ8rEWcdbTsFjh2G0vn8KUyvTXdPoyzSL6lLGkiXEV5CvpJsEe9xIdKV+8Zqb7wif2issoOFA==", + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.18.1.tgz", + "integrity": "sha512-BgdBwXPFmZzaZUuw6wKiHKIovms97a7eTImjkXCZE04TGHysG+0hDQPmygyvgtkoB/aOQwSM/nWv3LzrOIQOBw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/visitor-keys": "5.59.2" + "@typescript-eslint/types": "6.18.1", + "@typescript-eslint/visitor-keys": "6.18.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -1040,25 +986,25 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.2.tgz", - "integrity": "sha512-b1LS2phBOsEy/T381bxkkywfQXkV1dWda/z0PhnIy3bC5+rQWQDS7fk9CSpcXBccPY27Z6vBEuaPBCKCgYezyQ==", + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.18.1.tgz", + "integrity": "sha512-wyOSKhuzHeU/5pcRDP2G2Ndci+4g653V43gXTpt4nbyoIOAASkGDA9JIAgbQCdCkcr1MvpSYWzxTz0olCn8+/Q==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.59.2", - "@typescript-eslint/utils": "5.59.2", + "@typescript-eslint/typescript-estree": "6.18.1", + "@typescript-eslint/utils": "6.18.1", "debug": "^4.3.4", - "tsutils": "^3.21.0" + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1084,12 +1030,12 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.2.tgz", - "integrity": "sha512-LbJ/HqoVs2XTGq5shkiKaNTuVv5tTejdHgfdjqRUGdYhjW1crm/M7og2jhVskMt8/4wS3T1+PfFvL1K3wqYj4w==", + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.18.1.tgz", + "integrity": "sha512-4TuMAe+tc5oA7wwfqMtB0Y5OrREPF1GeJBAjqwgZh1lEMH5PJQgWgHGfYufVB51LtjD+peZylmeyxUXPfENLCw==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -1097,21 +1043,22 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.2.tgz", - "integrity": "sha512-+j4SmbwVmZsQ9jEyBMgpuBD0rKwi9RxRpjX71Brr73RsYnEr3Lt5QZ624Bxphp8HUkSKfqGnPJp1kA5nl0Sh7Q==", + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.18.1.tgz", + "integrity": "sha512-fv9B94UAhywPRhUeeV/v+3SBDvcPiLxRZJw/xZeeGgRLQZ6rLMG+8krrJUyIf6s1ecWTzlsbp0rlw7n9sjufHA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/visitor-keys": "5.59.2", + "@typescript-eslint/types": "6.18.1", + "@typescript-eslint/visitor-keys": "6.18.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -1123,6 +1070,15 @@ } } }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -1140,43 +1096,57 @@ } } }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@typescript-eslint/utils": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.2.tgz", - "integrity": "sha512-kSuF6/77TZzyGPhGO4uVp+f0SBoYxCDf+lW3GKhtKru/L8k/Hd7NFQxyWUeY7Z/KGB2C6Fe3yf2vVi4V9TsCSQ==", + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.18.1.tgz", + "integrity": "sha512-zZmTuVZvD1wpoceHvoQpOiewmWu3uP9FuTWo8vqpy2ffsmfCE8mklRPi+vmnIYAIk9t/4kOThri2QCDgor+OpQ==", "dev": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/typescript-estree": "5.59.2", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.18.1", + "@typescript-eslint/types": "6.18.1", + "@typescript-eslint/typescript-estree": "6.18.1", + "semver": "^7.5.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.2.tgz", - "integrity": "sha512-EEpsO8m3RASrKAHI9jpavNv9NlEUebV4qmF1OWxSTtKSFBpC1NCmWazDQHFivRf0O1DV11BA645yrLEVQ0/Lig==", + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.18.1.tgz", + "integrity": "sha512-/kvt0C5lRqGoCfsbmm7/CwMqoSkY3zzHLIjdhHZQW3VFrnz7ATecOHR7nb7V+xn4286MBxfnQfQhAmCI0u+bJA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.2", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "6.18.1", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -1189,6 +1159,60 @@ "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, + "node_modules/@wdio/logger": { + "version": "8.28.0", + "resolved": "https://registry.npmjs.org/@wdio/logger/-/logger-8.28.0.tgz", + "integrity": "sha512-/s6zNCqwy1hoc+K4SJypis0Ud0dlJ+urOelJFO1x0G0rwDRWyFiUP6ijTaCcFxAm29jYEcEPWijl2xkVIHwOyA==", + "dev": true, + "dependencies": { + "chalk": "^5.1.2", + "loglevel": "^1.6.0", + "loglevel-plugin-prefix": "^0.8.4", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": "^16.13 || >=18" + } + }, + "node_modules/@wdio/logger/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@wdio/logger/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@wdio/logger/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.5.tgz", @@ -1422,6 +1446,15 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-import-assertions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "dev": true, + "peerDependencies": { + "acorn": "^8" + } + }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -1431,15 +1464,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/adm-zip": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.9.tgz", - "integrity": "sha512-s+3fXLkeeLjZ2kLjCBwQufpI5fuN+kIGBxu6530nVQZGVol0d7Y/M88/xw9HGGUcJjKf8LutN3VPRUBq6N7Ajg==", - "dev": true, - "engines": { - "node": ">=6.0" - } - }, "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -1552,6 +1576,12 @@ "node": ">=8" } }, + "node_modules/ansi-sequence-parser": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", + "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", + "dev": true + }, "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -1729,16 +1759,22 @@ } }, "node_modules/axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", + "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", "dev": true, "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } }, + "node_modules/b4a": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz", + "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==", + "dev": true + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1751,6 +1787,15 @@ "integrity": "sha1-Qpzuu/pffpNueNc/vcfacWKyDiA=", "dev": true }, + "node_modules/big-integer": { + "version": "1.6.52", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", + "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, "node_modules/bignumber.js": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", @@ -1759,6 +1804,19 @@ "node": "*" } }, + "node_modules/binary": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", + "integrity": "sha512-D4H1y5KYwpJgK8wk1Cue5LLPgmwHKYSChkbspQg5JtVuR5ulGckxfR62H3AE9UDkdMC8yyXlqYihuz3Aqg2XZg==", + "dev": true, + "dependencies": { + "buffers": "~0.1.1", + "chainsaw": "~0.1.0" + }, + "engines": { + "node": "*" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -1900,40 +1958,31 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "node_modules/buffer-indexof-polyfill": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz", + "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==", "dev": true, "engines": { - "node": ">= 0.8" + "node": ">=0.10" } }, - "node_modules/cacheable-lookup": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", - "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", + "node_modules/buffers": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", + "integrity": "sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ==", "dev": true, "engines": { - "node": ">=10.6.0" + "node": ">=0.2.0" } }, - "node_modules/cacheable-request": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", - "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true, - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" - }, "engines": { - "node": ">=8" + "node": ">= 0.8" } }, "node_modules/call-bind": { @@ -1980,6 +2029,18 @@ "url": "https://opencollective.com/browserslist" } }, + "node_modules/chainsaw": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", + "integrity": "sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ==", + "dev": true, + "dependencies": { + "traverse": ">=0.3.0 <0.4" + }, + "engines": { + "node": "*" + } + }, "node_modules/chalk": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", @@ -2035,15 +2096,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/chrome-trace-event": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", @@ -2054,31 +2106,31 @@ } }, "node_modules/chromedriver": { - "version": "116.0.0", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-116.0.0.tgz", - "integrity": "sha512-/TQaRn+RUAYnVqy5Vx8VtU8DvtWosU8QLM2u7BoNM5h55PRQPXF/onHAehEi8Sj/CehdKqH50NFdiumQAUr0DQ==", + "version": "120.0.1", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-120.0.1.tgz", + "integrity": "sha512-ETTJlkibcAmvoKsaEoq2TFqEsJw18N0O9gOQZX6Uv/XoEiOV8p+IZdidMeIRYELWJIgCZESvlOx5d1QVnB4v0w==", "dev": true, "hasInstallScript": true, "dependencies": { - "@testim/chrome-version": "^1.1.3", - "axios": "^1.4.0", - "compare-versions": "^6.0.0", + "@testim/chrome-version": "^1.1.4", + "axios": "^1.6.0", + "compare-versions": "^6.1.0", "extract-zip": "^2.0.1", "https-proxy-agent": "^5.0.1", "proxy-from-env": "^1.1.0", - "tcp-port-used": "^1.0.1" + "tcp-port-used": "^1.0.2" }, "bin": { "chromedriver": "bin/chromedriver" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/chromedriver/node_modules/compare-versions": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.0.0.tgz", - "integrity": "sha512-s2MzYxfRsE9f/ow8hjn7ysa7pod1xhHdQMsgiJtKx6XSNf4x2N1KG4fjrkUmXcP/e9Y2ZX4zB6sHIso0Lm6evQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz", + "integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==", "dev": true }, "node_modules/ci-info": { @@ -2193,18 +2245,6 @@ "node": ">=6" } }, - "node_modules/clone-response": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", - "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -2507,6 +2547,15 @@ "type": "^1.0.1" } }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, "node_modules/date-fns": { "version": "2.22.1", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.22.1.tgz", @@ -2549,33 +2598,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decompress-response/node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -2588,15 +2610,6 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, - "node_modules/defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/define-properties": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", @@ -2674,6 +2687,15 @@ "node": ">=6.0.0" } }, + "node_modules/duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", + "dev": true, + "dependencies": { + "readable-stream": "^2.0.2" + } + }, "node_modules/duration": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/duration/-/duration-0.2.2.tgz", @@ -2721,9 +2743,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.13.0.tgz", - "integrity": "sha512-eyV8f0y1+bzyfh8xAwW/WTSZpLbjhqc4ne9eGSH4Zo2ejdyiNG9pU6mf9DG8a7+Auk6MFTlNOT4Y2y/9k8GKVg==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -3054,9 +3076,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", - "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" @@ -3263,9 +3285,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3848,6 +3870,12 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", + "dev": true + }, "node_modules/fast-glob": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", @@ -3903,6 +3931,29 @@ "pend": "~1.2.0" } }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, "node_modules/figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", @@ -4016,9 +4067,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "dev": true, "funding": [ { @@ -4058,6 +4109,18 @@ "node": ">= 6" } }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dev": true, + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -4076,18 +4139,6 @@ "node": ">= 0.6" } }, - "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -4108,6 +4159,33 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/fstream": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + }, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/fstream/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -4148,23 +4226,104 @@ } }, "node_modules/geckodriver": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/geckodriver/-/geckodriver-3.2.0.tgz", - "integrity": "sha512-p+qR2RKlI/TQoCEYrSuTaYCLqsJNni96WmEukTyXmOmLn+3FLdgPAEwMZ0sG2Cwi9hozUzGAWyT6zLuhF6cpiQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/geckodriver/-/geckodriver-4.3.0.tgz", + "integrity": "sha512-QfpvxFsMORwKpvnLslkHCr3NTCczHAvkte6+pQGsiUZXKBe6mO4TTb727b+9KMVSK6XZqhR6ZwImKdP+F5vS6A==", "dev": true, "hasInstallScript": true, "dependencies": { - "adm-zip": "0.5.9", - "bluebird": "3.7.2", - "got": "11.8.5", - "https-proxy-agent": "5.0.1", - "tar": "6.1.11" + "@wdio/logger": "^8.24.12", + "decamelize": "^6.0.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "node-fetch": "^3.3.2", + "tar-fs": "^3.0.4", + "unzipper": "^0.10.14", + "which": "^4.0.0" }, "bin": { - "geckodriver": "bin/geckodriver" + "geckodriver": "bin/geckodriver.js" }, "engines": { - "node": ">=12.0.0" + "node": "^16.13 || >=18 || >=20" + } + }, + "node_modules/geckodriver/node_modules/agent-base": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "dev": true, + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/geckodriver/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/geckodriver/node_modules/decamelize": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.0.tgz", + "integrity": "sha512-Fv96DCsdOgB6mdGl67MT5JaTNKRzrzill5OH5s8bjYJXVlcXyPYGyPsUkWyGV5p1TXI5esYIYMMeDJL0hEIwaA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/geckodriver/node_modules/https-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/geckodriver/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "engines": { + "node": ">=16" + } + }, + "node_modules/geckodriver/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "dev": true, + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" } }, "node_modules/get-caller-file": { @@ -4350,31 +4509,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/got": { - "version": "11.8.5", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.5.tgz", - "integrity": "sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ==", - "dev": true, - "dependencies": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" - }, - "engines": { - "node": ">=10.19.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" - } - }, "node_modules/graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -4387,6 +4521,12 @@ "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "dev": true }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "node_modules/growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", @@ -4491,12 +4631,6 @@ "resolved": "https://registry.npmjs.org/hi-base32/-/hi-base32-0.5.1.tgz", "integrity": "sha512-EmBBpvdYh/4XxsnUybsPag6VikPYnN30td+vQk+GI3qpahVEG9+gTkG0aXVxTjBqQ5T6ijbWIu77O+C5WFWsnA==" }, - "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", - "dev": true - }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -4540,17 +4674,46 @@ "node": ">=0.6" } }, - "node_modules/http2-wrapper": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", - "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "node_modules/http-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", + "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", + "dev": true, + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/http-proxy-agent/node_modules/agent-base": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", "dev": true, "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.0.0" + "debug": "^4.3.4" }, "engines": { - "node": ">=10.19.0" + "node": ">= 14" + } + }, + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/https-proxy-agent": { @@ -5356,12 +5519,6 @@ "bignumber.js": "^9.0.0" } }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -5393,9 +5550,9 @@ } }, "node_modules/jsonc-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", - "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", "dev": true }, "node_modules/jszip": { @@ -5410,15 +5567,6 @@ "setimmediate": "^1.0.5" } }, - "node_modules/keyv": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz", - "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -5512,6 +5660,12 @@ "node": ">=0.6.19" } }, + "node_modules/listenercount": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", + "integrity": "sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ==", + "dev": true + }, "node_modules/listr2": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.10.0.tgz", @@ -5633,21 +5787,31 @@ "node": ">=8" } }, + "node_modules/loglevel": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.8.1.tgz", + "integrity": "sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/loglevel" + } + }, + "node_modules/loglevel-plugin-prefix": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/loglevel-plugin-prefix/-/loglevel-plugin-prefix-0.8.4.tgz", + "integrity": "sha512-WpG9CcFAOjz/FtNht+QJeGpvVl/cdR6P0z6OcXSkr8wFJOsV2GRj2j10JLfjuA4aYkcKCNIEqRGCyTife9R8/g==", + "dev": true + }, "node_modules/lower-case": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", "dev": true }, - "node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -5667,9 +5831,9 @@ "dev": true }, "node_modules/marked": { - "version": "4.0.17", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.17.tgz", - "integrity": "sha512-Wfk0ATOK5iPxM4ptrORkFemqroz0ZDxp5MWfYA7H/F+wO17NRWV5Ypxi6p3g2Xmw2bKeiYOl6oVnLHKxBA0VhA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true, "bin": { "marked": "bin/marked.js" @@ -5772,15 +5936,6 @@ "node": ">=6" } }, - "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -5802,43 +5957,24 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/minipass": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", - "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" + "minimist": "^1.2.6" }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, "bin": { "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" } }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, "node_modules/mocha": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", @@ -6144,12 +6280,6 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -6186,6 +6316,43 @@ "lower-case": "^1.1.1" } }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "dev": true, + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, "node_modules/node-releases": { "version": "1.1.73", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.73.tgz", @@ -6201,18 +6368,6 @@ "node": ">=0.10.0" } }, - "node_modules/normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -6388,15 +6543,6 @@ "node": ">= 0.8.0" } }, - "node_modules/p-cancelable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/p-map": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", @@ -6545,15 +6691,18 @@ } }, "node_modules/prettier": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", - "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.1.tgz", + "integrity": "sha512-qSUWshj1IobVbKc226Gw2pync27t0Kf0EdufZa9j7uBSJay1CC+B3K5lAAZoqgX3ASiKuWsk6OmzKRetXNObWg==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/process-nextick-args": { @@ -6644,17 +6793,11 @@ } ] }, - "node_modules/quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "node_modules/queue-tick": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", + "dev": true }, "node_modules/random-bytes": { "version": "1.0.0", @@ -6807,12 +6950,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/resolve-alpn": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", - "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", - "dev": true - }, "node_modules/resolve-cwd": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", @@ -6852,18 +6989,6 @@ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } }, - "node_modules/responselike": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", - "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", - "dev": true, - "dependencies": { - "lowercase-keys": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -6964,9 +7089,9 @@ "dev": true }, "node_modules/schema-utils": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz", - "integrity": "sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.8", @@ -7002,9 +7127,9 @@ } }, "node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -7188,14 +7313,15 @@ } }, "node_modules/shiki": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.1.tgz", - "integrity": "sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==", + "version": "0.14.7", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", + "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", "dev": true, "dependencies": { - "jsonc-parser": "^3.0.0", - "vscode-oniguruma": "^1.6.1", - "vscode-textmate": "5.2.0" + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" } }, "node_modules/side-channel": { @@ -7368,6 +7494,16 @@ "node": ">= 0.6" } }, + "node_modules/streamx": { + "version": "2.15.6", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.6.tgz", + "integrity": "sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw==", + "dev": true, + "dependencies": { + "fast-fifo": "^1.1.0", + "queue-tick": "^1.0.1" + } + }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -7566,21 +7702,26 @@ "node": ">=6" } }, - "node_modules/tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "node_modules/tar-fs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", + "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", "dev": true, "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 10" + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + } + }, + "node_modules/tar-stream": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", + "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", + "dev": true, + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" } }, "node_modules/tcp-port-used": { @@ -7740,6 +7881,15 @@ "node": ">=0.6" } }, + "node_modules/traverse": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", + "integrity": "sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", @@ -7749,6 +7899,18 @@ "tree-kill": "cli.js" } }, + "node_modules/ts-api-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", + "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "dev": true, + "engines": { + "node": ">=16.13.0" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/ts-loader": { "version": "9.5.0", "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.0.tgz", @@ -7796,21 +7958,6 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, "node_modules/tsx": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.0.tgz", @@ -7893,42 +8040,57 @@ } }, "node_modules/typedoc": { - "version": "0.23.8", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.8.tgz", - "integrity": "sha512-NLRTY/7XSrhiowR3xnH/nlfTnHk+dkzhHWAMT8guoZ6RHCQZIu3pJREMCqzdkWVCC5+dr9We7TtNeprR3Qy6Ag==", + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.7.tgz", + "integrity": "sha512-m6A6JjQRg39p2ZVRIN3NKXgrN8vzlHhOS+r9ymUYtcUP/TIQPvWSq7YgE5ZjASfv5Vd5BW5xrir6Gm2XNNcOow==", "dev": true, "dependencies": { "lunr": "^2.3.9", - "marked": "^4.0.16", - "minimatch": "^5.1.0", - "shiki": "^0.10.1" + "marked": "^4.3.0", + "minimatch": "^9.0.3", + "shiki": "^0.14.7" }, "bin": { "typedoc": "bin/typedoc" }, "engines": { - "node": ">= 14.14" + "node": ">= 16" }, "peerDependencies": { - "typescript": "4.6.x || 4.7.x" + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x" } }, "node_modules/typedoc-plugin-missing-exports": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-0.23.0.tgz", - "integrity": "sha512-9smahDSsFRno9ZwoEshQDuIYMHWGB1E6LUud5qMxR2wNZ0T4DlZz0QjoK3HzXtX34mUpTH0dYtt7NQUK4D6B6Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-2.1.0.tgz", + "integrity": "sha512-+1DhqZCEu7Vu5APnrqpPwl31D+hXpt1fV0Le9ycCRL1eLVdatdl6KVt4SEVwPxnEpKwgOn2dNX6I9+0F1aO2aA==", "dev": true, "peerDependencies": { - "typedoc": "0.22.x || 0.23.x" + "typedoc": "0.24.x || 0.25.x" } }, "node_modules/typedoc-plugin-rename-defaults": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/typedoc-plugin-rename-defaults/-/typedoc-plugin-rename-defaults-0.6.4.tgz", - "integrity": "sha512-0rAeNttAfu6ixbi1yu6d+DqNZN8SfRivj2QbnZ4zVa+5HcCPcmQrlR6WHjNzdDfpkGytiiqPTtRD6pAfW/yACg==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/typedoc-plugin-rename-defaults/-/typedoc-plugin-rename-defaults-0.7.0.tgz", + "integrity": "sha512-NudSQ1o/XLHNF9c4y7LzIZxfE9ltz09yCDklBPJpP5VMRvuBpYGIbQ0ZgmPz+EIV8vPx9Z/OyKwzp4HT2vDtfg==", "dev": true, + "dependencies": { + "camelcase": "^8.0.0" + }, "peerDependencies": { - "typedoc": "0.22.x || 0.23.x" + "typedoc": "0.22.x || 0.23.x || 0.24.x || 0.25.x" + } + }, + "node_modules/typedoc-plugin-rename-defaults/node_modules/camelcase": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-8.0.0.tgz", + "integrity": "sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/typedoc/node_modules/brace-expansion": { @@ -7941,28 +8103,31 @@ } }, "node_modules/typedoc/node_modules/minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/uid-safe": { @@ -7998,6 +8163,12 @@ "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==", "dev": true }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -8007,6 +8178,30 @@ "node": ">= 0.8" } }, + "node_modules/unzipper": { + "version": "0.10.14", + "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.14.tgz", + "integrity": "sha512-ti4wZj+0bQTiX2KmKWuwj7lhV+2n//uXEotUmGuQqrbVZSEGFMbI68+c6JCQ8aAmUWYvtHEz2A8K6wXvueR/6g==", + "dev": true, + "dependencies": { + "big-integer": "^1.6.17", + "binary": "~0.3.0", + "bluebird": "~3.4.1", + "buffer-indexof-polyfill": "~1.0.0", + "duplexer2": "~0.1.4", + "fstream": "^1.0.12", + "graceful-fs": "^4.2.2", + "listenercount": "~1.0.1", + "readable-stream": "~2.3.6", + "setimmediate": "~1.0.4" + } + }, + "node_modules/unzipper/node_modules/bluebird": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", + "integrity": "sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA==", + "dev": true + }, "node_modules/upper-case": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", @@ -8092,15 +8287,15 @@ "integrity": "sha512-aodjPa2wPQFkra1G8CzJBTHXhgk3EVSwxSWXNPr1fgdFLUb8kvLV1iEb6rFgasIsjP82HWI6dsb5Io26DDnasA==" }, "node_modules/vscode-oniguruma": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", - "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", "dev": true }, "node_modules/vscode-textmate": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", - "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", "dev": true }, "node_modules/watchpack": { @@ -8116,10 +8311,19 @@ "node": ">=10.13.0" } }, + "node_modules/web-streams-polyfill": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz", + "integrity": "sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, "node_modules/webpack": { - "version": "5.81.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.81.0.tgz", - "integrity": "sha512-AAjaJ9S4hYCVODKLQTgG5p5e11hiMawBwV2v8MYLE0C/6UAGLuAF4n1qa9GOwdxnicaP+5k6M5HrLmD4+gIB8Q==", + "version": "5.89.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz", + "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.3", @@ -8128,10 +8332,10 @@ "@webassemblyjs/wasm-edit": "^1.11.5", "@webassemblyjs/wasm-parser": "^1.11.5", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.7.6", + "acorn-import-assertions": "^1.9.0", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.13.0", + "enhanced-resolve": "^5.15.0", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", @@ -8141,7 +8345,7 @@ "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.1.2", + "schema-utils": "^3.2.0", "tapable": "^2.1.1", "terser-webpack-plugin": "^5.3.7", "watchpack": "^2.4.0", @@ -8304,15 +8508,6 @@ "node": ">=10.13.0" } }, - "node_modules/webpack/node_modules/acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", - "dev": true, - "peerDependencies": { - "acorn": "^8" - } - }, "node_modules/which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -8988,39 +9183,12 @@ "fastq": "^1.6.0" } }, - "@sindresorhus/is": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", - "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", - "dev": true - }, - "@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", - "dev": true, - "requires": { - "defer-to-connect": "^2.0.0" - } - }, "@testim/chrome-version": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.3.tgz", - "integrity": "sha512-g697J3WxV/Zytemz8aTuKjTGYtta9+02kva3C1xc7KXB8GdbfE1akGJIsZLyY/FSh2QrnE+fiB7vmWU3XNcb6A==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.4.tgz", + "integrity": "sha512-kIhULpw9TrGYnHp/8VfdcneIcxKnLixmADtukQRtJUmsVlMg0niMkwV0xZmi8hqa57xqilIHjWFA0GKvEjVU5g==", "dev": true }, - "@types/cacheable-request": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", - "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", - "dev": true, - "requires": { - "@types/http-cache-semantics": "*", - "@types/keyv": "^3.1.4", - "@types/node": "*", - "@types/responselike": "^1.0.0" - } - }, "@types/eslint": { "version": "8.4.10", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.10.tgz", @@ -9047,12 +9215,6 @@ "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", "dev": true }, - "@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", - "dev": true - }, "@types/json-bigint": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.0.tgz", @@ -9060,9 +9222,9 @@ "dev": true }, "@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, "@types/json5": { @@ -9071,15 +9233,6 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "@types/keyv": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", - "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "@types/mocha": { "version": "8.2.2", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.2.tgz", @@ -9087,10 +9240,13 @@ "dev": true }, "@types/node": { - "version": "15.12.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.12.2.tgz", - "integrity": "sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww==", - "dev": true + "version": "20.11.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.5.tgz", + "integrity": "sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==", + "dev": true, + "requires": { + "undici-types": "~5.26.4" + } }, "@types/parse-json": { "version": "4.0.0", @@ -9098,19 +9254,10 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, - "@types/responselike": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", - "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "@types/semver": { - "version": "7.3.13", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", + "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", "dev": true }, "@types/yauzl": { @@ -9124,21 +9271,22 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.2.tgz", - "integrity": "sha512-yVrXupeHjRxLDcPKL10sGQ/QlVrA8J5IYOEWVqk0lJaSZP7X5DfnP7Ns3cc74/blmbipQ1htFNVGsHX6wsYm0A==", + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.18.1.tgz", + "integrity": "sha512-nISDRYnnIpk7VCFrGcu1rnZfM1Dh9LRHnfgdkjcbi/l7g16VYRri3TjXi9Ir4lOZSw5N/gnV/3H7jIPQ8Q4daA==", "dev": true, "requires": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/type-utils": "5.59.2", - "@typescript-eslint/utils": "5.59.2", + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.18.1", + "@typescript-eslint/type-utils": "6.18.1", + "@typescript-eslint/utils": "6.18.1", + "@typescript-eslint/visitor-keys": "6.18.1", "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "dependencies": { "debug": { @@ -9153,14 +9301,15 @@ } }, "@typescript-eslint/parser": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.2.tgz", - "integrity": "sha512-uq0sKyw6ao1iFOZZGk9F8Nro/8+gfB5ezl1cA06SrqbgJAt0SRoFhb9pXaHvkrxUpZaoLxt8KlovHNk8Gp6/HQ==", + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.18.1.tgz", + "integrity": "sha512-zct/MdJnVaRRNy9e84XnVtRv9Vf91/qqe+hZJtKanjojud4wAVy/7lXxJmMyX6X6J+xc6c//YEWvpeif8cAhWA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/typescript-estree": "5.59.2", + "@typescript-eslint/scope-manager": "6.18.1", + "@typescript-eslint/types": "6.18.1", + "@typescript-eslint/typescript-estree": "6.18.1", + "@typescript-eslint/visitor-keys": "6.18.1", "debug": "^4.3.4" }, "dependencies": { @@ -9176,25 +9325,25 @@ } }, "@typescript-eslint/scope-manager": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.2.tgz", - "integrity": "sha512-dB1v7ROySwQWKqQ8rEWcdbTsFjh2G0vn8KUyvTXdPoyzSL6lLGkiXEV5CvpJsEe9xIdKV+8Zqb7wif2issoOFA==", + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.18.1.tgz", + "integrity": "sha512-BgdBwXPFmZzaZUuw6wKiHKIovms97a7eTImjkXCZE04TGHysG+0hDQPmygyvgtkoB/aOQwSM/nWv3LzrOIQOBw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/visitor-keys": "5.59.2" + "@typescript-eslint/types": "6.18.1", + "@typescript-eslint/visitor-keys": "6.18.1" } }, "@typescript-eslint/type-utils": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.2.tgz", - "integrity": "sha512-b1LS2phBOsEy/T381bxkkywfQXkV1dWda/z0PhnIy3bC5+rQWQDS7fk9CSpcXBccPY27Z6vBEuaPBCKCgYezyQ==", + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.18.1.tgz", + "integrity": "sha512-wyOSKhuzHeU/5pcRDP2G2Ndci+4g653V43gXTpt4nbyoIOAASkGDA9JIAgbQCdCkcr1MvpSYWzxTz0olCn8+/Q==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.59.2", - "@typescript-eslint/utils": "5.59.2", + "@typescript-eslint/typescript-estree": "6.18.1", + "@typescript-eslint/utils": "6.18.1", "debug": "^4.3.4", - "tsutils": "^3.21.0" + "ts-api-utils": "^1.0.1" }, "dependencies": { "debug": { @@ -9209,26 +9358,36 @@ } }, "@typescript-eslint/types": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.2.tgz", - "integrity": "sha512-LbJ/HqoVs2XTGq5shkiKaNTuVv5tTejdHgfdjqRUGdYhjW1crm/M7og2jhVskMt8/4wS3T1+PfFvL1K3wqYj4w==", + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.18.1.tgz", + "integrity": "sha512-4TuMAe+tc5oA7wwfqMtB0Y5OrREPF1GeJBAjqwgZh1lEMH5PJQgWgHGfYufVB51LtjD+peZylmeyxUXPfENLCw==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.2.tgz", - "integrity": "sha512-+j4SmbwVmZsQ9jEyBMgpuBD0rKwi9RxRpjX71Brr73RsYnEr3Lt5QZ624Bxphp8HUkSKfqGnPJp1kA5nl0Sh7Q==", + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.18.1.tgz", + "integrity": "sha512-fv9B94UAhywPRhUeeV/v+3SBDvcPiLxRZJw/xZeeGgRLQZ6rLMG+8krrJUyIf6s1ecWTzlsbp0rlw7n9sjufHA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/visitor-keys": "5.59.2", + "@typescript-eslint/types": "6.18.1", + "@typescript-eslint/visitor-keys": "6.18.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -9237,33 +9396,41 @@ "requires": { "ms": "2.1.2" } + }, + "minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } } } }, "@typescript-eslint/utils": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.2.tgz", - "integrity": "sha512-kSuF6/77TZzyGPhGO4uVp+f0SBoYxCDf+lW3GKhtKru/L8k/Hd7NFQxyWUeY7Z/KGB2C6Fe3yf2vVi4V9TsCSQ==", + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.18.1.tgz", + "integrity": "sha512-zZmTuVZvD1wpoceHvoQpOiewmWu3uP9FuTWo8vqpy2ffsmfCE8mklRPi+vmnIYAIk9t/4kOThri2QCDgor+OpQ==", "dev": true, "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.2", - "@typescript-eslint/types": "5.59.2", - "@typescript-eslint/typescript-estree": "5.59.2", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.18.1", + "@typescript-eslint/types": "6.18.1", + "@typescript-eslint/typescript-estree": "6.18.1", + "semver": "^7.5.4" } }, "@typescript-eslint/visitor-keys": { - "version": "5.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.2.tgz", - "integrity": "sha512-EEpsO8m3RASrKAHI9jpavNv9NlEUebV4qmF1OWxSTtKSFBpC1NCmWazDQHFivRf0O1DV11BA645yrLEVQ0/Lig==", + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.18.1.tgz", + "integrity": "sha512-/kvt0C5lRqGoCfsbmm7/CwMqoSkY3zzHLIjdhHZQW3VFrnz7ATecOHR7nb7V+xn4286MBxfnQfQhAmCI0u+bJA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.59.2", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "6.18.1", + "eslint-visitor-keys": "^3.4.1" } }, "@ungap/promise-all-settled": { @@ -9272,6 +9439,41 @@ "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, + "@wdio/logger": { + "version": "8.28.0", + "resolved": "https://registry.npmjs.org/@wdio/logger/-/logger-8.28.0.tgz", + "integrity": "sha512-/s6zNCqwy1hoc+K4SJypis0Ud0dlJ+urOelJFO1x0G0rwDRWyFiUP6ijTaCcFxAm29jYEcEPWijl2xkVIHwOyA==", + "dev": true, + "requires": { + "chalk": "^5.1.2", + "loglevel": "^1.6.0", + "loglevel-plugin-prefix": "^0.8.4", + "strip-ansi": "^7.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + } + } + }, "@webassemblyjs/ast": { "version": "1.11.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.5.tgz", @@ -9473,6 +9675,13 @@ "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true }, + "acorn-import-assertions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "dev": true, + "requires": {} + }, "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -9480,12 +9689,6 @@ "dev": true, "requires": {} }, - "adm-zip": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.9.tgz", - "integrity": "sha512-s+3fXLkeeLjZ2kLjCBwQufpI5fuN+kIGBxu6530nVQZGVol0d7Y/M88/xw9HGGUcJjKf8LutN3VPRUBq6N7Ajg==", - "dev": true - }, "agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -9566,6 +9769,12 @@ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, + "ansi-sequence-parser": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", + "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", + "dev": true + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -9698,16 +9907,22 @@ "dev": true }, "axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", + "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", "dev": true, "requires": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } }, + "b4a": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz", + "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==", + "dev": true + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -9720,11 +9935,27 @@ "integrity": "sha1-Qpzuu/pffpNueNc/vcfacWKyDiA=", "dev": true }, + "big-integer": { + "version": "1.6.52", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", + "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", + "dev": true + }, "bignumber.js": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" }, + "binary": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", + "integrity": "sha512-D4H1y5KYwpJgK8wk1Cue5LLPgmwHKYSChkbspQg5JtVuR5ulGckxfR62H3AE9UDkdMC8yyXlqYihuz3Aqg2XZg==", + "dev": true, + "requires": { + "buffers": "~0.1.1", + "chainsaw": "~0.1.0" + } + }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -9839,33 +10070,24 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "buffer-indexof-polyfill": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz", + "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==", + "dev": true + }, + "buffers": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", + "integrity": "sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ==", + "dev": true + }, "bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true }, - "cacheable-lookup": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", - "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", - "dev": true - }, - "cacheable-request": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", - "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", - "dev": true, - "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" - } - }, "call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -9894,6 +10116,15 @@ "integrity": "sha512-o0PRQSrSCGJKCPZcgMzl5fUaj5xHe8qA2m4QRvnyY4e1lITqoNkr7q/Oh1NcpGSy0Th97UZ35yoKcINPoq7YOQ==", "dev": true }, + "chainsaw": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", + "integrity": "sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ==", + "dev": true, + "requires": { + "traverse": ">=0.3.0 <0.4" + } + }, "chalk": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", @@ -9931,12 +10162,6 @@ "readdirp": "~3.6.0" } }, - "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "dev": true - }, "chrome-trace-event": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", @@ -9944,24 +10169,24 @@ "dev": true }, "chromedriver": { - "version": "116.0.0", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-116.0.0.tgz", - "integrity": "sha512-/TQaRn+RUAYnVqy5Vx8VtU8DvtWosU8QLM2u7BoNM5h55PRQPXF/onHAehEi8Sj/CehdKqH50NFdiumQAUr0DQ==", + "version": "120.0.1", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-120.0.1.tgz", + "integrity": "sha512-ETTJlkibcAmvoKsaEoq2TFqEsJw18N0O9gOQZX6Uv/XoEiOV8p+IZdidMeIRYELWJIgCZESvlOx5d1QVnB4v0w==", "dev": true, "requires": { - "@testim/chrome-version": "^1.1.3", - "axios": "^1.4.0", - "compare-versions": "^6.0.0", + "@testim/chrome-version": "^1.1.4", + "axios": "^1.6.0", + "compare-versions": "^6.1.0", "extract-zip": "^2.0.1", "https-proxy-agent": "^5.0.1", "proxy-from-env": "^1.1.0", - "tcp-port-used": "^1.0.1" + "tcp-port-used": "^1.0.2" }, "dependencies": { "compare-versions": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.0.0.tgz", - "integrity": "sha512-s2MzYxfRsE9f/ow8hjn7ysa7pod1xhHdQMsgiJtKx6XSNf4x2N1KG4fjrkUmXcP/e9Y2ZX4zB6sHIso0Lm6evQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz", + "integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==", "dev": true } } @@ -10056,15 +10281,6 @@ "shallow-clone": "^3.0.0" } }, - "clone-response": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", - "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -10313,6 +10529,12 @@ "type": "^1.0.1" } }, + "data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "dev": true + }, "date-fns": { "version": "2.22.1", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.22.1.tgz", @@ -10334,23 +10556,6 @@ "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true }, - "decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, - "requires": { - "mimic-response": "^3.1.0" - }, - "dependencies": { - "mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true - } - } - }, "dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -10363,12 +10568,6 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, - "defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", - "dev": true - }, "define-properties": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", @@ -10421,6 +10620,15 @@ "esutils": "^2.0.2" } }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, "duration": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/duration/-/duration-0.2.2.tgz", @@ -10465,9 +10673,9 @@ } }, "enhanced-resolve": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.13.0.tgz", - "integrity": "sha512-eyV8f0y1+bzyfh8xAwW/WTSZpLbjhqc4ne9eGSH4Zo2ejdyiNG9pU6mf9DG8a7+Auk6MFTlNOT4Y2y/9k8GKVg==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", "dev": true, "requires": { "graceful-fs": "^4.2.4", @@ -10882,9 +11090,9 @@ } }, "eslint-config-prettier": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", - "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, "requires": {} }, @@ -11043,9 +11251,9 @@ } }, "eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true }, "espree": { @@ -11322,6 +11530,12 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", + "dev": true + }, "fast-glob": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", @@ -11371,6 +11585,16 @@ "pend": "~1.2.0" } }, + "fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "dev": true, + "requires": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + } + }, "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", @@ -11462,9 +11686,9 @@ "dev": true }, "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "dev": true }, "for-each": { @@ -11487,6 +11711,15 @@ "mime-types": "^2.1.12" } }, + "formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dev": true, + "requires": { + "fetch-blob": "^3.1.2" + } + }, "forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -11499,15 +11732,6 @@ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "dev": true }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, - "requires": { - "minipass": "^3.0.0" - } - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -11521,6 +11745,29 @@ "dev": true, "optional": true }, + "fstream": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -11552,16 +11799,70 @@ "dev": true }, "geckodriver": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/geckodriver/-/geckodriver-3.2.0.tgz", - "integrity": "sha512-p+qR2RKlI/TQoCEYrSuTaYCLqsJNni96WmEukTyXmOmLn+3FLdgPAEwMZ0sG2Cwi9hozUzGAWyT6zLuhF6cpiQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/geckodriver/-/geckodriver-4.3.0.tgz", + "integrity": "sha512-QfpvxFsMORwKpvnLslkHCr3NTCczHAvkte6+pQGsiUZXKBe6mO4TTb727b+9KMVSK6XZqhR6ZwImKdP+F5vS6A==", "dev": true, "requires": { - "adm-zip": "0.5.9", - "bluebird": "3.7.2", - "got": "11.8.5", - "https-proxy-agent": "5.0.1", - "tar": "6.1.11" + "@wdio/logger": "^8.24.12", + "decamelize": "^6.0.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "node-fetch": "^3.3.2", + "tar-fs": "^3.0.4", + "unzipper": "^0.10.14", + "which": "^4.0.0" + }, + "dependencies": { + "agent-base": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "dev": true, + "requires": { + "debug": "^4.3.4" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "decamelize": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.0.tgz", + "integrity": "sha512-Fv96DCsdOgB6mdGl67MT5JaTNKRzrzill5OH5s8bjYJXVlcXyPYGyPsUkWyGV5p1TXI5esYIYMMeDJL0hEIwaA==", + "dev": true + }, + "https-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "dev": true, + "requires": { + "agent-base": "^7.0.2", + "debug": "4" + } + }, + "isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true + }, + "which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "dev": true, + "requires": { + "isexe": "^3.1.1" + } + } } }, "get-caller-file": { @@ -11692,25 +11993,6 @@ "get-intrinsic": "^1.1.3" } }, - "got": { - "version": "11.8.5", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.5.tgz", - "integrity": "sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ==", - "dev": true, - "requires": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" - } - }, "graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -11723,6 +12005,12 @@ "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "dev": true }, + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", @@ -11791,12 +12079,6 @@ "resolved": "https://registry.npmjs.org/hi-base32/-/hi-base32-0.5.1.tgz", "integrity": "sha512-EmBBpvdYh/4XxsnUybsPag6VikPYnN30td+vQk+GI3qpahVEG9+gTkG0aXVxTjBqQ5T6ijbWIu77O+C5WFWsnA==" }, - "http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", - "dev": true - }, "http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -11830,14 +12112,34 @@ } } }, - "http2-wrapper": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", - "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "http-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", + "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", "dev": true, "requires": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.0.0" + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "dependencies": { + "agent-base": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "dev": true, + "requires": { + "debug": "^4.3.4" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + } } }, "https-proxy-agent": { @@ -12404,12 +12706,6 @@ "bignumber.js": "^9.0.0" } }, - "json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -12438,9 +12734,9 @@ } }, "jsonc-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", - "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", "dev": true }, "jszip": { @@ -12455,15 +12751,6 @@ "setimmediate": "^1.0.5" } }, - "keyv": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz", - "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==", - "dev": true, - "requires": { - "json-buffer": "3.0.1" - } - }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -12541,6 +12828,12 @@ } } }, + "listenercount": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", + "integrity": "sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ==", + "dev": true + }, "listr2": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.10.0.tgz", @@ -12631,18 +12924,24 @@ } } }, + "loglevel": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.8.1.tgz", + "integrity": "sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg==", + "dev": true + }, + "loglevel-plugin-prefix": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/loglevel-plugin-prefix/-/loglevel-plugin-prefix-0.8.4.tgz", + "integrity": "sha512-WpG9CcFAOjz/FtNht+QJeGpvVl/cdR6P0z6OcXSkr8wFJOsV2GRj2j10JLfjuA4aYkcKCNIEqRGCyTife9R8/g==", + "dev": true + }, "lower-case": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", "dev": true }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true - }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -12659,9 +12958,9 @@ "dev": true }, "marked": { - "version": "4.0.17", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.17.tgz", - "integrity": "sha512-Wfk0ATOK5iPxM4ptrORkFemqroz0ZDxp5MWfYA7H/F+wO17NRWV5Ypxi6p3g2Xmw2bKeiYOl6oVnLHKxBA0VhA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true }, "media-typer": { @@ -12731,12 +13030,6 @@ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true - }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -12752,29 +13045,19 @@ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true }, - "minipass": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", - "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, "requires": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" + "minimist": "^1.2.6" } }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", "dev": true }, "mocha": { @@ -12995,12 +13278,6 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, "negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -13034,6 +13311,23 @@ "lower-case": "^1.1.1" } }, + "node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "dev": true + }, + "node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "dev": true, + "requires": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + } + }, "node-releases": { "version": "1.1.73", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.73.tgz", @@ -13046,12 +13340,6 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, - "normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", - "dev": true - }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -13178,12 +13466,6 @@ "type-check": "^0.4.0" } }, - "p-cancelable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", - "dev": true - }, "p-map": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", @@ -13293,9 +13575,9 @@ "dev": true }, "prettier": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", - "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.1.tgz", + "integrity": "sha512-qSUWshj1IobVbKc226Gw2pync27t0Kf0EdufZa9j7uBSJay1CC+B3K5lAAZoqgX3ASiKuWsk6OmzKRetXNObWg==", "dev": true }, "process-nextick-args": { @@ -13357,10 +13639,10 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, - "quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "queue-tick": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", "dev": true }, "random-bytes": { @@ -13475,12 +13757,6 @@ "supports-preserve-symlinks-flag": "^1.0.0" } }, - "resolve-alpn": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", - "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", - "dev": true - }, "resolve-cwd": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", @@ -13510,15 +13786,6 @@ "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", "dev": true }, - "responselike": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", - "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", - "dev": true, - "requires": { - "lowercase-keys": "^2.0.0" - } - }, "restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -13586,9 +13853,9 @@ "dev": true }, "schema-utils": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz", - "integrity": "sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "requires": { "@types/json-schema": "^7.0.8", @@ -13614,9 +13881,9 @@ } }, "semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -13765,14 +14032,15 @@ "dev": true }, "shiki": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.1.tgz", - "integrity": "sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==", + "version": "0.14.7", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", + "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", "dev": true, "requires": { - "jsonc-parser": "^3.0.0", - "vscode-oniguruma": "^1.6.1", - "vscode-textmate": "5.2.0" + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" } }, "side-channel": { @@ -13915,6 +14183,16 @@ "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", "dev": true }, + "streamx": { + "version": "2.15.6", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.6.tgz", + "integrity": "sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw==", + "dev": true, + "requires": { + "fast-fifo": "^1.1.0", + "queue-tick": "^1.0.1" + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -14055,18 +14333,26 @@ "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", "dev": true }, - "tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "tar-fs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", + "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", "dev": true, "requires": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + } + }, + "tar-stream": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", + "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", + "dev": true, + "requires": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" } }, "tcp-port-used": { @@ -14189,12 +14475,25 @@ "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", "dev": true }, + "traverse": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", + "integrity": "sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==", + "dev": true + }, "tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true }, + "ts-api-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", + "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "dev": true, + "requires": {} + }, "ts-loader": { "version": "9.5.0", "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.0.tgz", @@ -14234,15 +14533,6 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, "tsx": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.0.tgz", @@ -14302,15 +14592,15 @@ } }, "typedoc": { - "version": "0.23.8", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.8.tgz", - "integrity": "sha512-NLRTY/7XSrhiowR3xnH/nlfTnHk+dkzhHWAMT8guoZ6RHCQZIu3pJREMCqzdkWVCC5+dr9We7TtNeprR3Qy6Ag==", + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.7.tgz", + "integrity": "sha512-m6A6JjQRg39p2ZVRIN3NKXgrN8vzlHhOS+r9ymUYtcUP/TIQPvWSq7YgE5ZjASfv5Vd5BW5xrir6Gm2XNNcOow==", "dev": true, "requires": { "lunr": "^2.3.9", - "marked": "^4.0.16", - "minimatch": "^5.1.0", - "shiki": "^0.10.1" + "marked": "^4.3.0", + "minimatch": "^9.0.3", + "shiki": "^0.14.7" }, "dependencies": { "brace-expansion": { @@ -14323,9 +14613,9 @@ } }, "minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, "requires": { "brace-expansion": "^2.0.1" @@ -14334,23 +14624,33 @@ } }, "typedoc-plugin-missing-exports": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-0.23.0.tgz", - "integrity": "sha512-9smahDSsFRno9ZwoEshQDuIYMHWGB1E6LUud5qMxR2wNZ0T4DlZz0QjoK3HzXtX34mUpTH0dYtt7NQUK4D6B6Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-2.1.0.tgz", + "integrity": "sha512-+1DhqZCEu7Vu5APnrqpPwl31D+hXpt1fV0Le9ycCRL1eLVdatdl6KVt4SEVwPxnEpKwgOn2dNX6I9+0F1aO2aA==", "dev": true, "requires": {} }, "typedoc-plugin-rename-defaults": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/typedoc-plugin-rename-defaults/-/typedoc-plugin-rename-defaults-0.6.4.tgz", - "integrity": "sha512-0rAeNttAfu6ixbi1yu6d+DqNZN8SfRivj2QbnZ4zVa+5HcCPcmQrlR6WHjNzdDfpkGytiiqPTtRD6pAfW/yACg==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/typedoc-plugin-rename-defaults/-/typedoc-plugin-rename-defaults-0.7.0.tgz", + "integrity": "sha512-NudSQ1o/XLHNF9c4y7LzIZxfE9ltz09yCDklBPJpP5VMRvuBpYGIbQ0ZgmPz+EIV8vPx9Z/OyKwzp4HT2vDtfg==", "dev": true, - "requires": {} + "requires": { + "camelcase": "^8.0.0" + }, + "dependencies": { + "camelcase": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-8.0.0.tgz", + "integrity": "sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==", + "dev": true + } + } }, "typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true }, "uid-safe": { @@ -14380,12 +14680,44 @@ "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==", "dev": true }, + "undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", "dev": true }, + "unzipper": { + "version": "0.10.14", + "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.14.tgz", + "integrity": "sha512-ti4wZj+0bQTiX2KmKWuwj7lhV+2n//uXEotUmGuQqrbVZSEGFMbI68+c6JCQ8aAmUWYvtHEz2A8K6wXvueR/6g==", + "dev": true, + "requires": { + "big-integer": "^1.6.17", + "binary": "~0.3.0", + "bluebird": "~3.4.1", + "buffer-indexof-polyfill": "~1.0.0", + "duplexer2": "~0.1.4", + "fstream": "^1.0.12", + "graceful-fs": "^4.2.2", + "listenercount": "~1.0.1", + "readable-stream": "~2.3.6", + "setimmediate": "~1.0.4" + }, + "dependencies": { + "bluebird": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", + "integrity": "sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA==", + "dev": true + } + } + }, "upper-case": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", @@ -14462,15 +14794,15 @@ "integrity": "sha512-aodjPa2wPQFkra1G8CzJBTHXhgk3EVSwxSWXNPr1fgdFLUb8kvLV1iEb6rFgasIsjP82HWI6dsb5Io26DDnasA==" }, "vscode-oniguruma": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", - "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", "dev": true }, "vscode-textmate": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", - "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", "dev": true }, "watchpack": { @@ -14483,10 +14815,16 @@ "graceful-fs": "^4.1.2" } }, + "web-streams-polyfill": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz", + "integrity": "sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==", + "dev": true + }, "webpack": { - "version": "5.81.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.81.0.tgz", - "integrity": "sha512-AAjaJ9S4hYCVODKLQTgG5p5e11hiMawBwV2v8MYLE0C/6UAGLuAF4n1qa9GOwdxnicaP+5k6M5HrLmD4+gIB8Q==", + "version": "5.89.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz", + "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.3", @@ -14495,10 +14833,10 @@ "@webassemblyjs/wasm-edit": "^1.11.5", "@webassemblyjs/wasm-parser": "^1.11.5", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.7.6", + "acorn-import-assertions": "^1.9.0", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.13.0", + "enhanced-resolve": "^5.15.0", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", @@ -14508,20 +14846,11 @@ "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.1.2", + "schema-utils": "^3.2.0", "tapable": "^2.1.1", "terser-webpack-plugin": "^5.3.7", "watchpack": "^2.4.0", "webpack-sources": "^3.2.3" - }, - "dependencies": { - "acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", - "dev": true, - "requires": {} - } } }, "webpack-cli": { diff --git a/package.json b/package.json index f12eef877..0e1d37ffb 100644 --- a/package.json +++ b/package.json @@ -60,35 +60,36 @@ "devDependencies": { "@types/json-bigint": "^1.0.0", "@types/mocha": "^8.2.2", - "@typescript-eslint/eslint-plugin": "^5.59.2", - "@typescript-eslint/parser": "^5.59.2", + "@types/node": "^20.11.5", + "@typescript-eslint/eslint-plugin": "^6.18.1", + "@typescript-eslint/parser": "^6.18.1", "assert": "^2.0.0", - "chromedriver": "^116.0.0", + "chromedriver": "^120.0.1", "concurrently": "^6.2.0", "cucumber": "^5.1.0", "es-abstract": "^1.18.3", "eslint": "8.22.0", "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-prettier": "^8.1.0", + "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.25.2", "eslint-plugin-tsdoc": "^0.2.11", "express": "^4.17.1", - "geckodriver": "^3.0.1", + "geckodriver": "^4.3.0", "husky": "^4.3.8", "lint-staged": "^10.5.4", "mocha": "^9.0.0", "mock-http-server": "^1.4.3", - "prettier": "2.2.1", + "prettier": "^3.2.1", "selenium-webdriver": "^4.10.0", "source-map-loader": "^2.0.2", "ts-loader": "^9.3.1", "tsx": "^4.7.0", - "typedoc": "^0.23.8", - "typedoc-plugin-missing-exports": "^0.23.0", - "typedoc-plugin-rename-defaults": "^0.6.4", - "typescript": "^4.7.4", - "webpack": "^5.75.0", + "typedoc": "^0.25.7", + "typedoc-plugin-missing-exports": "^2.1.0", + "typedoc-plugin-rename-defaults": "^0.7.0", + "typescript": "^5.3.3", + "webpack": "^5.89.0", "webpack-cli": "^5.0.1" }, "scripts": { diff --git a/src/abi/abi_type.ts b/src/abi/abi_type.ts index e0119a47e..f2d8b5b61 100644 --- a/src/abi/abi_type.ts +++ b/src/abi/abi_type.ts @@ -61,7 +61,7 @@ export abstract class ABIType { if (str.endsWith(']')) { const stringMatches = str.match(staticArrayRegexp); // Match the string itself, array element type, then array length - if (stringMatches.length !== 3) { + if (!stringMatches || stringMatches.length !== 3) { throw new Error(`malformed static array string: ${str}`); } // Parse static array using regex @@ -76,8 +76,8 @@ export abstract class ABIType { } if (str.startsWith('uint')) { // Checks if the parsed number contains only digits, no whitespaces - const digitsOnly = (string) => - [...string].every((c) => '0123456789'.includes(c)); + const digitsOnly = (s: string) => + [...s].every((c) => '0123456789'.includes(c)); const typeSizeStr = str.slice(4, str.length); if (!digitsOnly(typeSizeStr)) { throw new Error(`malformed uint string: ${typeSizeStr}`); @@ -93,7 +93,7 @@ export abstract class ABIType { } if (str.startsWith('ufixed')) { const stringMatches = str.match(ufixedRegexp); - if (stringMatches.length !== 3) { + if (!stringMatches || stringMatches.length !== 3) { throw new Error(`malformed ufixed type: ${str}`); } const ufixedSize = parseInt(stringMatches[1], 10); @@ -665,7 +665,7 @@ export class ABITupleType extends ABIType { decode(byteString: Uint8Array): ABIValue[] { const tupleTypes = this.childTypes; const dynamicSegments: Segment[] = []; - const valuePartition: Uint8Array[] = []; + const valuePartition: Array = []; let i = 0; let iterIndex = 0; const view = new DataView(byteString.buffer); @@ -771,7 +771,7 @@ export class ABITupleType extends ABIType { // Decode each tuple element const returnValues: ABIValue[] = []; for (let j = 0; j < tupleTypes.length; j++) { - const valueTi = tupleTypes[j].decode(valuePartition[j]); + const valueTi = tupleTypes[j].decode(valuePartition[j]!); returnValues.push(valueTi); } return returnValues; diff --git a/src/abi/method.ts b/src/abi/method.ts index 9f69f98ac..0a8de6a02 100644 --- a/src/abi/method.ts +++ b/src/abi/method.ts @@ -3,9 +3,11 @@ import { ABIType, ABITupleType } from './abi_type.js'; import { ABITransactionType, abiTypeIsTransaction } from './transaction.js'; import { ABIReferenceType, abiTypeIsReference } from './reference.js'; -function parseMethodSignature( - signature: string -): { name: string; args: string[]; returns: string } { +function parseMethodSignature(signature: string): { + name: string; + args: string[]; + returns: string; +} { const argsStart = signature.indexOf('('); if (argsStart === -1) { throw new Error(`Invalid method signature: ${signature}`); diff --git a/src/abi/transaction.ts b/src/abi/transaction.ts index 32ce89479..920e555f3 100644 --- a/src/abi/transaction.ts +++ b/src/abi/transaction.ts @@ -57,5 +57,5 @@ export function abiCheckTransactionType( return true; } - return txn.type && txn.type.toString() === type.toString(); + return txn.type ? txn.type.toString() === type.toString() : false; } diff --git a/src/bid.ts b/src/bid.ts index 83fc0b37d..82c2c6ac7 100644 --- a/src/bid.ts +++ b/src/bid.ts @@ -53,14 +53,12 @@ export default class Bid implements BidStorageStructure { if (!Number.isSafeInteger(auctionID) || auctionID < 0) throw Error('auctionID must be positive'); - Object.assign(this, { - bidderKey: decodedBidderKey, - bidAmount, - bidID, - auctionKey: decodedAuctionKey, - auctionID, - maxPrice, - }); + this.bidderKey = decodedBidderKey; + this.bidAmount = bidAmount; + this.bidID = bidID; + this.auctionKey = decodedAuctionKey; + this.auctionID = auctionID; + this.maxPrice = maxPrice; } // eslint-disable-next-line camelcase diff --git a/src/client/baseHTTPClient.ts b/src/client/baseHTTPClient.ts index 39b1af632..e02ca5422 100644 --- a/src/client/baseHTTPClient.ts +++ b/src/client/baseHTTPClient.ts @@ -51,7 +51,7 @@ export interface BaseHTTPClient { ): Promise; delete( relativePath: string, - data: Uint8Array, + data?: Uint8Array, query?: Query, requestHeaders?: Record ): Promise; diff --git a/src/client/client.ts b/src/client/client.ts index a33d86cfb..08dff35ed 100644 --- a/src/client/client.ts +++ b/src/client/client.ts @@ -40,9 +40,12 @@ function removeFalsyOrEmpty(obj: Record) { * See https://codereview.stackexchange.com/a/162418 * Used to ensure all headers are lower-case and to work more easily with them */ -function tolowerCaseKeys(o: object): object { +function tolowerCaseKeys(o: Record): Record { /* eslint-disable no-param-reassign,no-return-assign,no-sequences */ - return Object.keys(o).reduce((c, k) => ((c[k.toLowerCase()] = o[k]), c), {}); + return Object.keys(o).reduce( + (c, k) => ((c[k.toLowerCase()] = o[k]), c), + {} as Record + ); /* eslint-enable no-param-reassign,no-return-assign,no-sequences */ } @@ -128,7 +131,7 @@ export class HTTPClient { } return text && utils.parseJSON(text, jsonOptions); } catch (err_) { - const err: ErrorWithAdditionalInfo = err_; + const err = err_ as ErrorWithAdditionalInfo; // return the raw response if the response parsing fails err.rawResponse = text || null; // return the http status code if the response parsing fails @@ -178,14 +181,14 @@ export class HTTPClient { jsonOptions: utils.JSONOptions = {} ): HTTPClientResponse { let { body } = res; - let text; + let text: string | undefined; if (format !== 'application/msgpack') { text = (body && new TextDecoder().decode(body)) || ''; } if (parseBody && format === 'application/json') { - body = HTTPClient.parseJSON(text, res.status, jsonOptions); + body = HTTPClient.parseJSON(text!, res.status, jsonOptions); } return { @@ -202,7 +205,7 @@ export class HTTPClient { * by adding the status and preparing the internal response * @private */ - private static prepareResponseError(err) { + private static prepareResponseError(err: any) { if (err.response) { // eslint-disable-next-line no-param-reassign err.response = HTTPClient.prepareResponse( @@ -240,7 +243,7 @@ export class HTTPClient { try { const res = await this.bc.get( relativePath, - removeFalsyOrEmpty(query), + query ? removeFalsyOrEmpty(query) : undefined, fullHeaders ); diff --git a/src/client/urlTokenBaseHTTPClient.ts b/src/client/urlTokenBaseHTTPClient.ts index 4d6093902..b51195c40 100644 --- a/src/client/urlTokenBaseHTTPClient.ts +++ b/src/client/urlTokenBaseHTTPClient.ts @@ -22,7 +22,10 @@ export interface CustomTokenHeader { } class URLTokenBaseHTTPError extends Error implements BaseHTTPClientError { - constructor(message: string, public response: BaseHTTPClientResponse) { + constructor( + message: string, + public response: BaseHTTPClientResponse + ) { super(message); this.name = 'URLTokenBaseHTTPError'; this.response = response; @@ -110,8 +113,8 @@ export class URLTokenBaseHTTPClient implements BaseHTTPClient { return; } - let body: Uint8Array | null = null; - let bodyErrorMessage: string | null = null; + let body: Uint8Array | undefined; + let bodyErrorMessage: string | undefined; try { body = new Uint8Array(await res.arrayBuffer()); @@ -131,7 +134,7 @@ export class URLTokenBaseHTTPClient implements BaseHTTPClient { } throw new URLTokenBaseHTTPError(message, { - body, + body: body ?? new Uint8Array(), status: res.status, headers: URLTokenBaseHTTPClient.formatFetchResponseHeaders(res.headers), }); @@ -191,7 +194,7 @@ export class URLTokenBaseHTTPClient implements BaseHTTPClient { async delete( relativePath: string, - data: Uint8Array, + data?: Uint8Array, query?: Query, requestHeaders: Record = {} ): Promise { diff --git a/src/client/v2/algod/block.ts b/src/client/v2/algod/block.ts index e16f5f8be..1f46ee35a 100644 --- a/src/client/v2/algod/block.ts +++ b/src/client/v2/algod/block.ts @@ -21,9 +21,8 @@ export default class Block extends JSONRequest { // eslint-disable-next-line class-methods-use-this prepare(body: Uint8Array): BlockResponse { - if (body && body.byteLength > 0) { - return BlockResponse.from_obj_for_encoding(encoding.decode(body)); - } - return undefined; + return BlockResponse.from_obj_for_encoding( + encoding.decode(body) as Record + ); } } diff --git a/src/client/v2/algod/compile.ts b/src/client/v2/algod/compile.ts index ca9121887..ccb62c6dc 100644 --- a/src/client/v2/algod/compile.ts +++ b/src/client/v2/algod/compile.ts @@ -7,7 +7,7 @@ import JSONRequest from '../jsonrequest.js'; * Sets the default header (if not previously set) * @param headers - A headers object */ -export function setHeaders(headers = {}) { +export function setHeaders(headers: Record = {}) { let hdrs = headers; if (Object.keys(hdrs).every((key) => key.toLowerCase() !== 'content-type')) { hdrs = { ...headers }; @@ -23,7 +23,10 @@ export default class Compile extends JSONRequest< CompileResponse, Record > { - constructor(c: HTTPClient, private source: string | Uint8Array) { + constructor( + c: HTTPClient, + private source: string | Uint8Array + ) { super(c); this.source = source; } diff --git a/src/client/v2/algod/disassemble.ts b/src/client/v2/algod/disassemble.ts index 169b5cd7f..1fc29b942 100644 --- a/src/client/v2/algod/disassemble.ts +++ b/src/client/v2/algod/disassemble.ts @@ -7,7 +7,7 @@ import JSONRequest from '../jsonrequest.js'; * Sets the default header (if not previously set) * @param headers - A headers object */ -export function setHeaders(headers = {}) { +export function setHeaders(headers: Record = {}) { let hdrs = headers; if (Object.keys(hdrs).every((key) => key.toLowerCase() !== 'content-type')) { hdrs = { ...headers }; @@ -23,7 +23,10 @@ export default class Disassemble extends JSONRequest< DisassembleResponse, Record > { - constructor(c: HTTPClient, private source: string | Uint8Array) { + constructor( + c: HTTPClient, + private source: string | Uint8Array + ) { super(c); this.source = source; } diff --git a/src/client/v2/algod/dryrun.ts b/src/client/v2/algod/dryrun.ts index e0c6e800b..a3dbf3ceb 100644 --- a/src/client/v2/algod/dryrun.ts +++ b/src/client/v2/algod/dryrun.ts @@ -13,7 +13,7 @@ export default class Dryrun extends JSONRequest< constructor(c: HTTPClient, dr: modelsv2.DryrunRequest) { super(c); - this.blob = encoding.encode(dr.get_obj_for_encoding(true)); + this.blob = encoding.encode(dr.get_obj_for_encoding(true, true)!); } // eslint-disable-next-line class-methods-use-this @@ -27,7 +27,7 @@ export default class Dryrun extends JSONRequest< */ async do(headers = {}) { const txHeaders = setHeaders(headers); - const res = await this.c.post(this.path(), this.blob, null, txHeaders); + const res = await this.c.post(this.path(), this.blob, undefined, txHeaders); return this.prepare(res.body); } diff --git a/src/client/v2/algod/getApplicationBoxes.ts b/src/client/v2/algod/getApplicationBoxes.ts index 4a0793375..e8722383e 100644 --- a/src/client/v2/algod/getApplicationBoxes.ts +++ b/src/client/v2/algod/getApplicationBoxes.ts @@ -21,7 +21,11 @@ export default class GetApplicationBoxes extends JSONRequest< BoxesResponse, Record > { - constructor(c: HTTPClient, intDecoding: IntDecoding, private index: number) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private index: number + ) { super(c, intDecoding); this.index = index; this.query.max = 0; diff --git a/src/client/v2/algod/getApplicationByID.ts b/src/client/v2/algod/getApplicationByID.ts index 32e97db2a..7c3d45d07 100644 --- a/src/client/v2/algod/getApplicationByID.ts +++ b/src/client/v2/algod/getApplicationByID.ts @@ -7,7 +7,11 @@ export default class GetApplicationByID extends JSONRequest< Application, Record > { - constructor(c: HTTPClient, intDecoding: IntDecoding, private index: number) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private index: number + ) { super(c, intDecoding); this.index = index; } diff --git a/src/client/v2/algod/getAssetByID.ts b/src/client/v2/algod/getAssetByID.ts index 5a15139e4..fd764048c 100644 --- a/src/client/v2/algod/getAssetByID.ts +++ b/src/client/v2/algod/getAssetByID.ts @@ -7,7 +7,11 @@ export default class GetAssetByID extends JSONRequest< Asset, Record > { - constructor(c: HTTPClient, intDecoding: IntDecoding, private index: number) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private index: number + ) { super(c, intDecoding); this.index = index; } diff --git a/src/client/v2/algod/getLedgerStateDelta.ts b/src/client/v2/algod/getLedgerStateDelta.ts index a7567a2a0..e169ee1a5 100644 --- a/src/client/v2/algod/getLedgerStateDelta.ts +++ b/src/client/v2/algod/getLedgerStateDelta.ts @@ -3,7 +3,11 @@ import { HTTPClient } from '../../client.js'; import IntDecoding from '../../../types/intDecoding.js'; export default class GetLedgerStateDelta extends JSONRequest { - constructor(c: HTTPClient, intDecoding: IntDecoding, private round: number) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private round: number + ) { super(c, intDecoding); this.round = round; this.query = { format: 'json' }; diff --git a/src/client/v2/algod/getLedgerStateDeltaForTransactionGroup.ts b/src/client/v2/algod/getLedgerStateDeltaForTransactionGroup.ts index 879f6ed6a..2c9a13b0c 100644 --- a/src/client/v2/algod/getLedgerStateDeltaForTransactionGroup.ts +++ b/src/client/v2/algod/getLedgerStateDeltaForTransactionGroup.ts @@ -3,7 +3,11 @@ import { HTTPClient } from '../../client.js'; import IntDecoding from '../../../types/intDecoding.js'; export default class GetLedgerStateDeltaForTransactionGroup extends JSONRequest { - constructor(c: HTTPClient, intDecoding: IntDecoding, private id: string) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private id: string + ) { super(c, intDecoding); this.id = id; this.query = { format: 'json' }; diff --git a/src/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.ts b/src/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.ts index 947ee7f83..d3c4da6b3 100644 --- a/src/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.ts +++ b/src/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.ts @@ -7,7 +7,11 @@ export default class GetTransactionGroupLedgerStateDeltasForRound extends JSONRe TransactionGroupLedgerStateDeltasForRoundResponse, Record > { - constructor(c: HTTPClient, intDecoding: IntDecoding, private round: number) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private round: number + ) { super(c, intDecoding); this.round = round; this.query = { format: 'json' }; diff --git a/src/client/v2/algod/lightBlockHeaderProof.ts b/src/client/v2/algod/lightBlockHeaderProof.ts index 29650691d..1900d287b 100644 --- a/src/client/v2/algod/lightBlockHeaderProof.ts +++ b/src/client/v2/algod/lightBlockHeaderProof.ts @@ -7,7 +7,11 @@ export default class LightBlockHeaderProof extends JSONRequest< LBHP, Record > { - constructor(c: HTTPClient, intDecoding: IntDecoding, private round: number) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private round: number + ) { super(c, intDecoding); this.round = round; diff --git a/src/client/v2/algod/pendingTransactionInformation.ts b/src/client/v2/algod/pendingTransactionInformation.ts index 9bb67a999..b7465ddf0 100644 --- a/src/client/v2/algod/pendingTransactionInformation.ts +++ b/src/client/v2/algod/pendingTransactionInformation.ts @@ -10,20 +10,20 @@ export default class PendingTransactionInformation extends JSONRequest< PendingTransactionResponse, Uint8Array > { - constructor(c: HTTPClient, private txid: string) { + constructor( + c: HTTPClient, + private txid: string + ) { super(c); this.txid = txid; this.query.format = 'msgpack'; } // eslint-disable-next-line class-methods-use-this - prepare(body: Uint8Array) { - if (body && body.byteLength > 0) { - return PendingTransactionResponse.from_obj_for_encoding( - encoding.decode(body) - ); - } - return undefined; + prepare(body: Uint8Array): PendingTransactionResponse { + return PendingTransactionResponse.from_obj_for_encoding( + encoding.decode(body) as Record + ); } path() { diff --git a/src/client/v2/algod/pendingTransactions.ts b/src/client/v2/algod/pendingTransactions.ts index d0e6c499d..c2763ec11 100644 --- a/src/client/v2/algod/pendingTransactions.ts +++ b/src/client/v2/algod/pendingTransactions.ts @@ -21,12 +21,9 @@ export default class PendingTransactions extends JSONRequest< } prepare(body: Uint8Array) { - if (body && body.byteLength > 0) { - return PendingTransactionsResponse.from_obj_for_encoding( - encoding.decode(body) - ); - } - return undefined; + return PendingTransactionsResponse.from_obj_for_encoding( + encoding.decode(body) as Record + ); } /* eslint-enable class-methods-use-this */ diff --git a/src/client/v2/algod/pendingTransactionsByAddress.ts b/src/client/v2/algod/pendingTransactionsByAddress.ts index 023d5c331..31a55557d 100644 --- a/src/client/v2/algod/pendingTransactionsByAddress.ts +++ b/src/client/v2/algod/pendingTransactionsByAddress.ts @@ -10,7 +10,10 @@ export default class PendingTransactionsByAddress extends JSONRequest< PendingTransactionsResponse, Uint8Array > { - constructor(c: HTTPClient, private address: string) { + constructor( + c: HTTPClient, + private address: string + ) { super(c); this.address = address; this.query.format = 'msgpack'; @@ -18,12 +21,9 @@ export default class PendingTransactionsByAddress extends JSONRequest< // eslint-disable-next-line class-methods-use-this prepare(body: Uint8Array): PendingTransactionsResponse { - if (body && body.byteLength > 0) { - return PendingTransactionsResponse.from_obj_for_encoding( - encoding.decode(body) - ); - } - return undefined; + return PendingTransactionsResponse.from_obj_for_encoding( + encoding.decode(body) as Record + ); } path() { diff --git a/src/client/v2/algod/sendRawTransaction.ts b/src/client/v2/algod/sendRawTransaction.ts index 4a3f8cb66..b758dd417 100644 --- a/src/client/v2/algod/sendRawTransaction.ts +++ b/src/client/v2/algod/sendRawTransaction.ts @@ -8,7 +8,9 @@ import JSONRequest from '../jsonrequest.js'; * transaction. * @param headers - A headers object */ -export function setSendTransactionHeaders(headers = {}) { +export function setSendTransactionHeaders( + headers: Record = {} +) { let hdrs = headers; if (Object.keys(hdrs).every((key) => key.toLowerCase() !== 'content-type')) { hdrs = { ...headers }; @@ -56,7 +58,7 @@ export default class SendRawTransaction extends JSONRequest< const res = await this.c.post( this.path(), this.txnBytesToPost, - null, + undefined, txHeaders ); return this.prepare(res.body); diff --git a/src/client/v2/algod/setBlockOffsetTimestamp.ts b/src/client/v2/algod/setBlockOffsetTimestamp.ts index 6c2084ab0..8bf428ea4 100644 --- a/src/client/v2/algod/setBlockOffsetTimestamp.ts +++ b/src/client/v2/algod/setBlockOffsetTimestamp.ts @@ -3,7 +3,11 @@ import { HTTPClient } from '../../client.js'; import IntDecoding from '../../../types/intDecoding.js'; export default class SetBlockOffsetTimestamp extends JSONRequest { - constructor(c: HTTPClient, intDecoding: IntDecoding, private offset: number) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private offset: number + ) { super(c, intDecoding); this.offset = offset; @@ -14,7 +18,7 @@ export default class SetBlockOffsetTimestamp extends JSONRequest { } async do(headers = {}) { - const res = await this.c.post(this.path(), null, null, headers); + const res = await this.c.post(this.path(), null, undefined, headers); return res.body; } } diff --git a/src/client/v2/algod/setSyncRound.ts b/src/client/v2/algod/setSyncRound.ts index 41fbe7682..e87b317a6 100644 --- a/src/client/v2/algod/setSyncRound.ts +++ b/src/client/v2/algod/setSyncRound.ts @@ -3,7 +3,11 @@ import { HTTPClient } from '../../client.js'; import IntDecoding from '../../../types/intDecoding.js'; export default class SetSyncRound extends JSONRequest { - constructor(c: HTTPClient, intDecoding: IntDecoding, private round: number) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private round: number + ) { super(c, intDecoding); this.round = round; @@ -14,7 +18,7 @@ export default class SetSyncRound extends JSONRequest { } async do(headers = {}) { - const res = await this.c.post(this.path(), null, null, headers); + const res = await this.c.post(this.path(), null, undefined, headers); return res.body; } } diff --git a/src/client/v2/algod/simulateTransaction.ts b/src/client/v2/algod/simulateTransaction.ts index 8f2cd5104..986e67641 100644 --- a/src/client/v2/algod/simulateTransaction.ts +++ b/src/client/v2/algod/simulateTransaction.ts @@ -8,7 +8,9 @@ import { SimulateRequest, SimulateResponse } from './models/types.js'; * transaction. * @param headers - A headers object */ -export function setSimulateTransactionsHeaders(headers = {}) { +export function setSimulateTransactionsHeaders( + headers: Record = {} +) { let hdrs = headers; if (Object.keys(hdrs).every((key) => key.toLowerCase() !== 'content-type')) { hdrs = { ...headers }; @@ -29,7 +31,9 @@ export default class SimulateRawTransactions extends JSONRequest< constructor(c: HTTPClient, request: SimulateRequest) { super(c); this.query.format = 'msgpack'; - this.requestBytes = encoding.rawEncode(request.get_obj_for_encoding(true)); + this.requestBytes = encoding.rawEncode( + request.get_obj_for_encoding(true, true)! + ); } // eslint-disable-next-line class-methods-use-this @@ -51,7 +55,7 @@ export default class SimulateRawTransactions extends JSONRequest< // eslint-disable-next-line class-methods-use-this prepare(body: Uint8Array): SimulateResponse { - const decoded = encoding.decode(body); + const decoded = encoding.decode(body) as Record; return SimulateResponse.from_obj_for_encoding(decoded); } } diff --git a/src/client/v2/algod/stateproof.ts b/src/client/v2/algod/stateproof.ts index 20848ab70..b99ee2d97 100644 --- a/src/client/v2/algod/stateproof.ts +++ b/src/client/v2/algod/stateproof.ts @@ -4,7 +4,11 @@ import IntDecoding from '../../../types/intDecoding.js'; import { StateProof as SP } from './models/types.js'; export default class StateProof extends JSONRequest> { - constructor(c: HTTPClient, intDecoding: IntDecoding, private round: number) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private round: number + ) { super(c, intDecoding); this.round = round; diff --git a/src/client/v2/algod/statusAfterBlock.ts b/src/client/v2/algod/statusAfterBlock.ts index 21fb86d9e..03570acfa 100644 --- a/src/client/v2/algod/statusAfterBlock.ts +++ b/src/client/v2/algod/statusAfterBlock.ts @@ -7,7 +7,11 @@ export default class StatusAfterBlock extends JSONRequest< NodeStatusResponse, Record > { - constructor(c: HTTPClient, intDecoding: IntDecoding, private round: number) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private round: number + ) { super(c, intDecoding); if (!Number.isInteger(round)) throw Error('round should be an integer'); this.round = round; diff --git a/src/client/v2/basemodel.ts b/src/client/v2/basemodel.ts index 7688bf43d..fcd755385 100644 --- a/src/client/v2/basemodel.ts +++ b/src/client/v2/basemodel.ts @@ -15,45 +15,90 @@ function _is_primitive(val: any): val is string | boolean | number | bigint { } /* eslint-disable no-underscore-dangle,camelcase,no-redeclare,no-unused-vars */ -function _get_obj_for_encoding( +export function _get_obj_for_encoding( val: Function, - binary: boolean + binary: boolean, + omitEmpty: boolean ): Record; -function _get_obj_for_encoding(val: any[], binary: boolean): any[]; -function _get_obj_for_encoding( +export function _get_obj_for_encoding( + val: any[], + binary: boolean, + omitEmpty: boolean +): any[]; +export function _get_obj_for_encoding( val: Record, - binary: boolean + binary: boolean, + omitEmpty: boolean ): Record; -function _get_obj_for_encoding(val: any, binary: boolean): any { +export function _get_obj_for_encoding( + val: any, + binary: boolean, + omitEmpty: boolean +): any { /* eslint-enable no-underscore-dangle,camelcase,no-redeclare,no-unused-vars */ - let targetPropValue: any; - + if (val == null) { + if (omitEmpty) { + return undefined; + } + return val; + } if (val instanceof Uint8Array) { - targetPropValue = binary ? val : bytesToBase64(val); - } else if (typeof val.get_obj_for_encoding === 'function') { - targetPropValue = val.get_obj_for_encoding(binary); - } else if (Array.isArray(val)) { - targetPropValue = []; + if (omitEmpty && val.byteLength === 0) { + return undefined; + } + return binary ? val : bytesToBase64(val); + } + if (typeof val.get_obj_for_encoding === 'function') { + return val.get_obj_for_encoding(binary, omitEmpty); + } + if (Array.isArray(val)) { + if (omitEmpty && val.length === 0) { + return undefined; + } + const targetPropValue = []; for (const elem of val) { - targetPropValue.push(_get_obj_for_encoding(elem, binary)); + const omitEmptyForChild = + _is_primitive(elem) || elem instanceof Uint8Array ? false : omitEmpty; + let forEncoding = _get_obj_for_encoding(elem, binary, omitEmptyForChild); + if (omitEmpty && typeof forEncoding === 'undefined') { + if (Array.isArray(elem)) { + forEncoding = []; + } else if (elem && typeof elem === 'object') { + forEncoding = {}; + } + } + targetPropValue.push(forEncoding); } - } else if (typeof val === 'object') { - const obj = {}; + return targetPropValue; + } + if (typeof val === 'object') { + let keyCount = 0; + const obj: Record = {}; for (const prop of Object.keys(val)) { - obj[prop] = _get_obj_for_encoding(val[prop], binary); + const forEncoding = _get_obj_for_encoding(val[prop], binary, omitEmpty); + if (omitEmpty && typeof forEncoding === 'undefined') { + continue; + } + obj[prop] = forEncoding; + keyCount += 1; + } + if (omitEmpty && keyCount === 0) { + return undefined; + } + return obj; + } + if (_is_primitive(val)) { + if (omitEmpty && !val) { + return undefined; } - targetPropValue = obj; - } else if (_is_primitive(val)) { - targetPropValue = val; - } else { - throw new Error(`Unsupported value: ${String(val)}`); + return val; } - return targetPropValue; + throw new Error(`Unsupported value, type "${typeof val}": ${val}`); } export default class BaseModel { /* eslint-disable no-underscore-dangle,camelcase */ - attribute_map: Record; + attribute_map!: Record; /** * Get an object ready for encoding to either JSON or msgpack. @@ -61,19 +106,34 @@ export default class BaseModel { * (Uint8Arrays). Use false to indicate that raw binary objects should be converted to base64 * strings. True should be used for objects that will be encoded with msgpack, and false should * be used for objects that will be encoded with JSON. + * @param omitEmpty - Use true to omit all properties with falsy or empty values. This is useful + * for encoding objects for msgpack, since our encoder will error if it encounters any empty or + * falsy values. */ - get_obj_for_encoding(binary = false) { + get_obj_for_encoding( + binary: boolean = false, + omitEmpty: boolean = false + ): Record | undefined { /* eslint-enable no-underscore-dangle,camelcase */ + let keyCount = 0; const obj: Record = {}; for (const prop of Object.keys(this.attribute_map)) { const name = this.attribute_map[prop]; - const value = this[prop]; - - if (typeof value !== 'undefined') { - obj[name] = - value === null ? null : _get_obj_for_encoding(value, binary); + const value: any = this[prop as keyof this]; // Add an index signature to allow indexing with a string parameter + if (typeof value === 'undefined') { + continue; + } + const valueForEncoding = _get_obj_for_encoding(value, binary, omitEmpty); + if (omitEmpty && typeof valueForEncoding === 'undefined') { + continue; } + obj[name] = valueForEncoding; + keyCount += 1; + } + + if (omitEmpty && keyCount === 0) { + return undefined; } return obj; diff --git a/src/client/v2/indexer/lookupApplicationLogs.ts b/src/client/v2/indexer/lookupApplicationLogs.ts index 0769eb0c3..f4c241614 100644 --- a/src/client/v2/indexer/lookupApplicationLogs.ts +++ b/src/client/v2/indexer/lookupApplicationLogs.ts @@ -16,7 +16,11 @@ export default class LookupApplicationLogs extends JSONRequest { * @param appID - The ID of the application which generated the logs. * @category GET */ - constructor(c: HTTPClient, intDecoding: IntDecoding, private appID: number) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private appID: number + ) { super(c, intDecoding); this.appID = appID; } diff --git a/src/client/v2/indexer/lookupApplications.ts b/src/client/v2/indexer/lookupApplications.ts index 6e764c396..d400b5afc 100644 --- a/src/client/v2/indexer/lookupApplications.ts +++ b/src/client/v2/indexer/lookupApplications.ts @@ -16,7 +16,11 @@ export default class LookupApplications extends JSONRequest { * @param index - The ID of the application to look up. * @category GET */ - constructor(c: HTTPClient, intDecoding: IntDecoding, private index: number) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private index: number + ) { super(c, intDecoding); this.index = index; } diff --git a/src/client/v2/indexer/lookupAssetBalances.ts b/src/client/v2/indexer/lookupAssetBalances.ts index c7d36c656..fcb6a817c 100644 --- a/src/client/v2/indexer/lookupAssetBalances.ts +++ b/src/client/v2/indexer/lookupAssetBalances.ts @@ -15,7 +15,11 @@ export default class LookupAssetBalances extends JSONRequest { * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assetsasset-idbalances) * @param index - The asset ID to look up. */ - constructor(c: HTTPClient, intDecoding: IntDecoding, private index: number) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private index: number + ) { super(c, intDecoding); this.index = index; } diff --git a/src/client/v2/indexer/lookupAssetByID.ts b/src/client/v2/indexer/lookupAssetByID.ts index 94a895bfd..796bf9715 100644 --- a/src/client/v2/indexer/lookupAssetByID.ts +++ b/src/client/v2/indexer/lookupAssetByID.ts @@ -15,7 +15,11 @@ export default class LookupAssetByID extends JSONRequest { * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assetsasset-id) * @param index - The asset ID to look up. */ - constructor(c: HTTPClient, intDecoding: IntDecoding, private index: number) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private index: number + ) { super(c, intDecoding); this.index = index; } diff --git a/src/client/v2/indexer/lookupAssetTransactions.ts b/src/client/v2/indexer/lookupAssetTransactions.ts index 5db17a652..bc7d90a55 100644 --- a/src/client/v2/indexer/lookupAssetTransactions.ts +++ b/src/client/v2/indexer/lookupAssetTransactions.ts @@ -16,7 +16,11 @@ export default class LookupAssetTransactions extends JSONRequest { * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assetsasset-idtransactions) * @param index - The asset ID to look up. */ - constructor(c: HTTPClient, intDecoding: IntDecoding, private index: number) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private index: number + ) { super(c, intDecoding); this.index = index; } diff --git a/src/client/v2/indexer/lookupBlock.ts b/src/client/v2/indexer/lookupBlock.ts index 7acccdcfc..7edb412e3 100644 --- a/src/client/v2/indexer/lookupBlock.ts +++ b/src/client/v2/indexer/lookupBlock.ts @@ -16,7 +16,11 @@ export default class LookupBlock extends JSONRequest { * @param round - The number of the round to look up. * @category GET */ - constructor(c: HTTPClient, intDecoding: IntDecoding, private round: number) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private round: number + ) { super(c, intDecoding); this.round = round; } diff --git a/src/client/v2/indexer/lookupTransactionByID.ts b/src/client/v2/indexer/lookupTransactionByID.ts index c87250ef1..82259c673 100644 --- a/src/client/v2/indexer/lookupTransactionByID.ts +++ b/src/client/v2/indexer/lookupTransactionByID.ts @@ -16,7 +16,11 @@ export default class LookupTransactionByID extends JSONRequest { * @param txID - The ID of the transaction to look up. * @category GET */ - constructor(c: HTTPClient, intDecoding: IntDecoding, private txID: string) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private txID: string + ) { super(c, intDecoding); this.txID = txID; } diff --git a/src/client/v2/indexer/searchForApplicationBoxes.ts b/src/client/v2/indexer/searchForApplicationBoxes.ts index 550be1dc0..e65be92e1 100644 --- a/src/client/v2/indexer/searchForApplicationBoxes.ts +++ b/src/client/v2/indexer/searchForApplicationBoxes.ts @@ -33,7 +33,11 @@ export default class SearchForApplicationBoxes extends JSONRequest< * @oaram index - application index. * @category GET */ - constructor(c: HTTPClient, intDecoding: IntDecoding, private index: number) { + constructor( + c: HTTPClient, + intDecoding: IntDecoding, + private index: number + ) { super(c, intDecoding); this.index = index; } diff --git a/src/client/v2/jsonrequest.ts b/src/client/v2/jsonrequest.ts index b4f1438bd..96da8ef76 100644 --- a/src/client/v2/jsonrequest.ts +++ b/src/client/v2/jsonrequest.ts @@ -10,7 +10,7 @@ import IntDecoding from '../../types/intDecoding.js'; */ export default abstract class JSONRequest< Data = Record, - Body = Data | Uint8Array + Body = Data | Uint8Array, > { c: HTTPClient; query: Record; @@ -44,7 +44,7 @@ export default abstract class JSONRequest< */ // eslint-disable-next-line class-methods-use-this prepare(body: Body): Data { - return (body as unknown) as Data; + return body as unknown as Data; } /** diff --git a/src/client/v2/serviceClient.ts b/src/client/v2/serviceClient.ts index 1e8abe3c4..b325964a7 100644 --- a/src/client/v2/serviceClient.ts +++ b/src/client/v2/serviceClient.ts @@ -18,12 +18,12 @@ function convertTokenStringToTokenHeader( headerIdentifier: TokenHeaderIdentifier, token: string = '' ): TokenHeader { - const tokenHeader = {}; + const tokenHeader: TokenHeader = {}; if (token === '') { return tokenHeader; } tokenHeader[headerIdentifier] = token; - return tokenHeader as TokenHeader; + return tokenHeader; } function isBaseHTTPClient( diff --git a/src/composer.ts b/src/composer.ts index e0891fb30..616a6c5d3 100644 --- a/src/composer.ts +++ b/src/composer.ts @@ -153,7 +153,7 @@ export class AtomicTransactionComposer { theClone.transactions = this.transactions.map(({ txn, signer }) => ({ // not quite a deep copy, but good enough for our purposes (modifying txn.group in buildGroup) txn: Transaction.from_obj_for_encoding({ - ...txn.get_obj_for_encoding(), + ...txn.get_obj_for_encoding()!, // erase the group ID grp: undefined, }), @@ -436,7 +436,7 @@ export class AtomicTransactionComposer { } for (let i = 0; i < resolvedRefIndexes.length; i++) { - const basicArgIndex = refArgIndexToBasicArgIndex.get(i); + const basicArgIndex = refArgIndexToBasicArgIndex.get(i)!; basicArgValues[basicArgIndex] = resolvedRefIndexes[i]; } @@ -534,7 +534,7 @@ export class AtomicTransactionComposer { indexesPerSigner.set(signer, []); } - indexesPerSigner.get(signer).push(i); + indexesPerSigner.get(signer)!.push(i); } const orderedSigners = Array.from(indexesPerSigner); @@ -560,7 +560,11 @@ export class AtomicTransactionComposer { } } - if (!signedTxns.every((sig) => sig != null)) { + function fullyPopulated(a: Array): a is Uint8Array[] { + return a.every((v) => v != null); + } + + if (!fullyPopulated(signedTxns)) { throw new Error(`Missing signatures. Got ${signedTxns}`); } @@ -752,7 +756,7 @@ export class AtomicTransactionComposer { pendingInfo ); } catch (err) { - methodResult.decodeError = err; + methodResult.decodeError = err as Error; } methodResults.push(methodResult); @@ -808,7 +812,7 @@ export class AtomicTransactionComposer { ); } } catch (err) { - returnedResult.decodeError = err; + returnedResult.decodeError = err as Error; } return returnedResult; diff --git a/src/dryrun.ts b/src/dryrun.ts index edb729c97..d9a6b317d 100644 --- a/src/dryrun.ts +++ b/src/dryrun.ts @@ -1,5 +1,6 @@ import { AlgodClient } from './client/v2/algod/algod.js'; import { + Account, AccountStateDelta, Application, ApplicationParams, @@ -43,8 +44,8 @@ export async function createDryrun({ round?: number | bigint; sources?: DryrunSource[]; }): Promise { - const appInfos = []; - const acctInfos = []; + const appInfos: Application[] = []; + const acctInfos: Account[] = []; const apps: number[] = []; const assets: number[] = []; @@ -95,7 +96,7 @@ export async function createDryrun({ // Dedupe and add creator to accts array const assetPromises = []; - for (const assetId of [...new Set(assets)]) { + for (const assetId of new Set(assets)) { assetPromises.push( client .getAssetByID(assetId) @@ -110,7 +111,7 @@ export async function createDryrun({ // Dedupe and get app info for all apps const appPromises = []; - for (const appId of [...new Set(apps)]) { + for (const appId of new Set(apps)) { appPromises.push( client .getApplicationByID(appId) @@ -137,13 +138,13 @@ export async function createDryrun({ await Promise.all(acctPromises); return new DryrunRequest({ - txns: txns.map((st) => ({ ...st, txn: st.txn.get_obj_for_encoding() })), + txns: txns.map((st) => ({ ...st, txn: st.txn.get_obj_for_encoding()! })), accounts: acctInfos, apps: appInfos, - latestTimestamp, - round, - protocolVersion, - sources, + latestTimestamp: latestTimestamp ?? 0, + round: round ?? 0, + protocolVersion: protocolVersion ?? '', + sources: sources ?? [], }); } @@ -260,15 +261,18 @@ function scratchToString( return `${newScratchIdx} = ${newScratch.uint.toString()}`; } -function stackToString(stack: DryrunStackValue[], reverse: boolean): string { +function stackToString( + stack: DryrunStackValue[], + reverse: boolean | undefined +): string { const svs = reverse ? stack.reverse() : stack; return `[${svs - .map((sv: DryrunStackValue) => { + .map((sv) => { switch (sv.type) { case 1: return `0x${bytesToHex(base64ToBytes(sv.bytes))}`; case 2: - return `${sv.uint.toString()}`; + return sv.uint.toString(); default: return ''; } @@ -302,7 +306,8 @@ class DryrunTransactionResult { traces = ['app-call-trace', 'logic-sig-trace']; - constructor(dtr: DryrunTransactionResultResponse) { + constructor(dtr: DryrunTransactionResultResponse | any) { + // Temporary type fix, will be unnecessary in following PR this.disassembly = dtr.disassembly; this.appCallMessages = dtr['app-call-messages']; this.localDeltas = dtr['local-deltas']; @@ -382,11 +387,13 @@ class DryrunTransactionResult { if (this.appCallTrace === undefined || !this.disassembly) return ''; let conf = spc; - if (spc === undefined) + if (spc !== undefined) conf = spc; + else { conf = { maxValueWidth: defaultMaxWidth, topOfStackFirst: false, - } as StackPrinterConfig; + }; + } return DryrunTransactionResult.trace( this.appCallTrace, @@ -402,12 +409,14 @@ class DryrunTransactionResult { ) return ''; - let conf = spc; - if (spc === undefined) + let conf: StackPrinterConfig; + if (spc !== undefined) conf = spc; + else { conf = { maxValueWidth: defaultMaxWidth, topOfStackFirst: true, - } as StackPrinterConfig; + }; + } return DryrunTransactionResult.trace( this.logicSigTrace, diff --git a/src/encoding/address.ts b/src/encoding/address.ts index 5868fc07a..879cab773 100644 --- a/src/encoding/address.ts +++ b/src/encoding/address.ts @@ -13,18 +13,7 @@ export const ALGORAND_ZERO_ADDRESS_STRING = // Convert "MultisigAddr" UTF-8 to byte array const MULTISIG_PREIMG2ADDR_PREFIX = new Uint8Array([ - 77, - 117, - 108, - 116, - 105, - 115, - 105, - 103, - 65, - 100, - 100, - 114, + 77, 117, 108, 116, 105, 115, 105, 103, 65, 100, 100, 114, ]); const APP_ID_PREFIX = new TextEncoder().encode('appID'); diff --git a/src/encoding/binarydata.ts b/src/encoding/binarydata.ts index 60b67319d..add1f4980 100644 --- a/src/encoding/binarydata.ts +++ b/src/encoding/binarydata.ts @@ -10,7 +10,7 @@ export function base64ToBytes(base64String: string): Uint8Array { } /* eslint-env browser */ const binString = atob(base64String); - return Uint8Array.from(binString, (m) => m.codePointAt(0)); + return Uint8Array.from(binString, (m) => m.codePointAt(0)!); } /** diff --git a/src/encoding/uint64.ts b/src/encoding/uint64.ts index 7c0fa3a70..3dc0a441e 100644 --- a/src/encoding/uint64.ts +++ b/src/encoding/uint64.ts @@ -50,6 +50,7 @@ export function decodeUint64( decodingMode: 'mixed' ): number | bigint; export function decodeUint64(data: Uint8Array, decodingMode: 'bigint'): bigint; +export function decodeUint64(data: Uint8Array): number; export function decodeUint64(data: any, decodingMode: any = 'safe') { if ( decodingMode !== 'safe' && diff --git a/src/logic/sourcemap.ts b/src/logic/sourcemap.ts index 932681c06..3bda453ab 100644 --- a/src/logic/sourcemap.ts +++ b/src/logic/sourcemap.ts @@ -71,12 +71,12 @@ export class ProgramSourceMap { this.pcToLocation = new Map(); this.sourceAndLineToPc = new Map(); - const lastLocation: SourceLocation = { + const lastLocation = { line: 0, column: 0, sourceIndex: 0, nameIndex: 0, - }; + } satisfies SourceLocation; for (const [pc, data] of pcList.entries()) { if (data.length < 4) continue; diff --git a/src/logicsig.ts b/src/logicsig.ts index 7c9dca84e..11a65f78c 100644 --- a/src/logicsig.ts +++ b/src/logicsig.ts @@ -15,13 +15,14 @@ import { MultisigMetadata } from './types/multisig.js'; interface LogicSigStorageStructure { logic: Uint8Array; - args: Uint8Array[]; + args?: Uint8Array[]; sig?: Uint8Array; msig?: EncodedMultisig; } // base64regex is the regex to test for base64 strings -const base64regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; +const base64regex = + /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; /** sanityCheckProgram performs heuristic program validation: * check if passed in bytes are Algorand address or is B64 encoded, rather than Teal bytes @@ -64,7 +65,7 @@ export class LogicSig implements LogicSigStorageStructure { tag = new TextEncoder().encode('Program'); logic: Uint8Array; - args: Uint8Array[]; + args?: Uint8Array[]; sig?: Uint8Array; msig?: EncodedMultisig; @@ -139,7 +140,7 @@ export class LogicSig implements LogicSigStorageStructure { return nacl.verify(toBeSigned, this.sig, publicKey); } - return verifyMultisig(toBeSigned, this.msig, publicKey); + return verifyMultisig(toBeSigned, this.msig!, publicKey); } /** @@ -388,7 +389,7 @@ function signLogicSigTransactionWithAddress( const signedTxn: EncodedSignedTransaction = { lsig: lsig.get_obj_for_encoding(), - txn: txn.get_obj_for_encoding(), + txn: txn.get_obj_for_encoding()!, }; if (!nacl.bytesEqual(lsigAddress, txn.sender.publicKey)) { @@ -396,7 +397,7 @@ function signLogicSigTransactionWithAddress( } return { - txID: txn.txID().toString(), + txID: txn.txID(), blob: encoding.encode(signedTxn), }; } diff --git a/src/mnemonic/mnemonic.ts b/src/mnemonic/mnemonic.ts index 92d01e096..6bf251e0c 100644 --- a/src/mnemonic/mnemonic.ts +++ b/src/mnemonic/mnemonic.ts @@ -9,11 +9,11 @@ export const NOT_IN_WORDS_LIST_ERROR_MSG = 'the mnemonic contains a word that is not in the wordlist'; // https://stackoverflow.com/a/51452614 -function toUint11Array(buffer8: Uint8Array | number[]) { - const buffer11 = []; +function toUint11Array(buffer8: Uint8Array | number[]): number[] { + const buffer11: number[] = []; let acc = 0; let accBits = 0; - function add(octet) { + function add(octet: number) { acc |= octet << accBits; accBits += 8; if (accBits >= 11) { @@ -33,11 +33,11 @@ function toUint11Array(buffer8: Uint8Array | number[]) { return buffer11; } -function applyWords(nums: number[]) { +function applyWords(nums: number[]): string[] { return nums.map((n) => english[n]); } -function computeChecksum(seed: Uint8Array) { +function computeChecksum(seed: Uint8Array): string { const hashBuffer = nacl.genericHash(seed); const uint11Hash = toUint11Array(hashBuffer); const words = applyWords(uint11Hash); @@ -66,11 +66,11 @@ export function mnemonicFromSeed(seed: Uint8Array) { // from Uint11Array // https://stackoverflow.com/a/51452614 -function toUint8Array(buffer11: number[]) { - const buffer8 = []; +function toUint8Array(buffer11: number[]): Uint8Array { + const buffer8: number[] = []; let acc = 0; let accBits = 0; - function add(ui11) { + function add(ui11: number) { acc |= ui11 << accBits; accBits += 11; while (accBits >= 8) { diff --git a/src/multisig.ts b/src/multisig.ts index 57e0c152e..5079cb156 100644 --- a/src/multisig.ts +++ b/src/multisig.ts @@ -64,7 +64,7 @@ export function createMultisigTransaction( thr: threshold, subsig: subsigs, }; - const txnForEncoding = txn.get_obj_for_encoding(); + const txnForEncoding = txn.get_obj_for_encoding()!; const signedTxn: EncodedSignedTransaction = { msig, txn: txnForEncoding, @@ -113,10 +113,10 @@ function createMultisigTransactionWithSignature( let keyExist = false; // append the multisig signature to the corresponding public key in the multisig blob - signedTxn.msig.subsig.forEach((subsig, i) => { + signedTxn.msig!.subsig.forEach((subsig, i) => { if (nacl.bytesEqual(subsig.pk, myPk)) { keyExist = true; - signedTxn.msig.subsig[i].s = rawSig; + signedTxn.msig!.subsig[i].s = rawSig; } }); if (keyExist === false) { @@ -235,6 +235,11 @@ export function mergeMultisigTransactions(multisigTxnBlobs: Uint8Array[]) { const refSigTx = encoding.decode( multisigTxnBlobs[0] ) as EncodedSignedTransaction; + if (!refSigTx.msig) { + throw new Error( + 'Invalid multisig transaction, multisig structure missing at index 0' + ); + } const refTxID = MultisigTransaction.from_obj_for_encoding( refSigTx.txn ).txID(); @@ -255,6 +260,11 @@ export function mergeMultisigTransactions(multisigTxnBlobs: Uint8Array[]) { const unisig = encoding.decode( multisigTxnBlobs[i] ) as EncodedSignedTransaction; + if (!unisig.msig) { + throw new Error( + `Invalid multisig transaction, multisig structure missing at index ${i}` + ); + } const unisigAlgoTxn = MultisigTransaction.from_obj_for_encoding(unisig.txn); if (unisigAlgoTxn.txID() !== refTxID) { @@ -393,7 +403,7 @@ export function signMultisigTransaction( let algoTxn: MultisigTransaction; let blob: Uint8Array; if (txnAlreadyBuilt) { - algoTxn = (txn as unknown) as MultisigTransaction; + algoTxn = txn as unknown as MultisigTransaction; blob = MultisigTransaction.prototype.partialSignTxn.call( algoTxn, { version, threshold, pks }, diff --git a/src/transaction.ts b/src/transaction.ts index 153ce6bfb..a2e2e3537 100644 --- a/src/transaction.ts +++ b/src/transaction.ts @@ -1,3 +1,4 @@ +// @ts-nocheck // Temporary type fix, will be unnecessary in following PR import base32 from 'hi-base32'; import { translateBoxReferences } from './boxStorage.js'; import * as address from './encoding/address.js'; @@ -36,7 +37,8 @@ const KEYREG_SELECTION_KEY_LENGTH = 32; const KEYREG_STATE_PROOF_KEY_LENGTH = 64; type AnyTransactionWithParams = MustHaveSuggestedParams; -type AnyTransactionWithParamsInline = MustHaveSuggestedParamsInline; +type AnyTransactionWithParamsInline = + MustHaveSuggestedParamsInline; /** * A modified version of the transaction params. Represents the internal structure that the Transaction class uses @@ -536,7 +538,7 @@ export class Transaction implements TransactionStorageStructure { // are all undefined/false // Remove unwanted properties and store transaction on instance - delete ((txn as unknown) as AnyTransactionWithParams).suggestedParams; + delete (txn as unknown as AnyTransactionWithParams).suggestedParams; Object.assign(this, utils.removeUndefinedProperties(txn)); // Modify Fee diff --git a/src/types/transactions/base.ts b/src/types/transactions/base.ts index e39973ec7..9294f4536 100644 --- a/src/types/transactions/base.ts +++ b/src/types/transactions/base.ts @@ -332,32 +332,32 @@ export interface TransactionParams { /** * Restricts number of ints in per-user local state */ - appLocalInts: number; + appLocalInts?: number; /** * Restricts number of byte slices in per-user local state */ - appLocalByteSlices: number; + appLocalByteSlices?: number; /** * Restricts number of ints in global state */ - appGlobalInts: number; + appGlobalInts?: number; /** * Restricts number of byte slices in global state */ - appGlobalByteSlices: number; + appGlobalByteSlices?: number; /** * The compiled TEAL that approves a transaction */ - appApprovalProgram: Uint8Array; + appApprovalProgram?: Uint8Array; /** * The compiled TEAL program that runs when clearing state */ - appClearProgram: Uint8Array; + appClearProgram?: Uint8Array; /** * Array of Uint8Array, any additional arguments to the application diff --git a/src/types/transactions/builder.ts b/src/types/transactions/builder.ts index e194a6f6a..a5b1deb12 100644 --- a/src/types/transactions/builder.ts +++ b/src/types/transactions/builder.ts @@ -47,7 +47,7 @@ export type TransactionBase = */ export type ConstructTransaction< A = {}, - O extends Partial = {} + O extends Partial = {}, > = DistributiveOverwrite; /** @@ -62,8 +62,7 @@ export type MustHaveSuggestedParams = Extract< * Only accept transaction objects that include suggestedParams inline instead of being * enclosed in its own property */ -export type MustHaveSuggestedParamsInline< - T extends ConstructTransaction -> = Extract; +export type MustHaveSuggestedParamsInline = + Extract; export default ConstructTransaction; diff --git a/src/types/transactions/encoded.ts b/src/types/transactions/encoded.ts index be9689ef0..fe777e7a0 100644 --- a/src/types/transactions/encoded.ts +++ b/src/types/transactions/encoded.ts @@ -132,7 +132,7 @@ export interface EncodedTransaction { /** * genesisID */ - gen: string; + gen?: string; /** * genesisHash diff --git a/src/types/utils.ts b/src/types/utils.ts index 83e7e77f5..ff28e48e5 100644 --- a/src/types/utils.ts +++ b/src/types/utils.ts @@ -5,8 +5,8 @@ export type Expand = T extends (...args: infer A) => infer R ? (...args: Expand) => Expand : T extends infer O - ? { [K in keyof O]: O[K] } - : never; + ? { [K in keyof O]: O[K] } + : never; /** * Same as TypeScript's Pick, but will distribute the Pick over unions @@ -59,5 +59,5 @@ export type RenameProperties< T, R extends { [K in keyof R]: K extends keyof T ? PropertyKey : 'Error: key not in T'; - } + }, > = { [P in keyof T as P extends keyof R ? R[P] : P]: T[P] }; diff --git a/tests/1.Mnemonics_test.js b/tests/1.Mnemonics_test.ts similarity index 71% rename from tests/1.Mnemonics_test.js rename to tests/1.Mnemonics_test.ts index de8b1835a..305b6849f 100644 --- a/tests/1.Mnemonics_test.js +++ b/tests/1.Mnemonics_test.ts @@ -1,8 +1,8 @@ /* eslint-env mocha */ -const assert = require('assert'); -const algosdk = require('../src/index'); -const nacl = require('../src/nacl/naclWrappers'); -const passphrase = require('../src/mnemonic/mnemonic'); +import assert from 'assert'; +import algosdk from '../src/index.js'; +import { randomBytes } from '../src/nacl/naclWrappers.js'; +import * as passphrase from '../src/mnemonic/mnemonic.js'; describe('#mnemonic', () => { it('should return a 25 words passphrase', () => { @@ -13,7 +13,7 @@ describe('#mnemonic', () => { it('should be able to be converted back to key', () => { for (let i = 0; i < 50; i++) { - const seed = nacl.randomBytes(32); + const seed = randomBytes(32); const mn = passphrase.mnemonicFromSeed(seed); const keyTarget = passphrase.seedFromMnemonic(mn); const truncatedKey = new Uint8Array(seed); @@ -32,37 +32,28 @@ describe('#mnemonic', () => { }); it('should fail with the wrong checksum', () => { - const seed = nacl.randomBytes(32); + const seed = randomBytes(32); let mn = passphrase.mnemonicFromSeed(seed); // Shuffle some bits const lastChar = mn.charAt(mn.length - 1) === 'h' ? 'i' : 'h'; mn = mn.substring(0, mn.length - 2) + lastChar; - assert.throws( - () => { - passphrase.seedFromMnemonic(mn); - }, - (err) => err.message === passphrase.FAIL_TO_DECODE_MNEMONIC_ERROR_MSG - ); + assert.throws(() => { + passphrase.seedFromMnemonic(mn); + }, new Error(passphrase.FAIL_TO_DECODE_MNEMONIC_ERROR_MSG)); }); it('should fail to verify an invalid mnemonic', () => { const mn = 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon venue abandon abandon abandon abandon abandon abandon abandon abandon abandon invest'; - assert.throws( - () => { - passphrase.seedFromMnemonic(mn); - }, - (err) => err.message === passphrase.FAIL_TO_DECODE_MNEMONIC_ERROR_MSG - ); + assert.throws(() => { + passphrase.seedFromMnemonic(mn); + }, new Error(passphrase.FAIL_TO_DECODE_MNEMONIC_ERROR_MSG)); }); it('should fail to verify an mnemonic with a word that is not in the list ', () => { const mn = 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon venues abandon abandon abandon abandon abandon abandon abandon abandon abandon invest'; - assert.throws( - () => { - passphrase.seedFromMnemonic(mn); - }, - (err) => err.message === passphrase.NOT_IN_WORDS_LIST_ERROR_MSG - ); + assert.throws(() => { + passphrase.seedFromMnemonic(mn); + }, new Error(passphrase.NOT_IN_WORDS_LIST_ERROR_MSG)); }); }); diff --git a/tests/10.ABI.ts b/tests/10.ABI.ts index 1cb1c06e8..489ff0666 100644 --- a/tests/10.ABI.ts +++ b/tests/10.ABI.ts @@ -266,20 +266,7 @@ describe('ABI encoding', () => { new ABIStringType(), 'What’s new', new Uint8Array([ - 0, - 12, - 87, - 104, - 97, - 116, - 226, - 128, - 153, - 115, - 32, - 110, - 101, - 119, + 0, 12, 87, 104, 97, 116, 226, 128, 153, 115, 32, 110, 101, 119, ]) ), newTestCase( @@ -320,30 +307,7 @@ describe('ABI encoding', () => { new ABIArrayStaticType(new ABIUintType(64), 3), [BigInt(1), BigInt(2), 3], // Deliberately mix BigInt and int new Uint8Array([ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 3, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, ]) ), newTestCase( diff --git a/tests/2.Encoding.js b/tests/2.Encoding.ts similarity index 57% rename from tests/2.Encoding.js rename to tests/2.Encoding.ts index 0a861e561..796aed6a9 100644 --- a/tests/2.Encoding.js +++ b/tests/2.Encoding.ts @@ -1,7 +1,11 @@ /* eslint-env mocha */ -const assert = require('assert'); -const algosdk = require('../src/index'); -const utils = require('../src/utils/utils'); +import assert from 'assert'; +import algosdk from '../src/index.js'; +import BaseModel, { + // eslint-disable-next-line camelcase + _get_obj_for_encoding, +} from '../src/client/v2/basemodel.js'; +import * as utils from '../src/utils/utils.js'; const ERROR_CONTAINS_EMPTY_STRING = 'The object contains empty or 0 values. First empty or 0 value encountered during encoding: '; @@ -38,7 +42,7 @@ describe('encoding', () => { () => { algosdk.encodeObj(a); }, - (err) => err.toString().includes(ERROR_CONTAINS_EMPTY_STRING) + (err: Error) => err.toString().includes(ERROR_CONTAINS_EMPTY_STRING) ); const b = { a: 4, B: [] }; @@ -46,7 +50,7 @@ describe('encoding', () => { () => { algosdk.encodeObj(b); }, - (err) => err.toString().includes(ERROR_CONTAINS_EMPTY_STRING) + (err: Error) => err.toString().includes(ERROR_CONTAINS_EMPTY_STRING) ); const c = { a: 4, B: 0 }; @@ -54,7 +58,7 @@ describe('encoding', () => { () => { algosdk.encodeObj(c); }, - (err) => err.toString().includes(ERROR_CONTAINS_EMPTY_STRING) + (err: Error) => err.toString().includes(ERROR_CONTAINS_EMPTY_STRING) ); }); @@ -82,15 +86,17 @@ describe('encoding', () => { it('should safely encode/decode bigints', () => { const beforeZero = BigInt('0'); - const afterZero = algosdk.decodeObj(algosdk.encodeObj(beforeZero)); + const afterZero = algosdk.decodeObj(algosdk.encodeObj(beforeZero as any)); // eslint-disable-next-line eqeqeq assert.ok(beforeZero == afterZero); // after is a Number because 0 fits into a Number - so we do this loose comparison const beforeLarge = BigInt('18446744073709551612'); // larger than a Number, but fits into a uint64 - const afterLarge = algosdk.decodeObj(algosdk.encodeObj(beforeLarge)); + const afterLarge = algosdk.decodeObj( + algosdk.encodeObj(beforeLarge as any) + ); assert.strictEqual(beforeLarge, afterLarge); const beforeTooLarge = BigInt('18446744073709551616'); // larger than even fits into a uint64. we do not want to work with these too-large numbers const afterTooLarge = algosdk.decodeObj( - algosdk.encodeObj(beforeTooLarge) + algosdk.encodeObj(beforeTooLarge as any) ); assert.notStrictEqual(beforeTooLarge, afterTooLarge); }); @@ -115,7 +121,7 @@ describe('encoding', () => { describe('uint64', () => { it('should encode properly', () => { - const testcases = [ + const testcases: Array<[number | bigint, Uint8Array]> = [ [0, Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0])], [0n, Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0])], [1, Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 1])], @@ -172,7 +178,7 @@ describe('encoding', () => { it('should decode properly in default mode', () => { // should be the same as safe mode - const testcases = [ + const testcases: Array<[Uint8Array, number | bigint]> = [ [Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0]), 0], [Uint8Array.from([0]), 0], [Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 1]), 1], @@ -214,7 +220,7 @@ describe('encoding', () => { }); it('should decode properly in safe mode', () => { - const testcases = [ + const testcases: Array<[Uint8Array, number | bigint]> = [ [Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0]), 0], [Uint8Array.from([0]), 0], [Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 1]), 1], @@ -257,7 +263,7 @@ describe('encoding', () => { }); it('should decode properly in mixed mode', () => { - const testcases = [ + const testcases: Array<[Uint8Array, number | bigint]> = [ [Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0]), 0], [Uint8Array.from([0]), 0], [Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 1]), 1], @@ -297,7 +303,7 @@ describe('encoding', () => { }); it('should decode properly in bigint mode', () => { - const testcases = [ + const testcases: Array<[Uint8Array, bigint]> = [ [Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0]), 0n], [Uint8Array.from([0]), 0n], [Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 1]), 1n], @@ -347,7 +353,7 @@ describe('encoding', () => { assert.throws(() => algosdk.decodeUint64( Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0]), - 'unknown' + 'unknown' as any ) ); }); @@ -357,7 +363,12 @@ describe('encoding', () => { it('should parse null', () => { const input = 'null'; - for (const intDecoding of ['default', 'safe', 'mixed', 'bigint']) { + for (const intDecoding of [ + algosdk.IntDecoding.DEFAULT, + algosdk.IntDecoding.SAFE, + algosdk.IntDecoding.MIXED, + algosdk.IntDecoding.BIGINT, + ]) { const actual = utils.parseJSON(input, { intDecoding }); const expected = null; @@ -372,7 +383,12 @@ describe('encoding', () => { it('should parse number', () => { const inputs = ['17', '9007199254740991']; for (const input of inputs) { - for (const intDecoding of ['default', 'safe', 'mixed', 'bigint']) { + for (const intDecoding of [ + algosdk.IntDecoding.DEFAULT, + algosdk.IntDecoding.SAFE, + algosdk.IntDecoding.MIXED, + algosdk.IntDecoding.BIGINT, + ]) { const actual = utils.parseJSON(input, { intDecoding }); const expected = intDecoding === 'bigint' ? BigInt(input) : Number(input); @@ -388,7 +404,12 @@ describe('encoding', () => { it('should parse empty object', () => { const input = '{}'; - for (const intDecoding of ['default', 'safe', 'mixed', 'bigint']) { + for (const intDecoding of [ + algosdk.IntDecoding.DEFAULT, + algosdk.IntDecoding.SAFE, + algosdk.IntDecoding.MIXED, + algosdk.IntDecoding.BIGINT, + ]) { const actual = utils.parseJSON(input, { intDecoding }); const expected = {}; @@ -403,7 +424,12 @@ describe('encoding', () => { it('should parse populated object', () => { const input = '{"a":1,"b":"value","c":[1,2,3],"d":null,"e":{},"f":true}'; - for (const intDecoding of ['default', 'safe', 'mixed', 'bigint']) { + for (const intDecoding of [ + algosdk.IntDecoding.DEFAULT, + algosdk.IntDecoding.SAFE, + algosdk.IntDecoding.MIXED, + algosdk.IntDecoding.BIGINT, + ]) { const actual = utils.parseJSON(input, { intDecoding }); let expected; @@ -439,9 +465,15 @@ describe('encoding', () => { const input = '{"a":0,"b":9007199254740991,"c":9007199254740992,"d":9223372036854775807}'; - assert.throws(() => utils.parseJSON(input, { intDecoding: 'safe' })); + assert.throws(() => + utils.parseJSON(input, { intDecoding: algosdk.IntDecoding.SAFE }) + ); - for (const intDecoding of ['default', 'mixed', 'bigint']) { + for (const intDecoding of [ + algosdk.IntDecoding.DEFAULT, + algosdk.IntDecoding.MIXED, + algosdk.IntDecoding.BIGINT, + ]) { const actual = utils.parseJSON(input, { intDecoding }); let expected; @@ -479,9 +511,14 @@ describe('encoding', () => { it('should parse empty array', () => { const input = '[]'; - for (const intDecoding of ['default', 'safe', 'mixed', 'bigint']) { + for (const intDecoding of [ + algosdk.IntDecoding.DEFAULT, + algosdk.IntDecoding.SAFE, + algosdk.IntDecoding.MIXED, + algosdk.IntDecoding.BIGINT, + ]) { const actual = utils.parseJSON(input, { intDecoding }); - const expected = []; + const expected: unknown[] = []; assert.deepStrictEqual( actual, @@ -494,7 +531,12 @@ describe('encoding', () => { it('should parse populated array', () => { const input = '["test",2,null,[7],{"a":9.5},true]'; - for (const intDecoding of ['default', 'safe', 'mixed', 'bigint']) { + for (const intDecoding of [ + algosdk.IntDecoding.DEFAULT, + algosdk.IntDecoding.SAFE, + algosdk.IntDecoding.MIXED, + algosdk.IntDecoding.BIGINT, + ]) { const actual = utils.parseJSON(input, { intDecoding }); let expected; @@ -515,9 +557,15 @@ describe('encoding', () => { it('should parse array with BigInt', () => { const input = '[0,9007199254740991,9007199254740992,9223372036854775807]'; - assert.throws(() => utils.parseJSON(input, { intDecoding: 'safe' })); + assert.throws(() => + utils.parseJSON(input, { intDecoding: algosdk.IntDecoding.SAFE }) + ); - for (const intDecoding of ['default', 'mixed', 'bigint']) { + for (const intDecoding of [ + algosdk.IntDecoding.DEFAULT, + algosdk.IntDecoding.MIXED, + algosdk.IntDecoding.BIGINT, + ]) { const actual = utils.parseJSON(input, { intDecoding }); let expected; @@ -555,27 +603,11 @@ describe('encoding', () => { describe('Base64 decoding utilities', () => { it('should decode bytes from Base64', () => { - const testCases = [ + const testCases: Array<[Uint8Array, string]> = [ [ Uint8Array.from([ - 97, - 32, - 196, - 128, - 32, - 240, - 144, - 128, - 128, - 32, - 230, - 150, - 135, - 32, - 240, - 159, - 166, - 132, + 97, 32, 196, 128, 32, 240, 144, 128, 128, 32, 230, 150, 135, 32, + 240, 159, 166, 132, ]), // a Ā 𐀀 文 🦄 'YSDEgCDwkICAIOaWhyDwn6aE', ], @@ -643,4 +675,380 @@ describe('encoding', () => { } }); }); + describe('_get_obj_for_encoding', () => { + interface TestCase { + input: any; + notBinaryNotOmitEmpty: any; + binaryNotOmitEmpty: any; + notBinaryOmitEmpty: any; + binaryOmitEmpty: any; + } + + const testcases: TestCase[] = [ + { + input: undefined, + notBinaryNotOmitEmpty: undefined, + binaryNotOmitEmpty: undefined, + notBinaryOmitEmpty: undefined, + binaryOmitEmpty: undefined, + }, + { + input: null, + notBinaryNotOmitEmpty: null, + binaryNotOmitEmpty: null, + notBinaryOmitEmpty: undefined, + binaryOmitEmpty: undefined, + }, + { + input: 1, + notBinaryNotOmitEmpty: 1, + binaryNotOmitEmpty: 1, + notBinaryOmitEmpty: 1, + binaryOmitEmpty: 1, + }, + { + input: 1n, + notBinaryNotOmitEmpty: 1n, + binaryNotOmitEmpty: 1n, + notBinaryOmitEmpty: 1n, + binaryOmitEmpty: 1n, + }, + { + input: 0, + notBinaryNotOmitEmpty: 0, + binaryNotOmitEmpty: 0, + notBinaryOmitEmpty: undefined, + binaryOmitEmpty: undefined, + }, + { + input: 0n, + notBinaryNotOmitEmpty: 0n, + binaryNotOmitEmpty: 0n, + notBinaryOmitEmpty: undefined, + binaryOmitEmpty: undefined, + }, + { + input: true, + notBinaryNotOmitEmpty: true, + binaryNotOmitEmpty: true, + notBinaryOmitEmpty: true, + binaryOmitEmpty: true, + }, + { + input: false, + notBinaryNotOmitEmpty: false, + binaryNotOmitEmpty: false, + notBinaryOmitEmpty: undefined, + binaryOmitEmpty: undefined, + }, + { + input: 'abc', + notBinaryNotOmitEmpty: 'abc', + binaryNotOmitEmpty: 'abc', + notBinaryOmitEmpty: 'abc', + binaryOmitEmpty: 'abc', + }, + { + input: '', + notBinaryNotOmitEmpty: '', + binaryNotOmitEmpty: '', + notBinaryOmitEmpty: undefined, + binaryOmitEmpty: undefined, + }, + { + input: Uint8Array.from([1, 2, 3]), + notBinaryNotOmitEmpty: 'AQID', + binaryNotOmitEmpty: Uint8Array.from([1, 2, 3]), + notBinaryOmitEmpty: 'AQID', + binaryOmitEmpty: Uint8Array.from([1, 2, 3]), + }, + { + input: Uint8Array.from([]), + notBinaryNotOmitEmpty: '', + binaryNotOmitEmpty: Uint8Array.from([]), + notBinaryOmitEmpty: undefined, + binaryOmitEmpty: undefined, + }, + { + input: [99], + notBinaryNotOmitEmpty: [99], + binaryNotOmitEmpty: [99], + notBinaryOmitEmpty: [99], + binaryOmitEmpty: [99], + }, + { + input: [], + notBinaryNotOmitEmpty: [], + binaryNotOmitEmpty: [], + notBinaryOmitEmpty: undefined, + binaryOmitEmpty: undefined, + }, + { + input: [0], + notBinaryNotOmitEmpty: [0], + binaryNotOmitEmpty: [0], + notBinaryOmitEmpty: [0], + binaryOmitEmpty: [0], + }, + { + input: [Uint8Array.from([1, 2, 3])], + notBinaryNotOmitEmpty: ['AQID'], + binaryNotOmitEmpty: [Uint8Array.from([1, 2, 3])], + notBinaryOmitEmpty: ['AQID'], + binaryOmitEmpty: [Uint8Array.from([1, 2, 3])], + }, + { + input: [Uint8Array.from([])], + notBinaryNotOmitEmpty: [''], + binaryNotOmitEmpty: [Uint8Array.from([])], + notBinaryOmitEmpty: [''], + binaryOmitEmpty: [Uint8Array.from([])], + }, + { + input: { a: 1 }, + notBinaryNotOmitEmpty: { a: 1 }, + binaryNotOmitEmpty: { a: 1 }, + notBinaryOmitEmpty: { a: 1 }, + binaryOmitEmpty: { a: 1 }, + }, + { + input: {}, + notBinaryNotOmitEmpty: {}, + binaryNotOmitEmpty: {}, + notBinaryOmitEmpty: undefined, + binaryOmitEmpty: undefined, + }, + { + input: { a: 1, b: 0 }, + notBinaryNotOmitEmpty: { a: 1, b: 0 }, + binaryNotOmitEmpty: { a: 1, b: 0 }, + notBinaryOmitEmpty: { a: 1 }, + binaryOmitEmpty: { a: 1 }, + }, + { + input: { a: { b: 1 } }, + notBinaryNotOmitEmpty: { a: { b: 1 } }, + binaryNotOmitEmpty: { a: { b: 1 } }, + notBinaryOmitEmpty: { a: { b: 1 } }, + binaryOmitEmpty: { a: { b: 1 } }, + }, + { + input: { a: {} }, + notBinaryNotOmitEmpty: { a: {} }, + binaryNotOmitEmpty: { a: {} }, + notBinaryOmitEmpty: undefined, + binaryOmitEmpty: undefined, + }, + { + input: { a: { b: 0 } }, + notBinaryNotOmitEmpty: { a: { b: 0 } }, + binaryNotOmitEmpty: { a: { b: 0 } }, + notBinaryOmitEmpty: undefined, + binaryOmitEmpty: undefined, + }, + { + input: { a: { b: 0, c: 1 } }, + notBinaryNotOmitEmpty: { a: { b: 0, c: 1 } }, + binaryNotOmitEmpty: { a: { b: 0, c: 1 } }, + notBinaryOmitEmpty: { a: { c: 1 } }, + binaryOmitEmpty: { a: { c: 1 } }, + }, + { + input: { a: { b: Uint8Array.from([1, 2, 3]) } }, + notBinaryNotOmitEmpty: { a: { b: 'AQID' } }, + binaryNotOmitEmpty: { a: { b: Uint8Array.from([1, 2, 3]) } }, + notBinaryOmitEmpty: { a: { b: 'AQID' } }, + binaryOmitEmpty: { a: { b: Uint8Array.from([1, 2, 3]) } }, + }, + { + input: { a: { b: Uint8Array.from([]) } }, + notBinaryNotOmitEmpty: { a: { b: '' } }, + binaryNotOmitEmpty: { a: { b: Uint8Array.from([]) } }, + notBinaryOmitEmpty: undefined, + binaryOmitEmpty: undefined, + }, + { + input: [{}], + notBinaryNotOmitEmpty: [{}], + binaryNotOmitEmpty: [{}], + notBinaryOmitEmpty: [{}], + binaryOmitEmpty: [{}], + }, + { + input: [{ a: 0 }], + notBinaryNotOmitEmpty: [{ a: 0 }], + binaryNotOmitEmpty: [{ a: 0 }], + notBinaryOmitEmpty: [{}], + binaryOmitEmpty: [{}], + }, + { + input: [[{ a: 0 }]], + notBinaryNotOmitEmpty: [[{ a: 0 }]], + binaryNotOmitEmpty: [[{ a: 0 }]], + notBinaryOmitEmpty: [[{}]], + binaryOmitEmpty: [[{}]], + }, + { + input: [[]], + notBinaryNotOmitEmpty: [[]], + binaryNotOmitEmpty: [[]], + notBinaryOmitEmpty: [[]], + binaryOmitEmpty: [[]], + }, + { + input: [null], + notBinaryNotOmitEmpty: [null], + binaryNotOmitEmpty: [null], + notBinaryOmitEmpty: [null], + binaryOmitEmpty: [null], + }, + ]; + + for (let i = 0; i < testcases.length; i++) { + const tc = testcases[i]; + it(`should correctly encode case ${i}: '${tc.input}'`, () => { + const actualNotBinaryNotOmitEmpty = _get_obj_for_encoding( + tc.input, + false, + false + ); + assert.deepStrictEqual( + actualNotBinaryNotOmitEmpty, + tc.notBinaryNotOmitEmpty + ); + + const actualBinaryNotOmitEmpty = _get_obj_for_encoding( + tc.input, + true, + false + ); + assert.deepStrictEqual(actualBinaryNotOmitEmpty, tc.binaryNotOmitEmpty); + + const actualNotBinaryOmitEmpty = _get_obj_for_encoding( + tc.input, + false, + true + ); + assert.deepStrictEqual(actualNotBinaryOmitEmpty, tc.notBinaryOmitEmpty); + + const actualBinaryOmitEmpty = _get_obj_for_encoding( + tc.input, + true, + true + ); + assert.deepStrictEqual(actualBinaryOmitEmpty, tc.binaryOmitEmpty); + }); + } + }); + describe('BaseModel', () => { + class ExampleModel extends BaseModel { + constructor( + public a: number, + public b: string, + public c: Uint8Array + ) { + super(); + + this.attribute_map = { + a: 'a', + b: 'b', + c: 'c', + }; + } + + toString(): string { + return `ExampleModel(a=${this.a}, b=${this.b}, c=${this.c})`; + } + } + + class EmptyModel extends BaseModel { + constructor() { + super(); + + this.attribute_map = {}; + } + + // eslint-disable-next-line class-methods-use-this + toString(): string { + return 'EmptyModel()'; + } + } + + interface TestCase { + input: BaseModel; + notBinaryNotOmitEmpty: any; + binaryNotOmitEmpty: any; + notBinaryOmitEmpty: any; + binaryOmitEmpty: any; + } + + const testcases: TestCase[] = [ + { + input: new ExampleModel(99, 'x', Uint8Array.from([1, 2, 3])), + notBinaryNotOmitEmpty: { a: 99, b: 'x', c: 'AQID' }, + binaryNotOmitEmpty: { a: 99, b: 'x', c: Uint8Array.from([1, 2, 3]) }, + notBinaryOmitEmpty: { a: 99, b: 'x', c: 'AQID' }, + binaryOmitEmpty: { a: 99, b: 'x', c: Uint8Array.from([1, 2, 3]) }, + }, + { + input: new ExampleModel(99, '', Uint8Array.from([1, 2, 3])), + notBinaryNotOmitEmpty: { a: 99, b: '', c: 'AQID' }, + binaryNotOmitEmpty: { a: 99, b: '', c: Uint8Array.from([1, 2, 3]) }, + notBinaryOmitEmpty: { a: 99, c: 'AQID' }, + binaryOmitEmpty: { a: 99, c: Uint8Array.from([1, 2, 3]) }, + }, + { + input: new ExampleModel(99, '', Uint8Array.from([])), + notBinaryNotOmitEmpty: { a: 99, b: '', c: '' }, + binaryNotOmitEmpty: { a: 99, b: '', c: Uint8Array.from([]) }, + notBinaryOmitEmpty: { a: 99 }, + binaryOmitEmpty: { a: 99 }, + }, + { + input: new ExampleModel(0, '', Uint8Array.from([])), + notBinaryNotOmitEmpty: { a: 0, b: '', c: '' }, + binaryNotOmitEmpty: { a: 0, b: '', c: Uint8Array.from([]) }, + notBinaryOmitEmpty: undefined, + binaryOmitEmpty: undefined, + }, + { + input: new EmptyModel(), + notBinaryNotOmitEmpty: {}, + binaryNotOmitEmpty: {}, + notBinaryOmitEmpty: undefined, + binaryOmitEmpty: undefined, + }, + ]; + + for (let i = 0; i < testcases.length; i++) { + const tc = testcases[i]; + it(`should correctly encode case ${i}: '${tc.input}'`, () => { + const model = tc.input; + + const actualNotBinaryNotOmitEmpty = model.get_obj_for_encoding( + false, + false + ); + assert.deepStrictEqual( + actualNotBinaryNotOmitEmpty, + tc.notBinaryNotOmitEmpty + ); + + const actualBinaryNotOmitEmpty = model.get_obj_for_encoding( + true, + false + ); + assert.deepStrictEqual(actualBinaryNotOmitEmpty, tc.binaryNotOmitEmpty); + + const actualNotBinaryOmitEmpty = model.get_obj_for_encoding( + false, + true + ); + assert.deepStrictEqual(actualNotBinaryOmitEmpty, tc.notBinaryOmitEmpty); + + const actualBinaryOmitEmpty = model.get_obj_for_encoding(true, true); + assert.deepStrictEqual(actualBinaryOmitEmpty, tc.binaryOmitEmpty); + }); + } + }); }); diff --git a/tests/3.Address.js b/tests/3.Address.ts similarity index 77% rename from tests/3.Address.js rename to tests/3.Address.ts index 39d302621..df0ebbad9 100644 --- a/tests/3.Address.js +++ b/tests/3.Address.ts @@ -1,8 +1,8 @@ /* eslint-env mocha */ -const assert = require('assert'); -const nacl = require('../src/nacl/naclWrappers'); -const algosdk = require('../src/index'); -const address = require('../src/encoding/address'); +import assert from 'assert'; +import * as nacl from '../src/nacl/naclWrappers.js'; +import algosdk from '../src/index.js'; +import * as address from '../src/encoding/address.js'; describe('address', () => { describe('#isValid', () => { @@ -13,7 +13,7 @@ describe('address', () => { const correctChecksum = new Uint8Array([122, 240, 2, 74]); const malformedAddress1 = 'MO2H6ZU47Q36GJ6GVHUKGEBEQINN7ZWVACMWZQGIYUOE3RBSRVYHV4ACJ'; - const maldformedAddress2 = 123; + const malformedAddress2 = 123 as any; const malformedAddress3 = 'MO2H6ZU47Q36GJ6GVHUKGEBEQINN7ZWVACererZQGI113RBSRVYHV4ACJI'; const wrongChecksumAddress = @@ -27,34 +27,22 @@ describe('address', () => { }); it('should fail to verify a malformed Algorand address', () => { - assert.throws( - () => { - algosdk.decodeAddress(malformedAddress1); - }, - (err) => err.message === address.MALFORMED_ADDRESS_ERROR_MSG - ); - assert.throws( - () => { - algosdk.decodeAddress(maldformedAddress2); - }, - (err) => err.message === address.MALFORMED_ADDRESS_ERROR_MSG - ); + assert.throws(() => { + algosdk.decodeAddress(malformedAddress1); + }, new Error(address.MALFORMED_ADDRESS_ERROR_MSG)); + assert.throws(() => { + algosdk.decodeAddress(malformedAddress2); + }, new Error(address.MALFORMED_ADDRESS_ERROR_MSG)); // Catch an exception possibly thrown by base32 decoding function - assert.throws( - () => { - algosdk.decodeAddress(malformedAddress3); - }, - (err) => err.message === 'Invalid base32 characters' - ); + assert.throws(() => { + algosdk.decodeAddress(malformedAddress3); + }, new Error('Invalid base32 characters')); }); it('should fail to verify a checksum for an invalid Algorand address', () => { - assert.throws( - () => { - algosdk.decodeAddress(wrongChecksumAddress); - }, - (err) => err.message === address.CHECKSUM_ADDRESS_ERROR_MSG - ); + assert.throws(() => { + algosdk.decodeAddress(wrongChecksumAddress); + }, new Error(address.CHECKSUM_ADDRESS_ERROR_MSG)); }); // Check helper functions @@ -80,7 +68,8 @@ describe('address', () => { () => { algosdk.encodeAddress(pk); }, - (err) => err.message.includes(address.MALFORMED_ADDRESS_ERROR_MSG) + (err: Error) => + err.message.includes(address.MALFORMED_ADDRESS_ERROR_MSG) ); }); diff --git a/tests/5.Transaction.js b/tests/5.Transaction.ts similarity index 82% rename from tests/5.Transaction.js rename to tests/5.Transaction.ts index 797b92179..ee4920cd1 100644 --- a/tests/5.Transaction.js +++ b/tests/5.Transaction.ts @@ -1,34 +1,10 @@ /* eslint-env mocha */ -const assert = require('assert'); -const algosdk = require('../src/index'); -const { translateBoxReferences } = require('../src/boxStorage'); -const group = require('../src/group'); +import assert from 'assert'; +import algosdk from '../src/index.js'; +import { translateBoxReferences } from '../src/boxStorage.js'; +import * as group from '../src/group.js'; describe('Sign', () => { - /* eslint-disable no-console */ - const originalLogFunction = console.log; - let logs; - - beforeEach(() => { - logs = ''; - - // Mock console.log to suppress logs during tests - console.log = (msg) => { - logs += `${msg}\n`; - }; - }); - - afterEach(function Cleanup() { - // Unmock console.log - console.log = originalLogFunction; - - // Unsuppress logs if the test failed - if (this.currentTest.state === 'failed') { - console.log(logs); - } - }); - /* eslint-enable no-console */ - it('should not modify input arrays', () => { const appArgs = [Uint8Array.from([1, 2]), Uint8Array.from([3, 4])]; const appAccounts = [ @@ -52,7 +28,7 @@ describe('Sign', () => { appForeignApps, appForeignAssets, boxes, - }; + } as any; // Temporary type fix, will be unnecessary in following PR const txn = new algosdk.Transaction(o); assert.deepStrictEqual(appArgs, [ Uint8Array.from([1, 2]), @@ -65,7 +41,7 @@ describe('Sign', () => { assert.deepStrictEqual(appForeignApps, [17, 200]); assert.deepStrictEqual(appForeignAssets, [7, 8, 9]); assert.ok(txn.appArgs !== appArgs); - assert.ok(txn.appAccounts !== appAccounts); + assert.ok((txn.appAccounts as any) !== appAccounts); assert.ok(txn.appForeignApps !== appForeignApps); assert.ok(txn.appForeignAssets !== appForeignAssets); assert.ok(txn.boxes !== boxes); @@ -81,7 +57,7 @@ describe('Sign', () => { lastValid: 61, genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', note: new Uint8Array(0), - }; + } as any; // Temporary type fix, will be unnecessary in following PR assert.doesNotThrow(() => new algosdk.Transaction(o)); }); @@ -95,10 +71,10 @@ describe('Sign', () => { lastValid: 61, genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', note: new Uint8Array([123, 12, 200]), - }; + } as any; // Temporary type fix, will be unnecessary in following PR const txn = new algosdk.Transaction(o); assert.strictEqual(txn.fee, 1000); // 1000 is the v5 min txn fee - const txnEnc = txn.get_obj_for_encoding(); + const txnEnc = txn.get_obj_for_encoding()!; assert.strictEqual(txnEnc.fee, 1000); }); @@ -113,7 +89,7 @@ describe('Sign', () => { lastValid: 61, genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', note: new Uint8Array([123, 12, 200]), - }; + } as any; // Temporary type fix, will be unnecessary in following PR const txn = new algosdk.Transaction(o); assert.equal(txn.fee, 0); }); @@ -129,11 +105,11 @@ describe('Sign', () => { lastValid: 61, genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', note: new Uint8Array([123, 12, 200]), - }; + } as any; // Temporary type fix, will be unnecessary in following PR const txn = new algosdk.Transaction(o); assert.equal(txn.fee, 10); const txnEnc = txn.get_obj_for_encoding(); - assert.equal(txnEnc.fee, 10); + assert.equal(txnEnc!.fee, 10); }); it('should not complain on a missing genesisID', () => { @@ -146,7 +122,7 @@ describe('Sign', () => { lastValid: 61, genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', note: new Uint8Array([123, 12, 200]), - }; + } as any; // Temporary type fix, will be unnecessary in following PR assert.doesNotThrow(() => new algosdk.Transaction(o)); }); @@ -177,69 +153,75 @@ describe('Sign', () => { lastValid: 61, genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', note: 'new Uint8Array(0)', - }; + } as any; // Temporary type fix, will be unnecessary in following PR assert.throws( () => new algosdk.Transaction(o), - (err) => err.toString() === 'Error: note must be a Uint8Array.' + new Error('note must be a Uint8Array.') ); }); it('should not drop a note of all zeros', () => { - const txnWithNote = new algosdk.Transaction({ - sender: '7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q', - receiver: '7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q', - fee: 10, - amount: 847, - firstValid: 51, - lastValid: 61, - genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', - note: new Uint8Array(32), - }); + const txnWithNote = new algosdk.Transaction( + { + sender: '7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q', + receiver: '7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q', + fee: 10, + amount: 847, + firstValid: 51, + lastValid: 61, + genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', + note: new Uint8Array(32), + } as any // Temporary type fix, will be unnecessary in following PR + ); - const txnWithoutNote = new algosdk.Transaction({ - sender: '7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q', - receiver: '7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q', - fee: 10, - amount: 847, - firstValid: 51, - lastValid: 61, - genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', - }); + const txnWithoutNote = new algosdk.Transaction( + { + sender: '7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q', + receiver: '7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q', + fee: 10, + amount: 847, + firstValid: 51, + lastValid: 61, + genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', + } as any // Temporary type fix, will be unnecessary in following PR + ); const serializedWithNote = algosdk.encodeUnsignedTransaction(txnWithNote); - const serializedWithoutNote = algosdk.encodeUnsignedTransaction( - txnWithoutNote - ); + const serializedWithoutNote = + algosdk.encodeUnsignedTransaction(txnWithoutNote); assert.notDeepStrictEqual(serializedWithNote, serializedWithoutNote); }); it('should drop a lease of all zeros', () => { - const txnWithLease = new algosdk.Transaction({ - sender: '7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q', - receiver: '7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q', - fee: 10, - amount: 847, - firstValid: 51, - lastValid: 61, - genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', - lease: new Uint8Array(32), - }); + const txnWithLease = new algosdk.Transaction( + { + sender: '7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q', + receiver: '7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q', + fee: 10, + amount: 847, + firstValid: 51, + lastValid: 61, + genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', + lease: new Uint8Array(32), + } as any // Temporary type fix, will be unnecessary in following PR + ); - const txnWithoutLease = new algosdk.Transaction({ - sender: '7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q', - receiver: '7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q', - fee: 10, - amount: 847, - firstValid: 51, - lastValid: 61, - genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', - }); + const txnWithoutLease = new algosdk.Transaction( + { + sender: '7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q', + receiver: '7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q', + fee: 10, + amount: 847, + firstValid: 51, + lastValid: 61, + genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', + } as any // Temporary type fix, will be unnecessary in following PR + ); const serializedWithLease = algosdk.encodeUnsignedTransaction(txnWithLease); - const serializedWithoutLease = algosdk.encodeUnsignedTransaction( - txnWithoutLease - ); + const serializedWithoutLease = + algosdk.encodeUnsignedTransaction(txnWithoutLease); assert.deepStrictEqual(serializedWithLease, serializedWithoutLease); }); @@ -248,39 +230,42 @@ describe('Sign', () => { const address = 'BH55E5RMBD4GYWXGX5W5PJ5JAHPGM5OXKDQH5DC4O2MGI7NW4H6VOE4CP4'; - const txnWithHash = new algosdk.Transaction({ - sender: address, - fee: 10, - firstValid: 322575, - lastValid: 323575, - genesisHash: 'SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=', - assetIndex: 1234, - assetManager: address, - assetReserve: address, - assetFreeze: address, - assetClawback: address, - type: 'acfg', - assetMetadataHash: new Uint8Array(32), - }); + const txnWithHash = new algosdk.Transaction( + { + sender: address, + fee: 10, + firstValid: 322575, + lastValid: 323575, + genesisHash: 'SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=', + assetIndex: 1234, + assetManager: address, + assetReserve: address, + assetFreeze: address, + assetClawback: address, + type: 'acfg', + assetMetadataHash: new Uint8Array(32), + } as any // Temporary type fix, will be unnecessary in following PR + ); - const txnWithoutHash = new algosdk.Transaction({ - sender: address, - fee: 10, - firstValid: 322575, - lastValid: 323575, - genesisHash: 'SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=', - assetIndex: 1234, - assetManager: address, - assetReserve: address, - assetFreeze: address, - assetClawback: address, - type: 'acfg', - }); + const txnWithoutHash = new algosdk.Transaction( + { + sender: address, + fee: 10, + firstValid: 322575, + lastValid: 323575, + genesisHash: 'SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=', + assetIndex: 1234, + assetManager: address, + assetReserve: address, + assetFreeze: address, + assetClawback: address, + type: 'acfg', + } as any // Temporary type fix, will be unnecessary in following PR + ); const serializedWithHash = algosdk.encodeUnsignedTransaction(txnWithHash); - const serializedWithoutHash = algosdk.encodeUnsignedTransaction( - txnWithoutHash - ); + const serializedWithoutHash = + algosdk.encodeUnsignedTransaction(txnWithoutHash); assert.deepStrictEqual(serializedWithHash, serializedWithoutHash); }); @@ -295,7 +280,7 @@ describe('Sign', () => { lastValid: 61, genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', note: new Uint8Array(0), - }; + } as any; // Temporary type fix, will be unnecessary in following PR const txn = new algosdk.Transaction(o); // assert package recommends just calling prettyPrint over using assert.doesNotThrow txn.prettyPrint(); // should not throw @@ -316,10 +301,12 @@ describe('Sign', () => { genesisID: '', }; const expectedTxn = new algosdk.Transaction(o); - const encRep = expectedTxn.get_obj_for_encoding(); + const encRep = expectedTxn.get_obj_for_encoding()!; const encTxn = algosdk.encodeObj(encRep); const decEncRep = algosdk.decodeObj(encTxn); - const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep); + const decTxn = algosdk.Transaction.from_obj_for_encoding( + decEncRep as algosdk.EncodedTransaction + ); const reencRep = decTxn.get_obj_for_encoding(); assert.deepStrictEqual(reencRep, encRep); }); @@ -338,10 +325,12 @@ describe('Sign', () => { flatFee: true, }; const expectedTxn = new algosdk.Transaction(o); - const encRep = expectedTxn.get_obj_for_encoding(); + const encRep = expectedTxn.get_obj_for_encoding()!; const encTxn = algosdk.encodeObj(encRep); const decEncRep = algosdk.decodeObj(encTxn); - const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep); + const decTxn = algosdk.Transaction.from_obj_for_encoding( + decEncRep as algosdk.EncodedTransaction + ); const reencRep = decTxn.get_obj_for_encoding(); assert.deepStrictEqual(reencRep, encRep); }); @@ -364,18 +353,14 @@ describe('Sign', () => { stateProofType: 0, stateProof: new Uint8Array([1, 1, 1, 1]), stateProofMessage: new Uint8Array([0, 0, 0, 0]), - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); - console.log( - `${expectedTxn.stateProofType} ${expectedTxn.stateProofMessage} ${expectedTxn.stateProof} ${expectedTxn.type}` - ); - const encRep = expectedTxn.get_obj_for_encoding(); - console.log( - `${encRep.sptype} ${encRep.spmsg} ${encRep.sp} ${encRep.type}` - ); + const encRep = expectedTxn.get_obj_for_encoding()!; const encTxn = algosdk.encodeObj(encRep); const decEncRep = algosdk.decodeObj(encTxn); - const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep); + const decTxn = algosdk.Transaction.from_obj_for_encoding( + decEncRep as algosdk.EncodedTransaction + ); const reencRep = decTxn.get_obj_for_encoding(); assert.deepStrictEqual(reencRep, encRep); }); @@ -395,12 +380,14 @@ describe('Sign', () => { voteKeyDilution: 1234, genesisID: '', type: 'keyreg', - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); - const encRep = expectedTxn.get_obj_for_encoding(); + const encRep = expectedTxn.get_obj_for_encoding()!; const encTxn = algosdk.encodeObj(encRep); const decEncRep = algosdk.decodeObj(encTxn); - const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep); + const decTxn = algosdk.Transaction.from_obj_for_encoding( + decEncRep as algosdk.EncodedTransaction + ); const reencRep = decTxn.get_obj_for_encoding(); assert.deepStrictEqual(reencRep, encRep); }); @@ -415,12 +402,14 @@ describe('Sign', () => { genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', genesisID: '', type: 'keyreg', - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); - const encRep = expectedTxn.get_obj_for_encoding(); + const encRep = expectedTxn.get_obj_for_encoding()!; const encTxn = algosdk.encodeObj(encRep); const decEncRep = algosdk.decodeObj(encTxn); - const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep); + const decTxn = algosdk.Transaction.from_obj_for_encoding( + decEncRep as algosdk.EncodedTransaction + ); const reencRep = decTxn.get_obj_for_encoding(); assert.deepStrictEqual(reencRep, encRep); }); @@ -436,12 +425,14 @@ describe('Sign', () => { genesisID: '', nonParticipation: false, type: 'keyreg', - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); - const encRep = expectedTxn.get_obj_for_encoding(); + const encRep = expectedTxn.get_obj_for_encoding()!; const encTxn = algosdk.encodeObj(encRep); const decEncRep = algosdk.decodeObj(encTxn); - const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep); + const decTxn = algosdk.Transaction.from_obj_for_encoding( + decEncRep as algosdk.EncodedTransaction + ); const reencRep = decTxn.get_obj_for_encoding(); assert.deepStrictEqual(reencRep, encRep); }); @@ -457,12 +448,14 @@ describe('Sign', () => { nonParticipation: true, genesisID: '', type: 'keyreg', - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); - const encRep = expectedTxn.get_obj_for_encoding(); + const encRep = expectedTxn.get_obj_for_encoding()!; const encTxn = algosdk.encodeObj(encRep); const decEncRep = algosdk.decodeObj(encTxn); - const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep); + const decTxn = algosdk.Transaction.from_obj_for_encoding( + decEncRep as algosdk.EncodedTransaction + ); const reencRep = decTxn.get_obj_for_encoding(); assert.deepStrictEqual(reencRep, encRep); }); @@ -482,12 +475,14 @@ describe('Sign', () => { assetFreeze: address, assetClawback: address, type: 'acfg', - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); - const encRep = expectedTxn.get_obj_for_encoding(); + const encRep = expectedTxn.get_obj_for_encoding()!; const encTxn = algosdk.encodeObj(encRep); const decEncRep = algosdk.decodeObj(encTxn); - const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep); + const decTxn = algosdk.Transaction.from_obj_for_encoding( + decEncRep as algosdk.EncodedTransaction + ); const reencRep = decTxn.get_obj_for_encoding(); assert.deepStrictEqual(reencRep, encRep); }); @@ -514,12 +509,14 @@ describe('Sign', () => { assetFreeze: address, assetClawback: address, type: 'acfg', - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); - const encRep = expectedTxn.get_obj_for_encoding(); + const encRep = expectedTxn.get_obj_for_encoding()!; const encTxn = algosdk.encodeObj(encRep); const decEncRep = algosdk.decodeObj(encTxn); - const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep); + const decTxn = algosdk.Transaction.from_obj_for_encoding( + decEncRep as algosdk.EncodedTransaction + ); const reencRep = decTxn.get_obj_for_encoding(); assert.deepStrictEqual(reencRep, encRep); }); @@ -539,12 +536,14 @@ describe('Sign', () => { assetIndex: 1234, assetSender: address, closeRemainderTo: address, - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); - const encRep = expectedTxn.get_obj_for_encoding(); + const encRep = expectedTxn.get_obj_for_encoding()!; const encTxn = algosdk.encodeObj(encRep); const decEncRep = algosdk.decodeObj(encTxn); - const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep); + const decTxn = algosdk.Transaction.from_obj_for_encoding( + decEncRep as algosdk.EncodedTransaction + ); const reencRep = decTxn.get_obj_for_encoding(); assert.deepStrictEqual(reencRep, encRep); }); @@ -578,10 +577,12 @@ describe('Sign', () => { genesisHash: 'SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=', }, }); - const encRep = expectedTxn.get_obj_for_encoding(); + const encRep = expectedTxn.get_obj_for_encoding()!; const encTxn = algosdk.encodeObj(encRep); const decEncRep = algosdk.decodeObj(encTxn); - const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep); + const decTxn = algosdk.Transaction.from_obj_for_encoding( + decEncRep as algosdk.EncodedTransaction + ); const reencRep = decTxn.get_obj_for_encoding(); assert.deepStrictEqual(reencRep, encRep); }); @@ -599,13 +600,15 @@ describe('Sign', () => { freezeAccount: address, assetIndex: 1, assetFrozen: true, - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); - const encRep = expectedTxn.get_obj_for_encoding(); + const encRep = expectedTxn.get_obj_for_encoding()!; const encTxn = algosdk.encodeObj(encRep); const decEncRep = algosdk.decodeObj(encTxn); - const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep); + const decTxn = algosdk.Transaction.from_obj_for_encoding( + decEncRep as algosdk.EncodedTransaction + ); const reencRep = decTxn.get_obj_for_encoding(); assert.deepStrictEqual(reencRep, encRep); }); @@ -623,13 +626,15 @@ describe('Sign', () => { freezeAccount: address, assetIndex: 1, assetFrozen: true, - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); - const encRep = expectedTxn.get_obj_for_encoding(); + const encRep = expectedTxn.get_obj_for_encoding()!; const encTxn = algosdk.encodeObj(encRep); const decEncRep = algosdk.decodeObj(encTxn); - const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep); + const decTxn = algosdk.Transaction.from_obj_for_encoding( + decEncRep as algosdk.EncodedTransaction + ); const reencRep = decTxn.get_obj_for_encoding(); assert.deepStrictEqual(reencRep, encRep); }); @@ -644,12 +649,14 @@ describe('Sign', () => { lastValid: 61, genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', note: new Uint8Array([123, 12, 200]), - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); - const encRep = expectedTxn.get_obj_for_encoding(); + const encRep = expectedTxn.get_obj_for_encoding()!; const encTxn = algosdk.encodeObj(encRep); const decEncRep = algosdk.decodeObj(encTxn); - const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep); + const decTxn = algosdk.Transaction.from_obj_for_encoding( + decEncRep as algosdk.EncodedTransaction + ); const reencRep = decTxn.get_obj_for_encoding(); assert.deepStrictEqual(reencRep, encRep); }); @@ -664,12 +671,14 @@ describe('Sign', () => { lastValid: 61, genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', note: new Uint8Array([123, 12, 200]), - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); - const encRep = expectedTxn.get_obj_for_encoding(); + const encRep = expectedTxn.get_obj_for_encoding()!; const encTxn = algosdk.encodeObj(encRep); const decEncRep = algosdk.decodeObj(encTxn); - const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep); + const decTxn = algosdk.Transaction.from_obj_for_encoding( + decEncRep as algosdk.EncodedTransaction + ); const reencRep = decTxn.get_obj_for_encoding(); assert.deepStrictEqual(reencRep, encRep); }); @@ -684,14 +693,14 @@ describe('Sign', () => { lastValid: 61, genesisHash: 'JgsgCaCTqIaLeVhyL6XlRu3n7Rfk2FxMeK+wRSaQ7dI=', note: new Uint8Array([123, 12, 200]), - }; + } as any; // Temporary type fix, will be unnecessary in following PR const tx = new algosdk.Transaction(o); { const expectedTxg = new group.TxGroup([tx.rawTxID(), tx.rawTxID()]); const encRep = expectedTxg.get_obj_for_encoding(); const encTxg = algosdk.encodeObj(encRep); - const decEncRep = algosdk.decodeObj(encTxg); + const decEncRep = algosdk.decodeObj(encTxg) as any; // Temporary type fix, will be unnecessary in following PR; const decTxg = group.TxGroup.from_obj_for_encoding(decEncRep); const reencRep = decTxg.get_obj_for_encoding(); assert.deepStrictEqual(reencRep, encRep); @@ -700,10 +709,12 @@ describe('Sign', () => { { const expectedTxn = tx; expectedTxn.group = tx.rawTxID(); - const encRep = expectedTxn.get_obj_for_encoding(); + const encRep = expectedTxn.get_obj_for_encoding()!; const encTxn = algosdk.encodeObj(encRep); const decEncRep = algosdk.decodeObj(encTxn); - const decTxn = algosdk.Transaction.from_obj_for_encoding(decEncRep); + const decTxn = algosdk.Transaction.from_obj_for_encoding( + decEncRep as algosdk.EncodedTransaction + ); const reencRep = decTxn.get_obj_for_encoding(); assert.deepStrictEqual(reencRep, encRep); } @@ -874,7 +885,7 @@ describe('Sign', () => { genesisID, rekeyTo, type: 'keyreg', - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); const suggestedParams = { genesisHash, @@ -929,7 +940,7 @@ describe('Sign', () => { rekeyTo, type: 'keyreg', nonParticipation: false, - }; + } as any; // Temporary type fix, will be unnecessary in following PR assert.throws( () => @@ -993,7 +1004,7 @@ describe('Sign', () => { genesisID, rekeyTo, type: 'keyreg', - }; + } as any; // Temporary type fix, will be unnecessary in following PR assert.throws( () => @@ -1076,7 +1087,7 @@ describe('Sign', () => { genesisID, rekeyTo, type: 'acfg', - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); const suggestedParams = { genesisHash, @@ -1148,7 +1159,7 @@ describe('Sign', () => { genesisID, rekeyTo, type: 'acfg', - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); const suggestedParams = { genesisHash, @@ -1220,7 +1231,7 @@ describe('Sign', () => { genesisID, rekeyTo, type: 'acfg', - }; + } as any; // Temporary type fix, will be unnecessary in following PR assert.throws( () => new algosdk.Transaction(o), new Error( @@ -1268,7 +1279,7 @@ describe('Sign', () => { genesisID, rekeyTo, type: 'acfg', - }; + } as any; // Temporary type fix, will be unnecessary in following PR assert.doesNotThrow(() => { const txnParams = { assetMetadataHash: '', @@ -1357,7 +1368,7 @@ describe('Sign', () => { type: 'acfg', note, rekeyTo, - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); const suggestedParams = { genesisHash, @@ -1441,7 +1452,7 @@ describe('Sign', () => { type: 'acfg', note, rekeyTo, - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); const suggestedParams = { genesisHash, @@ -1491,7 +1502,7 @@ describe('Sign', () => { assetSender, closeRemainderTo, rekeyTo, - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); const suggestedParams = { genesisHash, @@ -1541,7 +1552,7 @@ describe('Sign', () => { note, genesisID, rekeyTo, - }; + } as any; // Temporary type fix, will be unnecessary in following PR const expectedTxn = new algosdk.Transaction(o); const suggestedParams = { genesisHash, @@ -1595,7 +1606,7 @@ describe('Sign', () => { }; // Store both transactions - const txns = [helperTx, dictTx]; + const txns = [helperTx, dictTx] as any[]; // Temporary type fix, will be unnecessary in following PR // Group both transactions const txgroup = algosdk.assignGroupID(txns); @@ -1603,42 +1614,49 @@ describe('Sign', () => { assert.deepStrictEqual(txgroup[0].group, txgroup[1].group); }); it('should be able to translate box references to encoded references', () => { - const testCases = [ + const testCases: Array< + [ + algosdk.BoxReference[], + number[], + number, + algosdk.EncodedBoxReference[], + ] + > = [ [ - [{ appIndex: 100, name: [0, 1, 2, 3] }], + [{ appIndex: 100, name: Uint8Array.from([0, 1, 2, 3]) }], [100], 9999, - [{ i: 1, n: [0, 1, 2, 3] }], + [{ i: 1, n: Uint8Array.from([0, 1, 2, 3]) }], ], [[], [], 9999, []], [ [ - { appIndex: 0, name: [0, 1, 2, 3] }, - { appIndex: 9999, name: [4, 5, 6, 7] }, + { appIndex: 0, name: Uint8Array.from([0, 1, 2, 3]) }, + { appIndex: 9999, name: Uint8Array.from([4, 5, 6, 7]) }, ], [100], 9999, [ - { i: 0, n: [0, 1, 2, 3] }, - { i: 0, n: [4, 5, 6, 7] }, + { i: 0, n: Uint8Array.from([0, 1, 2, 3]) }, + { i: 0, n: Uint8Array.from([4, 5, 6, 7]) }, ], ], [ - [{ appIndex: 100, name: [0, 1, 2, 3] }], + [{ appIndex: 100, name: Uint8Array.from([0, 1, 2, 3]) }], [100], 100, - [{ i: 1, n: [0, 1, 2, 3] }], + [{ i: 1, n: Uint8Array.from([0, 1, 2, 3]) }], ], [ [ - { appIndex: 7777, name: [0, 1, 2, 3] }, - { appIndex: 8888, name: [4, 5, 6, 7] }, + { appIndex: 7777, name: Uint8Array.from([0, 1, 2, 3]) }, + { appIndex: 8888, name: Uint8Array.from([4, 5, 6, 7]) }, ], [100, 7777, 8888, 9999], 9999, [ - { i: 2, n: [0, 1, 2, 3] }, - { i: 3, n: [4, 5, 6, 7] }, + { i: 2, n: Uint8Array.from([0, 1, 2, 3]) }, + { i: 3, n: Uint8Array.from([4, 5, 6, 7]) }, ], ], ]; diff --git a/tests/6.Multisig.ts b/tests/6.Multisig.ts index 23819276a..59e06212b 100644 --- a/tests/6.Multisig.ts +++ b/tests/6.Multisig.ts @@ -457,14 +457,34 @@ describe('Multisig Functionality', () => { assert.deepStrictEqual(finMsigBlob, allThreeBlob); assert.deepStrictEqual(finMsigBlobTwo, allThreeBlob); }); + + it('should error when msig is missing', () => { + // prettier-ignore + const oneAndThreeBlob = Uint8Array.from([130, 164, 109, 115, 105, 103, 131, 166, 115, 117, 98, 115, 105, 103, 147, 130, 162, 112, 107, 196, 32, 27, 126, 192, 176, 75, 234, 97, 183, 150, 144, 151, 230, 203, 244, 7, 225, 8, 167, 5, 53, 29, 11, 201, 138, 190, 177, 34, 9, 168, 171, 129, 120, 161, 115, 196, 64, 113, 61, 44, 215, 188, 9, 110, 249, 243, 107, 227, 105, 200, 124, 12, 209, 21, 155, 67, 225, 240, 42, 107, 19, 212, 242, 236, 251, 14, 157, 232, 202, 93, 76, 125, 237, 173, 175, 178, 41, 145, 52, 43, 74, 132, 202, 20, 132, 237, 142, 122, 248, 31, 104, 105, 253, 168, 172, 70, 227, 115, 249, 227, 13, 129, 162, 112, 107, 196, 32, 9, 99, 50, 9, 83, 115, 137, 240, 117, 103, 17, 119, 57, 145, 199, 208, 62, 27, 115, 200, 196, 245, 43, 246, 175, 240, 26, 162, 92, 249, 194, 113, 130, 162, 112, 107, 196, 32, 231, 240, 248, 77, 6, 129, 29, 249, 243, 28, 141, 135, 139, 17, 85, 244, 103, 29, 81, 161, 133, 194, 0, 144, 134, 103, 244, 73, 88, 112, 104, 161, 161, 115, 196, 64, 125, 39, 23, 127, 48, 75, 104, 78, 54, 53, 177, 125, 33, 29, 42, 49, 173, 205, 5, 9, 225, 99, 169, 16, 177, 95, 186, 134, 218, 129, 179, 15, 219, 90, 103, 54, 188, 25, 90, 235, 144, 137, 45, 35, 66, 53, 45, 183, 232, 27, 20, 50, 91, 219, 194, 187, 55, 146, 113, 126, 233, 186, 161, 15, 163, 116, 104, 114, 2, 161, 118, 1, 163, 116, 120, 110, 140, 163, 102, 101, 101, 206, 0, 3, 200, 192, 162, 102, 118, 206, 0, 14, 249, 218, 163, 103, 101, 110, 172, 100, 101, 118, 110, 101, 116, 45, 118, 51, 56, 46, 48, 162, 103, 104, 196, 32, 254, 179, 108, 57, 16, 20, 57, 0, 195, 218, 85, 66, 202, 24, 54, 176, 15, 210, 248, 25, 89, 18, 87, 205, 35, 246, 4, 47, 152, 200, 54, 157, 162, 108, 118, 206, 0, 14, 253, 194, 166, 115, 101, 108, 107, 101, 121, 196, 32, 50, 18, 43, 43, 214, 61, 220, 83, 49, 150, 23, 165, 170, 83, 196, 177, 194, 111, 227, 220, 202, 242, 141, 54, 34, 181, 105, 119, 161, 64, 92, 134, 163, 115, 110, 100, 196, 32, 141, 146, 180, 137, 144, 1, 115, 160, 77, 250, 67, 89, 163, 102, 106, 106, 252, 234, 44, 66, 160, 93, 217, 193, 247, 62, 235, 165, 71, 128, 55, 233, 164, 116, 121, 112, 101, 166, 107, 101, 121, 114, 101, 103, 167, 118, 111, 116, 101, 102, 115, 116, 206, 0, 13, 187, 160, 166, 118, 111, 116, 101, 107, 100, 205, 39, 16, 167, 118, 111, 116, 101, 107, 101, 121, 196, 32, 112, 27, 215, 251, 145, 43, 7, 179, 8, 17, 255, 40, 29, 159, 238, 149, 99, 229, 128, 46, 32, 38, 137, 35, 25, 37, 143, 119, 250, 147, 30, 136, 167, 118, 111, 116, 101, 108, 115, 116, 206, 0, 15, 66, 64]); + + const decoded = algosdk.decodeObj( + oneAndThreeBlob + ) as algosdk.EncodedSignedTransaction; + delete decoded.msig; + + const noMsigBlob = algosdk.encodeObj(decoded); + + assert.throws(() => { + algosdk.mergeMultisigTransactions([noMsigBlob, oneAndThreeBlob]); + }, new Error('Invalid multisig transaction, multisig structure missing at index 0')); + + assert.throws(() => { + algosdk.mergeMultisigTransactions([oneAndThreeBlob, noMsigBlob]); + }, new Error('Invalid multisig transaction, multisig structure missing at index 1')); + }); }); describe('read-only transaction methods should work as expected on multisig transactions', () => { - let stdPaymentTxn; - let msigPaymentTxn; + let stdPaymentTxn: algosdk.Transaction; + let msigPaymentTxn: MultisigTransaction; - let stdKeyregTxn; - let msigKeyregTxn; + let stdKeyregTxn: algosdk.Transaction; + let msigKeyregTxn: MultisigTransaction; // Create a multisig transaction to use for each test beforeEach(() => { @@ -544,8 +564,8 @@ describe('Multisig Functionality', () => { }); describe('inherited MultisigTransaction methods that mutate transactions should throw errors', () => { - let msigPaymentTxn; - let msigKeyregTxn; + let msigPaymentTxn: MultisigTransaction; + let msigKeyregTxn: MultisigTransaction; // Create a multisig transaction to use for each test beforeEach(() => { @@ -602,29 +622,29 @@ describe('Multisig Functionality', () => { it('error should be thrown when attempting to add a lease to a transaction', () => { assert.throws( msigPaymentTxn.addLease, - (err) => err.message === MULTISIG_NO_MUTATE_ERROR_MSG + new Error(MULTISIG_NO_MUTATE_ERROR_MSG) ); assert.throws( msigKeyregTxn.addLease, - (err) => err.message === MULTISIG_NO_MUTATE_ERROR_MSG + new Error(MULTISIG_NO_MUTATE_ERROR_MSG) ); }); it('error should be thrown when attempting to add a rekey to a transaction', () => { assert.throws( msigPaymentTxn.addRekey, - (err) => err.message === MULTISIG_NO_MUTATE_ERROR_MSG + new Error(MULTISIG_NO_MUTATE_ERROR_MSG) ); assert.throws( msigKeyregTxn.addRekey, - (err) => err.message === MULTISIG_NO_MUTATE_ERROR_MSG + new Error(MULTISIG_NO_MUTATE_ERROR_MSG) ); }); }); describe('error should be thrown when attempting to sign a transaction', () => { - let msigPaymentTxn; - let msigKeyregTxn; + let msigPaymentTxn: MultisigTransaction; + let msigKeyregTxn: MultisigTransaction; // Create a multisig transaction to use for each test beforeEach(() => { @@ -680,12 +700,12 @@ describe('Multisig Functionality', () => { it('signTxn method should throw an error', () => { assert.throws( - msigPaymentTxn.signTxn, - (err) => err.message === MULTISIG_USE_PARTIAL_SIGN_ERROR_MSG + () => msigPaymentTxn.signTxn(new Uint8Array()), + new Error(MULTISIG_USE_PARTIAL_SIGN_ERROR_MSG) ); assert.throws( - msigKeyregTxn.signTxn, - (err) => err.message === MULTISIG_USE_PARTIAL_SIGN_ERROR_MSG + () => msigKeyregTxn.signTxn(new Uint8Array()), + new Error(MULTISIG_USE_PARTIAL_SIGN_ERROR_MSG) ); }); }); diff --git a/tests/7.AlgoSDK.js b/tests/7.AlgoSDK.ts similarity index 88% rename from tests/7.AlgoSDK.js rename to tests/7.AlgoSDK.ts index 37885440e..1cc31d1d7 100644 --- a/tests/7.AlgoSDK.js +++ b/tests/7.AlgoSDK.ts @@ -1,8 +1,8 @@ /* eslint-env mocha */ -const assert = require('assert'); -const algosdk = require('../src/index'); -const nacl = require('../src/nacl/naclWrappers'); -const utils = require('../src/utils/utils'); +import assert from 'assert'; +import algosdk from '../src/index.js'; +import * as nacl from '../src/nacl/naclWrappers.js'; +import * as utils from '../src/utils/utils.js'; describe('Algosdk (AKA end to end)', () => { describe('#mnemonic', () => { @@ -25,7 +25,7 @@ describe('Algosdk (AKA end to end)', () => { it('should encode and decode strings', () => { const o = 'Hi there'; - assert.deepStrictEqual(o, algosdk.decodeObj(algosdk.encodeObj(o))); + assert.deepStrictEqual(o, algosdk.decodeObj(algosdk.encodeObj(o as any))); }); it('should not mutate unsigned transaction when going to or from encoded buffer', () => { @@ -58,9 +58,8 @@ describe('Algosdk (AKA end to end)', () => { ); const txnAsBuffer = algosdk.encodeUnsignedTransaction(txnAsObj); const txnAsObjRecovered = algosdk.decodeUnsignedTransaction(txnAsBuffer); - const txnAsBufferRecovered = algosdk.encodeUnsignedTransaction( - txnAsObjRecovered - ); + const txnAsBufferRecovered = + algosdk.encodeUnsignedTransaction(txnAsObjRecovered); assert.deepStrictEqual(txnAsBuffer, txnAsBufferRecovered); const txnAsBufferGolden = new Uint8Array( algosdk.base64ToBytes( @@ -98,9 +97,9 @@ describe('Algosdk (AKA end to end)', () => { note, suggestedParams ); - let sk = - 'advice pudding treat near rule blouse same whisper inner electric quit surface sunny dismiss leader blood seat clown cost exist hospital century reform able sponsor'; - sk = algosdk.mnemonicToSecretKey(sk); + const sk = algosdk.mnemonicToSecretKey( + 'advice pudding treat near rule blouse same whisper inner electric quit surface sunny dismiss leader blood seat clown cost exist hospital century reform able sponsor' + ); const initialSignedTxnBytes = txnAsObj.signTxn(sk.sk); const signedTxnRecovered = algosdk.decodeSignedTransaction( initialSignedTxnBytes @@ -110,8 +109,7 @@ describe('Algosdk (AKA end to end)', () => { assert.deepStrictEqual(initialSignedTxnBytes, recoveredSignedTxnBytes); const signedTxnBytesGolden = new Uint8Array( algosdk.base64ToBytes( - 'g6RzZ25yxCDn8PhNBoEd+fMcjYeLEVX0Zx1RoYXCAJCGZ/RJWHBooaNzaWfEQDJHtrytU9p3nhRH1XS8tX+KmeKGyekigG7M704dOkBMTqiOJFuukbK2gUViJtivsPrKNiV0+WIrdbBk7gmNkgGjdHhui6NhbXTNA+ilY2xvc2XEIEDpNJKIJWTLzpxZpptnVCaJ6aHDoqnqW2Wm6KRCH/xXo2ZlZc0EmKJmds0wsqNnZW6sZGV2bmV0LXYzMy4womdoxCAmCyAJoJOohot5WHIvpeVG7eftF+TYXEx4r7BFJpDt0qJsds00mqRub3RlxAjqABVHQ2y/lqNyY3bEIHts4k/rW6zAsWTinCIsV/X2PcOH1DkEglhBHF/hD3wCo3NuZMQge2ziT+tbrMCxZOKcIixX9fY9w4fUOQSCWEEcX+EPfAKkdHlwZaNwYXk=', - 'base64' + 'g6RzZ25yxCDn8PhNBoEd+fMcjYeLEVX0Zx1RoYXCAJCGZ/RJWHBooaNzaWfEQDJHtrytU9p3nhRH1XS8tX+KmeKGyekigG7M704dOkBMTqiOJFuukbK2gUViJtivsPrKNiV0+WIrdbBk7gmNkgGjdHhui6NhbXTNA+ilY2xvc2XEIEDpNJKIJWTLzpxZpptnVCaJ6aHDoqnqW2Wm6KRCH/xXo2ZlZc0EmKJmds0wsqNnZW6sZGV2bmV0LXYzMy4womdoxCAmCyAJoJOohot5WHIvpeVG7eftF+TYXEx4r7BFJpDt0qJsds00mqRub3RlxAjqABVHQ2y/lqNyY3bEIHts4k/rW6zAsWTinCIsV/X2PcOH1DkEglhBHF/hD3wCo3NuZMQge2ziT+tbrMCxZOKcIixX9fY9w4fUOQSCWEEcX+EPfAKkdHlwZaNwYXk=' ) ); assert.deepStrictEqual(signedTxnBytesGolden, recoveredSignedTxnBytes); @@ -120,8 +118,9 @@ describe('Algosdk (AKA end to end)', () => { describe('Sign', () => { it('should return a blob that matches the go code', () => { - let sk = - 'advice pudding treat near rule blouse same whisper inner electric quit surface sunny dismiss leader blood seat clown cost exist hospital century reform able sponsor'; + const sk = algosdk.mnemonicToSecretKey( + 'advice pudding treat near rule blouse same whisper inner electric quit surface sunny dismiss leader blood seat clown cost exist hospital century reform able sponsor' + ); const golden = 'gqNzaWfEQPhUAZ3xkDDcc8FvOVo6UinzmKBCqs0woYSfodlmBMfQvGbeUx3Srxy3dyJDzv7rLm26BRv9FnL2/AuT7NYfiAWjdHhui6NhbXTNA+ilY2xvc2XEIEDpNJKIJWTLzpxZpptnVCaJ6aHDoqnqW2Wm6KRCH/xXo2ZlZc0EmKJmds0wsqNnZW6sZGV2bmV0LXYzMy4womdoxCAmCyAJoJOohot5WHIvpeVG7eftF+TYXEx4r7BFJpDt0qJsds00mqRub3RlxAjqABVHQ2y/lqNyY3bEIHts4k/rW6zAsWTinCIsV/X2PcOH1DkEglhBHF/hD3wCo3NuZMQg5/D4TQaBHfnzHI2HixFV9GcdUaGFwgCQhmf0SVhwaKGkdHlwZaNwYXk='; const o = { @@ -135,9 +134,7 @@ describe('Algosdk (AKA end to end)', () => { closeRemainderTo: 'IDUTJEUIEVSMXTU4LGTJWZ2UE2E6TIODUKU6UW3FU3UKIQQ77RLUBBBFLA', note: new Uint8Array(algosdk.base64ToBytes('6gAVR0Nsv5Y=')), - }; - - sk = algosdk.mnemonicToSecretKey(sk); + } as any; // Temporary type fix, will be unnecessary in following PR const jsDec = algosdk.signTransaction(o, sk.sk); assert.deepStrictEqual(jsDec.blob, algosdk.base64ToBytes(golden)); @@ -148,8 +145,9 @@ describe('Algosdk (AKA end to end)', () => { }); it('should return a blob that matches the go code when using a flat fee', () => { - let sk = - 'advice pudding treat near rule blouse same whisper inner electric quit surface sunny dismiss leader blood seat clown cost exist hospital century reform able sponsor'; + const sk = algosdk.mnemonicToSecretKey( + 'advice pudding treat near rule blouse same whisper inner electric quit surface sunny dismiss leader blood seat clown cost exist hospital century reform able sponsor' + ); const golden = 'gqNzaWfEQPhUAZ3xkDDcc8FvOVo6UinzmKBCqs0woYSfodlmBMfQvGbeUx3Srxy3dyJDzv7rLm26BRv9FnL2/AuT7NYfiAWjdHhui6NhbXTNA+ilY2xvc2XEIEDpNJKIJWTLzpxZpptnVCaJ6aHDoqnqW2Wm6KRCH/xXo2ZlZc0EmKJmds0wsqNnZW6sZGV2bmV0LXYzMy4womdoxCAmCyAJoJOohot5WHIvpeVG7eftF+TYXEx4r7BFJpDt0qJsds00mqRub3RlxAjqABVHQ2y/lqNyY3bEIHts4k/rW6zAsWTinCIsV/X2PcOH1DkEglhBHF/hD3wCo3NuZMQg5/D4TQaBHfnzHI2HixFV9GcdUaGFwgCQhmf0SVhwaKGkdHlwZaNwYXk='; const o = { @@ -164,9 +162,7 @@ describe('Algosdk (AKA end to end)', () => { 'IDUTJEUIEVSMXTU4LGTJWZ2UE2E6TIODUKU6UW3FU3UKIQQ77RLUBBBFLA', note: new Uint8Array(algosdk.base64ToBytes('6gAVR0Nsv5Y=')), flatFee: true, - }; - - sk = algosdk.mnemonicToSecretKey(sk); + } as any; // Temporary type fix, will be unnecessary in following PR const jsDec = algosdk.signTransaction(o, sk.sk); assert.deepStrictEqual(jsDec.blob, algosdk.base64ToBytes(golden)); @@ -177,8 +173,9 @@ describe('Algosdk (AKA end to end)', () => { }); it('should return a blob that matches the go code when constructing with a lease', () => { - let sk = - 'advice pudding treat near rule blouse same whisper inner electric quit surface sunny dismiss leader blood seat clown cost exist hospital century reform able sponsor'; + const sk = algosdk.mnemonicToSecretKey( + 'advice pudding treat near rule blouse same whisper inner electric quit surface sunny dismiss leader blood seat clown cost exist hospital century reform able sponsor' + ); const golden = 'gqNzaWfEQOMmFSIKsZvpW0txwzhmbgQjxv6IyN7BbV5sZ2aNgFbVcrWUnqPpQQxfPhV/wdu9jzEPUU1jAujYtcNCxJ7ONgejdHhujKNhbXTNA+ilY2xvc2XEIEDpNJKIJWTLzpxZpptnVCaJ6aHDoqnqW2Wm6KRCH/xXo2ZlZc0FLKJmds0wsqNnZW6sZGV2bmV0LXYzMy4womdoxCAmCyAJoJOohot5WHIvpeVG7eftF+TYXEx4r7BFJpDt0qJsds00mqJseMQgAQIDBAECAwQBAgMEAQIDBAECAwQBAgMEAQIDBAECAwSkbm90ZcQI6gAVR0Nsv5ajcmN2xCB7bOJP61uswLFk4pwiLFf19j3Dh9Q5BIJYQRxf4Q98AqNzbmTEIOfw+E0GgR358xyNh4sRVfRnHVGhhcIAkIZn9ElYcGihpHR5cGWjcGF5'; // prettier-ignore @@ -195,9 +192,7 @@ describe('Algosdk (AKA end to end)', () => { 'IDUTJEUIEVSMXTU4LGTJWZ2UE2E6TIODUKU6UW3FU3UKIQQ77RLUBBBFLA', note: new Uint8Array(algosdk.base64ToBytes('6gAVR0Nsv5Y=')), lease, - }; - - sk = algosdk.mnemonicToSecretKey(sk); + } as any; // Temporary type fix, will be unnecessary in following PR const jsDec = algosdk.signTransaction(o, sk.sk); assert.deepStrictEqual(jsDec.blob, algosdk.base64ToBytes(golden)); @@ -208,8 +203,9 @@ describe('Algosdk (AKA end to end)', () => { }); it('should return a blob that matches the go code when adding a lease', () => { - let sk = - 'advice pudding treat near rule blouse same whisper inner electric quit surface sunny dismiss leader blood seat clown cost exist hospital century reform able sponsor'; + const sk = algosdk.mnemonicToSecretKey( + 'advice pudding treat near rule blouse same whisper inner electric quit surface sunny dismiss leader blood seat clown cost exist hospital century reform able sponsor' + ); const golden = 'gqNzaWfEQOMmFSIKsZvpW0txwzhmbgQjxv6IyN7BbV5sZ2aNgFbVcrWUnqPpQQxfPhV/wdu9jzEPUU1jAujYtcNCxJ7ONgejdHhujKNhbXTNA+ilY2xvc2XEIEDpNJKIJWTLzpxZpptnVCaJ6aHDoqnqW2Wm6KRCH/xXo2ZlZc0FLKJmds0wsqNnZW6sZGV2bmV0LXYzMy4womdoxCAmCyAJoJOohot5WHIvpeVG7eftF+TYXEx4r7BFJpDt0qJsds00mqJseMQgAQIDBAECAwQBAgMEAQIDBAECAwQBAgMEAQIDBAECAwSkbm90ZcQI6gAVR0Nsv5ajcmN2xCB7bOJP61uswLFk4pwiLFf19j3Dh9Q5BIJYQRxf4Q98AqNzbmTEIOfw+E0GgR358xyNh4sRVfRnHVGhhcIAkIZn9ElYcGihpHR5cGWjcGF5'; // prettier-ignore @@ -225,7 +221,6 @@ describe('Algosdk (AKA end to end)', () => { const closeRemainderTo = 'IDUTJEUIEVSMXTU4LGTJWZ2UE2E6TIODUKU6UW3FU3UKIQQ77RLUBBBFLA'; const note = new Uint8Array(algosdk.base64ToBytes('6gAVR0Nsv5Y=')); - sk = algosdk.mnemonicToSecretKey(sk); const key = nacl.keyPairFromSecretKey(sk.sk); const sender = algosdk.encodeAddress(key.publicKey); const suggestedParams = { @@ -290,15 +285,19 @@ describe('Algosdk (AKA end to end)', () => { // Sign it directly to get a signature const signedWithSk = txn.signTxn(signer.sk); - const decoded = algosdk.decodeObj(signedWithSk); - const signature = decoded.sig; + const decoded = algosdk.decodeObj( + signedWithSk + ) as algosdk.EncodedSignedTransaction; + const signature = decoded.sig!; // Attach the signature to the transaction indirectly, and compare const signedWithSignature = txn.attachSignature(signer.addr, signature); assert.deepEqual(signedWithSk, signedWithSignature); // Check that signer was set - const decodedWithSigner = algosdk.decodeObj(signedWithSignature); + const decodedWithSigner = algosdk.decodeObj( + signedWithSignature + ) as algosdk.EncodedSignedTransaction; assert.deepEqual( decodedWithSigner.sgnr, algosdk.decodeAddress(signer.addr).publicKey @@ -325,8 +324,10 @@ describe('Algosdk (AKA end to end)', () => { // Sign it directly to get a signature const signedWithSk = txn.signTxn(signer.sk); - const decoded = algosdk.decodeObj(signedWithSk); - const signature = decoded.sig.slice(0, -1); // without the last byte + const decoded = algosdk.decodeObj( + signedWithSk + ) as algosdk.EncodedSignedTransaction; + const signature = decoded.sig!.slice(0, -1); // without the last byte // Check that the signature is not attached assert.throws( @@ -363,7 +364,7 @@ describe('Algosdk (AKA end to end)', () => { closeRemainderTo: 'IDUTJEUIEVSMXTU4LGTJWZ2UE2E6TIODUKU6UW3FU3UKIQQ77RLUBBBFLA', note: algosdk.base64ToBytes('X4Bl4wQ9rCo='), - }; + } as any; // Temporary type fix, will be unnecessary in following PR const jsDec = algosdk.signMultisigTransaction(o, params, sk); // this golden also contains the correct multisig address @@ -596,8 +597,9 @@ describe('Algosdk (AKA end to end)', () => { 'BH55E5RMBD4GYWXGX5W5PJ5JAHPGM5OXKDQH5DC4O2MGI7NW4H6VOE4CP4'; const golden = 'gqNzaWfEQEDd1OMRoQI/rzNlU4iiF50XQXmup3k5czI9hEsNqHT7K4KsfmA/0DUVkbzOwtJdRsHS8trm3Arjpy9r7AXlbAujdHhuh6RhcGFyiaJhbcQgZkFDUE80blJnTzU1ajFuZEFLM1c2U2djNEFQa2N5RmiiYW6odGVzdGNvaW6iYXWnd2Vic2l0ZaFjxCAJ+9J2LAj4bFrmv23Xp6kB3mZ111Dgfoxcdphkfbbh/aFmxCAJ+9J2LAj4bFrmv23Xp6kB3mZ111Dgfoxcdphkfbbh/aFtxCAJ+9J2LAj4bFrmv23Xp6kB3mZ111Dgfoxcdphkfbbh/aFyxCAJ+9J2LAj4bFrmv23Xp6kB3mZ111Dgfoxcdphkfbbh/aF0ZKJ1bqN0c3SjZmVlzQ+0omZ2zgAE7A+iZ2jEIEhjtRiks8hOyBDyLU8QgcsPcfBZp6wg3sYvf3DlCToiomx2zgAE7/ejc25kxCAJ+9J2LAj4bFrmv23Xp6kB3mZ111Dgfoxcdphkfbbh/aR0eXBlpGFjZmc='; - let sk = - 'awful drop leaf tennis indoor begin mandate discover uncle seven only coil atom any hospital uncover make any climb actor armed measure need above hundred'; + const sk = algosdk.mnemonicToSecretKey( + 'awful drop leaf tennis indoor begin mandate discover uncle seven only coil atom any hospital uncover make any climb actor armed measure need above hundred' + ); const createTxn = { sender: address, fee: 10, @@ -615,8 +617,7 @@ describe('Algosdk (AKA end to end)', () => { assetURL: 'website', assetMetadataHash: 'fACPO4nRgO55j1ndAK3W6Sgc4APkcyFh', type: 'acfg', - }; - sk = algosdk.mnemonicToSecretKey(sk); + } as any; // Temporary type fix, will be unnecessary in following PR const jsDecCreate = algosdk.signTransaction(createTxn, sk.sk); assert.deepStrictEqual(jsDecCreate.blob, algosdk.base64ToBytes(golden)); }); @@ -626,8 +627,9 @@ describe('Algosdk (AKA end to end)', () => { 'BH55E5RMBD4GYWXGX5W5PJ5JAHPGM5OXKDQH5DC4O2MGI7NW4H6VOE4CP4'; const golden = 'gqNzaWfEQCj5xLqNozR5ahB+LNBlTG+d0gl0vWBrGdAXj1ibsCkvAwOsXs5KHZK1YdLgkdJecQiWm4oiZ+pm5Yg0m3KFqgqjdHhuh6RhcGFyiqJhbcQgZkFDUE80blJnTzU1ajFuZEFLM1c2U2djNEFQa2N5RmiiYW6odGVzdGNvaW6iYXWnd2Vic2l0ZaFjxCAJ+9J2LAj4bFrmv23Xp6kB3mZ111Dgfoxcdphkfbbh/aJkYwGhZsQgCfvSdiwI+Gxa5r9t16epAd5mdddQ4H6MXHaYZH224f2hbcQgCfvSdiwI+Gxa5r9t16epAd5mdddQ4H6MXHaYZH224f2hcsQgCfvSdiwI+Gxa5r9t16epAd5mdddQ4H6MXHaYZH224f2hdGSidW6jdHN0o2ZlZc0P3KJmds4ABOwPomdoxCBIY7UYpLPITsgQ8i1PEIHLD3HwWaesIN7GL39w5Qk6IqJsds4ABO/3o3NuZMQgCfvSdiwI+Gxa5r9t16epAd5mdddQ4H6MXHaYZH224f2kdHlwZaRhY2Zn'; - let sk = - 'awful drop leaf tennis indoor begin mandate discover uncle seven only coil atom any hospital uncover make any climb actor armed measure need above hundred'; + const sk = algosdk.mnemonicToSecretKey( + 'awful drop leaf tennis indoor begin mandate discover uncle seven only coil atom any hospital uncover make any climb actor armed measure need above hundred' + ); const createTxn = { sender: address, fee: 10, @@ -646,8 +648,7 @@ describe('Algosdk (AKA end to end)', () => { assetURL: 'website', assetMetadataHash: 'fACPO4nRgO55j1ndAK3W6Sgc4APkcyFh', type: 'acfg', - }; - sk = algosdk.mnemonicToSecretKey(sk); + } as any; // Temporary type fix, will be unnecessary in following PR const jsDecCreate = algosdk.signTransaction(createTxn, sk.sk); assert.deepStrictEqual(jsDecCreate.blob, algosdk.base64ToBytes(golden)); }); @@ -657,8 +658,9 @@ describe('Algosdk (AKA end to end)', () => { 'BH55E5RMBD4GYWXGX5W5PJ5JAHPGM5OXKDQH5DC4O2MGI7NW4H6VOE4CP4'; const golden = 'gqNzaWfEQBBkfw5n6UevuIMDo2lHyU4dS80JCCQ/vTRUcTx5m0ivX68zTKyuVRrHaTbxbRRc3YpJ4zeVEnC9Fiw3Wf4REwejdHhuiKRhcGFyhKFjxCAJ+9J2LAj4bFrmv23Xp6kB3mZ111Dgfoxcdphkfbbh/aFmxCAJ+9J2LAj4bFrmv23Xp6kB3mZ111Dgfoxcdphkfbbh/aFtxCAJ+9J2LAj4bFrmv23Xp6kB3mZ111Dgfoxcdphkfbbh/aFyxCAJ+9J2LAj4bFrmv23Xp6kB3mZ111Dgfoxcdphkfbbh/aRjYWlkzQTSo2ZlZc0NSKJmds4ABOwPomdoxCBIY7UYpLPITsgQ8i1PEIHLD3HwWaesIN7GL39w5Qk6IqJsds4ABO/3o3NuZMQgCfvSdiwI+Gxa5r9t16epAd5mdddQ4H6MXHaYZH224f2kdHlwZaRhY2Zn'; - let sk = - 'awful drop leaf tennis indoor begin mandate discover uncle seven only coil atom any hospital uncover make any climb actor armed measure need above hundred'; + const sk = algosdk.mnemonicToSecretKey( + 'awful drop leaf tennis indoor begin mandate discover uncle seven only coil atom any hospital uncover make any climb actor armed measure need above hundred' + ); const o = { sender: address, fee: 10, @@ -671,8 +673,7 @@ describe('Algosdk (AKA end to end)', () => { assetFreeze: address, assetClawback: address, type: 'acfg', - }; - sk = algosdk.mnemonicToSecretKey(sk); + } as any; // Temporary type fix, will be unnecessary in following PR const jsDec = algosdk.signTransaction(o, sk.sk); assert.deepStrictEqual(jsDec.blob, algosdk.base64ToBytes(golden)); }); @@ -682,8 +683,9 @@ describe('Algosdk (AKA end to end)', () => { 'BH55E5RMBD4GYWXGX5W5PJ5JAHPGM5OXKDQH5DC4O2MGI7NW4H6VOE4CP4'; const golden = 'gqNzaWfEQBSP7HtzD/Lvn4aVvaNpeR4T93dQgo4LvywEwcZgDEoc/WVl3aKsZGcZkcRFoiWk8AidhfOZzZYutckkccB8RgGjdHhuh6RjYWlkAaNmZWXNB1iiZnbOAATsD6JnaMQgSGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiKibHbOAATv96NzbmTEIAn70nYsCPhsWua/bdenqQHeZnXXUOB+jFx2mGR9tuH9pHR5cGWkYWNmZw=='; - let sk = - 'awful drop leaf tennis indoor begin mandate discover uncle seven only coil atom any hospital uncover make any climb actor armed measure need above hundred'; + const sk = algosdk.mnemonicToSecretKey( + 'awful drop leaf tennis indoor begin mandate discover uncle seven only coil atom any hospital uncover make any climb actor armed measure need above hundred' + ); const o = { sender: address, fee: 10, @@ -692,8 +694,7 @@ describe('Algosdk (AKA end to end)', () => { genesisHash: 'SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=', assetIndex: 1, type: 'acfg', - }; - sk = algosdk.mnemonicToSecretKey(sk); + } as any; // Temporary type fix, will be unnecessary in following PR const jsDec = algosdk.signTransaction(o, sk.sk); assert.deepStrictEqual(jsDec.blob, algosdk.base64ToBytes(golden)); }); @@ -709,7 +710,7 @@ describe('Algosdk (AKA end to end)', () => { freezeAccount: addr, assetIndex: 1, assetFrozen: true, - }; + } as any; // Temporary type fix, will be unnecessary in following PR const mnem = 'awful drop leaf tennis indoor begin mandate discover uncle seven only coil atom any hospital uncover make any climb actor armed measure need above hundred'; @@ -734,7 +735,7 @@ describe('Algosdk (AKA end to end)', () => { genesisHash: 'SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=', assetIndex: 1, closeRemainderTo: addr, - }; + } as any; // Temporary type fix, will be unnecessary in following PR const mnem = 'awful drop leaf tennis indoor begin mandate discover uncle seven only coil atom any hospital uncover make any climb actor armed measure need above hundred'; @@ -758,7 +759,7 @@ describe('Algosdk (AKA end to end)', () => { lastValid: 323575, genesisHash: 'SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=', assetIndex: 1, - }; + } as any; // Temporary type fix, will be unnecessary in following PR const mnem = 'awful drop leaf tennis indoor begin mandate discover uncle seven only coil atom any hospital uncover make any climb actor armed measure need above hundred'; @@ -783,7 +784,7 @@ describe('Algosdk (AKA end to end)', () => { lastValid: 323575, genesisHash: 'SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=', assetIndex: 1, - }; + } as any; // Temporary type fix, will be unnecessary in following PR const mnem = 'awful drop leaf tennis indoor begin mandate discover uncle seven only coil atom any hospital uncover make any climb actor armed measure need above hundred'; @@ -805,7 +806,7 @@ describe('Algosdk (AKA end to end)', () => { assert.equal(lsig.sig, undefined); assert.equal(lsig.msig, undefined); - const args = [Uint8Array.from('123'), Uint8Array.from('456')]; + const args = [Uint8Array.from([1, 2, 3]), Uint8Array.from([4, 5, 6])]; lsig = new algosdk.LogicSig(program, args); assert.equal(lsig.logic, program); assert.deepEqual(lsig.args, args); @@ -980,11 +981,16 @@ describe('Algosdk (AKA end to end)', () => { address: 'UAPJE355K7BG7RQVMTZOW7QW4ICZJEIC3RZGYG5LSHZ65K6LCNFPJDSR7M', amount: 5002280000000000, amountWithoutPendingRewards: 5000000000000000, + minBalance: 100000, pendingRewards: 2280000000000, rewardBase: 456, rewards: 2280000000000, round: 18241, status: 'Online', + totalAppsOptedIn: 0, + totalAssetsOptedIn: 0, + totalCreatedApps: 0, + totalCreatedAssets: 0, }); const params = new algosdk.modelsv2.ApplicationParams({ creator: 'UAPJE355K7BG7RQVMTZOW7QW4ICZJEIC3RZGYG5LSHZ65K6LCNFPJDSR7M', @@ -1007,7 +1013,7 @@ describe('Algosdk (AKA end to end)', () => { note: 'tjpNge78JD8=', snd: 'UAPJE355K7BG7RQVMTZOW7QW4ICZJEIC3RZGYG5LSHZ65K6LCNFPJDSR7M', type: 'appl', - }; + } as any; // Temporary type fix, will be unnecessary in following PR const req = new algosdk.modelsv2.DryrunRequest({ accounts: [acc], apps: [app], @@ -1015,26 +1021,80 @@ describe('Algosdk (AKA end to end)', () => { protocolVersion: 'future', latestTimestamp: 1592537757, txns: [{ txn }], + sources: [], }); it('should be properly serialized to JSON', () => { - const actual = req.get_obj_for_encoding(); - - const golden = - 'ewogICJhY2NvdW50cyI6IFsKICAgIHsKICAgICAgImFkZHJlc3MiOiAiVUFQSkUzNTVLN0JHN1JRVk1UWk9XN1FXNElDWkpFSUMzUlpHWUc1TFNIWjY1SzZMQ05GUEpEU1I3TSIsCiAgICAgICJhbW91bnQiOiA1MDAyMjgwMDAwMDAwMDAwLAogICAgICAiYW1vdW50LXdpdGhvdXQtcGVuZGluZy1yZXdhcmRzIjogNTAwMDAwMDAwMDAwMDAwMCwKICAgICAgInBlbmRpbmctcmV3YXJkcyI6IDIyODAwMDAwMDAwMDAsCiAgICAgICJyZXdhcmQtYmFzZSI6IDQ1NiwKICAgICAgInJld2FyZHMiOiAyMjgwMDAwMDAwMDAwLAogICAgICAicm91bmQiOiAxODI0MSwKICAgICAgInN0YXR1cyI6ICJPbmxpbmUiCiAgICB9CiAgXSwKICAiYXBwcyI6IFsKICAgIHsKICAgICAgImlkIjogMTM4MDAxMTU4OCwKICAgICAgInBhcmFtcyI6IHsKICAgICAgICAiY3JlYXRvciI6ICJVQVBKRTM1NUs3Qkc3UlFWTVRaT1c3UVc0SUNaSkVJQzNSWkdZRzVMU0haNjVLNkxDTkZQSkRTUjdNIiwKICAgICAgICAiYXBwcm92YWwtcHJvZ3JhbSI6ICJBaUFCQVNJPSIsCiAgICAgICAgImNsZWFyLXN0YXRlLXByb2dyYW0iOiAiQWlBQkFTST0iLAogICAgICAgICJnbG9iYWwtc3RhdGUtc2NoZW1hIjogewogICAgICAgICAgIm51bS1ieXRlLXNsaWNlIjogNSwKICAgICAgICAgICJudW0tdWludCI6IDUKICAgICAgICB9LAogICAgICAgICJsb2NhbC1zdGF0ZS1zY2hlbWEiOiB7CiAgICAgICAgICAibnVtLWJ5dGUtc2xpY2UiOiA1LAogICAgICAgICAgIm51bS11aW50IjogNQogICAgICAgIH0KICAgICAgfQogICAgfQogIF0sCiAgImxhdGVzdC10aW1lc3RhbXAiOiAxNTkyNTM3NzU3LAogICJwcm90b2NvbC12ZXJzaW9uIjogImZ1dHVyZSIsCiAgInJvdW5kIjogMTgyNDEsCiAgInR4bnMiOiBbCiAgICB7CiAgICAgICJ0eG4iOiB7CiAgICAgICAgImFwc3UiOiAiQWlBQkFTST0iLAogICAgICAgICJmZWUiOiAxMDAwLAogICAgICAgICJmdiI6IDE4MjQyLAogICAgICAgICJnaCI6ICJaSWtQczhwVER4YlJKc0ZCMXlKN2d2bnBEdTBRODVGUmtsMk5Da0VBUUxVPSIsCiAgICAgICAgImx2IjogMTkyNDIsCiAgICAgICAgIm5vdGUiOiAidGpwTmdlNzhKRDg9IiwKICAgICAgICAic25kIjogIlVBUEpFMzU1SzdCRzdSUVZNVFpPVzdRVzRJQ1pKRUlDM1JaR1lHNUxTSFo2NUs2TENORlBKRFNSN00iLAogICAgICAgICJ0eXBlIjogImFwcGwiCiAgICAgIH0KICAgIH0KICBdCn0K'; - const goldenString = algosdk.base64ToString(golden, 'base64'); - const expected = JSON.parse(goldenString); - - assert.deepStrictEqual(actual, expected); + const forEncoding = req.get_obj_for_encoding(); + const actual = JSON.stringify(forEncoding, null, 2); + + const expected = `{ + "accounts": [ + { + "address": "UAPJE355K7BG7RQVMTZOW7QW4ICZJEIC3RZGYG5LSHZ65K6LCNFPJDSR7M", + "amount": 5002280000000000, + "amount-without-pending-rewards": 5000000000000000, + "min-balance": 100000, + "pending-rewards": 2280000000000, + "reward-base": 456, + "rewards": 2280000000000, + "round": 18241, + "status": "Online", + "total-apps-opted-in": 0, + "total-assets-opted-in": 0, + "total-created-apps": 0, + "total-created-assets": 0 + } + ], + "apps": [ + { + "id": 1380011588, + "params": { + "creator": "UAPJE355K7BG7RQVMTZOW7QW4ICZJEIC3RZGYG5LSHZ65K6LCNFPJDSR7M", + "approval-program": "AiABASI=", + "clear-state-program": "AiABASI=", + "global-state-schema": { + "num-byte-slice": 5, + "num-uint": 5 + }, + "local-state-schema": { + "num-byte-slice": 5, + "num-uint": 5 + } + } + } + ], + "latest-timestamp": 1592537757, + "protocol-version": "future", + "round": 18241, + "sources": [], + "txns": [ + { + "txn": { + "apsu": "AiABASI=", + "fee": 1000, + "fv": 18242, + "gh": "ZIkPs8pTDxbRJsFB1yJ7gvnpDu0Q85FRkl2NCkEAQLU=", + "lv": 19242, + "note": "tjpNge78JD8=", + "snd": "UAPJE355K7BG7RQVMTZOW7QW4ICZJEIC3RZGYG5LSHZ65K6LCNFPJDSR7M", + "type": "appl" + } + } + ] +}`; + // Cannot directly compare JSON strings because order of keys is not guaranteed + const actualDecoded = JSON.parse(actual); + const expectedDecoded = JSON.parse(expected); + assert.deepStrictEqual(actualDecoded, expectedDecoded); }); it('should be properly serialized to msgpack', () => { - const actual = req.get_obj_for_encoding(true); - const golden = - 'hqhhY2NvdW50c5GIp2FkZHJlc3PZOlVBUEpFMzU1SzdCRzdSUVZNVFpPVzdRVzRJQ1pKRUlDM1JaR1lHNUxTSFo2NUs2TENORlBKRFNSN02mYW1vdW50zwARxYwSd5AAvmFtb3VudC13aXRob3V0LXBlbmRpbmctcmV3YXJkc88AEcN5N+CAAK9wZW5kaW5nLXJld2FyZHPPAAACEtqXEACrcmV3YXJkLWJhc2XNAcincmV3YXJkc88AAAIS2pcQAKVyb3VuZM1HQaZzdGF0dXOmT25saW5lpGFwcHORgqJpZM5SQU5EpnBhcmFtc4WwYXBwcm92YWwtcHJvZ3JhbcQFAiABASKzY2xlYXItc3RhdGUtcHJvZ3JhbcQFAiABASKnY3JlYXRvctk6VUFQSkUzNTVLN0JHN1JRVk1UWk9XN1FXNElDWkpFSUMzUlpHWUc1TFNIWjY1SzZMQ05GUEpEU1I3TbNnbG9iYWwtc3RhdGUtc2NoZW1hgq5udW0tYnl0ZS1zbGljZQWobnVtLXVpbnQFsmxvY2FsLXN0YXRlLXNjaGVtYYKubnVtLWJ5dGUtc2xpY2UFqG51bS11aW50BbBsYXRlc3QtdGltZXN0YW1wzl7sMp2wcHJvdG9jb2wtdmVyc2lvbqZmdXR1cmWlcm91bmTNR0GkdHhuc5GBo3R4boikYXBzdahBaUFCQVNJPaNmZWXNA+iiZnbNR0KiZ2jZLFpJa1BzOHBURHhiUkpzRkIxeUo3Z3ZucER1MFE4NUZSa2wyTkNrRUFRTFU9omx2zUsqpG5vdGWsdGpwTmdlNzhKRDg9o3NuZNk6VUFQSkUzNTVLN0JHN1JRVk1UWk9XN1FXNElDWkpFSUMzUlpHWUc1TFNIWjY1SzZMQ05GUEpEU1I3TaR0eXBlpGFwcGw='; - const goldenBinary = new Uint8Array(algosdk.base64ToBytes(golden)); - const expected = algosdk.decodeObj(goldenBinary); - + const forEncoding = req.get_obj_for_encoding(true, true)!; + const actual = algosdk.encodeObj(forEncoding); + const expected = algosdk.base64ToBytes( + 'hqhhY2NvdW50c5GJp2FkZHJlc3PZOlVBUEpFMzU1SzdCRzdSUVZNVFpPVzdRVzRJQ1pKRUlDM1JaR1lHNUxTSFo2NUs2TENORlBKRFNSN02mYW1vdW50zwARxYwSd5AAvmFtb3VudC13aXRob3V0LXBlbmRpbmctcmV3YXJkc88AEcN5N+CAAKttaW4tYmFsYW5jZc4AAYagr3BlbmRpbmctcmV3YXJkc88AAAIS2pcQAKtyZXdhcmQtYmFzZc0ByKdyZXdhcmRzzwAAAhLalxAApXJvdW5kzUdBpnN0YXR1c6ZPbmxpbmWkYXBwc5GComlkzlJBTkSmcGFyYW1zhbBhcHByb3ZhbC1wcm9ncmFtxAUCIAEBIrNjbGVhci1zdGF0ZS1wcm9ncmFtxAUCIAEBIqdjcmVhdG9y2TpVQVBKRTM1NUs3Qkc3UlFWTVRaT1c3UVc0SUNaSkVJQzNSWkdZRzVMU0haNjVLNkxDTkZQSkRTUjdNs2dsb2JhbC1zdGF0ZS1zY2hlbWGCrm51bS1ieXRlLXNsaWNlBahudW0tdWludAWybG9jYWwtc3RhdGUtc2NoZW1hgq5udW0tYnl0ZS1zbGljZQWobnVtLXVpbnQFsGxhdGVzdC10aW1lc3RhbXDOXuwynbBwcm90b2NvbC12ZXJzaW9upmZ1dHVyZaVyb3VuZM1HQaR0eG5zkYGjdHhuiKRhcHN1qEFpQUJBU0k9o2ZlZc0D6KJmds1HQqJnaNksWklrUHM4cFREeGJSSnNGQjF5Sjdndm5wRHUwUTg1RlJrbDJOQ2tFQVFMVT2ibHbNSyqkbm90Zax0anBOZ2U3OEpEOD2jc25k2TpVQVBKRTM1NUs3Qkc3UlFWTVRaT1c3UVc0SUNaSkVJQzNSWkdZRzVMU0haNjVLNkxDTkZQSkRTUjdNpHR5cGWkYXBwbA==' + ); assert.deepStrictEqual(actual, expected); }); }); diff --git a/tests/8.LogicSig.ts b/tests/8.LogicSig.ts index 7cff3ed59..b08040267 100644 --- a/tests/8.LogicSig.ts +++ b/tests/8.LogicSig.ts @@ -138,8 +138,9 @@ describe('LogicSigAccount', () => { 'SRO4BdGefywQgPYzfhhUp87q7hDdvRNlhL+Tt18wYxWRyiMM7e8j0XQbUp2w/+83VNZG9LVh/Iu8LXtOY1y9Ag==' ) ); - const expectedSigKey = algosdk.decodeAddress(sampleAccount1.addr) - .publicKey; + const expectedSigKey = algosdk.decodeAddress( + sampleAccount1.addr + ).publicKey; assert.deepStrictEqual(lsigAccount.lsig.logic, program); assert.deepStrictEqual(lsigAccount.lsig.args, args); @@ -307,7 +308,7 @@ describe('LogicSigAccount', () => { const lsigAccount = algosdk.LogicSigAccount.fromByte(msigEncoded); // modify signature - lsigAccount.lsig.msig!.subsig[0].s[0] = 0; + lsigAccount.lsig.msig!.subsig[0].s![0] = 0; assert.strictEqual(lsigAccount.verify(), false); }); @@ -509,9 +510,9 @@ describe('signLogicSigTransaction', () => { assert.throws( () => algosdk.signLogicSigTransaction(txn, lsig), - (err) => - err.message === + new Error( 'Logic signature verification failed. Ensure the program and signature are valid.' + ) ); }); }); diff --git a/tests/9.Client.ts b/tests/9.Client.ts index 3b7fe88aa..53f4116f3 100644 --- a/tests/9.Client.ts +++ b/tests/9.Client.ts @@ -139,34 +139,45 @@ describe('client', () => { }); }); describe('AlgodClient construction', () => { - /* eslint-disable dot-notation */ + function getBaseClient(client: AlgodClient): URLTokenBaseHTTPClient { + // eslint-disable-next-line dot-notation + return client.c['bc'] as URLTokenBaseHTTPClient; + } + + function getBaseUrl(client: AlgodClient): URL { + // eslint-disable-next-line dot-notation + return getBaseClient(client)['baseURL']; + } + const baseServer = 'http://localhost'; it('should not assign a bogus port', () => { const client = new AlgodClient('', baseServer); - assert.strictEqual(client.c['bc']['baseURL']['port'], ''); + assert.strictEqual(getBaseUrl(client).port, ''); }); it('should accept a port as an argument and assign it correctly', () => { const client = new AlgodClient('', baseServer, 123); - assert.strictEqual(client.c['bc']['baseURL']['port'], '123'); + assert.strictEqual(getBaseUrl(client).port, '123'); }); it('should accept a port in the url assign it correctly', () => { const client = new AlgodClient('', `${baseServer}:${123}`); - assert.strictEqual(client.c['bc']['baseURL']['port'], '123'); + assert.strictEqual(getBaseUrl(client).port, '123'); }); it('should override the port from the URL with the one specified in the argument', () => { const client = new AlgodClient('', `${baseServer}:${123}`, 456); - assert.strictEqual(client.c['bc']['baseURL']['port'], '456'); + assert.strictEqual(getBaseUrl(client).port, '456'); }); it('should not provide auth request headers when the token is empty', () => { const client = new AlgodClient('', `${baseServer}:${123}`, 456); assert.deepStrictEqual( { - ...client.c['bc']['tokenHeaders'], - ...client.c['bc']['defaultHeaders'], + // eslint-disable-next-line dot-notation + ...getBaseClient(client)['tokenHeader'], + // eslint-disable-next-line dot-notation + ...getBaseClient(client)['defaultHeaders'], }, {} ); diff --git a/tests/cucumber/steps/steps.js b/tests/cucumber/steps/steps.js index 95dedc706..f03b1a7e7 100644 --- a/tests/cucumber/steps/steps.js +++ b/tests/cucumber/steps/steps.js @@ -4376,9 +4376,8 @@ module.exports = function getSteps(options) { function (resultIndex, methodArg) { // Return format for randomInt method const methodReturnType = algosdk.ABIType.from('(uint64,byte[17])'); - const actualResult = this.composerExecuteResponse.methodResults[ - resultIndex - ]; + const actualResult = + this.composerExecuteResponse.methodResults[resultIndex]; const resultArray = methodReturnType.decode(actualResult.rawReturnValue); assert.strictEqual(resultArray.length, 2); const [randomIntResult, witnessResult] = resultArray; @@ -4396,9 +4395,8 @@ module.exports = function getSteps(options) { function (resultIndex, methodArg) { // Return format for randElement method const methodReturnType = algosdk.ABIType.from('(byte,byte[17])'); - const actualResult = this.composerExecuteResponse.methodResults[ - resultIndex - ]; + const actualResult = + this.composerExecuteResponse.methodResults[resultIndex]; const resultArray = methodReturnType.decode(actualResult.rawReturnValue); assert.strictEqual(resultArray.length, 2); const [randomResult, witnessResult] = resultArray; @@ -4431,8 +4429,8 @@ module.exports = function getSteps(options) { Then( 'I can dig the {int}th atomic result with path {string} and see the value {string}', function (index, pathString, expectedResult) { - let actualResult = this.composerExecuteResponse.methodResults[index] - .txInfo; + let actualResult = + this.composerExecuteResponse.methodResults[index].txInfo; actualResult = glom(actualResult.get_obj_for_encoding(), pathString); assert.strictEqual(expectedResult, actualResult.toString()); @@ -4877,8 +4875,8 @@ module.exports = function getSteps(options) { const stringPath = failAt.split(','); const failPath = stringPath.map((n) => parseInt(n, 10)); - const failedMessage = this.simulateResponse.txnGroups[groupNum] - .failureMessage; + const failedMessage = + this.simulateResponse.txnGroups[groupNum].failureMessage; assert.ok( failedMessage.includes(errorMsg), `Error message: "${failedMessage}" does not contain "${errorMsg}"` @@ -4945,14 +4943,13 @@ module.exports = function getSteps(options) { const optionList = execTraceOptions.split(','); assert.ok(this.simulateRequest); - this.simulateRequest.execTraceConfig = new algosdk.modelsv2.SimulateTraceConfig( - { + this.simulateRequest.execTraceConfig = + new algosdk.modelsv2.SimulateTraceConfig({ enable: true, scratchChange: optionList.includes('scratch'), stackChange: optionList.includes('stack'), stateChange: optionList.includes('state'), - } - ); + }); } ); @@ -4999,9 +4996,9 @@ module.exports = function getSteps(options) { .map(Number); assert.ok(txnGroupPathSplit.length > 0); - let traces = this.simulateResponse.txnGroups[0].txnResults[ - txnGroupPathSplit[0] - ].execTrace; + let traces = + this.simulateResponse.txnGroups[0].txnResults[txnGroupPathSplit[0]] + .execTrace; assert.ok(traces); for (let i = 1; i < txnGroupPathSplit.length; i++) { @@ -5173,9 +5170,9 @@ module.exports = function getSteps(options) { .map(Number); assert.ok(txnGroupPathSplit.length > 0); - let traces = this.simulateResponse.txnGroups[0].txnResults[ - txnGroupPathSplit[0] - ].execTrace; + let traces = + this.simulateResponse.txnGroups[0].txnResults[txnGroupPathSplit[0]] + .execTrace; assert.ok(traces); for (let i = 1; i < txnGroupPathSplit.length; i++) { @@ -5242,9 +5239,9 @@ module.exports = function getSteps(options) { .map(Number); assert.ok(txnGroupPathSplit.length > 0); - let traces = this.simulateResponse.txnGroups[0].txnResults[ - txnGroupPathSplit[0] - ].execTrace; + let traces = + this.simulateResponse.txnGroups[0].txnResults[txnGroupPathSplit[0]] + .execTrace; assert.ok(traces); for (let i = 1; i < txnGroupPathSplit.length; i++) { diff --git a/tsconfig.json b/tsconfig.json index 0e86b2194..e655222f6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,8 @@ "moduleResolution": "node", "resolveJsonModule": true, "esModuleInterop": true, - "sourceMap": true + "sourceMap": true, + "strict": true }, "include": ["./src"] }