Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v6 registry issues #78

Open
oliverfoster opened this issue Oct 9, 2017 · 2 comments
Open

v6 registry issues #78

oliverfoster opened this issue Oct 9, 2017 · 2 comments
Assignees

Comments

@oliverfoster
Copy link
Member

oliverfoster commented Oct 9, 2017

https://github.com/adaptlearning/adapt-cli/blob/issue/v4/lib/Constants.js#L36 can drop the .publish

this means we can have multiple search registries.

function getRegistry() {
    if (process.env.ADAPT_REGISTRY) return process.env.ADAPT_REGISTRY;
    if (fs.existsSync('./.bowerrc')) { // ./adapt-pluginfolder
        return JSON.parse(fs.readFileSync('./.bowerrc').toString()).registry;
    }
    if (fs.existsSync('../../.bowerrc')) { // ../../adapt-pluginfolder
        return JSON.parse(fs.readFileSync('../../.bowerrc').toString()).registry;
    }
    return 'http://adapt-bower-repository.herokuapp.com/';
}

https://github.com/adaptlearning/adapt-cli/blob/issue/v4/lib/commands/register.js#L17 < would need to updated accordingly

this allows for:

{
  "directory": "src",
  "registry": {
    "register": "http://adapt-bower-repository-v4.herokuapp.com/",
    "search": [
        "http://adapt-bower-repository-v4.herokuapp.com/",
        "http://adapt-bower-repository.herokuapp.com/"
    ]
  }
}
@chris-steele
Copy link
Contributor

@oliverfoster I like this idea. So just to confirm, we'd need to update the various commands (install, register, search etc) to check for two main cases: in the first case registry is just a string; in the second case registry is a hash of paths to use for each of the various commands (we'd need a default path presumably so that there isn't the need to provide paths for every command?)

@oliverfoster
Copy link
Member Author

or make sure it's always an object up front and change everything else accordingly? save having type switching logic in all the commands?

@oliverfoster oliverfoster changed the title v4 registry issues v6 registry issues Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants