Skip to content

Commit 6ec8e37

Browse files
committed
Improve banner spacing logic
1 parent 85aade6 commit 6ec8e37

27 files changed

+116
-39
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ describe('socket audit-log', async () => {
7878
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
7979
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
8080
|_____|___|___|_,_|___|_|.dev | Command: \`socket audit-log\`, cwd: <redacted>
81+
8182
\\x1b[33m\\u203c\\x1b[39m Unable to determine the target org. Trying to auto-discover it now...
8283
\\x1b[34mi\\x1b[39m Note: you can run \`socket login\` to set a default org. You can also override it with the --org flag.
83-
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
8484
85+
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
8586
\\x1b[31m\\xd7\\x1b[39m \\x1b[41m\\x1b[1m\\x1b[37m Input error: \\x1b[39m\\x1b[22m\\x1b[49m \\x1b[1mPlease review the input requirements and try again
8687
8788
- Org name by default setting, --org, or auto-discovered (\\x1b[31mmissing\\x1b[39m)

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ describe('socket config', async () => {
8484
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
8585
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
8686
|_____|___|___|_,_|___|_|.dev | Command: \`socket\`, cwd: <redacted>
87+
8788
\\x1b[31m\\xd7\\x1b[39m Could not parse Config as JSON"
8889
`)
8990

@@ -104,6 +105,7 @@ describe('socket config', async () => {
104105
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
105106
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
106107
|_____|___|___|_,_|___|_|.dev | Command: \`socket\`, cwd: <redacted>
108+
107109
\\x1b[31m\\xd7\\x1b[39m Could not parse Config as JSON"
108110
`)
109111

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ describe('socket json', async () => {
5151
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
5252
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
5353
|_____|___|___|_,_|___|_|.dev | Command: \`socket json\`, cwd: <redacted>
54+
5455
\\x1b[34mi\\x1b[39m Target cwd: <redacted>
5556
\\x1b[31m\\xd7\\x1b[39m Not found: <redacted>"
5657
`)
@@ -71,6 +72,7 @@ describe('socket json', async () => {
7172
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
7273
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
7374
|_____|___|___|_,_|___|_|.dev | Command: \`socket json\`, cwd: <redacted>
75+
7476
\\x1b[34mi\\x1b[39m Target cwd: <redacted>
7577
\\x1b[31m\\xd7\\x1b[39m Not found: <redacted>"
7678
`)
@@ -97,6 +99,7 @@ describe('socket json', async () => {
9799
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
98100
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
99101
|_____|___|___|_,_|___|_|.dev | Command: \`socket json\`, cwd: <redacted>
102+
100103
\\x1b[34mi\\x1b[39m Target cwd: <redacted>
101104
\\x1b[31m\\xd7\\x1b[39m Not found: <redacted>"
102105
`)
@@ -136,6 +139,7 @@ describe('socket json', async () => {
136139
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
137140
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
138141
|_____|___|___|_,_|___|_|.dev | Command: \`socket json\`, cwd: <redacted>
142+
139143
\\x1b[34mi\\x1b[39m Target cwd: <redacted>
140144
\\x1b[32m\\u221a\\x1b[39m This is the contents of <redacted>:"
141145
`)

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ describe('socket manifest conda', async () => {
7070
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
7171
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
7272
|_____|___|___|_,_|___|_|.dev | Command: \`socket manifest conda\`, cwd: <redacted>
73+
7374
\\x1b[33m\\u203c\\x1b[39m Warning: This will approximate your Conda dependencies using PyPI. We do not yet officially support Conda. Use at your own risk."
7475
`)
7576

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,11 @@ describe('socket organization policy license', async () => {
6666
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
6767
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
6868
|_____|___|___|_,_|___|_|.dev | Command: \`socket organization policy license\`, cwd: <redacted>
69+
6970
\\x1b[33m\\u203c\\x1b[39m Unable to determine the target org. Trying to auto-discover it now...
7071
\\x1b[34mi\\x1b[39m Note: you can run \`socket login\` to set a default org. You can also override it with the --org flag.
71-
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
7272
73+
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
7374
\\x1b[31m\\xd7\\x1b[39m \\x1b[41m\\x1b[1m\\x1b[37m Input error: \\x1b[39m\\x1b[22m\\x1b[49m \\x1b[1mPlease review the input requirements and try again
7475
7576
- You need to be logged in to use this command. See \`socket login\`. (\\x1b[31mmissing API token\\x1b[39m)
@@ -100,8 +101,10 @@ describe('socket organization policy license', async () => {
100101
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
101102
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
102103
|_____|___|___|_,_|___|_|.dev | Command: \`socket organization policy license\`, cwd: <redacted>
104+
103105
\\x1b[33m\\u203c\\x1b[39m Unable to determine the target org. Trying to auto-discover it now...
104106
\\x1b[34mi\\x1b[39m Note: you can run \`socket login\` to set a default org. You can also override it with the --org flag.
107+
105108
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode"
106109
`)
107110

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,11 @@ describe('socket organization policy security', async () => {
6666
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
6767
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
6868
|_____|___|___|_,_|___|_|.dev | Command: \`socket organization policy security\`, cwd: <redacted>
69+
6970
\\x1b[33m\\u203c\\x1b[39m Unable to determine the target org. Trying to auto-discover it now...
7071
\\x1b[34mi\\x1b[39m Note: you can run \`socket login\` to set a default org. You can also override it with the --org flag.
71-
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
7272
73+
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
7374
\\x1b[31m\\xd7\\x1b[39m \\x1b[41m\\x1b[1m\\x1b[37m Input error: \\x1b[39m\\x1b[22m\\x1b[49m \\x1b[1mPlease review the input requirements and try again
7475
7576
- You need to be logged in to use this command. See \`socket login\`. (\\x1b[31mmissing API token\\x1b[39m)

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ describe('socket repository create', async () => {
6767
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
6868
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
6969
|_____|___|___|_,_|___|_|.dev | Command: \`socket repository create\`, cwd: <redacted>
70+
7071
\\x1b[33m\\u203c\\x1b[39m Unable to determine the target org. Trying to auto-discover it now...
7172
\\x1b[34mi\\x1b[39m Note: you can run \`socket login\` to set a default org. You can also override it with the --org flag.
72-
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
7373
74+
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
7475
\\x1b[31m\\xd7\\x1b[39m \\x1b[41m\\x1b[1m\\x1b[37m Input error: \\x1b[39m\\x1b[22m\\x1b[49m \\x1b[1mPlease review the input requirements and try again
7576
7677
- Org name by default setting, --org, or auto-discovered (\\x1b[31mmissing\\x1b[39m)
@@ -132,10 +133,11 @@ describe('socket repository create', async () => {
132133
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
133134
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
134135
|_____|___|___|_,_|___|_|.dev | Command: \`socket repository create\`, cwd: <redacted>
136+
135137
\\x1b[33m\\u203c\\x1b[39m Unable to determine the target org. Trying to auto-discover it now...
136138
\\x1b[34mi\\x1b[39m Note: you can run \`socket login\` to set a default org. You can also override it with the --org flag.
137-
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
138139
140+
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
139141
\\x1b[31m\\xd7\\x1b[39m \\x1b[41m\\x1b[1m\\x1b[37m Input error: \\x1b[39m\\x1b[22m\\x1b[49m \\x1b[1mPlease review the input requirements and try again
140142
141143
- Org name by default setting, --org, or auto-discovered (\\x1b[31mmissing\\x1b[39m)

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,11 @@ describe('socket repository del', async () => {
6060
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
6161
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
6262
|_____|___|___|_,_|___|_|.dev | Command: \`socket repository del\`, cwd: <redacted>
63+
6364
\\x1b[33m\\u203c\\x1b[39m Unable to determine the target org. Trying to auto-discover it now...
6465
\\x1b[34mi\\x1b[39m Note: you can run \`socket login\` to set a default org. You can also override it with the --org flag.
65-
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
6666
67+
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
6768
\\x1b[31m\\xd7\\x1b[39m \\x1b[41m\\x1b[1m\\x1b[37m Input error: \\x1b[39m\\x1b[22m\\x1b[49m \\x1b[1mPlease review the input requirements and try again
6869
6970
- Org name by default setting, --org, or auto-discovered (\\x1b[31mmissing\\x1b[39m)
@@ -125,10 +126,11 @@ describe('socket repository del', async () => {
125126
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
126127
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
127128
|_____|___|___|_,_|___|_|.dev | Command: \`socket repository del\`, cwd: <redacted>
129+
128130
\\x1b[33m\\u203c\\x1b[39m Unable to determine the target org. Trying to auto-discover it now...
129131
\\x1b[34mi\\x1b[39m Note: you can run \`socket login\` to set a default org. You can also override it with the --org flag.
130-
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
131132
133+
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
132134
\\x1b[31m\\xd7\\x1b[39m \\x1b[41m\\x1b[1m\\x1b[37m Input error: \\x1b[39m\\x1b[22m\\x1b[49m \\x1b[1mPlease review the input requirements and try again
133135
134136
- Org name by default setting, --org, or auto-discovered (\\x1b[31mmissing\\x1b[39m)

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@ describe('socket repository list', async () => {
6868
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
6969
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
7070
|_____|___|___|_,_|___|_|.dev | Command: \`socket repository list\`, cwd: <redacted>
71+
7172
\\x1b[33m\\u203c\\x1b[39m Unable to determine the target org. Trying to auto-discover it now...
7273
\\x1b[34mi\\x1b[39m Note: you can run \`socket login\` to set a default org. You can also override it with the --org flag.
73-
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
7474
75+
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
7576
\\x1b[31m\\xd7\\x1b[39m \\x1b[41m\\x1b[1m\\x1b[37m Input error: \\x1b[39m\\x1b[22m\\x1b[49m \\x1b[1mPlease review the input requirements and try again
7677
7778
- Org name by default setting, --org, or auto-discovered (\\x1b[31mmissing\\x1b[39m)
@@ -123,10 +124,11 @@ describe('socket repository list', async () => {
123124
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
124125
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
125126
|_____|___|___|_,_|___|_|.dev | Command: \`socket repository list\`, cwd: <redacted>
127+
126128
\\x1b[33m\\u203c\\x1b[39m Unable to determine the target org. Trying to auto-discover it now...
127129
\\x1b[34mi\\x1b[39m Note: you can run \`socket login\` to set a default org. You can also override it with the --org flag.
128-
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
129130
131+
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
130132
\\x1b[31m\\xd7\\x1b[39m \\x1b[41m\\x1b[1m\\x1b[37m Input error: \\x1b[39m\\x1b[22m\\x1b[49m \\x1b[1mPlease review the input requirements and try again
131133
132134
- Org name by default setting, --org, or auto-discovered (\\x1b[31mmissing\\x1b[39m)

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,11 @@ describe('socket repository update', async () => {
6565
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
6666
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
6767
|_____|___|___|_,_|___|_|.dev | Command: \`socket repository update\`, cwd: <redacted>
68+
6869
\\x1b[33m\\u203c\\x1b[39m Unable to determine the target org. Trying to auto-discover it now...
6970
\\x1b[34mi\\x1b[39m Note: you can run \`socket login\` to set a default org. You can also override it with the --org flag.
70-
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
7171
72+
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
7273
\\x1b[31m\\xd7\\x1b[39m \\x1b[41m\\x1b[1m\\x1b[37m Input error: \\x1b[39m\\x1b[22m\\x1b[49m \\x1b[1mPlease review the input requirements and try again
7374
7475
- Org name by default setting, --org, or auto-discovered (\\x1b[31mmissing\\x1b[39m)
@@ -102,10 +103,11 @@ describe('socket repository update', async () => {
102103
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
103104
|__ | * | _| '_| -_| _| | Node: <redacted>, API token: <redacted>, org: <redacted>
104105
|_____|___|___|_,_|___|_|.dev | Command: \`socket repository update\`, cwd: <redacted>
106+
105107
\\x1b[33m\\u203c\\x1b[39m Unable to determine the target org. Trying to auto-discover it now...
106108
\\x1b[34mi\\x1b[39m Note: you can run \`socket login\` to set a default org. You can also override it with the --org flag.
107-
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
108109
110+
\\x1b[31m\\xd7\\x1b[39m Skipping auto-discovery of org in dry-run mode
109111
\\x1b[31m\\xd7\\x1b[39m \\x1b[41m\\x1b[1m\\x1b[37m Input error: \\x1b[39m\\x1b[22m\\x1b[49m \\x1b[1mPlease review the input requirements and try again
110112
111113
- Org name by default setting, --org, or auto-discovered (\\x1b[31mmissing\\x1b[39m)

0 commit comments

Comments
 (0)