@themartiancompany/fs 0.0.21 → 0.0.22
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/dist/fs/fs-worker.js +1 -1
- package/dist/fs/fs.js +1 -1
- package/fs +15 -6
- package/package.json +1 -1
package/dist/fs/fs-worker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var
|
|
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,
|
|
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)})();
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
101
|
-
"node:fs");
|
|
110
|
+
_fs_module.default;
|
|
102
111
|
_fs[
|
|
103
112
|
"fsWorkerStart"] =
|
|
104
113
|
_fs_worker_start_get(
|