powerbi-visuals-tools 5.2.0-beta.2 → 5.2.0

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
@@ -5,6 +5,9 @@ This page contains information about changes to the PowerBI Visual Tools (pbiviz
5
5
  ## 5.2.0
6
6
  * Integrated PAC validation
7
7
 
8
+ ## 5.1.1
9
+ * Updated crypto import to fix error in old Node versions
10
+
8
11
  ## 5.1.0
9
12
  * New flag `--skip-api` to skip verifying api version. It might produce different errors in visual, so use it only in some specific cases (ex. installing something during the build process brakes packages managed by monorepo managers).
10
13
  * New flag `--all-locales` to disable optimization using localization loader. It's recommended not to use this flag because all locales take a huge amount of package size. If you need just a few of them follow [this guide](https://learn.microsoft.com/en-us/power-bi/developer/visuals/localization?tabs=English#step-5---add-a-resources-file-for-each-language). In this case, only declared in stringResources locales will be added to your visual package.
package/bin/pbiviz.js CHANGED
@@ -89,6 +89,7 @@ pbiviz
89
89
  .option('--no-stats', "Doesn't generate statistics files")
90
90
  .option('--skip-api', "Skips powerbi-visuals-api verifying")
91
91
  .option('-l, --all-locales', "Keeps all locale files in the package. By default only used inside stringResources folder locales are included.")
92
+ .option('-v, --verbose', "Enables verbose logging")
92
93
  .addOption(new Option('-c, --compression <compressionLevel>', "Enables compression of visual package")
93
94
  .choices(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'])
94
95
  .default('6')
@@ -1,28 +1,28 @@
1
1
  -----BEGIN PRIVATE KEY-----
2
- MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDlnOCCuo9fXKPW
3
- WMPhMk1Y3C14CDRWM8JOG5fA5Hh0XYYX9N8A2jEmpNF5mh5qk116OOYR6MwS040O
4
- FFDAHJvvW1IyvOMEe6hQGxbcT1EYwjJFfVm0IAXqIEiEH1S+5KtjUZppX4PIWBMj
5
- aDk1SMpBsJ7xoB6rNTm7DnDx44qu0KVNV8cC7Ub+LxrnByY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FJ1wrbS8B+Z6ZqLci+whR6KG517umutIRfkjFeY4w/kblMLLBbp
16
+ EB7eHuflR06swZDZzyFm1hoJWSQkraiovuwFDPO02YfQAQdxH6y+ZyGoK7okSszs
17
+ 9ARzORTmiMGqaQIw0BDMji8GOij27ou8MQhWXJ+BS0xLBPPCjMcT5JujV/ewqeUh
18
+ 2CwYaihEXAJtwSvwSw==
19
19
  -----END CERTIFICATE-----
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-case-declarations */
1
2
  /*
2
3
  * Power BI Visual CLI
3
4
  *
@@ -28,7 +29,7 @@ import { exec as nodeExec } from 'child_process';
28
29
  import fs from 'fs-extra';
29
30
  import os from 'os';
30
31
  import path from 'path';
31
- import crypto, { webcrypto } from "crypto";
32
+ import crypto from "crypto";
32
33
  import { getRootPath, readJsonFromRoot } from './utils.js';
33
34
  import ConsoleWriter from './ConsoleWriter.js';
34
35
  const certSafePeriod = 1000 * 60 * 60 * 24; // 24 hours
@@ -114,11 +115,8 @@ export async function createCertFile(config, open) {
114
115
  }
115
116
  break;
116
117
  case "win32":
117
- // eslint-disable-next-line no-case-declarations
118
- let passphrase = "";
119
118
  // for windows 7 and others
120
119
  // 6.1 - Windows 7
121
- // eslint-disable-next-line no-case-declarations
122
120
  const osVersion = os.release().split(".");
123
121
  if ((Number(osVersion[0]) === 6 && Number(osVersion[1]) === 1) || Number(osVersion[0]) < 6) {
124
122
  await removeCertFiles(certPath, keyPath, pfxPath);
@@ -140,7 +138,14 @@ export async function createCertFile(config, open) {
140
138
  }
141
139
  break;
142
140
  }
143
- passphrase = (crypto.getRandomValues || webcrypto.getRandomValues)(new Uint32Array(1))[0].toString().substring(2);
141
+ let randomValues;
142
+ if (crypto.getRandomValues !== undefined) {
143
+ randomValues = crypto.getRandomValues(new Uint32Array(1));
144
+ }
145
+ else {
146
+ randomValues = crypto.webcrypto.getRandomValues(new Uint32Array(1));
147
+ }
148
+ const passphrase = randomValues[0].toString().substring(2);
144
149
  config.server.passphrase = passphrase;
145
150
  fs.writeFileSync(path.join(rootPath, confPath), JSON.stringify(config));
146
151
  // for windows 8 / 8.1 / server 2012 R2 /
@@ -40,9 +40,9 @@ export default class CommandManager {
40
40
  };
41
41
  new VisualManager(rootPath)
42
42
  .prepareVisual()
43
- .validateVisual()
43
+ .validateVisual(options.verbose)
44
44
  .initializeWebpack(webpackOptions)
45
- .then(visualManager => visualManager.generatePackage());
45
+ .then(visualManager => visualManager.generatePackage(options.verbose));
46
46
  }
47
47
  static new({ force, template }, name, rootPath) {
48
48
  const generateOptions = {
@@ -78,11 +78,11 @@ export default class VisualManager {
78
78
  this.compiler = webpack(this.webpackConfig);
79
79
  return this;
80
80
  }
81
- generatePackage() {
81
+ generatePackage(verbose = false) {
82
82
  const callback = (err, stats) => {
83
83
  this.createPackageInstance();
84
84
  const logs = this.validatePackage();
85
- this.outputResults(logs);
85
+ this.outputResults(logs, verbose);
86
86
  this.parseCompilationResults(err, stats);
87
87
  };
88
88
  this.compiler.run(callback);
@@ -114,10 +114,10 @@ export default class VisualManager {
114
114
  process.exit(1);
115
115
  }
116
116
  }
117
- validateVisual() {
117
+ validateVisual(verbose = false) {
118
118
  this.featureManager = new FeatureManager();
119
119
  const { status, logs } = this.featureManager.validate(Stage.PreBuild, this.visual);
120
- this.outputResults(logs);
120
+ this.outputResults(logs, verbose);
121
121
  if (status === Status.Error) {
122
122
  process.exit(1);
123
123
  }
@@ -128,17 +128,21 @@ export default class VisualManager {
128
128
  const { logs } = featureManager.validate(Stage.PostBuild, this.package);
129
129
  return logs;
130
130
  }
131
- outputResults({ errors, deprecation, warnings, info }) {
132
- const featuresTotalLog = {
133
- errors: `Visual doesn't support some features required for all custom visuals:`,
131
+ outputResults({ errors, deprecation, warnings, info }, verbose) {
132
+ const headerMessage = {
133
+ error: `Visual doesn't support some features required for all custom visuals:`,
134
134
  deprecation: `Some features are going to be required soon, please update the visual:`,
135
- warn: `Visual doesn't support some features recommended for all custom visuals:`,
136
- info: `Visual can be improved by adding some features:`
135
+ warning: `Visual doesn't support some features recommended for all custom visuals:`,
136
+ verboseInfo: `Visual can be improved by adding some features:`,
137
+ shortInfo: `Visual can be improved by adding ${info.length} more optional features.`
137
138
  };
138
- this.outputLogsWithHeadMessage(featuresTotalLog.errors, errors, Severity.Error);
139
- this.outputLogsWithHeadMessage(featuresTotalLog.deprecation, deprecation, Severity.Deprecation);
140
- this.outputLogsWithHeadMessage(featuresTotalLog.warn, warnings, Severity.Warning);
141
- this.outputLogsWithHeadMessage(featuresTotalLog.info, info, Severity.Info);
139
+ this.outputLogsWithHeadMessage(headerMessage.error, errors, Severity.Error);
140
+ this.outputLogsWithHeadMessage(headerMessage.deprecation, deprecation, Severity.Deprecation);
141
+ this.outputLogsWithHeadMessage(headerMessage.warning, warnings, Severity.Warning);
142
+ const verboseSuggestion = 'Run `pbiviz package` with --verbose flag to see more details.';
143
+ const headerInfoMessage = headerMessage[verbose ? "verboseInfo" : "shortInfo"];
144
+ const infoLogs = (!info.length || verbose) ? info : [verboseSuggestion];
145
+ this.outputLogsWithHeadMessage(headerInfoMessage, infoLogs, Severity.Info);
142
146
  }
143
147
  displayInfo() {
144
148
  if (this.pbivizConfig) {
@@ -2,7 +2,7 @@ import { Severity, Stage, VisualFeatureType } from "./FeatureTypes.js";
2
2
  export default class ESLint {
3
3
  static featureName = "ESLint";
4
4
  static documentationLink = "https://github.com/microsoft/eslint-plugin-powerbi-visuals";
5
- static severity = Severity.Error;
5
+ static severity = Severity.Warning;
6
6
  static stage = Stage.PreBuild;
7
7
  static visualFeatureType = VisualFeatureType.All;
8
8
  static errorMessage = `${this.featureName} - ${this.documentationLink}`;
@@ -4,7 +4,7 @@ export default class TotalSubTotal {
4
4
  static documentationLink = "https://learn.microsoft.com/en-us/power-bi/developer/visuals/total-subtotal-api";
5
5
  static severity = Severity.Warning;
6
6
  static stage = Stage.PostBuild;
7
- static visualFeatureType = VisualFeatureType.Matrix | VisualFeatureType.NonSlicer | VisualFeatureType.Slicer;
7
+ static visualFeatureType = VisualFeatureType.Matrix;
8
8
  static errorMessage = `${this.featureName} - ${this.documentationLink}`;
9
9
  static isSupported(packageInstance) {
10
10
  return packageInstance.isCapabilityEnabled({ subtotals: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powerbi-visuals-tools",
3
- "version": "5.2.0-beta.2",
3
+ "version": "5.2.0",
4
4
  "description": "Command line tool for creating and publishing visuals for Power BI",
5
5
  "main": "./bin/pbiviz.js",
6
6
  "type": "module",
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "homepage": "https://github.com/Microsoft/PowerBI-visuals-tools#readme",
31
31
  "dependencies": {
32
- "@typescript-eslint/parser": "^5.62.0",
33
- "assert": "^2.0.0",
32
+ "@typescript-eslint/parser": "^6.7.5",
33
+ "assert": "^2.1.0",
34
34
  "async": "^3.2.4",
35
35
  "browserify-zlib": "^0.2.0",
36
36
  "buffer": "^6.0.3",
@@ -68,19 +68,19 @@
68
68
  "string_decoder": "^1.3.0",
69
69
  "terser-webpack-plugin": "^5.3.9",
70
70
  "timers-browserify": "^2.0.12",
71
- "ts-loader": "^9.4.4",
71
+ "ts-loader": "^9.5.0",
72
72
  "tty-browserify": "^0.0.1",
73
73
  "typescript": "^4.9.5",
74
- "url": "^0.11.1",
74
+ "url": "^0.11.3",
75
75
  "util": "^0.12.5",
76
76
  "vm-browserify": "^1.1.2",
77
77
  "webpack": "^5.88.2",
78
- "webpack-bundle-analyzer": "4.9.0",
78
+ "webpack-bundle-analyzer": "4.9.1",
79
79
  "webpack-dev-server": "^4.15.1"
80
80
  },
81
81
  "devDependencies": {
82
- "@typescript-eslint/eslint-plugin": "^5.62.0",
83
- "eslint": "^8.47.0",
82
+ "@typescript-eslint/eslint-plugin": "^6.7.5",
83
+ "eslint": "^8.51.0",
84
84
  "eslint-plugin-powerbi-visuals": "^0.8.1",
85
85
  "jasmine": "5.1.0",
86
86
  "jasmine-spec-reporter": "7.0.0",
@@ -17,7 +17,7 @@
17
17
  "@types/d3": "7.4.0",
18
18
  "d3": "7.8.5",
19
19
  "powerbi-visuals-api": "5.4.0",
20
- "powerbi-visuals-utils-formattingmodel": "5.0.0"
20
+ "powerbi-visuals-utils-formattingmodel": "6.0.0"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@typescript-eslint/eslint-plugin": "^5.59.11",
@@ -28,7 +28,7 @@
28
28
 
29
29
  import { formattingSettings } from "powerbi-visuals-utils-formattingmodel";
30
30
 
31
- import FormattingSettingsCard = formattingSettings.Card;
31
+ import FormattingSettingsCard = formattingSettings.SimpleCard;
32
32
  import FormattingSettingsSlice = formattingSettings.Slice;
33
33
  import FormattingSettingsModel = formattingSettings.Model;
34
34
 
@@ -59,7 +59,7 @@ export class Visual implements IVisual {
59
59
  }
60
60
 
61
61
  public update(options: VisualUpdateOptions) {
62
- this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews);
62
+ this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews[0]);
63
63
 
64
64
  console.log('Visual update', options);
65
65
  if (this.textNode) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "visual",
3
3
  "dependencies": {
4
- "powerbi-visuals-utils-formattingmodel": "5.0.0"
4
+ "powerbi-visuals-utils-formattingmodel": "6.0.0"
5
5
  },
6
6
  "devDependencies": {
7
7
  "powerbi-visuals-api": "5.4.0",
@@ -28,7 +28,7 @@
28
28
 
29
29
  import { formattingSettings } from "powerbi-visuals-utils-formattingmodel";
30
30
 
31
- import FormattingSettingsCard = formattingSettings.Card;
31
+ import FormattingSettingsCard = formattingSettings.SimpleCard;
32
32
  import FormattingSettingsSlice = formattingSettings.Slice;
33
33
  import FormattingSettingsModel = formattingSettings.Model;
34
34
 
@@ -111,7 +111,7 @@ export class Visual implements IVisual {
111
111
  }
112
112
 
113
113
  const dataView: DataView = options.dataViews[0];
114
- this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews);
114
+ this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews[0]);
115
115
 
116
116
  let payloadBase64: string = null;
117
117
  if (dataView.scriptResult && dataView.scriptResult.payloadBase64) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "visual",
3
3
  "dependencies": {
4
- "powerbi-visuals-utils-formattingmodel": "5.0.0"
4
+ "powerbi-visuals-utils-formattingmodel": "6.0.0"
5
5
  },
6
6
  "devDependencies": {
7
7
  "powerbi-visuals-api": "5.4.0",
@@ -28,7 +28,7 @@
28
28
 
29
29
  import { formattingSettings } from "powerbi-visuals-utils-formattingmodel";
30
30
 
31
- import FormattingSettingsCard = formattingSettings.Card;
31
+ import FormattingSettingsCard = formattingSettings.SimpleCard;
32
32
  import FormattingSettingsSlice = formattingSettings.Slice;
33
33
  import FormattingSettingsModel = formattingSettings.Model;
34
34
 
@@ -63,7 +63,7 @@ export class Visual implements IVisual {
63
63
  }
64
64
 
65
65
  const dataView: DataView = options.dataViews[0];
66
- this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews);
66
+ this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews[0]);
67
67
 
68
68
  let imageUrl: string = null;
69
69
  if (dataView.scriptResult && dataView.scriptResult.payloadBase64) {
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "d3": "7.8.5",
11
- "powerbi-visuals-utils-formattingmodel": "5.0.0"
11
+ "powerbi-visuals-utils-formattingmodel": "6.0.0"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@types/d3": "7.4.0",
@@ -28,7 +28,7 @@
28
28
 
29
29
  import { formattingSettings } from "powerbi-visuals-utils-formattingmodel";
30
30
 
31
- import FormattingSettingsCard = formattingSettings.Card;
31
+ import FormattingSettingsCard = formattingSettings.SimpleCard;
32
32
  import FormattingSettingsSlice = formattingSettings.Slice;
33
33
  import FormattingSettingsModel = formattingSettings.Model;
34
34
 
@@ -59,7 +59,7 @@ export class Visual implements IVisual {
59
59
  }
60
60
 
61
61
  public update(options: VisualUpdateOptions) {
62
- this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews);
62
+ this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews[0]);
63
63
  console.log("Visual update", options);
64
64
  if (this.textNode) {
65
65
  this.textNode.textContent = (this.updateCount++).toString();
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "d3": "7.8.5",
11
- "powerbi-visuals-utils-formattingmodel": "5.0.0"
11
+ "powerbi-visuals-utils-formattingmodel": "6.0.0"
12
12
  },
13
13
  "devDependencies": {
14
14
  "powerbi-visuals-api": "5.4.0",