inso cli scripting first pass - #7790
Merged
Merged
Conversation
|
|
||
| const evalInterceptor = (script: string) => { | ||
| invariant(script && typeof script === 'string', 'eval is called with invalid or empty value'); | ||
| const result = eval(script); |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: javascript.browser.security.eval-detected.eval-detected
filfreire
previously approved these changes
Aug 2, 2024
jackkav
marked this pull request as draft
August 5, 2024 10:28
jackkav
marked this pull request as ready for review
August 5, 2024 10:44
filfreire
previously approved these changes
Aug 5, 2024
jackkav
force-pushed
the
cli-script-first-pass
branch
from
August 5, 2024 14:28
a5901e5 to
58219f9
Compare
filfreire
force-pushed
the
cli-script-first-pass
branch
from
August 13, 2024 14:48
58219f9 to
802109e
Compare
Contributor
Author
|
The major contention of this pass
My preference would be to use matching execution contexts so that cli task execution results would always match the UI. |
ihexxa
reviewed
Aug 26, 2024
ihexxa
left a comment
Contributor
There was a problem hiding this comment.
The first seems working and just have some minor comments.
| } | ||
| expect(result.code).toBe(0); | ||
| describe('exit codes are consistent', () => { | ||
| it.each(shouldReturnSuccessCode)('exit code should be 0: %p', async input => { |
Contributor
There was a problem hiding this comment.
👍 Table driven test looks pretty neat.
| } | ||
| }); | ||
|
|
||
| // This function is duplicated in scriptExecutor.ts to run in nodejs |
Contributor
There was a problem hiding this comment.
I would propose to consider this after the executing mechanism in the CLI side has been proved working well.
filfreire
approved these changes
Aug 26, 2024
jackkav
force-pushed
the
cli-script-first-pass
branch
from
August 27, 2024 09:23
9e72cf4 to
68a2002
Compare
jackkav
enabled auto-merge (squash)
August 27, 2024 09:30
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
motivation: incrementally extend cli features to match app
aim: add the simplest possible implementation which will allow a header to be added by a pre request script, to be confirmed with a test which will rely upon on the script modifying the request
reviewer note
consider running bundle tests against build
consider refactoring opportunities
theres a high chance of future inconsistency with hidden window implementation
future work
closes INS-4144