powerbi-visuals-tools 4.3.2 → 5.0.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 +7 -0
- package/README.md +1 -1
- package/bin/pbiviz.js +55 -36
- package/certs/PowerBICustomVisualTest_private.key +26 -26
- package/certs/PowerBICustomVisualTest_public.crt +17 -17
- package/config.json +27 -34
- package/lib/CertificateTools.js +119 -143
- package/lib/CommandManager.js +52 -0
- package/lib/ConsoleWriter.js +63 -85
- package/lib/TemplateFetcher.js +23 -30
- package/lib/VisualGenerator.js +42 -56
- package/lib/VisualManager.js +193 -0
- package/lib/WebPackWrap.js +96 -145
- package/lib/utils.js +21 -13
- package/lib/webpack.config.js +47 -56
- package/package.json +34 -26
- package/spec/clean-tests.js +1 -1
- package/spec/e2e/pbivizCertSpec.js +14 -13
- package/spec/e2e/pbivizInfoSpec.js +7 -10
- package/spec/e2e/pbivizNewSpec.js +53 -65
- package/spec/e2e/pbivizPackageSpec.js +86 -90
- package/spec/e2e/pbivizStartSpec.js +6 -7
- package/spec/e2e/pbivizWebpackVerSpec.js +14 -16
- package/spec/e2e/{utils.js → testUtils.js} +9 -12
- package/spec/helpers/FileSystem.js +18 -18
- package/spec/jasmine-runner.js +5 -5
- package/src/CertificateTools.ts +431 -0
- package/src/CommandManager.ts +78 -0
- package/src/ConsoleWriter.ts +206 -0
- package/src/TemplateFetcher.ts +122 -0
- package/src/VisualGenerator.ts +236 -0
- package/src/VisualManager.ts +220 -0
- package/src/WebPackWrap.ts +299 -0
- package/src/utils.ts +41 -0
- package/src/webpack.config.ts +144 -0
- package/templates/pbiviz-json-template.js +2 -2
- package/templates/pbiviz.json.template +1 -1
- package/templates/plugin-ts-template.js +1 -1
- package/templates/visuals/default/.eslintignore +5 -0
- package/templates/visuals/default/.eslintrc.js +20 -0
- package/templates/visuals/default/package.json +9 -8
- package/templates/visuals/default/pbiviz.json +3 -2
- package/templates/visuals/default/tsconfig.json +2 -2
- package/templates/visuals/rhtml/.eslintignore +5 -0
- package/templates/visuals/rhtml/.eslintrc.js +20 -0
- package/templates/visuals/rhtml/package.json +7 -6
- package/templates/visuals/rhtml/pbiviz.json +2 -1
- package/templates/visuals/rvisual/.eslintignore +5 -0
- package/templates/visuals/rvisual/.eslintrc.js +20 -0
- package/templates/visuals/rvisual/package.json +5 -4
- package/templates/visuals/slicer/.eslintignore +5 -0
- package/templates/visuals/slicer/.eslintrc.js +20 -0
- package/templates/visuals/slicer/package.json +8 -7
- package/templates/visuals/table/.eslintignore +5 -0
- package/templates/visuals/table/.eslintrc.js +20 -0
- package/templates/visuals/table/package.json +8 -7
- package/templates/visuals/table/tsconfig.json +4 -0
- package/tsconfig.json +22 -0
- package/bin/pbiviz-info.js +0 -54
- package/bin/pbiviz-new.js +0 -82
- package/bin/pbiviz-package.js +0 -122
- package/bin/pbiviz-start.js +0 -142
- package/lib/CommandHelpManager.js +0 -51
- package/lib/VisualPackage.js +0 -118
- package/templates/visuals/default/tslint.json +0 -9
- package/templates/visuals/rhtml/tslint.json +0 -9
- package/templates/visuals/rvisual/tslint.json +0 -9
- package/templates/visuals/slicer/tslint.json +0 -9
- package/templates/visuals/table/tslint.json +0 -9
package/Changelog.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
This page contains information about changes to the PowerBI Visual Tools (pbiviz).
|
|
4
4
|
|
|
5
|
+
## 5.0.0
|
|
6
|
+
* Migrated to TypeScript
|
|
7
|
+
* Migrated to eslint
|
|
8
|
+
* Fixed vulnerabilities
|
|
9
|
+
* Migrated to newest CommanderJS
|
|
10
|
+
* Migrated to NodeJS 18.0 **⚠**
|
|
11
|
+
|
|
5
12
|
## 4.3.2
|
|
6
13
|
* LocalizationLoader has been moved to `powerbi-visuals-webpack-plugin`
|
|
7
14
|
|
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Before you can get started you'll need to install the tools. This should only ta
|
|
|
24
24
|
|
|
25
25
|
Before you can run (or install) the command line tools you must install NodeJS.
|
|
26
26
|
|
|
27
|
-
* NodeJS
|
|
27
|
+
* NodeJS 18.0+ Required - [Download NodeJS](https://nodejs.org)
|
|
28
28
|
|
|
29
29
|
#### Installation
|
|
30
30
|
|
package/bin/pbiviz.js
CHANGED
|
@@ -27,46 +27,65 @@
|
|
|
27
27
|
|
|
28
28
|
"use strict";
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
let args = process.argv;
|
|
36
|
-
let CertificateTools = require("../lib/CertificateTools");
|
|
30
|
+
import { createCertificate } from "../lib/CertificateTools.js";
|
|
31
|
+
import ConsoleWriter from '../lib/ConsoleWriter.js';
|
|
32
|
+
import CommandManager from '../lib/CommandManager.js';
|
|
33
|
+
import { readJsonFromRoot } from '../lib/utils.js';
|
|
34
|
+
import { Command, Option } from 'commander';
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
const npmPackage = readJsonFromRoot('package.json');
|
|
37
|
+
const rootPath = process.cwd();
|
|
38
|
+
const program = new Command();
|
|
39
39
|
|
|
40
|
-
program
|
|
40
|
+
const pbiviz = program
|
|
41
41
|
.version(npmPackage.version)
|
|
42
|
-
.
|
|
43
|
-
.
|
|
44
|
-
.
|
|
45
|
-
.
|
|
46
|
-
.option('--install-cert', 'Creates and installs localhost certificate', onOpenCertFile);
|
|
42
|
+
.option('--install-cert', 'Creates and installs localhost certificate', createCertificate)
|
|
43
|
+
.showHelpAfterError('Run "pbiviz help" for usage instructions.')
|
|
44
|
+
.addHelpText('beforeAll', ConsoleWriter.info(`${npmPackage.name} version - ${npmPackage.version}`))
|
|
45
|
+
.addHelpText('before', ConsoleWriter.getLogoVisualization());
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
pbiviz
|
|
48
|
+
.command('new')
|
|
49
|
+
.usage("<argument> [options]")
|
|
50
|
+
.argument('<name>', 'name of new visual')
|
|
51
|
+
.option('-f, --force', 'force creation (overwrites folder if exists)')
|
|
52
|
+
.addOption(new Option('-t, --template [template]', 'use a specific template')
|
|
53
|
+
.choices(['default', 'table', 'slicer', 'rvisual', 'rhtml', 'circlecard'])
|
|
54
|
+
.default('default')
|
|
55
|
+
)
|
|
56
|
+
.action((name, options) => {
|
|
57
|
+
CommandManager.new(options, name, rootPath);
|
|
58
|
+
});
|
|
52
59
|
|
|
53
|
-
|
|
60
|
+
pbiviz
|
|
61
|
+
.command('info')
|
|
62
|
+
.action(() => {
|
|
63
|
+
CommandManager.info(rootPath);
|
|
64
|
+
});
|
|
54
65
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
66
|
+
pbiviz
|
|
67
|
+
.command('start')
|
|
68
|
+
.usage('[options]')
|
|
69
|
+
.option('-p, --port [port]', 'set the port listening on')
|
|
70
|
+
.option('-d, --drop', 'drop outputs into output folder')
|
|
71
|
+
.option('--no-stats', "Doesn't generate statistics files")
|
|
72
|
+
.action(async (options) => {
|
|
73
|
+
CommandManager.start(options, rootPath);
|
|
74
|
+
});
|
|
62
75
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
76
|
+
pbiviz
|
|
77
|
+
.command('package')
|
|
78
|
+
.usage('[options]')
|
|
79
|
+
.option('--resources', "Produces a folder containing the pbiviz resource files (js, css, json)")
|
|
80
|
+
.option('--no-pbiviz', "Doesn't produce a pbiviz file (must be used in conjunction with resources flag)")
|
|
81
|
+
.option('--no-minify', "Doesn't minify the js in the package (useful for debugging)")
|
|
82
|
+
.option('--no-stats', "Doesn't generate statistics files")
|
|
83
|
+
.addOption(new Option('-c, --compression <compressionLevel>', "Enables compression of visual package")
|
|
84
|
+
.choices(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'])
|
|
85
|
+
.default('6')
|
|
86
|
+
)
|
|
87
|
+
.action((options) => {
|
|
88
|
+
CommandManager.package(options, rootPath);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
program.parse(process.argv);
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
-----BEGIN PRIVATE KEY-----
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCi3X3hDfJ24lQJ
|
|
3
|
+
nEPNxT37WNNDVD4Dq4yb5aTrDWxZJT7U1Je7G9j4y3+LE6s4HioehtGHRXECfVZ7
|
|
4
|
+
Ts8t2oVhiim9751ECTSmsAFEboy7t8mvLCFlIvjU1NZUXlAe1dO/ekcecLSnzczF
|
|
5
|
+
x+l8VgNve0DYRgRjuckgI4UDNrTCvKqxlQUW2YSh+/nmUiF9A9ZPfq2gkSiZLsS5
|
|
6
|
+
tpRvVx102en1JZ1FLu3dZ/oI3A5HeDZgAW9HkSPZVBcp+aSG+S8ZHCRD/2B/qynt
|
|
7
|
+
9IDwFotNQgnMJjl1Z3Y0qHQIntNUmv6MPFPgNEqk40ceT5CdA+jjZrgPxAjG3LR+
|
|
8
|
+
6EMchWXlAgMBAAECggEAGLw+DYvCOvcV313J2Hsv9jgf4fZt8r2/vb+rg/2GaqWi
|
|
9
|
+
/M0K/GJ22haCGPvUQdInAHrmYL6VstSZaWHnSmYJYu6Kd2vofThOtFA/6QZHPo1j
|
|
10
|
+
xsST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UIJzCY5dWd2NKh0CJ7TVJr+
|
|
10
|
+
jDxT4DRKpONHHk+QnQPo42a4D8QIxty0fuhDHIVl5QIDAQABo1MwUTAdBgNVHQ4E
|
|
11
|
+
FgQUw6fYQDkuenlPn0I04iICZ7IwxKkwHwYDVR0jBBgwFoAUw6fYQDkuenlPn0I0
|
|
12
|
+
4iICZ7IwxKkwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAm00D
|
|
13
|
+
jOW/wg/QXlR3vyL79+QWiRwVKCLe81jBtH8YvOp644pXvU4KNzPxum+acfMZNgGX
|
|
14
|
+
TDSo9+K2jsJUddTdaMwX1XkY/HsYRgXtLF0y6O/2N+iqOyfeWg768G3KHoKruDk8
|
|
15
|
+
pUMe4hxkCHMStOhgxlVTpBmX1vGejkLncFLXZR2sfu8pXoNDwpy4VygEgl7f6WAO
|
|
16
|
+
aa0OM3xLX+U5P2aH8WRH4GDbfAqO2zYC1wzoguJIvYGgfcPL1mF+gjzSRAWr2Ia6
|
|
17
|
+
qNZXOL6Tf3WURblbyGx0H0RadRmK90W5GX2y/wqkBNHmhlizljammeNuiOWIQQWU
|
|
18
|
+
HDDjrvTD8qw+qNNMKw==
|
|
19
19
|
-----END CERTIFICATE-----
|
package/config.json
CHANGED
|
@@ -1,35 +1,28 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"pfx": "certs/PowerBICustomVisualTest_public.pfx",
|
|
30
|
-
"port": "8080"
|
|
31
|
-
},
|
|
32
|
-
"visualTemplates": {
|
|
33
|
-
"circlecard": "https://codeload.github.com/microsoft/powerbi-visuals-circlecard-react/zip/master"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
2
|
+
"templates": {
|
|
3
|
+
"visuals": "templates/visuals",
|
|
4
|
+
"pbiviz": "templates/pbiviz.json.template",
|
|
5
|
+
"plugin": "templates/plugin.ts.template",
|
|
6
|
+
"package": "templates/package.json.template"
|
|
7
|
+
},
|
|
8
|
+
"generate": { "apiVersion": "5.3.0" },
|
|
9
|
+
"constants": { "minAPIversion": "4.7.0" },
|
|
10
|
+
"build": {
|
|
11
|
+
"precompileFolder": ".tmp/precompile",
|
|
12
|
+
"dropFolder": ".tmp/drop",
|
|
13
|
+
"js": "tmp.visual.js",
|
|
14
|
+
"css": "visual.css",
|
|
15
|
+
"stats": "../../webpack.statistics.html"
|
|
16
|
+
},
|
|
17
|
+
"package": { "dropFolder": "dist" },
|
|
18
|
+
"server": {
|
|
19
|
+
"root": "webRoot",
|
|
20
|
+
"assetsRoute": "/assets",
|
|
21
|
+
"privateKey": "certs/PowerBICustomVisualTest_private.key",
|
|
22
|
+
"certificate": "certs/PowerBICustomVisualTest_public.crt",
|
|
23
|
+
"pfx": "certs/PowerBICustomVisualTest_public.pfx"
|
|
24
|
+
},
|
|
25
|
+
"visualTemplates": {
|
|
26
|
+
"circlecard": "https://codeload.github.com/microsoft/powerbi-visuals-circlecard-react/zip/master"
|
|
27
|
+
}
|
|
28
|
+
}
|