Skip to content

URL not allowing all URLs #79

Description

@victorb

URL option does not allow us to pass options like www.ipfsbin.xyz because it's checking the TLD to match some arbitrary set of TLDs.

Example code:

#!/usr/bin/env node

var cli = require('../')

cli.parse({
  url: ['url', 'An URL', 'url'],
  secondurl: ['secondurl', 'An URL', 'url']
})

cli.main(function (args, options) {
  console.log(args)
  console.log(options)
})

Run with ./script.js --url something.xyz and options should include that URL but currently throws an exception instead...

Started trying to add something but saw a really scary regex for domain validation and secondly no tests so gave up pretty quickly. But wanted to let you know at least...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions