@vscode/test-web 0.0.24 → 0.0.27

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.
@@ -36,13 +36,13 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/vscode": "^1.55.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",
39
+ "@types/webpack-env": "^1.17.0",
40
+ "ts-loader": "^9.3.1",
41
+ "webpack": "^5.73.0",
42
+ "webpack-cli": "^4.10.0",
43
43
  "process": "^0.11.10",
44
44
  "path-browserify": "^1.0.1",
45
- "request-light": "^0.5.7",
45
+ "request-light": "^0.5.8",
46
46
  "vscode-uri": "^3.0.3"
47
47
  }
48
48
  }
package/out/index.js CHANGED
@@ -394,7 +394,7 @@ async function cliMain() {
394
394
  folderUri,
395
395
  folderPath,
396
396
  headless,
397
- printServerLog: printServerLog,
397
+ printServerLog,
398
398
  permissions,
399
399
  extensionPaths,
400
400
  extensionIds,
@@ -417,7 +417,7 @@ async function cliMain() {
417
417
  folderUri,
418
418
  folderPath,
419
419
  headless,
420
- printServerLog: printServerLog,
420
+ printServerLog,
421
421
  permissions,
422
422
  extensionPaths,
423
423
  extensionIds,
package/out/server/app.js CHANGED
@@ -4,18 +4,20 @@
4
4
  * Licensed under the MIT License. See License.txt in the project root for license information.
5
5
  *--------------------------------------------------------------------------------------------*/
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ const fs_1 = require("fs");
7
8
  const Koa = require("koa");
8
9
  const morgan = require("koa-morgan");
9
10
  const kstatic = require("koa-static");
10
11
  const kmount = require("koa-mount");
11
12
  const cors = require("@koa/cors");
13
+ const getstream = require("get-stream");
12
14
  const path_1 = require("path");
13
15
  const workbench_1 = require("./workbench");
14
16
  const mounts_1 = require("./mounts");
15
17
  const extensions_1 = require("./extensions");
16
18
  async function createApp(config) {
17
19
  const app = new Koa();
18
- app.use(morgan('dev', { skip: (req, res) => res.statusCode >= 200 && res.statusCode < 300 }));
20
+ app.use(morgan('dev', { skip: (req, res) => !config.printServerLog && (res.statusCode >= 200 && res.statusCode < 300) }));
19
21
  // CORS
20
22
  app.use(cors({
21
23
  allowMethods: ['GET'],
@@ -32,6 +34,14 @@ async function createApp(config) {
32
34
  ctx.set('Access-Control-Allow-Origin', '*');
33
35
  return next();
34
36
  });
37
+ // shift the line numbers of source maps in extensions by 2 as the content is wrapped by an anonymous function
38
+ app.use(async (ctx, next) => {
39
+ await next();
40
+ if (ctx.status === 200 && ctx.path.match(/\/(dev)?extensions\/.*\.js\.map$/) && ctx.body instanceof fs_1.ReadStream) {
41
+ // we know it's a ReadStream as that's what kstatic uses
42
+ ctx.response.body = `{"version":3,"file":"${(0, path_1.basename)(ctx.path)}","sections":[{"offset":{"line":2,"column":0},"map":${await getstream(ctx.body)} }]}`;
43
+ }
44
+ });
35
45
  const serveOptions = { hidden: true };
36
46
  if (config.extensionDevelopmentPath) {
37
47
  console.log('Serving dev extensions from ' + config.extensionDevelopmentPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vscode/test-web",
3
- "version": "0.0.24",
3
+ "version": "0.0.27",
4
4
  "scripts": {
5
5
  "install-extensions": "yarn --cwd=fs-provider && yarn --cwd=sample",
6
6
  "compile": "tsc -p ./ && yarn compile-fs-provider",
@@ -24,18 +24,19 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@koa/router": "^10.1.1",
27
- "@koa/cors": "^3.2.0",
27
+ "@koa/cors": "^3.3.0",
28
28
  "koa": "^2.13.4",
29
29
  "koa-morgan": "^1.0.1",
30
30
  "koa-mount": "^4.0.0",
31
31
  "koa-static": "^5.0.0",
32
32
  "minimist": "^1.2.6",
33
- "playwright": "^1.20.1",
33
+ "playwright": "^1.23.1",
34
34
  "vscode-uri": "^3.0.3",
35
35
  "http-proxy-agent": "^5.0.0",
36
- "https-proxy-agent": "^5.0.0",
36
+ "https-proxy-agent": "^5.0.1",
37
37
  "decompress": "^4.2.1",
38
- "decompress-targz": "^4.1.1"
38
+ "decompress-targz": "^4.1.1",
39
+ "get-stream": "6.0.1"
39
40
  },
40
41
  "devDependencies": {
41
42
  "@types/koa": "^2.13.4",
@@ -45,12 +46,12 @@
45
46
  "@types/koa__router": "^8.0.11",
46
47
  "@types/minimist": "^1.2.2",
47
48
  "@types/node": "^12.19.9",
48
- "@typescript-eslint/eslint-plugin": "^5.16.0",
49
- "@typescript-eslint/parser": "^5.16.0",
49
+ "@typescript-eslint/eslint-plugin": "^5.30.0",
50
+ "@typescript-eslint/parser": "^5.30.0",
50
51
  "@types/decompress": "^4.2.4",
51
- "eslint": "^8.11.0",
52
+ "eslint": "^8.18.0",
52
53
  "eslint-plugin-header": "^3.1.1",
53
- "typescript": "^4.5.5"
54
+ "typescript": "^4.7.4"
54
55
  },
55
56
  "license": "MIT",
56
57
  "author": "Visual Studio Code Team",