@@ -7,6 +7,12 @@ import { z } from 'zod';
77
88import { consola } from '../lib/logger' ;
99import { getProjectConfig } from '../lib/project-config' ;
10+ import {
11+ accessTokenOption ,
12+ apiHostOption ,
13+ projectUuidOption ,
14+ storeHashOption ,
15+ } from '../lib/shared-options' ;
1016import { Telemetry } from '../lib/telemetry' ;
1117
1218const telemetry = new Telemetry ( ) ;
@@ -279,33 +285,10 @@ export const getDeploymentStatus = async (
279285
280286export 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