From 1aa4140590e4254e17d957eba2305c9a9a0780c5 Mon Sep 17 00:00:00 2001 From: Michal Sobecki Date: Tue, 1 Sep 2026 11:54:26 +0200 Subject: [PATCH] featmodernize API client and toolchain Replace the class-based API with functional client factories, improve HTTP handling and tests, migrate to ESM and Node.js 22+, and adopt TypeScript 7, Oxlint, and Oxfmt. --- .eslintrc.js | 91 - .github/dependabot.yml | 14 +- .github/workflows/test-and-release.yml | 116 +- .oxfmtrc.json | 14 + .oxlintrc.json | 29 + .prettierrc.json | 12 - README.md | 202 +- build/auth.d.ts | 5 + build/auth.d.ts.map | 1 + build/auth.js | 41 + build/auth.js.map | 1 + build/bring.d.ts | 175 -- build/bring.js | 283 -- build/bring.js.map | 1 - build/client.d.ts | 4 + build/client.d.ts.map | 1 + build/client.js | 104 + build/client.js.map | 1 + build/errors.d.ts | 18 + build/errors.d.ts.map | 1 + build/errors.js | 15 + build/errors.js.map | 1 + build/http.d.ts | 9 + build/http.d.ts.map | 1 + build/http.js | 74 + build/http.js.map | 1 + build/index.d.ts | 8 + build/index.d.ts.map | 1 + build/index.js | 5 + build/index.js.map | 1 + build/public.d.ts | 9 + build/public.d.ts.map | 1 + build/public.js | 21 + build/public.js.map | 1 + build/types.d.ts | 140 + build/types.d.ts.map | 1 + build/types.js | 2 + build/types.js.map | 1 + package-lock.json | 3786 +++++++++--------------- package.json | 111 +- src/auth.ts | 60 + src/bring.ts | 441 --- src/client.ts | 136 + src/errors.ts | 33 + src/http.ts | 103 + src/index.ts | 7 + src/public.ts | 32 + src/types.ts | 168 ++ test/client.test.js | 134 + test/testMinimal.js | 32 - tsconfig.build.json | 23 +- tsconfig.json | 64 +- 52 files changed, 2775 insertions(+), 3761 deletions(-) delete mode 100644 .eslintrc.js create mode 100644 .oxfmtrc.json create mode 100644 .oxlintrc.json delete mode 100644 .prettierrc.json create mode 100644 build/auth.d.ts create mode 100644 build/auth.d.ts.map create mode 100644 build/auth.js create mode 100644 build/auth.js.map delete mode 100644 build/bring.d.ts delete mode 100644 build/bring.js delete mode 100644 build/bring.js.map create mode 100644 build/client.d.ts create mode 100644 build/client.d.ts.map create mode 100644 build/client.js create mode 100644 build/client.js.map create mode 100644 build/errors.d.ts create mode 100644 build/errors.d.ts.map create mode 100644 build/errors.js create mode 100644 build/errors.js.map create mode 100644 build/http.d.ts create mode 100644 build/http.d.ts.map create mode 100644 build/http.js create mode 100644 build/http.js.map create mode 100644 build/index.d.ts create mode 100644 build/index.d.ts.map create mode 100644 build/index.js create mode 100644 build/index.js.map create mode 100644 build/public.d.ts create mode 100644 build/public.d.ts.map create mode 100644 build/public.js create mode 100644 build/public.js.map create mode 100644 build/types.d.ts create mode 100644 build/types.d.ts.map create mode 100644 build/types.js create mode 100644 build/types.js.map create mode 100644 src/auth.ts delete mode 100644 src/bring.ts create mode 100644 src/client.ts create mode 100644 src/errors.ts create mode 100644 src/http.ts create mode 100644 src/index.ts create mode 100644 src/public.ts create mode 100644 src/types.ts create mode 100644 test/client.test.js delete mode 100644 test/testMinimal.js diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 529fe30..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,91 +0,0 @@ -module.exports = { - root: true, // Don't look outside this project for inherited configs - parser: '@typescript-eslint/parser', // Specifies the ESLint parser - parserOptions: { - ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features - sourceType: 'module', // Allows for the use of imports - project: './tsconfig.json' - }, - extends: [ - 'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin - 'plugin:prettier/recommended' - ], - plugins: [], - rules: { - indent: 'off', - quotes: [ - 'error', - 'single', - { - avoidEscape: true, - allowTemplateLiterals: true - } - ], - '@typescript-eslint/no-parameter-properties': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-use-before-define': [ - 'error', - { - functions: false, - typedefs: false, - classes: false - } - ], - '@typescript-eslint/no-unused-vars': [ - 'error', - { - ignoreRestSiblings: true, - argsIgnorePattern: '^_' - } - ], - '@typescript-eslint/explicit-function-return-type': [ - 'warn', - { - allowExpressions: true, - allowTypedFunctionExpressions: true - } - ], - '@typescript-eslint/no-object-literal-type-assertion': 'off', - '@typescript-eslint/interface-name-prefix': 'off', - '@typescript-eslint/no-non-null-assertion': 'off', // This is necessary for Map.has()/get()! - 'no-var': 'error', - 'prefer-const': 'error', - 'no-trailing-spaces': 'error', - curly: 'error', - 'brace-style': 'error', - 'arrow-parens': ['error', 'as-needed'], - 'no-console': 'off', - 'no-unused-vars': ['error', { argsIgnorePattern: '^_', caughtErrors: 'all' }], - 'no-useless-escape': 'warn', - 'no-constant-condition': 'off', - 'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 1 }], - 'no-throw-literal': 'error', - 'prefer-promise-reject-errors': 'error', - //"require-await": "error", - 'no-return-await': 'error', - eqeqeq: ['error', 'always'], - semi: ['error', 'always'], - 'comma-dangle': [ - 'error', - { - arrays: 'never', - objects: 'never', - imports: 'never', - exports: 'never', - functions: 'ignore' - } - ] - }, - overrides: [ - { - files: ['*.test.ts'], - rules: { - '@typescript-eslint/explicit-function-return-type': 'off' - } - }, - { - files: ['**/*.js'], - parser: 'espree' - } - ] -}; diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2ae64b6..a2585e0 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,9 +1,9 @@ version: 2 updates: -- package-ecosystem: npm - directory: "/" - schedule: - interval: daily - time: "04:00" - open-pull-requests-limit: 10 - versioning-strategy: increase-if-necessary + - package-ecosystem: npm + directory: '/' + schedule: + interval: daily + time: '04:00' + open-pull-requests-limit: 10 + versioning-strategy: increase-if-necessary diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 0aa2532..4d18a81 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -1,70 +1,56 @@ name: Test and Release -# Run this job on all pushes and pull requests -# as well as tags with a semantic version on: - push: - branches: - - "*" - tags: - - "v[0-9]+.[0-9]+.[0-9]+" - pull_request: {} + push: + branches: [master] + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + pull_request: {} -jobs: - # Runs tests on all supported node versions and OSes - tests: - if: contains(github.event.head_commit.message, '[skip ci]') == false - - runs-on: ${{ matrix.os }} - strategy: - matrix: - node-version: [18.x, 20.x, 22.x] - os: [ubuntu-latest, windows-latest, macos-latest] - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - - name: Install package - run: npm i - - - name: Run unit tests - run: npm run test - - # Deploys the final package to NPM - deploy: - needs: [tests] +permissions: + contents: read - # Trigger this step only when a commit on master is tagged with a version number - if: | - contains(github.event.head_commit.message, '[skip ci]') == false && - github.event_name == 'push' && - github.event.base_ref == 'refs/heads/master' && - startsWith(github.ref, 'refs/tags/v') - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version-file: '.nvmrc' - - - name: Install package - run: npm i - - - name: Publish package to npm - run: | - npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} - npm whoami - npm publish - - # Dummy job for skipped builds - without this, github reports the build as failed - skip-ci: - if: contains(github.event.head_commit.message, '[skip ci]') - runs-on: ubuntu-latest - steps: - - name: Skip build - run: echo "Build skipped!" +jobs: + tests: + runs-on: ${{ matrix.os }} + strategy: + matrix: + node-version: [22.x, 24.x] + os: [ubuntu-latest, windows-latest, macos-latest] + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: npm + + - name: Install package + run: npm ci + + - name: Validate package + run: npm run check + + deploy: + needs: [tests] + + if: startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + registry-url: 'https://registry.npmjs.org' + + - name: Install package + run: npm ci + + - name: Publish package to npm + run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.oxfmtrc.json b/.oxfmtrc.json new file mode 100644 index 0000000..2ad9e23 --- /dev/null +++ b/.oxfmtrc.json @@ -0,0 +1,14 @@ +{ + "$schema": "./node_modules/oxfmt/configuration_schema.json", + "printWidth": 120, + "semi": true, + "tabWidth": 4, + "useTabs": false, + "trailingComma": "none", + "singleQuote": true, + "endOfLine": "lf", + "bracketSpacing": true, + "arrowParens": "avoid", + "quoteProps": "as-needed", + "ignorePatterns": ["build/**", "node_modules/**", "package-lock.json"] +} diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000..1eb9cec --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,29 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "categories": { + "correctness": "error" + }, + "plugins": ["typescript", "unicorn", "oxc", "import", "promise", "node"], + "env": { + "es6": true, + "node": true + }, + "ignorePatterns": ["build/**", "node_modules/**"], + "options": { + "denyWarnings": true, + "reportUnusedDisableDirectives": "error", + "typeAware": true + }, + "rules": { + "eqeqeq": "error", + "no-console": "off", + "no-unused-vars": ["error", { "argsIgnorePattern": "^_" }], + "no-var": "error", + "prefer-const": "error", + "typescript/consistent-type-exports": "error", + "typescript/consistent-type-imports": "error", + "typescript/no-explicit-any": "error", + "typescript/no-floating-promises": "error", + "typescript/no-misused-promises": "error" + } +} diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index f45187b..0000000 --- a/.prettierrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "printWidth": 120, - "semi": true, - "tabWidth": 4, - "useTabs": false, - "trailingComma": "none", - "singleQuote": true, - "endOfLine": "lf", - "bracketSpacing": true, - "arrowParens": "avoid", - "quoteProps": "as-needed" -} diff --git a/README.md b/README.md index d57ed15..3b80b48 100644 --- a/README.md +++ b/README.md @@ -1,98 +1,152 @@ -# Node-Bring-Shopping -[![NPM version](http://img.shields.io/npm/v/bring-shopping.svg)](https://www.npmjs.com/package/bring-shopping) +# bring-shopping + +[![NPM version](https://img.shields.io/npm/v/bring-shopping.svg)](https://www.npmjs.com/package/bring-shopping) [![Downloads](https://img.shields.io/npm/dm/bring-shopping.svg)](https://www.npmjs.com/package/bring-shopping) -![Build Status](https://github.com/foxriver76/node-bring-api/workflows/Test%20and%20Release/badge.svg) +[![Build Status](https://github.com/foxriver76/node-bring-api/actions/workflows/test-and-release.yml/badge.svg)](https://github.com/foxriver76/node-bring-api/actions/workflows/test-and-release.yml) + +A zero-dependency, functional TypeScript client for Bring! shopping lists. -A __zero dependency__ node module for Bring! shopping lists __entirely written in TypeScript__. +> This project uses an undocumented API and is not endorsed by or affiliated with Bring! Labs AG. -## Disclaimer -The developers of this module are in no way endorsed by or affiliated with -Bring! Labs AG, or any associated subsidiaries, logos or trademarks. +## Requirements + +- Node.js 22 or newer +- An existing Bring! account for authenticated endpoints ## Installation -```npm install bring-shopping --production``` - -## Usage Example - -```javascript -const bringApi = require(`bring-shopping`); - -main(); - -async function main () { - // provide user and email to login - const bring = new bringApi({mail: `example@example.com`, password: `secret`}); - - // login to get your uuid and Bearer token - try { - await bring.login(); - console.log(`Successfully logged in as ${bring.name}`); - } catch (e) { - console.error(`Error on Login: ${e.message}`); - } - - // get all lists and their listUuid - const lists = await bring.loadLists(); - - // get items of a list by its list uuid - const items = await bring.getItems('9b3ba561-02ad-4744-a737-c43k7e5b93ec'); - - // get translations - const translations = await bring.loadTranslations('de-DE'); -} + +```sh +npm install bring-shopping +``` + +## Usage + +`connectBring` authenticates and returns a client that is ready to use. There is no constructor and no separate `login()` step. + +```js +import { connectBring } from 'bring-shopping'; + +const bring = await connectBring({ + email: 'example@example.com', + password: 'secret' +}); + +const { lists } = await bring.lists.getAll(); +const items = await bring.lists.getItems({ listId: lists[0].listUuid }); ``` -More important methods are `getItems(listUUID)`, `getItemsDetails(listUUID)`, `saveItem(listUuid, itemName, specificaiton)`, -`moveToRecentList(listUuid, itemName)` and `getAllUsersFromList(listUuid)`. +### Reuse an existing session + +Pass a stored session to avoid logging in again: + +```js +import { createBringClient } from 'bring-shopping'; -## Changelog -### 2.0.1 (2025-01-21) -* (@foxriver76) also throw on http errors +const bring = createBringClient({ + session: { + userId: process.env.BRING_USER_ID, + accessToken: process.env.BRING_ACCESS_TOKEN, + refreshToken: process.env.BRING_REFRESH_TOKEN + } +}); -### 2.0.0 (2024-11-27) -* (@foxriver76) ported to native `fetch` module (BREAKING: Requires Node.js 18 or above) +const { lists } = await bring.lists.getAll(); +``` -### 1.5.1 (2022-10-31) -* (foxriver76) updated types -* (foxriver76) fixed `removeItemImage` as headers were missing +Use `bring.getSession()` after `connectBring()` if the application needs to persist the returned tokens. Do not commit credentials or tokens to source control. -### 1.5.0 (2022-10-31) -* (Aliyss) added methods to link an image to an item (PR #221) +### Public resources -### 1.4.3 (2022-05-01) -* (foxriver76) fixed typos in types (thanks to @Squawnchy) +Catalogs and translations do not require authentication or a client: -### 1.4.2 (2021-08-12) -* (foxriver76) restructure to typescript +```js +import { getCatalog, getTranslations } from 'bring-shopping'; -### 1.3.1 (2021-04-29) -* (foxriver76) fixed issue where error was used instead of the mssage on `getPendingInvitations` +const catalog = await getCatalog({ locale: 'de-DE' }); +const translations = await getTranslations({ locale: 'de-DE' }); +``` -### 1.3.0 (2020-10-05) -* (mdhom) added `getItemsDetails` method -* (foxriver76) now reject with real errors instead of strings +### Change a shopping list -### 1.2.3 (2019-09-22) -* (foxriver76) on new call of login overwrite bearer header to allow reauth +```js +await bring.lists.saveItem({ + listId: '9b3ba561-02ad-4744-a737-c43b7e5b93ec', + name: 'Coffee', + specification: 'Whole beans' +}); -### 1.2.2 -* (foxriver76) More information on rejection of getItems +await bring.lists.moveItemToRecent({ + listId: '9b3ba561-02ad-4744-a737-c43b7e5b93ec', + name: 'Coffee' +}); +``` -### 1.2.1 -* (foxriver76) minor fix +All operations accept an optional second argument with an `AbortSignal`: -### 1.2.0 -* (foxriver76) new functionalities -> getTranslations, getCatalog and getPendingInvitations +```js +const items = await bring.lists.getItems( + { listId: '9b3ba561-02ad-4744-a737-c43b7e5b93ec' }, + { signal: AbortSignal.timeout(5_000) } +); +``` -### 1.1.0 -* (foxriver76) use API version v2 +## Errors -### 1.0.2 -* (foxriver76) minor code optimization, nothing functional +Failed HTTP responses and network failures reject with a structured `BringApiError`: + +```js +import { isBringApiError } from 'bring-shopping'; + +try { + await bring.lists.getAll(); +} catch (error) { + if (isBringApiError(error)) { + console.error(error.status, error.code, error.message); + } +} +``` + +## API overview + +- `connectBring(credentials, options?)` +- `authenticate(credentials, options?)` +- `createBringClient({ session, ...options })` +- `bring.lists`: `getAll`, `getItems`, `getItemDetails`, `saveItem`, `removeItem`, `moveItemToRecent`, `getUsers` +- `bring.itemImages`: `save`, `remove` +- `bring.user.getSettings` +- `bring.invitations.getPending` +- `getCatalog(options)` +- `getTranslations(options)` + +The optional client configuration supports `baseUrl`, a custom `fetch` implementation, API headers and country selection. All public TypeScript types are exported from the package root. + +## Migrating from v2 + +Version 3 is ESM-only and replaces the stateful `Bring` class: + +```diff +- const Bring = require('bring-shopping'); +- const bring = new Bring({ mail, password }); +- await bring.login(); +- const lists = await bring.loadLists(); ++ import { connectBring } from 'bring-shopping'; ++ const bring = await connectBring({ email: mail, password }); ++ const lists = await bring.lists.getAll(); +``` + +Mutating methods now return `Promise` and reject for non-successful HTTP statuses. Method arguments use named objects and `uuid` arguments are named `listId` or `itemId`. + +## Development + +The project uses TypeScript 7, Oxlint with type-aware rules and Oxfmt: + +```sh +npm ci +npm run check +``` -### 1.0.1 -* (foxriver76) fix links in package +Use `npm run format` to apply the repository formatting rules. -### 1.0.0 -* (foxriver76) offical release +## License +[MIT](LICENSE) diff --git a/build/auth.d.ts b/build/auth.d.ts new file mode 100644 index 0000000..7a7bfe9 --- /dev/null +++ b/build/auth.d.ts @@ -0,0 +1,5 @@ +import type { BringSession, ConnectOptions, Credentials } from './types.js'; +declare const DEFAULT_API_URL = "https://api.getbring.com/rest/v2/"; +export declare function authenticate(credentials: Credentials, options?: Pick): Promise; +export { DEFAULT_API_URL }; +//# sourceMappingURL=auth.d.ts.map \ No newline at end of file diff --git a/build/auth.d.ts.map b/build/auth.d.ts.map new file mode 100644 index 0000000..4654eef --- /dev/null +++ b/build/auth.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE5E,QAAA,MAAM,eAAe,sCAAsC,CAAC;AAuB5D,wBAAsB,YAAY,CAC9B,WAAW,EAAE,WAAW,EACxB,OAAO,GAAE,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAM,GACnE,OAAO,CAAC,YAAY,CAAC,CA2BvB;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"} \ No newline at end of file diff --git a/build/auth.js b/build/auth.js new file mode 100644 index 0000000..245c315 --- /dev/null +++ b/build/auth.js @@ -0,0 +1,41 @@ +import { createBringApiError } from './errors.js'; +import { createRequester } from './http.js'; +const DEFAULT_API_URL = 'https://api.getbring.com/rest/v2/'; +function isAuthResponse(value) { + if (typeof value !== 'object' || value === null) { + return false; + } + const response = value; + return (typeof response.name === 'string' && + typeof response.uuid === 'string' && + typeof response.access_token === 'string' && + (response.refresh_token === undefined || typeof response.refresh_token === 'string')); +} +export async function authenticate(credentials, options = {}) { + const request = createRequester({ + baseUrl: options.baseUrl ?? DEFAULT_API_URL, + fetch: options.fetch + }); + const response = await request('bringauth', { + method: 'POST', + signal: options.signal, + body: new URLSearchParams({ + email: credentials.email, + password: credentials.password + }) + }); + if (!isAuthResponse(response)) { + throw createBringApiError('Bring API returned an invalid authentication response', { + code: 'INVALID_RESPONSE', + body: response + }); + } + return { + userId: response.uuid, + userName: response.name, + accessToken: response.access_token, + refreshToken: response.refresh_token + }; +} +export { DEFAULT_API_URL }; +//# sourceMappingURL=auth.js.map \ No newline at end of file diff --git a/build/auth.js.map b/build/auth.js.map new file mode 100644 index 0000000..cecb3cd --- /dev/null +++ b/build/auth.js.map @@ -0,0 +1 @@ +{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAG5C,MAAM,eAAe,GAAG,mCAAmC,CAAC;AAS5D,SAAS,cAAc,CAAC,KAAc;IAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,QAAQ,GAAG,KAA8B,CAAC;IAChD,OAAO,CACH,OAAO,QAAQ,CAAC,IAAI,KAAK,QAAQ;QACjC,OAAO,QAAQ,CAAC,IAAI,KAAK,QAAQ;QACjC,OAAO,QAAQ,CAAC,YAAY,KAAK,QAAQ;QACzC,CAAC,QAAQ,CAAC,aAAa,KAAK,SAAS,IAAI,OAAO,QAAQ,CAAC,aAAa,KAAK,QAAQ,CAAC,CACvF,CAAC;AACN,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAC9B,WAAwB,EACxB,OAAO,GAAyD,EAAE;IAElE,MAAM,OAAO,GAAG,eAAe,CAAC;QAC5B,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,eAAe;QAC3C,KAAK,EAAE,OAAO,CAAC,KAAK;KACvB,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAU,WAAW,EAAE;QACjD,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,IAAI,EAAE,IAAI,eAAe,CAAC;YACtB,KAAK,EAAE,WAAW,CAAC,KAAK;YACxB,QAAQ,EAAE,WAAW,CAAC,QAAQ;SACjC,CAAC;KACL,CAAC,CAAC;IAEH,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,MAAM,mBAAmB,CAAC,uDAAuD,EAAE;YAC/E,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,QAAQ;SACjB,CAAC,CAAC;IACP,CAAC;IAED,OAAO;QACH,MAAM,EAAE,QAAQ,CAAC,IAAI;QACrB,QAAQ,EAAE,QAAQ,CAAC,IAAI;QACvB,WAAW,EAAE,QAAQ,CAAC,YAAY;QAClC,YAAY,EAAE,QAAQ,CAAC,aAAa;KACvC,CAAC;AACN,CAAC;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"} \ No newline at end of file diff --git a/build/bring.d.ts b/build/bring.d.ts deleted file mode 100644 index 28f87f0..0000000 --- a/build/bring.d.ts +++ /dev/null @@ -1,175 +0,0 @@ -interface BringOptions { - mail: string; - password: string; - url?: string; - uuid?: string; -} -interface GetItemsResponseEntry { - specification: string; - name: string; -} -interface GetItemsResponse { - uuid: string; - status: string; - purchase: GetItemsResponseEntry[]; - recently: GetItemsResponseEntry[]; -} -interface GetAllUsersFromListEntry { - publicUuid: string; - name: string; - email: string; - photoPath: string; - pushEnabled: boolean; - plusTryOut: boolean; - country: string; - language: string; -} -interface GetAllUsersFromListResponse { - users: GetAllUsersFromListEntry[]; -} -interface LoadListsEntry { - listUuid: string; - name: string; - theme: string; -} -interface LoadListsResponse { - lists: LoadListsEntry[]; -} -interface GetItemsDetailsEntry { - uuid: string; - itemId: string; - listUuid: string; - userIconItemId: string; - userSectionId: string; - assignedTo: string; - imageUrl: string; -} -interface UserSettingsEntry { - key: string; - value: string; -} -interface UserListSettingsEntry { - listUuid: string; - usersettings: UserSettingsEntry[]; -} -interface GetUserSettingsResponse { - userSettings: UserSettingsEntry[]; - userlistsettings: UserListSettingsEntry[]; -} -interface CatalogItemsEntry { - itemId: string; - name: string; -} -interface CatalogSectionsEntry { - sectionId: string; - name: string; - items: CatalogItemsEntry[]; -} -interface LoadCatalogResponse { - language: string; - catalog: { - sections: CatalogSectionsEntry[]; - }; -} -interface GetPendingInvitationsResponse { - invitations: any[]; -} -interface Image { - /** the image itself */ - imageData: string; -} -declare class Bring { - private readonly mail; - private readonly password; - private readonly url; - private uuid; - private readonly headers; - name?: string; - private bearerToken?; - private refreshToken?; - private putHeaders?; - constructor(options: BringOptions); - /** - * Try to log into given account - */ - login(): Promise; - /** - * Loads all shopping lists - */ - loadLists(): Promise; - /** - * Get all items from the current selected shopping list - */ - getItems(listUuid: string): Promise; - /** - * Get detailed information about all items from the current selected shopping list - */ - getItemsDetails(listUuid: string): Promise; - /** - * Save an item to your current shopping list - * - * @param itemName The name of the item you want to send to the bring server - * @param specification The little description under the name of the item - * @param listUuid The listUUID you want to receive a list of users from. - * returns an empty string and answerHttpStatus should contain 204. If not -> error - */ - saveItem(listUuid: string, itemName: string, specification: string): Promise; - /** - * Save an image to an item - * - * @param itemUuid The itemUUID which will be updated - * @param image The image you want to link to the item - * @return returns an imageUrl and answerHttpStatus should contain 204. If not -> error - */ - saveItemImage(itemUuid: string, image: Image): Promise<{ - imageUrl: string; - }>; - /** - * remove an item from your current shopping list - * - * @param listUuid The listUUID you want to remove a item from - * @param itemName Name of the item you want to delete from you shopping list - * @return should return an empty string and $answerHttpStatus should contain 204. If not -> error - */ - removeItem(listUuid: string, itemName: string): Promise; - /** - * Remove the image from your item - * - * @param itemUuid The itemUUID you want to remove the image from - * @return returns an empty string and answerHttpStatus should contain 204. If not -> error - */ - removeItemImage(itemUuid: string): Promise; - /** - * Move an item to recent items list - * - * @param itemName Name of the item you want to delete from you shopping list - * @param listUuid The lisUUID you want to receive a list of users from. - * @return Should return an empty string and $answerHttpStatus should contain 204. If not -> error - */ - moveToRecentList(listUuid: string, itemName: string): Promise; - /** - * Get all users from a shopping list - * - * @param listUuid The listUUID you want to receive a list of users from - */ - getAllUsersFromList(listUuid: string): Promise; - /** - * Get the user settings - */ - getUserSettings(): Promise; - /** - * Load translation file e. g. via 'de-DE' - * @param locale from which country translations will be loaded - */ - loadTranslations(locale: string): Promise>; - /** - * Load translation file e.g. via 'de-DE' - * @param locale from which country translations will be loaded - */ - loadCatalog(locale: string): Promise; - /** - * Get pending invitations - */ - getPendingInvitations(): Promise; -} -export = Bring; diff --git a/build/bring.js b/build/bring.js deleted file mode 100644 index 937c88b..0000000 --- a/build/bring.js +++ /dev/null @@ -1,283 +0,0 @@ -"use strict"; -class Bring { - constructor(options) { - this.mail = options.mail; - this.password = options.password; - this.url = options.url || `https://api.getbring.com/rest/v2/`; - this.uuid = options.uuid || ``; - this.headers = { - 'X-BRING-API-KEY': `cof4Nc6D8saplXjE3h3HXqHH8m7VU2i1Gs0g85Sp`, - 'X-BRING-CLIENT': `webApp`, - 'X-BRING-CLIENT-SOURCE': `webApp`, - 'X-BRING-COUNTRY': `DE` - }; - } - /** - * Try to log into given account - */ - async login() { - let data; - try { - const resp = await fetch(`${this.url}bringauth`, { - method: 'POST', - body: new URLSearchParams({ email: this.mail, password: this.password }) - }); - data = await resp.json(); - } - catch (e) { - throw new Error(`Cannot Login: ${e.message}`); - } - if ('error' in data) { - throw new Error(`Cannot Login: ${data.message}`); - } - this.name = data.name; - this.uuid = data.uuid; - this.bearerToken = data.access_token; - this.refreshToken = data.refresh_token; - this.headers[`X-BRING-USER-UUID`] = this.uuid; - this.headers[`Authorization`] = `Bearer ${this.bearerToken}`; - this.putHeaders = { - ...this.headers, - ...{ 'Content-Type': `application/x-www-form-urlencoded; charset=UTF-8` } - }; - } - /** - * Loads all shopping lists - */ - async loadLists() { - try { - const resp = await fetch(`${this.url}bringusers/${this.uuid}/lists`, { headers: this.headers }); - const lists = await resp.json(); - if ('error' in lists) { - throw new Error(lists.message); - } - return lists; - } - catch (e) { - throw new Error(`Cannot get lists: ${e.message}`); - } - } - /** - * Get all items from the current selected shopping list - */ - async getItems(listUuid) { - try { - const resp = await fetch(`${this.url}bringlists/${listUuid}`, { headers: this.headers }); - const items = await resp.json(); - if ('error' in items) { - throw new Error(items.message); - } - return items; - } - catch (e) { - throw new Error(`Cannot get items for list ${listUuid}: ${e.message}`); - } - } - /** - * Get detailed information about all items from the current selected shopping list - */ - async getItemsDetails(listUuid) { - try { - const resp = await fetch(`${this.url}bringlists/${listUuid}/details`, { headers: this.headers }); - const items = await resp.json(); - if ('error' in items) { - throw new Error(items.message); - } - return items; - } - catch (e) { - throw new Error(`Cannot get detailed items for list ${listUuid}: ${e.message}`); - } - } - /** - * Save an item to your current shopping list - * - * @param itemName The name of the item you want to send to the bring server - * @param specification The little description under the name of the item - * @param listUuid The listUUID you want to receive a list of users from. - * returns an empty string and answerHttpStatus should contain 204. If not -> error - */ - async saveItem(listUuid, itemName, specification) { - try { - const resp = await fetch(`${this.url}bringlists/${listUuid}`, { - method: 'PUT', - headers: this.putHeaders, - body: `&purchase=${itemName}&recently=&specification=${specification}&remove=&sender=null` - }); - return resp.text(); - } - catch (e) { - throw new Error(`Cannot save item ${itemName} (${specification}) to ${listUuid}: ${e.message}`); - } - } - /** - * Save an image to an item - * - * @param itemUuid The itemUUID which will be updated - * @param image The image you want to link to the item - * @return returns an imageUrl and answerHttpStatus should contain 204. If not -> error - */ - async saveItemImage(itemUuid, image) { - try { - const resp = await fetch(`${this.url}bringlistitemdetails/${itemUuid}/image`, { - method: 'PUT', - headers: this.putHeaders, - body: new URLSearchParams({ ...image }) - }); - const imageObj = await resp.json(); - if ('error' in imageObj) { - throw new Error(imageObj.message); - } - return imageObj; - } - catch (e) { - throw new Error(`Cannot save item image ${itemUuid}: ${e.message}`); - } - } - /** - * remove an item from your current shopping list - * - * @param listUuid The listUUID you want to remove a item from - * @param itemName Name of the item you want to delete from you shopping list - * @return should return an empty string and $answerHttpStatus should contain 204. If not -> error - */ - async removeItem(listUuid, itemName) { - try { - const resp = await fetch(`${this.url}bringlists/${listUuid}`, { - method: 'PUT', - headers: this.putHeaders, - body: `&purchase=&recently=&specification=&remove=${itemName}&sender=null` - }); - return resp.text(); - } - catch (e) { - throw new Error(`Cannot remove item ${itemName} from ${listUuid}: ${e.message}`); - } - } - /** - * Remove the image from your item - * - * @param itemUuid The itemUUID you want to remove the image from - * @return returns an empty string and answerHttpStatus should contain 204. If not -> error - */ - async removeItemImage(itemUuid) { - try { - const resp = await fetch(`${this.url}bringlistitemdetails/${itemUuid}/image`, { - method: 'DELETE', - headers: this.headers - }); - return resp.text(); - } - catch (e) { - throw new Error(`Cannot remove item image ${itemUuid}: ${e.message}`); - } - } - /** - * Move an item to recent items list - * - * @param itemName Name of the item you want to delete from you shopping list - * @param listUuid The lisUUID you want to receive a list of users from. - * @return Should return an empty string and $answerHttpStatus should contain 204. If not -> error - */ - async moveToRecentList(listUuid, itemName) { - try { - const resp = await fetch(`${this.url}bringlists/${listUuid}`, { - method: 'PUT', - headers: this.putHeaders, - body: `&purchase=&recently=${itemName}&specification=&remove=&&sender=null` - }); - return resp.text(); - } - catch (e) { - throw new Error(`Cannot remove item ${itemName} from ${listUuid}: ${e.message}`); - } - } - /** - * Get all users from a shopping list - * - * @param listUuid The listUUID you want to receive a list of users from - */ - async getAllUsersFromList(listUuid) { - try { - const resp = await fetch(`${this.url}bringlists/${listUuid}/users`, { headers: this.headers }); - const users = await resp.json(); - if ('error' in users) { - throw new Error(users.message); - } - return users; - } - catch (e) { - throw new Error(`Cannot get users from list: ${e.message}`); - } - } - /** - * Get the user settings - */ - async getUserSettings() { - try { - const resp = await fetch(`${this.url}bringusersettings/${this.uuid}`, { headers: this.headers }); - const settings = await resp.json(); - if ('error' in settings) { - throw new Error(settings.message); - } - return settings; - } - catch (e) { - throw new Error(`Cannot get user settings: ${e.message}`); - } - } - /** - * Load translation file e. g. via 'de-DE' - * @param locale from which country translations will be loaded - */ - async loadTranslations(locale) { - try { - const resp = await fetch(`https://web.getbring.com/locale/articles.${locale}.json`); - const translations = await resp.json(); - if ('error' in translations) { - throw new Error(translations.message); - } - return translations; - } - catch (e) { - throw new Error(`Cannot get translations: ${e.message}`); - } - } - /** - * Load translation file e.g. via 'de-DE' - * @param locale from which country translations will be loaded - */ - async loadCatalog(locale) { - try { - const resp = await fetch(`https://web.getbring.com/locale/catalog.${locale}.json`); - const catalog = await resp.json(); - if ('error' in catalog) { - throw new Error(catalog.message); - } - return catalog; - } - catch (e) { - throw new Error(`Cannot get catalog: ${e.message}`); - } - } - /** - * Get pending invitations - */ - async getPendingInvitations() { - try { - const resp = await fetch(`${this.url}bringusers/${this.uuid}/invitations?status=pending`, { - headers: this.headers - }); - const invites = await resp.json(); - if ('error' in invites) { - throw new Error(invites.message); - } - return invites; - } - catch (e) { - throw new Error(`Cannot get pending invitations: ${e.message}`); - } - } -} -module.exports = Bring; -//# sourceMappingURL=bring.js.map \ No newline at end of file diff --git a/build/bring.js.map b/build/bring.js.map deleted file mode 100644 index c59e885..0000000 --- a/build/bring.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bring.js","sourceRoot":"","sources":["../src/bring.ts"],"names":[],"mappings":";AA+GA,MAAM,KAAK;IA0BP,YAAY,OAAqB;QAC7B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,mCAAmC,CAAC;QAC9D,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG;YACX,iBAAiB,EAAE,0CAA0C;YAC7D,gBAAgB,EAAE,QAAQ;YAC1B,uBAAuB,EAAE,QAAQ;YACjC,iBAAiB,EAAE,IAAI;SAC1B,CAAC;IACN,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,KAAK;QACP,IAAI,IAAkB,CAAC;QAEvB,IAAI,CAAC;YACD,MAAM,IAAI,GAAG,MAAM,KA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AC,uBAAuB,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;QACxD,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,qBAAqB;QACvB,IAAI,CAAC;YACD,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,cAAc,IAAI,CAAC,IAAI,6BAA6B,EAAE;gBACtF,OAAO,EAAE,IAAI,CAAC,OAAO;aACxB,CAAC,CAAC;YACH,MAAM,OAAO,GAAkD,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YAEjF,IAAI,OAAO,IAAI,OAAO,EAAE,CAAC;gBACrB,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACrC,CAAC;YAED,OAAO,OAAO,CAAC;QACnB,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;QACpE,CAAC;IACL,CAAC;CACJ;AAED,iBAAS,KAAK,CAAC"} \ No newline at end of file diff --git a/build/client.d.ts b/build/client.d.ts new file mode 100644 index 0000000..703b46e --- /dev/null +++ b/build/client.d.ts @@ -0,0 +1,4 @@ +import type { BringClient, ConnectOptions, CreateClientOptions, Credentials } from './types.js'; +export declare function createBringClient(options: CreateClientOptions): BringClient; +export declare function connectBring(credentials: Credentials, options?: ConnectOptions): Promise; +//# sourceMappingURL=client.d.ts.map \ No newline at end of file diff --git a/build/client.d.ts.map b/build/client.d.ts.map new file mode 100644 index 0000000..f1ae97d --- /dev/null +++ b/build/client.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACR,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,WAAW,EAYd,MAAM,YAAY,CAAC;AAQpB,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,GAAG,WAAW,CAwG3E;AAED,wBAAsB,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,WAAW,CAAC,CAG/G"} \ No newline at end of file diff --git a/build/client.js b/build/client.js new file mode 100644 index 0000000..293355b --- /dev/null +++ b/build/client.js @@ -0,0 +1,104 @@ +import { authenticate, DEFAULT_API_URL } from './auth.js'; +import { createRequester } from './http.js'; +const DEFAULT_API_KEY = 'cof4Nc6D8saplXjE3h3HXqHH8m7VU2i1Gs0g85Sp'; +function formData(values) { + return new URLSearchParams(values); +} +export function createBringClient(options) { + const session = Object.freeze({ ...options.session }); + const request = createRequester({ + baseUrl: options.baseUrl ?? DEFAULT_API_URL, + fetch: options.fetch, + headers: { + authorization: `Bearer ${session.accessToken}`, + 'x-bring-user-uuid': session.userId, + 'x-bring-api-key': options.apiKey ?? DEFAULT_API_KEY, + 'x-bring-client': options.client ?? 'webApp', + 'x-bring-client-source': options.clientSource ?? 'webApp', + 'x-bring-country': options.country ?? 'DE' + } + }); + const client = { + lists: Object.freeze({ + getAll: options => request(`bringusers/${encodeURIComponent(session.userId)}/lists`, { + signal: options?.signal + }), + getItems: (input, options) => request(`bringlists/${encodeURIComponent(input.listId)}`, { + signal: options?.signal + }), + getItemDetails: (input, options) => request(`bringlists/${encodeURIComponent(input.listId)}/details`, { + signal: options?.signal + }), + saveItem: async (input, options) => { + await request(`bringlists/${encodeURIComponent(input.listId)}`, { + method: 'PUT', + signal: options?.signal, + body: formData({ + purchase: input.name, + recently: '', + specification: input.specification ?? '', + remove: '', + sender: 'null' + }) + }); + }, + removeItem: async (input, options) => { + await request(`bringlists/${encodeURIComponent(input.listId)}`, { + method: 'PUT', + signal: options?.signal, + body: formData({ + purchase: '', + recently: '', + specification: '', + remove: input.name, + sender: 'null' + }) + }); + }, + moveItemToRecent: async (input, options) => { + await request(`bringlists/${encodeURIComponent(input.listId)}`, { + method: 'PUT', + signal: options?.signal, + body: formData({ + purchase: '', + recently: input.name, + specification: '', + remove: '', + sender: 'null' + }) + }); + }, + getUsers: (input, options) => request(`bringlists/${encodeURIComponent(input.listId)}/users`, { + signal: options?.signal + }) + }), + itemImages: Object.freeze({ + save: (input, options) => request(`bringlistitemdetails/${encodeURIComponent(input.itemId)}/image`, { + method: 'PUT', + signal: options?.signal, + body: formData({ imageData: input.imageData }) + }), + remove: async (input, options) => { + await request(`bringlistitemdetails/${encodeURIComponent(input.itemId)}/image`, { + method: 'DELETE', + signal: options?.signal + }); + } + }), + user: Object.freeze({ + getSettings: options => request(`bringusersettings/${encodeURIComponent(session.userId)}`, { + signal: options?.signal + }) + }), + invitations: Object.freeze({ + getPending: options => request(`bringusers/${encodeURIComponent(session.userId)}/invitations?status=pending`, { signal: options?.signal }) + }), + getSession: () => session + }; + return Object.freeze(client); +} +export async function connectBring(credentials, options = {}) { + const session = await authenticate(credentials, options); + return createBringClient({ ...options, session }); +} +//# sourceMappingURL=client.js.map \ No newline at end of file diff --git a/build/client.js.map b/build/client.js.map new file mode 100644 index 0000000..1cbf892 --- /dev/null +++ b/build/client.js.map @@ -0,0 +1 @@ +{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAmB5C,MAAM,eAAe,GAAG,0CAA0C,CAAC;AAEnE,SAAS,QAAQ,CAAC,MAA8B;IAC5C,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAA4B;IAC1D,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IACtD,MAAM,OAAO,GAAG,eAAe,CAAC;QAC5B,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,eAAe;QAC3C,KAAK,EAAE,OAAO,CA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iBAAiB,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;AACtD,CAAC"} \ No newline at end of file diff --git a/build/errors.d.ts b/build/errors.d.ts new file mode 100644 index 0000000..26acf3b --- /dev/null +++ b/build/errors.d.ts @@ -0,0 +1,18 @@ +export interface BringApiError extends Error { + readonly name: 'BringApiError'; + readonly status?: number; + readonly code?: string; + readonly apiCode?: number; + readonly body?: unknown; +} +interface ErrorOptions { + readonly status?: number; + readonly code?: string; + readonly apiCode?: number; + readonly body?: unknown; + readonly cause?: unknown; +} +export declare function createBringApiError(message: string, options?: ErrorOptions): BringApiError; +export declare function isBringApiError(error: unknown): error is BringApiError; +export {}; +//# sourceMappingURL=errors.d.ts.map \ No newline at end of file diff --git a/build/errors.d.ts.map b/build/errors.d.ts.map new file mode 100644 index 0000000..8f8163d --- /dev/null +++ b/build/errors.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAc,SAAQ,KAAK;IACxC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,UAAU,YAAY;IAClB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,aAAa,CAY9F;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAEtE"} \ No newline at end of file diff --git a/build/errors.js b/build/errors.js new file mode 100644 index 0000000..f334310 --- /dev/null +++ b/build/errors.js @@ -0,0 +1,15 @@ +export function createBringApiError(message, options = {}) { + const error = new Error(message, { cause: options.cause }); + Object.defineProperties(error, { + name: { value: 'BringApiError', enumerable: true }, + status: { value: options.status, enumerable: true }, + code: { value: options.code, enumerable: true }, + apiCode: { value: options.apiCode, enumerable: true }, + body: { value: options.body, enumerable: false } + }); + return error; +} +export function isBringApiError(error) { + return error instanceof Error && error.name === 'BringApiError'; +} +//# sourceMappingURL=errors.js.map \ No newline at end of file diff --git a/build/errors.js.map b/build/errors.js.map new file mode 100644 index 0000000..3b052b8 --- /dev/null +++ b/build/errors.js.map @@ -0,0 +1 @@ +{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAgBA,MAAM,UAAU,mBAAmB,CAAC,OAAe,EAAE,OAAO,GAAiB,EAAE;IAC3E,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAkB,CAAC;IAE5E,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE;QAC3B,IAAI,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE;QAClD,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE;QACnD,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;QAC/C,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE;QACrD,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;KACnD,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAc;IAC1C,OAAO,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,eAAe,CAAC;AACpE,CAAC"} \ No newline at end of file diff --git a/build/http.d.ts b/build/http.d.ts new file mode 100644 index 0000000..48767aa --- /dev/null +++ b/build/http.d.ts @@ -0,0 +1,9 @@ +import type { Fetch } from './types.js'; +export interface RequesterOptions { + readonly baseUrl: string; + readonly fetch?: Fetch; + readonly headers?: HeadersInit; +} +export type Requester = (path: string, init?: RequestInit) => Promise; +export declare function createRequester(options: RequesterOptions): Requester; +//# sourceMappingURL=http.d.ts.map \ No newline at end of file diff --git a/build/http.d.ts.map b/build/http.d.ts.map new file mode 100644 index 0000000..d15984a --- /dev/null +++ b/build/http.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC;CAClC;AAED,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;AA+D5E,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,CA8BpE"} \ No newline at end of file diff --git a/build/http.js b/build/http.js new file mode 100644 index 0000000..37ce13d --- /dev/null +++ b/build/http.js @@ -0,0 +1,74 @@ +import { createBringApiError, isBringApiError } from './errors.js'; +function normalizeBaseUrl(baseUrl) { + return baseUrl.endsWith('/') ? baseUrl : `${baseUrl}/`; +} +function isRecord(value) { + return typeof value === 'object' && value !== null; +} +function isApiErrorBody(value) { + return isRecord(value) && typeof value.error === 'string'; +} +async function readBody(response) { + if (response.status === 204 || response.status === 205) { + return undefined; + } + const text = await response.text(); + if (text.length === 0) { + return undefined; + } + const contentType = response.headers.get('content-type') ?? ''; + if (contentType.includes('json')) { + try { + return JSON.parse(text); + } + catch (cause) { + throw createBringApiError('Bring API returned invalid JSON', { + status: response.status, + code: 'INVALID_RESPONSE', + body: text, + cause + }); + } + } + return text; +} +function errorFromResponse(response, body) { + const apiError = isApiErrorBody(body) ? body : undefined; + const message = (typeof apiError?.message === 'string' && apiError.message) || + (typeof apiError?.error_description === 'string' && apiError.error_description) || + `Bring API request failed with status ${response.status}`; + return createBringApiError(message, { + status: response.status, + code: typeof apiError?.error === 'string' ? apiError.error : undefined, + apiCode: typeof apiError?.errorcode === 'number' ? apiError.errorcode : undefined, + body + }); +} +export function createRequester(options) { + const fetchImplementation = options.fetch ?? globalThis.fetch; + const baseUrl = normalizeBaseUrl(options.baseUrl); + const defaultHeaders = new Headers(options.headers); + return async function request(path, init = {}) { + const headers = new Headers(defaultHeaders); + new Headers(init.headers).forEach((value, key) => headers.set(key, value)); + let response; + try { + response = await fetchImplementation(new URL(path, baseUrl), { ...init, headers }); + } + catch (cause) { + if (isBringApiError(cause)) { + throw cause; + } + throw createBringApiError('Cannot connect to Bring API', { + code: 'NETWORK_ERROR', + cause + }); + } + const body = await readBody(response); + if (!response.ok || isApiErrorBody(body)) { + throw errorFromResponse(response, body); + } + return body; + }; +} +//# sourceMappingURL=http.js.map \ No newline at end of file diff --git a/build/http.js.map b/build/http.js.map new file mode 100644 index 0000000..13a42d8 --- /dev/null +++ b/build/http.js.map @@ -0,0 +1 @@ +{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,eAA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C,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;QAE3E,IAAI,QAAkB,CAAC;QACvB,IAAI,CAAC;YACD,QAAQ,GAAG,MAAM,mBAAmB,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;QACvF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;gBACzB,MAAM,KAAK,CAAC;YAChB,CAAC;YAED,MAAM,mBAAmB,CAAC,6BAA6B,EAAE;gBACrD,IAAI,EAAE,eAAe;gBACrB,KAAK;aACR,CAAC,CAAC;QACP,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACtC,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;YACvC,MAAM,iBAAiB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC5C,CAAC;QAED,OAAO,IAAS,CAAC;IACrB,CAAC,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/build/index.d.ts b/build/index.d.ts new file mode 100644 index 0000000..0f08915 --- /dev/null +++ b/build/index.d.ts @@ -0,0 +1,8 @@ +export { authenticate } from './auth.js'; +export { connectBring, createBringClient } from './client.js'; +export { isBringApiError } from './errors.js'; +export { getCatalog, getTranslations } from './public.js'; +export type { BringApiError } from './errors.js'; +export type { PublicResourceOptions } from './public.js'; +export type * from './types.js'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/build/index.d.ts.map b/build/index.d.ts.map new file mode 100644 index 0000000..0637ed2 --- /dev/null +++ b/build/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC1D,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACzD,mBAAmB,YAAY,CAAC"} \ No newline at end of file diff --git a/build/index.js b/build/index.js new file mode 100644 index 0000000..8fd7a15 --- /dev/null +++ b/build/index.js @@ -0,0 +1,5 @@ +export { authenticate } from './auth.js'; +export { connectBring, createBringClient } from './client.js'; +export { isBringApiError } from './errors.js'; +export { getCatalog, getTranslations } from './public.js'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/build/index.js.map b/build/index.js.map new file mode 100644 index 0000000..ae3fd88 --- /dev/null +++ b/build/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/build/public.d.ts b/build/public.d.ts new file mode 100644 index 0000000..2fe765c --- /dev/null +++ b/build/public.d.ts @@ -0,0 +1,9 @@ +import type { Catalog, Fetch, RequestOptions } from './types.js'; +export interface PublicResourceOptions extends RequestOptions { + readonly locale: string; + readonly fetch?: Fetch; + readonly baseUrl?: string; +} +export declare function getCatalog(options: PublicResourceOptions): Promise; +export declare function getTranslations(options: PublicResourceOptions): Promise>>; +//# sourceMappingURL=public.d.ts.map \ No newline at end of file diff --git a/build/public.d.ts.map b/build/public.d.ts.map new file mode 100644 index 0000000..2a7fc16 --- /dev/null +++ b/build/public.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../src/public.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjE,MAAM,WAAW,qBAAsB,SAAQ,cAAc;IACzD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC,CAS3E;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CASzG"} \ No newline at end of file diff --git a/build/public.js b/build/public.js new file mode 100644 index 0000000..0a46d84 --- /dev/null +++ b/build/public.js @@ -0,0 +1,21 @@ +import { createRequester } from './http.js'; +const DEFAULT_WEB_URL = 'https://web.getbring.com/locale/'; +export function getCatalog(options) { + const request = createRequester({ + baseUrl: options.baseUrl ?? DEFAULT_WEB_URL, + fetch: options.fetch + }); + return request(`catalog.${encodeURIComponent(options.locale)}.json`, { + signal: options.signal + }); +} +export function getTranslations(options) { + const request = createRequester({ + baseUrl: options.baseUrl ?? DEFAULT_WEB_URL, + fetch: options.fetch + }); + return request(`articles.${encodeURIComponent(options.locale)}.json`, { + signal: options.signal + }); +} +//# sourceMappingURL=public.js.map \ No newline at end of file diff --git a/build/public.js.map b/build/public.js.map new file mode 100644 index 0000000..9850773 --- /dev/null +++ b/build/public.js.map @@ -0,0 +1 @@ +{"version":3,"file":"public.js","sourceRoot":"","sources":["../src/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAG5C,MAAM,eAAe,GAAG,kCAAkC,CAAC;AAQ3D,MAAM,UAAU,UAAU,CAAC,OAA8B;IACrD,MAAM,OAAO,GAAG,eAAe,CAAC;QAC5B,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,eAAe;QAC3C,KAAK,EAAE,OAAO,CAAC,KAAK;KACvB,CAAC,CAAC;IAEH,OAAO,OAAO,CAAU,WAAW,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE;QAC1E,MAAM,EAAE,OAAO,CAAC,MAAM;KACzB,CAAC,CAAC;AACP,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAA8B;IAC1D,MAAM,OAAO,GAAG,eAAe,CAAC;QAC5B,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,eAAe;QAC3C,KAAK,EAAE,OAAO,CAAC,KAAK;KACvB,CAAC,CAAC;IAEH,OAAO,OAAO,CAAmC,YAAY,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE;QACpG,MAAM,EAAE,OAAO,CAAC,MAAM;KACzB,CAAC,CAAC;AACP,CAAC"} \ No newline at end of file diff --git a/build/types.d.ts b/build/types.d.ts new file mode 100644 index 0000000..12bf60c --- /dev/null +++ b/build/types.d.ts @@ -0,0 +1,140 @@ +export type Fetch = typeof globalThis.fetch; +export interface Credentials { + readonly email: string; + readonly password: string; +} +export interface BringSession { + readonly userId: string; + readonly accessToken: string; + readonly refreshToken?: string; + readonly userName?: string; +} +export interface ClientOptions { + readonly baseUrl?: string; + readonly fetch?: Fetch; + readonly apiKey?: string; + readonly client?: string; + readonly clientSource?: string; + readonly country?: string; +} +export interface CreateClientOptions extends ClientOptions { + readonly session: BringSession; +} +export interface RequestOptions { + readonly signal?: AbortSignal; +} +export interface ConnectOptions extends ClientOptions, RequestOptions { +} +export interface ShoppingItem { + readonly specification: string; + readonly name: string; +} +export interface ShoppingListItems { + readonly uuid: string; + readonly status: string; + readonly purchase: readonly ShoppingItem[]; + readonly recently: readonly ShoppingItem[]; +} +export interface ShoppingListSummary { + readonly listUuid: string; + readonly name: string; + readonly theme: string; +} +export interface ShoppingLists { + readonly lists: readonly ShoppingListSummary[]; +} +export interface ItemDetails { + readonly uuid: string; + readonly itemId: string; + readonly listUuid: string; + readonly userIconItemId: string; + readonly userSectionId: string; + readonly assignedTo: string; + readonly imageUrl: string; +} +export interface ListUser { + readonly publicUuid: string; + readonly name: string; + readonly email: string; + readonly photoPath: string; + readonly pushEnabled: boolean; + readonly plusTryOut: boolean; + readonly country: string; + readonly language: string; +} +export interface ListUsers { + readonly users: readonly ListUser[]; +} +export interface UserSetting { + readonly key: string; + readonly value: string; +} +export interface UserListSettings { + readonly listUuid: string; + readonly usersettings: readonly UserSetting[]; +} +export interface UserSettings { + readonly userSettings: readonly UserSetting[]; + readonly userlistsettings: readonly UserListSettings[]; +} +export interface CatalogItem { + readonly itemId: string; + readonly name: string; +} +export interface CatalogSection { + readonly sectionId: string; + readonly name: string; + readonly items: readonly CatalogItem[]; +} +export interface Catalog { + readonly language: string; + readonly catalog: { + readonly sections: readonly CatalogSection[]; + }; +} +export interface PendingInvitations { + readonly invitations: readonly unknown[]; +} +export interface ListInput { + readonly listId: string; +} +export interface ItemInput extends ListInput { + readonly name: string; +} +export interface SaveItemInput extends ItemInput { + readonly specification?: string; +} +export interface ItemImageInput { + readonly itemId: string; + readonly imageData: string; +} +export interface ItemImage { + readonly imageUrl: string; +} +export interface ListsApi { + getAll(options?: RequestOptions): Promise; + getItems(input: ListInput, options?: RequestOptions): Promise; + getItemDetails(input: ListInput, options?: RequestOptions): Promise; + saveItem(input: SaveItemInput, options?: RequestOptions): Promise; + removeItem(input: ItemInput, options?: RequestOptions): Promise; + moveItemToRecent(input: ItemInput, options?: RequestOptions): Promise; + getUsers(input: ListInput, options?: RequestOptions): Promise; +} +export interface ItemImagesApi { + save(input: ItemImageInput, options?: RequestOptions): Promise; + remove(input: Pick, options?: RequestOptions): Promise; +} +export interface UserApi { + getSettings(options?: RequestOptions): Promise; +} +export interface InvitationsApi { + getPending(options?: RequestOptions): Promise; +} +export interface BringClient { + readonly lists: ListsApi; + readonly itemImages: ItemImagesApi; + readonly user: UserApi; + readonly invitations: InvitationsApi; + getSession(): Readonly; +} +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/build/types.d.ts.map b/build/types.d.ts.map new file mode 100644 index 0000000..3d17aec --- /dev/null +++ b/build/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG,OAAO,UAAU,CAAC,KAAK,CAAC;AAE5C,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACtD,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC3B,QAAQ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K,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAC1E,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1F;AAED,MAAM,WAAW,OAAO;IACpB,WAAW,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CAChE;AAED,MAAM,WAAW,cAAc;IAC3B,UAAU,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACrE;AAED,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,cAAc,CAAC;IACrC,UAAU,IAAI,QAAQ,CAAC,YAAY,CAAC,CAAC;CACxC"} \ No newline at end of file diff --git a/build/types.js b/build/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/build/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/build/types.js.map b/build/types.js.map new file mode 100644 index 0000000..c768b79 --- /dev/null +++ b/build/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index d5dbbfd..c02d8d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,2472 +1,1322 @@ { - "name": "bring-shopping", - "version": "2.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "bring-shopping", - "version": "2.0.0", - "license": "MIT", - "devDependencies": { - "@types/node": "^18.11.8", - "@typescript-eslint/eslint-plugin": "^5.41.0", - "@typescript-eslint/parser": "^5.41.0", - "chai": "^4.3.6", - "eslint": "^8.26.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-prettier": "^4.2.1", - "mocha": "^10.1.0", - "prettier": "^2.7.1", - "typescript": "^5.7.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", - "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "18.19.66", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.66.tgz", - "integrity": "sha512-14HmtUdGxFUalGRfLLn9Gc1oNWvWh5zNbsyOLo5JV6WARSeN1QcEBKRnZm9QqNfrutgsl/hY4eJW63aZ44aBCg==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/semver": { - "version": "7.5.8", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", - "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", - "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/type-utils": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", - "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", - "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true, - "license": "ISC" - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/chai": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", - "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.3", - "deep-eql": "^4.1.3", - "get-func-name": "^2.0.2", - "loupe": "^2.3.6", - "pathval": "^1.1.1", - "type-detect": "^4.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/check-error": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-func-name": "^2.0.2" - }, - "engines": { - "node": "*" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-eql": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", - "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-detect": "^4.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-prettier": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", - "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", - "dev": true, - "license": "MIT", - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prettier-linter-helpers": "^1.0.0" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "eslint": ">=7.28.0", - "prettier": ">=2.0.0" - }, - "peerDependenciesMeta": { - "eslint-config-prettier": { - "optional": true - } - } - }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-diff": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "license": "MIT", - "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" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", - "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", - "dev": true, - "license": "ISC" - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "license": "MIT", - "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" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "license": "MIT" - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/loupe": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", - "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-func-name": "^2.0.1" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/mocha": { - "version": "10.8.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", - "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "^4.1.3", - "browser-stdout": "^1.3.1", - "chokidar": "^3.5.3", - "debug": "^4.3.5", - "diff": "^5.2.0", - "escape-string-regexp": "^4.0.0", - "find-up": "^5.0.0", - "glob": "^8.1.0", - "he": "^1.2.0", - "js-yaml": "^4.1.0", - "log-symbols": "^4.1.0", - "minimatch": "^5.1.6", - "ms": "^2.1.3", - "serialize-javascript": "^6.0.2", - "strip-json-comments": "^3.1.1", - "supports-color": "^8.1.1", - "workerpool": "^6.5.1", - "yargs": "^16.2.0", - "yargs-parser": "^20.2.9", - "yargs-unparser": "^2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/mocha/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true, - "license": "MIT" - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-diff": "^1.1.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" + "name": "bring-shopping", + "version": "3.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "bring-shopping", + "version": "3.0.0", + "license": "MIT", + "devDependencies": { + "@types/node": "^22.20.1", + "oxfmt": "^0.65.0", + "oxlint": "^1.80.0", + "oxlint-tsgolint": "^7.0.2001", + "typescript": "^7.0.2" + }, + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/@oxfmt/binding-android-arm-eabi": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-android-arm-eabi/-/binding-android-arm-eabi-0.65.0.tgz", + "integrity": "sha512-M10Gs1SSpTNI6ahGx3M/OlIdUF4hkaP6OgUb+MS79t/Pgflk3r1nW5gPFqsZGUAXg0H1AfANT9AvLdBSTIhZKg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-android-arm64": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-android-arm64/-/binding-android-arm64-0.65.0.tgz", + "integrity": "sha512-6DXH5sftNlaHpWJG50hFMF+Qxtq5D2TmahvcDPxWNcGIf8qrC9Y0YgHYcYZ2hlWzaccKXh/f3GcssH8vtkl4JA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-darwin-arm64": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-darwin-arm64/-/binding-darwin-arm64-0.65.0.tgz", + "integrity": "sha512-K9m7lr53pcOLETNsC88sWes/GWHUGjZyHx95UhYcSXy0r30haLdeXlSufSenEAtoLaW753WN8/l4M7GYcRt6cg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-darwin-x64": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-darwin-x64/-/binding-darwin-x64-0.65.0.tgz", + "integrity": "sha512-sTNwIx1gre3MyiHOPLu7IGW4UyMScYL4DTmJT01p4vzB0En+OJUQz6KuH8t0PpsClRSaMuY3b0QmtoPItfO8Lg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-freebsd-x64": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-freebsd-x64/-/binding-freebsd-x64-0.65.0.tgz", + "integrity": "sha512-lYZMVIiIpnjGu5hJb2jxA8NYQ/e0OTGuaiAf4dqlGPNnPmUTu23FZRMltmjro/KkQm1uE4NT4n5yJ2zWmKcpfA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-arm-gnueabihf": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.65.0.tgz", + "integrity": "sha512-gIdXFAt/bURnjxuoedDEWdZ0PEWEmdDcm8qdpoFYYvW3QMk/5D4vUaH4mlMeRpeTdST4izUgHVO6RawQ4QulJw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-arm-musleabihf": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.65.0.tgz", + "integrity": "sha512-jJVyADto7gA2AaX5qAjAexrxx9PJQaKWOe8PICE7yKMbjBRyOHcmj9TtVJ+MZYDUQ3hodU0AcoTj0jFQ1W4C6Q==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-arm64-gnu": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.65.0.tgz", + "integrity": "sha512-p3RFkB+u7u+8up99b/NEcI1hdpLDiGgJYNwDorB60n7eH+eKposAKuMBxx+NqB3b+sJP4CZmYDh9G7X62tUsKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-arm64-musl": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.65.0.tgz", + "integrity": "sha512-5Prb0uFzJHr+OUD/qS/TmU526wD+PaHDsm3KoRiUXbMIDpTSErjeQYkK3OQeshAvD/PuLa9WGEi9WPajjdOZJg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-ppc64-gnu": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.65.0.tgz", + "integrity": "sha512-S8svxTp81obnF3admN9yd+u2rOYXtyzThLGBTg1PY6TPtGcC09BaaXLQD+TBSMa7yvqhCDZ8DFri+S/yG60qCg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-riscv64-gnu": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.65.0.tgz", + "integrity": "sha512-WtXBr75G/h2qOHy8SiGtC1R6aS3jt4mE52v1D8AtwMXIgoOmSNP9lKvbSaTRoL0e5wsMPoi6T72QWDYPu+S+nA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-riscv64-musl": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.65.0.tgz", + "integrity": "sha512-YwSLVvpaz4o/nv/miiPEBJz+eJ+VmbgNIrao6RccK9ce+L5EA8wP+ZD0uFeq6wKOza6zoWv/dR0sj6lip6R3EA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-s390x-gnu": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.65.0.tgz", + "integrity": "sha512-XQTPqgvyrgkKcFq+Tp2eK6JS7sqqJ+nRmy2Fav4j3I+i4dJoPJm7YwEdoeSDX9xkqj9jZ/lWfF3bXUWztIrn6A==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-x64-gnu": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.65.0.tgz", + "integrity": "sha512-cjZlx6S/VkeCNWCbwZriTnLnZeTcV3DEyeRGSw/2wwLP9viq+C0bJ4bC1k/ZLkFxDcB1lUgSasPkYGP1bdraOg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-linux-x64-musl": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-linux-x64-musl/-/binding-linux-x64-musl-0.65.0.tgz", + "integrity": "sha512-2azCjxdLtK4zCcIOU1dlXlU0xxfbPi6EjwWx7Ac7teWPidIIDOcIhudup83xNCKYhtqeVd/gaVDOxbUq4syXWA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-openharmony-arm64": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-openharmony-arm64/-/binding-openharmony-arm64-0.65.0.tgz", + "integrity": "sha512-KXQ7xi1e/voP0IQaw6fG6XY4Z5+Llf1XmRSZS1t7pVFCecFJ0iXaboKmVwjFtp5MLlT5iWQrJ2U1C3GJdZ2u+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-win32-arm64-msvc": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.65.0.tgz", + "integrity": "sha512-2FbbjG5jEqLSLKVJwBap84uJfpn5Y5A53KEO0aUNr+zeiRB9nyPUIFMcSbZVMFLitfBytFWRNngozXYjb6Rsbw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-win32-ia32-msvc": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.65.0.tgz", + "integrity": "sha512-LJ+ZacAPSjegDOnSLyA1TMWAhdDrsK4el3REdr1oL2UtVBCMhO2II/Sb3cEW6mF2MfLhl8hDNCSvc7KSbgk3LQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxfmt/binding-win32-x64-msvc": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@oxfmt/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.65.0.tgz", + "integrity": "sha512-higu9cWEO6XXFzATD1jf0mCK34rNfN2H9JrJie7QB1IhleVpTh0QlLH9Ip2C1H/Nd5n0v5pvRtC+5R0uE4HpVg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint-tsgolint/darwin-arm64": { + "version": "7.0.2001", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/darwin-arm64/-/darwin-arm64-7.0.2001.tgz", + "integrity": "sha512-CUJEdbSZ54+Xy9OXqOhWLTKZKV0BBiV7C2i/ygyVmXtkUNXx5YCzN8DpSSshTAKktoL7S+tnQ/ftFG/i7X896w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oxlint-tsgolint/darwin-x64": { + "version": "7.0.2001", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/darwin-x64/-/darwin-x64-7.0.2001.tgz", + "integrity": "sha512-pXfBb5BqONCcgrXQNUZWXgiYmRSWJzd97S8i41VVOh6ut0tyo+cJ5FKFpczDHxiVNfj/3e7c9B4MtztNdpIVCw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oxlint-tsgolint/linux-arm64": { + "version": "7.0.2001", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/linux-arm64/-/linux-arm64-7.0.2001.tgz", + "integrity": "sha512-roP7zujb/QDPzDwEKsFFpzNHHy91/Y7oX9vQXk78ekyZtcQj1QXDIMH33gjDdHBfRl4K9pZ36xhRgrP4Zr+R8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxlint-tsgolint/linux-x64": { + "version": "7.0.2001", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/linux-x64/-/linux-x64-7.0.2001.tgz", + "integrity": "sha512-UDezNqdECVmngu2TPnjaS1YoAmcTaBoI5lV9vk3VahBxoi+I5r9k3iJTT7qZoYWOXTD/7T7bNcwRgrocR6BscQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxlint-tsgolint/win32-arm64": { + "version": "7.0.2001", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/win32-arm64/-/win32-arm64-7.0.2001.tgz", + "integrity": "sha512-uJZhqB6pdXLuN+AD1F5082byyQti/NPmJA77GtcFlmT2HzRelqbNls3SaIqxpjdFgvSBF9g0yOKGBkGFg7kX8Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oxlint-tsgolint/win32-x64": { + "version": "7.0.2001", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/win32-x64/-/win32-x64-7.0.2001.tgz", + "integrity": "sha512-FkDRm8hx9OwzGQqyWG1tO5QrTLRApff9DzSgpz9QZau37BR8d1VYKOxMLGf6shPZntJFoTwIIJYT68VndYDCog==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oxlint/binding-android-arm-eabi": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.80.0.tgz", + "integrity": "sha512-RM3Plj+biQpxa5d1GOOX6ciDlcUROmm4OZ/pLTpitkQt2mJv4jhtY4cbgaetOm5UKWZe05/TGQ6o1Vl8EOHkrA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-android-arm64": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.80.0.tgz", + "integrity": "sha512-YlO5JEf0Yr2bUUlu8O8daVcUxtcGGbcSmyV7E7nSbJbfAdxTE0PFPwgnIlw7wXJaTYjb+qs5hI5q3jxUkI7cAw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-arm64": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.80.0.tgz", + "integrity": "sha512-BULDOyO3AhsmdWfQeIUCykDt3dd7XZBGLhp1eIh56skRv01O+cNjNPwXMIbeW1x4+pxcln5if72wcRgViVo7PA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-x64": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.80.0.tgz", + "integrity": "sha512-YJ4JzLw7N5TDSQFlA0hAQGHvnDZgyypm1yunObVWcWiF9KM7eGCJKYKLgTC2Fi/57OdnBhbj4OkzPGdFQJ6HyA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-freebsd-x64": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.80.0.tgz", + "integrity": "sha512-AYUIk5QnL0s8oWAYsREZwkRYy1SupJTXALo93J1TgzHywxQtdM99FecRMQ87MXEdPQ0j1TmEpeeq3fGNkpvMqg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-gnueabihf": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.80.0.tgz", + "integrity": "sha512-9hBZVANupQ89W9dXyE0n8doCyaW5pDyGn3y6XlIMPZ+rIKuyqkr3SNUXmVJIhuvUq0NBU3RBiSXXE69l4XI6KA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-musleabihf": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.80.0.tgz", + "integrity": "sha512-SvS2uKqzY+pbfuvAHzH4338R6Zwo805GAwrIMVvK1KxoOWCIjZUdfzTCvilD7z6JK91v011+zYMryabhDo2AsQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-gnu": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.80.0.tgz", + "integrity": "sha512-tCLadyqRVL3pQTRPNg7cjXKvcvS4fbyXeQHhKk5BTJ1oftQln5/yIIWbu/Xom/DX41zv2P9QGt6+D/TtQVtY3A==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-musl": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.80.0.tgz", + "integrity": "sha512-XfpCNRlOPcLlJl4Bn/FUhjqlR6BVavEykERBf/MV7YA9VZDa5g5znVqYhyviMafcxS9Pe/i/kPvHNO0U6svEHQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-ppc64-gnu": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.80.0.tgz", + "integrity": "sha512-3I4yMwcFG9NeO8ioY6JBBuKsIm5GL/x7MATt1S4tVWaxPu5HcJ+XnLUbcVBTxG8q2Wu56HSj+NmXQiVYb1lp6A==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-gnu": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.80.0.tgz", + "integrity": "sha512-E1wAKymkpe1/E8helzBKdm81OBOF+ezxRyXRMEuik3ZpWDER5CPOKZwF66RsdwW98uwZv8UTFremUQtC1CzdJA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-musl": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.80.0.tgz", + "integrity": "sha512-+gLRGD4sIo3+VA++iham5UxD9tKSoJ/VOrROCEXIcknrYtQg6iIQgvjN0cpiRF7N6UYC7pJbvHJlDnMge5LRpQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-s390x-gnu": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.80.0.tgz", + "integrity": "sha512-aR0PrzHj9leW3NmzBAAP4EzdoBNoJcs9sjnIQPIwyRnBGYrRbXUIpEB5Q39AqK3PLY5JK5uEhDQDiUa1QSAstw==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-gnu": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.80.0.tgz", + "integrity": "sha512-vSVh5cSo3Xxs6ghBCcFJlpbkbENzDog1qXtoXLa/HC3aCrR4XO76GZbXmQoCPHnu99nQpdCeC3H9tdNICfDh7A==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-musl": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.80.0.tgz", + "integrity": "sha512-FfzBXpNQ8u7/ZI/p8bl73MeZ508Ax3hxWp3SiJpEFiC+BB9XcXy5FAZHTLKDPSzrUpxQZSZJAVdDmuJp/+HDBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-openharmony-arm64": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.80.0.tgz", + "integrity": "sha512-zMzbkumtmprCgRwoYNzcB3iC39fXdJIMLMU33KdCjEGLlJGOEt1+LwQ4LF8ndLzAEKVz4BR0y3V6Xrkk3Nm3yA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-arm64-msvc": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.80.0.tgz", + "integrity": "sha512-ib6iRcrXsk4t1fm3iKcwksyWh1ZkZXC/2mEzakl0ai2+6HZunf1WWMZ/xP9EJAvw9g9K4UVTC3NF/+G2qLrbTQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-ia32-msvc": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.80.0.tgz", + "integrity": "sha512-xhRWBMpLxZvgKAH6+DJZmpP+W8Y8UdQOSU1JfxSWNXsaBaRGW77j+1hCuNHlzj7OH4SPN8fYd1q0o2qrDtoVyw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-x64-msvc": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.80.0.tgz", + "integrity": "sha512-yAnO7lwBYQnz2pcfBPIGQQZWIX5zd5R/1aAKIF3oE+TVj7IhoHcROjOkz3sRDngzqhfPKfFaXqug5j5rE5dn6Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@types/node": { + "version": "22.20.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.1.tgz", + "integrity": "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@typescript/typescript-aix-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", + "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz", + "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz", + "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz", + "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz", + "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz", + "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz", + "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-loong64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz", + "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-mips64el": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz", + "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz", + "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-riscv64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz", + "integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-s390x": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz", + "integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", + "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz", + "integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz", + "integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz", + "integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz", + "integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-sunos-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz", + "integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz", + "integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz", + "integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/oxfmt": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/oxfmt/-/oxfmt-0.65.0.tgz", + "integrity": "sha512-SgS5VgnP42T0zl3zWD+xoH8FCqg1SAFnSRoOT/qeoa6gxcYIqrDMOmcXIg/EWSN92Du4ogB4riuKhKd6Y4CGhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinypool": "2.1.0" + }, + "bin": { + "oxfmt": "bin/oxfmt" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxfmt/binding-android-arm-eabi": "0.65.0", + "@oxfmt/binding-android-arm64": "0.65.0", + "@oxfmt/binding-darwin-arm64": "0.65.0", + "@oxfmt/binding-darwin-x64": "0.65.0", + "@oxfmt/binding-freebsd-x64": "0.65.0", + "@oxfmt/binding-linux-arm-gnueabihf": "0.65.0", + "@oxfmt/binding-linux-arm-musleabihf": "0.65.0", + "@oxfmt/binding-linux-arm64-gnu": "0.65.0", + "@oxfmt/binding-linux-arm64-musl": "0.65.0", + "@oxfmt/binding-linux-ppc64-gnu": "0.65.0", + "@oxfmt/binding-linux-riscv64-gnu": "0.65.0", + "@oxfmt/binding-linux-riscv64-musl": "0.65.0", + "@oxfmt/binding-linux-s390x-gnu": "0.65.0", + "@oxfmt/binding-linux-x64-gnu": "0.65.0", + "@oxfmt/binding-linux-x64-musl": "0.65.0", + "@oxfmt/binding-openharmony-arm64": "0.65.0", + "@oxfmt/binding-win32-arm64-msvc": "0.65.0", + "@oxfmt/binding-win32-ia32-msvc": "0.65.0", + "@oxfmt/binding-win32-x64-msvc": "0.65.0" + }, + "peerDependencies": { + "svelte": "^5.0.0", + "vite-plus": "*" + }, + "peerDependenciesMeta": { + "svelte": { + "optional": true + }, + "vite-plus": { + "optional": true + } + } + }, + "node_modules/oxlint": { + "version": "1.80.0", + "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.80.0.tgz", + "integrity": "sha512-5nTiSps4qdbCWLbxzuO00alHkEO2exR9YMN/ig6QXWrLsYSG0KaObOAM+l6oU2LcKPWoSAGYbkZIGEu1ViiWKA==", + "dev": true, + "license": "MIT", + "bin": { + "oxlint": "bin/oxlint" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxlint/binding-android-arm-eabi": "1.80.0", + "@oxlint/binding-android-arm64": "1.80.0", + "@oxlint/binding-darwin-arm64": "1.80.0", + "@oxlint/binding-darwin-x64": "1.80.0", + "@oxlint/binding-freebsd-x64": "1.80.0", + "@oxlint/binding-linux-arm-gnueabihf": "1.80.0", + "@oxlint/binding-linux-arm-musleabihf": "1.80.0", + "@oxlint/binding-linux-arm64-gnu": "1.80.0", + "@oxlint/binding-linux-arm64-musl": "1.80.0", + "@oxlint/binding-linux-ppc64-gnu": "1.80.0", + "@oxlint/binding-linux-riscv64-gnu": "1.80.0", + "@oxlint/binding-linux-riscv64-musl": "1.80.0", + "@oxlint/binding-linux-s390x-gnu": "1.80.0", + "@oxlint/binding-linux-x64-gnu": "1.80.0", + "@oxlint/binding-linux-x64-musl": "1.80.0", + "@oxlint/binding-openharmony-arm64": "1.80.0", + "@oxlint/binding-win32-arm64-msvc": "1.80.0", + "@oxlint/binding-win32-ia32-msvc": "1.80.0", + "@oxlint/binding-win32-x64-msvc": "1.80.0" + }, + "peerDependencies": { + "oxlint-tsgolint": ">=7.0.2001", + "vite-plus": "*" + }, + "peerDependenciesMeta": { + "oxlint-tsgolint": { + "optional": true + }, + "vite-plus": { + "optional": true + } + } + }, + "node_modules/oxlint-tsgolint": { + "version": "7.0.2001", + "resolved": "https://registry.npmjs.org/oxlint-tsgolint/-/oxlint-tsgolint-7.0.2001.tgz", + "integrity": "sha512-KjK/XLcXr1DSyonKhsuFqJRiuKqcyG9j3LJ8nkOsrLzGvodBPqzHOKauy10asLMDI0sUpvb+1sxlzff3udZvfg==", + "dev": true, + "license": "MIT", + "bin": { + "tsgolint": "bin/tsgolint.js" + }, + "optionalDependencies": { + "@oxlint-tsgolint/darwin-arm64": "7.0.2001", + "@oxlint-tsgolint/darwin-x64": "7.0.2001", + "@oxlint-tsgolint/linux-arm64": "7.0.2001", + "@oxlint-tsgolint/linux-x64": "7.0.2001", + "@oxlint-tsgolint/win32-arm64": "7.0.2001", + "@oxlint-tsgolint/win32-x64": "7.0.2001" + } + }, + "node_modules/tinypool": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-2.1.0.tgz", + "integrity": "sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.0.0 || >=22.0.0" + } + }, + "node_modules/typescript": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", + "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc" + }, + "engines": { + "node": ">=16.20.0" + }, + "optionalDependencies": { + "@typescript/typescript-aix-ppc64": "7.0.2", + "@typescript/typescript-darwin-arm64": "7.0.2", + "@typescript/typescript-darwin-x64": "7.0.2", + "@typescript/typescript-freebsd-arm64": "7.0.2", + "@typescript/typescript-freebsd-x64": "7.0.2", + "@typescript/typescript-linux-arm": "7.0.2", + "@typescript/typescript-linux-arm64": "7.0.2", + "@typescript/typescript-linux-loong64": "7.0.2", + "@typescript/typescript-linux-mips64el": "7.0.2", + "@typescript/typescript-linux-ppc64": "7.0.2", + "@typescript/typescript-linux-riscv64": "7.0.2", + "@typescript/typescript-linux-s390x": "7.0.2", + "@typescript/typescript-linux-x64": "7.0.2", + "@typescript/typescript-netbsd-arm64": "7.0.2", + "@typescript/typescript-netbsd-x64": "7.0.2", + "@typescript/typescript-openbsd-arm64": "7.0.2", + "@typescript/typescript-openbsd-x64": "7.0.2", + "@typescript/typescript-sunos-x64": "7.0.2", + "@typescript/typescript-win32-arm64": "7.0.2", + "@typescript/typescript-win32-x64": "7.0.2" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" } - ], - "license": "MIT" - }, - "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", - "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typescript": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", - "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true, - "license": "MIT" - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/workerpool": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", - "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } } - } } diff --git a/package.json b/package.json index abb6f32..8d0b2a1 100644 --- a/package.json +++ b/package.json @@ -1,53 +1,64 @@ { - "name": "bring-shopping", - "version": "2.0.1", - "engines": { - "node": ">=18.0.0" - }, - "description": "Nodejs wrapper for the Bring! API", - "author": { - "name": "Moritz Heusinger", - "email": "moritz.heusinger@gmail.com" - }, - "contributors": [ - { - "name": "Moritz Heusinger", - "email": "moritz.heusinger@gmail.com" + "name": "bring-shopping", + "version": "3.0.0", + "description": "Zero-dependency functional TypeScript client for the Bring! API", + "keywords": [ + "bring", + "shopping-list" + ], + "homepage": "https://github.com/foxriver76/bring-api", + "bugs": { + "url": "https://github.com/foxriver76/node-bring-api/issues" + }, + "license": "MIT", + "author": { + "name": "Moritz Heusinger", + "email": "moritz.heusinger@gmail.com" + }, + "contributors": [ + { + "name": "Moritz Heusinger", + "email": "moritz.heusinger@gmail.com" + } + ], + "repository": { + "type": "git", + "url": "git+https://github.com/foxriver76/node-bring-api.git" + }, + "files": [ + "build/", + "LICENSE", + "README.md" + ], + "type": "module", + "sideEffects": false, + "main": "./build/index.js", + "types": "./build/index.d.ts", + "exports": { + ".": { + "types": "./build/index.d.ts", + "import": "./build/index.js" + } + }, + "scripts": { + "build": "npm run clean && tsc -p tsconfig.build.json", + "check": "npm run typecheck && npm run lint && npm run format:check && npm test", + "clean": "node --eval \"import('node:fs').then(({ rmSync }) => rmSync('build', { recursive: true, force: true }))\"", + "format": "oxfmt", + "format:check": "oxfmt --check", + "lint": "oxlint src test", + "prepack": "npm run build", + "test": "npm run build && node --test test/*.test.js", + "typecheck": "tsc -p tsconfig.json" + }, + "devDependencies": { + "@types/node": "^22.20.1", + "oxfmt": "^0.65.0", + "oxlint": "^1.80.0", + "oxlint-tsgolint": "^7.0.2001", + "typescript": "^7.0.2" + }, + "engines": { + "node": ">=22.0.0" } - ], - "homepage": "https://github.com/foxriver76/bring-api", - "license": "MIT", - "keywords": [ - "bring", - "shopping-list" - ], - "devDependencies": { - "@types/node": "^18.11.8", - "@typescript-eslint/eslint-plugin": "^5.41.0", - "@typescript-eslint/parser": "^5.41.0", - "chai": "^4.3.6", - "eslint": "^8.26.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-prettier": "^4.2.1", - "mocha": "^10.1.0", - "prettier": "^2.7.1", - "typescript": "^5.7.2" - }, - "scripts": { - "test": "node node_modules/mocha/bin/mocha", - "build": "tsc -b tsconfig.build.json" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/foxriver76/node-bring-api.git" - }, - "bugs": { - "url": "https://github.com/foxriver76/node-bring-api/issues" - }, - "files": [ - "build/", - "LICENSE" - ], - "main": "build/bring.js", - "types": "build/bring.d.ts" } diff --git a/src/auth.ts b/src/auth.ts new file mode 100644 index 0000000..ef06cd9 --- /dev/null +++ b/src/auth.ts @@ -0,0 +1,60 @@ +import { createBringApiError } from './errors.js'; +import { createRequester } from './http.js'; +import type { BringSession, ConnectOptions, Credentials } from './types.js'; + +const DEFAULT_API_URL = 'https://api.getbring.com/rest/v2/'; + +interface AuthResponse { + readonly name: string; + readonly uuid: string; + readonly access_token: string; + readonly refresh_token?: string; +} + +function isAuthResponse(value: unknown): value is AuthResponse { + if (typeof value !== 'object' || value === null) { + return false; + } + + const response = value as Partial; + return ( + typeof response.name === 'string' && + typeof response.uuid === 'string' && + typeof response.access_token === 'string' && + (response.refresh_token === undefined || typeof response.refresh_token === 'string') + ); +} + +export async function authenticate( + credentials: Credentials, + options: Pick = {} +): Promise { + const request = createRequester({ + baseUrl: options.baseUrl ?? DEFAULT_API_URL, + fetch: options.fetch + }); + const response = await request('bringauth', { + method: 'POST', + signal: options.signal, + body: new URLSearchParams({ + email: credentials.email, + password: credentials.password + }) + }); + + if (!isAuthResponse(response)) { + throw createBringApiError('Bring API returned an invalid authentication response', { + code: 'INVALID_RESPONSE', + body: response + }); + } + + return { + userId: response.uuid, + userName: response.name, + accessToken: response.access_token, + refreshToken: response.refresh_token + }; +} + +export { DEFAULT_API_URL }; diff --git a/src/bring.ts b/src/bring.ts deleted file mode 100644 index 467f7bc..0000000 --- a/src/bring.ts +++ /dev/null @@ -1,441 +0,0 @@ -interface BringOptions { - mail: string; - password: string; - url?: string; - uuid?: string; -} - -interface GetItemsResponseEntry { - specification: string; - name: string; -} - -interface GetItemsResponse { - uuid: string; - status: string; - purchase: GetItemsResponseEntry[]; - recently: GetItemsResponseEntry[]; -} - -interface AuthSuccessResponse { - name: string; - uuid: string; - access_token: string; - refresh_token: string; -} - -interface ErrorResponse { - message: string; - error: string; - error_description: string; - errorcode: number; -} - -type AuthResponse = AuthSuccessResponse | ErrorResponse; - -interface GetAllUsersFromListEntry { - publicUuid: string; - name: string; - email: string; - photoPath: string; - pushEnabled: boolean; - plusTryOut: boolean; - country: string; - language: string; -} -interface GetAllUsersFromListResponse { - users: GetAllUsersFromListEntry[]; -} - -interface LoadListsEntry { - listUuid: string; - name: string; - theme: string; -} - -interface LoadListsResponse { - lists: LoadListsEntry[]; -} - -interface GetItemsDetailsEntry { - uuid: string; - itemId: string; - listUuid: string; - userIconItemId: string; - userSectionId: string; - assignedTo: string; - imageUrl: string; -} - -interface UserSettingsEntry { - key: string; - value: string; -} - -interface UserListSettingsEntry { - listUuid: string; - usersettings: UserSettingsEntry[]; -} - -interface GetUserSettingsResponse { - userSettings: UserSettingsEntry[]; - userlistsettings: UserListSettingsEntry[]; -} - -interface CatalogItemsEntry { - itemId: string; - name: string; -} - -interface CatalogSectionsEntry { - sectionId: string; - name: string; - items: CatalogItemsEntry[]; -} - -interface LoadCatalogResponse { - language: string; - catalog: { - sections: CatalogSectionsEntry[]; - }; -} - -interface GetPendingInvitationsResponse { - invitations: any[]; -} - -interface Image { - /** the image itself */ - imageData: string; -} - -class Bring { - private readonly mail: string; - private readonly password: string; - private readonly url: string; - private uuid: string; - private readonly headers: { - 'X-BRING-CLIENT-SOURCE': string; - 'X-BRING-COUNTRY': string; - 'X-BRING-CLIENT': string; - 'X-BRING-API-KEY': string; - Authorization?: string; - 'X-BRING-USER-UUID'?: string; - }; - public name?: string; - private bearerToken?: string; - private refreshToken?: string; - private putHeaders?: { - Authorization?: string; - 'X-BRING-USER-UUID'?: string; - 'X-BRING-CLIENT-SOURCE': string; - 'X-BRING-COUNTRY': string; - 'X-BRING-CLIENT': string; - 'X-BRING-API-KEY': string; - 'Content-Type': string; - }; - - constructor(options: BringOptions) { - this.mail = options.mail; - this.password = options.password; - this.url = options.url || `https://api.getbring.com/rest/v2/`; - this.uuid = options.uuid || ``; - this.headers = { - 'X-BRING-API-KEY': `cof4Nc6D8saplXjE3h3HXqHH8m7VU2i1Gs0g85Sp`, - 'X-BRING-CLIENT': `webApp`, - 'X-BRING-CLIENT-SOURCE': `webApp`, - 'X-BRING-COUNTRY': `DE` - }; - } - - /** - * Try to log into given account - */ - async login(): Promise { - let data: AuthResponse; - - try { - const resp = await fetch(`${this.url}bringauth`, { - method: 'POST', - body: new URLSearchParams({ email: this.mail, password: this.password }) - }); - - data = await resp.json(); - } catch (e: any) { - throw new Error(`Cannot Login: ${e.message}`); - } - - if ('error' in data) { - throw new Error(`Cannot Login: ${data.message}`); - } - - this.name = data.name; - this.uuid = data.uuid; - this.bearerToken = data.access_token; - this.refreshToken = data.refresh_token; - - this.headers[`X-BRING-USER-UUID`] = this.uuid; - this.headers[`Authorization`] = `Bearer ${this.bearerToken}`; - this.putHeaders = { - ...this.headers, - ...{ 'Content-Type': `application/x-www-form-urlencoded; charset=UTF-8` } - }; - } - - /** - * Loads all shopping lists - */ - async loadLists(): Promise { - try { - const resp = await fetch(`${this.url}bringusers/${this.uuid}/lists`, { headers: this.headers }); - const lists: LoadListsResponse | ErrorResponse = await resp.json(); - - if ('error' in lists) { - throw new Error(lists.message); - } - - return lists; - } catch (e: any) { - throw new Error(`Cannot get lists: ${e.message}`); - } - } - - /** - * Get all items from the current selected shopping list - */ - async getItems(listUuid: string): Promise { - try { - const resp = await fetch(`${this.url}bringlists/${listUuid}`, { headers: this.headers }); - const items: GetItemsResponse | ErrorResponse = await resp.json(); - - if ('error' in items) { - throw new Error(items.message); - } - - return items; - } catch (e: any) { - throw new Error(`Cannot get items for list ${listUuid}: ${e.message}`); - } - } - - /** - * Get detailed information about all items from the current selected shopping list - */ - async getItemsDetails(listUuid: string): Promise { - try { - const resp = await fetch(`${this.url}bringlists/${listUuid}/details`, { headers: this.headers }); - const items: GetItemsDetailsEntry[] | ErrorResponse = await resp.json(); - - if ('error' in items) { - throw new Error(items.message); - } - - return items; - } catch (e: any) { - throw new Error(`Cannot get detailed items for list ${listUuid}: ${e.message}`); - } - } - - /** - * Save an item to your current shopping list - * - * @param itemName The name of the item you want to send to the bring server - * @param specification The little description under the name of the item - * @param listUuid The listUUID you want to receive a list of users from. - * returns an empty string and answerHttpStatus should contain 204. If not -> error - */ - async saveItem(listUuid: string, itemName: string, specification: string): Promise { - try { - const resp = await fetch(`${this.url}bringlists/${listUuid}`, { - method: 'PUT', - headers: this.putHeaders, - body: `&purchase=${itemName}&recently=&specification=${specification}&remove=&sender=null` - }); - return resp.text(); - } catch (e: any) { - throw new Error(`Cannot save item ${itemName} (${specification}) to ${listUuid}: ${e.message}`); - } - } - - /** - * Save an image to an item - * - * @param itemUuid The itemUUID which will be updated - * @param image The image you want to link to the item - * @return returns an imageUrl and answerHttpStatus should contain 204. If not -> error - */ - async saveItemImage(itemUuid: string, image: Image): Promise<{ imageUrl: string }> { - try { - const resp = await fetch(`${this.url}bringlistitemdetails/${itemUuid}/image`, { - method: 'PUT', - headers: this.putHeaders, - body: new URLSearchParams({ ...image }) - }); - const imageObj: { imageUrl: string } | ErrorResponse = await resp.json(); - - if ('error' in imageObj) { - throw new Error(imageObj.message); - } - - return imageObj; - } catch (e: any) { - throw new Error(`Cannot save item image ${itemUuid}: ${e.message}`); - } - } - - /** - * remove an item from your current shopping list - * - * @param listUuid The listUUID you want to remove a item from - * @param itemName Name of the item you want to delete from you shopping list - * @return should return an empty string and $answerHttpStatus should contain 204. If not -> error - */ - async removeItem(listUuid: string, itemName: string): Promise { - try { - const resp = await fetch(`${this.url}bringlists/${listUuid}`, { - method: 'PUT', - headers: this.putHeaders, - body: `&purchase=&recently=&specification=&remove=${itemName}&sender=null` - }); - return resp.text(); - } catch (e: any) { - throw new Error(`Cannot remove item ${itemName} from ${listUuid}: ${e.message}`); - } - } - - /** - * Remove the image from your item - * - * @param itemUuid The itemUUID you want to remove the image from - * @return returns an empty string and answerHttpStatus should contain 204. If not -> error - */ - async removeItemImage(itemUuid: string): Promise { - try { - const resp = await fetch(`${this.url}bringlistitemdetails/${itemUuid}/image`, { - method: 'DELETE', - headers: this.headers - }); - return resp.text(); - } catch (e: any) { - throw new Error(`Cannot remove item image ${itemUuid}: ${e.message}`); - } - } - - /** - * Move an item to recent items list - * - * @param itemName Name of the item you want to delete from you shopping list - * @param listUuid The lisUUID you want to receive a list of users from. - * @return Should return an empty string and $answerHttpStatus should contain 204. If not -> error - */ - async moveToRecentList(listUuid: string, itemName: string): Promise { - try { - const resp = await fetch(`${this.url}bringlists/${listUuid}`, { - method: 'PUT', - headers: this.putHeaders, - body: `&purchase=&recently=${itemName}&specification=&remove=&&sender=null` - }); - return resp.text(); - } catch (e: any) { - throw new Error(`Cannot remove item ${itemName} from ${listUuid}: ${e.message}`); - } - } - - /** - * Get all users from a shopping list - * - * @param listUuid The listUUID you want to receive a list of users from - */ - async getAllUsersFromList(listUuid: string): Promise { - try { - const resp = await fetch(`${this.url}bringlists/${listUuid}/users`, { headers: this.headers }); - const users: GetAllUsersFromListResponse | ErrorResponse = await resp.json(); - - if ('error' in users) { - throw new Error(users.message); - } - - return users; - } catch (e: any) { - throw new Error(`Cannot get users from list: ${e.message}`); - } - } - - /** - * Get the user settings - */ - async getUserSettings(): Promise { - try { - const resp = await fetch(`${this.url}bringusersettings/${this.uuid}`, { headers: this.headers }); - const settings: GetUserSettingsResponse | ErrorResponse = await resp.json(); - - if ('error' in settings) { - throw new Error(settings.message); - } - - return settings; - } catch (e: any) { - throw new Error(`Cannot get user settings: ${e.message}`); - } - } - - /** - * Load translation file e. g. via 'de-DE' - * @param locale from which country translations will be loaded - */ - async loadTranslations(locale: string): Promise> { - try { - const resp = await fetch(`https://web.getbring.com/locale/articles.${locale}.json`); - const translations: Record | ErrorResponse = await resp.json(); - - if ('error' in translations) { - throw new Error(translations.message); - } - - return translations; - } catch (e: any) { - throw new Error(`Cannot get translations: ${e.message}`); - } - } - - /** - * Load translation file e.g. via 'de-DE' - * @param locale from which country translations will be loaded - */ - async loadCatalog(locale: string): Promise { - try { - const resp = await fetch(`https://web.getbring.com/locale/catalog.${locale}.json`); - const catalog: LoadCatalogResponse | ErrorResponse = await resp.json(); - - if ('error' in catalog) { - throw new Error(catalog.message); - } - - return catalog; - } catch (e: any) { - throw new Error(`Cannot get catalog: ${e.message}`); - } - } - - /** - * Get pending invitations - */ - async getPendingInvitations(): Promise { - try { - const resp = await fetch(`${this.url}bringusers/${this.uuid}/invitations?status=pending`, { - headers: this.headers - }); - const invites: GetPendingInvitationsResponse | ErrorResponse = await resp.json(); - - if ('error' in invites) { - throw new Error(invites.message); - } - - return invites; - } catch (e: any) { - throw new Error(`Cannot get pending invitations: ${e.message}`); - } - } -} - -export = Bring; diff --git a/src/client.ts b/src/client.ts new file mode 100644 index 0000000..a3a55fc --- /dev/null +++ b/src/client.ts @@ -0,0 +1,136 @@ +import { authenticate, DEFAULT_API_URL } from './auth.js'; +import { createRequester } from './http.js'; +import type { + BringClient, + ConnectOptions, + CreateClientOptions, + Credentials, + InvitationsApi, + ItemDetails, + ItemImage, + ItemImagesApi, + ListsApi, + ListUsers, + PendingInvitations, + ShoppingListItems, + ShoppingLists, + UserApi, + UserSettings +} from './types.js'; + +const DEFAULT_API_KEY = 'cof4Nc6D8saplXjE3h3HXqHH8m7VU2i1Gs0g85Sp'; + +function formData(values: Record): URLSearchParams { + return new URLSearchParams(values); +} + +export function createBringClient(options: CreateClientOptions): BringClient { + const session = Object.freeze({ ...options.session }); + const request = createRequester({ + baseUrl: options.baseUrl ?? DEFAULT_API_URL, + fetch: options.fetch, + headers: { + authorization: `Bearer ${session.accessToken}`, + 'x-bring-user-uuid': session.userId, + 'x-bring-api-key': options.apiKey ?? DEFAULT_API_KEY, + 'x-bring-client': options.client ?? 'webApp', + 'x-bring-client-source': options.clientSource ?? 'webApp', + 'x-bring-country': options.country ?? 'DE' + } + }); + + const client: BringClient = { + lists: Object.freeze({ + getAll: options => + request(`bringusers/${encodeURIComponent(session.userId)}/lists`, { + signal: options?.signal + }), + getItems: (input, options) => + request(`bringlists/${encodeURIComponent(input.listId)}`, { + signal: options?.signal + }), + getItemDetails: (input, options) => + request(`bringlists/${encodeURIComponent(input.listId)}/details`, { + signal: options?.signal + }), + saveItem: async (input, options) => { + await request(`bringlists/${encodeURIComponent(input.listId)}`, { + method: 'PUT', + signal: options?.signal, + body: formData({ + purchase: input.name, + recently: '', + specification: input.specification ?? '', + remove: '', + sender: 'null' + }) + }); + }, + removeItem: async (input, options) => { + await request(`bringlists/${encodeURIComponent(input.listId)}`, { + method: 'PUT', + signal: options?.signal, + body: formData({ + purchase: '', + recently: '', + specification: '', + remove: input.name, + sender: 'null' + }) + }); + }, + moveItemToRecent: async (input, options) => { + await request(`bringlists/${encodeURIComponent(input.listId)}`, { + method: 'PUT', + signal: options?.signal, + body: formData({ + purchase: '', + recently: input.name, + specification: '', + remove: '', + sender: 'null' + }) + }); + }, + getUsers: (input, options) => + request(`bringlists/${encodeURIComponent(input.listId)}/users`, { + signal: options?.signal + }) + }), + itemImages: Object.freeze({ + save: (input, options) => + request(`bringlistitemdetails/${encodeURIComponent(input.itemId)}/image`, { + method: 'PUT', + signal: options?.signal, + body: formData({ imageData: input.imageData }) + }), + remove: async (input, options) => { + await request(`bringlistitemdetails/${encodeURIComponent(input.itemId)}/image`, { + method: 'DELETE', + signal: options?.signal + }); + } + }), + user: Object.freeze({ + getSettings: options => + request(`bringusersettings/${encodeURIComponent(session.userId)}`, { + signal: options?.signal + }) + }), + invitations: Object.freeze({ + getPending: options => + request( + `bringusers/${encodeURIComponent(session.userId)}/invitations?status=pending`, + { signal: options?.signal } + ) + }), + getSession: () => session + }; + + return Object.freeze(client); +} + +export async function connectBring(credentials: Credentials, options: ConnectOptions = {}): Promise { + const session = await authenticate(credentials, options); + return createBringClient({ ...options, session }); +} diff --git a/src/errors.ts b/src/errors.ts new file mode 100644 index 0000000..5d8e054 --- /dev/null +++ b/src/errors.ts @@ -0,0 +1,33 @@ +export interface BringApiError extends Error { + readonly name: 'BringApiError'; + readonly status?: number; + readonly code?: string; + readonly apiCode?: number; + readonly body?: unknown; +} + +interface ErrorOptions { + readonly status?: number; + readonly code?: string; + readonly apiCode?: number; + readonly body?: unknown; + readonly cause?: unknown; +} + +export function createBringApiError(message: string, options: ErrorOptions = {}): BringApiError { + const error = new Error(message, { cause: options.cause }) as BringApiError; + + Object.defineProperties(error, { + name: { value: 'BringApiError', enumerable: true }, + status: { value: options.status, enumerable: true }, + code: { value: options.code, enumerable: true }, + apiCode: { value: options.apiCode, enumerable: true }, + body: { value: options.body, enumerable: false } + }); + + return error; +} + +export function isBringApiError(error: unknown): error is BringApiError { + return error instanceof Error && error.name === 'BringApiError'; +} diff --git a/src/http.ts b/src/http.ts new file mode 100644 index 0000000..dddbab3 --- /dev/null +++ b/src/http.ts @@ -0,0 +1,103 @@ +import { createBringApiError, isBringApiError } from './errors.js'; +import type { Fetch } from './types.js'; + +export interface RequesterOptions { + readonly baseUrl: string; + readonly fetch?: Fetch; + readonly headers?: HeadersInit; +} + +export type Requester = (path: string, init?: RequestInit) => Promise; + +interface ApiErrorBody { + readonly message?: unknown; + readonly error?: unknown; + readonly error_description?: unknown; + readonly errorcode?: unknown; +} + +function normalizeBaseUrl(baseUrl: string): string { + return baseUrl.endsWith('/') ? baseUrl : `${baseUrl}/`; +} + +function isRecord(value: unknown): value is Record { + return typeof value === 'object' && value !== null; +} + +function isApiErrorBody(value: unknown): value is ApiErrorBody { + return isRecord(value) && typeof value.error === 'string'; +} + +async function readBody(response: Response): Promise { + if (response.status === 204 || response.status === 205) { + return undefined; + } + + const text = await response.text(); + if (text.length === 0) { + return undefined; + } + + const contentType = response.headers.get('content-type') ?? ''; + if (contentType.includes('json')) { + try { + return JSON.parse(text) as unknown; + } catch (cause) { + throw createBringApiError('Bring API returned invalid JSON', { + status: response.status, + code: 'INVALID_RESPONSE', + body: text, + cause + }); + } + } + + return text; +} + +function errorFromResponse(response: Response, body: unknown) { + const apiError = isApiErrorBody(body) ? body : undefined; + const message = + (typeof apiError?.message === 'string' && apiError.message) || + (typeof apiError?.error_description === 'string' && apiError.error_description) || + `Bring API request failed with status ${response.status}`; + + return createBringApiError(message, { + status: response.status, + code: typeof apiError?.error === 'string' ? apiError.error : undefined, + apiCode: typeof apiError?.errorcode === 'number' ? apiError.errorcode : undefined, + body + }); +} + +export function createRequester(options: RequesterOptions): Requester { + const fetchImplementation = options.fetch ?? globalThis.fetch; + const baseUrl = normalizeBaseUrl(options.baseUrl); + const defaultHeaders = new Headers(options.headers); + + return async function request(path: string, init: RequestInit = {}): Promise { + const headers = new Headers(defaultHeaders); + new Headers(init.headers).forEach((value, key) => headers.set(key, value)); + + let response: Response; + try { + response = await fetchImplementation(new URL(path, baseUrl), { ...init, headers }); + } catch (cause) { + if (isBringApiError(cause)) { + throw cause; + } + + throw createBringApiError('Cannot connect to Bring API', { + code: 'NETWORK_ERROR', + cause + }); + } + + const body = await readBody(response); + if (!response.ok || isApiErrorBody(body)) { + throw errorFromResponse(response, body); + } + + return body as T; + }; +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..5c1959d --- /dev/null +++ b/src/index.ts @@ -0,0 +1,7 @@ +export { authenticate } from './auth.js'; +export { connectBring, createBringClient } from './client.js'; +export { isBringApiError } from './errors.js'; +export { getCatalog, getTranslations } from './public.js'; +export type { BringApiError } from './errors.js'; +export type { PublicResourceOptions } from './public.js'; +export type * from './types.js'; diff --git a/src/public.ts b/src/public.ts new file mode 100644 index 0000000..e31e0db --- /dev/null +++ b/src/public.ts @@ -0,0 +1,32 @@ +import { createRequester } from './http.js'; +import type { Catalog, Fetch, RequestOptions } from './types.js'; + +const DEFAULT_WEB_URL = 'https://web.getbring.com/locale/'; + +export interface PublicResourceOptions extends RequestOptions { + readonly locale: string; + readonly fetch?: Fetch; + readonly baseUrl?: string; +} + +export function getCatalog(options: PublicResourceOptions): Promise { + const request = createRequester({ + baseUrl: options.baseUrl ?? DEFAULT_WEB_URL, + fetch: options.fetch + }); + + return request(`catalog.${encodeURIComponent(options.locale)}.json`, { + signal: options.signal + }); +} + +export function getTranslations(options: PublicResourceOptions): Promise>> { + const request = createRequester({ + baseUrl: options.baseUrl ?? DEFAULT_WEB_URL, + fetch: options.fetch + }); + + return request>>(`articles.${encodeURIComponent(options.locale)}.json`, { + signal: options.signal + }); +} diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 0000000..ec769fb --- /dev/null +++ b/src/types.ts @@ -0,0 +1,168 @@ +export type Fetch = typeof globalThis.fetch; + +export interface Credentials { + readonly email: string; + readonly password: string; +} + +export interface BringSession { + readonly userId: string; + readonly accessToken: string; + readonly refreshToken?: string; + readonly userName?: string; +} + +export interface ClientOptions { + readonly baseUrl?: string; + readonly fetch?: Fetch; + readonly apiKey?: string; + readonly client?: string; + readonly clientSource?: string; + readonly country?: string; +} + +export interface CreateClientOptions extends ClientOptions { + readonly session: BringSession; +} + +export interface RequestOptions { + readonly signal?: AbortSignal; +} + +export interface ConnectOptions extends ClientOptions, RequestOptions {} + +export interface ShoppingItem { + readonly specification: string; + readonly name: string; +} + +export interface ShoppingListItems { + readonly uuid: string; + readonly status: string; + readonly purchase: readonly ShoppingItem[]; + readonly recently: readonly ShoppingItem[]; +} + +export interface ShoppingListSummary { + readonly listUuid: string; + readonly name: string; + readonly theme: string; +} + +export interface ShoppingLists { + readonly lists: readonly ShoppingListSummary[]; +} + +export interface ItemDetails { + readonly uuid: string; + readonly itemId: string; + readonly listUuid: string; + readonly userIconItemId: string; + readonly userSectionId: string; + readonly assignedTo: string; + readonly imageUrl: string; +} + +export interface ListUser { + readonly publicUuid: string; + readonly name: string; + readonly email: string; + readonly photoPath: string; + readonly pushEnabled: boolean; + readonly plusTryOut: boolean; + readonly country: string; + readonly language: string; +} + +export interface ListUsers { + readonly users: readonly ListUser[]; +} + +export interface UserSetting { + readonly key: string; + readonly value: string; +} + +export interface UserListSettings { + readonly listUuid: string; + readonly usersettings: readonly UserSetting[]; +} + +export interface UserSettings { + readonly userSettings: readonly UserSetting[]; + readonly userlistsettings: readonly UserListSettings[]; +} + +export interface CatalogItem { + readonly itemId: string; + readonly name: string; +} + +export interface CatalogSection { + readonly sectionId: string; + readonly name: string; + readonly items: readonly CatalogItem[]; +} + +export interface Catalog { + readonly language: string; + readonly catalog: { + readonly sections: readonly CatalogSection[]; + }; +} + +export interface PendingInvitations { + readonly invitations: readonly unknown[]; +} + +export interface ListInput { + readonly listId: string; +} + +export interface ItemInput extends ListInput { + readonly name: string; +} + +export interface SaveItemInput extends ItemInput { + readonly specification?: string; +} + +export interface ItemImageInput { + readonly itemId: string; + readonly imageData: string; +} + +export interface ItemImage { + readonly imageUrl: string; +} + +export interface ListsApi { + getAll(options?: RequestOptions): Promise; + getItems(input: ListInput, options?: RequestOptions): Promise; + getItemDetails(input: ListInput, options?: RequestOptions): Promise; + saveItem(input: SaveItemInput, options?: RequestOptions): Promise; + removeItem(input: ItemInput, options?: RequestOptions): Promise; + moveItemToRecent(input: ItemInput, options?: RequestOptions): Promise; + getUsers(input: ListInput, options?: RequestOptions): Promise; +} + +export interface ItemImagesApi { + save(input: ItemImageInput, options?: RequestOptions): Promise; + remove(input: Pick, options?: RequestOptions): Promise; +} + +export interface UserApi { + getSettings(options?: RequestOptions): Promise; +} + +export interface InvitationsApi { + getPending(options?: RequestOptions): Promise; +} + +export interface BringClient { + readonly lists: ListsApi; + readonly itemImages: ItemImagesApi; + readonly user: UserApi; + readonly invitations: InvitationsApi; + getSession(): Readonly; +} diff --git a/test/client.test.js b/test/client.test.js new file mode 100644 index 0000000..1b24bba --- /dev/null +++ b/test/client.test.js @@ -0,0 +1,134 @@ +import assert from 'node:assert/strict'; +import { describe, it } from 'node:test'; + +import { connectBring, createBringClient, getCatalog, isBringApiError } from '../build/index.js'; + +function jsonResponse(body, init = {}) { + return new Response(JSON.stringify(body), { + status: 200, + headers: { 'content-type': 'application/json' }, + ...init + }); +} + +describe('authentication', () => { + it('connects with credentials and returns a ready client', async () => { + const calls = []; + const fetch = async (url, init = {}) => { + calls.push({ url: String(url), init }); + + if (String(url).endsWith('/bringauth')) { + return jsonResponse({ + name: 'Ada', + uuid: 'user-id', + access_token: 'access-token', + refresh_token: 'refresh-token' + }); + } + + return jsonResponse({ lists: [] }); + }; + + const bring = await connectBring({ email: 'ada@example.com', password: 'secret' }, { fetch }); + const lists = await bring.lists.getAll(); + + assert.deepEqual(lists, { lists: [] }); + assert.equal(calls.length, 2); + assert.equal(calls[1].init.headers.get('authorization'), 'Bearer access-token'); + assert.equal(calls[1].init.headers.get('x-bring-user-uuid'), 'user-id'); + }); + + it('uses an existing session without a login request', async () => { + const calls = []; + const fetch = async (url, init = {}) => { + calls.push({ url: String(url), init }); + return jsonResponse({ lists: [] }); + }; + + const bring = createBringClient({ + fetch, + session: { + userId: 'user-id', + accessToken: 'access-token' + } + }); + + await bring.lists.getAll(); + + assert.equal(calls.length, 1); + assert.match(calls[0].url, /bringusers\/user-id\/lists$/); + }); +}); + +describe('HTTP transport', () => { + it('encodes item data and treats 204 as void', async () => { + let request; + const fetch = async (url, init = {}) => { + request = { url: String(url), init }; + return new Response(null, { status: 204 }); + }; + const bring = createBringClient({ + fetch, + session: { userId: 'user-id', accessToken: 'access-token' } + }); + + const result = await bring.lists.saveItem({ + listId: 'list-id', + name: 'Fish & Chips', + specification: '50% + sauce' + }); + + assert.equal(result, undefined); + assert.equal(request.init.method, 'PUT'); + assert.ok(request.init.body instanceof URLSearchParams); + assert.equal(request.init.body.get('purchase'), 'Fish & Chips'); + assert.equal(request.init.body.get('specification'), '50% + sauce'); + }); + + it('discards an unexpected success body for a void operation', async () => { + const fetch = async () => new Response('ignored', { status: 200 }); + const bring = createBringClient({ + fetch, + session: { userId: 'user-id', accessToken: 'access-token' } + }); + + const result = await bring.lists.removeItem({ + listId: 'list-id', + name: 'Coffee' + }); + + assert.equal(result, undefined); + }); + + it('throws a structured error for a non-success status', async () => { + const fetch = async () => + jsonResponse({ message: 'Token expired', error: 'invalid_token', errorcode: 40101 }, { status: 401 }); + const bring = createBringClient({ + fetch, + session: { userId: 'user-id', accessToken: 'expired' } + }); + + await assert.rejects(bring.lists.getAll(), error => { + assert.equal(isBringApiError(error), true); + assert.equal(error.status, 401); + assert.equal(error.code, 'invalid_token'); + assert.equal(error.message, 'Token expired'); + return true; + }); + }); +}); + +describe('public resources', () => { + it('loads a catalog without authentication headers', async () => { + let request; + const fetch = async (url, init = {}) => { + request = { url: String(url), init }; + return jsonResponse({ language: 'de-DE', catalog: { sections: [] } }); + }; + + const catalog = await getCatalog({ locale: 'de-DE', fetch }); + + assert.equal(catalog.language, 'de-DE'); + assert.equal(new Headers(request.init.headers).has('authorization'), false); + }); +}); diff --git a/test/testMinimal.js b/test/testMinimal.js deleted file mode 100644 index 27e7ebd..0000000 --- a/test/testMinimal.js +++ /dev/null @@ -1,32 +0,0 @@ -const bringApi = require(`${__dirname}/../build/bring.js`); -const { describe } = require(`mocha`); - -describe(`Wrong login test`, () => { - let bring; - - before(done => { - bring = new bringApi({ mail: 'example@example.com', password: 'secret' }); - done(); - }); - - it(`init should take less than 2000ms`, async () => { - try { - await bring.login(); - } catch (e) { - if (!e.message.includes(`email password combination not existing`)) { - throw new Error(`Wrong rejection message on login: ${e.message}`); - } - } - }); - - it(`init should throw invalid JWT error`, async () => { - try { - const lists = await bring.loadLists(); - expect(lists).to.be.undefined; - } catch (e) { - if (!e.message.includes(`JWT access token is not valid`)) { - throw new Error(`Wrong rejection message on loading lists: ${e.message}`); - } - } - }); -}); diff --git a/tsconfig.build.json b/tsconfig.build.json index a727813..3f93f17 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,16 +1,11 @@ -// Specialized tsconfig to only compile .ts-files in the src dir { - "extends": "./tsconfig.json", - "compilerOptions": { - "allowJs": false, - "checkJs": false, - "noEmit": false, - "declaration": true - }, - "include": [ - "src/**/*.ts" - ], - "exclude": [ - "src/**/*.test.ts" - ] + "extends": "./tsconfig.json", + "compilerOptions": { + "declarationMap": true, + "noEmit": false, + "declaration": true, + "outDir": "./build", + "rootDir": "./src", + "sourceMap": true + } } diff --git a/tsconfig.json b/tsconfig.json index 205c08f..88bc843 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,50 +1,18 @@ -// Root tsconfig to set the settings and power editor support for all TS files { - "compileOnSave": true, - "compilerOptions": { - // do not compile anything, this file is just to configure type checking - // the compilation is configured in tsconfig.build.json - "noEmit": true, - - // check JS files, but do not compile them => tsconfig.build.json - "allowJs": true, - "checkJs": true, - - "skipLibCheck": true, // Don't report errors in 3rd party definitions - "noEmitOnError": true, - "outDir": "./build/", - "removeComments": false, - "module": "commonjs", - "moduleResolution": "node", - "esModuleInterop": true, - // this is necessary for the automatic typing of the adapter config - "resolveJsonModule": true, - - // Set this to false if you want to disable the very strict rules (not recommended) - "strict": true, - // Or enable some of those features for more fine-grained control - // "strictNullChecks": true, - // "strictPropertyInitialization": true, - // "strictBindCallApply": true, - // "noImplicitAny": true, - // "noUnusedLocals": true, - // "noUnusedParameters": true, - // Uncomment this if you want the old behavior of catch variables being `any` - // "useUnknownInCatchVariables": false, - - // Consider targeting es2019 or higher if you only support Node.js 12+ - "target": "es2018", - - "sourceMap": true, - "inlineSourceMap": false - }, - "include": [ - "src/**/*.ts", - "admin/**/*.ts", - "admin/**/*.tsx" - ], - "exclude": [ - "build/**", - "node_modules/**" - ] + "compilerOptions": { + "target": "ES2022", + "module": "NodeNext", + "moduleResolution": "NodeNext", + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "strict": true, + "noEmit": true, + "noEmitOnError": true, + "noUncheckedIndexedAccess": true, + "useUnknownInCatchVariables": true, + "forceConsistentCasingInFileNames": true, + "verbatimModuleSyntax": true, + "skipLibCheck": true + }, + "include": ["src/**/*.ts"], + "exclude": ["build", "node_modules"] }