You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should require the URL to be properly formatted, so that we may infer the protocol the user wants to use (Git, IPFS, Zip, etc). For Git URLs, we should require it to be the form of http(s)://<domain(/path)>.git. If a URL is provided without .git at the end, we should throw an error.
The reason for not defaulting to git, even in the cases where .git is not appended, is so that we do not introduce a breaking change in the future when other protocols are supported. For example, if a user was able to use polywrap create --template https://domain.com/package with the first version of this feature, in the future they would be broken when we introduce another template URL type.
Downloading Git Repositories
Use the git root-level process available via issuing a new shell command in a child-process (git clone ${url}). The Polywrap CLI's codebase currently has a similar dependency on docker for the build command.
We should first clone the template repository into the CLI's cache folder (${project_root}/.w3/), under a sub-path (/templates/${uuid}). Once downloaded, all files (excluding the .git folder) should be copied into the user's ${project_root} folder.
Support the creation of new projects from externally hosted template project repositories like so:
polywrap create --template ${url}
Initially, the first supported
${url}
types can be git. In the future we can support other folder-based-repository protocols (like IPFS for ex).The text was updated successfully, but these errors were encountered: