Commit ee8e1779c416856ab3a0b428285c16ae3fd3d48a
Get names of self-named git repos
Fix %UMG1tg0QnInvuUFY0HlsT0FI4ro6vW0wFiVefh283+s=.sha256cel committed on 11/22/2016, 11:14:49 PM
Parent: 1ebcea6c780b22911d8d71b9326be4539254272a
Files changed
modules_basic/names.js | changed |
modules_basic/names.js | ||
---|---|---|
@@ -91,14 +91,33 @@ | ||
91 | 91 … | }) |
92 | 92 … | ) |
93 | 93 … | } |
94 | 94 … | |
95 … | +var queryNamedGitRepos = [ | |
96 … | + {$filter: { | |
97 … | + value: { | |
98 … | + content: { | |
99 … | + type: "git-repo", | |
100 … | + name: {"$prefix": ""} | |
101 … | + } | |
102 … | + } | |
103 … | + }}, | |
104 … | + {$map: { | |
105 … | + name: ["value", "content", "name"], | |
106 … | + id: ['key'], | |
107 … | + ts: "timestamp" | |
108 … | + }}, | |
109 … | + reduce | |
110 … | +] | |
111 … | + | |
112 … | + | |
95 | 113 … | exports.connection_status = function (err) { |
96 | 114 … | if(!err) { |
97 | 115 … | pull( |
98 | 116 … | many([ |
99 | 117 … | sbot_links2({query: [filter, map, reduce]}), |
100 | - add_sigil(sbot_query({query: [filter2, map2, reduce]})) | |
118 … | + add_sigil(sbot_query({query: [filter2, map2, reduce]})), | |
119 … | + add_sigil(sbot_query({query: queryNamedGitRepos})) | |
101 | 120 … | ]), |
102 | 121 … | //reducing also ensures order by the lookup properties |
103 | 122 … | //in this case: [name, id] |
104 | 123 … | mfr.reduce(merge), |
@@ -112,9 +131,10 @@ | ||
112 | 131 … | ) |
113 | 132 … | |
114 | 133 … | pull(many([ |
115 | 134 … | sbot_links2({query: [filter, map], old: false}), |
116 | - add_sigil(sbot_query({query: [filter2, map2], old: false})) | |
135 … | + add_sigil(sbot_query({query: [filter2, map2], old: false})), | |
136 … | + add_sigil(sbot_query({query: queryNamedGitRepos, old: false})) | |
117 | 137 … | ]), |
118 | 138 … | pull.drain(update)) |
119 | 139 … | } |
120 | 140 … | } |
Built with git-ssb-web