powerbi-visuals-tools 6.1.0-beta.2 → 6.1.1

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 CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  This page contains information about changes to the PowerBI Visual Tools (pbiviz).
4
4
 
5
+ ## 6.1.1
6
+ * Fixed bug with source maps generation (now using `eval-source-map` instead of `source-map`)
7
+
5
8
  ## 6.1.0
6
9
  * Added `--certification-audit` flag to `pbiviz package` command. It audits the visual package for possible certification issues.
7
10
  * Added `--certification-fix` flag to `pbiviz package` command. It fixes found certification issues in the visual package. Please carefully test the built package to ensure its functionality is not broken after that.
@@ -5,7 +5,7 @@ export default class CommandManager {
5
5
  static async start(options, rootPath) {
6
6
  const webpackOptions = {
7
7
  devMode: true,
8
- devtool: "source-map",
8
+ devtool: "eval-source-map",
9
9
  generateResources: true,
10
10
  generatePbiviz: false,
11
11
  minifyJS: false,
@@ -226,21 +226,28 @@ export default class VisualManager {
226
226
  prepareDropFiles() {
227
227
  this.webpackConfig.devServer.setupMiddlewares = (middlewares, devServer) => {
228
228
  const { headers, publicPath, static: { directory } } = this.webpackConfig.devServer;
229
- const assets = ['visual.js`', 'visual.css', 'pbiviz.json'];
229
+ const assets = ['visual.js', 'visual.css', 'pbiviz.json'];
230
230
  const setHeaders = (res) => {
231
231
  Object.getOwnPropertyNames(headers)
232
232
  .forEach(property => res.header(property, headers[property]));
233
233
  };
234
234
  const readFile = (file, res, name) => {
235
+ const assetMiddleware = (req, middlewareRes, next) => {
236
+ fs.readFile(file)
237
+ .then(content => {
238
+ middlewareRes.write(content);
239
+ ConsoleWriter.info(`Serving ${name}`);
240
+ middlewareRes.end();
241
+ })
242
+ .catch(err => {
243
+ ConsoleWriter.error(`Error serving ${name}: ${err.message}`);
244
+ next();
245
+ });
246
+ };
235
247
  middlewares.unshift({
236
248
  name,
237
- middleware: (req, middlewareRes) => {
238
- fs.readFile(file).then(function (content) {
239
- middlewareRes.write(content);
240
- console.log(`Serving ${name} to `);
241
- middlewareRes.end();
242
- });
243
- },
249
+ path: `${publicPath}/${name}`,
250
+ middleware: assetMiddleware
244
251
  });
245
252
  res.end();
246
253
  };
@@ -184,7 +184,7 @@ export default class WebPackWrap {
184
184
  this.webpackConfig.plugins.push(new PowerBICustomVisualsWebpackPlugin(pluginConfiguration), new ExtraWatchWebpackPlugin({
185
185
  files: this.pbiviz.capabilities
186
186
  }));
187
- if (options.devtool === "source-map" && this.webpackConfig.devServer.port) {
187
+ if (options.devMode && options.devtool && this.webpackConfig.devServer.port) {
188
188
  this.webpackConfig.plugins.push(new webpack.SourceMapDevToolPlugin({
189
189
  filename: '[file].map',
190
190
  publicPath: `https://localhost:${this.webpackConfig.devServer.port}/assets/`
@@ -126,7 +126,7 @@ const webpackConfig = {
126
126
  }
127
127
  },
128
128
  watchOptions: {
129
- ignored: ['node_modules", "**']
129
+ ignored: ['node_modules/**']
130
130
  },
131
131
  plugins: [
132
132
  new webpack.ProvidePlugin({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powerbi-visuals-tools",
3
- "version": "6.1.0-beta.2",
3
+ "version": "6.1.1",
4
4
  "description": "Command line tool for creating and publishing visuals for Power BI",
5
5
  "main": "./bin/pbiviz.js",
6
6
  "type": "module",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "homepage": "https://github.com/Microsoft/PowerBI-visuals-tools#readme",
30
30
  "dependencies": {
31
- "@typescript-eslint/parser": "^8.26.0",
31
+ "@typescript-eslint/parser": "^8.32.1",
32
32
  "assert": "^2.1.0",
33
33
  "async": "^3.2.6",
34
34
  "browserify-zlib": "^0.2.0",
@@ -49,8 +49,8 @@
49
49
  "inline-source-map": "^0.6.3",
50
50
  "json-loader": "0.5.7",
51
51
  "jszip": "^3.10.1",
52
- "less": "^4.2.2",
53
- "less-loader": "^12.2.0",
52
+ "less": "^4.3.0",
53
+ "less-loader": "^12.3.0",
54
54
  "lodash.clonedeep": "4.5.0",
55
55
  "lodash.defaults": "4.2.0",
56
56
  "lodash.isequal": "4.5.0",
@@ -58,7 +58,7 @@
58
58
  "mini-css-extract-plugin": "^2.9.2",
59
59
  "os-browserify": "^0.3.0",
60
60
  "path-browserify": "^1.0.1",
61
- "powerbi-visuals-webpack-plugin": "^4.2.2",
61
+ "powerbi-visuals-webpack-plugin": "^4.3.0",
62
62
  "process": "^0.11.10",
63
63
  "punycode": "^2.3.1",
64
64
  "querystring-es3": "^0.2.1",
@@ -70,20 +70,20 @@
70
70
  "timers-browserify": "^2.0.12",
71
71
  "ts-loader": "^9.5.2",
72
72
  "tty-browserify": "^0.0.1",
73
- "typescript": "^5.8.2",
73
+ "typescript": "^5.8.3",
74
74
  "url": "^0.11.4",
75
75
  "util": "^0.12.5",
76
76
  "vm-browserify": "^1.1.2",
77
- "webpack": "^5.98.0",
77
+ "webpack": "^5.99.8",
78
78
  "webpack-bundle-analyzer": "4.10.2",
79
- "webpack-dev-server": "^5.2.0"
79
+ "webpack-dev-server": "^5.2.1"
80
80
  },
81
81
  "devDependencies": {
82
- "@typescript-eslint/eslint-plugin": "^8.26.0",
83
- "eslint": "^9.22.0",
82
+ "@typescript-eslint/eslint-plugin": "^8.32.1",
83
+ "eslint": "^9.26.0",
84
84
  "jasmine": "5.3.1",
85
85
  "jasmine-spec-reporter": "7.0.0",
86
- "semver": "7.7.1",
86
+ "semver": "7.7.2",
87
87
  "tree-kill": "1.2.2",
88
88
  "webpack-cli": "^6.0.1"
89
89
  },