@vscode/test-web 0.0.20 → 0.0.24

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+
4
+ ## 0.0.22
5
+ * new option `--printServerLog` replacing `--hideServerLog`
6
+ * new option `--browser` replacing `--browserType`
7
+
3
8
  ## 0.0.20
4
9
  * new option `--extensionId publisher.name[@prerelease]` to include one or more extensions
5
10
 
package/README.md CHANGED
@@ -67,21 +67,21 @@ CLI options:
67
67
 
68
68
  |Option|Argument Description|
69
69
  |-----|-----|
70
- | --browserType | The browser to launch: `chromium` (default), `firefox`, `webkit` or `none` |
70
+ | --browser | The browser to launch: `chromium` (default), `firefox`, `webkit` or `none`. |
71
71
  | --extensionDevelopmentPath | A path pointing to an extension under development to include. |
72
72
  | --extensionTestsPath | A path to a test module to run. |
73
73
  | --quality | `insiders` (default), or `stable`. Ignored when sourcesPath is provided. |
74
- | --sourcesPath | If set, runs the server from VS Code sources located at the given path. Make sure the sources and extensions are compiled (`yarn compile` and `yarn compile-web`) |
74
+ | --sourcesPath | If set, runs the server from VS Code sources located at the given path. Make sure the sources and extensions are compiled (`yarn compile` and `yarn compile-web`). |
75
75
  | --headless | If set, hides the browser. Defaults to true when an extensionTestsPath is provided, otherwise false. |
76
- | --permission | Permission granted to the opened browser: e.g. `clipboard-read`, `clipboard-write`. See [full list of options](https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions). Argument can be provided multiple times. |
77
- | --folder-uri | URI of the workspace to open VS Code on. Ignored when `folderPath` is provided |
76
+ | --permission | Permission granted to the opened browser: e.g. `clipboard-read`, `clipboard-write`. See [full list of options](https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions). Argument can be provided multiple times. |
77
+ | --folder-uri | URI of the workspace to open VS Code on. Ignored when `folderPath` is provided. |
78
78
  | --extensionPath | A path pointing to a folder containing additional extensions to include. Argument can be provided multiple times. |
79
- | --extensionId | The id of an extension include. The format is `${publisher}.${name}`. Append `@prerelease` to use the prerelease version |
80
- | --host | The host name the server is opened on. Defaults to `localhost` |
81
- | --port | The port the server is opened on. Defaults to `3000` |
82
- | --open-devtools | If set, opens the dev tools in the browser |
83
- | --verbose | If set, prints out more information when running the server |
84
- | --hideServerLog | If set, hides the server log. Defaults to true when an extensionTestsPath is provided, otherwise false. |
79
+ | --extensionId | The id of an extension include. The format is `${publisher}.${name}`. Append `@prerelease` to use the prerelease version. |
80
+ | --host | The host name the server is opened on. Defaults to `localhost`. |
81
+ | --port | The port the server is opened on. Defaults to `3000`. |
82
+ | --open-devtools | If set, opens the dev tools in the browser. |
83
+ | --verbose | If set, prints out more information when running the server. |
84
+ | --printServerLog | If set, prints the server access log. |
85
85
  | folderPath | A local folder to open VS Code on. The folder content will be available as a virtual file system and opened as workspace. |
86
86
 
87
87
  Corresponding options are available in the API.
@@ -207,7 +207,7 @@ __webpack_require__.r(__webpack_exports__);
207
207
  /* harmony export */ "Utils": () => (/* binding */ Utils)
208
208
  /* harmony export */ });
209
209
  /* provided dependency */ var process = __webpack_require__(5);
210
- var LIB;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,f=a<s?a:s,u=-1,c=0;c<=f;++c){if(c===f){if(s>f){if(47===r.charCodeAt(h+c))return r.slice(h+c+1);if(0===c)return r.slice(h+c)}else a>f&&(47===t.charCodeAt(o+c)?u=c:0===c&&(u=0));break}var l=t.charCodeAt(o+c);if(l!==r.charCodeAt(h+c))break;47===l&&(u=c)}var p="";for(c=o+u+1;c<=i;++c)c!==i&&47!==t.charCodeAt(c)||(0===p.length?p+="..":p+="/..");return p.length>0?p+r.slice(h+u):(h+=u,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 f=t.charCodeAt(n);if(47===f){if(!a){o=n+1;break}}else-1===s&&(a=!1,s=n+1),h>=0&&(f===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,f=!0,u=t.length-1,c=0;u>=n;--u)if(47!==(o=t.charCodeAt(u)))-1===s&&(f=!1,s=u+1),46===o?-1===a?a=u:1!==c&&(c=1):-1!==a&&(c=-1);else if(!f){h=u+1;break}return-1===a||-1===s||0===c||1===c&&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},447:(t,e,r)=>{var n;if(r.r(e),r.d(e,{URI:()=>g,Utils:()=>O}),"object"==typeof process)n="win32"===process.platform;else if("object"==typeof navigator){var o=navigator.userAgent;n=o.indexOf("Windows")>=0}var i,a,h=(i=function(t,e){return(i=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])})(t,e)},function(t,e){function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=/^\w[\w\d+.-]*$/,f=/^\//,u=/^\/\//,c="",l="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,g=function(){function t(t,e,r,n,o,i){void 0===i&&(i=!1),"object"==typeof t?(this.scheme=t.scheme||c,this.authority=t.authority||c,this.path=t.path||c,this.query=t.query||c,this.fragment=t.fragment||c):(this.scheme=function(t,e){return t||e?t:"file"}(t,i),this.authority=e||c,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||c),this.query=n||c,this.fragment=o||c,function(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&&!s.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!f.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(u.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 ("//")')}(this,i))}return t.isUri=function(e){return e instanceof t||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"function"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString},Object.defineProperty(t.prototype,"fsPath",{get:function(){return C(this,!1)},enumerable:!1,configurable:!0}),t.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=c),void 0===r?r=this.authority:null===r&&(r=c),void 0===n?n=this.path:null===n&&(n=c),void 0===o?o=this.query:null===o&&(o=c),void 0===i?i=this.fragment:null===i&&(i=c),e===this.scheme&&r===this.authority&&n===this.path&&o===this.query&&i===this.fragment?this:new v(e,r,n,o,i)},t.parse=function(t,e){void 0===e&&(e=!1);var r=p.exec(t);return r?new v(r[2]||c,x(r[4]||c),x(r[5]||c),x(r[7]||c),x(r[9]||c),e):new v(c,c,c,c,c)},t.file=function(t){var e=c;if(n&&(t=t.replace(/\\/g,l)),t[0]===l&&t[1]===l){var r=t.indexOf(l,2);-1===r?(e=t.substring(2),t=l):(e=t.substring(2,r),t=t.substring(r)||l)}return new v("file",e,t,c,c)},t.from=function(t){return new v(t.scheme,t.authority,t.path,t.query,t.fragment)},t.prototype.toString=function(t){return void 0===t&&(t=!1),A(this,t)},t.prototype.toJSON=function(){return this},t.revive=function(e){if(e){if(e instanceof t)return e;var r=new v(e);return r._formatted=e.external,r._fsPath=e._sep===d?e.fsPath:null,r}return e},t}(),d=n?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 h(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),m=((a={})[58]="%3A",a[47]="%2F",a[63]="%3F",a[35]="%23",a[91]="%5B",a[93]="%5D",a[64]="%40",a[33]="%21",a[36]="%24",a[38]="%26",a[39]="%27",a[40]="%28",a[41]="%29",a[42]="%2A",a[43]="%2B",a[44]="%2C",a[59]="%3B",a[61]="%3D",a[32]="%20",a);function y(t,e){for(var r=void 0,n=-1,o=0;o<t.length;o++){var i=t.charCodeAt(o);if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||45===i||46===i||95===i||126===i||e&&47===i)-1!==n&&(r+=encodeURIComponent(t.substring(n,o)),n=-1),void 0!==r&&(r+=t.charAt(o));else{void 0===r&&(r=t.substr(0,o));var a=m[i];void 0!==a?(-1!==n&&(r+=encodeURIComponent(t.substring(n,o)),n=-1),r+=a):-1===n&&(n=o)}}return-1!==n&&(r+=encodeURIComponent(t.substring(n))),void 0!==r?r: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+=m[n]):void 0!==e&&(e+=t[r])}return void 0!==e?e:t}function C(t,e){var 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&&(r=r.replace(/\//g,"\\")),r}function A(t,e){var r=e?b:y,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 f=i.indexOf("@");if(-1!==f){var u=i.substr(0,f);i=i.substr(f+1),-1===(f=u.indexOf(":"))?n+=r(u,!1):(n+=r(u.substr(0,f),!1),n+=":",n+=r(u.substr(f+1),!1)),n+="@"}-1===(f=(i=i.toLowerCase()).indexOf(":"))?n+=r(i,!1):(n+=r(i.substr(0,f),!1),n+=i.substr(f))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2))(c=a.charCodeAt(1))>=65&&c<=90&&(a="/"+String.fromCharCode(c+32)+":"+a.substr(3));else if(a.length>=2&&58===a.charCodeAt(1)){var c;(c=a.charCodeAt(0))>=65&&c<=90&&(a=String.fromCharCode(c+32)+":"+a.substr(2))}n+=r(a,!0)}return h&&(n+="?",n+=r(h,!1)),s&&(n+="#",n+=e?s:y(s,!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 _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function x(t){return t.match(_)?t.replace(_,(function(t){return w(t)})):t}var O,P=r(470),j=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,h=i.length;a<h;a++,o++)n[o]=i[a];return n},U=P.posix||P;!function(t){t.joinPath=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return t.with({path:U.join.apply(U,j([t.path],e))})},t.resolvePath=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=t.path||"/";return t.with({path:U.resolve.apply(U,j([n],e))})},t.dirname=function(t){var e=U.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)?t:t.with({path:e})},t.basename=function(t){return U.basename(t.path)},t.extname=function(t){return U.extname(t.path)}}(O||(O={}))}},e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}return 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})},r(447)})();const{URI,Utils}=LIB;
210
+ var LIB;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},447:(t,e,r)=>{var n;if(r.r(e),r.d(e,{URI:()=>d,Utils:()=>P}),"object"==typeof process)n="win32"===process.platform;else if("object"==typeof navigator){var o=navigator.userAgent;n=o.indexOf("Windows")>=0}var i,a,h=(i=function(t,e){return(i=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])})(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}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=/^\w[\w\d+.-]*$/,c=/^\//,f=/^\/\//;function u(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&&!s.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!c.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(f.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 l="",p="/",g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,d=function(){function t(t,e,r,n,o,i){void 0===i&&(i=!1),"object"==typeof t?(this.scheme=t.scheme||l,this.authority=t.authority||l,this.path=t.path||l,this.query=t.query||l,this.fragment=t.fragment||l):(this.scheme=function(t,e){return t||e?t:"file"}(t,i),this.authority=e||l,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==p&&(e=p+e):e=p}return e}(this.scheme,r||l),this.query=n||l,this.fragment=o||l,u(this,i))}return t.isUri=function(e){return e instanceof t||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString},Object.defineProperty(t.prototype,"fsPath",{get:function(){return A(this,!1)},enumerable:!1,configurable:!0}),t.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=l),void 0===r?r=this.authority:null===r&&(r=l),void 0===n?n=this.path:null===n&&(n=l),void 0===o?o=this.query:null===o&&(o=l),void 0===i?i=this.fragment:null===i&&(i=l),e===this.scheme&&r===this.authority&&n===this.path&&o===this.query&&i===this.fragment?this:new y(e,r,n,o,i)},t.parse=function(t,e){void 0===e&&(e=!1);var r=g.exec(t);return r?new y(r[2]||l,O(r[4]||l),O(r[5]||l),O(r[7]||l),O(r[9]||l),e):new y(l,l,l,l,l)},t.file=function(t){var e=l;if(n&&(t=t.replace(/\\/g,p)),t[0]===p&&t[1]===p){var r=t.indexOf(p,2);-1===r?(e=t.substring(2),t=p):(e=t.substring(2,r),t=t.substring(r)||p)}return new y("file",e,t,l,l)},t.from=function(t){var e=new y(t.scheme,t.authority,t.path,t.query,t.fragment);return u(e,!0),e},t.prototype.toString=function(t){return void 0===t&&(t=!1),w(this,t)},t.prototype.toJSON=function(){return this},t.revive=function(e){if(e){if(e instanceof t)return e;var r=new y(e);return r._formatted=e.external,r._fsPath=e._sep===v?e.fsPath:null,r}return e},t}(),v=n?1:void 0,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._formatted=null,e._fsPath=null,e}return h(e,t),Object.defineProperty(e.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=A(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),e.prototype.toString=function(t){return void 0===t&&(t=!1),t?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)},e.prototype.toJSON=function(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=v),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}(d),m=((a={})[58]="%3A",a[47]="%2F",a[63]="%3F",a[35]="%23",a[91]="%5B",a[93]="%5D",a[64]="%40",a[33]="%21",a[36]="%24",a[38]="%26",a[39]="%27",a[40]="%28",a[41]="%29",a[42]="%2A",a[43]="%2B",a[44]="%2C",a[59]="%3B",a[61]="%3D",a[32]="%20",a);function b(t,e){for(var r=void 0,n=-1,o=0;o<t.length;o++){var i=t.charCodeAt(o);if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||45===i||46===i||95===i||126===i||e&&47===i)-1!==n&&(r+=encodeURIComponent(t.substring(n,o)),n=-1),void 0!==r&&(r+=t.charAt(o));else{void 0===r&&(r=t.substr(0,o));var a=m[i];void 0!==a?(-1!==n&&(r+=encodeURIComponent(t.substring(n,o)),n=-1),r+=a):-1===n&&(n=o)}}return-1!==n&&(r+=encodeURIComponent(t.substring(n))),void 0!==r?r:t}function C(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+=m[n]):void 0!==e&&(e+=t[r])}return void 0!==e?e:t}function A(t,e){var r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?"//".concat(t.authority).concat(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&&(r=r.replace(/\//g,"\\")),r}function w(t,e){var r=e?C:b,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+=p,n+=p),i){var c=i.indexOf("@");if(-1!==c){var f=i.substr(0,c);i=i.substr(c+1),-1===(c=f.indexOf(":"))?n+=r(f,!1):(n+=r(f.substr(0,c),!1),n+=":",n+=r(f.substr(c+1),!1)),n+="@"}-1===(c=(i=i.toLowerCase()).indexOf(":"))?n+=r(i,!1):(n+=r(i.substr(0,c),!1),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)}return h&&(n+="?",n+=r(h,!1)),s&&(n+="#",n+=e?s:b(s,!1)),n}function x(t){try{return decodeURIComponent(t)}catch(e){return t.length>3?t.substr(0,3)+x(t.substr(3)):t}}var _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function O(t){return t.match(_)?t.replace(_,(function(t){return x(t)})):t}var P,j=r(470),U=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=j.posix||j;!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,U([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||"/";return t.with({path:I.resolve.apply(I,U([n],e,!1))})},t.dirname=function(t){var e=I.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)?t:t.with({path:e})},t.basename=function(t){return I.basename(t.path)},t.extname=function(t){return I.extname(t.path)}}(P||(P={}))}},e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}return 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})},r(447)})();const{URI,Utils}=LIB;
211
211
  //# sourceMappingURL=index.js.map
212
212
 
213
213
  /***/ }),
@@ -15,6 +15,18 @@
15
15
  "activationEvents": [
16
16
  "onFileSystem:vscode-test-web"
17
17
  ],
18
+ "contributes": {
19
+ "resourceLabelFormatters": [
20
+ {
21
+ "authority": "mount",
22
+ "scheme": "vscode-test-web",
23
+ "formatting": {
24
+ "workspaceSuffix": "Test Files",
25
+ "label": "${path}"
26
+ }
27
+ }
28
+ ]
29
+ },
18
30
  "browser": "./dist/fsExtensionMain.js",
19
31
  "scripts": {
20
32
  "vscode:prepublish": "npm run package-web",
@@ -24,13 +36,13 @@
24
36
  },
25
37
  "devDependencies": {
26
38
  "@types/vscode": "^1.55.0",
27
- "@types/webpack-env": "^1.16.2",
28
- "ts-loader": "^9.2.6",
29
- "webpack": "^5.55.0",
30
- "webpack-cli": "^4.8.0",
39
+ "@types/webpack-env": "^1.16.3",
40
+ "ts-loader": "^9.2.8",
41
+ "webpack": "^5.70.0",
42
+ "webpack-cli": "^4.9.2",
31
43
  "process": "^0.11.10",
32
44
  "path-browserify": "^1.0.1",
33
- "request-light": "^0.5.3",
34
- "vscode-uri": "^3.0.2"
45
+ "request-light": "^0.5.7",
46
+ "vscode-uri": "^3.0.3"
35
47
  }
36
48
  }
package/out/index.d.ts CHANGED
@@ -51,9 +51,13 @@ export interface Options {
51
51
  */
52
52
  headless?: boolean;
53
53
  /**
54
- * Do not show the server log. Defaults to `true` if a extensionTestsPath is provided, `false` otherwise.
54
+ * @deprecated. Use `printServerLog` instead.
55
55
  */
56
56
  hideServerLog?: boolean;
57
+ /**
58
+ * If set, the server access log is printed to the console. Defaults to `false`.
59
+ */
60
+ printServerLog?: boolean;
57
61
  /**
58
62
  * Expose browser debugging on this port number, and wait for the debugger to attach before running tests.
59
63
  */
package/out/index.js CHANGED
@@ -25,7 +25,7 @@ async function runTests(options) {
25
25
  build: await getBuild(options),
26
26
  folderUri: options.folderUri,
27
27
  folderMountPath: options.folderPath,
28
- hideServerLog: (_a = options.hideServerLog) !== null && _a !== void 0 ? _a : true,
28
+ printServerLog: (_a = options.printServerLog) !== null && _a !== void 0 ? _a : options.hideServerLog === false,
29
29
  extensionPaths: options.extensionPaths,
30
30
  extensionIds: options.extensionIds
31
31
  };
@@ -82,7 +82,7 @@ async function open(options) {
82
82
  build: await getBuild(options),
83
83
  folderUri: options.folderUri,
84
84
  folderMountPath: options.folderPath,
85
- hideServerLog: (_a = options.hideServerLog) !== null && _a !== void 0 ? _a : true,
85
+ printServerLog: (_a = options.printServerLog) !== null && _a !== void 0 ? _a : options.hideServerLog === false,
86
86
  extensionPaths: options.extensionPaths,
87
87
  extensionIds: options.extensionIds
88
88
  };
@@ -101,8 +101,6 @@ async function open(options) {
101
101
  };
102
102
  }
103
103
  exports.open = open;
104
- const width = 1200;
105
- const height = 800;
106
104
  async function openBrowser(endpoint, options) {
107
105
  var _a, _b;
108
106
  if (options.browserType === 'none') {
@@ -122,7 +120,7 @@ async function openBrowser(endpoint, options) {
122
120
  }
123
121
  const headless = (_a = options.headless) !== null && _a !== void 0 ? _a : options.extensionTestsPath !== undefined;
124
122
  const browser = await browserType.launch({ headless, args, devtools: options.devTools });
125
- const context = await browser.newContext();
123
+ const context = await browser.newContext({ viewport: null });
126
124
  if (options.permissions) {
127
125
  context.grantPermissions(options.permissions);
128
126
  }
@@ -146,7 +144,6 @@ async function openBrowser(endpoint, options) {
146
144
  console.log(message.text());
147
145
  });
148
146
  }
149
- await page.setViewportSize({ width, height });
150
147
  await page.goto(endpoint);
151
148
  return context;
152
149
  }
@@ -172,14 +169,29 @@ function validateBooleanOrUndefined(options, name) {
172
169
  showHelp();
173
170
  process.exit(-1);
174
171
  }
175
- function valdiateBrowserType(browserType) {
172
+ function validatePrintServerLog(options) {
173
+ const printServerLog = validateBooleanOrUndefined(options, 'printServerLog');
174
+ if (printServerLog !== undefined) {
175
+ return printServerLog;
176
+ }
177
+ const hideServerLog = validateBooleanOrUndefined(options, 'hideServerLog');
178
+ if (hideServerLog !== undefined) {
179
+ return !hideServerLog;
180
+ }
181
+ return false;
182
+ }
183
+ function valdiateBrowserType(options) {
184
+ const browserType = options.browser || options.browserType;
176
185
  if (browserType === undefined) {
177
186
  return 'chromium';
178
187
  }
188
+ if (options.browserType && options.browser) {
189
+ console.log(`Ignoring browserType option '${options.browserType}' as browser option '${options.browser}' is set.`);
190
+ }
179
191
  if ((typeof browserType === 'string') && ['chromium', 'firefox', 'webkit', 'none'].includes(browserType)) {
180
192
  return browserType;
181
193
  }
182
- console.log(`Invalid browser type.`);
194
+ console.log(`Invalid browser option ${browserType}.`);
183
195
  showHelp();
184
196
  process.exit(-1);
185
197
  }
@@ -304,22 +316,22 @@ function validatePortNumber(port) {
304
316
  }
305
317
  function showHelp() {
306
318
  console.log('Usage:');
307
- console.log(` --browserType 'chromium' | 'firefox' | 'webkit' | 'none': The browser to launch. [Optional, defaults to 'chromium']`);
319
+ console.log(` --browser 'chromium' | 'firefox' | 'webkit' | 'none': The browser to launch. [Optional, defaults to 'chromium']`);
308
320
  console.log(` --extensionDevelopmentPath path: A path pointing to an extension under development to include. [Optional]`);
309
321
  console.log(` --extensionTestsPath path: A path to a test module to run. [Optional]`);
310
322
  console.log(` --quality 'insiders' | 'stable' [Optional, default 'insiders', ignored when running from sources]`);
311
- console.log(` --sourcesPath path: If provided, running from VS Code sources at the given location [Optional]`);
312
- console.log(` --open-devtools: If set, opens the dev tools [Optional]`);
323
+ console.log(` --sourcesPath path: If provided, running from VS Code sources at the given location. [Optional]`);
324
+ console.log(` --open-devtools: If set, opens the dev tools. [Optional]`);
313
325
  console.log(` --headless: Whether to hide the browser. Defaults to true when an extensionTestsPath is provided, otherwise false. [Optional]`);
314
- console.log(` --permission: Permission granted in the opened browser: e.g. 'clipboard-read', 'clipboard-write': [Optional, Multiple]`);
315
- console.log(` --folder-uri: workspace to open VS Code on. Ignored when folderPath is provided [Optional]`);
326
+ console.log(` --permission: Permission granted in the opened browser: e.g. 'clipboard-read', 'clipboard-write'. [Optional, Multiple]`);
327
+ console.log(` --folder-uri: workspace to open VS Code on. Ignored when folderPath is provided. [Optional]`);
316
328
  console.log(` --extensionPath: A path pointing to a folder containing additional extensions to include [Optional, Multiple]`);
317
329
  console.log(` --extensionId: The id of an extension include. The format is '\${publisher}.\${name}'. Append '@prerelease' to use a prerelease version [Optional, Multiple]`);
318
- console.log(` --host: The host name the server is opened on [Optional, defaults to localhost]`);
319
- console.log(` --port: The port the server is opened on [Optional, defaults to 3000]`);
320
- console.log(` --open-devtools: If set, opens the dev tools [Optional]`);
321
- console.log(` --verbose: If set, prints out more information when running the server [Optional]`);
322
- console.log(` --hideServerLog: Whether to hide the server log. Defaults to true when an extensionTestsPath is provided, otherwise false. [Optional]`);
330
+ console.log(` --host: The host name the server is opened on. [Optional, defaults to localhost]`);
331
+ console.log(` --port: The port the server is opened on. [Optional, defaults to 3000]`);
332
+ console.log(` --open-devtools: If set, opens the dev tools. [Optional]`);
333
+ console.log(` --verbose: If set, prints out more information when running the server. [Optional]`);
334
+ console.log(` --printServerLog: If set, prints the server access log. [Optional]`);
323
335
  console.log(` folderPath. A local folder to open VS Code on. The folder content will be available as a virtual file system. [Optional]`);
324
336
  }
325
337
  async function cliMain() {
@@ -327,8 +339,8 @@ async function cliMain() {
327
339
  const manifest = require('../package.json');
328
340
  console.log(`${manifest.name}: ${manifest.version}`);
329
341
  const options = {
330
- string: ['extensionDevelopmentPath', 'extensionTestsPath', 'browserType', 'quality', 'version', 'waitForDebugger', 'folder-uri', 'permission', 'extensionPath', 'extensionId', 'sourcesPath', 'host', 'port'],
331
- boolean: ['open-devtools', 'headless', 'hideServerLog', 'help', 'verbose'],
342
+ string: ['extensionDevelopmentPath', 'extensionTestsPath', 'browser', 'browserType', 'quality', 'version', 'waitForDebugger', 'folder-uri', 'permission', 'extensionPath', 'extensionId', 'sourcesPath', 'host', 'port'],
343
+ boolean: ['open-devtools', 'headless', 'hideServerLog', 'printServerLog', 'help', 'verbose'],
332
344
  unknown: arg => {
333
345
  if (arg.startsWith('-')) {
334
346
  console.log(`Unknown argument ${arg}`);
@@ -343,7 +355,7 @@ async function cliMain() {
343
355
  showHelp();
344
356
  process.exit();
345
357
  }
346
- const browserType = valdiateBrowserType(args.browserType);
358
+ const browserType = valdiateBrowserType(args);
347
359
  const extensionTestsPath = await validatePathOrUndefined(args, 'extensionTestsPath', true);
348
360
  const extensionDevelopmentPath = await validatePathOrUndefined(args, 'extensionDevelopmentPath');
349
361
  const extensionPaths = await valdiateExtensionPaths(args.extensionPath);
@@ -353,7 +365,7 @@ async function cliMain() {
353
365
  const devTools = validateBooleanOrUndefined(args, 'open-devtools');
354
366
  const headless = validateBooleanOrUndefined(args, 'headless');
355
367
  const permissions = valdiatePermissions(args.permission);
356
- const hideServerLog = validateBooleanOrUndefined(args, 'hideServerLog');
368
+ const printServerLog = validatePrintServerLog(args);
357
369
  const verbose = validateBooleanOrUndefined(args, 'verbose');
358
370
  const port = validatePortNumber(args.port);
359
371
  const host = validateStringOrUndefined(args, 'host');
@@ -382,7 +394,7 @@ async function cliMain() {
382
394
  folderUri,
383
395
  folderPath,
384
396
  headless,
385
- hideServerLog,
397
+ printServerLog: printServerLog,
386
398
  permissions,
387
399
  extensionPaths,
388
400
  extensionIds,
@@ -405,7 +417,7 @@ async function cliMain() {
405
417
  folderUri,
406
418
  folderPath,
407
419
  headless,
408
- hideServerLog,
420
+ printServerLog: printServerLog,
409
421
  permissions,
410
422
  extensionPaths,
411
423
  extensionIds,
package/out/server/app.js CHANGED
@@ -8,15 +8,25 @@ const Koa = require("koa");
8
8
  const morgan = require("koa-morgan");
9
9
  const kstatic = require("koa-static");
10
10
  const kmount = require("koa-mount");
11
+ const cors = require("@koa/cors");
11
12
  const path_1 = require("path");
12
13
  const workbench_1 = require("./workbench");
13
14
  const mounts_1 = require("./mounts");
14
15
  const extensions_1 = require("./extensions");
15
16
  async function createApp(config) {
16
17
  const app = new Koa();
17
- if (!config.hideServerLog) {
18
- app.use(morgan('dev'));
19
- }
18
+ app.use(morgan('dev', { skip: (req, res) => res.statusCode >= 200 && res.statusCode < 300 }));
19
+ // CORS
20
+ app.use(cors({
21
+ allowMethods: ['GET'],
22
+ credentials: true,
23
+ origin: (ctx) => {
24
+ if (/^https:\/\/[^.]+\.vscode-webview\.net$/.test(ctx.get('Origin'))) {
25
+ return ctx.get('Origin');
26
+ }
27
+ return undefined;
28
+ },
29
+ }));
20
30
  // this is here such that the iframe worker can fetch the extension files
21
31
  app.use((ctx, next) => {
22
32
  ctx.set('Access-Control-Allow-Origin', '*');
@@ -49,7 +49,7 @@ async function getScannedBuiltinExtensions(vsCodeDevLocation) {
49
49
  // use the build utility as to not duplicate the code
50
50
  const extensionsUtil = await Promise.resolve().then(() => require(path.join(vsCodeDevLocation, 'build', 'lib', 'extensions.js')));
51
51
  const localExtensions = extensionsUtil.scanBuiltinExtensions(path.join(vsCodeDevLocation, 'extensions'));
52
- const prebuiltExtensions = extensionsUtil.scanBuiltinExtensions(path.join(vsCodeDevLocation, 'prebuiltExtensionsLocation'));
52
+ const prebuiltExtensions = extensionsUtil.scanBuiltinExtensions(path.join(vsCodeDevLocation, exports.prebuiltExtensionsLocation));
53
53
  for (const ext of localExtensions) {
54
54
  let browserMain = ext.packageJSON.browser;
55
55
  if (browserMain) {
@@ -50,13 +50,14 @@ class Workbench {
50
50
  async function getWorkbenchOptions(ctx, config) {
51
51
  const options = {};
52
52
  if (config.extensionPaths) {
53
- await Promise.all(config.extensionPaths.map(async (extensionPath, index) => {
54
- options.additionalBuiltinExtensions = await (0, extensions_1.scanForExtensions)(extensionPath, {
53
+ const extensionPromises = config.extensionPaths.map((extensionPath, index) => {
54
+ return (0, extensions_1.scanForExtensions)(extensionPath, {
55
55
  scheme: ctx.protocol,
56
56
  authority: ctx.host,
57
57
  path: `/static/extensions/${index}`,
58
58
  });
59
- }));
59
+ });
60
+ options.additionalBuiltinExtensions = (await Promise.all(extensionPromises)).flat();
60
61
  }
61
62
  if (config.extensionIds) {
62
63
  if (!options.additionalBuiltinExtensions) {
@@ -89,6 +90,10 @@ async function getWorkbenchOptions(ctx, config) {
89
90
  else if (config.folderUri) {
90
91
  options.folderUri = vscode_uri_1.URI.parse(config.folderUri);
91
92
  }
93
+ else {
94
+ options.workspaceUri = vscode_uri_1.URI.from({ scheme: 'tmp', path: `/default.code-workspace` });
95
+ }
96
+ options.productConfiguration = { enableTelemetry: false };
92
97
  return options;
93
98
  }
94
99
  function default_1(config) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vscode/test-web",
3
- "version": "0.0.20",
3
+ "version": "0.0.24",
4
4
  "scripts": {
5
5
  "install-extensions": "yarn --cwd=fs-provider && yarn --cwd=sample",
6
6
  "compile": "tsc -p ./ && yarn compile-fs-provider",
@@ -12,7 +12,8 @@
12
12
  "compile-fs-provider": "yarn --cwd=fs-provider compile-web",
13
13
  "compile-sample": "yarn --cwd=sample compile-web",
14
14
  "sample": "npm run compile && npm run compile-sample && node . --extensionDevelopmentPath=sample sample/test-workspace",
15
- "sample-tests": "npm run compile && npm run compile-sample && node . --extensionDevelopmentPath=sample --extensionTestsPath=sample/dist/web/test/suite/index.js --headless=false sample/test-workspace"
15
+ "sample-tests": "npm run compile && npm run compile-sample && node . --extensionDevelopmentPath=sample --extensionTestsPath=sample/dist/web/test/suite/index.js --headless=false sample/test-workspace",
16
+ "empty": "npm run compile && node ."
16
17
  },
17
18
  "main": "./out/index.js",
18
19
  "bin": {
@@ -23,14 +24,15 @@
23
24
  },
24
25
  "dependencies": {
25
26
  "@koa/router": "^10.1.1",
26
- "koa": "^2.13.1",
27
+ "@koa/cors": "^3.2.0",
28
+ "koa": "^2.13.4",
27
29
  "koa-morgan": "^1.0.1",
28
30
  "koa-mount": "^4.0.0",
29
31
  "koa-static": "^5.0.0",
30
- "minimist": "^1.2.5",
31
- "playwright": "1.14.1",
32
- "vscode-uri": "^3.0.2",
33
- "http-proxy-agent": "^4.0.1",
32
+ "minimist": "^1.2.6",
33
+ "playwright": "^1.20.1",
34
+ "vscode-uri": "^3.0.3",
35
+ "http-proxy-agent": "^5.0.0",
34
36
  "https-proxy-agent": "^5.0.0",
35
37
  "decompress": "^4.2.1",
36
38
  "decompress-targz": "^4.1.1"
@@ -40,15 +42,15 @@
40
42
  "@types/koa-morgan": "^1.0.5",
41
43
  "@types/koa-mount": "^4.0.1",
42
44
  "@types/koa-static": "^4.0.2",
43
- "@types/koa__router": "^8.0.8",
45
+ "@types/koa__router": "^8.0.11",
44
46
  "@types/minimist": "^1.2.2",
45
47
  "@types/node": "^12.19.9",
46
- "@typescript-eslint/eslint-plugin": "^4.31.1",
47
- "@typescript-eslint/parser": "^4.31.1",
48
+ "@typescript-eslint/eslint-plugin": "^5.16.0",
49
+ "@typescript-eslint/parser": "^5.16.0",
48
50
  "@types/decompress": "^4.2.4",
49
- "eslint": "^7.32.0",
51
+ "eslint": "^8.11.0",
50
52
  "eslint-plugin-header": "^3.1.1",
51
- "typescript": "^4.4.3"
53
+ "typescript": "^4.5.5"
52
54
  },
53
55
  "license": "MIT",
54
56
  "author": "Visual Studio Code Team",
@@ -28,7 +28,7 @@
28
28
  <!-- Workbench Icon/Manifest/CSS -->
29
29
  <link rel="icon" href="{{WORKBENCH_WEB_BASE_URL}}/favicon.ico" type="image/x-icon" />
30
30
  <link rel="manifest" href="{{WORKBENCH_WEB_BASE_URL}}/manifest.json">
31
- <link data-name="vs/workbench/workbench.web.api" rel="stylesheet" href="{{WORKBENCH_WEB_BASE_URL}}/out/vs/workbench/workbench.web.api.css" />
31
+ <link data-name="vs/workbench/workbench.web.main" rel="stylesheet" href="{{WORKBENCH_WEB_BASE_URL}}/out/vs/workbench/workbench.web.main.css" />
32
32
  </head>
33
33
 
34
34
  <body aria-label="">