availity-workflow icon indicating copy to clipboard operation
availity-workflow copied to clipboard

Privately hosted templates are not supported

Open djejaquino opened this issue 4 years ago • 2 comments

🐛 Bug report

Current Behavior

Running a npx @availity/worflow init command with -t or --template parameter, using a privately hosted starter will abort the process.

Expected behavior

To successfully initialize an updated workflow-based project.

Reproducible example

image

Suggested solution(s)

Assume static hostedInfo for https://code.availity.com, to support (at least) Availity-provided repositories.

Additional context

https://github.com/Availity/availity-workflow/blob/12c486b9253361a5ec486e6e900f9a473e6b33cf/packages/workflow/scripts/clone-starter.js#L64

Your environment

  Binaries:
    Node: 8.9.4 - C:\Program Files\IBM\node\node.EXE
    Yarn: 1.22.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 5.6.0 - C:\Program Files\IBM\node\npm.CMD

EDIT: grammar

djejaquino avatar Jun 02 '20 19:06 djejaquino

Some background on this. We use a library: https://github.com/npm/hosted-git-info, to get metadata about the git url passed in via the template option before cloning it. You can see that here:https://github.com/Availity/availity-workflow/blob/2e57fc9edcc27b59c85576b1bddd5fbb3373efb5/packages/workflow/scripts/clone-starter.js#L59-L65

That library does not support https://code.availity.com. I see two paths forward here:

  1. The library does support pull requests for new hosts. We could add this host.
  2. We can remove the dependency on that library and do what it does in-house.

nylon22 avatar Oct 07 '20 15:10 nylon22

Related: https://github.com/npm/hosted-git-info/issues/39

nylon22 avatar Oct 07 '20 17:10 nylon22