Skip to content

ds-dev import map extra has multiple issues #136

Description

@teleclimber

In import map extras in ds-dev I've observed several issues.

I can't just do this:

{
   "https://deno.land/x/dropserver_app@v0.2.1/":"/Users/ollie/Documents/Code/dropserver_app/"
}

I have to also add self-referencing mapping to get past the sandboxing:

{
	"https://deno.land/x/dropserver_app@v0.2.1/":"/Users/ollie/Documents/Code/dropserver_app/",
	"/Users/ollie/Documents/Code/dropserver_app/": "/Users/ollie/Documents/Code/dropserver_app/"
}

Also, relative paths don't work. The following results in a "not a dir" error which implies that the sandboxing is not being bypassed. Need to think more about the correct to deal. Probably convert rel paths to abs, using the correct base.

{
	"https://deno.land/x/dropserver_app@v0.2.1/":"../../../../Code/dropserver_app/",
	"../../../../Code/dropserver_app/": "../../../../Code/dropserver_app/"
}

Another problem is that ds-dev tries to watch the mapped paths. Good idea, but if the path is not formatted correctly in fatals out. Examples: "file:/some/path" errors because can't create relative path with "/some/path". It will probably also throw an error is it's a relative path and we don't root it correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ds-devissues pertianing to ds-dev command

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions