diff --git a/.yarn/cache/@types-bn.js-npm-5.1.0-4a0335ff4f-1dc1cbbd7a.zip b/.yarn/cache/@types-bn.js-npm-5.1.0-4a0335ff4f-1dc1cbbd7a.zip deleted file mode 100644 index 8bc5edb0..00000000 Binary files a/.yarn/cache/@types-bn.js-npm-5.1.0-4a0335ff4f-1dc1cbbd7a.zip and /dev/null differ diff --git a/.yarn/cache/@types-bn.js-npm-5.1.1-346449981b-e50ed2dd3a.zip b/.yarn/cache/@types-bn.js-npm-5.1.1-346449981b-e50ed2dd3a.zip new file mode 100644 index 00000000..8f4ab48e Binary files /dev/null and b/.yarn/cache/@types-bn.js-npm-5.1.1-346449981b-e50ed2dd3a.zip differ diff --git a/.yarn/cache/@types-node-npm-18.15.12-c785f88018-dff7596db8.zip b/.yarn/cache/@types-node-npm-18.15.12-c785f88018-dff7596db8.zip new file mode 100644 index 00000000..413ff4ed Binary files /dev/null and b/.yarn/cache/@types-node-npm-18.15.12-c785f88018-dff7596db8.zip differ diff --git a/.yarn/cache/@types-node-npm-18.16.1-b36b37400b-799026b949.zip b/.yarn/cache/@types-node-npm-18.16.1-b36b37400b-799026b949.zip new file mode 100644 index 00000000..0a2e8951 Binary files /dev/null and b/.yarn/cache/@types-node-npm-18.16.1-b36b37400b-799026b949.zip differ diff --git a/.yarn/cache/acorn-jsx-npm-5.3.1-6ba8185d02-daf441a9d7.zip b/.yarn/cache/acorn-jsx-npm-5.3.1-6ba8185d02-daf441a9d7.zip new file mode 100644 index 00000000..f64bdd93 Binary files /dev/null and b/.yarn/cache/acorn-jsx-npm-5.3.1-6ba8185d02-daf441a9d7.zip differ diff --git a/.yarn/cache/chokidar-npm-3.5.2-6752340fec-d1fda32fcd.zip b/.yarn/cache/chokidar-npm-3.5.2-6752340fec-d1fda32fcd.zip new file mode 100644 index 00000000..594bbeb3 Binary files /dev/null and b/.yarn/cache/chokidar-npm-3.5.2-6752340fec-d1fda32fcd.zip differ diff --git a/.yarn/cache/globby-npm-11.0.3-bb0a10f600-7d0d3e1bcb.zip b/.yarn/cache/globby-npm-11.0.3-bb0a10f600-7d0d3e1bcb.zip new file mode 100644 index 00000000..c83fe7e0 Binary files /dev/null and b/.yarn/cache/globby-npm-11.0.3-bb0a10f600-7d0d3e1bcb.zip differ diff --git a/.yarn/cache/qs-npm-6.11.1-1dedced93e-82ee78ef12.zip b/.yarn/cache/qs-npm-6.11.1-1dedced93e-82ee78ef12.zip new file mode 100644 index 00000000..0198ede6 Binary files /dev/null and b/.yarn/cache/qs-npm-6.11.1-1dedced93e-82ee78ef12.zip differ diff --git a/.yarn/cache/stripe-npm-12.2.0-b283e95fde-dbd478d43a.zip b/.yarn/cache/stripe-npm-12.2.0-b283e95fde-dbd478d43a.zip new file mode 100644 index 00000000..4a6928f7 Binary files /dev/null and b/.yarn/cache/stripe-npm-12.2.0-b283e95fde-dbd478d43a.zip differ diff --git a/.yarn/cache/stripe-npm-13.2.0-9e147c31ae-5febeebbce.zip b/.yarn/cache/stripe-npm-13.2.0-9e147c31ae-5febeebbce.zip new file mode 100644 index 00000000..b58b31c4 Binary files /dev/null and b/.yarn/cache/stripe-npm-13.2.0-9e147c31ae-5febeebbce.zip differ diff --git a/package.json b/package.json index 4c4f636e..26282ab6 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "commander": "^8.2.0", "ipfs-only-hash": "^4.0.0", "lodash": "^4.17.21", - "prompts": "^2.4.0" + "prompts": "^2.4.0", + "stripe": "^12.2.0" }, "engines": { "node": ">=18" @@ -51,7 +52,7 @@ "typescript": "^5.1.6" }, "scripts": { - "clean": "rimraf [ lib .nyc_output node_modules coverage ]", + "clean": "rimraf [ lib .nyc_output coverage ]", "format": "prettier --write \"src/**/*.ts\"", "lint": "eslint . --ext .ts", "lintfix": "eslint . --ext .ts --fix", diff --git a/src/commands/get_balance.ts b/src/commands/get_balance.ts index f7cbef1b..78644c13 100644 --- a/src/commands/get_balance.ts +++ b/src/commands/get_balance.ts @@ -1,10 +1,13 @@ -import { AR } from 'ardrive-core-js'; +import { AR, JWKWallet } from 'ardrive-core-js'; +import axios from 'axios'; import { cliWalletDAOFactory } from '..'; import { CLICommand, ParametersHelper } from '../CLICommand'; import { CLIAction } from '../CLICommand/action'; import { SUCCESS_EXIT_CODE } from '../CLICommand/error_codes'; import { AddressParameter, GatewayParameter, WalletTypeParameters } from '../parameter_declarations'; +import { toB64Url } from '../utils/base64'; import { getArweaveFromURL } from '../utils/get_arweave_for_url'; +import { jwkInterfaceToPublicKey, jwkInterfaceToPrivateKey, signData, publicKeyToHeader } from '../utils/signData'; new CLICommand({ name: 'get-balance', @@ -16,8 +19,27 @@ new CLICommand({ const walletDAO = cliWalletDAOFactory(arweave); const balanceInWinston = await walletDAO.getAddressWinstonBalance(address); const balanceInAR = new AR(balanceInWinston); - console.log(`${balanceInWinston}\tWinston`); - console.log(`${balanceInAR}\tAR`); + console.log(`Winston:\t${balanceInWinston}`); + console.log(`AR:\t\t${balanceInAR}`); + + const wallet = (await parameters.getOptionalWallet()) as JWKWallet; + + if (wallet) { + const nonce = '123'; + const publicKey = jwkInterfaceToPublicKey(wallet.getPrivateKey()); + const privateKey = jwkInterfaceToPrivateKey(wallet.getPrivateKey()); + const signature = await signData(privateKey, nonce); + + const { data } = await axios.get(`https://payment.ardrive.dev/v1/balance`, { + headers: { + 'x-public-key': publicKeyToHeader(publicKey), + 'x-nonce': nonce, + 'x-signature': toB64Url(Buffer.from(signature)) + } + }); + console.log(`Turbo Credits:\t${+data / 1_000_000_000_000}`); + } + return SUCCESS_EXIT_CODE; }) }); diff --git a/src/commands/index.ts b/src/commands/index.ts index e7aeeac4..a2b74f7e 100644 --- a/src/commands/index.ts +++ b/src/commands/index.ts @@ -29,6 +29,7 @@ import './rename_folder'; import './retry_tx'; import './send_ar'; import './send_tx'; +import './top_up'; import './tx_status'; import './upload_file'; diff --git a/src/commands/top_up.ts b/src/commands/top_up.ts new file mode 100644 index 00000000..083e3a4e --- /dev/null +++ b/src/commands/top_up.ts @@ -0,0 +1,124 @@ +import axios from 'axios'; +import { CLICommand, ParametersHelper } from '../CLICommand'; +import { CLIAction } from '../CLICommand/action'; +import { ERROR_EXIT_CODE, SUCCESS_EXIT_CODE } from '../CLICommand/error_codes'; +import { + CurrencyTypeParameter, + DestinationAddressParameter, + PayInCliParameter, + PaymentAmountParameter +} from '../parameter_declarations'; +import { Stripe } from 'stripe'; +import prompts from 'prompts'; +import { exec } from 'child_process'; + +// ArDrive Stripe Test PUBLISHABLE Key. Enable this one to test workflows +const stripeTestPublishableKey = + // /* cspell:disable */ 'pk_test_51JUAtwC8apPOWkDLh2FPZkQkiKZEkTo6wqgLCtQoClL6S4l2jlbbc5MgOdwOUdU9Tn93NNvqAGbu115lkJChMikG00XUfTmo2z'; /* cspell:enable */ + + // ArDrive Stripe Production PUBLISHABLE Key. This one is safe to have on a front end application 👍 + // const stripeProdPublishableKey = + /* cspell:disable */ 'pk_live_51JUAtwC8apPOWkDLMQqNF9sPpfneNSPnwX8YZ8y1FNDl6v94hZIwzgFSYl27bWE4Oos8CLquunUswKrKcaDhDO6m002Yj9AeKj'; /* cspell:enable */ + +const stripe = new Stripe(stripeTestPublishableKey, { apiVersion: '2022-11-15' }); + +new CLICommand({ + name: 'top-up', + parameters: [PaymentAmountParameter, CurrencyTypeParameter, PayInCliParameter, DestinationAddressParameter], + action: new CLIAction(async function action(options) { + const parameters = new ParametersHelper(options); + + const paymentAmount = parameters.getRequiredParameterValue(PaymentAmountParameter); + const currencyType = parameters.getRequiredParameterValue(CurrencyTypeParameter); + const destinationAddress = parameters.getRequiredParameterValue(DestinationAddressParameter); + const payInCli = parameters.getParameterValue(PayInCliParameter); + + const method = payInCli ? 'payment-intent' : 'checkout-session'; + + const paymentServiceUrl = 'https://payment.ardrive.io'; + // const paymentServiceUrl = 'https://payment.ardrive.dev'; + // const paymentServiceUrl = 'http://localhost:3001'; + + const { data } = await axios.get<{ + paymentSession: { client_secret: string; id: string; url: string }; + topUpQuote: { winstonCreditAmount: string }; + }>(`${paymentServiceUrl}/v1/top-up/${method}/${destinationAddress}/${currencyType}/${paymentAmount}`); + + const { client_secret, id, url } = data.paymentSession; + + console.error(`${method} from payment service has been successfully received!`); + + if (payInCli) { + const { number } = await prompts({ + type: 'text', + name: 'number', + message: 'Enter your card number' + }); + + const { expiration } = await prompts({ + type: 'text', + name: 'expiration', + message: 'Enter your card expiration with the format mm/dd. e.g: "01/26"' + }); + + const { cvc } = await prompts({ + type: 'password', + name: 'cvc', + message: 'Enter your card cvc' + }); + + // Use test card for faster testing 🚀 + // const testCard = { number: '4242424242424242', exp_month: 12, exp_year: 26, cvc: '123' }; + + const [exp_month, exp_year] = (expiration as string).split('/').map((e) => +e); + const realCard = { number: (number as string).replace('-', ''), exp_month, exp_year, cvc }; + + console.error('Creating payment using Stripe payment method...'); + + // Create the PaymentMethod using the details collected by the Payment Element + const paymentMethod = await stripe.paymentMethods.create({ + type: 'card', + card: realCard + }); + + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + await stripe.paymentIntents.confirm(id, { + payment_method: paymentMethod.id, + client_secret: client_secret + }); + } else { + // Build the Stripe Checkout URL with the Payment Intent client secret + const checkoutUrl = url; + + // Open the user's default browser and redirect them to the Stripe Checkout page + console.error( + 'Checkout session from payment service has been successfully received!\nOpening default browser and sending to Stripe checkout...' + ); + + try { + if (process.platform === 'darwin') { + // macOS + exec(`open ${checkoutUrl}`); + } else if (process.platform === 'win32') { + // Windows + exec(`start "" "${checkoutUrl}"`); + } else { + // Linux/Unix + open(checkoutUrl); + } + } catch (error) { + console.error(error); + console.error( + 'Stripe checkout session failed to open! Please go here in a browser to fulfill your top up quote: ', + checkoutUrl + ); + return ERROR_EXIT_CODE; + } + } + + console.error(`You've topped up for ${+data.topUpQuote.winstonCreditAmount / 1_000_000_000_000} ARC!`); + + return SUCCESS_EXIT_CODE; + }) +}); diff --git a/src/parameter_declarations.ts b/src/parameter_declarations.ts index b419c475..efdab944 100644 --- a/src/parameter_declarations.ts +++ b/src/parameter_declarations.ts @@ -49,6 +49,9 @@ export const DataGqlTagsParameter = 'dataGqlTags'; export const MetaDataFileParameter = 'metadataFile'; export const MetaDataGqlTagsParameter = 'metadataGqlTags'; export const MetadataJsonParameter = 'metadataJson'; +export const PaymentAmountParameter = 'paymentAmount'; +export const CurrencyTypeParameter = 'currencyType'; +export const PayInCliParameter = 'payInCli'; // Aggregates for convenience export const CustomMetaDataParameters = [ @@ -569,3 +572,22 @@ Parameter.declare({ '(OPTIONAL) A list of custom Arweave tag name and value pairs in the format `"TAG_NAME" "TAG_VALUE"` that will be applied to all file data transactions created during an invocation. Must be an even number of string values. Can NOT be used in conjunction with --metadata-file', forbiddenConjunctionParameters: [MetaDataFileParameter] }); + +Parameter.declare({ + name: CurrencyTypeParameter, + aliases: ['-c', '--currency-type'], + description: 'Currency type to get top up for' +}); + +Parameter.declare({ + name: PaymentAmountParameter, + aliases: ['-a', '--payment-amount'], + description: 'Payment amount get top up for' +}); + +Parameter.declare({ + name: PayInCliParameter, + aliases: ['-cli', '--pay-in-cli'], + description: `Pay in the CLI (BETA - LESS SECURE - NOT RECOMMENDED)`, + type: 'boolean' +}); diff --git a/src/utils/base64.ts b/src/utils/base64.ts new file mode 100644 index 00000000..1dcf4c04 --- /dev/null +++ b/src/utils/base64.ts @@ -0,0 +1,7 @@ +export function fromB64UrlToBuffer(input: string): Buffer { + return Buffer.from(input, 'base64'); +} + +export function toB64Url(buffer: Buffer): string { + return buffer.toString('base64'); +} diff --git a/src/utils/signData.ts b/src/utils/signData.ts new file mode 100644 index 00000000..d5d04e93 --- /dev/null +++ b/src/utils/signData.ts @@ -0,0 +1,47 @@ +import { JWKInterface } from 'arweave/node/lib/wallet'; +import crypto, { createPrivateKey, createPublicKey, KeyLike, KeyObject } from 'crypto'; +import { toB64Url } from './base64'; + +export async function signData(privateKey: KeyLike, dataToSign: string): Promise { + const pem = ((privateKey as unknown) as crypto.KeyObject).export({ + format: 'pem', + type: 'pkcs1' + }); + const sign = crypto.createSign('sha256'); + sign.update(dataToSign); + + const signature = sign.sign({ + key: pem, + padding: crypto.constants.RSA_PKCS1_PSS_PADDING, + saltLength: 0 // We do not need to salt the signature since we combine with a random UUID + }); + return Promise.resolve(signature); +} + +export function jwkInterfaceToPublicKey(jwk: JWKInterface): KeyObject { + const publicKey = createPublicKey({ + key: { + ...jwk, + kty: 'RSA' + }, + format: 'jwk' + }); + + return publicKey; +} + +export function jwkInterfaceToPrivateKey(jwk: JWKInterface): KeyObject { + const privateKey = createPrivateKey({ + key: { + ...jwk, + kty: 'RSA' + }, + format: 'jwk' + }); + + return privateKey; +} + +export function publicKeyToHeader(publicKey: KeyObject) { + return toB64Url(Buffer.from(JSON.stringify(publicKey.export({ format: 'jwk' })))); +} diff --git a/yarn.lock b/yarn.lock index accc8b2c..a22e5169 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1,6 +1,3 @@ -# This file is generated by running "yarn install" inside your project. -# Manual changes might be lost - proceed with caution! - __metadata: version: 6 cacheKey: 8 @@ -28,6 +25,15 @@ __metadata: languageName: node linkType: hard +"@babel/code-frame@npm:7.12.11": + version: 7.12.11 + resolution: "@babel/code-frame@npm:7.12.11" + dependencies: + "@babel/highlight": ^7.10.4 + checksum: 3963eff3ebfb0e091c7e6f99596ef4b258683e4ba8a134e4e95f77afe85be5c931e184fff6435fb4885d12eba04a5e25532f7fbc292ca13b48e7da943474e2f3 + languageName: node + linkType: hard + "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.14.5": version: 7.14.5 resolution: "@babel/code-frame@npm:7.14.5" @@ -1133,8 +1139,8 @@ __metadata: linkType: hard "@types/bn.js@npm:^5": - version: 5.1.0 - resolution: "@types/bn.js@npm:5.1.0" + version: 5.1.1 + resolution: "@types/bn.js@npm:5.1.1" dependencies: "@types/node": "*" checksum: 1dc1cbbd7a1e8bf3614752e9602f558762a901031f499f3055828b5e3e2bba16e5b88c27b3c4152ad795248fbe4086c731a5c4b0f29bb243f1875beeeabee59c @@ -1208,6 +1214,13 @@ __metadata: languageName: node linkType: hard +"@types/json-schema@npm:^7.0.3": + version: 7.0.7 + resolution: "@types/json-schema@npm:7.0.7" + checksum: ea3b409235862d28122751158f4054e729e31ad844bd7b8b23868f38c518047b1c0e8e4e7cc293e02c31a2fb8cfc8a4506c2de2a745cf78b218e064fb8898cd4 + languageName: node + linkType: hard + "@types/jwk-to-pem@npm:^2.0.0": version: 2.0.1 resolution: "@types/jwk-to-pem@npm:2.0.1" @@ -1274,6 +1287,13 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:>=8.1.0": + version: 18.15.12 + resolution: "@types/node@npm:18.15.12" + checksum: dff7596db8d0a18bcd8da542dc62ed4377cba39546ff53baaa06d106f1482bc3e4e5e03644f5d1e3cef0904ffbe8ebbc244b2b0851f8025ab2a3959ee0ace58f + languageName: node + linkType: hard + "@types/node@npm:^12.12.54": version: 12.20.55 resolution: "@types/node@npm:12.20.55" @@ -1288,6 +1308,13 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^18.16.1": + version: 18.16.1 + resolution: "@types/node@npm:18.16.1" + checksum: 799026b949a48993cba7c9b81b2eabfdfb34c880744cb44c1c990fbedc9e315f3634d126eb2cf9a6e0795577c01016e2326d98565bef695ada9d363fadeb6946 + languageName: node + linkType: hard + "@types/node@npm:^18.17.2": version: 18.17.2 resolution: "@types/node@npm:18.17.2" @@ -1425,6 +1452,23 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/parser@npm:^4.18.0": + version: 4.20.0 + resolution: "@typescript-eslint/parser@npm:4.20.0" + dependencies: + "@typescript-eslint/scope-manager": 4.20.0 + "@typescript-eslint/types": 4.20.0 + "@typescript-eslint/typescript-estree": 4.20.0 + debug: ^4.1.1 + peerDependencies: + eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 26739b539bb02fd66b26eda61ef184e49055180df7db6e298f8295f00db19edde59111bb7617741b586bf3f2fabba9b2a707f6c25518617e01b6e26413051c15 + languageName: node + linkType: hard + "@typescript-eslint/parser@npm:^6.2.1": version: 6.2.1 resolution: "@typescript-eslint/parser@npm:6.2.1" @@ -1470,6 +1514,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:4.20.0": + version: 4.20.0 + resolution: "@typescript-eslint/types@npm:4.20.0" + checksum: 2eb8e44fd796c2d608a7c5a8e13eb79c1a5e9fb5dd298f8850b5c34a4fd319511240b8a559333880f21e24271a88070f71a0edfb3322b5f918127a5b203015f8 + languageName: node + linkType: hard + "@typescript-eslint/types@npm:6.2.1": version: 6.2.1 resolution: "@typescript-eslint/types@npm:6.2.1" @@ -1477,6 +1528,23 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/typescript-estree@npm:4.20.0": + version: 4.20.0 + resolution: "@typescript-eslint/typescript-estree@npm:4.20.0" + dependencies: + "@typescript-eslint/typescript-estree": 6.2.1 + "@typescript-eslint/utils": 6.2.1 + debug: ^4.3.4 + ts-api-utils: ^1.0.1 + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 5f40cdec330cdde7e3bc7d802f9f727168181cb0bdf1614f6113931bc7860b44b6e8358ca173694be74787c078e54cece949aa23074c590cb7e6ee42160c20ca + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:6.2.1": version: 6.2.1 resolution: "@typescript-eslint/typescript-estree@npm:6.2.1" @@ -1522,6 +1590,13 @@ __metadata: languageName: node linkType: hard +"@ungap/promise-all-settled@npm:1.1.2": + version: 1.1.2 + resolution: "@ungap/promise-all-settled@npm:1.1.2" + checksum: 08d37fdfa23a6fe8139f1305313562ebad973f3fac01bcce2773b2bda5bcb0146dfdcf3cb6a722cf0a5f2ca0bc56a827eac8f1e7b3beddc548f654addf1fc34c + languageName: node + linkType: hard + "@weavery/clarity@npm:^0.1.5": version: 0.1.5 resolution: "@weavery/clarity@npm:0.1.5" @@ -1564,6 +1639,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:^7.4.0": + version: 7.4.1 + resolution: "acorn@npm:7.4.1" + bin: + acorn: bin/acorn + checksum: 1860f23c2107c910c6177b7b7be71be350db9e1080d814493fae143ae37605189504152d1ba8743ba3178d0b37269ce1ffc42b101547fdc1827078f82671e407 + languageName: node + linkType: hard + "acorn@npm:^8.4.1": version: 8.5.0 resolution: "acorn@npm:8.5.0" @@ -1611,6 +1695,18 @@ __metadata: languageName: node linkType: hard +"ajv@npm:^8.0.1": + version: 8.0.2 + resolution: "ajv@npm:8.0.2" + dependencies: + fast-deep-equal: ^3.1.1 + json-schema-traverse: ^1.0.0 + require-from-string: ^2.0.2 + uri-js: ^4.2.2 + checksum: bb7971eb1bc2924150977ef1d993a511e03080da017195e0dea7c45c7e49975103f0f200a580f350b6995f25ea10aa82a91ae1e0fabb761a3761bcb09c812c77 + languageName: node + linkType: hard + "algo-msgpack-with-bigint@npm:^2.1.1": version: 2.1.1 resolution: "algo-msgpack-with-bigint@npm:2.1.1" @@ -1822,6 +1918,7 @@ __metadata: rimraf: ^3.0.2 sinon: ^11.1.2 source-map-support: ^0.5.20 + stripe: ^12.2.0 ts-node: ^10.2.1 ts-sinon: ^2.0.1 typescript: ^5.1.6 @@ -3258,6 +3355,20 @@ __metadata: languageName: node linkType: hard +"eslint-visitor-keys@npm:^1.1.0, eslint-visitor-keys@npm:^1.3.0": + version: 1.3.0 + resolution: "eslint-visitor-keys@npm:1.3.0" + checksum: 37a19b712f42f4c9027e8ba98c2b06031c17e0c0a4c696cd429bd9ee04eb43889c446f2cd545e1ff51bef9593fcec94ecd2c2ef89129fcbbf3adadbef520376a + languageName: node + linkType: hard + +"eslint-visitor-keys@npm:^2.0.0": + version: 2.0.0 + resolution: "eslint-visitor-keys@npm:2.0.0" + checksum: e07e9863fb8c9b1453f5ad1a26f3cc8dd6b349b26605cc06bc0c61215ac5b6f13a4d08c875218e6c0f8ac8fc06ca6e090df769e32c569f0fd2e6a848b8a76c75 + languageName: node + linkType: hard + "eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.2": version: 3.4.2 resolution: "eslint-visitor-keys@npm:3.4.2" @@ -3265,6 +3376,48 @@ __metadata: languageName: node linkType: hard +"eslint@npm:^7.23.0": + version: 7.23.0 + resolution: "eslint@npm:7.23.0" + dependencies: + "@babel/code-frame": 7.12.11 + "@eslint/eslintrc": ^0.4.0 + ajv: ^6.10.0 + chalk: ^4.0.0 + cross-spawn: ^7.0.2 + debug: ^4.3.2 + doctrine: ^3.0.0 + escape-string-regexp: ^4.0.0 + eslint-scope: ^7.2.2 + eslint-visitor-keys: ^3.4.2 + espree: ^9.6.1 + esquery: ^1.4.2 + esutils: ^2.0.2 + fast-deep-equal: ^3.1.3 + file-entry-cache: ^6.0.1 + find-up: ^5.0.0 + glob-parent: ^6.0.2 + globals: ^13.19.0 + graphemer: ^1.4.0 + ignore: ^5.2.0 + imurmurhash: ^0.1.4 + is-glob: ^4.0.0 + is-path-inside: ^3.0.3 + js-yaml: ^4.1.0 + json-stable-stringify-without-jsonify: ^1.0.1 + levn: ^0.4.1 + lodash.merge: ^4.6.2 + minimatch: ^3.1.2 + natural-compare: ^1.4.0 + optionator: ^0.9.3 + strip-ansi: ^6.0.1 + text-table: ^0.2.0 + bin: + eslint: bin/eslint.js + checksum: a8d2e9a76a46c84506b0f1a4dc5ac11bfc68ad3c074c1061cabb86c8205aafb5f2786bb662968179be10cc067674ed2b9ad5879dd84027b53660d1f6fa407f4a + languageName: node + linkType: hard + "eslint@npm:^8.46.0": version: 8.46.0 resolution: "eslint@npm:8.46.0" @@ -3351,6 +3504,13 @@ __metadata: languageName: node linkType: hard +"estraverse@npm:^4.1.1": + version: 4.3.0 + resolution: "estraverse@npm:4.3.0" + checksum: a6299491f9940bb246124a8d44b7b7a413a8336f5436f9837aaa9330209bd9ee8af7e91a654a3545aee9c54b3308e78ee360cef1d777d37cfef77d2fa33b5827 + languageName: node + linkType: hard + "estraverse@npm:^5.1.0, estraverse@npm:^5.2.0": version: 5.2.0 resolution: "estraverse@npm:5.2.0" @@ -3818,6 +3978,13 @@ fsevents@~2.3.2: languageName: node linkType: hard +"functional-red-black-tree@npm:^1.0.1": + version: 1.0.1 + resolution: "functional-red-black-tree@npm:1.0.1" + checksum: ca6c170f37640e2d94297da8bb4bf27a1d12bea3e00e6a3e007fd7aa32e37e000f5772acf941b4e4f3cf1c95c3752033d0c509af157ad8f526e7f00723b9eb9f + languageName: node + linkType: hard + "functions-have-names@npm:^1.2.2": version: 1.2.3 resolution: "functions-have-names@npm:1.2.3" @@ -3984,6 +4151,15 @@ fsevents@~2.3.2: languageName: node linkType: hard +"globals@npm:^12.1.0": + version: 12.4.0 + resolution: "globals@npm:12.4.0" + dependencies: + type-fest: ^0.8.1 + checksum: 7ae5ee16a96f1e8d71065405f57da0e33267f6b070cd36a5444c7780dd28639b48b92413698ac64f04bf31594f9108878bd8cb158ecdf759c39e05634fefcca6 + languageName: node + linkType: hard + "globals@npm:^13.19.0": version: 13.20.0 resolution: "globals@npm:13.20.0" @@ -3993,6 +4169,15 @@ fsevents@~2.3.2: languageName: node linkType: hard +"globals@npm:^13.6.0": + version: 13.7.0 + resolution: "globals@npm:13.7.0" + dependencies: + type-fest: ^0.20.2 + checksum: 27433ceaf57571ccadcd01e0497c2f3485ad2aea93985c9e3850ce54835d7ffce1eddcc210f412a327d855b77f6c25307efee7f448c01e11e3929d12544b820a + languageName: node + linkType: hard + "globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" @@ -4021,6 +4206,13 @@ fsevents@~2.3.2: languageName: node linkType: hard +"growl@npm:1.10.5": + version: 1.10.5 + resolution: "growl@npm:1.10.5" + checksum: 4b86685de6831cebcbb19f93870bea624afee61124b0a20c49017013987cd129e73a8c4baeca295728f41d21265e1f859d25ef36731b142ca59c655fea94bb1a + languageName: node + linkType: hard + "hamt-sharding@npm:^2.0.0": version: 2.0.1 resolution: "hamt-sharding@npm:2.0.1" @@ -4262,6 +4454,20 @@ fsevents@~2.3.2: languageName: node linkType: hard +"ignore@npm:^4.0.6": + version: 4.0.6 + resolution: "ignore@npm:4.0.6" + checksum: 248f82e50a430906f9ee7f35e1158e3ec4c3971451dd9f99c9bc1548261b4db2b99709f60ac6c6cac9333494384176cc4cc9b07acbe42d52ac6a09cad734d800 + languageName: node + linkType: hard + +"ignore@npm:^5.1.4": + version: 5.1.8 + resolution: "ignore@npm:5.1.8" + checksum: 967abadb61e2cb0e5c5e8c4e1686ab926f91bc1a4680d994b91947d3c65d04c3ae126dcdf67f08e0feeb8ff8407d453e641aeeddcc47a3a3cca359f283cf6121 + languageName: node + linkType: hard + "ignore@npm:^5.2.0, ignore@npm:^5.2.4": version: 5.2.4 resolution: "ignore@npm:5.2.4" @@ -4269,6 +4475,16 @@ fsevents@~2.3.2: languageName: node linkType: hard +"import-fresh@npm:^3.0.0, import-fresh@npm:^3.2.1": + version: 3.3.0 + resolution: "import-fresh@npm:3.3.0" + dependencies: + parent-module: ^1.0.0 + resolve-from: ^4.0.0 + checksum: 2cacfad06e652b1edc50be650f7ec3be08c5e5a6f6d12d035c440a42a8cc028e60a5b99ca08a77ab4d6b1346da7d971915828f33cdab730d3d42f08242d09baa + languageName: node + linkType: hard + "import-fresh@npm:^3.2.1": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" @@ -4996,6 +5212,13 @@ fsevents@~2.3.2: languageName: node linkType: hard +"json-schema-traverse@npm:^1.0.0": + version: 1.0.0 + resolution: "json-schema-traverse@npm:1.0.0" + checksum: 02f2f466cdb0362558b2f1fd5e15cce82ef55d60cd7f8fa828cf35ba74330f8d767fcae5c5c2adb7851fa811766c694b9405810879bc4e1ddd78a7c0e03658ad + languageName: node + linkType: hard + "json-schema@npm:0.2.3": version: 0.2.3 resolution: "json-schema@npm:0.2.3" @@ -5194,6 +5417,20 @@ fsevents@~2.3.2: languageName: node linkType: hard +"lodash.clonedeep@npm:^4.5.0": + version: 4.5.0 + resolution: "lodash.clonedeep@npm:4.5.0" + checksum: 92c46f094b064e876a23c97f57f81fbffd5d760bf2d8a1c61d85db6d1e488c66b0384c943abee4f6af7debf5ad4e4282e74ff83177c9e63d8ff081a4837c3489 + languageName: node + linkType: hard + +"lodash.flatten@npm:^4.4.0": + version: 4.4.0 + resolution: "lodash.flatten@npm:4.4.0" + checksum: 0ac34a393d4b795d4b7421153d27c13ae67e08786c9cbb60ff5b732210d46f833598eee3fb3844bb10070e8488efe390ea53bb567377e0cb47e9e630bf0811cb + languageName: node + linkType: hard + "lodash.flattendeep@npm:^4.4.0": version: 4.4.0 resolution: "lodash.flattendeep@npm:4.4.0" @@ -5222,6 +5459,13 @@ fsevents@~2.3.2: languageName: node linkType: hard +"lodash.truncate@npm:^4.4.2": + version: 4.4.2 + resolution: "lodash.truncate@npm:4.4.2" + checksum: b463d8a382cfb5f0e71c504dcb6f807a7bd379ff1ea216669aa42c52fc28c54e404bfbd96791aa09e6df0de2c1d7b8f1b7f4b1a61f324d38fe98bc535aeee4f5 + languageName: node + linkType: hard + "lodash@npm:^4.17.11, lodash@npm:^4.17.20, lodash@npm:^4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" @@ -6313,6 +6557,13 @@ fsevents@~2.3.2: languageName: node linkType: hard +"progress@npm:^2.0.0": + version: 2.0.3 + resolution: "progress@npm:2.0.3" + checksum: f67403fe7b34912148d9252cb7481266a354bd99ce82c835f79070643bb3c6583d10dbcfda4d41e04bbc1d8437e9af0fb1e1f2135727878f5308682a579429b7 + languageName: node + linkType: hard + "prompts@npm:^2.4.0": version: 2.4.0 resolution: "prompts@npm:2.4.0" @@ -6385,6 +6636,15 @@ fsevents@~2.3.2: languageName: node linkType: hard +"qs@npm:^6.11.0": + version: 6.11.1 + resolution: "qs@npm:6.11.1" + dependencies: + side-channel: ^1.0.4 + checksum: 82ee78ef12a16f3372fae5b64f76f8aedecb000feea882bbff1af146c147f6eb66b08f9c3f34d7e076f28563586956318b9b2ca41141846cdd6d5ad6f241d52f + languageName: node + linkType: hard + "qs@npm:^6.9.4": version: 6.10.5 resolution: "qs@npm:6.10.5" @@ -6549,6 +6809,13 @@ fsevents@~2.3.2: languageName: node linkType: hard +"regexpp@npm:^3.0.0, regexpp@npm:^3.1.0": + version: 3.1.0 + resolution: "regexpp@npm:3.1.0" + checksum: 63bcb2c98d63274774c79bef256e03f716d25f1fa8427267d0302d1436a83fa0d905f4e8a172fdfa99fb4d84833df2fb3bf7da2a1a868f156e913174c32b1139 + languageName: node + linkType: hard + "regression@npm:^2.0.1": version: 2.0.1 resolution: "regression@npm:2.0.1" @@ -6600,6 +6867,13 @@ fsevents@~2.3.2: languageName: node linkType: hard +"require-from-string@npm:^2.0.2": + version: 2.0.2 + resolution: "require-from-string@npm:2.0.2" + checksum: a03ef6895445f33a4015300c426699bc66b2b044ba7b670aa238610381b56d3f07c686251740d575e22f4c87531ba662d06937508f0f3c0f1ddc04db3130560b + languageName: node + linkType: hard + "require-main-filename@npm:^2.0.0": version: 2.0.0 resolution: "require-main-filename@npm:2.0.0" @@ -7320,6 +7594,16 @@ resolve@^1.10.0: languageName: node linkType: hard +"stripe@npm:^12.2.0": + version: 12.2.0 + resolution: "stripe@npm:12.2.0" + dependencies: + "@types/node": ">=8.1.0" + qs: ^6.11.0 + checksum: dbd478d43aff4d9ea6197fa72c303626b56277d0a5f6c021f3877d739b3f4a6bcf2d212be0ed4714b1a29ac6f5642dfb160d997f2ccabf88401ab733c9f446c8 + languageName: node + linkType: hard + "superagent@npm:^6.1.0": version: 6.1.0 resolution: "superagent@npm:6.1.0" @@ -7387,6 +7671,23 @@ resolve@^1.10.0: languageName: node linkType: hard +"table@npm:^6.0.4": + version: 6.0.9 + resolution: "table@npm:6.0.9" + dependencies: + ajv: ^8.0.1 + is-boolean-object: ^1.1.0 + is-number-object: ^1.0.4 + is-string: ^1.0.5 + lodash.clonedeep: ^4.5.0 + lodash.flatten: ^4.4.0 + lodash.truncate: ^4.4.2 + slice-ansi: ^4.0.0 + string-width: ^4.2.0 + checksum: 5d12cc204752e7515c5d1ff59d77b7ba12b2d7d8b10e0e75a7b133400c84614515e755b1c44607c46e3c6374b603192c13119de65a608298e85201134084de48 + languageName: node + linkType: hard + "tar@npm:^6.0.2": version: 6.1.0 resolution: "tar@npm:6.1.0" @@ -7643,6 +7944,17 @@ resolve@^1.10.0: languageName: node linkType: hard +"tsutils@npm:^3.17.1": + version: 3.21.0 + resolution: "tsutils@npm:3.21.0" + dependencies: + tslib: ^1.8.1 + 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" + checksum: 1843f4c1b2e0f975e08c4c21caa4af4f7f65a12ac1b81b3b8489366826259323feb3fc7a243123453d2d1a02314205a7634e048d4a8009921da19f99755cdc48 + languageName: node + linkType: hard + "tunnel-agent@npm:^0.6.0": version: 0.6.0 resolution: "tunnel-agent@npm:0.6.0" @@ -7750,6 +8062,16 @@ resolve@^1.10.0: languageName: node linkType: hard +"typescript@patch:typescript@^4.2.3#~builtin": + version: 4.2.3 + resolution: "typescript@patch:typescript@npm%3A4.2.3#~builtin::version=4.2.3&hash=334f98" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: f00e6e6e72c950865979d5beb66916c75d92eda09514eb2953828b95505cfd2ef3ae9ac776fdac9f841a9ce67744999b70d23779726e0072656a1841c8080860 + languageName: node + linkType: hard + "typescript@patch:typescript@^5.1.6#~builtin": version: 5.1.6 resolution: "typescript@patch:typescript@npm%3A5.1.6#~builtin::version=5.1.6&hash=5da071" @@ -7890,6 +8212,13 @@ resolve@^1.10.0: languageName: node linkType: hard +"v8-compile-cache@npm:^2.0.3": + version: 2.3.0 + resolution: "v8-compile-cache@npm:2.3.0" + checksum: adb0a271eaa2297f2f4c536acbfee872d0dd26ec2d76f66921aa7fc437319132773483344207bdbeee169225f4739016d8d2dbf0553913a52bb34da6d0334f8e + languageName: node + linkType: hard + "validate-npm-package-license@npm:^3.0.1": version: 3.0.4 resolution: "validate-npm-package-license@npm:3.0.4" @@ -8005,6 +8334,20 @@ resolve@^1.10.0: languageName: node linkType: hard +"word-wrap@npm:^1.2.3": + version: 1.2.3 + resolution: "word-wrap@npm:1.2.3" + checksum: 30b48f91fcf12106ed3186ae4fa86a6a1842416df425be7b60485de14bec665a54a68e4b5156647dec3a70f25e84d270ca8bc8cd23182ed095f5c7206a938c1f + languageName: node + linkType: hard + +"workerpool@npm:6.1.5": + version: 6.1.5 + resolution: "workerpool@npm:6.1.5" + checksum: 5defea1fd3e36b4f83c2bb184cade4a71e27030d46ee5efe704e90e19baf3a5c7146fddef010cbd0b7df3edbfca1e9e851bd35d8da8c99ec6d8bbfe121d8c0b0 + languageName: node + linkType: hard + "workerpool@npm:6.2.1": version: 6.2.1 resolution: "workerpool@npm:6.2.1"