aws-sdk-js-codemod
Version:
Collection of codemod scripts that help update AWS SDK for JavaScript APIs
13 lines (12 loc) • 791 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getClientNamesFromGlobal = void 0;
const config_1 = require("../config");
const getNamesFromNewExpr_1 = require("./getNamesFromNewExpr");
const getNamesFromTSQualifiedName_1 = require("./getNamesFromTSQualifiedName");
const getClientNamesFromGlobal = (j, source, v2GlobalName) => {
const namesFromNewExpr = (0, getNamesFromNewExpr_1.getNamesFromNewExpr)(j, source, v2GlobalName);
const namesFromTSQualifiedName = (0, getNamesFromTSQualifiedName_1.getNamesFromTSQualifiedName)(j, source, v2GlobalName);
return [...new Set([...namesFromNewExpr, ...namesFromTSQualifiedName])].filter((name) => config_1.CLIENT_NAMES.includes(name));
};
exports.getClientNamesFromGlobal = getClientNamesFromGlobal;