reg-cli 0.17.3 → 0.17.4
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/README.md +2 -2
- package/dist/cli.js +2 -2
- package/dist/index.js +8 -1
- package/package.json +3 -3
- package/CHANGELOG.md +0 -29
- package/report/ui/LICENSE +0 -21
- package/report/ui/README.md +0 -85
- package/report/ui/package.json +0 -109
package/README.md
CHANGED
|
@@ -45,8 +45,8 @@ $ reg-cli /path/to/actual-dir /path/to/expected-dir /path/to/diff-dir -R ./repor
|
|
|
45
45
|
* `-E`, `--extendedErrors` If true, also added/deleted images will throw an error.
|
|
46
46
|
* `-P`, `--urlPrefix` Add prefix to all image src.
|
|
47
47
|
* `-M`, `--matchingThreshold` Matching threshold, ranges from 0 to 1. Smaller values make the comparison more sensitive. 0 by default.
|
|
48
|
-
* `-T`, `--thresholdRate` Rate threshold for detecting change. When the difference ratio of the image is larger than the set rate detects the change. Applied after `matchingThreshold`.
|
|
49
|
-
* `-S`, `--thresholdPixel` Pixel threshold for detecting change. When the difference pixel of the image is larger than the set pixel detects the change. This value takes precedence over `thresholdRate`. Applied after `matchingThreshold`.
|
|
48
|
+
* `-T`, `--thresholdRate` Rate threshold for detecting change. When the difference ratio of the image is larger than the set rate detects the change. Applied after `matchingThreshold`. 0 by default.
|
|
49
|
+
* `-S`, `--thresholdPixel` Pixel threshold for detecting change. When the difference pixel of the image is larger than the set pixel detects the change. This value takes precedence over `thresholdRate`. Applied after `matchingThreshold`. 0 by default.
|
|
50
50
|
* `-C`, `--concurrency` How many processes launches in parallel. If omitted 4.
|
|
51
51
|
* `-A`, `--enableAntialias` Enable antialias. If omitted false.
|
|
52
52
|
* `-X`, `--additionalDetection`. Enable additional difference detection(highly experimental). Select "none" or "client" (default: "none").
|
package/dist/cli.js
CHANGED
|
@@ -115,10 +115,10 @@ var observer = (0, _2.default)({
|
|
|
115
115
|
report: report,
|
|
116
116
|
json: json,
|
|
117
117
|
urlPrefix: urlPrefix,
|
|
118
|
-
matchingThreshold: Number(cli.flags.matchingThreshold),
|
|
118
|
+
matchingThreshold: Number(cli.flags.matchingThreshold || 0),
|
|
119
119
|
thresholdRate: Number(cli.flags.thresholdRate),
|
|
120
120
|
thresholdPixel: Number(cli.flags.thresholdPixel),
|
|
121
|
-
concurrency: Number(cli.flags.concurrency
|
|
121
|
+
concurrency: Number(cli.flags.concurrency || 4),
|
|
122
122
|
enableAntialias: !!cli.flags.enableAntialias,
|
|
123
123
|
enableClientAdditionalDetection: enableClientAdditionalDetection
|
|
124
124
|
});
|
package/dist/index.js
CHANGED
|
@@ -118,12 +118,19 @@ var compareImages = function compareImages(emitter, _ref2) {
|
|
|
118
118
|
|
|
119
119
|
var cleanupExpectedDir = function cleanupExpectedDir(expectedDir, changedFiles) {
|
|
120
120
|
var paths = changedFiles.map(function (image) {
|
|
121
|
-
|
|
121
|
+
var _path$posix;
|
|
122
|
+
|
|
123
|
+
var directories = expectedDir.split("\\");
|
|
124
|
+
return escapeGlob((_path$posix = _path2.default.posix).join.apply(_path$posix, _toConsumableArray(directories).concat([image])));
|
|
122
125
|
});
|
|
123
126
|
// force: true needed to allow deleting outside working directory
|
|
124
127
|
return (0, _del2.default)(paths, { force: true });
|
|
125
128
|
};
|
|
126
129
|
|
|
130
|
+
var escapeGlob = function escapeGlob(fileName) {
|
|
131
|
+
return fileName.replace(/(\*)/g, '[$1]').replace(/(\*)/g, '[$1]').replace(/(\?)/g, '[$1]').replace(/(\[)/g, '[$1]').replace(/(\])/g, '[$1]').replace(/(\{)/g, '[$1]').replace(/(\})/g, '[$1]').replace(/(\))/g, '[$1]').replace(/(\()/g, '[$1]').replace(/(\!)/g, '[$1]');
|
|
132
|
+
};
|
|
133
|
+
|
|
127
134
|
var aggregate = function aggregate(result) {
|
|
128
135
|
var passed = result.filter(function (r) {
|
|
129
136
|
return r.passed;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reg-cli",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"start": "node ./dist/cli.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"author": "bokuweb",
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"resolutions": {
|
|
33
|
-
"**/set-value": "4.0.
|
|
33
|
+
"**/set-value": "4.0.1",
|
|
34
34
|
"**/randomatic": "3.1.1",
|
|
35
35
|
"**/deep-extend": "0.6.0",
|
|
36
36
|
"**/cryptiles": "4.1.3",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"cli-spinner": "0.2.10",
|
|
52
52
|
"cross-spawn": "7.0.3",
|
|
53
53
|
"del": "6.0.0",
|
|
54
|
-
"glob": "7.
|
|
54
|
+
"glob": "7.2.0",
|
|
55
55
|
"img-diff-js": "0.5.2",
|
|
56
56
|
"jpeg-js": "^0.4.0",
|
|
57
57
|
"lodash": "4.17.21",
|
package/CHANGELOG.md
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
<!--
|
|
4
|
-
## [[Unreleased]](https://github.com/reg-viz/reg-cli/compare/v5.0.0-beta.0...master)
|
|
5
|
-
<details>
|
|
6
|
-
<summary>
|
|
7
|
-
Changes that have landed in master but are not yet released.
|
|
8
|
-
Click to see more.
|
|
9
|
-
</summary>
|
|
10
|
-
</details> -->
|
|
11
|
-
|
|
12
|
-
<!--
|
|
13
|
-
### :rocket: New Feature
|
|
14
|
-
|
|
15
|
-
### :bug: Bug Fix
|
|
16
|
-
|
|
17
|
-
### :nail_care: Enhancement
|
|
18
|
-
|
|
19
|
-
### :memo: Documentation
|
|
20
|
-
|
|
21
|
-
### :house: Internal
|
|
22
|
-
-->
|
|
23
|
-
|
|
24
|
-
## [0.15.13 (2019-11-30)](https://github.com/reg-viz/reg-cli/compare/v0.15.12...v0.15.13)
|
|
25
|
-
|
|
26
|
-
### :bug: Bug Fix
|
|
27
|
-
|
|
28
|
-
- Fixed a Marker style (reg-viz/reg-cli-report-ui#25)
|
|
29
|
-
- Fixed a bug where the diff items path was inconsistent when using jpg files (reg-viz/reg-cli-report-ui#26)
|
package/report/ui/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2019 reg-viz.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
package/report/ui/README.md
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# reg-cli-report-ui
|
|
2
|
-
|
|
3
|
-
[](https://github.com/reg-viz/reg-cli-report-ui/actions)
|
|
4
|
-
|
|
5
|
-
> :gem: New face of reg-cli report UI.
|
|
6
|
-
|
|
7
|
-
This repository is the Report UI of [reg-viz/reg-cli][reg-cli]
|
|
8
|
-
|
|
9
|
-
## Screenshots
|
|
10
|
-
|
|
11
|
-

|
|
12
|
-

|
|
13
|
-

|
|
14
|
-
|
|
15
|
-
## Available scripts
|
|
16
|
-
|
|
17
|
-
The following list is scripts used during development.
|
|
18
|
-
|
|
19
|
-
### `yarn start`
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
$ yarn start
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Launch the Report UI with the mock data.
|
|
26
|
-
|
|
27
|
-
### `yarn build`
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
$ yarn build
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Generate the JavaScript file required to embed Report UI. This is usually called in [reg-viz/reg-cli][reg-cli].
|
|
34
|
-
|
|
35
|
-
### `yarn typecheck`
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
$ yarn typecheck
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Run static type checking using TypeScript.
|
|
42
|
-
|
|
43
|
-
### `yarn lint`
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
$ yarn lint
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Run Lint with ESLint.
|
|
50
|
-
|
|
51
|
-
### `yarn format`
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
$ yarn format
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Format the source code using Prettier and ESLint.
|
|
58
|
-
|
|
59
|
-
### `yarn storybook`
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
$ yarn storybook
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Launch the component catalog with Storybook.
|
|
66
|
-
|
|
67
|
-
### `yarn scaffold`
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
$ yarn scaffold
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Generate a component template.
|
|
74
|
-
|
|
75
|
-
## Contribute
|
|
76
|
-
|
|
77
|
-
PRs welcome.
|
|
78
|
-
|
|
79
|
-
## License
|
|
80
|
-
|
|
81
|
-
[MIT License @ reg-viz](./LICENSE)
|
|
82
|
-
|
|
83
|
-

|
|
84
|
-
|
|
85
|
-
[reg-cli]: https://github.com/reg-viz/reg-cli
|
package/report/ui/package.json
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "reg-suit-report-ui",
|
|
3
|
-
"version": "0.2.1",
|
|
4
|
-
"private": true,
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "cross-env NODE_ENV=\"production\" run-s -s clean build:source",
|
|
8
|
-
"build:source": "webpack",
|
|
9
|
-
"clean": "rimraf dist",
|
|
10
|
-
"format": "run-s format:prettier format:script",
|
|
11
|
-
"format:prettier": "prettier --write .",
|
|
12
|
-
"format:script": "yarn lint:script --fix",
|
|
13
|
-
"lint": "run-p lint:*",
|
|
14
|
-
"lint:prettier": "prettier --check .",
|
|
15
|
-
"lint:script": "eslint . --ext \".js,.jsx,.ts,.tsx\"",
|
|
16
|
-
"scaffold": "yarn scaffdog generate",
|
|
17
|
-
"start": "webpack serve",
|
|
18
|
-
"start:huge": "webpack serve --env ENABLED_HUGE",
|
|
19
|
-
"storybook": "start-storybook -p 6006",
|
|
20
|
-
"storybook:build": "build-storybook",
|
|
21
|
-
"test": "jest",
|
|
22
|
-
"test:watch": "yarn test --watch",
|
|
23
|
-
"typecheck": "tsc"
|
|
24
|
-
},
|
|
25
|
-
"husky": {
|
|
26
|
-
"hooks": {
|
|
27
|
-
"pre-commit": "lint-staged"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"lint-staged": {
|
|
31
|
-
"*.{js,jsx,ts,tsx,css,md,yml,json}": [
|
|
32
|
-
"prettier --write"
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
|
-
"browserslist": "> 1%, not dead, not IE <= 11, not OperaMini all",
|
|
36
|
-
"dependencies": {
|
|
37
|
-
"body-scroll-lock": "^3.1.5",
|
|
38
|
-
"clipboard-polyfill": "^3.0.2",
|
|
39
|
-
"debounce": "^1.2.0",
|
|
40
|
-
"focus-trap": "^6.2.3",
|
|
41
|
-
"fuse.js": "^6.4.6",
|
|
42
|
-
"history": "^5.0.0",
|
|
43
|
-
"keycode": "^2.2.0",
|
|
44
|
-
"mousetrap": "^1.6.5",
|
|
45
|
-
"preact": "^10.5.10",
|
|
46
|
-
"query-string": "^7.0.1",
|
|
47
|
-
"rc-slider": "^9.7.1",
|
|
48
|
-
"re-resizable": "^6.9.0",
|
|
49
|
-
"react": "17.0.1",
|
|
50
|
-
"react-dom": "17.0.1",
|
|
51
|
-
"react-md-spinner": "^1.0.0",
|
|
52
|
-
"react-transition-group": "^4.4.1",
|
|
53
|
-
"styled-components": "5.2.1",
|
|
54
|
-
"unstated-next": "^1.1.0",
|
|
55
|
-
"use-intersection": "^0.2.1",
|
|
56
|
-
"x-img-diff-js": "^0.3.5"
|
|
57
|
-
},
|
|
58
|
-
"devDependencies": {
|
|
59
|
-
"@babel/core": "^7.12.10",
|
|
60
|
-
"@babel/plugin-proposal-class-properties": "^7.12.1",
|
|
61
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
|
|
62
|
-
"@babel/preset-env": "^7.12.11",
|
|
63
|
-
"@babel/preset-react": "^7.12.10",
|
|
64
|
-
"@babel/preset-typescript": "^7.12.7",
|
|
65
|
-
"@storybook/addon-actions": "^6.1.14",
|
|
66
|
-
"@storybook/addons": "^6.1.14",
|
|
67
|
-
"@storybook/react": "^6.1.14",
|
|
68
|
-
"@types/body-scroll-lock": "^2.6.1",
|
|
69
|
-
"@types/debounce": "^1.2.0",
|
|
70
|
-
"@types/fuzzy-search": "^2.1.0",
|
|
71
|
-
"@types/imagesloaded": "^4.1.2",
|
|
72
|
-
"@types/jest": "^26.0.20",
|
|
73
|
-
"@types/mousetrap": "^1.6.5",
|
|
74
|
-
"@types/node": "^14.14.21",
|
|
75
|
-
"@types/react": "^17.0.0",
|
|
76
|
-
"@types/react-dom": "^17.0.0",
|
|
77
|
-
"@types/react-measure": "^2.0.6",
|
|
78
|
-
"@types/react-transition-group": "^4.4.0",
|
|
79
|
-
"@types/styled-components": "5.1.7",
|
|
80
|
-
"@typescript-eslint/eslint-plugin": "^4.13.0",
|
|
81
|
-
"@typescript-eslint/parser": "^4.13.0",
|
|
82
|
-
"babel-loader": "^8.2.2",
|
|
83
|
-
"babel-plugin-styled-components": "^1.12.0",
|
|
84
|
-
"copy-webpack-plugin": "^7.0.0",
|
|
85
|
-
"cross-env": "^7.0.3",
|
|
86
|
-
"eslint": "^7.18.0",
|
|
87
|
-
"eslint-config-prettier": "^7.1.0",
|
|
88
|
-
"eslint-plugin-import": "^2.22.1",
|
|
89
|
-
"eslint-plugin-jest": "^24.1.3",
|
|
90
|
-
"eslint-plugin-prettier": "^3.3.1",
|
|
91
|
-
"eslint-plugin-react": "^7.22.0",
|
|
92
|
-
"eslint-plugin-react-hooks": "^4.2.0",
|
|
93
|
-
"html-webpack-plugin": "^5.0.0-beta.5",
|
|
94
|
-
"husky": "^4.3.8",
|
|
95
|
-
"jest": "^26.6.3",
|
|
96
|
-
"lint-staged": "^10.5.3",
|
|
97
|
-
"npm-run-all": "^4.1.5",
|
|
98
|
-
"prettier": "^2.2.1",
|
|
99
|
-
"prettier-plugin-packagejson": "^2.2.9",
|
|
100
|
-
"react-hot-loader": "^4.13.0",
|
|
101
|
-
"rimraf": "^3.0.2",
|
|
102
|
-
"scaffdog": "^1.0.0",
|
|
103
|
-
"typescript": "^4.1.3",
|
|
104
|
-
"typescript-eslint-language-service": "^4.1.3",
|
|
105
|
-
"webpack": "^5.15.0",
|
|
106
|
-
"webpack-cli": "^4.3.1",
|
|
107
|
-
"webpack-dev-server": "^3.11.2"
|
|
108
|
-
}
|
|
109
|
-
}
|