Initial import of LogDarioSeq baseline

Establishes version control for the personal Logseq DB fork before
starting the server-client architecture migration and domain features
described in docs/agent-guide and the approved implementation plan.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Sonnet 5 committed 2026-08-25 15:32:15 +02:00
commit 40631362b3
2016 files changed
+543898

No files matched your search

+1
View File
@@ -0,0 +1 @@
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).EventEmitter3=t()}(this,(function(){"use strict";var e={};return function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,r,s,i){if("function"!=typeof r)throw new TypeError("The listener must be a function");var c=new o(r,s||e,i),f=n?n+t:t;return e._events[f]?e._events[f].fn?e._events[f]=[e._events[f],c]:e._events[f].push(c):(e._events[f]=c,e._eventsCount++),e}function i(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function c(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),c.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},c.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,s=r.length,i=new Array(s);o<s;o++)i[o]=r[o].fn;return i},c.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},c.prototype.emit=function(e,t,r,o,s,i){var c=n?n+e:e;if(!this._events[c])return!1;var f,u,a=this._events[c],l=arguments.length;if(a.fn){switch(a.once&&this.removeListener(e,a.fn,void 0,!0),l){case 1:return a.fn.call(a.context),!0;case 2:return a.fn.call(a.context,t),!0;case 3:return a.fn.call(a.context,t,r),!0;case 4:return a.fn.call(a.context,t,r,o),!0;case 5:return a.fn.call(a.context,t,r,o,s),!0;case 6:return a.fn.call(a.context,t,r,o,s,i),!0}for(u=1,f=new Array(l-1);u<l;u++)f[u-1]=arguments[u];a.fn.apply(a.context,f)}else{var p,v=a.length;for(u=0;u<v;u++)switch(a[u].once&&this.removeListener(e,a[u].fn,void 0,!0),l){case 1:a[u].fn.call(a[u].context);break;case 2:a[u].fn.call(a[u].context,t);break;case 3:a[u].fn.call(a[u].context,t,r);break;case 4:a[u].fn.call(a[u].context,t,r,o);break;default:if(!f)for(p=1,f=new Array(l-1);p<l;p++)f[p-1]=arguments[p];a[u].fn.apply(a[u].context,f)}}return!0},c.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,r,o){var s=n?n+e:e;if(!this._events[s])return this;if(!t)return i(this,s),this;var c=this._events[s];if(c.fn)c.fn!==t||o&&!c.once||r&&c.context!==r||i(this,s);else{for(var f=0,u=[],a=c.length;f<a;f++)(c[f].fn!==t||o&&!c[f].once||r&&c[f].context!==r)&&u.push(c[f]);u.length?this._events[s]=1===u.length?u[0]:u:i(this,s)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&i(this,t)):(this._events=new r,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c}({get exports(){return e},set exports(t){e=t}}),e}));//# sourceMappingURL=eventemitter3.umd.min.js.map
+1
View File
@@ -0,0 +1 @@
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.MagicPortal=t()}(this,function(){var e=function(e){var t=this;this.rpc_counter=0,this.channel=e,this.foreign=new Map,this.local=new Map,this.calls=new Map,this.queue=[],this.connectionEstablished=!1,this.channel.addEventListener("message",function(e){var n=e.data;if(n&&"object"==typeof n)switch(n.type){case"MP_INIT":return t.onInit(n);case"MP_SET":return t.onSet(n);case"MP_CALL":return t.onCall(n);case"MP_RETURN":return t.onReturn(n)}}),this.channel.postMessage({type:"MP_INIT",id:1,reply:!0})};e.prototype.onInit=function(e){this.connectionEstablished=!0;var t=this.queue;this.queue=[];for(var n=0,o=t;n<o.length;n+=1){this.channel.postMessage(o[n])}e.reply&&this.channel.postMessage({type:"MP_INIT",reply:!1})},e.prototype.onSet=function(e){for(var t=this,n={},o=e.object,i=function(){var i=r[s],c=!e.void.includes(i);n[i]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t.rpc_counter=(t.rpc_counter+1)%Number.MAX_SAFE_INTEGER,new Promise(function(n,s){t.postMessage({type:"MP_CALL",object:o,method:i,id:t.rpc_counter,args:e,reply:c}),c?t.calls.set(t.rpc_counter,{resolve:n,reject:s}):n()})}},s=0,r=e.methods;s<r.length;s+=1)i();var c=this.foreign.get(e.object);this.foreign.set(e.object,n),"function"==typeof c&&c(n)},e.prototype.onCall=function(e){var t=this,n=this.local.get(e.object);n&&n[e.method].apply(n,e.args).then(function(n){return e.reply&&t.channel.postMessage({type:"MP_RETURN",id:e.id,result:n})}).catch(function(n){return t.channel.postMessage({type:"MP_RETURN",id:e.id,error:n.message})})},e.prototype.onReturn=function(e){if(this.calls.has(e.id)){var t=this.calls.get(e.id),n=t.resolve,o=t.reject;this.calls.delete(e.id),e.error?o(e.error):n(e.result)}},e.prototype.postMessage=function(e){this.connectionEstablished?this.channel.postMessage(e):this.queue.push(e)},e.prototype.set=function(e,t,n){void 0===n&&(n={}),this.local.set(e,t);var o=Object.entries(t).filter(function(e){return"function"==typeof e[1]}).map(function(e){return e[0]});this.postMessage({type:"MP_SET",object:e,methods:o,void:n.void||[]})},e.prototype.get=function(e){return new Promise(function(t,n){var o=this;return this.foreign.has(e)?t(this.foreign.get(e)):t(new Promise(function(t,n){return o.foreign.set(e,t)}))}.bind(this))};return function(t){var n=new e(t);Object.defineProperties(this,{get:{writable:!1,configurable:!1,value:n.get.bind(n)},set:{writable:!1,configurable:!1,value:n.set.bind(n)}})}});
+6
View File
@@ -0,0 +1,6 @@
/**
* @tabler/icons-react v2.47.0 - MIT
*/
(function(a,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react"),require("prop-types")):typeof define=="function"&&define.amd?define(["exports","react","prop-types"],t):(a=typeof globalThis<"u"?globalThis:a||self,t(a["tablerIcons"]={},a.React,a.PropTypes))})(this,function(a,t,M){"use strict";function p(v){return v&&typeof v=="object"&&"default"in v?v:{default:v}}var c=p(M),i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},I=Object.defineProperty,u=Object.defineProperties,m=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,s=(v,l,h)=>l in v?I(v,l,{enumerable:!0,configurable:!0,writable:!0,value:h}):v[l]=h,k=(v,l)=>{for(var h in l||(l={}))o.call(l,h)&&s(v,h,l[h]);if(n)for(var h of n(l))g.call(l,h)&&s(v,h,l[h]);return v},f=(v,l)=>u(v,m(l)),C=(v,l)=>{var h={};for(var d in v)o.call(v,d)&&l.indexOf(d)<0&&(h[d]=v[d]);if(v!=null&&n)for(var d of n(v))l.indexOf(d)<0&&g.call(v,d)&&(h[d]=v[d]);return h},e=(v,l,h)=>{const d=t.forwardRef((mi1,fi1)=>{var y=mi1,{color:Ci1="currentColor",size:r=24,stroke:zi1=2,children:bi1}=y,Si1=C(y,["color","size","stroke","children"]);return t.createElement("svg",k(f(k({ref:fi1},i),{width:r,height:r,stroke:Ci1,strokeWidth:zi1,className:`tabler-icon tabler-icon-${v}`}),Si1),[...h.map(([Bi1,wi1])=>t.createElement(Bi1,wi1)),...bi1||[]])});return d.propTypes={color:c.default.string,size:c.default.oneOfType([c.default.string,c.default.number]),stroke:c.default.oneOfType([c.default.string,c.default.number])},d.displayName=`${l}`,d},z=e("12-hours","Icon12Hours",[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13c.468 3.6 3.384 6.546 7 7",key:"svg-1"}],["path",{d:"M18 15h2a1 1 0 0 1 1 1v1a1 1 0 0 1 -1 1h-1a1 1 0 0 0 -1 1v1a1 1 0 0 0 1 1h2",key:"svg-2"}],["path",{d:"M15 21v-6",key:"svg-3"}]]),b=e("123","Icon123",[["path",{d:"M3 10l2 -2v8",key:"svg-0"}],["path",{d:"M9 8h3a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 0 -1 1v2a1 1 0 0 0 1 1h3",key:"svg-1"}],["path",{d:"M17 8h2.5a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1 -1.5 1.5h-1.5h1.5a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1 -1.5 1.5h-2.5",key:"svg-2"}]]),S=e("24-hours","Icon24Hours",[["path",{d:"M4 13c.325 2.532 1.881 4.781 4 6",key:"svg-0"}],["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2",key:"svg-1"}],["path",{d:"M4 5v4h4",key:"svg-2"}],["path",{d:"M12 15h2a1 1 0 0 1 1 1v1a1 1 0 0 1 -1 1h-1a1 1 0 0 0 -1 1v1a1 1 0 0 0 1 1h2",key:"svg-3"}],["path",{d:"M18 15v2a1 1 0 0 0 1 1h1",key:"svg-4"}],["path",{d:"M21 15v6",key:"svg-5"}]]),B=e("2fa","Icon2fa",[["path",{d:"M7 16h-4l3.47 -4.66a2 2 0 1 0 -3.47 -1.54",key:"svg-0"}],["path",{d:"M10 16v-8h4",key:"svg-1"}],["path",{d:"M10 12l3 0",key:"svg-2"}],["path",{d:"M17 16v-6a2 2 0 0 1 4 0v6",key:"svg-3"}],["path",{d:"M17 13l4 0",key:"svg-4"}]]),w=e("360-view","Icon360View",[["path",{d:"M14 6a1 1 0 0 0 -1 -1h-2a1 1 0 0 0 -1 1v6a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-3",key:"svg-0"}],["path",{d:"M3 5h2.5a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1 -1.5 1.5h-1.5h1.5a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1 -1.5 1.5h-2.5",key:"svg-1"}],["path",{d:"M17 7v4a2 2 0 1 0 4 0v-4a2 2 0 1 0 -4 0z",key:"svg-2"}],["path",{d:"M3 16c0 1.657 4.03 3 9 3s9 -1.343 9 -3",key:"svg-3"}]]),F=e("360","Icon360",[["path",{d:"M17 15.328c2.414 -.718 4 -1.94 4 -3.328c0 -2.21 -4.03 -4 -9 -4s-9 1.79 -9 4s4.03 4 9 4",key:"svg-0"}],["path",{d:"M9 13l3 3l-3 3",key:"svg-1"}]]),D=e("3d-cube-sphere-off","Icon3dCubeSphereOff",[["path",{d:"M6 17.6l-2 -1.1v-2.5",key:"svg-0"}],["path",{d:"M4 10v-2.5l2 -1.1",key:"svg-1"}],["path",{d:"M10 4.1l2 -1.1l2 1.1",key:"svg-2"}],["path",{d:"M18 6.4l2 1.1v2.5",key:"svg-3"}],["path",{d:"M20 14v2",key:"svg-4"}],["path",{d:"M14 19.9l-2 1.1l-2 -1.1",key:"svg-5"}],["path",{d:"M18 8.6l2 -1.1",key:"svg-6"}],["path",{d:"M12 12v2.5",key:"svg-7"}],["path",{d:"M12 18.5v2.5",key:"svg-8"}],["path",{d:"M12 12l-2 -1.12",key:"svg-9"}],["path",{d:"M6 8.6l-2 -1.1",key:"svg-10"}],["path",{d:"M3 3l18 18",key:"svg-11"}]]),P=e("3d-cube-sphere","Icon3dCubeSphere",[["path",{d:"M6 17.6l-2 -1.1v-2.5",key:"svg-0"}],["path",{d:"M4 10v-2.5l2 -1.1",key:"svg-1"}],["path",{d:"M10 4.1l2 -1.1l2 1.1",key:"svg-2"}],["path",{d:"M18 6.4l2 1.1v2.5",key:"svg-3"}],["path",{d:"M20 14v2.5l-2 1.12",key:"svg-4"}],["path",{d:"M14 19.9l-2 1.1l-2 -1.1",key:"svg-5"}],["path",{d:"M12 12l2 -1.1",key:"svg-6"}],["path",{d:"M18 8.6l2 -1.1",key:"svg-7"}],["path",{d:"M12 12l0 2.5",key:"svg-8"}],["path",{d:"M12 18.5l0 2.5",key:"svg-9"}],["path",{d:"M12 12l-2 -1.12",key:"svg-10"}],["path",{d:"M6 8.6l-2 -1.1",key:"svg-11"}]]),O=e("3d-rotate","Icon3dRotate",[["path",{d:"M12 3a7 7 0 0 1 7 7v4l-3 -3",key:"svg-0"}],["path",{d:"M22 11l-3 3",key:"svg-1"}],["path",{d:"M8 15.5l-5 -3l5 -3l5 3v5.5l-5 3z",key:"svg-2"}],["path",{d:"M3 12.5v5.5l5 3",key:"svg-3"}],["path",{d:"M8 15.545l5 -3.03",key:"svg-4"}]]),A=e("a-b-2","IconAB2",[Line truncated
//# sourceMappingURL=tabler-icons-react.min.js.map
+1
View File
@@ -0,0 +1 @@
(()=>{function o(o,e,n,r){Object.defineProperty(o,e,{get:n,set:r,enumerable:!0,configurable:!0})}var e=globalThis,n={},r={},t=e.parcelRequiree92c;null==t&&((t=function(o){if(o in n)return n[o].exports;if(o in r){var e=r[o];delete r[o];var t={id:o,exports:{}};return n[o]=t,e.call(t.exports,t,t.exports),t.exports}var i=Error("Cannot find module '"+o+"'");throw i.code="MODULE_NOT_FOUND",i}).register=function(o,e){r[o]=e},e.parcelRequiree92c=t);var i=t.register;i("9Hk4c",function(e,n){o(e.exports,"Fragment",()=>r,o=>r=o),o(e.exports,"jsx",()=>i,o=>i=o),o(e.exports,"jsxs",()=>s,o=>s=o);var r,i,s,l=t("a46g0"),C=Symbol.for("react.element"),c=Symbol.for("react.fragment"),d=Object.prototype.hasOwnProperty,a={current:null},h={key:!0,ref:!0,__self:!0,__source:!0};function w(o,e,n){var r,t={},i=null,s=null;for(r in void 0!==n&&(i=""+n),void 0!==e.key&&(i=""+e.key),void 0!==e.ref&&(s=e.ref),e)d.call(e,r)&&!h.hasOwnProperty(r)&&(t[r]=e[r]);if(o&&o.defaultProps)for(r in e=o.defaultProps)void 0===t[r]&&(t[r]=e[r]);return{$$typeof:C,type:o,key:i,ref:s,props:t,_owner:a.current}}r=c,i=w,s=w}),i("a46g0",function(o,e){o.exports=React});var s=ReactJSXRuntime;t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),t("a46g0"),window.tablerIcons=window.tablerIcons||{},window.tablerIcons.IconAddLink=function({size:o=24,color:e="currentColor",stroke:n=0,...r}){return(0,s.jsx)("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",strokeWidth:n,stroke:e,strokeLinecap:"round",strokeLinejoin:"round",className:"icon iconTabler iconTablerExtAddLink",...r,xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.2933 4.29278C13.1438 3.4422 14.2975 2.96436 15.5004 2.96436C16.7033 2.96436 17.8569 3.4422 18.7075 4.29278C19.5581 5.14336 20.0359 6.29699 20.0359 7.49989C20.0359 8.70279 19.5581 9.85642 18.7075 10.707L14.7109 14.7036C14.2927 15.1294 13.7939 15.4678 13.2436 15.699C12.6917 15.9309 12.099 16.0504 11.5004 16.0504C10.9017 16.0504 10.309 15.9309 9.7571 15.699C9.20517 15.4671 8.70507 15.1274 8.28608 14.6997C7.89956 14.3053 7.90602 13.6721 8.30051 13.2856C8.695 12.8991 9.32813 12.9055 9.71465 13.3C9.94742 13.5376 10.2253 13.7263 10.5319 13.8552C10.8385 13.984 11.1678 14.0504 11.5004 14.0504C11.833 14.0504 12.1622 13.984 12.4688 13.8552C12.7755 13.7263 13.0533 13.5376 13.2861 13.3L13.2932 13.2927L13.2933 13.2928L17.2933 9.29278C17.7688 8.81728 18.0359 8.17235 18.0359 7.49989C18.0359 6.82742 17.7688 6.1825 17.2933 5.707C16.8178 5.23149 16.1728 4.96436 15.5004 4.96436C14.8279 4.96436 14.183 5.23149 13.7075 5.707L13.2075 6.207C12.8169 6.59752 12.1838 6.59752 11.7933 6.207C11.4027 5.81647 11.4027 5.18331 11.7933 4.79278L12.2933 4.29278ZM8.75711 8.30085C9.30904 8.06892 9.9017 7.94946 10.5004 7.94946C11.0991 7.94946 11.6917 8.06892 12.2436 8.30085C12.7956 8.53277 13.2957 8.87249 13.7147 9.30012C14.1012 9.69461 14.0947 10.3277 13.7002 10.7143C13.3057 11.1008 12.6726 11.0943 12.2861 10.6998C12.0533 10.4623 11.7755 10.2735 11.4689 10.1447C11.1622 10.0158 10.833 9.94946 10.5004 9.94946C10.1678 9.94946 9.83853 10.0158 9.5319 10.1447C9.22527 10.2735 8.94743 10.4623 8.71466 10.6998L8.70752 10.7071L8.70748 10.7071L4.70748 14.7071C4.23198 15.1826 3.96484 15.8275 3.96484 16.5C3.96484 17.1724 4.23198 17.8174 4.70748 18.2929C5.18299 18.7684 5.82791 19.0355 6.50038 19.0355C7.17284 19.0355 7.81777 18.7684 8.29327 18.2929L8.79327 17.7929C9.18379 17.4023 9.81696 17.4023 10.2075 17.7929C10.598 18.1834 10.598 18.8166 10.2075 19.2071L9.70748 19.7071C8.85691 20.5577 7.70328 21.0355 6.50038 21.0355C5.29748 21.0355 4.14385 20.5577 3.29327 19.7071C2.44269 18.8565 1.96484 17.7029 1.96484 16.5C1.96484 15.2971 2.44269 14.1434 3.29327 13.2929L7.28985 9.29629C7.70807 8.87046 8.20683 8.53208 8.75711 8.30085ZM19.0005 14C19.5528 14 20.0005 14.4477 20.0005 15V17H22.0005C22.5528 17 23.0005 17.4477 23.0005 18C23.0005 18.5523 22.5528 19 22.0005 19H20.0005V21C20.0005 21.5523 19.5528 22 19.0005 22C18.4482 22 18.0005 21.5523 18.0005 21V19H16.0005C15.4482 19 15.0005 18.5523 15.0005 18C15.0005 17.4477 15.4482 17 16.0005 17H18.0005V15C18.0005 14.4477 18.4482 14 19.0005 14Z",fill:e})})},window.tablerIcons.IconAppFeature=function({size:o=24,color:e="currentColor",stroke:n=0,...r}){return(0,s.jsxs)("svg",{width:o,height:o,viewBox:"0 0 24 Line truncated
+65
View File
@@ -0,0 +1,65 @@
importScripts(
// Batched optimization
"./lightning-fs.min.js",
// Fixed a bug
"./magic_portal.js"
);
const detect = () => {
if (typeof window !== 'undefined' && !self.skipWaiting) {
return 'window'
} else if (typeof self !== 'undefined' && !self.skipWaiting) {
return 'Worker'
} else if (typeof self !== 'undefined' && self.skipWaiting) {
return 'ServiceWorker'
}
};
const fsName = 'logseq';
const createFS = () => new LightningFS(fsName);
let fs = createFS();
let pfs = fs.promises;
if (typeof self !== 'undefined') {
self.fs = fs;
self.pfs = pfs;
}
if (detect() === 'Worker') {
const portal = new MagicPortal(self);
portal.set('fs', fs);
portal.set('pfs', pfs);
portal.set('workerThread', {
rimraf: async function (path) {
// try {
// // First assume path is itself a file
// await pfs.unlink(path)
// // if that worked we're done
// return
// } catch (err) {
// // Otherwise, path must be a directory
// if (err.code !== 'EISDIR') throw err
// }
// Knowing path is a directory,
// first, assume everything inside path is a file.
let files = await pfs.readdir(path);
for (let file of files) {
let child = path + '/' + file
try {
await pfs.unlink(child)
} catch (err) {
if (err.code !== 'EISDIR') throw err
}
}
// Assume what's left are directories and recurse.
let dirs = await pfs.readdir(path)
for (let dir of dirs) {
let child = path + '/' + dir
await rimraf(child, pfs)
}
// Finally, delete the empty directory
await pfs.rmdir(path)
}
});
}