Skip to content

Commit 5749f54

Browse files
committed
Add more Socket to API and token messages
1 parent d923a17 commit 5749f54

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+96
-93
lines changed

src/commands/analytics/cmd-analytics.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ async function run(
158158
message:
159159
'You need to be logged in to use this command. See `socket login`.',
160160
pass: 'ok',
161-
fail: 'missing API token',
161+
fail: 'missing Socket API token',
162162
},
163163
)
164164
if (!wasValidInput) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe('socket analytics', async () => {
7979
8080
- The time filter must either be 7, 30 or 90 (ok)
8181
82-
- You need to be logged in to use this command. See \`socket login\`. (missing API token)"
82+
- You need to be logged in to use this command. See \`socket login\`. (missing Socket API token)"
8383
`)
8484

8585
expect(code, 'dry-run should exit with code 2 if missing input').toBe(2)

src/commands/audit-log/cmd-audit-log.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ async function run(
139139
message:
140140
'You need to be logged in to use this command. See `socket login`.',
141141
pass: 'ok',
142-
fail: 'missing API token',
142+
fail: 'missing Socket API token',
143143
},
144144
{
145145
nook: true,

src/commands/ci/cmd-ci.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const config: CliCommandConfig = {
3535
accept or reject a current build. When the scan does not pass your security
3636
policy, the exit code will be non-zero.
3737
38-
It will use the default org for the set API token.
38+
It will use the default org for the Socket API token.
3939
4040
The --autoManifest flag does the same as the one from \`socket scan create\`
4141
but is not enabled by default since the CI is less likely to be set up with

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('socket ci', async () => {
2626
accept or reject a current build. When the scan does not pass your security
2727
policy, the exit code will be non-zero.
2828
29-
It will use the default org for the set API token.
29+
It will use the default org for the Socket API token.
3030
3131
The --autoManifest flag does the same as the one from \`socket scan create\`
3232
but is not enabled by default since the CI is less likely to be set up with

src/commands/cli.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('socket root command', async () => {
2020
2121
Main commands
2222
23-
socket login Setup the CLI with an API Token and defaults
23+
socket login Setup the Socket CLI with an API token and defaults
2424
socket scan create Create a new Scan and report
2525
socket npm/[email protected] Request the security score of a particular package
2626
socket ci Shorthand for CI; socket scan create --report --no-interactive

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ describe('socket config auto', async () => {
2929
$ socket config auto defaultOrg
3030
3131
Keys:
32-
- apiBaseUrl -- Base URL of the API endpoint
33-
- apiProxy -- A proxy through which to access the API
34-
- apiToken -- The API token required to access most API endpoints
35-
- defaultOrg -- The default org slug to use; usually the org your API token has access to. When set, all orgSlug arguments are implied to be this value.
32+
- apiBaseUrl -- Base URL of the Socket API endpoint
33+
- apiProxy -- A proxy through which to access the Socket API
34+
- apiToken -- The Socket API token required to access most Socket API endpoints
35+
- defaultOrg -- The default org slug to use; usually the org your Socket API token has access to. When set, all orgSlug arguments are implied to be this value.
3636
- enforcedOrgs -- Orgs in this list have their security policies enforced on this machine
3737
- org -- Alias for defaultOrg
38-
- skipAskToPersistDefaultOrg -- This flag prevents the CLI from asking you to persist the org slug when you selected one interactively"
38+
- skipAskToPersistDefaultOrg -- This flag prevents the Socket CLI from asking you to persist the org slug when you selected one interactively"
3939
`,
4040
)
4141
expect(`\n ${stderr}`).toMatchInlineSnapshot(`

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ describe('socket config get', async () => {
2929
3030
KEY is an enum. Valid keys:
3131
32-
- apiBaseUrl -- Base URL of the API endpoint
33-
- apiProxy -- A proxy through which to access the API
34-
- apiToken -- The API token required to access most API endpoints
35-
- defaultOrg -- The default org slug to use; usually the org your API token has access to. When set, all orgSlug arguments are implied to be this value.
32+
- apiBaseUrl -- Base URL of the Socket API endpoint
33+
- apiProxy -- A proxy through which to access the Socket API
34+
- apiToken -- The Socket API token required to access most Socket API endpoints
35+
- defaultOrg -- The default org slug to use; usually the org your Socket API token has access to. When set, all orgSlug arguments are implied to be this value.
3636
- enforcedOrgs -- Orgs in this list have their security policies enforced on this machine
3737
- org -- Alias for defaultOrg
38-
- skipAskToPersistDefaultOrg -- This flag prevents the CLI from asking you to persist the org slug when you selected one interactively
38+
- skipAskToPersistDefaultOrg -- This flag prevents the Socket CLI from asking you to persist the org slug when you selected one interactively
3939
4040
Examples
4141
$ socket config get defaultOrg"

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ describe('socket config get', async () => {
3636
3737
Keys:
3838
39-
- apiBaseUrl -- Base URL of the API endpoint
40-
- apiProxy -- A proxy through which to access the API
41-
- apiToken -- The API token required to access most API endpoints
42-
- defaultOrg -- The default org slug to use; usually the org your API token has access to. When set, all orgSlug arguments are implied to be this value.
39+
- apiBaseUrl -- Base URL of the Socket API endpoint
40+
- apiProxy -- A proxy through which to access the Socket API
41+
- apiToken -- The Socket API token required to access most Socket API endpoints
42+
- defaultOrg -- The default org slug to use; usually the org your Socket API token has access to. When set, all orgSlug arguments are implied to be this value.
4343
- enforcedOrgs -- Orgs in this list have their security policies enforced on this machine
4444
- org -- Alias for defaultOrg
45-
- skipAskToPersistDefaultOrg -- This flag prevents the CLI from asking you to persist the org slug when you selected one interactively
45+
- skipAskToPersistDefaultOrg -- This flag prevents the Socket CLI from asking you to persist the org slug when you selected one interactively
4646
4747
Examples
4848
$ socket config set apiProxy https://example.com"

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ describe('socket config unset', async () => {
3030
3131
Keys:
3232
33-
- apiBaseUrl -- Base URL of the API endpoint
34-
- apiProxy -- A proxy through which to access the API
35-
- apiToken -- The API token required to access most API endpoints
36-
- defaultOrg -- The default org slug to use; usually the org your API token has access to. When set, all orgSlug arguments are implied to be this value.
33+
- apiBaseUrl -- Base URL of the Socket API endpoint
34+
- apiProxy -- A proxy through which to access the Socket API
35+
- apiToken -- The Socket API token required to access most Socket API endpoints
36+
- defaultOrg -- The default org slug to use; usually the org your Socket API token has access to. When set, all orgSlug arguments are implied to be this value.
3737
- enforcedOrgs -- Orgs in this list have their security policies enforced on this machine
3838
- org -- Alias for defaultOrg
39-
- skipAskToPersistDefaultOrg -- This flag prevents the CLI from asking you to persist the org slug when you selected one interactively
39+
- skipAskToPersistDefaultOrg -- This flag prevents the Socket CLI from asking you to persist the org slug when you selected one interactively
4040
4141
Examples
4242
$ socket config unset defaultOrg"

0 commit comments

Comments
 (0)