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

Add missing ioncube commands #37

Merged
merged 6 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 'Close stale issues and PRs'

on:
schedule:
- cron: '30 1 * * *'

permissions:
contents: write
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message:
'This issue is stale because it has been open 30 days with no
activity. Remove stale label or comment or this will be closed in 5
days.'
stale-pr-message:
'This PR is stale because it has been open 45 days with no activity.
Remove stale label or comment or this will be closed in 10 days.'
close-issue-message:
'This issue was closed because it has been stalled for 5 days with
no activity.'
close-pr-message:
'This PR was closed because it has been stalled for 10 days with no
activity.'
days-before-issue-stale: 30
days-before-pr-stale: 45
days-before-issue-close: 5
days-before-pr-close: 10
stale-issue-label: 'no-issue-activity'
exempt-issue-labels: 'awaiting-approval,work-in-progress'
stale-pr-label: 'no-pr-activity'
exempt-pr-labels: 'awaiting-approval,work-in-progress'
exempt-issue-milestones: 'future,alpha,beta'
exempt-pr-milestones: 'bugfix,improvement'
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
![Banner](banner.png)

[![Check Transpiled JavaScript](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/check-dist.yml/badge.svg)](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/check-dist.yml)
[![CI](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/ci.yml/badge.svg)](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/ci.yml)
[![GitHub Super-Linter](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/linter.yml/badge.svg)](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/linter.yml)
[![CodeQL](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/codeql-analysis.yml)
Expand Down Expand Up @@ -139,6 +138,19 @@ jobs:
false)_
- **_callback-file_**: File to validate manually when license is invalid.
_(default: false)_
- **_create-target_**: Mode to create target file/directory if not exists.
_(default: false)_
- **_replace-target_**: Mode to replace target file/directory if not exists.
_(default: false)_
- **_copy_**: Path of files to just copy without encrypt or encode. _(default:
'')_
- **_ignore_**: Path of files to just ignore on ioncube walkthrough. _(default:
'')_
- **_skip_**: Path of files to just skip on ioncube walkthrough. _(default: '')_
- **_obfuscate_**: PHP entities to obfuscate:
all,locals,functions,methods,classes,linenos,none. _(default: 'none')_
- **_obfuscation-key_**: Key to obfuscation method to apply on PHP entities.
_(default: '')_

<hr>

Expand Down
52 changes: 46 additions & 6 deletions __tests__/main.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,26 @@ describe('action', () => {
17,
'Using callback file in runtime path: NONE'
)
expect(debugMock).toHaveBeenNthCalledWith(18, 'Adding copy path: NONE')
expect(debugMock).toHaveBeenNthCalledWith(19, 'Adding ignore path: NONE')
expect(debugMock).toHaveBeenNthCalledWith(20, 'Adding a path to skip: NONE')
expect(debugMock).toHaveBeenNthCalledWith(
21,
'Input for obfuscate option is not valid!'
)
expect(debugMock).toHaveBeenNthCalledWith(
22,
'Using obfuscate option: none'
)
expect(debugMock).toHaveBeenNthCalledWith(
23,
'Adding obfuscation-key path: NONE'
)

// No errors
expect(debugMock).toHaveBeenNthCalledWith(18, 0)
expect(debugMock).toHaveBeenNthCalledWith(19, '')
expect(debugMock).toHaveBeenNthCalledWith(20, '')
expect(debugMock).toHaveBeenNthCalledWith(24, 0)
expect(debugMock).toHaveBeenNthCalledWith(25, '')
expect(debugMock).toHaveBeenNthCalledWith(26, '')

expect(setOutputMock).toHaveBeenCalledWith(
'status',
Expand Down Expand Up @@ -128,11 +143,36 @@ describe('action', () => {
17,
'Using callback file in runtime path: public/ioncube.php'
)
expect(debugMock).toHaveBeenNthCalledWith(
18,
'Creating target file/directory if not exists'
)
expect(debugMock).toHaveBeenNthCalledWith(
19,
'Replacing target file/directory'
)
expect(debugMock).toHaveBeenNthCalledWith(20, 'Adding copy path: NONE')
expect(debugMock).toHaveBeenNthCalledWith(
21,
'Adding ignore path: */cache/*'
)
expect(debugMock).toHaveBeenNthCalledWith(
22,
'Adding a path to skip: */vendor/*'
)
expect(debugMock).toHaveBeenNthCalledWith(
23,
'Using obfuscate option: classes'
)
expect(debugMock).toHaveBeenNthCalledWith(
24,
'Adding obfuscation-key path: CHANGEME'
)

// No errors
expect(debugMock).toHaveBeenNthCalledWith(18, 0)
expect(debugMock).toHaveBeenNthCalledWith(19, '')
expect(debugMock).toHaveBeenNthCalledWith(20, '')
expect(debugMock).toHaveBeenNthCalledWith(25, 0)
expect(debugMock).toHaveBeenNthCalledWith(26, '')
expect(debugMock).toHaveBeenNthCalledWith(27, '')

expect(setOutputMock).toHaveBeenCalledWith(
'status',
Expand Down
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading