-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/sc 118580/binary inspect bundle #642
Conversation
…naries and zip files that contains assetts
be01162
to
cbceafa
Compare
src/cmd/binary.js
Outdated
|
||
const INVALID_SUFFIX_SIZE = 65535; | ||
const DEFAULT_PRODUCT_ID = 65535; | ||
const DEFAULT_PRODUCT_VERSION = 65535; | ||
let tmpDir; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am creating a temporary directory on-the-spot and deleting it at the end of the operation. I tried using the test/lib/env.js
directory, however, the e2e tests are unable to pick up the env.js module if I am using relative path and they fail with error
particle-cli-3.10.2.tgz
Binary Commands
✓ Shows `help` content (3548ms)
✓ Shows `help` content when run without arguments (352ms)
✓ Shows `help` content when run with `--help` flag (363ms)
Binary Inspect Subcommand
stdout Cannot find module '../../test/lib/env'
Require stack:
- /Users/keerthyamisagadda/code/particle-cli/test/__fixtures__/pkg/node_modules/particle-cli/src/cmd/binary.js
- /Users/keerthyamisagadda/code/particle-cli/test/__fixtures__/pkg/node_modules/particle-cli/src/cli/binary.js
- /Users/keerthyamisagadda/code/particle-cli/test/__fixtures__/pkg/node_modules/particle-cli/src/cli/index.js
- /Users/keerthyamisagadda/code/particle-cli/test/__fixtures__/pkg/node_modules/particle-cli/src/app/cli.js
- /Users/keerthyamisagadda/code/particle-cli/test/__fixtures__/pkg/node_modules/particle-cli/src/index.js
Is it recommended to use the test/
directories from the source file? Any recommendations are appreciated if the current implementation looks unfavorable.
|
||
const parser = new Parser(); | ||
async _checkFile(file) { | ||
// TODO: what happens if this is removed? What kind of error do we get? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check what happens without the file existance check for binary inspect on a .bin and on a .zip? If the error is reasonable, remove this function. If not, keep it and remove the comment.
Description
Adds support to bundle assets and application binary from the project folder
Usage
Example
All the other legacy use cases should be supported as-is.
How to Test
git pull && git checkout feature/sc-118580/binary-inspect-bundle
nvm use
npm run reinstall
npm test
Related Issues / Discussions
https://app.shortcut.com/particle/story/118580/extract-and-analyze-asset-information-from-binary-inspect-command
Completeness