adobe / aio-cli-plugin-app

Create, Build and Deploy Cloud Native Applications
Apache License 2.0
19 stars 35 forks source link

fix: ACNA-2561 - app pack command should exclude hidden files #734

Closed shazron closed 11 months ago

shazron commented 11 months ago

Currently the files to be packed are defined by npm pack --dry-run --json and exclusions are defined by the .gitignore file. However, if the app folder does not have .gitignore, certain sensitive files may still be included. This PR will exclude these files no matter what.

These files are excluded from being packed:

  1. any "hidden" file by convention (file that starts with a '.')
  2. any junk file as defined by https://www.npmjs.com/package/junk

How Has This Been Tested?

npm test

Types of changes

Checklist:

codecov[bot] commented 11 months ago

Codecov Report

Merging #734 (834b482) into master (abe5113) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #734   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           57        57           
  Lines         3208      3223   +15     
  Branches       605       607    +2     
=========================================
+ Hits          3208      3223   +15     
Files Coverage Δ
src/commands/app/pack.js 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more