Skip to content

Commit

Permalink
fixed issue where wildcard actions conflicted with explicit actions
Browse files Browse the repository at this point in the history
  • Loading branch information
joshheyse committed Feb 16, 2021
1 parent 6a39f10 commit ffeb711
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion packages/aws-policies/src/chime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export enum chime {
Add = 'chime:Add*',
Associate = 'chime:Associate*',
Batch = 'chime:Batch*',
Connect = 'chime:Connect*',
Create = 'chime:Create*',
Delete = 'chime:Delete*',
Describe = 'chime:Describe*',
Expand Down
1 change: 0 additions & 1 deletion packages/aws-policies/src/timestream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export enum timestream {
Delete = 'timestream:Delete*',
Describe = 'timestream:Describe*',
List = 'timestream:List*',
Select = 'timestream:Select*',
Update = 'timestream:Update*',
CancelQuery = 'timestream:CancelQuery',
CreateDatabase = 'timestream:CreateDatabase',
Expand Down
3 changes: 1 addition & 2 deletions packages/generator/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async function main() {
const groups = _.groupBy(uniqActions, a => getFirstWord(a));

const wildcardActions = _.compact(_.map(groups, (v, k) => {
if(v.length > 1) {
if(v.length > 1 && v.indexOf(k) === -1) {
return {name: k, value: `${k}*`};
}
return null;
Expand All @@ -94,7 +94,6 @@ async function main() {
}), _.identity);

Promise.all(_.map(services, async (v) => {
console.log(v);
const code = enum_template(v);
await fs.promises.writeFile(path.join(outDir, `${v.name}.ts`), code);
}));
Expand Down

0 comments on commit ffeb711

Please sign in to comment.