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

Use Prompts #328

Merged
merged 57 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
d305c80
feat: prompts working state
gcavanunez Oct 27, 2023
b2f4f0c
Merge branch 'tm/upgrade-laravel-zero' into feat/prompts-enable-list
gcavanunez May 3, 2024
81c13ef
update prompts
gcavanunez May 3, 2024
fa611a4
updates tests
gcavanunez Aug 15, 2024
6b18b53
clean up
gcavanunez Aug 15, 2024
3657d11
Merge branch 'main' into feat/prompts-enable-list
tonysm Dec 16, 2024
13f2c5a
cleanup enable cmd and drops windows specifics
gcavanunez Dec 16, 2024
a673b99
refactors disable cmd to use prompts and drops windows tests
gcavanunez Dec 16, 2024
cba21cf
refactored stop cmd
gcavanunez Dec 16, 2024
9d1a7e4
Lint
tonysm Dec 16, 2024
564427d
refactor the disable command to remove the menu dependency
tonysm Dec 17, 2024
64dd734
refactors disable, enable, start n stop cmds
gcavanunez Dec 17, 2024
80d5486
Use Prompts for asking the additional questions
tonysm Dec 17, 2024
69b4bf5
Fix tests
tonysm Dec 17, 2024
8ef351e
Simplify the exceptions using prompts
tonysm Dec 17, 2024
55d9328
Merge the default prompts with the extra ones and use Laravel Prompts…
tonysm Dec 17, 2024
5c2e6e5
Use prompts for the list command
tonysm Dec 17, 2024
4a6c85d
Replace netstat with fsockopen to check if a port is available
tonysm Dec 17, 2024
698a42a
wip
tonysm Dec 17, 2024
4dab6b2
Use an if instead of a ternary
tonysm Dec 17, 2024
9fc28e5
Use prompts on the shell errors
tonysm Dec 17, 2024
d374058
Bump prompts dependency version
tonysm Dec 17, 2024
6b0c808
Use prompts in the invalid service shortname exception
tonysm Dec 17, 2024
9effc50
Remove unused method
tonysm Dec 17, 2024
a4f52de
Turn the formatMessage function private
tonysm Dec 17, 2024
98d8f97
Lint
tonysm Dec 17, 2024
3dafccd
Fix BaseServiceTest
tonysm Dec 18, 2024
31a8b64
Fix the environment port availability detection
tonysm Dec 18, 2024
b314256
Lint
tonysm Dec 18, 2024
f82efcc
Wrap the socket creation in a function
tonysm Dec 18, 2024
0dcc165
Ensure the sockets extensions is loaded
tonysm Dec 18, 2024
87cc23c
Tweaks failed test message
tonysm Dec 18, 2024
30cd08a
Rename method
tonysm Dec 18, 2024
b3de93c
Ensure the sockets extension is on the list of extensions on CI
tonysm Dec 18, 2024
4efc521
Remove unused mock
tonysm Dec 18, 2024
09a8ac8
Tweaks the fake process
tonysm Dec 18, 2024
83f2e0d
Tweaks the fake process creation
tonysm Dec 18, 2024
7c85a0f
Rewrite the test to use socket_create_listen
tonysm Dec 18, 2024
7dbe819
Adds the sockets extension as required
tonysm Dec 18, 2024
c012df3
Remove pcntl and posix dependencies (the posix one was required by th…
tonysm Dec 18, 2024
6670bdc
Remove pcntl and posix from CI so we can test it
tonysm Dec 18, 2024
1328dc3
Tweaks the output format
tonysm Dec 18, 2024
74f8d26
Detect if Takeout is running in a container and use host.docker.local…
tonysm Dec 18, 2024
245c6bc
allows container id to be passed to start and stop
gcavanunez Dec 18, 2024
adc8b6b
refactors to active containers and adds dropdown to logs cmd
gcavanunez Dec 18, 2024
aaee0e3
Allow printing the logs output as plain notes (without the OUT|ERR pr…
tonysm Dec 18, 2024
f38d211
adds tests for id or name on stop n start cmds
gcavanunez Dec 18, 2024
ae0a5e0
adds tess for logs cmds
gcavanunez Dec 18, 2024
c79869b
formatting
tonysm Dec 18, 2024
b10b59e
Port must be a valid number
tonysm Dec 18, 2024
57db66b
Must return the port for the test to work
tonysm Dec 18, 2024
0582928
formatting
tonysm Dec 18, 2024
a02d0b7
No need to wrap a collection as a collection
tonysm Dec 19, 2024
d0157c0
formatting
tonysm Dec 19, 2024
05913d0
wording
tonysm Dec 19, 2024
3bbe9de
Rename method
tonysm Dec 19, 2024
c98d2e4
Fix typo
tonysm Jan 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/Commands/StartCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public function startableContainers(): Collection
public function startByServiceNameOrContainerId(string $service, Collection $startableContainers): void
{
$containersByServiceName = $startableContainers
->filter(function ($serviceName) use ($service) {
return Str::startsWith($serviceName, $service);
->filter(function ($serviceName, $key) use ($service) {
return Str::startsWith($serviceName, $service) || $key === $service;
tonysm marked this conversation as resolved.
Show resolved Hide resolved
});

// If we don't get any container by the service name, that probably means
Expand Down
4 changes: 2 additions & 2 deletions app/Commands/StopCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ private function stoppableContainers(): Collection
private function stopByServiceNameOrContainerId(string $service, Collection $stoppableContainers): void
{
$containersByServiceName = $stoppableContainers
->filter(function ($containerName) use ($service) {
return Str::startsWith($containerName, $service);
->filter(function ($containerName, $key) use ($service) {
return Str::startsWith($containerName, $service) || $key === $service;
});

if ($containersByServiceName->isEmpty()) {
Expand Down
Loading