Skip to content

feat: add country selection for AT/DE support - #1

Open
udondan wants to merge 34 commits into
manmal:mainfrom
udondan:main
Open

udondan wants to merge 34 commits into
manmal:mainfrom
udondan:main

Conversation

@udondan

@udondan udondan commented May 30, 2026

Copy link
Copy Markdown

Summary

  • Adds set-country <code> command to switch between at (default) and de
  • API base URL is now dynamic (api.marktguru.at / api.marktguru.de)
  • login uses the configured country to extract the correct country-specific API key
  • Country is persisted in ~/.marktguru/config.json and shown in config output
  • Defaults to at for full backward compatibility

Usage

marktguru set-country de
marktguru login
marktguru set-zip 10115
marktguru search raw "milch"

@udondan

udondan commented Jun 4, 2026

Copy link
Copy Markdown
Author

Would you consider merging this PR @manmal?

udondan and others added 14 commits September 17, 2026 20:02
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel Schroeder <udondan@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel Schroeder <udondan@users.noreply.github.com>
Same setup as cdk-ec2-key-pair: typescript-eslint with type-checked and
stylistic rules, prettier enforced through eslint, and a Makefile that CI
calls. The config is ported to ESM, since this package is type: module.

Rule exceptions: quoted object properties keep their case (HTTP headers),
variables may be PascalCase (class from a dynamic import), and
prefer-nullish-coalescing ignores strings and numbers, where `||` is meant
to catch empty values too.

Fixes the type-aware findings: JSON.parse and response.json() are typed
instead of any, commander action handlers get typed parameters, the two
floating search promises are awaited via parseAsync, and fetchFirstOk
rethrows an Error rather than an unknown.
The version passed to commander was hardcoded, so the CLI would keep reporting 0.1.0 after any release. Annotate the line with x-release-please-version and list src/cli.ts as an extra-file, so release-please bumps it along with package.json.
The test workflow relied on setup-node's cache, which never matched the
cache directory make install writes to (--cache .npm), so every run
started cold. Cache .npm explicitly, like cdk-ec2-key-pair does.

Also adds the concurrency group and bash shell defaults from the same
reference setup, and stops Renovate from automerging major updates.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@udondan

udondan commented Sep 17, 2026

Copy link
Copy Markdown
Author

Heads-up for anyone finding this PR: since there's been no response here since May, I've published a maintained fork as @udondan/marktguru-cli (source), now at v1.0.0.

It carries the AT/DE country selection from this PR plus a few fixes on top:

npx @udondan/marktguru-cli --help

@manmal this PR is opened from my fork's main, which I've kept developing since May, so it now carries a lot of unrelated changes and isn't mergeable as-is.

The country selection itself still works fine — if you ever want it upstream, just say so here and I'll open a fresh PR with only that change.

udondan and others added 6 commits September 18, 2026 08:12
* chore: drop header-generator dependency

The marktguru site serves identical responses with static headers, so generated browser fingerprints add nothing. Removing it also drops the deprecated lodash.isequal (via ow@0.28) that warned on install.

Release-As: 1.0.1

* test: add live end-to-end tests for login and search

Runs the built CLI against marktguru.at and marktguru.de with an isolated HOME, so search has to auto-login by scraping. Catches the scraper breaking when Marktguru ships a new frontend.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant