feat(spacecat-shared-utils): SITES-40623 - add token grant config and exports#1420
Merged
feat(spacecat-shared-utils): SITES-40623 - add token grant config and exports#1420
Conversation
… exports Made-with: Cursor
|
This PR will trigger a minor release when merged. |
Contributor
|
Overview Adds shared token grant configuration for suggestion token types (CWV, broken backlinks, alt text) to spacecat-shared-utils. Provides two config maps Code Quality & Design Strengths:
Issues:
Tests
|
Kanishkavijay39
approved these changes
Mar 17, 2026
2 tasks
solaris007
pushed a commit
that referenced
this pull request
Mar 19, 2026
## [@adobe/spacecat-shared-utils-v1.105.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.104.0...@adobe/spacecat-shared-utils-v1.105.0) (2026-03-19) ### Features * **spacecat-shared-utils:** SITES-40623 - add token grant config and exports ([#1420](#1420)) ([a14e001](a14e001))
Member
|
🎉 This PR is included in version @adobe/spacecat-shared-utils-v1.105.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add shared token grant configuration to
spacecat-shared-utilsfor suggestion token types (CWV, broken backlinks, alt text). Services can use this to enforce tokens-per-cycle and resolve the current grant cycle consistently.Changes
TOKEN_GRANT_CONFIG– Frozen map of token types (grant_cwv,grant_broken_backlinks,grant_alt_text) with:tokensPerCycle(e.g. 3)cycleFormat(e.g.'YYYY-MM')getTokenGrantConfig(tokenType)– Returns the config for a token type with a computedcurrentCycle(UTC-based, e.g.'2026-03').getCurrentCycle(cycleFormat)– Computes the current cycle string from UTC (supportsYYYY,MMplaceholders).Please ensure your pull request adheres to the following guidelines:
Related Issues
Thanks for contributing!