Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update ipfs #251

Merged
merged 1 commit into from
Jul 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,287 changes: 2,753 additions & 2,534 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"async": "^2.6.1",
"cids": "^0.5.6",
"highlight.js": "^9.12.0",
"ipfs": "^0.35.0",
"ipfs": "^0.36.4",
"ipfs-css": "^0.6.0",
"marked": "^0.4.0",
"monaco-editor": "^0.6.1",
Expand Down
2 changes: 1 addition & 1 deletion src/tutorials/Basics/01.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const validate = async (result, ipfs) => {
return { fail: 'Did not return a valid CID instance.' }
}

const hash = 'zdpuApm55Qv2zRxb3KKjVUxhQSw2r4a7jeiDV7163yCQnfivy'
const hash = 'bafyreicaoyussrycqolu4k2iaxleu2uakjlq57tuxq3djxn4wnyfp4yk3y'
if (result.toBaseEncodedString() === hash) {
return { success: 'Everything works!' }
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/tutorials/Basics/02.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const validate = async (result, ipfs) => {
return { fail: 'Did not return a valid CID instance.' }
}

const hash = 'zdpuAoPanArLvuFtuvmLYuSvp8zE8wuKSMZUkMN8Y1PaHLvKP'
const hash = 'bafyreibmdfd7c5db4kls4ty57zljfhqv36gi43l6txl44pi423wwmeskwy'
if (result.toBaseEncodedString() === hash) {
return { success: 'Everything works!' }
} else {
Expand Down
6 changes: 3 additions & 3 deletions src/tutorials/Blog/01.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const validate = async (result, ipfs) => {
if (validatedArray.fail) {
return validatedArray
}
const natCid = 'zdpuAyB57Xn8fuPvM8Gam5ycJTz6bgzLqtQBihyFuh5T7a6SK'
const samCid = 'zdpuAzUoWGnKe4p13YbexQrb5AMhnDWDCqJt2XyqVPU6DxS4m'
const natCid = 'bafyreif5pgrqzisqx2uqffd4dfbao7lf5vcgkvernetj7nitapesoyouha'
const samCid = 'bafyreigq4aqwo7fisdgkwxao6r6jdcw6pjvqkgeaadwsc2mgzvybuoa4sy'
for (const cid of result) {
const obj = await ipfs.dag.get(cid)
const node = obj.value
Expand All @@ -52,7 +52,7 @@ const validate = async (result, ipfs) => {
return { fail: `The author of the \`${node.content}\` blog post (${nodeAuthor}) did not match the the expected author (${expectedAuthor}).` }
}
}
const expectedCids = ['zdpuAkSPEnmgR1rqKkzpFN5qfJshCQKqMaVtUSpQJAMLdw3KF', 'zdpuAxzw762rP3CXZpAsKagPFR2AyqmZU2sN8U1GuVCeoYUEo']
const expectedCids = ['bafyreiaahxu4lot4ffzaxnz626kxipxt3lm43lsszcc4q6vydqrwnu7kpi', 'bafyreif24ddeqipektksc2jqhulgefwvhwhpylpkmjsdysxygllyeydwqq']
const resultCids = result.map((cid) => cid.toBaseEncodedString())
if (shallowEqualArrays(resultCids.sort(), expectedCids.sort())) {
return { success: 'Everything works!' }
Expand Down
4 changes: 2 additions & 2 deletions src/tutorials/Blog/02.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const validate = async (result, ipfs) => {
return validatedArray
}

const TREE_POST_CID = 'zdpuAkSPEnmgR1rqKkzpFN5qfJshCQKqMaVtUSpQJAMLdw3KF'
const COMPUTER_POST_CID = 'zdpuAxzw762rP3CXZpAsKagPFR2AyqmZU2sN8U1GuVCeoYUEo'
const TREE_POST_CID = 'bafyreiaahxu4lot4ffzaxnz626kxipxt3lm43lsszcc4q6vydqrwnu7kpi'
const COMPUTER_POST_CID = 'bafyreif24ddeqipektksc2jqhulgefwvhwhpylpkmjsdysxygllyeydwqq'
if (TREE_POST_CID === result[0].toBaseEncodedString() && COMPUTER_POST_CID === result[1].toBaseEncodedString()) {
return {
log: {
Expand Down
4 changes: 2 additions & 2 deletions src/tutorials/Blog/03.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ const validate = async (result, ipfs) => {
return { fail: 'The values of the `posts` array must be links.' }
}

const treePostCid = 'zdpuAri55PR9iW239ahcbnfkFU2TVyD5iLmqEFmwY634KZAJV'
const computerPostCid = 'zdpuAqaHPSosSZFRPe7u5q3yNqgg4JuvrLaUJxGamNPLhWivX'
const treePostCid = 'bafyreic5ndfk2yj4vr7pdhk4n435hxr522faalcse2ls4ukzddr7d5qxhi'
const computerPostCid = 'bafyreicmrzqpsebu5or7zjeffvnc3g76khmyzdo3q64i7ylvekxgcyqszq'
let expectedPosts
switch (node.tag) {
case 'hobby':
Expand Down
2 changes: 1 addition & 1 deletion src/tutorials/Blog/04.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const validate = async (result, ipfs) => {
if (!CID.isCID(node.author)) {
return { fail: 'The value of `author` needs to be a link.' }
}
const samCid = 'zdpuAzUoWGnKe4p13YbexQrb5AMhnDWDCqJt2XyqVPU6DxS4m'
const samCid = 'bafyreigq4aqwo7fisdgkwxao6r6jdcw6pjvqkgeaadwsc2mgzvybuoa4sy'
const nodeAuthor = node.author.toBaseEncodedString()
if (nodeAuthor !== samCid) {
return { fail: 'The author of the new blog post needs to be `Sam`.' }
Expand Down
6 changes: 3 additions & 3 deletions src/tutorials/Blog/05.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ const validate = async (result, ipfs) => {
}

let expectedPosts
const treePostCid = 'zdpuAri55PR9iW239ahcbnfkFU2TVyD5iLmqEFmwY634KZAJV'
const computerPostCid = 'zdpuAqaHPSosSZFRPe7u5q3yNqgg4JuvrLaUJxGamNPLhWivX'
const dogPostCid = 'zdpuAuaznfNPWfgSSrcGxkm3yqyssY6mz8i5T2gxqpEpNExG6'
const treePostCid = 'bafyreic5ndfk2yj4vr7pdhk4n435hxr522faalcse2ls4ukzddr7d5qxhi'
const computerPostCid = 'bafyreicmrzqpsebu5or7zjeffvnc3g76khmyzdo3q64i7ylvekxgcyqszq'
const dogPostCid = 'bafyreieifpyb4ayum62wvgnibargbgu6cedy72vk7sjla2hp4aupk7b5t4'
switch (node.tag) {
case 'funny':
expectedPosts = [dogPostCid]
Expand Down
12 changes: 6 additions & 6 deletions src/tutorials/Blog/06.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ const validate = async (result, ipfs) => {
return { fail: 'The value of `prev` of the "dogs" blog post needs to be a link.' }
}

const dogPostCid = 'zdpuAxe3g8XBLrqbp3NrjaiBLTrXjJ3SJymePGutsRRMrhAKS'
const computerPostCid = 'zdpuAwwT4kGJxT7mgVZRgvmV3ke8qGNZGLuCgLhJsdBSQGM44'
const treePostCid = 'zdpuAri55PR9iW239ahcbnfkFU2TVyD5iLmqEFmwY634KZAJV'
const treePostCidPrevNull = 'zdpuAoNUinwYTMoTR8Wq7945MKSSpAUNGW1d1wkTHhRcchG3D'
const computerPostCidWhenTreePostCidPrevNull = 'zdpuAsFHXZkpXcjuERjACPp1pAs9J7b4cdYtn9Dv9xBcAGhWV'
const dogPostCidWhenTreePostCidPrevNull = 'zdpuAkUysBpAE2yvWdLCBbUqXusYVe5kgFSS7YriyeLfA5F5d'
const dogPostCid = 'bafyreifvq4aykfnxjgqqmjelphadwhzvc4mt6h3mwytj54oa3qakuis3ie'
const computerPostCid = 'bafyreiflecr42lhn6bpy7friobhurxagp6ml34s5uzazqmwxxpqnouhfne'
const treePostCid = 'bafyreic5ndfk2yj4vr7pdhk4n435hxr522faalcse2ls4ukzddr7d5qxhi'
const treePostCidPrevNull = 'bafyreibl2dm2gt7mcgkmlviujca35332oq35tieyhcqaxtmuconjeg4d5q'
const computerPostCidWhenTreePostCidPrevNull = 'bafyreidfm7qcllrk2n7nbxdoapc52e3hb37sgtcg3fhhx5agto6bk67rcy'
const dogPostCidWhenTreePostCidPrevNull = 'bafyreiaa5a5haprk3wxxhw36y6p6mk5pnzsitykr77jjpq2tebqw4idggq'
const nodePrev = node.prev

const computerNode = (await ipfs.dag.get(nodePrev)).value
Expand Down
6 changes: 3 additions & 3 deletions src/tutorials/Blog/07.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ const validate = async (result, ipfs) => {
return { fail: 'The return value of your traversePosts function needs to be an array.' }
}

const dogPostCid = 'zdpuAxe3g8XBLrqbp3NrjaiBLTrXjJ3SJymePGutsRRMrhAKS'
const computerPostCid = 'zdpuAwwT4kGJxT7mgVZRgvmV3ke8qGNZGLuCgLhJsdBSQGM44'
const treePostCid = 'zdpuAri55PR9iW239ahcbnfkFU2TVyD5iLmqEFmwY634KZAJV'
const dogPostCid = 'bafyreifvq4aykfnxjgqqmjelphadwhzvc4mt6h3mwytj54oa3qakuis3ie'
const computerPostCid = 'bafyreiflecr42lhn6bpy7friobhurxagp6ml34s5uzazqmwxxpqnouhfne'
const treePostCid = 'bafyreic5ndfk2yj4vr7pdhk4n435hxr522faalcse2ls4ukzddr7d5qxhi'

try {
if (result.length !== 3 || result === undefined) {
Expand Down
4 changes: 1 addition & 3 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
const CopyWebpackPlugin = require('copy-webpack-plugin')

module.exports = {
publicPath: './',
devServer: {
port: 3000
},
configureWebpack: config => {
config.resolve.alias = {
ipfs: 'ipfs/dist/index.min.js'
}
config.plugins.push(
new CopyWebpackPlugin([
{
Expand Down