You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We possibly might want to do this by changing the interface of ldp, such that it accepts URLs rather than filenames. Then, ldp itself can call LegacyResourceMapper instead of requiring all of its callers to do that.
@rubensworks if you're going to edit lib/utils.js, maybe it's a good time those functions to a utility-file in lib/common? Trying to make methods a bit more reusable by putting them in more explicitly named utility-files.
Note that there is stuff in the #911 that is in lib/utils.js too, and it would be nice to avoid conflicts. Not sure we should do that now, perhaps post-5.0.0 if needed?
Activity
RubenVerborgh commentedon May 3, 2018
We possibly might want to do this by changing the interface of
ldp, such that it accepts URLs rather than filenames. Then,ldpitself can callLegacyResourceMapperinstead of requiring all of its callers to do that.RubenVerborgh commentedon Aug 21, 2018
Working on this in https://github.com/solid/node-solid-server/tree/feature/wire-legacy-resource-mapper
rubensworks commentedon Nov 14, 2018
Ok, I'm working on this issue now.
I'm still relatively new to the codebase, so I could use some input on where I could find calls that should be changed.
So far, I see the following:
util.js/uriToFileName()util.js/uriToRelativeFilename()reqToPathutil.js/getBaseUri()util.js/getFullUri()I assume there may be others as well?
RubenVerborgh commentedon Nov 14, 2018
megoth commentedon Nov 14, 2018
@rubensworks if you're going to edit
lib/utils.js, maybe it's a good time those functions to a utility-file inlib/common? Trying to make methods a bit more reusable by putting them in more explicitly named utility-files.rubensworks commentedon Nov 14, 2018
@megoth The plan is actually to remove as much as possible from
lib/utils.js:-) In favor of the new methods ofResourceMapper.But the remaining functions could indeed be moved to
lib/commonafterwards.kjetilk commentedon Nov 14, 2018
Note that there is stuff in the #911 that is in
lib/utils.jstoo, and it would be nice to avoid conflicts. Not sure we should do that now, perhaps post-5.0.0 if needed?rubensworks commentedon Nov 14, 2018
I assume #911 will be merged before this refactor is done, so I'll have to rebase in any case.
rubensworks commentedon Nov 20, 2018
Done in #952.