Skip to content
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

feat: changes for native packaging #5548

Merged
merged 1 commit into from
Oct 15, 2020

Conversation

edwardfoyle
Copy link
Contributor

The following are some workarounds required to package the CLI using pkg

  • esm is not supported
  • fs.copyFile and fs.copyFileSync are not supported
  • An additional directory in the snapshot filesystem needs to be scanned for plugins

There are a couple other changes needed to the CLI to support packaging, but in the spirit of keeping PRs small, I'm publishing this one.

Also note, all of the changes in functionality in this PR are behind and "isPackaged" check which is only true when the CLI is running as a packaged binary. There are no changes in functionality when the CLI is running in Node

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

@codecov
Copy link

codecov bot commented Oct 9, 2020

Codecov Report

Merging #5548 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5548   +/-   ##
=======================================
  Coverage   59.08%   59.09%           
=======================================
  Files         402      403    +1     
  Lines       18043    18045    +2     
  Branches     3575     3575           
=======================================
+ Hits        10661    10663    +2     
  Misses       6723     6723           
  Partials      659      659           
Impacted Files Coverage Δ
packages/amplify-cli/src/domain/constants.ts 100.00% <ø> (ø)
packages/amplify-cli-core/src/index.ts 100.00% <100.00%> (ø)
packages/amplify-cli-core/src/isPackaged.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c932d6f...2922aee. Read the comment docs.

Copy link
Contributor

@attilah attilah left a comment

Choose a reason for hiding this comment

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

LGTM, one nit

packages/amplify-cli/bin/amplify Show resolved Hide resolved
@edwardfoyle edwardfoyle merged commit 7a06f6d into aws-amplify:master Oct 15, 2020
r0zar pushed a commit to r0zar/amplify-cli that referenced this pull request Nov 19, 2020
@github-actions
Copy link

This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants