Giter Club home page Giter Club logo

Comments (6)

mboudreau avatar mboudreau commented on July 22, 2024 1

@mefellows I'm looking into this one and thinking of adding something in the pact-util file that checks for paths/urls and then normalizes/resolves them if they're valid.

Currently though, we're a bit "laissez-faire" with the path validation as we do some minute checks on it, but nothing too concrete. I do agree that we need to have the ability to check relative vs absolute paths, however, should we also accept path shortcuts like ~/?

Also, when it comes to URLs, should we accept any protocols, or is it locked down to http(s)?

Trying to figure out the best way to do this as to implement it properly.

from pact-js-core.

bethesque avatar bethesque commented on July 22, 2024 1

The paths need to be relative to the directory you run the executable from - that might have been the issue. So you need to invoke the verifier using the relative path from the project root if possible.

Btw, there's an issue to change the paths from options to space separated arguments, so we don't have to do the comma separating thing.

from pact-js-core.

mefellows avatar mefellows commented on July 22, 2024

I don't see why other protocols could not be supported in the long term, i'm not sure what is currently supported beyond file:// and http://.

However I think we don't allow unix/bash/whatever-specific shortcuts like ~. I can't think of a situation where it's going to be terrible, but I can see implementation complexity with little value.

WRT other protocols, all that we need is the URL to be resolvable from the local host, and the Pact verifier to support it.

cc: @bethesque who also has some good knowledge around the verifier and might be able to assist.

from pact-js-core.

bethesque avatar bethesque commented on July 22, 2024

Why not just pass the paths in? The verifier should show an appropriate message. If it doesn't, let's change it to do it. No point duplicating code. The verifier can handle relative paths too, what's the problem you've found?

from pact-js-core.

mefellows avatar mefellows commented on July 22, 2024

Yeah from memory that was the problem, but I'm sure we can find a way to resolve it.

from pact-js-core.

mboudreau avatar mboudreau commented on July 22, 2024

Fixed in 6.15.0.

from pact-js-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.