@reactful/create 0.0.71 → 0.0.73

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +8 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -61,8 +61,14 @@ const downloadRepo = async (subfolder, destination) =>
61
61
 
62
62
  async function downloadGitHub(user, repository, subdir, destination) {
63
63
  const prefix = `https://api.github.com/repos/${user}/${repository}`
64
- const url = `${prefix}/contents/installation/${subdir}`
65
- const contents = await fetch(url).then(x => x.json())
64
+ const response = await fetch( `${prefix}/contents/installation/${subdir}`)
65
+ const contents = response.json()
66
+
67
+ if (Array.isArray(contents)) {
68
+ console.error('failed to download scafold from github...')
69
+ console.log('type: ', typeof contents)
70
+ console.log('url: ', url)
71
+ }
66
72
 
67
73
  for (const item of contents) {
68
74
  const from = `${subdir}/${item.name}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactful/create",
3
- "version": "0.0.71",
3
+ "version": "0.0.73",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "description": "reactful scafold tool",