pathchain 1.1.11 → 1.1.12
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.
- package/maker.js +1 -1
- package/package.json +1 -1
- package/updater.js +8 -4
package/maker.js
CHANGED
|
@@ -245,7 +245,7 @@ function path(text, elements, author, ancestor, format = 'MM DD YYYY HH:mm:SSS [
|
|
|
245
245
|
register: `moments/${register_moment_hash}`,
|
|
246
246
|
author: author,
|
|
247
247
|
text: text,
|
|
248
|
-
head:
|
|
248
|
+
head: `${prev_link}`,
|
|
249
249
|
ancestor: `${author_folder}paths/${ancestor}`,
|
|
250
250
|
tag: `${author_folder}paths/${path_hash}`,
|
|
251
251
|
});
|
package/package.json
CHANGED
package/updater.js
CHANGED
|
@@ -58,6 +58,8 @@ function useSecret(xsecret, xauthor = "") {
|
|
|
58
58
|
* @return {string} xlink
|
|
59
59
|
*/
|
|
60
60
|
function setLinkNext(xlink = "", xnextlink = "") {
|
|
61
|
+
console.log("Setting link: ", xnextlink);
|
|
62
|
+
console.log("As prev link for: ", xlink);
|
|
61
63
|
|
|
62
64
|
// LOADING PB
|
|
63
65
|
var link_pb = pb(fs.readFileSync('node_modules/pathchain/proto/link.proto'))
|
|
@@ -67,7 +69,7 @@ function setLinkNext(xlink = "", xnextlink = "") {
|
|
|
67
69
|
|
|
68
70
|
// NOT FOUND EXCEPTION FOR 'xlink'
|
|
69
71
|
try {
|
|
70
|
-
fileContents = fs.readFileSync("files/
|
|
72
|
+
fileContents = fs.readFileSync("files/" + xlink);
|
|
71
73
|
} catch (err) {
|
|
72
74
|
if (err.code === 'ENOENT') {
|
|
73
75
|
return "Link '" + xlink + "' not found";
|
|
@@ -78,7 +80,7 @@ function setLinkNext(xlink = "", xnextlink = "") {
|
|
|
78
80
|
|
|
79
81
|
// NOT FOUND EXCEPTION FOR 'xnextlink'
|
|
80
82
|
try {
|
|
81
|
-
fileContents = fs.readFileSync("files/
|
|
83
|
+
fileContents = fs.readFileSync("files/" + xnextlink);
|
|
82
84
|
} catch (err) {
|
|
83
85
|
if (err.code === 'ENOENT') {
|
|
84
86
|
return "Link '" + xnextlink + "' not found";
|
|
@@ -105,6 +107,8 @@ function setLinkNext(xlink = "", xnextlink = "") {
|
|
|
105
107
|
* @return {string} xlink
|
|
106
108
|
*/
|
|
107
109
|
function setLinkPrev(xlink = "", xprevlink = "") {
|
|
110
|
+
console.log("Setting link: ", xprevlink);
|
|
111
|
+
console.log("As prev link for: ", xlink);
|
|
108
112
|
|
|
109
113
|
// LOADING PB
|
|
110
114
|
var link_pb = pb(fs.readFileSync('node_modules/pathchain/proto/link.proto'))
|
|
@@ -114,7 +118,7 @@ function setLinkPrev(xlink = "", xprevlink = "") {
|
|
|
114
118
|
|
|
115
119
|
// NOT FOUND EXCEPTION FOR 'xlink'
|
|
116
120
|
try {
|
|
117
|
-
fileContents = fs.readFileSync("files/
|
|
121
|
+
fileContents = fs.readFileSync("files/" + xlink);
|
|
118
122
|
} catch (err) {
|
|
119
123
|
if (err.code === 'ENOENT') {
|
|
120
124
|
return "Link '" + xlink + "' not found";
|
|
@@ -125,7 +129,7 @@ function setLinkPrev(xlink = "", xprevlink = "") {
|
|
|
125
129
|
|
|
126
130
|
// NOT FOUND EXCEPTION FOR 'xprevlink'
|
|
127
131
|
try {
|
|
128
|
-
fileContents = fs.readFileSync("files/
|
|
132
|
+
fileContents = fs.readFileSync("files/" + xprevlink);
|
|
129
133
|
} catch (err) {
|
|
130
134
|
if (err.code === 'ENOENT') {
|
|
131
135
|
return "Link '" + xprevlink + "' not found";
|