WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@alexjoverm
Copy link
Contributor

@alexjoverm alexjoverm commented Nov 24, 2025

Follow up of #347 as per @alvarosabu suggestion.

Remaining work:


Note

Introduces a layered config system resolved at runtime and applied across global CLI flags, logging/reporting, and API concurrency/retry, with minor command defaults and exports.

  • Config System:
    • Add layered config resolution (~/.storyblok/config.*, .storyblok/config.*, storyblok.config.*) with c12.
    • New lib/config/* (defaults, loader, resolver, commander integration, store) and typed defineConfig API.
    • Public entrypoint storyblok/config exporting defineConfig and types; comprehensive README.
  • CLI Integration:
    • Register global flags (e.g., --region, --verbose, --api-max-*, --log-*, --ui-enabled, --report-*) with hyphen-based path parsing and --no-* support.
    • Resolve/apply config in program preAction; hydrate commands; expose active config.
    • Initialize logger (console/file) and reporter based on resolved config; persist metadata and pruning settings.
  • Runtime Behavior:
    • api.ts: rate limiter capacity now derives from active config (api.maxConcurrency).
    • utils/fetch.ts: retries derive from config (api.maxRetries).
  • Commands:
    • Components/Datasources/Languages: use default filenames constants; improved path resolution and user-facing paths; minor option defaults.
    • Components push graph operations now use configured concurrency.
    • Add directories.components|datasources constants.
  • Build/Exports:
    • Build new config entrypoint via unbuild; package exports/types updated; switch to dotenv/config.
  • Tests/Utils:
    • Add/reset helpers for logger/reporter in tests; new object and package utilities.
    • Update tests to reflect path/filename defaults and verbose handling.
  • Deps:
    • Add c12; lockfile updates.

Written by Cursor Bugbot for commit 6627674. This will update automatically on new commits. Configure here.

@alexjoverm alexjoverm marked this pull request as draft November 24, 2025 09:33
@alexjoverm alexjoverm self-assigned this Nov 24, 2025
@alexjoverm alexjoverm mentioned this pull request Nov 24, 2025
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on December 1

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@alexjoverm alexjoverm changed the title CLI config system feat(cli): config system Nov 24, 2025
- Restructure for clarity - Add Layering explanation - Table reference
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 2, 2025

Open in StackBlitz

@storyblok/astro

npm i https://pkg.pr.new/@storyblok/astro@381

storyblok

npm i https://pkg.pr.new/storyblok@381

@storyblok/eslint-config

npm i https://pkg.pr.new/@storyblok/eslint-config@381

@storyblok/js

npm i https://pkg.pr.new/@storyblok/js@381

storyblok-js-client

npm i https://pkg.pr.new/storyblok-js-client@381

@storyblok/management-api-client

npm i https://pkg.pr.new/@storyblok/management-api-client@381

@storyblok/nuxt

npm i https://pkg.pr.new/@storyblok/nuxt@381

@storyblok/react

npm i https://pkg.pr.new/@storyblok/react@381

@storyblok/region-helper

npm i https://pkg.pr.new/@storyblok/region-helper@381

@storyblok/richtext

npm i https://pkg.pr.new/@storyblok/richtext@381

@storyblok/svelte

npm i https://pkg.pr.new/@storyblok/svelte@381

@storyblok/vue

npm i https://pkg.pr.new/@storyblok/vue@381

commit: 6627674

@alexjoverm alexjoverm added the cli CLI related features and issues label Dec 2, 2025
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Copy link
Contributor

@maoberlehner maoberlehner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is mostly straightforward to follow, and the tests help to further understand what's happening.

Left a couple of mostly minor comments.

Copy link
Contributor

@maoberlehner maoberlehner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a couple of non-blocking thoughts and nitpicks, but I think the PR is ready for merge as is.

@alexjoverm alexjoverm merged commit 0ca975f into main Dec 4, 2025
6 checks passed
@alexjoverm alexjoverm deleted the feature/config-system branch December 4, 2025 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI related features and issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants