refactor: Use getCompiledTemplateS3Suffix from provider.naming

This makes sure that the specific `naming` instance really is the "source of truth".
This commit is contained in:
Andreas Kohn 2021-09-10 12:03:07 +02:00 committed by GitHub
parent f431218790
commit 95d3024ef5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,5 @@
'use strict';
const getCompiledTemplateS3Suffix = require('../../lib/naming').getCompiledTemplateS3Suffix;
const getS3EndpointForRegion = require('../../utils/getS3EndpointForRegion');
const ServerlessError = require('../../../../serverless-error');
@ -8,7 +7,7 @@ module.exports = {
async validateTemplate() {
const bucketName = this.bucketName;
const artifactDirectoryName = this.serverless.service.package.artifactDirectoryName;
const compiledTemplateFileName = getCompiledTemplateS3Suffix();
const compiledTemplateFileName = this.provider.naming.getCompiledTemplateS3Suffix();
const s3Endpoint = getS3EndpointForRegion(this.provider.getRegion());
this.serverless.cli.log('Validating template...');
const params = {