@vscode/test-web 0.0.18 → 0.0.22
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 +8 -0
- package/README.md +10 -9
- package/out/index.d.ts +13 -1
- package/out/index.js +77 -26
- package/out/server/app.js +2 -1
- package/out/server/extensions.js +16 -2
- package/out/server/workbench.js +8 -2
- package/package.json +14 -14
- package/views/workbench.html +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
## 0.0.22
|
|
5
|
+
* new option `--printServerLog` replacing `--hideServerLog`
|
|
6
|
+
* new option `--browser` replacing `--browserType`
|
|
7
|
+
|
|
8
|
+
## 0.0.20
|
|
9
|
+
* new option `--extensionId publisher.name[@prerelease]` to include one or more extensions
|
|
10
|
+
|
|
3
11
|
## 0.0.18
|
|
4
12
|
* new option `--browserType none` to start the server without opening a browser.
|
|
5
13
|
|
package/README.md
CHANGED
|
@@ -67,20 +67,21 @@ CLI options:
|
|
|
67
67
|
|
|
68
68
|
|Option|Argument Description|
|
|
69
69
|
|-----|-----|
|
|
70
|
-
| --
|
|
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
|
-
| --
|
|
80
|
-
| --
|
|
81
|
-
| --
|
|
82
|
-
| --
|
|
83
|
-
| --
|
|
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. |
|
|
84
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. |
|
|
85
86
|
|
|
86
87
|
Corresponding options are available in the API.
|
package/out/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
export declare type BrowserType = 'chromium' | 'firefox' | 'webkit' | 'none';
|
|
3
3
|
export declare type VSCodeQuality = 'insiders' | 'stable';
|
|
4
|
+
export declare type GalleryExtension = {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly preRelease?: boolean;
|
|
7
|
+
};
|
|
4
8
|
export interface Options {
|
|
5
9
|
/**
|
|
6
10
|
* Browser to open: 'chromium' | 'firefox' | 'webkit' | 'none'.
|
|
@@ -47,9 +51,13 @@ export interface Options {
|
|
|
47
51
|
*/
|
|
48
52
|
headless?: boolean;
|
|
49
53
|
/**
|
|
50
|
-
*
|
|
54
|
+
* @deprecated. Use `printServerLog` instead.
|
|
51
55
|
*/
|
|
52
56
|
hideServerLog?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* If set, the server access log is printed to the console. Defaults to `false`.
|
|
59
|
+
*/
|
|
60
|
+
printServerLog?: boolean;
|
|
53
61
|
/**
|
|
54
62
|
* Expose browser debugging on this port number, and wait for the debugger to attach before running tests.
|
|
55
63
|
*/
|
|
@@ -75,6 +83,10 @@ export interface Options {
|
|
|
75
83
|
* Absolute paths pointing to built-in extensions to include.
|
|
76
84
|
*/
|
|
77
85
|
extensionPaths?: string[];
|
|
86
|
+
/**
|
|
87
|
+
* List of extensions to include. The id format is ${publisher}.${name}.
|
|
88
|
+
*/
|
|
89
|
+
extensionIds?: GalleryExtension[];
|
|
78
90
|
/**
|
|
79
91
|
* Absolute path pointing to VS Code sources to use.
|
|
80
92
|
*/
|
package/out/index.js
CHANGED
|
@@ -25,8 +25,9 @@ async function runTests(options) {
|
|
|
25
25
|
build: await getBuild(options),
|
|
26
26
|
folderUri: options.folderUri,
|
|
27
27
|
folderMountPath: options.folderPath,
|
|
28
|
-
|
|
29
|
-
extensionPaths: options.extensionPaths
|
|
28
|
+
printServerLog: (_a = options.printServerLog) !== null && _a !== void 0 ? _a : options.hideServerLog === false,
|
|
29
|
+
extensionPaths: options.extensionPaths,
|
|
30
|
+
extensionIds: options.extensionIds
|
|
30
31
|
};
|
|
31
32
|
const host = (_b = options.host) !== null && _b !== void 0 ? _b : 'localhost';
|
|
32
33
|
const port = (_c = options.port) !== null && _c !== void 0 ? _c : 3000;
|
|
@@ -81,8 +82,9 @@ async function open(options) {
|
|
|
81
82
|
build: await getBuild(options),
|
|
82
83
|
folderUri: options.folderUri,
|
|
83
84
|
folderMountPath: options.folderPath,
|
|
84
|
-
|
|
85
|
-
extensionPaths: options.extensionPaths
|
|
85
|
+
printServerLog: (_a = options.printServerLog) !== null && _a !== void 0 ? _a : options.hideServerLog === false,
|
|
86
|
+
extensionPaths: options.extensionPaths,
|
|
87
|
+
extensionIds: options.extensionIds
|
|
86
88
|
};
|
|
87
89
|
const host = (_b = options.host) !== null && _b !== void 0 ? _b : 'localhost';
|
|
88
90
|
const port = (_c = options.port) !== null && _c !== void 0 ? _c : 3000;
|
|
@@ -99,8 +101,6 @@ async function open(options) {
|
|
|
99
101
|
};
|
|
100
102
|
}
|
|
101
103
|
exports.open = open;
|
|
102
|
-
const width = 1200;
|
|
103
|
-
const height = 800;
|
|
104
104
|
async function openBrowser(endpoint, options) {
|
|
105
105
|
var _a, _b;
|
|
106
106
|
if (options.browserType === 'none') {
|
|
@@ -120,7 +120,7 @@ async function openBrowser(endpoint, options) {
|
|
|
120
120
|
}
|
|
121
121
|
const headless = (_a = options.headless) !== null && _a !== void 0 ? _a : options.extensionTestsPath !== undefined;
|
|
122
122
|
const browser = await browserType.launch({ headless, args, devtools: options.devTools });
|
|
123
|
-
const context = await browser.newContext();
|
|
123
|
+
const context = await browser.newContext({ viewport: null });
|
|
124
124
|
if (options.permissions) {
|
|
125
125
|
context.grantPermissions(options.permissions);
|
|
126
126
|
}
|
|
@@ -144,7 +144,6 @@ async function openBrowser(endpoint, options) {
|
|
|
144
144
|
console.log(message.text());
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
await page.setViewportSize({ width, height });
|
|
148
147
|
await page.goto(endpoint);
|
|
149
148
|
return context;
|
|
150
149
|
}
|
|
@@ -170,14 +169,29 @@ function validateBooleanOrUndefined(options, name) {
|
|
|
170
169
|
showHelp();
|
|
171
170
|
process.exit(-1);
|
|
172
171
|
}
|
|
173
|
-
function
|
|
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;
|
|
174
185
|
if (browserType === undefined) {
|
|
175
186
|
return 'chromium';
|
|
176
187
|
}
|
|
188
|
+
if (options.browserType && options.browser) {
|
|
189
|
+
console.log(`Ignoring browserType option '${options.browserType}' as browser option '${options.browser}' is set.`);
|
|
190
|
+
}
|
|
177
191
|
if ((typeof browserType === 'string') && ['chromium', 'firefox', 'webkit', 'none'].includes(browserType)) {
|
|
178
192
|
return browserType;
|
|
179
193
|
}
|
|
180
|
-
console.log(`Invalid browser
|
|
194
|
+
console.log(`Invalid browser option ${browserType}.`);
|
|
181
195
|
showHelp();
|
|
182
196
|
process.exit(-1);
|
|
183
197
|
}
|
|
@@ -221,6 +235,39 @@ async function valdiateExtensionPaths(extensionPaths) {
|
|
|
221
235
|
showHelp();
|
|
222
236
|
process.exit(-1);
|
|
223
237
|
}
|
|
238
|
+
const EXTENSION_IDENTIFIER_PATTERN = /^([a-z0-9A-Z][a-z0-9-A-Z]*\.[a-z0-9A-Z][a-z0-9-A-Z]*)(@prerelease)?$/;
|
|
239
|
+
async function valdiateExtensionIds(extensionIds) {
|
|
240
|
+
if (extensionIds === undefined) {
|
|
241
|
+
return undefined;
|
|
242
|
+
}
|
|
243
|
+
if (!Array.isArray(extensionIds)) {
|
|
244
|
+
extensionIds = [extensionIds];
|
|
245
|
+
}
|
|
246
|
+
if (Array.isArray(extensionIds)) {
|
|
247
|
+
const res = [];
|
|
248
|
+
for (const extensionId of extensionIds) {
|
|
249
|
+
const m = (typeof extensionId === 'string' && extensionId.match(EXTENSION_IDENTIFIER_PATTERN));
|
|
250
|
+
if (m) {
|
|
251
|
+
if (m[2]) {
|
|
252
|
+
res.push({ id: m[1], preRelease: true });
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
res.push({ id: m[1] });
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
console.log(`Invalid extension id: ${extensionId}. Format is publisher.name[@prerelease].`);
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return res;
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
console.log(`Invalid extensionId`);
|
|
267
|
+
}
|
|
268
|
+
showHelp();
|
|
269
|
+
process.exit(-1);
|
|
270
|
+
}
|
|
224
271
|
async function validatePath(loc, isFile) {
|
|
225
272
|
loc = path.resolve(loc);
|
|
226
273
|
if (isFile) {
|
|
@@ -269,21 +316,22 @@ function validatePortNumber(port) {
|
|
|
269
316
|
}
|
|
270
317
|
function showHelp() {
|
|
271
318
|
console.log('Usage:');
|
|
272
|
-
console.log(` --
|
|
319
|
+
console.log(` --browser 'chromium' | 'firefox' | 'webkit' | 'none': The browser to launch. [Optional, defaults to 'chromium']`);
|
|
273
320
|
console.log(` --extensionDevelopmentPath path: A path pointing to an extension under development to include. [Optional]`);
|
|
274
321
|
console.log(` --extensionTestsPath path: A path to a test module to run. [Optional]`);
|
|
275
322
|
console.log(` --quality 'insiders' | 'stable' [Optional, default 'insiders', ignored when running from sources]`);
|
|
276
|
-
console.log(` --sourcesPath path: If provided, running from VS Code sources at the given location [Optional]`);
|
|
277
|
-
console.log(` --open-devtools: If set, opens the dev tools
|
|
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]`);
|
|
278
325
|
console.log(` --headless: Whether to hide the browser. Defaults to true when an extensionTestsPath is provided, otherwise false. [Optional]`);
|
|
279
|
-
console.log(` --permission: Permission granted in the opened browser: e.g. 'clipboard-read', 'clipboard-write'
|
|
280
|
-
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]`);
|
|
281
328
|
console.log(` --extensionPath: A path pointing to a folder containing additional extensions to include [Optional, Multiple]`);
|
|
282
|
-
console.log(` --
|
|
283
|
-
console.log(` --
|
|
284
|
-
console.log(` --
|
|
285
|
-
console.log(` --
|
|
286
|
-
console.log(` --
|
|
329
|
+
console.log(` --extensionId: The id of an extension include. The format is '\${publisher}.\${name}'. Append '@prerelease' to use a prerelease version [Optional, Multiple]`);
|
|
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]`);
|
|
287
335
|
console.log(` folderPath. A local folder to open VS Code on. The folder content will be available as a virtual file system. [Optional]`);
|
|
288
336
|
}
|
|
289
337
|
async function cliMain() {
|
|
@@ -291,8 +339,8 @@ async function cliMain() {
|
|
|
291
339
|
const manifest = require('../package.json');
|
|
292
340
|
console.log(`${manifest.name}: ${manifest.version}`);
|
|
293
341
|
const options = {
|
|
294
|
-
string: ['extensionDevelopmentPath', 'extensionTestsPath', 'browserType', 'quality', 'version', 'waitForDebugger', 'folder-uri', 'permission', 'extensionPath', 'sourcesPath', 'host', 'port'],
|
|
295
|
-
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'],
|
|
296
344
|
unknown: arg => {
|
|
297
345
|
if (arg.startsWith('-')) {
|
|
298
346
|
console.log(`Unknown argument ${arg}`);
|
|
@@ -307,16 +355,17 @@ async function cliMain() {
|
|
|
307
355
|
showHelp();
|
|
308
356
|
process.exit();
|
|
309
357
|
}
|
|
310
|
-
const browserType = valdiateBrowserType(args
|
|
358
|
+
const browserType = valdiateBrowserType(args);
|
|
311
359
|
const extensionTestsPath = await validatePathOrUndefined(args, 'extensionTestsPath', true);
|
|
312
360
|
const extensionDevelopmentPath = await validatePathOrUndefined(args, 'extensionDevelopmentPath');
|
|
313
361
|
const extensionPaths = await valdiateExtensionPaths(args.extensionPath);
|
|
362
|
+
const extensionIds = await valdiateExtensionIds(args.extensionId);
|
|
314
363
|
const vsCodeDevPath = await validatePathOrUndefined(args, 'sourcesPath');
|
|
315
364
|
const quality = validateQuality(args.quality, args.version, vsCodeDevPath);
|
|
316
365
|
const devTools = validateBooleanOrUndefined(args, 'open-devtools');
|
|
317
366
|
const headless = validateBooleanOrUndefined(args, 'headless');
|
|
318
367
|
const permissions = valdiatePermissions(args.permission);
|
|
319
|
-
const
|
|
368
|
+
const printServerLog = validatePrintServerLog(args);
|
|
320
369
|
const verbose = validateBooleanOrUndefined(args, 'verbose');
|
|
321
370
|
const port = validatePortNumber(args.port);
|
|
322
371
|
const host = validateStringOrUndefined(args, 'host');
|
|
@@ -345,9 +394,10 @@ async function cliMain() {
|
|
|
345
394
|
folderUri,
|
|
346
395
|
folderPath,
|
|
347
396
|
headless,
|
|
348
|
-
|
|
397
|
+
printServerLog: printServerLog,
|
|
349
398
|
permissions,
|
|
350
399
|
extensionPaths,
|
|
400
|
+
extensionIds,
|
|
351
401
|
vsCodeDevPath,
|
|
352
402
|
verbose,
|
|
353
403
|
host,
|
|
@@ -367,9 +417,10 @@ async function cliMain() {
|
|
|
367
417
|
folderUri,
|
|
368
418
|
folderPath,
|
|
369
419
|
headless,
|
|
370
|
-
|
|
420
|
+
printServerLog: printServerLog,
|
|
371
421
|
permissions,
|
|
372
422
|
extensionPaths,
|
|
423
|
+
extensionIds,
|
|
373
424
|
vsCodeDevPath,
|
|
374
425
|
verbose,
|
|
375
426
|
host,
|
package/out/server/app.js
CHANGED
|
@@ -14,7 +14,7 @@ const mounts_1 = require("./mounts");
|
|
|
14
14
|
const extensions_1 = require("./extensions");
|
|
15
15
|
async function createApp(config) {
|
|
16
16
|
const app = new Koa();
|
|
17
|
-
if (
|
|
17
|
+
if (config.printServerLog) {
|
|
18
18
|
app.use(morgan('dev'));
|
|
19
19
|
}
|
|
20
20
|
// this is here such that the iframe worker can fetch the extension files
|
|
@@ -31,6 +31,7 @@ async function createApp(config) {
|
|
|
31
31
|
app.use(kmount('/static/build', kstatic(config.build.location, serveOptions)));
|
|
32
32
|
}
|
|
33
33
|
else if (config.build.type === 'sources') {
|
|
34
|
+
console.log('Serving VS Code sources from ' + config.build.location);
|
|
34
35
|
app.use(kmount('/static/sources', kstatic(config.build.location, serveOptions)));
|
|
35
36
|
app.use(kmount('/static/sources', kstatic((0, path_1.join)(config.build.location, 'resources', 'server'), serveOptions))); // for manifest.json, favicon and code icons.
|
|
36
37
|
// built-in extension are at 'extensions` as well as prebuilt extensions dowloaded from the marketplace
|
package/out/server/extensions.js
CHANGED
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
exports.getScannedBuiltinExtensions = exports.prebuiltExtensionsLocation = exports.scanForExtensions = void 0;
|
|
8
8
|
const fs_1 = require("fs");
|
|
9
9
|
const path = require("path");
|
|
10
|
+
const download_1 = require("./download");
|
|
10
11
|
async function scanForExtensions(rootPath, serverURI) {
|
|
11
12
|
const result = [];
|
|
12
13
|
async function getExtension(relativePosixFolderPath) {
|
|
@@ -47,7 +48,20 @@ exports.prebuiltExtensionsLocation = '.build/builtInExtensions';
|
|
|
47
48
|
async function getScannedBuiltinExtensions(vsCodeDevLocation) {
|
|
48
49
|
// use the build utility as to not duplicate the code
|
|
49
50
|
const extensionsUtil = await Promise.resolve().then(() => require(path.join(vsCodeDevLocation, 'build', 'lib', 'extensions.js')));
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
const localExtensions = extensionsUtil.scanBuiltinExtensions(path.join(vsCodeDevLocation, 'extensions'));
|
|
52
|
+
const prebuiltExtensions = extensionsUtil.scanBuiltinExtensions(path.join(vsCodeDevLocation, 'prebuiltExtensionsLocation'));
|
|
53
|
+
for (const ext of localExtensions) {
|
|
54
|
+
let browserMain = ext.packageJSON.browser;
|
|
55
|
+
if (browserMain) {
|
|
56
|
+
if (!browserMain.endsWith('.js')) {
|
|
57
|
+
browserMain = browserMain + '.js';
|
|
58
|
+
}
|
|
59
|
+
const browserMainLocation = path.join(vsCodeDevLocation, 'extensions', ext.extensionPath, browserMain);
|
|
60
|
+
if (!await (0, download_1.fileExists)(browserMainLocation)) {
|
|
61
|
+
console.log(`${browserMainLocation} not found. Make sure all extensions are compiled (use 'yarn watch-web').`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return localExtensions.concat(prebuiltExtensions);
|
|
52
66
|
}
|
|
53
67
|
exports.getScannedBuiltinExtensions = getScannedBuiltinExtensions;
|
package/out/server/workbench.js
CHANGED
|
@@ -39,8 +39,8 @@ class Workbench {
|
|
|
39
39
|
getMain() {
|
|
40
40
|
return this.dev
|
|
41
41
|
? `<script> require(['vs/code/browser/workbench/workbench'], function() {}); </script>`
|
|
42
|
-
: `<script src="${this.baseUrl}/out/vs/workbench/workbench.web.
|
|
43
|
-
+ `<script src="${this.baseUrl}/out/vs/workbench/workbench.web.
|
|
42
|
+
: `<script src="${this.baseUrl}/out/vs/workbench/workbench.web.main.nls.js"></script>`
|
|
43
|
+
+ `<script src="${this.baseUrl}/out/vs/workbench/workbench.web.main.js"></script>`
|
|
44
44
|
+ `<script src="${this.baseUrl}/out/vs/code/browser/workbench/workbench.js"></script>`;
|
|
45
45
|
}
|
|
46
46
|
async renderCallback() {
|
|
@@ -58,6 +58,12 @@ async function getWorkbenchOptions(ctx, config) {
|
|
|
58
58
|
});
|
|
59
59
|
}));
|
|
60
60
|
}
|
|
61
|
+
if (config.extensionIds) {
|
|
62
|
+
if (!options.additionalBuiltinExtensions) {
|
|
63
|
+
options.additionalBuiltinExtensions = [];
|
|
64
|
+
}
|
|
65
|
+
options.additionalBuiltinExtensions.push(...config.extensionIds);
|
|
66
|
+
}
|
|
61
67
|
if (config.extensionDevelopmentPath) {
|
|
62
68
|
const developmentOptions = options.developmentOptions = {};
|
|
63
69
|
developmentOptions.extensions = await (0, extensions_1.scanForExtensions)(config.extensionDevelopmentPath, { scheme: ctx.protocol, authority: ctx.host, path: '/static/devextensions' });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vscode/test-web",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"install-extensions": "yarn --cwd=fs-provider && yarn --cwd=sample",
|
|
6
6
|
"compile": "tsc -p ./ && yarn compile-fs-provider",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"postversion": "git push && git push --tags",
|
|
12
12
|
"compile-fs-provider": "yarn --cwd=fs-provider compile-web",
|
|
13
13
|
"compile-sample": "yarn --cwd=sample compile-web",
|
|
14
|
-
"sample": "npm run compile && npm run compile-sample && node . --extensionDevelopmentPath=sample
|
|
15
|
-
"sample-tests": "npm run compile &&
|
|
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"
|
|
16
16
|
},
|
|
17
17
|
"main": "./out/index.js",
|
|
18
18
|
"bin": {
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@koa/router": "^10.1.1",
|
|
26
|
-
"koa": "^2.13.
|
|
26
|
+
"koa": "^2.13.4",
|
|
27
27
|
"koa-morgan": "^1.0.1",
|
|
28
28
|
"koa-mount": "^4.0.0",
|
|
29
29
|
"koa-static": "^5.0.0",
|
|
30
30
|
"minimist": "^1.2.5",
|
|
31
|
-
"playwright": "1.
|
|
32
|
-
"vscode-uri": "^3.0.
|
|
33
|
-
"http-proxy-agent": "^
|
|
31
|
+
"playwright": "^1.18.1",
|
|
32
|
+
"vscode-uri": "^3.0.3",
|
|
33
|
+
"http-proxy-agent": "^5.0.0",
|
|
34
34
|
"https-proxy-agent": "^5.0.0",
|
|
35
35
|
"decompress": "^4.2.1",
|
|
36
36
|
"decompress-targz": "^4.1.1"
|
|
@@ -40,23 +40,23 @@
|
|
|
40
40
|
"@types/koa-morgan": "^1.0.5",
|
|
41
41
|
"@types/koa-mount": "^4.0.1",
|
|
42
42
|
"@types/koa-static": "^4.0.2",
|
|
43
|
-
"@types/koa__router": "^8.0.
|
|
43
|
+
"@types/koa__router": "^8.0.11",
|
|
44
44
|
"@types/minimist": "^1.2.2",
|
|
45
45
|
"@types/node": "^12.19.9",
|
|
46
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
47
|
-
"@typescript-eslint/parser": "^
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "^5.10.2",
|
|
47
|
+
"@typescript-eslint/parser": "^5.10.2",
|
|
48
48
|
"@types/decompress": "^4.2.4",
|
|
49
|
-
"eslint": "^
|
|
49
|
+
"eslint": "^8.8.0",
|
|
50
50
|
"eslint-plugin-header": "^3.1.1",
|
|
51
|
-
"typescript": "^4.
|
|
51
|
+
"typescript": "^4.5.5"
|
|
52
52
|
},
|
|
53
53
|
"license": "MIT",
|
|
54
54
|
"author": "Visual Studio Code Team",
|
|
55
55
|
"repository": {
|
|
56
56
|
"type": "git",
|
|
57
|
-
"url": "https://github.com/
|
|
57
|
+
"url": "https://github.com/microsoft/vscode-test-web.git"
|
|
58
58
|
},
|
|
59
59
|
"bugs": {
|
|
60
|
-
"url": "https://github.com/
|
|
60
|
+
"url": "https://github.com/microsoft/vscode-test-web/issues"
|
|
61
61
|
}
|
|
62
62
|
}
|
package/views/workbench.html
CHANGED
|
@@ -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.
|
|
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="">
|