Skip to content

Commit

Permalink
feat: expose applyTagsData for data tags
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha committed Mar 26, 2024
1 parent 3600574 commit 9ec60c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { applyTags } from './tags.js';
export { applyTags, applyTagsData } from './tags.js';
12 changes: 6 additions & 6 deletions src/tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ export function applyTags(construct: IConstruct, ctx: TagsBase): void {

// Security
tag(construct, 'linz:security:classification', ctx.classification);
if (ctx.data) applyTagsData(construct, ctx.data);
}

// Data
if (ctx.data) {
tag(construct, 'linz:data:role', ctx.data.role);
tag(construct, 'linz:data:is-master', String(ctx.data.isMaster ?? false));
tag(construct, 'linz:data:is-public', String(ctx.data.isPublic ?? false));
}
export function applyTagsData(construct: IConstruct, tags: TagsData): void {
tag(construct, 'linz:data:role', tags.role);
tag(construct, 'linz:data:is-master', String(tags.isMaster ?? false));
tag(construct, 'linz:data:is-public', String(tags.isPublic ?? false));
}

0 comments on commit 9ec60c5

Please sign in to comment.