From 5fa05486d91d9a7a51166b19660c835e125cb0aa Mon Sep 17 00:00:00 2001 From: Peter van der Zee Date: Mon, 7 Apr 2025 15:15:36 +0200 Subject: [PATCH 1/2] polish more --- src/commands/repos/cmd-repos-create.test.ts | 2 +- src/commands/repos/cmd-repos-create.ts | 2 +- src/commands/repos/cmd-repos-del.test.ts | 2 +- src/commands/repos/cmd-repos-del.ts | 2 +- src/commands/repos/cmd-repos-update.test.ts | 2 +- src/commands/repos/cmd-repos-update.ts | 2 +- src/commands/repos/cmd-repos-view.test.ts | 2 +- src/commands/repos/cmd-repos-view.ts | 2 +- src/commands/scan/cmd-scan-create.ts | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/commands/repos/cmd-repos-create.test.ts b/src/commands/repos/cmd-repos-create.test.ts index 63af91f9e..c4704043f 100644 --- a/src/commands/repos/cmd-repos-create.test.ts +++ b/src/commands/repos/cmd-repos-create.test.ts @@ -72,7 +72,7 @@ describe('socket repos create', async () => { - Org name as the first argument (\\x1b[31mmissing\\x1b[39m) - - Repository name using --repoNam (\\x1b[31minvalid\\x1b[39m) + - Repository name using --repoNam (\\x1b[31mmissing\\x1b[39m) - You need to be logged in to use this command. See \`socket login\`. (\\x1b[31mmissing API token\\x1b[39m)" `) diff --git a/src/commands/repos/cmd-repos-create.ts b/src/commands/repos/cmd-repos-create.ts index 85fb5e031..857ed4ca7 100644 --- a/src/commands/repos/cmd-repos-create.ts +++ b/src/commands/repos/cmd-repos-create.ts @@ -101,7 +101,7 @@ async function run( test: repoName, message: 'Repository name using --repoNam', pass: 'ok', - fail: typeof repoName !== 'string' ? 'missing' : 'invalid' + fail: 'missing' }, { nook: true, diff --git a/src/commands/repos/cmd-repos-del.test.ts b/src/commands/repos/cmd-repos-del.test.ts index a1bc44c8a..943f6766f 100644 --- a/src/commands/repos/cmd-repos-del.test.ts +++ b/src/commands/repos/cmd-repos-del.test.ts @@ -67,7 +67,7 @@ describe('socket repos del', async () => { - Org name as the first argument (\\x1b[31mmissing\\x1b[39m) - - Repository name argument (\\x1b[31minvalid\\x1b[39m) + - Repository name argument (\\x1b[31mmissing\\x1b[39m) - You need to be logged in to use this command. See \`socket login\`. (\\x1b[31mmissing API token\\x1b[39m)" `) diff --git a/src/commands/repos/cmd-repos-del.ts b/src/commands/repos/cmd-repos-del.ts index 5faff6afa..2c9f30ff6 100644 --- a/src/commands/repos/cmd-repos-del.ts +++ b/src/commands/repos/cmd-repos-del.ts @@ -71,7 +71,7 @@ async function run( test: repoName, message: 'Repository name argument', pass: 'ok', - fail: typeof repoName !== 'string' ? 'missing' : 'invalid' + fail: 'missing' }, { nook: true, diff --git a/src/commands/repos/cmd-repos-update.test.ts b/src/commands/repos/cmd-repos-update.test.ts index 026ad07a1..08ba56941 100644 --- a/src/commands/repos/cmd-repos-update.test.ts +++ b/src/commands/repos/cmd-repos-update.test.ts @@ -72,7 +72,7 @@ describe('socket repos update', async () => { - Org name as the first argument (\\x1b[31mmissing\\x1b[39m) - - Repository name using --repoName (\\x1b[31minvalid\\x1b[39m) + - Repository name using --repoName (\\x1b[31mmissing\\x1b[39m) - You need to be logged in to use this command. See \`socket login\`. (\\x1b[31mmissing API token\\x1b[39m)" `) diff --git a/src/commands/repos/cmd-repos-update.ts b/src/commands/repos/cmd-repos-update.ts index 757148957..4eeeabac0 100644 --- a/src/commands/repos/cmd-repos-update.ts +++ b/src/commands/repos/cmd-repos-update.ts @@ -101,7 +101,7 @@ async function run( test: repoName, message: 'Repository name using --repoName', pass: 'ok', - fail: typeof repoName !== 'string' ? 'missing' : 'invalid' + fail: 'missing' }, { nook: true, diff --git a/src/commands/repos/cmd-repos-view.test.ts b/src/commands/repos/cmd-repos-view.test.ts index de8f8656c..42cc07540 100644 --- a/src/commands/repos/cmd-repos-view.test.ts +++ b/src/commands/repos/cmd-repos-view.test.ts @@ -70,7 +70,7 @@ describe('socket repos view', async () => { - Org name as the first argument (\\x1b[31mmissing\\x1b[39m) - - Repository name using --repoName (\\x1b[31minvalid\\x1b[39m) + - Repository name using --repoName (\\x1b[31mmissing\\x1b[39m) - You need to be logged in to use this command. See \`socket login\`. (\\x1b[31mmissing API token\\x1b[39m)" `) diff --git a/src/commands/repos/cmd-repos-view.ts b/src/commands/repos/cmd-repos-view.ts index 48fa8d9a6..0c1cb0400 100644 --- a/src/commands/repos/cmd-repos-view.ts +++ b/src/commands/repos/cmd-repos-view.ts @@ -78,7 +78,7 @@ async function run( test: repoName, message: 'Repository name using --repoName', pass: 'ok', - fail: typeof repoName !== 'string' ? 'missing' : 'invalid' + fail: 'missing' }, { nook: true, diff --git a/src/commands/scan/cmd-scan-create.ts b/src/commands/scan/cmd-scan-create.ts index bf74f3f3a..bfdfa3bdc 100644 --- a/src/commands/scan/cmd-scan-create.ts +++ b/src/commands/scan/cmd-scan-create.ts @@ -245,7 +245,7 @@ async function run( test: targets.length, message: 'At least one TARGET (e.g. `.` or `./package.json`)', pass: 'ok', - fail: 'missing' + fail: 'missing (or perhaps you forgot the org slug?)' }, { nook: true, @@ -259,7 +259,7 @@ async function run( test: apiToken, message: 'This command requires an API token for access`)', pass: 'ok', - fail: 'missing' + fail: 'missing (try `socket login`)' } ) if (wasBadInput) { From 10d2434d798bb0ce2968d6cdc69aeef84ba5a71a Mon Sep 17 00:00:00 2001 From: Peter van der Zee Date: Mon, 7 Apr 2025 15:18:17 +0200 Subject: [PATCH 2/2] huh --- src/commands/scan/cmd-scan-create.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/scan/cmd-scan-create.ts b/src/commands/scan/cmd-scan-create.ts index bfdfa3bdc..91b65e1ee 100644 --- a/src/commands/scan/cmd-scan-create.ts +++ b/src/commands/scan/cmd-scan-create.ts @@ -257,7 +257,7 @@ async function run( { nook: true, test: apiToken, - message: 'This command requires an API token for access`)', + message: 'This command requires an API token for access', pass: 'ok', fail: 'missing (try `socket login`)' }