availity-workflow
availity-workflow copied to clipboard
Privately hosted templates are not supported
🐛 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
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
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:
- The library does support pull requests for new hosts. We could add this host.
- We can remove the dependency on that library and do what it does in-house.
Related: https://github.com/npm/hosted-git-info/issues/39