@@ -2,7 +2,6 @@ import {appFlags} from '../../flags.js'
22import { deploy } from '../../services/deploy.js'
33import { getAppConfigurationState } from '../../models/app/loader.js'
44import { validateVersion } from '../../validations/version-name.js'
5- import { showApiKeyDeprecationWarning } from '../../prompts/deprecation-warnings.js'
65import { validateMessage } from '../../validations/message.js'
76import metadata from '../../metadata.js'
87import AppLinkedCommand , { AppLinkedCommandOutput } from '../../utilities/app-linked-command.js'
@@ -26,12 +25,6 @@ export default class Deploy extends AppLinkedCommand {
2625 static flags = {
2726 ...globalFlags ,
2827 ...appFlags ,
29- 'api-key' : Flags . string ( {
30- hidden : true ,
31- description : 'The API key of your app.' ,
32- env : 'SHOPIFY_FLAG_APP_API_KEY' ,
33- exclusive : [ 'config' ] ,
34- } ) ,
3528 force : Flags . boolean ( {
3629 hidden : false ,
3730 description : 'Deploy without asking for confirmation.' ,
@@ -81,27 +74,22 @@ export default class Deploy extends AppLinkedCommand {
8174 validateVersion ( flags . version )
8275 validateMessage ( flags . message )
8376
84- if ( flags [ 'api-key' ] ) {
85- await showApiKeyDeprecationWarning ( )
86- } else if ( process . env . SHOPIFY_API_KEY ) {
87- flags [ 'api-key' ] = process . env . SHOPIFY_API_KEY
88- }
89- const apiKey = flags [ 'client-id' ] || flags [ 'api-key' ]
77+ const clientId = flags [ 'client-id' ]
9078
9179 await addPublicMetadata ( ( ) => ( {
9280 cmd_app_reset_used : flags . reset ,
9381 } ) )
9482
9583 const requiredNonTTYFlags = [ 'force' ]
9684 const configurationState = await getAppConfigurationState ( flags . path , flags . config )
97- if ( configurationState . state === 'template-only' && ! apiKey ) {
85+ if ( configurationState . state === 'template-only' && ! clientId ) {
9886 requiredNonTTYFlags . push ( 'client-id' )
9987 }
10088 this . failMissingNonTTYFlags ( flags , requiredNonTTYFlags )
10189
10290 const { app, remoteApp, developerPlatformClient, organization} = await linkedAppContext ( {
10391 directory : flags . path ,
104- clientId : apiKey ,
92+ clientId,
10593 forceRelink : flags . reset ,
10694 userProvidedConfigName : flags . config ,
10795 } )
0 commit comments