|
|
|
@ -66,9 +66,11 @@ import * as child_process from 'child_process' |
|
|
|
|
const projectSecret = process.env.infura_project_secret |
|
|
|
|
const auth = 'Basic ' + Buffer.from(projectId + ':' + projectSecret).toString('base64') |
|
|
|
|
|
|
|
|
|
const ipfs = IpfsHttpClient({ port: 5001, host, protocol: 'https', headers: { |
|
|
|
|
const ipfs = IpfsHttpClient({ |
|
|
|
|
port: 5001, host, protocol: 'https', headers: { |
|
|
|
|
authorization: auth |
|
|
|
|
} }) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
const { globSource } = IpfsHttpClient |
|
|
|
|
const folder = `dist/apps/${pluginName}` |
|
|
|
|
|
|
|
|
@ -83,8 +85,9 @@ import * as child_process from 'child_process' |
|
|
|
|
const plugin_directory_path = 'remix-plugins-directory/plugins/' |
|
|
|
|
|
|
|
|
|
// create the plugin directory if it doesn't exist
|
|
|
|
|
const exists = fs.statSync(plugin_directory_path + pluginName).isDirectory() |
|
|
|
|
if(!exists){ |
|
|
|
|
try { |
|
|
|
|
fs.statSync(plugin_directory_path + pluginName).isDirectory() |
|
|
|
|
} catch (e) { |
|
|
|
|
console.log('creating plugin directory') |
|
|
|
|
fs.mkdirSync(plugin_directory_path + pluginName) |
|
|
|
|
} |
|
|
|
|