From afb781436f0610e34c0d075a4e11abf8ff405ab4 Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Tue, 24 Sep 2024 17:33:50 -0500 Subject: [PATCH] Absolutely BASED documentation rendering fixes (#965) * update README badges * remove conflicting class tags from call builder classesmd * make WebAuth show up as a namespace * collect methods and classes into a SorobanRpc namespace for JSDoc * create a Horizon JSDoc namespace and add the server class to it * Fix all broken links to API dev docs * add the Durability enum to the SorobanRPC JSDoc namespace * create a util namespace and add validateTimebounds to it * remove unnecessary code blocks from ContractSpec examples * group some const declarations into more relevant namespaces/classes * make a stellartoml JSDoc namespace * make federation a module, include the typedefs * mark most of the "call builder" classes as private in JSDoc Since the comments clearly say "don't make this class yourself," it might make sense to mark them as `@private` so they don't show up in the documentation. The doc pages for those classes can still be visited, but they don't show up in the sidebar to the left, unless you specifically navigate to one of them. (Or, if you click a link for what the return type on the `Horizon.Server.effects()` method, for example * mark the Ok and Err rust type classes as private in JSDoc I don't _think_ they're accessible by SDK users, so I think it makes sense to not render them in the docs? * change StellarToml from a JSDoc namespace to a module * change webauth from a JSDoc namespace to a module * mark the AccountResponse class as private in JSDoc * add soroban tx timeout const to the SorobanRpc.Server module * try out a new JSDoc theme * make contract a JSDoc module There was a weird `_default` global that came up from this. Not sure why, but this seems to have done the trick without anything weird going on after. * mark contract/utils functions as private in JSDoc * break the errors classes into multiple files for JSDoc rendering * add JSDoc type definition to friendbot api because more type definitions are more better, right? * add default value to max toml file size in JSDoc * clarify note about when the timebounds are added to client txs --- README.md | 12 +- config/.jsdoc.json | 44 +- config/.prettierignore | 3 +- docs/reference/readme.md | 2 +- package.json | 4 +- src/config.ts | 50 +- src/contract/assembled_transaction.ts | 51 +- src/contract/basic_node_signer.ts | 10 +- src/contract/client.ts | 48 +- src/contract/rust_result.ts | 34 +- src/contract/sent_transaction.ts | 10 +- src/contract/spec.ts | 25 +- src/contract/types.ts | 102 ++- src/contract/utils.ts | 11 +- src/errors.ts | 104 --- src/errors/account_requires_memo.ts | 42 + src/errors/bad_request.ts | 21 + src/errors/bad_response.ts | 24 + src/errors/index.ts | 5 + src/errors/network.ts | 50 + src/errors/not_found.ts | 21 + src/federation/api.ts | 42 +- src/federation/index.ts | 2 +- src/federation/server.ts | 78 +- src/horizon/account_call_builder.ts | 18 +- src/horizon/account_response.ts | 7 +- src/horizon/assets_call_builder.ts | 5 +- src/horizon/call_builder.ts | 16 +- .../claimable_balances_call_builder.ts | 18 +- src/horizon/effect_call_builder.ts | 15 +- src/horizon/horizon_axios_client.ts | 15 +- src/horizon/index.ts | 6 +- src/horizon/ledger_call_builder.ts | 10 +- src/horizon/liquidity_pool_call_builder.ts | 5 +- src/horizon/offer_call_builder.ts | 22 +- src/horizon/operation_call_builder.ts | 20 +- src/horizon/orderbook_call_builder.ts | 9 +- src/horizon/path_call_builder.ts | 9 +- src/horizon/payment_call_builder.ts | 16 +- src/horizon/server.ts | 123 +-- .../strict_receive_path_call_builder.ts | 9 +- src/horizon/strict_send_path_call_builder.ts | 9 +- src/horizon/trade_aggregation_call_builder.ts | 6 +- src/horizon/trades_call_builder.ts | 13 +- src/horizon/transaction_call_builder.ts | 17 +- src/index.ts | 7 +- src/rpc/api.ts | 1 - src/rpc/index.ts | 4 +- src/rpc/jsonrpc.ts | 12 +- src/rpc/parsers.ts | 63 +- src/rpc/server.ts | 231 +++-- src/rpc/transaction.ts | 21 +- src/stellartoml/index.ts | 33 +- src/utils.ts | 15 +- src/webauth/errors.ts | 28 +- src/webauth/index.ts | 2 +- src/webauth/utils.ts | 127 +-- yarn.lock | 856 +++++++++++++++--- 58 files changed, 1771 insertions(+), 792 deletions(-) delete mode 100644 src/errors.ts create mode 100644 src/errors/account_requires_memo.ts create mode 100644 src/errors/bad_request.ts create mode 100644 src/errors/bad_response.ts create mode 100644 src/errors/index.ts create mode 100644 src/errors/network.ts create mode 100644 src/errors/not_found.ts diff --git a/README.md b/README.md index 16d4c81ba..4d2a9216d 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,15 @@

- npm version + npm version - Weekly Downloads + Weekly Downloads Test Status

js-stellar-sdk is a JavaScript library for communicating with a -[Stellar Horizon server](https://github.com/stellar/go/tree/master/services/horizon) and [Soroban RPC](https://soroban.stellar.org/docs/reference/rpc). +[Stellar Horizon server](https://github.com/stellar/go/tree/master/services/horizon) and [Soroban RPC](https://developers.stellar.org/docs/data/rpc). It is used for building Stellar apps either on Node.js or in the browser, though it can be used in other environments with some tinkering. It provides: @@ -96,14 +96,14 @@ USE_AXIOS=false npm run build:browser The usage documentation for this library lives in a handful of places: - * across the [Stellar Developer Docs](), which includes tutorials and examples, + * across the [Stellar Developer Docs](https://developers.stellar.org), which includes tutorials and examples, * within [this repository itself](https://github.com/stellar/js-stellar-sdk/blob/master/docs/reference/readme.md), and * on the generated [API doc site](https://stellar.github.io/js-stellar-sdk/). You can also refer to: - * the [documentation](https://developers.stellar.org/network/horizon) for the Horizon REST API (if using the `Horizon` module) and - * the [documentation](https://soroban.stellar.org/docs/reference/rpc) for Soroban RPC's API (if using the `rpc` module) + * the [documentation](https://developers.stellar.org/docs/data/horizon) for the Horizon REST API (if using the `Horizon` module) and + * the [documentation](https://developers.stellar.org/docs/data/rpc) for Soroban RPC's API (if using the `rpc` module) ### Usage with React-Native diff --git a/config/.jsdoc.json b/config/.jsdoc.json index 55041dc28..e25576920 100644 --- a/config/.jsdoc.json +++ b/config/.jsdoc.json @@ -1,13 +1,51 @@ { + "tags": { + "allowUnknownTags": ["optional", "category", "warning", "note", "link"] + }, + "plugins": [ + "plugins/markdown", + "node_modules/better-docs/typescript", + "node_modules/better-docs/category" + ], "source": { "include": ["lib/", "js-stellar-base/src"], + "includePattern": "\\.(js|ts)$", "exclude": "js-stellar-base/src/generated" }, "opts": { + "encoding": "utf8", + "readme": "README.md", "destination": "jsdoc/", "recurse": true, - "template": "node_modules/minami", - "readme": "README.md" + "verbose": true, + "template": "node_modules/better-docs", + "private": true + }, + "templates": { + "cleverLinks": false, + "monospaceLinks": false, + "search": true, + "default": { + "useLongnameInNav": true + }, + "better-docs": { + "name": "@stellar/stellar-sdk", + "title": "@stellar/stellar-sdk Documentation", + "hideGenerator": false, + "navLinks": [ + { + "label": "GitHub", + "href": "https://github.com/stellar/js-stellar-sdk" + }, + { + "label": "npm", + "href": "https://www.npmjs.com/package/@stellar/stellar-sdk" + } + ] + } }, - "plugins": ["plugins/markdown"] + "markdown": { + "hardwrap": false, + "idInHeadings": true + } } diff --git a/config/.prettierignore b/config/.prettierignore index 644fef8aa..7738b9729 100644 --- a/config/.prettierignore +++ b/config/.prettierignore @@ -2,4 +2,5 @@ ../node_modules ../lib ../dist -../docs \ No newline at end of file +../docs +../test/unit/out/contract_spec.js diff --git a/docs/reference/readme.md b/docs/reference/readme.md index 12e0bdb56..5c049fb7d 100644 --- a/docs/reference/readme.md +++ b/docs/reference/readme.md @@ -1,7 +1,7 @@ --- title: Overview --- -The JavaScript Stellar SDK facilitates integration with the Stellar [Horizon API server](https://developers.stellar.org/api/), the Stellar [Soroban RPC server](https://soroban.stellar.org/docs/reference/rpc) and submission of Stellar transactions, either on Node.js or in the browser. It has three main uses: [querying Horizon](#querying-horizon), [interacting with Soroban RPC](), and [building, signing, and submitting transactions to the Stellar network](#building-transactions). +The JavaScript Stellar SDK facilitates integration with the Stellar [Horizon API server](https://developers.stellar.org/api/), the Stellar [Soroban RPC server](https://developers.stellar.org/network/soroban-rpc) and submission of Stellar transactions, either on Node.js or in the browser. It has three main uses: [querying Horizon](#querying-horizon), [interacting with Soroban RPC](), and [building, signing, and submitting transactions to the Stellar network](#building-transactions). * [Building and installing the SDK](https://github.com/stellar/js-stellar-sdk) * [Examples of using the SDK](./examples.md) diff --git a/package.json b/package.json index 5f48a2bf8..1b415dd9f 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "build:browser:all": "yarn build:browser && cross-env no_clean=true yarn build:browser:no-axios && cross-env no_clean=true yarn build:browser:no-eventsource && cross-env no_clean=true yarn build:browser:minimal", "build:docs": "cross-env NODE_ENV=docs yarn _babel", "clean": "rm -rf lib/ dist/ coverage/ .nyc_output/ jsdoc/ test/e2e/.soroban", - "docs": "yarn build:docs && jsdoc -c ./config/.jsdoc.json --verbose", + "docs": "yarn build:docs && jsdoc -c ./config/.jsdoc.json", "test": "yarn build:test && yarn test:node && yarn test:integration && yarn test:browser", "test:e2e": "./test/e2e/initialize.sh && yarn _nyc mocha --recursive 'test/e2e/src/test-*.js'", "test:node": "yarn _nyc mocha --recursive 'test/unit/**/*.js'", @@ -166,6 +166,7 @@ "babel-loader": "^9.1.3", "babel-plugin-istanbul": "^7.0.0", "babel-plugin-transform-define": "^2.1.4", + "better-docs": "^2.7.3", "buffer": "^6.0.3", "chai": "^4.3.10", "chai-as-promised": "^7.1.1", @@ -196,7 +197,6 @@ "karma-webpack": "^5.0.1", "lint-staged": "^15.2.10", "lodash": "^4.17.21", - "minami": "^1.1.1", "mocha": "^10.6.0", "node-polyfill-webpack-plugin": "^3.0.0", "null-loader": "^4.0.1", diff --git a/src/config.ts b/src/config.ts index 4528a0a8a..8184da934 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,14 +1,15 @@ -interface Configuration { +/** + * Global config parameters. + */ +export interface Configuration { /** - * Allow connecting to http servers, default: `false`. This must be set to false in production deployments! - * - * @type {boolean} + * Allow connecting to http servers. This must be set to false in production deployments! + * @default false */ allowHttp: boolean; /** - * Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue. You can also use {@link Config} class to set this globally. - * - * @type {number} + * Allow a timeout. Allows user to avoid nasty lag due network issues. + * @default 0 */ timeout: number; } @@ -23,26 +24,23 @@ let config = { ...defaultConfig}; /** * Global config class. * - * Usage node: - * ``` - * import {Config} from 'stellar-sdk'; + * @hideconstructor + * + * @example Usage in node + * import { Config } from '@stellar/stellar-sdk'; * Config.setAllowHttp(true); * Config.setTimeout(5000); - * ``` * - * Usage browser: - * ``` + * @example Usage in the browser * StellarSdk.Config.setAllowHttp(true); * StellarSdk.Config.setTimeout(5000); - * ``` - * @static */ class Config { /** - * Sets `allowHttp` flag globally. When set to `true`, connections to insecure http protocol servers will be allowed. - * Must be set to `false` in production. Default: `false`. - * @param {boolean} value new allowHttp value - * @returns {void} + * Sets `allowHttp` flag globally. When set to `true`, connections to insecure + * http protocol servers will be allowed. Must be set to `false` in + * production. + * @default false * @static */ public static setAllowHttp(value: boolean): void { @@ -50,10 +48,9 @@ class Config { } /** - * Sets `timeout` flag globally. When set to anything besides 0, the request will timeout after specified time (ms). - * Default: 0. - * @param {number} value new timeout value - * @returns {void} + * Sets `timeout` flag globally. When set to anything besides 0, the request + * will timeout after specified time (ms). + * @default 0 * @static */ public static setTimeout(value: number): void { @@ -61,16 +58,18 @@ class Config { } /** + * Returns the configured `allowHttp` flag. * @static - * @returns {boolean} allowHttp flag + * @returns {boolean} */ public static isAllowHttp(): boolean { return config.allowHttp; } /** + * Returns the configured `timeout` flag. * @static - * @returns {number} timeout flag + * @returns {number} */ public static getTimeout(): number { return config.timeout; @@ -79,7 +78,6 @@ class Config { /** * Sets all global config flags to default values. * @static - * @returns {void} */ public static setDefault(): void { config = { ...defaultConfig}; diff --git a/src/contract/assembled_transaction.ts b/src/contract/assembled_transaction.ts index c5df093e0..ffaa0f060 100644 --- a/src/contract/assembled_transaction.ts +++ b/src/contract/assembled_transaction.ts @@ -18,7 +18,7 @@ import type { Tx, XDR_BASE64, } from "./types"; -import { Server } from "../rpc/server"; +import { Server } from "../rpc"; import { Api } from "../rpc/api"; import { assembleTransaction } from "../rpc/transaction"; import type { Client } from "./client"; @@ -32,6 +32,8 @@ import { DEFAULT_TIMEOUT } from "./types"; import { SentTransaction } from "./sent_transaction"; import { Spec } from "./spec"; +/** @module contract */ + /** * The main workhorse of {@link Client}. This class is used to wrap a * transaction-under-construction and provide high-level interfaces to the most @@ -47,7 +49,7 @@ import { Spec } from "./spec"; * Let's look at examples of how to use `AssembledTransaction` for a variety of * use-cases: * - * # 1. Simple read call + * #### 1. Simple read call * * Since these only require simulation, you can get the `result` of the call * right after constructing your `AssembledTransaction`: @@ -80,7 +82,7 @@ import { Spec } from "./spec"; * }) * ``` * - * # 2. Simple write call + * #### 2. Simple write call * * For write calls that will be simulated and then sent to the network without * further manipulation, only one more step is needed: @@ -114,7 +116,7 @@ import { Spec } from "./spec"; * const { result } = await tx.signAndSend() * ``` * - * # 3. More fine-grained control over transaction construction + * #### 3. More fine-grained control over transaction construction * * If you need more control over the transaction before simulating it, you can * set various {@link MethodOptions} when constructing your @@ -147,7 +149,7 @@ import { Spec } from "./spec"; * If you need to inspect the simulation later, you can access it with * `tx.simulation`. * - * # 4. Multi-auth workflows + * #### 4. Multi-auth workflows * * Soroban, and Stellar in general, allows multiple parties to sign a * transaction. @@ -234,6 +236,8 @@ import { Spec } from "./spec"; * To see an even more complicated example, where Alice swaps with Bob but the * transaction is invoked by yet another party, check out * [test-swap.js](../../test/e2e/src/test-swap.js). + * + * @memberof module:contract */ export class AssembledTransaction { /** @@ -401,7 +405,7 @@ export class AssembledTransaction { } const method = invokeContractArgs.functionName().toString('utf-8'); const txn = new AssembledTransaction( - { ...options, + { ...options, method, parseResultXdr: (result: xdr.ScVal) => spec.funcResToNative(method, result), @@ -431,10 +435,11 @@ export class AssembledTransaction { * If you don't want to simulate the transaction, you can set `simulate` to * `false` in the options. * - * const tx = await AssembledTransaction.build({ - * ..., - * simulate: false, - * }) + * @example + * const tx = await AssembledTransaction.build({ + * ..., + * simulate: false, + * }) */ static async build( options: AssembledTransactionOptions, @@ -557,7 +562,7 @@ export class AssembledTransaction { if (Api.isSimulationRestore(simulation)) { throw new AssembledTransaction.Errors.ExpiredState( `You need to restore some contract state before you can invoke this method.\n` + - 'You can set `restore` to true in the method options in order to ' + + 'You can set `restore` to true in the method options in order to ' + 'automatically restore the contract state when needed.' ); } @@ -597,7 +602,7 @@ export class AssembledTransaction { } /** - * Sign the transaction with the signTransaction function included previously. + * Sign the transaction with the signTransaction function included previously. * If you did not previously include one, you need to include one now. */ sign = async ({ @@ -674,9 +679,9 @@ export class AssembledTransaction { } /** - * Sign the transaction with the `signTransaction` function included previously. - * If you did not previously include one, you need to include one now. - * After signing, this method will send the transaction to the network and + * Sign the transaction with the `signTransaction` function included previously. + * If you did not previously include one, you need to include one now. + * After signing, this method will send the transaction to the network and * return a `SentTransaction` that keeps track * of all the attempts to fetch the transaction. */ signAndSend = async ({ @@ -875,28 +880,28 @@ export class AssembledTransaction { } /** - * Restores the footprint (resource ledger entries that can be read or written) - * of an expired transaction. - * + * Restores the footprint (resource ledger entries that can be read or written) + * of an expired transaction. + * * The method will: * 1. Build a new transaction aimed at restoring the necessary resources. * 2. Sign this new transaction if a `signTransaction` handler is provided. * 3. Send the signed transaction to the network. * 4. Await and return the response from the network. - * + * * Preconditions: * - A `signTransaction` function must be provided during the Client initialization. * - The provided `restorePreamble` should include a minimum resource fee and valid * transaction data. - * - * @throws {Error} - Throws an error if no `signTransaction` function is provided during + * + * @throws {Error} - Throws an error if no `signTransaction` function is provided during * Client initialization. - * @throws {AssembledTransaction.Errors.RestoreFailure} - Throws a custom error if the + * @throws {AssembledTransaction.Errors.RestoreFailure} - Throws a custom error if the * restore transaction fails, providing the details of the failure. */ async restoreFootprint( /** - * The preamble object containing data required to + * The preamble object containing data required to * build the restore transaction. */ restorePreamble: { diff --git a/src/contract/basic_node_signer.ts b/src/contract/basic_node_signer.ts index 9e50327cd..bcd372a7e 100644 --- a/src/contract/basic_node_signer.ts +++ b/src/contract/basic_node_signer.ts @@ -1,18 +1,20 @@ import { Keypair, TransactionBuilder, hash } from "@stellar/stellar-base"; -import type { AssembledTransaction } from "./assembled_transaction"; import type { Client } from "./client"; /** - * For use with {@link Client} and {@link AssembledTransaction}. + * For use with {@link Client} and {@link module:contract.AssembledTransaction}. * Implements `signTransaction` and `signAuthEntry` with signatures expected by * those classes. This is useful for testing and maybe some simple Node * applications. Feel free to use this as a starting point for your own * Wallet/TransactionSigner implementation. + * + * @memberof module:contract + * + * @param {Keypair} keypair {@link Keypair} to use to sign the transaction or auth entry + * @param {string} networkPassphrase passphrase of network to sign for */ export const basicNodeSigner = ( - /** {@link Keypair} to use to sign the transaction or auth entry */ keypair: Keypair, - /** passphrase of network to sign for */ networkPassphrase: string, ) => ({ // eslint-disable-next-line require-await diff --git a/src/contract/client.ts b/src/contract/client.ts index f576762a6..2db5b4040 100644 --- a/src/contract/client.ts +++ b/src/contract/client.ts @@ -5,19 +5,23 @@ import { AssembledTransaction } from "./assembled_transaction"; import type { ClientOptions, MethodOptions } from "./types"; import { processSpecEntryStream } from './utils'; +/** + * Generate a class from the contract spec that where each contract method + * gets included with an identical name. + * + * Each method returns an {@link module:contract.AssembledTransaction | AssembledTransaction} that can + * be used to modify, simulate, decode results, and possibly sign, & submit the + * transaction. + * + * @memberof module:contract + * + * @class + * @param {module:contract.Spec} spec {@link Spec} to construct a Client for + * @param {ClientOptions} options see {@link ClientOptions} + */ export class Client { - /** - * Generate a class from the contract spec that where each contract method - * gets included with an identical name. - * - * Each method returns an {@link AssembledTransaction} that can be used to - * modify, simulate, decode results, and possibly sign, & submit the - * transaction. - */ constructor( - /** {@link Spec} to construct a Client for */ public readonly spec: Spec, - /** see {@link ClientOptions} */ public readonly options: ClientOptions, ) { this.spec.funcs().forEach((xdrFn) => { @@ -53,11 +57,11 @@ export class Client { /** * Generates a Client instance from the provided ClientOptions and the contract's wasm hash. * The wasmHash can be provided in either hex or base64 format. - * - * @param wasmHash The hash of the contract's wasm binary, in either hex or base64 format. - * @param options The ClientOptions object containing the necessary configuration, including the rpcUrl. - * @param format The format of the provided wasmHash, either "hex" or "base64". Defaults to "hex". - * @returns A Promise that resolves to a Client instance. + * + * @param {Buffer | string} wasmHash The hash of the contract's wasm binary, in either hex or base64 format. + * @param {ClientOptions} options The ClientOptions object containing the necessary configuration, including the rpcUrl. + * @param {('hex' | 'base64')} [format='hex'] The format of the provided wasmHash, either "hex" or "base64". Defaults to "hex". + * @returns {Promise} A Promise that resolves to a Client instance. * @throws {TypeError} If the provided options object does not contain an rpcUrl. */ static async fromWasmHash(wasmHash: Buffer | string, @@ -76,10 +80,10 @@ export class Client { /** * Generates a Client instance from the provided ClientOptions and the contract's wasm binary. - * - * @param wasm The contract's wasm binary as a Buffer. - * @param options The ClientOptions object containing the necessary configuration. - * @returns A Promise that resolves to a Client instance. + * + * @param {Buffer} wasm The contract's wasm binary as a Buffer. + * @param {ClientOptions} options The ClientOptions object containing the necessary configuration. + * @returns {Promise} A Promise that resolves to a Client instance. * @throws {Error} If the contract spec cannot be obtained from the provided wasm binary. */ static async fromWasm(wasm: Buffer, options: ClientOptions): Promise { @@ -96,9 +100,9 @@ export class Client { /** * Generates a Client instance from the provided ClientOptions, which must include the contractId and rpcUrl. - * - * @param options The ClientOptions object containing the necessary configuration, including the contractId and rpcUrl. - * @returns A Promise that resolves to a Client instance. + * + * @param {ClientOptions} options The ClientOptions object containing the necessary configuration, including the contractId and rpcUrl. + * @returns {Promise} A Promise that resolves to a Client instance. * @throws {TypeError} If the provided options object does not contain both rpcUrl and contractId. */ static async from(options: ClientOptions): Promise { diff --git a/src/contract/rust_result.ts b/src/contract/rust_result.ts index b3c160851..1a9e736b8 100644 --- a/src/contract/rust_result.ts +++ b/src/contract/rust_result.ts @@ -6,10 +6,11 @@ * methods that return Results, to maintain their distinction from methods * that simply either return a value or throw. * - * **Why is this needed?** + * #### Why is this needed? * - * This is used by `ContractSpec` and `AssembledTransaction` when parsing - * values return by contracts. + * This is used by {@link module:contract.Spec | `ContractSpec`} and + * {@link module:contract.AssembledTransaction | `AssembledTransaction`} when + * parsing values return by contracts. * * Contract methods can be implemented to return simple values, in which case * they can also throw errors. This matches JavaScript's most idiomatic @@ -30,6 +31,8 @@ * In the future, if this feels too un-idiomatic for JavaScript, we can always * remove this and flatten all JS calls to `try...catch`. Easier to remove this * logic later than it would be to add it. + * + * @memberof module:contract */ export interface Result { unwrap(): T; @@ -40,18 +43,23 @@ export interface Result { /** * Error interface containing the error message. Matches Rust's implementation. - * Part of implementing {@link Result}, a minimal implementation of Rust's - * `Result` type. Used for contract methods that return Results, to maintain - * their distinction from methods that simply either return a value or throw. + * Part of implementing {@link module:contract.Result | Result}, a minimal + * implementation of Rust's `Result` type. Used for contract methods that return + * Results, to maintain their distinction from methods that simply either return + * a value or throw. + * + * @memberof module:contract */ export interface ErrorMessage { message: string; } /** - * Part of implementing {@link Result}, a minimal implementation of Rust's - * `Result` type. Used for contract methods that return Results, to maintain - * their distinction from methods that simply either return a value or throw. + * Part of implementing {@link module:contract.Result | Result}, a minimal + * implementation of Rust's `Result` type. Used for contract methods that return + * Results, to maintain their distinction from methods that simply either return + * a value or throw. + * @private */ export class Ok implements Result { constructor(readonly value: T) {} @@ -74,9 +82,11 @@ export class Ok implements Result { } /** - * Part of implementing {@link Result}, a minimal implementation of Rust's - * `Result` type. Used for contract methods that return Results, to maintain - * their distinction from methods that simply either return a value or throw. + * Part of implementing {@link module:contract.Result | Result}, a minimal + * implementation of Rust's `Result` type. Used for contract methods that return + * Results, to maintain their distinction from methods that simply either return + * a value or throw. + * @private */ export class Err implements Result { constructor(readonly error: E) {} diff --git a/src/contract/sent_transaction.ts b/src/contract/sent_transaction.ts index 0014fa393..f04d37ee5 100644 --- a/src/contract/sent_transaction.ts +++ b/src/contract/sent_transaction.ts @@ -1,7 +1,7 @@ /* disable max-classes rule, because extending error shouldn't count! */ /* eslint max-classes-per-file: 0 */ import type { MethodOptions } from "./types"; -import { Server } from "../rpc/server" +import { Server } from "../rpc" import { Api } from "../rpc/api" import { withExponentialBackoff } from "./utils"; import { DEFAULT_TIMEOUT } from "./types"; @@ -20,6 +20,12 @@ import type { AssembledTransaction } from "./assembled_transaction"; * {@link MethodOptions.timeoutInSeconds} seconds. See all attempts in * `getTransactionResponseAll` and the most recent attempt in * `getTransactionResponse`. + * + * @memberof module:contract + * @class + * + * @param {Function} signTransaction More info in {@link MethodOptions} + * @param {module:contract.AssembledTransaction} assembled {@link AssembledTransaction} from which this SentTransaction was initialized */ export class SentTransaction { public server: Server; @@ -60,7 +66,7 @@ export class SentTransaction { } /** - * Initialize a `SentTransaction` from `options` and a `signed` + * Initialize a `SentTransaction` from `options` and a `signed` * AssembledTransaction. This will also send the transaction to the network. */ static init = async ( diff --git a/src/contract/spec.ts b/src/contract/spec.ts index 863fbac1d..d3a17b1a7 100644 --- a/src/contract/spec.ts +++ b/src/contract/spec.ts @@ -167,6 +167,7 @@ const PRIMITIVE_DEFINITONS: { [key: string]: JSONSchema7Definition } = { /** * @param typeDef type to convert to json schema reference * @returns {JSONSchema7} a schema describing the type + * @private */ function typeRef(typeDef: xdr.ScSpecTypeDef): JSONSchema7 { const t = typeDef.switch(); @@ -439,8 +440,13 @@ function unionToJsonSchema(udt: xdr.ScSpecUdtUnionV0): any { * Provides a ContractSpec class which can contains the XDR types defined by the contract. * This allows the class to be used to convert between native and raw `xdr.ScVal`s. * + * Constructs a new ContractSpec from an array of XDR spec entries. + * + * @memberof module:contract + * @param {xdr.ScSpecEntry[] | string[]} entries the XDR spec entries + * @throws {Error} if entries is invalid + * * @example - * ```js * const specEntries = [...]; // XDR spec entries of a smart contract * const contractSpec = new ContractSpec(specEntries); * @@ -458,18 +464,13 @@ function unionToJsonSchema(udt: xdr.ScSpecUdtUnionV0): any { * const result = contractSpec.funcResToNative('funcName', resultScv); * * console.log(result); // {success: true} - * ``` */ export class Spec { - public entries: xdr.ScSpecEntry[] = []; - /** - * Constructs a new ContractSpec from an array of XDR spec entries. - * - * @param {xdr.ScSpecEntry[] | string[]} entries the XDR spec entries - * - * @throws {Error} if entries is invalid + * The XDR spec entries. */ + public entries: xdr.ScSpecEntry[] = []; + constructor(entries: xdr.ScSpecEntry[] | string[]) { if (entries.length === 0) { throw new Error("Contract spec must have at least one entry"); @@ -486,9 +487,7 @@ export class Spec { /** * Gets the XDR functions from the spec. - * * @returns {xdr.ScSpecFunctionV0[]} all contract functions - * */ funcs(): xdr.ScSpecFunctionV0[] { return this.entries @@ -528,13 +527,11 @@ export class Spec { * @throws {Error} if argument is missing or incorrect type * * @example - * ```js * const args = { * arg1: 'value1', * arg2: 1234 * }; * const scArgs = contractSpec.funcArgsToScVals('funcName', args); - * ``` */ funcArgsToScVals(name: string, args: object): xdr.ScVal[] { const fn = this.getFunc(name); @@ -553,10 +550,8 @@ export class Spec { * @throws {Error} if return type mismatch or invalid input * * @example - * ```js * const resultScv = 'AAA=='; // Base64 encoded ScVal * const result = contractSpec.funcResToNative('funcName', resultScv); - * ``` */ funcResToNative(name: string, val_or_base64: xdr.ScVal | string): any { const val = diff --git a/src/contract/types.ts b/src/contract/types.ts index b97231b55..754046839 100644 --- a/src/contract/types.ts +++ b/src/contract/types.ts @@ -1,17 +1,48 @@ /* disable PascalCase naming convention, to avoid breaking change */ /* eslint-disable @typescript-eslint/naming-convention */ -import { BASE_FEE, Memo, MemoType, Operation, Transaction, xdr } from "@stellar/stellar-base"; +import { Memo, MemoType, Operation, Transaction, xdr } from "@stellar/stellar-base"; import type { Client } from "./client"; -import type { AssembledTransaction } from "./assembled_transaction"; export type XDR_BASE64 = string; +/** + * An unsigned 32-bit integer. + * @memberof module:contract + */ export type u32 = number; +/** + * A signed 32-bit integer. + * @memberof module:contract + */ export type i32 = number; +/** + * An unsigned 64-bit integer. + * @memberof module:contract + */ export type u64 = bigint; +/** + * A signed 64-bit integer. + * @memberof module:contract + */ export type i64 = bigint; +/** + * An unsigned 128-bit integer. + * @memberof module:contract + */ export type u128 = bigint; +/** + * A signed 128-bit integer. + * @memberof module:contract + */ export type i128 = bigint; +/** + * An unsigned 256-bit integer. + * @memberof module:contract + */ export type u256 = bigint; +/** + * A signed 256-bit integer. + * @memberof module:contract + */ export type i256 = bigint; export type Option = T | undefined; export type Typepoint = bigint; @@ -19,15 +50,21 @@ export type Duration = bigint; /** * A "regular" transaction, as opposed to a FeeBumpTransaction. + * @memberof module:contract + * @type {Transaction, Operation[]>} */ export type Tx = Transaction, Operation[]>; +/** + * Options for a smart contract client. + * @memberof module:contract + */ export type ClientOptions = { /** * The public key of the account that will send this transaction. You can * override this for specific methods later, like - * {@link AssembledTransaction#signAndSend} and - * {@link AssembledTransaction#signAuthEntries}. + * [signAndSend]{@link module:contract.AssembledTransaction#signAndSend} and + * [signAuthEntries]{@link module:contract.AssembledTransaction#signAuthEntries}. */ publicKey?: string; /** @@ -36,7 +73,7 @@ export type ClientOptions = { * calls, which only need to be simulated. If you do not need to sign and * send, there is no need to provide this. If you do not provide it during * initialization, you can provide it later when you call - * {@link AssembledTransaction#signAndSend}. + * {@link module:contract.AssembledTransaction#signAndSend signAndSend}. * * Matches signature of `signTransaction` from Freighter. */ @@ -53,7 +90,7 @@ export type ClientOptions = { * private key corresponding to the provided `publicKey`. This is only needed * for multi-auth transactions, in which one transaction is signed by * multiple parties. If you do not provide it during initialization, you can - * provide it later when you call {@link AssembledTransaction#signAuthEntries}. + * provide it later when you call {@link module:contract.AssembledTransaction#signAuthEntries signAuthEntries}. * * Matches signature of `signAuthEntry` from Freighter. */ @@ -63,12 +100,22 @@ export type ClientOptions = { accountToSign?: string; }, ) => Promise; + /** The address of the contract the client will interact with. */ contractId: string; + /** + * The network passphrase for the Stellar network this contract is deployed + * to. + */ networkPassphrase: string; + /** + * The URL of the RPC instance that will be used to interact with this + * contract. + */ rpcUrl: string; /** * If true, will allow HTTP requests to the Soroban network. If false, will - * only allow HTTPS requests. @default false + * only allow HTTPS requests. + * @default false */ allowHttp?: boolean; /** @@ -80,38 +127,46 @@ export type ClientOptions = { * on-chain XDR that also describes your contract's methods. Each error will * have a specific number. * - * A Client makes method calls with an {@link AssembledTransaction}. + * A Client makes method calls with an {@link module:contract.AssembledTransaction AssembledTransaction}. * When one of these method calls encounters an error, `AssembledTransaction` * will first attempt to parse the error as an "official" `contracterror` * error, by using this passed-in `errorTypes` object. See - * {@link AssembledTransaction#parseError}. If `errorTypes` is blank or no + * {@link module:contract.AssembledTransaction#parseError parseError}. If `errorTypes` is blank or no * matching error is found, then it will throw the raw error. * @default {} */ errorTypes?: Record; }; +/** + * Options for a smart contract method invocation. + * @memberof module:contract + */ export type MethodOptions = { /** - * The fee to pay for the transaction. Default: {@link BASE_FEE} + * The fee to pay for the transaction. + * @default 100 */ fee?: string; /** - * The maximum amount of time to wait for the transaction to complete. - * Default: {@link DEFAULT_TIMEOUT} + * The timebounds which should be set for transactions generated by this + * contract client. {@link module:contract#.DEFAULT_TIMEOUT} + * @default 300 */ timeoutInSeconds?: number; /** * Whether to automatically simulate the transaction when constructing the - * AssembledTransaction. Default: true + * AssembledTransaction. + * @default true */ simulate?: boolean; /** - * If true, will automatically attempt to restore the transaction if there - * are archived entries that need renewal. @default false + * If true, will automatically attempt to restore the transaction if there + * are archived entries that need renewal. + * @default false */ restore?: boolean; }; @@ -122,9 +177,22 @@ export type AssembledTransactionOptions = MethodOptions & args?: any[]; parseResultXdr: (xdr: xdr.ScVal) => T; }; - + /** - * The default timeout for waiting for a transaction to be included in a block. + * The default timebounds, in seconds, during which a transaction will be valid. + * This is attached to the transaction _before_ transaction simulation (it is + * needed for simulation to succeed). It is also re-calculated and re-added + * _before_ transaction signing. + * @constant {number} + * @default 300 + * @memberof module:contract */ export const DEFAULT_TIMEOUT = 5 * 60; + +/** + * An impossible account on the Stellar network + * @constant {string} + * @default GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF + * @memberof module:contract + */ export const NULL_ACCOUNT = "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF"; diff --git a/src/contract/utils.ts b/src/contract/utils.ts index b3a131cb7..44b79c280 100644 --- a/src/contract/utils.ts +++ b/src/contract/utils.ts @@ -1,11 +1,12 @@ import { xdr, cereal, Account } from "@stellar/stellar-base"; -import { Server } from "../rpc/server"; +import { Server } from "../rpc"; import { type AssembledTransaction } from "./assembled_transaction"; import { NULL_ACCOUNT , AssembledTransactionOptions } from "./types"; /** * Keep calling a `fn` for `timeoutInSeconds` seconds, if `keepWaitingIf` is * true. Returns an array of all attempts to call the function. + * @private */ export async function withExponentialBackoff( /** Function to call repeatedly */ @@ -79,11 +80,16 @@ export async function withExponentialBackoff( * methods. Each error will have a specific number. This Regular Expression * matches these "expected error types" that a contract may throw, and helps * {@link AssembledTransaction} parse these errors. + * + * @constant {RegExp} + * @default "/Error\(Contract, #(\d+)\)/" + * @memberof module:contract.Client */ export const contractErrorPattern = /Error\(Contract, #(\d+)\)/; /** * A TypeScript type guard that checks if an object has a `toString` method. + * @private */ export function implementsToString( /** some object that may or may not have a `toString` method */ @@ -94,12 +100,13 @@ export function implementsToString( /** * Reads a binary stream of ScSpecEntries into an array for processing by ContractSpec + * @private */ export function processSpecEntryStream(buffer: Buffer) { const reader = new cereal.XdrReader(buffer); const res: xdr.ScSpecEntry[] = []; while (!reader.eof) { - // @ts-ignore + // @ts-ignore res.push(xdr.ScSpecEntry.read(reader)); } return res; diff --git a/src/errors.ts b/src/errors.ts deleted file mode 100644 index 21f877aff..000000000 --- a/src/errors.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* eslint-disable max-classes-per-file */ -import { HorizonApi } from "./horizon/horizon_api"; - -// For ES5 compatibility (https://stackoverflow.com/a/55066280). -/* tslint:disable:variable-name max-classes-per-file */ -/* eslint-disable no-proto */ - -export class NetworkError extends Error { - public response: { - data?: HorizonApi.ErrorResponseData; - status?: number; - statusText?: string; - url?: string; - }; - - public __proto__: NetworkError; - - constructor(message: string, response: any) { - const trueProto = new.target.prototype; - super(message); - this.__proto__ = trueProto; - this.constructor = NetworkError; - this.response = response; - } - - public getResponse() { - return this.response; - } -} - -export class NotFoundError extends NetworkError { - constructor(message: string, response: any) { - const trueProto = new.target.prototype; - super(message, response); - this.__proto__ = trueProto; - this.constructor = NotFoundError; - this.name = "NotFoundError"; - } -} - -export class BadRequestError extends NetworkError { - constructor(message: string, response: any) { - const trueProto = new.target.prototype; - super(message, response); - this.__proto__ = trueProto; - this.constructor = BadRequestError; - this.name = "BadRequestError"; - } -} - -export class BadResponseError extends NetworkError { - constructor(message: string, response: any) { - const trueProto = new.target.prototype; - super(message, response); - this.__proto__ = trueProto; - this.constructor = BadResponseError; - this.name = "BadResponseError"; - } -} - -/** - * AccountRequiresMemoError is raised when a transaction is trying to submit an - * operation to an account which requires a memo. See - * [SEP0029](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0029.md) - * for more information. - * - * This error contains two attributes to help you identify the account requiring - * the memo and the operation where the account is the destination - * - * ``` - * console.log('The following account requires a memo ', err.accountId) - * console.log('The account is used in operation: ', err.operationIndex) - * ``` - * - */ -export class AccountRequiresMemoError extends Error { - public __proto__: AccountRequiresMemoError; - - /** - * accountId account which requires a memo. - */ - public accountId: string; - - /** - * operationIndex operation where accountId is the destination. - */ - public operationIndex: number; - - /** - * Create an AccountRequiresMemoError - * @param {message} message - error message - * @param {string} accountId - The account which requires a memo. - * @param {number} operationIndex - The index of the operation where `accountId` is the destination. - */ - constructor(message: string, accountId: string, operationIndex: number) { - const trueProto = new.target.prototype; - super(message); - this.__proto__ = trueProto; - this.constructor = AccountRequiresMemoError; - this.name = "AccountRequiresMemoError"; - this.accountId = accountId; - this.operationIndex = operationIndex; - } -} diff --git a/src/errors/account_requires_memo.ts b/src/errors/account_requires_memo.ts new file mode 100644 index 000000000..a9840550c --- /dev/null +++ b/src/errors/account_requires_memo.ts @@ -0,0 +1,42 @@ +/** + * AccountRequiresMemoError is raised when a transaction is trying to submit an + * operation to an account which requires a memo. See + * [SEP0029](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0029.md) + * for more information. + * + * This error contains two attributes to help you identify the account requiring + * the memo and the operation where the account is the destination + * @category Errors + * + * @param {string} message Human-readable error message + * @param {string} accountId The account which requires a memo + * @param {number} operationIndex The index of the operation where `accountId` is the destination + * + * @example + * console.log('The following account requires a memo ', err.accountId) + * console.log('The account is used in operation: ', err.operationIndex) + */ +export class AccountRequiresMemoError extends Error { + public __proto__: AccountRequiresMemoError; + public accountId: string; + public operationIndex: number; + + constructor(message: string, accountId: string, operationIndex: number) { + const trueProto = new.target.prototype; + super(message); + this.__proto__ = trueProto; + this.constructor = AccountRequiresMemoError; + this.name = "AccountRequiresMemoError"; + + /** + * The account which requires a memo. + * @type {string} + */ + this.accountId = accountId; + /** + * Operation where accountId is the destination. + * @type {number} + */ + this.operationIndex = operationIndex; + } +} diff --git a/src/errors/bad_request.ts b/src/errors/bad_request.ts new file mode 100644 index 000000000..4ecc8a337 --- /dev/null +++ b/src/errors/bad_request.ts @@ -0,0 +1,21 @@ +import { NetworkError } from "./network"; + +/** + * BadRequestError is raised when a request made to Horizon is invalid in some + * way (incorrect timebounds for trade call builders, for example.) + * @augments NetworkError + * @inheritdoc + * @category Errors + * + * @param {string} message Human-readable error message + * @param {any} response Response details, received from the Horizon server + */ +export class BadRequestError extends NetworkError { + constructor(message: string, response: any) { + const trueProto = new.target.prototype; + super(message, response); + this.__proto__ = trueProto; + this.constructor = BadRequestError; + this.name = "BadRequestError"; + } +} diff --git a/src/errors/bad_response.ts b/src/errors/bad_response.ts new file mode 100644 index 000000000..758698105 --- /dev/null +++ b/src/errors/bad_response.ts @@ -0,0 +1,24 @@ +import { NetworkError } from "./network"; + +/** + * BadResponseError is raised when a response from a + * {@link module:Horizon | Horizon} or {@link module:Federation | Federation} + * server is invalid in some way. For example, a federation response may exceed + * the maximum allowed size, or a transaction submission may have failed with + * Horizon. + * @augments NetworkError + * @inheritdoc + * @category Errors + * + * @param {string} message Human-readable error message. + * @param {any} response Response details, received from the server. + */ +export class BadResponseError extends NetworkError { + constructor(message: string, response: any) { + const trueProto = new.target.prototype; + super(message, response); + this.__proto__ = trueProto; + this.constructor = BadResponseError; + this.name = "BadResponseError"; + } +} diff --git a/src/errors/index.ts b/src/errors/index.ts new file mode 100644 index 000000000..cb4f19458 --- /dev/null +++ b/src/errors/index.ts @@ -0,0 +1,5 @@ +export * from "./network"; +export * from "./not_found"; +export * from "./bad_request"; +export * from "./bad_response"; +export * from "./account_requires_memo"; diff --git a/src/errors/network.ts b/src/errors/network.ts new file mode 100644 index 000000000..81a10446b --- /dev/null +++ b/src/errors/network.ts @@ -0,0 +1,50 @@ +import { HorizonApi } from "../horizon/horizon_api"; + +// For ES5 compatibility (https://stackoverflow.com/a/55066280). + +/** + * NetworkError is raised when an interaction with a Horizon server has caused + * some kind of problem. + * @category Errors + * + * @param {string} message Human-readable error message + * @param {any} response Response details, received from the Horizon server. + * @param {HorizonApi.ErrorResponseData} [response.data] The data returned by Horizon as part of the error: {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/response | Error Response} + * @param {number} [response.status] HTTP status code describing the basic issue with a submitted transaction {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/http-status-codes/standard | Standard Status Codes} + * @param {string} [response.statusText] A human-readable description of what the status code means: {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/http-status-codes/horizon-specific | Horizon-Specific Status Codes} + * @param {string} [response.url] URL which can provide more information about the problem that occurred. + */ +export class NetworkError extends Error { + public response: { + data?: HorizonApi.ErrorResponseData; + status?: number; + statusText?: string; + url?: string; + }; + public __proto__: NetworkError; + + constructor(message: string, response: any) { + const trueProto = new.target.prototype; + super(message); + this.__proto__ = trueProto; + this.constructor = NetworkError; + /** + * The response sent by the Horizon server. + * @type {object} Response details, received from the Horizon server + * @property {HorizonApi.ErrorResponseData} [response.data] The data returned by Horizon as part of the error: {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/response | Error Response} + * @property {number} [response.status] HTTP status code describing the basic issue with a submitted transaction {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/http-status-codes/standard | Standard Status Codes} + * @property {string} [response.statusText] A human-readable description of what the status code means: {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/http-status-codes/horizon-specific | Horizon-Specific Status Codes} + * @property {string} [response.url] URL which can provide more information about the problem that occurred. + */ + this.response = response; + } + + /** + * Returns the error response sent by the Horizon server. + * @returns {any} + */ + public getResponse() { + return this.response; + } +} + diff --git a/src/errors/not_found.ts b/src/errors/not_found.ts new file mode 100644 index 000000000..2e7279691 --- /dev/null +++ b/src/errors/not_found.ts @@ -0,0 +1,21 @@ +import { NetworkError } from "./network"; + +/** + * NotFoundError is raised when the resource requested from Horizon is + * unavailable. + * @augments NetworkError + * @inheritdoc + * @category Errors + * + * @param {string} message Human-readable error message + * @param {any} response Response details, received from the Horizon server + */ +export class NotFoundError extends NetworkError { + constructor(message: string, response: any) { + const trueProto = new.target.prototype; + super(message, response); + this.__proto__ = trueProto; + this.constructor = NotFoundError; + this.name = "NotFoundError"; + } +} diff --git a/src/federation/api.ts b/src/federation/api.ts index 65c3e98c3..9f43c7880 100644 --- a/src/federation/api.ts +++ b/src/federation/api.ts @@ -1,13 +1,33 @@ -/* tslint:disable-next-line:no-namespace */ export namespace Api { - export interface Record { - account_id: string; - memo_type?: string; - memo?: string; - } +/** + * Record returned from a federation server. + */ +export interface Record { + /** + * The Stellar public key resolved from the federation lookup + */ + account_id: string; + /** + * The type of memo, if any, required to send payments to this user + */ + memo_type?: string; + /** + * The memo value, if any, required to send payments to this user + */ + memo?: string; +} - export interface Options { - allowHttp?: boolean; - timeout?: number; - } - } +/** + * Options for configuring connections to federation servers. You can also use {@link Config} class to set this globally. + */ +export interface Options { + /** + * Allow connecting to http servers, default: `false`. This must be set to false in production deployments! + */ + allowHttp?: boolean; + /** + * Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue. + */ + timeout?: number; +} +} diff --git a/src/federation/index.ts b/src/federation/index.ts index b7c92ee06..4eaff4f80 100644 --- a/src/federation/index.ts +++ b/src/federation/index.ts @@ -1,2 +1,2 @@ export { FederationServer as Server, FEDERATION_RESPONSE_MAX_SIZE } from './server'; -export * as Api from './api'; \ No newline at end of file +export * from './api'; diff --git a/src/federation/server.ts b/src/federation/server.ts index e54aa4fb2..b20c9fe40 100644 --- a/src/federation/server.ts +++ b/src/federation/server.ts @@ -9,42 +9,39 @@ import { Resolver } from "../stellartoml"; import { Api } from "./api"; import { httpClient } from "../http-client"; -// FEDERATION_RESPONSE_MAX_SIZE is the maximum size of response from a federation server -export const FEDERATION_RESPONSE_MAX_SIZE = 100 * 1024; +/** @module Federation */ /** - * FederationServer handles a network connection to a - * [federation server](https://developers.stellar.org/docs/glossary/federation/) + * The maximum size of response from a federation server + * @default 102400 + */ +export const FEDERATION_RESPONSE_MAX_SIZE: number = 100 * 1024; + +/** + * Federation.Server handles a network connection to a + * [federation server](https://developers.stellar.org/docs/learn/encyclopedia/federation) * instance and exposes an interface for requests to that instance. - * @class + * + * @alias module:Federation.Server + * @memberof module:Federation * @param {string} serverURL The federation server URL (ex. `https://acme.com/federation`). * @param {string} domain Domain this server represents - * @param {object} [opts] options object - * @param {boolean} [opts.allowHttp] - Allow connecting to http servers, default: `false`. This must be set to false in production deployments! You can also use {@link Config} class to set this globally. - * @param {number} [opts.timeout] - Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue. You can also use {@link Config} class to set this globally. + * @param {Api.Options} [opts] Options object * @returns {void} */ export class FederationServer { /** * The federation server URL (ex. `https://acme.com/federation`). - * - * @memberof FederationServer */ private readonly serverURL: URI; // TODO: public or private? readonly? /** * Domain this server represents. - * - * @type {string} - * @memberof FederationServer */ private readonly domain: string; // TODO: public or private? readonly? /** * Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue. - * - * @type {number} - * @memberof FederationServer */ private readonly timeout: number; // TODO: public or private? readonly? @@ -59,8 +56,7 @@ export class FederationServer { * resolves if Account ID is valid and rejects in all other cases. Please note that this method does not check * if the account actually exists in a ledger. * - * Example: - * ```js + * @example * StellarSdk.FederationServer.resolve('bob*stellar.org') * .then(federationRecord => { * // { @@ -69,18 +65,13 @@ export class FederationServer { * // memo: 100 * // } * }); - * ``` * - * @see Federation doc - * @see Stellar.toml doc + * @see Federation doc + * @see Stellar.toml doc * @param {string} value Stellar Address (ex. `bob*stellar.org`) * @param {object} [opts] Options object - * @param {boolean} [opts.allowHttp] - Allow connecting to http servers, default: `false`. This must be set to false in production deployments! - * @param {number} [opts.timeout] - Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue. - * @returns {Promise} `Promise` that resolves to a JSON object with this shape: - * * `account_id` - Account ID of the destination, - * * `memo_type` (optional) - Memo type that needs to be attached to a transaction, - * * `memo` (optional) - Memo value that needs to be attached to a transaction. + * @returns {Promise} A promise that resolves to the federation record + * @throws Will throw an error if the provided account ID is not a valid Ed25519 public key. */ public static async resolve( value: string, @@ -109,12 +100,13 @@ export class FederationServer { /** * Creates a `FederationServer` instance based on information from - * [stellar.toml](https://developers.stellar.org/docs/issuing-assets/publishing-asset-info/) + * [stellar.toml](https://developers.stellar.org/docs/issuing-assets/publishing-asset-info) * file for a given domain. * * If `stellar.toml` file does not exist for a given domain or it does not * contain information about a federation server Promise will reject. - * ```js + * + * @example * StellarSdk.FederationServer.createForDomain('acme.com') * .then(federationServer => { * // federationServer.resolveAddress('bob').then(...) @@ -122,13 +114,12 @@ export class FederationServer { * .catch(error => { * // stellar.toml does not exist or it does not contain information about federation server. * }); - * ``` - * @see Stellar.toml doc + * + * @see Stellar.toml doc * @param {string} domain Domain to get federation server for - * @param {object} [opts] Options object - * @param {boolean} [opts.allowHttp] - Allow connecting to http servers, default: `false`. This must be set to false in production deployments! - * @param {number} [opts.timeout] - Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue. - * @returns {Promise} `Promise` that resolves to a FederationServer object + * @param {module:Federation.Api.Options} [opts] Options object + * @returns {Promise} A promise that resolves to the federation record + * @throws Will throw an error if the domain's stellar.toml file does not contain a federation server field. */ public static async createForDomain( domain: string, @@ -167,9 +158,10 @@ export class FederationServer { /** * Get the federation record if the user was found for a given Stellar address - * @see Federation doc + * @see Federation doc * @param {string} address Stellar address (ex. `bob*stellar.org`). If `FederationServer` was instantiated with `domain` param only username (ex. `bob`) can be passed. - * @returns {Promise} Promise that resolves to the federation record + * @returns {Promise} A promise that resolves to the federation record + * @throws Will throw an error if the federated address does not contain a domain, or if the server object was not instantiated with a `domain` parameter */ public async resolveAddress( address: string, @@ -191,9 +183,12 @@ export class FederationServer { /** * Given an account ID, get their federation record if the user was found - * @see Federation doc + * @see Federation doc * @param {string} accountId Account ID (ex. `GBYNR2QJXLBCBTRN44MRORCMI4YO7FZPFBCNOKTOBCAAFC7KC3LNPRYS`) - * @returns {Promise} A promise that resolves to the federation record + * @returns {Promise} A promise that resolves to the federation record + * @throws Will throw an error if the federation server returns an invalid memo value. + * @throws Will throw an error if the federation server's response exceeds the allowed maximum size. + * @throws {BadResponseError} Will throw an error if the server query fails with an improper response. */ public async resolveAccountId( accountId: string, @@ -206,7 +201,10 @@ export class FederationServer { * Given a transactionId, get the federation record if the sender of the transaction was found * @see Federation doc * @param {string} transactionId Transaction ID (ex. `3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889`) - * @returns {Promise} A promise that resolves to the federation record + * @returns {Promise} A promise that resolves to the federation record + * @throws Will throw an error if the federation server returns an invalid memo value. + * @throws Will throw an error if the federation server's response exceeds the allowed maximum size. + * @throws {BadResponseError} Will throw an error if the server query fails with an improper response. */ public async resolveTransactionId( transactionId: string, diff --git a/src/horizon/account_call_builder.ts b/src/horizon/account_call_builder.ts index 58b876c1a..f012c9b34 100644 --- a/src/horizon/account_call_builder.ts +++ b/src/horizon/account_call_builder.ts @@ -3,12 +3,14 @@ import { CallBuilder } from "./call_builder"; import { ServerApi } from "./server_api"; /** - * Creates a new {@link AccountCallBuilder} pointed to server defined by serverUrl. - * Do not create this object directly, use {@link Server#accounts}. + * Creates a new {@link AccountCallBuilder} pointed to server defined by `serverUrl`. + * + * Do not create this object directly, use {@link Horizon.Server#accounts}. + * + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-accounts|All Accounts} * - * @see [All Accounts](https://developers.stellar.org/api/resources/accounts/) - * @class AccountCallBuilder * @augments CallBuilder + * @private * @class * @param {string} serverUrl Horizon server URL. */ @@ -24,7 +26,7 @@ export class AccountCallBuilder extends CallBuilder< * Returns information and links relating to a single account. * The balances section in the returned JSON will also list all the trust lines this account has set up. * - * @see [Account Details](https://developers.stellar.org/api/resources/accounts/single/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-an-account|Account Details} * @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {CallBuilder} a new CallBuilder instance for the /accounts/:id endpoint */ @@ -36,7 +38,7 @@ export class AccountCallBuilder extends CallBuilder< /** * This endpoint filters accounts by signer account. - * @see [Accounts](https://developers.stellar.org/api/resources/accounts/list/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-accounts|Accounts} * @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {AccountCallBuilder} current AccountCallBuilder instance */ @@ -47,7 +49,7 @@ export class AccountCallBuilder extends CallBuilder< /** * This endpoint filters all accounts who are trustees to an asset. - * @see [Accounts](https://developers.stellar.org/api/resources/accounts/list/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-accounts|Accounts} * @see Asset * @param {Asset} asset For example: `new Asset('USD','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')` * @returns {AccountCallBuilder} current AccountCallBuilder instance @@ -59,7 +61,7 @@ export class AccountCallBuilder extends CallBuilder< /** * This endpoint filters accounts where the given account is sponsoring the account or any of its sub-entries.. - * @see [Accounts](https://developers.stellar.org/api/resources/accounts/list/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-accounts|Accounts} * @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {AccountCallBuilder} current AccountCallBuilder instance */ diff --git a/src/horizon/account_response.ts b/src/horizon/account_response.ts index def7ecccb..d26ca788e 100644 --- a/src/horizon/account_response.ts +++ b/src/horizon/account_response.ts @@ -6,13 +6,16 @@ import { HorizonApi } from "./horizon_api"; import { ServerApi } from "./server_api"; /** - * Do not create this object directly, use {@link Server#loadAccount}. + * Do not create this object directly, use {@link module:Horizon.Server#loadAccount | Horizon.Server#loadAccount}. * * Returns information and links relating to a single account. * The balances section in the returned JSON will also list all the trust lines this account has set up. * It also contains {@link BaseAccount} object and exposes it's methods so can be used in {@link TransactionBuilder}. * - * @see [Account Details](https://developers.stellar.org/api/resources/accounts/object/) + * @memberof module:Horizon + * @private + * + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/accounts/object|Account Details} * @param {string} response Response from horizon account endpoint. * @returns {AccountResponse} AccountResponse instance */ diff --git a/src/horizon/assets_call_builder.ts b/src/horizon/assets_call_builder.ts index 591bf7a37..587fbb39d 100644 --- a/src/horizon/assets_call_builder.ts +++ b/src/horizon/assets_call_builder.ts @@ -4,10 +4,11 @@ import { ServerApi } from "./server_api"; /** * Creates a new {@link AssetsCallBuilder} pointed to server defined by serverUrl. * - * Do not create this object directly, use {@link Server#assets}. - * @class AssetsCallBuilder + * Do not create this object directly, use {@link Horizon.Server#assets}. + * * @class * @augments CallBuilder + * @private * @param {string} serverUrl Horizon server URL. */ export class AssetsCallBuilder extends CallBuilder< diff --git a/src/horizon/call_builder.ts b/src/horizon/call_builder.ts index e7fba4495..49bdec810 100644 --- a/src/horizon/call_builder.ts +++ b/src/horizon/call_builder.ts @@ -6,7 +6,6 @@ import { BadRequestError, NetworkError, NotFoundError } from "../errors"; import { HorizonApi } from "./horizon_api"; import { AxiosClient, version } from "./horizon_axios_client"; import { ServerApi } from "./server_api"; -import type { Server } from "../federation"; // Resources which can be included in the Horizon response via the `join` // query-param. @@ -30,9 +29,12 @@ const EventSource: Constructable = anyGlobal.EventSource ?? /** * Creates a new {@link CallBuilder} pointed to server defined by serverUrl. * - * This is an **abstract** class. Do not create this object directly, use {@link Server} class. + * This is an **abstract** class. Do not create this object directly, use {@link module:Horizon.Server | Horizon.Server} class. + * + * @private + * @class + * * @param {string} serverUrl URL of Horizon server - * @class CallBuilder */ export class CallBuilder< T extends @@ -85,8 +87,8 @@ export class CallBuilder< /** * Creates an EventSource that listens for incoming messages from the server. To stop listening for new * events call the function returned by this method. - * @see [Horizon Response Format](https://developers.stellar.org/api/introduction/response-format/) - * @see [MDN EventSource](https://developer.mozilla.org/en-US/docs/Web/API/EventSource) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/structure/response-format|Horizon Response Format} + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/EventSource|MDN EventSource} * @param {object} [options] EventSource options. * @param {Function} [options.onmessage] Callback function to handle incoming messages. * @param {Function} [options.onerror] Callback function to handle errors. @@ -192,7 +194,7 @@ export class CallBuilder< /** * Sets `cursor` parameter for the current call. Returns the CallBuilder object on which this method has been called. - * @see [Paging](https://developers.stellar.org/api/introduction/pagination/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/structure/pagination|Paging} * @param {string} cursor A cursor is a value that points to a specific location in a collection of resources. * @returns {object} current CallBuilder instance */ @@ -203,7 +205,7 @@ export class CallBuilder< /** * Sets `limit` parameter for the current call. Returns the CallBuilder object on which this method has been called. - * @see [Paging](https://developers.stellar.org/api/introduction/pagination/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/structure/pagination|Paging} * @param {number} recordsNumber Number of records the server should return. * @returns {object} current CallBuilder instance */ diff --git a/src/horizon/claimable_balances_call_builder.ts b/src/horizon/claimable_balances_call_builder.ts index 3d94fd390..480badb45 100644 --- a/src/horizon/claimable_balances_call_builder.ts +++ b/src/horizon/claimable_balances_call_builder.ts @@ -4,12 +4,14 @@ import { ServerApi } from "./server_api"; /** * Creates a new {@link ClaimableBalanceCallBuilder} pointed to server defined by serverUrl. - * Do not create this object directly, use {@link Server#claimableBalances}. * - * @see [Claimable Balances](https://developers.stellar.org/api/resources/claimablebalances/) - * @class ClaimableBalanceCallBuilder - * @class + * Do not create this object directly, use {@link Horizon.Server#claimableBalances}. + * + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/claimablebalances|Claimable Balances} + * * @augments CallBuilder + * @private + * @class * @param {string} serverUrl Horizon server URL. */ export class ClaimableBalanceCallBuilder extends CallBuilder< @@ -23,7 +25,7 @@ export class ClaimableBalanceCallBuilder extends CallBuilder< /** * The claimable balance details endpoint provides information on a single claimable balance. * - * @see [Claimable Balance Details](https://developers.stellar.org/api/resources/claimablebalances/single/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-claimable-balance|Claimable Balance Details} * @param {string} claimableBalanceId Claimable balance ID * @returns {CallBuilder} CallBuilder OperationCallBuilder instance */ @@ -40,7 +42,7 @@ export class ClaimableBalanceCallBuilder extends CallBuilder< /** * Returns all claimable balances which are sponsored by the given account ID. * - * @see [Claimable Balances](https://developers.stellar.org/api/resources/claimablebalances/list/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-claimable-balances|Claimable Balances} * @param {string} sponsor For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {ClaimableBalanceCallBuilder} current ClaimableBalanceCallBuilder instance */ @@ -52,7 +54,7 @@ export class ClaimableBalanceCallBuilder extends CallBuilder< /** * Returns all claimable balances which can be claimed by the given account ID. * - * @see [Claimable Balances](https://developers.stellar.org/api/resources/claimablebalances/list/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-claimable-balances|Claimable Balances} * @param {string} claimant For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {ClaimableBalanceCallBuilder} current ClaimableBalanceCallBuilder instance */ @@ -64,7 +66,7 @@ export class ClaimableBalanceCallBuilder extends CallBuilder< /** * Returns all claimable balances which provide a balance for the given asset. * - * @see [Claimable Balances](https://developers.stellar.org/api/resources/claimablebalances/list/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-claimable-balances|Claimable Balances} * @param {Asset} asset The Asset held by the claimable balance * @returns {ClaimableBalanceCallBuilder} current ClaimableBalanceCallBuilder instance */ diff --git a/src/horizon/effect_call_builder.ts b/src/horizon/effect_call_builder.ts index 01ebaad71..ebaf48afe 100644 --- a/src/horizon/effect_call_builder.ts +++ b/src/horizon/effect_call_builder.ts @@ -3,11 +3,12 @@ import { ServerApi } from "./server_api"; /** * Creates a new {@link EffectCallBuilder} pointed to server defined by serverUrl. - * Do not create this object directly, use {@link Server#effects}. + * Do not create this object directly, use {@link Horizon.Server#effects}. + * + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/effects|All Effects} * - * @class EffectCallBuilder * @augments CallBuilder - * @see [All Effects](https://developers.stellar.org/api/resources/effects/) + * @private * @class * @param {string} serverUrl Horizon server URL. */ @@ -21,7 +22,7 @@ export class EffectCallBuilder extends CallBuilder< /** * This endpoint represents all effects that changed a given account. It will return relevant effects from the creation of the account to the current ledger. - * @see [Effects for Account](https://developers.stellar.org/api/resources/accounts/effects/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-effects-by-account-id|Effects for Account} * @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {EffectCallBuilder} this EffectCallBuilder instance */ @@ -33,7 +34,7 @@ export class EffectCallBuilder extends CallBuilder< * Effects are the specific ways that the ledger was changed by any operation. * * This endpoint represents all effects that occurred in the given ledger. - * @see [Effects for Ledger](https://developers.stellar.org/api/resources/ledgers/effects/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-ledgers-effects|Effects for Ledger} * @param {number|string} sequence Ledger sequence * @returns {EffectCallBuilder} this EffectCallBuilder instance */ @@ -43,7 +44,7 @@ export class EffectCallBuilder extends CallBuilder< /** * This endpoint represents all effects that occurred as a result of a given transaction. - * @see [Effects for Transaction](https://developers.stellar.org/api/resources/transactions/effects/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-transactions-effects|Effects for Transaction} * @param {string} transactionId Transaction ID * @returns {EffectCallBuilder} this EffectCallBuilder instance */ @@ -53,7 +54,7 @@ export class EffectCallBuilder extends CallBuilder< /** * This endpoint represents all effects that occurred as a result of a given operation. - * @see [Effects for Operation](https://developers.stellar.org/api/resources/operations/effects/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-an-operations-effects|Effects for Operation} * @param {number} operationId Operation ID * @returns {EffectCallBuilder} this EffectCallBuilder instance */ diff --git a/src/horizon/horizon_axios_client.ts b/src/horizon/horizon_axios_client.ts index f0d8d004b..3d7bdae22 100644 --- a/src/horizon/horizon_axios_client.ts +++ b/src/horizon/horizon_axios_client.ts @@ -18,10 +18,15 @@ export interface ServerTime { * each entry will map the server domain to the last-known time and the local * time it was recorded, ex: * - * "horizon-testnet.stellar.org": { - * serverTime: 1552513039, - * localTimeRecorded: 1552513052 - * } + * @example + * "horizon-testnet.stellar.org": { + * serverTime: 1552513039, + * localTimeRecorded: 1552513052 + * } + * + * @constant {Record.} + * @default {} + * @memberof module:Horizon */ export const SERVER_TIME_MAP: Record = {}; @@ -69,6 +74,8 @@ export default AxiosClient; * Given a hostname, get the current time of that server (i.e., use the last- * recorded server time and offset it by the time since then.) If there IS no * recorded server time, or it's been 5 minutes since the last, return null. + * @memberof module:Horizon + * * @param {string} hostname Hostname of a Horizon server. * @returns {number} The UNIX timestamp (in seconds, not milliseconds) * representing the current time on that server, or `null` if we don't have diff --git a/src/horizon/index.ts b/src/horizon/index.ts index 2a690dda7..6d425ace6 100644 --- a/src/horizon/index.ts +++ b/src/horizon/index.ts @@ -1,3 +1,5 @@ +/** @module Horizon */ + // Expose all types export * from "./horizon_api"; export * from "./server_api"; @@ -5,11 +7,11 @@ export * from "./server_api"; // stellar-sdk classes to expose export * from "./account_response"; -export { Server } from "./server"; +export { HorizonServer as Server } from "./server"; export { default as AxiosClient, SERVER_TIME_MAP, getCurrentServerTime } from "./horizon_axios_client"; -export default module.exports; \ No newline at end of file +export default module.exports; diff --git a/src/horizon/ledger_call_builder.ts b/src/horizon/ledger_call_builder.ts index 43ef4aa53..3422277a7 100644 --- a/src/horizon/ledger_call_builder.ts +++ b/src/horizon/ledger_call_builder.ts @@ -3,12 +3,14 @@ import { ServerApi } from "./server_api"; /** * Creates a new {@link LedgerCallBuilder} pointed to server defined by serverUrl. - * Do not create this object directly, use {@link Server#ledgers}. * - * @see [All Ledgers](https://developers.stellar.org/api/resources/ledgers/list/) - * @class - * @class LedgerCallBuilder + * Do not create this object directly, use {@link Horizon.Server#ledgers}. + * + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-ledgers|All Ledgers} + * * @augments CallBuilder + * @private + * @class * @param {string} serverUrl Horizon server URL. */ export class LedgerCallBuilder extends CallBuilder< diff --git a/src/horizon/liquidity_pool_call_builder.ts b/src/horizon/liquidity_pool_call_builder.ts index 25798988e..39e29c26f 100644 --- a/src/horizon/liquidity_pool_call_builder.ts +++ b/src/horizon/liquidity_pool_call_builder.ts @@ -5,10 +5,11 @@ import { ServerApi } from "./server_api"; /** * Creates a new {@link LiquidityPoolCallBuilder} pointed to server defined by serverUrl. - * Do not create this object directly, use {@link Server#liquidityPools}. * - * @class LiquidityPoolCallBuilder + * Do not create this object directly, use {@link Horizon.Server#liquidityPools}. + * * @augments CallBuilder + * @private * @class * @param {string} serverUrl Horizon server URL. */ diff --git a/src/horizon/offer_call_builder.ts b/src/horizon/offer_call_builder.ts index beeb5520f..c5d5c907e 100644 --- a/src/horizon/offer_call_builder.ts +++ b/src/horizon/offer_call_builder.ts @@ -4,12 +4,14 @@ import { ServerApi } from "./server_api"; /** * Creates a new {@link OfferCallBuilder} pointed to server defined by serverUrl. - * Do not create this object directly, use {@link Server#offers}. * - * @see [Offers](https://developers.stellar.org/api/resources/offers/) - * @class OfferCallBuilder - * @class + * Do not create this object directly, use {@link Horizon.Server#offers}. + * + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/offers/|Offers} + * * @augments CallBuilder + * @private + * @class * @param {string} serverUrl Horizon server URL. */ export class OfferCallBuilder extends CallBuilder< @@ -23,7 +25,7 @@ export class OfferCallBuilder extends CallBuilder< /** * The offer details endpoint provides information on a single offer. The offer ID provided in the id * argument specifies which offer to load. - * @see [Offer Details](https://developers.stellar.org/api/resources/offers/single/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/offers/single/|Offer Details} * @param {string} offerId Offer ID * @returns {CallBuilder} CallBuilder OperationCallBuilder instance */ @@ -36,7 +38,7 @@ export class OfferCallBuilder extends CallBuilder< /** * Returns all offers where the given account is involved. * - * @see [Offers](https://developers.stellar.org/api/resources/accounts/offers/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/accounts/offers/|Offers} * @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {OfferCallBuilder} current OfferCallBuilder instance */ @@ -46,7 +48,7 @@ export class OfferCallBuilder extends CallBuilder< /** * Returns all offers buying an asset. - * @see [Offers](https://developers.stellar.org/api/resources/offers/list/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/offers/list/|Offers} * @see Asset * @param {Asset} asset For example: `new Asset('USD','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')` * @returns {OfferCallBuilder} current OfferCallBuilder instance @@ -64,7 +66,7 @@ export class OfferCallBuilder extends CallBuilder< /** * Returns all offers selling an asset. - * @see [Offers](https://developers.stellar.org/api/resources/offers/list/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/offers/list/|Offers} * @see Asset * @param {Asset} asset For example: `new Asset('EUR','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')` * @returns {OfferCallBuilder} current OfferCallBuilder instance @@ -82,7 +84,7 @@ export class OfferCallBuilder extends CallBuilder< /** * This endpoint filters offers where the given account is sponsoring the offer entry. - * @see [Offers](https://developers.stellar.org/api/resources/offers/list/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-all-offers|Offers} * @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {OfferCallBuilder} current OfferCallBuilder instance */ @@ -94,7 +96,7 @@ export class OfferCallBuilder extends CallBuilder< /** * This endpoint filters offers where the given account is the seller. * - * @see [Offers](https://developers.stellar.org/api/resources/offers/list/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-all-offers|Offers} * @param {string} seller For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {OfferCallBuilder} current OfferCallBuilder instance */ diff --git a/src/horizon/operation_call_builder.ts b/src/horizon/operation_call_builder.ts index 04da7127f..6b57bc205 100644 --- a/src/horizon/operation_call_builder.ts +++ b/src/horizon/operation_call_builder.ts @@ -3,12 +3,14 @@ import { ServerApi } from "./server_api"; /** * Creates a new {@link OperationCallBuilder} pointed to server defined by serverUrl. - * Do not create this object directly, use {@link Server#operations}. * - * @see [All Operations](https://developers.stellar.org/api/resources/operations/) - * @class OperationCallBuilder - * @class + * Do not create this object directly, use {@link Horizon.Server#operations}. + * + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/operations|All Operations} + * * @augments CallBuilder + * @private + * @class * @param {string} serverUrl Horizon server URL. */ export class OperationCallBuilder extends CallBuilder< @@ -22,7 +24,7 @@ export class OperationCallBuilder extends CallBuilder< /** * The operation details endpoint provides information on a single operation. The operation ID provided in the id * argument specifies which operation to load. - * @see [Operation Details](https://developers.stellar.org/api/resources/operations/single/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-an-operation|Operation Details} * @param {number} operationId Operation ID * @returns {CallBuilder} this OperationCallBuilder instance */ @@ -38,7 +40,7 @@ export class OperationCallBuilder extends CallBuilder< /** * This endpoint represents all operations that were included in valid transactions that affected a particular account. - * @see [Operations for Account](https://developers.stellar.org/api/resources/accounts/operations/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-operations-by-account-id|Operations for Account} * @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {OperationCallBuilder} this OperationCallBuilder instance */ @@ -48,7 +50,7 @@ export class OperationCallBuilder extends CallBuilder< /** * This endpoint represents all operations that reference a given claimable_balance. - * @see [Operations for Claimable Balance](https://developers.stellar.org/api/resources/claimablebalances/operations/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/cb-retrieve-related-operations|Operations for Claimable Balance} * @param {string} claimableBalanceId Claimable Balance ID * @returns {OperationCallBuilder} this OperationCallBuilder instance */ @@ -59,7 +61,7 @@ export class OperationCallBuilder extends CallBuilder< /** * This endpoint returns all operations that occurred in a given ledger. * - * @see [Operations for Ledger](https://developers.stellar.org/api/resources/ledgers/operations/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-ledgers-operations|Operations for Ledger} * @param {number|string} sequence Ledger sequence * @returns {OperationCallBuilder} this OperationCallBuilder instance */ @@ -69,7 +71,7 @@ export class OperationCallBuilder extends CallBuilder< /** * This endpoint represents all operations that are part of a given transaction. - * @see [Operations for Transaction](https://developers.stellar.org/api/resources/transactions/operations/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-transactions-operations|Operations for Transaction} * @param {string} transactionId Transaction ID * @returns {OperationCallBuilder} this OperationCallBuilder instance */ diff --git a/src/horizon/orderbook_call_builder.ts b/src/horizon/orderbook_call_builder.ts index 0eb0bd72c..cf1f301aa 100644 --- a/src/horizon/orderbook_call_builder.ts +++ b/src/horizon/orderbook_call_builder.ts @@ -5,8 +5,13 @@ import { ServerApi } from "./server_api"; /** * Creates a new {@link OrderbookCallBuilder} pointed to server defined by serverUrl. * - * Do not create this object directly, use {@link Server#orderbook}. - * @see [Orderbook Details](https://developers.stellar.org/api/aggregations/order-books/) + * Do not create this object directly, use {@link Horizon.Server#orderbook}. + * + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/order-books|Orderbook Details} + * + * @augments CallBuilder + * @private + * @class * @param {string} serverUrl serverUrl Horizon server URL. * @param {Asset} selling Asset being sold * @param {Asset} buying Asset being bought diff --git a/src/horizon/path_call_builder.ts b/src/horizon/path_call_builder.ts index 7b2d40b59..8675cda30 100644 --- a/src/horizon/path_call_builder.ts +++ b/src/horizon/path_call_builder.ts @@ -17,9 +17,14 @@ import { ServerApi } from "./server_api"; * payment paths from those source assets to the desired destination asset. The search's amount parameter will be * used to determine if there a given path can satisfy a payment of the desired amount. * - * Do not create this object directly, use {@link Server#paths}. - * @see [Find Payment Paths](https://developers.stellar.org/api/aggregations/paths/) + * Do not create this object directly, use {@link Horizon.Server#paths}. + * + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/paths|Find Payment Paths} + * * @augments CallBuilder + * @private + * @class + * * @param {string} serverUrl Horizon server URL. * @param {string} source The sender's account ID. Any returned path must use a source that the sender can hold. * @param {string} destination The destination account ID that any returned path should use. diff --git a/src/horizon/payment_call_builder.ts b/src/horizon/payment_call_builder.ts index 1e5c8cb6b..0550b0736 100644 --- a/src/horizon/payment_call_builder.ts +++ b/src/horizon/payment_call_builder.ts @@ -4,10 +4,14 @@ import { ServerApi } from "./server_api"; /** * Creates a new {@link PaymentCallBuilder} pointed to server defined by serverUrl. * - * Do not create this object directly, use {@link Server#payments}. - * @see [All Payments](https://developers.stellar.org/api/horizon/resources/list-all-payments/) - * @class + * Do not create this object directly, use {@link Horizon.Server#payments}. + * + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/horizon/resources/list-all-payments/|All Payments} + * * @augments CallBuilder + * @private + * @class + * * @param {string} serverUrl Horizon server URL. */ export class PaymentCallBuilder extends CallBuilder< @@ -27,7 +31,7 @@ export class PaymentCallBuilder extends CallBuilder< /** * This endpoint responds with a collection of Payment operations where the given account was either the sender or receiver. - * @see [Payments for Account](https://developers.stellar.org/api/horizon/resources/get-payments-by-account-id) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/horizon/resources/get-payments-by-account-id|Payments for Account} * @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {PaymentCallBuilder} this PaymentCallBuilder instance */ @@ -37,7 +41,7 @@ export class PaymentCallBuilder extends CallBuilder< /** * This endpoint represents all payment operations that are part of a valid transactions in a given ledger. - * @see [Payments for Ledger](https://developers.stellar.org/api/horizon/resources/retrieve-a-ledgers-payments) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/horizon/resources/retrieve-a-ledgers-payments|Payments for Ledger} * @param {number|string} sequence Ledger sequence * @returns {PaymentCallBuilder} this PaymentCallBuilder instance */ @@ -47,7 +51,7 @@ export class PaymentCallBuilder extends CallBuilder< /** * This endpoint represents all payment operations that are part of a given transaction. - * @see [Payments for Transaction](https://developers.stellar.org/api/resources/transactions/payments/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/transactions/payments/|Payments for Transaction} * @param {string} transactionId Transaction ID * @returns {PaymentCallBuilder} this PaymentCallBuilder instance */ diff --git a/src/horizon/server.ts b/src/horizon/server.ts index d1d3e7813..e509862d5 100644 --- a/src/horizon/server.ts +++ b/src/horizon/server.ts @@ -38,12 +38,18 @@ import { StrictSendPathCallBuilder } from "./strict_send_path_call_builder"; import { TradeAggregationCallBuilder } from "./trade_aggregation_call_builder"; import { TradesCallBuilder } from "./trades_call_builder"; import { TransactionCallBuilder } from "./transaction_call_builder"; -// eslint-disable-next-line import/no-named-as-default +// eslint-disable-next-line import/no-named-as-default import AxiosClient, { getCurrentServerTime, } from "./horizon_axios_client"; -export const SUBMIT_TRANSACTION_TIMEOUT = 60 * 1000; +/** + * Default transaction submission timeout for Horizon requests, in milliseconds + * @constant {number} + * @default 60000 + * @memberof module:Horizon.Server + */ +export const SUBMIT_TRANSACTION_TIMEOUT: number = 60 * 1000; const STROOPS_IN_LUMEN = 10000000; @@ -56,25 +62,24 @@ function getAmountInLumens(amt: BigNumber) { } /** - * Server handles the network connection to a [Horizon](https://developers.stellar.org/api/introduction/) + * Server handles the network connection to a [Horizon](https://developers.stellar.org/docs/data/horizon) * instance and exposes an interface for requests to that instance. * @class + * @alias module:Horizon.Server + * @memberof module:Horizon + * * @param {string} serverURL Horizon Server URL (ex. `https://horizon-testnet.stellar.org`). - * @param {object} [opts] Options object - * @param {boolean} [opts.allowHttp] - Allow connecting to http servers, default: `false`. This must be set to false in production deployments! You can also use {@link Config} class to set this globally. - * @param {string} [opts.appName] - Allow set custom header `X-App-Name`, default: `undefined`. - * @param {string} [opts.appVersion] - Allow set custom header `X-App-Version`, default: `undefined`. - * @param {string} [opts.authToken] - Allow set custom header `X-Auth-Token`, default: `undefined`. + * @param {module:Horizon.Server.Options} [opts] Options object */ -export class Server { +export class HorizonServer { /** - * serverURL Horizon Server URL (ex. `https://horizon-testnet.stellar.org`). + * Horizon Server URL (ex. `https://horizon-testnet.stellar.org`) * - * TODO: Solve `URI(this.serverURL as any)`. + * @todo Solve `URI(this.serverURL as any)`. */ public readonly serverURL: URI; - constructor(serverURL: string, opts: Server.Options = {}) { + constructor(serverURL: string, opts: HorizonServer.Options = {}) { this.serverURL = URI(serverURL); const allowHttp = @@ -124,28 +129,26 @@ export class Server { * not when you build or submit the transaction! So give yourself enough time to get * the transaction built and signed before submitting. * - * Example: - * - * ```javascript + * @example * const transaction = new StellarSdk.TransactionBuilder(accountId, { - * fee: await StellarSdk.Server.fetchBaseFee(), - * timebounds: await StellarSdk.Server.fetchTimebounds(100) + * fee: await StellarSdk.Server.fetchBaseFee(), + * timebounds: await StellarSdk.Server.fetchTimebounds(100) * }) - * .addOperation(operation) - * // normally we would need to call setTimeout here, but setting timebounds - * // earlier does the trick! - * .build(); - * ``` + * .addOperation(operation) + * // normally we would need to call setTimeout here, but setting timebounds + * // earlier does the trick! + * .build(); + * * @param {number} seconds Number of seconds past the current time to wait. * @param {boolean} [_isRetry] True if this is a retry. Only set this internally! * This is to avoid a scenario where Horizon is horking up the wrong date. - * @returns {Promise} Promise that resolves a `timebounds` object + * @returns {Promise} Promise that resolves a `timebounds` object * (with the shape `{ minTime: 0, maxTime: N }`) that you can set the `timebounds` option to. */ public async fetchTimebounds( seconds: number, _isRetry: boolean = false, - ): Promise { + ): Promise { // AxiosClient instead of this.ledgers so we can get at them headers const currentTime = getCurrentServerTime(this.serverURL.hostname()); @@ -184,7 +187,7 @@ export class Server { /** * Fetch the fee stats endpoint. - * @see [Fee Stats](https://developers.stellar.org/api/aggregations/fee-stats/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/fee-stats|Fee Stats} * @returns {Promise} Promise that resolves to the fee stats returned by Horizon. */ // eslint-disable-next-line require-await @@ -199,15 +202,27 @@ export class Server { /** * Submits a transaction to the network. * - * By default this function calls {@link Server#checkMemoRequired}, you can + * By default this function calls {@link Horizon.Server#checkMemoRequired}, you can * skip this check by setting the option `skipMemoRequiredCheck` to `true`. * * If you submit any number of `manageOffer` operations, this will add an * attribute to the response that will help you analyze what happened with * your offers. * - * Ex: - * ```javascript + * For example, you'll want to examine `offerResults` to add affordances like + * these to your app: + * - If `wasImmediatelyFilled` is true, then no offer was created. So if you + * normally watch the `Server.offers` endpoint for offer updates, you + * instead need to check `Server.trades` to find the result of this filled + * offer. + * - If `wasImmediatelyDeleted` is true, then the offer you submitted was + * deleted without reaching the orderbook or being matched (possibly because + * your amounts were rounded down to zero). So treat the just-submitted + * offer request as if it never happened. + * - If `wasPartiallyFilled` is true, you can tell the user that + * `amountBought` or `amountSold` have already been transferred. + * + * @example * const res = { * ...response, * offerResults: [ @@ -275,22 +290,8 @@ export class Server { * } * ] * } - * ``` * - * For example, you'll want to examine `offerResults` to add affordances like - * these to your app: - * * If `wasImmediatelyFilled` is true, then no offer was created. So if you - * normally watch the `Server.offers` endpoint for offer updates, you - * instead need to check `Server.trades` to find the result of this filled - * offer. - * * If `wasImmediatelyDeleted` is true, then the offer you submitted was - * deleted without reaching the orderbook or being matched (possibly because - * your amounts were rounded down to zero). So treat the just-submitted - * offer request as if it never happened. - * * If `wasPartiallyFilled` is true, you can tell the user that - * `amountBought` or `amountSold` have already been transferred. - * - * @see [PostTransaction](https://developers.stellar.org/api/resources/transactions/post/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/submit-a-transaction|Submit a Transaction} * @param {Transaction|FeeBumpTransaction} transaction - The transaction to submit. * @param {object} [opts] Options object * @param {boolean} [opts.skipMemoRequiredCheck] - Allow skipping memo @@ -301,7 +302,7 @@ export class Server { */ public async submitTransaction( transaction: Transaction | FeeBumpTransaction, - opts: Server.SubmitTransactionOptions = { skipMemoRequiredCheck: false }, + opts: HorizonServer.SubmitTransactionOptions = { skipMemoRequiredCheck: false }, ): Promise { // only check for memo required if skipMemoRequiredCheck is false and the transaction doesn't include a memo. if (!opts.skipMemoRequiredCheck) { @@ -382,7 +383,7 @@ export class Server { // However, you can never be too careful. default: throw new Error( - `Invalid offer result type: ${ + `Invalid offer result type: ${ offerClaimedAtom.switch()}`, ); } @@ -513,7 +514,7 @@ export class Server { * and waits for the transaction to be ingested in Horizon, this endpoint relays the response from * core directly back to the user. * - * By default, this function calls {@link Server#checkMemoRequired}, you can + * By default, this function calls {@link HorizonServer#checkMemoRequired}, you can * skip this check by setting the option `skipMemoRequiredCheck` to `true`. * * @see [Submit-Async-Transaction](https://developers.stellar.org/docs/data/horizon/api-reference/resources/submit-async-transaction) @@ -527,7 +528,7 @@ export class Server { */ public async submitAsyncTransaction( transaction: Transaction | FeeBumpTransaction, - opts: Server.SubmitTransactionOptions = { skipMemoRequiredCheck: false } + opts: HorizonServer.SubmitTransactionOptions = { skipMemoRequiredCheck: false } ): Promise { // only check for memo required if skipMemoRequiredCheck is false and the transaction doesn't include a memo. if (!opts.skipMemoRequiredCheck) { @@ -591,15 +592,15 @@ export class Server { /** * People on the Stellar network can make offers to buy or sell assets. This endpoint represents all the offers on the DEX. * - * You can query all offers for account using the function `.accountId`: + * You can query all offers for account using the function `.accountId`. * - * ``` + * @example * server.offers() - * .forAccount(accountId).call() - * .then(function(offers) { - * console.log(offers); - * }); - * ``` + * .forAccount(accountId).call() + * .then(function(offers) { + * console.log(offers); + * }); + * * @returns {OfferCallBuilder} New {@link OfferCallBuilder} object */ public offers(): OfferCallBuilder { @@ -802,7 +803,7 @@ export class Server { * Each account is checked sequentially instead of loading multiple accounts * at the same time from Horizon. * - * @see https://stellar.org/protocol/sep-29 + * @see {@link https://stellar.org/protocol/sep-29|SEP-29: Account Memo Requirements} * @param {Transaction} transaction - The transaction to check. * @returns {Promise} - If any of the destination account * requires a memo, the promise will throw {@link AccountRequiresMemoError}. @@ -874,7 +875,17 @@ export class Server { } } -export namespace Server { +/** + * Options for configuring connections to Horizon servers. + * @typedef {object} Options + * @memberof module:Horizon.Server + * @property {boolean} [allowHttp] Allow connecting to http servers, default: `false`. This must be set to false in production deployments! You can also use {@link Config} class to set this globally. + * @property {string} [appName] Allow set custom header `X-App-Name`, default: `undefined`. + * @property {string} [appVersion] Allow set custom header `X-App-Version`, default: `undefined`. + * @property {string} [authToken] Allow set custom header `X-Auth-Token`, default: `undefined`. + */ + +export namespace HorizonServer { export interface Options { allowHttp?: boolean; appName?: string; diff --git a/src/horizon/strict_receive_path_call_builder.ts b/src/horizon/strict_receive_path_call_builder.ts index a809c8296..c520246d4 100644 --- a/src/horizon/strict_receive_path_call_builder.ts +++ b/src/horizon/strict_receive_path_call_builder.ts @@ -21,9 +21,14 @@ import { ServerApi } from "./server_api"; * If a list of assets is passed as the source, horizon will find any payment * paths from those source assets to the desired destination asset. * - * Do not create this object directly, use {@link Server#strictReceivePaths}. - * @see [Find Payment Paths](https://developers.stellar.org/api/aggregations/paths/) + * Do not create this object directly, use {@link Horizon.Server#strictReceivePaths}. + * + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/paths|Find Payment Paths} + * * @augments CallBuilder + * @private + * @class + * * @param {string} serverUrl Horizon server URL. * @param {string|Asset[]} source The sender's account ID or a list of Assets. Any returned path must use a source that the sender can hold. * @param {Asset} destinationAsset The destination asset. diff --git a/src/horizon/strict_send_path_call_builder.ts b/src/horizon/strict_send_path_call_builder.ts index 523e700de..ba732d1cc 100644 --- a/src/horizon/strict_send_path_call_builder.ts +++ b/src/horizon/strict_send_path_call_builder.ts @@ -20,9 +20,14 @@ import { ServerApi } from "./server_api"; * used to determine if there a given path can satisfy a payment of the desired * amount. * - * Do not create this object directly, use {@link Server#strictSendPaths}. - * @see [Find Payment Paths](https://developers.stellar.org/api/aggregations/paths/) + * Do not create this object directly, use {@link Horizon.Server#strictSendPaths}. + * + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/paths|Find Payment Paths} + * * @augments CallBuilder + * @private + * @class + * * @param {string} serverUrl Horizon server URL. * @param {Asset} sourceAsset The asset to be sent. * @param {string} sourceAmount The amount, denominated in the source asset, that any returned path should be able to satisfy. diff --git a/src/horizon/trade_aggregation_call_builder.ts b/src/horizon/trade_aggregation_call_builder.ts index f20d0a34a..01c946f15 100644 --- a/src/horizon/trade_aggregation_call_builder.ts +++ b/src/horizon/trade_aggregation_call_builder.ts @@ -16,11 +16,13 @@ const allowedResolutions = [ /** * Trade Aggregations facilitate efficient gathering of historical trade data. - * Do not create this object directly, use {@link Server#tradeAggregation}. * - * @class TradeAggregationCallBuilder + * Do not create this object directly, use {@link Horizon.Server#tradeAggregation}. + * * @augments CallBuilder + * @private * @class + * * @param {string} serverUrl serverUrl Horizon server URL. * @param {Asset} base base asset * @param {Asset} counter counter asset diff --git a/src/horizon/trades_call_builder.ts b/src/horizon/trades_call_builder.ts index afddd372c..ab30cb503 100644 --- a/src/horizon/trades_call_builder.ts +++ b/src/horizon/trades_call_builder.ts @@ -4,12 +4,15 @@ import { ServerApi } from "./server_api"; /** * Creates a new {@link TradesCallBuilder} pointed to server defined by serverUrl. - * Do not create this object directly, use {@link Server#trades}. * - * @class TradesCallBuilder + * Do not create this object directly, use {@link Horizon.Server#trades}. + * + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/trades|Trades} + * * @augments CallBuilder + * @private * @class - * @see [Trades](https://developers.stellar.org/api/resources/trades/) + * * @param {string} serverUrl serverUrl Horizon server URL. */ export class TradesCallBuilder extends CallBuilder< @@ -66,7 +69,7 @@ export class TradesCallBuilder extends CallBuilder< /** * Filter trades for a specific account - * @see [Trades for Account](https://developers.stellar.org/api/resources/accounts/trades/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-trades-by-account-id|Trades for Account} * @param {string} accountId For example: `GBYTR4MC5JAX4ALGUBJD7EIKZVM7CUGWKXIUJMRSMK573XH2O7VAK3SR` * @returns {TradesCallBuilder} current TradesCallBuilder instance */ @@ -76,7 +79,7 @@ export class TradesCallBuilder extends CallBuilder< /** * Filter trades for a specific liquidity pool - * @see [Trades for Liquidity Pool](https://developers.stellar.org/api/resources/liquiditypools/trades/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-related-trades|Trades for Liquidity Pool} * @param {string} liquidityPoolId For example: `3b476aff8a406a6ec3b61d5c038009cef85f2ddfaf616822dc4fec92845149b4` * @returns {TradesCallBuilder} current TradesCallBuilder instance */ diff --git a/src/horizon/transaction_call_builder.ts b/src/horizon/transaction_call_builder.ts index 5dd24a3eb..3650c4d55 100644 --- a/src/horizon/transaction_call_builder.ts +++ b/src/horizon/transaction_call_builder.ts @@ -3,12 +3,15 @@ import { ServerApi } from "./server_api"; /** * Creates a new {@link TransactionCallBuilder} pointed to server defined by serverUrl. - * Do not create this object directly, use {@link Server#transactions}. * - * @class TransactionCallBuilder + * Do not create this object directly, use {@link Horizon.Server#transactions}. + * + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-transactions|All Transactions} + * * @augments CallBuilder - * @see [All Transactions](https://developers.stellar.org/api/resources/transactions/) + * @private * @class + * * @param {string} serverUrl Horizon server URL. */ export class TransactionCallBuilder extends CallBuilder< @@ -21,7 +24,7 @@ export class TransactionCallBuilder extends CallBuilder< /** * The transaction details endpoint provides information on a single transaction. The transaction hash provided in the hash argument specifies which transaction to load. - * @see [Transaction Details](https://developers.stellar.org/api/resources/transactions/single/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-transaction|Transaction Details} * @param {string} transactionId Transaction ID * @returns {CallBuilder} a CallBuilder instance */ @@ -37,7 +40,7 @@ export class TransactionCallBuilder extends CallBuilder< /** * This endpoint represents all transactions that affected a given account. - * @see [Transactions for Account](https://developers.stellar.org/api/resources/accounts/transactions/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-transactions-by-account-id|Transactions for Account} * @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {TransactionCallBuilder} current TransactionCallBuilder instance */ @@ -47,7 +50,7 @@ export class TransactionCallBuilder extends CallBuilder< /** * This endpoint represents all transactions that reference a given claimable_balance. - * @see [Operations for Claimable Balance](https://developers.stellar.org/api/resources/claimablebalances/transactions/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/cb-retrieve-related-transactions|Transactions for Claimable Balance} * @param {string} claimableBalanceId Claimable Balance ID * @returns {TransactionCallBuilder} this TransactionCallBuilder instance */ @@ -57,7 +60,7 @@ export class TransactionCallBuilder extends CallBuilder< /** * This endpoint represents all transactions in a given ledger. - * @see [Transactions for Ledger](https://developers.stellar.org/api/resources/ledgers/transactions/) + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-ledgers-transactions|Transactions for Ledger} * @param {number|string} sequence Ledger sequence * @returns {TransactionCallBuilder} current TransactionCallBuilder instance */ diff --git a/src/index.ts b/src/index.ts index 1147a414a..813ce6fc1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -22,9 +22,8 @@ export * as Horizon from './horizon'; * `/rpc` entrypoint, if your version of Node and your TypeScript configuration * allow it: * - * ```ts + * @example * import { Server } from '@stellar/stellar-sdk/rpc'; - * ``` */ export * as rpc from './rpc'; @@ -39,9 +38,9 @@ export * as SorobanRpc from './rpc'; * entrypoint, if your version of Node and your TypeScript configuration allow * it: * - * ```ts + * @example * import { Client } from '@stellar/stellar-sdk/contract'; - * ``` + * @private */ export * as contract from './contract' diff --git a/src/rpc/api.ts b/src/rpc/api.ts index 8d65781c4..09a027b9a 100644 --- a/src/rpc/api.ts +++ b/src/rpc/api.ts @@ -1,7 +1,6 @@ import { Contract, SorobanDataBuilder, xdr } from '@stellar/stellar-base'; /* tslint:disable-next-line:no-namespace */ -/** @namespace Api */ export namespace Api { export interface Cost { diff --git a/src/rpc/index.ts b/src/rpc/index.ts index 99ee2ba2a..8564852bf 100644 --- a/src/rpc/index.ts +++ b/src/rpc/index.ts @@ -1,3 +1,5 @@ +/** @module rpc */ + // tslint:disable-next-line: no-reference /// @@ -5,7 +7,7 @@ export * from "./api"; // soroban-client classes to expose -export { Server, Durability } from "./server"; +export { RpcServer as Server, Durability } from "./server"; export { default as AxiosClient } from "./axios"; export { parseRawSimulation, parseRawEvents } from "./parsers"; export * from "./transaction"; diff --git a/src/rpc/jsonrpc.ts b/src/rpc/jsonrpc.ts index 24b3375f4..38662e569 100644 --- a/src/rpc/jsonrpc.ts +++ b/src/rpc/jsonrpc.ts @@ -36,7 +36,15 @@ function hasOwnProperty( return obj.hasOwnProperty(prop); } -/** Sends the jsonrpc 'params' as a single 'param' object (no array support). */ +/** + * Sends the jsonrpc 'params' as a single 'param' object (no array support). + * + * @param {string} url URL to the RPC instance + * @param {string} method RPC method name that should be called + * @param {(any | null)} [param=null] params that should be supplied to the method + * @returns {Promise} + * @private + */ export async function postObject( url: string, method: string, @@ -54,4 +62,4 @@ export async function postObject( } else { return response.data?.result; } -} \ No newline at end of file +} diff --git a/src/rpc/parsers.ts b/src/rpc/parsers.ts index ec590d719..c45a8cec6 100644 --- a/src/rpc/parsers.ts +++ b/src/rpc/parsers.ts @@ -1,16 +1,24 @@ import { xdr, Contract, SorobanDataBuilder } from '@stellar/stellar-base'; import { Api } from './api'; +/** + * Parse the response from invoking the `submitTransaction` method of a Soroban RPC server. + * @memberof module:rpc + * @private + * + * @param {Api.RawSendTransactionResponse} raw the raw `submitTransaction` response from the Soroban RPC server to parse + * @returns {Api.SendTransactionResponse} transaction response parsed from the Soroban RPC server's response + */ export function parseRawSendTransaction( - r: Api.RawSendTransactionResponse + raw: Api.RawSendTransactionResponse ): Api.SendTransactionResponse { - const { errorResultXdr, diagnosticEventsXdr } = r; - delete r.errorResultXdr; - delete r.diagnosticEventsXdr; + const { errorResultXdr, diagnosticEventsXdr } = raw; + delete raw.errorResultXdr; + delete raw.diagnosticEventsXdr; if (errorResultXdr) { return { - ...r, + ...raw, ...( diagnosticEventsXdr !== undefined && diagnosticEventsXdr.length > 0 && { @@ -23,7 +31,7 @@ export function parseRawSendTransaction( }; } - return { ...r } as Api.BaseSendTransactionResponse; + return { ...raw } as Api.BaseSendTransactionResponse; } export function parseTransactionInfo(raw: Api.RawTransactionInfo | Api.RawGetTransactionResponse): Omit { @@ -60,12 +68,19 @@ export function parseRawTransactions( }; } +/** + * Parse and return the retrieved events, if any, from a raw response from a Soroban RPC server. + * @memberof module:rpc + * + * @param {Api.RawGetEventsResponse} raw the raw `getEvents` response from the Soroban RPC server to parse + * @returns {Api.GetEventsResponse} events parsed from the Soroban RPC server's response + */ export function parseRawEvents( - r: Api.RawGetEventsResponse + raw: Api.RawGetEventsResponse ): Api.GetEventsResponse { return { - latestLedger: r.latestLedger, - events: (r.events ?? []).map((evt) => { + latestLedger: raw.latestLedger, + events: (raw.events ?? []).map((evt) => { const clone: Omit = { ...evt }; delete (clone as any).contractId; // `as any` hack because contractId field isn't optional @@ -80,6 +95,14 @@ export function parseRawEvents( }; } +/** + * Parse and return the retrieved ledger entries, if any, from a raw response from a Soroban RPC server. + * @memberof module:rpc + * @private + * + * @param {Api.RawGetLedgerEntriesResponse} raw he raw `getLedgerEntries` response from the Soroban RPC server to parse + * @returns {Api.GetLedgerEntriesResponse} ledger entries parsed from the Soroban RPC server's response + */ export function parseRawLedgerEntries( raw: Api.RawGetLedgerEntriesResponse ): Api.GetLedgerEntriesResponse { @@ -104,6 +127,15 @@ export function parseRawLedgerEntries( }; } +/** + * Parse whether or not the transaction simulation was successful, returning the relevant response. + * @memberof module:rpc + * @private + * + * @param {Api.RawSimulateTransactionResponse} sim a raw response from the `simulateTransaction` method of the Soroban RPC server to parse + * @param {Api.BaseSimulateTransactionResponse} partial a partially built simulate transaction response that will be used to build the return response + * @returns {Api.SimulateTransactionRestoreResponse | Api.SimulateTransactionSuccessResponse} Either a simulation response indicating what ledger entries should be restored, or if the simulation was successful. + */ function parseSuccessful( sim: Api.RawSimulateTransactionResponse, partial: Api.BaseSimulateTransactionResponse @@ -160,16 +192,13 @@ function parseSuccessful( } /** - * Converts a raw response schema into one with parsed XDR fields and a - * simplified interface. - * Warning: This API is only exported for testing purposes and should not be - * relied on or considered "stable". + * Converts a raw response schema into one with parsed XDR fields and a simplified interface. + * @warning This API is only exported for testing purposes and should not be relied on or considered "stable". + * @memberof module:rpc * - * @param {Api.SimulateTransactionResponse|Api.RawSimulateTransactionResponse} sim the raw response schema (parsed ones are allowed, best-effort + * @param {Api.SimulateTransactionResponse | Api.RawSimulateTransactionResponse} sim the raw response schema (parsed ones are allowed, best-effort * detected, and returned untouched) - * - * @returns the original parameter (if already parsed), parsed otherwise - * + * @returns {Api.SimulateTransactionResponse} the original parameter (if already parsed), parsed otherwise */ export function parseRawSimulation( sim: diff --git a/src/rpc/server.ts b/src/rpc/server.ts index 395a2cc79..982154b9c 100644 --- a/src/rpc/server.ts +++ b/src/rpc/server.ts @@ -31,16 +31,51 @@ import { parseTransactionInfo, } from './parsers'; +/** + * Default transaction submission timeout for RPC requests, in milliseconds + * @constant {number} + * @default 60000 + * @memberof module:rpc.Server + */ export const SUBMIT_TRANSACTION_TIMEOUT = 60 * 1000; -/** Specifies the durability namespace of contract-related ledger entries. */ +/** + * Specifies the durability namespace of contract-related ledger entries. + * @enum {('temporary' | 'persistent')} + * @memberof module:rpc + * + * @see {@link https://developers.stellar.org/docs/learn/smart-contract-internals/state-archival | State Archival docs} + * @see {@link https://docs.rs/soroban-sdk/latest/soroban_sdk/storage/struct.Storage.html | Rust SDK Storage docs} + */ export enum Durability { Temporary = 'temporary', Persistent = 'persistent' } -export namespace Server { - /** Describes the complex filter combinations available for event queries. */ +/** + * @typedef {object} GetEventsRequest Describes the complex filter combinations available for event queries. + * @property {Array.} filters Filters to use when querying events from the RPC server. + * @property {number} [startLedger] Ledger number (inclusive) to begin querying events. + * @property {string} [cursor] Page cursor (exclusive) to begin querying events. + * @property {number} [limit=100] The maximum number of events that should be returned in the RPC response. + * @memberof module:rpc.Server + */ + +/** + * @typedef {object} ResourceLeeway Describes additional resource leeways for transaction simulation. + * @property {number} cpuInstructions Simulate the transaction with more CPU instructions available. + * @memberof module:rpc.Server + */ + +/** + * @typedef {object} Options Options for configuring connections to RPC servers. + * @property {boolean} [allowHttp=false] Allow connecting to http servers, default: `false`. This must be set to false in production deployments! + * @property {number} [timeout=0] Allow a timeout, default: 0. Allows user to avoid nasty lag. You can also use {@link Config} class to set this globally. + * @property {Record} [headers] Additional headers that should be added to any requests to the RPC server. + * @memberof module:rpc.Server + */ + +export namespace RpcServer { export interface GetEventsRequest { filters: Api.EventFilter[]; startLedger?: number; // either this or cursor @@ -49,7 +84,6 @@ export namespace Server { limit?: number; } - /** Describes additional resource leeways for transaction simulation. */ export interface ResourceLeeway { cpuInstructions: number; } @@ -98,23 +132,26 @@ function findCreatedAccountSequenceInTransactionMeta( * Handles the network connection to a Soroban RPC instance, exposing an * interface for requests to that instance. * - * @class + * @alias module:rpc.Server + * @memberof module:rpc * - * @param {string} serverURL Soroban-RPC Server URL (ex. - * `http://localhost:8000/soroban/rpc`). - * @param {object} [opts] Options object - * @param {boolean} [opts.allowHttp] allows connecting to insecure http servers + * @param {string} serverURL Soroban-RPC Server URL (ex. `http://localhost:8000/soroban/rpc`). + * @param {module:rpc.Server.Options} [opts] Options object + * @param {boolean} [opts.allowHttp] Allows connecting to insecure http servers * (default: `false`). This must be set to false in production deployments! * You can also use {@link Config} class to set this globally. - * @param {Record} [opts.headers] allows setting custom headers + * @param {Record} [opts.headers] Allows setting custom headers * - * @see https://soroban.stellar.org/api/methods + * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods | API reference docs} */ -export class Server { - /** Soroban RPC Server URL (ex. `http://localhost:8000/soroban/rpc`). */ +export class RpcServer { public readonly serverURL: URI; - constructor(serverURL: string, opts: Server.Options = {}) { + constructor(serverURL: string, opts: RpcServer.Options = {}) { + /** + * RPC Server URL (ex. `http://localhost:8000/soroban/rpc`). + * @member {URI} + */ this.serverURL = URI(serverURL); if (opts.headers && Object.keys(opts.headers).length !== 0) { @@ -138,12 +175,12 @@ export class Server { * Needed to get the current sequence number for the account so you can build * a successful transaction with {@link TransactionBuilder}. * - * @param {string} address - The public address of the account to load. + * @param {string} address The public address of the account to load. + * @returns {Promise} A promise which resolves to the {@link Account} + * object with a populated sequence number * - * @returns {Promise} a promise to the {@link Account} object with - * a populated sequence number + * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs} * - * @see https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgerEntries * @example * const accountId = "GBZC6Y2Y7Q3ZQ2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4"; * server.getAccount(accountId).then((account) => { @@ -173,11 +210,12 @@ export class Server { /** * General node health check. * - * @returns {Promise} a promise to the - * {@link Api.GetHealthResponse} object with the status of the - * server (e.g. "healthy"). + * @returns {Promise} A promise which resolves to the + * {@link Api.GetHealthResponse} object with the status of the + * server (e.g. "healthy"). + * + * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getHealth | getLedgerEntries docs} * - * @see https://developers.stellar.org/docs/data/rpc/api-reference/methods/getHealth * @example * server.getHealth().then((health) => { * console.log("status:", health.status); @@ -196,21 +234,22 @@ export class Server { * * Allows you to directly inspect the current state of a contract. This is a * backup way to access your contract data which may not be available via - * events or {@link Server.simulateTransaction}. - * Warning: If the data entry in question is a 'temporary' entry, it's - * entirely possible that it has expired out of existence. + * events or {@link module:rpc.Server#simulateTransaction}. * - * @param {string|Address|Contract} contract the contract ID containing the + * @param {string|Address|Contract} contract The contract ID containing the * data to load as a strkey (`C...` form), a {@link Contract}, or an * {@link Address} instance - * @param {xdr.ScVal} key the key of the contract data to load - * @param {Durability} [durability=Durability.Persistent] the "durability + * @param {xdr.ScVal} key The key of the contract data to load + * @param {module:rpc.Durability} [durability=Durability.Persistent] The "durability * keyspace" that this ledger key belongs to, which is either 'temporary' - * or 'persistent' (the default), see {@link Durability}. + * or 'persistent' (the default), see {@link module:rpc.Durability}. + * @returns {Promise} The current data value + * + * @warning If the data entry in question is a 'temporary' entry, it's + * entirely possible that it has expired out of existence. * - * @returns {Promise} the current data value + * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs} * - * @see https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgerEntries * @example * const contractId = "CCJZ5DGASBWQXR5MPFCJXMBI333XE5U3FSJTNQU7RIKE3P5GN2K2WYD5"; * const key = xdr.ScVal.scvSymbol("counter"); @@ -287,13 +326,10 @@ export class Server { * deployed on the Soroban network. The WASM bytecode represents the executable * code of the contract. * - * @param {string} contractId the contract ID containing the - * WASM bytecode to retrieve - * - * @returns {Promise} a Buffer containing the WASM bytecode - * + * @param {string} contractId The contract ID containing the WASM bytecode to retrieve + * @returns {Promise} A Buffer containing the WASM bytecode * @throws {Error} If the contract or its associated WASM bytecode cannot be - * found on the network. + * found on the network. * * @example * const contractId = "CCJZ5DGASBWQXR5MPFCJXMBI333XE5U3FSJTNQU7RIKE3P5GN2K2WYD5"; @@ -331,12 +367,10 @@ export class Server { * deployed on the Soroban network using the contract's WASM hash. The WASM bytecode * represents the executable code of the contract. * - * @param {Buffer} wasmHash the WASM hash of the contract - * - * @returns {Promise} a Buffer containing the WASM bytecode - * + * @param {Buffer} wasmHash The WASM hash of the contract + * @returns {Promise} A Buffer containing the WASM bytecode * @throws {Error} If the contract or its associated WASM bytecode cannot be - * found on the network. + * found on the network. * * @example * const wasmHash = Buffer.from("..."); @@ -379,13 +413,12 @@ export class Server { * {@link xdr.LedgerKeyContractCode} ledger entry key (or see * {@link Contract.getFootprint}). * - * @param {xdr.ScVal[]} keys one or more ledger entry keys to load - * - * @returns {Promise} the current - * on-chain values for the given ledger keys + * @param {xdr.ScVal[]} keys One or more ledger entry keys to load + * @returns {Promise} The current on-chain + * values for the given ledger keys * - * @see Server._getLedgerEntries - * @see https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgerEntries + * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs} + * @see RpcServer._getLedgerEntries * @example * const contractId = "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM"; * const key = xdr.LedgerKey.contractData(new xdr.LedgerKeyContractData({ @@ -426,12 +459,12 @@ export class Server { * After submitting a transaction, clients should poll this to tell when the * transaction has completed. * - * @param {string} hash hex-encoded hash of the transaction to check - * - * @returns {Promise} the status, + * @param {string} hash Hex-encoded hash of the transaction to check + * @returns {Promise} The status, * result, and other details about the transaction * - * @see https://developers.stellar.org/docs/data/rpc/api-reference/methods/getTransaction + * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getTransaction | getTransaction docs} + * * @example * const transactionHash = "c4515e3bdc0897f21cc5dbec8c82cf0a936d4741cb74a8e158eb51b9fb00411a"; * server.getTransaction(transactionHash).then((tx) => { @@ -515,18 +548,19 @@ export class Server { /** * Fetch all events that match a given set of filters. * - * The given filters (see {@link Api.EventFilter} for detailed fields) - * are combined only in a logical OR fashion, and all of the fields in each - * filter are optional. + * The given filters (see {@link module:rpc.Api.EventFilter | Api.EventFilter} + * for detailed fields) are combined only in a logical OR fashion, and all of + * the fields in each filter are optional. * * To page through events, use the `pagingToken` field on the relevant * {@link Api.EventResponse} object to set the `cursor` parameter. * - * @param {Server.GetEventsRequest} request event filters - * @returns {Promise} a paginatable set of the - * events matching the given event filters + * @param {module:rpc.Server.GetEventsRequest} request Event filters + * @returns {Promise} A paginatable set of the events + * matching the given event filters + * + * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getEvents | getEvents docs} * - * @see https://developers.stellar.org/docs/data/rpc/api-reference/methods/getEvents * @example * server.getEvents({ * startLedger: 1000, @@ -553,14 +587,14 @@ export class Server { */ // eslint-disable-next-line require-await public async getEvents( - request: Server.GetEventsRequest + request: RpcServer.GetEventsRequest ): Promise { return this._getEvents(request).then(parseRawEvents); } // eslint-disable-next-line require-await public async _getEvents( - request: Server.GetEventsRequest + request: RpcServer.GetEventsRequest ): Promise { return jsonrpc.postObject(this.serverURL.toString(), 'getEvents', { filters: request.filters ?? [], @@ -580,10 +614,11 @@ export class Server { /** * Fetch metadata about the network this Soroban RPC server is connected to. * - * @returns {Promise} metadata about the - * current network this RPC server is connected to + * @returns {Promise} Metadata about the current + * network this RPC server is connected to + * + * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getNetwork | getNetwork docs} * - * @see https://developers.stellar.org/docs/data/rpc/api-reference/methods/getNetwork * @example * server.getNetwork().then((network) => { * console.log("friendbotUrl:", network.friendbotUrl); @@ -603,7 +638,8 @@ export class Server { * @returns {Promise} metadata about the * latest ledger on the network that this RPC server is connected to * - * @see https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLatestLedger + * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLatestLedger | getLatestLedger docs} + * * @example * server.getLatestLedger().then((response) => { * console.log("hash:", response.id); @@ -625,15 +661,14 @@ export class Server { * {@link xdr.InvokeHostFunctionOp}, {@link xdr.ExtendFootprintTTLOp}, or * {@link xdr.RestoreFootprintOp}). Any provided footprint or auth * information will be ignored. - * - * @returns {Promise} an object with the + * @returns {Promise} An object with the * cost, footprint, result/auth requirements (if applicable), and error of * the transaction * - * @see https://developers.stellar.org/docs/glossary/transactions/ - * @see https://developers.stellar.org/docs/data/rpc/api-reference/methods/simulateTransaction - * @see Server.prepareTransaction - * @see assembleTransaction + * @see {@link https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/operations-and-transactions | transaction docs} + * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/simulateTransaction | simulateTransaction docs} + * @see module:rpc.Server#prepareTransaction + * @see module:rpc.assembleTransaction * * @example * const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE'; @@ -661,7 +696,7 @@ export class Server { // eslint-disable-next-line require-await public async simulateTransaction( tx: Transaction | FeeBumpTransaction, - addlResources?: Server.ResourceLeeway + addlResources?: RpcServer.ResourceLeeway ): Promise { return this._simulateTransaction(tx, addlResources) .then(parseRawSimulation); @@ -670,7 +705,7 @@ export class Server { // eslint-disable-next-line require-await public async _simulateTransaction( transaction: Transaction | FeeBumpTransaction, - addlResources?: Server.ResourceLeeway + addlResources?: RpcServer.ResourceLeeway ): Promise { return jsonrpc.postObject( this.serverURL.toString(), @@ -695,13 +730,14 @@ export class Server { * * The returned transaction will also have an updated fee that is the sum of * fee set on incoming transaction with the contract resource fees estimated - * from simulation. It is adviseable to check the fee on returned transaction + * from simulation. It is advisable to check the fee on returned transaction * and validate or take appropriate measures for interaction with user to * confirm it is acceptable. * - * You can call the {@link Server.simulateTransaction} method directly first - * if you want to inspect estimated fees for a given transaction in detail - * first, then re-assemble it manually or via {@link assembleTransaction}. + * You can call the {@link module:rpc.Server#simulateTransaction} method + * directly first if you want to inspect estimated fees for a given + * transaction in detail first, then re-assemble it manually or via + * {@link module:rpc.assembleTransaction}. * * @param {Transaction | FeeBumpTransaction} tx the transaction to * prepare. It should include exactly one operation, which must be one of @@ -713,17 +749,17 @@ export class Server { * from the simulation. In other words, if you include auth entries, you * don't care about the auth returned from the simulation. Other fields * (footprint, etc.) will be filled as normal. - * - * @returns {Promise} a copy of the + * @returns {Promise} A copy of the * transaction with the expected authorizations (in the case of * invocation), resources, and ledger footprints added. The transaction fee * will also automatically be padded with the contract's minimum resource * fees discovered from the simulation. - * - * @see assembleTransaction - * @see https://developers.stellar.org/docs/data/rpc/api-reference/methods/simulateTransaction * @throws {jsonrpc.Error|Error|Api.SimulateTransactionErrorResponse} - * if simulation fails + * If simulation fails + * + * @see module:rpc.assembleTransaction + * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/simulateTransaction | simulateTransaction docs} + * * @example * const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE'; * const contract = new StellarSdk.Contract(contractId); @@ -769,15 +805,16 @@ export class Server { * * Unlike Horizon, Soroban RPC does not wait for transaction completion. It * simply validates the transaction and enqueues it. Clients should call - * {@link Server.getTransactionStatus} to learn about transaction + * {@link module:rpc.Server#getTransaction} to learn about transaction * success/failure. * * @param {Transaction | FeeBumpTransaction} transaction to submit * @returns {Promise} the * transaction id, status, and any error if available * - * @see https://developers.stellar.org/docs/glossary/transactions/ - * @see https://developers.stellar.org/docs/data/rpc/api-reference/methods/sendTransaction + * @see {@link https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/operations-and-transactions | transaction docs} + * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/sendTransaction | sendTransaction docs} + * * @example * const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE'; * const contract = new StellarSdk.Contract(contractId); @@ -826,25 +863,23 @@ export class Server { } /** - * Fund a new account using the network's friendbot faucet, if any. + * Fund a new account using the network's Friendbot faucet, if any. * - * @param {string | Account} address the address or account instance that we - * want to create and fund with friendbot - * @param {string} [friendbotUrl] optionally, an explicit address for + * @param {string | Account} address The address or account instance that we + * want to create and fund with Friendbot + * @param {string} [friendbotUrl] Optionally, an explicit address for * friendbot (by default: this calls the Soroban RPC - * {@link Server.getNetwork} method to try to discover this network's - * Friendbot url). - * - * @returns {Promise} an {@link Account} object for the created + * {@link module:rpc.Server#getNetwork | getNetwork} method to try to + * discover this network's Friendbot url). + * @returns {Promise} An {@link Account} object for the created * account, or the existing account if it's already funded with the * populated sequence number (note that the account will not be "topped * off" if it already exists) + * @throws If Friendbot is not configured on this network or request failure * - * @throws if Friendbot is not configured on this network or request failure + * @see {@link https://developers.stellar.org/docs/learn/networks#friendbot | Friendbot docs} + * @see {@link module:Friendbot.Api.Response} * - * @see - * https://developers.stellar.org/docs/fundamentals-and-concepts/testnet-and-pubnet#friendbot - * @see Friendbot.Response * @example * server * .requestAirdrop("GBZC6Y2Y7Q3ZQ2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4") diff --git a/src/rpc/transaction.ts b/src/rpc/transaction.ts index 8ec79d252..6e7ec5250 100644 --- a/src/rpc/transaction.ts +++ b/src/rpc/transaction.ts @@ -7,7 +7,6 @@ import { import { Api } from './api'; import { parseRawSimulation } from './parsers'; -import type { Server } from './server'; function isSorobanTransaction(tx: Transaction): boolean { if (tx.operations.length !== 1) { @@ -29,18 +28,20 @@ function isSorobanTransaction(tx: Transaction): boolean { /** * Combines the given raw transaction alongside the simulation results. * If the given transaction already has authorization entries in a host - * function invocation (see {@link Operation.invokeHostFunction}), **the - * simulation entries are ignored**. + * function invocation (see {@link Operation.invokeHostFunction}), **the + * simulation entries are ignored**. * - * @param raw the initial transaction, w/o simulation applied - * @param simulation the Soroban RPC simulation result (see - * {@link Server.simulateTransaction}) + * If the given transaction already has authorization entries in a host function + * invocation (see {@link Operation.invokeHostFunction}), **the simulation + * entries are ignored**. * - * @returns a new, cloned transaction with the proper auth and resource (fee, - * footprint) simulation data applied + * @param {Transaction|FeeBumpTransaction} raw the initial transaction, w/o simulation applied + * @param {Api.SimulateTransactionResponse|Api.RawSimulateTransactionResponse} simulation the Soroban RPC simulation result (see {@link module:rpc.Server#simulateTransaction}) + * @returns {TransactionBuilder} a new, cloned transaction with the proper auth and resource (fee, footprint) simulation data applied * - * @see {Server.simulateTransaction} - * @see {Server.prepareTransaction} + * @memberof module:rpc + * @see {@link module:rpc.Server#simulateTransaction} + * @see {@link module:rpc.Server#prepareTransaction} */ export function assembleTransaction( raw: Transaction | FeeBumpTransaction, diff --git a/src/stellartoml/index.ts b/src/stellartoml/index.ts index d9c8af037..315d558fe 100644 --- a/src/stellartoml/index.ts +++ b/src/stellartoml/index.ts @@ -4,32 +4,43 @@ import { httpClient } from "../http-client"; import { Config } from "../config"; -/** the maximum size of stellar.toml file */ +/** @module StellarToml */ + +/** + * The maximum size of stellar.toml file, in bytes + * @constant {number} + * @default 102400 + */ export const STELLAR_TOML_MAX_SIZE = 100 * 1024; // axios timeout doesn't catch missing urls, e.g. those with no response // so we use the axios cancel token to ensure the timeout const CancelToken = httpClient.CancelToken; -/** Resolver allows resolving `stellar.toml` files. */ +/** + * Resolver allows resolving `stellar.toml` files. + * @memberof module:StellarToml + * @hideconstructor + */ export class Resolver { /** * Returns a parsed `stellar.toml` file for a given domain. - * ```js - * StellarSdk.Resolver.resolve('acme.com') + * @see {@link https://developers.stellar.org/docs/tokens/publishing-asset-info | Stellar.toml doc} + * + * @param {string} domain Domain to get stellar.toml file for + * @param {object} [opts] Options object + * @param {boolean} [opts.allowHttp=false] - Allow connecting to http servers. This must be set to false in production deployments! + * @param {number} [opts.timeout=0] - Allow a timeout. Allows user to avoid nasty lag due to TOML resolve issue. + * @returns {Promise} A `Promise` that resolves to the parsed stellar.toml object + * + * @example + * StellarSdk.StellarToml.Resolver.resolve('acme.com') * .then(stellarToml => { * // stellarToml in an object representing domain stellar.toml file. * }) * .catch(error => { * // stellar.toml does not exist or is invalid * }); - * ``` - * @see Stellar.toml doc - * @param {string} domain Domain to get stellar.toml file for - * @param {object} [opts] Options object - * @param {boolean} [opts.allowHttp] - Allow connecting to http servers, default: `false`. This must be set to false in production deployments! - * @param {number} [opts.timeout] - Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue. - * @returns {Promise} A `Promise` that resolves to the parsed stellar.toml object */ // eslint-disable-next-line require-await public static async resolve( diff --git a/src/utils.ts b/src/utils.ts index 3186a51ff..9a2a46b3d 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,13 +1,20 @@ import { Transaction } from "@stellar/stellar-base"; +/** + * Miscellaneous utilities. + * + * @hideconstructor + */ export class Utils { /** - * Verifies if the current date is within the transaction's timebonds + * Verifies if the current date is within the transaction's timebounds + * + * @param {Transaction} transaction The transaction whose timebounds will be validated. + * @param {number} [gracePeriod=0] An additional window of time that should be considered valid on either end of the transaction's time range. + * + * @returns {boolean} Returns true if the current time is within the transaction's [minTime, maxTime] range. * * @static - * @function - * @param {Transaction} transaction the transaction whose timebonds will be validated. - * @returns {boolean} returns true if the current time is within the transaction's [minTime, maxTime] range. */ static validateTimebounds( transaction: Transaction, diff --git a/src/webauth/errors.ts b/src/webauth/errors.ts index 4126ea6e0..6a97bbdd9 100644 --- a/src/webauth/errors.ts +++ b/src/webauth/errors.ts @@ -1,12 +1,20 @@ /* eslint-disable no-proto */ +/** + * InvalidChallengeError is raised when a challenge transaction does not meet + * the requirements for a SEP-10 challenge transaction (for example, a non-zero + * sequence number). + * @memberof module:WebAuth + * @category Errors + * + * @param {string} message Human-readable error message. + */ export class InvalidChallengeError extends Error { - public __proto__: InvalidChallengeError; - - constructor(message: string) { - const trueProto = new.target.prototype; - super(message); - this.__proto__ = trueProto; - this.constructor = InvalidChallengeError; - this.name = "InvalidChallengeError"; - } - } \ No newline at end of file + public __proto__: InvalidChallengeError; + constructor(message: string) { + const trueProto = new.target.prototype; + super(message); + this.__proto__ = trueProto; + this.constructor = InvalidChallengeError; + this.name = "InvalidChallengeError"; + } +} diff --git a/src/webauth/index.ts b/src/webauth/index.ts index b6a43f27f..e63282485 100644 --- a/src/webauth/index.ts +++ b/src/webauth/index.ts @@ -1,2 +1,2 @@ export * from './utils'; -export { InvalidChallengeError } from './errors'; \ No newline at end of file +export { InvalidChallengeError } from './errors'; diff --git a/src/webauth/utils.ts b/src/webauth/utils.ts index 163f419a2..01c289471 100644 --- a/src/webauth/utils.ts +++ b/src/webauth/utils.ts @@ -1,3 +1,9 @@ +/** + * Stellar Web Authentication + * @module WebAuth + * @see {@link https://stellar.org/protocol-10 | SEP-10 Specification} + */ + import randomBytes from "randombytes"; import { Account, @@ -18,11 +24,8 @@ import { InvalidChallengeError } from "./errors"; import { ServerApi } from "../horizon/server_api"; /** - * Returns a valid [SEP-10](https://stellar.org/protocol/sep-10) challenge - * transaction which you can use for Stellar Web Authentication. - * - * @function - * @memberof WebAuth + * Returns a valid {@link https://stellar.org/protocol/sep-10 | SEP-10} + * challenge transaction which you can use for Stellar Web Authentication. * * @param {Keypair} serverKeypair Keypair for server's signing account. * @param {string} clientAccountID The stellar account (G...) or muxed account @@ -43,13 +46,17 @@ import { ServerApi } from "../horizon/server_api"; * @param {string} [clientSigningKey] The public key assigned to the SIGNING_KEY * attribute specified on the stellar.toml hosted on the client domain. Only * necessary when the 'client_domain' parameter is passed. - * * @returns {string} A base64 encoded string of the raw TransactionEnvelope xdr * struct for the transaction. - * @see [SEP-10: Stellar Web Auth](https://stellar.org/protocol/sep-10). + * @throws {Error} Will throw if `clientAccountID is a muxed account, and `memo` + * is present. + * @throws {Error} Will throw if `clientDomain` is provided, but + * `clientSigningKey` is missing + * + * @see {@link https://stellar.org/protocol/sep-10 | SEP-10: Stellar Web Auth} * * @example - * import { Keypair, Networks, WebAuth } from 'stellar-sdk' + * import { Keypair, Networks, WebAuth } from 'stellar-sdk' * * let serverKeyPair = Keypair.fromSecret("server-secret") * let challenge = WebAuth.buildChallengeTx( @@ -134,7 +141,22 @@ export function buildChallengeTx( } /** - * Reads a SEP 10 challenge transaction and returns the decoded transaction and + * A parsed and validated challenge transaction, and some of its constituent details. + * @memberof module:WebAuth + */ +export type ChallengeTxDetails = { + /** The challenge transaction. */ + tx: Transaction; + /** The Stellar public key (master key) used to sign the Manage Data operation. */ + clientAccountId: string; + /** The matched home domain. */ + matchedHomeDomain: string; + /** The memo attached to the transaction, which will be null if not present */ + memo?: string; +} + +/** + * Reads a SEP-10 challenge transaction and returns the decoded transaction and * client account ID contained within. * * It also verifies that the transaction has been signed by the server. @@ -142,29 +164,26 @@ export function buildChallengeTx( * It does not verify that the transaction has been signed by the client or that * any signatures other than the server's on the transaction are valid. Use one * of the following functions to completely verify the transaction: - * - {@link verifyChallengeTxThreshold} - * - {@link verifyChallengeTxSigners} * - * @function - * @memberof WebAuth + * - {@link module:WebAuth~verifyChallengeTxThreshold} + * - {@link module:WebAuth~verifyChallengeTxSigners} * * @param {string} challengeTx SEP0010 challenge transaction in base64. * @param {string} serverAccountID The server's stellar account (public key). * @param {string} networkPassphrase The network passphrase, e.g.: 'Test SDF * Network ; September 2015' (see {@link Networks}) - * @param {string|string[]} [homeDomains] The home domain that is expected to be - * included in the first Manage Data operation's string key. If an array is - * provided, one of the domain names in the array must match. + * @param {string | Array.} homeDomains The home domain that is expected + * to be included in the first Manage Data operation's string key. If an + * array is provided, one of the domain names in the array must match. * @param {string} webAuthDomain The home domain that is expected to be included * as the value of the Manage Data operation with the 'web_auth_domain' key. * If no such operation is included, this parameter is not used. - * - * @returns {Transaction|string|string|string} The actual transaction and the - * stellar public key (master key) used to sign the Manage Data operation, + * @returns {module:WebAuth.ChallengeTxDetails} The actual transaction and the + * Stellar public key (master key) used to sign the Manage Data operation, * the matched home domain, and the memo attached to the transaction, which * will be null if not present. * - * @see [SEP-10: Stellar Web Auth](https://stellar.org/protocol/sep-10). + * @see {@link https://stellar.org/protocol/sep-10 | SEP-10: Stellar Web Auth} */ export function readChallengeTx( challengeTx: string, @@ -362,38 +381,39 @@ export function readChallengeTx( * ignored. * * Errors will be raised if: - * - The transaction is invalid according to {@link readChallengeTx}. + * - The transaction is invalid according to + * {@link module:WebAuth~readChallengeTx}. * - No client signatures are found on the transaction. * - One or more signatures in the transaction are not identifiable as the * server account or one of the signers provided in the arguments. * - The signatures are all valid but do not meet the threshold. * - * @function - * @memberof WebAuth - * * @param {string} challengeTx SEP0010 challenge transaction in base64. * @param {string} serverAccountID The server's stellar account (public key). * @param {string} networkPassphrase The network passphrase, e.g.: 'Test SDF * Network ; September 2015' (see {@link Networks}). * @param {number} threshold The required signatures threshold for verifying * this transaction. - * @param {ServerApi.AccountRecordSigners[]} signerSummary a map of all + * @param {Array.} signerSummary a map of all * authorized signers to their weights. It's used to validate if the * transaction signatures have met the given threshold. - * @param {string|string[]} [homeDomains] The home domain(s) that should be - * included in the first Manage Data operation's string key. Required in + * @param {string | Array.} homeDomains The home domain(s) that should + * be included in the first Manage Data operation's string key. Required in * verifyChallengeTxSigners() => readChallengeTx(). * @param {string} webAuthDomain The home domain that is expected to be included * as the value of the Manage Data operation with the 'web_auth_domain' key, * if present. Used in verifyChallengeTxSigners() => readChallengeTx(). + * @returns {Array.} The list of signers public keys that have signed + * the transaction, excluding the server account ID, given that the threshold + * was met. + * @throws {module:WebAuth.InvalidChallengeError} Will throw if the collective + * weight of the transaction's signers does not meet the necessary threshold + * to verify this transaction. * - * @returns {string[]} The list of signers public keys that have signed the - * transaction, excluding the server account ID, given that the threshold was - * met. + * @see {@link https://stellar.org/protocol/sep-10 | SEP-10: Stellar Web Auth} * - * @see [SEP-10: Stellar Web Auth](https://stellar.org/protocol/sep-10). * @example - * import { Networks, TransactionBuilder, WebAuth } from 'stellar-sdk'; + * import { Networks, TransactionBuilder, WebAuth } from 'stellar-sdk'; * * const serverKP = Keypair.random(); * const clientKP1 = Keypair.random(); @@ -490,30 +510,28 @@ export function verifyChallengeTxThreshold( * ignored. * * Errors will be raised if: - * - The transaction is invalid according to {@link readChallengeTx}. + * - The transaction is invalid according to + * {@link module:WebAuth~readChallengeTx}. * - No client signatures are found on the transaction. * - One or more signatures in the transaction are not identifiable as the * server account or one of the signers provided in the arguments. * - * @function - * @memberof WebAuth - * * @param {string} challengeTx SEP0010 challenge transaction in base64. * @param {string} serverAccountID The server's stellar account (public key). * @param {string} networkPassphrase The network passphrase, e.g.: 'Test SDF * Network ; September 2015' (see {@link Networks}). - * @param {string[]} signers The signers public keys. This list should contain - * the public keys for all signers that have signed the transaction. - * @param {string|string[]} [homeDomains] The home domain(s) that should be - * included in the first Manage Data operation's string key. Required in + * @param {Array.} signers The signers public keys. This list should + * contain the public keys for all signers that have signed the transaction. + * @param {string | Array.} [homeDomains] The home domain(s) that should + * be included in the first Manage Data operation's string key. Required in * readChallengeTx(). * @param {string} webAuthDomain The home domain that is expected to be included * as the value of the Manage Data operation with the 'web_auth_domain' key, * if present. Used in readChallengeTx(). - * @returns {string[]} The list of signers public keys that have signed the - * transaction, excluding the server account ID. + * @returns {Array.} The list of signers public keys that have signed + * the transaction, excluding the server account ID. * - * @see [SEP-10: Stellar Web Auth](https://stellar.org/protocol/sep-10). + * @see {@link https://stellar.org/protocol/sep-10|SEP-10: Stellar Web Auth} * @example * import { Networks, TransactionBuilder, WebAuth } from 'stellar-sdk'; * @@ -572,7 +590,7 @@ export function verifyChallengeTxSigners( serverKP = Keypair.fromPublicKey(serverAccountID); // can throw 'Invalid Stellar public key' } catch (err: any) { throw new Error( - `Couldn't infer keypair from the provided 'serverAccountID': ${ + `Couldn't infer keypair from the provided 'serverAccountID': ${ err.message}`, ); } @@ -684,11 +702,10 @@ export function verifyChallengeTxSigners( /** * Verifies if a transaction was signed by the given account id. * - * @function - * @memberof WebAuth - * @param {Transaction} transaction - * @param {string} accountID - * @returns {boolean}. + * @param {Transaction | FeeBumpTransaction} transaction The signed transaction. + * @param {string} accountID The signer's public key. + * @returns {boolean} Whether or not `accountID` was found to have signed the + * transaction. * * @example * let keypair = Keypair.random(); @@ -713,12 +730,10 @@ export function verifyTxSignedBy( * returning a list of non-repeated signers that were found to have signed the * given transaction. * - * @function - * @memberof WebAuth - * @param {Transaction} transaction the signed transaction. - * @param {string[]} signers The signers public keys. - * @returns {string[]} a list of signers that were found to have signed the - * transaction. + * @param {Transaction | FeeBumpTransaction} transaction The signed transaction. + * @param {Array.} signers The signer's public keys. + * @returns {Array.} A list of signers that were found to have signed + * the transaction. * * @example * let keypair1 = Keypair.random(); @@ -771,4 +786,4 @@ export function gatherTxSigners( } return Array.from(signersFound); -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 993753247..f50b454a5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -69,7 +69,7 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.4.tgz#7d2a80ce229890edcf4cc259d4d696cb4dae2fcb" integrity sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ== -"@babel/core@^7.12.3", "@babel/core@^7.23.9", "@babel/core@^7.24.9": +"@babel/core@^7.12.3", "@babel/core@^7.23.9", "@babel/core@^7.24.9", "@babel/core@^7.7.5": version "7.25.2" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.25.2.tgz#ed8eec275118d7613e77a352894cd12ded8eba77" integrity sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA== @@ -97,7 +97,7 @@ dependencies: eslint-rule-composer "^0.3.0" -"@babel/generator@^7.25.0", "@babel/generator@^7.25.6": +"@babel/generator@^7.12.11", "@babel/generator@^7.25.0", "@babel/generator@^7.25.6": version "7.25.6" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.6.tgz#0df1ad8cb32fe4d2b01d8bf437f153d19342a87c" integrity sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw== @@ -280,14 +280,7 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.14.7", "@babel/parser@^7.20.15", "@babel/parser@^7.25.0": - version "7.25.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.3.tgz#91fb126768d944966263f0657ab222a642b82065" - integrity sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw== - dependencies: - "@babel/types" "^7.25.2" - -"@babel/parser@^7.23.9", "@babel/parser@^7.25.6": +"@babel/parser@^7.14.7", "@babel/parser@^7.2.3", "@babel/parser@^7.20.15", "@babel/parser@^7.23.9", "@babel/parser@^7.25.0", "@babel/parser@^7.25.6": version "7.25.6" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.6.tgz#85660c5ef388cbbf6e3d2a694ee97a38f18afe2f" integrity sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q== @@ -1008,7 +1001,7 @@ resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== -"@babel/runtime@^7.8.4": +"@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4": version "7.25.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.6.tgz#9afc3289f7184d8d7f98b099884c26317b9264d2" integrity sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ== @@ -1024,7 +1017,7 @@ "@babel/parser" "^7.25.0" "@babel/types" "^7.25.0" -"@babel/traverse@^7.24.7", "@babel/traverse@^7.24.8", "@babel/traverse@^7.25.0", "@babel/traverse@^7.25.1", "@babel/traverse@^7.25.2", "@babel/traverse@^7.25.3", "@babel/traverse@^7.25.4": +"@babel/traverse@^7.1.6", "@babel/traverse@^7.24.7", "@babel/traverse@^7.24.8", "@babel/traverse@^7.25.0", "@babel/traverse@^7.25.1", "@babel/traverse@^7.25.2", "@babel/traverse@^7.25.3", "@babel/traverse@^7.25.4": version "7.25.6" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.6.tgz#04fad980e444f182ecf1520504941940a90fea41" integrity sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ== @@ -1037,7 +1030,7 @@ debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.6", "@babel/types@^7.4.4": +"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.6", "@babel/types@^7.4.4": version "7.25.6" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.6.tgz#893942ddb858f32ae7a004ec9d3a76b3463ef8e6" integrity sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw== @@ -1046,6 +1039,11 @@ "@babel/helper-validator-identifier" "^7.24.7" to-fast-properties "^2.0.0" +"@bcoe/v8-coverage@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + "@colors/colors@1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" @@ -1146,9 +1144,9 @@ eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" - integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== + version "4.11.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.1.tgz#a547badfc719eb3e5f4b556325e542fbe9d7a18f" + integrity sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q== "@eslint/eslintrc@^2.1.4": version "2.1.4" @@ -1165,17 +1163,17 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.57.0": - version "8.57.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" - integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== +"@eslint/js@8.57.1": + version "8.57.1" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" + integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== -"@humanwhocodes/config-array@^0.11.14": - version "0.11.14" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" - integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== +"@humanwhocodes/config-array@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" + integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== dependencies: - "@humanwhocodes/object-schema" "^2.0.2" + "@humanwhocodes/object-schema" "^2.0.3" debug "^4.3.1" minimatch "^3.0.5" @@ -1184,7 +1182,7 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.2": +"@humanwhocodes/object-schema@^2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== @@ -1269,7 +1267,7 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== @@ -1349,13 +1347,6 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== -"@sinonjs/commons@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-2.0.0.tgz#fd4ca5b063554307e8327b4564bd56d3b73924a3" - integrity sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg== - dependencies: - type-detect "4.0.8" - "@sinonjs/commons@^3.0.0", "@sinonjs/commons@^3.0.1": version "3.0.1" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" @@ -1371,13 +1362,13 @@ "@sinonjs/commons" "^3.0.1" "@sinonjs/samsam@^8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-8.0.0.tgz#0d488c91efb3fa1442e26abea81759dfc8b5ac60" - integrity sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew== + version "8.0.2" + resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-8.0.2.tgz#e4386bf668ff36c95949e55a38dc5f5892fc2689" + integrity sha512-v46t/fwnhejRSFTGqbpn9u+LQ9xJDse10gNnPgAcxgdoCDMXj/G2asWAC/8Qs+BAZDicX+MNZouXT1A7c83kVw== dependencies: - "@sinonjs/commons" "^2.0.0" + "@sinonjs/commons" "^3.0.1" lodash.get "^4.4.2" - type-detect "^4.0.8" + type-detect "^4.1.0" "@sinonjs/text-encoding@^0.7.2": version "0.7.3" @@ -1433,15 +1424,22 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== -"@types/chai@4": - version "4.3.16" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.16.tgz#b1572967f0b8b60bf3f87fe1d854a5604ea70c82" - integrity sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ== +"@types/babel-types@*", "@types/babel-types@^7.0.0": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-7.0.15.tgz#11fb1ab5a4f984d00d1c80a768f6fb8d59f96966" + integrity sha512-JUgfZHUOMbtjopxiOQaaF+Uovk5wpDqpXR+XLWiOivCWSy1FccO30lvNNpCt8geFwq8VmGT2y9OMkOpA0g5O5g== + +"@types/babylon@^6.16.2": + version "6.16.9" + resolved "https://registry.yarnpkg.com/@types/babylon/-/babylon-6.16.9.tgz#7abf03f6591a921fe3171af91433077cd2666e36" + integrity sha512-sEKyxMVEowhcr8WLfN0jJYe4gS4Z9KC2DGz0vqfC7+MXFbmvOF7jSjALC77thvAO2TLgFUPa9vDeOak+AcUrZA== + dependencies: + "@types/babel-types" "*" -"@types/chai@^4.3.19": - version "4.3.19" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.19.tgz#14519f437361d41e84102ed3fbc922ddace3e228" - integrity sha512-2hHHvQBVE2FiSK4eN0Br6snX9MtolHaTo/batnLjlGRhoQzlCL61iVpxoqO7SfFyOw+P/pwv+0zNHzKoGWz9Cw== +"@types/chai@4", "@types/chai@^4.3.19": + version "4.3.20" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.20.tgz#cb291577ed342ca92600430841a00329ba05cecc" + integrity sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ== "@types/cookie@^0.4.1": version "0.4.1" @@ -1474,16 +1472,16 @@ "@types/json-schema" "*" "@types/estree@*", "@types/estree@^1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" - integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== "@types/eventsource@^1.1.12": version "1.1.15" resolved "https://registry.yarnpkg.com/@types/eventsource/-/eventsource-1.1.15.tgz#949383d3482e20557cbecbf3b038368d94b6be27" integrity sha512-XQmGcbnxUNa06HR3VBVkc9+A2Vpi9ZyLJcdS5dwaQQ/4ZMWFO+5c90FnMUpbtMZwB/FChoYHwuVg8TvkECacTA== -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.6" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== @@ -1518,9 +1516,9 @@ integrity sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q== "@types/lodash@^4.17.7": - version "4.17.7" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.7.tgz#2f776bcb53adc9e13b2c0dfd493dfcbd7de43612" - integrity sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA== + version "4.17.9" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.9.tgz#0dc4902c229f6b8e2ac5456522104d7b1a230290" + integrity sha512-w9iWudx1XWOHW5lQRS9iKpK/XuRhnN+0T7HvdCCd802FYkT1AMTnxndJHGrNJwRoRHkslGr4S29tjm1cT7x/7w== "@types/markdown-it@^14.1.1": version "14.1.2" @@ -1540,20 +1538,27 @@ resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.8.tgz#a7eff5816e070c3b4d803f1d3cd780c4e42934a1" integrity sha512-HfMcUmy9hTMJh66VNcmeC9iVErIZJli2bszuXc6julh5YGuRb/W5OnkHjwLNYdFlMis0sY3If5SEAp+PktdJjw== -"@types/node@*", "@types/node@>=10.0.0", "@types/node@^20.14.11": - version "20.14.11" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.11.tgz#09b300423343460455043ddd4d0ded6ac579b74b" - integrity sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA== +"@types/node@*", "@types/node@>=10.0.0": + version "22.6.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.6.1.tgz#e531a45f4d78f14a8468cb9cdc29dc9602afc7ac" + integrity sha512-V48tCfcKb/e6cVUigLAaJDAILdMP0fUW6BidkPK4GpGjXcfbnoHasCZDwz3N3yVt5we2RHm4XTQCpv0KJz9zqw== dependencies: - undici-types "~5.26.4" + undici-types "~6.19.2" "@types/node@^18.19.7": - version "18.19.41" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.41.tgz#27695cf2cac63f22c202b9217c0bcf3fb192a2f0" - integrity sha512-LX84pRJ+evD2e2nrgYCHObGWkiQJ1mL+meAgbvnwk/US6vmMY7S2ygBTGV2Jw91s9vUsLSXeDEkUHZIJGLrhsg== + version "18.19.50" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.50.tgz#8652b34ee7c0e7e2004b3f08192281808d41bf5a" + integrity sha512-xonK+NRrMBRtkL1hVCc3G+uXtjh1Al4opBLjqVmipe5ZAaBYWW6cNAiBVZ1BvmkBhep698rP3UM3aRAdSALuhg== dependencies: undici-types "~5.26.4" +"@types/node@^20.14.11": + version "20.16.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.6.tgz#0bf99fcebcee68ecdc2c45b160a10a0fe5c652b8" + integrity sha512-T7PpxM/6yeDE+AdlVysT62BX6/bECZOmQAgiFg5NoBd5MQheZ3tzal7f1wvzfiEcmrcJNRi2zRr2nY2zF+0uqw== + dependencies: + undici-types "~6.19.2" + "@types/randombytes@^2.0.1": version "2.0.3" resolved "https://registry.yarnpkg.com/@types/randombytes/-/randombytes-2.0.3.tgz#c83a107ef51ae7a8611a7b964f54b21cb782bbed" @@ -1845,6 +1850,18 @@ accepts@~1.3.4: mime-types "~2.1.34" negotiator "0.6.3" +ace-builds@^1.4.13: + version "1.36.2" + resolved "https://registry.yarnpkg.com/ace-builds/-/ace-builds-1.36.2.tgz#9499bd59e839a335ac4850e74549ca8d849dc554" + integrity sha512-eqqfbGwx/GKjM/EnFu4QtQ+d2NNBu84MGgxoG8R5iyFpcVeQ4p9YlTL+ZzdEJqhdkASqoqOxCSNNGyB6lvMm+A== + +acorn-globals@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" + integrity sha512-uWttZCk96+7itPxK8xCzY86PnxKTMrReKDqrHzv42VQY0K30PUO8WY13WMOuI+cOdX4EIdzdvQ8k6jkuGRFMYw== + dependencies: + acorn "^4.0.4" + acorn-import-attributes@^1.9.5: version "1.9.5" resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef" @@ -1862,6 +1879,16 @@ acorn-walk@^8.1.1: dependencies: acorn "^8.11.0" +acorn@^3.1.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + integrity sha512-OLUyIIZ7mF5oaAUT1w0TFqQS81q3saT46x8t7ukpPjMNk+nbs4ZHhs7ToV8EWnLYLepjETXd4XaCE4uxkMeqUw== + +acorn@^4.0.4, acorn@~4.0.2: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + integrity sha512-fu2ygVGuMmlzG8ZeRJ0bvR41nsAkxxhbyk8bZ1SS521Z7vmgJFTQQlfz/Mp/nJexGBz+v8sC9bM6+lNgskt4Ug== + acorn@^8.11.0, acorn@^8.12.0, acorn@^8.4.1, acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0: version "8.12.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" @@ -1914,6 +1941,15 @@ ajv@^8.0.0, ajv@^8.9.0: json-schema-traverse "^1.0.0" require-from-string "^2.0.2" +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + integrity sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg== + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + ansi-colors@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" @@ -2096,7 +2132,7 @@ arraybuffer.prototype.slice@^1.0.3: is-array-buffer "^3.0.4" is-shared-array-buffer "^1.0.2" -asap@^2.0.0: +asap@^2.0.0, asap@~2.0.3: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== @@ -2138,6 +2174,18 @@ assertion-error@^1.1.0: resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== +ast-types@0.12.4, ast-types@^0.12.2: + version "0.12.4" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.12.4.tgz#71ce6383800f24efc9a1a3308f3a6e420a0974d1" + integrity sha512-ky/YVYCbtVAS8TdMIaTiPFHwEpRB5z1hctepJplTr3UW5q8TDrpIMCILyk8pmLxGtn2KCtC/lSn7zOsaI7nzDw== + +ast-types@^0.14.2: + version "0.14.2" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.14.2.tgz#600b882df8583e3cd4f2df5fa20fa83759d4bdfd" + integrity sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA== + dependencies: + tslib "^2.0.1" + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -2183,9 +2231,9 @@ b4a@^1.6.4: integrity sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg== babel-loader@^9.1.3: - version "9.1.3" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-9.1.3.tgz#3d0e01b4e69760cc694ee306fe16d358aa1c6f9a" - integrity sha512-xG3ST4DglodGf8qSwv0MdeWLhrDsw/32QMdTO5T1ZIp9gQur0HkCyFs7Awskr10JKXFXwpAhiCuYX5oGXnRGbw== + version "9.2.1" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-9.2.1.tgz#04c7835db16c246dd19ba0914418f3937797587b" + integrity sha512-fqe8naHt46e0yIdkjUZYqddSXfej3AHajX+CSO5X7oy0EmPc6o5Xh+RClNoHjnieWz9AW4kZxW9yyFMhVB1QLA== dependencies: find-cache-dir "^4.0.0" schema-utils "^4.0.0" @@ -2233,15 +2281,38 @@ babel-plugin-transform-define@^2.1.4: lodash "^4.17.11" traverse "0.6.6" +babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g== + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + integrity sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g== + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== bare-events@^2.2.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/bare-events/-/bare-events-2.4.2.tgz#3140cca7a0e11d49b3edc5041ab560659fd8e1f8" - integrity sha512-qMKFd2qG/36aA4GwvKq8MxnPgCQAmBWmSyLWsJcbn8v03wvIPQ/hG1Ms8bPzndZxMDoHpxez5VOS+gC9Yi24/Q== + version "2.5.0" + resolved "https://registry.yarnpkg.com/bare-events/-/bare-events-2.5.0.tgz#305b511e262ffd8b9d5616b056464f8e1b3329cc" + integrity sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A== base32.js@^0.1.0: version "0.1.0" @@ -2265,6 +2336,20 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" +better-docs@^2.7.3: + version "2.7.3" + resolved "https://registry.yarnpkg.com/better-docs/-/better-docs-2.7.3.tgz#bdeec1b24514bc22562af2a277c2cf527abbe726" + integrity sha512-OEk9e7RQUQbo1DmVo0mdsALZ+mT0SwIen7/DGnN4xKNktXKgz1j7+KQ2pObNHHVSFGu8YMQW/Ig1v6eiTkdnbw== + dependencies: + brace "^0.11.1" + react-ace "^9.5.0" + react-docgen "^5.4.0" + react-frame-component "^5.2.1" + typescript "^4.5.4" + underscore "^1.13.2" + vue-docgen-api "^3.26.0" + vue2-ace-editor "^0.0.15" + big.js@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" @@ -2328,6 +2413,11 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" +brace@^0.11.0, brace@^0.11.1: + version "0.11.1" + resolved "https://registry.yarnpkg.com/brace/-/brace-0.11.1.tgz#4896fcc9d544eef45f4bb7660db320d3b379fe58" + integrity sha512-Fc8Ne62jJlKHiG/ajlonC4Sd66Pq68fFwK4ihJGNZpGqboc324SQk+lRvMzpPRuJOmfrJefdG8/7JdWX4bzJ2Q== + braces@^3.0.2, braces@^3.0.3, braces@~3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" @@ -2450,6 +2540,24 @@ bytes@3.1.2: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== +c8@^7.6.0: + version "7.14.0" + resolved "https://registry.yarnpkg.com/c8/-/c8-7.14.0.tgz#f368184c73b125a80565e9ab2396ff0be4d732f3" + integrity sha512-i04rtkkcNcCf7zsQcSv/T9EbUn4RXQ6mropeMcjFOsQXQ0iGLAr/xT6TImQg4+U9hmNpN9XdvPkjUL1IzbgxJw== + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@istanbuljs/schema" "^0.1.3" + find-up "^5.0.0" + foreground-child "^2.0.0" + istanbul-lib-coverage "^3.2.0" + istanbul-lib-report "^3.0.0" + istanbul-reports "^3.1.4" + rimraf "^3.0.2" + test-exclude "^6.0.0" + v8-to-istanbul "^9.0.0" + yargs "^16.2.0" + yargs-parser "^20.2.9" + cachedir@^2.0.0: version "2.4.0" resolved "https://registry.yarnpkg.com/cachedir/-/cachedir-2.4.0.tgz#7fef9cf7367233d7c88068fe6e34ed0d355a610d" @@ -2486,6 +2594,11 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + integrity sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g== + camelcase@^5.0.0, camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" @@ -2513,6 +2626,14 @@ catharsis@^0.9.0: dependencies: lodash "^4.17.15" +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + integrity sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ== + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + chai-as-promised@^7.1.1: version "7.1.2" resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.2.tgz#70cd73b74afd519754161386421fb71832c6d041" @@ -2574,6 +2695,13 @@ char-regex@^1.0.2: resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== +character-parser@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/character-parser/-/character-parser-2.2.0.tgz#c7ce28f36d4bcd9744e5ffc2c5fcde1c73261fc0" + integrity sha512-+UqJQjFEFaTAs3bNsF2j2kEN1baG/zghZbdqoYEDxGZtJo9LBzl1A+m0D4n3qKx8N2FNv8/Xp6yV9mQmBuptaw== + dependencies: + is-regex "^1.0.3" + charm@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/charm/-/charm-1.0.2.tgz#8add367153a6d9a581331052c4090991da995e35" @@ -2631,6 +2759,13 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" +clean-css@^4.1.11: + version "4.2.4" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.4.tgz#733bf46eba4e607c6891ea57c24a989356831178" + integrity sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A== + dependencies: + source-map "~0.6.0" + clean-stack@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" @@ -2672,6 +2807,15 @@ cli-truncate@^4.0.0: slice-ansi "^5.0.0" string-width "^7.0.0" +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + integrity sha512-GIOYRizG+TGoc7Wgc1LiOTLare95R3mzKgoln+Q/lE4ceiYH19gUpl0l0Ffq4lJDEf3FxujMe6IBfOCs7pfqNA== + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + cliui@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" @@ -2757,7 +2901,7 @@ commander@^10.0.1: resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== -commander@^2.20.0: +commander@^2.19.0, commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -2837,6 +2981,16 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0: resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== +constantinople@^3.0.1, constantinople@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/constantinople/-/constantinople-3.1.2.tgz#d45ed724f57d3d10500017a7d3a889c1381ae647" + integrity sha512-yePcBqEFhLOqSBtwYOGGS1exHo/s1xjekXiinh4itpNQGCu4KA1euPh1fg07N2wMITZXQkBz75Ntdt1ctGZouw== + dependencies: + "@types/babel-types" "^7.0.0" + "@types/babylon" "^6.16.2" + babel-types "^6.26.0" + babylon "^6.18.0" + constants-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" @@ -2874,6 +3028,11 @@ core-js-compat@^3.37.1, core-js-compat@^3.38.0: dependencies: browserslist "^4.23.3" +core-js@^2.4.0: + version "2.6.12" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" + integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== + core-util-is@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -3005,6 +3164,11 @@ date-format@^4.0.14: resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.14.tgz#7a8e584434fb169a521c8b7aa481f355810d9400" integrity sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg== +de-indent@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d" + integrity sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg== + debug@2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -3026,7 +3190,7 @@ debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3 dependencies: ms "^2.1.3" -decamelize@^1.2.0: +decamelize@^1.0.0, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== @@ -3114,6 +3278,11 @@ di@^0.0.1: resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" integrity sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA== +diff-match-patch@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/diff-match-patch/-/diff-match-patch-1.0.5.tgz#abb584d5f10cd1196dfc55aa03701592ae3f7b37" + integrity sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw== + diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" @@ -3154,6 +3323,11 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +doctypes@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/doctypes/-/doctypes-1.1.0.tgz#ea80b106a87538774e8a3a4a5afe293de489e0a9" + integrity sha512-LLBi6pEqS6Do3EKQ3J0NqHWV5hhb78Pi8vvESYwyOy2c31ZEZVdtitdzsQsKb7878PEERhzUk0ftqGhG6Mz+pQ== + dom-serialize@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" @@ -3235,10 +3409,10 @@ engine.io-parser@~5.2.1: resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.2.3.tgz#00dc5b97b1f233a23c9398d0209504cf5f94d92f" integrity sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q== -engine.io@~6.5.2: - version "6.5.5" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.5.5.tgz#430b80d8840caab91a50e9e23cb551455195fc93" - integrity sha512-C5Pn8Wk+1vKBoHghJODM63yk8MvrO9EWZUfkAt5HAqIgPE4/8FF0PEGHXtEd40l223+cE5ABWuPzm38PHFXfMA== +engine.io@~6.6.0: + version "6.6.1" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.6.1.tgz#a82b1e5511239a0e95fac14516870ee9138febc8" + integrity sha512-NEpDCw9hrvBW+hVEOK4T7v0jFJ++KgtPl4jKFwsZVfG1XhS0dCrSb3VMb9gPAd7VAdW52VT1EnaNiU2vM8C0og== dependencies: "@types/cookie" "^0.4.1" "@types/cors" "^2.8.12" @@ -3272,9 +3446,9 @@ entities@^4.4.0: integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== envinfo@^7.7.3: - version "7.13.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.13.0.tgz#81fbb81e5da35d74e814941aeab7c325a606fb31" - integrity sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q== + version "7.14.0" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.14.0.tgz#26dac5db54418f2a4c1159153a0b2ae980838aae" + integrity sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg== environment@^1.0.0: version "1.1.0" @@ -3579,15 +3753,15 @@ eslint-webpack-plugin@^4.2.0: schema-utils "^4.2.0" eslint@^8.57.0: - version "8.57.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" - integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== + version "8.57.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.1.tgz#7df109654aba7e3bbe5c8eae533c5e461d3c6ca9" + integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.0" - "@humanwhocodes/config-array" "^0.11.14" + "@eslint/js" "8.57.1" + "@humanwhocodes/config-array" "^0.13.0" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" "@ungap/structured-clone" "^1.2.0" @@ -3640,7 +3814,7 @@ espree@^9.6.0, espree@^9.6.1: acorn-jsx "^5.3.2" eslint-visitor-keys "^3.4.1" -esprima@^4.0.0: +esprima@^4.0.0, esprima@~4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== @@ -3669,6 +3843,15 @@ estraverse@^5.1.0, estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== +estree-to-babel@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/estree-to-babel/-/estree-to-babel-3.2.1.tgz#82e78315275c3ca74475fdc8ac1a5103c8a75bf5" + integrity sha512-YNF+mZ/Wu2FU/gvmzuWtYc8rloubL7wfXCTgouFrnjGVXPA/EeYYA7pupXWrb3Iv1cTBeSSxxJIbK23l4MRNqg== + dependencies: + "@babel/traverse" "^7.1.6" + "@babel/types" "^7.2.0" + c8 "^7.6.0" + esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -3938,6 +4121,14 @@ foreground-child@^2.0.0: cross-spawn "^7.0.0" signal-exit "^3.0.2" +foreground-child@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.0.tgz#0ac8644c06e431439f8561db8ecf29a7b5519c77" + integrity sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg== + dependencies: + cross-spawn "^7.0.0" + signal-exit "^4.0.1" + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -4285,6 +4476,11 @@ hash-base@~3.0: inherits "^2.0.1" safe-buffer "^5.0.1" +hash-sum@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/hash-sum/-/hash-sum-1.0.2.tgz#33b40777754c6432573c120cc3808bbd10d47f04" + integrity sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA== + hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" @@ -4501,6 +4697,11 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + is-buffer@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" @@ -4537,6 +4738,14 @@ is-docker@^2.0.0: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== +is-expression@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-expression/-/is-expression-3.0.0.tgz#39acaa6be7fd1f3471dc42c7416e61c24317ac9f" + integrity sha512-vyMeQMq+AiH5uUnoBfMTwf18tO3bM6k1QXBE9D6ueAAquEfCZe3AJPtud9g6qS0+4X8xA7ndpZiDyeb2l2qOBw== + dependencies: + acorn "~4.0.2" + object-assign "^4.0.1" + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -4629,7 +4838,12 @@ is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-regex@^1.1.4: +is-promise@^2.0.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" + integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== + +is-regex@^1.0.3, is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== @@ -4808,7 +5022,7 @@ istanbul-lib-source-maps@^4.0.0, istanbul-lib-source-maps@^4.0.1: istanbul-lib-coverage "^3.0.0" source-map "^0.6.1" -istanbul-reports@^3.0.2, istanbul-reports@^3.0.5: +istanbul-reports@^3.0.2, istanbul-reports@^3.0.5, istanbul-reports@^3.1.4: version "3.1.7" resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz#daed12b9e1dca518e15c056e1e537e741280fa0b" integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== @@ -4847,7 +5061,12 @@ jest-worker@^29.7.0: merge-stream "^2.0.0" supports-color "^8.0.0" -js-tokens@^4.0.0: +js-stringify@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/js-stringify/-/js-stringify-1.0.2.tgz#1736fddfd9724f28a3682adc6230ae7e4e9679db" + integrity sha512-rtS5ATOo2Q5k1G+DADISilDA6lv79zIiwFd6CcjuIxGKLFm5C+RLImRscVap9k55i+MOZwgliw+NejvkLuGD5g== + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== @@ -5001,6 +5220,14 @@ jsprim@^1.2.2: json-schema "0.4.0" verror "1.10.0" +jstransformer@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/jstransformer/-/jstransformer-1.0.0.tgz#ed8bf0921e2f3f1ed4d5c1a44f68709ed24722c3" + integrity sha512-C9YK3Rf8q6VAPDCCU9fnqo3mAfOH6vUGnMcP4AQAYIEpWtfGLpwOTmZ+igtdK5y+VvI2n3CyYSzy4Qh34eq24A== + dependencies: + is-promise "^2.0.0" + promise "^7.0.1" + just-extend@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-6.2.0.tgz#b816abfb3d67ee860482e7401564672558163947" @@ -5096,6 +5323,13 @@ keyv@^4.5.3: dependencies: json-buffer "3.0.1" +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== + dependencies: + is-buffer "^1.1.5" + kind-of@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" @@ -5108,6 +5342,11 @@ klaw@^3.0.0: dependencies: graceful-fs "^4.1.9" +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + integrity sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ== + levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -5231,12 +5470,17 @@ lodash.get@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== + lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.21: +lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.21, lodash@^4.17.4: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -5271,6 +5515,18 @@ log4js@^6.4.1: rfdc "^1.3.0" streamroller "^3.1.5" +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + integrity sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg== + +loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + loupe@^2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" @@ -5278,6 +5534,14 @@ loupe@^2.3.6: dependencies: get-func-name "^2.0.1" +lru-cache@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -5440,10 +5704,10 @@ mimic-function@^5.0.0: resolved "https://registry.yarnpkg.com/mimic-function/-/mimic-function-5.0.1.tgz#acbe2b3349f99b9deaca7fb70e48b83e94e67076" integrity sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA== -minami@^1.1.1: - version "1.2.3" - resolved "https://registry.yarnpkg.com/minami/-/minami-1.2.3.tgz#99b6dcdfb2f0a54da1c9c8f7aa3a327787aaf9f8" - integrity sha512-3f2QqqbUC1usVux0FkQMFYB73yd9JIxmHSn1dWQacizL6hOUaNu6mA3KxZ9SfiCc4qgcgq+5XP59+hP7URa1Dw== +min-indent@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" + integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" @@ -5455,7 +5719,7 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== -minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -5568,7 +5832,7 @@ negotiator@0.6.3: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== -neo-async@^2.6.2: +neo-async@^2.6.1, neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== @@ -5584,6 +5848,13 @@ nise@^5.1.9: just-extend "^6.2.0" path-to-regexp "^6.2.1" +node-dir@^0.1.10: + version "0.1.17" + resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5" + integrity sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg== + dependencies: + minimatch "^3.0.2" + node-emoji@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-2.1.3.tgz#93cfabb5cc7c3653aa52f29d6ffb7927d8047c06" @@ -5696,9 +5967,9 @@ number-is-nan@^1.0.0: integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== nyc@^17.0.0: - version "17.0.0" - resolved "https://registry.yarnpkg.com/nyc/-/nyc-17.0.0.tgz#d8943407584242a448a70290b15bb72207fac9fd" - integrity sha512-ISp44nqNCaPugLLGGfknzQwSwt10SSS5IMoPR7GLoMAyS18Iw5js8U7ga2VF9lYuMZ42gOHr3UddZw4WZltxKg== + version "17.1.0" + resolved "https://registry.yarnpkg.com/nyc/-/nyc-17.1.0.tgz#b6349a401a62ffeb912bd38ea9a018839fdb6eb1" + integrity sha512-U42vQ4czpKa0QdI1hu950XuNhYqgoM+ZF1HT+VuUHL9hPfDPVvNQyltmMqdE9bUHMVa+8yNbc3QKTj8zQhlVxQ== dependencies: "@istanbuljs/load-nyc-config" "^1.0.0" "@istanbuljs/schema" "^0.1.2" @@ -5707,7 +5978,7 @@ nyc@^17.0.0: decamelize "^1.2.0" find-cache-dir "^3.2.0" find-up "^4.1.0" - foreground-child "^2.0.0" + foreground-child "^3.3.0" get-package-type "^0.1.0" glob "^7.1.6" istanbul-lib-coverage "^3.0.0" @@ -5733,7 +6004,7 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0: +object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -5968,9 +6239,9 @@ parse-asn1@^5.0.0, parse-asn1@^5.1.7: safe-buffer "^5.2.1" parse-imports@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/parse-imports/-/parse-imports-2.1.1.tgz#ce52141df24990065d72a446a364bffd595577f4" - integrity sha512-TDT4HqzUiTMO1wJRwg/t/hYk8Wdp3iF/ToMIlAoVQfL1Xs/sTxq1dKWSMjMbQmIarfWKymOyly40+zmPHXMqCA== + version "2.2.1" + resolved "https://registry.yarnpkg.com/parse-imports/-/parse-imports-2.2.1.tgz#0a6e8b5316beb5c9905f50eb2bbb8c64a4805642" + integrity sha512-OL/zLggRp8mFhKL0rNORUTR4yBYujK/uU+xZL+/0Rgm2QE4nLO9v8PzEweSJEbMGKmDRjJE4R3IMJlL2di4JeQ== dependencies: es-module-lexer "^1.5.3" slashes "^3.0.12" @@ -6136,6 +6407,11 @@ prettier@^3.3.3: resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105" integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== +private@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -6153,11 +6429,32 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== +promise@^7.0.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" + integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== + dependencies: + asap "~2.0.3" + +prop-types@^15.7.2: + version "15.8.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" + integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.13.1" + proxy-from-env@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== + psl@^1.1.28: version "1.9.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" @@ -6175,6 +6472,111 @@ public-encrypt@^4.0.0: randombytes "^2.0.1" safe-buffer "^5.1.2" +pug-attrs@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pug-attrs/-/pug-attrs-2.0.4.tgz#b2f44c439e4eb4ad5d4ef25cac20d18ad28cc336" + integrity sha512-TaZ4Z2TWUPDJcV3wjU3RtUXMrd3kM4Wzjbe3EWnSsZPsJ3LDI0F3yCnf2/W7PPFF+edUFQ0HgDL1IoxSz5K8EQ== + dependencies: + constantinople "^3.0.1" + js-stringify "^1.0.1" + pug-runtime "^2.0.5" + +pug-code-gen@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/pug-code-gen/-/pug-code-gen-2.0.3.tgz#122eb9ada9b5bf601705fe15aaa0a7d26bc134ab" + integrity sha512-r9sezXdDuZJfW9J91TN/2LFbiqDhmltTFmGpHTsGdrNGp3p4SxAjjXEfnuK2e4ywYsRIVP0NeLbSAMHUcaX1EA== + dependencies: + constantinople "^3.1.2" + doctypes "^1.1.0" + js-stringify "^1.0.1" + pug-attrs "^2.0.4" + pug-error "^1.3.3" + pug-runtime "^2.0.5" + void-elements "^2.0.1" + with "^5.0.0" + +pug-error@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/pug-error/-/pug-error-1.3.3.tgz#f342fb008752d58034c185de03602dd9ffe15fa6" + integrity sha512-qE3YhESP2mRAWMFJgKdtT5D7ckThRScXRwkfo+Erqga7dyJdY3ZquspprMCj/9sJ2ijm5hXFWQE/A3l4poMWiQ== + +pug-filters@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/pug-filters/-/pug-filters-3.1.1.tgz#ab2cc82db9eeccf578bda89130e252a0db026aa7" + integrity sha512-lFfjNyGEyVWC4BwX0WyvkoWLapI5xHSM3xZJFUhx4JM4XyyRdO8Aucc6pCygnqV2uSgJFaJWW3Ft1wCWSoQkQg== + dependencies: + clean-css "^4.1.11" + constantinople "^3.0.1" + jstransformer "1.0.0" + pug-error "^1.3.3" + pug-walk "^1.1.8" + resolve "^1.1.6" + uglify-js "^2.6.1" + +pug-lexer@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/pug-lexer/-/pug-lexer-4.1.0.tgz#531cde48c7c0b1fcbbc2b85485c8665e31489cfd" + integrity sha512-i55yzEBtjm0mlplW4LoANq7k3S8gDdfC6+LThGEvsK4FuobcKfDAwt6V4jKPH9RtiE3a2Akfg5UpafZ1OksaPA== + dependencies: + character-parser "^2.1.1" + is-expression "^3.0.0" + pug-error "^1.3.3" + +pug-linker@^3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/pug-linker/-/pug-linker-3.0.6.tgz#f5bf218b0efd65ce6670f7afc51658d0f82989fb" + integrity sha512-bagfuHttfQOpANGy1Y6NJ+0mNb7dD2MswFG2ZKj22s8g0wVsojpRlqveEQHmgXXcfROB2RT6oqbPYr9EN2ZWzg== + dependencies: + pug-error "^1.3.3" + pug-walk "^1.1.8" + +pug-load@^2.0.12: + version "2.0.12" + resolved "https://registry.yarnpkg.com/pug-load/-/pug-load-2.0.12.tgz#d38c85eb85f6e2f704dea14dcca94144d35d3e7b" + integrity sha512-UqpgGpyyXRYgJs/X60sE6SIf8UBsmcHYKNaOccyVLEuT6OPBIMo6xMPhoJnqtB3Q3BbO4Z3Bjz5qDsUWh4rXsg== + dependencies: + object-assign "^4.1.0" + pug-walk "^1.1.8" + +pug-parser@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/pug-parser/-/pug-parser-5.0.1.tgz#03e7ada48b6840bd3822f867d7d90f842d0ffdc9" + integrity sha512-nGHqK+w07p5/PsPIyzkTQfzlYfuqoiGjaoqHv1LjOv2ZLXmGX1O+4Vcvps+P4LhxZ3drYSljjq4b+Naid126wA== + dependencies: + pug-error "^1.3.3" + token-stream "0.0.1" + +pug-runtime@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/pug-runtime/-/pug-runtime-2.0.5.tgz#6da7976c36bf22f68e733c359240d8ae7a32953a" + integrity sha512-P+rXKn9un4fQY77wtpcuFyvFaBww7/91f3jHa154qU26qFAnOe6SW1CbIDcxiG5lLK9HazYrMCCuDvNgDQNptw== + +pug-strip-comments@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/pug-strip-comments/-/pug-strip-comments-1.0.4.tgz#cc1b6de1f6e8f5931cf02ec66cdffd3f50eaf8a8" + integrity sha512-i5j/9CS4yFhSxHp5iKPHwigaig/VV9g+FgReLJWWHEHbvKsbqL0oP/K5ubuLco6Wu3Kan5p7u7qk8A4oLLh6vw== + dependencies: + pug-error "^1.3.3" + +pug-walk@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/pug-walk/-/pug-walk-1.1.8.tgz#b408f67f27912f8c21da2f45b7230c4bd2a5ea7a" + integrity sha512-GMu3M5nUL3fju4/egXwZO0XLi6fW/K3T3VTgFQ14GxNi8btlxgT5qZL//JwZFm/2Fa64J/PNS8AZeys3wiMkVA== + +pug@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pug/-/pug-2.0.4.tgz#ee7682ec0a60494b38d48a88f05f3b0ac931377d" + integrity sha512-XhoaDlvi6NIzL49nu094R2NA6P37ijtgMDuWE+ofekDChvfKnzFal60bhSdiy8y2PBO6fmz3oMEIcfpBVRUdvw== + dependencies: + pug-code-gen "^2.0.2" + pug-filters "^3.1.1" + pug-lexer "^4.1.0" + pug-linker "^3.0.6" + pug-load "^2.0.12" + pug-parser "^5.0.1" + pug-runtime "^2.0.5" + pug-strip-comments "^1.0.4" + punycode.js@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/punycode.js/-/punycode.js-2.3.1.tgz#6b53e56ad75588234e79f4affa90972c7dd8cdb7" @@ -6195,20 +6597,13 @@ qjobs@^1.2.0: resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071" integrity sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg== -qs@6.13.0, qs@^6.12.3: +qs@6.13.0, qs@^6.11.0, qs@^6.11.2, qs@^6.12.3: version "6.13.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== dependencies: side-channel "^1.0.6" -qs@^6.11.0, qs@^6.11.2: - version "6.12.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.3.tgz#e43ce03c8521b9c7fd7f1f13e514e5ca37727754" - integrity sha512-AWJm14H1vVaO/iNZ4/hO+HyaTehuy9nRqVdkTqlJt0HWvBiBIEXFmb4C0DGeYo3Xes9rrEW+TxHsaigCbN5ICQ== - dependencies: - side-channel "^1.0.6" - qs@~6.5.2: version "6.5.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" @@ -6259,6 +6654,43 @@ raw-body@2.5.2: iconv-lite "0.4.24" unpipe "1.0.0" +react-ace@^9.5.0: + version "9.5.0" + resolved "https://registry.yarnpkg.com/react-ace/-/react-ace-9.5.0.tgz#b6c32b70d404dd821a7e01accc2d76da667ff1f7" + integrity sha512-4l5FgwGh6K7A0yWVMQlPIXDItM4Q9zzXRqOae8KkCl6MkOob7sC1CzHxZdOGvV+QioKWbX2p5HcdOVUv6cAdSg== + dependencies: + ace-builds "^1.4.13" + diff-match-patch "^1.0.5" + lodash.get "^4.4.2" + lodash.isequal "^4.5.0" + prop-types "^15.7.2" + +react-docgen@^5.4.0: + version "5.4.3" + resolved "https://registry.yarnpkg.com/react-docgen/-/react-docgen-5.4.3.tgz#7d297f73b977d0c7611402e5fc2a168acf332b26" + integrity sha512-xlLJyOlnfr8lLEEeaDZ+X2J/KJoe6Nr9AzxnkdQWush5hz2ZSu66w6iLMOScMmxoSHWpWMn+k3v5ZiyCfcWsOA== + dependencies: + "@babel/core" "^7.7.5" + "@babel/generator" "^7.12.11" + "@babel/runtime" "^7.7.6" + ast-types "^0.14.2" + commander "^2.19.0" + doctrine "^3.0.0" + estree-to-babel "^3.1.0" + neo-async "^2.6.1" + node-dir "^0.1.10" + strip-indent "^3.0.0" + +react-frame-component@^5.2.1: + version "5.2.7" + resolved "https://registry.yarnpkg.com/react-frame-component/-/react-frame-component-5.2.7.tgz#e31c0943be95fdf667c59d6d7fcf18c1dda4d4b2" + integrity sha512-ROjHtSLoSVYUBfTieazj/nL8jIX9rZFmHC0yXEU+dx6Y82OcBEGgU9o7VyHMrBFUN9FuQ849MtIPNNLsb4krbg== + +react-is@^16.13.1: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + readable-stream@^2.0.6, readable-stream@^2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" @@ -6299,6 +6731,16 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" +recast@^0.17.3: + version "0.17.6" + resolved "https://registry.yarnpkg.com/recast/-/recast-0.17.6.tgz#64ae98d0d2dfb10ff92ff5fb9ffb7371823b69fa" + integrity sha512-yoQRMRrK1lszNtbkGyM4kN45AwylV5hMiuEveUBlxytUViWevjvX6w+tzJt1LH4cfUhWt4NZvy3ThIhu6+m5wQ== + dependencies: + ast-types "0.12.4" + esprima "~4.0.0" + private "^0.1.8" + source-map "~0.6.1" + rechoir@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" @@ -6318,6 +6760,11 @@ regenerate@^1.4.2: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + regenerator-runtime@^0.14.0: version "0.14.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" @@ -6371,6 +6818,11 @@ release-zalgo@^1.0.0: dependencies: es6-error "^4.0.1" +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== + request@^2.88.2: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" @@ -6441,7 +6893,7 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== -resolve@^1.10.1, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.4: +resolve@^1.1.6, resolve@^1.10.1, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.4: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -6473,6 +6925,13 @@ rfdc@^1.3.0, rfdc@^1.4.1: resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.4.1.tgz#778f76c4fb731d93414e8f925fbecf64cce7f6ca" integrity sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA== +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + integrity sha512-yqINtL/G7vs2v+dFIZmFUDbnVyFUJFKd6gK22Kgo6R4jfJGFtisKyncWDDULgjfqf4ASQuIQyjJ7XZ+3aWpsAg== + dependencies: + align-text "^0.1.1" + rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -6649,7 +7108,7 @@ signal-exit@^3.0.0, signal-exit@^3.0.2: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== -signal-exit@^4.1.0: +signal-exit@^4.0.1, signal-exit@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== @@ -6731,22 +7190,22 @@ socket.io-parser@~4.2.4: debug "~4.3.1" socket.io@^4.7.2: - version "4.7.5" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.7.5.tgz#56eb2d976aef9d1445f373a62d781a41c7add8f8" - integrity sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA== + version "4.8.0" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.8.0.tgz#33d05ae0915fad1670bd0c4efcc07ccfabebe3b1" + integrity sha512-8U6BEgGjQOfGz3HHTYaC/L1GaxDCJ/KM0XTkJly0EhZ5U/du9uNEZy4ZgYzEzIqlx2CMm25CrCqr1ck899eLNA== dependencies: accepts "~1.3.4" base64id "~2.0.0" cors "~2.8.5" debug "~4.3.2" - engine.io "~6.5.2" + engine.io "~6.6.0" socket.io-adapter "~2.5.2" socket.io-parser "~4.2.4" sodium-native@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/sodium-native/-/sodium-native-4.1.1.tgz#109bc924dd55c13db87c6dd30da047487595723c" - integrity sha512-LXkAfRd4FHtkQS4X6g+nRcVaN7mWVNepV06phIsC6+IZFvGh1voW5TNQiQp2twVaMf05gZqQjuS+uWLM6gHhNQ== + version "4.2.0" + resolved "https://registry.yarnpkg.com/sodium-native/-/sodium-native-4.2.0.tgz#d0bae0c90da22b3f8f4d879aff2d3dfadba3862d" + integrity sha512-rdJRAf/RE/IRFUUoUsz10slNAQDTGz5ChpIeR1Ti0BtGYstl6Uok4hHALPBdnFcLml6qXJ2pDd0/De09mPa6mg== dependencies: node-gyp-build "^4.8.0" @@ -6758,11 +7217,16 @@ source-map-support@^0.5.16, source-map-support@~0.5.20: buffer-from "^1.0.0" source-map "^0.6.0" -source-map@^0.6.0, source-map@^0.6.1: +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== + spawn-command@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2.tgz#9544e1a43ca045f8531aac1a48cb29bdae62338e" @@ -6884,9 +7348,9 @@ streamroller@^3.1.5: fs-extra "^8.1.0" streamx@^2.15.0: - version "2.18.0" - resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.18.0.tgz#5bc1a51eb412a667ebfdcd4e6cf6a6fc65721ac7" - integrity sha512-LLUC1TWdjVdn1weXGcSxyTR3T4+acB6tVGXT95y0nGbca4t4o/ng1wKAGTljm9VicuCVLvRlqFYXYy5GwgM7sQ== + version "2.20.1" + resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.20.1.tgz#471c4f8b860f7b696feb83d5b125caab2fdbb93c" + integrity sha512-uTa0mU6WUC65iUvzKH4X9hEdvSW7rbPxPtwfWiLMSj3qTdQbAiUboZTxauKfpFuGIGa1C2BYijZ7wgdUXICJhA== dependencies: fast-fifo "^1.3.2" queue-tick "^1.0.1" @@ -7004,6 +7468,13 @@ strip-final-newline@^3.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== +strip-indent@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" + integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== + dependencies: + min-indent "^1.0.0" + strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" @@ -7110,9 +7581,9 @@ terser-webpack-plugin@^5.3.10: terser "^5.26.0" terser@^5.26.0: - version "5.31.3" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.3.tgz#b24b7beb46062f4653f049eea4f0cd165d0f0c38" - integrity sha512-pAfYn3NIZLyZpa83ZKigvj6Rn9c/vd5KfYGX7cN1mnzqgDcxWvrU5ZtAfIKhEXz9nRecw4z3LXkjaq96/qZqAA== + version "5.33.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.33.0.tgz#8f9149538c7468ffcb1246cfec603c16720d2db1" + integrity sha512-JuPVaB7s1gdFKPKTelwUyRq5Sid2A3Gko2S0PncwdBq7kN9Ti9HPWDQ06MPsEDGsZeVESjKEnyGy68quBk1w6g== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.8.2" @@ -7166,6 +7637,11 @@ tmp@^0.2.1: resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + integrity sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og== + to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" @@ -7183,6 +7659,11 @@ toidentifier@1.0.1: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== +token-stream@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/token-stream/-/token-stream-0.0.1.tgz#ceeefc717a76c4316f126d0b9dbaa55d7e7df01a" + integrity sha512-nfjOAu/zAWmX9tgwi5NRp7O7zTDUD1miHiB40klUnAh9qnL1iXdgzcz/i5dMaL5jahcBAaSfmNOBBJBLJW8TEg== + toml@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/toml/-/toml-3.0.0.tgz#342160f1af1904ec9d204d03a5d61222d762c5ee" @@ -7211,6 +7692,11 @@ ts-expose-internals-conditionally@1.0.0-empty.0: resolved "https://registry.yarnpkg.com/ts-expose-internals-conditionally/-/ts-expose-internals-conditionally-1.0.0-empty.0.tgz#fd9e5acb481466b0f5936f6e246eb37d0c3ceb28" integrity sha512-F8m9NOF6ZhdOClDVdlM8gj3fDCav4ZIFSs/EI3ksQbAAXVSCN/Jh5OCJDDZWBuBy9psFc6jULGDlPwjMYMhJDw== +ts-map@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/ts-map/-/ts-map-1.0.3.tgz#1c4d218dec813d2103b7e04e4bcf348e1471c1ff" + integrity sha512-vDWbsl26LIcPGmDpoVzjEP6+hvHZkBkLW7JpvwbCv/5IYPJlsbzCVXY3wsCeAxAUeTclNOUZxnLdGh3VBD/J6w== + ts-node@^10.9.2: version "10.9.2" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" @@ -7240,7 +7726,7 @@ tsconfig-paths@^3.15.0: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^2.6.2: +tslib@^2.0.1, tslib@^2.6.2: version "2.7.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01" integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA== @@ -7279,7 +7765,7 @@ type-detect@4.0.8: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== -type-detect@^4.0.0, type-detect@^4.0.8, type-detect@^4.1.0: +type-detect@^4.0.0, type-detect@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.1.0.tgz#deb2453e8f08dcae7ae98c626b13dddb0155906c" integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== @@ -7295,9 +7781,9 @@ type-fest@^0.8.0: integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== type-fest@^4.4.0: - version "4.22.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.22.1.tgz#cc493ba0c1fb7faecb80d13a70525a75afd9d8d6" - integrity sha512-9tHNEa0Ov81YOopiVkcCJVz5TM6AEQ+CHHjFIktqPnE3NV0AHIkx+gh9tiCl58m/66wWxkOC9eltpa75J4lQPA== + version "4.26.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.26.1.tgz#a4a17fa314f976dd3e6d6675ef6c775c16d7955e" + integrity sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg== type-is@~1.6.18: version "1.6.18" @@ -7404,9 +7890,9 @@ typedarray@^0.0.6: integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== "typescript-5.6@npm:typescript@~5.6.0-0": - version "5.6.0-dev.20240719" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.0-dev.20240719.tgz#1bee8182303b6f4cdfb7a0b97d721aeea5ef7fc9" - integrity sha512-gwHt3fdLbe+LLgZJnPaGZ7v9MHTkjrqjf4NpxznO0SmFVSu7cEd8IwEsePtmQQZAX3FtPdgfwDmeNktid848Hw== + version "5.6.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0" + integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw== "typescript-5.7@npm:typescript@~5.7.0-0": version "5.7.0-dev.20240924" @@ -7418,6 +7904,16 @@ typescript@5.3.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== +typescript@^3.2.2: + version "3.9.10" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" + integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== + +typescript@^4.5.4: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== + typescript@^5.6.2: version "5.6.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0" @@ -7433,6 +7929,21 @@ uc.micro@^2.0.0, uc.micro@^2.1.0: resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee" integrity sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A== +uglify-js@^2.6.1: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + integrity sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w== + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + integrity sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q== + unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" @@ -7443,7 +7954,7 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -underscore@~1.13.2: +underscore@^1.13.2, underscore@~1.13.2: version "1.13.7" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.7.tgz#970e33963af9a7dda228f17ebe8399e5fbe63a10" integrity sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g== @@ -7560,6 +8071,15 @@ v8-compile-cache-lib@^3.0.1: resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== +v8-to-istanbul@^9.0.0: + version "9.3.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" + integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== + dependencies: + "@jridgewell/trace-mapping" "^0.3.12" + "@types/istanbul-lib-coverage" "^2.0.1" + convert-source-map "^2.0.0" + validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -7599,11 +8119,42 @@ vm-browserify@^1.1.2: resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== -void-elements@^2.0.0: +void-elements@^2.0.0, void-elements@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" integrity sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung== +vue-docgen-api@^3.26.0: + version "3.26.0" + resolved "https://registry.yarnpkg.com/vue-docgen-api/-/vue-docgen-api-3.26.0.tgz#2afc6a39e72862fbbc60ceb8510c681749f05460" + integrity sha512-ujdg4i5ZI/wE46RZQMFzKnDGyhEuPCu+fMA86CAd9EIek/6+OqraSVBm5ZkLrbEd5f8xxdnqMU4yiSGHHeao/Q== + dependencies: + "@babel/parser" "^7.2.3" + "@babel/types" "^7.0.0" + ast-types "^0.12.2" + hash-sum "^1.0.2" + lru-cache "^4.1.5" + pug "^2.0.3" + recast "^0.17.3" + ts-map "^1.0.3" + typescript "^3.2.2" + vue-template-compiler "^2.0.0" + +vue-template-compiler@^2.0.0: + version "2.7.16" + resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz#c81b2d47753264c77ac03b9966a46637482bb03b" + integrity sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ== + dependencies: + de-indent "^1.0.2" + he "^1.2.0" + +vue2-ace-editor@^0.0.15: + version "0.0.15" + resolved "https://registry.yarnpkg.com/vue2-ace-editor/-/vue2-ace-editor-0.0.15.tgz#569b208e54ae771ae1edd3b8902ac42f0edc74e3" + integrity sha512-e3TR9OGXc71cGpvYcW068lNpRcFt3+OONCC81oxHL/0vwl/V3OgqnNMw2/RRolgQkO/CA5AjqVHWmANWKOtNnQ== + dependencies: + brace "^0.11.0" + watchpack@^2.4.1: version "2.4.2" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.2.tgz#2feeaed67412e7c33184e5a79ca738fbd38564da" @@ -7748,11 +8299,29 @@ wildcard@^2.0.0: resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + integrity sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg== + +with@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/with/-/with-5.1.1.tgz#fa4daa92daf32c4ea94ed453c81f04686b575dfe" + integrity sha512-uAnSsFGfSpF6DNhBXStvlZILfHJfJu4eUkfbRGk94kGO1Ta7bg6FwfvoOhhyHAJuFbCw+0xk4uJ3u57jLvlCJg== + dependencies: + acorn "^3.1.0" + acorn-globals "^3.0.0" + word-wrap@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + integrity sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q== + workerpool@^6.5.1: version "6.5.1" resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" @@ -7825,6 +8394,11 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A== + yallist@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" @@ -7893,6 +8467,16 @@ yargs@^16.0.0, yargs@^16.1.1, yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + integrity sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A== + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"