pathchain 1.1.12 → 1.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/maker.js +3 -1
  2. package/package.json +1 -1
  3. package/updater.js +2 -2
package/maker.js CHANGED
@@ -229,9 +229,11 @@ function path(text, elements, author, ancestor, format = 'MM DD YYYY HH:mm:SSS [
229
229
  if (text == "") { text = path_hash; }
230
230
 
231
231
  let prev_link = "";
232
+ let head_link = "";
232
233
  // Building target chain
233
234
  for (let i = 0; i < elements.length; i++) {
234
235
  const current_link = link(elements[i], "", "", author, "");
236
+ if(i==0) head_link = current_link;
235
237
  if (i > 0) {
236
238
  updater.setLinkNext(prev_link, current_link);
237
239
  updater.setLinkPrev(current_link, prev_link);
@@ -245,7 +247,7 @@ function path(text, elements, author, ancestor, format = 'MM DD YYYY HH:mm:SSS [
245
247
  register: `moments/${register_moment_hash}`,
246
248
  author: author,
247
249
  text: text,
248
- head: `${prev_link}`,
250
+ head: `${head_link}`,
249
251
  ancestor: `${author_folder}paths/${ancestor}`,
250
252
  tag: `${author_folder}paths/${path_hash}`,
251
253
  });
package/package.json CHANGED
@@ -34,5 +34,5 @@
34
34
  "deprecated": false,
35
35
  "description": "![image](https://user-images.githubusercontent.com/104391124/282268780-cbbc1ee6-8d97-4d80-b896-66ae3eb723dd.png)",
36
36
  "name": "pathchain",
37
- "version": "1.1.12"
37
+ "version": "1.1.13"
38
38
  }
package/updater.js CHANGED
@@ -59,7 +59,7 @@ function useSecret(xsecret, xauthor = "") {
59
59
  */
60
60
  function setLinkNext(xlink = "", xnextlink = "") {
61
61
  console.log("Setting link: ", xnextlink);
62
- console.log("As prev link for: ", xlink);
62
+ console.log("As NEXT link for: ", xlink);
63
63
 
64
64
  // LOADING PB
65
65
  var link_pb = pb(fs.readFileSync('node_modules/pathchain/proto/link.proto'))
@@ -108,7 +108,7 @@ function setLinkNext(xlink = "", xnextlink = "") {
108
108
  */
109
109
  function setLinkPrev(xlink = "", xprevlink = "") {
110
110
  console.log("Setting link: ", xprevlink);
111
- console.log("As prev link for: ", xlink);
111
+ console.log("As PREV link for: ", xlink);
112
112
 
113
113
  // LOADING PB
114
114
  var link_pb = pb(fs.readFileSync('node_modules/pathchain/proto/link.proto'))