Add config option for whitelisting custom schemas#225
Merged
rscarson merged 2 commits intorscarson:masterfrom Oct 16, 2024
Merged
Add config option for whitelisting custom schemas#225rscarson merged 2 commits intorscarson:masterfrom
rscarson merged 2 commits intorscarson:masterfrom
Conversation
Owner
|
Looks great!! Thanks!! |
Contributor
Author
No problem. Updated now :) |
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.
Hello,
Thanks for this crate. Great to see such a feature-complete implementation!
I'm porting my code from my bespoke/spaghetti
deno_coreruntime over to this crate and have hit a snag WRT to loader permissions.Using regular
deno_coreI was able to define extensions like the following:These extensions could then be used inside user-provided runtime code like:
However, in
rustyscripttheInnerLoaderpermissions checker will error withError: Runtime("unrecognized schema for module import: proven:sessions")unless the module begins withext:.Switching the extension to use
ext:sessionsalso results indeno_core[correctly] throwingError: Runtime("Importing ext: modules is only allowed from ext: and node: modules.").This pull request creates an additional runtime option which allows such custom schemas to be whitelisted. Allowing for a similar setup to
deno_core. E.g.Thanks again!