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: make asarmor.write() return the Promise #10

Merged
merged 1 commit into from Apr 25, 2021
Merged

feat: make asarmor.write() return the Promise #10

merged 1 commit into from Apr 25, 2021

Conversation

klren0312
Copy link
Contributor

Can do other things, after the asar file generated

like this example:
I can access the asar file that had generated

const { Asarmor, Trashify } = require('./build/src')
const fs = require('fs')
const fun = async () => {
  try {
    const asarPath = 'app.asar'
    console.log(`applying asarmor protections to ${asarPath}`)
    const asarmor = new Asarmor(asarPath)
    asarmor.applyProtection(new Trashify(['.git', '.env']))
    await asarmor.write('app11.asar')
    console.log(fs.readFileSync('app11.asar'))
  } catch (err) {
    console.error(err)
  }
}
fun()

Can do other things, after the asar file generated
@sleeyax
Copy link
Owner

sleeyax commented Apr 25, 2021

Looks good, thanks! I'll update docs and publish new minor version afterwards.

@sleeyax sleeyax merged commit 936b8ca into sleeyax:master Apr 25, 2021
@klren0312 klren0312 deleted the patch-1 branch April 26, 2021 04:00
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.

None yet

2 participants