-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit by Serverless devs docs 1-10-2024 2:8:20
- Loading branch information
serverless-devs
committed
Jan 10, 2024
1 parent
0da3761
commit f73d7a7
Showing
17 changed files
with
592 additions
and
94 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,18 @@ position: 3 | |
category: 'Commands' | ||
--- | ||
# Clean Command | ||
|
||
The `s clean` command is designated to clear the cache and associated functionalities within Serverless Devs. With this command, you're able to cleanse the environment, eliminate unused dependencies, and remove relevant cached data. | ||
|
||
- [Command Overview](#command-overview) | ||
- [Parameters](#parameters) | ||
- [Usage Examples](#usage-examples) | ||
- [Parameters](#parameters) | ||
- [Usage Examples](#usage-examples) | ||
- [Cautions](#cautions) | ||
|
||
## Command Overview | ||
|
||
To access help information, execute `s clean -h`: | ||
|
||
```shell script | ||
$ s clean -h | ||
Usage: s clean [options] | ||
|
@@ -30,39 +35,53 @@ Options: | |
--component [componentName] Remove component (like: fc, [email protected]) | ||
-h, --help Display help for command | ||
``` | ||
|
||
### Parameters | ||
|
||
Navigate through the command's options with ease, each tailored for a specific aspect of the clean-up process: | ||
| Parameter | Abbreviation | Required | Description | | ||
|-----|-----|-----|-----| | ||
| all | | Optional | Initiates a comprehensive environment clean-up | | ||
| logs | | Optional | Targets log files for cleaning | | ||
| cache | | Optional | Specifies and removes a <dirName> within the cache | | ||
| component | | Optional | Deletes a particular component (e.g., fc, [email protected]) | | ||
|
||
### Usage Examples | ||
|
||
To purge a specific component, employ the `--component` flag alongside the name of the component: | ||
|
||
```shell script | ||
$ s clean --component fc api | ||
[2023-******][INFO][s_cli] Component [fc api] has been cleaned up successfully. | ||
``` | ||
|
||
For cache removal, utilize the `--cache` option as demonstrated below: | ||
|
||
```shell script | ||
$ s clean --cache | ||
[2023-******][INFO][s_cli] Cache cleaned up successfully. | ||
``` | ||
|
||
Log file clean-up can be achieved through the `--logs` parameter: | ||
|
||
```shell script | ||
$ s clean --logs | ||
[2023-******][INFO][s_cli] Logs cleaned up successfully. | ||
``` | ||
|
||
For an all-encompassing clean-up, the `--all` parameter is at your disposal: | ||
|
||
```shell script | ||
$ s clean --all | ||
[2023-******][INFO][s_cli] Component cleaned up successfully. | ||
[2023-******][INFO][s_cli] Cache cleaned up successfully. | ||
[2023-******][INFO][s_cli] Logs cleaned up successfully. | ||
[2023-******][INFO][s_cli] The environment of Serverless Devs has been cleaned up successfully. | ||
``` | ||
|
||
## Cautions | ||
|
||
Please note the following protocols when executing a component-specific clean-up: | ||
|
||
1. The system will first assess if there are any corresponding components within the current Registry cache and proceed to clear them. | ||
2. Following that, the system will purge the ultimate Registry cache, the Github Registry, eradicating any components that match the criteria. |
This file contains 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
This file contains 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
Oops, something went wrong.