@themartiancompany/fs 0.0.21 → 0.0.25

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.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={314(e,t,r){r.a(e,async(e,t)=>{try{(0,(await r.e(10).then(r.bind(r,10))).startSyncAgent)(),t()}catch(e){t(e)}},1)}};const t={};function r(o){const n=t[o];if(void 0!==n)return n.exports;const c=t[o]={exports:{}};return e[o](c,c.exports,r),c.exports}r.m=e,(()=>{const e=Symbol("webpack queues"),t=Symbol("webpack exports"),o=Symbol("webpack error"),n=e=>{e?.d<1&&(e.d=1,e.forEach(e=>e.r--),e.forEach(e=>e.r--?e.r++:e()))};r.a=(r,c,a)=>{let s;a&&((s=[]).d=-1);const i=new Set,l=r.exports;let u,f,p;const d=new Promise((e,t)=>{p=t,f=e});d[t]=l,d[e]=e=>(s&&e(s),i.forEach(e),d.catch(e=>{})),r.exports=d,c(r=>{let c;u=(r=>r.map(r=>{if(null!==r&&"object"==typeof r){if(r[e])return r;if(r.then){const c=[];c.d=0,r.then(e=>{a[t]=e,n(c)},e=>{a[o]=e,n(c)});const a={};return a[e]=e=>e(c),a}}const c={};return c[e]=e=>{},c[t]=r,c}))(r);const a=()=>u.map(e=>{if(e[o])throw e[o];return e[t]}),l=new Promise(t=>{c=()=>t(a),c.r=0;const r=e=>e!==s&&!i.has(e)&&(i.add(e),e&&!e.d&&(c.r++,e.push(c)));u.forEach(t=>t[e](r))});return c.r?l:a()},e=>(e?p(d[o]=e):f(l),n(s))),s?.d<0&&(s.d=0)}})(),(()=>{const e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;let t;r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}const c=Object.create(null);r.r(c);const a={};t=t||[null,e({}),e([]),e(e)];for(var s=2&n&&o;("object"==typeof s||"function"==typeof s)&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>o[e]);return a.default=()=>o,r.d(c,a),c}})(),r.d=(e,t)=>{if(Array.isArray(t))for(var o=0;o<t.length;){var n=t[o++],c=t[o++];r.o(e,n)?0===c&&o++:0===c?Object.defineProperty(e,n,{enumerable:!0,value:t[o++]}):Object.defineProperty(e,n,{enumerable:!0,get:c})}else for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,o)=>(r.f[o](e,t),t),[])),r.u=e=>e+".fs-worker.js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="@themartiancompany/fs:";r.l=(o,n,c,a)=>{if(e[o])return void e[o].push(n);let s,i;if(void 0!==c){const e=document.getElementsByTagName("script");for(var l=0;l<e.length;l++){const r=e[l];if(r.getAttribute("src")==o||r.getAttribute("data-webpack")==t+c){s=r;break}}}s||(i=!0,s=document.createElement("script"),s.charset="utf-8",r.nc&&s.setAttribute("nonce",r.nc),s.setAttribute("data-webpack",t+c),s.src=o),e[o]=[n];const u=(t,r)=>{s.onerror=s.onload=null,clearTimeout(f);const n=e[o];if(delete e[o],s.parentNode?.removeChild(s),n?.forEach(e=>e(r)),t)return t(r)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=u.bind(null,s.onerror),s.onload=u.bind(null,s.onload),i&&document.head.appendChild(s)}})(),r.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{let e;r.g.importScripts&&(e=r.g.location+"");const t=r.g.document;if(!e&&t&&("SCRIPT"===t.currentScript?.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){const r=t.getElementsByTagName("script");if(r.length){let t=r.length-1;for(;t>-1&&(!e||!/^http(s?):/.test(e));)e=r[t--].src}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{const e={792:0};r.f.j=(t,o)=>{let n=r.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else{const c=new Promise((r,o)=>n=e[t]=[r,o]);o.push(n[2]=c);const a=r.p+r.u(t),s=new Error,i=o=>{if(r.o(e,t)&&(n=e[t],0!==n&&(e[t]=void 0),n)){const e=o&&("load"===o.type?"missing":o.type),r=o&&o.target&&o.target.src;s.message="Loading chunk "+t+" failed.\n("+e+": "+r+")",s.name="ChunkLoadError",s.type=e,s.request=r,s.event=o,n[1](s)}};r.l(a,i,"chunk-"+t,t)}};const t=(t,o)=>{let[n,c,a]=o;var s,i,l=0;if(n.some(t=>0!==e[t])){for(s in c)r.o(c,s)&&(r.m[s]=c[s]);a&&a(r)}for(t&&t(o);l<n.length;l++)i=n[l],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0},o=self.webpackChunk_themartiancompany_fs=self.webpackChunk_themartiancompany_fs||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})(),r(314)})();
1
+ (()=>{"use strict";var t={314(t,e,r){r.a(t,async(t,e)=>{try{(0,(await r.e(10).then(()=>r(10))).startSyncAgent)(),e()}catch(t){e(t)}},1)}};const e={};function r(o){const n=e[o];if(void 0!==n)return n.exports;const c=e[o]={exports:{}};return t[o](c,c.exports,r),c.exports}r.m=t,(()=>{const t=Symbol("webpack queues"),e=Symbol("webpack exports"),o=Symbol("webpack error"),n=t=>{t?.d<1&&(t.d=1,t.forEach(t=>t.r--),t.forEach(t=>t.r--?t.r++:t()))};r.a=(r,c,s)=>{let i;s&&((i=[]).d=-1);const a=new Set,u=r.exports;let l,f,p;const d=new Promise((t,e)=>{p=e,f=t});d[e]=u,d[t]=t=>(i&&t(i),a.forEach(t),d.catch(t=>{})),r.exports=d,c(r=>{let c;l=(r=>r.map(r=>{if(null!==r&&"object"==typeof r){if(r[t])return r;if(r.then){const c=[];c.d=0,r.then(t=>{s[e]=t,n(c)},t=>{s[o]=t,n(c)});const s={};return s[t]=t=>t(c),s}}const c={};return c[t]=t=>{},c[e]=r,c}))(r);const s=()=>l.map(t=>{if(t[o])throw t[o];return t[e]}),u=new Promise(e=>{c=()=>e(s),c.r=0;const r=t=>t!==i&&!a.has(t)&&(a.add(t),t&&!t.d&&(c.r++,t.push(c)));l.forEach(e=>e[t](r))});return c.r?u:s()},t=>(t?p(d[o]=t):f(u),n(i))),i?.d<0&&(i.d=0)}})(),(()=>{const t=Object.getPrototypeOf;let e;r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}const c=Object.create(null);r.r(c);const s={};e=e||[null,t({}),t([]),t(t)];for(var i=2&n&&o;("object"==typeof i||"function"==typeof i)&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach(t=>s[t]=()=>o[t]);return s.default=()=>o,r.d(c,s),c}})(),r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.f={},r.e=t=>Promise.all(Object.keys(r.f).reduce((e,o)=>(r.f[o](t,e),e),[])),r.u=t=>t+".fs-worker.js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{const t={},e="@themartiancompany/fs:";r.l=(o,n,c,s)=>{if(t[o])return void t[o].push(n);let i,a;if(void 0!==c){const t=document.getElementsByTagName("script");for(var u=0;u<t.length;u++){const r=t[u];if(r.getAttribute("src")==o||r.getAttribute("data-webpack")==e+c){i=r;break}}}i||(a=!0,i=document.createElement("script"),i.charset="utf-8",r.nc&&i.setAttribute("nonce",r.nc),i.setAttribute("data-webpack",e+c),i.src=o),t[o]=[n];const l=(e,r)=>{i.onerror=i.onload=null,clearTimeout(f);const n=t[o];if(delete t[o],i.parentNode?.removeChild(i),n?.forEach(t=>t(r)),e)return e(r)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=l.bind(null,i.onerror),i.onload=l.bind(null,i.onload),a&&document.head.appendChild(i)}})(),r.r=t=>{Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{let t;r.g.importScripts&&(t=r.g.location+"");const e=r.g.document;if(!t&&e&&("SCRIPT"===e.currentScript?.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){const r=e.getElementsByTagName("script");if(r.length){let e=r.length-1;for(;e>-1&&(!t||!/^https?:/.test(t));)t=r[e--].src}}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:|[?#].*$/g,"").replace(/\/[^/]+$/,"/"),r.p=t})(),(()=>{const t={792:0};r.f.j=(e,o)=>{let n=r.o(t,e)?t[e]:void 0;if(0!==n)if(n)o.push(n[2]);else{const c=new Promise((r,o)=>n=t[e]=[r,o]);o.push(n[2]=c);const s=new Error,i=o=>{if(r.o(t,e)&&(n=t[e],0!==n&&(t[e]=void 0),n)){const t=o&&("load"===o.type?"missing":o.type),r=o&&o.target&&o.target.src;s.message="Loading chunk "+e+" failed.\n("+t+": "+r+")",s.name="ChunkLoadError",s.type=t,s.request=r,s.event=o,n[1](s)}};r.l(r.p+r.u(e),i,"chunk-"+e,e)}};const e=(e,o)=>{let[n,c,s]=o;var i,a,u=0;if(n.some(e=>0!==t[e])){for(i in c)r.o(c,i)&&(r.m[i]=c[i]);s&&s(r)}for(e&&e(o);u<n.length;u++)a=n[u],r.o(t,a)&&t[a]&&t[a][0](),t[a]=0},o=self.webpackChunk_themartiancompany_fs=self.webpackChunk_themartiancompany_fs||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})(),r(314)})();
package/dist/fs/fs.js CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";var e={727(e,t,r){r.a(e,async(e,t)=>{try{async function o(){let e;try{e=await r.e(10).then(r.bind(r,10))}catch(e){console.log(e);const t="Error importing the '@themartiancompany/opfs' module as 'opfs'. If you got this error while bundling a webpack for a project depending on this module double check its 'webpack.config.js' file or whether the 'opfs' module is listed in developer dependencies and install them.I'm sorry for this inconvenience but Node packagement system does not currently distinguish 'development' from 'build' dependencies.";throw console.error(t),e}return e}async function n(){let e;return"undefined"==typeof window&&void 0!==r.g&&r.g.global===r.g&&"function"!=typeof r||(e=await o()),e}async function i(e){return void 0===e&&(e=await n()),function(t){return!e.statSync(t).isFile()}}const c=await n();c.isDirSync=await i(c),c.isDir=c.isDirSync,t()}catch(s){t(s)}},1)}};const t={};function r(o){const n=t[o];if(void 0!==n)return n.exports;const i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}r.m=e,(()=>{const e=Symbol("webpack queues"),t=Symbol("webpack exports"),o=Symbol("webpack error"),n=e=>{e?.d<1&&(e.d=1,e.forEach(e=>e.r--),e.forEach(e=>e.r--?e.r++:e()))};r.a=(r,i,c)=>{let s;c&&((s=[]).d=-1);const a=new Set,l=r.exports;let u,f,p;const d=new Promise((e,t)=>{p=t,f=e});d[t]=l,d[e]=e=>(s&&e(s),a.forEach(e),d.catch(e=>{})),r.exports=d,i(r=>{let i;u=(r=>r.map(r=>{if(null!==r&&"object"==typeof r){if(r[e])return r;if(r.then){const i=[];i.d=0,r.then(e=>{c[t]=e,n(i)},e=>{c[o]=e,n(i)});const c={};return c[e]=e=>e(i),c}}const i={};return i[e]=e=>{},i[t]=r,i}))(r);const c=()=>u.map(e=>{if(e[o])throw e[o];return e[t]}),l=new Promise(t=>{i=()=>t(c),i.r=0;const r=e=>e!==s&&!a.has(e)&&(a.add(e),e&&!e.d&&(i.r++,e.push(i)));u.forEach(t=>t[e](r))});return i.r?l:c()},e=>(e?p(d[o]=e):f(l),n(s))),s?.d<0&&(s.d=0)}})(),(()=>{const e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;let t;r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}const i=Object.create(null);r.r(i);const c={};t=t||[null,e({}),e([]),e(e)];for(var s=2&n&&o;("object"==typeof s||"function"==typeof s)&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach(e=>c[e]=()=>o[e]);return c.default=()=>o,r.d(i,c),i}})(),r.d=(e,t)=>{if(Array.isArray(t))for(var o=0;o<t.length;){var n=t[o++],i=t[o++];r.o(e,n)?0===i&&o++:0===i?Object.defineProperty(e,n,{enumerable:!0,value:t[o++]}):Object.defineProperty(e,n,{enumerable:!0,get:i})}else for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,o)=>(r.f[o](e,t),t),[])),r.u=e=>e+".fs.js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="@themartiancompany/fs:";r.l=(o,n,i,c)=>{if(e[o])return void e[o].push(n);let s,a;if(void 0!==i){const e=document.getElementsByTagName("script");for(var l=0;l<e.length;l++){const r=e[l];if(r.getAttribute("src")==o||r.getAttribute("data-webpack")==t+i){s=r;break}}}s||(a=!0,s=document.createElement("script"),s.charset="utf-8",r.nc&&s.setAttribute("nonce",r.nc),s.setAttribute("data-webpack",t+i),s.src=o),e[o]=[n];const u=(t,r)=>{s.onerror=s.onload=null,clearTimeout(f);const n=e[o];if(delete e[o],s.parentNode?.removeChild(s),n?.forEach(e=>e(r)),t)return t(r)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=u.bind(null,s.onerror),s.onload=u.bind(null,s.onload),a&&document.head.appendChild(s)}})(),r.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{let e;r.g.importScripts&&(e=r.g.location+"");const t=r.g.document;if(!e&&t&&("SCRIPT"===t.currentScript?.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){const r=t.getElementsByTagName("script");if(r.length){let t=r.length-1;for(;t>-1&&(!e||!/^http(s?):/.test(e));)e=r[t--].src}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{const e={792:0};r.f.j=(t,o)=>{let n=r.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else{const i=new Promise((r,o)=>n=e[t]=[r,o]);o.push(n[2]=i);const c=r.p+r.u(t),s=new Error,a=o=>{if(r.o(e,t)&&(n=e[t],0!==n&&(e[t]=void 0),n)){const e=o&&("load"===o.type?"missing":o.type),r=o&&o.target&&o.target.src;s.message="Loading chunk "+t+" failed.\n("+e+": "+r+")",s.name="ChunkLoadError",s.type=e,s.request=r,s.event=o,n[1](s)}};r.l(c,a,"chunk-"+t,t)}};const t=(t,o)=>{let[n,i,c]=o;var s,a,l=0;if(n.some(t=>0!==e[t])){for(s in i)r.o(i,s)&&(r.m[s]=i[s]);c&&c(r)}for(t&&t(o);l<n.length;l++)a=n[l],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0},o=self.webpackChunk_themartiancompany_fs=self.webpackChunk_themartiancompany_fs||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})(),r(727)})();
1
+ (()=>{"use strict";var e={727(e,t,o){o.a(e,async(e,t)=>{try{async function n(){let e;try{e=(await o.e(10).then(()=>o(10))).default}catch(e){console.log(e);const t="Error importing the '@themartiancompany/opfs' module as 'opfs'. If you got this error while bundling a webpack for a project depending on this module double check its 'webpack.config.js' file or whether the 'opfs' module is listed in developer dependencies and install them.I'm sorry for this inconvenience but Node packagement system does not currently distinguish 'development' from 'build' dependencies.";throw console.error(t),e}return e}async function r(){let e;return"undefined"==typeof window&&void 0!==o.g&&o.g.global===o.g&&"function"!=typeof o||(e=await n()),e}async function c(e){return void 0===e&&(e=await r()),function(t){let o,n;try{o=e.statSync(t),n=!o.isFile()}catch(e){"ENOENT"==e.code&&(n=!1)}return n}}const i=await r();i.isDirSync=await c(i),i.isDir=i.isDirSync,t()}catch(s){t(s)}},1)}};const t={};function o(n){const r=t[n];if(void 0!==r)return r.exports;const c=t[n]={exports:{}};return e[n](c,c.exports,o),c.exports}o.m=e,(()=>{const e=Symbol("webpack queues"),t=Symbol("webpack exports"),n=Symbol("webpack error"),r=e=>{e?.d<1&&(e.d=1,e.forEach(e=>e.r--),e.forEach(e=>e.r--?e.r++:e()))};o.a=(o,c,i)=>{let s;i&&((s=[]).d=-1);const a=new Set,l=o.exports;let u,f,d;const p=new Promise((e,t)=>{d=t,f=e});p[t]=l,p[e]=e=>(s&&e(s),a.forEach(e),p.catch(e=>{})),o.exports=p,c(o=>{let c;u=(o=>o.map(o=>{if(null!==o&&"object"==typeof o){if(o[e])return o;if(o.then){const c=[];c.d=0,o.then(e=>{i[t]=e,r(c)},e=>{i[n]=e,r(c)});const i={};return i[e]=e=>e(c),i}}const c={};return c[e]=e=>{},c[t]=o,c}))(o);const i=()=>u.map(e=>{if(e[n])throw e[n];return e[t]}),l=new Promise(t=>{c=()=>t(i),c.r=0;const o=e=>e!==s&&!a.has(e)&&(a.add(e),e&&!e.d&&(c.r++,e.push(c)));u.forEach(t=>t[e](o))});return c.r?l:i()},e=>(e?d(p[n]=e):f(l),r(s))),s?.d<0&&(s.d=0)}})(),(()=>{const e=Object.getPrototypeOf;let t;o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}const c=Object.create(null);o.r(c);const i={};t=t||[null,e({}),e([]),e(e)];for(var s=2&r&&n;("object"==typeof s||"function"==typeof s)&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach(e=>i[e]=()=>n[e]);return i.default=()=>n,o.d(c,i),c}})(),o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,n)=>(o.f[n](e,t),t),[])),o.u=e=>e+".fs.js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="@themartiancompany/fs:";o.l=(n,r,c,i)=>{if(e[n])return void e[n].push(r);let s,a;if(void 0!==c){const e=document.getElementsByTagName("script");for(var l=0;l<e.length;l++){const o=e[l];if(o.getAttribute("src")==n||o.getAttribute("data-webpack")==t+c){s=o;break}}}s||(a=!0,s=document.createElement("script"),s.charset="utf-8",o.nc&&s.setAttribute("nonce",o.nc),s.setAttribute("data-webpack",t+c),s.src=n),e[n]=[r];const u=(t,o)=>{s.onerror=s.onload=null,clearTimeout(f);const r=e[n];if(delete e[n],s.parentNode?.removeChild(s),r?.forEach(e=>e(o)),t)return t(o)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=u.bind(null,s.onerror),s.onload=u.bind(null,s.onload),a&&document.head.appendChild(s)}})(),o.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{let e;o.g.importScripts&&(e=o.g.location+"");const t=o.g.document;if(!e&&t&&("SCRIPT"===t.currentScript?.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){const o=t.getElementsByTagName("script");if(o.length){let t=o.length-1;for(;t>-1&&(!e||!/^https?:/.test(e));)e=o[t--].src}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:|[?#].*$/g,"").replace(/\/[^/]+$/,"/"),o.p=e})(),(()=>{const e={792:0};o.f.j=(t,n)=>{let r=o.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{const c=new Promise((o,n)=>r=e[t]=[o,n]);n.push(r[2]=c);const i=new Error,s=n=>{if(o.o(e,t)&&(r=e[t],0!==r&&(e[t]=void 0),r)){const e=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;i.message="Loading chunk "+t+" failed.\n("+e+": "+o+")",i.name="ChunkLoadError",i.type=e,i.request=o,i.event=n,r[1](i)}};o.l(o.p+o.u(t),s,"chunk-"+t,t)}};const t=(t,n)=>{let[r,c,i]=n;var s,a,l=0;if(r.some(t=>0!==e[t])){for(s in c)o.o(c,s)&&(o.m[s]=c[s]);i&&i(o)}for(t&&t(n);l<r.length;l++)a=r[l],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0},n=self.webpackChunk_themartiancompany_fs=self.webpackChunk_themartiancompany_fs||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),o(727)})();
package/fs CHANGED
@@ -29,9 +29,12 @@ async function
29
29
  let
30
30
  _fs;
31
31
  try {
32
+ const
33
+ _fs_module =
34
+ await import(
35
+ "opfs");
32
36
  _fs =
33
- await import(
34
- "opfs");
37
+ _fs_module.default;
35
38
  }
36
39
  catch(
37
40
  _error) {
@@ -65,9 +68,12 @@ async function
65
68
  if ( typeof window === 'undefined' &&
66
69
  ( typeof global !== 'undefined' && global.global === global ) &&
67
70
  typeof __webpack_require__ !== 'function' ) {
71
+ const
72
+ _fs_module =
73
+ await import(
74
+ "node:fs");
68
75
  _fs =
69
- await import(
70
- "node:fs");
76
+ _fs_module.default;
71
77
  _fs[
72
78
  "fsWorkerStart"] =
73
79
  _fs_worker_start_get(
@@ -96,9 +102,12 @@ async function
96
102
  await _opfs_module_get();
97
103
  }
98
104
  else if ( _module_name == 'fs' ) {
105
+ const
106
+ _fs_module =
107
+ await import(
108
+ "node:fs");
99
109
  _fs =
100
- await import(
101
- "node:fs");
110
+ _fs_module.default;
102
111
  _fs[
103
112
  "fsWorkerStart"] =
104
113
  _fs_worker_start_get(
@@ -153,13 +162,27 @@ async function
153
162
  _is_dir_sync =
154
163
  function(
155
164
  _path) {
156
- const
165
+ let
166
+ _file_info,
167
+ _is_dir;
168
+ try {
157
169
  _file_info =
158
170
  _fs_module.statSync(
159
171
  _path);
160
- const
161
172
  _is_dir =
162
173
  ! _file_info.isFile();
174
+ }
175
+ catch(
176
+ _error) {
177
+ const
178
+ _code =
179
+ _error[
180
+ "code"];
181
+ if ( _code == "ENOENT" ) {
182
+ _is_dir =
183
+ false;
184
+ }
185
+ }
163
186
  return _is_dir;
164
187
  };
165
188
  return _is_dir_sync;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "description":
5
5
  "Platform-independent File System ('fs') module.",
6
6
  "version":
7
- "0.0.21",
7
+ "0.0.25",
8
8
  "homepage":
9
9
  "https://github.com/themartiancompany/tmcfs",
10
10
  "license":
@@ -86,7 +86,7 @@
86
86
  "opfs":
87
87
  "npm:@themartiancompany/opfs@^2.0.20",
88
88
  "safely-serve":
89
- "^0.0.14",
89
+ "^0.0.21",
90
90
  "web-worker":
91
91
  "^1.5.0",
92
92
  "webpack":