diff --git a/.editorconfig b/.editorconfig index d81ff98..343e5d8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,6 +8,6 @@ charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -[*.{json,yml,md,babelrc,eslintrc,remarkrc}] +[*.{json,yaml,yml,md,babelrc,eslintrc,remarkrc}] indent_style = space indent_size = 2 diff --git a/.eslintignore b/.eslintignore index d272b8a..94ba320 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,5 @@ +cjs/ coverage/* +esm/ node_modules/ tmp/ diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 50% rename from .eslintrc.js rename to .eslintrc.cjs index 31524b2..8fb6448 100644 --- a/.eslintrc.js +++ b/.eslintrc.cjs @@ -4,7 +4,17 @@ module.exports = { node: true, jest: true, }, - extends: 'eslint:recommended', + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + // 'plugin:@typescript-eslint/recommended-requiring-type-checking' + ], + parser: '@typescript-eslint/parser', + // parserOptions: { + // project: true, + // tsconfigRootDir: __dirname, + // }, + plugins: ['@typescript-eslint'], rules: { indent: ['error', 'tab'], 'linebreak-style': ['error', 'unix'], diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..b2d4899 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,44 @@ +name: Docs + +on: + push: + branches: [main] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: 'pages' + cancel-in-progress: false + +jobs: + docs: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3.3.0 + - uses: actions/setup-node@v3.6.0 + with: + node-version: ${{ matrix.node }} + cache: 'yarn' + - uses: actions/cache@v3.2.4 + with: + path: node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn install --frozen-lockfile + - run: yarn docs + - uses: actions/upload-pages-artifact@v1.0.8 + with: + path: './docs' + - uses: actions/deploy-pages@v2.0.0 + id: deployment diff --git a/.github/workflows/ci.yaml b/.github/workflows/tests.yaml similarity index 69% rename from .github/workflows/ci.yaml rename to .github/workflows/tests.yaml index 7d94351..7a1ec3e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/tests.yaml @@ -1,19 +1,17 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: CI +name: Tests on: push: - branches: [master] + branches: [main] pull_request: - branches: [master] + branches: [main] jobs: test: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ node: [14, 16, 18] @@ -36,3 +34,4 @@ jobs: - run: yarn lint - run: yarn test:pretty - run: yarn test + - run: yarn test:types diff --git a/.gitignore b/.gitignore index 6ef6ffa..57006a9 100644 --- a/.gitignore +++ b/.gitignore @@ -7,5 +7,8 @@ Thumbs.db *.sublime-workspace *.log .eslintcache +cjs/ coverage/ +docs/ +esm/ tmp/ diff --git a/.prettierignore b/.prettierignore index 2b8a79d..10938c4 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,4 @@ +cjs/ +esm/ +src/serialize.ts package.json -lib/serialize.js diff --git a/Documentation.md b/Documentation.md index 2df2561..e69de29 100644 --- a/Documentation.md +++ b/Documentation.md @@ -1,412 +0,0 @@ -# Paddle.com Node.js SDK Documentation - -Welcome to the [Paddle.com](http://www.paddle.com/) Node.js SDK documentation. - - - -## PaddleSDK -**Kind**: global class - -* [PaddleSDK](#PaddleSDK) - * [new PaddleSDK(vendorID, apiKey, [publicKey], [options])](#new_PaddleSDK_new) - * [.getProducts()](#PaddleSDK+getProducts) ⇒ Promise - * [.getProductCoupons(productID)](#PaddleSDK+getProductCoupons) ⇒ Promise - * [.getProductPlans([productID])](#PaddleSDK+getProductPlans) ⇒ Promise - * [.getProductPlan([planId])](#PaddleSDK+getProductPlan) ⇒ Promise - * [.getPlanUsers([planID])](#PaddleSDK+getPlanUsers) ⇒ Promise - * [.getPlanPayments([planID])](#PaddleSDK+getPlanPayments) ⇒ Promise - * [.getWebhooksHistory()](#PaddleSDK+getWebhooksHistory) ⇒ Promise - * [.getUserTransactions(userID, [page])](#PaddleSDK+getUserTransactions) ⇒ Promise - * [.getSubscriptionTransactions(subscriptionID, [page])](#PaddleSDK+getSubscriptionTransactions) ⇒ Promise - * [.getOrderTransactions(orderID, [page])](#PaddleSDK+getOrderTransactions) ⇒ Promise - * [.getCheckoutTransactions(checkoutID, [page])](#PaddleSDK+getCheckoutTransactions) ⇒ Promise - * [.verifyWebhookData(postData)](#PaddleSDK+verifyWebhookData) ⇒ boolean - * [.getSubscriptionPlan(subscriptionID)](#PaddleSDK+getSubscriptionPlan) ⇒ Promise - * [.updateSubscriptionPlan(subscriptionID, planID, prorate)](#PaddleSDK+updateSubscriptionPlan) ⇒ Promise - * [.updateSubscription(subscriptionID, postData)](#PaddleSDK+updateSubscription) ⇒ Promise - * [.cancelSubscription(subscriptionID)](#PaddleSDK+cancelSubscription) ⇒ Promise - * [.getUsers(options)](#PaddleSDK+getUsers) ⇒ Promise - * [.reschedulePayment(paymentID, date)](#PaddleSDK+reschedulePayment) ⇒ Promise - * [.generatePayLink(body)](#PaddleSDK+generatePayLink) ⇒ Promise - * [.getOrderDetails(ID)](#PaddleSDK+getOrderDetails) ⇒ Promise - * [.createSubscriptionModifier(subscriptionID, modifierAmount, options)](#PaddleSDK+createSubscriptionModifier) ⇒ Promise - - - -### new PaddleSDK(vendorID, apiKey, [publicKey], [options]) - -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| vendorID | string | | The vendor ID for a Paddle account | -| apiKey | string | | The API key for a Paddle account | -| [publicKey] | string | | The public key for a Paddle account used to verify webhooks, only required for `verifyWebhookData` | -| [options] | object | | | -| [options.sandbox] | boolean | false | Whether to use the sandbox server URL | -| [options.server] | string | "vendors.paddle.com/api/2.0" | The server URL prefix for all requests | - -**Example** -```js -const client = new PaddleSDK('your-vendor-id', 'your-unique-api-key'); -const client = new PaddleSDK('your-vendor-id', 'your-unique-api-key', 'your-public-key'); -``` - - -### client.getProducts() ⇒ Promise -Get the current list of products - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfil**: object - The products list -**Example** -```js -const products = await client.getProducts(); -``` - - -### client.getProductCoupons(productID) ⇒ Promise -Get the current list of coupons for a product - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfil**: object - The coupons list - -| Param | Type | -| --- | --- | -| productID | number | - -**Example** -```js -const coupons = await client.getProductCoupons(123); -``` - - -### client.getProductPlans([productID]) ⇒ Promise -Get the current list of all plans or plans for a subscription - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfil**: object - The plans list - -| Param | Type | -| --- | --- | -| [productID] | number | - -**Example** -```js -const plans = await client.getProductPlans(); -const plans = await client.getProductPlans(123); -``` - - -### client.getProductPlan([planId]) ⇒ Promise -Get the plan based on its ID - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfil**: object - The requested plan - -| Param | Type | -| --- | --- | -| [planId] | number | - -**Example** -```js -const plan = await client.getProductPlan(123); -``` - - -### client.getPlanUsers([planID]) ⇒ Promise -Get the current list of all users or users for a subscription plan - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfil**: object - The users list - -| Param | Type | -| --- | --- | -| [planID] | number | - -**Example** -```js -const users = await client.getPlanUsers(); -const users = await client.getPlanUsers(123); -``` - - -### client.getPlanPayments([planID]) ⇒ Promise -Get the list of all payments or payments for a subscription plan - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfil**: object - The payments list - -| Param | Type | -| --- | --- | -| [planID] | number | - -**Example** -```js -const payments = await client.getPlanPayments(); -const payments = await client.getPlanPayments(123); -``` - - -### client.getWebhooksHistory() ⇒ Promise -Get the list of webhooks history - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfil**: object - The webhooks history list -**Example** -```js -const webhooksHistory = await client.getWebhooksHistory(); -``` - - -### client.getUserTransactions(userID, [page]) ⇒ Promise -Get the list of transations for a user - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfil**: object - The transations list - -| Param | Type | -| --- | --- | -| userID | number | -| [page] | number | - -**Example** -```js -const userTransactions = await client.getUserTransactions(123); -const userTransactionsNext = await client.getUserTransactions(123, 2); -``` - - -### client.getSubscriptionTransactions(subscriptionID, [page]) ⇒ Promise -Get the list of transations for a subscription - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfil**: object - The transations list - -| Param | Type | -| --- | --- | -| subscriptionID | number | -| [page] | number | - -**Example** -```js -const subscriptionTransactions = await client.getSubscriptionTransactions(123); -const subscriptionTransactionsNext = await client.getSubscriptionTransactions(123, 2); -``` - - -### client.getOrderTransactions(orderID, [page]) ⇒ Promise -Get the list of transations for an order - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfil**: object - The transations list - -| Param | Type | -| --- | --- | -| orderID | number | -| [page] | number | - -**Example** -```js -const orderTransactions = await client.getOrderTransactions(123); -const orderTransactionsNext = await client.getOrderTransactions(123, 2); -``` - - -### client.getCheckoutTransactions(checkoutID, [page]) ⇒ Promise -Get the list of transations for a checkout - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfil**: object - The transations list - -| Param | Type | -| --- | --- | -| checkoutID | number | -| [page] | number | - -**Example** -```js -const checkoutTransactions = await client.getCheckoutTransactions(123); -const checkoutTransactionsNext = await client.getCheckoutTransactions(123, 2); -``` - - -### client.verifyWebhookData(postData) ⇒ boolean -Verify a webhook alert data using signature and a public key to validate that -it was indeed sent from Paddle. - -For more details: https://paddle.com/docs/reference-verifying-webhooks - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) - -| Param | Type | Description | -| --- | --- | --- | -| postData | Object | The object with all the parameters sent to the webhook | - -**Example** -```js -const client = new PaddleSDK('your-vendor-id', 'your-unique-api-key', 'your-public-key'); - -// inside an Express handler which uses express.bodyParser middleware -const isVerified = client.verifyWebhookData(req.body); -``` - - -### client.getSubscriptionPlan(subscriptionID) ⇒ Promise -Get subscription details - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfill**: object - Details of a single subscription - -| Param | Type | -| --- | --- | -| subscriptionID | number | - -**Example** -```js -const result = await client.getSubscriptionPlan(123); -``` - - -### client.updateSubscriptionPlan(subscriptionID, planID, prorate) ⇒ Promise -Update (upgrade/downgrade) the plan of a subscription - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfill**: object - The result of the operation - -| Param | Type | Default | -| --- | --- | --- | -| subscriptionID | number | | -| planID | number | | -| prorate | boolean | false | - -**Example** -```js -const result = await client.updateSubscriptionPlan(123); -``` - - -### client.updateSubscription(subscriptionID, postData) ⇒ Promise -Update subscription details, quantity, price and or currency - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfill**: object - The result of the operation - -| Param | Type | Description | -| --- | --- | --- | -| subscriptionID | number | | -| postData | Object | { quantity, price, planID, currency, prorate, keepModifiers, billImmediately, pause } | - -**Example** -```js -const result = await client.updateSubscriptionPlan(123, { quantity: 2 }); -``` - - -### client.cancelSubscription(subscriptionID) ⇒ Promise -Cancels an active subscription - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfil**: object - The result of the operation - -| Param | Type | -| --- | --- | -| subscriptionID | number | - -**Example** -```js -const result = await client.cancelSubscription(123); -``` - - -### client.getUsers(options) ⇒ Promise -Get the list of all users - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfil**: object - The users list -**Note**: If you have a large amount of active users, you will need to create paginated calls to this function. - -| Param | Type | Description | -| --- | --- | --- | -| options | Object | { page, resultsPerPage, state, planId } | - -**Example** -```js -const users = await client.getUsers(); -const users = await client.getUsers({ state: 'active' }); -``` - - -### client.reschedulePayment(paymentID, date) ⇒ Promise -Change the due date of an upcoming subscription payment - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfill**: object - The result of the operation - -| Param | Type | Description | -| --- | --- | --- | -| paymentID | number | | -| date | Date | Only the date portion of the date value is used | - -**Example** -```js -const result = await client.reschedulePayment(123, new Date('2022-12-04')); -``` - - -### client.generatePayLink(body) ⇒ Promise -Generate a custom pay link - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfil**: object - The new pay link url - -| Param | Type | -| --- | --- | -| body | object | - -**Example** -```js -const custom = await client.generatePayLink({ - "title" : "my custom checkout", - "custom_message" : "some custom message" - "prices": [ - "USD:19.99", - "EUR:15.99" - ] - }); -``` - - -### client.getOrderDetails(ID) ⇒ Promise -Get details of Checkout Order - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfil**: object - Details of the Checkout order - -| Param | Type | Description | -| --- | --- | --- | -| ID | string | of the Checkout order | - -**Example** -```js -const result = await client.getOrderDetails('219233-chre53d41f940e0-58aqh94971'); -``` - - -### client.createSubscriptionModifier(subscriptionID, modifierAmount, options) ⇒ Promise -Create a subscription modifier to dynamically change the subscription payment amount - -**Kind**: instance method of [PaddleSDK](#PaddleSDK) -**Fulfil**: object - The result of the operation - -| Param | -| --- | -| subscriptionID | -| modifierAmount | -| options | - -**Example** -```js -const result = await client.createSubscriptionModifier(123, 10); -const result = await client.createSubscriptionModifier(123, 10, { modifier_recurring: false, modifier_description: 'description' }); -``` ---- - -Documentation generated on **Wed, 08 Feb 2023 10:02:53 GMT** diff --git a/Readme.md b/README.md similarity index 67% rename from Readme.md rename to README.md index 5b25d7e..b65af53 100644 --- a/Readme.md +++ b/README.md @@ -1,6 +1,6 @@ # Paddle.com Node.js SDK -[![Github Actions](https://github.com/avaly/paddle-sdk/actions/workflows/ci.yaml/badge.svg)](https://github.com/avaly/paddle-sdk/actions) +[![Github Actions](https://github.com/avaly/paddle-sdk/actions/workflows/tests.yaml/badge.svg)](https://github.com/avaly/paddle-sdk/actions) [![NPM version](https://img.shields.io/npm/v/paddle-sdk.svg?style=flat-square)](https://www.npmjs.com/package/paddle-sdk) Welcome to the [Paddle.com](https://www.paddle.com/) Node.js SDK documentation. @@ -21,24 +21,8 @@ $ yarn add paddle-sdk ## Usage -Using `Promise`: - -```js -const PaddleSDK = require('paddle-sdk'); - -const client = new PaddleSDK('your-vendor-id-here', 'your-unique-api-key-here'); - -client - .getProducts() - .then(console.log) - .then(() => client.getProductPlans(123)) - .then(console.log); -``` - -Using `async`/`await`: - -```js -const PaddleSDK = require('paddle-sdk'); +```ts +import { PaddleSDK } from 'paddle-sdk'; async function run() { const client = new PaddleSDK( @@ -56,9 +40,15 @@ async function run() { run(); ``` +For CommonJS: + +```js +const { PaddleSDK } = require('paddle-sdk'); +``` + ## Documentation -See the JSDoc markdown documentation in [Documentation.md](Documentation.md). +Read the [documentation](https://avaly.github.io/paddle-sdk/). ## Change log diff --git a/__tests__/coupons.test.js b/__tests__/coupons.test.js deleted file mode 100644 index 35bfa60..0000000 --- a/__tests__/coupons.test.js +++ /dev/null @@ -1,74 +0,0 @@ -const PaddleSDK = require('../sdk'); -const DEFAULT_ERROR = require('../utils/error'); -const nock = require('../utils/nock'); - -describe('coupons methods', () => { - let instance; - - const VENDOR_ID = 'foo'; - const VENDOR_API_KEY = 'bar'; - - const EXPECTED_BODY = { - vendor_id: VENDOR_ID, - vendor_auth_code: VENDOR_API_KEY, - }; - - beforeEach(() => { - instance = new PaddleSDK(VENDOR_ID, VENDOR_API_KEY, null, { - server: nock.SERVER, - }); - }); - - describe('getProductCoupons', () => { - const path = '/product/list_coupons'; - - const productID = '12345'; - const expectedBody = Object.assign( - { - product_id: productID, - }, - EXPECTED_BODY - ); - - it('resolves on successfull request', () => { - // https://paddle.com/docs/api-list-coupons - const body = { - success: true, - response: [ - { - id: 4227, - coupon: '56604810a6990', - description: '56604810a6dcd', - discount_type: 'percentage', - discount_amount: 0.5, - discount_currency: 'USD', - allowed_uses: 3, - times_used: 2, - expires: '2020-12-03 00:00:00', - product_id: '16970', - }, - ], - }; - - const scope = nock() - .post(path, expectedBody) - .reply(200, body); - - return instance.getProductCoupons(productID).then(response => { - expect(response).toEqual(body.response); - expect(scope.isDone()).toBeTruthy(); - }); - }); - - it('rejects on error request', () => { - const scope = nock() - .post(path, expectedBody) - .reply(400, DEFAULT_ERROR); - - return instance.getProductCoupons(productID).catch(err => { - expect(err.response.statusCode).toBe(400); - expect(scope.isDone()).toBeTruthy(); - }); - }); - }); -}); diff --git a/__tests__/products.test.js b/__tests__/products.test.js deleted file mode 100644 index 82d8226..0000000 --- a/__tests__/products.test.js +++ /dev/null @@ -1,102 +0,0 @@ -const PaddleSDK = require('../sdk'); -const DEFAULT_ERROR = require('../utils/error'); -const nock = require('../utils/nock'); - -describe('products methods', () => { - let instance; - - const VENDOR_ID = 'foo'; - const VENDOR_API_KEY = 'bar'; - - const EXPECTED_BODY = { - vendor_id: VENDOR_ID, - vendor_auth_code: VENDOR_API_KEY, - }; - - beforeEach(() => { - instance = new PaddleSDK(VENDOR_ID, VENDOR_API_KEY, null, { - server: nock.SERVER, - }); - }); - - describe('getProducts', () => { - const path = '/product/get_products'; - - it('resolves on successfull request', () => { - // https://paddle.com/docs/api-list-products - const body = { - success: true, - response: { - total: 2, - count: 2, - products: [ - { - id: 489171, - name: 'A Product', - description: 'A description of the product.', - base_price: 58, - sale_price: null, - screenshots: [], - icon: - 'https://paddle-static.s3.amazonaws.com/email/2013-04-10/og.png', - }, - { - id: 489278, - name: 'Another Product', - description: null, - base_price: 39.99, - sale_price: null, - screenshots: [], - icon: - 'https://paddle.s3.amazonaws.com/user/91/489278geekbench.png', - }, - ], - }, - }; - - const scope = nock() - .post(path, EXPECTED_BODY) - .reply(200, body); - - return instance.getProducts().then(response => { - expect(response).toEqual(body.response); - expect(scope.isDone()).toBeTruthy(); - }); - }); - - it('rejects on error response', () => { - const scope = nock() - .post(path, EXPECTED_BODY) - .reply(400, DEFAULT_ERROR); - - return instance.getProducts().then( - () => { - expect('This promise should fail').toBeFalsy(); - }, - err => { - expect(err.response.statusCode).toBe(400); - expect(scope.isDone()).toBeTruthy(); - } - ); - }); - - it('rejects on 200 response with error', () => { - const scope = nock() - .post(path, EXPECTED_BODY) - .reply(200, DEFAULT_ERROR); - - return instance.getProducts().then( - () => { - expect('This promise should fail').toBeFalsy(); - }, - err => { - expect(err).toBeTruthy(); - expect(err.message).toContain( - 'Request http://test.paddle.com/product/get_products returned an error!' - ); - expect(scope.isDone()).toBeTruthy(); - } - ); - }); - }); -}); diff --git a/__tests__/subscriptions.test.js b/__tests__/subscriptions.test.js deleted file mode 100644 index f8aa8aa..0000000 --- a/__tests__/subscriptions.test.js +++ /dev/null @@ -1,543 +0,0 @@ -const PaddleSDK = require('../sdk'); -const DEFAULT_ERROR = require('../utils/error'); -const nock = require('../utils/nock'); - -describe('subscription methods', () => { - let instance; - - const VENDOR_ID = 'foo'; - const VENDOR_API_KEY = 'bar'; - - const EXPECTED_BODY = { - vendor_id: VENDOR_ID, - vendor_auth_code: VENDOR_API_KEY, - }; - - const PRODUCT_ID = '12345'; - const PLAN_ID = '23456'; - const SUBSCRIPTION_ID = '34567'; - const PAYMENT_ID = '512345'; - const NEW_PAYMENT_DATE = new Date('2023-01-01'); - - beforeEach(() => { - instance = new PaddleSDK(VENDOR_ID, VENDOR_API_KEY, null, { - server: nock.SERVER, - }); - }); - - describe('getProductPlans', () => { - const path = '/subscription/plans'; - const expectedBody = Object.assign( - { - product_id: PRODUCT_ID, - }, - EXPECTED_BODY - ); - - it('resolves on successful request', () => { - // https://paddle.com/docs/api-list-plans - const body = { - success: true, - response: [ - { - id: 496197, - name: 'My App: Basic', - billing_type: 'month', - billing_period: 1, - initial_price: { - USD: '0.00', - }, - recurring_price: { - USD: '5.000', - }, - }, - { - id: 496198, - name: 'My App: Pro', - billing_type: 'day', - billing_period: 1, - initial_price: { - USD: '0.00', - }, - recurring_price: { - USD: '10.000', - }, - }, - { - id: 496199, - name: 'My App: Pro', - billing_type: 'month', - billing_period: 1, - initial_price: { - USD: '0.00', - }, - recurring_price: { - USD: '10.000', - }, - }, - ], - }; - - const scope = nock() - .post(path, expectedBody) - .reply(200, body); - - return instance.getProductPlans(PRODUCT_ID).then(response => { - expect(response).toEqual(body.response); - expect(scope.isDone()).toBeTruthy(); - }); - }); - - it('rejects on error request', () => { - const scope = nock() - .post(path, expectedBody) - .reply(400, DEFAULT_ERROR); - - return instance.getProductPlans(PRODUCT_ID).catch(err => { - expect(err.response.statusCode).toBe(400); - expect(scope.isDone()).toBeTruthy(); - }); - }); - }); - - describe('getPlanUsers', () => { - const path = '/subscription/users'; - const expectedBody = Object.assign( - { - plan: PLAN_ID, - }, - EXPECTED_BODY - ); - - it('resolves on successful request', () => { - // https://paddle.com/docs/api-list-users - const body = { - success: true, - response: [ - { - subscription_id: 502198, - plan_id: 496199, - user_id: 285846, - user_email: 'christian@paddle.com', - state: 'active', - signup_date: '2015-10-06 09:44:23', - last_payment: { - amount: 5, - currency: 'USD', - date: '2015-10-06', - }, - next_payment: { - amount: 10, - currency: 'USD', - date: '2015-11-06', - }, - }, - ], - }; - - const scope = nock() - .post(path, expectedBody) - .reply(200, body); - - return instance.getPlanUsers(PLAN_ID).then(response => { - expect(response).toEqual(body.response); - expect(scope.isDone()).toBeTruthy(); - }); - }); - - it('rejects on error request', () => { - const scope = nock() - .post(path, expectedBody) - .reply(400, DEFAULT_ERROR); - - return instance.getPlanUsers(PLAN_ID).catch(err => { - expect(err.response.statusCode).toBe(400); - expect(scope.isDone()).toBeTruthy(); - }); - }); - }); - - describe('getPlanPayments', () => { - const path = '/subscription/payments'; - const expectedBody = Object.assign( - { - plan: PLAN_ID, - }, - EXPECTED_BODY - ); - - it('resolves on successful request', () => { - // https://paddle.com/docs/api-list-payments - const body = { - success: true, - response: [ - { - id: 8936, - subscription_id: 2746, - amount: 1, - currency: 'USD', - payout_date: '2015-10-15', - is_paid: 0, - receipt_url: - 'https://www.paddle.com/receipt/469214-8936/1940881-chrea0eb34164b5-f0d6553bdf', - }, - ], - }; - - const scope = nock() - .post(path, expectedBody) - .reply(200, body); - - return instance.getPlanPayments(PLAN_ID).then(response => { - expect(response).toEqual(body.response); - expect(scope.isDone()).toBeTruthy(); - }); - }); - - it('rejects on error request', () => { - const scope = nock() - .post(path, expectedBody) - .reply(400, DEFAULT_ERROR); - - return instance.getPlanPayments(PLAN_ID).catch(err => { - expect(err.response.statusCode).toBe(400); - expect(scope.isDone()).toBeTruthy(); - }); - }); - }); - - describe('reschedulePayment', () => { - const path = '/subscription/payments_reschedule'; - const expectedBody = Object.assign( - { - payment_id: PAYMENT_ID, - date: NEW_PAYMENT_DATE.toISOString().substring(0, 10), - }, - EXPECTED_BODY - ); - - it('resolves on successful request', () => { - // https://developer.paddle.com/api-reference/fe93f28aa7f7e-reschedule-payment - const body = { - success: true, - response: [ - { - success: true, - }, - ], - }; - - const scope = nock() - .post(path, expectedBody) - .reply(200, body); - - return instance - .reschedulePayment(PAYMENT_ID, NEW_PAYMENT_DATE) - .then(response => { - expect(response).toEqual(body.response); - expect(scope.isDone()).toBeTruthy(); - }); - }); - - it('rejects on error request', () => { - const scope = nock() - .post(path, expectedBody) - .reply(400, DEFAULT_ERROR); - - return instance - .reschedulePayment(PAYMENT_ID, NEW_PAYMENT_DATE) - .catch(err => { - expect(err.response.statusCode).toBe(400); - expect(scope.isDone()).toBeTruthy(); - }); - }); - }); - - describe('updateSubscriptionPlan', () => { - const path = '/subscription/users/update'; - const expectedBody = Object.assign( - { - subscription_id: SUBSCRIPTION_ID, - plan_id: PLAN_ID, - prorate: false, - }, - EXPECTED_BODY - ); - - it('resolves on successful request', () => { - // https://developer.paddle.com/api-reference/subscription-api/subscription-users/updateuser - const body = { - success: true, - }; - - const scope = nock() - .post(path, expectedBody) - .reply(200, body); - - return instance - .updateSubscriptionPlan(SUBSCRIPTION_ID, PLAN_ID) - .then(response => { - expect(response).toEqual(body); - expect(scope.isDone()).toBeTruthy(); - }); - }); - - it('rejects on error request', () => { - const scope = nock() - .post(path, expectedBody) - .reply(400, DEFAULT_ERROR); - - return instance - .updateSubscriptionPlan(SUBSCRIPTION_ID, PLAN_ID) - .catch(err => { - expect(err.response.statusCode).toBe(400); - expect(scope.isDone()).toBeTruthy(); - }); - }); - }); - - describe('updateSubscription', () => { - const path = '/subscription/users/update'; - const expectedBody = Object.assign( - { - subscription_id: SUBSCRIPTION_ID, - plan_id: PLAN_ID, - quantity: 2, - recurring_price: 25.5, - currency: 'GBP', - }, - EXPECTED_BODY - ); - - it('resolves on successful request all params', () => { - // https://developer.paddle.com/api-reference/subscription-api/subscription-users/updateuser - const body = { - success: true, - }; - - const scope = nock() - .post(path, expectedBody) - .reply(200, body); - - return instance - .updateSubscription(SUBSCRIPTION_ID, { - planID: PLAN_ID, - quantity: 2, - price: 25.5, - currency: 'GBP', - }) - .then(response => { - expect(response).toEqual(body); - expect(scope.isDone()).toBeTruthy(); - }); - }); - - it('resolves on successful request quantity', () => { - const expectedBodyQuantity = Object.assign( - { - subscription_id: SUBSCRIPTION_ID, - quantity: 2, - }, - EXPECTED_BODY - ); - // https://developer.paddle.com/api-reference/subscription-api/subscription-users/updateuser - const body = { - success: true, - }; - - const scope = nock() - .post(path, expectedBodyQuantity) - .reply(200, body); - - return instance - .updateSubscription(SUBSCRIPTION_ID, { - quantity: 2, - }) - .then(response => { - expect(response).toEqual(body); - expect(scope.isDone()).toBeTruthy(); - }); - }); - - it('resolves on successful pause subscription', () => { - const expectedBody = Object.assign( - { - subscription_id: SUBSCRIPTION_ID, - pause: true, - }, - EXPECTED_BODY - ); - // https://developer.paddle.com/api-reference/subscription-api/subscription-users/updateuser - const body = { - success: true, - }; - - const scope = nock() - .post(path, expectedBody) - .reply(200, body); - - return instance - .updateSubscription(SUBSCRIPTION_ID, { - pause: true, - }) - .then(response => { - expect(response).toEqual(body); - expect(scope.isDone()).toBeTruthy(); - }); - }); - - it('resolves on successful renew subscription', () => { - const expectedBody = Object.assign( - { - subscription_id: SUBSCRIPTION_ID, - pause: false, - }, - EXPECTED_BODY - ); - // https://developer.paddle.com/api-reference/subscription-api/subscription-users/updateuser - const body = { - success: true, - }; - - const scope = nock() - .post(path, expectedBody) - .reply(200, body); - - return instance - .updateSubscription(SUBSCRIPTION_ID, { - pause: false, - }) - .then(response => { - expect(response).toEqual(body); - expect(scope.isDone()).toBeTruthy(); - }); - }); - - it('rejects on error request', () => { - const scope = nock() - .post(path, expectedBody) - .reply(400, DEFAULT_ERROR); - - return instance - .updateSubscription(SUBSCRIPTION_ID, { - planID: PLAN_ID, - quantity: 2, - price: 25.5, - currency: 'GBP', - }) - .catch(err => { - expect(err.response.statusCode).toBe(400); - expect(scope.isDone()).toBeTruthy(); - }); - }); - }); - - describe('cancelSubscription', () => { - const path = '/subscription/users_cancel'; - const expectedBody = Object.assign( - { - subscription_id: SUBSCRIPTION_ID, - }, - EXPECTED_BODY - ); - - it('resolves on successful request', () => { - // https://paddle.com/docs/api-cancelling-subscriptions - const body = { - success: true, - }; - - const scope = nock() - .post(path, expectedBody) - .reply(200, body); - - return instance.cancelSubscription(SUBSCRIPTION_ID).then(response => { - expect(response).toEqual(body); - expect(scope.isDone()).toBeTruthy(); - }); - }); - - it('rejects on error request', () => { - const scope = nock() - .post(path, expectedBody) - .reply(400, DEFAULT_ERROR); - - return instance.cancelSubscription(SUBSCRIPTION_ID).catch(err => { - expect(err.response.statusCode).toBe(400); - expect(scope.isDone()).toBeTruthy(); - }); - }); - }); - - describe('createSubscriptionModifier', () => { - const path = '/subscription/modifiers/create'; - const expectedBody = Object.assign( - { - subscription_id: SUBSCRIPTION_ID, - modifier_amount: 10, - }, - EXPECTED_BODY - ); - - it('resolves on successful request', () => { - // https://developer.paddle.com/api-reference/dc2b0c06f0481-create-modifier - const body = { - success: true, - }; - - const scope = nock() - .post(path, expectedBody) - .reply(200, body); - - return instance - .createSubscriptionModifier(SUBSCRIPTION_ID, 10) - .then(response => { - expect(response).toEqual(body); - expect(scope.isDone()).toBeTruthy(); - }); - }); - - it('resolves on successful request all params', () => { - const expectedBody = Object.assign( - { - subscription_id: SUBSCRIPTION_ID, - modifier_amount: 10, - modifier_recurring: false, - modifier_description: 'description', - }, - EXPECTED_BODY - ); - // https://developer.paddle.com/api-reference/dc2b0c06f0481-create-modifier - const body = { - success: true, - }; - - const scope = nock() - .post(path, expectedBody) - .reply(200, body); - - return instance - .createSubscriptionModifier(SUBSCRIPTION_ID, 10, { - modifier_recurring: false, - modifier_description: 'description', - }) - .then(response => { - expect(response).toEqual(body); - expect(scope.isDone()).toBeTruthy(); - }); - }); - - it('rejects on error request', () => { - const scope = nock() - .post(path, expectedBody) - .reply(400, DEFAULT_ERROR); - - return instance - .createSubscriptionModifier(SUBSCRIPTION_ID, 10) - .catch(err => { - expect(err.response.statusCode).toBe(400); - expect(scope.isDone()).toBeTruthy(); - }); - }); - }); -}); diff --git a/__tests__/transactions.test.js b/__tests__/transactions.test.js deleted file mode 100644 index ac62807..0000000 --- a/__tests__/transactions.test.js +++ /dev/null @@ -1,179 +0,0 @@ -const PaddleSDK = require('../sdk'); -const DEFAULT_ERROR = require('../utils/error'); -const nock = require('../utils/nock'); - -describe('transactions methods', () => { - let instance; - - const VENDOR_ID = 'foo'; - const VENDOR_API_KEY = 'bar'; - - // https://developer.paddle.com/api-reference/b3A6MzA3NDQ3MjQ-list-transactions#request-parameters - const RESPONSE = { - success: true, - response: [ - { - order_id: '1042907-384786', - checkout_id: '4795118-chre895f5cfaf61-4d7dafa9df', - amount: '5.00', - currency: 'USD', - status: 'completed', - created_at: '2017-01-22 00:38:43', - passthrough: null, - product_id: 12345, - is_subscription: true, - is_one_off: false, - subscription: { - subscription_id: 123456, - status: 'active', - }, - user: { - user_id: 29777, - email: 'example@paddle.com', - marketing_consent: true, - }, - receipt_url: - 'https://my.paddle.com/receipt/1042907-384786/4795118-chre895f5cfaf61-4d7dafa9df', - }, - { - order_id: '1042907-384785', - checkout_id: '4795118-chre895f5cfaf61-4d7dafa9df', - amount: '5.00', - currency: 'USD', - status: 'refunded', - created_at: '2016-12-07 12:25:09', - passthrough: null, - product_id: 12345, - is_subscription: true, - is_one_off: true, - subscription: { - subscription_id: 123456, - status: 'active', - }, - user: { - user_id: 29777, - email: 'example@paddle.com', - marketing_consent: true, - }, - receipt_url: - 'https://my.paddle.com/receipt/1042907-384785/4795118-chre895f5cfaf61-4d7dafa9df', - }, - ], - }; - const EXPECTED_BODY = { - vendor_id: VENDOR_ID, - vendor_auth_code: VENDOR_API_KEY, - }; - - beforeEach(() => { - instance = new PaddleSDK(VENDOR_ID, VENDOR_API_KEY, null, { - server: nock.SERVER, - }); - }); - - describe('getUserTransactions', () => { - const path = '/user/123/transactions'; - - test('resolves on successfull request', () => { - const scope = nock() - .post(path, EXPECTED_BODY) - .reply(200, RESPONSE); - - return instance.getUserTransactions(123).then(response => { - expect(response).toEqual(RESPONSE.response); - expect(scope.isDone()).toBeTruthy(); - }); - }); - - test('resolves on paged request', () => { - const scope = nock() - .post(path, Object.assign({ page: 2 }, EXPECTED_BODY)) - .reply(200, RESPONSE); - - return instance.getUserTransactions(123, 2).then(response => { - expect(response).toEqual(RESPONSE.response); - expect(scope.isDone()).toBeTruthy(); - }); - }); - - test('rejects on error response', () => { - const scope = nock() - .post(path, EXPECTED_BODY) - .reply(400, DEFAULT_ERROR); - - return instance.getUserTransactions(123).then( - () => { - expect('This promise should fail').toBeFalsy(); - }, - err => { - expect(err.response.statusCode).toBe(400); - expect(scope.isDone()).toBeTruthy(); - } - ); - }); - - test('rejects on 200 response with error', () => { - const scope = nock() - .post(path, EXPECTED_BODY) - .reply(200, DEFAULT_ERROR); - - return instance.getUserTransactions(123).then( - () => { - expect('This promise should fail').toBeFalsy(); - }, - err => { - expect(err).toBeTruthy(); - expect(err.message).toContain( - 'Request http://test.paddle.com/user/123/transactions returned an error!' - ); - expect(scope.isDone()).toBeTruthy(); - } - ); - }); - }); - - describe('getSubscriptionTransactions', () => { - const path = '/subscription/123/transactions'; - - test('resolves on successfull request', () => { - const scope = nock() - .post(path, EXPECTED_BODY) - .reply(200, RESPONSE); - - return instance.getSubscriptionTransactions(123).then(response => { - expect(response).toEqual(RESPONSE.response); - expect(scope.isDone()).toBeTruthy(); - }); - }); - }); - - describe('getOrderTransactions', () => { - const path = '/order/123/transactions'; - - test('resolves on successfull request', () => { - const scope = nock() - .post(path, EXPECTED_BODY) - .reply(200, RESPONSE); - - return instance.getOrderTransactions(123).then(response => { - expect(response).toEqual(RESPONSE.response); - expect(scope.isDone()).toBeTruthy(); - }); - }); - }); - - describe('getCheckoutTransactions', () => { - const path = '/checkout/123/transactions'; - - test('resolves on successfull request', () => { - const scope = nock() - .post(path, EXPECTED_BODY) - .reply(200, RESPONSE); - - return instance.getCheckoutTransactions(123).then(response => { - expect(response).toEqual(RESPONSE.response); - expect(scope.isDone()).toBeTruthy(); - }); - }); - }); -}); diff --git a/__tests__/users.test.js b/__tests__/users.test.js deleted file mode 100644 index aa3128b..0000000 --- a/__tests__/users.test.js +++ /dev/null @@ -1,115 +0,0 @@ -const PaddleSDK = require('../sdk'); -const DEFAULT_ERROR = require('../utils/error'); -const nock = require('../utils/nock'); - -describe('users methods', () => { - let instance; - - const VENDOR_ID = 'foo'; - const VENDOR_API_KEY = 'bar'; - - const EXPECTED_BODY = { - vendor_id: VENDOR_ID, - vendor_auth_code: VENDOR_API_KEY, - }; - - beforeEach(() => { - instance = new PaddleSDK(VENDOR_ID, VENDOR_API_KEY, null, { - server: nock.SERVER, - }); - }); - - describe('getUsers', () => { - const path = '/subscription/users'; - const expectedBody = Object.assign( - { - page: 1, - results_per_page: 200, - }, - EXPECTED_BODY - ); - - it('resolves on successful request', () => { - // https://developer.paddle.com/api-reference/e33e0a714a05d-list-users - const body = { - success: true, - response: [ - { - subscription_id: 502198, - plan_id: 496199, - user_id: 285846, - user_email: 'name@example.com', - marketing_consent: true, - update_url: - 'https://subscription-management.paddle.com/subscription/87654321/hash/eyJpdiI6IlU0Nk5cL1JZeHQyTXd.../update', - cancel_url: - 'https://subscription-management.paddle.com/subscription/87654321/hash/eyJpdiI6IlU0Nk5cL1JZeHQyTXd.../cancel', - state: 'active', - signup_date: '2015-10-06 09:44:23', - last_payment: { - amount: 5, - currency: 'USD', - date: '2015-10-06', - }, - payment_information: { - payment_method: 'card', - card_type: 'visa', - last_four_digits: '1111', - expiry_date: '02/2020', - }, - quantity: 3, - next_payment: { - amount: 10, - currency: 'USD', - date: '2015-11-06', - }, - }, - ], - }; - - const scope = nock() - .post(path, expectedBody) - .reply(200, body); - - return instance.getUsers().then(response => { - expect(response).toEqual(body.response); - expect(scope.isDone()).toBeTruthy(); - }); - }); - - it('rejects on error response', () => { - const scope = nock() - .post(path, expectedBody) - .reply(400, DEFAULT_ERROR); - - return instance.getUsers().then( - () => { - expect('This promise should fail').toBeFalsy(); - }, - err => { - expect(err.response.statusCode).toBe(400); - expect(scope.isDone()).toBeTruthy(); - } - ); - }); - - it('rejects on 200 response with error', () => { - const scope = nock() - .post(path, expectedBody) - .reply(200, DEFAULT_ERROR); - - return instance.getUsers().then( - () => { - expect('This promise should fail').toBeFalsy(); - }, - err => { - expect(err).toBeTruthy(); - expect(err.message).toContain( - 'Request http://test.paddle.com/subscription/users returned an error! response={"success":false,"error":{"code":123,"message":"Error message."}}' - ); - expect(scope.isDone()).toBeTruthy(); - } - ); - }); - }); -}); diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..3ae0cd4 --- /dev/null +++ b/build.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -euxo pipefail + +# ESM + +tsc --project ./tsconfig-esm.json + +# https://stackoverflow.com/a/22084103 +# This works in Linux and MacOS +sed -i.backup -e "s/from '.\/\(.*\)';/from '.\/\1.js';/g" ./esm/*.js +rm ./esm/*.js.backup + +# CommonJS + +tsc --project ./tsconfig-cjs.json + +echo "{\"type\":\"commonjs\"}" > ./cjs/package.json diff --git a/docs/helpers.js b/docs/helpers.js deleted file mode 100644 index 21d1d06..0000000 --- a/docs/helpers.js +++ /dev/null @@ -1,3 +0,0 @@ -exports.generatedDate = function() { - return new Date().toUTCString(); -}; diff --git a/docs/main.hbs b/docs/main.hbs deleted file mode 100644 index c93876d..0000000 --- a/docs/main.hbs +++ /dev/null @@ -1,11 +0,0 @@ -# Paddle.com Node.js SDK Documentation - -Welcome to the [Paddle.com](http://www.paddle.com/) Node.js SDK documentation. - -{{>main-index~}} - -{{>all-docs~}} - ---- - -Documentation generated on **{{generatedDate}}** diff --git a/jest.config.ts b/jest.config.ts new file mode 100644 index 0000000..e2d3cbf --- /dev/null +++ b/jest.config.ts @@ -0,0 +1,8 @@ +import type { Config } from 'jest'; + +const config: Config = { + preset: 'ts-jest', + testEnvironment: 'node', +}; + +export default config; diff --git a/lib/serialize.d.ts b/lib/serialize.d.ts deleted file mode 100644 index 6cd3d95..0000000 --- a/lib/serialize.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export = serialize; -declare function serialize(mixedValue: any): string; diff --git a/package.json b/package.json index 077fe8b..df62c25 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,10 @@ "name": "paddle-sdk", "description": "The Paddle.com Node.js SDK", "version": "3.3.0", - "main": "sdk.js", - "types": "sdk.d.ts", + "type": "module", + "main": "./cjs/sdk.js", + "exports": "./esm/sdk.js", + "types": "./esm/sdk.d.ts", "author": "Valentin Agachi ", "repository": { "type": "git", @@ -21,37 +23,43 @@ "node": ">=14.0.0" }, "files": [ - "sdk.js", - "sdk.d.ts", - "lib/" + "cjs/", + "esm/" ], "scripts": { - "docs": "jsdoc2md --partial docs/main.hbs --helper docs/helpers.js --files sdk.js > Documentation.md", - "lint": "eslint . --cache --fix --ignore-pattern '!.eslintrc.js'", - "pretty": "prettier --write --list-different \"**/*.js\"", - "release": "yarn docs && git add Documentation.md && standard-version -a", - "test:jest": "jest", - "test:pretty": "prettier --check \"**/*.js\"", - "test:watch": "jest --watch", - "test:coverage": "jest --coverage", + "build": "./build.sh", + "docs": "typedoc", + "lint": "eslint . --cache --fix --ignore-pattern '!.eslintrc.cjs'", + "prepack": "yarn build", + "pretty": "prettier --write --list-different \"**/*.ts\"", + "release": "standard-version -a", "test": "yarn test:jest", - "pretest": "yarn lint", - "declaration:build": "tsc --allowJs --declaration --emitDeclarationOnly sdk.js" + "test:coverage": "jest --coverage", + "test:jest": "jest", + "test:pretty": "prettier --check \"**/*.ts\"", + "test:types": "tsc --noEmit", + "test:watch": "jest --watch" }, "dependencies": { "got": "^10.2.0" }, "devDependencies": { - "eslint": "^8.0.0", - "husky": "^3.1.0", - "jest": "^29.0.0", - "jsdoc-to-markdown": "^5.0.3", - "lint-staged": "^9.5.0", - "nock": "^11.7.0", - "prettier": "^1.19.1", - "standard-version": "^8.0.0", - "typescript": "^3.8.3", - "validate-commit-msg": "^2.14.0" + "@types/jest": "29.5.0", + "@types/node": "14.18.36", + "@typescript-eslint/eslint-plugin": "5.56.0", + "@typescript-eslint/parser": "5.56.0", + "eslint": "8.36.0", + "husky": "3.1.0", + "jest": "29.5.0", + "lint-staged": "9.5.0", + "nock": "11.7.0", + "prettier": "2.8.7", + "standard-version": "8.0.0", + "ts-jest": "29.0.5", + "ts-node": "10.9.1", + "typedoc": "0.23.28", + "typescript": "5.0.2", + "validate-commit-msg": "2.14.0" }, "husky": { "hooks": { diff --git a/prettier.config.js b/prettier.config.cjs similarity index 100% rename from prettier.config.js rename to prettier.config.cjs diff --git a/sdk.d.ts b/sdk.d.ts deleted file mode 100644 index 933f367..0000000 --- a/sdk.d.ts +++ /dev/null @@ -1,349 +0,0 @@ -export = PaddleSDK; -declare class PaddleSDK { - /** - * @class PaddleSDK - * @typicalname client - * @param {string} vendorID - The vendor ID for a Paddle account - * @param {string} apiKey - The API key for a Paddle account - * @param {string} [publicKey] - The public key for a Paddle account used to verify webhooks, only required for `verifyWebhookData` - * @param {object} [options] - * @param {boolean} [options.sandbox=false] - Whether to use the sandbox server URL - * @param {string} [options.server=vendors.paddle.com/api/2.0] - The server URL prefix for all requests - * - * @example - * const client = new PaddleSDK('your-vendor-id', 'your-unique-api-key'); - * const client = new PaddleSDK('your-vendor-id', 'your-unique-api-key', 'your-public-key'); - */ - constructor(vendorID: string, apiKey: string, publicKey?: string, options?: { - sandbox?: boolean; - server?: string; - }); - vendorID: string; - apiKey: string; - publicKey: string; - options: { - sandbox?: boolean; - server?: string; - }; - /** - * Execute a HTTP request - * - * @private - * @param {string} url - url to do request - * @param {object} options - * @param {object} [options.body] - body parameters / object - * @param {object} [options.headers] - header parameters - * @param {boolean} [options.form] - form parameter (ref: got package) - * @param {boolean} [options.json] - json parameter (ref: got package) - */ - private _request; - _getDefaultBody(): { - vendor_id: string; - vendor_auth_code: string; - }; - /** - * Get the used server URL. Some of the requests go to Checkout server, while most will go to Vendor server. - * - * @private - */ - private _serverURL; - /** - * Get the list of required headers for an API request - * - * @private - * @param {object} [additionalHeaders={}] - headers object - */ - private _getDefaultHeaders; - /** - * Get the current list of products - * - * @method - * @returns {Promise} - * @fulfil {object} - The products list - * - * @example - * const products = await client.getProducts(); - */ - getProducts(): Promise; - /** - * Get the current list of coupons for a product - * - * @method - * @param {number} productID - * @returns {Promise} - * @fulfil {object} - The coupons list - * - * @example - * const coupons = await client.getProductCoupons(123); - */ - getProductCoupons(productID: number): Promise; - /** - * Get the current list of all plans or plans for a subscription - * - * @method - * @param {number} [productID] - * @returns {Promise} - * @fulfil {object} - The plans list - * - * @example - * const plans = await client.getProductPlans(); - * const plans = await client.getProductPlans(123); - */ - getProductPlans(productID?: number): Promise; - /** - * Get the plan based on its ID - * - * @method - * @param {number} [planId] - * @returns {Promise} - * @fulfil {object} - The requested plan - * - * @example - * const plan = await client.getProductPlan(123); - */ - getProductPlan(planId?: number): Promise; - /** - * Get the current list of all users or users for a subscription plan - * - * @method - * @param {number} [planID] - * @returns {Promise} - * @fulfil {object} - The users list - * - * @example - * const users = await client.getPlanUsers(); - * const users = await client.getPlanUsers(123); - */ - getPlanUsers(planID?: number): Promise; - /** - * Get the list of all payments or payments for a subscription plan - * - * @method - * @param {number} [planID] - * @returns {Promise} - * @fulfil {object} - The payments list - * - * @example - * const payments = await client.getPlanPayments(); - * const payments = await client.getPlanPayments(123); - */ - getPlanPayments(planID?: number): Promise; - /** - * Get the list of webhooks history - * - * @method - * @returns {Promise} - * @fulfil {object} - The webhooks history list - * - * @example - * const webhooksHistory = await client.getWebhooksHistory(); - */ - getWebhooksHistory(): Promise; - /** - * Get the list of transations for a resource - * - * @private - * @returns {Promise} - * @fulfil {object} - The transations list - */ - private _getTransactions; - /** - * Get the list of transations for a user - * - * @method - * @param {number} userID - * @param {number} [page] - * @returns {Promise} - * @fulfil {object} - The transations list - * - * @example - * const userTransactions = await client.getUserTransactions(123); - * const userTransactionsNext = await client.getUserTransactions(123, 2); - */ - getUserTransactions(userID: number, page?: number): Promise; - /** - * Get the list of transations for a subscription - * - * @method - * @param {number} subscriptionID - * @param {number} [page] - * @returns {Promise} - * @fulfil {object} - The transations list - * - * @example - * const subscriptionTransactions = await client.getSubscriptionTransactions(123); - * const subscriptionTransactionsNext = await client.getSubscriptionTransactions(123, 2); - */ - getSubscriptionTransactions(subscriptionID: number, page?: number): Promise; - /** - * Get the list of transations for an order - * - * @method - * @param {number} orderID - * @param {number} [page] - * @returns {Promise} - * @fulfil {object} - The transations list - * - * @example - * const orderTransactions = await client.getOrderTransactions(123); - * const orderTransactionsNext = await client.getOrderTransactions(123, 2); - */ - getOrderTransactions(orderID: number, page?: number): Promise; - /** - * Get the list of transations for a checkout - * - * @method - * @param {number} checkoutID - * @param {number} [page] - * @returns {Promise} - * @fulfil {object} - The transations list - * - * @example - * const checkoutTransactions = await client.getCheckoutTransactions(123); - * const checkoutTransactionsNext = await client.getCheckoutTransactions(123, 2); - */ - getCheckoutTransactions(checkoutID: number, page?: number): Promise; - /** - * Verify a webhook alert data using signature and a public key to validate that - * it was indeed sent from Paddle. - * - * For more details: https://paddle.com/docs/reference-verifying-webhooks - * - * @method - * @param {Object} postData The object with all the parameters sent to the webhook - * @return {boolean} - * - * @example - * const client = new PaddleSDK('your-vendor-id', 'your-unique-api-key', 'your-public-key'); - * - * // inside an Express handler which uses express.bodyParser middleware - * const isVerified = client.verifyWebhookData(req.body); - */ - verifyWebhookData(postData: any): boolean; - /** - * Get subscription details - * - * @method - * @param {number} subscriptionID - * @returns {Promise} - * @fulfill {object} - Details of a single subscription - * - * @example - * const result = await client.getSubscriptionPlan(123); - */ - getSubscriptionPlan(subscriptionID: number): Promise; - /** - * Update (upgrade/downgrade) the plan of a subscription - * - * @method - * @param {number} subscriptionID - * @param {number} planID - * @param {boolean} prorate - * @returns {Promise} - * @fulfill {object} - The result of the operation - * - * @example - * const result = await client.updateSubscriptionPlan(123); - */ - updateSubscriptionPlan(subscriptionID: number, planID: number, prorate?: boolean): Promise; - /** - * Update subscription details, quantity, price and or currency - * - * @method - * @param {number} subscriptionID - * @param {Object} postData { quantity, price, planID, currency, prorate, keepModifiers, billImmediately, pause } - * @returns {Promise} - * @fulfill {object} - The result of the operation - * - * @example - * const result = await client.updateSubscriptionPlan(123, { quantity: 2 }); - */ - updateSubscription(subscriptionID: number, postData: any): Promise; - /** - * Cancels an active subscription - * - * @method - * @param {number} subscriptionID - * @returns {Promise} - * @fulfil {object} - The result of the operation - * - * @example - * const result = await client.cancelSubscription(123); - */ - cancelSubscription(subscriptionID: number): Promise; - /** - * Get the list of all users - * - * @method - * @param {Object} options { page, resultsPerPage, state, planId } - * @returns {Promise} - * @fulfil {object} - The users list - * - * @example - * const users = await client.getUsers(); - * const users = await client.getUsers({ state: 'active' }); - * - * @note - * If you have a large amount of active users, you will need to create paginated calls to this function. - */ - getUsers(options?: any): Promise; - /** - * Change the due date of an upcoming subscription payment - * - * @method - * @param {number} paymentID - * @param {Date} date - Only the date portion of the date value is used - * @returns {Promise} - * @fulfill {object} - The result of the operation - * - * @example - * const result = await client.reschedulePayment(123, new Date('2022-12-04')); - */ - reschedulePayment(paymentID: number, date: Date): Promise; - /** - * Generate a custom pay link - * - * @method - * @param {object} body - * @returns {Promise} - * @fulfil {object} - The new pay link url - * - * @example - * const custom = await client.generatePayLink({ - * "title" : "my custom checkout", - * "custom_message" : "some custom message" - * "prices": [ - * "USD:19.99", - * "EUR:15.99" - * ] - * }); - */ - generatePayLink(body: any): Promise; - /** - * Get details of Checkout Order - * - * @method - * @param {string} ID of the Checkout order - * @returns {Promise} - * @fulfil {object} - Details of the Checkout order - * - * @example - * const result = await client.getOrderDetails('219233-chre53d41f940e0-58aqh94971'); - */ - getOrderDetails(checkoutId: any): Promise; - /** - * Create a subscription modifier to dynamically change the subscription payment amount - * - * @method - * @param subscriptionID - * @param modifierAmount - * @param options - * @returns {Promise} - * @fulfil {object} - The result of the operation - * - * @example - * const result = await client.createSubscriptionModifier(123, 10); - * const result = await client.createSubscriptionModifier(123, 10, { modifier_recurring: false, modifier_description: 'description' }); - */ - createSubscriptionModifier(subscriptionID: any, modifierAmount: any, options?: {}): Promise; -} diff --git a/sdk.js b/sdk.js deleted file mode 100644 index 30e7691..0000000 --- a/sdk.js +++ /dev/null @@ -1,628 +0,0 @@ -const crypto = require('crypto'); -const got = require('got'); - -const pkg = require('./package.json'); -const serialize = require('./lib/serialize'); - -const VENDOR_SANDBOX_URL = 'https://sandbox-vendors.paddle.com/api/2.0'; -const VENDOR_SERVER_URL = 'https://vendors.paddle.com/api/2.0'; - -const CHECKOUT_SANDBOX_URL = 'https://sandbox-checkout.paddle.com/api/1.0'; -const CHECKOUT_SERVER_URL = 'https://checkout.paddle.com/api/1.0'; - -class PaddleSDK { - /** - * @class PaddleSDK - * @typicalname client - * @param {string} vendorID - The vendor ID for a Paddle account - * @param {string} apiKey - The API key for a Paddle account - * @param {string} [publicKey] - The public key for a Paddle account used to verify webhooks, only required for `verifyWebhookData` - * @param {object} [options] - * @param {boolean} [options.sandbox=false] - Whether to use the sandbox server URL - * @param {string} [options.server=vendors.paddle.com/api/2.0] - The server URL prefix for all requests - * - * @example - * const client = new PaddleSDK('your-vendor-id', 'your-unique-api-key'); - * const client = new PaddleSDK('your-vendor-id', 'your-unique-api-key', 'your-public-key'); - */ - constructor(vendorID, apiKey, publicKey, options) { - this.vendorID = vendorID || 'MISSING'; - this.apiKey = apiKey || 'MISSING'; - this.publicKey = publicKey || 'MISSING'; - this.options = options; - } - - /** - * Execute a HTTP request - * - * @private - * @param {string} url - url to do request - * @param {object} options - * @param {object} [options.body] - body parameters / object - * @param {object} [options.headers] - header parameters - * @param {boolean} [options.form] - form parameter (ref: got package) - * @param {boolean} [options.json] - json parameter (ref: got package) - */ - _request( - path, - { - body = {}, - headers = {}, - form = true, - json = false, - returnFirstItem = false, - checkoutAPI = false, - } = {} - ) { - const url = this._serverURL(checkoutAPI) + path; - // Requests to Checkout API are using only GET, - const method = checkoutAPI ? 'GET' : 'POST'; - const fullBody = Object.assign(body, this._getDefaultBody()); - - const options = { - headers: this._getDefaultHeaders(headers), - method, - }; - if (method !== 'GET') { - if (form) { - options.form = fullBody; - } - if (json) { - options.json = fullBody; - } - } - // console.log('options', options); - - return got(url, options) - .json() - .then(body => { - if (typeof body.success === 'boolean') { - if (body.success) { - const response = body.response || body; - if (returnFirstItem && Array.isArray(response)) { - return response[0]; - } - return response; - } - - throw new Error( - `Request ${url} returned an error! response=${JSON.stringify(body)}` - ); - } - - return body; - }); - } - - _getDefaultBody() { - return { - vendor_id: this.vendorID, - vendor_auth_code: this.apiKey, - }; - } - - /** - * Get the used server URL. Some of the requests go to Checkout server, while most will go to Vendor server. - * - * @private - */ - _serverURL(checkoutAPI = false) { - return ( - (this.options && this.options.server) || - (checkoutAPI && - (this.options && this.options.sandbox - ? CHECKOUT_SANDBOX_URL - : CHECKOUT_SERVER_URL)) || - (this.options && this.options.sandbox - ? VENDOR_SANDBOX_URL - : VENDOR_SERVER_URL) - ); - } - - /** - * Get the list of required headers for an API request - * - * @private - * @param {object} [additionalHeaders={}] - headers object - */ - _getDefaultHeaders(additionalHeaders) { - return Object.assign( - { - 'User-Agent': `paddle-sdk/${pkg.version} (${pkg.repository.url})`, - }, - additionalHeaders || {} - ); - } - - /** - * Get the current list of products - * - * @method - * @returns {Promise} - * @fulfil {object} - The products list - * - * @example - * const products = await client.getProducts(); - */ - getProducts() { - return this._request('/product/get_products'); - } - - /** - * Get the current list of coupons for a product - * - * @method - * @param {number} productID - * @returns {Promise} - * @fulfil {object} - The coupons list - * - * @example - * const coupons = await client.getProductCoupons(123); - */ - getProductCoupons(productID) { - return this._request('/product/list_coupons', { - body: { product_id: productID }, - }); - } - - /** - * Get the current list of all plans or plans for a subscription - * - * @method - * @param {number} [productID] - * @returns {Promise} - * @fulfil {object} - The plans list - * - * @example - * const plans = await client.getProductPlans(); - * const plans = await client.getProductPlans(123); - */ - getProductPlans(productID) { - return this._request('/subscription/plans', { - body: { product_id: productID }, - }); - } - - /** - * Get the plan based on its ID - * - * @method - * @param {number} [planId] - * @returns {Promise} - * @fulfil {object} - The requested plan - * - * @example - * const plan = await client.getProductPlan(123); - */ - getProductPlan(planId) { - return this._request('/subscription/plans', { - body: { plan: planId }, - returnFirstItem: true, - }); - } - - /** - * Get the current list of all users or users for a subscription plan - * - * @method - * @param {number} [planID] - * @returns {Promise} - * @fulfil {object} - The users list - * - * @example - * const users = await client.getPlanUsers(); - * const users = await client.getPlanUsers(123); - */ - getPlanUsers(planID) { - return this._request('/subscription/users', { - body: planID ? { plan: planID } : {}, - }); - } - - /** - * Get the list of all payments or payments for a subscription plan - * - * @method - * @param {number} [planID] - * @returns {Promise} - * @fulfil {object} - The payments list - * - * @example - * const payments = await client.getPlanPayments(); - * const payments = await client.getPlanPayments(123); - */ - getPlanPayments(planID) { - return this._request('/subscription/payments', { - body: { plan: planID }, - }); - } - - /** - * Get the list of webhooks history - * - * @method - * @returns {Promise} - * @fulfil {object} - The webhooks history list - * - * @example - * const webhooksHistory = await client.getWebhooksHistory(); - */ - getWebhooksHistory() { - return this._request('/alert/webhooks'); - } - - /** - * Get the list of transations for a resource - * - * @private - * @returns {Promise} - * @fulfil {object} - The transations list - */ - _getTransactions(type, id, page) { - return this._request( - `/${type}/${id}/transactions`, - page ? { body: { page } } : undefined - ); - } - - /** - * Get the list of transations for a user - * - * @method - * @param {number} userID - * @param {number} [page] - * @returns {Promise} - * @fulfil {object} - The transations list - * - * @example - * const userTransactions = await client.getUserTransactions(123); - * const userTransactionsNext = await client.getUserTransactions(123, 2); - */ - getUserTransactions(userID, page) { - return this._getTransactions('user', userID, page); - } - - /** - * Get the list of transations for a subscription - * - * @method - * @param {number} subscriptionID - * @param {number} [page] - * @returns {Promise} - * @fulfil {object} - The transations list - * - * @example - * const subscriptionTransactions = await client.getSubscriptionTransactions(123); - * const subscriptionTransactionsNext = await client.getSubscriptionTransactions(123, 2); - */ - getSubscriptionTransactions(subscriptionID, page) { - return this._getTransactions('subscription', subscriptionID, page); - } - - /** - * Get the list of transations for an order - * - * @method - * @param {number} orderID - * @param {number} [page] - * @returns {Promise} - * @fulfil {object} - The transations list - * - * @example - * const orderTransactions = await client.getOrderTransactions(123); - * const orderTransactionsNext = await client.getOrderTransactions(123, 2); - */ - getOrderTransactions(orderID, page) { - return this._getTransactions('order', orderID, page); - } - - /** - * Get the list of transations for a checkout - * - * @method - * @param {number} checkoutID - * @param {number} [page] - * @returns {Promise} - * @fulfil {object} - The transations list - * - * @example - * const checkoutTransactions = await client.getCheckoutTransactions(123); - * const checkoutTransactionsNext = await client.getCheckoutTransactions(123, 2); - */ - getCheckoutTransactions(checkoutID, page) { - return this._getTransactions('checkout', checkoutID, page); - } - - /** - * Verify a webhook alert data using signature and a public key to validate that - * it was indeed sent from Paddle. - * - * For more details: https://paddle.com/docs/reference-verifying-webhooks - * - * @method - * @param {Object} postData The object with all the parameters sent to the webhook - * @return {boolean} - * - * @example - * const client = new PaddleSDK('your-vendor-id', 'your-unique-api-key', 'your-public-key'); - * - * // inside an Express handler which uses express.bodyParser middleware - * const isVerified = client.verifyWebhookData(req.body); - */ - verifyWebhookData(postData) { - const signature = postData.p_signature; - - const keys = Object.keys(postData) - .filter(key => key !== 'p_signature') - .sort(); - - const sorted = {}; - keys.forEach(key => { - sorted[key] = postData[key]; - }); - - // PHP style serialize! :O - const serialized = serialize(sorted); - - try { - const verifier = crypto.createVerify('sha1'); - verifier.write(serialized); - verifier.end(); - - return verifier.verify(this.publicKey, signature, 'base64'); - } catch (err) { - return false; - } - } - - /** - * Get subscription details - * - * @method - * @param {number} subscriptionID - * @returns {Promise} - * @fulfill {object} - Details of a single subscription - * - * @example - * const result = await client.getSubscriptionPlan(123); - */ - getSubscriptionPlan(subscriptionID) { - return this._request('/subscription/users', { - body: { - subscription_id: subscriptionID, - }, - returnFirstItem: true, - }); - } - - /** - * Update (upgrade/downgrade) the plan of a subscription - * - * @method - * @param {number} subscriptionID - * @param {number} planID - * @param {boolean} prorate - * @returns {Promise} - * @fulfill {object} - The result of the operation - * - * @example - * const result = await client.updateSubscriptionPlan(123); - */ - updateSubscriptionPlan(subscriptionID, planID, prorate = false) { - return this._request('/subscription/users/update', { - body: { - subscription_id: subscriptionID, - plan_id: planID, - prorate, - }, - }); - } - - /** - * Update subscription details, quantity, price and or currency - * - * @method - * @param {number} subscriptionID - * @param {Object} postData { quantity, price, planID, currency, prorate, keepModifiers, billImmediately, pause } - * @returns {Promise} - * @fulfill {object} - The result of the operation - * - * @example - * const result = await client.updateSubscriptionPlan(123, { quantity: 2 }); - */ - updateSubscription(subscriptionID, postData) { - const { - quantity, - price, - planID, - currency, - prorate, - keepModifiers, - billImmediately, - pause, - } = postData; - const body = { - subscription_id: subscriptionID, - }; - if (quantity) { - body.quantity = quantity; - } - if (price) { - body.recurring_price = price; - } - if (planID) { - body.plan_id = planID; - } - if (currency) { - body.currency = currency; - } - if (keepModifiers) { - body.keep_modifiers = keepModifiers; - } - if (billImmediately) { - body.bill_immediately = billImmediately; - } - if (prorate) { - body.prorate = prorate; - } - if (typeof pause === 'boolean') { - body.pause = pause; - } - - return this._request('/subscription/users/update', { - body: body, - }); - } - - /** - * Cancels an active subscription - * - * @method - * @param {number} subscriptionID - * @returns {Promise} - * @fulfil {object} - The result of the operation - * - * @example - * const result = await client.cancelSubscription(123); - */ - cancelSubscription(subscriptionID) { - return this._request('/subscription/users_cancel', { - body: { subscription_id: subscriptionID }, - }); - } - - /** - * Get the list of all users - * - * @method - * @param {Object} options { page, resultsPerPage, state, planId } - * @returns {Promise} - * @fulfil {object} - The users list - * - * @example - * const users = await client.getUsers(); - * const users = await client.getUsers({ state: 'active' }); - * - * @note - * If you have a large amount of active users, you will need to create paginated calls to this function. - */ - getUsers(options = {}) { - const { - page = 1, - resultsPerPage = 200, - state = null, - planId = null, - } = options; - - const body = { - page, - results_per_page: resultsPerPage, - }; - if (state) { - body.state = state; - } - if (planId) { - body.plan_id = planId; - } - - return this._request('/subscription/users', { body }); - } - - /** - * Change the due date of an upcoming subscription payment - * - * @method - * @param {number} paymentID - * @param {Date} date - Only the date portion of the date value is used - * @returns {Promise} - * @fulfill {object} - The result of the operation - * - * @example - * const result = await client.reschedulePayment(123, new Date('2022-12-04')); - */ - reschedulePayment(paymentID, date) { - return this._request('/subscription/payments_reschedule', { - body: { - payment_id: paymentID, - date: date.toISOString().substring(0, 10), - }, - }); - } - - /** - * Generate a custom pay link - * - * @method - * @param {object} body - * @returns {Promise} - * @fulfil {object} - The new pay link url - * - * @example - * const custom = await client.generatePayLink({ - * "title" : "my custom checkout", - * "custom_message" : "some custom message" - * "prices": [ - * "USD:19.99", - * "EUR:15.99" - * ] - * }); - */ - generatePayLink(body) { - return this._request('/product/generate_pay_link', { - body, - form: false, - json: true, - }); - } - - /** - * Get details of Checkout Order - * - * @method - * @param {string} ID of the Checkout order - * @returns {Promise} - * @fulfil {object} - Details of the Checkout order - * - * @example - * const result = await client.getOrderDetails('219233-chre53d41f940e0-58aqh94971'); - */ - getOrderDetails(checkoutId) { - return this._request(`/order?checkout_id=${checkoutId}`, { - checkoutAPI: true, - }); - } - - /** - * Create a subscription modifier to dynamically change the subscription payment amount - * - * @method - * @param subscriptionID - * @param modifierAmount - * @param options - * @returns {Promise} - * @fulfil {object} - The result of the operation - * - * @example - * const result = await client.createSubscriptionModifier(123, 10); - * const result = await client.createSubscriptionModifier(123, 10, { modifier_recurring: false, modifier_description: 'description' }); - */ - createSubscriptionModifier(subscriptionID, modifierAmount, options = {}) { - const { modifier_recurring, modifier_description } = options; - const body = { - subscription_id: subscriptionID, - modifier_amount: modifierAmount, - }; - if (typeof modifier_recurring === 'boolean') { - body.modifier_recurring = modifier_recurring; - } - if (modifier_description) { - body.modifier_description = modifier_description; - } - - return this._request('/subscription/modifiers/create', { - body: body, - }); - } -} - -module.exports = PaddleSDK; diff --git a/__tests__/attributes.test.js b/src/__tests__/attributes.test.ts similarity index 81% rename from __tests__/attributes.test.js rename to src/__tests__/attributes.test.ts index 9f82477..5840630 100644 --- a/__tests__/attributes.test.js +++ b/src/__tests__/attributes.test.ts @@ -1,4 +1,4 @@ -const PaddleSDK = require('../sdk'); +import { PaddleSDK } from '../sdk'; describe('attributes', () => { test('default', () => { @@ -7,7 +7,7 @@ describe('attributes', () => { expect(instance.vendorID).toBe('foo'); expect(instance.apiKey).toBe('bar'); expect(instance.publicKey).toBe('MISSING'); - expect(instance._serverURL()).toBe('https://vendors.paddle.com/api/2.0'); + expect(instance.serverURL()).toBe('https://vendors.paddle.com/api/2.0'); }); test('with public key', () => { @@ -16,7 +16,7 @@ describe('attributes', () => { expect(instance.vendorID).toBe('foo'); expect(instance.apiKey).toBe('bar'); expect(instance.publicKey).toBe('ham'); - expect(instance._serverURL()).toBe('https://vendors.paddle.com/api/2.0'); + expect(instance.serverURL()).toBe('https://vendors.paddle.com/api/2.0'); }); test('with sandbox server URL', () => { @@ -25,7 +25,7 @@ describe('attributes', () => { expect(instance.vendorID).toBe('foo'); expect(instance.apiKey).toBe('bar'); expect(instance.publicKey).toBe('ham'); - expect(instance._serverURL()).toBe( + expect(instance.serverURL()).toBe( 'https://sandbox-vendors.paddle.com/api/2.0' ); }); @@ -36,7 +36,7 @@ describe('attributes', () => { expect(instance.vendorID).toBe('foo'); expect(instance.apiKey).toBe('bar'); expect(instance.publicKey).toBe('ham'); - expect(instance._serverURL(true)).toBe( + expect(instance.serverURL(true)).toBe( 'https://checkout.paddle.com/api/1.0' ); }); @@ -47,7 +47,7 @@ describe('attributes', () => { expect(instance.vendorID).toBe('foo'); expect(instance.apiKey).toBe('bar'); expect(instance.publicKey).toBe('ham'); - expect(instance._serverURL(true)).toBe( + expect(instance.serverURL(true)).toBe( 'https://sandbox-checkout.paddle.com/api/1.0' ); }); @@ -60,6 +60,6 @@ describe('attributes', () => { expect(instance.vendorID).toBe('foo'); expect(instance.apiKey).toBe('bar'); expect(instance.publicKey).toBe('ham'); - expect(instance._serverURL()).toBe('https://custom.paddle.net'); + expect(instance.serverURL()).toBe('https://custom.paddle.net'); }); }); diff --git a/src/__tests__/coupons.test.ts b/src/__tests__/coupons.test.ts new file mode 100644 index 0000000..582e834 --- /dev/null +++ b/src/__tests__/coupons.test.ts @@ -0,0 +1,68 @@ +import { PaddleSDK } from '../sdk'; +import { + DEFAULT_ERROR, + EXPECTED_BODY, + VENDOR_API_KEY, + VENDOR_ID, +} from '../../utils/constants'; +import nock, { SERVER } from '../../utils/nock'; + +describe('coupons methods', () => { + let instance: PaddleSDK; + + beforeEach(() => { + instance = new PaddleSDK(VENDOR_ID, VENDOR_API_KEY, '', { + server: SERVER, + }); + }); + + describe('getProductCoupons', () => { + const path = '/product/list_coupons'; + + const productID = 12345; + const expectedBody = Object.assign( + { + product_id: productID, + }, + EXPECTED_BODY + ); + + test('resolves on successful request', async () => { + // https://paddle.com/docs/api-list-coupons + const body = { + success: true, + response: [ + { + id: 4227, + coupon: '56604810a6990', + description: '56604810a6dcd', + discount_type: 'percentage', + discount_amount: 0.5, + discount_currency: 'USD', + allowed_uses: 3, + times_used: 2, + expires: '2020-12-03 00:00:00', + product_id: '16970', + }, + ], + }; + + const scope = nock().post(path, expectedBody).reply(200, body); + + const response = await instance.getProductCoupons(productID); + + expect(response).toEqual(body.response); + expect(scope.isDone()).toBeTruthy(); + }); + + test('rejects on error request', async () => { + const scope = nock().post(path, expectedBody).reply(400, DEFAULT_ERROR); + + await expect(instance.getProductCoupons(productID)).rejects.toThrow( + 'Response code 400' + ); + + expect(scope.isDone()).toBeTruthy(); + }); + }); +}); diff --git a/__tests__/orders.test.js b/src/__tests__/orders.test.ts similarity index 64% rename from __tests__/orders.test.js rename to src/__tests__/orders.test.ts index 5afa985..10467b6 100644 --- a/__tests__/orders.test.js +++ b/src/__tests__/orders.test.ts @@ -1,16 +1,17 @@ -const PaddleSDK = require('../sdk'); -const DEFAULT_ERROR = require('../utils/error'); -const nock = require('../utils/nock'); +import { PaddleSDK } from '../sdk'; +import { + DEFAULT_ERROR, + VENDOR_API_KEY, + VENDOR_ID, +} from '../../utils/constants'; +import nock, { SERVER } from '../../utils/nock'; describe('orders methods', () => { - let instance; - - const VENDOR_ID = 'foo'; - const VENDOR_API_KEY = 'bar'; + let instance: PaddleSDK; beforeEach(() => { - instance = new PaddleSDK(VENDOR_ID, VENDOR_API_KEY, null, { - server: nock.SERVER, + instance = new PaddleSDK(VENDOR_ID, VENDOR_API_KEY, '', { + server: SERVER, }); }); @@ -18,7 +19,7 @@ describe('orders methods', () => { const checkoutId = '219233-chre53d41f940e0-58aqh94971'; const path = `/order?checkout_id=${checkoutId}`; - it('resolves on successful request', () => { + test('resolves on successful request', async () => { // https://developer.paddle.com/api-reference/fea392d1e2f4f-get-order-details const body = { success: true, @@ -71,30 +72,22 @@ describe('orders methods', () => { }, }; - const scope = nock() - .get(path) - .reply(200, body); + const scope = nock().get(path).reply(200, body); + + const response = await instance.getOrderDetails(checkoutId); - return instance.getOrderDetails(checkoutId).then(response => { - expect(response).toEqual(body.response); - expect(scope.isDone()).toBeTruthy(); - }); + expect(response).toEqual(body.response); + expect(scope.isDone()).toBeTruthy(); }); - it('rejects on error response', () => { - const scope = nock() - .get(path) - .reply(400, DEFAULT_ERROR); + test('rejects on error response', async () => { + const scope = nock().get(path).reply(400, DEFAULT_ERROR); - return instance.getOrderDetails(checkoutId).then( - () => { - expect('This promise should fail').toBeFalsy(); - }, - err => { - expect(err.response.statusCode).toBe(400); - expect(scope.isDone()).toBeTruthy(); - } + await expect(instance.getOrderDetails(checkoutId)).rejects.toThrow( + 'Response code 400' ); + + expect(scope.isDone()).toBeTruthy(); }); }); }); diff --git a/src/__tests__/products.test.ts b/src/__tests__/products.test.ts new file mode 100644 index 0000000..3866ec3 --- /dev/null +++ b/src/__tests__/products.test.ts @@ -0,0 +1,78 @@ +import { PaddleSDK } from '../sdk'; +import { + DEFAULT_ERROR, + EXPECTED_BODY, + VENDOR_API_KEY, + VENDOR_ID, +} from '../../utils/constants'; +import nock, { SERVER } from '../../utils/nock'; + +describe('products methods', () => { + let instance: PaddleSDK; + + beforeEach(() => { + instance = new PaddleSDK(VENDOR_ID, VENDOR_API_KEY, '', { + server: SERVER, + }); + }); + + describe('getProducts', () => { + const path = '/product/get_products'; + + test('resolves on successful request', async () => { + // https://paddle.com/docs/api-list-products + const body = { + success: true, + response: { + total: 2, + count: 2, + products: [ + { + id: 489171, + name: 'A Product', + description: 'A description of the product.', + base_price: 58, + sale_price: null, + screenshots: [], + icon: 'https://paddle-static.s3.amazonaws.com/email/2013-04-10/og.png', + }, + { + id: 489278, + name: 'Another Product', + description: null, + base_price: 39.99, + sale_price: null, + screenshots: [], + icon: 'https://paddle.s3.amazonaws.com/user/91/489278geekbench.png', + }, + ], + }, + }; + + const scope = nock().post(path, EXPECTED_BODY).reply(200, body); + + const response = await instance.getProducts(); + + expect(response).toEqual(body.response); + expect(scope.isDone()).toBeTruthy(); + }); + + test('rejects on error response', async () => { + const scope = nock().post(path, EXPECTED_BODY).reply(400, DEFAULT_ERROR); + + await expect(instance.getProducts()).rejects.toThrow('Response code 400'); + + expect(scope.isDone()).toBeTruthy(); + }); + + test('rejects on 200 response with error', async () => { + const scope = nock().post(path, EXPECTED_BODY).reply(200, DEFAULT_ERROR); + + await expect(instance.getProducts()).rejects.toThrow( + 'Request http://test.paddle.com/product/get_products returned an error!' + ); + + expect(scope.isDone()).toBeTruthy(); + }); + }); +}); diff --git a/src/__tests__/subscriptions.test.ts b/src/__tests__/subscriptions.test.ts new file mode 100644 index 0000000..73a23d0 --- /dev/null +++ b/src/__tests__/subscriptions.test.ts @@ -0,0 +1,487 @@ +import { PaddleSDK } from '../sdk'; +import { + DEFAULT_ERROR, + EXPECTED_BODY, + VENDOR_API_KEY, + VENDOR_ID, +} from '../../utils/constants'; +import nock, { SERVER } from '../../utils/nock'; + +describe('subscription methods', () => { + let instance: PaddleSDK; + + const PLAN_ID = 23456; + const SUBSCRIPTION_ID = 34567; + const PAYMENT_ID = 512345; + const NEW_PAYMENT_DATE = new Date('2023-01-01'); + + beforeEach(() => { + instance = new PaddleSDK(VENDOR_ID, VENDOR_API_KEY, '', { + server: SERVER, + }); + }); + + describe('getSubscriptionPlans', () => { + const path = '/subscription/plans'; + // https://paddle.com/docs/api-list-plans + const responseBody = { + success: true, + response: [ + { + id: 496197, + name: 'My App: Basic', + billing_type: 'month', + billing_period: 1, + initial_price: { + USD: '0.00', + }, + recurring_price: { + USD: '5.000', + }, + }, + { + id: 496198, + name: 'My App: Pro', + billing_type: 'day', + billing_period: 1, + initial_price: { + USD: '0.00', + }, + recurring_price: { + USD: '10.000', + }, + }, + { + id: 496199, + name: 'My App: Pro', + billing_type: 'month', + billing_period: 1, + initial_price: { + USD: '0.00', + }, + recurring_price: { + USD: '10.000', + }, + }, + ], + }; + + test('resolves on successful request', async () => { + const scope = nock().post(path, EXPECTED_BODY).reply(200, responseBody); + + const response = await instance.getSubscriptionPlans(); + + expect(response).toEqual(responseBody.response); + expect(scope.isDone()).toBeTruthy(); + }); + + test('rejects on error request', async () => { + const scope = nock().post(path, EXPECTED_BODY).reply(400, DEFAULT_ERROR); + + await expect(instance.getSubscriptionPlans()).rejects.toThrow( + 'Response code 400' + ); + + expect(scope.isDone()).toBeTruthy(); + }); + }); + + describe('getSubscriptionPlan', () => { + const path = '/subscription/plans'; + const expectedBody = { + ...EXPECTED_BODY, + plan: PLAN_ID, + }; + // https://paddle.com/docs/api-list-plans + const responseBody = { + success: true, + response: [ + { + id: 496197, + name: 'My App: Basic', + billing_type: 'month', + billing_period: 1, + initial_price: { + USD: '0.00', + }, + recurring_price: { + USD: '5.000', + }, + }, + { + id: 496198, + name: 'My App: Pro', + billing_type: 'day', + billing_period: 1, + initial_price: { + USD: '0.00', + }, + recurring_price: { + USD: '10.000', + }, + }, + ], + }; + + test('resolves on successful request', async () => { + const scope = nock().post(path, expectedBody).reply(200, responseBody); + + const response = await instance.getSubscriptionPlan(PLAN_ID); + + expect(response).toEqual(responseBody.response[0]); + expect(scope.isDone()).toBeTruthy(); + }); + + test('rejects on error request', async () => { + const scope = nock().post(path, expectedBody).reply(400, DEFAULT_ERROR); + + await expect(instance.getSubscriptionPlan(PLAN_ID)).rejects.toThrow( + 'Response code 400' + ); + + expect(scope.isDone()).toBeTruthy(); + }); + }); + + describe('getUsers', () => { + const path = '/subscription/users'; + const expectedBody = { + ...EXPECTED_BODY, + page: 1, + plan_id: PLAN_ID, + results_per_page: 200, + }; + + test('resolves on successful request', async () => { + // https://paddle.com/docs/api-list-users + const body = { + success: true, + response: [ + { + subscription_id: 502198, + plan_id: 496199, + user_id: 285846, + user_email: 'christian@paddle.com', + state: 'active', + signup_date: '2015-10-06 09:44:23', + last_payment: { + amount: 5, + currency: 'USD', + date: '2015-10-06', + }, + next_payment: { + amount: 10, + currency: 'USD', + date: '2015-11-06', + }, + }, + ], + }; + + const scope = nock().post(path, expectedBody).reply(200, body); + + const response = await instance.getUsers({ planID: PLAN_ID }); + + expect(response).toEqual(body.response); + expect(scope.isDone()).toBeTruthy(); + }); + + test('rejects on error request', async () => { + const scope = nock().post(path, expectedBody).reply(400, DEFAULT_ERROR); + + await expect(instance.getUsers({ planID: PLAN_ID })).rejects.toThrow( + 'Response code 400' + ); + + expect(scope.isDone()).toBeTruthy(); + }); + }); + + describe('getSubscriptionPayments', () => { + const path = '/subscription/payments'; + const expectedBody = { + ...EXPECTED_BODY, + plan: PLAN_ID, + }; + + test('resolves on successful request', async () => { + // https://paddle.com/docs/api-list-payments + const body = { + success: true, + response: [ + { + id: 8936, + subscription_id: 2746, + amount: 1, + currency: 'USD', + payout_date: '2015-10-15', + is_paid: 0, + receipt_url: + 'https://www.paddle.com/receipt/469214-8936/1940881-chrea0eb34164b5-f0d6553bdf', + }, + ], + }; + + const scope = nock().post(path, expectedBody).reply(200, body); + + const response = await instance.getSubscriptionPayments(PLAN_ID); + + expect(response).toEqual(body.response); + expect(scope.isDone()).toBeTruthy(); + }); + + test('rejects on error request', async () => { + const scope = nock().post(path, expectedBody).reply(400, DEFAULT_ERROR); + + await expect(instance.getSubscriptionPayments(PLAN_ID)).rejects.toThrow( + 'Response code 400' + ); + + expect(scope.isDone()).toBeTruthy(); + }); + }); + + describe('reschedulePayment', () => { + const path = '/subscription/payments_reschedule'; + const expectedBody = { + ...EXPECTED_BODY, + payment_id: PAYMENT_ID, + date: NEW_PAYMENT_DATE.toISOString().substring(0, 10), + }; + + test('resolves on successful request', async () => { + // https://developer.paddle.com/api-reference/fe93f28aa7f7e-reschedule-payment + const body = { + success: true, + response: [ + { + success: true, + }, + ], + }; + + const scope = nock().post(path, expectedBody).reply(200, body); + + const response = await instance.reschedulePayment( + PAYMENT_ID, + NEW_PAYMENT_DATE + ); + + expect(response).toEqual(body.response); + expect(scope.isDone()).toBeTruthy(); + }); + + test('rejects on error request', async () => { + const scope = nock().post(path, expectedBody).reply(400, DEFAULT_ERROR); + + await expect( + instance.reschedulePayment(PAYMENT_ID, NEW_PAYMENT_DATE) + ).rejects.toThrow('Response code 400'); + + expect(scope.isDone()).toBeTruthy(); + }); + }); + + describe('updateSubscription', () => { + const path = '/subscription/users/update'; + const expectedBody = { + ...EXPECTED_BODY, + subscription_id: SUBSCRIPTION_ID, + plan_id: PLAN_ID, + quantity: 2, + recurring_price: 25.5, + currency: 'GBP', + }; + // https://developer.paddle.com/api-reference/subscription-api/subscription-users/updateuser + const responseBody = { + success: true, + response: { + plan_id: PLAN_ID, + subscription_id: SUBSCRIPTION_ID, + user_id: 0, + }, + }; + + test('resolves on successful request all params', async () => { + const scope = nock().post(path, expectedBody).reply(200, responseBody); + + const response = await instance.updateSubscription(SUBSCRIPTION_ID, { + planID: PLAN_ID, + quantity: 2, + price: 25.5, + currency: 'GBP', + }); + + expect(response).toEqual(responseBody.response); + expect(scope.isDone()).toBeTruthy(); + }); + + test('resolves on successful request quantity', async () => { + const expectedBodyQuantity = { + ...EXPECTED_BODY, + subscription_id: SUBSCRIPTION_ID, + quantity: 2, + }; + + const scope = nock() + .post(path, expectedBodyQuantity) + .reply(200, responseBody); + + const response = await instance.updateSubscription(SUBSCRIPTION_ID, { + quantity: 2, + }); + + expect(response).toEqual(responseBody.response); + expect(scope.isDone()).toBeTruthy(); + }); + + test('resolves on successful pause subscription', async () => { + const expectedBody = Object.assign( + { + subscription_id: SUBSCRIPTION_ID, + pause: true, + }, + EXPECTED_BODY + ); + + const scope = nock().post(path, expectedBody).reply(200, responseBody); + + const response = await instance.updateSubscription(SUBSCRIPTION_ID, { + pause: true, + }); + + expect(response).toEqual(responseBody.response); + expect(scope.isDone()).toBeTruthy(); + }); + + test('resolves on successful renew subscription', async () => { + const expectedBody = { + ...EXPECTED_BODY, + subscription_id: SUBSCRIPTION_ID, + pause: false, + }; + + const scope = nock().post(path, expectedBody).reply(200, responseBody); + + const response = await instance.updateSubscription(SUBSCRIPTION_ID, { + pause: false, + }); + + expect(response).toEqual(responseBody.response); + expect(scope.isDone()).toBeTruthy(); + }); + + test('rejects on error request', async () => { + const scope = nock() + .post(path, { + ...EXPECTED_BODY, + subscription_id: SUBSCRIPTION_ID, + plan_id: PLAN_ID, + }) + .reply(400, DEFAULT_ERROR); + + await expect( + instance.updateSubscription(SUBSCRIPTION_ID, { planID: PLAN_ID }) + ).rejects.toThrow('Response code 400'); + + expect(scope.isDone()).toBeTruthy(); + }); + }); + + describe('cancelSubscription', () => { + const path = '/subscription/users_cancel'; + const expectedBody = { + ...EXPECTED_BODY, + subscription_id: SUBSCRIPTION_ID, + }; + + test('resolves on successful request', async () => { + // https://paddle.com/docs/api-cancelling-subscriptions + const body = { + success: true, + }; + + const scope = nock().post(path, expectedBody).reply(200, body); + + const response = await instance.cancelSubscription(SUBSCRIPTION_ID); + + expect(response).toEqual(true); + expect(scope.isDone()).toBeTruthy(); + }); + + test('rejects on error request', async () => { + const scope = nock().post(path, expectedBody).reply(400, DEFAULT_ERROR); + + await expect( + instance.cancelSubscription(SUBSCRIPTION_ID) + ).rejects.toThrow('Response code 400'); + + expect(scope.isDone()).toBeTruthy(); + }); + }); + + describe('createSubscriptionModifier', () => { + const path = '/subscription/modifiers/create'; + const expectedBody = { + ...EXPECTED_BODY, + subscription_id: SUBSCRIPTION_ID, + modifier_amount: 10, + }; + // https://developer.paddle.com/api-reference/dc2b0c06f0481-create-modifier + const responseBody = { + success: true, + response: { + subscription_id: SUBSCRIPTION_ID, + modifier_id: 1, + }, + }; + + test('resolves on successful request', async () => { + const scope = nock().post(path, expectedBody).reply(200, responseBody); + + const response = await instance.createSubscriptionModifier( + SUBSCRIPTION_ID, + 10 + ); + + expect(response).toEqual(responseBody.response); + expect(scope.isDone()).toBeTruthy(); + }); + + test('resolves on successful request all params', async () => { + const expectedBody = Object.assign( + { + subscription_id: SUBSCRIPTION_ID, + modifier_amount: 10, + modifier_recurring: false, + modifier_description: 'description', + }, + EXPECTED_BODY + ); + + const scope = nock().post(path, expectedBody).reply(200, responseBody); + + const response = await instance.createSubscriptionModifier( + SUBSCRIPTION_ID, + 10, + { + description: 'description', + recurring: false, + } + ); + + expect(response).toEqual(responseBody.response); + expect(scope.isDone()).toBeTruthy(); + }); + + test('rejects on error request', async () => { + const scope = nock().post(path, expectedBody).reply(400, DEFAULT_ERROR); + + await expect( + instance.createSubscriptionModifier(SUBSCRIPTION_ID, 10) + ).rejects.toThrow('Response code 400'); + + expect(scope.isDone()).toBeTruthy(); + }); + }); +}); diff --git a/src/__tests__/transactions.test.ts b/src/__tests__/transactions.test.ts new file mode 100644 index 0000000..e0fa645 --- /dev/null +++ b/src/__tests__/transactions.test.ts @@ -0,0 +1,167 @@ +import { PaddleSDK } from '../sdk'; +import { + DEFAULT_ERROR, + EXPECTED_BODY, + VENDOR_API_KEY, + VENDOR_ID, +} from '../../utils/constants'; +import nock, { SERVER } from '../../utils/nock'; + +describe('transactions methods', () => { + let instance: PaddleSDK; + + // https://developer.paddle.com/api-reference/b3A6MzA3NDQ3MjQ-list-transactions#request-parameters + const RESPONSE = { + success: true, + response: [ + { + order_id: '1042907-384786', + checkout_id: '4795118-chre895f5cfaf61-4d7dafa9df', + amount: '5.00', + currency: 'USD', + status: 'completed', + created_at: '2017-01-22 00:38:43', + passthrough: null, + product_id: 12345, + is_subscription: true, + is_one_off: false, + subscription: { + subscription_id: 123456, + status: 'active', + }, + user: { + user_id: 29777, + email: 'example@paddle.com', + marketing_consent: true, + }, + receipt_url: + 'https://my.paddle.com/receipt/1042907-384786/4795118-chre895f5cfaf61-4d7dafa9df', + }, + { + order_id: '1042907-384785', + checkout_id: '4795118-chre895f5cfaf61-4d7dafa9df', + amount: '5.00', + currency: 'USD', + status: 'refunded', + created_at: '2016-12-07 12:25:09', + passthrough: null, + product_id: 12345, + is_subscription: true, + is_one_off: true, + subscription: { + subscription_id: 123456, + status: 'active', + }, + user: { + user_id: 29777, + email: 'example@paddle.com', + marketing_consent: true, + }, + receipt_url: + 'https://my.paddle.com/receipt/1042907-384785/4795118-chre895f5cfaf61-4d7dafa9df', + }, + ], + }; + + beforeEach(() => { + instance = new PaddleSDK(VENDOR_ID, VENDOR_API_KEY, '', { + server: SERVER, + }); + }); + + describe('getUserTransactions', () => { + const path = '/user/123/transactions'; + + test('resolves on successful request', async () => { + const scope = nock().post(path, EXPECTED_BODY).reply(200, RESPONSE); + + const response = await instance.getUserTransactions(123); + + expect(response).toEqual(RESPONSE.response); + expect(scope.isDone()).toBeTruthy(); + }); + + test('resolves on paged request', async () => { + const scope = nock() + .post(path, Object.assign({ page: 2 }, EXPECTED_BODY)) + .reply(200, RESPONSE); + + const response = await instance.getUserTransactions(123, 2); + + expect(response).toEqual(RESPONSE.response); + expect(scope.isDone()).toBeTruthy(); + }); + + test('rejects on error response', async () => { + const scope = nock().post(path, EXPECTED_BODY).reply(400, DEFAULT_ERROR); + + await expect(instance.getUserTransactions(123)).rejects.toThrow( + 'Response code 400' + ); + + expect(scope.isDone()).toBeTruthy(); + }); + + test('rejects on 200 response with error', async () => { + const scope = nock().post(path, EXPECTED_BODY).reply(200, DEFAULT_ERROR); + + await expect(instance.getUserTransactions(123)).rejects.toThrow( + 'Request http://test.paddle.com/user/123/transactions returned an error!' + ); + + expect(scope.isDone()).toBeTruthy(); + }); + }); + + describe('getSubscriptionTransactions', () => { + const path = '/subscription/123/transactions'; + + test('resolves on successful request', async () => { + const scope = nock().post(path, EXPECTED_BODY).reply(200, RESPONSE); + + const response = await instance.getSubscriptionTransactions(123); + + expect(response).toEqual(RESPONSE.response); + expect(scope.isDone()).toBeTruthy(); + }); + }); + + describe('getOrderTransactions', () => { + const path = '/order/123/transactions'; + + test('resolves on successful request', async () => { + const scope = nock().post(path, EXPECTED_BODY).reply(200, RESPONSE); + + const response = await instance.getOrderTransactions(123); + + expect(response).toEqual(RESPONSE.response); + expect(scope.isDone()).toBeTruthy(); + }); + }); + + describe('getCheckoutTransactions', () => { + const path = '/checkout/123/transactions'; + + test('resolves on successful request', async () => { + const scope = nock().post(path, EXPECTED_BODY).reply(200, RESPONSE); + + const response = await instance.getCheckoutTransactions('123'); + + expect(response).toEqual(RESPONSE.response); + expect(scope.isDone()).toBeTruthy(); + }); + }); + + describe('getProductTransactions', () => { + const path = '/product/123/transactions'; + + test('resolves on successful request', async () => { + const scope = nock().post(path, EXPECTED_BODY).reply(200, RESPONSE); + + const response = await instance.getProductTransactions(123); + + expect(response).toEqual(RESPONSE.response); + expect(scope.isDone()).toBeTruthy(); + }); + }); +}); diff --git a/src/__tests__/users.test.ts b/src/__tests__/users.test.ts new file mode 100644 index 0000000..2cff6ef --- /dev/null +++ b/src/__tests__/users.test.ts @@ -0,0 +1,91 @@ +import { PaddleSDK } from '../sdk'; +import { + DEFAULT_ERROR, + EXPECTED_BODY, + VENDOR_API_KEY, + VENDOR_ID, +} from '../../utils/constants'; +import nock, { SERVER } from '../../utils/nock'; + +describe('users methods', () => { + let instance: PaddleSDK; + + beforeEach(() => { + instance = new PaddleSDK(VENDOR_ID, VENDOR_API_KEY, '', { + server: SERVER, + }); + }); + + describe('getUsers', () => { + const path = '/subscription/users'; + const expectedBody = { + ...EXPECTED_BODY, + page: 1, + results_per_page: 200, + }; + + test('resolves on successful request', async () => { + // https://developer.paddle.com/api-reference/e33e0a714a05d-list-users + const body = { + success: true, + response: [ + { + subscription_id: 502198, + plan_id: 496199, + user_id: 285846, + user_email: 'name@example.com', + marketing_consent: true, + update_url: + 'https://subscription-management.paddle.com/subscription/87654321/hash/eyJpdiI6IlU0Nk5cL1JZeHQyTXd.../update', + cancel_url: + 'https://subscription-management.paddle.com/subscription/87654321/hash/eyJpdiI6IlU0Nk5cL1JZeHQyTXd.../cancel', + state: 'active', + signup_date: '2015-10-06 09:44:23', + last_payment: { + amount: 5, + currency: 'USD', + date: '2015-10-06', + }, + payment_information: { + payment_method: 'card', + card_type: 'visa', + last_four_digits: '1111', + expiry_date: '02/2020', + }, + quantity: 3, + next_payment: { + amount: 10, + currency: 'USD', + date: '2015-11-06', + }, + }, + ], + }; + + const scope = nock().post(path, expectedBody).reply(200, body); + + const response = await instance.getUsers(); + + expect(response).toEqual(body.response); + expect(scope.isDone()).toBeTruthy(); + }); + + test('rejects on error response', async () => { + const scope = nock().post(path, expectedBody).reply(400, DEFAULT_ERROR); + + await expect(instance.getUsers()).rejects.toThrow('Response code 400'); + + expect(scope.isDone()).toBeTruthy(); + }); + + test('rejects on 200 response with error', async () => { + const scope = nock().post(path, expectedBody).reply(200, DEFAULT_ERROR); + + await expect(instance.getUsers()).rejects.toThrow( + 'Request http://test.paddle.com/subscription/users returned an error!' + ); + + expect(scope.isDone()).toBeTruthy(); + }); + }); +}); diff --git a/__tests__/webhooks.test.js b/src/__tests__/webhooks.test.ts similarity index 79% rename from __tests__/webhooks.test.js rename to src/__tests__/webhooks.test.ts index f4b85a6..4d7839f 100644 --- a/__tests__/webhooks.test.js +++ b/src/__tests__/webhooks.test.ts @@ -1,32 +1,30 @@ -const PaddleSDK = require('../sdk'); -const DEFAULT_ERROR = require('../utils/error'); -const nock = require('../utils/nock'); +import { PaddleSDK } from '../sdk'; +import { + DEFAULT_ERROR, + EXPECTED_BODY, + VENDOR_API_KEY, + VENDOR_ID, +} from '../../utils/constants'; +import nock, { SERVER } from '../../utils/nock'; describe('webhooks methods', () => { - let instance; + let instance: PaddleSDK; - const VENDOR_ID = 'foo'; - const VENDOR_API_KEY = 'bar'; const VENDOR_PUBLIC_KEY = Buffer.from( 'LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQ0lqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FnOEFNSUlDQ2dLQ0FnRUF5Q05KajlQSk95NWhVMW1zS21DawovS2lNN09Ua0hQUVYyNTkwS2FUYzVGTW8waG9CeHAyWGlBRC91dktMOHpYejBlRFhjRjBDU2tLQUVVdWpQRjVwCmlBSndLdUtNYU12Vyt6VFd6SWRiS1J0Tjl0d3JZYlFGK3MzcUtGNTFHNk56NnlBeE91dTRwclVEMDhUZ1VFQlUKSENuSlN1anJZSXMyeHJCNkF5MXk2VTR5LyticFpnNXpkVkpUaGNCakxEVVJPU25NVVFGb1YzUU5nUE5Fck45VwpybnVoNktFQS93SDM1ZHNBVzNrcmswU1Q0ekIrWlRqK2duTHVwNWtzYzBGak9rQllDSEFmUmpCeklkV09LZHkvCjBmZzJpVGZLaHBteXZ6TUoyS2gzcnkwcW1wVTlJNXAwUVpjMVFHWFRmV2gvaXJPV2ZXaXhQZlhvbi9ESHRnRTQKbmhHNVlXVlY4d3lrZ0tjUHd4UDFENGZnQzF2S2RoVnJ3VWd6Z09oY2V3VlFucDhkSDNnRDlvNmQwZGpPQk45Zwoxak1ZZzd6alRGcVMwbVgvd3dQSUdzM2lKcXdvSlZ3ZExaWWh2Wm13a21XQU1YREs0L2k3N1dQVWpxV0prWnRnCk8rY1puWW9FNjJDRENZN1RWS2xsRWRJRUtZUFgrdCtFenBZT3hjZSt3cjcwNUo4NkVKY1NsOTQyb1RTL08vTjgKQzdIOERLSGQwT2xBRjEwOCtjUlo1Tjc2cGxNcmxrNlFxMUdZWVdwbkxzMVlJcXpBTnIrckRNK1BBUzRxVlJEbApHWmE4RU5WYkJjSUhtUUVJZW5TbUZrSDJZc3F4Q2dZYXIyZlh5Zzh3M0NEcFNqaEJ5OVJwT0tMU1BUVWVBUk1vCkdwMWZlc1RXSytLdXBIM3FoOVZxRVJNQ0F3RUFBUT09Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo=', 'base64' ).toString(); - const EXPECTED_BODY = { - vendor_id: VENDOR_ID, - vendor_auth_code: VENDOR_API_KEY, - }; - beforeEach(() => { instance = new PaddleSDK(VENDOR_ID, VENDOR_API_KEY, VENDOR_PUBLIC_KEY, { - server: nock.SERVER, + server: SERVER, }); }); describe('getWebhooksHistory', () => { const path = '/alert/webhooks'; - it('resolves on successfull request', () => { + test('resolves on successful request', async () => { // https://paddle.com/docs/api-webhook-history const body = { success: true, @@ -87,30 +85,27 @@ describe('webhooks methods', () => { }, }; - const scope = nock() - .post(path, EXPECTED_BODY) - .reply(200, body); + const scope = nock().post(path, EXPECTED_BODY).reply(200, body); + + const response = await instance.getWebhooksHistory(); - return instance.getWebhooksHistory().then(response => { - expect(response).toEqual(body.response); - expect(scope.isDone()).toBeTruthy(); - }); + expect(response).toEqual(body.response); + expect(scope.isDone()).toBeTruthy(); }); - it('rejects on error request', () => { - const scope = nock() - .post(path, EXPECTED_BODY) - .reply(400, DEFAULT_ERROR); + test('rejects on error request', async () => { + const scope = nock().post(path, EXPECTED_BODY).reply(400, DEFAULT_ERROR); + + await expect(instance.getWebhooksHistory()).rejects.toThrow( + 'Response code 400' + ); - return instance.getWebhooksHistory().catch(err => { - expect(err.response.statusCode).toBe(400); - expect(scope.isDone()).toBeTruthy(); - }); + expect(scope.isDone()).toBeTruthy(); }); }); describe('verifyWebhookData', () => { - let data; + let data: { p_signature: string } & Record; beforeEach(() => { data = { @@ -128,23 +123,23 @@ describe('webhooks methods', () => { }; }); - it('validates a valid data set', () => { + test('validates a valid data set', async () => { expect(instance.verifyWebhookData(data)).toBe(true); }); - it('does not validate an invalid data set', () => { + test('does not validate an invalid data set', async () => { data.source = 'tampered field'; expect(instance.verifyWebhookData(data)).toBe(false); }); - it('does not validate a valid data set with an invalid public key', () => { + test('does not validate a valid data set with an invalid public key', async () => { const invalidKeyClient = new PaddleSDK( VENDOR_ID, VENDOR_API_KEY, 'invalid key', { - server: nock.SERVER, + server: SERVER, } ); diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..e5fc3c7 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,2 @@ +export * from './sdk'; +export * from './types'; diff --git a/src/sdk.ts b/src/sdk.ts new file mode 100644 index 0000000..bc04031 --- /dev/null +++ b/src/sdk.ts @@ -0,0 +1,589 @@ +import crypto from 'crypto'; +import got from 'got'; +import fs from 'fs'; + +import serialize from './serialize'; +import { OptionsOfDefaultResponseBody } from 'got/dist/source/create'; +import { + CreateSubscriptionModifierBody, + CreateSubscriptionModifierResponse, + GeneratePaylinkBody, + GeneratePaylinkResponse, + GetProductCouponsBody, + GetProductCouponsResponse, + GetProductsResponse, + GetSubscriptionPaymentsBody, + GetSubscriptionPaymentsResponse, + GetSubscriptionPlansBody, + GetSubscriptionPlansResponse, + GetSubscriptionUsersBody, + GetSubscriptionUsersResponse, + GetTransactionsResponse, + GetWebhookHistoryResponse, + PaddleResponseWrap, + RescheduleSubscriptionPaymentBody, + UpdateSubscriptionUserBody, + UpdateSubscriptionUserResponse, +} from './types'; + +const PACKAGE = JSON.parse(fs.readFileSync('./package.json', 'utf-8')); + +const VENDOR_SANDBOX_URL = 'https://sandbox-vendors.paddle.com/api/2.0'; +const VENDOR_SERVER_URL = 'https://vendors.paddle.com/api/2.0'; + +const CHECKOUT_SANDBOX_URL = 'https://sandbox-checkout.paddle.com/api/1.0'; +const CHECKOUT_SERVER_URL = 'https://checkout.paddle.com/api/1.0'; + +export interface Options { + /** Whether to use the sandbox server URL */ + sandbox?: boolean; + /** The server URL prefix for all requests */ + server?: string; +} + +export class PaddleSDK { + /** The API key for a Paddle account */ + apiKey: string; + /** The public key for a Paddle account used to verify webhooks, only required for {@link verifyWebhookData} */ + publicKey: string; + options?: Options; + /** The vendor ID for a Paddle account */ + vendorID: string; + + /** + * @param vendorID The vendor ID for a Paddle account + * @param apiKey The API key for a Paddle account + * @param publicKey The public key for a Paddle account used to verify webhooks, only required for {@link verifyWebhookData} + * + * @example + * const client = new PaddleSDK('your-vendor-id', 'your-unique-api-key'); + * const client = new PaddleSDK('your-vendor-id', 'your-unique-api-key', 'your-public-key'); + */ + constructor( + vendorID: string, + apiKey: string, + publicKey?: string, + options?: Options + ) { + this.vendorID = vendorID || 'MISSING'; + this.apiKey = apiKey || 'MISSING'; + this.publicKey = publicKey || 'MISSING'; + this.options = options; + } + + /** + * Get the current list of products. + * + * API documentation: https://developer.paddle.com/api-reference/0f31bd7cbce47-list-products + * +s * @example + * const products = await client.getProducts(); + */ + getProducts() { + return this._request('/product/get_products'); + } + + /** + * Get the current list of coupons for a product. + * + * API documentation: https://developer.paddle.com/api-reference/6a59b795bd653-list-coupons + * + * @example + * const coupons = await client.getProductCoupons(123); + */ + getProductCoupons(productID: number) { + return this._request( + '/product/list_coupons', + { + body: { product_id: productID }, + } + ); + } + + /** + * Get a list of all the available subscription plans. + * + * API documentation: https://developer.paddle.com/api-reference/a835554495295-list-plans + * + * @example + * const plans = await client.getSubscriptionPlans(); + */ + getSubscriptionPlans() { + return this._request('/subscription/plans'); + } + + /** + * Get the plan based on its ID. + * + * API documentation: https://developer.paddle.com/api-reference/a835554495295-list-plans + * + * @example + * const plan = await client.getSubscriptionPlan(123); + */ + async getSubscriptionPlan(planID: number) { + return this._first( + await this._request< + GetSubscriptionPlansResponse, + GetSubscriptionPlansBody + >('/subscription/plans', { + body: { plan: planID }, + }) + ); + } + + /** + * Get the list of all payments or payments for a subscription plan. + * + * API documentation: https://developer.paddle.com/api-reference/80462f27b2011-list-payments + * + * @example + * const payments = await client.getSubscriptionPayments(); + * const payments = await client.getSubscriptionPayments(123); + */ + getSubscriptionPayments(planID?: number) { + return this._request< + GetSubscriptionPaymentsResponse, + GetSubscriptionPaymentsBody + >('/subscription/payments', { + body: { plan: planID }, + }); + } + + /** + * Get the list of latest webhooks history. + * + * API documentation: https://developer.paddle.com/api-reference/7695d655c158b-get-webhook-history + * + * @example + * const webhooksHistory = await client.getWebhooksHistory(); + */ + getWebhooksHistory() { + return this._request('/alert/webhooks'); + } + + /** + * Get the list of transactions for a user. + * + * API documentation: https://developer.paddle.com/api-reference/89c1805d821c2-list-transactions + * + * @example + * const userTransactions = await client.getUserTransactions(123); + * const userTransactionsNext = await client.getUserTransactions(123, 2); + */ + getUserTransactions(userID: number, page?: number) { + return this._getTransactions('user', userID, page); + } + + /** + * Get the list of transactions for a subscription. + * + * API documentation: https://developer.paddle.com/api-reference/89c1805d821c2-list-transactions + * += * @example + * const subscriptionTransactions = await client.getSubscriptionTransactions(123); + * const subscriptionTransactionsNext = await client.getSubscriptionTransactions(123, 2); + */ + getSubscriptionTransactions(subscriptionID: number, page?: number) { + return this._getTransactions('subscription', subscriptionID, page); + } + + /** + * Get the list of transactions for an order. + * + * API documentation: https://developer.paddle.com/api-reference/89c1805d821c2-list-transactions + * + * @example + * const orderTransactions = await client.getOrderTransactions(123); + * const orderTransactionsNext = await client.getOrderTransactions(123, 2); + */ + getOrderTransactions(orderID: number, page?: number) { + return this._getTransactions('order', orderID, page); + } + + /** + * Get the list of transactions for a checkout. + * + * API documentation: https://developer.paddle.com/api-reference/89c1805d821c2-list-transactions + * + * @example + * const checkoutTransactions = await client.getCheckoutTransactions('123'); + * const checkoutTransactionsNext = await client.getCheckoutTransactions('123', 2); + */ + getCheckoutTransactions(checkoutID: string, page?: number) { + return this._getTransactions('checkout', checkoutID, page); + } + + /** + * Get the list of transactions for a product. + * + * API documentation: https://developer.paddle.com/api-reference/89c1805d821c2-list-transactions + * + * @example + * const productTransactions = await client.getProductTransactions(123); + * const productTransactionsNext = await client.getProductTransactions(123, 2); + */ + getProductTransactions(productID: number, page?: number) { + return this._getTransactions('product', productID, page); + } + + /** + * Verify a webhook alert data using signature and a public key to validate that + * it was indeed sent from Paddle. + * + * For more details: https://paddle.com/docs/reference-verifying-webhooks + * + * @param postData The object with all the parameters sent to the webhook + * + * @example + * const client = new PaddleSDK('your-vendor-id', 'your-unique-api-key', 'your-public-key'); + * + * // inside an Express handler which uses express.bodyParser middleware + * const isVerified = client.verifyWebhookData(req.body); + */ + verifyWebhookData( + postData: { p_signature: string } & Record + ): boolean { + const signature = postData.p_signature; + + const keys = Object.keys(postData) + .filter((key) => key !== 'p_signature') + .sort(); + + const sorted: Record = {}; + keys.forEach((key) => { + sorted[key] = postData[key]; + }); + + // PHP style serialize! :O + const serialized = serialize(sorted); + + try { + const verifier = crypto.createVerify('sha1'); + verifier.write(serialized); + verifier.end(); + + return verifier.verify(this.publicKey, signature, 'base64'); + } catch (err) { + return false; + } + } + + /** + * Update subscription details, quantity, price and or currency. + * + * API documentation: https://developer.paddle.com/api-reference/e3872343dfbba-update-user + * + * @example + * const result = await client.updateSubscriptionPlan(123, { quantity: 2 }); + */ + updateSubscription( + subscriptionID: number, + postData: { + billImmediately?: boolean; + currency?: string; + keepModifiers?: boolean; + pause?: boolean; + planID?: number; + prorate?: boolean; + price?: number; + quantity?: number; + } + ) { + const { + quantity, + price, + planID, + currency, + prorate, + keepModifiers, + billImmediately, + pause, + } = postData; + + const body = { + subscription_id: subscriptionID, + ...(currency && { currency }), + ...(typeof keepModifiers === 'boolean' && { + keep_modifiers: keepModifiers, + }), + ...(typeof billImmediately === 'boolean' && { + bill_immediately: billImmediately, + }), + ...(quantity && { quantity }), + ...(typeof pause === 'boolean' && { pause }), + ...(planID && { plan_id: planID }), + ...(price && { recurring_price: price }), + ...(typeof prorate === 'boolean' && { prorate }), + }; + + return this._request< + UpdateSubscriptionUserResponse, + UpdateSubscriptionUserBody + >('/subscription/users/update', { + body, + }); + } + + /** + * Cancels an active subscription. + * + * API documentation: https://developer.paddle.com/api-reference/9b808453c3216-cancel-user + * + * @example + * const result = await client.cancelSubscription(123); + */ + cancelSubscription(subscriptionID: number) { + return this._request('/subscription/users_cancel', { + body: { subscription_id: subscriptionID }, + }); + } + + /** + * Get the current list of all users or users for a subscription plan. + * + * API documentation: https://developer.paddle.com/api-reference/e33e0a714a05d-list-users + * + * @example + * const users = await client.getUsers(); + * const users = await client.getUsers({ planID: 123 }); + * const users = await client.getUsers({ state: 'active' }); + * + * @note + * If you have a large amount of active users, you will need to create paginated calls to this function. + */ + getUsers(options?: { + page?: number; + resultsPerPage?: number; + planID?: string | number; + state?: GetSubscriptionUsersBody['state']; + }) { + const { + page = 1, + resultsPerPage = 200, + state = null, + planID = null, + } = options || {}; + + const body = { + page, + ...(planID && { plan_id: String(planID) }), + results_per_page: resultsPerPage, + ...(state && { state }), + }; + + return this._request< + GetSubscriptionUsersResponse, + GetSubscriptionUsersBody + >('/subscription/users', { body }); + } + + /** + * Change the due date of an upcoming subscription payment. + * + * API documentation: https://developer.paddle.com/api-reference/fe93f28aa7f7e-reschedule-payment + * + * @example + * const result = await client.reschedulePayment(123, new Date('2022-12-04')); + */ + reschedulePayment(paymentID: number, date: Date) { + return this._request( + '/subscription/payments_reschedule', + { + body: { + payment_id: paymentID, + date: date.toISOString().substring(0, 10), + }, + } + ); + } + + /** + * Generate a custom pay link. + * + * API documentation: https://developer.paddle.com/api-reference/3f031a63f6bae-generate-pay-link + * + * @example + * const custom = await client.generatePayLink({ + * title: 'my custom checkout', + * custom_message: 'some custom message', + * prices: [ + * 'USD:19.99', + * 'EUR:15.99' + * ] + * }); + */ + generatePayLink(body: GeneratePaylinkBody) { + return this._request( + '/product/generate_pay_link', + { + body, + form: false, + json: true, + } + ); + } + + /** + * Get information about an order after a transaction completes. + * + * API documentation: https://developer.paddle.com/api-reference/fea392d1e2f4f-get-order-details + * + * @example + * const result = await client.getOrderDetails('219233-chre53d41f940e0-58aqh94971'); + */ + getOrderDetails(checkoutID: string) { + return this._request(`/order?checkout_id=${checkoutID}`, { + checkoutAPI: true, + }); + } + + /** + * Create a subscription modifier to dynamically change the subscription payment amount. + * + * API documentation: https://developer.paddle.com/api-reference/dc2b0c06f0481-create-modifier + * + * @example + * const result = await client.createSubscriptionModifier(123, 10); + * const result = await client.createSubscriptionModifier(123, 10, { recurring: false, description: 'description' }); + */ + createSubscriptionModifier( + subscriptionID: number, + amount: number, + options?: { + description?: string; + recurring?: boolean; + } + ) { + const { description, recurring } = options || {}; + + const body = { + subscription_id: subscriptionID, + modifier_amount: amount, + ...(description && { modifier_description: description }), + ...(typeof recurring === 'boolean' && { + modifier_recurring: recurring, + }), + }; + + return this._request< + CreateSubscriptionModifierResponse, + CreateSubscriptionModifierBody + >('/subscription/modifiers/create', { + body, + }); + } + + /** + * Get the used server URL. Some of the requests go to Checkout server, while most will go to Vendor server. + */ + serverURL(checkoutAPI = false): string { + return ( + (this.options && this.options.server) || + (checkoutAPI && + (this.options && this.options.sandbox + ? CHECKOUT_SANDBOX_URL + : CHECKOUT_SERVER_URL)) || + (this.options && this.options.sandbox + ? VENDOR_SANDBOX_URL + : VENDOR_SERVER_URL) + ); + } + + /** + * Execute a HTTP request + * + * @private + * @param {string} url - url for the request + * @param {object} options + * @param {object} [options.body] - body parameters / object + * @param {object} [options.headers] - header parameters + * @param {boolean} [options.form] - form parameter (ref: got package) + * @param {boolean} [options.json] - json parameter (ref: got package) + */ + private async _request( + path: string, + { + body, + headers, + form = true, + json = false, + checkoutAPI = false, + }: { + body?: TBody; + headers?: object; + form?: boolean; + json?: boolean; + checkoutAPI?: boolean; + } = {} + ): Promise { + const url = this.serverURL(checkoutAPI) + path; + // Requests to Checkout API are using only GET, + const method = checkoutAPI ? 'GET' : 'POST'; + + const fullBody = { + vendor_id: this.vendorID, + vendor_auth_code: this.apiKey, + ...body, + }; + + const options: OptionsOfDefaultResponseBody = { + headers: { + 'User-Agent': `paddle-sdk/${PACKAGE.version} (${PACKAGE.repository.url})`, + ...(headers || {}), + }, + method, + }; + if (method !== 'GET') { + if (form) { + options.form = fullBody; + } + if (json) { + options.json = fullBody; + } + } + + const data = await got(url, options).json>(); + + if ('success' in data && typeof data.success === 'boolean') { + if (data.success) { + const { response } = data; + // @ts-expect-error Ignore type error on fallback + return response || data.success; + } + + throw new Error( + `Request ${url} returned an error! response=${JSON.stringify(data)}` + ); + } + + return data as TResponse; + } + + /** + * @private + */ + private _first(response: TResponse[]): TResponse { + if (Array.isArray(response)) { + return response[0]; + } + return response; + } + + /** + * Get the list of transactions for a resource. + * + * API documentation: https://developer.paddle.com/api-reference/89c1805d821c2-list-transactions + * + * @private + */ + private _getTransactions( + type: 'user' | 'subscription' | 'order' | 'checkout' | 'product', + id: number | string, + page?: number + ) { + return this._request( + `/${type}/${id}/transactions`, + page ? { body: { page } } : undefined + ); + } +} diff --git a/lib/serialize.js b/src/serialize.ts similarity index 87% rename from lib/serialize.js rename to src/serialize.ts index f460c84..c5e22ba 100644 --- a/lib/serialize.js +++ b/src/serialize.ts @@ -1,7 +1,8 @@ -/* eslint no-prototype-builtins: 0 */ +/* eslint @typescript-eslint/ban-ts-comment: 0, no-prototype-builtins: 0 */ +// @ts-nocheck // Source: https://github.com/kvz/locutus/blob/master/src/php/var/serialize.js -function serialize(mixedValue) { +export default function serialize(mixedValue: unknown): string { // discuss at: http://locutus.io/php/serialize/ // original by: Arpad Ray (mailto:arpad@php.net) // improved by: Dino @@ -24,16 +25,16 @@ function serialize(mixedValue) { // example 2: serialize({firstName: 'Kevin', midName: 'van'}) // returns 2: 'a:2:{s:9:"firstName";s:5:"Kevin";s:7:"midName";s:3:"van";}' - var val, key, okey; - var ktype = ''; - var vals = ''; - var count = 0; + let val, key, okey; + let ktype = ''; + let vals = ''; + let count = 0; - var _utf8Size = function(str) { - var size = 0; - var i = 0; - var l = str.length; - var code = ''; + const _utf8Size = function(str) { + let size = 0; + let i = 0; + const l = str.length; + let code = ''; for (i = 0; i < l; i++) { code = str.charCodeAt(i); if (code < 0x0080) { @@ -47,12 +48,12 @@ function serialize(mixedValue) { return size; }; - var _getType = function(inp) { - var match; - var key; - var cons; - var types; - var type = typeof inp; + const _getType = function(inp) { + let match; + let key; + let cons; + let types; + let type = typeof inp; if (type === 'object' && !inp) { return 'null'; @@ -78,7 +79,7 @@ function serialize(mixedValue) { return type; }; - var type = _getType(mixedValue); + const type = _getType(mixedValue); switch (type) { case 'function': @@ -136,5 +137,3 @@ function serialize(mixedValue) { return val; } - -module.exports = serialize; diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 0000000..146b85c --- /dev/null +++ b/src/types.ts @@ -0,0 +1,206 @@ +export interface Product { + base_price: number; + currency: string; + description?: string; + icon: string; + id: number; + name: string; + sale_price: null; + screenshots: object[]; +} + +export interface PaddleResponseWrap { + success: boolean; + response: TResponse; +} + +export interface GetProductsResponse { + count: number; + products: Array; + total: number; +} + +export interface GetProductCouponsBody { + product_id: number; +} + +export interface ProductCoupon { + allowed_uses: number; + coupon: string; + description: string; + discount_amount: number; + discount_currency: string; + discount_type: string; + expires: string; + is_recurring: boolean; + times_used: number; +} + +export type GetProductCouponsResponse = Array; + +export interface GetSubscriptionPlansBody { + plan?: number; +} + +export interface SubscriptionPlan { + billing_period: number; + billing_type: string; + id: number; + initial_price: Record; + name: string; + recurring_price: Record; + trial_days: number; +} + +export type GetSubscriptionPlansResponse = Array; + +export interface Payment { + amount: number; + currency: string; + date: string; +} + +export interface GetSubscriptionUsersBody { + page?: number; + plan_id?: string; + results_per_page?: number; + state?: 'active' | 'past_due' | 'trialing' | 'paused' | 'deleted'; +} + +export interface SubscriptionUser { + subscription_id: number; + plan_id: number; + user_id: number; + user_email: string; + marketing_consent: boolean; + update_url: string; + cancel_url: string; + state: string; + signup_date: string; + last_payment: Payment; + payment_information: { + payment_method: string; + card_type: string; + last_four_digits: string; + expiry_date: string; + }; + quantity: number; + next_payment: Payment; +} + +export type GetSubscriptionUsersResponse = Array; + +export interface GetSubscriptionPaymentsBody { + plan?: number; +} + +export interface SubscriptionPayment { + id: number; + subscription_id: number; + amount: number; + currency: string; + payout_date: string; + is_paid: number; + receipt_url: string; + is_one_off_charge: boolean; +} + +export type GetSubscriptionPaymentsResponse = Array; + +export interface GetWebhookHistoryResponse { + current_page: number; + total_pages: number; + alerts_per_page: number; + total_alerts: number; + query_head: string; + data: Array<{ + id: number; + alert_id: number; + alert_name: string; + status: string; + created_at: string; + updated_at: string; + attempts: number; + fields: object; + }>; + query_tail: string; +} + +export interface Transaction { + order_id: string; + checkout_id: string; + amount: string; + currency: string; + status: string; + created_at: string; + passthrough: string; + product_id: number; + is_subscription: boolean; + is_one_off: boolean; + subscription: object; + user: object; + receipt_url: string; +} + +export type GetTransactionsResponse = Array; + +export interface UpdateSubscriptionUserBody { + bill_immediately?: boolean; + currency?: string; + keep_modifiers?: boolean; + plan_id?: number; + prorate?: boolean; + recurring_price?: number; + subscription_id: number; +} + +export interface UpdateSubscriptionUserResponse { + subscription_id: number; + user_id: number; + plan_id: number; + next_payment: Payment; +} + +export interface CreateSubscriptionModifierBody { + modifier_amount: number; + modifier_description?: string; + modifier_recurring?: boolean; + subscription_id: number; +} + +export interface CreateSubscriptionModifierResponse { + subscription_id: number; + modifier_id: number; +} + +export interface RescheduleSubscriptionPaymentBody { + date: string; + payment_id: number; +} + +export interface GeneratePaylinkBody { + custom_message?: string; + customer_country?: string; + customer_postcode?: string; + discountable?: number; + expires?: string; + image_url?: string; + is_recoverable?: number; + marketing_consent?: number; + passthrough?: string; + prices?: Array; + product_id?: number; + quantity_variable?: number; + quantity?: number; + recurring_prices?: string; + return_url?: string; + title?: string; + trial_days?: number; + vat_company_name?: string; + vat_number?: string; + webhook_url?: string; +} + +export interface GeneratePaylinkResponse { + url: string; +} diff --git a/tsconfig-cjs.json b/tsconfig-cjs.json new file mode 100644 index 0000000..cc7fb19 --- /dev/null +++ b/tsconfig-cjs.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "declaration": true, + "module": "CommonJS", + "noEmit": false, + "outDir": "./cjs", + "target": "ES2020" + }, + "extends": "./tsconfig.json", + "include": ["./src"], + "exclude": ["./src/__tests__"] +} diff --git a/tsconfig-esm.json b/tsconfig-esm.json new file mode 100644 index 0000000..53fe7f1 --- /dev/null +++ b/tsconfig-esm.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "declaration": true, + "module": "ESNext", + "noEmit": false, + "outDir": "./esm", + "target": "ESNext" + }, + "extends": "./tsconfig.json", + "include": ["./src"], + "exclude": ["./src/__tests__"] +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..67272df --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "esModuleInterop": true, + "lib": ["ES2020"], + "module": "ESNext", + "moduleResolution": "Node", + "noEmit": true, + "noErrorTruncation": true, + "skipLibCheck": true, + "strict": true, + "strictFunctionTypes": false, + "target": "ESNext", + "types": ["node", "jest"] + }, + "include": ["src", "utils"] +} diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000..ffdb367 --- /dev/null +++ b/typedoc.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "darkHighlightTheme": "dark-plus", + "includeVersion": true, + "includes": "./CHANGELOG.md", + "entryPoints": ["src/"], + "name": "Paddle SDK", + "navigationLinks": { + "Github": "https://github.com/avaly/paddle-sdk", + "Changelog": "https://github.com/avaly/paddle-sdk/blob/main/CHANGELOG.md" + }, + "out": "./docs", + "readme": "none", + "theme": "default" +} diff --git a/utils/constants.ts b/utils/constants.ts new file mode 100644 index 0000000..4cad38a --- /dev/null +++ b/utils/constants.ts @@ -0,0 +1,17 @@ +// https://paddle.com/docs/api-errors +export const DEFAULT_ERROR = { + success: false, + error: { + code: 123, + message: 'Error message.', + }, +}; + +export const VENDOR_ID = 'test-vendor-id'; + +export const VENDOR_API_KEY = 'test-vendor-api-key'; + +export const EXPECTED_BODY = { + vendor_id: VENDOR_ID, + vendor_auth_code: VENDOR_API_KEY, +}; diff --git a/utils/error.js b/utils/error.js deleted file mode 100644 index f552b59..0000000 --- a/utils/error.js +++ /dev/null @@ -1,10 +0,0 @@ -// https://paddle.com/docs/api-errors -const error = { - success: false, - error: { - code: 123, - message: 'Error message.', - }, -}; - -module.exports = error; diff --git a/utils/nock.js b/utils/nock.js deleted file mode 100644 index 226c0aa..0000000 --- a/utils/nock.js +++ /dev/null @@ -1,14 +0,0 @@ -const nock = require('nock'); - -const SERVER = 'http://test.paddle.com'; - -function getNock() { - return nock(SERVER, { - reqheaders: { - 'user-agent': /paddle-sdk\/\d+/, - }, - }); -} - -module.exports = getNock; -module.exports.SERVER = SERVER; diff --git a/utils/nock.ts b/utils/nock.ts new file mode 100644 index 0000000..5842379 --- /dev/null +++ b/utils/nock.ts @@ -0,0 +1,11 @@ +import nock from 'nock'; + +export const SERVER = 'http://test.paddle.com'; + +export default function getNock() { + return nock(SERVER, { + reqheaders: { + 'user-agent': /paddle-sdk\/\d+/, + }, + }); +} diff --git a/yarn.lock b/yarn.lock index e235450..c974250 100644 --- a/yarn.lock +++ b/yarn.lock @@ -156,7 +156,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.13", "@babel/parser@^7.20.7", "@babel/parser@^7.4.4": +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.13", "@babel/parser@^7.20.7": version "7.20.15" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.15.tgz#eec9f36d8eaf0948bb88c87a46784b5ee9fd0c89" integrity sha512-DI4a1oZuf8wC+oAJA9RW6ga3Zbe8RZFt7kD9i4qAspz3I/yHet1VvC3DiSy/fsUvv5pvJuNPh0LPOdCcqinDPg== @@ -298,14 +298,33 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@eslint/eslintrc@^1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.1.tgz#af58772019a2d271b7e2d4c23ff4ddcba3ccfb3e" - integrity sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA== +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + +"@eslint-community/eslint-utils@^4.2.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.3.0.tgz#a556790523a351b4e47e9d385f47265eaaf9780a" + integrity sha512-v3oplH6FYCULtFuCeqyuTd9D2WKO937Dxdq+GmHOLL72TTRriLxz2VLlNfkZRsvj6PKnOPAtuT6dwrs/pA5DvA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.4.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.4.0.tgz#3e61c564fcd6b921cb789838631c5ee44df09403" + integrity sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ== + +"@eslint/eslintrc@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.1.tgz#7888fe7ec8f21bc26d646dbd2c11cd776e21192d" + integrity sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.4.0" + espree "^9.5.0" globals "^13.19.0" ignore "^5.2.0" import-fresh "^3.2.1" @@ -313,6 +332,11 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" +"@eslint/js@8.36.0": + version "8.36.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.36.0.tgz#9837f768c03a1e4a30bd304a64fb8844f0e72efe" + integrity sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg== + "@humanwhocodes/config-array@^0.11.8": version "0.11.8" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9" @@ -353,61 +377,61 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@jest/console@^29.4.2": - version "29.4.2" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.4.2.tgz#f78374905c2454764152904a344a2d5226b0ef09" - integrity sha512-0I/rEJwMpV9iwi9cDEnT71a5nNGK9lj8Z4+1pRAU2x/thVXCDnaTGrvxyK+cAqZTFVFCiR+hfVrP4l2m+dCmQg== +"@jest/console@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.5.0.tgz#593a6c5c0d3f75689835f1b3b4688c4f8544cb57" + integrity sha512-NEpkObxPwyw/XxZVLPmAGKE89IQRp4puc6IQRPru6JKd1M3fW9v1xM1AnzIJE65hbCkzQAdnL8P47e9hzhiYLQ== dependencies: - "@jest/types" "^29.4.2" + "@jest/types" "^29.5.0" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^29.4.2" - jest-util "^29.4.2" + jest-message-util "^29.5.0" + jest-util "^29.5.0" slash "^3.0.0" -"@jest/core@^29.4.2": - version "29.4.2" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.4.2.tgz#6e999b67bdc2df9d96ba9b142465bda71ee472c2" - integrity sha512-KGuoQah0P3vGNlaS/l9/wQENZGNKGoWb+OPxh3gz+YzG7/XExvYu34MzikRndQCdM2S0tzExN4+FL37i6gZmCQ== +"@jest/core@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.5.0.tgz#76674b96904484e8214614d17261cc491e5f1f03" + integrity sha512-28UzQc7ulUrOQw1IsN/kv1QES3q2kkbl/wGslyhAclqZ/8cMdB5M68BffkIdSJgKBUt50d3hbwJ92XESlE7LiQ== dependencies: - "@jest/console" "^29.4.2" - "@jest/reporters" "^29.4.2" - "@jest/test-result" "^29.4.2" - "@jest/transform" "^29.4.2" - "@jest/types" "^29.4.2" + "@jest/console" "^29.5.0" + "@jest/reporters" "^29.5.0" + "@jest/test-result" "^29.5.0" + "@jest/transform" "^29.5.0" + "@jest/types" "^29.5.0" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" ci-info "^3.2.0" exit "^0.1.2" graceful-fs "^4.2.9" - jest-changed-files "^29.4.2" - jest-config "^29.4.2" - jest-haste-map "^29.4.2" - jest-message-util "^29.4.2" - jest-regex-util "^29.4.2" - jest-resolve "^29.4.2" - jest-resolve-dependencies "^29.4.2" - jest-runner "^29.4.2" - jest-runtime "^29.4.2" - jest-snapshot "^29.4.2" - jest-util "^29.4.2" - jest-validate "^29.4.2" - jest-watcher "^29.4.2" + jest-changed-files "^29.5.0" + jest-config "^29.5.0" + jest-haste-map "^29.5.0" + jest-message-util "^29.5.0" + jest-regex-util "^29.4.3" + jest-resolve "^29.5.0" + jest-resolve-dependencies "^29.5.0" + jest-runner "^29.5.0" + jest-runtime "^29.5.0" + jest-snapshot "^29.5.0" + jest-util "^29.5.0" + jest-validate "^29.5.0" + jest-watcher "^29.5.0" micromatch "^4.0.4" - pretty-format "^29.4.2" + pretty-format "^29.5.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^29.4.2": - version "29.4.2" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.4.2.tgz#ee92c316ee2fbdf0bcd9d2db0ef42d64fea26b56" - integrity sha512-JKs3VUtse0vQfCaFGJRX1bir9yBdtasxziSyu+pIiEllAQOe4oQhdCYIf3+Lx+nGglFktSKToBnRJfD5QKp+NQ== +"@jest/environment@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.5.0.tgz#9152d56317c1fdb1af389c46640ba74ef0bb4c65" + integrity sha512-5FXw2+wD29YU1d4I2htpRX7jYnAyTRjP2CsXQdo9SAM8g3ifxWPSV0HnClSn71xwctr0U3oZIIH+dtbfmnbXVQ== dependencies: - "@jest/fake-timers" "^29.4.2" - "@jest/types" "^29.4.2" + "@jest/fake-timers" "^29.5.0" + "@jest/types" "^29.5.0" "@types/node" "*" - jest-mock "^29.4.2" + jest-mock "^29.5.0" "@jest/expect-utils@^29.4.2": version "29.4.2" @@ -416,46 +440,53 @@ dependencies: jest-get-type "^29.4.2" -"@jest/expect@^29.4.2": - version "29.4.2" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.4.2.tgz#2d4a6a41b29380957c5094de19259f87f194578b" - integrity sha512-NUAeZVApzyaeLjfWIV/64zXjA2SS+NuUPHpAlO7IwVMGd5Vf9szTl9KEDlxY3B4liwLO31os88tYNHl6cpjtKQ== +"@jest/expect-utils@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.5.0.tgz#f74fad6b6e20f924582dc8ecbf2cb800fe43a036" + integrity sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg== dependencies: - expect "^29.4.2" - jest-snapshot "^29.4.2" + jest-get-type "^29.4.3" -"@jest/fake-timers@^29.4.2": - version "29.4.2" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.4.2.tgz#af43ee1a5720b987d0348f80df98f2cb17d45cd0" - integrity sha512-Ny1u0Wg6kCsHFWq7A/rW/tMhIedq2siiyHyLpHCmIhP7WmcAmd2cx95P+0xtTZlj5ZbJxIRQi4OPydZZUoiSQQ== +"@jest/expect@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.5.0.tgz#80952f5316b23c483fbca4363ce822af79c38fba" + integrity sha512-PueDR2HGihN3ciUNGr4uelropW7rqUfTiOn+8u0leg/42UhblPxHkfoh0Ruu3I9Y1962P3u2DY4+h7GVTSVU6g== dependencies: - "@jest/types" "^29.4.2" + expect "^29.5.0" + jest-snapshot "^29.5.0" + +"@jest/fake-timers@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.5.0.tgz#d4d09ec3286b3d90c60bdcd66ed28d35f1b4dc2c" + integrity sha512-9ARvuAAQcBwDAqOnglWq2zwNIRUDtk/SCkp/ToGEhFv5r86K21l+VEs0qNTaXtyiY0lEePl3kylijSYJQqdbDg== + dependencies: + "@jest/types" "^29.5.0" "@sinonjs/fake-timers" "^10.0.2" "@types/node" "*" - jest-message-util "^29.4.2" - jest-mock "^29.4.2" - jest-util "^29.4.2" + jest-message-util "^29.5.0" + jest-mock "^29.5.0" + jest-util "^29.5.0" -"@jest/globals@^29.4.2": - version "29.4.2" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.4.2.tgz#73f85f5db0e17642258b25fd0b9fc89ddedb50eb" - integrity sha512-zCk70YGPzKnz/I9BNFDPlK+EuJLk21ur/NozVh6JVM86/YYZtZHqxFFQ62O9MWq7uf3vIZnvNA0BzzrtxD9iyg== +"@jest/globals@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.5.0.tgz#6166c0bfc374c58268677539d0c181f9c1833298" + integrity sha512-S02y0qMWGihdzNbUiqSAiKSpSozSuHX5UYc7QbnHP+D9Lyw8DgGGCinrN9uSuHPeKgSSzvPom2q1nAtBvUsvPQ== dependencies: - "@jest/environment" "^29.4.2" - "@jest/expect" "^29.4.2" - "@jest/types" "^29.4.2" - jest-mock "^29.4.2" + "@jest/environment" "^29.5.0" + "@jest/expect" "^29.5.0" + "@jest/types" "^29.5.0" + jest-mock "^29.5.0" -"@jest/reporters@^29.4.2": - version "29.4.2" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.4.2.tgz#6abfa923941daae0acc76a18830ee9e79a22042d" - integrity sha512-10yw6YQe75zCgYcXgEND9kw3UZZH5tJeLzWv4vTk/2mrS1aY50A37F+XT2hPO5OqQFFnUWizXD8k1BMiATNfUw== +"@jest/reporters@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.5.0.tgz#985dfd91290cd78ddae4914ba7921bcbabe8ac9b" + integrity sha512-D05STXqj/M8bP9hQNSICtPqz97u7ffGzZu+9XLucXhkOFBqKcXe04JLZOgIekOxdb73MAoBUFnqvf7MCpKk5OA== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^29.4.2" - "@jest/test-result" "^29.4.2" - "@jest/transform" "^29.4.2" - "@jest/types" "^29.4.2" + "@jest/console" "^29.5.0" + "@jest/test-result" "^29.5.0" + "@jest/transform" "^29.5.0" + "@jest/types" "^29.5.0" "@jridgewell/trace-mapping" "^0.3.15" "@types/node" "*" chalk "^4.0.0" @@ -468,9 +499,9 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.1.3" - jest-message-util "^29.4.2" - jest-util "^29.4.2" - jest-worker "^29.4.2" + jest-message-util "^29.5.0" + jest-util "^29.5.0" + jest-worker "^29.5.0" slash "^3.0.0" string-length "^4.0.1" strip-ansi "^6.0.0" @@ -483,51 +514,58 @@ dependencies: "@sinclair/typebox" "^0.25.16" -"@jest/source-map@^29.4.2": - version "29.4.2" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.4.2.tgz#f9815d59e25cd3d6828e41489cd239271018d153" - integrity sha512-tIoqV5ZNgYI9XCKXMqbYe5JbumcvyTgNN+V5QW4My033lanijvCD0D4PI9tBw4pRTqWOc00/7X3KVvUh+qnF4Q== +"@jest/schemas@^29.4.3": + version "29.4.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.4.3.tgz#39cf1b8469afc40b6f5a2baaa146e332c4151788" + integrity sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg== + dependencies: + "@sinclair/typebox" "^0.25.16" + +"@jest/source-map@^29.4.3": + version "29.4.3" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.4.3.tgz#ff8d05cbfff875d4a791ab679b4333df47951d20" + integrity sha512-qyt/mb6rLyd9j1jUts4EQncvS6Yy3PM9HghnNv86QBlV+zdL2inCdK1tuVlL+J+lpiw2BI67qXOrX3UurBqQ1w== dependencies: "@jridgewell/trace-mapping" "^0.3.15" callsites "^3.0.0" graceful-fs "^4.2.9" -"@jest/test-result@^29.4.2": - version "29.4.2" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.4.2.tgz#34b0ba069f2e3072261e4884c8fb6bd15ed6fb8d" - integrity sha512-HZsC3shhiHVvMtP+i55MGR5bPcc3obCFbA5bzIOb8pCjwBZf11cZliJncCgaVUbC5yoQNuGqCkC0Q3t6EItxZA== +"@jest/test-result@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.5.0.tgz#7c856a6ca84f45cc36926a4e9c6b57f1973f1408" + integrity sha512-fGl4rfitnbfLsrfx1uUpDEESS7zM8JdgZgOCQuxQvL1Sn/I6ijeAVQWGfXI9zb1i9Mzo495cIpVZhA0yr60PkQ== dependencies: - "@jest/console" "^29.4.2" - "@jest/types" "^29.4.2" + "@jest/console" "^29.5.0" + "@jest/types" "^29.5.0" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^29.4.2": - version "29.4.2" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.4.2.tgz#8b48e5bc4af80b42edacaf2a733d4f295edf28fb" - integrity sha512-9Z2cVsD6CcObIVrWigHp2McRJhvCxL27xHtrZFgNC1RwnoSpDx6fZo8QYjJmziFlW9/hr78/3sxF54S8B6v8rg== +"@jest/test-sequencer@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.5.0.tgz#34d7d82d3081abd523dbddc038a3ddcb9f6d3cc4" + integrity sha512-yPafQEcKjkSfDXyvtgiV4pevSeyuA6MQr6ZIdVkWJly9vkqjnFfcfhRQqpD5whjoU8EORki752xQmjaqoFjzMQ== dependencies: - "@jest/test-result" "^29.4.2" + "@jest/test-result" "^29.5.0" graceful-fs "^4.2.9" - jest-haste-map "^29.4.2" + jest-haste-map "^29.5.0" slash "^3.0.0" -"@jest/transform@^29.4.2": - version "29.4.2" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.4.2.tgz#b24b72dbab4c8675433a80e222d6a8ef4656fb81" - integrity sha512-kf1v5iTJHn7p9RbOsBuc/lcwyPtJaZJt5885C98omWz79NIeD3PfoiiaPSu7JyCyFzNOIzKhmMhQLUhlTL9BvQ== +"@jest/transform@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.5.0.tgz#cf9c872d0965f0cbd32f1458aa44a2b1988b00f9" + integrity sha512-8vbeZWqLJOvHaDfeMuoHITGKSz5qWc9u04lnWrQE3VyuSw604PzQM824ZeX9XSjUCeDiE3GuxZe5UKa8J61NQw== dependencies: "@babel/core" "^7.11.6" - "@jest/types" "^29.4.2" + "@jest/types" "^29.5.0" "@jridgewell/trace-mapping" "^0.3.15" babel-plugin-istanbul "^6.1.1" chalk "^4.0.0" convert-source-map "^2.0.0" fast-json-stable-stringify "^2.1.0" graceful-fs "^4.2.9" - jest-haste-map "^29.4.2" - jest-regex-util "^29.4.2" - jest-util "^29.4.2" + jest-haste-map "^29.5.0" + jest-regex-util "^29.4.3" + jest-util "^29.5.0" micromatch "^4.0.4" pirates "^4.0.4" slash "^3.0.0" @@ -545,6 +583,18 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" +"@jest/types@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.5.0.tgz#f59ef9b031ced83047c67032700d8c807d6e1593" + integrity sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog== + dependencies: + "@jest/schemas" "^29.4.3" + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^17.0.8" + chalk "^4.0.0" + "@jridgewell/gen-mapping@^0.1.0": version "0.1.1" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" @@ -562,7 +612,7 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/resolve-uri@3.1.0": +"@jridgewell/resolve-uri@3.1.0", "@jridgewell/resolve-uri@^3.0.3": version "3.1.0" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== @@ -577,6 +627,14 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.15", "@jridgewell/trace-mapping@^0.3.9": version "0.3.17" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985" @@ -644,6 +702,26 @@ dependencies: defer-to-connect "^1.1.1" +"@tsconfig/node10@^1.0.7": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" + integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" + integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== + "@types/babel__core@^7.1.14": version "7.20.0" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.0.tgz#61bc5a4cae505ce98e1e36c5445e4bee060d8891" @@ -732,6 +810,19 @@ dependencies: "@types/istanbul-lib-report" "*" +"@types/jest@29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.0.tgz#337b90bbcfe42158f39c2fb5619ad044bbb518ac" + integrity sha512-3Emr5VOl/aoBwnWcH/EFQvlSAmjV+XtV9GGu5mwdYew5vhQh0IUZx/60x0TzHDu09Bi7HMx10t/namdJw5QIcg== + dependencies: + expect "^29.0.0" + pretty-format "^29.0.0" + +"@types/json-schema@^7.0.9": + version "7.0.11" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" + integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== + "@types/keyv@*": version "3.1.1" resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.1.tgz#e45a45324fca9dab716ab1230ee249c9fb52cfa7" @@ -754,6 +845,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.1.tgz#6d11a8c2d58405b3db9388ab740106cbfa64c3c9" integrity sha512-hx6zWtudh3Arsbl3cXay+JnkvVgCKzCWKv42C9J01N2T2np4h8w5X8u6Tpz5mj38kE3M9FM0Pazx8vKFFMnjLQ== +"@types/node@14.18.36": + version "14.18.36" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.36.tgz#c414052cb9d43fab67d679d5f3c641be911f5835" + integrity sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ== + "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -771,6 +867,11 @@ dependencies: "@types/node" "*" +"@types/semver@^7.3.12": + version "7.3.13" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" + integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== + "@types/stack-utils@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" @@ -788,6 +889,90 @@ dependencies: "@types/yargs-parser" "*" +"@typescript-eslint/eslint-plugin@5.56.0": + version "5.56.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.56.0.tgz#e4fbb4d6dd8dab3e733485c1a44a02189ae75364" + integrity sha512-ZNW37Ccl3oMZkzxrYDUX4o7cnuPgU+YrcaYXzsRtLB16I1FR5SHMqga3zGsaSliZADCWo2v8qHWqAYIj8nWCCg== + dependencies: + "@eslint-community/regexpp" "^4.4.0" + "@typescript-eslint/scope-manager" "5.56.0" + "@typescript-eslint/type-utils" "5.56.0" + "@typescript-eslint/utils" "5.56.0" + debug "^4.3.4" + grapheme-splitter "^1.0.4" + ignore "^5.2.0" + natural-compare-lite "^1.4.0" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/parser@5.56.0": + version "5.56.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.56.0.tgz#42eafb44b639ef1dbd54a3dbe628c446ca753ea6" + integrity sha512-sn1OZmBxUsgxMmR8a8U5QM/Wl+tyqlH//jTqCg8daTAmhAk26L2PFhcqPLlYBhYUJMZJK276qLXlHN3a83o2cg== + dependencies: + "@typescript-eslint/scope-manager" "5.56.0" + "@typescript-eslint/types" "5.56.0" + "@typescript-eslint/typescript-estree" "5.56.0" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@5.56.0": + version "5.56.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.56.0.tgz#62b4055088903b5254fa20403010e1c16d6ab725" + integrity sha512-jGYKyt+iBakD0SA5Ww8vFqGpoV2asSjwt60Gl6YcO8ksQ8s2HlUEyHBMSa38bdLopYqGf7EYQMUIGdT/Luw+sw== + dependencies: + "@typescript-eslint/types" "5.56.0" + "@typescript-eslint/visitor-keys" "5.56.0" + +"@typescript-eslint/type-utils@5.56.0": + version "5.56.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.56.0.tgz#e6f004a072f09c42e263dc50e98c70b41a509685" + integrity sha512-8WxgOgJjWRy6m4xg9KoSHPzBNZeQbGlQOH7l2QEhQID/+YseaFxg5J/DLwWSsi9Axj4e/cCiKx7PVzOq38tY4A== + dependencies: + "@typescript-eslint/typescript-estree" "5.56.0" + "@typescript-eslint/utils" "5.56.0" + debug "^4.3.4" + tsutils "^3.21.0" + +"@typescript-eslint/types@5.56.0": + version "5.56.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.56.0.tgz#b03f0bfd6fa2afff4e67c5795930aff398cbd834" + integrity sha512-JyAzbTJcIyhuUhogmiu+t79AkdnqgPUEsxMTMc/dCZczGMJQh1MK2wgrju++yMN6AWroVAy2jxyPcPr3SWCq5w== + +"@typescript-eslint/typescript-estree@5.56.0": + version "5.56.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.56.0.tgz#48342aa2344649a03321e74cab9ccecb9af086c3" + integrity sha512-41CH/GncsLXOJi0jb74SnC7jVPWeVJ0pxQj8bOjH1h2O26jXN3YHKDT1ejkVz5YeTEQPeLCCRY0U2r68tfNOcg== + dependencies: + "@typescript-eslint/types" "5.56.0" + "@typescript-eslint/visitor-keys" "5.56.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.56.0": + version "5.56.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.56.0.tgz#db64705409b9a15546053fb4deb2888b37df1f41" + integrity sha512-XhZDVdLnUJNtbzaJeDSCIYaM+Tgr59gZGbFuELgF7m0IY03PlciidS7UQNKLE0+WpUTn1GlycEr6Ivb/afjbhA== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.56.0" + "@typescript-eslint/types" "5.56.0" + "@typescript-eslint/typescript-estree" "5.56.0" + eslint-scope "^5.1.1" + semver "^7.3.7" + +"@typescript-eslint/visitor-keys@5.56.0": + version "5.56.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.56.0.tgz#f19eb297d972417eb13cb69b35b3213e13cc214f" + integrity sha512-1mFdED7u5bZpX6Xxf5N9U2c18sb+8EvU3tyOIj6LQZ5OOvnmj8BVeNNP603OFPm5KkS1a7IvCIcwrdHXaEMG/Q== + dependencies: + "@typescript-eslint/types" "5.56.0" + eslint-visitor-keys "^3.3.0" + JSONStream@^1.0.4: version "1.3.1" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a" @@ -800,7 +985,12 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.8.0: +acorn-walk@^8.1.1: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + +acorn@^8.4.1, acorn@^8.8.0: version "8.8.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== @@ -828,12 +1018,6 @@ ajv@^6.10.0, ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ansi-escape-sequences@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/ansi-escape-sequences/-/ansi-escape-sequences-4.0.0.tgz#e0ecb042958b71e42942d35c1fcf1d9b00a0f67e" - dependencies: - array-back "^2.0.0" - ansi-escapes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" @@ -858,6 +1042,11 @@ ansi-regex@^5.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== +ansi-sequence-parser@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz#4d790f31236ac20366b23b3916b789e1bde39aed" + integrity sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -894,6 +1083,11 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + argparse@^1.0.7: version "1.0.9" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" @@ -905,28 +1099,6 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -array-back@^1.0.2, array-back@^1.0.3, array-back@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/array-back/-/array-back-1.0.4.tgz#644ba7f095f7ffcf7c43b5f0dc39d3c1f03c063b" - dependencies: - typical "^2.6.0" - -array-back@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/array-back/-/array-back-2.0.0.tgz#6877471d51ecc9c9bfa6136fb6c7d5fe69748022" - dependencies: - typical "^2.6.1" - -array-back@^3.0.1: - version "3.1.0" - resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0" - integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q== - -array-back@^4.0.0, array-back@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/array-back/-/array-back-4.0.1.tgz#9b80312935a52062e1a233a9c7abeb5481b30e90" - integrity sha512-Z/JnaVEXv+A9xabHzN43FiiiWEE7gPCRXMrVmRm00tWbjZRul1iHm7ECzlyNq1p4a4ATXz+G9FJ3GqGOkOV3fg== - array-find-index@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" @@ -949,15 +1121,15 @@ assertion-error@^1.1.0: resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== -babel-jest@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.4.2.tgz#b17b9f64be288040877cbe2649f91ac3b63b2ba6" - integrity sha512-vcghSqhtowXPG84posYkkkzcZsdayFkubUgbE3/1tuGbX7AQtwCkkNA/wIbB0BMjuCPoqTkiDyKN7Ty7d3uwNQ== +babel-jest@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.5.0.tgz#3fe3ddb109198e78b1c88f9ebdecd5e4fc2f50a5" + integrity sha512-mA4eCDh5mSo2EcA9xQjVTpmbbNk32Zb3Q3QFQsNhaK56Q+yoXowzFodLux30HRgyOho5rsQ6B0P9QpMkvvnJ0Q== dependencies: - "@jest/transform" "^29.4.2" + "@jest/transform" "^29.5.0" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^29.4.2" + babel-preset-jest "^29.5.0" chalk "^4.0.0" graceful-fs "^4.2.9" slash "^3.0.0" @@ -973,10 +1145,10 @@ babel-plugin-istanbul@^6.1.1: istanbul-lib-instrument "^5.0.4" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.4.2.tgz#22aa43e255230f02371ffef1cac7eedef58f60bc" - integrity sha512-5HZRCfMeWypFEonRbEkwWXtNS1sQK159LhRVyRuLzyfVBxDy/34Tr/rg4YVi0SScSJ4fqeaR/OIeceJ/LaQ0pQ== +babel-plugin-jest-hoist@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz#a97db437936f441ec196990c9738d4b88538618a" + integrity sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" @@ -1001,12 +1173,12 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.4.2.tgz#f0b20c6a79a9f155515e72a2d4f537fe002a4e38" - integrity sha512-ecWdaLY/8JyfUDr0oELBMpj3R5I1L6ZqG+kRJmwqfHtLWuPrJStR0LUkvUhfykJWTsXXMnohsayN/twltBbDrQ== +babel-preset-jest@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz#57bc8cc88097af7ff6a5ab59d1cd29d52a5916e2" + integrity sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg== dependencies: - babel-plugin-jest-hoist "^29.4.2" + babel-plugin-jest-hoist "^29.5.0" babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: @@ -1014,11 +1186,6 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -bluebird@^3.5.4: - version "3.5.5" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" - integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w== - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1027,6 +1194,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + braces@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -1044,6 +1218,13 @@ browserslist@^4.21.3: node-releases "^2.0.8" update-browserslist-db "^1.0.10" +bs-logger@0.x: + version "0.2.6" + resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" + integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== + dependencies: + fast-json-stable-stringify "2.x" + bser@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" @@ -1055,15 +1236,6 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== -cache-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cache-point/-/cache-point-1.0.0.tgz#3d9769fc04d7a5b3005fc6258e6ebcaccb5f15f3" - integrity sha512-ZqrZp9Hi5Uq7vfSGmNP2bUT/9DzZC2Y/GXjHB8rUJN1a+KLmbV05+vxHipNsg8+CSVgjcVVzLV8VZms6w8ZeRw== - dependencies: - array-back "^4.0.0" - fs-then-native "^2.0.0" - mkdirp2 "^1.0.4" - cacheable-lookup@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-0.2.1.tgz#f474ae2c686667d7ea08c43409ad31b2b31b26c2" @@ -1144,13 +1316,6 @@ caniuse-lite@^1.0.30001449: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001450.tgz#022225b91200589196b814b51b1bbe45144cf74f" integrity sha512-qMBmvmQmFXaSxexkjjfMvD5rnDL0+m+dUMZKoDYsGG8iZN29RuYh9eRoMvKsT6uMAWlyUUGDEQGJJYjzCIO9ew== -catharsis@^0.8.11: - version "0.8.11" - resolved "https://registry.yarnpkg.com/catharsis/-/catharsis-0.8.11.tgz#d0eb3d2b82b7da7a3ce2efb1a7b00becc6643468" - integrity sha512-a+xUyMV7hD1BrDQA/3iPV7oc+6W26BgVJO05PGEoatMyIuPScQKsde6i3YorWX1qs+AZjnJ18NqdKoCtKiNh1g== - dependencies: - lodash "^4.17.14" - chai@^4.1.2: version "4.2.0" resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" @@ -1163,6 +1328,15 @@ chai@^4.1.2: pathval "^1.1.0" type-detect "^4.0.5" +chalk@2.4.2, chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -1173,15 +1347,6 @@ chalk@^1.0.0, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - chalk@^4.0.0: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" @@ -1275,14 +1440,6 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" -collect-all@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/collect-all/-/collect-all-1.0.3.tgz#1abcc20448b58a1447487fcf34130e9512b0acf8" - integrity sha512-0y0rBgoX8IzIjBAUnO73SEtSb4Mhk3IoceWJq5zZSxb9mWORhWH8xLYo4EDSOE1jRBk1LhmfjqWFFt10h/+MEA== - dependencies: - stream-connect "^1.0.2" - stream-via "^1.0.4" - collect-v8-coverage@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" @@ -1310,37 +1467,6 @@ colors@~0.6.0-1: version "0.6.2" resolved "https://registry.yarnpkg.com/colors/-/colors-0.6.2.tgz#2423fe6678ac0c5dae8852e5d0e5be08c997abcc" -command-line-args@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.1.1.tgz#88e793e5bb3ceb30754a86863f0401ac92fd369a" - integrity sha512-hL/eG8lrll1Qy1ezvkant+trihbGnaKaeEjj6Scyr3DN+RC7iQ5Rz84IeLERfAWDGo0HBSNAakczwgCilDXnWg== - dependencies: - array-back "^3.0.1" - find-replace "^3.0.0" - lodash.camelcase "^4.3.0" - typical "^4.0.0" - -command-line-tool@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/command-line-tool/-/command-line-tool-0.8.0.tgz#b00290ef1dfc11cc731dd1f43a92cfa5f21e715b" - integrity sha512-Xw18HVx/QzQV3Sc5k1vy3kgtOeGmsKIqwtFFoyjI4bbcpSgnw2CWVULvtakyw4s6fhyAdI6soQQhXc2OzJy62g== - dependencies: - ansi-escape-sequences "^4.0.0" - array-back "^2.0.0" - command-line-args "^5.0.0" - command-line-usage "^4.1.0" - typical "^2.6.1" - -command-line-usage@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-4.1.0.tgz#a6b3b2e2703b4dcf8bd46ae19e118a9a52972882" - integrity sha512-MxS8Ad995KpdAC0Jopo/ovGIroV/m0KHwzKfXxKag6FHOkGsH8/lv5yjgablcRxCJJC0oJeUMuO/gmaq+Wq46g== - dependencies: - ansi-escape-sequences "^4.0.0" - array-back "^2.0.0" - table-layout "^0.4.2" - typical "^2.6.1" - commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -1350,11 +1476,6 @@ commander@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.1.0.tgz#d121bbae860d9992a3d517ba96f56588e47c6781" -common-sequence@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/common-sequence/-/common-sequence-2.0.0.tgz#a4f01aaf5aebd0ac1ce43653e8c8fe6f0ef3a987" - integrity sha512-f0QqPLpRTgMQn/pQIynf+SdE73Lw5Q1jn4hjirHLgH/NJ71TiHjXusV16BmOyuK5rRQ1W2f++II+TFZbQOh4hA== - compare-func@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648" @@ -1385,13 +1506,7 @@ concat-stream@^2.0.0: readable-stream "^3.0.2" typedarray "^0.0.6" -config-master@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/config-master/-/config-master-3.1.0.tgz#667663590505a283bf26a484d68489d74c5485da" - dependencies: - walk-back "^2.0.1" - -conventional-changelog-angular@^5.0.10: +conventional-changelog-angular@^5.0.6: version "5.0.13" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz#896885d63b914a70d4934b59d2fe7bde1832b28c" integrity sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA== @@ -1399,14 +1514,14 @@ conventional-changelog-angular@^5.0.10: compare-func "^2.0.0" q "^1.5.1" -conventional-changelog-atom@^2.0.7: +conventional-changelog-atom@^2.0.3: version "2.0.8" resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-2.0.8.tgz#a759ec61c22d1c1196925fca88fe3ae89fd7d8de" integrity sha512-xo6v46icsFTK3bb7dY/8m2qvc8sZemRgdqLb/bjpBsH2UyOS8rKNTgcb5025Hri6IpANPApbXMg15QLb1LJpBw== dependencies: q "^1.5.1" -conventional-changelog-codemirror@^2.0.7: +conventional-changelog-codemirror@^2.0.3: version "2.0.8" resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.8.tgz#398e9530f08ce34ec4640af98eeaf3022eb1f7dc" integrity sha512-z5DAsn3uj1Vfp7po3gpt2Boc+Bdwmw2++ZHa5Ak9k0UKsYAO5mH1UBTN0qSCuJZREIhX6WU4E1p3IW2oRCNzQw== @@ -1418,16 +1533,16 @@ conventional-changelog-config-spec@2.1.0: resolved "https://registry.yarnpkg.com/conventional-changelog-config-spec/-/conventional-changelog-config-spec-2.1.0.tgz#874a635287ef8b581fd8558532bf655d4fb59f2d" integrity sha512-IpVePh16EbbB02V+UA+HQnnPIohgXvJRxHcS5+Uwk4AT5LjzCZJm5sp/yqs5C6KZJ1jMsV4paEV13BN1pvDuxQ== -conventional-changelog-conventionalcommits@4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.3.0.tgz#c4205a659f7ca9d7881f29ee78a4e7d6aeb8b3c2" - integrity sha512-oYHydvZKU+bS8LnGqTMlNrrd7769EsuEHKy4fh1oMdvvDi7fem8U+nvfresJ1IDB8K00Mn4LpiA/lR+7Gs6rgg== +conventional-changelog-conventionalcommits@4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.2.3.tgz#22855b32d57d0328951c1c2dc01b172a5f24ea37" + integrity sha512-atGa+R4vvEhb8N/8v3IoW59gCBJeeFiX6uIbPu876ENAmkMwsenyn0R21kdDHJFLQdy6zW4J6b4xN8KI3b9oww== dependencies: compare-func "^1.3.1" lodash "^4.17.15" q "^1.5.1" -conventional-changelog-conventionalcommits@^4.3.0: +conventional-changelog-conventionalcommits@^4.2.3: version "4.6.3" resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.3.tgz#0765490f56424b46f6cb4db9135902d6e5a36dc2" integrity sha512-LTTQV4fwOM4oLPad317V/QNQ1FY4Hju5qeBIM1uTHbrnCE+Eg4CdRZ3gO2pUeR+tzWdp80M2j3qFFEDWVqOV4g== @@ -1436,7 +1551,7 @@ conventional-changelog-conventionalcommits@^4.3.0: lodash "^4.17.15" q "^1.5.1" -conventional-changelog-core@^4.1.7: +conventional-changelog-core@^4.1.4: version "4.2.4" resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.4.tgz#e50d047e8ebacf63fac3dc67bf918177001e1e9f" integrity sha512-gDVS+zVJHE2v4SLc6B0sLsPiloR0ygU7HaDW14aNJE1v4SlqJPILPl/aJC7YdtRE4CybBf8gDwObBvKha8Xlyg== @@ -1456,35 +1571,35 @@ conventional-changelog-core@^4.1.7: read-pkg-up "^3.0.0" through2 "^4.0.0" -conventional-changelog-ember@^2.0.8: +conventional-changelog-ember@^2.0.4: version "2.0.9" resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-2.0.9.tgz#619b37ec708be9e74a220f4dcf79212ae1c92962" integrity sha512-ulzIReoZEvZCBDhcNYfDIsLTHzYHc7awh+eI44ZtV5cx6LVxLlVtEmcO+2/kGIHGtw+qVabJYjdI5cJOQgXh1A== dependencies: q "^1.5.1" -conventional-changelog-eslint@^3.0.8: +conventional-changelog-eslint@^3.0.4: version "3.0.9" resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.9.tgz#689bd0a470e02f7baafe21a495880deea18b7cdb" integrity sha512-6NpUCMgU8qmWmyAMSZO5NrRd7rTgErjrm4VASam2u5jrZS0n38V7Y9CzTtLT2qwz5xEChDR4BduoWIr8TfwvXA== dependencies: q "^1.5.1" -conventional-changelog-express@^2.0.5: +conventional-changelog-express@^2.0.1: version "2.0.6" resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-2.0.6.tgz#420c9d92a347b72a91544750bffa9387665a6ee8" integrity sha512-SDez2f3iVJw6V563O3pRtNwXtQaSmEfTCaTBPCqn0oG0mfkq0rX4hHBq5P7De2MncoRixrALj3u3oQsNK+Q0pQ== dependencies: q "^1.5.1" -conventional-changelog-jquery@^3.0.10: +conventional-changelog-jquery@^3.0.6: version "3.0.11" resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.11.tgz#d142207400f51c9e5bb588596598e24bba8994bf" integrity sha512-x8AWz5/Td55F7+o/9LQ6cQIPwrCjfJQ5Zmfqi8thwUEKHstEn4kTIofXub7plf1xvFA2TqhZlq7fy5OmV6BOMw== dependencies: q "^1.5.1" -conventional-changelog-jshint@^2.0.7: +conventional-changelog-jshint@^2.0.3: version "2.0.9" resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.9.tgz#f2d7f23e6acd4927a238555d92c09b50fe3852ff" integrity sha512-wMLdaIzq6TNnMHMy31hql02OEQ8nCQfExw1SE0hYL5KvU+JCTuPaDO+7JiogGT2gJAxiUGATdtYYfh+nT+6riA== @@ -1492,7 +1607,7 @@ conventional-changelog-jshint@^2.0.7: compare-func "^2.0.0" q "^1.5.1" -conventional-changelog-preset-loader@^2.3.4: +conventional-changelog-preset-loader@^2.3.0: version "2.3.4" resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz#14a855abbffd59027fd602581f1f34d9862ea44c" integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== @@ -1512,28 +1627,28 @@ conventional-changelog-writer@^5.0.0: split "^1.0.0" through2 "^4.0.0" -conventional-changelog@3.1.21: - version "3.1.21" - resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-3.1.21.tgz#4a774e6bf503acfd7e4685bb750da8c0eccf1e0d" - integrity sha512-ZGecVZPEo3aC75VVE4nu85589dDhpMyqfqgUM5Myq6wfKWiNqhDJLSDMsc8qKXshZoY7dqs1hR0H/15kI/G2jQ== - dependencies: - conventional-changelog-angular "^5.0.10" - conventional-changelog-atom "^2.0.7" - conventional-changelog-codemirror "^2.0.7" - conventional-changelog-conventionalcommits "^4.3.0" - conventional-changelog-core "^4.1.7" - conventional-changelog-ember "^2.0.8" - conventional-changelog-eslint "^3.0.8" - conventional-changelog-express "^2.0.5" - conventional-changelog-jquery "^3.0.10" - conventional-changelog-jshint "^2.0.7" - conventional-changelog-preset-loader "^2.3.4" +conventional-changelog@3.1.18: + version "3.1.18" + resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-3.1.18.tgz#7da0a5ab34a604b920b8bf71c6cf5d952f0e805e" + integrity sha512-aN6a3rjgV8qwAJj3sC/Lme2kvswWO7fFSGQc32gREcwIOsaiqBaO6f2p0NomFaPDnTqZ+mMZFLL3hlzvEnZ0mQ== + dependencies: + conventional-changelog-angular "^5.0.6" + conventional-changelog-atom "^2.0.3" + conventional-changelog-codemirror "^2.0.3" + conventional-changelog-conventionalcommits "^4.2.3" + conventional-changelog-core "^4.1.4" + conventional-changelog-ember "^2.0.4" + conventional-changelog-eslint "^3.0.4" + conventional-changelog-express "^2.0.1" + conventional-changelog-jquery "^3.0.6" + conventional-changelog-jshint "^2.0.3" + conventional-changelog-preset-loader "^2.3.0" conventional-commit-types@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/conventional-commit-types/-/conventional-commit-types-2.2.0.tgz#5db95739d6c212acbe7b6f656a11b940baa68946" -conventional-commits-filter@^2.0.6, conventional-commits-filter@^2.0.7: +conventional-commits-filter@^2.0.2, conventional-commits-filter@^2.0.7: version "2.0.7" resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz#f8d9b4f182fce00c9af7139da49365b136c8a0b3" integrity sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA== @@ -1541,7 +1656,7 @@ conventional-commits-filter@^2.0.6, conventional-commits-filter@^2.0.7: lodash.ismatch "^4.4.0" modify-values "^1.0.0" -conventional-commits-parser@^3.1.0, conventional-commits-parser@^3.2.0: +conventional-commits-parser@^3.0.8, conventional-commits-parser@^3.2.0: version "3.2.4" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz#a7d3b77758a202a9b2293d2112a8d8052c740972" integrity sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q== @@ -1553,18 +1668,18 @@ conventional-commits-parser@^3.1.0, conventional-commits-parser@^3.2.0: split2 "^3.0.0" through2 "^4.0.0" -conventional-recommended-bump@6.0.9: - version "6.0.9" - resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-6.0.9.tgz#49ee74f52fbafcc63e89e2297d020279fea318f0" - integrity sha512-DpRmW1k8CpRrcsXHOPGgHgOd4BMGiq2gtXAveGM8B9pSd9b4r4WKnqp1Fd0vkDtk8l973mIk8KKKUYnKRr9SFw== +conventional-recommended-bump@6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-6.0.5.tgz#be7ec24b43bef57108042ea1d49758b58beabc03" + integrity sha512-srkferrB4kACPEbKYltZwX1CQZAEqbQkabKN444mavLRVMetzwJFJf23/+pwvtMsWbd+cc4HaleV1nHke0f8Rw== dependencies: concat-stream "^2.0.0" - conventional-changelog-preset-loader "^2.3.4" - conventional-commits-filter "^2.0.6" - conventional-commits-parser "^3.1.0" + conventional-changelog-preset-loader "^2.3.0" + conventional-commits-filter "^2.0.2" + conventional-commits-parser "^3.0.8" git-raw-commits "2.0.0" - git-semver-tags "^4.0.0" - meow "^7.0.0" + git-semver-tags "^3.0.1" + meow "^5.0.0" q "^1.5.1" convert-source-map@^1.6.0, convert-source-map@^1.7.0: @@ -1591,6 +1706,11 @@ cosmiconfig@^5.2.1: js-yaml "^3.13.1" parse-json "^4.0.0" +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -1637,7 +1757,7 @@ dateformat@^3.0.0: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -debug@^4.1.0, debug@^4.1.1, debug@^4.3.2: +debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -1675,11 +1795,6 @@ deep-eql@^3.0.1: dependencies: type-detect "^4.0.0" -deep-extend@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - deep-is@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" @@ -1709,12 +1824,12 @@ del@^5.0.0: rimraf "^3.0.0" slash "^3.0.0" -detect-indent@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6" - integrity sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA== +detect-indent@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.0.0.tgz#0abd0f549f69fc6659a254fe96786186b6f528fd" + integrity sha512-oSyFlqaTHCItVRGK5RmrmjB+CmaMOW7IaNA/kdxqhoa6d17j/5ce9O9eWXmV/KEdRwqpQA+Vqe8a8Bsybu4YnA== -detect-newline@^3.0.0, detect-newline@^3.1.0: +detect-newline@3.1.0, detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== @@ -1724,6 +1839,16 @@ diff-sequences@^29.4.2: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.4.2.tgz#711fe6bd8a5869fe2539cee4a5152425ff671fda" integrity sha512-R6P0Y6PrsH3n4hUXxL3nns0rbRk6Q33js3ygJBeEpbzLzgcNuJ61+u0RXasFpTKISw99TxUzFnumSnRLsjhLaw== +diff-sequences@^29.4.3: + version "29.4.3" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.4.3.tgz#9314bc1fabe09267ffeca9cbafc457d8499a13f2" + integrity sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA== + +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -1731,24 +1856,6 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -dmd@^4.0.5: - version "4.0.6" - resolved "https://registry.yarnpkg.com/dmd/-/dmd-4.0.6.tgz#c533cae847307984527263a4b41a1c6e3ef344a2" - integrity sha512-7ZYAnFQ6jGm4SICArwqNPylJ83PaOdPTAkds3Z/s1ueFqSc5ilJ2F0b7uP+35W1PUbemH++gn5/VlC3KwEgiHQ== - dependencies: - array-back "^4.0.1" - cache-point "^1.0.0" - common-sequence "^2.0.0" - file-set "^3.0.0" - handlebars "^4.5.3" - marked "^0.7.0" - object-get "^2.1.0" - reduce-flatten "^3.0.0" - reduce-unique "^2.0.1" - reduce-without "^1.0.1" - test-value "^3.0.0" - walk-back "^4.0.0" - doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -1769,7 +1876,7 @@ dot-prop@^5.1.0: dependencies: is-obj "^2.0.0" -dotgitignore@^2.1.0: +dotgitignore@2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/dotgitignore/-/dotgitignore-2.1.0.tgz#a4b15a4e4ef3cf383598aaf1dfa4a04bcc089b7b" integrity sha512-sCm11ak2oY6DglEPpCB8TixLjWAxd3kJTs6UIcSasNYxXdFPV+YKlye92c8H4kKFqV5qYMIh7d+cYecEg0dIkA== @@ -1807,11 +1914,6 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" -entities@~1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" - integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== - error-ex@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" @@ -1837,6 +1939,14 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + eslint-scope@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" @@ -1845,29 +1955,20 @@ eslint-scope@^7.1.1: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - eslint-visitor-keys@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@^8.0.0: - version "8.33.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.33.0.tgz#02f110f32998cb598c6461f24f4d306e41ca33d7" - integrity sha512-WjOpFQgKK8VrCnAtl8We0SUOy/oVZ5NHykyMiagV1M9r8IFpIJX7DduK6n1mpfhlG7T1NLWm2SuD8QB7KFySaA== +eslint@8.36.0: + version "8.36.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.36.0.tgz#1bd72202200a5492f91803b113fb8a83b11285cf" + integrity sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw== dependencies: - "@eslint/eslintrc" "^1.4.1" + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.4.0" + "@eslint/eslintrc" "^2.0.1" + "@eslint/js" "8.36.0" "@humanwhocodes/config-array" "^0.11.8" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" @@ -1878,10 +1979,9 @@ eslint@^8.0.0: doctrine "^3.0.0" escape-string-regexp "^4.0.0" eslint-scope "^7.1.1" - eslint-utils "^3.0.0" eslint-visitor-keys "^3.3.0" - espree "^9.4.0" - esquery "^1.4.0" + espree "^9.5.0" + esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" @@ -1902,15 +2002,14 @@ eslint@^8.0.0: minimatch "^3.1.2" natural-compare "^1.4.0" optionator "^0.9.1" - regexpp "^3.2.0" strip-ansi "^6.0.1" strip-json-comments "^3.1.0" text-table "^0.2.0" -espree@^9.4.0: - version "9.4.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.1.tgz#51d6092615567a2c2cff7833445e37c28c0065bd" - integrity sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg== +espree@^9.5.0: + version "9.5.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.0.tgz#3646d4e3f58907464edba852fa047e6a27bdf113" + integrity sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw== dependencies: acorn "^8.8.0" acorn-jsx "^5.3.2" @@ -1920,10 +2019,10 @@ esprima@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== +esquery@^1.4.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== dependencies: estraverse "^5.1.0" @@ -1934,6 +2033,11 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" @@ -1991,7 +2095,7 @@ exit@^0.1.2: resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= -expect@^29.4.2: +expect@^29.0.0: version "29.4.2" resolved "https://registry.yarnpkg.com/expect/-/expect-29.4.2.tgz#2ae34eb88de797c64a1541ad0f1e2ea8a7a7b492" integrity sha512-+JHYg9O3hd3RlICG90OPVjRkPBoiUH7PxvDVMnRiaq1g6JUgZStX514erMl0v2Dc5SkfVbm7ztqbd6qHHPn+mQ== @@ -2002,6 +2106,17 @@ expect@^29.4.2: jest-message-util "^29.4.2" jest-util "^29.4.2" +expect@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.5.0.tgz#68c0509156cb2a0adb8865d413b137eeaae682f7" + integrity sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg== + dependencies: + "@jest/expect-utils" "^29.5.0" + jest-get-type "^29.4.3" + jest-matcher-utils "^29.5.0" + jest-message-util "^29.5.0" + jest-util "^29.5.0" + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -2018,7 +2133,18 @@ fast-glob@^3.0.3: merge2 "^1.3.0" micromatch "^4.0.2" -fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: +fast-glob@^3.2.9: + version "3.2.12" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" + integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== @@ -2041,6 +2167,13 @@ fb-watchman@^2.0.0: dependencies: bser "^2.0.0" +figures@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.1.0.tgz#4b198dd07d8d71530642864af2d45dd9e459c4ec" + integrity sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg== + dependencies: + escape-string-regexp "^1.0.5" + figures@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" @@ -2054,13 +2187,6 @@ figures@^2.0.0: dependencies: escape-string-regexp "^1.0.5" -figures@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" - integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== - dependencies: - escape-string-regexp "^1.0.5" - file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" @@ -2068,22 +2194,6 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" -file-set@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/file-set/-/file-set-2.0.1.tgz#db9bc4b70a7e5ba81c9d279c20a37f13369c7850" - integrity sha512-XgOUUpgR6FbbfYcniLw0qm1Am7PnNYIAkd+eXxRt42LiYhjaso0WiuQ+VmrNdtwotyM+cLCfZ56AZrySP3QnKA== - dependencies: - array-back "^2.0.0" - glob "^7.1.3" - -file-set@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/file-set/-/file-set-3.0.0.tgz#85e689c7fe7b95bdd7e11bab0dd50488cd8e01be" - integrity sha512-B/SdeSIeRv7VlOgIjtH3dkxMI+tEy5m+OeCXfAUsirBoVoY+bGtsmvmmTFPm/G23TBY4RiTtjpcgePCfwXRjqA== - dependencies: - array-back "^4.0.0" - glob "^7.1.5" - fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -2095,12 +2205,13 @@ find-parent-dir@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" -find-replace@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38" - integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ== +find-up@4.1.0, find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== dependencies: - array-back "^3.0.1" + locate-path "^5.0.0" + path-exists "^4.0.0" find-up@^2.0.0: version "2.1.0" @@ -2115,14 +2226,6 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - find-up@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" @@ -2151,17 +2254,13 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== -fs-access@^1.0.1: +fs-access@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/fs-access/-/fs-access-1.0.1.tgz#d6a87f262271cefebec30c553407fb995da8777a" integrity sha512-05cXDIwNbFaoFWaz5gNHlUTbH5whiss/hr/ibzPd4MH3cR4w0ZKeIPiVdbyJurg3O5r/Bjpvn9KOb1/rPMf3nA== dependencies: null-check "^1.0.0" -fs-then-native@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fs-then-native/-/fs-then-native-2.0.0.tgz#19a124d94d90c22c8e045f2e8dd6ebea36d48c67" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -2264,7 +2363,15 @@ git-remote-origin-url@^2.0.0: gitconfiglocal "^1.0.0" pify "^2.3.0" -git-semver-tags@^4.0.0, git-semver-tags@^4.1.1: +git-semver-tags@3.0.1, git-semver-tags@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-3.0.1.tgz#9cb9e4974437de1f71f32da3bfe74f4d35afb1b9" + integrity sha512-Hzd1MOHXouITfCasrpVJbRDg9uvW7LfABk3GQmXYZByerBDrfrEMP9HXpNT7RxAbieiocP6u+xq20DkvjwxnCA== + dependencies: + meow "^5.0.0" + semver "^6.0.0" + +git-semver-tags@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-4.1.1.tgz#63191bcd809b0ec3e151ba4751c16c444e5b5780" integrity sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA== @@ -2278,7 +2385,7 @@ gitconfiglocal@^1.0.0: dependencies: ini "^1.3.2" -glob-parent@^5.1.0: +glob-parent@^5.1.0, glob-parent@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -2292,7 +2399,7 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob@^7.1.3, glob@^7.1.4, glob@^7.1.5: +glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -2330,6 +2437,18 @@ globby@^10.0.1: merge2 "^1.2.3" slash "^3.0.0" +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + got@^10.2.0: version "10.2.0" resolved "https://registry.yarnpkg.com/got/-/got-10.2.0.tgz#c7d54e5b41881e5c64952a4013986af12dbab47f" @@ -2350,7 +2469,7 @@ got@^10.2.0: to-readable-stream "^2.0.0" type-fest "^0.8.0" -graceful-fs@^4.1.2, graceful-fs@^4.1.9, graceful-fs@^4.2.2, graceful-fs@^4.2.9: +graceful-fs@^4.1.2, graceful-fs@^4.2.2, graceful-fs@^4.2.9: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== @@ -2360,7 +2479,7 @@ grapheme-splitter@^1.0.4: resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== -handlebars@^4.5.3, handlebars@^4.7.7: +handlebars@^4.7.7: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== @@ -2427,7 +2546,7 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -husky@^3.1.0: +husky@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/husky/-/husky-3.1.0.tgz#5faad520ab860582ed94f0c1a77f0f04c90b57c0" integrity sha512-FJkPoHHB+6s4a+jwPqBudBDvYZsoQW5/HBuMSehC8qDiCe50kpcxeqFoDSlow+9I6wg47YxBoT3WxaURlrDIIQ== @@ -2659,82 +2778,83 @@ istanbul-reports@^3.1.3: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jest-changed-files@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.4.2.tgz#bee1fafc8b620d6251423d1978a0080546bc4376" - integrity sha512-Qdd+AXdqD16PQa+VsWJpxR3kN0JyOCX1iugQfx5nUgAsI4gwsKviXkpclxOK9ZnwaY2IQVHz+771eAvqeOlfuw== +jest-changed-files@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.5.0.tgz#e88786dca8bf2aa899ec4af7644e16d9dcf9b23e" + integrity sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag== dependencies: execa "^5.0.0" p-limit "^3.1.0" -jest-circus@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.4.2.tgz#2d00c04baefd0ee2a277014cd494d4b5970663ed" - integrity sha512-wW3ztp6a2P5c1yOc1Cfrt5ozJ7neWmqeXm/4SYiqcSriyisgq63bwFj1NuRdSR5iqS0CMEYwSZd89ZA47W9zUg== +jest-circus@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.5.0.tgz#b5926989449e75bff0d59944bae083c9d7fb7317" + integrity sha512-gq/ongqeQKAplVxqJmbeUOJJKkW3dDNPY8PjhJ5G0lBRvu0e3EWGxGy5cI4LAGA7gV2UHCtWBI4EMXK8c9nQKA== dependencies: - "@jest/environment" "^29.4.2" - "@jest/expect" "^29.4.2" - "@jest/test-result" "^29.4.2" - "@jest/types" "^29.4.2" + "@jest/environment" "^29.5.0" + "@jest/expect" "^29.5.0" + "@jest/test-result" "^29.5.0" + "@jest/types" "^29.5.0" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" dedent "^0.7.0" is-generator-fn "^2.0.0" - jest-each "^29.4.2" - jest-matcher-utils "^29.4.2" - jest-message-util "^29.4.2" - jest-runtime "^29.4.2" - jest-snapshot "^29.4.2" - jest-util "^29.4.2" + jest-each "^29.5.0" + jest-matcher-utils "^29.5.0" + jest-message-util "^29.5.0" + jest-runtime "^29.5.0" + jest-snapshot "^29.5.0" + jest-util "^29.5.0" p-limit "^3.1.0" - pretty-format "^29.4.2" + pretty-format "^29.5.0" + pure-rand "^6.0.0" slash "^3.0.0" stack-utils "^2.0.3" -jest-cli@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.4.2.tgz#94a2f913a0a7a49d11bee98ad88bf48baae941f4" - integrity sha512-b+eGUtXq/K2v7SH3QcJvFvaUaCDS1/YAZBYz0m28Q/Ppyr+1qNaHmVYikOrbHVbZqYQs2IeI3p76uy6BWbXq8Q== +jest-cli@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.5.0.tgz#b34c20a6d35968f3ee47a7437ff8e53e086b4a67" + integrity sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw== dependencies: - "@jest/core" "^29.4.2" - "@jest/test-result" "^29.4.2" - "@jest/types" "^29.4.2" + "@jest/core" "^29.5.0" + "@jest/test-result" "^29.5.0" + "@jest/types" "^29.5.0" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.9" import-local "^3.0.2" - jest-config "^29.4.2" - jest-util "^29.4.2" - jest-validate "^29.4.2" + jest-config "^29.5.0" + jest-util "^29.5.0" + jest-validate "^29.5.0" prompts "^2.0.1" yargs "^17.3.1" -jest-config@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.4.2.tgz#15386dd9ed2f7059516915515f786b8836a98f07" - integrity sha512-919CtnXic52YM0zW4C1QxjG6aNueX1kBGthuMtvFtRTAxhKfJmiXC9qwHmi6o2josjbDz8QlWyY55F1SIVmCWA== +jest-config@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.5.0.tgz#3cc972faec8c8aaea9ae158c694541b79f3748da" + integrity sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA== dependencies: "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^29.4.2" - "@jest/types" "^29.4.2" - babel-jest "^29.4.2" + "@jest/test-sequencer" "^29.5.0" + "@jest/types" "^29.5.0" + babel-jest "^29.5.0" chalk "^4.0.0" ci-info "^3.2.0" deepmerge "^4.2.2" glob "^7.1.3" graceful-fs "^4.2.9" - jest-circus "^29.4.2" - jest-environment-node "^29.4.2" - jest-get-type "^29.4.2" - jest-regex-util "^29.4.2" - jest-resolve "^29.4.2" - jest-runner "^29.4.2" - jest-util "^29.4.2" - jest-validate "^29.4.2" + jest-circus "^29.5.0" + jest-environment-node "^29.5.0" + jest-get-type "^29.4.3" + jest-regex-util "^29.4.3" + jest-resolve "^29.5.0" + jest-runner "^29.5.0" + jest-util "^29.5.0" + jest-validate "^29.5.0" micromatch "^4.0.4" parse-json "^5.2.0" - pretty-format "^29.4.2" + pretty-format "^29.5.0" slash "^3.0.0" strip-json-comments "^3.1.1" @@ -2748,67 +2868,82 @@ jest-diff@^29.4.2: jest-get-type "^29.4.2" pretty-format "^29.4.2" -jest-docblock@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.4.2.tgz#c78a95eedf9a24c0a6cc16cf2abdc4b8b0f2531b" - integrity sha512-dV2JdahgClL34Y5vLrAHde3nF3yo2jKRH+GIYJuCpfqwEJZcikzeafVTGAjbOfKPG17ez9iWXwUYp7yefeCRag== +jest-diff@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.5.0.tgz#e0d83a58eb5451dcc1fa61b1c3ee4e8f5a290d63" + integrity sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw== dependencies: - detect-newline "^3.0.0" + chalk "^4.0.0" + diff-sequences "^29.4.3" + jest-get-type "^29.4.3" + pretty-format "^29.5.0" -jest-each@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.4.2.tgz#e1347aff1303f4c35470827a62c029d389c5d44a" - integrity sha512-trvKZb0JYiCndc55V1Yh0Luqi7AsAdDWpV+mKT/5vkpnnFQfuQACV72IoRV161aAr6kAVIBpmYzwhBzm34vQkA== +jest-docblock@^29.4.3: + version "29.4.3" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.4.3.tgz#90505aa89514a1c7dceeac1123df79e414636ea8" + integrity sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg== dependencies: - "@jest/types" "^29.4.2" - chalk "^4.0.0" - jest-get-type "^29.4.2" - jest-util "^29.4.2" - pretty-format "^29.4.2" + detect-newline "^3.0.0" -jest-environment-node@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.4.2.tgz#0eab835b41e25fd0c1a72f62665fc8db08762ad2" - integrity sha512-MLPrqUcOnNBc8zTOfqBbxtoa8/Ee8tZ7UFW7hRDQSUT+NGsvS96wlbHGTf+EFAT9KC3VNb7fWEM6oyvmxtE/9w== +jest-each@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.5.0.tgz#fc6e7014f83eac68e22b7195598de8554c2e5c06" + integrity sha512-HM5kIJ1BTnVt+DQZ2ALp3rzXEl+g726csObrW/jpEGl+CDSSQpOJJX2KE/vEg8cxcMXdyEPu6U4QX5eruQv5hA== dependencies: - "@jest/environment" "^29.4.2" - "@jest/fake-timers" "^29.4.2" - "@jest/types" "^29.4.2" + "@jest/types" "^29.5.0" + chalk "^4.0.0" + jest-get-type "^29.4.3" + jest-util "^29.5.0" + pretty-format "^29.5.0" + +jest-environment-node@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.5.0.tgz#f17219d0f0cc0e68e0727c58b792c040e332c967" + integrity sha512-ExxuIK/+yQ+6PRGaHkKewYtg6hto2uGCgvKdb2nfJfKXgZ17DfXjvbZ+jA1Qt9A8EQSfPnt5FKIfnOO3u1h9qw== + dependencies: + "@jest/environment" "^29.5.0" + "@jest/fake-timers" "^29.5.0" + "@jest/types" "^29.5.0" "@types/node" "*" - jest-mock "^29.4.2" - jest-util "^29.4.2" + jest-mock "^29.5.0" + jest-util "^29.5.0" jest-get-type@^29.4.2: version "29.4.2" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.4.2.tgz#7cb63f154bca8d8f57364d01614477d466fa43fe" integrity sha512-vERN30V5i2N6lqlFu4ljdTqQAgrkTFMC9xaIIfOPYBw04pufjXRty5RuXBiB1d72tGbURa/UgoiHB90ruOSivg== -jest-haste-map@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.4.2.tgz#9112df3f5121e643f1b2dcbaa86ab11b0b90b49a" - integrity sha512-WkUgo26LN5UHPknkezrBzr7lUtV1OpGsp+NfXbBwHztsFruS3gz+AMTTBcEklvi8uPzpISzYjdKXYZQJXBnfvw== +jest-get-type@^29.4.3: + version "29.4.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.4.3.tgz#1ab7a5207c995161100b5187159ca82dd48b3dd5" + integrity sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg== + +jest-haste-map@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.5.0.tgz#69bd67dc9012d6e2723f20a945099e972b2e94de" + integrity sha512-IspOPnnBro8YfVYSw6yDRKh/TiCdRngjxeacCps1cQ9cgVN6+10JUcuJ1EabrgYLOATsIAigxA0rLR9x/YlrSA== dependencies: - "@jest/types" "^29.4.2" + "@jest/types" "^29.5.0" "@types/graceful-fs" "^4.1.3" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.9" - jest-regex-util "^29.4.2" - jest-util "^29.4.2" - jest-worker "^29.4.2" + jest-regex-util "^29.4.3" + jest-util "^29.5.0" + jest-worker "^29.5.0" micromatch "^4.0.4" walker "^1.0.8" optionalDependencies: fsevents "^2.3.2" -jest-leak-detector@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.4.2.tgz#8f05c6680e0cb46a1d577c0d3da9793bed3ea97b" - integrity sha512-Wa62HuRJmWXtX9F00nUpWlrbaH5axeYCdyRsOs/+Rb1Vb6+qWTlB5rKwCCRKtorM7owNwKsyJ8NRDUcZ8ghYUA== +jest-leak-detector@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.5.0.tgz#cf4bdea9615c72bac4a3a7ba7e7930f9c0610c8c" + integrity sha512-u9YdeeVnghBUtpN5mVxjID7KbkKE1QU4f6uUwuxiY0vYRi9BUCLKlPEZfDGR67ofdFmDz9oPAy2G92Ujrntmow== dependencies: - jest-get-type "^29.4.2" - pretty-format "^29.4.2" + jest-get-type "^29.4.3" + pretty-format "^29.5.0" jest-matcher-utils@^29.4.2: version "29.4.2" @@ -2820,6 +2955,16 @@ jest-matcher-utils@^29.4.2: jest-get-type "^29.4.2" pretty-format "^29.4.2" +jest-matcher-utils@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.5.0.tgz#d957af7f8c0692c5453666705621ad4abc2c59c5" + integrity sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw== + dependencies: + chalk "^4.0.0" + jest-diff "^29.5.0" + jest-get-type "^29.4.3" + pretty-format "^29.5.0" + jest-message-util@^29.4.2: version "29.4.2" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.4.2.tgz#309a2924eae6ca67cf7f25781a2af1902deee717" @@ -2835,108 +2980,122 @@ jest-message-util@^29.4.2: slash "^3.0.0" stack-utils "^2.0.3" -jest-mock@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.4.2.tgz#e1054be66fb3e975d26d4528fcde6979e4759de8" - integrity sha512-x1FSd4Gvx2yIahdaIKoBjwji6XpboDunSJ95RpntGrYulI1ByuYQCKN/P7hvk09JB74IonU3IPLdkutEWYt++g== +jest-message-util@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.5.0.tgz#1f776cac3aca332ab8dd2e3b41625435085c900e" + integrity sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA== dependencies: - "@jest/types" "^29.4.2" + "@babel/code-frame" "^7.12.13" + "@jest/types" "^29.5.0" + "@types/stack-utils" "^2.0.0" + chalk "^4.0.0" + graceful-fs "^4.2.9" + micromatch "^4.0.4" + pretty-format "^29.5.0" + slash "^3.0.0" + stack-utils "^2.0.3" + +jest-mock@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.5.0.tgz#26e2172bcc71d8b0195081ff1f146ac7e1518aed" + integrity sha512-GqOzvdWDE4fAV2bWQLQCkujxYWL7RxjCnj71b5VhDAGOevB3qj3Ovg26A5NI84ZpODxyzaozXLOh2NCgkbvyaw== + dependencies: + "@jest/types" "^29.5.0" "@types/node" "*" - jest-util "^29.4.2" + jest-util "^29.5.0" jest-pnp-resolver@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== -jest-regex-util@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.4.2.tgz#19187cca35d301f8126cf7a021dd4dcb7b58a1ca" - integrity sha512-XYZXOqUl1y31H6VLMrrUL1ZhXuiymLKPz0BO1kEeR5xER9Tv86RZrjTm74g5l9bPJQXA/hyLdaVPN/sdqfteig== +jest-regex-util@^29.4.3: + version "29.4.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.4.3.tgz#a42616141e0cae052cfa32c169945d00c0aa0bb8" + integrity sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg== -jest-resolve-dependencies@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.4.2.tgz#6359db606f5967b68ca8bbe9dbc07a4306c12bf7" - integrity sha512-6pL4ptFw62rjdrPk7rRpzJYgcRqRZNsZTF1VxVTZMishbO6ObyWvX57yHOaNGgKoADtAHRFYdHQUEvYMJATbDg== +jest-resolve-dependencies@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.5.0.tgz#f0ea29955996f49788bf70996052aa98e7befee4" + integrity sha512-sjV3GFr0hDJMBpYeUuGduP+YeCRbd7S/ck6IvL3kQ9cpySYKqcqhdLLC2rFwrcL7tz5vYibomBrsFYWkIGGjOg== dependencies: - jest-regex-util "^29.4.2" - jest-snapshot "^29.4.2" + jest-regex-util "^29.4.3" + jest-snapshot "^29.5.0" -jest-resolve@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.4.2.tgz#8831f449671d08d161fe493003f61dc9b55b808e" - integrity sha512-RtKWW0mbR3I4UdkOrW7552IFGLYQ5AF9YrzD0FnIOkDu0rAMlA5/Y1+r7lhCAP4nXSBTaE7ueeqj6IOwZpgoqw== +jest-resolve@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.5.0.tgz#b053cc95ad1d5f6327f0ac8aae9f98795475ecdc" + integrity sha512-1TzxJ37FQq7J10jPtQjcc+MkCkE3GBpBecsSUWJ0qZNJpmg6m0D9/7II03yJulm3H/fvVjgqLh/k2eYg+ui52w== dependencies: chalk "^4.0.0" graceful-fs "^4.2.9" - jest-haste-map "^29.4.2" + jest-haste-map "^29.5.0" jest-pnp-resolver "^1.2.2" - jest-util "^29.4.2" - jest-validate "^29.4.2" + jest-util "^29.5.0" + jest-validate "^29.5.0" resolve "^1.20.0" resolve.exports "^2.0.0" slash "^3.0.0" -jest-runner@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.4.2.tgz#2bcecf72303369df4ef1e6e983c22a89870d5125" - integrity sha512-wqwt0drm7JGjwdH+x1XgAl+TFPH7poowMguPQINYxaukCqlczAcNLJiK+OLxUxQAEWMdy+e6nHZlFHO5s7EuRg== +jest-runner@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.5.0.tgz#6a57c282eb0ef749778d444c1d758c6a7693b6f8" + integrity sha512-m7b6ypERhFghJsslMLhydaXBiLf7+jXy8FwGRHO3BGV1mcQpPbwiqiKUR2zU2NJuNeMenJmlFZCsIqzJCTeGLQ== dependencies: - "@jest/console" "^29.4.2" - "@jest/environment" "^29.4.2" - "@jest/test-result" "^29.4.2" - "@jest/transform" "^29.4.2" - "@jest/types" "^29.4.2" + "@jest/console" "^29.5.0" + "@jest/environment" "^29.5.0" + "@jest/test-result" "^29.5.0" + "@jest/transform" "^29.5.0" + "@jest/types" "^29.5.0" "@types/node" "*" chalk "^4.0.0" emittery "^0.13.1" graceful-fs "^4.2.9" - jest-docblock "^29.4.2" - jest-environment-node "^29.4.2" - jest-haste-map "^29.4.2" - jest-leak-detector "^29.4.2" - jest-message-util "^29.4.2" - jest-resolve "^29.4.2" - jest-runtime "^29.4.2" - jest-util "^29.4.2" - jest-watcher "^29.4.2" - jest-worker "^29.4.2" + jest-docblock "^29.4.3" + jest-environment-node "^29.5.0" + jest-haste-map "^29.5.0" + jest-leak-detector "^29.5.0" + jest-message-util "^29.5.0" + jest-resolve "^29.5.0" + jest-runtime "^29.5.0" + jest-util "^29.5.0" + jest-watcher "^29.5.0" + jest-worker "^29.5.0" p-limit "^3.1.0" source-map-support "0.5.13" -jest-runtime@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.4.2.tgz#d86b764c5b95d76cb26ed1f32644e99de5d5c134" - integrity sha512-3fque9vtpLzGuxT9eZqhxi+9EylKK/ESfhClv4P7Y9sqJPs58LjVhTt8jaMp/pRO38agll1CkSu9z9ieTQeRrw== - dependencies: - "@jest/environment" "^29.4.2" - "@jest/fake-timers" "^29.4.2" - "@jest/globals" "^29.4.2" - "@jest/source-map" "^29.4.2" - "@jest/test-result" "^29.4.2" - "@jest/transform" "^29.4.2" - "@jest/types" "^29.4.2" +jest-runtime@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.5.0.tgz#c83f943ee0c1da7eb91fa181b0811ebd59b03420" + integrity sha512-1Hr6Hh7bAgXQP+pln3homOiEZtCDZFqwmle7Ew2j8OlbkIu6uE3Y/etJQG8MLQs3Zy90xrp2C0BRrtPHG4zryw== + dependencies: + "@jest/environment" "^29.5.0" + "@jest/fake-timers" "^29.5.0" + "@jest/globals" "^29.5.0" + "@jest/source-map" "^29.4.3" + "@jest/test-result" "^29.5.0" + "@jest/transform" "^29.5.0" + "@jest/types" "^29.5.0" "@types/node" "*" chalk "^4.0.0" cjs-module-lexer "^1.0.0" collect-v8-coverage "^1.0.0" glob "^7.1.3" graceful-fs "^4.2.9" - jest-haste-map "^29.4.2" - jest-message-util "^29.4.2" - jest-mock "^29.4.2" - jest-regex-util "^29.4.2" - jest-resolve "^29.4.2" - jest-snapshot "^29.4.2" - jest-util "^29.4.2" - semver "^7.3.5" + jest-haste-map "^29.5.0" + jest-message-util "^29.5.0" + jest-mock "^29.5.0" + jest-regex-util "^29.4.3" + jest-resolve "^29.5.0" + jest-snapshot "^29.5.0" + jest-util "^29.5.0" slash "^3.0.0" strip-bom "^4.0.0" -jest-snapshot@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.4.2.tgz#ba1fb9abb279fd2c85109ff1757bc56b503bbb3a" - integrity sha512-PdfubrSNN5KwroyMH158R23tWcAXJyx4pvSvWls1dHoLCaUhGul9rsL3uVjtqzRpkxlkMavQjGuWG1newPgmkw== +jest-snapshot@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.5.0.tgz#c9c1ce0331e5b63cd444e2f95a55a73b84b1e8ce" + integrity sha512-x7Wolra5V0tt3wRs3/ts3S6ciSQVypgGQlJpz2rsdQYoUKxMxPNaoHMGJN6qAuPJqS+2iQ1ZUn5kl7HCyls84g== dependencies: "@babel/core" "^7.11.6" "@babel/generator" "^7.7.2" @@ -2944,26 +3103,25 @@ jest-snapshot@^29.4.2: "@babel/plugin-syntax-typescript" "^7.7.2" "@babel/traverse" "^7.7.2" "@babel/types" "^7.3.3" - "@jest/expect-utils" "^29.4.2" - "@jest/transform" "^29.4.2" - "@jest/types" "^29.4.2" + "@jest/expect-utils" "^29.5.0" + "@jest/transform" "^29.5.0" + "@jest/types" "^29.5.0" "@types/babel__traverse" "^7.0.6" "@types/prettier" "^2.1.5" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^29.4.2" + expect "^29.5.0" graceful-fs "^4.2.9" - jest-diff "^29.4.2" - jest-get-type "^29.4.2" - jest-haste-map "^29.4.2" - jest-matcher-utils "^29.4.2" - jest-message-util "^29.4.2" - jest-util "^29.4.2" + jest-diff "^29.5.0" + jest-get-type "^29.4.3" + jest-matcher-utils "^29.5.0" + jest-message-util "^29.5.0" + jest-util "^29.5.0" natural-compare "^1.4.0" - pretty-format "^29.4.2" + pretty-format "^29.5.0" semver "^7.3.5" -jest-util@^29.4.2: +jest-util@^29.0.0, jest-util@^29.4.2: version "29.4.2" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.4.2.tgz#3db8580b295df453a97de4a1b42dd2578dabd2c2" integrity sha512-wKnm6XpJgzMUSRFB7YF48CuwdzuDIHenVuoIb1PLuJ6F+uErZsuDkU+EiExkChf6473XcawBrSfDSnXl+/YG4g== @@ -2975,51 +3133,63 @@ jest-util@^29.4.2: graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-validate@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.4.2.tgz#3b3f8c4910ab9a3442d2512e2175df6b3f77b915" - integrity sha512-tto7YKGPJyFbhcKhIDFq8B5od+eVWD/ySZ9Tvcp/NGCvYA4RQbuzhbwYWtIjMT5W5zA2W0eBJwu4HVw34d5G6Q== +jest-util@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.5.0.tgz#24a4d3d92fc39ce90425311b23c27a6e0ef16b8f" + integrity sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ== dependencies: - "@jest/types" "^29.4.2" + "@jest/types" "^29.5.0" + "@types/node" "*" + chalk "^4.0.0" + ci-info "^3.2.0" + graceful-fs "^4.2.9" + picomatch "^2.2.3" + +jest-validate@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.5.0.tgz#8e5a8f36178d40e47138dc00866a5f3bd9916ffc" + integrity sha512-pC26etNIi+y3HV8A+tUGr/lph9B18GnzSRAkPaaZJIE1eFdiYm6/CewuiJQ8/RlfHd1u/8Ioi8/sJ+CmbA+zAQ== + dependencies: + "@jest/types" "^29.5.0" camelcase "^6.2.0" chalk "^4.0.0" - jest-get-type "^29.4.2" + jest-get-type "^29.4.3" leven "^3.1.0" - pretty-format "^29.4.2" + pretty-format "^29.5.0" -jest-watcher@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.4.2.tgz#09c0f4c9a9c7c0807fcefb1445b821c6f7953b7c" - integrity sha512-onddLujSoGiMJt+tKutehIidABa175i/Ays+QvKxCqBwp7fvxP3ZhKsrIdOodt71dKxqk4sc0LN41mWLGIK44w== +jest-watcher@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.5.0.tgz#cf7f0f949828ba65ddbbb45c743a382a4d911363" + integrity sha512-KmTojKcapuqYrKDpRwfqcQ3zjMlwu27SYext9pt4GlF5FUgB+7XE1mcCnSm6a4uUpFyQIkb6ZhzZvHl+jiBCiA== dependencies: - "@jest/test-result" "^29.4.2" - "@jest/types" "^29.4.2" + "@jest/test-result" "^29.5.0" + "@jest/types" "^29.5.0" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" emittery "^0.13.1" - jest-util "^29.4.2" + jest-util "^29.5.0" string-length "^4.0.1" -jest-worker@^29.4.2: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.4.2.tgz#d9b2c3bafc69311d84d94e7fb45677fc8976296f" - integrity sha512-VIuZA2hZmFyRbchsUCHEehoSf2HEl0YVF8SDJqtPnKorAaBuh42V8QsLnde0XP5F6TyCynGPEGgBOn3Fc+wZGw== +jest-worker@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.5.0.tgz#bdaefb06811bd3384d93f009755014d8acb4615d" + integrity sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA== dependencies: "@types/node" "*" - jest-util "^29.4.2" + jest-util "^29.5.0" merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^29.0.0: - version "29.4.2" - resolved "https://registry.yarnpkg.com/jest/-/jest-29.4.2.tgz#4c2127d03a71dc187f386156ef155dbf323fb7be" - integrity sha512-+5hLd260vNIHu+7ZgMIooSpKl7Jp5pHKb51e73AJU3owd5dEo/RfVwHbA/na3C/eozrt3hJOLGf96c7EWwIAzg== +jest@29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.5.0.tgz#f75157622f5ce7ad53028f2f8888ab53e1f1f24e" + integrity sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ== dependencies: - "@jest/core" "^29.4.2" - "@jest/types" "^29.4.2" + "@jest/core" "^29.5.0" + "@jest/types" "^29.5.0" import-local "^3.0.2" - jest-cli "^29.4.2" + jest-cli "^29.5.0" js-sdsl@^4.1.4: version "4.3.0" @@ -3046,73 +3216,6 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" -js2xmlparser@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js2xmlparser/-/js2xmlparser-4.0.0.tgz#ae14cc711b2892083eed6e219fbc993d858bc3a5" - integrity sha512-WuNgdZOXVmBk5kUPMcTcVUpbGRzLfNkv7+7APq7WiDihpXVKrgxo6wwRpRl9OQeEBgKCVk9mR7RbzrnNWC8oBw== - dependencies: - xmlcreate "^2.0.0" - -jsdoc-api@^5.0.4: - version "5.0.4" - resolved "https://registry.yarnpkg.com/jsdoc-api/-/jsdoc-api-5.0.4.tgz#6b60cddaa4e7ff9a2e139acfc19ecaa9c48f8575" - integrity sha512-1KMwLnfo0FyhF06TQKzqIm8BiY1yoMIGICxRdJHUjzskaHMzHMmpLlmNFgzoa4pAC8t1CDPK5jWuQTvv1pBsEQ== - dependencies: - array-back "^4.0.0" - cache-point "^1.0.0" - collect-all "^1.0.3" - file-set "^2.0.1" - fs-then-native "^2.0.0" - jsdoc "^3.6.3" - object-to-spawn-args "^1.1.1" - temp-path "^1.0.0" - walk-back "^3.0.1" - -jsdoc-parse@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/jsdoc-parse/-/jsdoc-parse-4.0.1.tgz#07949b13b1659c2bbc5217560d77b46a060cb86d" - integrity sha512-qIObw8yqYZjrP2qxWROB5eLQFLTUX2jRGLhW9hjo2CC2fQVlskidCIzjCoctwsDvauBp2a/lR31jkSleczSo8Q== - dependencies: - array-back "^4.0.0" - lodash.omit "^4.5.0" - lodash.pick "^4.4.0" - reduce-extract "^1.0.0" - sort-array "^2.0.0" - test-value "^3.0.0" - -jsdoc-to-markdown@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/jsdoc-to-markdown/-/jsdoc-to-markdown-5.0.3.tgz#32cdd8683609141199b42a5b7045d91647a5758b" - integrity sha512-tQv5tBV0fTYidRQtE60lJKxE98mmuLcYuITFDKQiDPE9hGccpeEGUNFcVkInq1vigyuPnZmt79bQ8wv2GKjY0Q== - dependencies: - array-back "^4.0.1" - command-line-tool "^0.8.0" - config-master "^3.1.0" - dmd "^4.0.5" - jsdoc-api "^5.0.4" - jsdoc-parse "^4.0.1" - walk-back "^4.0.0" - -jsdoc@^3.6.3: - version "3.6.3" - resolved "https://registry.yarnpkg.com/jsdoc/-/jsdoc-3.6.3.tgz#dccea97d0e62d63d306b8b3ed1527173b5e2190d" - integrity sha512-Yf1ZKA3r9nvtMWHO1kEuMZTlHOF8uoQ0vyo5eH7SQy5YeIiHM+B0DgKnn+X6y6KDYZcF7G2SPkKF+JORCXWE/A== - dependencies: - "@babel/parser" "^7.4.4" - bluebird "^3.5.4" - catharsis "^0.8.11" - escape-string-regexp "^2.0.0" - js2xmlparser "^4.0.0" - klaw "^3.0.0" - markdown-it "^8.4.2" - markdown-it-anchor "^5.0.2" - marked "^0.7.0" - mkdirp "^0.5.1" - requizzle "^0.2.3" - strip-json-comments "^3.0.1" - taffydb "2.6.2" - underscore "~1.9.1" - jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -3145,11 +3248,16 @@ json-stringify-safe@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" -json5@^2.2.2: +json5@^2.2.2, json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== +jsonc-parser@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" + integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== + jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" @@ -3166,13 +3274,6 @@ kind-of@^6.0.3: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== -klaw@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/klaw/-/klaw-3.0.0.tgz#b11bec9cf2492f06756d6e809ab73a2910259146" - integrity sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g== - dependencies: - graceful-fs "^4.1.9" - kleur@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" @@ -3196,14 +3297,7 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= -linkify-it@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.1.0.tgz#c4caf38a6cd7ac2212ef3c7d2bde30a91561f9db" - integrity sha512-4REs8/062kV2DSHxNfq5183zrqXMl7WP0WzABH9IeJI+NLm429FgE1PDecltYfnOoFDFlZGh2T8PfZn0r+GTRg== - dependencies: - uc.micro "^1.0.1" - -lint-staged@^9.5.0: +lint-staged@9.5.0: version "9.5.0" resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-9.5.0.tgz#290ec605252af646d9b74d73a0fa118362b05a33" integrity sha512-nawMob9cb/G1J98nb8v3VC/E8rcX1rryUYXVZ69aT9kde6YWX+uvNOEHY5yf2gcWcTJGiD0kqXmCnS3oD75GIA== @@ -3309,33 +3403,21 @@ lodash._reinterpolate@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" -lodash.camelcase@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" - integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= - lodash.ismatch@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc= +lodash.memoize@4.x: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== + 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.omit@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.omit/-/lodash.omit-4.5.0.tgz#6eb19ae5a1ee1dd9df0b969e66ce0b7fa30b5e60" - -lodash.padend@^4.6.1: - version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.padend/-/lodash.padend-4.6.1.tgz#53ccba047d06e158d311f45da625f4e49e6f166e" - -lodash.pick@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" - lodash.template@^4.0.2: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" @@ -3349,7 +3431,7 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "~3.0.0" -lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: +lodash@^4.17.13, lodash@^4.17.15: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -3402,6 +3484,11 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lunr@^2.3.9: + version "2.3.9" + resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" + integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== + make-dir@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" @@ -3409,6 +3496,11 @@ make-dir@^3.0.0: dependencies: semver "^6.0.0" +make-error@1.x, make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + makeerror@1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" @@ -3430,31 +3522,10 @@ map-obj@^4.0.0: resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== -markdown-it-anchor@^5.0.2: - version "5.2.4" - resolved "https://registry.yarnpkg.com/markdown-it-anchor/-/markdown-it-anchor-5.2.4.tgz#d39306fe4c199705b4479d3036842cf34dcba24f" - integrity sha512-n8zCGjxA3T+Mx1pG8HEgbJbkB8JFUuRkeTZQuIM8iPY6oQ8sWOPRZJDFC9a/pNg2QkHEjjGkhBEl/RSyzaDZ3A== - -markdown-it@^8.4.2: - version "8.4.2" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.4.2.tgz#386f98998dc15a37722aa7722084f4020bdd9b54" - integrity sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ== - dependencies: - argparse "^1.0.7" - entities "~1.1.1" - linkify-it "^2.0.0" - mdurl "^1.0.1" - uc.micro "^1.0.5" - -marked@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.7.0.tgz#b64201f051d271b1edc10a04d1ae9b74bb8e5c0e" - integrity sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg== - -mdurl@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" - integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= +marked@^4.2.12: + version "4.2.12" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.2.12.tgz#d69a64e21d71b06250da995dcd065c11083bebb5" + integrity sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw== meow@^4.0.0: version "4.0.1" @@ -3471,22 +3542,20 @@ meow@^4.0.0: redent "^2.0.0" trim-newlines "^2.0.0" -meow@^7.0.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/meow/-/meow-7.1.1.tgz#7c01595e3d337fcb0ec4e8eed1666ea95903d306" - integrity sha512-GWHvA5QOcS412WCo8vwKDlTelGLsCGBVevQB5Kva961rmNfun0PCbv5+xta2kUMFJyR8/oWnn7ddeKdosbAPbA== +meow@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4" + integrity sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig== dependencies: - "@types/minimist" "^1.2.0" - camelcase-keys "^6.2.2" - decamelize-keys "^1.1.0" - hard-rejection "^2.1.0" - minimist-options "4.1.0" - normalize-package-data "^2.5.0" - read-pkg-up "^7.0.1" - redent "^3.0.0" - trim-newlines "^3.0.0" - type-fest "^0.13.1" - yargs-parser "^18.1.3" + camelcase-keys "^4.0.0" + decamelize-keys "^1.0.0" + loud-rejection "^1.0.0" + minimist-options "^3.0.1" + normalize-package-data "^2.3.4" + read-pkg-up "^3.0.0" + redent "^2.0.0" + trim-newlines "^2.0.0" + yargs-parser "^10.0.0" meow@^8.0.0: version "8.1.2" @@ -3515,6 +3584,11 @@ merge2@^1.2.3, merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== +merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.5" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" @@ -3553,6 +3627,13 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" +minimatch@^7.1.3: + version "7.4.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-7.4.2.tgz#157e847d79ca671054253b840656720cb733f10f" + integrity sha512-xy4q7wou3vUoC9k1xGTXc+awNdGaGVHtFUaey8tiX4H1QRc04DZ/rmDFwNm2EBsuYEhAZ6SgMmYf3InGY6OauA== + dependencies: + brace-expansion "^2.0.1" + minimist-options@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" @@ -3575,12 +3656,7 @@ minimist@^1.1.3, minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== -mkdirp2@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp2/-/mkdirp2-1.0.4.tgz#56de1f8f5c93cf2199906362eba0f9f262ee4437" - integrity sha512-Q2PKB4ZR4UPtjLl76JfzlgSCUZhSV1AXQgAZa1qt5RiaALFjP/CDrGvFBrOz7Ck6McPcwMAxTsJvWOUjOU8XMw== - -mkdirp@^0.5.0, mkdirp@^0.5.1: +mkdirp@^0.5.0: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -3596,6 +3672,11 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -3610,7 +3691,7 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nock@^11.7.0: +nock@11.7.0: version "11.7.0" resolved "https://registry.yarnpkg.com/nock/-/nock-11.7.0.tgz#5eaae8b8a55c0dfc014d05692c8cf3d31d61a342" integrity sha512-7c1jhHew74C33OBeRYyQENT+YXQiejpwIrEjinh6dRurBae+Ei4QjeUaPlkptIF0ZacEiVCnw8dWaxqepkiihg== @@ -3693,15 +3774,6 @@ object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" -object-get@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/object-get/-/object-get-2.1.0.tgz#722bbdb60039efa47cad3c6dc2ce51a85c02c5ae" - -object-to-spawn-args@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-to-spawn-args/-/object-to-spawn-args-1.1.1.tgz#77da8827f073d011c9e1b173f895781470246785" - integrity sha1-d9qIJ/Bz0BHJ4bFz+JV4FHAkZ4U= - once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -3926,12 +3998,12 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier@^1.19.1: - version "1.19.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" - integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== +prettier@2.8.7: + version "2.8.7" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.7.tgz#bb79fc8729308549d28fe3a98fce73d2c0656450" + integrity sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw== -pretty-format@^29.4.2: +pretty-format@^29.0.0, pretty-format@^29.4.2: version "29.4.2" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.4.2.tgz#64bf5ccc0d718c03027d94ac957bdd32b3fb2401" integrity sha512-qKlHR8yFVCbcEWba0H0TOC8dnLlO4vPlyEjRPw31FZ2Rupy9nLa8ZLbYny8gWEl8CkEhJqAE6IzdNELTBVcBEg== @@ -3940,6 +4012,15 @@ pretty-format@^29.4.2: ansi-styles "^5.0.0" react-is "^18.0.0" +pretty-format@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.5.0.tgz#283134e74f70e2e3e7229336de0e4fce94ccde5a" + integrity sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw== + dependencies: + "@jest/schemas" "^29.4.3" + ansi-styles "^5.0.0" + react-is "^18.0.0" + process-nextick-args@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" @@ -3971,6 +4052,11 @@ punycode@^2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +pure-rand@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.1.tgz#31207dddd15d43f299fdcdb2f572df65030c19af" + integrity sha512-t+x1zEHDjBwkDGY5v5ApnZ/utcd4XYDiJsaQQoptTXgUXX95sDg1elCdJghzicm7n2mbCBJ3uYWr6M22SO19rg== + q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -4065,37 +4151,6 @@ redent@^3.0.0: indent-string "^4.0.0" strip-indent "^3.0.0" -reduce-extract@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/reduce-extract/-/reduce-extract-1.0.0.tgz#67f2385beda65061b5f5f4312662e8b080ca1525" - dependencies: - test-value "^1.0.1" - -reduce-flatten@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-1.0.1.tgz#258c78efd153ddf93cb561237f61184f3696e327" - -reduce-flatten@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-3.0.0.tgz#da477d68453fd9510f9a5fbef86e0fa04b4fd315" - integrity sha512-eczl8wAYBxJ6Egl6I1ECIF+8z6sHu+KE7BzaEDZTpPXKXfy9SUDQlVYwkRcNTjJLC3Iakxbhss50KuT/R6SYfg== - -reduce-unique@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/reduce-unique/-/reduce-unique-2.0.1.tgz#fb34b90e89297c1e08d75dcf17e9a6443ea71081" - integrity sha512-x4jH/8L1eyZGR785WY+ePtyMNhycl1N2XOLxhCbzZFaqF4AXjLzqSxa2UHgJ2ZVR/HHyPOvl1L7xRnW8ye5MdA== - -reduce-without@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/reduce-without/-/reduce-without-1.0.1.tgz#68ad0ead11855c9a37d4e8256c15bbf87972fc8c" - dependencies: - test-value "^2.0.0" - -regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -4105,13 +4160,6 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== -requizzle@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/requizzle/-/requizzle-0.2.3.tgz#4675c90aacafb2c036bd39ba2daa4a1cb777fded" - integrity sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ== - dependencies: - lodash "^4.17.14" - resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -4209,18 +4257,23 @@ semver-regex@1.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== -semver@^6.0.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.1.tgz#29104598a197d6cbe4733eeecbe968f7b43a9667" + integrity sha512-WfuG+fl6eh3eZ2qAf6goB7nhiCd7NPXhmyFxigB/TOkQyeLP8w8GsVehvtGNtnNmyboz4TgeK40B1Kbql/8c5A== -semver@^7.1.1, semver@^7.3.4, semver@^7.3.5: +semver@7.x, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7: version "7.3.8" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== dependencies: lru-cache "^6.0.0" +semver@^6.0.0, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -4247,6 +4300,16 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +shiki@^0.14.1: + version "0.14.1" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.1.tgz#9fbe082d0a8aa2ad63df4fbf2ee11ec924aa7ee1" + integrity sha512-+Jz4nBkCBe0mEDqo1eKRcCdjRtrCjozmcbTUjbPTX7OOJfEbTZzlUWlZtGe3Gb5oV1/jnojhG//YZc3rs9zSEw== + dependencies: + ansi-sequence-parser "^1.1.0" + jsonc-parser "^3.2.0" + vscode-oniguruma "^1.7.0" + vscode-textmate "^8.0.0" + signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" @@ -4266,15 +4329,6 @@ slice-ansi@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" -sort-array@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/sort-array/-/sort-array-2.0.0.tgz#38a9c6da27fd7d147b42e60554f281187b4df472" - integrity sha1-OKnG2if9fRR7QuYFVPKBGHtN9HI= - dependencies: - array-back "^1.0.4" - object-get "^2.1.0" - typical "^2.6.0" - source-map-support@0.5.13: version "0.5.13" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" @@ -4332,36 +4386,26 @@ stack-utils@^2.0.3: dependencies: escape-string-regexp "^2.0.0" -standard-version@^8.0.0: - version "8.0.2" - resolved "https://registry.yarnpkg.com/standard-version/-/standard-version-8.0.2.tgz#02ed7131f83046bd04358dc54f97d42c4b2fd828" - integrity sha512-L8X9KFq2SmVmaeZgUmWHFJMOsEWpjgFAwqic6yIIoveM1kdw1vH4Io03WWxUDjypjGqGU6qUtcJoR8UvOv5w3g== +standard-version@8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/standard-version/-/standard-version-8.0.0.tgz#3bb1ab495702cf01a9dc602b2b91df1ade6f008e" + integrity sha512-cS/U9yhYPHfyokFce6e/H3U8MaKwZKSGzH25J776sChrae/doDQjsl3vCQ0hW1MSzdrUTb7pir4ApjnbDt/TAg== dependencies: - chalk "^2.4.2" - conventional-changelog "3.1.21" + chalk "2.4.2" + conventional-changelog "3.1.18" conventional-changelog-config-spec "2.1.0" - conventional-changelog-conventionalcommits "4.3.0" - conventional-recommended-bump "6.0.9" - detect-indent "^6.0.0" - detect-newline "^3.1.0" - dotgitignore "^2.1.0" - figures "^3.1.0" - find-up "^4.1.0" - fs-access "^1.0.1" - git-semver-tags "^4.0.0" - semver "^7.1.1" - stringify-package "^1.0.1" - yargs "^15.3.1" - -stream-connect@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/stream-connect/-/stream-connect-1.0.2.tgz#18bc81f2edb35b8b5d9a8009200a985314428a97" - dependencies: - array-back "^1.0.2" - -stream-via@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/stream-via/-/stream-via-1.0.4.tgz#8dccbb0ac909328eb8bc8e2a4bd3934afdaf606c" + conventional-changelog-conventionalcommits "4.2.3" + conventional-recommended-bump "6.0.5" + detect-indent "6.0.0" + detect-newline "3.1.0" + dotgitignore "2.1.0" + figures "3.1.0" + find-up "4.1.0" + fs-access "1.0.1" + git-semver-tags "3.0.1" + semver "7.1.1" + stringify-package "1.0.1" + yargs "15.3.1" string-argv@^0.3.0: version "0.3.1" @@ -4423,7 +4467,7 @@ stringify-object@^3.3.0: is-obj "^1.0.1" is-regexp "^1.0.0" -stringify-package@^1.0.1: +stringify-package@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/stringify-package/-/stringify-package-1.0.1.tgz#e5aa3643e7f74d0f28628b72f3dad5cecfc3ba85" integrity sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg== @@ -4476,7 +4520,7 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" -strip-json-comments@^3.0.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +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" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -4516,25 +4560,6 @@ symbol-observable@^1.1.0: resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== -table-layout@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-0.4.4.tgz#bc5398b2a05e58b67b05dd9238354b89ef27be0f" - integrity sha512-uNaR3SRMJwfdp9OUr36eyEi6LLsbcTqTO/hfTsNviKsNeyMBPICJCC7QXRF3+07bAP6FRwA8rczJPBqXDc0CkQ== - dependencies: - array-back "^2.0.0" - deep-extend "~0.6.0" - lodash.padend "^4.6.1" - typical "^2.6.1" - wordwrapjs "^3.0.0" - -taffydb@2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/taffydb/-/taffydb-2.6.2.tgz#7cbcb64b5a141b6a2efc2c5d2c67b4e150b2a268" - -temp-path@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/temp-path/-/temp-path-1.0.0.tgz#24b1543973ab442896d9ad367dd9cbdbfafe918b" - test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -4544,28 +4569,6 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" -test-value@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/test-value/-/test-value-1.1.0.tgz#a09136f72ec043d27c893707c2b159bfad7de93f" - dependencies: - array-back "^1.0.2" - typical "^2.4.2" - -test-value@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/test-value/-/test-value-2.1.0.tgz#11da6ff670f3471a73b625ca4f3fdcf7bb748291" - dependencies: - array-back "^1.0.3" - typical "^2.6.0" - -test-value@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/test-value/-/test-value-3.0.0.tgz#9168c062fab11a86b8d444dd968bb4b73851ce92" - integrity sha512-sVACdAWcZkSU9x7AOmJo5TqE+GyNJknHaHsMrR6ZnhjVlVN9Yx6FjHrsKZ3BjIpPCT68zYesPWkakrNupwfOTQ== - dependencies: - array-back "^2.0.0" - typical "^2.6.1" - text-extensions@^1.0.0: version "1.9.0" resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" @@ -4626,11 +4629,56 @@ trim-newlines@^3.0.0: resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== +ts-jest@29.0.5: + version "29.0.5" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.0.5.tgz#c5557dcec8fe434fcb8b70c3e21c6b143bfce066" + integrity sha512-PL3UciSgIpQ7f6XjVOmbi96vmDHUqAyqDr8YxzopDqX3kfgYtX1cuNeBjP+L9sFXi6nzsGGA6R3fP3DDDJyrxA== + dependencies: + bs-logger "0.x" + fast-json-stable-stringify "2.x" + jest-util "^29.0.0" + json5 "^2.2.3" + lodash.memoize "4.x" + make-error "1.x" + semver "7.x" + yargs-parser "^21.0.1" + +ts-node@10.9.1: + version "10.9.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" + integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + +tslib@^1.8.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + tslib@^1.9.0: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" @@ -4643,11 +4691,6 @@ type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.5: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== -type-fest@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" - integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== - type-fest@^0.18.0: version "0.18.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" @@ -4677,35 +4720,26 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@^3.8.3: - version "3.8.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" - integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== - -typical@^2.4.2, typical@^2.6.0, typical@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d" - -typical@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4" - integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw== +typedoc@0.23.28: + version "0.23.28" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.23.28.tgz#3ce9c36ef1c273fa849d2dea18651855100d3ccd" + integrity sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w== + dependencies: + lunr "^2.3.9" + marked "^4.2.12" + minimatch "^7.1.3" + shiki "^0.14.1" -uc.micro@^1.0.1, uc.micro@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" - integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== +typescript@5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.2.tgz#891e1a90c5189d8506af64b9ef929fca99ba1ee5" + integrity sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw== uglify-js@^3.1.4: version "3.13.5" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.5.tgz#5d71d6dbba64cf441f32929b1efce7365bb4f113" integrity sha512-xtB8yEqIkn7zmOyS2zUNBsYCBRhDkvlNxMMY2smuJ/qA8NCHeQvKCF3i9Z4k8FJH4+PJvZRtMrPynfZ75+CSZw== -underscore@~1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" - integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== - update-browserslist-db@^1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" @@ -4725,6 +4759,11 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" +v8-compile-cache-lib@^3.0.1: + version "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.1: version "9.0.1" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz#b6f994b0b5d4ef255e17a0d17dc444a9f5132fa4" @@ -4734,9 +4773,10 @@ v8-to-istanbul@^9.0.1: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" -validate-commit-msg@^2.14.0: +validate-commit-msg@2.14.0: version "2.14.0" resolved "https://registry.yarnpkg.com/validate-commit-msg/-/validate-commit-msg-2.14.0.tgz#e5383691012cbb270dcc0bc2a4effebe14890eac" + integrity sha512-sETG7UmikRVseMyeayyF6L1svmNXoZiyG4TVyLYSVSYjcSuZT602T+irJKjIyE+FutGyngSLxHGLTeyFy+oyag== dependencies: conventional-commit-types "^2.0.0" find-parent-dir "^0.3.0" @@ -4750,19 +4790,15 @@ validate-npm-package-license@^3.0.1: spdx-correct "~1.0.0" spdx-expression-parse "~1.0.0" -walk-back@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/walk-back/-/walk-back-2.0.1.tgz#554e2a9d874fac47a8cb006bf44c2f0c4998a0a4" - -walk-back@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/walk-back/-/walk-back-3.0.1.tgz#0c0012694725604960d6c2f75aaf1a1e7d455d35" - integrity sha512-umiNB2qLO731Sxbp6cfZ9pwURJzTnftxE4Gc7hq8n/ehkuXC//s9F65IEIJA2ZytQZ1ZOsm/Fju4IWx0bivkUQ== +vscode-oniguruma@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" + integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== -walk-back@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/walk-back/-/walk-back-4.0.0.tgz#9e4ad2bd72038f3beed2d83180f9fd40b233bfab" - integrity sha512-kudCA8PXVQfrqv2mFTG72vDBRi8BKWxGgFLwPpzHcpZnSwZk93WMwUDVcLHWNsnm+Y0AC4Vb6MUNRgaHfyV2DQ== +vscode-textmate@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" + integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== walker@^1.0.8: version "1.0.8" @@ -4799,13 +4835,6 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= -wordwrapjs@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-3.0.0.tgz#c94c372894cadc6feb1a66bff64e1d9af92c5d1e" - dependencies: - reduce-flatten "^1.0.1" - typical "^2.6.1" - wrap-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-3.0.1.tgz#288a04d87eda5c286e060dfe8f135ce8d007f8ba" @@ -4844,11 +4873,6 @@ write-file-atomic@^4.0.2: imurmurhash "^0.1.4" signal-exit "^3.0.7" -xmlcreate@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/xmlcreate/-/xmlcreate-2.0.1.tgz#2ec38bd7b708d213fd1a90e2431c4af9c09f6a52" - integrity sha512-MjGsXhKG8YjTKrDCXseFo3ClbMGvUD4en29H2Cev1dv4P/chlpw6KdYmlCWDkhosBVKRDjM836+3e3pm1cBNJA== - xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -4873,7 +4897,14 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@^18.1.2, yargs-parser@^18.1.3: +yargs-parser@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" + integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== + dependencies: + camelcase "^4.1.0" + +yargs-parser@^18.1.1: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== @@ -4886,15 +4917,15 @@ yargs-parser@^20.2.2, yargs-parser@^20.2.3: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-parser@^21.1.1: +yargs-parser@^21.0.1, yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== -yargs@^15.3.1: - version "15.4.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" - integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== +yargs@15.3.1: + version "15.3.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.1.tgz#9505b472763963e54afe60148ad27a330818e98b" + integrity sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA== dependencies: cliui "^6.0.0" decamelize "^1.2.0" @@ -4906,7 +4937,7 @@ yargs@^15.3.1: string-width "^4.2.0" which-module "^2.0.0" y18n "^4.0.0" - yargs-parser "^18.1.2" + yargs-parser "^18.1.1" yargs@^16.2.0: version "16.2.0" @@ -4934,6 +4965,11 @@ yargs@^17.3.1: y18n "^5.0.5" yargs-parser "^21.1.1" +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"