forked from microsoft/vscode-azuretools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
94 lines (77 loc) · 2.88 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { OutputChannel } from "vscode";
import * as webpack from 'webpack';
import { Stream } from "stream";
import * as cp from "child_process";
/**
* Sets up test suites against an extension package.json file (run this at global level or inside a suite, not inside a test)
*
* @param packageJson The extension's package.json contents as an object
*/
export declare function addPackageLintSuites(
getExtensionContext: () => {},
getCommands: () => Promise<string[]>,
packageJsonAsObject: {},
options: IPackageLintOptions
): void;
export interface IPackageLintOptions {
/**
* Commands which are registered by the extension but should not appear in package.json
*/
commandsRegisteredButNotInPackage?: string[];
}
/**
* Re-routes output to the console instead of a VS Code output channel (which disappears after a test run has finished)
*/
export class TestOutputChannel implements OutputChannel {
public name: string;
public append(value: string): void;
public appendLine(value: string): void;
public clear(): void;
public show(): void;
public hide(): void;
public dispose(): void;
}
export type Verbosity = 'debug' | 'silent' | 'normal';
export interface DefaultWebpackOptions {
projectRoot: string;
/**
* Additional entrypoints besides the main 'extension' entrypoint
*/
entries?: { [key: string]: string };
/**
* Modules that we can't easily webpack for some reason. These node modules and all their dependencies will be excluded from bundling.
*/
externalNodeModules?: string[];
/** Additional external entries (externalNodeModules are added automatically) */
externals?: webpack.ExternalsObjectElement,
/**
* Additional loader module rules
*/
loaderRules?: webpack.RuleSetRule[],
/**
* Additional plug-ins
*/
plugins?: webpack.Plugin[];
/**
* Suppress deleting the dist folder before webpack
*/
suppressCleanDistFolder?: boolean;
/**
* Logging verbosity
*/
verbosity?: Verbosity;
}
export declare function getDefaultWebpackConfig(options: DefaultWebpackOptions): webpack.Configuration;
/**
* Installs the azure account extension before running tests (otherwise our extension would fail to activate)
* NOTE: The version isn't super important since we don't actually use the account extension in tests
*/
export declare function gulp_installAzureAccount(): Promise<void> | Stream;
/**
* Spawns a webpack process
*/
export declare function gulp_webpack(mode: string): cp.ChildProcess;