mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge VS Code 1.23.1 (#1520)
This commit is contained in:
33
test/smoke/tools/copy-driver-definition.js
Normal file
33
test/smoke/tools/copy-driver-definition.js
Normal file
@@ -0,0 +1,33 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const root = path.dirname(path.dirname(path.dirname(__dirname)));
|
||||
const driverPath = path.join(root, 'src/vs/platform/driver/common/driver.ts');
|
||||
|
||||
let contents = fs.readFileSync(driverPath, 'utf8');
|
||||
contents = /\/\/\*START([\s\S]*)\/\/\*END/mi.exec(contents)[1].trim();
|
||||
contents = contents.replace(/\bTPromise\b/g, 'Promise');
|
||||
|
||||
contents = `/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
${contents}
|
||||
|
||||
export interface IDisposable {
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export function connect(outPath: string, handle: string): Promise<{ client: IDisposable, driver: IDriver }>;
|
||||
`;
|
||||
|
||||
const srcPath = path.join(path.dirname(__dirname), 'src/vscode');
|
||||
const outDriverPath = path.join(srcPath, 'driver.d.ts');
|
||||
|
||||
fs.writeFileSync(outDriverPath, contents);
|
||||
Reference in New Issue
Block a user