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