Skip to content

Commit f778fef

Browse files
committed
CATALYST-1718: Add catalyst logs command to the CLI
1 parent 477de19 commit f778fef

7 files changed

Lines changed: 908 additions & 79 deletions

File tree

packages/catalyst/src/cli/commands/deploy.ts

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ import { z } from 'zod';
77

88
import { consola } from '../lib/logger';
99
import { getProjectConfig } from '../lib/project-config';
10+
import {
11+
accessTokenOption,
12+
apiHostOption,
13+
projectUuidOption,
14+
storeHashOption,
15+
} from '../lib/shared-options';
1016
import { Telemetry } from '../lib/telemetry';
1117

1218
const telemetry = new Telemetry();
@@ -279,33 +285,10 @@ export const getDeploymentStatus = async (
279285

280286
export const deploy = new Command('deploy')
281287
.description('Deploy your application to Cloudflare.')
282-
.addOption(
283-
new Option(
284-
'--store-hash <hash>',
285-
'BigCommerce store hash. Can be found in the URL of your store Control Panel.',
286-
)
287-
.env('BIGCOMMERCE_STORE_HASH')
288-
.makeOptionMandatory(),
289-
)
290-
.addOption(
291-
new Option(
292-
'--access-token <token>',
293-
'BigCommerce access token. Can be found after creating a store-level API account.',
294-
)
295-
.env('BIGCOMMERCE_ACCESS_TOKEN')
296-
.makeOptionMandatory(),
297-
)
298-
.addOption(
299-
new Option('--api-host <host>', 'BigCommerce API host. The default is api.bigcommerce.com.')
300-
.env('BIGCOMMERCE_API_HOST')
301-
.default('api.bigcommerce.com'),
302-
)
303-
.addOption(
304-
new Option(
305-
'--project-uuid <uuid>',
306-
'BigCommerce intrastructure project UUID. Can be found via the BigCommerce API (GET /v3/infrastructure/projects).',
307-
).env('BIGCOMMERCE_PROJECT_UUID'),
308-
)
288+
.addOption(storeHashOption().makeOptionMandatory())
289+
.addOption(accessTokenOption().makeOptionMandatory())
290+
.addOption(apiHostOption())
291+
.addOption(projectUuidOption())
309292
.addOption(
310293
new Option(
311294
'--secret <secrets...>',

0 commit comments

Comments
 (0)