tiro-notes 0.42.53 → 0.42.55
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/cli.js
CHANGED
|
@@ -18,7 +18,6 @@ DESCRIPTION:
|
|
|
18
18
|
===
|
|
19
19
|
${p.description}
|
|
20
20
|
|
|
21
|
-
ARGS:
|
|
22
21
|
====
|
|
23
22
|
|
|
24
23
|
--https/-s : enable https ssl with self signed certificate (boolean, false by default)
|
|
@@ -27,6 +26,7 @@ ARGS:
|
|
|
27
26
|
--verbose/-v : control logs verbosity [0/1/2/3] (0:none, 1: critical, 2: all, 3: performance monitoring)
|
|
28
27
|
|
|
29
28
|
--tunnel/-t : [require autossh to be installed first!] uses autossh to "publish" the app on the web, requires a server you can access with ssh and autossh installed on that device. (ex:npx tiro-notes@latest -t REMOTE_USER@REMOTE_URL:REMOTE_PORT)
|
|
29
|
+
--tunnel-timeout/-tt : [require autossh to be installed first!] autokill tunnel after x hours (default: -1)
|
|
30
30
|
|
|
31
31
|
--backup/-b : [t/n/now/force/f] [require tar to be installed first!] will incrementally backup changes in archives like tiro.0.xz.tar, tiro.1.xz.tar... every day in a specific folder. You can then execute commands after that process in a post backup script (useful for syncing these archives to clouds, think rsync, rclone etc.)
|
|
32
32
|
--backup-folder : modify backup folder destination. (default: "your/path/to/tiro/data_folder"+_backup
|
|
@@ -66,8 +66,9 @@ function getCliArgs () {
|
|
|
66
66
|
scriptLocation: "default"
|
|
67
67
|
},
|
|
68
68
|
tunnel: {
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
enabled: false,
|
|
70
|
+
timeout: -1,
|
|
71
|
+
},
|
|
71
72
|
}
|
|
72
73
|
for (var i = 0; i < args.length; i++) {
|
|
73
74
|
if (i % 2 !== 0) continue
|
|
@@ -85,14 +86,15 @@ function getCliArgs () {
|
|
|
85
86
|
if (argName === 'backup-location') argsObj.backup.location = argVal
|
|
86
87
|
if (argName === 'backup-post-script') argsObj.backup.scriptLocation = argVal
|
|
87
88
|
|
|
89
|
+
if (argName === 'tt' || argName === 'tunnel-timeout') argsObj.tunnel.timeout = parseInt(argVal)
|
|
88
90
|
if (argName === 't' || argName === 'tunnel') {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
const argsArr = argVal.split(':')
|
|
92
|
+
if (argsArr.length > 1) {
|
|
93
|
+
argsObj.tunnel.enabled = true
|
|
94
|
+
argsObj.tunnel.remoteUrl = argsArr[0]
|
|
95
|
+
argsObj.tunnel.remotePort = parseInt(argsArr[1])
|
|
96
|
+
}
|
|
97
|
+
}
|
|
96
98
|
}
|
|
97
99
|
return argsObj;
|
|
98
100
|
}
|
|
@@ -222,6 +224,20 @@ const startSshTunnel = (argsObj) => {
|
|
|
222
224
|
tHelpers.execCmd('autossh',['-M',`2${argsObj.tunnel.remotePort}`,'-N', argsObj.tunnel.remoteUrl,'-R', `${argsObj.tunnel.remotePort}:localhost:${argsObj.port}`,'-C'], {
|
|
223
225
|
logName:'tunnel 3/3'
|
|
224
226
|
})
|
|
227
|
+
|
|
228
|
+
// if tunnel.timeout != 1
|
|
229
|
+
if (argsObj.tunnel.timeout != 1) {
|
|
230
|
+
console.log(`Tunnel timeout set to ${argsObj.tunnel.timeout}h.`)
|
|
231
|
+
setTimeout(() => {
|
|
232
|
+
console.log(`Tunnel timeout reached (${argsObj.tunnel.timeout}h). Closing tunnel.`, str)
|
|
233
|
+
tHelpers.execCmd('killall', [`autossh`], {
|
|
234
|
+
logName:'tunnel 4/3',
|
|
235
|
+
onLog: str => {
|
|
236
|
+
console.log(`Tunnel timeout reached (${argsObj.tunnel.timeout}h). Closing tunnel.`, str)
|
|
237
|
+
}
|
|
238
|
+
})
|
|
239
|
+
}, argsObj.tunnel.timeout * 1000 * 60 * 60)
|
|
240
|
+
}
|
|
225
241
|
}
|
|
226
242
|
})
|
|
227
243
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"static/js/7.93273b7f.chunk.js": "/static/js/7.93273b7f.chunk.js",
|
|
11
11
|
"static/js/8.9d2849e7.chunk.js": "/static/js/8.9d2849e7.chunk.js",
|
|
12
12
|
"static/js/9.2f4f6f41.chunk.js": "/static/js/9.2f4f6f41.chunk.js",
|
|
13
|
-
"main.js": "/static/js/main.
|
|
13
|
+
"main.js": "/static/js/main.5cb1ede3.chunk.js",
|
|
14
14
|
"runtime-main.js": "/static/js/runtime-main.cfd4e655.js",
|
|
15
15
|
"static/css/12.394917b1.chunk.css": "/static/css/12.394917b1.chunk.css",
|
|
16
16
|
"static/js/12.7d32fbf5.chunk.js": "/static/js/12.7d32fbf5.chunk.js",
|
|
@@ -138,6 +138,6 @@
|
|
|
138
138
|
"static/js/runtime-main.cfd4e655.js",
|
|
139
139
|
"static/css/12.394917b1.chunk.css",
|
|
140
140
|
"static/js/12.7d32fbf5.chunk.js",
|
|
141
|
-
"static/js/main.
|
|
141
|
+
"static/js/main.5cb1ede3.chunk.js"
|
|
142
142
|
]
|
|
143
143
|
}
|
package/client/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><meta name="theme-color" content="#000000"/><title>Tiro</title><link href="/static/css/12.394917b1.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var a,f,o=t[0],d=t[1],b=t[2],i=0,l=[];i<o.length;i++)f=o[i],Object.prototype.hasOwnProperty.call(c,f)&&c[f]&&l.push(c[f][0]),c[f]=0;for(a in d)Object.prototype.hasOwnProperty.call(d,a)&&(e[a]=d[a]);for(u&&u(t);l.length;)l.shift()();return n.push.apply(n,b||[]),r()}function r(){for(var e,t=0;t<n.length;t++){for(var r=n[t],a=!0,o=1;o<r.length;o++){var d=r[o];0!==c[d]&&(a=!1)}a&&(n.splice(t--,1),e=f(f.s=r[0]))}return e}var a={},c={11:0},n=[];function f(t){if(a[t])return a[t].exports;var r=a[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,f),r.l=!0,r.exports}f.e=function(e){var t=[],r=c[e];if(0!==r)if(r)t.push(r[2]);else{var a=new Promise((function(t,a){r=c[e]=[t,a]}));t.push(r[2]=a);var n,o=document.createElement("script");o.charset="utf-8",o.timeout=120,f.nc&&o.setAttribute("nonce",f.nc),o.src=function(e){return f.p+"static/js/"+({}[e]||e)+"."+{0:"2ede8f3b",1:"c83cb637",2:"373394e0",3:"2025d45a",4:"ee218006",5:"cad26866",6:"f1014a14",7:"93273b7f",8:"9d2849e7",9:"2f4f6f41",13:"f9b2f517",14:"50ecdb9e",15:"3b9fc9b8",16:"189ac195",17:"98aea281",18:"92cf5175",19:"0cc91989",20:"76264d05",21:"a2417d94",22:"2a4d9269",23:"3330d462",24:"67a356dc",25:"4ba07696",26:"88eafd2e",27:"74f83153",28:"2279a6e2",29:"4c47db71",30:"730800b8",31:"d0a8d151",32:"c3c9db05",33:"a538f70c",34:"f0329c98",35:"4d0dcb18",36:"855a7ff2",37:"4d2e2e09",38:"ad4023b2",39:"a3f426b6",40:"f480faa8",41:"88c9184f",42:"b02a49bf",43:"d1a95bf1",44:"0e4ef3f9",45:"9b2aba6d",46:"694ce8de",47:"d5bc600a",48:"b43c3a9d",49:"d18304dc",50:"7899d1bf",51:"7083bba2",52:"38296943",53:"5d674347",54:"c1c82a15",55:"885b30d6",56:"9f72f7e5",57:"f145b315",58:"0ecc467a",59:"c0a5036c",60:"300cfd31",61:"30bfecc2",62:"ec2ace17",63:"125c4971",64:"940e912d",65:"e0dde192",66:"5aba3804",67:"0ac64eee",68:"4fd8553d",69:"af3c2bbb",70:"1f738d16",71:"ed92be23",72:"984db6ba",73:"9600c87c",74:"8f22263b",75:"d4f3c25a",76:"028887c1",77:"cace42c2",78:"f7460099",79:"661dd408",80:"0d6ffb76",81:"55eb0c5a",82:"847089f0",83:"9f2723da",84:"82f7f4c8",85:"c615541d",86:"e74c464b",87:"e2a187ad",88:"72bfc0c2",89:"92adde79",90:"95ded273",91:"3a141c79",92:"3c919a75",93:"fb5c35b0",94:"0837c8d3",95:"d566dd3a",96:"ac635b61",97:"9fa9b919",98:"80b6f5b3",99:"8fe8ac10",100:"98bf8503",101:"41387d04",102:"e7a546d5",103:"282f5bab",104:"95f4b958",105:"8b44aa36",106:"bc34a540",107:"04e018fc",108:"b76d66b5",109:"b0d9cea1",110:"6643e031"}[e]+".chunk.js"}(e);var d=new Error;n=function(t){o.onerror=o.onload=null,clearTimeout(b);var r=c[e];if(0!==r){if(r){var a=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;d.message="Loading chunk "+e+" failed.\n("+a+": "+n+")",d.name="ChunkLoadError",d.type=a,d.request=n,r[1](d)}c[e]=void 0}};var b=setTimeout((function(){n({type:"timeout",target:o})}),12e4);o.onerror=o.onload=n,document.head.appendChild(o)}return Promise.all(t)},f.m=e,f.c=a,f.d=function(e,t,r){f.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(e,t){if(1&t&&(e=f(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(f.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)f.d(r,a,function(t){return e[t]}.bind(null,a));return r},f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,"a",t),t},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.p="/",f.oe=function(e){throw console.error(e),e};var o=this["webpackJsonptiro-notes-client"]=this["webpackJsonptiro-notes-client"]||[],d=o.push.bind(o);o.push=t,o=o.slice();for(var b=0;b<o.length;b++)t(o[b]);var u=d;r()}([])</script><script src="/static/js/12.7d32fbf5.chunk.js"></script><script src="/static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><meta name="theme-color" content="#000000"/><title>Tiro</title><link href="/static/css/12.394917b1.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var a,f,o=t[0],d=t[1],b=t[2],i=0,l=[];i<o.length;i++)f=o[i],Object.prototype.hasOwnProperty.call(c,f)&&c[f]&&l.push(c[f][0]),c[f]=0;for(a in d)Object.prototype.hasOwnProperty.call(d,a)&&(e[a]=d[a]);for(u&&u(t);l.length;)l.shift()();return n.push.apply(n,b||[]),r()}function r(){for(var e,t=0;t<n.length;t++){for(var r=n[t],a=!0,o=1;o<r.length;o++){var d=r[o];0!==c[d]&&(a=!1)}a&&(n.splice(t--,1),e=f(f.s=r[0]))}return e}var a={},c={11:0},n=[];function f(t){if(a[t])return a[t].exports;var r=a[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,f),r.l=!0,r.exports}f.e=function(e){var t=[],r=c[e];if(0!==r)if(r)t.push(r[2]);else{var a=new Promise((function(t,a){r=c[e]=[t,a]}));t.push(r[2]=a);var n,o=document.createElement("script");o.charset="utf-8",o.timeout=120,f.nc&&o.setAttribute("nonce",f.nc),o.src=function(e){return f.p+"static/js/"+({}[e]||e)+"."+{0:"2ede8f3b",1:"c83cb637",2:"373394e0",3:"2025d45a",4:"ee218006",5:"cad26866",6:"f1014a14",7:"93273b7f",8:"9d2849e7",9:"2f4f6f41",13:"f9b2f517",14:"50ecdb9e",15:"3b9fc9b8",16:"189ac195",17:"98aea281",18:"92cf5175",19:"0cc91989",20:"76264d05",21:"a2417d94",22:"2a4d9269",23:"3330d462",24:"67a356dc",25:"4ba07696",26:"88eafd2e",27:"74f83153",28:"2279a6e2",29:"4c47db71",30:"730800b8",31:"d0a8d151",32:"c3c9db05",33:"a538f70c",34:"f0329c98",35:"4d0dcb18",36:"855a7ff2",37:"4d2e2e09",38:"ad4023b2",39:"a3f426b6",40:"f480faa8",41:"88c9184f",42:"b02a49bf",43:"d1a95bf1",44:"0e4ef3f9",45:"9b2aba6d",46:"694ce8de",47:"d5bc600a",48:"b43c3a9d",49:"d18304dc",50:"7899d1bf",51:"7083bba2",52:"38296943",53:"5d674347",54:"c1c82a15",55:"885b30d6",56:"9f72f7e5",57:"f145b315",58:"0ecc467a",59:"c0a5036c",60:"300cfd31",61:"30bfecc2",62:"ec2ace17",63:"125c4971",64:"940e912d",65:"e0dde192",66:"5aba3804",67:"0ac64eee",68:"4fd8553d",69:"af3c2bbb",70:"1f738d16",71:"ed92be23",72:"984db6ba",73:"9600c87c",74:"8f22263b",75:"d4f3c25a",76:"028887c1",77:"cace42c2",78:"f7460099",79:"661dd408",80:"0d6ffb76",81:"55eb0c5a",82:"847089f0",83:"9f2723da",84:"82f7f4c8",85:"c615541d",86:"e74c464b",87:"e2a187ad",88:"72bfc0c2",89:"92adde79",90:"95ded273",91:"3a141c79",92:"3c919a75",93:"fb5c35b0",94:"0837c8d3",95:"d566dd3a",96:"ac635b61",97:"9fa9b919",98:"80b6f5b3",99:"8fe8ac10",100:"98bf8503",101:"41387d04",102:"e7a546d5",103:"282f5bab",104:"95f4b958",105:"8b44aa36",106:"bc34a540",107:"04e018fc",108:"b76d66b5",109:"b0d9cea1",110:"6643e031"}[e]+".chunk.js"}(e);var d=new Error;n=function(t){o.onerror=o.onload=null,clearTimeout(b);var r=c[e];if(0!==r){if(r){var a=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;d.message="Loading chunk "+e+" failed.\n("+a+": "+n+")",d.name="ChunkLoadError",d.type=a,d.request=n,r[1](d)}c[e]=void 0}};var b=setTimeout((function(){n({type:"timeout",target:o})}),12e4);o.onerror=o.onload=n,document.head.appendChild(o)}return Promise.all(t)},f.m=e,f.c=a,f.d=function(e,t,r){f.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(e,t){if(1&t&&(e=f(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(f.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)f.d(r,a,function(t){return e[t]}.bind(null,a));return r},f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,"a",t),t},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.p="/",f.oe=function(e){throw console.error(e),e};var o=this["webpackJsonptiro-notes-client"]=this["webpackJsonptiro-notes-client"]||[],d=o.push.bind(o);o.push=t,o=o.slice();for(var b=0;b<o.length;b++)t(o[b]);var u=d;r()}([])</script><script src="/static/js/12.7d32fbf5.chunk.js"></script><script src="/static/js/main.5cb1ede3.chunk.js"></script></body><style>html{position:fixed}body>iframe{display:none!important}</style><script>setTimeout(()=>{console.info("[DEV NOTICE] Live Reload Has Been Disabled"),window.webpackHotUpdate=()=>{}},1e3);{var WS=window.WebSocket;function DevWebSocket(e){return"ws://localhost:3000/sockjs-node"===e?(console.info("[DEV NOTICE] Live Reload Has Been Disabled"),{}):new WS(e)}window.WebSocket=DevWebSocket}</script></html>
|