nodeSolidServer / node-solid-ws

Node/Javascript implementation of Websockets for Solid
http://npm.im/solid-ws
8 stars 6 forks source link

replace basename with dirname #2

Closed melvincarvalho closed 7 years ago

dmitrizagidulin commented 7 years ago

@melvincarvalho - thank you for the PR! Can you tell us a bit more about what it's trying to fix?

melvincarvalho commented 7 years ago

Consider the solid spec, when POSTing to an inbox.

Should something listening on the inbox be notified when a new resource is created?

From what I can tell. The dirname command will notify the parent directory. The basename will notify a string that is not a URI.

dmitrizagidulin commented 7 years ago

👍 , thanks @melvincarvalho! Merging.

CxRes commented 4 years ago

@melvincarvalho could you please explain the if statement in your change? AFAICT parent will never equal req.originalUrl?

var parent = path.dirname(req.originalUrl) + path.sep
if (parent !== req.originalUrl) {
  solidWs.publish(parent)
}

On the other hand you may want to check if you are at server root. Is that the intention?

jaxoncreed commented 4 years ago

NSS will also need a PR to update it's dependency on on this.

CxRes commented 4 years ago

@jaxoncreed May I suggest that you use dependabot on solid repos...