@vscode/test-web 0.0.45 → 0.0.47

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.
@@ -198,16 +198,10 @@ exports.MemFileSystemProvider = MemFileSystemProvider;
198
198
 
199
199
  /***/ }),
200
200
  /* 4 */
201
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
201
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
202
202
 
203
- "use strict";
204
- __webpack_require__.r(__webpack_exports__);
205
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
206
- /* harmony export */ URI: () => (/* binding */ URI),
207
- /* harmony export */ Utils: () => (/* binding */ Utils)
208
- /* harmony export */ });
209
203
  /* provided dependency */ var process = __webpack_require__(5);
210
- var LIB;(()=>{"use strict";var t={470: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="",o=0,i=-1,a=0,h=0;h<=t.length;++h){if(h<t.length)r=t.charCodeAt(h);else{if(47===r)break;r=47}if(47===r){if(i===h-1||1===a);else if(i!==h-1&&2===a){if(n.length<2||2!==o||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var s=n.lastIndexOf("/");if(s!==n.length-1){-1===s?(n="",o=0):o=(n=n.slice(0,s)).length-1-n.lastIndexOf("/"),i=h,a=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=h,a=0;continue}e&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+t.slice(i+1,h):n=t.slice(i+1,h),o=h-i-1;i=h,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var n={resolve:function(){for(var t,n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a;i>=0?a=arguments[i]:(void 0===t&&(t=process.cwd()),a=t),e(a),0!==a.length&&(n=a+"/"+n,o=47===a.charCodeAt(0))}return n=r(n,!o),o?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return".";var n=47===t.charCodeAt(0),o=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&o&&(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 o=arguments[r];e(o),o.length>0&&(void 0===t?t=o:t+="/"+o)}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 o=1;o<t.length&&47===t.charCodeAt(o);++o);for(var i=t.length,a=i-o,h=1;h<r.length&&47===r.charCodeAt(h);++h);for(var s=r.length-h,c=a<s?a:s,f=-1,u=0;u<=c;++u){if(u===c){if(s>c){if(47===r.charCodeAt(h+u))return r.slice(h+u+1);if(0===u)return r.slice(h+u)}else a>c&&(47===t.charCodeAt(o+u)?f=u:0===u&&(f=0));break}var l=t.charCodeAt(o+u);if(l!==r.charCodeAt(h+u))break;47===l&&(f=u)}var p="";for(u=o+f+1;u<=i;++u)u!==i&&47!==t.charCodeAt(u)||(0===p.length?p+="..":p+="/..");return p.length>0?p+r.slice(h+f):(h+=f,47===r.charCodeAt(h)&&++h,r.slice(h))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,o=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(r=t.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,o=0,i=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var h=r.length-1,s=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!a){o=n+1;break}}else-1===s&&(a=!1,s=n+1),h>=0&&(c===r.charCodeAt(h)?-1==--h&&(i=n):(h=-1,i=s))}return o===i?i=s:-1===i&&(i=t.length),t.slice(o,i)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){o=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":t.slice(o,i)},extname:function(t){e(t);for(var r=-1,n=0,o=-1,i=!0,a=0,h=t.length-1;h>=0;--h){var s=t.charCodeAt(h);if(47!==s)-1===o&&(i=!1,o=h+1),46===s?-1===r?r=h:1!==a&&(a=1):-1!==r&&(a=-1);else if(!i){n=h+1;break}}return-1===r||-1===o||0===a||1===a&&r===o-1&&r===n+1?"":t.slice(r,o)},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,o=t.charCodeAt(0),i=47===o;i?(r.root="/",n=1):n=0;for(var a=-1,h=0,s=-1,c=!0,f=t.length-1,u=0;f>=n;--f)if(47!==(o=t.charCodeAt(f)))-1===s&&(c=!1,s=f+1),46===o?-1===a?a=f:1!==u&&(u=1):-1!==a&&(u=-1);else if(!c){h=f+1;break}return-1===a||-1===s||0===u||1===u&&a===s-1&&a===h+1?-1!==s&&(r.base=r.name=0===h&&i?t.slice(1,s):t.slice(h,s)):(0===h&&i?(r.name=t.slice(1,a),r.base=t.slice(1,s)):(r.name=t.slice(h,a),r.base=t.slice(h,s)),r.ext=t.slice(a,s)),h>0?r.dir=t.slice(0,h-1):i&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{var t;if(r.r(n),r.d(n,{URI:()=>g,Utils:()=>O}),"object"==typeof process)t="win32"===process.platform;else if("object"==typeof navigator){var e=navigator.userAgent;t=e.indexOf("Windows")>=0}var o,i,a=(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),h=/^\w[\w\d+.-]*$/,s=/^\//,c=/^\/\//;function f(t,e){if(!t.scheme&&e)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(t.authority,'", path: "').concat(t.path,'", query: "').concat(t.query,'", fragment: "').concat(t.fragment,'"}'));if(t.scheme&&!h.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!s.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(c.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 ("//")')}var u="",l="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,g=function(){function e(t,e,r,n,o,i){void 0===i&&(i=!1),"object"==typeof t?(this.scheme=t.scheme||u,this.authority=t.authority||u,this.path=t.path||u,this.query=t.query||u,this.fragment=t.fragment||u):(this.scheme=function(t,e){return t||e?t:"file"}(t,i),this.authority=e||u,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==l&&(e=l+e):e=l}return e}(this.scheme,r||u),this.query=n||u,this.fragment=o||u,f(this,i))}return e.isUri=function(t){return t instanceof e||!!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},Object.defineProperty(e.prototype,"fsPath",{get:function(){return C(this,!1)},enumerable:!1,configurable:!0}),e.prototype.with=function(t){if(!t)return this;var e=t.scheme,r=t.authority,n=t.path,o=t.query,i=t.fragment;return void 0===e?e=this.scheme:null===e&&(e=u),void 0===r?r=this.authority:null===r&&(r=u),void 0===n?n=this.path:null===n&&(n=u),void 0===o?o=this.query:null===o&&(o=u),void 0===i?i=this.fragment:null===i&&(i=u),e===this.scheme&&r===this.authority&&n===this.path&&o===this.query&&i===this.fragment?this:new v(e,r,n,o,i)},e.parse=function(t,e){void 0===e&&(e=!1);var r=p.exec(t);return r?new v(r[2]||u,_(r[4]||u),_(r[5]||u),_(r[7]||u),_(r[9]||u),e):new v(u,u,u,u,u)},e.file=function(e){var r=u;if(t&&(e=e.replace(/\\/g,l)),e[0]===l&&e[1]===l){var n=e.indexOf(l,2);-1===n?(r=e.substring(2),e=l):(r=e.substring(2,n),e=e.substring(n)||l)}return new v("file",r,e,u,u)},e.from=function(t){var e=new v(t.scheme,t.authority,t.path,t.query,t.fragment);return f(e,!0),e},e.prototype.toString=function(t){return void 0===t&&(t=!1),A(this,t)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var r=new v(t);return r._formatted=t.external,r._fsPath=t._sep===d?t.fsPath:null,r}return t},e}(),d=t?1:void 0,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._formatted=null,e._fsPath=null,e}return a(e,t),Object.defineProperty(e.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=C(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),e.prototype.toString=function(t){return void 0===t&&(t=!1),t?A(this,!0):(this._formatted||(this._formatted=A(this,!1)),this._formatted)},e.prototype.toJSON=function(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=d),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},e}(g),y=((i={})[58]="%3A",i[47]="%2F",i[63]="%3F",i[35]="%23",i[91]="%5B",i[93]="%5D",i[64]="%40",i[33]="%21",i[36]="%24",i[38]="%26",i[39]="%27",i[40]="%28",i[41]="%29",i[42]="%2A",i[43]="%2B",i[44]="%2C",i[59]="%3B",i[61]="%3D",i[32]="%20",i);function m(t,e,r){for(var n=void 0,o=-1,i=0;i<t.length;i++){var a=t.charCodeAt(i);if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||45===a||46===a||95===a||126===a||e&&47===a||r&&91===a||r&&93===a||r&&58===a)-1!==o&&(n+=encodeURIComponent(t.substring(o,i)),o=-1),void 0!==n&&(n+=t.charAt(i));else{void 0===n&&(n=t.substr(0,i));var h=y[a];void 0!==h?(-1!==o&&(n+=encodeURIComponent(t.substring(o,i)),o=-1),n+=h):-1===o&&(o=i)}}return-1!==o&&(n+=encodeURIComponent(t.substring(o))),void 0!==n?n:t}function b(t){for(var e=void 0,r=0;r<t.length;r++){var n=t.charCodeAt(r);35===n||63===n?(void 0===e&&(e=t.substr(0,r)),e+=y[n]):void 0!==e&&(e+=t[r])}return void 0!==e?e:t}function C(e,r){var n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?"//".concat(e.authority).concat(e.path):47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?r?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,t&&(n=n.replace(/\//g,"\\")),n}function A(t,e){var r=e?b:m,n="",o=t.scheme,i=t.authority,a=t.path,h=t.query,s=t.fragment;if(o&&(n+=o,n+=":"),(i||"file"===o)&&(n+=l,n+=l),i){var c=i.indexOf("@");if(-1!==c){var f=i.substr(0,c);i=i.substr(c+1),-1===(c=f.lastIndexOf(":"))?n+=r(f,!1,!1):(n+=r(f.substr(0,c),!1,!1),n+=":",n+=r(f.substr(c+1),!1,!0)),n+="@"}-1===(c=(i=i.toLowerCase()).lastIndexOf(":"))?n+=r(i,!1,!0):(n+=r(i.substr(0,c),!1,!0),n+=i.substr(c))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2))(u=a.charCodeAt(1))>=65&&u<=90&&(a="/".concat(String.fromCharCode(u+32),":").concat(a.substr(3)));else if(a.length>=2&&58===a.charCodeAt(1)){var u;(u=a.charCodeAt(0))>=65&&u<=90&&(a="".concat(String.fromCharCode(u+32),":").concat(a.substr(2)))}n+=r(a,!0,!1)}return h&&(n+="?",n+=r(h,!1,!1)),s&&(n+="#",n+=e?s:m(s,!1,!1)),n}function w(t){try{return decodeURIComponent(t)}catch(e){return t.length>3?t.substr(0,3)+w(t.substr(3)):t}}var x=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function _(t){return t.match(x)?t.replace(x,(function(t){return w(t)})):t}var O,P=r(470),j=function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},I=P.posix||P,U="/";!function(t){t.joinPath=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return t.with({path:I.join.apply(I,j([t.path],e,!1))})},t.resolvePath=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=t.path,o=!1;n[0]!==U&&(n=U+n,o=!0);var i=I.resolve.apply(I,j([n],e,!1));return o&&i[0]===U&&!t.authority&&(i=i.substring(1)),t.with({path:i})},t.dirname=function(t){if(0===t.path.length||t.path===U)return t;var e=I.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},t.basename=function(t){return I.basename(t.path)},t.extname=function(t){return I.extname(t.path)}}(O||(O={}))})(),LIB=n})();const{URI,Utils}=LIB;
204
+ !function(t,e){if(true)module.exports=e();else { var n, r; }}(this,(()=>(()=>{"use strict";var t={470: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},674:(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}},796:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const n=r(674),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}},679: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(470)),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(796);Object.defineProperty(t,"URI",{enumerable:!0,get:function(){return e.URI}});const i=r(679);Object.defineProperty(t,"Utils",{enumerable:!0,get:function(){return i.Utils}})})(),n})()));
211
205
  //# sourceMappingURL=index.js.map
212
206
 
213
207
  /***/ }),
@@ -421,42 +415,13 @@ process.umask = function() { return 0; };
421
415
  /******/ };
422
416
  /******/
423
417
  /******/ // Execute the module function
424
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
418
+ /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
425
419
  /******/
426
420
  /******/ // Return the exports of the module
427
421
  /******/ return module.exports;
428
422
  /******/ }
429
423
  /******/
430
424
  /************************************************************************/
431
- /******/ /* webpack/runtime/define property getters */
432
- /******/ (() => {
433
- /******/ // define getter functions for harmony exports
434
- /******/ __webpack_require__.d = (exports, definition) => {
435
- /******/ for(var key in definition) {
436
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
437
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
438
- /******/ }
439
- /******/ }
440
- /******/ };
441
- /******/ })();
442
- /******/
443
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
444
- /******/ (() => {
445
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
446
- /******/ })();
447
- /******/
448
- /******/ /* webpack/runtime/make namespace object */
449
- /******/ (() => {
450
- /******/ // define __esModule on exports
451
- /******/ __webpack_require__.r = (exports) => {
452
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
453
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
454
- /******/ }
455
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
456
- /******/ };
457
- /******/ })();
458
- /******/
459
- /************************************************************************/
460
425
  var __webpack_exports__ = {};
461
426
  // This entry need to be wrapped in an IIFE because it need to be in strict mode.
462
427
  (() => {
@@ -475,21 +440,22 @@ const fsProvider_1 = __webpack_require__(3);
475
440
  const SCHEME = 'vscode-test-web';
476
441
  function activate(context) {
477
442
  const serverUri = context.extensionUri.with({ path: '/static/mount', query: undefined });
478
- const serverBackedRootDirectory = new ServerBackedDirectory(serverUri, '');
443
+ const serverBackedRootDirectory = new ServerBackedDirectory(serverUri, [], '');
479
444
  const disposable = vscode_1.workspace.registerFileSystemProvider(SCHEME, new fsProvider_1.MemFileSystemProvider(SCHEME, serverBackedRootDirectory));
480
445
  context.subscriptions.push(disposable);
481
446
  console.log(`vscode-test-web-support fs provider registers for ${SCHEME}, initial content from ${serverUri.toString(/*skipEncoding*/ true)}`);
482
447
  }
483
448
  exports.activate = activate;
484
449
  class ServerBackedFile {
485
- constructor(_serverUri, name) {
486
- this._serverUri = _serverUri;
450
+ constructor(_serverRoot, pathSegments, name) {
451
+ this._serverRoot = _serverRoot;
452
+ this.pathSegments = pathSegments;
487
453
  this.name = name;
488
454
  this.type = vscode_1.FileType.File;
489
455
  }
490
456
  get stats() {
491
457
  if (this._stats === undefined) {
492
- this._stats = getStats(this._serverUri);
458
+ this._stats = getStats(this._serverRoot, this.pathSegments);
493
459
  }
494
460
  return this._stats;
495
461
  }
@@ -498,7 +464,7 @@ class ServerBackedFile {
498
464
  }
499
465
  get content() {
500
466
  if (this._content === undefined) {
501
- this._content = getContent(this._serverUri);
467
+ this._content = getContent(this._serverRoot, this.pathSegments);
502
468
  }
503
469
  return this._content;
504
470
  }
@@ -507,14 +473,15 @@ class ServerBackedFile {
507
473
  }
508
474
  }
509
475
  class ServerBackedDirectory {
510
- constructor(_serverUri, name) {
511
- this._serverUri = _serverUri;
476
+ constructor(_serverRoot, pathSegments, name) {
477
+ this._serverRoot = _serverRoot;
478
+ this.pathSegments = pathSegments;
512
479
  this.name = name;
513
480
  this.type = vscode_1.FileType.Directory;
514
481
  }
515
482
  get stats() {
516
483
  if (this._stats === undefined) {
517
- this._stats = getStats(this._serverUri);
484
+ this._stats = getStats(this._serverRoot, this.pathSegments);
518
485
  }
519
486
  return this._stats;
520
487
  }
@@ -523,7 +490,7 @@ class ServerBackedDirectory {
523
490
  }
524
491
  get entries() {
525
492
  if (this._entries === undefined) {
526
- this._entries = getEntries(this._serverUri);
493
+ this._entries = getEntries(this._serverRoot, this.pathSegments);
527
494
  }
528
495
  return this._entries;
529
496
  }
@@ -539,8 +506,11 @@ function isEntry(e) {
539
506
  function isStat(e) {
540
507
  return e && (e.type === vscode_1.FileType.Directory || e.type === vscode_1.FileType.File) && typeof e.ctime === 'number' && typeof e.mtime === 'number' && typeof e.size === 'number';
541
508
  }
542
- async function getEntries(serverUri) {
543
- const url = serverUri.with({ query: 'readdir' }).toString(/*skipEncoding*/ true);
509
+ function getServerUri(serverRoot, pathSegments) {
510
+ return vscode_1.Uri.joinPath(serverRoot, ...pathSegments);
511
+ }
512
+ async function getEntries(serverRoot, pathSegments) {
513
+ const url = getServerUri(serverRoot, pathSegments).with({ query: 'readdir' }).toString(/*skipEncoding*/ true);
544
514
  const response = await (0, request_light_1.xhr)({ url });
545
515
  if (response.status === 200 && response.status <= 204) {
546
516
  try {
@@ -549,8 +519,8 @@ async function getEntries(serverUri) {
549
519
  const entries = new Map();
550
520
  for (const r of res) {
551
521
  if (isEntry(r)) {
552
- const childPath = vscode_1.Uri.joinPath(serverUri, r.name);
553
- const newEntry = r.type === vscode_1.FileType.Directory ? new ServerBackedDirectory(childPath, r.name) : new ServerBackedFile(childPath, r.name);
522
+ const newPathSegments = [...pathSegments, encodeURIComponent(r.name)];
523
+ const newEntry = r.type === vscode_1.FileType.Directory ? new ServerBackedDirectory(serverRoot, newPathSegments, r.name) : new ServerBackedFile(serverRoot, newPathSegments, r.name);
554
524
  entries.set(newEntry.name, newEntry);
555
525
  }
556
526
  }
@@ -567,7 +537,8 @@ async function getEntries(serverUri) {
567
537
  }
568
538
  return new Map();
569
539
  }
570
- async function getStats(serverUri) {
540
+ async function getStats(serverRoot, pathSegments) {
541
+ const serverUri = getServerUri(serverRoot, pathSegments);
571
542
  const url = serverUri.with({ query: 'stat' }).toString(/*skipEncoding*/ true);
572
543
  const response = await (0, request_light_1.xhr)({ url });
573
544
  if (response.status === 200 && response.status <= 204) {
@@ -579,7 +550,8 @@ async function getStats(serverUri) {
579
550
  }
580
551
  throw vscode_1.FileSystemError.FileNotFound(`Invalid server response for ${serverUri.toString(/*skipEncoding*/ true)}. Status ${response.status}.`);
581
552
  }
582
- async function getContent(serverUri) {
553
+ async function getContent(serverRoot, pathSegments) {
554
+ const serverUri = getServerUri(serverRoot, pathSegments);
583
555
  const response = await (0, request_light_1.xhr)({ url: serverUri.toString(/*skipEncoding*/ true) });
584
556
  if (response.status >= 200 && response.status <= 204) {
585
557
  return response.body;
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/vscode": "^1.81.0",
39
- "@types/webpack-env": "^1.18.1",
39
+ "@types/webpack-env": "^1.18.2",
40
40
  "ts-loader": "^9.4.4",
41
41
  "webpack": "^5.88.2",
42
42
  "webpack-cli": "^5.1.4",
package/out/index.js CHANGED
@@ -28,7 +28,7 @@ async function runTests(options) {
28
28
  extensionPaths: options.extensionPaths,
29
29
  extensionIds: options.extensionIds,
30
30
  coi: !!options.coi,
31
- esm: !!options.esm
31
+ esm: !!options.esm,
32
32
  };
33
33
  const host = options.host ?? 'localhost';
34
34
  const port = options.port ?? 3000;
@@ -76,7 +76,7 @@ async function getBuild(options) {
76
76
  if (options.vsCodeDevPath) {
77
77
  return {
78
78
  type: 'sources',
79
- location: options.vsCodeDevPath
79
+ location: options.vsCodeDevPath,
80
80
  };
81
81
  }
82
82
  const quality = options.quality || options.version;
@@ -94,7 +94,7 @@ async function open(options) {
94
94
  extensionPaths: options.extensionPaths,
95
95
  extensionIds: options.extensionIds,
96
96
  coi: !!options.coi,
97
- esm: !!options.esm
97
+ esm: !!options.esm,
98
98
  };
99
99
  const host = options.host ?? 'localhost';
100
100
  const port = options.port ?? 3000;
@@ -106,7 +106,7 @@ async function open(options) {
106
106
  dispose: () => {
107
107
  server.close();
108
108
  context?.browser()?.close();
109
- }
109
+ },
110
110
  };
111
111
  }
112
112
  exports.open = open;
@@ -143,7 +143,7 @@ async function openBrowser(endpoint, options, configPage) {
143
143
  }
144
144
  });
145
145
  });
146
- const page = context.pages()[0] ?? await context.newPage();
146
+ const page = context.pages()[0] ?? (await context.newPage());
147
147
  if (configPage) {
148
148
  await configPage(page, browser);
149
149
  }
@@ -160,7 +160,7 @@ async function openBrowser(endpoint, options, configPage) {
160
160
  }
161
161
  function validateStringOrUndefined(options, name) {
162
162
  const value = options[name];
163
- if (value === undefined || (typeof value === 'string')) {
163
+ if (value === undefined || typeof value === 'string') {
164
164
  return value;
165
165
  }
166
166
  console.log(`'${name}' needs to be a string value.`);
@@ -173,7 +173,7 @@ async function validatePathOrUndefined(options, name, isFile) {
173
173
  }
174
174
  function validateBooleanOrUndefined(options, name) {
175
175
  const value = options[name];
176
- if (value === undefined || (typeof value === 'boolean')) {
176
+ if (value === undefined || typeof value === 'boolean') {
177
177
  return value;
178
178
  }
179
179
  console.log(`'${name}' needs to be a boolean value.`);
@@ -199,7 +199,7 @@ function validateBrowserType(options) {
199
199
  if (options.browserType && options.browser) {
200
200
  console.log(`Ignoring browserType option '${options.browserType}' as browser option '${options.browser}' is set.`);
201
201
  }
202
- if ((typeof browserType === 'string') && ['chromium', 'firefox', 'webkit', 'none'].includes(browserType)) {
202
+ if (typeof browserType === 'string' && ['chromium', 'firefox', 'webkit', 'none'].includes(browserType)) {
203
203
  return browserType;
204
204
  }
205
205
  console.log(`Invalid browser option ${browserType}.`);
@@ -257,7 +257,7 @@ async function validateExtensionIds(extensionIds) {
257
257
  if (Array.isArray(extensionIds)) {
258
258
  const res = [];
259
259
  for (const extensionId of extensionIds) {
260
- const m = (typeof extensionId === 'string' && extensionId.match(EXTENSION_IDENTIFIER_PATTERN));
260
+ const m = typeof extensionId === 'string' && extensionId.match(EXTENSION_IDENTIFIER_PATTERN);
261
261
  if (m) {
262
262
  if (m[2]) {
263
263
  res.push({ id: m[1], preRelease: true });
@@ -282,13 +282,13 @@ async function validateExtensionIds(extensionIds) {
282
282
  async function validatePath(loc, isFile) {
283
283
  loc = path.resolve(loc);
284
284
  if (isFile) {
285
- if (!await (0, download_1.fileExists)(loc)) {
285
+ if (!(await (0, download_1.fileExists)(loc))) {
286
286
  console.log(`'${loc}' must be an existing file.`);
287
287
  process.exit(-1);
288
288
  }
289
289
  }
290
290
  else {
291
- if (!await (0, download_1.directoryExists)(loc)) {
291
+ if (!(await (0, download_1.directoryExists)(loc))) {
292
292
  console.log(`'${loc}' must be an existing folder.`);
293
293
  process.exit(-1);
294
294
  }
@@ -304,7 +304,7 @@ function validateQuality(quality, version, vsCodeDevPath) {
304
304
  console.log(`Sources folder is provided as input, quality is ignored.`);
305
305
  return undefined;
306
306
  }
307
- if (quality === undefined || ((typeof quality === 'string') && ['insiders', 'stable'].includes(quality))) {
307
+ if (quality === undefined || (typeof quality === 'string' && ['insiders', 'stable'].includes(quality))) {
308
308
  return quality;
309
309
  }
310
310
  if (version === 'sources') {
@@ -368,7 +368,7 @@ async function cliMain() {
368
368
  process.exit();
369
369
  }
370
370
  return true;
371
- }
371
+ },
372
372
  };
373
373
  const args = minimist(process.argv.slice(2), options);
374
374
  if (args.help) {
@@ -427,7 +427,7 @@ async function cliMain() {
427
427
  coi,
428
428
  host,
429
429
  port,
430
- testRunnerDataDir
430
+ testRunnerDataDir,
431
431
  }).catch(e => {
432
432
  console.log('Error running tests:', e);
433
433
  process.exit(1);
@@ -453,7 +453,7 @@ async function cliMain() {
453
453
  coi,
454
454
  host,
455
455
  port,
456
- testRunnerDataDir
456
+ testRunnerDataDir,
457
457
  });
458
458
  }
459
459
  }
package/out/server/app.js CHANGED
@@ -79,7 +79,7 @@ async function createApp(config) {
79
79
  console.log('Serving VS Code sources from ' + config.build.location);
80
80
  app.use(kmount('/static/sources', kstatic(config.build.location, serveOptions)));
81
81
  app.use(kmount('/static/sources', kstatic((0, path_1.join)(config.build.location, 'resources', 'server'), serveOptions))); // for manifest.json, favicon and code icons.
82
- // built-in extension are at 'extensions` as well as prebuilt extensions dowloaded from the marketplace
82
+ // built-in extension are at 'extensions` as well as prebuilt extensions downloaded from the marketplace
83
83
  app.use(kmount(`/static/sources/extensions`, kstatic((0, path_1.join)(config.build.location, extensions_1.prebuiltExtensionsLocation), serveOptions)));
84
84
  }
85
85
  (0, mounts_1.configureMounts)(config, app);
@@ -57,7 +57,7 @@ async function getScannedBuiltinExtensions(vsCodeDevLocation) {
57
57
  browserMain = browserMain + '.js';
58
58
  }
59
59
  const browserMainLocation = path.join(vsCodeDevLocation, 'extensions', ext.extensionPath, browserMain);
60
- if (!await (0, download_1.fileExists)(browserMainLocation)) {
60
+ if (!(await (0, download_1.fileExists)(browserMainLocation))) {
61
61
  console.log(`${browserMainLocation} not found. Make sure all extensions are compiled (use 'yarn watch-web').`);
62
62
  }
63
63
  }
@@ -27,14 +27,14 @@ function fileOps(mountPrefix, folderMountPath) {
27
27
  const router = new Router();
28
28
  router.get(`${mountPrefix}(/.*)?`, async (ctx, next) => {
29
29
  if (ctx.query.stat !== undefined) {
30
- const p = path.join(folderMountPath, ctx.path.substring(mountPrefix.length));
30
+ const p = path.join(folderMountPath, decodeURIComponent(ctx.path.substring(mountPrefix.length)));
31
31
  try {
32
32
  const stats = await fs_1.promises.stat(p);
33
33
  ctx.body = {
34
34
  type: getFileType(stats),
35
35
  ctime: stats.ctime.getTime(),
36
36
  mtime: stats.mtime.getTime(),
37
- size: stats.size
37
+ size: stats.size,
38
38
  };
39
39
  }
40
40
  catch (e) {
@@ -42,10 +42,10 @@ function fileOps(mountPrefix, folderMountPath) {
42
42
  }
43
43
  }
44
44
  else if (ctx.query.readdir !== undefined) {
45
- const p = path.join(folderMountPath, ctx.path.substring(mountPrefix.length));
45
+ const p = path.join(folderMountPath, decodeURIComponent(ctx.path.substring(mountPrefix.length)));
46
46
  try {
47
47
  const entries = await fs_1.promises.readdir(p, { withFileTypes: true });
48
- ctx.body = entries.map(d => ({ name: d.name, type: getFileType(d) }));
48
+ ctx.body = entries.map((d) => ({ name: d.name, type: getFileType(d) }));
49
49
  }
50
50
  catch (e) {
51
51
  ctx.body = { error: e.code };
@@ -31,7 +31,7 @@ class Workbench {
31
31
  WORKBENCH_AUTH_SESSION: '',
32
32
  WORKBENCH_WEB_BASE_URL: this.baseUrl,
33
33
  WORKBENCH_BUILTIN_EXTENSIONS: asJSON(this.builtInExtensions),
34
- WORKBENCH_MAIN: this.getMain()
34
+ WORKBENCH_MAIN: this.getMain(),
35
35
  };
36
36
  try {
37
37
  const workbenchTemplate = (await fs_1.promises.readFile(path.resolve(__dirname, `../../views/workbench${this.esm ? '-esm' : ''}.html`))).toString();
@@ -75,7 +75,7 @@ async function getWorkbenchOptions(ctx, config) {
75
75
  options.additionalBuiltinExtensions.push(...config.extensionIds);
76
76
  }
77
77
  if (config.extensionDevelopmentPath) {
78
- const developmentOptions = options.developmentOptions = {};
78
+ const developmentOptions = (options.developmentOptions = {});
79
79
  developmentOptions.extensions = await (0, extensions_1.scanForExtensions)(config.extensionDevelopmentPath, { scheme: ctx.protocol, authority: ctx.host, path: '/static/devextensions' });
80
80
  if (config.extensionTestsPath) {
81
81
  let relativePath = path.relative(config.extensionDevelopmentPath, config.extensionTestsPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vscode/test-web",
3
- "version": "0.0.45",
3
+ "version": "0.0.47",
4
4
  "scripts": {
5
5
  "install-extensions": "yarn --cwd=fs-provider && yarn --cwd=sample",
6
6
  "compile": "tsc -p ./ && yarn compile-fs-provider",
@@ -30,28 +30,29 @@
30
30
  "koa-mount": "^4.0.0",
31
31
  "koa-static": "^5.0.0",
32
32
  "minimist": "^1.2.8",
33
- "playwright": "^1.37.1",
33
+ "playwright": "^1.38.1",
34
+ "@playwright/browser-chromium": "^1.38.1",
34
35
  "vscode-uri": "^3.0.7",
35
36
  "http-proxy-agent": "^7.0.0",
36
- "https-proxy-agent": "^7.0.1",
37
+ "https-proxy-agent": "^7.0.2",
37
38
  "tar-fs": "^3.0.4",
38
39
  "gunzip-maybe": "^1.4.2"
39
40
  },
40
41
  "devDependencies": {
41
- "@types/koa": "^2.13.8",
42
- "@types/koa-morgan": "^1.0.5",
43
- "@types/koa-mount": "^4.0.2",
42
+ "@types/koa": "^2.13.9",
43
+ "@types/koa-morgan": "^1.0.6",
44
+ "@types/koa-mount": "^4.0.3",
44
45
  "@types/koa-static": "^4.0.2",
45
- "@types/koa__router": "^12.0.0",
46
- "@types/minimist": "^1.2.2",
47
- "@types/node": "16.x",
46
+ "@types/koa__router": "^12.0.1",
47
+ "@types/minimist": "^1.2.3",
48
+ "@types/node": "^20.8.4",
48
49
  "@types/gunzip-maybe": "^1.4.0",
49
- "@types/tar-fs": "^2.0.1",
50
- "@typescript-eslint/eslint-plugin": "^6.4.1",
51
- "@typescript-eslint/parser": "^6.4.1",
52
- "eslint": "^8.47.0",
50
+ "@types/tar-fs": "^2.0.2",
51
+ "@typescript-eslint/eslint-plugin": "^6.7.3",
52
+ "@typescript-eslint/parser": "^6.7.3",
53
+ "eslint": "^8.51.0",
53
54
  "eslint-plugin-header": "^3.1.1",
54
- "typescript": "^5.1.6"
55
+ "typescript": "^5.2.2"
55
56
  },
56
57
  "license": "MIT",
57
58
  "author": "Visual Studio Code Team",