@argos-ci/util 2.2.2 → 2.3.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/dist/browser.d.ts +1 -0
- package/dist/browser.js +1 -1
- package/dist/chunk-VMM7XHBS.js +26 -0
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/browser.d.ts
CHANGED
package/dist/browser.js
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// src/metadata.ts
|
|
2
|
+
function getMetadataPath(screenshotPath) {
|
|
3
|
+
return screenshotPath + ".argos.json";
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
// src/name.ts
|
|
7
|
+
function getScreenshotName(name, options = {}) {
|
|
8
|
+
const parts = [name];
|
|
9
|
+
if (options.viewportWidth) {
|
|
10
|
+
parts.push(`vw-${options.viewportWidth}`);
|
|
11
|
+
}
|
|
12
|
+
return parts.join(" ");
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// src/threshold.ts
|
|
16
|
+
function validateThreshold(threshold) {
|
|
17
|
+
if (threshold < 0 || threshold > 1) {
|
|
18
|
+
throw new Error("The threshold must be between 0 and 1.");
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
getMetadataPath,
|
|
24
|
+
getScreenshotName,
|
|
25
|
+
validateThreshold
|
|
26
|
+
};
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argos-ci/util",
|
|
3
3
|
"description": "Set of utilities used across all Argos SDKs.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
5
5
|
"author": "Smooth Code",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/node": "^18.19.44"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "8d46b4d4fc2b59b4fe93bac6fda02fb18440f935"
|
|
47
47
|
}
|