11import { Collection , JSCodeshift } from "jscodeshift" ;
22
3- import { FUNCTION_TYPE_LIST } from "../config" ;
3+ import { FUNCTION_TYPE_LIST , S3 } from "../config" ;
4+ import { ClientIdentifier } from "../types" ;
45import { getClientApiCallExpression } from "./getClientApiCallExpression" ;
5- import { getClientIdentifiers } from "./getClientIdentifiers" ;
66import { getClientWaiterCallExpression } from "./getClientWaiterCallExpression" ;
77import { getClientWaiterStates } from "./getClientWaiterStates" ;
88
99export interface CommentsForUnsupportedAPIsOptions {
1010 v2ClientName : string ;
11- v2ClientLocalName : string ;
12- v2GlobalName ?: string ;
11+ clientIdentifiers : ClientIdentifier [ ] ;
1312}
1413
1514export const addNotSupportedClientComments = (
1615 j : JSCodeshift ,
1716 source : Collection < unknown > ,
1817 options : CommentsForUnsupportedAPIsOptions
1918) : void => {
20- const clientIdentifiers = getClientIdentifiers ( j , source , options ) ;
19+ const { v2ClientName , clientIdentifiers } = options ;
2120
2221 for ( const clientId of clientIdentifiers ) {
23- const waiterStates = getClientWaiterStates ( j , source , options ) ;
22+ const waiterStates = getClientWaiterStates ( j , source , clientIdentifiers ) ;
2423
2524 for ( const waiterState of waiterStates ) {
2625 source
@@ -46,7 +45,7 @@ export const addNotSupportedClientComments = (
4645 }
4746 }
4847
49- if ( options . v2ClientName === "S3" ) {
48+ if ( v2ClientName === S3 ) {
5049 for ( const clientId of clientIdentifiers ) {
5150 const apiMetadata = [
5251 {
0 commit comments