Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: multi region support #498

Merged
merged 30 commits into from
Oct 3, 2022
Merged

feat!: multi region support #498

merged 30 commits into from
Oct 3, 2022

Conversation

djdembeck
Copy link
Collaborator

@djdembeck djdembeck commented Sep 24, 2022

BREAKING CHANGE: adds new required region field to Author, Book, and Chapter. This version on will not be compatible with old database versions.

  • Show updated
  • Delete updated
  • Search updated
  • English-specific functions behave
  • Write tests for existing data migrations?
  • Existing tests updated
  • New tests written (region agnostic data)
    • au
    • ca
    • de
    • es
    • fr
    • in
    • it
    • jp
    • us
    • uk
  • Update OpenAPI spec for changes

@github-actions
Copy link

Coverage report

❌ An unexpected error occurred. For more details, check console

Error: The process '/home/runner/setup-pnpm/node_modules/.bin/pnpm' failed with exit code 1
St.
Category Percentage Covered / Total
🟡 Statements
77.91% (-21.99% 🔻)
67/86
🟢 Branches 100% 0/0
🔴 Functions
24% (-76% 🔻)
6/25
🟡 Lines
70.18% (-29.71% 🔻)
40/57
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢 config/context.ts 100% 100% 100% 100%
🟢 config/papr.ts 100% 100% 100% 100%
🟡 static/messages.ts 72.86% 100% 13.64% 60.47%
🟢 static/regions.ts 100% 100% 100% 100%

Test suite run failed

Failed tests: 0/6. Failed suites: 20/22.
  ● Test suite failed to run

    tests/database/papr/audible/PaprAudibleAuthorHelper.test.ts:28:2 - error TS2741: Property 'region' is missing in type '{ update: string; }' but required in type 'Querystring'.

    28  options = {
        ~~~~~~~

      src/config/typing/requests.ts:8:2
        8  region: string
           ~~~~~~
        'region' is declared here.


  ● Test suite failed to run

    tests/database/papr/audible/PaprAudibleBookHelper.test.ts:28:2 - error TS2322: Type '{ seedAuthors: undefined; update: string; }' is not assignable to type '{ seedAuthors: string | undefined; } & Querystring'.
      Property 'region' is missing in type '{ seedAuthors: undefined; update: string; }' but required in type 'Querystring'.

    28  options = {
        ~~~~~~~

      src/config/typing/requests.ts:8:2
        8  region: string
           ~~~~~~
        'region' is declared here.


  ● Test suite failed to run

    tests/database/papr/audible/PaprAudibleChapterHelper.test.ts:23:2 - error TS2322: Type '{ seedAuthors: undefined; update: string; }' is not assignable to type '{ seedAuthors: string | undefined; } & Querystring'.
      Property 'region' is missing in type '{ seedAuthors: undefined; update: string; }' but required in type 'Querystring'.

    23  options = {
        ~~~~~~~

      src/config/typing/requests.ts:8:2
        8  region: string
           ~~~~~~
        'region' is declared here.


  ● Test suite failed to run

    tests/helpers/books/audible/ApiHelper.test.ts:18:11 - error TS2554: Expected 2 arguments, but got 1.

    18  helper = new ApiHelper(asin)
                 ~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ApiHelper.ts:23:28
        23  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/helpers/books/audible/ApiHelper.test.ts:105:12 - error TS2554: Expected 2 arguments, but got 1.

    105   helper = new ApiHelper('B079LRSMNN')
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ApiHelper.ts:23:28
        23  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/helpers/books/audible/ApiHelper.test.ts:143:12 - error TS2554: Expected 2 arguments, but got 1.

    143   helper = new ApiHelper('B017V4IM1G')
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ApiHelper.ts:23:28
        23  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/helpers/books/audible/ApiHelper.test.ts:213:12 - error TS2554: Expected 2 arguments, but got 1.

    213   helper = new ApiHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ApiHelper.ts:23:28
        23  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/helpers/books/audible/ApiHelper.test.ts:227:12 - error TS2554: Expected 2 arguments, but got 1.

    227   helper = new ApiHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ApiHelper.ts:23:28
        23  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.


  ● Test suite failed to run

    tests/helpers/routes/ChapterShowHelper.test.ts:20:39 - error TS2345: Argument of type '{ update: undefined; }' is not assignable to parameter of type 'Querystring'.
      Property 'region' is missing in type '{ update: undefined; }' but required in type 'Querystring'.

    20  helper = new ChapterShowHelper(asin, { update: undefined }, null)
                                             ~~~~~~~~~~~~~~~~~~~~~

      src/config/typing/requests.ts:8:2
        8  region: string
           ~~~~~~
        'region' is declared here.
    tests/helpers/routes/ChapterShowHelper.test.ts:82:40 - error TS2345: Argument of type '{ update: string; }' is not assignable to parameter of type 'Querystring'.
      Property 'region' is missing in type '{ update: string; }' but required in type 'Querystring'.

    82   helper = new ChapterShowHelper(asin, { update: '1' }, null)
                                              ~~~~~~~~~~~~~~~

      src/config/typing/requests.ts:8:2
        8  region: string
           ~~~~~~
        'region' is declared here.


  ● Test suite failed to run

    tests/helpers/books/audible/StitchHelper.test.ts:20:11 - error TS2554: Expected 2 arguments, but got 1.

    20  helper = new StitchHelper(asin)
                 ~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/StitchHelper.ts:22:28
        22  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.


  ● Test suite failed to run

    tests/helpers/routes/AuthorShowHelper.test.ts:19:38 - error TS2345: Argument of type '{ update: undefined; }' is not assignable to parameter of type 'Querystring'.
      Property 'region' is missing in type '{ update: undefined; }' but required in type 'Querystring'.

    19  helper = new AuthorShowHelper(asin, { update: undefined }, null)
                                            ~~~~~~~~~~~~~~~~~~~~~

      src/config/typing/requests.ts:8:2
        8  region: string
           ~~~~~~
        'region' is declared here.
    tests/helpers/routes/AuthorShowHelper.test.ts:70:39 - error TS2345: Argument of type '{ update: string; }' is not assignable to parameter of type 'Querystring'.
      Property 'region' is missing in type '{ update: string; }' but required in type 'Querystring'.

    70   helper = new AuthorShowHelper(asin, { update: '1' }, null)
                                             ~~~~~~~~~~~~~~~

      src/config/typing/requests.ts:8:2
        8  region: string
           ~~~~~~
        'region' is declared here.


  ● Test suite failed to run

    tests/helpers/routes/BookShowHelper.test.ts:19:36 - error TS2345: Argument of type '{ seedAuthors: undefined; update: undefined; }' is not assignable to parameter of type '{ seedAuthors: string | undefined; } & Querystring'.
      Property 'region' is missing in type '{ seedAuthors: undefined; update: undefined; }' but required in type 'Querystring'.

    19  helper = new BookShowHelper(asin, { seedAuthors: undefined, update: undefined }, null)
                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      src/config/typing/requests.ts:8:2
        8  region: string
           ~~~~~~
        'region' is declared here.
    tests/helpers/routes/BookShowHelper.test.ts:74:37 - error TS2345: Argument of type '{ seedAuthors: undefined; update: string; }' is not assignable to parameter of type '{ seedAuthors: string | undefined; } & Querystring'.
      Property 'region' is missing in type '{ seedAuthors: undefined; update: string; }' but required in type 'Querystring'.

    74   helper = new BookShowHelper(asin, { seedAuthors: undefined, update: '1' }, null)
                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      src/config/typing/requests.ts:8:2
        8  region: string
           ~~~~~~
        'region' is declared here.


  ● Test suite failed to run

    tests/datasets/helpers/authors.ts:26:14 - error TS2741: Property 'region' is missing in type '{ asin: string; description: string; genres: { asin: string; name: string; type: string; }[]; image: string; name: string; }' but required in type 'AuthorProfile'.

    26 export const parsedAuthor: AuthorProfile = {
                    ~~~~~~~~~~~~

      src/config/typing/people.ts:16:2
        16  region: string
            ~~~~~~
        'region' is declared here.
    tests/datasets/helpers/authors.ts:58:14 - error TS2741: Property 'region' is missing in type '{ asin: string; description: string; image: string; name: string; }' but required in type 'AuthorProfile'.

    58 export const parsedAuthorWithoutGenres: AuthorProfile = {
                    ~~~~~~~~~~~~~~~~~~~~~~~~~

      src/config/typing/people.ts:16:2
        16  region: string
            ~~~~~~
        'region' is declared here.


  ● Test suite failed to run

    tests/helpers/books/audible/ChapterHelper.test.ts:11:11 - error TS2554: Expected 2 arguments, but got 1.

    11  helper = new ChapterHelper(asin)
                 ~~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ChapterHelper.ts:24:28
        24  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/helpers/books/audible/ChapterHelper.test.ts:47:12 - error TS2554: Expected 2 arguments, but got 1.

    47   helper = new ChapterHelper(asin)
                  ~~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ChapterHelper.ts:24:28
        24  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/helpers/books/audible/ChapterHelper.test.ts:80:4 - error TS2554: Expected 2 arguments, but got 1.

    80    new ChapterHelper(asin)
          ~~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ChapterHelper.ts:24:28
        24  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.


  ● Test suite failed to run

    tests/datasets/audible/authors/scrape.ts:3:14 - error TS2741: Property 'region' is missing in type '{ asin: string; description: string; genres: { asin: string; name: string; type: string; }[]; image: string; name: string; }' but required in type 'AuthorProfile'.

    3 export const authorParsedB00G0WYW92: AuthorProfile = {
                   ~~~~~~~~~~~~~~~~~~~~~~

      src/config/typing/people.ts:16:2
        16  region: string
            ~~~~~~
        'region' is declared here.
    tests/datasets/audible/authors/scrape.ts:29:14 - error TS2741: Property 'region' is missing in type '{ asin: string; description: string; genres: { asin: string; name: string; type: string; }[]; image: string; name: string; }' but required in type 'AuthorProfile'.

    29 export const authorParsedB0034NFIOI: AuthorProfile = {
                    ~~~~~~~~~~~~~~~~~~~~~~

      src/config/typing/people.ts:16:2
        16  region: string
            ~~~~~~
        'region' is declared here.


  ● Test suite failed to run

    tests/datasets/helpers/authors.ts:26:14 - error TS2741: Property 'region' is missing in type '{ asin: string; description: string; genres: { asin: string; name: string; type: string; }[]; image: string; name: string; }' but required in type 'AuthorProfile'.

    26 export const parsedAuthor: AuthorProfile = {
                    ~~~~~~~~~~~~

      src/config/typing/people.ts:16:2
        16  region: string
            ~~~~~~
        'region' is declared here.
    tests/datasets/helpers/authors.ts:58:14 - error TS2741: Property 'region' is missing in type '{ asin: string; description: string; image: string; name: string; }' but required in type 'AuthorProfile'.

    58 export const parsedAuthorWithoutGenres: AuthorProfile = {
                    ~~~~~~~~~~~~~~~~~~~~~~~~~

      src/config/typing/people.ts:16:2
        16  region: string
            ~~~~~~
        'region' is declared here.


  ● Test suite failed to run

    tests/audible/books/api.test.ts:25:13 - error TS2554: Expected 2 arguments, but got 1.

    25    helper = new ApiHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ApiHelper.ts:23:28
        23  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/audible/books/api.test.ts:41:13 - error TS2554: Expected 2 arguments, but got 1.

    41    helper = new ApiHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ApiHelper.ts:23:28
        23  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/audible/books/api.test.ts:57:13 - error TS2554: Expected 2 arguments, but got 1.

    57    helper = new ApiHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ApiHelper.ts:23:28
        23  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/audible/books/api.test.ts:78:13 - error TS2554: Expected 2 arguments, but got 1.

    78    helper = new ApiHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ApiHelper.ts:23:28
        23  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.


  ● Test suite failed to run

    tests/audible/books/scrape.test.ts:19:13 - error TS2554: Expected 2 arguments, but got 1.

    19    helper = new ScrapeHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ScrapeHelper.ts:13:28
        13  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/audible/books/scrape.test.ts:35:13 - error TS2554: Expected 2 arguments, but got 1.

    35    helper = new ScrapeHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ScrapeHelper.ts:13:28
        13  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/audible/books/scrape.test.ts:52:13 - error TS2554: Expected 2 arguments, but got 1.

    52    helper = new ScrapeHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ScrapeHelper.ts:13:28
        13  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/audible/books/scrape.test.ts:69:13 - error TS2554: Expected 2 arguments, but got 1.

    69    helper = new ScrapeHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ScrapeHelper.ts:13:28
        13  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/audible/books/scrape.test.ts:83:13 - error TS2554: Expected 2 arguments, but got 1.

    83    helper = new ScrapeHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ScrapeHelper.ts:13:28
        13  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.


  ● Test suite failed to run

    tests/audible/books/stitch.test.ts:23:20 - error TS2554: Expected 2 arguments, but got 1.

    23    chapterHelper = new ChapterHelper(asin)
                          ~~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ChapterHelper.ts:24:28
        24  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/audible/books/stitch.test.ts:24:13 - error TS2554: Expected 2 arguments, but got 1.

    24    helper = new StitchHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/StitchHelper.ts:22:28
        22  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/audible/books/stitch.test.ts:46:20 - error TS2554: Expected 2 arguments, but got 1.

    46    chapterHelper = new ChapterHelper(asin)
                          ~~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ChapterHelper.ts:24:28
        24  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/audible/books/stitch.test.ts:47:13 - error TS2554: Expected 2 arguments, but got 1.

    47    helper = new StitchHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/StitchHelper.ts:22:28
        22  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/audible/books/stitch.test.ts:69:20 - error TS2554: Expected 2 arguments, but got 1.

    69    chapterHelper = new ChapterHelper(asin)
                          ~~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ChapterHelper.ts:24:28
        24  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/audible/books/stitch.test.ts:70:13 - error TS2554: Expected 2 arguments, but got 1.

    70    helper = new StitchHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/StitchHelper.ts:22:28
        22  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.


  ● Test suite failed to run

    tests/helpers/authors/audible/ScrapeHelper.test.ts:17:11 - error TS2554: Expected 2 arguments, but got 1.

    17  helper = new ScrapeHelper(asin)
                 ~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/authors/audible/ScrapeHelper.ts:19:28
        19  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/helpers/authors/audible/ScrapeHelper.test.ts:66:12 - error TS2554: Expected 2 arguments, but got 1.

    66   helper = new ScrapeHelper(asin)
                  ~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/authors/audible/ScrapeHelper.ts:19:28
        19  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.


  ● Test suite failed to run

    tests/helpers/books/audible/ScrapeHelper.test.ts:13:11 - error TS2554: Expected 2 arguments, but got 1.

    13  helper = new ScrapeHelper(asin)
                 ~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ScrapeHelper.ts:13:28
        13  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/helpers/books/audible/ScrapeHelper.test.ts:38:12 - error TS2554: Expected 2 arguments, but got 1.

    38   helper = new ScrapeHelper(asin)
                  ~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ScrapeHelper.ts:13:28
        13  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.


  ● Test suite failed to run

    tests/audible/books/chapter.test.ts:18:13 - error TS2554: Expected 2 arguments, but got 1.

    18    helper = new ChapterHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ChapterHelper.ts:24:28
        24  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/audible/books/chapter.test.ts:34:13 - error TS2554: Expected 2 arguments, but got 1.

    34    helper = new ChapterHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ChapterHelper.ts:24:28
        24  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/audible/books/chapter.test.ts:50:13 - error TS2554: Expected 2 arguments, but got 1.

    50    helper = new ChapterHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/books/audible/ChapterHelper.ts:24:28
        24  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.


  ● Test suite failed to run

    tests/datasets/helpers/books.ts:336:14 - error TS2741: Property 'region' is missing in type '{ asin: string; authors: { asin: string; name: string; }[]; description: string; formatType: string; genres: { asin: string; name: string; type: string; }[]; image: string; language: string; narrators: { name: string; }[]; ... 6 more ...; title: string; }' but required in type 'ApiBook'.

    336 export const parsedBook: ApiBook = {
                     ~~~~~~~~~~

      src/config/typing/books.ts:44:2
        44  region: string
            ~~~~~~
        'region' is declared here.
    tests/datasets/helpers/books.ts:364:14 - error TS2741: Property 'region' is missing in type '{ asin: string; authors: { asin: string; name: string; }[]; description: string; formatType: string; image: string; language: string; narrators: { name: string; }[]; publisherName: string; rating: string; ... 4 more ...; title: string; }' but required in type 'ApiBook'.

    364 export const changedParsedBook: ApiBook = {
                     ~~~~~~~~~~~~~~~~~

      src/config/typing/books.ts:44:2
        44  region: string
            ~~~~~~
        'region' is declared here.
    tests/datasets/helpers/books.ts:405:14 - error TS2741: Property 'region' is missing in type '{ asin: string; authors: { asin: string; name: string; }[]; description: string; formatType: string; image: string; language: string; narrators: { name: string; }[]; publisherName: string; rating: string; ... 4 more ...; title: string; }' but required in type 'ApiBook'.

    405 export const parsedBookWithoutGenres: ApiBook = {
                     ~~~~~~~~~~~~~~~~~~~~~~~

      src/config/typing/books.ts:44:2
        44  region: string
            ~~~~~~
        'region' is declared here.


  ● Test suite failed to run

    tests/audible/authors/scrape.test.ts:16:13 - error TS2554: Expected 2 arguments, but got 1.

    16    helper = new ScrapeHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/authors/audible/ScrapeHelper.ts:19:28
        19  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/audible/authors/scrape.test.ts:28:13 - error TS2554: Expected 2 arguments, but got 1.

    28    helper = new ScrapeHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/authors/audible/ScrapeHelper.ts:19:28
        19  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.
    tests/audible/authors/scrape.test.ts:40:13 - error TS2554: Expected 2 arguments, but got 1.

    40    helper = new ScrapeHelper(asin)
                   ~~~~~~~~~~~~~~~~~~~~~~

      src/helpers/authors/audible/ScrapeHelper.ts:19:28
        19  constructor(asin: string, region: string) {
                                      ~~~~~~~~~~~~~~
        An argument for 'region' was not provided.

Report generated by 🧪jest coverage report action from 8683d38

@djdembeck djdembeck added the enhancement New feature or request label Sep 24, 2022
This was linked to issues Sep 24, 2022
@djdembeck djdembeck changed the base branch from main to develop September 24, 2022 00:22
@djdembeck djdembeck changed the title feat: multi region support feat!: multi region support Sep 24, 2022
@djdembeck
Copy link
Collaborator Author

Search will require some updating of the current RouteCommonHelper, since it currently expects an asin. Maybe something like if (!asin && name) would be all that's needed as a switch.

@djdembeck djdembeck marked this pull request as ready for review October 3, 2022 20:41
@djdembeck djdembeck merged commit 4a38714 into develop Oct 3, 2022
@djdembeck djdembeck mentioned this pull request Oct 5, 2022
@djdembeck djdembeck deleted the multi-region-support branch February 16, 2023 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make "https://api.audible.*" configurable Multi-region support
1 participant