Skip to content

Commit 259557a

Browse files
author
shyosef
committed
merge
1 parent 4fb91e1 commit 259557a

39 files changed

+696
-61
lines changed

SECURITY.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK -->
2+
3+
## Security
4+
5+
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6+
7+
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.
8+
9+
## Reporting Security Issues
10+
11+
**Please do not report security vulnerabilities through public GitHub issues.**
12+
13+
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
14+
15+
If you prefer to submit without logging in, send email to [[email protected]](mailto:[email protected]). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
16+
17+
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
18+
19+
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20+
21+
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22+
* Full paths of source file(s) related to the manifestation of the issue
23+
* The location of the affected source code (tag/branch/commit or direct URL)
24+
* Any special configuration required to reproduce the issue
25+
* Step-by-step instructions to reproduce the issue
26+
* Proof-of-concept or exploit code (if possible)
27+
* Impact of the issue, including how an attacker might exploit the issue
28+
29+
This information will help us triage your report more quickly.
30+
31+
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
32+
33+
## Preferred Languages
34+
35+
We prefer all communications to be in English.
36+
37+
## Policy
38+
39+
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
40+
41+
<!-- END MICROSOFT SECURITY.MD BLOCK -->

gulpfile.js

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ var del = require('del'),
77
typedoc = require("gulp-typedoc"),
88
uglify = require('gulp-uglify'),
99
karma = require('karma'),
10+
watch = require('gulp-watch'),
1011
webpack = require('webpack'),
1112
webpackStream = require('webpack-stream'),
1213
webpackConfig = require('./webpack.config'),
@@ -18,8 +19,10 @@ var del = require('del'),
1819
help(gulp, undefined);
1920

2021
var package = require('./package.json');
21-
var webpackBanner = package.name + " v" + package.version + " | (c) 2016 Microsoft Corporation " + package.license;
22-
var gulpBanner = "/*! " + webpackBanner + " */\n";
22+
var webpackBanner = "// " + package.name + " v" + package.version + "\n"
23+
+ "// Copyright (c) Microsoft Corporation.\n"
24+
+ "// Licensed under the MIT License.";
25+
var banner = webpackBanner + "\n";
2326

2427
gulp.task('build', 'Build for release', function (done) {
2528
return runSequence(
@@ -63,7 +66,10 @@ gulp.task("docs", 'Compile documentation from src code', function () {
6366

6467
gulp.task('compile:ts', 'Compile source files', function () {
6568
webpackConfig.plugins = [
66-
new webpack.BannerPlugin(webpackBanner)
69+
new webpack.BannerPlugin({
70+
banner: webpackBanner,
71+
raw: true
72+
})
6773
];
6874

6975
return gulp.src(['./src/**/*.ts'])
@@ -73,15 +79,14 @@ gulp.task('compile:ts', 'Compile source files', function () {
7379

7480
gulp.task('header', 'Add header to distributed files', function () {
7581
return gulp.src(['./dist/*.d.ts'])
76-
.pipe(header(gulpBanner))
82+
.pipe(header(banner))
7783
.pipe(gulp.dest('./dist'));
7884
});
7985

8086
gulp.task('min', 'Minify build files', function () {
8187
return gulp.src(['!./dist/*.min.js', './dist/models.js'])
82-
.pipe(uglify({
83-
preserveComments: 'license'
84-
}))
88+
.pipe(uglify())
89+
.pipe(header(banner))
8590
.pipe(rename({
8691
suffix: '.min'
8792
}))
@@ -117,7 +122,26 @@ gulp.task('test:js', 'Run spec tests', function (done) {
117122
configFile: __dirname + '/karma.conf.js',
118123
singleRun: argv.debug ? false : true,
119124
captureTimeout: argv.timeout || 60000
120-
}, done).start();
125+
}, function () {
126+
done();
127+
})
128+
.on('browser_register', (browser) => {
129+
if (argv.chrome) {
130+
browser.socket.on('disconnect', function (reason) {
131+
if (reason === "transport close" || reason === "transport error") {
132+
done(0);
133+
process.exit(0);
134+
}
135+
});
136+
}
137+
})
138+
.start();
139+
140+
if (argv.chrome) {
141+
return watch(["src/**/*.ts", "test/**/*.ts"], function () {
142+
runSequence( 'tslint:test', 'clean:tmp', 'compile:spec');
143+
});
144+
}
121145
});
122146

123147
gulp.task('tslint:build', 'Run TSLint on src', function () {

karma.conf.js

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,45 @@
11
var argv = require('yargs').argv;
2-
2+
const flags = [
3+
'--disable-extensions',
4+
'--no-proxy-server',
5+
'--js-flags="--max_old_space_size=6500"',
6+
'--high-dpi-support=1'
7+
];
38
module.exports = function (config) {
49
config.set({
510
frameworks: ['jasmine'],
611
files: [
712
'./tmp/**/*.js'
813
],
914
exclude: [],
10-
reporters: argv.debug ? ['spec'] : ['spec', 'coverage'],
15+
reporters: argv.debug ? ['spec', 'kjhtml'] : ['spec', 'coverage', 'kjhtml'],
1116
autoWatch: true,
12-
browsers: [argv.chrome ? 'Chrome' : 'PhantomJS'],
17+
browsers: [argv.chrome ? 'Chrome_headless' : 'PhantomJS'],
1318
plugins: [
1419
'karma-chrome-launcher',
1520
'karma-jasmine',
1621
'karma-spec-reporter',
1722
'karma-phantomjs-launcher',
18-
'karma-coverage'
23+
'karma-coverage',
24+
'karma-jasmine-html-reporter'
1925
],
26+
customLaunchers: {
27+
'Chrome_headless': {
28+
base: 'Chrome',
29+
flags: flags.concat("--no-sandbox", "--window-size=800,800"),
30+
},
31+
},
2032
preprocessors: { './tmp/**/*.js': ['coverage'] },
2133
coverageReporter: {
2234
reporters: [
2335
{ type: 'html' },
2436
{ type: 'text-summary' }
2537
]
2638
},
27-
logLevel: argv.debug ? config.LOG_DEBUG : config.LOG_INFO
39+
retryLimit: 0,
40+
logLevel: argv.debug ? config.LOG_DEBUG : config.LOG_INFO,
41+
client: {
42+
clearContext: false, // leave Jasmine Spec Runner output visible in browser
43+
}
2844
});
2945
};

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "powerbi-models",
3-
"version": "1.8.0",
3+
"version": "1.9.1",
44
"description": "Contains JavaScript &amp; TypeScript object models for Microsoft Power BI JavaScript SDK. For each model there is a TypeScript interface, and a validation function to ensure and object is valid.",
55
"main": "dist/models.js",
66
"typings": "dist/models.d.ts",
@@ -10,7 +10,8 @@
1010
"scripts": {
1111
"build": "gulp build",
1212
"test": "gulp test",
13-
"gulp": "gulp"
13+
"gulp": "gulp",
14+
"tests": "npm test -- --chrome --watch --debug"
1415
},
1516
"files": [
1617
"dist"
@@ -39,13 +40,15 @@
3940
"gulp-tslint": "^7.1.0",
4041
"gulp-typedoc": "^2.0.0",
4142
"gulp-uglify": "^1.5.4",
43+
"gulp-watch": "^5.0.1",
4244
"gulp4-run-sequence": "^1.0.0",
4345
"jasmine-core": "^2.4.1",
4446
"json-loader": "^0.5.4",
4547
"karma": "^4.4.1",
4648
"karma-chrome-launcher": "^3.1.0",
4749
"karma-coverage": "^2.0.1",
4850
"karma-jasmine": "^2.0.1",
51+
"karma-jasmine-html-reporter": "^1.5.4",
4952
"karma-phantomjs-launcher": "^1.0.4",
5053
"karma-spec-reporter": "0.0.32",
5154
"phantomjs-prebuilt": "^2.1.7",

0 commit comments

Comments
 (0)