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

Make url point to the entry script #53

Closed
caspervonb opened this issue Nov 23, 2015 · 6 comments
Closed

Make url point to the entry script #53

caspervonb opened this issue Nov 23, 2015 · 6 comments

Comments

@caspervonb
Copy link
Contributor

Hey @jkrems.

Minor nit issue, /json/list returns file://(...)/node_modules/bugger/lib/io-thread/index.js as the url. Would make more sense if it returned the entry script?

@jkrems
Copy link
Collaborator

jkrems commented Nov 23, 2015

Nice catch! Yeah, that sounds like a bug.

@caspervonb
Copy link
Contributor Author

Hm been digging around a bit but not to sure how to pass data in to the io-thread? process.title should probably be reflected in the page title, and the resolved module.filename as the url.

@jkrems
Copy link
Collaborator

jkrems commented Nov 25, 2015

My thought was to use the (fake) "argv" like it's currently used for port. As long as it's primitive values like strings, that should work. It might start to become a little confusing when it's too many positional arguments, but so far it would be just three (port, process.title, mainModule.filename).

@caspervonb
Copy link
Contributor Author

Sounds good, I was actually expecting it to be in process.argv[1] since port was in argv[2] but that had the real value ;)

@jkrems
Copy link
Collaborator

jkrems commented Nov 25, 2015

Yeah, the behavior of the io thread ("it pretends to be a separate node process but actually isn't") takes some getting used to. I just blindly copied the pattern from how the debug API in node itself is implemented.

@caspervonb
Copy link
Contributor Author

Fixed in a51a699

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 a pull request may close this issue.

2 participants