From 167da3b256573a2c37c7542de0e51a11cc3caa85 Mon Sep 17 00:00:00 2001 From: Conner Gallagher Date: Fri, 17 Jun 2022 23:43:18 -0600 Subject: [PATCH] chore(tooling): simplified tsconfig and esm builds --- .github/workflows/test-deploy.yml | 1 + cli/README.md | 6 +- cli/package.json | 7 +- libraries/sbv2-lite/package.json | 7 +- libraries/sbv2-lite/tsconfig.base.json | 29 ++ libraries/sbv2-lite/tsconfig.cjs.json | 7 +- libraries/sbv2-lite/tsconfig.esm.json | 8 - libraries/sbv2-lite/tsconfig.json | 17 +- libraries/sbv2-utils/package.json | 20 +- libraries/sbv2-utils/src/anchor.ts | 13 +- libraries/sbv2-utils/src/feed.ts | 2 +- libraries/sbv2-utils/src/index.ts | 26 +- libraries/sbv2-utils/src/nonce.ts | 1 + libraries/sbv2-utils/src/print.ts | 12 +- libraries/sbv2-utils/src/queue.ts | 4 +- libraries/sbv2-utils/src/switchboard.ts | 2 +- libraries/sbv2-utils/src/test/context.ts | 5 +- libraries/sbv2-utils/src/test/env.ts | 5 +- libraries/sbv2-utils/src/test/index.ts | 4 +- libraries/sbv2-utils/tsconfig.base.json | 29 ++ libraries/sbv2-utils/tsconfig.cjs.json | 7 +- libraries/sbv2-utils/tsconfig.esm.json | 8 - libraries/sbv2-utils/tsconfig.json | 41 +-- libraries/ts/package.json | 29 +- libraries/ts/src/index.ts | 4 +- libraries/ts/src/protos/index.d.ts | 72 ++--- libraries/ts/src/protos/index.js | 144 ++++----- libraries/ts/src/sbv2.ts | 27 +- libraries/ts/tsconfig.base.json | 24 ++ libraries/ts/tsconfig.cjs.json | 7 +- libraries/ts/tsconfig.esm.json | 10 - libraries/ts/tsconfig.json | 41 +-- package.json | 1 + packages/feed-parser/package.json | 2 +- packages/feed-walkthrough/package.json | 2 +- packages/lease-observer/package.json | 2 +- programs/anchor-feed-parser/package.json | 4 +- programs/anchor-vrf-parser/package.json | 6 +- programs/spl-feed-parser/package.json | 4 +- tools/eslint/package.json | 1 + tsconfig.json | 2 +- yarn.lock | 365 ++++------------------- 42 files changed, 374 insertions(+), 634 deletions(-) create mode 100644 libraries/sbv2-lite/tsconfig.base.json delete mode 100644 libraries/sbv2-lite/tsconfig.esm.json create mode 100644 libraries/sbv2-utils/tsconfig.base.json delete mode 100644 libraries/sbv2-utils/tsconfig.esm.json create mode 100644 libraries/ts/tsconfig.base.json delete mode 100644 libraries/ts/tsconfig.esm.json diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml index b07b0ed..0f87db8 100644 --- a/.github/workflows/test-deploy.yml +++ b/.github/workflows/test-deploy.yml @@ -32,4 +32,5 @@ jobs: - name: Test build run: | yarn install --frozen-lockfile + yarn workspaces run build yarn docs:build diff --git a/cli/README.md b/cli/README.md index f967ce5..920b860 100644 --- a/cli/README.md +++ b/cli/README.md @@ -1998,7 +1998,7 @@ EXAMPLES $ sbv2 print GhYg3R1V6DmJbwuc57qZeoYG6gUuvCotUF1zU3WCj98U ``` -_See code: [dist/commands/print/index.ts](https://github.com/switchboard-xyz/switchboard-v2/blob/v0.2.3/dist/commands/print/index.ts)_ +_See code: [dist/commands/print/index.ts](https://github.com/switchboard-xyz/switchboard-v2/blob/v0.2.3-beta.11/dist/commands/print/index.ts)_ ## `sbv2 print aggregator [AGGREGATORKEY]` @@ -2544,7 +2544,7 @@ DESCRIPTION sandbox ``` -_See code: [dist/commands/sandbox.ts](https://github.com/switchboard-xyz/switchboard-v2/blob/v0.2.3/dist/commands/sandbox.ts)_ +_See code: [dist/commands/sandbox.ts](https://github.com/switchboard-xyz/switchboard-v2/blob/v0.2.3-beta.11/dist/commands/sandbox.ts)_ ## `sbv2 set aggregator [AGGREGATORKEY]` @@ -2611,7 +2611,7 @@ DESCRIPTION sandbox ``` -_See code: [dist/commands/test.ts](https://github.com/switchboard-xyz/switchboard-v2/blob/v0.2.3/dist/commands/test.ts)_ +_See code: [dist/commands/test.ts](https://github.com/switchboard-xyz/switchboard-v2/blob/v0.2.3-beta.11/dist/commands/test.ts)_ ## `sbv2 update [CHANNEL]` diff --git a/cli/package.json b/cli/package.json index 9ea4ecc..a948a66 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@switchboard-xyz/switchboardv2-cli", - "version": "0.2.3", + "version": "0.2.4", "description": "command line tool to interact with switchboard v2", "author": "gallynaut @gallynaut", "bin": { @@ -33,8 +33,8 @@ "@project-serum/anchor": "^0.24.2", "@solana/spl-token": "^0.1.8", "@solana/web3.js": "^1.43.5", - "@switchboard-xyz/sbv2-utils": "^0.1.21", - "@switchboard-xyz/switchboard-v2": "^0.0.109", + "@switchboard-xyz/sbv2-utils": "^0.1.22", + "@switchboard-xyz/switchboard-v2": "^0.0.111", "assert": "^2.0.0", "big.js": "^6.2.0", "bs58": "^5.0.0", @@ -130,6 +130,7 @@ }, "scripts": { "build": "shx rm -rf dist && tsc -p tsconfig.build.json", + "watch": "tsc -p tsconfig.build.json --watch", "lint": "eslint . --ext .ts --config .eslintrc", "lint:fix": "eslint . --ext .ts --config .eslintrc --fix", "postpack": "shx rm -f oclif.manifest.json", diff --git a/libraries/sbv2-lite/package.json b/libraries/sbv2-lite/package.json index 27f1f72..42f1cd9 100644 --- a/libraries/sbv2-lite/package.json +++ b/libraries/sbv2-lite/package.json @@ -22,11 +22,10 @@ } }, "scripts": { - "docgen": "yarn build && npx typedoc", + "docgen": "typedoc --entryPoints src/index.ts --out ../../website/static/api/ts-lite", "test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register 'tests/**/*.ts'", - "build:cjs": "shx rm -rf lib/cjs && tsc -p tsconfig.cjs.json && shx echo '{\"type\": \"commonjs\"}' > lib/cjs/package.json", - "build:esm": "shx rm -rf lib/esm && tsc -p tsconfig.esm.json && shx echo '{\"type\": \"module\"}' > lib/esm/package.json", - "build": "shx rm -rf lib && yarn build:cjs && yarn build:esm", + "build": "shx rm -rf lib && tsc && tsc -p tsconfig.cjs.json", + "watch": "tsc -p tsconfig.cjs.json --watch", "prepublishOnly": "yarn build && yarn test" }, "author": "", diff --git a/libraries/sbv2-lite/tsconfig.base.json b/libraries/sbv2-lite/tsconfig.base.json new file mode 100644 index 0000000..3c6435c --- /dev/null +++ b/libraries/sbv2-lite/tsconfig.base.json @@ -0,0 +1,29 @@ +{ + "include": ["./src/**/*"], + "compilerOptions": { + "target": "es2019", + "sourceMap": true, + "declaration": true, + "declarationMap": true, + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "composite": true, + "skipLibCheck": true, + // strict + "strict": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noImplicitAny": false, + "strictNullChecks": true, + "strictFunctionTypes": true, + "noImplicitReturns": true, + "strictPropertyInitialization": true, + "paths": { + "@switchboard-xyz/switchboard-v2": ["../ts"] + } + }, + "references": [{ "path": "../ts" }] +} diff --git a/libraries/sbv2-lite/tsconfig.cjs.json b/libraries/sbv2-lite/tsconfig.cjs.json index 71789fe..a9b407d 100644 --- a/libraries/sbv2-lite/tsconfig.cjs.json +++ b/libraries/sbv2-lite/tsconfig.cjs.json @@ -1,8 +1,9 @@ { - "extends": "./tsconfig.json", + "extends": "./tsconfig.base.json", "compilerOptions": { "module": "commonjs", - "outDir": "lib/cjs", - "target": "es2019" + "target": "es2019", + "outDir": "lib/cjs/", + "rootDir": "./src" } } diff --git a/libraries/sbv2-lite/tsconfig.esm.json b/libraries/sbv2-lite/tsconfig.esm.json deleted file mode 100644 index 315b817..0000000 --- a/libraries/sbv2-lite/tsconfig.esm.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "esnext", - "outDir": "lib/esm", - "target": "esnext" - } -} diff --git a/libraries/sbv2-lite/tsconfig.json b/libraries/sbv2-lite/tsconfig.json index 609e5e0..a6c8ef3 100644 --- a/libraries/sbv2-lite/tsconfig.json +++ b/libraries/sbv2-lite/tsconfig.json @@ -1,14 +1,11 @@ { - "extends": "../../tsconfig.json", + "extends": "./tsconfig.base.json", "compilerOptions": { - "noEmit": false, - "strict": true - }, - "include": ["src/**/*"], - "exclude": ["tests/**/*", "lib", "node_modules"], - "files": ["src/index.ts"], - "typedocOptions": { - "entryPoints": ["src/index.ts"], - "out": "../../website/static/api/ts-lite" + "esModuleInterop": true, + "moduleResolution": "node", + "module": "es2022", + "target": "es2019", + "outDir": "lib/esm/", + "rootDir": "./src" } } diff --git a/libraries/sbv2-utils/package.json b/libraries/sbv2-utils/package.json index 0b15942..f29c0a7 100644 --- a/libraries/sbv2-utils/package.json +++ b/libraries/sbv2-utils/package.json @@ -1,6 +1,6 @@ { "name": "@switchboard-xyz/sbv2-utils", - "version": "0.1.21", + "version": "0.1.22", "description": "some basic utility functions when working with switchboard-v2", "author": "", "license": "ISC", @@ -16,19 +16,13 @@ ], "main": "lib/cjs/index.js", "module": "lib/esm/index.js", - "exports": { - ".": { - "require": "./lib/cjs/index.js", - "import": "./lib/esm/index.js" - } - }, + "types": "lib/cjs/index.d.ts", "scripts": { - "docgen": "yarn build && npx typedoc", + "docgen": "typedoc --entryPoints src/index.ts --out ../../website/static/api/sbv2-utils", "test": "echo \"No test script for @switchboard-xyz/sbv2-utils\" && exit 0", - "build:cjs": "shx rm -rf lib/cjs && tsc -p tsconfig.cjs.json && shx echo '{\"type\": \"commonjs\"}' > lib/cjs/package.json", - "build:esm": "shx rm -rf lib/esm && tsc -p tsconfig.esm.json && shx echo '{\"type\": \"module\"}' > lib/esm/package.json", - "build": "shx rm -rf lib && yarn build:cjs && yarn build:esm && shx rm lib/*.tsbuildinfo", - "prepublishOnly": "yarn build" + "build": "shx rm -rf lib && tsc && tsc -p tsconfig.cjs.json", + "watch": "tsc -p tsconfig.cjs.json --watch", + "prepublishOnly": "shx rm -rf lib && yarn build" }, "dependencies": { "@orca-so/sdk": "^1.2.24", @@ -36,7 +30,7 @@ "@saberhq/token-utils": "^1.12.68", "@solana/spl-token": "^0.1.8", "@solana/web3.js": "^1.42.0", - "@switchboard-xyz/switchboard-v2": "^0.0.109", + "@switchboard-xyz/switchboard-v2": "^0.0.111", "big.js": "^6.1.1", "chalk": "4", "decimal.js": "^10.3.1", diff --git a/libraries/sbv2-utils/src/anchor.ts b/libraries/sbv2-utils/src/anchor.ts index c39425e..90cff26 100644 --- a/libraries/sbv2-utils/src/anchor.ts +++ b/libraries/sbv2-utils/src/anchor.ts @@ -1,6 +1,6 @@ import * as anchor from "@project-serum/anchor"; -import NodeWallet from "@project-serum/anchor/dist/cjs/nodewallet"; -import { findProgramAddressSync } from "@project-serum/anchor/dist/cjs/utils/pubkey"; +/*eslint-disable import/extensions */ +import { findProgramAddressSync } from "@project-serum/anchor/dist/cjs/utils/pubkey.js"; import { Cluster, clusterApiUrl, @@ -8,14 +8,15 @@ import { Keypair, PublicKey, } from "@solana/web3.js"; +import { AnchorWallet } from "@switchboard-xyz/switchboard-v2"; import fs from "fs"; import path from "path"; import toml from "toml"; -import { DEFAULT_KEYPAIR } from "./const"; -import { NoPayerKeypairProvided } from "./errors"; +import { DEFAULT_KEYPAIR } from "./const.js"; +import { NoPayerKeypairProvided } from "./errors.js"; export function programWallet(program: anchor.Program): Keypair { - return ((program.provider as anchor.AnchorProvider).wallet as NodeWallet) + return ((program.provider as anchor.AnchorProvider).wallet as AnchorWallet) .payer; } @@ -29,7 +30,7 @@ export const getDefaultProvider = ( ): anchor.AnchorProvider => { return new anchor.AnchorProvider( connection, - new NodeWallet(DEFAULT_KEYPAIR), + new AnchorWallet(DEFAULT_KEYPAIR), anchor.AnchorProvider.defaultOptions() ); }; diff --git a/libraries/sbv2-utils/src/feed.ts b/libraries/sbv2-utils/src/feed.ts index 324011d..89b04a1 100644 --- a/libraries/sbv2-utils/src/feed.ts +++ b/libraries/sbv2-utils/src/feed.ts @@ -18,7 +18,7 @@ import { SwitchboardDecimal, } from "@switchboard-xyz/switchboard-v2"; import Big from "big.js"; -import { promiseWithTimeout } from "./async"; +import { promiseWithTimeout } from "./async.js"; export async function awaitOpenRound( aggregatorAccount: AggregatorAccount, diff --git a/libraries/sbv2-utils/src/index.ts b/libraries/sbv2-utils/src/index.ts index 9f9f0c0..91f3e89 100644 --- a/libraries/sbv2-utils/src/index.ts +++ b/libraries/sbv2-utils/src/index.ts @@ -1,13 +1,13 @@ -export * from "./anchor"; -export * from "./async"; -export * from "./big"; -export * from "./const"; -export * from "./date"; -export * from "./errors"; -export * from "./feed"; -export * from "./nonce"; -export * from "./print"; -export * from "./state"; -export * from "./switchboard"; -export * from "./test"; -export * from "./transaction"; +export * from "./anchor.js"; +export * from "./async.js"; +export * from "./big.js"; +export * from "./const.js"; +export * from "./date.js"; +export * from "./errors.js"; +export * from "./feed.js"; +export * from "./nonce.js"; +export * from "./print.js"; +export * from "./state.js"; +export * from "./switchboard.js"; +export * from "./test/index.js"; +export * from "./transaction.js"; diff --git a/libraries/sbv2-utils/src/nonce.ts b/libraries/sbv2-utils/src/nonce.ts index 76d9997..82f791c 100644 --- a/libraries/sbv2-utils/src/nonce.ts +++ b/libraries/sbv2-utils/src/nonce.ts @@ -174,6 +174,7 @@ export async function getOracleNonceQueueAccounts( if (nonceAccountExists(nonce.accountInfo ?? undefined)) { return nonce.pubkey; } + return undefined; }) .filter(Boolean) as PublicKey[]; return nonceQueuePubkeys; diff --git a/libraries/sbv2-utils/src/print.ts b/libraries/sbv2-utils/src/print.ts index ce94aa5..fbd230f 100644 --- a/libraries/sbv2-utils/src/print.ts +++ b/libraries/sbv2-utils/src/print.ts @@ -1,4 +1,4 @@ -import { BN, Program } from "@project-serum/anchor"; +import * as anchor from "@project-serum/anchor"; import { AccountMeta, PublicKey, TokenAmount } from "@solana/web3.js"; import { AggregatorAccount, @@ -17,12 +17,12 @@ import { } from "@switchboard-xyz/switchboard-v2"; import type Big from "big.js"; import chalk from "chalk"; -import { anchorBNtoDateTimeString } from "./date"; -import type { SwitchboardAccountType } from "./switchboard"; +import { anchorBNtoDateTimeString } from "./date.js"; +import type { SwitchboardAccountType } from "./switchboard.js"; export const chalkString = ( label: string, - value: string | number | boolean | PublicKey | Big | BN, + value: string | number | boolean | PublicKey | Big | anchor.BN, padding = 16 ): string => { let valueString = ""; @@ -384,7 +384,7 @@ export async function prettyPrintAggregator( .toString(); const resultTimestamp = anchorBNtoDateTimeString( - data.latestConfirmedRound.roundOpenTimestamp ?? new BN(0) + data.latestConfirmedRound.roundOpenTimestamp ?? new anchor.BN(0) ); const varianceThreshold = parseFloat( @@ -663,7 +663,7 @@ export async function prettyPrintCrank( } export async function prettyPrintSwitchboardAccount( - program: Program, + program: anchor.Program, publicKey: PublicKey, accountType: SwitchboardAccountType ): Promise { diff --git a/libraries/sbv2-utils/src/queue.ts b/libraries/sbv2-utils/src/queue.ts index 36776d8..3b931dd 100644 --- a/libraries/sbv2-utils/src/queue.ts +++ b/libraries/sbv2-utils/src/queue.ts @@ -16,8 +16,8 @@ import { SwitchboardDecimal, } from "@switchboard-xyz/switchboard-v2"; import Big from "big.js"; -import { chalkString } from "./print"; -import { packAndSend } from "./transaction"; +import { chalkString } from "./print.js"; +import { packAndSend } from "./transaction.js"; export interface CreateQueueParams { authority?: PublicKey; diff --git a/libraries/sbv2-utils/src/switchboard.ts b/libraries/sbv2-utils/src/switchboard.ts index 4df359d..464a3dc 100644 --- a/libraries/sbv2-utils/src/switchboard.ts +++ b/libraries/sbv2-utils/src/switchboard.ts @@ -12,7 +12,7 @@ import { ProgramStateAccount, VrfAccount, } from "@switchboard-xyz/switchboard-v2"; -import { InvalidSwitchboardAccount } from "./errors"; +import { InvalidSwitchboardAccount } from "./errors.js"; export const SWITCHBOARD_ACCOUNT_TYPES = [ "JobAccountData", diff --git a/libraries/sbv2-utils/src/test/context.ts b/libraries/sbv2-utils/src/test/context.ts index 8522840..2abb2e3 100644 --- a/libraries/sbv2-utils/src/test/context.ts +++ b/libraries/sbv2-utils/src/test/context.ts @@ -1,14 +1,13 @@ /* eslint-disable @typescript-eslint/no-shadow */ /* eslint-disable @typescript-eslint/no-var-requires */ import * as anchor from "@project-serum/anchor"; -import type NodeWallet from "@project-serum/anchor/dist/cjs/nodewallet"; import * as spl from "@solana/spl-token"; import { Keypair, PublicKey } from "@solana/web3.js"; import * as sbv2 from "@switchboard-xyz/switchboard-v2"; import Big from "big.js"; import fs from "fs"; import path from "path"; -import { awaitOpenRound, createAggregator } from "../feed"; +import { awaitOpenRound, createAggregator } from "../feed.js"; export interface ISwitchboardTestContext { program: anchor.Program; @@ -56,7 +55,7 @@ export class SwitchboardTestContext implements ISwitchboardTestContext { provider: anchor.AnchorProvider, queueKey = "F8ce7MsckeZAbAGmxjJNetxYXQa9mKr9nnrC3qKubyYy" ) { - const payerKeypair = (provider.wallet as NodeWallet).payer; + const payerKeypair = (provider.wallet as sbv2.AnchorWallet).payer; let program: anchor.Program; try { program = await sbv2.loadSwitchboardProgram( diff --git a/libraries/sbv2-utils/src/test/env.ts b/libraries/sbv2-utils/src/test/env.ts index 85fdb0e..ceddaf5 100644 --- a/libraries/sbv2-utils/src/test/env.ts +++ b/libraries/sbv2-utils/src/test/env.ts @@ -1,12 +1,11 @@ import * as anchor from "@project-serum/anchor"; -import NodeWallet from "@project-serum/anchor/dist/cjs/nodewallet"; import * as spl from "@solana/spl-token"; import { clusterApiUrl, Connection, Keypair, PublicKey } from "@solana/web3.js"; import * as sbv2 from "@switchboard-xyz/switchboard-v2"; import chalk from "chalk"; import fs from "fs"; import path from "path"; -import { getIdlAddress, getProgramDataAddress } from "../anchor"; +import { getIdlAddress, getProgramDataAddress } from "../anchor.js"; const LATEST_DOCKER_VERSION = "dev-v2-06-08-22"; @@ -297,7 +296,7 @@ secrets: }); const programId = alternateProgramId ?? sbv2.getSwitchboardPid("devnet"); - const wallet = new NodeWallet(payerKeypair); + const wallet = new sbv2.AnchorWallet(payerKeypair); const provider = new anchor.AnchorProvider(connection, wallet, {}); const anchorIdl = await anchor.Program.fetchIdl(programId, provider); diff --git a/libraries/sbv2-utils/src/test/index.ts b/libraries/sbv2-utils/src/test/index.ts index aadf449..dcfff70 100644 --- a/libraries/sbv2-utils/src/test/index.ts +++ b/libraries/sbv2-utils/src/test/index.ts @@ -1,2 +1,2 @@ -export * from "./context"; -export * from "./env"; +export * from "./context.js"; +export * from "./env.js"; diff --git a/libraries/sbv2-utils/tsconfig.base.json b/libraries/sbv2-utils/tsconfig.base.json new file mode 100644 index 0000000..3c6435c --- /dev/null +++ b/libraries/sbv2-utils/tsconfig.base.json @@ -0,0 +1,29 @@ +{ + "include": ["./src/**/*"], + "compilerOptions": { + "target": "es2019", + "sourceMap": true, + "declaration": true, + "declarationMap": true, + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "composite": true, + "skipLibCheck": true, + // strict + "strict": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noImplicitAny": false, + "strictNullChecks": true, + "strictFunctionTypes": true, + "noImplicitReturns": true, + "strictPropertyInitialization": true, + "paths": { + "@switchboard-xyz/switchboard-v2": ["../ts"] + } + }, + "references": [{ "path": "../ts" }] +} diff --git a/libraries/sbv2-utils/tsconfig.cjs.json b/libraries/sbv2-utils/tsconfig.cjs.json index 71789fe..a9b407d 100644 --- a/libraries/sbv2-utils/tsconfig.cjs.json +++ b/libraries/sbv2-utils/tsconfig.cjs.json @@ -1,8 +1,9 @@ { - "extends": "./tsconfig.json", + "extends": "./tsconfig.base.json", "compilerOptions": { "module": "commonjs", - "outDir": "lib/cjs", - "target": "es2019" + "target": "es2019", + "outDir": "lib/cjs/", + "rootDir": "./src" } } diff --git a/libraries/sbv2-utils/tsconfig.esm.json b/libraries/sbv2-utils/tsconfig.esm.json deleted file mode 100644 index 315b817..0000000 --- a/libraries/sbv2-utils/tsconfig.esm.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "esnext", - "outDir": "lib/esm", - "target": "esnext" - } -} diff --git a/libraries/sbv2-utils/tsconfig.json b/libraries/sbv2-utils/tsconfig.json index af0b68c..a6c8ef3 100644 --- a/libraries/sbv2-utils/tsconfig.json +++ b/libraries/sbv2-utils/tsconfig.json @@ -1,40 +1,11 @@ { - "extends": "../../tsconfig.json", + "extends": "./tsconfig.base.json", "compilerOptions": { - "composite": true, - "rootDir": "src", - "noImplicitAny": false, - "outDir": "lib/esm", - "skipLibCheck": true, "esModuleInterop": true, - "noImplicitReturns": false, - "importsNotUsedAsValues": "preserve", - "noEmit": false, - "emitDeclarationOnly": false, - "strict": true, - // "strictNullChecks": false, - - "inlineSources": true, - "lib": ["esnext"], - "listEmittedFiles": false, - "listFiles": false, - "noFallthroughCasesInSwitch": true, - "pretty": true, - "resolveJsonModule": true, - "traceResolution": false, - "downlevelIteration": true, - "sourceMap": true, - - "paths": { - "@switchboard-xyz/switchboard-v2": ["../ts"] - } - }, - "include": ["src/**/*"], - "exclude": ["esbuild.js", "lib"], - "references": [{ "path": "../ts" }], - "files": ["src/index.ts"], - "typedocOptions": { - "entryPoints": ["src/index.ts"], - "out": "../../website/static/api/sbv2-utils" + "moduleResolution": "node", + "module": "es2022", + "target": "es2019", + "outDir": "lib/esm/", + "rootDir": "./src" } } diff --git a/libraries/ts/package.json b/libraries/ts/package.json index 89ad8b3..c50d032 100644 --- a/libraries/ts/package.json +++ b/libraries/ts/package.json @@ -1,6 +1,6 @@ { "name": "@switchboard-xyz/switchboard-v2", - "version": "0.0.111-beta.0", + "version": "0.0.111", "license": "MIT", "author": "mitch@switchboard.xyz", "description": "API wrapper for intergating with the Switchboardv2 program", @@ -21,25 +21,19 @@ ], "main": "lib/cjs/index.js", "module": "lib/esm/index.js", - "browser": "lib/cjs/index.js", - "types": "./lib/cjs/index.d.ts", - "exports": { - ".": { - "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js" - } - }, + "types": "lib/cjs/index.d.ts", "scripts": { - "docgen": "yarn build && npx typedoc", - "build:protos": "pbjs -t static-module -o src/protos/index.js ../protos/*.proto && pbts -o src/protos/index.d.ts src/protos/index.js", - "build:cjs:protos": "shx mkdir -p lib/cjs/protos; pbjs -t static-module -o lib/cjs/protos/index.js ../protos/*.proto && pbts -o lib/cjs/protos/index.d.ts lib/cjs/protos/index.js", - "build:esm:protos": "shx mkdir -p lib/esm/protos; pbjs -t static-module -w \"es6\" -o lib/esm/protos/index.js ../protos/*.proto && pbts -o lib/esm/protos/index.d.ts lib/esm/protos/index.js", - "build:cjs": "shx rm -rf lib/cjs && tsc -p tsconfig.cjs.json && shx echo '{\"type\": \"commonjs\"}' > lib/cjs/package.json && yarn build:cjs:protos", - "build:esm": "shx rm -rf lib/esm && tsc -p tsconfig.esm.json && shx echo '{\"type\": \"module\"}' > lib/esm/package.json && yarn build:esm:protos", - "build": "shx rm -rf lib && yarn build:protos && yarn build:cjs && yarn build:esm && shx rm lib/*.tsbuildinfo", + "docgen": "typedoc --entryPoints src/index.ts --out ../../website/static/api/ts", + "build:protos": "shx mkdir -p src/protos; pbjs -t static-module -o src/protos/index.js ../protos/*.proto && pbts -o src/protos/index.d.ts src/protos/index.js", + "build:cjs:protos": "shx rm -rf lib/cjs/protos; shx mkdir -p lib/cjs/protos; pbjs -t static-module -o lib/cjs/protos/index.js ../protos/*.proto && pbts -o lib/cjs/protos/index.d.ts lib/cjs/protos/index.js", + "build:esm:protos": "shx rm -rf lib/esm/protos; shx mkdir -p lib/esm/protos; pbjs -t static-module --es6 -w \"es6\" -o lib/esm/protos/index.js ../protos/*.proto && pbts -o lib/esm/protos/index.d.ts lib/esm/protos/index.js && shx --silent sed -i 'protobufjs/minimal' 'protobufjs/minimal.js' lib/esm/protos/index.js && shx --silent sed -i 'import \\* as' 'import' lib/esm/protos/index.js", + "build:cjs": "tsc -p tsconfig.cjs.json && yarn build:cjs:protos", + "build:esm": "tsc && yarn build:esm:protos", + "build": "yarn build:protos && yarn build:cjs && yarn build:esm", + "watch": "tsc -p tsconfig.cjs.json --watch", "test": "mocha --extension ts --require ts-node/register -t 1000000 tests/", "lint": "eslint --fix-dry-run --ext .ts src/**/*.ts", - "prepublish": "yarn build" + "prepublish": "shx rm -rf lib && yarn build" }, "peerDependencies": { "@solana/spl-governance": "^0.0.34", @@ -65,6 +59,7 @@ "@types/mocha": "^9.0.0", "@types/node": "^17.0.35", "shx": "^0.3.4", + "ts-proto": "^1.115.4", "typedoc": "^0.22.13", "typescript": "^4.7" } diff --git a/libraries/ts/src/index.ts b/libraries/ts/src/index.ts index b402b83..c4aca00 100644 --- a/libraries/ts/src/index.ts +++ b/libraries/ts/src/index.ts @@ -1,2 +1,4 @@ -export * from "./protos"; +/* eslint-disable @typescript-eslint/no-var-requires */ +/*eslint-disable import/extensions */ +export * from "./protos/index.js"; export * from "./sbv2.js"; diff --git a/libraries/ts/src/protos/index.d.ts b/libraries/ts/src/protos/index.d.ts index 50a7942..11f68fa 100644 --- a/libraries/ts/src/protos/index.d.ts +++ b/libraries/ts/src/protos/index.d.ts @@ -729,13 +729,13 @@ export namespace OracleJob { constructor(properties?: OracleJob.IValueTask); /** ValueTask value. */ - public value: number; + public value?: (number|null); /** ValueTask aggregatorPubkey. */ - public aggregatorPubkey: string; + public aggregatorPubkey?: (string|null); /** ValueTask big. */ - public big: string; + public big?: (string|null); /** ValueTask Value. */ public Value?: ("value"|"aggregatorPubkey"|"big"); @@ -1041,16 +1041,16 @@ export namespace OracleJob { constructor(properties?: OracleJob.IDivideTask); /** DivideTask scalar. */ - public scalar: number; + public scalar?: (number|null); /** DivideTask aggregatorPubkey. */ - public aggregatorPubkey: string; + public aggregatorPubkey?: (string|null); /** DivideTask job. */ public job?: (IOracleJob|null); /** DivideTask big. */ - public big: string; + public big?: (string|null); /** DivideTask Denominator. */ public Denominator?: ("scalar"|"aggregatorPubkey"|"job"|"big"); @@ -1152,16 +1152,16 @@ export namespace OracleJob { constructor(properties?: OracleJob.IMultiplyTask); /** MultiplyTask scalar. */ - public scalar: number; + public scalar?: (number|null); /** MultiplyTask aggregatorPubkey. */ - public aggregatorPubkey: string; + public aggregatorPubkey?: (string|null); /** MultiplyTask job. */ public job?: (IOracleJob|null); /** MultiplyTask big. */ - public big: string; + public big?: (string|null); /** MultiplyTask Multiple. */ public Multiple?: ("scalar"|"aggregatorPubkey"|"job"|"big"); @@ -1263,16 +1263,16 @@ export namespace OracleJob { constructor(properties?: OracleJob.IAddTask); /** AddTask scalar. */ - public scalar: number; + public scalar?: (number|null); /** AddTask aggregatorPubkey. */ - public aggregatorPubkey: string; + public aggregatorPubkey?: (string|null); /** AddTask job. */ public job?: (IOracleJob|null); /** AddTask big. */ - public big: string; + public big?: (string|null); /** AddTask Addition. */ public Addition?: ("scalar"|"aggregatorPubkey"|"job"|"big"); @@ -1374,16 +1374,16 @@ export namespace OracleJob { constructor(properties?: OracleJob.ISubtractTask); /** SubtractTask scalar. */ - public scalar: number; + public scalar?: (number|null); /** SubtractTask aggregatorPubkey. */ - public aggregatorPubkey: string; + public aggregatorPubkey?: (string|null); /** SubtractTask job. */ public job?: (IOracleJob|null); /** SubtractTask big. */ - public big: string; + public big?: (string|null); /** SubtractTask Subtraction. */ public Subtraction?: ("scalar"|"aggregatorPubkey"|"job"|"big"); @@ -1494,16 +1494,16 @@ export namespace OracleJob { constructor(properties?: OracleJob.ILpTokenPriceTask); /** LpTokenPriceTask mercurialPoolAddress. */ - public mercurialPoolAddress: string; + public mercurialPoolAddress?: (string|null); /** LpTokenPriceTask saberPoolAddress. */ - public saberPoolAddress: string; + public saberPoolAddress?: (string|null); /** LpTokenPriceTask orcaPoolAddress. */ - public orcaPoolAddress: string; + public orcaPoolAddress?: (string|null); /** LpTokenPriceTask raydiumPoolAddress. */ - public raydiumPoolAddress: string; + public raydiumPoolAddress?: (string|null); /** LpTokenPriceTask priceFeedAddresses. */ public priceFeedAddresses: string[]; @@ -1626,16 +1626,16 @@ export namespace OracleJob { public outTokenAddress: string; /** LpExchangeRateTask mercurialPoolAddress. */ - public mercurialPoolAddress: string; + public mercurialPoolAddress?: (string|null); /** LpExchangeRateTask saberPoolAddress. */ - public saberPoolAddress: string; + public saberPoolAddress?: (string|null); /** LpExchangeRateTask orcaPoolTokenMintAddress. */ - public orcaPoolTokenMintAddress: string; + public orcaPoolTokenMintAddress?: (string|null); /** LpExchangeRateTask raydiumPoolAddress. */ - public raydiumPoolAddress: string; + public raydiumPoolAddress?: (string|null); /** LpExchangeRateTask PoolAddress. */ public PoolAddress?: ("mercurialPoolAddress"|"saberPoolAddress"|"orcaPoolTokenMintAddress"|"raydiumPoolAddress"); @@ -1830,7 +1830,7 @@ export namespace OracleJob { public stepJob?: (OracleJob.IMedianTask|null); /** XStepPriceTask stepAggregatorPubkey. */ - public stepAggregatorPubkey: string; + public stepAggregatorPubkey?: (string|null); /** XStepPriceTask StepSource. */ public StepSource?: ("stepJob"|"stepAggregatorPubkey"); @@ -2133,13 +2133,13 @@ export namespace OracleJob { constructor(properties?: OracleJob.IPowTask); /** PowTask scalar. */ - public scalar: number; + public scalar?: (number|null); /** PowTask aggregatorPubkey. */ - public aggregatorPubkey: string; + public aggregatorPubkey?: (string|null); /** PowTask big. */ - public big: string; + public big?: (string|null); /** PowTask Exponent. */ public Exponent?: ("scalar"|"aggregatorPubkey"|"big"); @@ -2544,16 +2544,16 @@ export namespace OracleJob { constructor(properties?: OracleJob.IPerpMarketTask); /** PerpMarketTask mangoMarketAddress. */ - public mangoMarketAddress: string; + public mangoMarketAddress?: (string|null); /** PerpMarketTask driftMarketAddress. */ - public driftMarketAddress: string; + public driftMarketAddress?: (string|null); /** PerpMarketTask zetaMarketAddress. */ - public zetaMarketAddress: string; + public zetaMarketAddress?: (string|null); /** PerpMarketTask zoMarketAddress. */ - public zoMarketAddress: string; + public zoMarketAddress?: (string|null); /** PerpMarketTask MarketAddress. */ public MarketAddress?: ("mangoMarketAddress"|"driftMarketAddress"|"zetaMarketAddress"|"zoMarketAddress"); @@ -2655,13 +2655,13 @@ export namespace OracleJob { constructor(properties?: OracleJob.IOracleTask); /** OracleTask switchboardAddress. */ - public switchboardAddress: string; + public switchboardAddress?: (string|null); /** OracleTask pythAddress. */ - public pythAddress: string; + public pythAddress?: (string|null); /** OracleTask chainlinkAddress. */ - public chainlinkAddress: string; + public chainlinkAddress?: (string|null); /** OracleTask pythAllowedConfidenceInterval. */ public pythAllowedConfidenceInterval: number; @@ -3030,10 +3030,10 @@ export namespace OracleJob { constructor(properties?: OracleJob.ISplTokenParseTask); /** SplTokenParseTask tokenAccountAddress. */ - public tokenAccountAddress: string; + public tokenAccountAddress?: (string|null); /** SplTokenParseTask mintAddress. */ - public mintAddress: string; + public mintAddress?: (string|null); /** SplTokenParseTask AccountAddress. */ public AccountAddress?: ("tokenAccountAddress"|"mintAddress"); diff --git a/libraries/ts/src/protos/index.js b/libraries/ts/src/protos/index.js index fc3b6ed..17de770 100644 --- a/libraries/ts/src/protos/index.js +++ b/libraries/ts/src/protos/index.js @@ -1799,27 +1799,27 @@ /** * ValueTask value. - * @member {number} value + * @member {number|null|undefined} value * @memberof OracleJob.ValueTask * @instance */ - ValueTask.prototype.value = 0; + ValueTask.prototype.value = null; /** * ValueTask aggregatorPubkey. - * @member {string} aggregatorPubkey + * @member {string|null|undefined} aggregatorPubkey * @memberof OracleJob.ValueTask * @instance */ - ValueTask.prototype.aggregatorPubkey = ""; + ValueTask.prototype.aggregatorPubkey = null; /** * ValueTask big. - * @member {string} big + * @member {string|null|undefined} big * @memberof OracleJob.ValueTask * @instance */ - ValueTask.prototype.big = ""; + ValueTask.prototype.big = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -2567,19 +2567,19 @@ /** * DivideTask scalar. - * @member {number} scalar + * @member {number|null|undefined} scalar * @memberof OracleJob.DivideTask * @instance */ - DivideTask.prototype.scalar = 0; + DivideTask.prototype.scalar = null; /** * DivideTask aggregatorPubkey. - * @member {string} aggregatorPubkey + * @member {string|null|undefined} aggregatorPubkey * @memberof OracleJob.DivideTask * @instance */ - DivideTask.prototype.aggregatorPubkey = ""; + DivideTask.prototype.aggregatorPubkey = null; /** * DivideTask job. @@ -2591,11 +2591,11 @@ /** * DivideTask big. - * @member {string} big + * @member {string|null|undefined} big * @memberof OracleJob.DivideTask * @instance */ - DivideTask.prototype.big = ""; + DivideTask.prototype.big = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -2862,19 +2862,19 @@ /** * MultiplyTask scalar. - * @member {number} scalar + * @member {number|null|undefined} scalar * @memberof OracleJob.MultiplyTask * @instance */ - MultiplyTask.prototype.scalar = 0; + MultiplyTask.prototype.scalar = null; /** * MultiplyTask aggregatorPubkey. - * @member {string} aggregatorPubkey + * @member {string|null|undefined} aggregatorPubkey * @memberof OracleJob.MultiplyTask * @instance */ - MultiplyTask.prototype.aggregatorPubkey = ""; + MultiplyTask.prototype.aggregatorPubkey = null; /** * MultiplyTask job. @@ -2886,11 +2886,11 @@ /** * MultiplyTask big. - * @member {string} big + * @member {string|null|undefined} big * @memberof OracleJob.MultiplyTask * @instance */ - MultiplyTask.prototype.big = ""; + MultiplyTask.prototype.big = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -3157,19 +3157,19 @@ /** * AddTask scalar. - * @member {number} scalar + * @member {number|null|undefined} scalar * @memberof OracleJob.AddTask * @instance */ - AddTask.prototype.scalar = 0; + AddTask.prototype.scalar = null; /** * AddTask aggregatorPubkey. - * @member {string} aggregatorPubkey + * @member {string|null|undefined} aggregatorPubkey * @memberof OracleJob.AddTask * @instance */ - AddTask.prototype.aggregatorPubkey = ""; + AddTask.prototype.aggregatorPubkey = null; /** * AddTask job. @@ -3181,11 +3181,11 @@ /** * AddTask big. - * @member {string} big + * @member {string|null|undefined} big * @memberof OracleJob.AddTask * @instance */ - AddTask.prototype.big = ""; + AddTask.prototype.big = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -3452,19 +3452,19 @@ /** * SubtractTask scalar. - * @member {number} scalar + * @member {number|null|undefined} scalar * @memberof OracleJob.SubtractTask * @instance */ - SubtractTask.prototype.scalar = 0; + SubtractTask.prototype.scalar = null; /** * SubtractTask aggregatorPubkey. - * @member {string} aggregatorPubkey + * @member {string|null|undefined} aggregatorPubkey * @memberof OracleJob.SubtractTask * @instance */ - SubtractTask.prototype.aggregatorPubkey = ""; + SubtractTask.prototype.aggregatorPubkey = null; /** * SubtractTask job. @@ -3476,11 +3476,11 @@ /** * SubtractTask big. - * @member {string} big + * @member {string|null|undefined} big * @memberof OracleJob.SubtractTask * @instance */ - SubtractTask.prototype.big = ""; + SubtractTask.prototype.big = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -3752,35 +3752,35 @@ /** * LpTokenPriceTask mercurialPoolAddress. - * @member {string} mercurialPoolAddress + * @member {string|null|undefined} mercurialPoolAddress * @memberof OracleJob.LpTokenPriceTask * @instance */ - LpTokenPriceTask.prototype.mercurialPoolAddress = ""; + LpTokenPriceTask.prototype.mercurialPoolAddress = null; /** * LpTokenPriceTask saberPoolAddress. - * @member {string} saberPoolAddress + * @member {string|null|undefined} saberPoolAddress * @memberof OracleJob.LpTokenPriceTask * @instance */ - LpTokenPriceTask.prototype.saberPoolAddress = ""; + LpTokenPriceTask.prototype.saberPoolAddress = null; /** * LpTokenPriceTask orcaPoolAddress. - * @member {string} orcaPoolAddress + * @member {string|null|undefined} orcaPoolAddress * @memberof OracleJob.LpTokenPriceTask * @instance */ - LpTokenPriceTask.prototype.orcaPoolAddress = ""; + LpTokenPriceTask.prototype.orcaPoolAddress = null; /** * LpTokenPriceTask raydiumPoolAddress. - * @member {string} raydiumPoolAddress + * @member {string|null|undefined} raydiumPoolAddress * @memberof OracleJob.LpTokenPriceTask * @instance */ - LpTokenPriceTask.prototype.raydiumPoolAddress = ""; + LpTokenPriceTask.prototype.raydiumPoolAddress = null; /** * LpTokenPriceTask priceFeedAddresses. @@ -4160,35 +4160,35 @@ /** * LpExchangeRateTask mercurialPoolAddress. - * @member {string} mercurialPoolAddress + * @member {string|null|undefined} mercurialPoolAddress * @memberof OracleJob.LpExchangeRateTask * @instance */ - LpExchangeRateTask.prototype.mercurialPoolAddress = ""; + LpExchangeRateTask.prototype.mercurialPoolAddress = null; /** * LpExchangeRateTask saberPoolAddress. - * @member {string} saberPoolAddress + * @member {string|null|undefined} saberPoolAddress * @memberof OracleJob.LpExchangeRateTask * @instance */ - LpExchangeRateTask.prototype.saberPoolAddress = ""; + LpExchangeRateTask.prototype.saberPoolAddress = null; /** * LpExchangeRateTask orcaPoolTokenMintAddress. - * @member {string} orcaPoolTokenMintAddress + * @member {string|null|undefined} orcaPoolTokenMintAddress * @memberof OracleJob.LpExchangeRateTask * @instance */ - LpExchangeRateTask.prototype.orcaPoolTokenMintAddress = ""; + LpExchangeRateTask.prototype.orcaPoolTokenMintAddress = null; /** * LpExchangeRateTask raydiumPoolAddress. - * @member {string} raydiumPoolAddress + * @member {string|null|undefined} raydiumPoolAddress * @memberof OracleJob.LpExchangeRateTask * @instance */ - LpExchangeRateTask.prototype.raydiumPoolAddress = ""; + LpExchangeRateTask.prototype.raydiumPoolAddress = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -4693,11 +4693,11 @@ /** * XStepPriceTask stepAggregatorPubkey. - * @member {string} stepAggregatorPubkey + * @member {string|null|undefined} stepAggregatorPubkey * @memberof OracleJob.XStepPriceTask * @instance */ - XStepPriceTask.prototype.stepAggregatorPubkey = ""; + XStepPriceTask.prototype.stepAggregatorPubkey = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -5388,27 +5388,27 @@ /** * PowTask scalar. - * @member {number} scalar + * @member {number|null|undefined} scalar * @memberof OracleJob.PowTask * @instance */ - PowTask.prototype.scalar = 0; + PowTask.prototype.scalar = null; /** * PowTask aggregatorPubkey. - * @member {string} aggregatorPubkey + * @member {string|null|undefined} aggregatorPubkey * @memberof OracleJob.PowTask * @instance */ - PowTask.prototype.aggregatorPubkey = ""; + PowTask.prototype.aggregatorPubkey = null; /** * PowTask big. - * @member {string} big + * @member {string|null|undefined} big * @memberof OracleJob.PowTask * @instance */ - PowTask.prototype.big = ""; + PowTask.prototype.big = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -6328,35 +6328,35 @@ /** * PerpMarketTask mangoMarketAddress. - * @member {string} mangoMarketAddress + * @member {string|null|undefined} mangoMarketAddress * @memberof OracleJob.PerpMarketTask * @instance */ - PerpMarketTask.prototype.mangoMarketAddress = ""; + PerpMarketTask.prototype.mangoMarketAddress = null; /** * PerpMarketTask driftMarketAddress. - * @member {string} driftMarketAddress + * @member {string|null|undefined} driftMarketAddress * @memberof OracleJob.PerpMarketTask * @instance */ - PerpMarketTask.prototype.driftMarketAddress = ""; + PerpMarketTask.prototype.driftMarketAddress = null; /** * PerpMarketTask zetaMarketAddress. - * @member {string} zetaMarketAddress + * @member {string|null|undefined} zetaMarketAddress * @memberof OracleJob.PerpMarketTask * @instance */ - PerpMarketTask.prototype.zetaMarketAddress = ""; + PerpMarketTask.prototype.zetaMarketAddress = null; /** * PerpMarketTask zoMarketAddress. - * @member {string} zoMarketAddress + * @member {string|null|undefined} zoMarketAddress * @memberof OracleJob.PerpMarketTask * @instance */ - PerpMarketTask.prototype.zoMarketAddress = ""; + PerpMarketTask.prototype.zoMarketAddress = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -6617,27 +6617,27 @@ /** * OracleTask switchboardAddress. - * @member {string} switchboardAddress + * @member {string|null|undefined} switchboardAddress * @memberof OracleJob.OracleTask * @instance */ - OracleTask.prototype.switchboardAddress = ""; + OracleTask.prototype.switchboardAddress = null; /** * OracleTask pythAddress. - * @member {string} pythAddress + * @member {string|null|undefined} pythAddress * @memberof OracleJob.OracleTask * @instance */ - OracleTask.prototype.pythAddress = ""; + OracleTask.prototype.pythAddress = null; /** * OracleTask chainlinkAddress. - * @member {string} chainlinkAddress + * @member {string|null|undefined} chainlinkAddress * @memberof OracleJob.OracleTask * @instance */ - OracleTask.prototype.chainlinkAddress = ""; + OracleTask.prototype.chainlinkAddress = null; /** * OracleTask pythAllowedConfidenceInterval. @@ -7456,19 +7456,19 @@ /** * SplTokenParseTask tokenAccountAddress. - * @member {string} tokenAccountAddress + * @member {string|null|undefined} tokenAccountAddress * @memberof OracleJob.SplTokenParseTask * @instance */ - SplTokenParseTask.prototype.tokenAccountAddress = ""; + SplTokenParseTask.prototype.tokenAccountAddress = null; /** * SplTokenParseTask mintAddress. - * @member {string} mintAddress + * @member {string|null|undefined} mintAddress * @memberof OracleJob.SplTokenParseTask * @instance */ - SplTokenParseTask.prototype.mintAddress = ""; + SplTokenParseTask.prototype.mintAddress = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; diff --git a/libraries/ts/src/sbv2.ts b/libraries/ts/src/sbv2.ts index 221dd2c..dea4347 100644 --- a/libraries/ts/src/sbv2.ts +++ b/libraries/ts/src/sbv2.ts @@ -21,7 +21,8 @@ import { import assert from "assert"; import Big from "big.js"; import * as crypto from "crypto"; -import { OracleJob } from "./protos"; +/*eslint-disable import/extensions */ +import protos from "./protos/index.js"; /** * Switchboard Devnet Program ID @@ -530,9 +531,9 @@ export interface AggregatorSaveResultParams { */ maxResponse: Big; /** - * List of OracleJobs that were performed to produce this result. + * List of protos.OracleJobs that were performed to produce this result. */ - jobs: Array; + jobs: Array; /** * Authority of the queue the aggregator is attached to. */ @@ -886,11 +887,11 @@ export class AggregatorAccount { * Produces a hash of all the jobs currently in the aggregator * @return hash of all the feed jobs. */ - produceJobsHash(jobs: Array): crypto.Hash { + produceJobsHash(jobs: Array): crypto.Hash { const hash = crypto.createHash("sha256"); for (const job of jobs) { const jobHasher = crypto.createHash("sha256"); - jobHasher.update(OracleJob.encodeDelimited(job).finish()); + jobHasher.update(protos.OracleJob.encodeDelimited(job).finish()); hash.update(jobHasher.digest()); } return hash; @@ -936,9 +937,9 @@ export class AggregatorAccount { /** * Load and deserialize all jobs stored in this aggregator - * @return Array + * @return Array */ - async loadJobs(aggregator?: any): Promise> { + async loadJobs(aggregator?: any): Promise> { const coder = new anchor.BorshAccountsCoder(this.program.idl); aggregator = aggregator ?? (await this.loadData()); @@ -952,7 +953,7 @@ export class AggregatorAccount { } const jobs = jobAccountDatas.map((item) => { const decoded = coder.decode("JobAccountData", item.account.data); - return OracleJob.decodeDelimited(decoded.data); + return protos.OracleJob.decodeDelimited(decoded.data); }); return jobs; } @@ -1537,11 +1538,11 @@ export class JobAccount { /** * Load and parse the protobuf from the raw buffer stored in the JobAccount. - * @return OracleJob + * @return protos.OracleJob */ - async loadJob(): Promise { + async loadJob(): Promise { const job = await this.loadData(); - return OracleJob.decodeDelimited(job.data); + return protos.OracleJob.decodeDelimited(job.data); } /** @@ -1609,8 +1610,8 @@ export class JobAccount { static decodeJob( program: anchor.Program, accountInfo: AccountInfo - ): OracleJob { - return OracleJob.decodeDelimited( + ): protos.OracleJob { + return protos.OracleJob.decodeDelimited( JobAccount.decode(program, accountInfo).data! ); } diff --git a/libraries/ts/tsconfig.base.json b/libraries/ts/tsconfig.base.json new file mode 100644 index 0000000..764fcb7 --- /dev/null +++ b/libraries/ts/tsconfig.base.json @@ -0,0 +1,24 @@ +{ + "include": ["./src/**/*"], + "exclude": ["tests/**/*", "lib", "node_modules"], + "files": ["src/index.ts"], + "compilerOptions": { + "composite": true, + "sourceMap": true, + "inlineSources": true, + "declaration": true, + "declarationMap": true, + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "types": ["mocha", "node", "long"], + "allowJs": true, + "checkJs": false, + // strict + "strict": false, + "noImplicitAny": false + } +} diff --git a/libraries/ts/tsconfig.cjs.json b/libraries/ts/tsconfig.cjs.json index 71789fe..a9b407d 100644 --- a/libraries/ts/tsconfig.cjs.json +++ b/libraries/ts/tsconfig.cjs.json @@ -1,8 +1,9 @@ { - "extends": "./tsconfig.json", + "extends": "./tsconfig.base.json", "compilerOptions": { "module": "commonjs", - "outDir": "lib/cjs", - "target": "es2019" + "target": "es2019", + "outDir": "lib/cjs/", + "rootDir": "./src" } } diff --git a/libraries/ts/tsconfig.esm.json b/libraries/ts/tsconfig.esm.json deleted file mode 100644 index af8326c..0000000 --- a/libraries/ts/tsconfig.esm.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "moduleResolution": "node", - "module": "es2022", - "outDir": "lib/esm", - "target": "es2019", - "rootDir": "./src" - } -} diff --git a/libraries/ts/tsconfig.json b/libraries/ts/tsconfig.json index e282598..a6c8ef3 100644 --- a/libraries/ts/tsconfig.json +++ b/libraries/ts/tsconfig.json @@ -1,40 +1,11 @@ { - "extends": "../../tsconfig.json", + "extends": "./tsconfig.base.json", "compilerOptions": { - "composite": true, - "moduleResolution": "node", - "target": "es2019", - "module": "ES2020", - "rootDir": "src", - "noImplicitAny": false, - "outDir": "lib/esm", - "skipLibCheck": true, "esModuleInterop": true, - "noImplicitReturns": false, - "importsNotUsedAsValues": "preserve", - "strict": false, - "allowSyntheticDefaultImports": true, - "noEmit": false, - "emitDeclarationOnly": false, - "types": ["mocha", "node", "long"], - "allowJs": true, - "checkJs": false, - "sourceMap": true, - "inlineSources": true, - "lib": ["esnext"], - "listEmittedFiles": false, - "listFiles": false, - "noFallthroughCasesInSwitch": true, - "pretty": true, - "resolveJsonModule": true, - "traceResolution": false, - "downlevelIteration": true - }, - "include": ["src/**/*"], - "exclude": ["tests/**/*", "lib", "node_modules"], - "files": ["src/index.ts"], - "typedocOptions": { - "entryPoints": ["src/index.ts"], - "out": "../../website/static/api/ts" + "moduleResolution": "node", + "module": "es2022", + "target": "es2019", + "outDir": "lib/esm/", + "rootDir": "./src" } } diff --git a/package.json b/package.json index f6e98c3..7065d5c 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "website" ], "scripts": { + "watch": "yarn workspace website start & yarn workspaces run watch", "start": "echo \"Error: no start script specified\" && exit 1", "anchor:setup": "anchor build && node ./tools/scripts/setup-example-programs.js", "test:anchor": "yarn workspace anchor-feed-parser anchor:test && yarn workspace spl-feed-parser anchor:test && yarn workspace anchor-vrf-parser anchor:test", diff --git a/packages/feed-parser/package.json b/packages/feed-parser/package.json index c365a7b..6a253d2 100644 --- a/packages/feed-parser/package.json +++ b/packages/feed-parser/package.json @@ -28,7 +28,7 @@ "dependencies": { "@project-serum/anchor": "^0.24.2", "@solana/web3.js": "^1.33.0", - "@switchboard-xyz/switchboard-v2": "^0.0.108", + "@switchboard-xyz/switchboard-v2": "^0.0.111", "big.js": "^6.1.1" } } diff --git a/packages/feed-walkthrough/package.json b/packages/feed-walkthrough/package.json index 51aab0f..dd6d8dc 100644 --- a/packages/feed-walkthrough/package.json +++ b/packages/feed-walkthrough/package.json @@ -20,7 +20,7 @@ "@project-serum/anchor": "^0.24.2", "@solana/spl-token": "^0.2.0", "@solana/web3.js": "^1.37.1", - "@switchboard-xyz/switchboard-v2": "^0.0.108", + "@switchboard-xyz/switchboard-v2": "^0.0.111", "chalk": "^4.1.2", "dotenv": "^16.0.0", "readline-sync": "^1.4.10" diff --git a/packages/lease-observer/package.json b/packages/lease-observer/package.json index 85cbfde..1fc9d0e 100644 --- a/packages/lease-observer/package.json +++ b/packages/lease-observer/package.json @@ -18,7 +18,7 @@ "@project-serum/anchor": "^0.24.2", "@solana/web3.js": "1.33.0", "@switchboard-xyz/sbv2-utils": "^0.1.19", - "@switchboard-xyz/switchboard-v2": "^0.0.108", + "@switchboard-xyz/switchboard-v2": "^0.0.111", "dotenv": "^16.0.0", "node-pagerduty": "^1.3.6" }, diff --git a/programs/anchor-feed-parser/package.json b/programs/anchor-feed-parser/package.json index 910df65..0a50bec 100644 --- a/programs/anchor-feed-parser/package.json +++ b/programs/anchor-feed-parser/package.json @@ -14,8 +14,8 @@ "dependencies": { "@project-serum/anchor": "^0.24.2", "@solana/web3.js": "^1.42.0", - "@switchboard-xyz/sbv2-utils": "^0.1.19", - "@switchboard-xyz/switchboard-v2": "^0.0.108" + "@switchboard-xyz/sbv2-utils": "^0.1.22", + "@switchboard-xyz/switchboard-v2": "^0.0.111" }, "devDependencies": { "@types/chai": "^4.3.0", diff --git a/programs/anchor-vrf-parser/package.json b/programs/anchor-vrf-parser/package.json index 58a8d13..31546bf 100644 --- a/programs/anchor-vrf-parser/package.json +++ b/programs/anchor-vrf-parser/package.json @@ -15,14 +15,14 @@ "@project-serum/anchor": "^0.24.2", "@solana/spl-token": "^0.1.8", "@solana/web3.js": "^1.42.0", - "@switchboard-xyz/sbv2-utils": "^0.1.19", - "@switchboard-xyz/switchboard-v2": "^0.0.108", + "@switchboard-xyz/sbv2-utils": "^0.1.22", + "@switchboard-xyz/switchboard-v2": "^0.0.111", "chalk": "^4.1.2", "child_process": "^1.0.2", "dotenv": "^16.0.0" }, "devDependencies": { - "@switchboard-xyz/switchboardv2-cli": "^0.1.25", + "@switchboard-xyz/switchboardv2-cli": "^0.2.4", "@types/chai": "^4.3.0", "@types/mocha": "^9.0.0", "@types/node": "^17.0.35", diff --git a/programs/spl-feed-parser/package.json b/programs/spl-feed-parser/package.json index f74e07e..c05389e 100644 --- a/programs/spl-feed-parser/package.json +++ b/programs/spl-feed-parser/package.json @@ -16,8 +16,8 @@ "dependencies": { "@project-serum/anchor": "^0.24.2", "@solana/web3.js": "^1.42.0", - "@switchboard-xyz/sbv2-utils": "^0.1.19", - "@switchboard-xyz/switchboard-v2": "^0.0.108" + "@switchboard-xyz/sbv2-utils": "^0.1.22", + "@switchboard-xyz/switchboard-v2": "^0.0.111" }, "devDependencies": { "@types/chai": "^4.3.0", diff --git a/tools/eslint/package.json b/tools/eslint/package.json index 04271b3..cc84f8e 100644 --- a/tools/eslint/package.json +++ b/tools/eslint/package.json @@ -13,6 +13,7 @@ "main": "index.js", "scripts": { "build": "echo \"No build script required for workspace eslint-config\" && exit 0", + "watch": "echo \"No watch script required for workspace eslint-config\" && exit 0", "test": "echo \"No test script required for workspace eslint-config\" && exit 0" }, "peerDependencies": { diff --git a/tsconfig.json b/tsconfig.json index 252e2f9..5daefa9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,7 +22,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "ES2015" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + "target": "ES2019" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, "lib": [ "es2019", "dom" diff --git a/yarn.lock b/yarn.lock index 9dab65c..2b31bab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3718,17 +3718,6 @@ node-gyp "^8.2.0" read-package-json-fast "^2.0.1" -"@oclif/color@^0.1.0": - version "0.1.2" - resolved "https://registry.npmjs.org/@oclif/color/-/color-0.1.2.tgz#28b07e2850d9ce814d0b587ce3403b7ad8f7d987" - integrity sha512-M9o+DOrb8l603qvgz1FogJBUGLqcMFL1aFg2ZEL0FbXJofiNTLOWIeB4faeZTLwE6dt0xH9GpCVpzksMMzGbmA== - dependencies: - ansi-styles "^3.2.1" - chalk "^3.0.0" - strip-ansi "^5.2.0" - supports-color "^5.4.0" - tslib "^1" - "@oclif/color@^1.0.0", "@oclif/color@^1.0.1": version "1.0.1" resolved "https://registry.npmjs.org/@oclif/color/-/color-1.0.1.tgz" @@ -3740,42 +3729,6 @@ supports-color "^8.1.1" tslib "^2" -"@oclif/command@^1.7.0", "@oclif/command@^1.8.15", "@oclif/command@^1.8.16", "@oclif/command@^1.8.6": - version "1.8.16" - resolved "https://registry.npmjs.org/@oclif/command/-/command-1.8.16.tgz#bea46f81b2061b47e1cda318a0b923e62ca4cc0c" - integrity sha512-rmVKYEsKzurfRU0xJz+iHelbi1LGlihIWZ7Qvmb/CBz1EkhL7nOkW4SVXmG2dA5Ce0si2gr88i6q4eBOMRNJ1w== - dependencies: - "@oclif/config" "^1.18.2" - "@oclif/errors" "^1.3.5" - "@oclif/help" "^1.0.1" - "@oclif/parser" "^3.8.6" - debug "^4.1.1" - semver "^7.3.2" - -"@oclif/config@1.18.2": - version "1.18.2" - resolved "https://registry.npmjs.org/@oclif/config/-/config-1.18.2.tgz#5bfe74a9ba6a8ca3dceb314a81bd9ce2e15ebbfe" - integrity sha512-cE3qfHWv8hGRCP31j7fIS7BfCflm/BNZ2HNqHexH+fDrdF2f1D5S8VmXWLC77ffv3oDvWyvE9AZeR0RfmHCCaA== - dependencies: - "@oclif/errors" "^1.3.3" - "@oclif/parser" "^3.8.0" - debug "^4.1.1" - globby "^11.0.1" - is-wsl "^2.1.1" - tslib "^2.0.0" - -"@oclif/config@^1.16.0", "@oclif/config@^1.17.1", "@oclif/config@^1.18.2": - version "1.18.3" - resolved "https://registry.npmjs.org/@oclif/config/-/config-1.18.3.tgz#ddfc144fdab66b1658c2f1b3478fa7fbfd317e79" - integrity sha512-sBpko86IrTscc39EvHUhL+c++81BVTsIZ3ETu/vG+cCdi0N6vb2DoahR67A9FI2CGnxRRHjnTfa3m6LulwNATA== - dependencies: - "@oclif/errors" "^1.3.5" - "@oclif/parser" "^3.8.0" - debug "^4.1.1" - globby "^11.0.1" - is-wsl "^2.1.1" - tslib "^2.3.1" - "@oclif/core@^1", "@oclif/core@^1.2.0", "@oclif/core@^1.3.1", "@oclif/core@^1.3.6": version "1.7.0" resolved "https://registry.npmjs.org/@oclif/core/-/core-1.7.0.tgz" @@ -3811,7 +3764,7 @@ widest-line "^3.1.0" wrap-ansi "^7.0.0" -"@oclif/core@^1.0.8", "@oclif/core@^1.1.1", "@oclif/core@^1.2.1", "@oclif/core@^1.3.0", "@oclif/core@^1.6.4", "@oclif/core@^1.7.0": +"@oclif/core@^1.0.8", "@oclif/core@^1.1.1", "@oclif/core@^1.2.1", "@oclif/core@^1.3.0", "@oclif/core@^1.6.4": version "1.9.0" resolved "https://registry.npmjs.org/@oclif/core/-/core-1.9.0.tgz#bb2a7820a9176f28921f449c0f577d39c15e74d0" integrity sha512-duvlaRQf4JM+mKuwwos1DNa/Q9x6tnF3khV5RU0fy5hhETF7THlTmxioKlIvKMyQDVpySqtZXZ0OKHeCi2EWuQ== @@ -3845,7 +3798,7 @@ widest-line "^3.1.0" wrap-ansi "^7.0.0" -"@oclif/errors@1.3.5", "@oclif/errors@^1.3.3", "@oclif/errors@^1.3.4", "@oclif/errors@^1.3.5": +"@oclif/errors@^1.3.5": version "1.3.5" resolved "https://registry.npmjs.org/@oclif/errors/-/errors-1.3.5.tgz" integrity sha512-OivucXPH/eLLlOT7FkCMoZXiaVYf8I/w1eTAM1+gKzfhALwWTusxEx7wBmW0uzvkSg/9ovWLycPaBgJbM3LOCQ== @@ -3856,27 +3809,12 @@ strip-ansi "^6.0.0" wrap-ansi "^7.0.0" -"@oclif/help@^1.0.1": - version "1.0.1" - resolved "https://registry.npmjs.org/@oclif/help/-/help-1.0.1.tgz#fd96a3dd9fb2314479e6c8584c91b63754a7dff5" - integrity sha512-8rsl4RHL5+vBUAKBL6PFI3mj58hjPCp2VYyXD4TAa7IMStikFfOH2gtWmqLzIlxAED2EpD0dfYwo9JJxYsH7Aw== - dependencies: - "@oclif/config" "1.18.2" - "@oclif/errors" "1.3.5" - chalk "^4.1.2" - indent-string "^4.0.0" - lodash "^4.17.21" - string-width "^4.2.0" - strip-ansi "^6.0.0" - widest-line "^3.1.0" - wrap-ansi "^6.2.0" - "@oclif/linewrap@^1.0.0": version "1.0.0" resolved "https://registry.npmjs.org/@oclif/linewrap/-/linewrap-1.0.0.tgz" integrity sha512-Ups2dShK52xXa8w6iBWLgcjPJWjais6KPJQq3gQ/88AY6BXoTX+MIGFPrWQO1KLMiQfoTpcLnUwloN4brrVUHw== -"@oclif/parser@^3.8.0", "@oclif/parser@^3.8.6", "@oclif/parser@^3.8.7": +"@oclif/parser@^3.8.7": version "3.8.7" resolved "https://registry.npmjs.org/@oclif/parser/-/parser-3.8.7.tgz#236d48db05d0b00157d3b42d31f9dac7550d2a7c" integrity sha512-b11xBmIUK+LuuwVGJpFs4LwQN2xj2cBWj2c4z1FtiXGrJ85h9xV6q+k136Hw0tGg1jQoRXuvuBnqQ7es7vO9/Q== @@ -3886,16 +3824,6 @@ chalk "^4.1.0" tslib "^2.3.1" -"@oclif/plugin-autocomplete@^1.2.0": - version "1.3.0" - resolved "https://registry.npmjs.org/@oclif/plugin-autocomplete/-/plugin-autocomplete-1.3.0.tgz#ee03fe517e015cfe9e7ab4636a029a23515ceac4" - integrity sha512-N2DRWKvuSXTGuaYf4buRbRfh5yNybb1cjQmPl9viY0BIqTwZgtQdzSD6ZSOkwda51RbGcQomYcc/h8T+ZFAkMQ== - dependencies: - "@oclif/core" "^1.7.0" - chalk "^4.1.0" - debug "^4.3.4" - fs-extra "^9.0.1" - "@oclif/plugin-help@^5", "@oclif/plugin-help@^5.1.12": version "5.1.12" resolved "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-5.1.12.tgz" @@ -3930,27 +3858,6 @@ tslib "^2.0.0" yarn "^1.22.17" -"@oclif/plugin-update@^1.5.0": - version "1.5.0" - resolved "https://registry.npmjs.org/@oclif/plugin-update/-/plugin-update-1.5.0.tgz#a9e0092a9b7ae01e54708938e2a424903f5079ef" - integrity sha512-GsWK1CMeBBO8YknThoOZulj3xE+ZgZAXW1ouNJALXcs3mbROzszLDGjXV3RM6ffbJpnWLiMIqSFNOE8d+vGcgQ== - dependencies: - "@oclif/color" "^0.1.0" - "@oclif/command" "^1.7.0" - "@oclif/config" "^1.16.0" - "@oclif/errors" "^1.3.4" - "@types/semver" "^7.3.4" - cli-ux "^5.5.1" - cross-spawn "^7.0.3" - debug "^4.3.1" - filesize "^6.1.0" - fs-extra "^9.0.1" - http-call "^5.3.0" - lodash "^4.17.21" - log-chopper "^1.0.2" - semver "^7.3.5" - tar-fs "^2.1.1" - "@oclif/plugin-update@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@oclif/plugin-update/-/plugin-update-3.0.0.tgz#dc51f1a42d7b80825ebc1ee5f14310a0545c6b8f" @@ -3976,21 +3883,6 @@ dependencies: "@oclif/core" "^1.1.1" -"@oclif/plugin-warn-if-update-available@^1.7.3": - version "1.7.3" - resolved "https://registry.npmjs.org/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-1.7.3.tgz#efe6676655fabbed2e90cc9e646e9da4c99bc8ae" - integrity sha512-q8q0NIneVCwIAJzglUMsl3EbXR/H5aPDk6g+qs7uF0tToxe07SWSONoNaKPzViwRWvYChMPjL77/rXyW1HVn4A== - dependencies: - "@oclif/command" "^1.8.6" - "@oclif/config" "^1.17.1" - "@oclif/errors" "^1.3.5" - chalk "^4.1.0" - debug "^4.1.0" - fs-extra "^9.0.1" - http-call "^5.2.2" - lodash "^4.17.21" - semver "^7.3.2" - "@oclif/plugin-warn-if-update-available@^2.0.4": version "2.0.4" resolved "https://registry.npmjs.org/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-2.0.4.tgz#3d509ca2394cccf65e6622be812d7be4065a60aa" @@ -4004,11 +3896,6 @@ lodash "^4.17.21" semver "^7.3.2" -"@oclif/screen@^1.0.4": - version "1.0.4" - resolved "https://registry.npmjs.org/@oclif/screen/-/screen-1.0.4.tgz#b740f68609dfae8aa71c3a6cab15d816407ba493" - integrity sha512-60CHpq+eqnTxLZQ4PGHYNwUX572hgpMHGPtTWMjdTMsAvlm69lZV/4ly6O3sAYkomo4NggGcomrDpBe34rxUqw== - "@oclif/screen@^3.0.2": version "3.0.2" resolved "https://registry.npmjs.org/@oclif/screen/-/screen-3.0.2.tgz" @@ -4836,84 +4723,6 @@ "@svgr/plugin-jsx" "^6.2.1" "@svgr/plugin-svgo" "^6.2.0" -"@switchboard-xyz/switchboard-api@^0.2.201": - version "0.2.201" - resolved "https://registry.npmjs.org/@switchboard-xyz/switchboard-api/-/switchboard-api-0.2.201.tgz#d082206d521d24dbcdeb06a77e6637a56ab883eb" - integrity sha512-hlxgeYmO6dbOEcmQzT1SqRxdiCFyVOMpyW4HFPgmPKT0+wSVkjsLc+BKkMGYPDaO0sWMLTJrj0FGhhTsrqd8Mg== - dependencies: - "@solana/web3.js" "^1.17.0" - form-data "^4.0.0" - protobufjs "^6.10.2" - rpc-websockets "^7.4.12" - typedoc "^0.22.15" - ws "^7.4.6" - -"@switchboard-xyz/switchboard-v2@^0.0.108": - version "0.0.108" - resolved "https://registry.npmjs.org/@switchboard-xyz/switchboard-v2/-/switchboard-v2-0.0.108.tgz#9e0a69cf4e8f8fef79cca8eeb1bede0ee1435e53" - integrity sha512-mJi/WS3ZWhXwet+lZvIKfdntw7ltX43GiYbEaAhS/WIHFN+iPIdIoI3mjEpka5Ptws3bDCZe3c6+ZDHdfJ0PFg== - dependencies: - "@project-serum/anchor" "^0.24.2" - "@solana/spl-governance" "^0.0.34" - "@switchboard-xyz/eslint-config" "^0.1.1" - "@switchboard-xyz/switchboard-api" "^0.2.201" - assert "^2.0.0" - big.js "^6.1.1" - bs58 "^4.0.1" - buffer-layout "^1.2.0" - chalk "^4.1.2" - chan "^0.6.1" - crypto-js "^4.0.0" - dotenv "^16.0.0" - long "^4.0.0" - mocha "^9.1.1" - node-fetch "^3.2.3" - protobufjs "^6.10.2" - -"@switchboard-xyz/switchboard-v2@^0.0.109": - version "0.0.109" - resolved "https://registry.npmjs.org/@switchboard-xyz/switchboard-v2/-/switchboard-v2-0.0.109.tgz#83b4f1310b0b15a2a9aef5d22adbac8ffac99bbb" - integrity sha512-NbGie6mZcMBAbRMOoUeh89M8EeA99g8CUz5im3PAAUvUFJ3BkkmP4rqtoQkVsW83G5ZZax5wBvLA1E5BOa9aYA== - dependencies: - "@project-serum/anchor" "^0.24.2" - "@solana/spl-governance" "^0.0.34" - assert "^2.0.0" - big.js "^6.1.1" - bs58 "^4.0.1" - chan "^0.6.1" - crypto-js "^4.0.0" - long "^4.0.0" - mocha "^9.1.1" - node-fetch "^3.2.3" - protobufjs "^6.11.3" - -"@switchboard-xyz/switchboardv2-cli@^0.1.25": - version "0.1.28" - resolved "https://registry.npmjs.org/@switchboard-xyz/switchboardv2-cli/-/switchboardv2-cli-0.1.28.tgz#a63388225a874e252a9868b6b3b291d1954b9327" - integrity sha512-Bi9vX08CJEfEM/TUFXY7rUUhP4DoALlqmiG6LHNHX7HsbaDq5t1cx1wVhEhK4FT9fnFjBqhu7FIvyBiiT+Q7Zg== - dependencies: - "@google-cloud/secret-manager" "^3.10.1" - "@oclif/command" "^1.8.16" - "@oclif/config" "^1.18.2" - "@oclif/parser" "^3.8.6" - "@oclif/plugin-autocomplete" "^1.2.0" - "@oclif/plugin-help" "^5.1.12" - "@oclif/plugin-update" "^1.5.0" - "@oclif/plugin-warn-if-update-available" "^1.7.3" - "@project-serum/anchor" "^0.24.2" - "@solana/spl-token" "^0.1.8" - "@solana/web3.js" "^1.42.0" - "@switchboard-xyz/sbv2-utils" "^0.1.19" - "@switchboard-xyz/switchboard-v2" "^0.0.108" - assert "^2.0.0" - big.js "^6.1.1" - bs58 "^5.0.0" - chalk "^4.1.2" - decimal.js "^10.3.1" - node-fetch "^2.6.6" - readline-sync "^1.4.10" - winston "^3.3.3" - "@szmarczak/http-timer@^1.1.2": version "1.1.2" resolved "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz" @@ -5179,6 +4988,11 @@ resolved "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz" integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== +"@types/object-hash@^1.3.0": + version "1.3.4" + resolved "https://registry.npmjs.org/@types/object-hash/-/object-hash-1.3.4.tgz#079ba142be65833293673254831b5e3e847fe58b" + integrity sha512-xFdpkAkikBgqBdG9vIlsqffDV8GpvnPEzs0IUtr1v3BEB97ijsFQ4RXVbUZwjFThhB4MDSTUfvmxUD5PGx0wXA== + "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz" @@ -5287,11 +5101,6 @@ resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz" integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== -"@types/semver@^7.3.4": - version "7.3.9" - resolved "https://registry.npmjs.org/@types/semver/-/semver-7.3.9.tgz#152c6c20a7688c30b967ec1841d31ace569863fc" - integrity sha512-L/TMpyURfBkf+o/526Zb6kd/tchUP3iBDEPjqjb+U2MAJhVRxxrmr2fwpe08E7QsV7YLcpq0tUaQ9O9x97ZIxQ== - "@types/serve-index@^1.9.1": version "1.9.1" resolved "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.1.tgz" @@ -5870,7 +5679,7 @@ ansi-escapes@^3.1.0: resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== -ansi-escapes@^4.2.1, ansi-escapes@^4.3.0, ansi-escapes@^4.3.2: +ansi-escapes@^4.2.1, ansi-escapes@^4.3.2: version "4.3.2" resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== @@ -5892,11 +5701,6 @@ ansi-regex@^3.0.0: resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== -ansi-regex@^4.1.0: - version "4.1.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" - integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== - ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" @@ -5919,7 +5723,7 @@ ansi-styles@^3.0.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.0.0, ansi-styles@^4.1.0, ansi-styles@^4.2.0, ansi-styles@^4.2.1, ansi-styles@^4.3.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0, ansi-styles@^4.2.1, ansi-styles@^4.3.0: version "4.3.0" resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== @@ -6853,14 +6657,6 @@ chalk@^2.0.0, chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chan@^0.6.1: version "0.6.1" resolved "https://registry.npmjs.org/chan/-/chan-0.6.1.tgz" @@ -7065,13 +6861,6 @@ cli-progress@^3.10.0: dependencies: string-width "^4.2.0" -cli-progress@^3.4.0: - version "3.11.1" - resolved "https://registry.npmjs.org/cli-progress/-/cli-progress-3.11.1.tgz#02afb11be9a123f2a302931beb087eafe3a0d971" - integrity sha512-TTMA2LHrYaZeNMcgZGO10oYqj9hvd03pltNtVbu4ddeyDTHlYV7gWxsFiuvaQlgwMBFCv1TukcjiODWFlb16tQ== - dependencies: - string-width "^4.2.3" - cli-spinners@^2.5.0: version "2.6.1" resolved "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" @@ -7093,38 +6882,6 @@ cli-table@^0.3.1: dependencies: colors "1.0.3" -cli-ux@^5.5.1: - version "5.6.7" - resolved "https://registry.npmjs.org/cli-ux/-/cli-ux-5.6.7.tgz#32ef9e6cb2b457be834280cc799028a11c8235a8" - integrity sha512-dsKAurMNyFDnO6X1TiiRNiVbL90XReLKcvIq4H777NMqXGBxBws23ag8ubCJE97vVZEgWG2eSUhsyLf63Jv8+g== - dependencies: - "@oclif/command" "^1.8.15" - "@oclif/errors" "^1.3.5" - "@oclif/linewrap" "^1.0.0" - "@oclif/screen" "^1.0.4" - ansi-escapes "^4.3.0" - ansi-styles "^4.2.0" - cardinal "^2.1.1" - chalk "^4.1.0" - clean-stack "^3.0.0" - cli-progress "^3.4.0" - extract-stack "^2.0.0" - fs-extra "^8.1" - hyperlinker "^1.0.0" - indent-string "^4.0.0" - is-wsl "^2.2.0" - js-yaml "^3.13.1" - lodash "^4.17.21" - natural-orderby "^2.0.1" - object-treeify "^1.1.4" - password-prompt "^1.1.2" - semver "^7.3.2" - string-width "^4.2.0" - strip-ansi "^6.0.0" - supports-color "^8.1.0" - supports-hyperlinks "^2.1.0" - tslib "^2.0.0" - cli-width@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz" @@ -7318,7 +7075,7 @@ combine-promises@^1.1.0: resolved "https://registry.npmjs.org/combine-promises/-/combine-promises-1.1.0.tgz" integrity sha512-ZI9jvcLDxqwaXEixOhArm3r7ReIivsXkpbyEWyeOhzz1QS0iSgBPnWvEqvIQtYyamGCYA88gFhmUrs9hrrQ0pg== -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: +combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -8029,6 +7786,11 @@ data-uri-to-buffer@^4.0.0: resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz" integrity sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA== +dataloader@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/dataloader/-/dataloader-1.4.0.tgz#bca11d867f5d3f1b9ed9f737bd15970c65dff5c8" + integrity sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw== + date-fns@^2.16.1: version "2.28.0" resolved "https://registry.npmjs.org/date-fns/-/date-fns-2.28.0.tgz#9570d656f5fc13143e50c975a3b6bbeb46cd08b2" @@ -9357,11 +9119,6 @@ external-editor@^3.0.3: iconv-lite "^0.4.24" tmp "^0.0.33" -extract-stack@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/extract-stack/-/extract-stack-2.0.0.tgz#11367bc865bfcd9bc0db3123e5edb57786f11f9b" - integrity sha512-AEo4zm+TenK7zQorGK1f9mJ8L14hnTDi2ZQPR+Mub1NX8zimka1mXpV5LpH8x9HoUmFSHZCfLHqWvp0Y4FxxzQ== - extsprintf@1.3.0, extsprintf@^1.2.0: version "1.3.0" resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz" @@ -9722,15 +9479,6 @@ fork-ts-checker-webpack-plugin@^6.5.0: semver "^7.3.2" tapable "^1.0.0" -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - form-data@~2.3.2: version "2.3.3" resolved "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz" @@ -11371,7 +11119,7 @@ is-word-character@^1.0.0: resolved "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.4.tgz" integrity sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA== -is-wsl@^2.1.1, is-wsl@^2.2.0: +is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== @@ -12793,7 +12541,7 @@ natural-compare@^1.4.0: resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -natural-orderby@^2.0.1, natural-orderby@^2.0.3: +natural-orderby@^2.0.3: version "2.0.3" resolved "https://registry.npmjs.org/natural-orderby/-/natural-orderby-2.0.3.tgz" integrity sha512-p7KTHxU0CUrcOXe62Zfrb5Z13nLvPhSWR/so3kFulUQU0sgUll2Z0LwpsLN351eOOD+hRGu/F1g+6xDfPeD++Q== @@ -13298,6 +13046,11 @@ object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= +object-hash@^1.3.1: + version "1.3.1" + resolved "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz#fde452098a951cb145f039bb7d455449ddc126df" + integrity sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA== + object-hash@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" @@ -13321,7 +13074,7 @@ object-keys@^1.1.1: resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object-treeify@^1.1.33, object-treeify@^1.1.4: +object-treeify@^1.1.33: version "1.1.33" resolved "https://registry.npmjs.org/object-treeify/-/object-treeify-1.1.33.tgz" integrity sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A== @@ -14437,7 +14190,7 @@ proto3-json-serializer@^0.1.8: dependencies: protobufjs "^6.11.2" -protobufjs@6.11.3, protobufjs@^6.10.2, protobufjs@^6.11.2, protobufjs@^6.11.3: +protobufjs@6.11.3, protobufjs@^6.11.2, protobufjs@^6.11.3, protobufjs@^6.8.8: version "6.11.3" resolved "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz#637a527205a35caa4f3e2a9a4a13ddffe0e7af74" integrity sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg== @@ -15392,19 +15145,6 @@ rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" -rpc-websockets@^7.4.12: - version "7.5.0" - resolved "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.5.0.tgz#bbeb87572e66703ff151e50af1658f98098e2748" - integrity sha512-9tIRi1uZGy7YmDjErf1Ax3wtqdSSLIlnmL5OtOzgd5eqPKbsPpwDP5whUDO2LQay3Xp0CcHlcNSGzacNRluBaQ== - dependencies: - "@babel/runtime" "^7.17.2" - eventemitter3 "^4.0.7" - uuid "^8.3.2" - ws "^8.5.0" - optionalDependencies: - bufferutil "^4.0.1" - utf-8-validate "^5.0.2" - rpc-websockets@^7.4.2: version "7.4.18" resolved "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.4.18.tgz" @@ -16228,13 +15968,6 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" @@ -16372,7 +16105,7 @@ supports-color@^2.0.0: resolved "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= -supports-color@^5.3.0, supports-color@^5.4.0: +supports-color@^5.3.0: version "5.5.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -16386,7 +16119,7 @@ supports-color@^7.0.0, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -supports-hyperlinks@^2.1.0, supports-hyperlinks@^2.2.0: +supports-hyperlinks@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz" integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ== @@ -16822,6 +16555,34 @@ ts-node@^10.7.0: v8-compile-cache-lib "^3.0.0" yn "3.1.1" +ts-poet@^4.11.0: + version "4.13.0" + resolved "https://registry.npmjs.org/ts-poet/-/ts-poet-4.13.0.tgz#60bc7cc1c7121c51920207d6cee692955a0d6eae" + integrity sha512-8BUxvsSdLaygDFhhamjfR+/bZ72eVJQHPhv4ADr8HmG3BbNbDORV63JxDcB3oNVMm1KeuQj+T0UrcKDqoPtc+w== + dependencies: + lodash "^4.17.15" + prettier "^2.5.1" + +ts-proto-descriptors@1.6.0: + version "1.6.0" + resolved "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.6.0.tgz#ca6eafc882495a2e920da5b981d7b181b4e49c38" + integrity sha512-Vrhue2Ti99us/o76mGy28nF3W/Uanl1/8detyJw2yyRwiBC5yxy+hEZqQ/ZX2PbZ1vyCpJ51A9L4PnCCnkBMTQ== + dependencies: + long "^4.0.0" + protobufjs "^6.8.8" + +ts-proto@^1.115.4: + version "1.115.4" + resolved "https://registry.npmjs.org/ts-proto/-/ts-proto-1.115.4.tgz#a115ee7169ca17786575e25b729842b4f3e79aeb" + integrity sha512-q2FfWVpTNJRBMXglZH0wHMEbLOEuxkDuRtyk0j5POGm7oA1Btd9sHw6GzGs6DkfYfre/BCtLmMi4uOueJpBvCQ== + dependencies: + "@types/object-hash" "^1.3.0" + dataloader "^1.4.0" + object-hash "^1.3.1" + protobufjs "^6.11.3" + ts-poet "^4.11.0" + ts-proto-descriptors "1.6.0" + tsconfig-paths@^3.14.1, tsconfig-paths@^3.5.0: version "3.14.1" resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz" @@ -16837,7 +16598,7 @@ tslib@2.3.1: resolved "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== -tslib@^1, tslib@^1.8.1, tslib@^1.9.0: +tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -17784,15 +17545,6 @@ wrap-ansi@^2.0.0: string-width "^1.0.1" strip-ansi "^3.0.1" -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" @@ -17881,11 +17633,6 @@ ws@^7.0.0, ws@^7.3.1, ws@^7.4.5: resolved "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz" integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A== -ws@^7.4.6: - version "7.5.8" - resolved "https://registry.npmjs.org/ws/-/ws-7.5.8.tgz#ac2729881ab9e7cbaf8787fe3469a48c5c7f636a" - integrity sha512-ri1Id1WinAX5Jqn9HejiGb8crfRio0Qgu8+MtL36rlTA6RLsMdWt1Az/19A2Qij6uSHUMphEFaTKa4WG+UNHNw== - ws@^8.4.2, ws@^8.5.0: version "8.5.0" resolved "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz"