Skip to content

Commit 3c9de9e

Browse files
committed
linting; restore deletion
1 parent 72527e9 commit 3c9de9e

4 files changed

Lines changed: 28 additions & 29 deletions

File tree

packages/b2c-cli/src/commands/job/run.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,14 @@ export default class JobRun extends JobCommand<typeof JobRun> {
156156
return execution;
157157
}
158158

159+
private parseBody(body: string): Record<string, unknown> {
160+
try {
161+
return JSON.parse(body) as Record<string, unknown>;
162+
} catch {
163+
this.error(t('commands.job.run.invalidBody', 'Invalid JSON body: {{body}}', {body}));
164+
}
165+
}
166+
159167
private parseParameters(params: string[]): Array<{name: string; value: string}> {
160168
return params.map((p) => {
161169
const eqIndex = p.indexOf('=');
@@ -170,12 +178,4 @@ export default class JobRun extends JobCommand<typeof JobRun> {
170178
};
171179
});
172180
}
173-
174-
private parseBody(body: string): Record<string, unknown> {
175-
try {
176-
return JSON.parse(body) as Record<string, unknown>;
177-
} catch {
178-
this.error(t('commands.job.run.invalidBody', 'Invalid JSON body: {{body}}', {body}));
179-
}
180-
}
181181
}

packages/b2c-cli/src/utils/slas/client.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -109,24 +109,6 @@ export abstract class SlasClientCommand<T extends typeof Command> extends OAuthC
109109
}),
110110
};
111111

112-
/**
113-
* Get the SLAS client, ensuring short code is configured.
114-
*/
115-
protected getSlasClient(): SlasClient {
116-
const {shortCode} = this.resolvedConfig;
117-
if (!shortCode) {
118-
this.error(
119-
t(
120-
'error.shortCodeRequired',
121-
'SCAPI short code required. Provide --short-code, set SFCC_SHORTCODE, or configure short-code in dw.json.',
122-
),
123-
);
124-
}
125-
126-
const oauthStrategy = this.getOAuthStrategy();
127-
return createSlasClient({shortCode}, oauthStrategy);
128-
}
129-
130112
/**
131113
* Ensure tenant exists, creating it if necessary.
132114
* This is required before creating SLAS clients.
@@ -193,4 +175,22 @@ export abstract class SlasClientCommand<T extends typeof Command> extends OAuthC
193175
this.log(t('commands.slas.client.create.tenantCreated', 'SLAS tenant created successfully.'));
194176
}
195177
}
178+
179+
/**
180+
* Get the SLAS client, ensuring short code is configured.
181+
*/
182+
protected getSlasClient(): SlasClient {
183+
const {shortCode} = this.resolvedConfig;
184+
if (!shortCode) {
185+
this.error(
186+
t(
187+
'error.shortCodeRequired',
188+
'SCAPI short code required. Provide --short-code, set SFCC_SHORTCODE, or configure short-code in dw.json.',
189+
),
190+
);
191+
}
192+
193+
const oauthStrategy = this.getOAuthStrategy();
194+
return createSlasClient({shortCode}, oauthStrategy);
195+
}
196196
}

packages/b2c-cli/test/functional/e2e_cli_test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ cleanup() {
4141

4242
# Delete sandbox if it was created
4343
if [ -n "$ODS_ID" ]; then
44-
echo "skipping Deleting sandbox: $ODS_ID"
45-
#$CLI ods delete "$ODS_ID" --force || true
44+
echo "Deleting sandbox: $ODS_ID"
45+
$CLI ods delete "$ODS_ID" --force || true
4646
fi
4747

4848
exit $exit_code

packages/b2c-dx-mcp/src/server.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ export class B2CDxMcpServer extends McpServer {
7070
const startTime = Date.now();
7171
const result = await handler(args);
7272
// TODO: Telemetry - Send TOOL_CALLED event with { name, _runtimeMs, isError: result.isError }
73-
// @ts-expect-error Ignore unused variable
7473
const _runtimeMs = Date.now() - startTime;
7574

7675
return result;

0 commit comments

Comments
 (0)