-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transform client type for updated client names (#827)
- Loading branch information
Showing
14 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"aws-sdk-js-codemod": patch | ||
--- | ||
|
||
Replace client type reference if client names are different in v2 and v3 |
5 changes: 5 additions & 0 deletions
5
src/transforms/v2-to-v3/__fixtures__/new-client-type/global-import-equals.input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import AWS = require("aws-sdk"); | ||
|
||
let accessAnalyzerClient: AWS.AccessAnalyzer; | ||
let discoveryClient: AWS.Discovery; | ||
let acmClient: AWS.ACM; |
10 changes: 10 additions & 0 deletions
10
src/transforms/v2-to-v3/__fixtures__/new-client-type/global-import-equals.output.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import AWS_client_accessanalyzer = require("@aws-sdk/client-accessanalyzer"); | ||
import AccessAnalyzer = AWS_client_accessanalyzer.AccessAnalyzer; | ||
import AWS_client_acm = require("@aws-sdk/client-acm"); | ||
import ACM = AWS_client_acm.ACM; | ||
import AWS_client_application_discovery_service = require("@aws-sdk/client-application-discovery-service"); | ||
import ApplicationDiscoveryService = AWS_client_application_discovery_service.ApplicationDiscoveryService; | ||
|
||
let accessAnalyzerClient: AccessAnalyzer; | ||
let discoveryClient: ApplicationDiscoveryService; | ||
let acmClient: ACM; |
5 changes: 5 additions & 0 deletions
5
src/transforms/v2-to-v3/__fixtures__/new-client-type/global-import.input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import AWS from "aws-sdk"; | ||
|
||
let accessAnalyzerClient: AWS.AccessAnalyzer; | ||
let discoveryClient: AWS.Discovery; | ||
let acmClient: AWS.ACM; |
7 changes: 7 additions & 0 deletions
7
src/transforms/v2-to-v3/__fixtures__/new-client-type/global-import.output.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { AccessAnalyzer } from "@aws-sdk/client-accessanalyzer"; | ||
import { ACM } from "@aws-sdk/client-acm"; | ||
import { ApplicationDiscoveryService } from "@aws-sdk/client-application-discovery-service"; | ||
|
||
let accessAnalyzerClient: AccessAnalyzer; | ||
let discoveryClient: ApplicationDiscoveryService; | ||
let acmClient: ACM; |
7 changes: 7 additions & 0 deletions
7
src/transforms/v2-to-v3/__fixtures__/new-client-type/service-import-deep.input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import AccessAnalyzer from "aws-sdk/clients/accessanalyzer"; | ||
import Discovery from "aws-sdk/clients/discovery"; | ||
import ACM from "aws-sdk/clients/acm"; | ||
|
||
let accessAnalyzerClient: AccessAnalyzer; | ||
let discoveryClient: Discovery; | ||
let acmClient: ACM; |
7 changes: 7 additions & 0 deletions
7
src/transforms/v2-to-v3/__fixtures__/new-client-type/service-import-deep.output.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { AccessAnalyzer } from "@aws-sdk/client-accessanalyzer"; | ||
import { ACM } from "@aws-sdk/client-acm"; | ||
import { ApplicationDiscoveryService } from "@aws-sdk/client-application-discovery-service"; | ||
|
||
let accessAnalyzerClient: AccessAnalyzer; | ||
let discoveryClient: ApplicationDiscoveryService; | ||
let acmClient: ACM; |
7 changes: 7 additions & 0 deletions
7
src/transforms/v2-to-v3/__fixtures__/new-client-type/service-import-equals.input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import AccessAnalyzer = require("aws-sdk/clients/accessanalyzer"); | ||
import Discovery = require("aws-sdk/clients/discovery"); | ||
import ACM = require("aws-sdk/clients/acm"); | ||
|
||
let accessAnalyzerClient: AccessAnalyzer; | ||
let discoveryClient: Discovery; | ||
let acmClient: ACM; |
10 changes: 10 additions & 0 deletions
10
src/transforms/v2-to-v3/__fixtures__/new-client-type/service-import-equals.output.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import AWS_client_accessanalyzer = require("@aws-sdk/client-accessanalyzer"); | ||
import AccessAnalyzer = AWS_client_accessanalyzer.AccessAnalyzer; | ||
import AWS_client_acm = require("@aws-sdk/client-acm"); | ||
import ACM = AWS_client_acm.ACM; | ||
import AWS_client_application_discovery_service = require("@aws-sdk/client-application-discovery-service"); | ||
import ApplicationDiscoveryService = AWS_client_application_discovery_service.ApplicationDiscoveryService; | ||
|
||
let accessAnalyzerClient: AccessAnalyzer; | ||
let discoveryClient: ApplicationDiscoveryService; | ||
let acmClient: ACM; |
9 changes: 9 additions & 0 deletions
9
src/transforms/v2-to-v3/__fixtures__/new-client-type/service-import-with-name.input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { | ||
AccessAnalyzer as AccessAnalyzerClient, | ||
Discovery as DiscoveryClient, | ||
ACM as ACMClient | ||
} from "aws-sdk"; | ||
|
||
let accessAnalyzerClient: AccessAnalyzerClient; | ||
let discoveryClient: DiscoveryClient; | ||
let acmClient: ACMClient; |
7 changes: 7 additions & 0 deletions
7
src/transforms/v2-to-v3/__fixtures__/new-client-type/service-import-with-name.output.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { AccessAnalyzer as AccessAnalyzerClient } from "@aws-sdk/client-accessanalyzer"; | ||
import { ACM as ACMClient } from "@aws-sdk/client-acm"; | ||
import { ApplicationDiscoveryService as DiscoveryClient } from "@aws-sdk/client-application-discovery-service"; | ||
|
||
let accessAnalyzerClient: AccessAnalyzerClient; | ||
let discoveryClient: DiscoveryClient; | ||
let acmClient: ACMClient; |
5 changes: 5 additions & 0 deletions
5
src/transforms/v2-to-v3/__fixtures__/new-client-type/service-import.input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { AccessAnalyzer, Discovery, ACM } from "aws-sdk"; | ||
|
||
let accessAnalyzerClient: AccessAnalyzer; | ||
let discoveryClient: Discovery; | ||
let acmClient: ACM; |
7 changes: 7 additions & 0 deletions
7
src/transforms/v2-to-v3/__fixtures__/new-client-type/service-import.output.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { AccessAnalyzer } from "@aws-sdk/client-accessanalyzer"; | ||
import { ACM } from "@aws-sdk/client-acm"; | ||
import { ApplicationDiscoveryService } from "@aws-sdk/client-application-discovery-service"; | ||
|
||
let accessAnalyzerClient: AccessAnalyzer; | ||
let discoveryClient: ApplicationDiscoveryService; | ||
let acmClient: ACM; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters