@themartiancompany/fs 0.0.22 → 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.
Files changed (3) hide show
  1. package/dist/fs/fs.js +1 -1
  2. package/fs +16 -2
  3. package/package.json +2 -2
package/dist/fs/fs.js CHANGED
@@ -1 +1 @@
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 i(e){return void 0===e&&(e=await r()),function(t){return!e.statSync(t).isFile()}}const c=await r();c.isDirSync=await i(c),c.isDir=c.isDirSync,t()}catch(s){t(s)}},1)}};const t={};function o(n){const r=t[n];if(void 0!==r)return r.exports;const i=t[n]={exports:{}};return e[n](i,i.exports,o),i.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,i,c)=>{let s;c&&((s=[]).d=-1);const a=new Set,l=o.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=>{})),o.exports=d,i(o=>{let i;u=(o=>o.map(o=>{if(null!==o&&"object"==typeof o){if(o[e])return o;if(o.then){const i=[];i.d=0,o.then(e=>{c[t]=e,r(i)},e=>{c[n]=e,r(i)});const c={};return c[e]=e=>e(i),c}}const i={};return i[e]=e=>{},i[t]=o,i}))(o);const c=()=>u.map(e=>{if(e[n])throw e[n];return e[t]}),l=new Promise(t=>{i=()=>t(c),i.r=0;const o=e=>e!==s&&!a.has(e)&&(a.add(e),e&&!e.d&&(i.r++,e.push(i)));u.forEach(t=>t[e](o))});return i.r?l:c()},e=>(e?p(d[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 i=Object.create(null);o.r(i);const c={};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=>c[e]=()=>n[e]);return c.default=()=>n,o.d(i,c),i}})(),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,i,c)=>{if(e[n])return void e[n].push(r);let s,a;if(void 0!==i){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+i){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+i),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 i=new Promise((o,n)=>r=e[t]=[o,n]);n.push(r[2]=i);const c=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;c.message="Loading chunk "+t+" failed.\n("+e+": "+o+")",c.name="ChunkLoadError",c.type=e,c.request=o,c.event=n,r[1](c)}};o.l(o.p+o.u(t),s,"chunk-"+t,t)}};const t=(t,n)=>{let[r,i,c]=n;var s,a,l=0;if(r.some(t=>0!==e[t])){for(s in i)o.o(i,s)&&(o.m[s]=i[s]);c&&c(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)})();
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
@@ -162,13 +162,27 @@ async function
162
162
  _is_dir_sync =
163
163
  function(
164
164
  _path) {
165
- const
165
+ let
166
+ _file_info,
167
+ _is_dir;
168
+ try {
166
169
  _file_info =
167
170
  _fs_module.statSync(
168
171
  _path);
169
- const
170
172
  _is_dir =
171
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
+ }
172
186
  return _is_dir;
173
187
  };
174
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.22",
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":