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

chore(scripts): add cli dispatcher helper #4312

Merged
merged 1 commit into from Dec 23, 2022
Merged

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Dec 23, 2022

Issue

n/a

Description

This adds an optional CLI helper.

I have spent a fair amount of time in CLI navigating across folders in clients, packages, etc and running commands like yarn build or yarn test.

This CLI helper assists in the dispatch of commands to package contexts.

Syntax:

Command bin/exe

b # if you apply the suggested alias

Usage examples

b s3 - b

yarn build in clients/client-s3

b mar ent - doc

yarn build:docs in clients/client-marketplace-entitlement-service

b m sign - t

yarn test in packages/middleware-signing

How does it work?

b (package name query) - (npm script query)

The package name query is used to find the package within clients, lib, or packages, and the npm script query is used to
find a command to execute.

In both queries, you can use space-separated substrings. They must occur in the matching package or command in linear order. Priority is given to whole-word matches, initial word matches, and shorter strings. If your instructions are ambiguous the first priority match will be executed. Use the dry-run or confirm options to check your command before execution.

Additional options:
--dry (dry run), --c (confirm before execution), --help

Testing

Manual testing

@kuhe kuhe requested a review from a team as a code owner December 23, 2022 18:19
@kuhe kuhe merged commit 6fe57fe into aws:main Dec 23, 2022
@kuhe kuhe deleted the chore/cli-helper branch December 23, 2022 20:10
@github-actions
Copy link

github-actions bot commented Jan 7, 2023

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants