aws-sdk-js-codemod
Version:
Collection of codemod scripts that help update AWS SDK for JavaScript APIs
12 lines (11 loc) • 550 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getV3ClientPackageName = void 0;
const config_1 = require("../config");
// Returns v3 client package name for the provided v2 client name.
const getV3ClientPackageName = (clientName) => {
if (clientName in config_1.CLIENT_PACKAGE_NAMES_MAP)
return `@aws-sdk/${config_1.CLIENT_PACKAGE_NAMES_MAP[clientName]}`;
throw new Error(`Client '${clientName}' is either deprecated or newly added.`);
};
exports.getV3ClientPackageName = getV3ClientPackageName;