File tree 12 files changed +2777
-2560
lines changed
12 files changed +2777
-2560
lines changed Original file line number Diff line number Diff line change 17
17
"async" : " ^2.6.1" ,
18
18
"cids" : " ^0.5.6" ,
19
19
"highlight.js" : " ^9.12.0" ,
20
- "ipfs" : " ^0.35.0 " ,
20
+ "ipfs" : " ^0.36.4 " ,
21
21
"ipfs-css" : " ^0.6.0" ,
22
22
"marked" : " ^0.4.0" ,
23
23
"monaco-editor" : " ^0.6.1" ,
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ const validate = async (result, ipfs) => {
25
25
return { fail: ' Did not return a valid CID instance.' }
26
26
}
27
27
28
- const hash = ' zdpuApm55Qv2zRxb3KKjVUxhQSw2r4a7jeiDV7163yCQnfivy '
28
+ const hash = ' bafyreicaoyussrycqolu4k2iaxleu2uakjlq57tuxq3djxn4wnyfp4yk3y '
29
29
if (result .toBaseEncodedString () === hash) {
30
30
return { success: ' Everything works!' }
31
31
} else {
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const validate = async (result, ipfs) => {
27
27
return { fail: ' Did not return a valid CID instance.' }
28
28
}
29
29
30
- const hash = ' zdpuAoPanArLvuFtuvmLYuSvp8zE8wuKSMZUkMN8Y1PaHLvKP '
30
+ const hash = ' bafyreibmdfd7c5db4kls4ty57zljfhqv36gi43l6txl44pi423wwmeskwy '
31
31
if (result .toBaseEncodedString () === hash) {
32
32
return { success: ' Everything works!' }
33
33
} else {
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ const validate = async (result, ipfs) => {
24
24
if (validatedArray .fail ) {
25
25
return validatedArray
26
26
}
27
- const natCid = ' zdpuAyB57Xn8fuPvM8Gam5ycJTz6bgzLqtQBihyFuh5T7a6SK '
28
- const samCid = ' zdpuAzUoWGnKe4p13YbexQrb5AMhnDWDCqJt2XyqVPU6DxS4m '
27
+ const natCid = ' bafyreif5pgrqzisqx2uqffd4dfbao7lf5vcgkvernetj7nitapesoyouha '
28
+ const samCid = ' bafyreigq4aqwo7fisdgkwxao6r6jdcw6pjvqkgeaadwsc2mgzvybuoa4sy '
29
29
for (const cid of result) {
30
30
const obj = await ipfs .dag .get (cid)
31
31
const node = obj .value
@@ -52,7 +52,7 @@ const validate = async (result, ipfs) => {
52
52
return { fail: ` The author of the \` ${ node .content } \` blog post (${ nodeAuthor} ) did not match the the expected author (${ expectedAuthor} ).` }
53
53
}
54
54
}
55
- const expectedCids = [' zdpuAkSPEnmgR1rqKkzpFN5qfJshCQKqMaVtUSpQJAMLdw3KF ' , ' zdpuAxzw762rP3CXZpAsKagPFR2AyqmZU2sN8U1GuVCeoYUEo ' ]
55
+ const expectedCids = [' bafyreiaahxu4lot4ffzaxnz626kxipxt3lm43lsszcc4q6vydqrwnu7kpi ' , ' bafyreif24ddeqipektksc2jqhulgefwvhwhpylpkmjsdysxygllyeydwqq ' ]
56
56
const resultCids = result .map ((cid ) => cid .toBaseEncodedString ())
57
57
if (shallowEqualArrays (resultCids .sort (), expectedCids .sort ())) {
58
58
return { success: ' Everything works!' }
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ const validate = async (result, ipfs) => {
25
25
return validatedArray
26
26
}
27
27
28
- const TREE_POST_CID = ' zdpuAkSPEnmgR1rqKkzpFN5qfJshCQKqMaVtUSpQJAMLdw3KF '
29
- const COMPUTER_POST_CID = ' zdpuAxzw762rP3CXZpAsKagPFR2AyqmZU2sN8U1GuVCeoYUEo '
28
+ const TREE_POST_CID = ' bafyreiaahxu4lot4ffzaxnz626kxipxt3lm43lsszcc4q6vydqrwnu7kpi '
29
+ const COMPUTER_POST_CID = ' bafyreif24ddeqipektksc2jqhulgefwvhwhpylpkmjsdysxygllyeydwqq '
30
30
if (TREE_POST_CID === result[0 ].toBaseEncodedString () && COMPUTER_POST_CID === result[1 ].toBaseEncodedString ()) {
31
31
return {
32
32
log: {
Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ const validate = async (result, ipfs) => {
44
44
return { fail: ' The values of the `posts` array must be links.' }
45
45
}
46
46
47
- const treePostCid = ' zdpuAri55PR9iW239ahcbnfkFU2TVyD5iLmqEFmwY634KZAJV '
48
- const computerPostCid = ' zdpuAqaHPSosSZFRPe7u5q3yNqgg4JuvrLaUJxGamNPLhWivX '
47
+ const treePostCid = ' bafyreic5ndfk2yj4vr7pdhk4n435hxr522faalcse2ls4ukzddr7d5qxhi '
48
+ const computerPostCid = ' bafyreicmrzqpsebu5or7zjeffvnc3g76khmyzdo3q64i7ylvekxgcyqszq '
49
49
let expectedPosts
50
50
switch (node .tag ) {
51
51
case ' hobby' :
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ const validate = async (result, ipfs) => {
36
36
if (! CID .isCID (node .author )) {
37
37
return { fail: ' The value of `author` needs to be a link.' }
38
38
}
39
- const samCid = ' zdpuAzUoWGnKe4p13YbexQrb5AMhnDWDCqJt2XyqVPU6DxS4m '
39
+ const samCid = ' bafyreigq4aqwo7fisdgkwxao6r6jdcw6pjvqkgeaadwsc2mgzvybuoa4sy '
40
40
const nodeAuthor = node .author .toBaseEncodedString ()
41
41
if (nodeAuthor !== samCid) {
42
42
return { fail: ' The author of the new blog post needs to be `Sam`.' }
Original file line number Diff line number Diff line change @@ -47,9 +47,9 @@ const validate = async (result, ipfs) => {
47
47
}
48
48
49
49
let expectedPosts
50
- const treePostCid = ' zdpuAri55PR9iW239ahcbnfkFU2TVyD5iLmqEFmwY634KZAJV '
51
- const computerPostCid = ' zdpuAqaHPSosSZFRPe7u5q3yNqgg4JuvrLaUJxGamNPLhWivX '
52
- const dogPostCid = ' zdpuAuaznfNPWfgSSrcGxkm3yqyssY6mz8i5T2gxqpEpNExG6 '
50
+ const treePostCid = ' bafyreic5ndfk2yj4vr7pdhk4n435hxr522faalcse2ls4ukzddr7d5qxhi '
51
+ const computerPostCid = ' bafyreicmrzqpsebu5or7zjeffvnc3g76khmyzdo3q64i7ylvekxgcyqszq '
52
+ const dogPostCid = ' bafyreieifpyb4ayum62wvgnibargbgu6cedy72vk7sjla2hp4aupk7b5t4 '
53
53
switch (node .tag ) {
54
54
case ' funny' :
55
55
expectedPosts = [dogPostCid]
Original file line number Diff line number Diff line change @@ -32,12 +32,12 @@ const validate = async (result, ipfs) => {
32
32
return { fail: ' The value of `prev` of the "dogs" blog post needs to be a link.' }
33
33
}
34
34
35
- const dogPostCid = ' zdpuAxe3g8XBLrqbp3NrjaiBLTrXjJ3SJymePGutsRRMrhAKS '
36
- const computerPostCid = ' zdpuAwwT4kGJxT7mgVZRgvmV3ke8qGNZGLuCgLhJsdBSQGM44 '
37
- const treePostCid = ' zdpuAri55PR9iW239ahcbnfkFU2TVyD5iLmqEFmwY634KZAJV '
38
- const treePostCidPrevNull = ' zdpuAoNUinwYTMoTR8Wq7945MKSSpAUNGW1d1wkTHhRcchG3D '
39
- const computerPostCidWhenTreePostCidPrevNull = ' zdpuAsFHXZkpXcjuERjACPp1pAs9J7b4cdYtn9Dv9xBcAGhWV '
40
- const dogPostCidWhenTreePostCidPrevNull = ' zdpuAkUysBpAE2yvWdLCBbUqXusYVe5kgFSS7YriyeLfA5F5d '
35
+ const dogPostCid = ' bafyreifvq4aykfnxjgqqmjelphadwhzvc4mt6h3mwytj54oa3qakuis3ie '
36
+ const computerPostCid = ' bafyreiflecr42lhn6bpy7friobhurxagp6ml34s5uzazqmwxxpqnouhfne '
37
+ const treePostCid = ' bafyreic5ndfk2yj4vr7pdhk4n435hxr522faalcse2ls4ukzddr7d5qxhi '
38
+ const treePostCidPrevNull = ' bafyreibl2dm2gt7mcgkmlviujca35332oq35tieyhcqaxtmuconjeg4d5q '
39
+ const computerPostCidWhenTreePostCidPrevNull = ' bafyreidfm7qcllrk2n7nbxdoapc52e3hb37sgtcg3fhhx5agto6bk67rcy '
40
+ const dogPostCidWhenTreePostCidPrevNull = ' bafyreiaa5a5haprk3wxxhw36y6p6mk5pnzsitykr77jjpq2tebqw4idggq '
41
41
const nodePrev = node .prev
42
42
43
43
const computerNode = (await ipfs .dag .get (nodePrev)).value
Original file line number Diff line number Diff line change @@ -38,9 +38,9 @@ const validate = async (result, ipfs) => {
38
38
return { fail: ' The return value of your traversePosts function needs to be an array.' }
39
39
}
40
40
41
- const dogPostCid = ' zdpuAxe3g8XBLrqbp3NrjaiBLTrXjJ3SJymePGutsRRMrhAKS '
42
- const computerPostCid = ' zdpuAwwT4kGJxT7mgVZRgvmV3ke8qGNZGLuCgLhJsdBSQGM44 '
43
- const treePostCid = ' zdpuAri55PR9iW239ahcbnfkFU2TVyD5iLmqEFmwY634KZAJV '
41
+ const dogPostCid = ' bafyreifvq4aykfnxjgqqmjelphadwhzvc4mt6h3mwytj54oa3qakuis3ie '
42
+ const computerPostCid = ' bafyreiflecr42lhn6bpy7friobhurxagp6ml34s5uzazqmwxxpqnouhfne '
43
+ const treePostCid = ' bafyreic5ndfk2yj4vr7pdhk4n435hxr522faalcse2ls4ukzddr7d5qxhi '
44
44
45
45
try {
46
46
if (result .length !== 3 || result === undefined ) {
Original file line number Diff line number Diff line change 1
1
const CopyWebpackPlugin = require ( 'copy-webpack-plugin' )
2
+
2
3
module . exports = {
3
4
publicPath : './' ,
4
5
devServer : {
5
6
port : 3000
6
7
} ,
7
8
configureWebpack : config => {
8
- config . resolve . alias = {
9
- ipfs : 'ipfs/dist/index.min.js'
10
- }
11
9
config . plugins . push (
12
10
new CopyWebpackPlugin ( [
13
11
{
You can’t perform that action at this time.
0 commit comments