Update server reports extension version, fix its build breaks, and reduce its size to 86Kb (#4062)

* Updated version
* On building found it had build break due to unused imports. Turns out none of the code is used (it's just a package.json + SQL file extension) so removed it all
* Removed all unnecessary node module imports, reducing size from 5.4MB to 86KB. We should probably do this for all extensions
This commit is contained in:
Kevin Cunnane
2019-02-15 10:33:22 -08:00
committed by GitHub
parent 930e14e258
commit 4843480fbf
9 changed files with 1301 additions and 2779 deletions

View File

@@ -1 +1,14 @@
# Change Log
## v1.4?
* Add PREEMPTIVE_OS_FLUSHFILEBUFFERS to the ignore list in the script used by the wait counts widget
## v1.3?
* Changed the stored procedure call to work on case sensitive instances
## v1.2?
* Created left nav bar and added 2 categories for insight widgets: monitor and performance
## v1.1?
* Fixed DB Space Usage where it threw an error when database names contain special characters
* Changed DB Space Usage and DB Buffer Usage to show only top 10 data

View File

@@ -39,6 +39,9 @@ We would like to thank all our users who raised issues, and in particular the fo
* flyfishingdba for Add square brackets for ms_foreachdb call (#1023)
* Peter-Schneider for Changed the stored procedure call to work on case sensitive instances (#1809)
## What's new in Server Reports v1.4?
* Add PREEMPTIVE_OS_FLUSHFILEBUFFERS to the ignore list in the script used by the wait counts widget
## What's new in Server Reports v1.3?
* Changed the stored procedure call to work on case sensitive instances

View File

@@ -9,6 +9,3 @@
// Basic build tasks
require('./tasks/buildtasks');
// VSIX generation tasks
require('./tasks/packagetasks');

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
"name": "server-report",
"displayName": "Server Reports",
"description": "Server Reports",
"version": "0.1.3",
"version": "0.1.4",
"publisher": "Microsoft",
"preview": true,
"engines": {
@@ -212,22 +212,13 @@
"snippets": []
},
"scripts": {
"prepare": "node ./node_modules/sqlops/bin/install",
"build": "gulp build",
"compile": "gulp compile",
"watch": "gulp watch",
"postinstall": "node ./node_modules/vscode/bin/install"
},
"dependencies": {
"fs-extra": "^5.0.0",
"handlebars": "^4.0.11",
"vscode-nls": "2.0.2",
"sqlops": "github:anthonydresser/sqlops-extension-sqlops"
},
"dependencies": {},
"devDependencies": {
"@types/handlebars": "^4.0.11",
"@types/mocha": "^2.2.42",
"@types/node": "^7.0.43",
"child-process-promise": "^2.2.1",
"del": "^3.0.0",
"gulp": "^4.0.0",
@@ -236,11 +227,10 @@
"gulp-tslint": "^6.0.2",
"gulp-typescript": "^3.2.4",
"should": "^13.2.1",
"temp-write": "^3.4.0",
"tslint": "^3.14.0",
"typemoq": "^2.1.0",
"typescript": "^2.6.1",
"vscode": "^1.1.6",
"vsce": "1.36.2"
"vsce": "1.36.2",
"vscode": "^1.1.6"
}
}

View File

@@ -1,25 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as vscode from 'vscode';
export default abstract class ControllerBase implements vscode.Disposable {
protected _context: vscode.ExtensionContext;
public constructor(context: vscode.ExtensionContext) {
this._context = context;
}
abstract activate(): Promise<boolean>;
abstract deactivate(): void;
public dispose(): void {
this.deactivate();
}
}

View File

@@ -1,30 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as sqlops from 'sqlops';
import * as Utils from '../utils';
import ControllerBase from './controllerBase';
import * as fs from 'fs';
import * as path from 'path';
/**
* The main controller class that initializes the extension
*/
export default class MainController extends ControllerBase {
// PUBLIC METHODS //////////////////////////////////////////////////////
/**
* Deactivates the extension
*/
public deactivate(): void {
Utils.logDebug('Main controller deactivated');
}
public activate(): Promise<boolean> {
return Promise.resolve(true);
}
}

View File

@@ -7,33 +7,10 @@
import * as vscode from 'vscode';
import ControllerBase from './controllers/controllerBase';
import MainController from './controllers/mainController';
let controllers: ControllerBase[] = [];
export function activate(context: vscode.ExtensionContext): Promise<boolean> {
let activations: Promise<boolean>[] = [];
// Start the main controller
let mainController = new MainController(context);
controllers.push(mainController);
context.subscriptions.push(mainController);
activations.push(mainController.activate());
return Promise.all(activations)
.then((results: boolean[]) => {
for (let result of results) {
if (!result) {
return false;
}
}
return true;
});
export function activate(context: vscode.ExtensionContext): void {
// No-op
}
export function deactivate(): void {
for (let controller of controllers) {
controller.deactivate();
}
// No-op
}

View File

@@ -1,36 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
let gulp = require('gulp');
let exec = require('child-process-promise').exec;
let color = require('gulp-color');
// CONSTANTS ///////////////////////////////////////////////////////////////
let packageVals = require('../package');
// HELPER FUNCTIONS ////////////////////////////////////////////////////////
let buildPackage = function(packageName) {
// Make sure there are
if (!packageVals.repository) {
return Promise.reject("Repository field is not defined in package.json");
}
// Initialize the package command with program and command
let vsceArgs = [];
vsceArgs.push('./node_modules/vsce/out/vsce');
vsceArgs.push('package'); // package command
// Add the package name
vsceArgs.push('-o');
vsceArgs.push(packageName);
// Put it all together and execute the command
let command = vsceArgs.join(' ');
console.log(command);
return exec(command);
};