process result properly

pull/452/head
aniket-engg 4 years ago committed by Aniket
parent b78a9e7169
commit f6417bc805
  1. 4
      apps/remix-ide/ci/publishIpfs
  2. 10
      package-lock.json
  3. 1
      package.json

@ -1,5 +1,6 @@
#!/usr/bin/env node #!/usr/bin/env node
const all = require('it-all')
const IpfsHttpClient = require('ipfs-http-client') const IpfsHttpClient = require('ipfs-http-client')
const { globSource } = IpfsHttpClient const { globSource } = IpfsHttpClient
console.log('current folder', process.cwd()) console.log('current folder', process.cwd())
@ -9,7 +10,8 @@ const folder = process.cwd() + '/temp_publish_docker';
const host = 'ipfs.komputing.org' // ethdev berlin ipfs node const host = 'ipfs.komputing.org' // ethdev berlin ipfs node
const ipfs = IpfsHttpClient({ host, port: 443, protocol: 'https' }) const ipfs = IpfsHttpClient({ host, port: 443, protocol: 'https' })
try { try {
let result = await ipfs.add(globSource(folder, { recursive: true}), { pin: false }) let result = await all(ipfs.add(globSource(folder, { recursive: true}), { pin: false }))
console.log('result ====>', result)
const remoteFolder = result[result.length - 1] const remoteFolder = result[result.length - 1]
console.log('remoteFolder ====>', remoteFolder) console.log('remoteFolder ====>', remoteFolder)
const hash = remoteFolder.cid.toString() const hash = remoteFolder.cid.toString()

10
package-lock.json generated

@ -20952,8 +20952,7 @@
"it-all": { "it-all": {
"version": "1.0.4", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/it-all/-/it-all-1.0.4.tgz", "resolved": "https://registry.npmjs.org/it-all/-/it-all-1.0.4.tgz",
"integrity": "sha512-7K+gjHHzZ7t+bCkrtulYiow35k3UgqH7miC+iUa9RGiyDRXJ6hVDeFsDrnWrlscjrkLFOJRKHxNOke4FNoQnhw==", "integrity": "sha512-7K+gjHHzZ7t+bCkrtulYiow35k3UgqH7miC+iUa9RGiyDRXJ6hVDeFsDrnWrlscjrkLFOJRKHxNOke4FNoQnhw=="
"dev": true
}, },
"it-concat": { "it-concat": {
"version": "1.0.1", "version": "1.0.1",
@ -27337,7 +27336,6 @@
}, },
"dezalgo": { "dezalgo": {
"version": "1.0.3", "version": "1.0.3",
"resolved": false,
"integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=",
"requires": { "requires": {
"asap": "^2.0.0", "asap": "^2.0.0",
@ -27966,7 +27964,6 @@
}, },
"normalize-git-url": { "normalize-git-url": {
"version": "3.0.2", "version": "3.0.2",
"resolved": false,
"integrity": "sha1-jl8Uvgva7bc+ByADEKpBbCc1D8Q=" "integrity": "sha1-jl8Uvgva7bc+ByADEKpBbCc1D8Q="
}, },
"normalize-package-data": { "normalize-package-data": {
@ -28004,7 +28001,6 @@
}, },
"npm-install-checks": { "npm-install-checks": {
"version": "3.0.0", "version": "3.0.0",
"resolved": false,
"integrity": "sha1-1K7N/VGlPjcjt7L5Oy7ijjB7wNc=", "integrity": "sha1-1K7N/VGlPjcjt7L5Oy7ijjB7wNc=",
"requires": { "requires": {
"semver": "^2.3.0 || 3.x || 4 || 5" "semver": "^2.3.0 || 3.x || 4 || 5"
@ -28351,7 +28347,6 @@
}, },
"realize-package-specifier": { "realize-package-specifier": {
"version": "3.0.3", "version": "3.0.3",
"resolved": false,
"integrity": "sha1-0N74gpUrjeP2frpekRmWYScfQfQ=", "integrity": "sha1-0N74gpUrjeP2frpekRmWYScfQfQ=",
"requires": { "requires": {
"dezalgo": "^1.0.1", "dezalgo": "^1.0.1",
@ -28888,7 +28883,6 @@
"dependencies": { "dependencies": {
"unique-slug": { "unique-slug": {
"version": "2.0.0", "version": "2.0.0",
"resolved": false,
"integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=",
"requires": { "requires": {
"imurmurhash": "^0.1.4" "imurmurhash": "^0.1.4"
@ -35011,7 +35005,7 @@
"events": { "events": {
"version": "3.2.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz",
"integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==", "integrity": "sha1-k7h8GPjvzUICpGGuxN/AVWtjk3k=",
"dev": true "dev": true
} }
} }

@ -136,6 +136,7 @@
"ethereumjs-tx": "^2.1.2", "ethereumjs-tx": "^2.1.2",
"ethereumjs-vm": "4.1.3", "ethereumjs-vm": "4.1.3",
"http-server": "^0.11.1", "http-server": "^0.11.1",
"it-all": "^1.0.4",
"merge": "^1.2.0", "merge": "^1.2.0",
"npm-install-version": "^6.0.2", "npm-install-version": "^6.0.2",
"signale": "^1.4.0", "signale": "^1.4.0",

Loading…
Cancel
Save