tmcsplit 0.0.13 → 0.0.14

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={47(e,t,r){r.a(e,async(e,t)=>{try{const e=(await r.e(35).then(r.bind(r,35))).default,o=(e._basename,e._dirname,e._ls,e._msg_error,e._msg_info,e._mv,e._require),n=await o("split-file");n._split_file,n._split_file_by_size,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]={id:o,loaded:!1,exports:{}};return e[o](c,c.exports,r),c.loaded=!0,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,i)=>{let s;i&&((s=[]).d=-1);const a=new Set,l=r.exports;let u,p,d;const f=new Promise((e,t)=>{d=t,p=e});f[t]=l,f[e]=e=>(s&&e(s),a.forEach(e),f.catch(e=>{})),r.exports=f,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=>{i[t]=e,n(c)},e=>{i[o]=e,n(c)});const i={};return i[e]=e=>e(c),i}}const c={};return c[e]=e=>{},c[t]=r,c}))(r);const i=()=>u.map(e=>{if(e[o])throw e[o];return e[t]}),l=new Promise(t=>{c=()=>t(i),c.r=0;const r=e=>e!==s&&!a.has(e)&&(a.add(e),e&&!e.d&&(c.r++,e.push(c)));u.forEach(t=>t[e](r))});return c.r?l:i()},e=>(e?d(f[o]=e):p(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 i={};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=>i[e]=()=>o[e]);return i.default=()=>o,r.d(c,i),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+".libtmcsplit.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.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="tmcsplit:";r.l=(o,n,c,i)=>{if(e[o])return void e[o].push(n);let s,a;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||(a=!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(p);const n=e[o];if(delete e[o],s.parentNode?.removeChild(s),n?.forEach(e=>e(r)),t)return t(r)},p=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 c=new Promise((r,o)=>n=e[t]=[r,o]);o.push(n[2]=c);const i=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(i,a,"chunk-"+t,t)}};const t=(t,o)=>{let[n,c,i]=o;var s,a,l=0;if(n.some(t=>0!==e[t])){for(s in c)r.o(c,s)&&(r.m[s]=c[s]);i&&i(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.webpackChunktmcsplit=self.webpackChunktmcsplit||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})(),r(47)})();
1
+ (()=>{"use strict";var e={47(e,t,r){r.a(e,async(e,t)=>{try{const e=await r.e(35).then(r.bind(r,35)),o=(e._basename,e._dirname,e._ls,e._msg_error,e._msg_info,e._mv,e._require),n=await o("split-file");n._split_file,n._split_file_by_size,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,i)=>{let s;i&&((s=[]).d=-1);const a=new Set,l=r.exports;let u,p,f;const d=new Promise((e,t)=>{f=t,p=e});d[t]=l,d[e]=e=>(s&&e(s),a.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=>{i[t]=e,n(c)},e=>{i[o]=e,n(c)});const i={};return i[e]=e=>e(c),i}}const c={};return c[e]=e=>{},c[t]=r,c}))(r);const i=()=>u.map(e=>{if(e[o])throw e[o];return e[t]}),l=new Promise(t=>{c=()=>t(i),c.r=0;const r=e=>e!==s&&!a.has(e)&&(a.add(e),e&&!e.d&&(c.r++,e.push(c)));u.forEach(t=>t[e](r))});return c.r?l:i()},e=>(e?f(d[o]=e):p(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 i={};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=>i[e]=()=>o[e]);return i.default=()=>o,r.d(c,i),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+".libtmcsplit.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="tmcsplit:";r.l=(o,n,c,i)=>{if(e[o])return void e[o].push(n);let s,a;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||(a=!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(p);const n=e[o];if(delete e[o],s.parentNode?.removeChild(s),n?.forEach(e=>e(r)),t)return t(r)},p=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 c=new Promise((r,o)=>n=e[t]=[r,o]);o.push(n[2]=c);const i=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(i,a,"chunk-"+t,t)}};const t=(t,o)=>{let[n,c,i]=o;var s,a,l=0;if(n.some(t=>0!==e[t])){for(s in c)r.o(c,s)&&(r.m[s]=c[s]);i&&i(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.webpackChunktmcsplit=self.webpackChunktmcsplit||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})(),r(47)})();
@@ -1 +1 @@
1
- (()=>{"use strict";var e={446(e,t,n){n.a(e,async(e,t)=>{try{const o=(await n.e(35).then(n.bind(n,35))).default,i=o._argv_url_get,r=o._cmdline_check,s=o._echo,u=o._exit,a=o._msg_info,l=o._msg_error,f=o._override_set,c=o._require,p=o._yargv_get,d=(await c("./libtmcsplit"))._split;function h(){f("app","name","tmcsplit"),f("app","opts",[]),f("runtime","environment",""),f("numeric","suffix",""),f("suffix","length",""),f("chunks","amount",""),f("size","max",""),f("input","file",""),f("output","prefix","");const e=_global_get();e.quiet="",e.verbose=""}function m(){let e;const t=[`${app_name} configuration:`,` Runtime environment: ${runtime_environment}`,` Suffix length: ${suffix_length}`,` Maximum chunk size: ${size_max} bytes`,` Amount of chunks: ${chunks_amount}`,` In file: ${input_file}`,` Out files prefix: ${output_prefix}`];for(e of t)a(e)}function b(e){let t;const n=["Output pieces of FILE to PREFIXaa, PREFIXab, ...","default size is 1000 lines, and default PREFIX is 'x'.","","Usage:",""," tmcsplit"," <in-file>"," <out-txt-prefix>",""," arguments:"," <in-file> An input file."," <out-file-prefix> Prefix for the output"," file(s).",""," options:",""," -a, --suffix-length=N Generate suffixes of"," length N.",` Default: '${suffix_length}'`," --additional-suffix=SUFFIX append an additional SUFFIX"," to file names."," -b, --bytes=SIZE Put SIZE bytes per output"," file."," -C, --line-bytes=SIZE Put at most SIZE bytes of"," records per output file."," -d Use numeric suffixes"," starting at 0, not"," alphabetic."," --numeric-suffixes[=FROM] Same as -d, but allow"," setting the start value."," -l, --lines=NUMBER Put NUMBER lines/records"," per output file."," -n, --number=CHUNKS Generate CHUNKS output"," files; see explanation"," below"," -t, --separator=SEP Use SEP instead of newline"," as the record separator;"," '\0' (zero) specifies the"," NUL character.",""," -h --help This message."," -v --verbose Enable verbose output.","","The SIZE argument is an integer and optional","unit (example: 10K is 10*1024).","Units are K,M,G,T,P,E,Z,Y,R,Q (powers of 1024)","or KB,MB,... (powers of 1000).","Binary prefixes can be used, too: KiB=K, MiB=M, and so on.","","CHUNKS may be:"," N split into N files based on size of input"," K/N output Kth of N to standard output"," l/N split into N files without splitting lines/records"," l/K/N output Kth of N to standard output without"," splitting lines/records"];for(t of n)s(t);u(e)}function g(e){(e.help||e.h)&&(quiet="n",b(0))}function _(e){e._.length<1&&(l("Input file argument required.",0),b(1))}function x(){const e=p();quiet="y",runtime_environment="node",g(e),_(e),input_file=e._[0],e._.length<2&&(output_prefix=`${input_file}.`),"a"in e&&(suffix_length=e.a),"suffix-length"in e&&(suffix_length=e["suffix-length"]),"d"in e&&(numeric_suffix=!0),"suffix-length"in e&&(suffix_length=e["suffix-length"]),chunks_amount=e["chunks-amount"]||e.n,size_max=e["size-max"]||e.b,verbose=e.verbose||e.v,verbose&&(quiet="n")}function y(){const e=i();runtime_environment="browser",input_file=e.input_file[0],output_prefix=i.output_prefix[0],chunks_amount=i.chunks_amount[0],quiet=i.quiet,0===quiet.length&&(quiet="n")}h(),""==suffix_length&&(suffix_length="base64"),""==output_prefix&&(output_prefix=input_file+"."),r("tmcsplit")?x():y(),m(),app_opts=[input_file,output_prefix,chunks_amount,size_max],d.apply(null,app_opts),t()}catch(v){t(v)}},1)}};const t={};function n(o){const i=t[o];if(void 0!==i)return i.exports;const r=t[o]={id:o,loaded:!1,exports:{}};return e[o](r,r.exports,n),r.loaded=!0,r.exports}n.m=e,(()=>{const e=Symbol("webpack queues"),t=Symbol("webpack exports"),o=Symbol("webpack error"),i=e=>{e?.d<1&&(e.d=1,e.forEach(e=>e.r--),e.forEach(e=>e.r--?e.r++:e()))};n.a=(n,r,s)=>{let u;s&&((u=[]).d=-1);const a=new Set,l=n.exports;let f,c,p;const d=new Promise((e,t)=>{p=t,c=e});d[t]=l,d[e]=e=>(u&&e(u),a.forEach(e),d.catch(e=>{})),n.exports=d,r(n=>{let r;f=(n=>n.map(n=>{if(null!==n&&"object"==typeof n){if(n[e])return n;if(n.then){const r=[];r.d=0,n.then(e=>{s[t]=e,i(r)},e=>{s[o]=e,i(r)});const s={};return s[e]=e=>e(r),s}}const r={};return r[e]=e=>{},r[t]=n,r}))(n);const s=()=>f.map(e=>{if(e[o])throw e[o];return e[t]}),l=new Promise(t=>{r=()=>t(s),r.r=0;const n=e=>e!==u&&!a.has(e)&&(a.add(e),e&&!e.d&&(r.r++,e.push(r)));f.forEach(t=>t[e](n))});return r.r?l:s()},e=>(e?p(d[o]=e):c(l),i(u))),u?.d<0&&(u.d=0)}})(),(()=>{const e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;let t;n.t=function(o,i){if(1&i&&(o=this(o)),8&i)return o;if("object"==typeof o&&o){if(4&i&&o.__esModule)return o;if(16&i&&"function"==typeof o.then)return o}const r=Object.create(null);n.r(r);const s={};t=t||[null,e({}),e([]),e(e)];for(var u=2&i&&o;("object"==typeof u||"function"==typeof u)&&!~t.indexOf(u);u=e(u))Object.getOwnPropertyNames(u).forEach(e=>s[e]=()=>o[e]);return s.default=()=>o,n.d(r,s),r}})(),n.d=(e,t)=>{if(Array.isArray(t))for(var o=0;o<t.length;){var i=t[o++],r=t[o++];n.o(e,i)?0===r&&o++:0===r?Object.defineProperty(e,i,{enumerable:!0,value:t[o++]}):Object.defineProperty(e,i,{enumerable:!0,get:r})}else for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,o)=>(n.f[o](e,t),t),[])),n.u=e=>e+".tmcsplit.js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="tmcsplit:";n.l=(o,i,r,s)=>{if(e[o])return void e[o].push(i);let u,a;if(void 0!==r){const e=document.getElementsByTagName("script");for(var l=0;l<e.length;l++){const n=e[l];if(n.getAttribute("src")==o||n.getAttribute("data-webpack")==t+r){u=n;break}}}u||(a=!0,u=document.createElement("script"),u.charset="utf-8",n.nc&&u.setAttribute("nonce",n.nc),u.setAttribute("data-webpack",t+r),u.src=o),e[o]=[i];const f=(t,n)=>{u.onerror=u.onload=null,clearTimeout(c);const i=e[o];if(delete e[o],u.parentNode?.removeChild(u),i?.forEach(e=>e(n)),t)return t(n)},c=setTimeout(f.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=f.bind(null,u.onerror),u.onload=f.bind(null,u.onload),a&&document.head.appendChild(u)}})(),n.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{let e;n.g.importScripts&&(e=n.g.location+"");const t=n.g.document;if(!e&&t&&("SCRIPT"===t.currentScript?.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){const n=t.getElementsByTagName("script");if(n.length){let t=n.length-1;for(;t>-1&&(!e||!/^http(s?):/.test(e));)e=n[t--].src}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{const e={792:0};n.f.j=(t,o)=>{let i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)o.push(i[2]);else{const r=new Promise((n,o)=>i=e[t]=[n,o]);o.push(i[2]=r);const s=n.p+n.u(t),u=new Error,a=o=>{if(n.o(e,t)&&(i=e[t],0!==i&&(e[t]=void 0),i)){const e=o&&("load"===o.type?"missing":o.type),n=o&&o.target&&o.target.src;u.message="Loading chunk "+t+" failed.\n("+e+": "+n+")",u.name="ChunkLoadError",u.type=e,u.request=n,u.event=o,i[1](u)}};n.l(s,a,"chunk-"+t,t)}};const t=(t,o)=>{let[i,r,s]=o;var u,a,l=0;if(i.some(t=>0!==e[t])){for(u in r)n.o(r,u)&&(n.m[u]=r[u]);s&&s(n)}for(t&&t(o);l<i.length;l++)a=i[l],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0},o=self.webpackChunktmcsplit=self.webpackChunktmcsplit||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})(),n(446)})();
1
+ (()=>{"use strict";var e={446(e,t,n){n.a(e,async(e,t)=>{try{const o=await n.e(35).then(n.bind(n,35)),i=o._argv_url_get,r=o._cmdline_check,s=o._echo,u=o._exit,a=o._get,f=o._global_get,l=o._msg_info,c=o._msg_error,p=o._override_set,h=(o._require,o._set),m=o._yargv_get,d=(await n.e(47).then(n.bind(n,47)))._split;function b(){p("app","name","tmcsplit"),p("app","opts",[]),p("runtime","environment",""),p("numeric","suffix",""),p("suffix","length",""),p("chunks","amount",""),p("size","max",""),p("input","file",""),p("output","prefix","");const e=f();e.quiet="",e.verbose=""}function g(){const e=a("input","file");p("suffix","length","base64"),p("output","prefix",e)}function _(){let e;const t=[`${app_name} configuration:`,` Runtime environment: ${runtime_environment}`,` Suffix length: ${suffix_length}`,` Maximum chunk size: ${size_max} bytes`,` Amount of chunks: ${chunks_amount}`,` In file: ${input_file}`,` Out files prefix: ${output_prefix}`];for(e of t)l(e)}function x(e){let t;const n=["Output pieces of FILE to PREFIXaa, PREFIXab, ...","default size is 1000 lines, and default PREFIX is 'x'.","","Usage:",""," tmcsplit"," <in-file>"," <out-txt-prefix>",""," arguments:"," <in-file> An input file."," <out-file-prefix> Prefix for the output"," file(s).",""," options:",""," -a, --suffix-length=N Generate suffixes of"," length N.",` Default: '${suffix_length}'`," --additional-suffix=SUFFIX append an additional SUFFIX"," to file names."," -b, --bytes=SIZE Put SIZE bytes per output"," file."," -C, --line-bytes=SIZE Put at most SIZE bytes of"," records per output file."," -d Use numeric suffixes"," starting at 0, not"," alphabetic."," --numeric-suffixes[=FROM] Same as -d, but allow"," setting the start value."," -l, --lines=NUMBER Put NUMBER lines/records"," per output file."," -n, --number=CHUNKS Generate CHUNKS output"," files; see explanation"," below"," -t, --separator=SEP Use SEP instead of newline"," as the record separator;"," '\0' (zero) specifies the"," NUL character.",""," -h --help This message."," -v --verbose Enable verbose output.","","The SIZE argument is an integer and optional","unit (example: 10K is 10*1024).","Units are K,M,G,T,P,E,Z,Y,R,Q (powers of 1024)","or KB,MB,... (powers of 1000).","Binary prefixes can be used, too: KiB=K, MiB=M, and so on.","","CHUNKS may be:"," N split into N files based on size of input"," K/N output Kth of N to standard output"," l/N split into N files without splitting lines/records"," l/K/N output Kth of N to standard output without"," splitting lines/records"];for(t of n)s(t);u(e)}function y(e){(e.help||e.h)&&(quiet="n",x(0))}function v(e){e._.length<1&&(c("Input file argument required.",0),x(1))}async function w(){const e=await m();quiet="y",h("runtime","environment","node"),y(e),v(e),h("input","file",e._[0]),e._.length<2&&h("output","prefix",a("input","file")),"a"in e&&h("suffix","length",e.a),"suffix-length"in e&&h("suffix","length",e["suffix-length"]),"suffix-length"in e&&h("suffix","length",e["suffix-length"]),"d"in e&&h("numeric","suffix",!0),h("chunks","amount",e["chunks-amount"]||e.n),h("chunks","amount",e["size-max"]||e.b);const t=f();t.verbose=e.verbose||e.v,t.verbose&&(t.quiet="n")}function E(){const e=i();runtime_environment="browser",input_file=e.input_file[0],output_prefix=i.output_prefix[0],chunks_amount=i.chunks_amount[0],quiet=i.quiet,0===quiet.length&&(quiet="n")}b(),g(),r("tmcsplit")?await w():E(),_(),app_opts=[input_file,output_prefix,chunks_amount,size_max],d.apply(null,app_opts),t()}catch(S){t(S)}},1)}};const t={};function n(o){const i=t[o];if(void 0!==i)return i.exports;const r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.m=e,(()=>{const e=Symbol("webpack queues"),t=Symbol("webpack exports"),o=Symbol("webpack error"),i=e=>{e?.d<1&&(e.d=1,e.forEach(e=>e.r--),e.forEach(e=>e.r--?e.r++:e()))};n.a=(n,r,s)=>{let u;s&&((u=[]).d=-1);const a=new Set,f=n.exports;let l,c,p;const h=new Promise((e,t)=>{p=t,c=e});h[t]=f,h[e]=e=>(u&&e(u),a.forEach(e),h.catch(e=>{})),n.exports=h,r(n=>{let r;l=(n=>n.map(n=>{if(null!==n&&"object"==typeof n){if(n[e])return n;if(n.then){const r=[];r.d=0,n.then(e=>{s[t]=e,i(r)},e=>{s[o]=e,i(r)});const s={};return s[e]=e=>e(r),s}}const r={};return r[e]=e=>{},r[t]=n,r}))(n);const s=()=>l.map(e=>{if(e[o])throw e[o];return e[t]}),f=new Promise(t=>{r=()=>t(s),r.r=0;const n=e=>e!==u&&!a.has(e)&&(a.add(e),e&&!e.d&&(r.r++,e.push(r)));l.forEach(t=>t[e](n))});return r.r?f:s()},e=>(e?p(h[o]=e):c(f),i(u))),u?.d<0&&(u.d=0)}})(),(()=>{const e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;let t;n.t=function(o,i){if(1&i&&(o=this(o)),8&i)return o;if("object"==typeof o&&o){if(4&i&&o.__esModule)return o;if(16&i&&"function"==typeof o.then)return o}const r=Object.create(null);n.r(r);const s={};t=t||[null,e({}),e([]),e(e)];for(var u=2&i&&o;("object"==typeof u||"function"==typeof u)&&!~t.indexOf(u);u=e(u))Object.getOwnPropertyNames(u).forEach(e=>s[e]=()=>o[e]);return s.default=()=>o,n.d(r,s),r}})(),n.d=(e,t)=>{if(Array.isArray(t))for(var o=0;o<t.length;){var i=t[o++],r=t[o++];n.o(e,i)?0===r&&o++:0===r?Object.defineProperty(e,i,{enumerable:!0,value:t[o++]}):Object.defineProperty(e,i,{enumerable:!0,get:r})}else for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,o)=>(n.f[o](e,t),t),[])),n.u=e=>e+".tmcsplit.js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="tmcsplit:";n.l=(o,i,r,s)=>{if(e[o])return void e[o].push(i);let u,a;if(void 0!==r){const e=document.getElementsByTagName("script");for(var f=0;f<e.length;f++){const n=e[f];if(n.getAttribute("src")==o||n.getAttribute("data-webpack")==t+r){u=n;break}}}u||(a=!0,u=document.createElement("script"),u.charset="utf-8",n.nc&&u.setAttribute("nonce",n.nc),u.setAttribute("data-webpack",t+r),u.src=o),e[o]=[i];const l=(t,n)=>{u.onerror=u.onload=null,clearTimeout(c);const i=e[o];if(delete e[o],u.parentNode?.removeChild(u),i?.forEach(e=>e(n)),t)return t(n)},c=setTimeout(l.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=l.bind(null,u.onerror),u.onload=l.bind(null,u.onload),a&&document.head.appendChild(u)}})(),n.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{let e;n.g.importScripts&&(e=n.g.location+"");const t=n.g.document;if(!e&&t&&("SCRIPT"===t.currentScript?.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){const n=t.getElementsByTagName("script");if(n.length){let t=n.length-1;for(;t>-1&&(!e||!/^http(s?):/.test(e));)e=n[t--].src}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{const e={792:0};n.f.j=(t,o)=>{let i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)o.push(i[2]);else{const r=new Promise((n,o)=>i=e[t]=[n,o]);o.push(i[2]=r);const s=n.p+n.u(t),u=new Error,a=o=>{if(n.o(e,t)&&(i=e[t],0!==i&&(e[t]=void 0),i)){const e=o&&("load"===o.type?"missing":o.type),n=o&&o.target&&o.target.src;u.message="Loading chunk "+t+" failed.\n("+e+": "+n+")",u.name="ChunkLoadError",u.type=e,u.request=n,u.event=o,i[1](u)}};n.l(s,a,"chunk-"+t,t)}};const t=(t,o)=>{let[i,r,s]=o;var u,a,f=0;if(i.some(t=>0!==e[t])){for(u in r)n.o(r,u)&&(n.m[u]=r[u]);s&&s(n)}for(t&&t(o);f<i.length;f++)a=i[f],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0},o=self.webpackChunktmcsplit=self.webpackChunktmcsplit||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})(),n(446)})();
package/libtmcsplit CHANGED
@@ -33,12 +33,9 @@
33
33
  "local" } ] */
34
34
 
35
35
  const
36
- _libcrash_module =
36
+ _libcrash =
37
37
  await import(
38
38
  "libcrash-js");
39
- const
40
- _libcrash =
41
- _libcrash_module.default;
42
39
  /* global
43
40
  _basename */
44
41
  const
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name":
3
3
  "tmcsplit",
4
4
  "version":
5
- "0.0.13",
5
+ "0.0.14",
6
6
  "description":
7
7
  "Basic Javascript implementation of GNU Split.",
8
8
  "funding": {
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "devDependencies": {
58
58
  "crash-js-webpack":
59
- "^0.0.56",
59
+ "^0.0.58",
60
60
  "eslint":
61
61
  "^10.0.3",
62
62
  "globals":
@@ -72,9 +72,9 @@
72
72
  },
73
73
  "dependencies": {
74
74
  "libcrash-js":
75
- "npm:crash-js@^11.1000000000000001.1000000000000001",
75
+ "npm:crash-js@^10001.1000000000000001.1000000000000001",
76
76
  "split-file":
77
- "npm:@themartiancompany/split-file@2.3.15"
77
+ "npm:@themartiancompany/split-file@2.3.18"
78
78
  },
79
79
  "overrides": {
80
80
  "split":
package/tmcsplit CHANGED
@@ -36,12 +36,9 @@
36
36
  "output_prefix" } ] */
37
37
 
38
38
  const
39
- _libcrash_module =
39
+ _libcrash =
40
40
  await import(
41
41
  'libcrash-js');
42
- const
43
- _libcrash =
44
- _libcrash_module.default;
45
42
  /* global
46
43
  _argv_url_get */
47
44
  const
@@ -62,6 +59,16 @@ const
62
59
  const
63
60
  _exit =
64
61
  _libcrash._exit;
62
+ /* global
63
+ _get */
64
+ const
65
+ _get =
66
+ _libcrash._get;
67
+ /* global
68
+ _global_get */
69
+ const
70
+ _global_get =
71
+ _libcrash._global_get;
65
72
  /* global
66
73
  _msg_info */
67
74
  const
@@ -82,6 +89,11 @@ const
82
89
  const
83
90
  _require =
84
91
  _libcrash._require;
92
+ /* global
93
+ _set */
94
+ const
95
+ _set =
96
+ _libcrash._set;
85
97
  /* global
86
98
  _yargv_get */
87
99
  const
@@ -89,7 +101,7 @@ _yargv_get =
89
101
  _libcrash._yargv_get;
90
102
  const
91
103
  _split_module =
92
- await _require(
104
+ await import(
93
105
  "./libtmcsplit");
94
106
  /* global
95
107
  _tmcsplit */
@@ -183,14 +195,19 @@ function
183
195
 
184
196
  function
185
197
  _overrides_set() {
186
- if ( suffix_length == "" ) {
187
- suffix_length =
188
- "base64";
189
- }
190
- if ( output_prefix == "" ) {
191
- output_prefix =
192
- input_file + ".";
193
- }
198
+ const
199
+ _input_file =
200
+ _get(
201
+ "input",
202
+ "file");
203
+ _override_set(
204
+ "suffix",
205
+ "length",
206
+ "base64");
207
+ _override_set(
208
+ "output",
209
+ "prefix",
210
+ _input_file);
194
211
  }
195
212
 
196
213
  function
@@ -317,64 +334,90 @@ function
317
334
  }
318
335
  }
319
336
 
320
- function
337
+ async function
321
338
  _cmdline_parse() {
322
339
  const
323
340
  _argv =
324
- _yargv_get();
341
+ await _yargv_get();
325
342
  quiet =
326
343
  "y";
327
- runtime_environment =
328
- "node";
344
+ _set(
345
+ "runtime",
346
+ "environment",
347
+ "node");
329
348
  _cmdline_parse_help(
330
349
  _argv);
331
350
  _input_args_check(
332
351
  _argv);
333
- input_file =
352
+ _set(
353
+ "input",
354
+ "file",
334
355
  _argv[
335
356
  "_"][
336
- 0];
357
+ 0]);
337
358
  if ( _argv[
338
359
  "_"].length < 2 ) {
339
- output_prefix =
340
- `${input_file}.`;
360
+ _set(
361
+ "output",
362
+ "prefix",
363
+ _get(
364
+ "input",
365
+ "file"));
341
366
  }
342
367
  if ( "a" in _argv ) {
343
- suffix_length =
368
+ _set(
369
+ "suffix",
370
+ "length",
344
371
  _argv[
345
- "a"];
372
+ "a"]);
346
373
  }
347
374
  if ( "suffix-length" in _argv ) {
348
- suffix_length =
375
+ _set(
376
+ "suffix",
377
+ "length",
349
378
  _argv[
350
- "suffix-length"];
351
- }
352
- if ( "d" in _argv ) {
353
- numeric_suffix =
354
- true;
379
+ "suffix-length"]);
355
380
  }
356
381
  if ( "suffix-length" in _argv ) {
357
- suffix_length =
382
+ _set(
383
+ "suffix",
384
+ "length",
358
385
  _argv[
359
- "suffix-length"];
386
+ "suffix-length"]);
360
387
  }
361
- chunks_amount =
388
+ if ( "d" in _argv ) {
389
+ _set(
390
+ "numeric",
391
+ "suffix",
392
+ true);
393
+ }
394
+ _set(
395
+ "chunks",
396
+ "amount",
362
397
  _argv[
363
398
  "chunks-amount"] ||
364
399
  _argv[
365
- "n"];
366
- size_max =
400
+ "n"]);
401
+ _set(
402
+ "chunks",
403
+ "amount",
367
404
  _argv[
368
405
  "size-max"] ||
369
406
  _argv[
370
- "b"];
371
- verbose =
407
+ "b"]);
408
+ const
409
+ _global =
410
+ _global_get();
411
+ _global[
412
+ "verbose"] =
372
413
  _argv[
373
414
  "verbose"] ||
374
415
  _argv[
375
416
  "v"];
376
- if ( verbose ) {
377
- quiet =
417
+ if ( _global[
418
+ "verbose"] ) {
419
+ _global[
420
+ "quiet"] =
378
421
  "n";
379
422
  }
380
423
  }
@@ -411,7 +454,7 @@ _global_variables();
411
454
  _overrides_set();
412
455
  if ( _cmdline_check(
413
456
  "tmcsplit") ) {
414
- _cmdline_parse();
457
+ await _cmdline_parse();
415
458
  }
416
459
  else {
417
460
  _url_parse();