Skip to content

Commit

Permalink
fix: Deployment using serverless-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
timo92 committed Jul 18, 2024
1 parent e99c51a commit 1b7f47f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/resources/Schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,11 @@ export class Schema {
}

generateSchema() {
const schemaFiles = flatten(globby.sync(this.schemas));
const cwd = this.api.plugin.serverless.config.servicePath;
const schemaFiles = flatten(globby.sync(this.schemas, { cwd }));

const schemas = schemaFiles.map((file) => {
return fs.readFileSync(
path.join(this.api.plugin.serverless.config.servicePath, file),
'utf8',
);
return fs.readFileSync(path.join(cwd, file), 'utf8');
});

this.valdiateSchema(AWS_TYPES + '\n' + schemas.join('\n'));
Expand Down

0 comments on commit 1b7f47f

Please sign in to comment.