@vscode/test-web 0.0.74 → 0.0.76
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/fs-provider/dist/fsExtensionMain.js +292 -269
- package/fs-provider/package-lock.json +137 -95
- package/fs-provider/package.json +3 -3
- package/out/server/download.js +44 -31
- package/out/server/extensions.js +10 -1
- package/out/server/index.js +57 -48
- package/package.json +14 -14
|
@@ -236,7 +236,8 @@ exports.MemFileSystemProvider = MemFileSystemProvider;
|
|
|
236
236
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
237
237
|
|
|
238
238
|
/* provided dependency */ var process = __webpack_require__(5);
|
|
239
|
-
!function(t,e){if(true)module.exports=e();else { var n, r; }}(this,(()=>(()=>{"use strict";var t={975:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",i=0,o=-1,s=0,a=0;a<=t.length;++a){if(a<t.length)r=t.charCodeAt(a);else{if(47===r)break;r=47}if(47===r){if(o===a-1||1===s);else if(o!==a-1&&2===s){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var h=n.lastIndexOf("/");if(h!==n.length-1){-1===h?(n="",i=0):i=(n=n.slice(0,h)).length-1-n.lastIndexOf("/"),o=a,s=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=a,s=0;continue}e&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+t.slice(o+1,a):n=t.slice(o+1,a),i=a-o-1;o=a,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var t,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s;o>=0?s=arguments[o]:(void 0===t&&(t=process.cwd()),s=t),e(s),0!==s.length&&(n=s+"/"+n,i=47===s.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return".";var n=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&i&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,r=0;r<arguments.length;++r){var i=arguments[r];e(i),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return"";if((t=n.resolve(t))===(r=n.resolve(r)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var o=t.length,s=o-i,a=1;a<r.length&&47===r.charCodeAt(a);++a);for(var h=r.length-a,c=s<h?s:h,f=-1,u=0;u<=c;++u){if(u===c){if(h>c){if(47===r.charCodeAt(a+u))return r.slice(a+u+1);if(0===u)return r.slice(a+u)}else s>c&&(47===t.charCodeAt(i+u)?f=u:0===u&&(f=0));break}var l=t.charCodeAt(i+u);if(l!==r.charCodeAt(a+u))break;47===l&&(f=u)}var d="";for(u=i+f+1;u<=o;++u)u!==o&&47!==t.charCodeAt(u)||(0===d.length?d+="..":d+="/..");return d.length>0?d+r.slice(a+f):(a+=f,47===r.charCodeAt(a)&&++a,r.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,i=-1,o=!0,s=t.length-1;s>=1;--s)if(47===(r=t.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,i=0,o=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var a=r.length-1,h=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!s){i=n+1;break}}else-1===h&&(s=!1,h=n+1),a>=0&&(c===r.charCodeAt(a)?-1==--a&&(o=n):(a=-1,o=h))}return i===o?o=h:-1===o&&(o=t.length),t.slice(i,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!s){i=n+1;break}}else-1===o&&(s=!1,o=n+1);return-1===o?"":t.slice(i,o)},extname:function(t){e(t);for(var r=-1,n=0,i=-1,o=!0,s=0,a=t.length-1;a>=0;--a){var h=t.charCodeAt(a);if(47!==h)-1===i&&(o=!1,i=a+1),46===h?-1===r?r=a:1!==s&&(s=1):-1!==r&&(s=-1);else if(!o){n=a+1;break}}return-1===r||-1===i||0===s||1===s&&r===i-1&&r===n+1?"":t.slice(r,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,i=t.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var s=-1,a=0,h=-1,c=!0,f=t.length-1,u=0;f>=n;--f)if(47!==(i=t.charCodeAt(f)))-1===h&&(c=!1,h=f+1),46===i?-1===s?s=f:1!==u&&(u=1):-1!==s&&(u=-1);else if(!c){a=f+1;break}return-1===s||-1===h||0===u||1===u&&s===h-1&&s===a+1?-1!==h&&(r.base=r.name=0===a&&o?t.slice(1,h):t.slice(a,h)):(0===a&&o?(r.name=t.slice(1,s),r.base=t.slice(1,h)):(r.name=t.slice(a,s),r.base=t.slice(a,h)),r.ext=t.slice(s,h)),a>0?r.dir=t.slice(0,a-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n},70:(t,e)=>{if(Object.defineProperty(e,"__esModule",{value:!0}),e.isWindows=void 0,"object"==typeof process)e.isWindows="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e.isWindows=t.indexOf("Windows")>=0}},231:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const n=r(70),i=/^\w[\w\d+.-]*$/,o=/^\//,s=/^\/\//;function a(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!i.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!o.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const h="",c="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(t){return t instanceof u||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,n,i,o=!1){"object"==typeof t?(this.scheme=t.scheme||h,this.authority=t.authority||h,this.path=t.path||h,this.query=t.query||h,this.fragment=t.fragment||h):(this.scheme=function(t,e){return t||e?t:"file"}(t,o),this.authority=e||h,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==c&&(e=c+e):e=c}return e}(this.scheme,r||h),this.query=n||h,this.fragment=i||h,a(this,o))}get fsPath(){return v(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:n,query:i,fragment:o}=t;return void 0===e?e=this.scheme:null===e&&(e=h),void 0===r?r=this.authority:null===r&&(r=h),void 0===n?n=this.path:null===n&&(n=h),void 0===i?i=this.query:null===i&&(i=h),void 0===o?o=this.fragment:null===o&&(o=h),e===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&o===this.fragment?this:new d(e,r,n,i,o)}static parse(t,e=!1){const r=f.exec(t);return r?new d(r[2]||h,w(r[4]||h),w(r[5]||h),w(r[7]||h),w(r[9]||h),e):new d(h,h,h,h,h)}static file(t){let e=h;if(n.isWindows&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const r=t.indexOf(c,2);-1===r?(e=t.substring(2),t=c):(e=t.substring(2,r),t=t.substring(r)||c)}return new d("file",e,t,h,h)}static from(t){const e=new d(t.scheme,t.authority,t.path,t.query,t.fragment);return a(e,!0),e}toString(t=!1){return y(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof u)return t;{const e=new d(t);return e._formatted=t.external,e._fsPath=t._sep===l?t.fsPath:null,e}}return t}}e.URI=u;const l=n.isWindows?1:void 0;class d extends u{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(t=!1){return t?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=l),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function g(t,e,r){let n,i=-1;for(let o=0;o<t.length;o++){const s=t.charCodeAt(o);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||e&&47===s||r&&91===s||r&&93===s||r&&58===s)-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),void 0!==n&&(n+=t.charAt(o));else{void 0===n&&(n=t.substr(0,o));const e=p[s];void 0!==e?(-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),n+=e):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(t.substring(i))),void 0!==n?n:t}function m(t){let e;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);35===n||63===n?(void 0===e&&(e=t.substr(0,r)),e+=p[n]):void 0!==e&&(e+=t[r])}return void 0!==e?e:t}function v(t,e){let r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,n.isWindows&&(r=r.replace(/\//g,"\\")),r}function y(t,e){const r=e?m:g;let n="",{scheme:i,authority:o,path:s,query:a,fragment:h}=t;if(i&&(n+=i,n+=":"),(o||"file"===i)&&(n+=c,n+=c),o){let t=o.indexOf("@");if(-1!==t){const e=o.substr(0,t);o=o.substr(t+1),t=e.lastIndexOf(":"),-1===t?n+=r(e,!1,!1):(n+=r(e.substr(0,t),!1,!1),n+=":",n+=r(e.substr(t+1),!1,!0)),n+="@"}o=o.toLowerCase(),t=o.lastIndexOf(":"),-1===t?n+=r(o,!1,!0):(n+=r(o.substr(0,t),!1,!0),n+=o.substr(t))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const t=s.charCodeAt(1);t>=65&&t<=90&&(s=`/${String.fromCharCode(t+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const t=s.charCodeAt(0);t>=65&&t<=90&&(s=`${String.fromCharCode(t+32)}:${s.substr(2)}`)}n+=r(s,!0,!1)}return a&&(n+="?",n+=r(a,!1,!1)),h&&(n+="#",n+=e?h:g(h,!1,!1)),n}function b(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+b(t.substr(3)):t}}e.uriToFsPath=v;const C=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(t){return t.match(C)?t.replace(C,(t=>b(t))):t}},552:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=void 0;const s=o(r(975)),a=s.posix||s,h="/";var c;!function(t){t.joinPath=function(t,...e){return t.with({path:a.join(t.path,...e)})},t.resolvePath=function(t,...e){let r=t.path,n=!1;r[0]!==h&&(r=h+r,n=!0);let i=a.resolve(r,...e);return n&&i[0]===h&&!t.authority&&(i=i.substring(1)),t.with({path:i})},t.dirname=function(t){if(0===t.path.length||t.path===h)return t;let e=a.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},t.basename=function(t){return a.basename(t.path)},t.extname=function(t){return a.extname(t.path)}}(c||(e.Utils=c={}))}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}var n={};return(()=>{var t=n;Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=t.URI=void 0;const e=r(231);Object.defineProperty(t,"URI",{enumerable:!0,get:function(){return e.URI}});const i=r(552);Object.defineProperty(t,"Utils",{enumerable:!0,get:function(){return i.Utils}})})(),n})()));
|
|
239
|
+
!function(t,e){if(true)module.exports=e();else // removed by dead control flow
|
|
240
|
+
{ var n, r; }}(this,(()=>(()=>{"use strict";var t={975:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",i=0,o=-1,s=0,a=0;a<=t.length;++a){if(a<t.length)r=t.charCodeAt(a);else{if(47===r)break;r=47}if(47===r){if(o===a-1||1===s);else if(o!==a-1&&2===s){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var h=n.lastIndexOf("/");if(h!==n.length-1){-1===h?(n="",i=0):i=(n=n.slice(0,h)).length-1-n.lastIndexOf("/"),o=a,s=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=a,s=0;continue}e&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+t.slice(o+1,a):n=t.slice(o+1,a),i=a-o-1;o=a,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var t,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s;o>=0?s=arguments[o]:(void 0===t&&(t=process.cwd()),s=t),e(s),0!==s.length&&(n=s+"/"+n,i=47===s.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return".";var n=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&i&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,r=0;r<arguments.length;++r){var i=arguments[r];e(i),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return"";if((t=n.resolve(t))===(r=n.resolve(r)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var o=t.length,s=o-i,a=1;a<r.length&&47===r.charCodeAt(a);++a);for(var h=r.length-a,c=s<h?s:h,f=-1,u=0;u<=c;++u){if(u===c){if(h>c){if(47===r.charCodeAt(a+u))return r.slice(a+u+1);if(0===u)return r.slice(a+u)}else s>c&&(47===t.charCodeAt(i+u)?f=u:0===u&&(f=0));break}var l=t.charCodeAt(i+u);if(l!==r.charCodeAt(a+u))break;47===l&&(f=u)}var d="";for(u=i+f+1;u<=o;++u)u!==o&&47!==t.charCodeAt(u)||(0===d.length?d+="..":d+="/..");return d.length>0?d+r.slice(a+f):(a+=f,47===r.charCodeAt(a)&&++a,r.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,i=-1,o=!0,s=t.length-1;s>=1;--s)if(47===(r=t.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,i=0,o=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var a=r.length-1,h=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!s){i=n+1;break}}else-1===h&&(s=!1,h=n+1),a>=0&&(c===r.charCodeAt(a)?-1==--a&&(o=n):(a=-1,o=h))}return i===o?o=h:-1===o&&(o=t.length),t.slice(i,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!s){i=n+1;break}}else-1===o&&(s=!1,o=n+1);return-1===o?"":t.slice(i,o)},extname:function(t){e(t);for(var r=-1,n=0,i=-1,o=!0,s=0,a=t.length-1;a>=0;--a){var h=t.charCodeAt(a);if(47!==h)-1===i&&(o=!1,i=a+1),46===h?-1===r?r=a:1!==s&&(s=1):-1!==r&&(s=-1);else if(!o){n=a+1;break}}return-1===r||-1===i||0===s||1===s&&r===i-1&&r===n+1?"":t.slice(r,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,i=t.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var s=-1,a=0,h=-1,c=!0,f=t.length-1,u=0;f>=n;--f)if(47!==(i=t.charCodeAt(f)))-1===h&&(c=!1,h=f+1),46===i?-1===s?s=f:1!==u&&(u=1):-1!==s&&(u=-1);else if(!c){a=f+1;break}return-1===s||-1===h||0===u||1===u&&s===h-1&&s===a+1?-1!==h&&(r.base=r.name=0===a&&o?t.slice(1,h):t.slice(a,h)):(0===a&&o?(r.name=t.slice(1,s),r.base=t.slice(1,h)):(r.name=t.slice(a,s),r.base=t.slice(a,h)),r.ext=t.slice(s,h)),a>0?r.dir=t.slice(0,a-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n},70:(t,e)=>{if(Object.defineProperty(e,"__esModule",{value:!0}),e.isWindows=void 0,"object"==typeof process)e.isWindows="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e.isWindows=t.indexOf("Windows")>=0}},231:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const n=r(70),i=/^\w[\w\d+.-]*$/,o=/^\//,s=/^\/\//;function a(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!i.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!o.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const h="",c="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(t){return t instanceof u||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,n,i,o=!1){"object"==typeof t?(this.scheme=t.scheme||h,this.authority=t.authority||h,this.path=t.path||h,this.query=t.query||h,this.fragment=t.fragment||h):(this.scheme=function(t,e){return t||e?t:"file"}(t,o),this.authority=e||h,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==c&&(e=c+e):e=c}return e}(this.scheme,r||h),this.query=n||h,this.fragment=i||h,a(this,o))}get fsPath(){return v(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:n,query:i,fragment:o}=t;return void 0===e?e=this.scheme:null===e&&(e=h),void 0===r?r=this.authority:null===r&&(r=h),void 0===n?n=this.path:null===n&&(n=h),void 0===i?i=this.query:null===i&&(i=h),void 0===o?o=this.fragment:null===o&&(o=h),e===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&o===this.fragment?this:new d(e,r,n,i,o)}static parse(t,e=!1){const r=f.exec(t);return r?new d(r[2]||h,w(r[4]||h),w(r[5]||h),w(r[7]||h),w(r[9]||h),e):new d(h,h,h,h,h)}static file(t){let e=h;if(n.isWindows&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const r=t.indexOf(c,2);-1===r?(e=t.substring(2),t=c):(e=t.substring(2,r),t=t.substring(r)||c)}return new d("file",e,t,h,h)}static from(t){const e=new d(t.scheme,t.authority,t.path,t.query,t.fragment);return a(e,!0),e}toString(t=!1){return y(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof u)return t;{const e=new d(t);return e._formatted=t.external,e._fsPath=t._sep===l?t.fsPath:null,e}}return t}}e.URI=u;const l=n.isWindows?1:void 0;class d extends u{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(t=!1){return t?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=l),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function g(t,e,r){let n,i=-1;for(let o=0;o<t.length;o++){const s=t.charCodeAt(o);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||e&&47===s||r&&91===s||r&&93===s||r&&58===s)-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),void 0!==n&&(n+=t.charAt(o));else{void 0===n&&(n=t.substr(0,o));const e=p[s];void 0!==e?(-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),n+=e):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(t.substring(i))),void 0!==n?n:t}function m(t){let e;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);35===n||63===n?(void 0===e&&(e=t.substr(0,r)),e+=p[n]):void 0!==e&&(e+=t[r])}return void 0!==e?e:t}function v(t,e){let r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,n.isWindows&&(r=r.replace(/\//g,"\\")),r}function y(t,e){const r=e?m:g;let n="",{scheme:i,authority:o,path:s,query:a,fragment:h}=t;if(i&&(n+=i,n+=":"),(o||"file"===i)&&(n+=c,n+=c),o){let t=o.indexOf("@");if(-1!==t){const e=o.substr(0,t);o=o.substr(t+1),t=e.lastIndexOf(":"),-1===t?n+=r(e,!1,!1):(n+=r(e.substr(0,t),!1,!1),n+=":",n+=r(e.substr(t+1),!1,!0)),n+="@"}o=o.toLowerCase(),t=o.lastIndexOf(":"),-1===t?n+=r(o,!1,!0):(n+=r(o.substr(0,t),!1,!0),n+=o.substr(t))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const t=s.charCodeAt(1);t>=65&&t<=90&&(s=`/${String.fromCharCode(t+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const t=s.charCodeAt(0);t>=65&&t<=90&&(s=`${String.fromCharCode(t+32)}:${s.substr(2)}`)}n+=r(s,!0,!1)}return a&&(n+="?",n+=r(a,!1,!1)),h&&(n+="#",n+=e?h:g(h,!1,!1)),n}function b(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+b(t.substr(3)):t}}e.uriToFsPath=v;const C=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(t){return t.match(C)?t.replace(C,(t=>b(t))):t}},552:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=void 0;const s=o(r(975)),a=s.posix||s,h="/";var c;!function(t){t.joinPath=function(t,...e){return t.with({path:a.join(t.path,...e)})},t.resolvePath=function(t,...e){let r=t.path,n=!1;r[0]!==h&&(r=h+r,n=!0);let i=a.resolve(r,...e);return n&&i[0]===h&&!t.authority&&(i=i.substring(1)),t.with({path:i})},t.dirname=function(t){if(0===t.path.length||t.path===h)return t;let e=a.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},t.basename=function(t){return a.basename(t.path)},t.extname=function(t){return a.extname(t.path)}}(c||(e.Utils=c={}))}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}var n={};return(()=>{var t=n;Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=t.URI=void 0;const e=r(231);Object.defineProperty(t,"URI",{enumerable:!0,get:function(){return e.URI}});const i=r(552);Object.defineProperty(t,"Utils",{enumerable:!0,get:function(){return i.Utils}})})(),n})()));
|
|
240
241
|
//# sourceMappingURL=index.js.map
|
|
241
242
|
|
|
242
243
|
/***/ }),
|
|
@@ -431,17 +432,14 @@ process.umask = function() { return 0; };
|
|
|
431
432
|
|
|
432
433
|
/***/ }),
|
|
433
434
|
/* 6 */
|
|
434
|
-
/***/ (
|
|
435
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
435
436
|
|
|
436
437
|
"use strict";
|
|
437
438
|
/* provided dependency */ var process = __webpack_require__(5);
|
|
438
439
|
|
|
439
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
440
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
441
|
-
};
|
|
442
440
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
443
441
|
exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0;
|
|
444
|
-
const brace_expansion_1 =
|
|
442
|
+
const brace_expansion_1 = __webpack_require__(7);
|
|
445
443
|
const assert_valid_pattern_js_1 = __webpack_require__(9);
|
|
446
444
|
const ast_js_1 = __webpack_require__(10);
|
|
447
445
|
const escape_js_1 = __webpack_require__(13);
|
|
@@ -594,7 +592,7 @@ const braceExpand = (pattern, options = {}) => {
|
|
|
594
592
|
// shortcut. no need to expand.
|
|
595
593
|
return [pattern];
|
|
596
594
|
}
|
|
597
|
-
return (0, brace_expansion_1.
|
|
595
|
+
return (0, brace_expansion_1.expand)(pattern);
|
|
598
596
|
};
|
|
599
597
|
exports.braceExpand = braceExpand;
|
|
600
598
|
exports.minimatch.braceExpand = exports.braceExpand;
|
|
@@ -1080,7 +1078,7 @@ class Minimatch {
|
|
|
1080
1078
|
}
|
|
1081
1079
|
}
|
|
1082
1080
|
// resolve and reduce . and .. portions in the file as well.
|
|
1083
|
-
//
|
|
1081
|
+
// don't need to do the second phase, because it's only one string[]
|
|
1084
1082
|
const { optimizationLevel = 1 } = this.options;
|
|
1085
1083
|
if (optimizationLevel >= 2) {
|
|
1086
1084
|
file = this.levelTwoFileOptimize(file);
|
|
@@ -1333,14 +1331,25 @@ class Minimatch {
|
|
|
1333
1331
|
}
|
|
1334
1332
|
}
|
|
1335
1333
|
else if (next === undefined) {
|
|
1336
|
-
pp[i - 1] = prev + '(
|
|
1334
|
+
pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + ')?';
|
|
1337
1335
|
}
|
|
1338
1336
|
else if (next !== exports.GLOBSTAR) {
|
|
1339
1337
|
pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
|
|
1340
1338
|
pp[i + 1] = exports.GLOBSTAR;
|
|
1341
1339
|
}
|
|
1342
1340
|
});
|
|
1343
|
-
|
|
1341
|
+
const filtered = pp.filter(p => p !== exports.GLOBSTAR);
|
|
1342
|
+
// For partial matches, we need to make the pattern match
|
|
1343
|
+
// any prefix of the full path. We do this by generating
|
|
1344
|
+
// alternative patterns that match progressively longer prefixes.
|
|
1345
|
+
if (this.partial && filtered.length >= 1) {
|
|
1346
|
+
const prefixes = [];
|
|
1347
|
+
for (let i = 1; i <= filtered.length; i++) {
|
|
1348
|
+
prefixes.push(filtered.slice(0, i).join('/'));
|
|
1349
|
+
}
|
|
1350
|
+
return '(?:' + prefixes.join('|') + ')';
|
|
1351
|
+
}
|
|
1352
|
+
return filtered.join('/');
|
|
1344
1353
|
})
|
|
1345
1354
|
.join('|');
|
|
1346
1355
|
// need to wrap in parens if we had more than one thing with |,
|
|
@@ -1349,6 +1358,10 @@ class Minimatch {
|
|
|
1349
1358
|
// must match entire pattern
|
|
1350
1359
|
// ending in a * or ** will make it less strict.
|
|
1351
1360
|
re = '^' + open + re + close + '$';
|
|
1361
|
+
// In partial mode, '/' should always match as it's a valid prefix for any pattern
|
|
1362
|
+
if (this.partial) {
|
|
1363
|
+
re = '^(?:\\/|' + open + re.slice(1, -1) + close + ')$';
|
|
1364
|
+
}
|
|
1352
1365
|
// can match anything, as long as it's not this.
|
|
1353
1366
|
if (this.negate)
|
|
1354
1367
|
re = '^(?!' + re + ').+$';
|
|
@@ -1455,281 +1468,270 @@ exports.minimatch.unescape = unescape_js_1.unescape;
|
|
|
1455
1468
|
|
|
1456
1469
|
/***/ }),
|
|
1457
1470
|
/* 7 */
|
|
1458
|
-
/***/ ((
|
|
1459
|
-
|
|
1460
|
-
var balanced = __webpack_require__(8);
|
|
1461
|
-
|
|
1462
|
-
module.exports = expandTop;
|
|
1471
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1463
1472
|
|
|
1464
|
-
|
|
1465
|
-
var escOpen = '\0OPEN'+Math.random()+'\0';
|
|
1466
|
-
var escClose = '\0CLOSE'+Math.random()+'\0';
|
|
1467
|
-
var escComma = '\0COMMA'+Math.random()+'\0';
|
|
1468
|
-
var escPeriod = '\0PERIOD'+Math.random()+'\0';
|
|
1473
|
+
"use strict";
|
|
1469
1474
|
|
|
1475
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1476
|
+
exports.expand = expand;
|
|
1477
|
+
const balanced_match_1 = __webpack_require__(8);
|
|
1478
|
+
const escSlash = '\0SLASH' + Math.random() + '\0';
|
|
1479
|
+
const escOpen = '\0OPEN' + Math.random() + '\0';
|
|
1480
|
+
const escClose = '\0CLOSE' + Math.random() + '\0';
|
|
1481
|
+
const escComma = '\0COMMA' + Math.random() + '\0';
|
|
1482
|
+
const escPeriod = '\0PERIOD' + Math.random() + '\0';
|
|
1483
|
+
const escSlashPattern = new RegExp(escSlash, 'g');
|
|
1484
|
+
const escOpenPattern = new RegExp(escOpen, 'g');
|
|
1485
|
+
const escClosePattern = new RegExp(escClose, 'g');
|
|
1486
|
+
const escCommaPattern = new RegExp(escComma, 'g');
|
|
1487
|
+
const escPeriodPattern = new RegExp(escPeriod, 'g');
|
|
1488
|
+
const slashPattern = /\\\\/g;
|
|
1489
|
+
const openPattern = /\\{/g;
|
|
1490
|
+
const closePattern = /\\}/g;
|
|
1491
|
+
const commaPattern = /\\,/g;
|
|
1492
|
+
const periodPattern = /\\./g;
|
|
1470
1493
|
function numeric(str) {
|
|
1471
|
-
|
|
1472
|
-
? parseInt(str, 10)
|
|
1473
|
-
: str.charCodeAt(0);
|
|
1494
|
+
return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
|
|
1474
1495
|
}
|
|
1475
|
-
|
|
1476
1496
|
function escapeBraces(str) {
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1497
|
+
return str
|
|
1498
|
+
.replace(slashPattern, escSlash)
|
|
1499
|
+
.replace(openPattern, escOpen)
|
|
1500
|
+
.replace(closePattern, escClose)
|
|
1501
|
+
.replace(commaPattern, escComma)
|
|
1502
|
+
.replace(periodPattern, escPeriod);
|
|
1482
1503
|
}
|
|
1483
|
-
|
|
1484
1504
|
function unescapeBraces(str) {
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1505
|
+
return str
|
|
1506
|
+
.replace(escSlashPattern, '\\')
|
|
1507
|
+
.replace(escOpenPattern, '{')
|
|
1508
|
+
.replace(escClosePattern, '}')
|
|
1509
|
+
.replace(escCommaPattern, ',')
|
|
1510
|
+
.replace(escPeriodPattern, '.');
|
|
1490
1511
|
}
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1512
|
+
/**
|
|
1513
|
+
* Basically just str.split(","), but handling cases
|
|
1514
|
+
* where we have nested braced sections, which should be
|
|
1515
|
+
* treated as individual members, like {a,{b,c},d}
|
|
1516
|
+
*/
|
|
1496
1517
|
function parseCommaParts(str) {
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
}
|
|
1517
|
-
|
|
1518
|
-
parts.push.apply(parts, p);
|
|
1519
|
-
|
|
1520
|
-
return parts;
|
|
1518
|
+
if (!str) {
|
|
1519
|
+
return [''];
|
|
1520
|
+
}
|
|
1521
|
+
const parts = [];
|
|
1522
|
+
const m = (0, balanced_match_1.balanced)('{', '}', str);
|
|
1523
|
+
if (!m) {
|
|
1524
|
+
return str.split(',');
|
|
1525
|
+
}
|
|
1526
|
+
const { pre, body, post } = m;
|
|
1527
|
+
const p = pre.split(',');
|
|
1528
|
+
p[p.length - 1] += '{' + body + '}';
|
|
1529
|
+
const postParts = parseCommaParts(post);
|
|
1530
|
+
if (post.length) {
|
|
1531
|
+
;
|
|
1532
|
+
p[p.length - 1] += postParts.shift();
|
|
1533
|
+
p.push.apply(p, postParts);
|
|
1534
|
+
}
|
|
1535
|
+
parts.push.apply(parts, p);
|
|
1536
|
+
return parts;
|
|
1521
1537
|
}
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
return expand(escapeBraces(str), true).map(unescapeBraces);
|
|
1538
|
+
function expand(str) {
|
|
1539
|
+
if (!str) {
|
|
1540
|
+
return [];
|
|
1541
|
+
}
|
|
1542
|
+
// I don't know why Bash 4.3 does this, but it does.
|
|
1543
|
+
// Anything starting with {} will have the first two bytes preserved
|
|
1544
|
+
// but *only* at the top level, so {},a}b will not expand to anything,
|
|
1545
|
+
// but a{},b}c will be expanded to [a}c,abc].
|
|
1546
|
+
// One could argue that this is a bug in Bash, but since the goal of
|
|
1547
|
+
// this module is to match Bash's rules, we escape a leading {}
|
|
1548
|
+
if (str.slice(0, 2) === '{}') {
|
|
1549
|
+
str = '\\{\\}' + str.slice(2);
|
|
1550
|
+
}
|
|
1551
|
+
return expand_(escapeBraces(str), true).map(unescapeBraces);
|
|
1538
1552
|
}
|
|
1539
|
-
|
|
1540
1553
|
function embrace(str) {
|
|
1541
|
-
|
|
1554
|
+
return '{' + str + '}';
|
|
1542
1555
|
}
|
|
1543
1556
|
function isPadded(el) {
|
|
1544
|
-
|
|
1557
|
+
return /^-?0\d/.test(el);
|
|
1545
1558
|
}
|
|
1546
|
-
|
|
1547
1559
|
function lte(i, y) {
|
|
1548
|
-
|
|
1560
|
+
return i <= y;
|
|
1549
1561
|
}
|
|
1550
1562
|
function gte(i, y) {
|
|
1551
|
-
|
|
1563
|
+
return i >= y;
|
|
1552
1564
|
}
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
if (/\$$/.test(m.pre)) {
|
|
1567
|
-
for (var k = 0; k < post.length; k++) {
|
|
1568
|
-
var expansion = pre+ '{' + m.body + '}' + post[k];
|
|
1569
|
-
expansions.push(expansion);
|
|
1570
|
-
}
|
|
1571
|
-
} else {
|
|
1572
|
-
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
1573
|
-
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
1574
|
-
var isSequence = isNumericSequence || isAlphaSequence;
|
|
1575
|
-
var isOptions = m.body.indexOf(',') >= 0;
|
|
1576
|
-
if (!isSequence && !isOptions) {
|
|
1577
|
-
// {a},b}
|
|
1578
|
-
if (m.post.match(/,.*\}/)) {
|
|
1579
|
-
str = m.pre + '{' + m.body + escClose + m.post;
|
|
1580
|
-
return expand(str);
|
|
1581
|
-
}
|
|
1582
|
-
return [str];
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1585
|
-
var n;
|
|
1586
|
-
if (isSequence) {
|
|
1587
|
-
n = m.body.split(/\.\./);
|
|
1588
|
-
} else {
|
|
1589
|
-
n = parseCommaParts(m.body);
|
|
1590
|
-
if (n.length === 1) {
|
|
1591
|
-
// x{{a,b}}y ==> x{a}y x{b}y
|
|
1592
|
-
n = expand(n[0], false).map(embrace);
|
|
1593
|
-
if (n.length === 1) {
|
|
1594
|
-
return post.map(function(p) {
|
|
1595
|
-
return m.pre + n[0] + p;
|
|
1596
|
-
});
|
|
1565
|
+
function expand_(str, isTop) {
|
|
1566
|
+
/** @type {string[]} */
|
|
1567
|
+
const expansions = [];
|
|
1568
|
+
const m = (0, balanced_match_1.balanced)('{', '}', str);
|
|
1569
|
+
if (!m)
|
|
1570
|
+
return [str];
|
|
1571
|
+
// no need to expand pre, since it is guaranteed to be free of brace-sets
|
|
1572
|
+
const pre = m.pre;
|
|
1573
|
+
const post = m.post.length ? expand_(m.post, false) : [''];
|
|
1574
|
+
if (/\$$/.test(m.pre)) {
|
|
1575
|
+
for (let k = 0; k < post.length; k++) {
|
|
1576
|
+
const expansion = pre + '{' + m.body + '}' + post[k];
|
|
1577
|
+
expansions.push(expansion);
|
|
1597
1578
|
}
|
|
1598
|
-
}
|
|
1599
1579
|
}
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1580
|
+
else {
|
|
1581
|
+
const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
1582
|
+
const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
1583
|
+
const isSequence = isNumericSequence || isAlphaSequence;
|
|
1584
|
+
const isOptions = m.body.indexOf(',') >= 0;
|
|
1585
|
+
if (!isSequence && !isOptions) {
|
|
1586
|
+
// {a},b}
|
|
1587
|
+
if (m.post.match(/,(?!,).*\}/)) {
|
|
1588
|
+
str = m.pre + '{' + m.body + escClose + m.post;
|
|
1589
|
+
return expand_(str);
|
|
1590
|
+
}
|
|
1591
|
+
return [str];
|
|
1592
|
+
}
|
|
1593
|
+
let n;
|
|
1594
|
+
if (isSequence) {
|
|
1595
|
+
n = m.body.split(/\.\./);
|
|
1596
|
+
}
|
|
1597
|
+
else {
|
|
1598
|
+
n = parseCommaParts(m.body);
|
|
1599
|
+
if (n.length === 1 && n[0] !== undefined) {
|
|
1600
|
+
// x{{a,b}}y ==> x{a}y x{b}y
|
|
1601
|
+
n = expand_(n[0], false).map(embrace);
|
|
1602
|
+
//XXX is this necessary? Can't seem to hit it in tests.
|
|
1603
|
+
/* c8 ignore start */
|
|
1604
|
+
if (n.length === 1) {
|
|
1605
|
+
return post.map(p => m.pre + n[0] + p);
|
|
1606
|
+
}
|
|
1607
|
+
/* c8 ignore stop */
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
// at this point, n is the parts, and we know it's not a comma set
|
|
1611
|
+
// with a single entry.
|
|
1612
|
+
let N;
|
|
1613
|
+
if (isSequence && n[0] !== undefined && n[1] !== undefined) {
|
|
1614
|
+
const x = numeric(n[0]);
|
|
1615
|
+
const y = numeric(n[1]);
|
|
1616
|
+
const width = Math.max(n[0].length, n[1].length);
|
|
1617
|
+
let incr = n.length === 3 && n[2] !== undefined ? Math.abs(numeric(n[2])) : 1;
|
|
1618
|
+
let test = lte;
|
|
1619
|
+
const reverse = y < x;
|
|
1620
|
+
if (reverse) {
|
|
1621
|
+
incr *= -1;
|
|
1622
|
+
test = gte;
|
|
1623
|
+
}
|
|
1624
|
+
const pad = n.some(isPadded);
|
|
1625
|
+
N = [];
|
|
1626
|
+
for (let i = x; test(i, y); i += incr) {
|
|
1627
|
+
let c;
|
|
1628
|
+
if (isAlphaSequence) {
|
|
1629
|
+
c = String.fromCharCode(i);
|
|
1630
|
+
if (c === '\\') {
|
|
1631
|
+
c = '';
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
else {
|
|
1635
|
+
c = String(i);
|
|
1636
|
+
if (pad) {
|
|
1637
|
+
const need = width - c.length;
|
|
1638
|
+
if (need > 0) {
|
|
1639
|
+
const z = new Array(need + 1).join('0');
|
|
1640
|
+
if (i < 0) {
|
|
1641
|
+
c = '-' + z + c.slice(1);
|
|
1642
|
+
}
|
|
1643
|
+
else {
|
|
1644
|
+
c = z + c;
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
N.push(c);
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
else {
|
|
1653
|
+
N = [];
|
|
1654
|
+
for (let j = 0; j < n.length; j++) {
|
|
1655
|
+
N.push.apply(N, expand_(n[j], false));
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
for (let j = 0; j < N.length; j++) {
|
|
1659
|
+
for (let k = 0; k < post.length; k++) {
|
|
1660
|
+
const expansion = pre + N[j] + post[k];
|
|
1661
|
+
if (!isTop || isSequence || expansion) {
|
|
1662
|
+
expansions.push(expansion);
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1649
1666
|
}
|
|
1650
|
-
|
|
1651
|
-
for (var j = 0; j < N.length; j++) {
|
|
1652
|
-
for (var k = 0; k < post.length; k++) {
|
|
1653
|
-
var expansion = pre + N[j] + post[k];
|
|
1654
|
-
if (!isTop || isSequence || expansion)
|
|
1655
|
-
expansions.push(expansion);
|
|
1656
|
-
}
|
|
1657
|
-
}
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
|
-
return expansions;
|
|
1667
|
+
return expansions;
|
|
1661
1668
|
}
|
|
1662
|
-
|
|
1663
|
-
|
|
1669
|
+
//# sourceMappingURL=index.js.map
|
|
1664
1670
|
|
|
1665
1671
|
/***/ }),
|
|
1666
1672
|
/* 8 */
|
|
1667
|
-
/***/ ((
|
|
1673
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
1668
1674
|
|
|
1669
1675
|
"use strict";
|
|
1670
1676
|
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1677
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1678
|
+
exports.range = exports.balanced = void 0;
|
|
1679
|
+
const balanced = (a, b, str) => {
|
|
1680
|
+
const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
|
|
1681
|
+
const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
|
|
1682
|
+
const r = ma !== null && mb != null && (0, exports.range)(ma, mb, str);
|
|
1683
|
+
return (r && {
|
|
1684
|
+
start: r[0],
|
|
1685
|
+
end: r[1],
|
|
1686
|
+
pre: str.slice(0, r[0]),
|
|
1687
|
+
body: str.slice(r[0] + ma.length, r[1]),
|
|
1688
|
+
post: str.slice(r[1] + mb.length),
|
|
1689
|
+
});
|
|
1690
|
+
};
|
|
1691
|
+
exports.balanced = balanced;
|
|
1692
|
+
const maybeMatch = (reg, str) => {
|
|
1693
|
+
const m = str.match(reg);
|
|
1694
|
+
return m ? m[0] : null;
|
|
1695
|
+
};
|
|
1696
|
+
const range = (a, b, str) => {
|
|
1697
|
+
let begs, beg, left, right = undefined, result;
|
|
1698
|
+
let ai = str.indexOf(a);
|
|
1699
|
+
let bi = str.indexOf(b, ai + 1);
|
|
1700
|
+
let i = ai;
|
|
1701
|
+
if (ai >= 0 && bi > 0) {
|
|
1702
|
+
if (a === b) {
|
|
1703
|
+
return [ai, bi];
|
|
1704
|
+
}
|
|
1705
|
+
begs = [];
|
|
1706
|
+
left = str.length;
|
|
1707
|
+
while (i >= 0 && !result) {
|
|
1708
|
+
if (i === ai) {
|
|
1709
|
+
begs.push(i);
|
|
1710
|
+
ai = str.indexOf(a, i + 1);
|
|
1711
|
+
}
|
|
1712
|
+
else if (begs.length === 1) {
|
|
1713
|
+
const r = begs.pop();
|
|
1714
|
+
if (r !== undefined)
|
|
1715
|
+
result = [r, bi];
|
|
1716
|
+
}
|
|
1717
|
+
else {
|
|
1718
|
+
beg = begs.pop();
|
|
1719
|
+
if (beg !== undefined && beg < left) {
|
|
1720
|
+
left = beg;
|
|
1721
|
+
right = bi;
|
|
1722
|
+
}
|
|
1723
|
+
bi = str.indexOf(b, i + 1);
|
|
1724
|
+
}
|
|
1725
|
+
i = ai < bi && ai >= 0 ? ai : bi;
|
|
1726
|
+
}
|
|
1727
|
+
if (begs.length && right !== undefined) {
|
|
1728
|
+
result = [left, right];
|
|
1717
1729
|
}
|
|
1718
|
-
|
|
1719
|
-
bi = str.indexOf(b, i + 1);
|
|
1720
|
-
}
|
|
1721
|
-
|
|
1722
|
-
i = ai < bi && ai >= 0 ? ai : bi;
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
|
-
if (begs.length) {
|
|
1726
|
-
result = [ left, right ];
|
|
1727
1730
|
}
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1731
|
+
return result;
|
|
1732
|
+
};
|
|
1733
|
+
exports.range = range;
|
|
1734
|
+
//# sourceMappingURL=index.js.map
|
|
1733
1735
|
|
|
1734
1736
|
/***/ }),
|
|
1735
1737
|
/* 9 */
|
|
@@ -2173,7 +2175,9 @@ class AST {
|
|
|
2173
2175
|
if (this.#root === this)
|
|
2174
2176
|
this.#fillNegs();
|
|
2175
2177
|
if (!this.type) {
|
|
2176
|
-
const noEmpty = this.isStart() &&
|
|
2178
|
+
const noEmpty = this.isStart() &&
|
|
2179
|
+
this.isEnd() &&
|
|
2180
|
+
!this.#parts.some(s => typeof s !== 'string');
|
|
2177
2181
|
const src = this.#parts
|
|
2178
2182
|
.map(p => {
|
|
2179
2183
|
const [re, _, hasMagic, uflag] = typeof p === 'string'
|
|
@@ -2329,10 +2333,7 @@ class AST {
|
|
|
2329
2333
|
}
|
|
2330
2334
|
}
|
|
2331
2335
|
if (c === '*') {
|
|
2332
|
-
|
|
2333
|
-
re += starNoEmpty;
|
|
2334
|
-
else
|
|
2335
|
-
re += star;
|
|
2336
|
+
re += noEmpty && glob === '*' ? starNoEmpty : star;
|
|
2336
2337
|
hasMagic = true;
|
|
2337
2338
|
continue;
|
|
2338
2339
|
}
|
|
@@ -2518,21 +2519,35 @@ exports.unescape = void 0;
|
|
|
2518
2519
|
/**
|
|
2519
2520
|
* Un-escape a string that has been escaped with {@link escape}.
|
|
2520
2521
|
*
|
|
2521
|
-
* If the {@link windowsPathsNoEscape} option is used, then
|
|
2522
|
-
* escapes are removed, but not backslash escapes.
|
|
2523
|
-
*
|
|
2524
|
-
*
|
|
2522
|
+
* If the {@link MinimatchOptions.windowsPathsNoEscape} option is used, then
|
|
2523
|
+
* square-bracket escapes are removed, but not backslash escapes.
|
|
2524
|
+
*
|
|
2525
|
+
* For example, it will turn the string `'[*]'` into `*`, but it will not
|
|
2526
|
+
* turn `'\\*'` into `'*'`, because `\` is a path separator in
|
|
2527
|
+
* `windowsPathsNoEscape` mode.
|
|
2525
2528
|
*
|
|
2526
|
-
* When `windowsPathsNoEscape` is not set, then both
|
|
2529
|
+
* When `windowsPathsNoEscape` is not set, then both square-bracket escapes and
|
|
2527
2530
|
* backslash escapes are removed.
|
|
2528
2531
|
*
|
|
2529
2532
|
* Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
|
|
2530
2533
|
* or unescaped.
|
|
2534
|
+
*
|
|
2535
|
+
* When `magicalBraces` is not set, escapes of braces (`{` and `}`) will not be
|
|
2536
|
+
* unescaped.
|
|
2531
2537
|
*/
|
|
2532
|
-
const unescape = (s, { windowsPathsNoEscape = false, } = {}) => {
|
|
2538
|
+
const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true, } = {}) => {
|
|
2539
|
+
if (magicalBraces) {
|
|
2540
|
+
return windowsPathsNoEscape
|
|
2541
|
+
? s.replace(/\[([^\/\\])\]/g, '$1')
|
|
2542
|
+
: s
|
|
2543
|
+
.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2')
|
|
2544
|
+
.replace(/\\([^\/])/g, '$1');
|
|
2545
|
+
}
|
|
2533
2546
|
return windowsPathsNoEscape
|
|
2534
|
-
? s.replace(/\[([^\/\\])\]/g, '$1')
|
|
2535
|
-
: s
|
|
2547
|
+
? s.replace(/\[([^\/\\{}])\]/g, '$1')
|
|
2548
|
+
: s
|
|
2549
|
+
.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, '$1$2')
|
|
2550
|
+
.replace(/\\([^\/{}])/g, '$1');
|
|
2536
2551
|
};
|
|
2537
2552
|
exports.unescape = unescape;
|
|
2538
2553
|
//# sourceMappingURL=unescape.js.map
|
|
@@ -2548,16 +2563,24 @@ exports.escape = void 0;
|
|
|
2548
2563
|
/**
|
|
2549
2564
|
* Escape all magic characters in a glob pattern.
|
|
2550
2565
|
*
|
|
2551
|
-
* If the {@link
|
|
2566
|
+
* If the {@link MinimatchOptions.windowsPathsNoEscape}
|
|
2552
2567
|
* option is used, then characters are escaped by wrapping in `[]`, because
|
|
2553
2568
|
* a magic character wrapped in a character class can only be satisfied by
|
|
2554
2569
|
* that exact character. In this mode, `\` is _not_ escaped, because it is
|
|
2555
2570
|
* not interpreted as a magic character, but instead as a path separator.
|
|
2571
|
+
*
|
|
2572
|
+
* If the {@link MinimatchOptions.magicalBraces} option is used,
|
|
2573
|
+
* then braces (`{` and `}`) will be escaped.
|
|
2556
2574
|
*/
|
|
2557
|
-
const escape = (s, { windowsPathsNoEscape = false, } = {}) => {
|
|
2575
|
+
const escape = (s, { windowsPathsNoEscape = false, magicalBraces = false, } = {}) => {
|
|
2558
2576
|
// don't need to escape +@! because we escape the parens
|
|
2559
2577
|
// that make those magic, and escaping ! as [!] isn't valid,
|
|
2560
2578
|
// because [!]] is a valid glob class meaning not ']'.
|
|
2579
|
+
if (magicalBraces) {
|
|
2580
|
+
return windowsPathsNoEscape
|
|
2581
|
+
? s.replace(/[?*()[\]{}]/g, '[$&]')
|
|
2582
|
+
: s.replace(/[?*()[\]\\{}]/g, '\\$&');
|
|
2583
|
+
}
|
|
2561
2584
|
return windowsPathsNoEscape
|
|
2562
2585
|
? s.replace(/[?*()[\]]/g, '[$&]')
|
|
2563
2586
|
: s.replace(/[?*()[\]\\]/g, '\\$&');
|