Skip to content

Commit 8d1720e

Browse files
committed
Fix help spacing
1 parent 43eeda3 commit 8d1720e

15 files changed

+173
-182
lines changed

src/cli.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void (async () => {
8585
}),
8686
)
8787
} else {
88-
// Bump below any spinner.
88+
// Add 2 newlines in stderr to bump below any spinner.
8989
logger.error('\n')
9090
logger.fail(failMsgWithBadge(errorTitle, errorMessage))
9191
if (errorBody) {

src/commands/cli.test.mts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,19 @@ describe('socket root command', async () => {
1313
"CLI for Socket.dev
1414
1515
Usage
16-
1716
$ socket <command>
1817
$ socket scan create --json
1918
$ socket package score npm lodash --markdown
2019
21-
(Note: All commands have their own --help)
20+
Note: All commands have their own --help
2221
2322
Main commands
24-
2523
socket login Setup Socket CLI with an API token and defaults
2624
socket scan create Create a new Socket scan and report
2725
socket npm/[email protected] Request the Socket score of a package
2826
socket ci Shorthand for \`socket scan create --report --no-interactive\`
2927
3028
Socket API
31-
3229
analytics Look up analytics data
3330
audit-log Look up the audit log for an organization
3431
organization Manage Socket organization account details
@@ -38,7 +35,6 @@ describe('socket root command', async () => {
3835
threat-feed [Beta] View the threat feed
3936
4037
Local tools
41-
4238
fix Update dependencies with "fixable" Socket alerts
4339
manifest Generate a dependency manifest for certain ecosystems
4440
npm Run npm with the Socket wrapper
@@ -48,7 +44,6 @@ describe('socket root command', async () => {
4844
raw-npx Run npx without the Socket wrapper
4945
5046
CLI configuration
51-
5247
config Manage Socket CLI configuration
5348
install Install Socket CLI tab completion
5449
login Socket API login and CLI setup
@@ -57,7 +52,7 @@ describe('socket root command', async () => {
5752
wrapper Enable or disable the Socket npm/npx wrapper
5853
5954
Options
60-
(Note: All commands have these flags even when not displayed in their help)
55+
Note: All commands have these flags even when not displayed in their help
6156
6257
--config Override the local config with this JSON
6358
--dry-run Do input validation for a command and exit 0 when input is ok
@@ -67,7 +62,6 @@ describe('socket root command', async () => {
6762
--version Print the app version
6863
6964
Environment variables
70-
7165
SOCKET_CLI_ACCEPT_RISKS Accept risks of a safe-npm or safe-npx run
7266
SOCKET_CLI_API_TOKEN Set the Socket API token
7367
SOCKET_CLI_CONFIG A JSON stringified Socket configuration object
@@ -83,7 +77,6 @@ describe('socket root command', async () => {
8377
SOCKET_CLI_VIEW_ALL_RISKS View all risks of a safe-npm or safe-npx run
8478
8579
Environment variables for development
86-
8780
SOCKET_CLI_API_BASE_URL Change the base URL for all API-calls
8881
Defaults: The "apiBaseUrl" value of socket/settings local app data
8982
if present, else https://api.socket.dev/v0/

src/commands/config/cmd-config.test.mts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,14 @@ describe('socket config', async () => {
1717
"Manage Socket CLI configuration
1818
1919
Usage
20-
2120
$ socket config <command>
2221
2322
Commands
24-
25-
auto Automatically discover and set the correct value config item
26-
get Get the value of a local CLI config item
27-
list Show all local CLI config items and their values
28-
set Update the value of a local CLI config item
29-
unset Clear the value of a local CLI config item
23+
auto Automatically discover and set the correct value config item
24+
get Get the value of a local CLI config item
25+
list Show all local CLI config items and their values
26+
set Update the value of a local CLI config item
27+
unset Clear the value of a local CLI config item
3028
3129
Options
3230

src/commands/fix/cmd-fix.mts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const config: CliCommandConfig = {
3333
autoMerge: {
3434
type: 'boolean',
3535
default: false,
36-
description: `Enable auto-merge for pull requests that Socket opens.\n See ${terminalLink(
36+
description: `Enable auto-merge for pull requests that Socket opens.\nSee ${terminalLink(
3737
'GitHub documentation',
3838
'https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository',
3939
)} for managing auto-merge for pull requests in your repository.`,
@@ -49,7 +49,7 @@ const config: CliCommandConfig = {
4949
description: `Provide a list of ${terminalLink(
5050
'GHSA IDs',
5151
'https://docs.github.com/en/code-security/security-advisories/working-with-global-security-advisories-from-the-github-advisory-database/about-the-github-advisory-database#about-ghsa-ids',
52-
)} to compute fixes for, as either a comma separated value or as multiple flags.\n Use '--ghsa all' to lookup all GHSA IDs and compute fixes for them.`,
52+
)} to compute fixes for, as either a comma separated value or as multiple flags.\nUse '--ghsa all' to lookup all GHSA IDs and compute fixes for them.`,
5353
isMultiple: true,
5454
hidden: true,
5555
},
@@ -82,24 +82,24 @@ const config: CliCommandConfig = {
8282
description: `Provide a list of ${terminalLink(
8383
'PURLs',
8484
'https://github.com/package-url/purl-spec?tab=readme-ov-file#purl',
85-
)} to compute fixes for, as either a comma separated value or as\n multiple flags, instead of querying the Socket API`,
85+
)} to compute fixes for, as either a comma separated value or as\nmultiple flags, instead of querying the Socket API`,
8686
isMultiple: true,
8787
shortFlag: 'p',
8888
},
8989
rangeStyle: {
9090
type: 'string',
9191
default: 'preserve',
9292
description: `
93-
Define how dependency version ranges are updated in package.json (default 'preserve').
94-
Available styles:
95-
* caret - Use ^ range for compatible updates (e.g. ^1.2.3)
96-
* gt - Use > to allow any newer version (e.g. >1.2.3)
97-
* gte - Use >= to allow any newer version (e.g. >=1.2.3)
98-
* lt - Use < to allow only lower versions (e.g. <1.2.3)
99-
* lte - Use <= to allow only lower versions (e.g. <=1.2.3)
100-
* pin - Use the exact version (e.g. 1.2.3)
101-
* preserve - Retain the existing version range style as-is
102-
* tilde - Use ~ range for patch/minor updates (e.g. ~1.2.3)
93+
Define how dependency version ranges are updated in package.json (default 'preserve').
94+
Available styles:
95+
* caret - Use ^ range for compatible updates (e.g. ^1.2.3)
96+
* gt - Use > to allow any newer version (e.g. >1.2.3)
97+
* gte - Use >= to allow any newer version (e.g. >=1.2.3)
98+
* lt - Use < to allow only lower versions (e.g. <1.2.3)
99+
* lte - Use <= to allow only lower versions (e.g. <=1.2.3)
100+
* pin - Use the exact version (e.g. 1.2.3)
101+
* preserve - Retain the existing version range style as-is
102+
* tilde - Use ~ range for patch/minor updates (e.g. ~1.2.3)
103103
`.trim(),
104104
},
105105
test: {

src/commands/install/cmd-install.test.mts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ describe('socket install', async () => {
1717
"Install Socket CLI tab completion
1818
1919
Usage
20-
2120
$ socket install <command>
2221
2322
Commands
24-
25-
completion Install bash completion for Socket CLI
23+
completion Install bash completion for Socket CLI
2624
2725
Options
2826

src/commands/manifest/cmd-manifest.test.mts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,16 @@ describe('socket manifest', async () => {
1717
"Generate a dependency manifest for certain ecosystems
1818
1919
Usage
20-
2120
$ socket manifest <command>
2221
2322
Commands
24-
25-
auto Auto-detect build and attempt to generate manifest file
26-
cdxgen Create an SBOM with CycloneDX generator (cdxgen)
27-
conda [beta] Convert a Conda environment.yml file to a python requirements.txt
28-
gradle [beta] Use Gradle to generate a manifest file (\`pom.xml\`) for a Gradle/Java/Kotlin/etc project
29-
kotlin [beta] Use Gradle to generate a manifest file (\`pom.xml\`) for a Kotlin project
30-
scala [beta] Generate a manifest file (\`pom.xml\`) from Scala's \`build.sbt\` file
31-
setup Start interactive configurator to customize default flag values for \`socket manifest\` in this dir
23+
auto Auto-detect build and attempt to generate manifest file
24+
cdxgen Create an SBOM with CycloneDX generator (cdxgen)
25+
conda [beta] Convert a Conda environment.yml file to a python requirements.txt
26+
gradle [beta] Use Gradle to generate a manifest file (\`pom.xml\`) for a Gradle/Java/Kotlin/etc project
27+
kotlin [beta] Use Gradle to generate a manifest file (\`pom.xml\`) for a Kotlin project
28+
scala [beta] Generate a manifest file (\`pom.xml\`) from Scala's \`build.sbt\` file
29+
setup Start interactive configurator to customize default flag values for \`socket manifest\` in this dir
3230
3331
Options
3432

src/commands/organization/cmd-organization-policy.test.mts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ describe('socket organization list', async () => {
1919
"Organization policy details
2020
2121
Usage
22-
2322
$ socket organization policy <command>
2423
2524
Commands
26-
27-
license Retrieve the license policy of an organization
25+
license Retrieve the license policy of an organization
2826
2927
Options
3028

src/commands/organization/cmd-organization.test.mts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ describe('socket organization', async () => {
1919
"Manage Socket organization account details
2020
2121
Usage
22-
2322
$ socket organization <command>
2423
2524
Commands
26-
27-
dependencies Search for any dependency that is being used in your organization
28-
list List organizations associated with the Socket API token
29-
policy Organization policy details
25+
dependencies Search for any dependency that is being used in your organization
26+
list List organizations associated with the Socket API token
27+
policy Organization policy details
3028
3129
Options
3230

src/commands/package/cmd-package.test.mts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ describe('socket package', async () => {
1717
"Look up published package details
1818
1919
Usage
20-
2120
$ socket package <command>
2221
2322
Commands
24-
25-
score Look up score for one package which reflects all of its transitive dependencies as well
26-
shallow Look up info regarding one or more packages but not their transitives
23+
score Look up score for one package which reflects all of its transitive dependencies as well
24+
shallow Look up info regarding one or more packages but not their transitives
2725
2826
Options
2927

src/commands/repository/cmd-repository.test.mts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,14 @@ describe('socket repository', async () => {
1717
"Manage registered repositories
1818
1919
Usage
20-
2120
$ socket repository <command>
2221
2322
Commands
24-
25-
create Create a repository in an organization
26-
del Delete a repository in an organization
27-
list List repositories in an organization
28-
update Update a repository in an organization
29-
view View repositories in an organization
23+
create Create a repository in an organization
24+
del Delete a repository in an organization
25+
list List repositories in an organization
26+
update Update a repository in an organization
27+
view View repositories in an organization
3028
3129
Options
3230

0 commit comments

Comments
 (0)