create-xmlui-app 0.7.7 → 0.7.9
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/index.js +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
(()=>{var t={1088:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const s=r(7147);e.FILE_SYSTEM_ADAPTER={lstat:s.lstat,stat:s.stat,lstatSync:s.lstatSync,statSync:s.statSync,readdir:s.readdir,readdirSync:s.readdirSync};function createFileSystemAdapter(t){if(t===undefined){return e.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}e.createFileSystemAdapter=createFileSystemAdapter},4919:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const r=process.versions.node.split(".");if(r[0]===undefined||r[1]===undefined){throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`)}const s=Number.parseInt(r[0],10);const i=Number.parseInt(r[1],10);const n=10;const o=10;const a=s>n;const l=s===n&&i>=o;e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=a||l},7552:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Settings=e.scandirSync=e.scandir=void 0;const s=r(7091);const i=r(1328);const n=r(3022);e.Settings=n.default;function scandir(t,e,r){if(typeof e==="function"){s.read(t,getSettings(),e);return}s.read(t,getSettings(e),r)}e.scandir=scandir;function scandirSync(t,e){const r=getSettings(e);return i.read(t,r)}e.scandirSync=scandirSync;function getSettings(t={}){if(t instanceof n.default){return t}return new n.default(t)}},7091:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.readdir=e.readdirWithFileTypes=e.read=void 0;const s=r(2580);const i=r(1188);const n=r(4919);const o=r(8047);const a=r(4845);function read(t,e,r){if(!e.stats&&n.IS_SUPPORT_READDIR_WITH_FILE_TYPES){readdirWithFileTypes(t,e,r);return}readdir(t,e,r)}e.read=read;function readdirWithFileTypes(t,e,r){e.fs.readdir(t,{withFileTypes:true},((s,n)=>{if(s!==null){callFailureCallback(r,s);return}const o=n.map((r=>({dirent:r,name:r.name,path:a.joinPathSegments(t,r.name,e.pathSegmentSeparator)})));if(!e.followSymbolicLinks){callSuccessCallback(r,o);return}const l=o.map((t=>makeRplTaskEntry(t,e)));i(l,((t,e)=>{if(t!==null){callFailureCallback(r,t);return}callSuccessCallback(r,e)}))}))}e.readdirWithFileTypes=readdirWithFileTypes;function makeRplTaskEntry(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,((s,i)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){r(s);return}r(null,t);return}t.dirent=o.fs.createDirentFromStats(t.name,i);r(null,t)}))}}function readdir(t,e,r){e.fs.readdir(t,((n,l)=>{if(n!==null){callFailureCallback(r,n);return}const u=l.map((r=>{const i=a.joinPathSegments(t,r,e.pathSegmentSeparator);return t=>{s.stat(i,e.fsStatSettings,((s,n)=>{if(s!==null){t(s);return}const a={name:r,path:i,dirent:o.fs.createDirentFromStats(r,n)};if(e.stats){a.stats=n}t(null,a)}))}}));i(u,((t,e)=>{if(t!==null){callFailureCallback(r,t);return}callSuccessCallback(r,e)}))}))}e.readdir=readdir;function callFailureCallback(t,e){t(e)}function callSuccessCallback(t,e){t(null,e)}},4845:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.joinPathSegments=void 0;function joinPathSegments(t,e,r){if(t.endsWith(r)){return t+e}return t+r+e}e.joinPathSegments=joinPathSegments},1328:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.readdir=e.readdirWithFileTypes=e.read=void 0;const s=r(2580);const i=r(4919);const n=r(8047);const o=r(4845);function read(t,e){if(!e.stats&&i.IS_SUPPORT_READDIR_WITH_FILE_TYPES){return readdirWithFileTypes(t,e)}return readdir(t,e)}e.read=read;function readdirWithFileTypes(t,e){const r=e.fs.readdirSync(t,{withFileTypes:true});return r.map((r=>{const s={dirent:r,name:r.name,path:o.joinPathSegments(t,r.name,e.pathSegmentSeparator)};if(s.dirent.isSymbolicLink()&&e.followSymbolicLinks){try{const t=e.fs.statSync(s.path);s.dirent=n.fs.createDirentFromStats(s.name,t)}catch(t){if(e.throwErrorOnBrokenSymbolicLink){throw t}}}return s}))}e.readdirWithFileTypes=readdirWithFileTypes;function readdir(t,e){const r=e.fs.readdirSync(t);return r.map((r=>{const i=o.joinPathSegments(t,r,e.pathSegmentSeparator);const a=s.statSync(i,e.fsStatSettings);const l={name:r,path:i,dirent:n.fs.createDirentFromStats(r,a)};if(e.stats){l.stats=a}return l}))}e.readdir=readdir},3022:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(1017);const i=r(2580);const n=r(1088);class Settings{constructor(t={}){this._options=t;this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,false);this.fs=n.createFileSystemAdapter(this._options.fs);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,s.sep);this.stats=this._getValue(this._options.stats,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true);this.fsStatSettings=new i.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,e){return t!==null&&t!==void 0?t:e}}e["default"]=Settings},7876:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.createDirentFromStats=void 0;class DirentFromStats{constructor(t,e){this.name=t;this.isBlockDevice=e.isBlockDevice.bind(e);this.isCharacterDevice=e.isCharacterDevice.bind(e);this.isDirectory=e.isDirectory.bind(e);this.isFIFO=e.isFIFO.bind(e);this.isFile=e.isFile.bind(e);this.isSocket=e.isSocket.bind(e);this.isSymbolicLink=e.isSymbolicLink.bind(e)}}function createDirentFromStats(t,e){return new DirentFromStats(t,e)}e.createDirentFromStats=createDirentFromStats},8047:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.fs=void 0;const s=r(7876);e.fs=s},7650:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const s=r(7147);e.FILE_SYSTEM_ADAPTER={lstat:s.lstat,stat:s.stat,lstatSync:s.lstatSync,statSync:s.statSync};function createFileSystemAdapter(t){if(t===undefined){return e.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}e.createFileSystemAdapter=createFileSystemAdapter},2580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.statSync=e.stat=e.Settings=void 0;const s=r(5939);const i=r(105);const n=r(2466);e.Settings=n.default;function stat(t,e,r){if(typeof e==="function"){s.read(t,getSettings(),e);return}s.read(t,getSettings(e),r)}e.stat=stat;function statSync(t,e){const r=getSettings(e);return i.read(t,r)}e.statSync=statSync;function getSettings(t={}){if(t instanceof n.default){return t}return new n.default(t)}},5939:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.read=void 0;function read(t,e,r){e.fs.lstat(t,((s,i)=>{if(s!==null){callFailureCallback(r,s);return}if(!i.isSymbolicLink()||!e.followSymbolicLink){callSuccessCallback(r,i);return}e.fs.stat(t,((t,s)=>{if(t!==null){if(e.throwErrorOnBrokenSymbolicLink){callFailureCallback(r,t);return}callSuccessCallback(r,i);return}if(e.markSymbolicLink){s.isSymbolicLink=()=>true}callSuccessCallback(r,s)}))}))}e.read=read;function callFailureCallback(t,e){t(e)}function callSuccessCallback(t,e){t(null,e)}},105:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.read=void 0;function read(t,e){const r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink){return r}try{const r=e.fs.statSync(t);if(e.markSymbolicLink){r.isSymbolicLink=()=>true}return r}catch(t){if(!e.throwErrorOnBrokenSymbolicLink){return r}throw t}}e.read=read},2466:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7650);class Settings{constructor(t={}){this._options=t;this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,true);this.fs=s.createFileSystemAdapter(this._options.fs);this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true)}_getValue(t,e){return t!==null&&t!==void 0?t:e}}e["default"]=Settings},803:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Settings=e.walkStream=e.walkSync=e.walk=void 0;const s=r(6887);const i=r(7499);const n=r(6875);const o=r(8265);e.Settings=o.default;function walk(t,e,r){if(typeof e==="function"){new s.default(t,getSettings()).read(e);return}new s.default(t,getSettings(e)).read(r)}e.walk=walk;function walkSync(t,e){const r=getSettings(e);const s=new n.default(t,r);return s.read()}e.walkSync=walkSync;function walkStream(t,e){const r=getSettings(e);const s=new i.default(t,r);return s.read()}e.walkStream=walkStream;function getSettings(t={}){if(t instanceof o.default){return t}return new o.default(t)}},6887:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(6203);class AsyncProvider{constructor(t,e){this._root=t;this._settings=e;this._reader=new s.default(this._root,this._settings);this._storage=[]}read(t){this._reader.onError((e=>{callFailureCallback(t,e)}));this._reader.onEntry((t=>{this._storage.push(t)}));this._reader.onEnd((()=>{callSuccessCallback(t,this._storage)}));this._reader.read()}}e["default"]=AsyncProvider;function callFailureCallback(t,e){t(e)}function callSuccessCallback(t,e){t(null,e)}},7499:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(2781);const i=r(6203);class StreamProvider{constructor(t,e){this._root=t;this._settings=e;this._reader=new i.default(this._root,this._settings);this._stream=new s.Readable({objectMode:true,read:()=>{},destroy:()=>{if(!this._reader.isDestroyed){this._reader.destroy()}}})}read(){this._reader.onError((t=>{this._stream.emit("error",t)}));this._reader.onEntry((t=>{this._stream.push(t)}));this._reader.onEnd((()=>{this._stream.push(null)}));this._reader.read();return this._stream}}e["default"]=StreamProvider},6875:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(1214);class SyncProvider{constructor(t,e){this._root=t;this._settings=e;this._reader=new s.default(this._root,this._settings)}read(){return this._reader.read()}}e["default"]=SyncProvider},6203:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(2361);const i=r(7552);const n=r(2696);const o=r(7628);const a=r(3402);class AsyncReader extends a.default{constructor(t,e){super(t,e);this._settings=e;this._scandir=i.scandir;this._emitter=new s.EventEmitter;this._queue=n(this._worker.bind(this),this._settings.concurrency);this._isFatalError=false;this._isDestroyed=false;this._queue.drain=()=>{if(!this._isFatalError){this._emitter.emit("end")}}}read(){this._isFatalError=false;this._isDestroyed=false;setImmediate((()=>{this._pushToQueue(this._root,this._settings.basePath)}));return this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed){throw new Error("The reader is already destroyed")}this._isDestroyed=true;this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,e){const r={directory:t,base:e};this._queue.push(r,(t=>{if(t!==null){this._handleError(t)}}))}_worker(t,e){this._scandir(t.directory,this._settings.fsScandirSettings,((r,s)=>{if(r!==null){e(r,undefined);return}for(const e of s){this._handleEntry(e,t.base)}e(null,undefined)}))}_handleError(t){if(this._isDestroyed||!o.isFatalError(this._settings,t)){return}this._isFatalError=true;this._isDestroyed=true;this._emitter.emit("error",t)}_handleEntry(t,e){if(this._isDestroyed||this._isFatalError){return}const r=t.path;if(e!==undefined){t.path=o.joinPathSegments(e,t.name,this._settings.pathSegmentSeparator)}if(o.isAppliedFilter(this._settings.entryFilter,t)){this._emitEntry(t)}if(t.dirent.isDirectory()&&o.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(r,e===undefined?undefined:t.path)}}_emitEntry(t){this._emitter.emit("entry",t)}}e["default"]=AsyncReader},7628:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.joinPathSegments=e.replacePathSegmentSeparator=e.isAppliedFilter=e.isFatalError=void 0;function isFatalError(t,e){if(t.errorFilter===null){return true}return!t.errorFilter(e)}e.isFatalError=isFatalError;function isAppliedFilter(t,e){return t===null||t(e)}e.isAppliedFilter=isAppliedFilter;function replacePathSegmentSeparator(t,e){return t.split(/[/\\]/).join(e)}e.replacePathSegmentSeparator=replacePathSegmentSeparator;function joinPathSegments(t,e,r){if(t===""){return e}if(t.endsWith(r)){return t+e}return t+r+e}e.joinPathSegments=joinPathSegments},3402:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7628);class Reader{constructor(t,e){this._root=t;this._settings=e;this._root=s.replacePathSegmentSeparator(t,e.pathSegmentSeparator)}}e["default"]=Reader},1214:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7552);const i=r(7628);const n=r(3402);class SyncReader extends n.default{constructor(){super(...arguments);this._scandir=s.scandirSync;this._storage=[];this._queue=new Set}read(){this._pushToQueue(this._root,this._settings.basePath);this._handleQueue();return this._storage}_pushToQueue(t,e){this._queue.add({directory:t,base:e})}_handleQueue(){for(const t of this._queue.values()){this._handleDirectory(t.directory,t.base)}}_handleDirectory(t,e){try{const r=this._scandir(t,this._settings.fsScandirSettings);for(const t of r){this._handleEntry(t,e)}}catch(t){this._handleError(t)}}_handleError(t){if(!i.isFatalError(this._settings,t)){return}throw t}_handleEntry(t,e){const r=t.path;if(e!==undefined){t.path=i.joinPathSegments(e,t.name,this._settings.pathSegmentSeparator)}if(i.isAppliedFilter(this._settings.entryFilter,t)){this._pushToStorage(t)}if(t.dirent.isDirectory()&&i.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(r,e===undefined?undefined:t.path)}}_pushToStorage(t){this._storage.push(t)}}e["default"]=SyncReader},8265:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(1017);const i=r(7552);class Settings{constructor(t={}){this._options=t;this.basePath=this._getValue(this._options.basePath,undefined);this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY);this.deepFilter=this._getValue(this._options.deepFilter,null);this.entryFilter=this._getValue(this._options.entryFilter,null);this.errorFilter=this._getValue(this._options.errorFilter,null);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,s.sep);this.fsScandirSettings=new i.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,e){return t!==null&&t!==void 0?t:e}}e["default"]=Settings},538:(t,e,r)=>{"use strict";const s=r(9200);const i=r(3668);const n=r(5961);const o=r(9594);const braces=(t,e={})=>{let r=[];if(Array.isArray(t)){for(const s of t){const t=braces.create(s,e);if(Array.isArray(t)){r.push(...t)}else{r.push(t)}}}else{r=[].concat(braces.create(t,e))}if(e&&e.expand===true&&e.nodupes===true){r=[...new Set(r)]}return r};braces.parse=(t,e={})=>o(t,e);braces.stringify=(t,e={})=>{if(typeof t==="string"){return s(braces.parse(t,e),e)}return s(t,e)};braces.compile=(t,e={})=>{if(typeof t==="string"){t=braces.parse(t,e)}return i(t,e)};braces.expand=(t,e={})=>{if(typeof t==="string"){t=braces.parse(t,e)}let r=n(t,e);if(e.noempty===true){r=r.filter(Boolean)}if(e.nodupes===true){r=[...new Set(r)]}return r};braces.create=(t,e={})=>{if(t===""||t.length<3){return[t]}return e.expand!==true?braces.compile(t,e):braces.expand(t,e)};t.exports=braces},3668:(t,e,r)=>{"use strict";const s=r(3488);const i=r(4691);const compile=(t,e={})=>{const walk=(t,r={})=>{const n=i.isInvalidBrace(r);const o=t.invalid===true&&e.escapeInvalid===true;const a=n===true||o===true;const l=e.escapeInvalid===true?"\\":"";let u="";if(t.isOpen===true){return l+t.value}if(t.isClose===true){console.log("node.isClose",l,t.value);return l+t.value}if(t.type==="open"){return a?l+t.value:"("}if(t.type==="close"){return a?l+t.value:")"}if(t.type==="comma"){return t.prev.type==="comma"?"":a?t.value:"|"}if(t.value){return t.value}if(t.nodes&&t.ranges>0){const r=i.reduce(t.nodes);const n=s(...r,{...e,wrap:false,toRegex:true,strictZeros:true});if(n.length!==0){return r.length>1&&n.length>1?`(${n})`:n}}if(t.nodes){for(const e of t.nodes){u+=walk(e,t)}}return u};return walk(t)};t.exports=compile},5529:t=>{"use strict";t.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},5961:(t,e,r)=>{"use strict";const s=r(3488);const i=r(9200);const n=r(4691);const append=(t="",e="",r=false)=>{const s=[];t=[].concat(t);e=[].concat(e);if(!e.length)return t;if(!t.length){return r?n.flatten(e).map((t=>`{${t}}`)):e}for(const i of t){if(Array.isArray(i)){for(const t of i){s.push(append(t,e,r))}}else{for(let t of e){if(r===true&&typeof t==="string")t=`{${t}}`;s.push(Array.isArray(t)?append(i,t,r):i+t)}}}return n.flatten(s)};const expand=(t,e={})=>{const r=e.rangeLimit===undefined?1e3:e.rangeLimit;const walk=(t,o={})=>{t.queue=[];let a=o;let l=o.queue;while(a.type!=="brace"&&a.type!=="root"&&a.parent){a=a.parent;l=a.queue}if(t.invalid||t.dollar){l.push(append(l.pop(),i(t,e)));return}if(t.type==="brace"&&t.invalid!==true&&t.nodes.length===2){l.push(append(l.pop(),["{}"]));return}if(t.nodes&&t.ranges>0){const o=n.reduce(t.nodes);if(n.exceedsLimit(...o,e.step,r)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let a=s(...o,e);if(a.length===0){a=i(t,e)}l.push(append(l.pop(),a));t.nodes=[];return}const u=n.encloseBrace(t);let c=t.queue;let h=t;while(h.type!=="brace"&&h.type!=="root"&&h.parent){h=h.parent;c=h.queue}for(let e=0;e<t.nodes.length;e++){const r=t.nodes[e];if(r.type==="comma"&&t.type==="brace"){if(e===1)c.push("");c.push("");continue}if(r.type==="close"){l.push(append(l.pop(),c,u));continue}if(r.value&&r.type!=="open"){c.push(append(c.pop(),r.value));continue}if(r.nodes){walk(r,t)}}return c};return n.flatten(walk(t))};t.exports=expand},9594:(t,e,r)=>{"use strict";const s=r(9200);const{MAX_LENGTH:i,CHAR_BACKSLASH:n,CHAR_BACKTICK:o,CHAR_COMMA:a,CHAR_DOT:l,CHAR_LEFT_PARENTHESES:u,CHAR_RIGHT_PARENTHESES:c,CHAR_LEFT_CURLY_BRACE:h,CHAR_RIGHT_CURLY_BRACE:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:g,CHAR_SINGLE_QUOTE:m,CHAR_NO_BREAK_SPACE:y,CHAR_ZERO_WIDTH_NOBREAK_SPACE:v}=r(5529);const parse=(t,e={})=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}const r=e||{};const b=typeof r.maxLength==="number"?Math.min(i,r.maxLength):i;if(t.length>b){throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${b})`)}const _={type:"root",input:t,nodes:[]};const S=[_];let w=_;let x=_;let P=0;const E=t.length;let A=0;let C=0;let R;const advance=()=>t[A++];const push=t=>{if(t.type==="text"&&x.type==="dot"){x.type="text"}if(x&&x.type==="text"&&t.type==="text"){x.value+=t.value;return}w.nodes.push(t);t.parent=w;t.prev=x;x=t;return t};push({type:"bos"});while(A<E){w=S[S.length-1];R=advance();if(R===v||R===y){continue}if(R===n){push({type:"text",value:(e.keepEscaping?R:"")+advance()});continue}if(R===p){push({type:"text",value:"\\"+R});continue}if(R===f){P++;let t;while(A<E&&(t=advance())){R+=t;if(t===f){P++;continue}if(t===n){R+=advance();continue}if(t===p){P--;if(P===0){break}}}push({type:"text",value:R});continue}if(R===u){w=push({type:"paren",nodes:[]});S.push(w);push({type:"text",value:R});continue}if(R===c){if(w.type!=="paren"){push({type:"text",value:R});continue}w=S.pop();push({type:"text",value:R});w=S[S.length-1];continue}if(R===g||R===m||R===o){const t=R;let r;if(e.keepQuotes!==true){R=""}while(A<E&&(r=advance())){if(r===n){R+=r+advance();continue}if(r===t){if(e.keepQuotes===true)R+=r;break}R+=r}push({type:"text",value:R});continue}if(R===h){C++;const t=x.value&&x.value.slice(-1)==="$"||w.dollar===true;const e={type:"brace",open:true,close:false,dollar:t,depth:C,commas:0,ranges:0,nodes:[]};w=push(e);S.push(w);push({type:"open",value:R});continue}if(R===d){if(w.type!=="brace"){push({type:"text",value:R});continue}const t="close";w=S.pop();w.close=true;push({type:t,value:R});C--;w=S[S.length-1];continue}if(R===a&&C>0){if(w.ranges>0){w.ranges=0;const t=w.nodes.shift();w.nodes=[t,{type:"text",value:s(w)}]}push({type:"comma",value:R});w.commas++;continue}if(R===l&&C>0&&w.commas===0){const t=w.nodes;if(C===0||t.length===0){push({type:"text",value:R});continue}if(x.type==="dot"){w.range=[];x.value+=R;x.type="range";if(w.nodes.length!==3&&w.nodes.length!==5){w.invalid=true;w.ranges=0;x.type="text";continue}w.ranges++;w.args=[];continue}if(x.type==="range"){t.pop();const e=t[t.length-1];e.value+=x.value+R;x=e;w.ranges--;continue}push({type:"dot",value:R});continue}push({type:"text",value:R})}do{w=S.pop();if(w.type!=="root"){w.nodes.forEach((t=>{if(!t.nodes){if(t.type==="open")t.isOpen=true;if(t.type==="close")t.isClose=true;if(!t.nodes)t.type="text";t.invalid=true}}));const t=S[S.length-1];const e=t.nodes.indexOf(w);t.nodes.splice(e,1,...w.nodes)}}while(S.length>0);push({type:"eos"});return _};t.exports=parse},9200:(t,e,r)=>{"use strict";const s=r(4691);t.exports=(t,e={})=>{const stringify=(t,r={})=>{const i=e.escapeInvalid&&s.isInvalidBrace(r);const n=t.invalid===true&&e.escapeInvalid===true;let o="";if(t.value){if((i||n)&&s.isOpenOrClose(t)){return"\\"+t.value}return t.value}if(t.value){return t.value}if(t.nodes){for(const e of t.nodes){o+=stringify(e)}}return o};return stringify(t)}},4691:(t,e)=>{"use strict";e.isInteger=t=>{if(typeof t==="number"){return Number.isInteger(t)}if(typeof t==="string"&&t.trim()!==""){return Number.isInteger(Number(t))}return false};e.find=(t,e)=>t.nodes.find((t=>t.type===e));e.exceedsLimit=(t,r,s=1,i)=>{if(i===false)return false;if(!e.isInteger(t)||!e.isInteger(r))return false;return(Number(r)-Number(t))/Number(s)>=i};e.escapeNode=(t,e=0,r)=>{const s=t.nodes[e];if(!s)return;if(r&&s.type===r||s.type==="open"||s.type==="close"){if(s.escaped!==true){s.value="\\"+s.value;s.escaped=true}}};e.encloseBrace=t=>{if(t.type!=="brace")return false;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}return false};e.isInvalidBrace=t=>{if(t.type!=="brace")return false;if(t.invalid===true||t.dollar)return true;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}if(t.open!==true||t.close!==true){t.invalid=true;return true}return false};e.isOpenOrClose=t=>{if(t.type==="open"||t.type==="close"){return true}return t.open===true||t.close===true};e.reduce=t=>t.reduce(((t,e)=>{if(e.type==="text")t.push(e.value);if(e.type==="range")e.type="text";return t}),[]);e.flatten=(...t)=>{const e=[];const flat=t=>{for(let r=0;r<t.length;r++){const s=t[r];if(Array.isArray(s)){flat(s);continue}if(s!==undefined){e.push(s)}}return e};flat(t);return e}},8018:(t,e,r)=>{var s=r(2361).EventEmitter;var i=r(2081).spawn;var n=r(1017);var o=n.dirname;var a=n.basename;var l=r(7147);r(3837).inherits(Command,s);e=t.exports=new Command;e.Command=Command;e.Option=Option;function Option(t,e){this.flags=t;this.required=t.indexOf("<")>=0;this.optional=t.indexOf("[")>=0;this.bool=t.indexOf("-no-")===-1;t=t.split(/[ ,|]+/);if(t.length>1&&!/^[[<]/.test(t[1]))this.short=t.shift();this.long=t.shift();this.description=e||""}Option.prototype.name=function(){return this.long.replace("--","").replace("no-","")};Option.prototype.attributeName=function(){return camelcase(this.name())};Option.prototype.is=function(t){return this.short===t||this.long===t};function Command(t){this.commands=[];this.options=[];this._execs={};this._allowUnknownOption=false;this._args=[];this._name=t||""}Command.prototype.command=function(t,e,r){if(typeof e==="object"&&e!==null){r=e;e=null}r=r||{};var s=t.split(/ +/);var i=new Command(s.shift());if(e){i.description(e);this.executables=true;this._execs[i._name]=true;if(r.isDefault)this.defaultExecutable=i._name}i._noHelp=!!r.noHelp;this.commands.push(i);i.parseExpectedArgs(s);i.parent=this;if(e)return this;return i};Command.prototype.arguments=function(t){return this.parseExpectedArgs(t.split(/ +/))};Command.prototype.addImplicitHelpCommand=function(){this.command("help [cmd]","display help for [cmd]")};Command.prototype.parseExpectedArgs=function(t){if(!t.length)return;var e=this;t.forEach((function(t){var r={required:false,name:"",variadic:false};switch(t[0]){case"<":r.required=true;r.name=t.slice(1,-1);break;case"[":r.name=t.slice(1,-1);break}if(r.name.length>3&&r.name.slice(-3)==="..."){r.variadic=true;r.name=r.name.slice(0,-3)}if(r.name){e._args.push(r)}}));return this};Command.prototype.action=function(t){var e=this;var listener=function(r,s){r=r||[];s=s||[];var i=e.parseOptions(s);outputHelpIfNecessary(e,i.unknown);if(i.unknown.length>0){e.unknownOption(i.unknown[0])}if(i.args.length)r=i.args.concat(r);e._args.forEach((function(t,s){if(t.required&&r[s]==null){e.missingArgument(t.name)}else if(t.variadic){if(s!==e._args.length-1){e.variadicArgNotLast(t.name)}r[s]=r.splice(s)}}));if(e._args.length){r[e._args.length]=e}else{r.push(e)}t.apply(e,r)};var r=this.parent||this;var s=r===this?"*":this._name;r.on("command:"+s,listener);if(this._alias)r.on("command:"+this._alias,listener);return this};Command.prototype.option=function(t,e,r,s){var i=this,n=new Option(t,e),o=n.name(),a=n.attributeName();if(typeof r!=="function"){if(r instanceof RegExp){var l=r;r=function(t,e){var r=l.exec(t);return r?r[0]:e}}else{s=r;r=null}}if(!n.bool||n.optional||n.required){if(!n.bool)s=true;if(s!==undefined){i[a]=s;n.defaultValue=s}}this.options.push(n);this.on("option:"+o,(function(t){if(t!==null&&r){t=r(t,i[a]===undefined?s:i[a])}if(typeof i[a]==="boolean"||typeof i[a]==="undefined"){if(t==null){i[a]=n.bool?s||true:false}else{i[a]=t}}else if(t!==null){i[a]=t}}));return this};Command.prototype.allowUnknownOption=function(t){this._allowUnknownOption=arguments.length===0||t;return this};Command.prototype.parse=function(t){if(this.executables)this.addImplicitHelpCommand();this.rawArgs=t;this._name=this._name||a(t[1],".js");if(this.executables&&t.length<3&&!this.defaultExecutable){t.push("--help")}var e=this.parseOptions(this.normalize(t.slice(2)));var r=this.args=e.args;var s=this.parseArgs(this.args,e.unknown);var i=s.args[0];var n=null;if(i){n=this.commands.filter((function(t){return t.alias()===i}))[0]}if(this._execs[i]&&typeof this._execs[i]!=="function"){return this.executeSubCommand(t,r,e.unknown)}else if(n){r[0]=n._name;return this.executeSubCommand(t,r,e.unknown)}else if(this.defaultExecutable){r.unshift(this.defaultExecutable);return this.executeSubCommand(t,r,e.unknown)}return s};Command.prototype.executeSubCommand=function(t,e,r){e=e.concat(r);if(!e.length)this.help();if(e[0]==="help"&&e.length===1)this.help();if(e[0]==="help"){e[0]=e[1];e[1]="--help"}var s=t[1];var u=a(s,n.extname(s))+"-"+e[0];var c;var h=l.realpathSync(s);c=o(h);var d=n.join(c,u);var f=false;if(exists(d+".js")){u=d+".js";f=true}else if(exists(d+".ts")){u=d+".ts";f=true}else if(exists(d)){u=d}e=e.slice(1);var p;if(process.platform!=="win32"){if(f){e.unshift(u);e=(process.execArgv||[]).concat(e);p=i(process.argv[0],e,{stdio:"inherit",customFds:[0,1,2]})}else{p=i(u,e,{stdio:"inherit",customFds:[0,1,2]})}}else{e.unshift(u);p=i(process.execPath,e,{stdio:"inherit"})}var g=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];g.forEach((function(t){process.on(t,(function(){if(p.killed===false&&p.exitCode===null){p.kill(t)}}))}));p.on("close",process.exit.bind(process));p.on("error",(function(t){if(t.code==="ENOENT"){console.error("error: %s(1) does not exist, try --help",u)}else if(t.code==="EACCES"){console.error("error: %s(1) not executable. try chmod or run with root",u)}process.exit(1)}));this.runningCommand=p};Command.prototype.normalize=function(t){var e=[],r,s,i;for(var n=0,o=t.length;n<o;++n){r=t[n];if(n>0){s=this.optionFor(t[n-1])}if(r==="--"){e=e.concat(t.slice(n));break}else if(s&&s.required){e.push(r)}else if(r.length>1&&r[0]==="-"&&r[1]!=="-"){r.slice(1).split("").forEach((function(t){e.push("-"+t)}))}else if(/^--/.test(r)&&~(i=r.indexOf("="))){e.push(r.slice(0,i),r.slice(i+1))}else{e.push(r)}}return e};Command.prototype.parseArgs=function(t,e){var r;if(t.length){r=t[0];if(this.listeners("command:"+r).length){this.emit("command:"+t.shift(),t,e)}else{this.emit("command:*",t)}}else{outputHelpIfNecessary(this,e);if(e.length>0){this.unknownOption(e[0])}if(this.commands.length===0&&this._args.filter((function(t){return t.required})).length===0){this.emit("command:*")}}return this};Command.prototype.optionFor=function(t){for(var e=0,r=this.options.length;e<r;++e){if(this.options[e].is(t)){return this.options[e]}}};Command.prototype.parseOptions=function(t){var e=[],r=t.length,s,i,n;var o=[];for(var a=0;a<r;++a){n=t[a];if(s){e.push(n);continue}if(n==="--"){s=true;continue}i=this.optionFor(n);if(i){if(i.required){n=t[++a];if(n==null)return this.optionMissingArgument(i);this.emit("option:"+i.name(),n)}else if(i.optional){n=t[a+1];if(n==null||n[0]==="-"&&n!=="-"){n=null}else{++a}this.emit("option:"+i.name(),n)}else{this.emit("option:"+i.name())}continue}if(n.length>1&&n[0]==="-"){o.push(n);if(a+1<t.length&&t[a+1][0]!=="-"){o.push(t[++a])}continue}e.push(n)}return{args:e,unknown:o}};Command.prototype.opts=function(){var t={},e=this.options.length;for(var r=0;r<e;r++){var s=this.options[r].attributeName();t[s]=s===this._versionOptionName?this._version:this[s]}return t};Command.prototype.missingArgument=function(t){console.error("error: missing required argument `%s'",t);process.exit(1)};Command.prototype.optionMissingArgument=function(t,e){if(e){console.error("error: option `%s' argument missing, got `%s'",t.flags,e)}else{console.error("error: option `%s' argument missing",t.flags)}process.exit(1)};Command.prototype.unknownOption=function(t){if(this._allowUnknownOption)return;console.error("error: unknown option `%s'",t);process.exit(1)};Command.prototype.variadicArgNotLast=function(t){console.error("error: variadic arguments must be last `%s'",t);process.exit(1)};Command.prototype.version=function(t,e){if(arguments.length===0)return this._version;this._version=t;e=e||"-V, --version";var r=new Option(e,"output the version number");this._versionOptionName=r.long.substr(2)||"version";this.options.push(r);this.on("option:"+this._versionOptionName,(function(){process.stdout.write(t+"\n");process.exit(0)}));return this};Command.prototype.description=function(t,e){if(arguments.length===0)return this._description;this._description=t;this._argsDescription=e;return this};Command.prototype.alias=function(t){var e=this;if(this.commands.length!==0){e=this.commands[this.commands.length-1]}if(arguments.length===0)return e._alias;if(t===e._name)throw new Error("Command alias can't be the same as its name");e._alias=t;return this};Command.prototype.usage=function(t){var e=this._args.map((function(t){return humanReadableArgName(t)}));var r="[options]"+(this.commands.length?" [command]":"")+(this._args.length?" "+e.join(" "):"");if(arguments.length===0)return this._usage||r;this._usage=t;return this};Command.prototype.name=function(t){if(arguments.length===0)return this._name;this._name=t;return this};Command.prototype.prepareCommands=function(){return this.commands.filter((function(t){return!t._noHelp})).map((function(t){var e=t._args.map((function(t){return humanReadableArgName(t)})).join(" ");return[t._name+(t._alias?"|"+t._alias:"")+(t.options.length?" [options]":"")+(e?" "+e:""),t._description]}))};Command.prototype.largestCommandLength=function(){var t=this.prepareCommands();return t.reduce((function(t,e){return Math.max(t,e[0].length)}),0)};Command.prototype.largestOptionLength=function(){var t=[].slice.call(this.options);t.push({flags:"-h, --help"});return t.reduce((function(t,e){return Math.max(t,e.flags.length)}),0)};Command.prototype.largestArgLength=function(){return this._args.reduce((function(t,e){return Math.max(t,e.name.length)}),0)};Command.prototype.padWidth=function(){var t=this.largestOptionLength();if(this._argsDescription&&this._args.length){if(this.largestArgLength()>t){t=this.largestArgLength()}}if(this.commands&&this.commands.length){if(this.largestCommandLength()>t){t=this.largestCommandLength()}}return t};Command.prototype.optionHelp=function(){var t=this.padWidth();return this.options.map((function(e){return pad(e.flags,t)+" "+e.description+(e.bool&&e.defaultValue!==undefined?" (default: "+JSON.stringify(e.defaultValue)+")":"")})).concat([pad("-h, --help",t)+" "+"output usage information"]).join("\n")};Command.prototype.commandHelp=function(){if(!this.commands.length)return"";var t=this.prepareCommands();var e=this.padWidth();return["Commands:",t.map((function(t){var r=t[1]?" "+t[1]:"";return(r?pad(t[0],e):t[0])+r})).join("\n").replace(/^/gm," "),""].join("\n")};Command.prototype.helpInformation=function(){var t=[];if(this._description){t=[this._description,""];var e=this._argsDescription;if(e&&this._args.length){var r=this.padWidth();t.push("Arguments:");t.push("");this._args.forEach((function(s){t.push(" "+pad(s.name,r)+" "+e[s.name])}));t.push("")}}var s=this._name;if(this._alias){s=s+"|"+this._alias}var i=["Usage: "+s+" "+this.usage(),""];var n=[];var o=this.commandHelp();if(o)n=[o];var a=["Options:",""+this.optionHelp().replace(/^/gm," "),""];return i.concat(t).concat(a).concat(n).join("\n")};Command.prototype.outputHelp=function(t){if(!t){t=function(t){return t}}process.stdout.write(t(this.helpInformation()));this.emit("--help")};Command.prototype.help=function(t){this.outputHelp(t);process.exit()};function camelcase(t){return t.split("-").reduce((function(t,e){return t+e[0].toUpperCase()+e.slice(1)}))}function pad(t,e){var r=Math.max(0,e-t.length);return t+Array(r+1).join(" ")}function outputHelpIfNecessary(t,e){e=e||[];for(var r=0;r<e.length;r++){if(e[r]==="--help"||e[r]==="-h"){t.outputHelp();process.exit(0)}}}function humanReadableArgName(t){var e=t.name+(t.variadic===true?"...":"");return t.required?"<"+e+">":"["+e+"]"}function exists(t){try{if(l.statSync(t).isFile()){return true}}catch(t){return false}}},7987:(t,e,r)=>{"use strict";const s=r(2081);const i=r(1655);const n=r(9738);function spawn(t,e,r){const o=i(t,e,r);const a=s.spawn(o.command,o.args,o.options);n.hookChildProcess(a,o);return a}function spawnSync(t,e,r){const o=i(t,e,r);const a=s.spawnSync(o.command,o.args,o.options);a.error=a.error||n.verifyENOENTSync(a.status,o);return a}t.exports=spawn;t.exports.spawn=spawn;t.exports.sync=spawnSync;t.exports._parse=i;t.exports._enoent=n},9738:t=>{"use strict";const e=process.platform==="win32";function notFoundError(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function hookChildProcess(t,r){if(!e){return}const s=t.emit;t.emit=function(e,i){if(e==="exit"){const e=verifyENOENT(i,r,"spawn");if(e){return s.call(t,"error",e)}}return s.apply(t,arguments)}}function verifyENOENT(t,r){if(e&&t===1&&!r.file){return notFoundError(r.original,"spawn")}return null}function verifyENOENTSync(t,r){if(e&&t===1&&!r.file){return notFoundError(r.original,"spawnSync")}return null}t.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},1655:(t,e,r)=>{"use strict";const s=r(1017);const i=r(7534);const n=r(8902);const o=r(2964);const a=process.platform==="win32";const l=/\.(?:com|exe)$/i;const u=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(t){t.file=i(t);const e=t.file&&o(t.file);if(e){t.args.unshift(t.file);t.command=e;return i(t)}return t.file}function parseNonShell(t){if(!a){return t}const e=detectShebang(t);const r=!l.test(e);if(t.options.forceShell||r){const r=u.test(e);t.command=s.normalize(t.command);t.command=n.command(t.command);t.args=t.args.map((t=>n.argument(t,r)));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`];t.command=process.env.comspec||"cmd.exe";t.options.windowsVerbatimArguments=true}return t}function parse(t,e,r){if(e&&!Array.isArray(e)){r=e;e=null}e=e?e.slice(0):[];r=Object.assign({},r);const s={command:t,args:e,options:r,file:undefined,original:{command:t,args:e}};return r.shell?s:parseNonShell(s)}t.exports=parse},8902:t=>{"use strict";const e=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(t){t=t.replace(e,"^$1");return t}function escapeArgument(t,r){t=`${t}`;t=t.replace(/(\\*)"/g,'$1$1\\"');t=t.replace(/(\\*)$/,"$1$1");t=`"${t}"`;t=t.replace(e,"^$1");if(r){t=t.replace(e,"^$1")}return t}t.exports.command=escapeCommand;t.exports.argument=escapeArgument},2964:(t,e,r)=>{"use strict";const s=r(7147);const i=r(4970);function readShebang(t){const e=150;const r=Buffer.alloc(e);let n;try{n=s.openSync(t,"r");s.readSync(n,r,0,e,0);s.closeSync(n)}catch(t){}return i(r.toString())}t.exports=readShebang},7534:(t,e,r)=>{"use strict";const s=r(1017);const i=r(8201);const n=r(2170);function resolveCommandAttempt(t,e){const r=t.options.env||process.env;const o=process.cwd();const a=t.options.cwd!=null;const l=a&&process.chdir!==undefined&&!process.chdir.disabled;if(l){try{process.chdir(t.options.cwd)}catch(t){}}let u;try{u=i.sync(t.command,{path:r[n({env:r})],pathExt:e?s.delimiter:undefined})}catch(t){}finally{if(l){process.chdir(o)}}if(u){u=s.resolve(a?t.options.cwd:"",u)}return u}function resolveCommand(t){return resolveCommandAttempt(t)||resolveCommandAttempt(t,true)}t.exports=resolveCommand},5134:t=>{"use strict";
|
|
2
|
+
(()=>{var t={1088:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const s=r(7147);e.FILE_SYSTEM_ADAPTER={lstat:s.lstat,stat:s.stat,lstatSync:s.lstatSync,statSync:s.statSync,readdir:s.readdir,readdirSync:s.readdirSync};function createFileSystemAdapter(t){if(t===undefined){return e.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}e.createFileSystemAdapter=createFileSystemAdapter},4919:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const r=process.versions.node.split(".");if(r[0]===undefined||r[1]===undefined){throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`)}const s=Number.parseInt(r[0],10);const i=Number.parseInt(r[1],10);const n=10;const o=10;const a=s>n;const l=s===n&&i>=o;e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=a||l},7552:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Settings=e.scandirSync=e.scandir=void 0;const s=r(7091);const i=r(1328);const n=r(3022);e.Settings=n.default;function scandir(t,e,r){if(typeof e==="function"){s.read(t,getSettings(),e);return}s.read(t,getSettings(e),r)}e.scandir=scandir;function scandirSync(t,e){const r=getSettings(e);return i.read(t,r)}e.scandirSync=scandirSync;function getSettings(t={}){if(t instanceof n.default){return t}return new n.default(t)}},7091:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.readdir=e.readdirWithFileTypes=e.read=void 0;const s=r(2580);const i=r(1188);const n=r(4919);const o=r(8047);const a=r(4845);function read(t,e,r){if(!e.stats&&n.IS_SUPPORT_READDIR_WITH_FILE_TYPES){readdirWithFileTypes(t,e,r);return}readdir(t,e,r)}e.read=read;function readdirWithFileTypes(t,e,r){e.fs.readdir(t,{withFileTypes:true},((s,n)=>{if(s!==null){callFailureCallback(r,s);return}const o=n.map((r=>({dirent:r,name:r.name,path:a.joinPathSegments(t,r.name,e.pathSegmentSeparator)})));if(!e.followSymbolicLinks){callSuccessCallback(r,o);return}const l=o.map((t=>makeRplTaskEntry(t,e)));i(l,((t,e)=>{if(t!==null){callFailureCallback(r,t);return}callSuccessCallback(r,e)}))}))}e.readdirWithFileTypes=readdirWithFileTypes;function makeRplTaskEntry(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,((s,i)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){r(s);return}r(null,t);return}t.dirent=o.fs.createDirentFromStats(t.name,i);r(null,t)}))}}function readdir(t,e,r){e.fs.readdir(t,((n,l)=>{if(n!==null){callFailureCallback(r,n);return}const u=l.map((r=>{const i=a.joinPathSegments(t,r,e.pathSegmentSeparator);return t=>{s.stat(i,e.fsStatSettings,((s,n)=>{if(s!==null){t(s);return}const a={name:r,path:i,dirent:o.fs.createDirentFromStats(r,n)};if(e.stats){a.stats=n}t(null,a)}))}}));i(u,((t,e)=>{if(t!==null){callFailureCallback(r,t);return}callSuccessCallback(r,e)}))}))}e.readdir=readdir;function callFailureCallback(t,e){t(e)}function callSuccessCallback(t,e){t(null,e)}},4845:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.joinPathSegments=void 0;function joinPathSegments(t,e,r){if(t.endsWith(r)){return t+e}return t+r+e}e.joinPathSegments=joinPathSegments},1328:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.readdir=e.readdirWithFileTypes=e.read=void 0;const s=r(2580);const i=r(4919);const n=r(8047);const o=r(4845);function read(t,e){if(!e.stats&&i.IS_SUPPORT_READDIR_WITH_FILE_TYPES){return readdirWithFileTypes(t,e)}return readdir(t,e)}e.read=read;function readdirWithFileTypes(t,e){const r=e.fs.readdirSync(t,{withFileTypes:true});return r.map((r=>{const s={dirent:r,name:r.name,path:o.joinPathSegments(t,r.name,e.pathSegmentSeparator)};if(s.dirent.isSymbolicLink()&&e.followSymbolicLinks){try{const t=e.fs.statSync(s.path);s.dirent=n.fs.createDirentFromStats(s.name,t)}catch(t){if(e.throwErrorOnBrokenSymbolicLink){throw t}}}return s}))}e.readdirWithFileTypes=readdirWithFileTypes;function readdir(t,e){const r=e.fs.readdirSync(t);return r.map((r=>{const i=o.joinPathSegments(t,r,e.pathSegmentSeparator);const a=s.statSync(i,e.fsStatSettings);const l={name:r,path:i,dirent:n.fs.createDirentFromStats(r,a)};if(e.stats){l.stats=a}return l}))}e.readdir=readdir},3022:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(1017);const i=r(2580);const n=r(1088);class Settings{constructor(t={}){this._options=t;this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,false);this.fs=n.createFileSystemAdapter(this._options.fs);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,s.sep);this.stats=this._getValue(this._options.stats,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true);this.fsStatSettings=new i.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,e){return t!==null&&t!==void 0?t:e}}e["default"]=Settings},7876:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.createDirentFromStats=void 0;class DirentFromStats{constructor(t,e){this.name=t;this.isBlockDevice=e.isBlockDevice.bind(e);this.isCharacterDevice=e.isCharacterDevice.bind(e);this.isDirectory=e.isDirectory.bind(e);this.isFIFO=e.isFIFO.bind(e);this.isFile=e.isFile.bind(e);this.isSocket=e.isSocket.bind(e);this.isSymbolicLink=e.isSymbolicLink.bind(e)}}function createDirentFromStats(t,e){return new DirentFromStats(t,e)}e.createDirentFromStats=createDirentFromStats},8047:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.fs=void 0;const s=r(7876);e.fs=s},7650:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const s=r(7147);e.FILE_SYSTEM_ADAPTER={lstat:s.lstat,stat:s.stat,lstatSync:s.lstatSync,statSync:s.statSync};function createFileSystemAdapter(t){if(t===undefined){return e.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}e.createFileSystemAdapter=createFileSystemAdapter},2580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.statSync=e.stat=e.Settings=void 0;const s=r(5939);const i=r(105);const n=r(2466);e.Settings=n.default;function stat(t,e,r){if(typeof e==="function"){s.read(t,getSettings(),e);return}s.read(t,getSettings(e),r)}e.stat=stat;function statSync(t,e){const r=getSettings(e);return i.read(t,r)}e.statSync=statSync;function getSettings(t={}){if(t instanceof n.default){return t}return new n.default(t)}},5939:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.read=void 0;function read(t,e,r){e.fs.lstat(t,((s,i)=>{if(s!==null){callFailureCallback(r,s);return}if(!i.isSymbolicLink()||!e.followSymbolicLink){callSuccessCallback(r,i);return}e.fs.stat(t,((t,s)=>{if(t!==null){if(e.throwErrorOnBrokenSymbolicLink){callFailureCallback(r,t);return}callSuccessCallback(r,i);return}if(e.markSymbolicLink){s.isSymbolicLink=()=>true}callSuccessCallback(r,s)}))}))}e.read=read;function callFailureCallback(t,e){t(e)}function callSuccessCallback(t,e){t(null,e)}},105:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.read=void 0;function read(t,e){const r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink){return r}try{const r=e.fs.statSync(t);if(e.markSymbolicLink){r.isSymbolicLink=()=>true}return r}catch(t){if(!e.throwErrorOnBrokenSymbolicLink){return r}throw t}}e.read=read},2466:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7650);class Settings{constructor(t={}){this._options=t;this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,true);this.fs=s.createFileSystemAdapter(this._options.fs);this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true)}_getValue(t,e){return t!==null&&t!==void 0?t:e}}e["default"]=Settings},803:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Settings=e.walkStream=e.walkSync=e.walk=void 0;const s=r(6887);const i=r(7499);const n=r(6875);const o=r(8265);e.Settings=o.default;function walk(t,e,r){if(typeof e==="function"){new s.default(t,getSettings()).read(e);return}new s.default(t,getSettings(e)).read(r)}e.walk=walk;function walkSync(t,e){const r=getSettings(e);const s=new n.default(t,r);return s.read()}e.walkSync=walkSync;function walkStream(t,e){const r=getSettings(e);const s=new i.default(t,r);return s.read()}e.walkStream=walkStream;function getSettings(t={}){if(t instanceof o.default){return t}return new o.default(t)}},6887:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(6203);class AsyncProvider{constructor(t,e){this._root=t;this._settings=e;this._reader=new s.default(this._root,this._settings);this._storage=[]}read(t){this._reader.onError((e=>{callFailureCallback(t,e)}));this._reader.onEntry((t=>{this._storage.push(t)}));this._reader.onEnd((()=>{callSuccessCallback(t,this._storage)}));this._reader.read()}}e["default"]=AsyncProvider;function callFailureCallback(t,e){t(e)}function callSuccessCallback(t,e){t(null,e)}},7499:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(2781);const i=r(6203);class StreamProvider{constructor(t,e){this._root=t;this._settings=e;this._reader=new i.default(this._root,this._settings);this._stream=new s.Readable({objectMode:true,read:()=>{},destroy:()=>{if(!this._reader.isDestroyed){this._reader.destroy()}}})}read(){this._reader.onError((t=>{this._stream.emit("error",t)}));this._reader.onEntry((t=>{this._stream.push(t)}));this._reader.onEnd((()=>{this._stream.push(null)}));this._reader.read();return this._stream}}e["default"]=StreamProvider},6875:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(1214);class SyncProvider{constructor(t,e){this._root=t;this._settings=e;this._reader=new s.default(this._root,this._settings)}read(){return this._reader.read()}}e["default"]=SyncProvider},6203:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(2361);const i=r(7552);const n=r(2696);const o=r(7628);const a=r(3402);class AsyncReader extends a.default{constructor(t,e){super(t,e);this._settings=e;this._scandir=i.scandir;this._emitter=new s.EventEmitter;this._queue=n(this._worker.bind(this),this._settings.concurrency);this._isFatalError=false;this._isDestroyed=false;this._queue.drain=()=>{if(!this._isFatalError){this._emitter.emit("end")}}}read(){this._isFatalError=false;this._isDestroyed=false;setImmediate((()=>{this._pushToQueue(this._root,this._settings.basePath)}));return this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed){throw new Error("The reader is already destroyed")}this._isDestroyed=true;this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,e){const r={directory:t,base:e};this._queue.push(r,(t=>{if(t!==null){this._handleError(t)}}))}_worker(t,e){this._scandir(t.directory,this._settings.fsScandirSettings,((r,s)=>{if(r!==null){e(r,undefined);return}for(const e of s){this._handleEntry(e,t.base)}e(null,undefined)}))}_handleError(t){if(this._isDestroyed||!o.isFatalError(this._settings,t)){return}this._isFatalError=true;this._isDestroyed=true;this._emitter.emit("error",t)}_handleEntry(t,e){if(this._isDestroyed||this._isFatalError){return}const r=t.path;if(e!==undefined){t.path=o.joinPathSegments(e,t.name,this._settings.pathSegmentSeparator)}if(o.isAppliedFilter(this._settings.entryFilter,t)){this._emitEntry(t)}if(t.dirent.isDirectory()&&o.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(r,e===undefined?undefined:t.path)}}_emitEntry(t){this._emitter.emit("entry",t)}}e["default"]=AsyncReader},7628:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.joinPathSegments=e.replacePathSegmentSeparator=e.isAppliedFilter=e.isFatalError=void 0;function isFatalError(t,e){if(t.errorFilter===null){return true}return!t.errorFilter(e)}e.isFatalError=isFatalError;function isAppliedFilter(t,e){return t===null||t(e)}e.isAppliedFilter=isAppliedFilter;function replacePathSegmentSeparator(t,e){return t.split(/[/\\]/).join(e)}e.replacePathSegmentSeparator=replacePathSegmentSeparator;function joinPathSegments(t,e,r){if(t===""){return e}if(t.endsWith(r)){return t+e}return t+r+e}e.joinPathSegments=joinPathSegments},3402:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7628);class Reader{constructor(t,e){this._root=t;this._settings=e;this._root=s.replacePathSegmentSeparator(t,e.pathSegmentSeparator)}}e["default"]=Reader},1214:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7552);const i=r(7628);const n=r(3402);class SyncReader extends n.default{constructor(){super(...arguments);this._scandir=s.scandirSync;this._storage=[];this._queue=new Set}read(){this._pushToQueue(this._root,this._settings.basePath);this._handleQueue();return this._storage}_pushToQueue(t,e){this._queue.add({directory:t,base:e})}_handleQueue(){for(const t of this._queue.values()){this._handleDirectory(t.directory,t.base)}}_handleDirectory(t,e){try{const r=this._scandir(t,this._settings.fsScandirSettings);for(const t of r){this._handleEntry(t,e)}}catch(t){this._handleError(t)}}_handleError(t){if(!i.isFatalError(this._settings,t)){return}throw t}_handleEntry(t,e){const r=t.path;if(e!==undefined){t.path=i.joinPathSegments(e,t.name,this._settings.pathSegmentSeparator)}if(i.isAppliedFilter(this._settings.entryFilter,t)){this._pushToStorage(t)}if(t.dirent.isDirectory()&&i.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(r,e===undefined?undefined:t.path)}}_pushToStorage(t){this._storage.push(t)}}e["default"]=SyncReader},8265:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(1017);const i=r(7552);class Settings{constructor(t={}){this._options=t;this.basePath=this._getValue(this._options.basePath,undefined);this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY);this.deepFilter=this._getValue(this._options.deepFilter,null);this.entryFilter=this._getValue(this._options.entryFilter,null);this.errorFilter=this._getValue(this._options.errorFilter,null);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,s.sep);this.fsScandirSettings=new i.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,e){return t!==null&&t!==void 0?t:e}}e["default"]=Settings},538:(t,e,r)=>{"use strict";const s=r(9200);const i=r(3668);const n=r(5961);const o=r(9594);const braces=(t,e={})=>{let r=[];if(Array.isArray(t)){for(const s of t){const t=braces.create(s,e);if(Array.isArray(t)){r.push(...t)}else{r.push(t)}}}else{r=[].concat(braces.create(t,e))}if(e&&e.expand===true&&e.nodupes===true){r=[...new Set(r)]}return r};braces.parse=(t,e={})=>o(t,e);braces.stringify=(t,e={})=>{if(typeof t==="string"){return s(braces.parse(t,e),e)}return s(t,e)};braces.compile=(t,e={})=>{if(typeof t==="string"){t=braces.parse(t,e)}return i(t,e)};braces.expand=(t,e={})=>{if(typeof t==="string"){t=braces.parse(t,e)}let r=n(t,e);if(e.noempty===true){r=r.filter(Boolean)}if(e.nodupes===true){r=[...new Set(r)]}return r};braces.create=(t,e={})=>{if(t===""||t.length<3){return[t]}return e.expand!==true?braces.compile(t,e):braces.expand(t,e)};t.exports=braces},3668:(t,e,r)=>{"use strict";const s=r(3488);const i=r(4691);const compile=(t,e={})=>{const walk=(t,r={})=>{const n=i.isInvalidBrace(r);const o=t.invalid===true&&e.escapeInvalid===true;const a=n===true||o===true;const l=e.escapeInvalid===true?"\\":"";let u="";if(t.isOpen===true){return l+t.value}if(t.isClose===true){console.log("node.isClose",l,t.value);return l+t.value}if(t.type==="open"){return a?l+t.value:"("}if(t.type==="close"){return a?l+t.value:")"}if(t.type==="comma"){return t.prev.type==="comma"?"":a?t.value:"|"}if(t.value){return t.value}if(t.nodes&&t.ranges>0){const r=i.reduce(t.nodes);const n=s(...r,{...e,wrap:false,toRegex:true,strictZeros:true});if(n.length!==0){return r.length>1&&n.length>1?`(${n})`:n}}if(t.nodes){for(const e of t.nodes){u+=walk(e,t)}}return u};return walk(t)};t.exports=compile},5529:t=>{"use strict";t.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},5961:(t,e,r)=>{"use strict";const s=r(3488);const i=r(9200);const n=r(4691);const append=(t="",e="",r=false)=>{const s=[];t=[].concat(t);e=[].concat(e);if(!e.length)return t;if(!t.length){return r?n.flatten(e).map((t=>`{${t}}`)):e}for(const i of t){if(Array.isArray(i)){for(const t of i){s.push(append(t,e,r))}}else{for(let t of e){if(r===true&&typeof t==="string")t=`{${t}}`;s.push(Array.isArray(t)?append(i,t,r):i+t)}}}return n.flatten(s)};const expand=(t,e={})=>{const r=e.rangeLimit===undefined?1e3:e.rangeLimit;const walk=(t,o={})=>{t.queue=[];let a=o;let l=o.queue;while(a.type!=="brace"&&a.type!=="root"&&a.parent){a=a.parent;l=a.queue}if(t.invalid||t.dollar){l.push(append(l.pop(),i(t,e)));return}if(t.type==="brace"&&t.invalid!==true&&t.nodes.length===2){l.push(append(l.pop(),["{}"]));return}if(t.nodes&&t.ranges>0){const o=n.reduce(t.nodes);if(n.exceedsLimit(...o,e.step,r)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let a=s(...o,e);if(a.length===0){a=i(t,e)}l.push(append(l.pop(),a));t.nodes=[];return}const u=n.encloseBrace(t);let c=t.queue;let h=t;while(h.type!=="brace"&&h.type!=="root"&&h.parent){h=h.parent;c=h.queue}for(let e=0;e<t.nodes.length;e++){const r=t.nodes[e];if(r.type==="comma"&&t.type==="brace"){if(e===1)c.push("");c.push("");continue}if(r.type==="close"){l.push(append(l.pop(),c,u));continue}if(r.value&&r.type!=="open"){c.push(append(c.pop(),r.value));continue}if(r.nodes){walk(r,t)}}return c};return n.flatten(walk(t))};t.exports=expand},9594:(t,e,r)=>{"use strict";const s=r(9200);const{MAX_LENGTH:i,CHAR_BACKSLASH:n,CHAR_BACKTICK:o,CHAR_COMMA:a,CHAR_DOT:l,CHAR_LEFT_PARENTHESES:u,CHAR_RIGHT_PARENTHESES:c,CHAR_LEFT_CURLY_BRACE:h,CHAR_RIGHT_CURLY_BRACE:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:g,CHAR_SINGLE_QUOTE:m,CHAR_NO_BREAK_SPACE:y,CHAR_ZERO_WIDTH_NOBREAK_SPACE:v}=r(5529);const parse=(t,e={})=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}const r=e||{};const b=typeof r.maxLength==="number"?Math.min(i,r.maxLength):i;if(t.length>b){throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${b})`)}const _={type:"root",input:t,nodes:[]};const S=[_];let w=_;let x=_;let P=0;const E=t.length;let A=0;let C=0;let R;const advance=()=>t[A++];const push=t=>{if(t.type==="text"&&x.type==="dot"){x.type="text"}if(x&&x.type==="text"&&t.type==="text"){x.value+=t.value;return}w.nodes.push(t);t.parent=w;t.prev=x;x=t;return t};push({type:"bos"});while(A<E){w=S[S.length-1];R=advance();if(R===v||R===y){continue}if(R===n){push({type:"text",value:(e.keepEscaping?R:"")+advance()});continue}if(R===p){push({type:"text",value:"\\"+R});continue}if(R===f){P++;let t;while(A<E&&(t=advance())){R+=t;if(t===f){P++;continue}if(t===n){R+=advance();continue}if(t===p){P--;if(P===0){break}}}push({type:"text",value:R});continue}if(R===u){w=push({type:"paren",nodes:[]});S.push(w);push({type:"text",value:R});continue}if(R===c){if(w.type!=="paren"){push({type:"text",value:R});continue}w=S.pop();push({type:"text",value:R});w=S[S.length-1];continue}if(R===g||R===m||R===o){const t=R;let r;if(e.keepQuotes!==true){R=""}while(A<E&&(r=advance())){if(r===n){R+=r+advance();continue}if(r===t){if(e.keepQuotes===true)R+=r;break}R+=r}push({type:"text",value:R});continue}if(R===h){C++;const t=x.value&&x.value.slice(-1)==="$"||w.dollar===true;const e={type:"brace",open:true,close:false,dollar:t,depth:C,commas:0,ranges:0,nodes:[]};w=push(e);S.push(w);push({type:"open",value:R});continue}if(R===d){if(w.type!=="brace"){push({type:"text",value:R});continue}const t="close";w=S.pop();w.close=true;push({type:t,value:R});C--;w=S[S.length-1];continue}if(R===a&&C>0){if(w.ranges>0){w.ranges=0;const t=w.nodes.shift();w.nodes=[t,{type:"text",value:s(w)}]}push({type:"comma",value:R});w.commas++;continue}if(R===l&&C>0&&w.commas===0){const t=w.nodes;if(C===0||t.length===0){push({type:"text",value:R});continue}if(x.type==="dot"){w.range=[];x.value+=R;x.type="range";if(w.nodes.length!==3&&w.nodes.length!==5){w.invalid=true;w.ranges=0;x.type="text";continue}w.ranges++;w.args=[];continue}if(x.type==="range"){t.pop();const e=t[t.length-1];e.value+=x.value+R;x=e;w.ranges--;continue}push({type:"dot",value:R});continue}push({type:"text",value:R})}do{w=S.pop();if(w.type!=="root"){w.nodes.forEach((t=>{if(!t.nodes){if(t.type==="open")t.isOpen=true;if(t.type==="close")t.isClose=true;if(!t.nodes)t.type="text";t.invalid=true}}));const t=S[S.length-1];const e=t.nodes.indexOf(w);t.nodes.splice(e,1,...w.nodes)}}while(S.length>0);push({type:"eos"});return _};t.exports=parse},9200:(t,e,r)=>{"use strict";const s=r(4691);t.exports=(t,e={})=>{const stringify=(t,r={})=>{const i=e.escapeInvalid&&s.isInvalidBrace(r);const n=t.invalid===true&&e.escapeInvalid===true;let o="";if(t.value){if((i||n)&&s.isOpenOrClose(t)){return"\\"+t.value}return t.value}if(t.value){return t.value}if(t.nodes){for(const e of t.nodes){o+=stringify(e)}}return o};return stringify(t)}},4691:(t,e)=>{"use strict";e.isInteger=t=>{if(typeof t==="number"){return Number.isInteger(t)}if(typeof t==="string"&&t.trim()!==""){return Number.isInteger(Number(t))}return false};e.find=(t,e)=>t.nodes.find((t=>t.type===e));e.exceedsLimit=(t,r,s=1,i)=>{if(i===false)return false;if(!e.isInteger(t)||!e.isInteger(r))return false;return(Number(r)-Number(t))/Number(s)>=i};e.escapeNode=(t,e=0,r)=>{const s=t.nodes[e];if(!s)return;if(r&&s.type===r||s.type==="open"||s.type==="close"){if(s.escaped!==true){s.value="\\"+s.value;s.escaped=true}}};e.encloseBrace=t=>{if(t.type!=="brace")return false;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}return false};e.isInvalidBrace=t=>{if(t.type!=="brace")return false;if(t.invalid===true||t.dollar)return true;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}if(t.open!==true||t.close!==true){t.invalid=true;return true}return false};e.isOpenOrClose=t=>{if(t.type==="open"||t.type==="close"){return true}return t.open===true||t.close===true};e.reduce=t=>t.reduce(((t,e)=>{if(e.type==="text")t.push(e.value);if(e.type==="range")e.type="text";return t}),[]);e.flatten=(...t)=>{const e=[];const flat=t=>{for(let r=0;r<t.length;r++){const s=t[r];if(Array.isArray(s)){flat(s);continue}if(s!==undefined){e.push(s)}}return e};flat(t);return e}},8018:(t,e,r)=>{var s=r(2361).EventEmitter;var i=r(2081).spawn;var n=r(1017);var o=n.dirname;var a=n.basename;var l=r(7147);r(3837).inherits(Command,s);e=t.exports=new Command;e.Command=Command;e.Option=Option;function Option(t,e){this.flags=t;this.required=t.indexOf("<")>=0;this.optional=t.indexOf("[")>=0;this.bool=t.indexOf("-no-")===-1;t=t.split(/[ ,|]+/);if(t.length>1&&!/^[[<]/.test(t[1]))this.short=t.shift();this.long=t.shift();this.description=e||""}Option.prototype.name=function(){return this.long.replace("--","").replace("no-","")};Option.prototype.attributeName=function(){return camelcase(this.name())};Option.prototype.is=function(t){return this.short===t||this.long===t};function Command(t){this.commands=[];this.options=[];this._execs={};this._allowUnknownOption=false;this._args=[];this._name=t||""}Command.prototype.command=function(t,e,r){if(typeof e==="object"&&e!==null){r=e;e=null}r=r||{};var s=t.split(/ +/);var i=new Command(s.shift());if(e){i.description(e);this.executables=true;this._execs[i._name]=true;if(r.isDefault)this.defaultExecutable=i._name}i._noHelp=!!r.noHelp;this.commands.push(i);i.parseExpectedArgs(s);i.parent=this;if(e)return this;return i};Command.prototype.arguments=function(t){return this.parseExpectedArgs(t.split(/ +/))};Command.prototype.addImplicitHelpCommand=function(){this.command("help [cmd]","display help for [cmd]")};Command.prototype.parseExpectedArgs=function(t){if(!t.length)return;var e=this;t.forEach((function(t){var r={required:false,name:"",variadic:false};switch(t[0]){case"<":r.required=true;r.name=t.slice(1,-1);break;case"[":r.name=t.slice(1,-1);break}if(r.name.length>3&&r.name.slice(-3)==="..."){r.variadic=true;r.name=r.name.slice(0,-3)}if(r.name){e._args.push(r)}}));return this};Command.prototype.action=function(t){var e=this;var listener=function(r,s){r=r||[];s=s||[];var i=e.parseOptions(s);outputHelpIfNecessary(e,i.unknown);if(i.unknown.length>0){e.unknownOption(i.unknown[0])}if(i.args.length)r=i.args.concat(r);e._args.forEach((function(t,s){if(t.required&&r[s]==null){e.missingArgument(t.name)}else if(t.variadic){if(s!==e._args.length-1){e.variadicArgNotLast(t.name)}r[s]=r.splice(s)}}));if(e._args.length){r[e._args.length]=e}else{r.push(e)}t.apply(e,r)};var r=this.parent||this;var s=r===this?"*":this._name;r.on("command:"+s,listener);if(this._alias)r.on("command:"+this._alias,listener);return this};Command.prototype.option=function(t,e,r,s){var i=this,n=new Option(t,e),o=n.name(),a=n.attributeName();if(typeof r!=="function"){if(r instanceof RegExp){var l=r;r=function(t,e){var r=l.exec(t);return r?r[0]:e}}else{s=r;r=null}}if(!n.bool||n.optional||n.required){if(!n.bool)s=true;if(s!==undefined){i[a]=s;n.defaultValue=s}}this.options.push(n);this.on("option:"+o,(function(t){if(t!==null&&r){t=r(t,i[a]===undefined?s:i[a])}if(typeof i[a]==="boolean"||typeof i[a]==="undefined"){if(t==null){i[a]=n.bool?s||true:false}else{i[a]=t}}else if(t!==null){i[a]=t}}));return this};Command.prototype.allowUnknownOption=function(t){this._allowUnknownOption=arguments.length===0||t;return this};Command.prototype.parse=function(t){if(this.executables)this.addImplicitHelpCommand();this.rawArgs=t;this._name=this._name||a(t[1],".js");if(this.executables&&t.length<3&&!this.defaultExecutable){t.push("--help")}var e=this.parseOptions(this.normalize(t.slice(2)));var r=this.args=e.args;var s=this.parseArgs(this.args,e.unknown);var i=s.args[0];var n=null;if(i){n=this.commands.filter((function(t){return t.alias()===i}))[0]}if(this._execs[i]&&typeof this._execs[i]!=="function"){return this.executeSubCommand(t,r,e.unknown)}else if(n){r[0]=n._name;return this.executeSubCommand(t,r,e.unknown)}else if(this.defaultExecutable){r.unshift(this.defaultExecutable);return this.executeSubCommand(t,r,e.unknown)}return s};Command.prototype.executeSubCommand=function(t,e,r){e=e.concat(r);if(!e.length)this.help();if(e[0]==="help"&&e.length===1)this.help();if(e[0]==="help"){e[0]=e[1];e[1]="--help"}var s=t[1];var u=a(s,n.extname(s))+"-"+e[0];var c;var h=l.realpathSync(s);c=o(h);var d=n.join(c,u);var f=false;if(exists(d+".js")){u=d+".js";f=true}else if(exists(d+".ts")){u=d+".ts";f=true}else if(exists(d)){u=d}e=e.slice(1);var p;if(process.platform!=="win32"){if(f){e.unshift(u);e=(process.execArgv||[]).concat(e);p=i(process.argv[0],e,{stdio:"inherit",customFds:[0,1,2]})}else{p=i(u,e,{stdio:"inherit",customFds:[0,1,2]})}}else{e.unshift(u);p=i(process.execPath,e,{stdio:"inherit"})}var g=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];g.forEach((function(t){process.on(t,(function(){if(p.killed===false&&p.exitCode===null){p.kill(t)}}))}));p.on("close",process.exit.bind(process));p.on("error",(function(t){if(t.code==="ENOENT"){console.error("error: %s(1) does not exist, try --help",u)}else if(t.code==="EACCES"){console.error("error: %s(1) not executable. try chmod or run with root",u)}process.exit(1)}));this.runningCommand=p};Command.prototype.normalize=function(t){var e=[],r,s,i;for(var n=0,o=t.length;n<o;++n){r=t[n];if(n>0){s=this.optionFor(t[n-1])}if(r==="--"){e=e.concat(t.slice(n));break}else if(s&&s.required){e.push(r)}else if(r.length>1&&r[0]==="-"&&r[1]!=="-"){r.slice(1).split("").forEach((function(t){e.push("-"+t)}))}else if(/^--/.test(r)&&~(i=r.indexOf("="))){e.push(r.slice(0,i),r.slice(i+1))}else{e.push(r)}}return e};Command.prototype.parseArgs=function(t,e){var r;if(t.length){r=t[0];if(this.listeners("command:"+r).length){this.emit("command:"+t.shift(),t,e)}else{this.emit("command:*",t)}}else{outputHelpIfNecessary(this,e);if(e.length>0){this.unknownOption(e[0])}if(this.commands.length===0&&this._args.filter((function(t){return t.required})).length===0){this.emit("command:*")}}return this};Command.prototype.optionFor=function(t){for(var e=0,r=this.options.length;e<r;++e){if(this.options[e].is(t)){return this.options[e]}}};Command.prototype.parseOptions=function(t){var e=[],r=t.length,s,i,n;var o=[];for(var a=0;a<r;++a){n=t[a];if(s){e.push(n);continue}if(n==="--"){s=true;continue}i=this.optionFor(n);if(i){if(i.required){n=t[++a];if(n==null)return this.optionMissingArgument(i);this.emit("option:"+i.name(),n)}else if(i.optional){n=t[a+1];if(n==null||n[0]==="-"&&n!=="-"){n=null}else{++a}this.emit("option:"+i.name(),n)}else{this.emit("option:"+i.name())}continue}if(n.length>1&&n[0]==="-"){o.push(n);if(a+1<t.length&&t[a+1][0]!=="-"){o.push(t[++a])}continue}e.push(n)}return{args:e,unknown:o}};Command.prototype.opts=function(){var t={},e=this.options.length;for(var r=0;r<e;r++){var s=this.options[r].attributeName();t[s]=s===this._versionOptionName?this._version:this[s]}return t};Command.prototype.missingArgument=function(t){console.error("error: missing required argument `%s'",t);process.exit(1)};Command.prototype.optionMissingArgument=function(t,e){if(e){console.error("error: option `%s' argument missing, got `%s'",t.flags,e)}else{console.error("error: option `%s' argument missing",t.flags)}process.exit(1)};Command.prototype.unknownOption=function(t){if(this._allowUnknownOption)return;console.error("error: unknown option `%s'",t);process.exit(1)};Command.prototype.variadicArgNotLast=function(t){console.error("error: variadic arguments must be last `%s'",t);process.exit(1)};Command.prototype.version=function(t,e){if(arguments.length===0)return this._version;this._version=t;e=e||"-V, --version";var r=new Option(e,"output the version number");this._versionOptionName=r.long.substr(2)||"version";this.options.push(r);this.on("option:"+this._versionOptionName,(function(){process.stdout.write(t+"\n");process.exit(0)}));return this};Command.prototype.description=function(t,e){if(arguments.length===0)return this._description;this._description=t;this._argsDescription=e;return this};Command.prototype.alias=function(t){var e=this;if(this.commands.length!==0){e=this.commands[this.commands.length-1]}if(arguments.length===0)return e._alias;if(t===e._name)throw new Error("Command alias can't be the same as its name");e._alias=t;return this};Command.prototype.usage=function(t){var e=this._args.map((function(t){return humanReadableArgName(t)}));var r="[options]"+(this.commands.length?" [command]":"")+(this._args.length?" "+e.join(" "):"");if(arguments.length===0)return this._usage||r;this._usage=t;return this};Command.prototype.name=function(t){if(arguments.length===0)return this._name;this._name=t;return this};Command.prototype.prepareCommands=function(){return this.commands.filter((function(t){return!t._noHelp})).map((function(t){var e=t._args.map((function(t){return humanReadableArgName(t)})).join(" ");return[t._name+(t._alias?"|"+t._alias:"")+(t.options.length?" [options]":"")+(e?" "+e:""),t._description]}))};Command.prototype.largestCommandLength=function(){var t=this.prepareCommands();return t.reduce((function(t,e){return Math.max(t,e[0].length)}),0)};Command.prototype.largestOptionLength=function(){var t=[].slice.call(this.options);t.push({flags:"-h, --help"});return t.reduce((function(t,e){return Math.max(t,e.flags.length)}),0)};Command.prototype.largestArgLength=function(){return this._args.reduce((function(t,e){return Math.max(t,e.name.length)}),0)};Command.prototype.padWidth=function(){var t=this.largestOptionLength();if(this._argsDescription&&this._args.length){if(this.largestArgLength()>t){t=this.largestArgLength()}}if(this.commands&&this.commands.length){if(this.largestCommandLength()>t){t=this.largestCommandLength()}}return t};Command.prototype.optionHelp=function(){var t=this.padWidth();return this.options.map((function(e){return pad(e.flags,t)+" "+e.description+(e.bool&&e.defaultValue!==undefined?" (default: "+JSON.stringify(e.defaultValue)+")":"")})).concat([pad("-h, --help",t)+" "+"output usage information"]).join("\n")};Command.prototype.commandHelp=function(){if(!this.commands.length)return"";var t=this.prepareCommands();var e=this.padWidth();return["Commands:",t.map((function(t){var r=t[1]?" "+t[1]:"";return(r?pad(t[0],e):t[0])+r})).join("\n").replace(/^/gm," "),""].join("\n")};Command.prototype.helpInformation=function(){var t=[];if(this._description){t=[this._description,""];var e=this._argsDescription;if(e&&this._args.length){var r=this.padWidth();t.push("Arguments:");t.push("");this._args.forEach((function(s){t.push(" "+pad(s.name,r)+" "+e[s.name])}));t.push("")}}var s=this._name;if(this._alias){s=s+"|"+this._alias}var i=["Usage: "+s+" "+this.usage(),""];var n=[];var o=this.commandHelp();if(o)n=[o];var a=["Options:",""+this.optionHelp().replace(/^/gm," "),""];return i.concat(t).concat(a).concat(n).join("\n")};Command.prototype.outputHelp=function(t){if(!t){t=function(t){return t}}process.stdout.write(t(this.helpInformation()));this.emit("--help")};Command.prototype.help=function(t){this.outputHelp(t);process.exit()};function camelcase(t){return t.split("-").reduce((function(t,e){return t+e[0].toUpperCase()+e.slice(1)}))}function pad(t,e){var r=Math.max(0,e-t.length);return t+Array(r+1).join(" ")}function outputHelpIfNecessary(t,e){e=e||[];for(var r=0;r<e.length;r++){if(e[r]==="--help"||e[r]==="-h"){t.outputHelp();process.exit(0)}}}function humanReadableArgName(t){var e=t.name+(t.variadic===true?"...":"");return t.required?"<"+e+">":"["+e+"]"}function exists(t){try{if(l.statSync(t).isFile()){return true}}catch(t){return false}}},7987:(t,e,r)=>{"use strict";const s=r(2081);const i=r(1655);const n=r(9738);function spawn(t,e,r){const o=i(t,e,r);const a=s.spawn(o.command,o.args,o.options);n.hookChildProcess(a,o);return a}function spawnSync(t,e,r){const o=i(t,e,r);const a=s.spawnSync(o.command,o.args,o.options);a.error=a.error||n.verifyENOENTSync(a.status,o);return a}t.exports=spawn;t.exports.spawn=spawn;t.exports.sync=spawnSync;t.exports._parse=i;t.exports._enoent=n},9738:t=>{"use strict";const e=process.platform==="win32";function notFoundError(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function hookChildProcess(t,r){if(!e){return}const s=t.emit;t.emit=function(e,i){if(e==="exit"){const e=verifyENOENT(i,r);if(e){return s.call(t,"error",e)}}return s.apply(t,arguments)}}function verifyENOENT(t,r){if(e&&t===1&&!r.file){return notFoundError(r.original,"spawn")}return null}function verifyENOENTSync(t,r){if(e&&t===1&&!r.file){return notFoundError(r.original,"spawnSync")}return null}t.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},1655:(t,e,r)=>{"use strict";const s=r(1017);const i=r(7534);const n=r(8902);const o=r(2964);const a=process.platform==="win32";const l=/\.(?:com|exe)$/i;const u=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(t){t.file=i(t);const e=t.file&&o(t.file);if(e){t.args.unshift(t.file);t.command=e;return i(t)}return t.file}function parseNonShell(t){if(!a){return t}const e=detectShebang(t);const r=!l.test(e);if(t.options.forceShell||r){const r=u.test(e);t.command=s.normalize(t.command);t.command=n.command(t.command);t.args=t.args.map((t=>n.argument(t,r)));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`];t.command=process.env.comspec||"cmd.exe";t.options.windowsVerbatimArguments=true}return t}function parse(t,e,r){if(e&&!Array.isArray(e)){r=e;e=null}e=e?e.slice(0):[];r=Object.assign({},r);const s={command:t,args:e,options:r,file:undefined,original:{command:t,args:e}};return r.shell?s:parseNonShell(s)}t.exports=parse},8902:t=>{"use strict";const e=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(t){t=t.replace(e,"^$1");return t}function escapeArgument(t,r){t=`${t}`;t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"');t=t.replace(/(?=(\\+?)?)\1$/,"$1$1");t=`"${t}"`;t=t.replace(e,"^$1");if(r){t=t.replace(e,"^$1")}return t}t.exports.command=escapeCommand;t.exports.argument=escapeArgument},2964:(t,e,r)=>{"use strict";const s=r(7147);const i=r(4970);function readShebang(t){const e=150;const r=Buffer.alloc(e);let n;try{n=s.openSync(t,"r");s.readSync(n,r,0,e,0);s.closeSync(n)}catch(t){}return i(r.toString())}t.exports=readShebang},7534:(t,e,r)=>{"use strict";const s=r(1017);const i=r(8201);const n=r(2170);function resolveCommandAttempt(t,e){const r=t.options.env||process.env;const o=process.cwd();const a=t.options.cwd!=null;const l=a&&process.chdir!==undefined&&!process.chdir.disabled;if(l){try{process.chdir(t.options.cwd)}catch(t){}}let u;try{u=i.sync(t.command,{path:r[n({env:r})],pathExt:e?s.delimiter:undefined})}catch(t){}finally{if(l){process.chdir(o)}}if(u){u=s.resolve(a?t.options.cwd:"",u)}return u}function resolveCommand(t){return resolveCommandAttempt(t)||resolveCommandAttempt(t,true)}t.exports=resolveCommand},5134:t=>{"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @description Recursive object extending
|
|
5
5
|
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
|
@@ -61,4 +61,4 @@ t.exports=runParallel;const s=r(3135);function runParallel(t,e){let r,i,n;let o=
|
|
|
61
61
|
*
|
|
62
62
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
63
63
|
* Released under the MIT License.
|
|
64
|
-
*/const s=r(6110);const toRegexRange=(t,e,r)=>{if(s(t)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(e===void 0||t===e){return String(t)}if(s(e)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let i={relaxZeros:true,...r};if(typeof i.strictZeros==="boolean"){i.relaxZeros=i.strictZeros===false}let n=String(i.relaxZeros);let o=String(i.shorthand);let a=String(i.capture);let l=String(i.wrap);let u=t+":"+e+"="+n+o+a+l;if(toRegexRange.cache.hasOwnProperty(u)){return toRegexRange.cache[u].result}let c=Math.min(t,e);let h=Math.max(t,e);if(Math.abs(c-h)===1){let r=t+"|"+e;if(i.capture){return`(${r})`}if(i.wrap===false){return r}return`(?:${r})`}let d=hasPadding(t)||hasPadding(e);let f={min:t,max:e,a:c,b:h};let p=[];let g=[];if(d){f.isPadded=d;f.maxLen=String(f.max).length}if(c<0){let t=h<0?Math.abs(h):1;g=splitToPatterns(t,Math.abs(c),f,i);c=f.a=0}if(h>=0){p=splitToPatterns(c,h,f,i)}f.negatives=g;f.positives=p;f.result=collatePatterns(g,p,i);if(i.capture===true){f.result=`(${f.result})`}else if(i.wrap!==false&&p.length+g.length>1){f.result=`(?:${f.result})`}toRegexRange.cache[u]=f;return f.result};function collatePatterns(t,e,r){let s=filterPatterns(t,e,"-",false,r)||[];let i=filterPatterns(e,t,"",false,r)||[];let n=filterPatterns(t,e,"-?",true,r)||[];let o=s.concat(n).concat(i);return o.join("|")}function splitToRanges(t,e){let r=1;let s=1;let i=countNines(t,r);let n=new Set([e]);while(t<=i&&i<=e){n.add(i);r+=1;i=countNines(t,r)}i=countZeros(e+1,s)-1;while(t<i&&i<=e){n.add(i);s+=1;i=countZeros(e+1,s)-1}n=[...n];n.sort(compare);return n}function rangeToPattern(t,e,r){if(t===e){return{pattern:t,count:[],digits:0}}let s=zip(t,e);let i=s.length;let n="";let o=0;for(let t=0;t<i;t++){let[e,i]=s[t];if(e===i){n+=e}else if(e!=="0"||i!=="9"){n+=toCharacterClass(e,i,r)}else{o++}}if(o){n+=r.shorthand===true?"\\d":"[0-9]"}return{pattern:n,count:[o],digits:i}}function splitToPatterns(t,e,r,s){let i=splitToRanges(t,e);let n=[];let o=t;let a;for(let t=0;t<i.length;t++){let e=i[t];let l=rangeToPattern(String(o),String(e),s);let u="";if(!r.isPadded&&a&&a.pattern===l.pattern){if(a.count.length>1){a.count.pop()}a.count.push(l.count[0]);a.string=a.pattern+toQuantifier(a.count);o=e+1;continue}if(r.isPadded){u=padZeros(e,r,s)}l.string=u+l.pattern+toQuantifier(l.count);n.push(l);o=e+1;a=l}return n}function filterPatterns(t,e,r,s,i){let n=[];for(let i of t){let{string:t}=i;if(!s&&!contains(e,"string",t)){n.push(r+t)}if(s&&contains(e,"string",t)){n.push(r+t)}}return n}function zip(t,e){let r=[];for(let s=0;s<t.length;s++)r.push([t[s],e[s]]);return r}function compare(t,e){return t>e?1:e>t?-1:0}function contains(t,e,r){return t.some((t=>t[e]===r))}function countNines(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function countZeros(t,e){return t-t%Math.pow(10,e)}function toQuantifier(t){let[e=0,r=""]=t;if(r||e>1){return`{${e+(r?","+r:"")}}`}return""}function toCharacterClass(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function hasPadding(t){return/^-?(0+)\d/.test(t)}function padZeros(t,e,r){if(!e.isPadded){return t}let s=Math.abs(e.maxLen-String(t).length);let i=r.relaxZeros!==false;switch(s){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:{return i?`0{0,${s}}`:`0{${s}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};t.exports=toRegexRange},5418:(t,e,r)=>{const{URL:s}=r(7310);const{join:i}=r(1017);const n=r(7147);const{promisify:o}=r(3837);const{tmpdir:a}=r(2037);const l=r(2447);const u=o(n.writeFile);const c=o(n.mkdir);const h=o(n.readFile);const compareVersions=(t,e)=>t.localeCompare(e,"en-US",{numeric:true});const encode=t=>encodeURIComponent(t).replace(/^%40/,"@");const getFile=async(t,e)=>{const r=a();const s=i(r,"update-check");if(!n.existsSync(s)){await c(s)}let o=`${t.name}-${e}.json`;if(t.scope){o=`${t.scope}-${o}`}return i(s,o)};const evaluateCache=async(t,e,r)=>{if(n.existsSync(t)){const s=await h(t,"utf8");const{lastUpdate:i,latest:n}=JSON.parse(s);const o=i+r;if(o>e){return{shouldCheck:false,latest:n}}}return{shouldCheck:true,latest:null}};const updateCache=async(t,e,r)=>{const s=JSON.stringify({latest:e,lastUpdate:r});await u(t,s,"utf8")};const loadPackage=(t,e)=>new Promise(((s,i)=>{const n={host:t.hostname,path:t.pathname,port:t.port,headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},timeout:2e3};if(e){n.headers.authorization=`${e.type} ${e.token}`}const{get:o}=r(t.protocol==="https:"?5687:3685);o(n,(t=>{const{statusCode:e}=t;if(e!==200){const r=new Error(`Request failed with code ${e}`);r.code=e;i(r);t.resume();return}let r="";t.setEncoding("utf8");t.on("data",(t=>{r+=t}));t.on("end",(()=>{try{const t=JSON.parse(r);s(t)}catch(t){i(t)}}))})).on("error",i).on("timeout",i)}));const getMostRecent=async({full:t,scope:e},i)=>{const n=l(e);const o=new s(t,n);let a=null;try{a=await loadPackage(o)}catch(t){if(t.code&&String(t.code).startsWith(4)){const t=r(1384);const e=t(n,{recursive:true});a=await loadPackage(o,e)}else{throw t}}const u=a["dist-tags"][i];if(!u){throw new Error(`Distribution tag ${i} is not available`)}return u};const d={interval:36e5,distTag:"latest"};const getDetails=t=>{const e={full:encode(t)};if(t.includes("/")){const r=t.split("/");e.scope=r[0];e.name=r[1]}else{e.scope=null;e.name=t}return e};t.exports=async(t,e)=>{if(typeof t!=="object"){throw new Error("The first parameter should be your package.json file content")}const r=getDetails(t.name);const s=Date.now();const{distTag:i,interval:n}=Object.assign({},d,e);const o=await getFile(r,i);let a=null;let l=true;({shouldCheck:l,latest:a}=await evaluateCache(o,s,n));if(l){a=await getMostRecent(r,i);await updateCache(o,a,s)}const u=compareVersions(t.version,a);if(u===-1){return{latest:a,fromCache:!l}}return null}},5880:(t,e,r)=>{"use strict";var s=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");var i=r(5462);var n=["node_modules","favicon.ico"];var o=t.exports=function(t){var e=[];var r=[];if(t===null){r.push("name cannot be null");return done(e,r)}if(t===undefined){r.push("name cannot be undefined");return done(e,r)}if(typeof t!=="string"){r.push("name must be a string");return done(e,r)}if(!t.length){r.push("name length must be greater than zero")}if(t.match(/^\./)){r.push("name cannot start with a period")}if(t.match(/^_/)){r.push("name cannot start with an underscore")}if(t.trim()!==t){r.push("name cannot contain leading or trailing spaces")}n.forEach((function(e){if(t.toLowerCase()===e){r.push(e+" is a blacklisted name")}}));i.forEach((function(r){if(t.toLowerCase()===r){e.push(r+" is a core module name")}}));if(t.length>214){e.push("name can no longer contain more than 214 characters")}if(t.toLowerCase()!==t){e.push("name can no longer contain capital letters")}if(/[~'!()*]/.test(t.split("/").slice(-1)[0])){e.push('name can no longer contain special characters ("~\'!()*")')}if(encodeURIComponent(t)!==t){var o=t.match(s);if(o){var a=o[1];var l=o[2];if(encodeURIComponent(a)===a&&encodeURIComponent(l)===l){return done(e,r)}}r.push("name can only contain URL-friendly characters")}return done(e,r)};o.scopedPackagePattern=s;var done=function(t,e){var r={validForNewPackages:e.length===0&&t.length===0,validForOldPackages:e.length===0,warnings:t,errors:e};if(!r.warnings.length)delete r.warnings;if(!r.errors.length)delete r.errors;return r}},8201:(t,e,r)=>{const s=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const i=r(1017);const n=s?";":":";const o=r(228);const getNotFoundError=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"});const getPathInfo=(t,e)=>{const r=e.colon||n;const i=t.match(/\//)||s&&t.match(/\\/)?[""]:[...s?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)];const o=s?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const a=s?o.split(r):[""];if(s){if(t.indexOf(".")!==-1&&a[0]!=="")a.unshift("")}return{pathEnv:i,pathExt:a,pathExtExe:o}};const which=(t,e,r)=>{if(typeof e==="function"){r=e;e={}}if(!e)e={};const{pathEnv:s,pathExt:n,pathExtExe:a}=getPathInfo(t,e);const l=[];const step=r=>new Promise(((n,o)=>{if(r===s.length)return e.all&&l.length?n(l):o(getNotFoundError(t));const a=s[r];const u=/^".*"$/.test(a)?a.slice(1,-1):a;const c=i.join(u,t);const h=!u&&/^\.[\\\/]/.test(t)?t.slice(0,2)+c:c;n(subStep(h,r,0))}));const subStep=(t,r,s)=>new Promise(((i,u)=>{if(s===n.length)return i(step(r+1));const c=n[s];o(t+c,{pathExt:a},((n,o)=>{if(!n&&o){if(e.all)l.push(t+c);else return i(t+c)}return i(subStep(t,r,s+1))}))}));return r?step(0).then((t=>r(null,t)),r):step(0)};const whichSync=(t,e)=>{e=e||{};const{pathEnv:r,pathExt:s,pathExtExe:n}=getPathInfo(t,e);const a=[];for(let l=0;l<r.length;l++){const u=r[l];const c=/^".*"$/.test(u)?u.slice(1,-1):u;const h=i.join(c,t);const d=!c&&/^\.[\\\/]/.test(t)?t.slice(0,2)+h:h;for(let t=0;t<s.length;t++){const r=d+s[t];try{const t=o.sync(r,{pathExt:n});if(t){if(e.all)a.push(r);else return r}}catch(t){}}}if(e.all&&a.length)return a;if(e.nothrow)return null;throw getNotFoundError(t)};t.exports=which;which.sync=whichSync},7019:(t,e,r)=>{"use strict";r.r(e);var s=r(9397);var i=r(8018);var n=r.n(i);var o=r(1017);var a=r.n(o);var l=r(1112);var u=r.n(l);var c=r(5418);var h=r.n(c);var d=r(7147);var f=r.n(d);function makeDir(t,e={recursive:true}){return f().promises.mkdir(t,e)}var p=r(2081);function isInGitRepository(){try{(0,p.execSync)("git rev-parse --is-inside-work-tree",{stdio:"ignore"});return true}catch(t){}return false}function isInMercurialRepository(){try{(0,p.execSync)("hg --cwd . root",{stdio:"ignore"});return true}catch(t){}return false}function isDefaultBranchSet(){try{(0,p.execSync)("git config init.defaultBranch",{stdio:"ignore"});return true}catch(t){}return false}function tryGitInit(t){let e=false;try{(0,p.execSync)("git --version",{stdio:"ignore"});if(isInGitRepository()||isInMercurialRepository()){return false}(0,p.execSync)("git init",{stdio:"ignore"});e=true;if(!isDefaultBranchSet()){(0,p.execSync)("git checkout -b main",{stdio:"ignore"})}(0,p.execSync)("git add -A",{stdio:"ignore"});(0,p.execSync)('git commit -m "Initial commit from Create Next App"',{stdio:"ignore"});return true}catch(r){if(e){try{f().rmSync(a().join(t,".git"),{recursive:true,force:true})}catch(t){}}return false}}function isFolderEmpty(t,e){const r=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"];const i=f().readdirSync(t).filter((t=>!r.includes(t))).filter((t=>!/\.iml$/.test(t)));if(i.length>0){console.log(`The directory ${(0,s.green)(e)} contains files that could conflict:`);console.log();for(const e of i){try{const r=f().lstatSync(a().join(t,e));if(r.isDirectory()){console.log(` ${(0,s.blue)(e)}/`)}else{console.log(` ${e}`)}}catch{console.log(` ${e}`)}}console.log();console.log("Either try using a new directory name, or remove the files listed above.");console.log();return false}return true}async function isWriteable(t){try{await f().promises.access(t,(f().constants||f()).W_OK);return true}catch(t){return false}}var g=r(7987);var m=r.n(g);async function install(t){let e=["install"];return new Promise(((r,s)=>{const i=m()(t,e,{stdio:"inherit",env:{...process.env,ADBLOCK:"1",NODE_ENV:"development",DISABLE_OPENCOLLECTIVE:"1"}});i.on("close",(i=>{if(i!==0){s({command:`${t} ${e.join(" ")}`});return}r()}))}))}var y=r(3909);const identity=t=>t;const copy=async(t,e,{cwd:r,rename:s=identity,parents:i=true}={})=>{const n=typeof t==="string"?[t]:t;if(n.length===0||!e){throw new TypeError("`src` and `dest` are required")}const o=await(0,y.async)(n,{cwd:r,dot:true,absolute:false,stats:false});const l=r?a().resolve(r,e):e;return Promise.all(o.map((async t=>{const e=a().dirname(t);const n=s(a().basename(t));const o=r?a().resolve(r,t):t;const u=i?a().join(l,e,n):a().join(l,n);await f().promises.mkdir(a().dirname(u),{recursive:true});return f().promises.copyFile(o,u)})))};var v=r(2037);var b=r.n(v);const _=require("fs/promises");var S=r.n(_);const w=JSON.parse('{"name":"create-xmlui-app","version":"0.7.7","scripts":{"dev":"mkdir -p dist && cp -r templates/default dist/ && ncc build ./index.ts -w -o dist/","build":"ncc build ./index.ts -o dist/ --minify --no-cache --no-source-map-register && cp -r templates/default dist/","prepublishOnly":"npm run build"},"bin":{"create-xmlui-app":"./dist/index.js"},"files":["dist"],"devDependencies":{"@types/cross-spawn":"6.0.0","@types/node":"^20.2.5","@types/prompts":"2.0.1","@types/validate-npm-package-name":"3.0.0","@vercel/ncc":"0.34.0","fast-glob":"3.3.1","commander":"2.20.0","cross-spawn":"7.0.3","picocolors":"1.0.0","prompts":"2.1.0","update-check":"1.5.4","validate-npm-package-name":"3.0.0"},"engines":{"node":">=18.12.0"},"repository":{"url":"https://github.com/xmlui-com/xmlui.git"}}');const installTemplate=async({appName:t,root:e,packageManager:r,template:i,useGit:n})=>{console.log((0,s.bold)(`Using ${r}.`));console.log("\nInitializing project with template:",i,"\n");const o=a().join(__dirname,i,"ts");const l=["**"];if(!n){l.push("!gitignore")}await copy(l,e,{parents:true,cwd:o,rename(t){switch(t){case"gitignore":case"eslintrc.json":{return`.${t}`}case"README-template.md":{return"README.md"}default:{return t}}}});const u={name:t,version:"0.1.0",private:true,scripts:{start:"xmlui start",build:"xmlui build",preview:"xmlui preview","build-prod":"npm run build -- --prod","release-ci":"npm run build-prod && xmlui zip-dist"},dependencies:{xmlui:w.version}};await S().writeFile(a().join(e,"package.json"),JSON.stringify(u,null,2)+b().EOL);console.log("\nInstalling dependencies:");for(const t in u.dependencies)console.log(`- ${(0,s.cyan)(t)}`);console.log();await install(r)};async function createApp({appPath:t,packageManager:e,useGit:r}){const i="default";const n=a().resolve(t);if(!await isWriteable(a().dirname(n))){console.error("The application path is not writable, please check folder permissions and try again.");console.error("It is likely you do not have write permissions for this folder.");process.exit(1)}const o=a().basename(n);await makeDir(n);if(!isFolderEmpty(n,o)){process.exit(1)}console.log(`Creating a new UI Engine app in ${(0,s.green)(n)}.`);console.log();process.chdir(n);await installTemplate({appName:o,root:n,template:i,packageManager:e,useGit:r});if(r&&tryGitInit(n)){console.log("Initialized a git repository.");console.log()}console.log(`${(0,s.green)("Success!")} Created ${o} at ${t}`);console.log()}var x=r(5880);var P=r.n(x);function validateNpmName(t){const e=P()(t);if(e.validForNewPackages){return{valid:true}}return{valid:false,problems:[...e.errors||[],...e.warnings||[]]}}let E="";const handleSigTerm=()=>process.exit(0);process.on("SIGINT",handleSigTerm);process.on("SIGTERM",handleSigTerm);const onPromptState=t=>{if(t.aborted){process.stdout.write("[?25h");process.stdout.write("\n");process.exit(1)}};const A=new(n().Command)(w.name).version(w.version).arguments("<project-directory>").usage(`${(0,s.green)("<project-directory>")} [options]`).action((t=>{E=t})).option("--use-git",`Explicitly tell the CLI to initialize a git repository`).allowUnknownOption().parse(process.argv);const C="npm";async function run(){if(typeof E==="string"){E=E.trim()}if(!E){const t=await u()({onState:onPromptState,type:"text",name:"path",message:"What is your project named?",initial:"my-app",validate:t=>{const e=validateNpmName(a().basename(a().resolve(t)));if(e.valid){return true}return"Invalid project name: "+e.problems[0]}});if(typeof t.path==="string"){E=t.path.trim()}}if(!E){console.log("\nPlease specify the project directory:\n"+` ${(0,s.cyan)(A.name())} ${(0,s.green)("<project-directory>")}\n`+"For example:\n"+` ${(0,s.cyan)(A.name())} ${(0,s.green)("my-xmlui-app")}\n\n`+`Run ${(0,s.cyan)(`${A.name()} --help`)} to see all options.`);process.exit(1)}const t=a().resolve(E);const e=a().basename(t);const{valid:r,problems:i}=validateNpmName(e);if(!r){console.error(`Could not create a project called ${(0,s.red)(`"${e}"`)} because of npm naming restrictions:`);i.forEach((t=>console.error(` ${(0,s.red)((0,s.bold)("*"))} ${t}`)));process.exit(1)}const n=a().resolve(t);const o=a().basename(n);const l=f().existsSync(n);if(l&&!isFolderEmpty(n,o)){process.exit(1)}if(A.useGit===undefined){const{useGit:t}=await u()({type:"toggle",name:"useGit",message:`Would you like to initialize a git repository?`,initial:false,active:"Yes",inactive:"No"},{onCancel:()=>{console.error("Exiting.");process.exit(1)}});A.useGit=Boolean(t)}await createApp({appPath:t,packageManager:C,useGit:!!A.useGit})}const R=h()(w).catch((()=>null));async function notifyUpdate(){try{const t=await R;if(t===null||t===void 0?void 0:t.latest){const t="npm i -g create-xmlui-app";console.log((0,s.yellow)((0,s.bold)("A new version of `create-xmlui-app` is available!"))+"\n"+"You can update by running: "+(0,s.cyan)(t)+"\n")}process.exit()}catch{}}run().then(notifyUpdate).catch((async t=>{console.log();console.log("Aborting installation.");if(t.command){console.log(` ${(0,s.cyan)(t.command)} has failed.`)}else{console.log((0,s.red)("Unexpected error. Please report it as a bug:")+"\n",t)}console.log();await notifyUpdate();process.exit(1)}))},4300:t=>{"use strict";t.exports=require("buffer")},2081:t=>{"use strict";t.exports=require("child_process")},2361:t=>{"use strict";t.exports=require("events")},7147:t=>{"use strict";t.exports=require("fs")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},2037:t=>{"use strict";t.exports=require("os")},1017:t=>{"use strict";t.exports=require("path")},4521:t=>{"use strict";t.exports=require("readline")},2781:t=>{"use strict";t.exports=require("stream")},6224:t=>{"use strict";t.exports=require("tty")},7310:t=>{"use strict";t.exports=require("url")},3837:t=>{"use strict";t.exports=require("util")},5462:t=>{"use strict";t.exports=JSON.parse('["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"]')}};var e={};function __nccwpck_require__(r){var s=e[r];if(s!==undefined){return s.exports}var i=e[r]={exports:{}};var n=true;try{t[r](i,i.exports,__nccwpck_require__);n=false}finally{if(n)delete e[r]}return i.exports}(()=>{__nccwpck_require__.n=t=>{var e=t&&t.__esModule?()=>t["default"]:()=>t;__nccwpck_require__.d(e,{a:e});return e}})();(()=>{__nccwpck_require__.d=(t,e)=>{for(var r in e){if(__nccwpck_require__.o(e,r)&&!__nccwpck_require__.o(t,r)){Object.defineProperty(t,r,{enumerable:true,get:e[r]})}}}})();(()=>{__nccwpck_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(7019);module.exports=r})();
|
|
64
|
+
*/const s=r(6110);const toRegexRange=(t,e,r)=>{if(s(t)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(e===void 0||t===e){return String(t)}if(s(e)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let i={relaxZeros:true,...r};if(typeof i.strictZeros==="boolean"){i.relaxZeros=i.strictZeros===false}let n=String(i.relaxZeros);let o=String(i.shorthand);let a=String(i.capture);let l=String(i.wrap);let u=t+":"+e+"="+n+o+a+l;if(toRegexRange.cache.hasOwnProperty(u)){return toRegexRange.cache[u].result}let c=Math.min(t,e);let h=Math.max(t,e);if(Math.abs(c-h)===1){let r=t+"|"+e;if(i.capture){return`(${r})`}if(i.wrap===false){return r}return`(?:${r})`}let d=hasPadding(t)||hasPadding(e);let f={min:t,max:e,a:c,b:h};let p=[];let g=[];if(d){f.isPadded=d;f.maxLen=String(f.max).length}if(c<0){let t=h<0?Math.abs(h):1;g=splitToPatterns(t,Math.abs(c),f,i);c=f.a=0}if(h>=0){p=splitToPatterns(c,h,f,i)}f.negatives=g;f.positives=p;f.result=collatePatterns(g,p,i);if(i.capture===true){f.result=`(${f.result})`}else if(i.wrap!==false&&p.length+g.length>1){f.result=`(?:${f.result})`}toRegexRange.cache[u]=f;return f.result};function collatePatterns(t,e,r){let s=filterPatterns(t,e,"-",false,r)||[];let i=filterPatterns(e,t,"",false,r)||[];let n=filterPatterns(t,e,"-?",true,r)||[];let o=s.concat(n).concat(i);return o.join("|")}function splitToRanges(t,e){let r=1;let s=1;let i=countNines(t,r);let n=new Set([e]);while(t<=i&&i<=e){n.add(i);r+=1;i=countNines(t,r)}i=countZeros(e+1,s)-1;while(t<i&&i<=e){n.add(i);s+=1;i=countZeros(e+1,s)-1}n=[...n];n.sort(compare);return n}function rangeToPattern(t,e,r){if(t===e){return{pattern:t,count:[],digits:0}}let s=zip(t,e);let i=s.length;let n="";let o=0;for(let t=0;t<i;t++){let[e,i]=s[t];if(e===i){n+=e}else if(e!=="0"||i!=="9"){n+=toCharacterClass(e,i,r)}else{o++}}if(o){n+=r.shorthand===true?"\\d":"[0-9]"}return{pattern:n,count:[o],digits:i}}function splitToPatterns(t,e,r,s){let i=splitToRanges(t,e);let n=[];let o=t;let a;for(let t=0;t<i.length;t++){let e=i[t];let l=rangeToPattern(String(o),String(e),s);let u="";if(!r.isPadded&&a&&a.pattern===l.pattern){if(a.count.length>1){a.count.pop()}a.count.push(l.count[0]);a.string=a.pattern+toQuantifier(a.count);o=e+1;continue}if(r.isPadded){u=padZeros(e,r,s)}l.string=u+l.pattern+toQuantifier(l.count);n.push(l);o=e+1;a=l}return n}function filterPatterns(t,e,r,s,i){let n=[];for(let i of t){let{string:t}=i;if(!s&&!contains(e,"string",t)){n.push(r+t)}if(s&&contains(e,"string",t)){n.push(r+t)}}return n}function zip(t,e){let r=[];for(let s=0;s<t.length;s++)r.push([t[s],e[s]]);return r}function compare(t,e){return t>e?1:e>t?-1:0}function contains(t,e,r){return t.some((t=>t[e]===r))}function countNines(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function countZeros(t,e){return t-t%Math.pow(10,e)}function toQuantifier(t){let[e=0,r=""]=t;if(r||e>1){return`{${e+(r?","+r:"")}}`}return""}function toCharacterClass(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function hasPadding(t){return/^-?(0+)\d/.test(t)}function padZeros(t,e,r){if(!e.isPadded){return t}let s=Math.abs(e.maxLen-String(t).length);let i=r.relaxZeros!==false;switch(s){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:{return i?`0{0,${s}}`:`0{${s}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};t.exports=toRegexRange},5418:(t,e,r)=>{const{URL:s}=r(7310);const{join:i}=r(1017);const n=r(7147);const{promisify:o}=r(3837);const{tmpdir:a}=r(2037);const l=r(2447);const u=o(n.writeFile);const c=o(n.mkdir);const h=o(n.readFile);const compareVersions=(t,e)=>t.localeCompare(e,"en-US",{numeric:true});const encode=t=>encodeURIComponent(t).replace(/^%40/,"@");const getFile=async(t,e)=>{const r=a();const s=i(r,"update-check");if(!n.existsSync(s)){await c(s)}let o=`${t.name}-${e}.json`;if(t.scope){o=`${t.scope}-${o}`}return i(s,o)};const evaluateCache=async(t,e,r)=>{if(n.existsSync(t)){const s=await h(t,"utf8");const{lastUpdate:i,latest:n}=JSON.parse(s);const o=i+r;if(o>e){return{shouldCheck:false,latest:n}}}return{shouldCheck:true,latest:null}};const updateCache=async(t,e,r)=>{const s=JSON.stringify({latest:e,lastUpdate:r});await u(t,s,"utf8")};const loadPackage=(t,e)=>new Promise(((s,i)=>{const n={host:t.hostname,path:t.pathname,port:t.port,headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},timeout:2e3};if(e){n.headers.authorization=`${e.type} ${e.token}`}const{get:o}=r(t.protocol==="https:"?5687:3685);o(n,(t=>{const{statusCode:e}=t;if(e!==200){const r=new Error(`Request failed with code ${e}`);r.code=e;i(r);t.resume();return}let r="";t.setEncoding("utf8");t.on("data",(t=>{r+=t}));t.on("end",(()=>{try{const t=JSON.parse(r);s(t)}catch(t){i(t)}}))})).on("error",i).on("timeout",i)}));const getMostRecent=async({full:t,scope:e},i)=>{const n=l(e);const o=new s(t,n);let a=null;try{a=await loadPackage(o)}catch(t){if(t.code&&String(t.code).startsWith(4)){const t=r(1384);const e=t(n,{recursive:true});a=await loadPackage(o,e)}else{throw t}}const u=a["dist-tags"][i];if(!u){throw new Error(`Distribution tag ${i} is not available`)}return u};const d={interval:36e5,distTag:"latest"};const getDetails=t=>{const e={full:encode(t)};if(t.includes("/")){const r=t.split("/");e.scope=r[0];e.name=r[1]}else{e.scope=null;e.name=t}return e};t.exports=async(t,e)=>{if(typeof t!=="object"){throw new Error("The first parameter should be your package.json file content")}const r=getDetails(t.name);const s=Date.now();const{distTag:i,interval:n}=Object.assign({},d,e);const o=await getFile(r,i);let a=null;let l=true;({shouldCheck:l,latest:a}=await evaluateCache(o,s,n));if(l){a=await getMostRecent(r,i);await updateCache(o,a,s)}const u=compareVersions(t.version,a);if(u===-1){return{latest:a,fromCache:!l}}return null}},5880:(t,e,r)=>{"use strict";var s=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");var i=r(5462);var n=["node_modules","favicon.ico"];var o=t.exports=function(t){var e=[];var r=[];if(t===null){r.push("name cannot be null");return done(e,r)}if(t===undefined){r.push("name cannot be undefined");return done(e,r)}if(typeof t!=="string"){r.push("name must be a string");return done(e,r)}if(!t.length){r.push("name length must be greater than zero")}if(t.match(/^\./)){r.push("name cannot start with a period")}if(t.match(/^_/)){r.push("name cannot start with an underscore")}if(t.trim()!==t){r.push("name cannot contain leading or trailing spaces")}n.forEach((function(e){if(t.toLowerCase()===e){r.push(e+" is a blacklisted name")}}));i.forEach((function(r){if(t.toLowerCase()===r){e.push(r+" is a core module name")}}));if(t.length>214){e.push("name can no longer contain more than 214 characters")}if(t.toLowerCase()!==t){e.push("name can no longer contain capital letters")}if(/[~'!()*]/.test(t.split("/").slice(-1)[0])){e.push('name can no longer contain special characters ("~\'!()*")')}if(encodeURIComponent(t)!==t){var o=t.match(s);if(o){var a=o[1];var l=o[2];if(encodeURIComponent(a)===a&&encodeURIComponent(l)===l){return done(e,r)}}r.push("name can only contain URL-friendly characters")}return done(e,r)};o.scopedPackagePattern=s;var done=function(t,e){var r={validForNewPackages:e.length===0&&t.length===0,validForOldPackages:e.length===0,warnings:t,errors:e};if(!r.warnings.length)delete r.warnings;if(!r.errors.length)delete r.errors;return r}},8201:(t,e,r)=>{const s=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const i=r(1017);const n=s?";":":";const o=r(228);const getNotFoundError=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"});const getPathInfo=(t,e)=>{const r=e.colon||n;const i=t.match(/\//)||s&&t.match(/\\/)?[""]:[...s?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)];const o=s?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const a=s?o.split(r):[""];if(s){if(t.indexOf(".")!==-1&&a[0]!=="")a.unshift("")}return{pathEnv:i,pathExt:a,pathExtExe:o}};const which=(t,e,r)=>{if(typeof e==="function"){r=e;e={}}if(!e)e={};const{pathEnv:s,pathExt:n,pathExtExe:a}=getPathInfo(t,e);const l=[];const step=r=>new Promise(((n,o)=>{if(r===s.length)return e.all&&l.length?n(l):o(getNotFoundError(t));const a=s[r];const u=/^".*"$/.test(a)?a.slice(1,-1):a;const c=i.join(u,t);const h=!u&&/^\.[\\\/]/.test(t)?t.slice(0,2)+c:c;n(subStep(h,r,0))}));const subStep=(t,r,s)=>new Promise(((i,u)=>{if(s===n.length)return i(step(r+1));const c=n[s];o(t+c,{pathExt:a},((n,o)=>{if(!n&&o){if(e.all)l.push(t+c);else return i(t+c)}return i(subStep(t,r,s+1))}))}));return r?step(0).then((t=>r(null,t)),r):step(0)};const whichSync=(t,e)=>{e=e||{};const{pathEnv:r,pathExt:s,pathExtExe:n}=getPathInfo(t,e);const a=[];for(let l=0;l<r.length;l++){const u=r[l];const c=/^".*"$/.test(u)?u.slice(1,-1):u;const h=i.join(c,t);const d=!c&&/^\.[\\\/]/.test(t)?t.slice(0,2)+h:h;for(let t=0;t<s.length;t++){const r=d+s[t];try{const t=o.sync(r,{pathExt:n});if(t){if(e.all)a.push(r);else return r}}catch(t){}}}if(e.all&&a.length)return a;if(e.nothrow)return null;throw getNotFoundError(t)};t.exports=which;which.sync=whichSync},7019:(t,e,r)=>{"use strict";r.r(e);var s=r(9397);var i=r(8018);var n=r.n(i);var o=r(1017);var a=r.n(o);var l=r(1112);var u=r.n(l);var c=r(5418);var h=r.n(c);var d=r(7147);var f=r.n(d);function makeDir(t,e={recursive:true}){return f().promises.mkdir(t,e)}var p=r(2081);function isInGitRepository(){try{(0,p.execSync)("git rev-parse --is-inside-work-tree",{stdio:"ignore"});return true}catch(t){}return false}function isInMercurialRepository(){try{(0,p.execSync)("hg --cwd . root",{stdio:"ignore"});return true}catch(t){}return false}function isDefaultBranchSet(){try{(0,p.execSync)("git config init.defaultBranch",{stdio:"ignore"});return true}catch(t){}return false}function tryGitInit(t){let e=false;try{(0,p.execSync)("git --version",{stdio:"ignore"});if(isInGitRepository()||isInMercurialRepository()){return false}(0,p.execSync)("git init",{stdio:"ignore"});e=true;if(!isDefaultBranchSet()){(0,p.execSync)("git checkout -b main",{stdio:"ignore"})}(0,p.execSync)("git add -A",{stdio:"ignore"});(0,p.execSync)('git commit -m "Initial commit from Create Next App"',{stdio:"ignore"});return true}catch(r){if(e){try{f().rmSync(a().join(t,".git"),{recursive:true,force:true})}catch(t){}}return false}}function isFolderEmpty(t,e){const r=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"];const i=f().readdirSync(t).filter((t=>!r.includes(t))).filter((t=>!/\.iml$/.test(t)));if(i.length>0){console.log(`The directory ${(0,s.green)(e)} contains files that could conflict:`);console.log();for(const e of i){try{const r=f().lstatSync(a().join(t,e));if(r.isDirectory()){console.log(` ${(0,s.blue)(e)}/`)}else{console.log(` ${e}`)}}catch{console.log(` ${e}`)}}console.log();console.log("Either try using a new directory name, or remove the files listed above.");console.log();return false}return true}async function isWriteable(t){try{await f().promises.access(t,(f().constants||f()).W_OK);return true}catch(t){return false}}var g=r(7987);var m=r.n(g);async function install(t){let e=["install"];return new Promise(((r,s)=>{const i=m()(t,e,{stdio:"inherit",env:{...process.env,ADBLOCK:"1",NODE_ENV:"development",DISABLE_OPENCOLLECTIVE:"1"}});i.on("close",(i=>{if(i!==0){s({command:`${t} ${e.join(" ")}`});return}r()}))}))}var y=r(3909);const identity=t=>t;const copy=async(t,e,{cwd:r,rename:s=identity,parents:i=true}={})=>{const n=typeof t==="string"?[t]:t;if(n.length===0||!e){throw new TypeError("`src` and `dest` are required")}const o=await(0,y.async)(n,{cwd:r,dot:true,absolute:false,stats:false});const l=r?a().resolve(r,e):e;return Promise.all(o.map((async t=>{const e=a().dirname(t);const n=s(a().basename(t));const o=r?a().resolve(r,t):t;const u=i?a().join(l,e,n):a().join(l,n);await f().promises.mkdir(a().dirname(u),{recursive:true});return f().promises.copyFile(o,u)})))};var v=r(2037);var b=r.n(v);const _=require("fs/promises");var S=r.n(_);const w=JSON.parse('{"name":"create-xmlui-app","version":"0.7.9","scripts":{"dev":"mkdir -p dist && cp -r templates/default dist/ && ncc build ./index.ts -w -o dist/","build":"ncc build ./index.ts -o dist/ --minify --no-cache --no-source-map-register && cp -r templates/default dist/","prepublishOnly":"npm run build"},"bin":{"create-xmlui-app":"./dist/index.js"},"files":["dist"],"devDependencies":{"@types/cross-spawn":"6.0.0","@types/node":"^20.2.5","@types/prompts":"2.0.1","@types/validate-npm-package-name":"3.0.0","@vercel/ncc":"0.34.0","fast-glob":"3.3.1","commander":"2.20.0","cross-spawn":"7.0.5","picocolors":"1.0.0","prompts":"2.1.0","update-check":"1.5.4","validate-npm-package-name":"3.0.0"},"engines":{"node":">=18.12.0"},"repository":{"url":"https://github.com/xmlui-com/xmlui.git"}}');const installTemplate=async({appName:t,root:e,packageManager:r,template:i,useGit:n})=>{console.log((0,s.bold)(`Using ${r}.`));console.log("\nInitializing project with template:",i,"\n");const o=a().join(__dirname,i,"ts");const l=["**"];if(!n){l.push("!gitignore")}await copy(l,e,{parents:true,cwd:o,rename(t){switch(t){case"gitignore":case"eslintrc.json":{return`.${t}`}case"README-template.md":{return"README.md"}default:{return t}}}});const u={name:t,version:"0.1.0",private:true,scripts:{start:"xmlui start",build:"xmlui build",preview:"xmlui preview","build-prod":"npm run build -- --prod","release-ci":"npm run build-prod && xmlui zip-dist"},dependencies:{xmlui:w.version}};await S().writeFile(a().join(e,"package.json"),JSON.stringify(u,null,2)+b().EOL);console.log("\nInstalling dependencies:");for(const t in u.dependencies)console.log(`- ${(0,s.cyan)(t)}`);console.log();await install(r)};async function createApp({appPath:t,packageManager:e,useGit:r}){const i="default";const n=a().resolve(t);if(!await isWriteable(a().dirname(n))){console.error("The application path is not writable, please check folder permissions and try again.");console.error("It is likely you do not have write permissions for this folder.");process.exit(1)}const o=a().basename(n);await makeDir(n);if(!isFolderEmpty(n,o)){process.exit(1)}console.log(`Creating a new UI Engine app in ${(0,s.green)(n)}.`);console.log();process.chdir(n);await installTemplate({appName:o,root:n,template:i,packageManager:e,useGit:r});if(r&&tryGitInit(n)){console.log("Initialized a git repository.");console.log()}console.log(`${(0,s.green)("Success!")} Created ${o} at ${t}`);console.log()}var x=r(5880);var P=r.n(x);function validateNpmName(t){const e=P()(t);if(e.validForNewPackages){return{valid:true}}return{valid:false,problems:[...e.errors||[],...e.warnings||[]]}}let E="";const handleSigTerm=()=>process.exit(0);process.on("SIGINT",handleSigTerm);process.on("SIGTERM",handleSigTerm);const onPromptState=t=>{if(t.aborted){process.stdout.write("[?25h");process.stdout.write("\n");process.exit(1)}};const A=new(n().Command)(w.name).version(w.version).arguments("<project-directory>").usage(`${(0,s.green)("<project-directory>")} [options]`).action((t=>{E=t})).option("--use-git",`Explicitly tell the CLI to initialize a git repository`).allowUnknownOption().parse(process.argv);const C="npm";async function run(){if(typeof E==="string"){E=E.trim()}if(!E){const t=await u()({onState:onPromptState,type:"text",name:"path",message:"What is your project named?",initial:"my-app",validate:t=>{const e=validateNpmName(a().basename(a().resolve(t)));if(e.valid){return true}return"Invalid project name: "+e.problems[0]}});if(typeof t.path==="string"){E=t.path.trim()}}if(!E){console.log("\nPlease specify the project directory:\n"+` ${(0,s.cyan)(A.name())} ${(0,s.green)("<project-directory>")}\n`+"For example:\n"+` ${(0,s.cyan)(A.name())} ${(0,s.green)("my-xmlui-app")}\n\n`+`Run ${(0,s.cyan)(`${A.name()} --help`)} to see all options.`);process.exit(1)}const t=a().resolve(E);const e=a().basename(t);const{valid:r,problems:i}=validateNpmName(e);if(!r){console.error(`Could not create a project called ${(0,s.red)(`"${e}"`)} because of npm naming restrictions:`);i.forEach((t=>console.error(` ${(0,s.red)((0,s.bold)("*"))} ${t}`)));process.exit(1)}const n=a().resolve(t);const o=a().basename(n);const l=f().existsSync(n);if(l&&!isFolderEmpty(n,o)){process.exit(1)}if(A.useGit===undefined){const{useGit:t}=await u()({type:"toggle",name:"useGit",message:`Would you like to initialize a git repository?`,initial:false,active:"Yes",inactive:"No"},{onCancel:()=>{console.error("Exiting.");process.exit(1)}});A.useGit=Boolean(t)}await createApp({appPath:t,packageManager:C,useGit:!!A.useGit})}const R=h()(w).catch((()=>null));async function notifyUpdate(){try{const t=await R;if(t===null||t===void 0?void 0:t.latest){const t="npm i -g create-xmlui-app";console.log((0,s.yellow)((0,s.bold)("A new version of `create-xmlui-app` is available!"))+"\n"+"You can update by running: "+(0,s.cyan)(t)+"\n")}process.exit()}catch{}}run().then(notifyUpdate).catch((async t=>{console.log();console.log("Aborting installation.");if(t.command){console.log(` ${(0,s.cyan)(t.command)} has failed.`)}else{console.log((0,s.red)("Unexpected error. Please report it as a bug:")+"\n",t)}console.log();await notifyUpdate();process.exit(1)}))},4300:t=>{"use strict";t.exports=require("buffer")},2081:t=>{"use strict";t.exports=require("child_process")},2361:t=>{"use strict";t.exports=require("events")},7147:t=>{"use strict";t.exports=require("fs")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},2037:t=>{"use strict";t.exports=require("os")},1017:t=>{"use strict";t.exports=require("path")},4521:t=>{"use strict";t.exports=require("readline")},2781:t=>{"use strict";t.exports=require("stream")},6224:t=>{"use strict";t.exports=require("tty")},7310:t=>{"use strict";t.exports=require("url")},3837:t=>{"use strict";t.exports=require("util")},5462:t=>{"use strict";t.exports=JSON.parse('["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"]')}};var e={};function __nccwpck_require__(r){var s=e[r];if(s!==undefined){return s.exports}var i=e[r]={exports:{}};var n=true;try{t[r](i,i.exports,__nccwpck_require__);n=false}finally{if(n)delete e[r]}return i.exports}(()=>{__nccwpck_require__.n=t=>{var e=t&&t.__esModule?()=>t["default"]:()=>t;__nccwpck_require__.d(e,{a:e});return e}})();(()=>{__nccwpck_require__.d=(t,e)=>{for(var r in e){if(__nccwpck_require__.o(e,r)&&!__nccwpck_require__.o(t,r)){Object.defineProperty(t,r,{enumerable:true,get:e[r]})}}}})();(()=>{__nccwpck_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(7019);module.exports=r})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-xmlui-app",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.9",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "mkdir -p dist && cp -r templates/default dist/ && ncc build ./index.ts -w -o dist/",
|
|
6
6
|
"build": "ncc build ./index.ts -o dist/ --minify --no-cache --no-source-map-register && cp -r templates/default dist/",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@vercel/ncc": "0.34.0",
|
|
21
21
|
"fast-glob": "3.3.1",
|
|
22
22
|
"commander": "2.20.0",
|
|
23
|
-
"cross-spawn": "7.0.
|
|
23
|
+
"cross-spawn": "7.0.5",
|
|
24
24
|
"picocolors": "1.0.0",
|
|
25
25
|
"prompts": "2.1.0",
|
|
26
26
|
"update-check": "1.5.4",
|