Skip to content

feat(ts-lib): Handle single files / recursively handle directories - #554

Merged
dannyvassallo merged 2 commits into
aws-cloudformation:mainfrom
dannyvassallo:ts-lib-files-dirs
Aug 30, 2024
Merged

dannyvassallo merged 2 commits into
aws-cloudformation:mainfrom
dannyvassallo:ts-lib-files-dirs

Conversation

@dannyvassallo

Copy link
Copy Markdown
Contributor

Issue #, if available:

547 & 545

Description of changes:

Updated the typescript library to handle single files and files in nested directories.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Comment thread guard/ts-lib/index.ts Outdated
};

async function readFiles(dirPath: string, supportedExtensions: string[]): Promise<TraversalResult> {
async function readFiles(pathOrFile: string, supportedExtensions: string[]): Promise<TraversalResult> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this should just either be path or dirOrFile (i think path is best)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on it

@mrinaudo-aws mrinaudo-aws left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dannyvassallo
dannyvassallo merged commit 33d9931 into aws-cloudformation:main Aug 30, 2024
@dannyvassallo
dannyvassallo deleted the ts-lib-files-dirs branch August 30, 2024 14:27
joshfried-aws pushed a commit to joshfried-aws/cloudformation-guard that referenced this pull request Nov 22, 2024
…ws-cloudformation#554)

* feat(ts-lib): Handle single files / recursively handle directories on rules and data

* feat(ts-lib): Addressing feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants