@snapvisor/util
Advanced tools
| //#region src/metadata.d.ts | ||
| type ScreenshotMetadata = { | ||
| /** @description The URL of the page that was screenshotted */url?: string | null; /** @description An URL to an accessible preview of the screenshot */ | ||
| previewUrl?: string | null; | ||
| viewport?: { | ||
| /** @description The width of the viewport */width: number; /** @description The height of the viewport */ | ||
| height: number; | ||
| } | null; /** @description The color scheme when the screenshot was taken */ | ||
| colorScheme?: ("light" | "dark") | null; /** @description The media type when the screenshot was taken */ | ||
| mediaType?: ("screen" | "print") | null; /** @description Tags associated with the screenshot */ | ||
| tags?: string[]; | ||
| test?: ({ | ||
| /** @description The unique identifier of the test */id?: string | null; /** @description The title of the test */ | ||
| title: string; /** @description The path of titles leading to the test */ | ||
| titlePath: string[]; /** @description Tags associated with the test */ | ||
| tags?: string[]; /** @description The number of retries for the test */ | ||
| retries?: number | null; /** @description The current retry count */ | ||
| retry?: number | null; /** @description The repeat count for the test */ | ||
| repeat?: number | null; /** @description The location of the test in the source code */ | ||
| location?: { | ||
| /** @description The located file */file: string; /** @description The line number in the file */ | ||
| line: number; /** @description The column number in the file */ | ||
| column: number; | ||
| }; /** @description Annotations associated to the test */ | ||
| annotations?: { | ||
| /** @description The type of annotation */type: string; /** @description The description of the annotation */ | ||
| description?: string; /** @description The location of the annotation in the source code */ | ||
| location?: { | ||
| /** @description The located file */file: string; /** @description The line number in the file */ | ||
| line: number; /** @description The column number in the file */ | ||
| column: number; | ||
| }; | ||
| }[]; | ||
| } | null) | null; | ||
| story?: { | ||
| /** @description Unique ID of the story */id: string; /** @description Tags attached to the story */ | ||
| tags: string[]; /** @description Story mode */ | ||
| mode?: string; /** @description True if the story has a play function */ | ||
| play?: boolean; | ||
| }; | ||
| browser?: { | ||
| /** @description The name of the browser */name: string; /** @description The version of the browser */ | ||
| version: string; | ||
| } | null; /** @description The automation library that generated the screenshot */ | ||
| automationLibrary: { | ||
| /** @description The name of the automation library */name: string; /** @description The version of the automation library */ | ||
| version: string; | ||
| }; /** @description The Snapvisor SDK that generated the screenshot */ | ||
| sdk: { | ||
| /** @description The name of the Snapvisor SDK */name: string; /** @description The version of the Snapvisor SDK */ | ||
| version: string; | ||
| }; | ||
| transient?: { | ||
| /** Threshold configured for this screenshot. */threshold?: number; /** Override the name to find the comparison baseline. */ | ||
| baseName?: string; /** Name of the parent screenshot. */ | ||
| parentName?: string; | ||
| }; | ||
| }; | ||
| /** | ||
| * Get metadata path from snapshot path. | ||
| */ | ||
| declare function getMetadataPath(snapshotPath: string): string; | ||
| //#endregion | ||
| //#region src/name.d.ts | ||
| /** | ||
| * Build a screenshot name from a test name and options. | ||
| */ | ||
| declare function getScreenshotName(name: string, options?: { | ||
| viewportWidth?: number; | ||
| }): string; | ||
| //#endregion | ||
| //#region src/threshold.d.ts | ||
| /** | ||
| * Validates the threshold value. | ||
| */ | ||
| declare function validateThreshold(threshold: number): void; | ||
| //#endregion | ||
| export { getMetadataPath as i, getScreenshotName as n, ScreenshotMetadata as r, validateThreshold as t }; |
@@ -1,2 +0,2 @@ | ||
| import { i as getMetadataPath, n as getScreenshotName, r as ScreenshotMetadata, t as validateThreshold } from "./threshold-MfycRxKY.mjs"; | ||
| import { i as getMetadataPath, n as getScreenshotName, r as ScreenshotMetadata, t as validateThreshold } from "./threshold-B4c4YXwX.mjs"; | ||
| export { type ScreenshotMetadata, getMetadataPath, getScreenshotName, validateThreshold }; |
+1
-1
@@ -1,2 +0,2 @@ | ||
| import { i as getMetadataPath, n as getScreenshotName, r as ScreenshotMetadata, t as validateThreshold } from "./threshold-MfycRxKY.mjs"; | ||
| import { i as getMetadataPath, n as getScreenshotName, r as ScreenshotMetadata, t as validateThreshold } from "./threshold-B4c4YXwX.mjs"; | ||
@@ -3,0 +3,0 @@ //#region src/fs.d.ts |
+4
-4
| { | ||
| "name": "@snapvisor/util", | ||
| "description": "Set of utilities used across all Snapvisor SDKs.", | ||
| "version": "4.0.4", | ||
| "version": "5.0.0", | ||
| "author": "Smooth Code", | ||
@@ -9,6 +9,6 @@ "license": "MIT", | ||
| "type": "git", | ||
| "url": "https://github.com/argos-ci/argos-javascript.git", | ||
| "url": "git+https://github.com/DevinoSolutions/snapvisor-js.git", | ||
| "directory": "packages/util" | ||
| }, | ||
| "homepage": "https://github.com/argos-ci/argos-javascript/blob/main/packages/util/README.md", | ||
| "homepage": "https://snapvisor.io/docs", | ||
| "bugs": { | ||
@@ -51,3 +51,3 @@ "url": "https://github.com/argos-ci/argos-javascript/issues" | ||
| }, | ||
| "gitHead": "7c74326b53f6f513ac4087385b88e8fbd7e92eac" | ||
| "gitHead": "b27308a53667724cc3c4f3e5eb7811bce3321f15" | ||
| } |
| //#region src/metadata.d.ts | ||
| type ScreenshotMetadata = { | ||
| /** @description The URL of the page that was screenshotted */url?: string | null; /** @description An URL to an accessible preview of the screenshot */ | ||
| previewUrl?: string | null; | ||
| viewport?: { | ||
| /** @description The width of the viewport */width: number; /** @description The height of the viewport */ | ||
| height: number; | ||
| } | null; /** @description The color scheme when the screenshot was taken */ | ||
| colorScheme?: ("light" | "dark") | null; /** @description The media type when the screenshot was taken */ | ||
| mediaType?: ("screen" | "print") | null; /** @description Tags associated with the screenshot */ | ||
| tags?: string[]; | ||
| test?: ({ | ||
| /** @description The unique identifier of the test */id?: string | null; /** @description The title of the test */ | ||
| title: string; /** @description The path of titles leading to the test */ | ||
| titlePath: string[]; /** @description Tags associated with the test */ | ||
| tags?: string[]; /** @description The number of retries for the test */ | ||
| retries?: number | null; /** @description The current retry count */ | ||
| retry?: number | null; /** @description The repeat count for the test */ | ||
| repeat?: number | null; /** @description The location of the test in the source code */ | ||
| location?: { | ||
| /** @description The located file */file: string; /** @description The line number in the file */ | ||
| line: number; /** @description The column number in the file */ | ||
| column: number; | ||
| }; /** @description Annotations associated to the test */ | ||
| annotations?: { | ||
| /** @description The type of annotation */type: string; /** @description The description of the annotation */ | ||
| description?: string; /** @description The location of the annotation in the source code */ | ||
| location?: { | ||
| /** @description The located file */file: string; /** @description The line number in the file */ | ||
| line: number; /** @description The column number in the file */ | ||
| column: number; | ||
| }; | ||
| }[]; | ||
| } | null) | null; | ||
| story?: { | ||
| /** @description Unique ID of the story */id: string; /** @description Tags attached to the story */ | ||
| tags: string[]; /** @description Story mode */ | ||
| mode?: string; /** @description True if the story has a play function */ | ||
| play?: boolean; | ||
| }; | ||
| browser?: { | ||
| /** @description The name of the browser */name: string; /** @description The version of the browser */ | ||
| version: string; | ||
| } | null; /** @description The automation library that generated the screenshot */ | ||
| automationLibrary: { | ||
| /** @description The name of the automation library */name: string; /** @description The version of the automation library */ | ||
| version: string; | ||
| }; /** @description The Argos SDK that generated the screenshot */ | ||
| sdk: { | ||
| /** @description The name of the Argos SDK */name: string; /** @description The version of the Argos SDK */ | ||
| version: string; | ||
| }; | ||
| transient?: { | ||
| /** Threshold configured for this screenshot. */threshold?: number; /** Override the name to find the comparison baseline. */ | ||
| baseName?: string; /** Name of the parent screenshot. */ | ||
| parentName?: string; | ||
| }; | ||
| }; | ||
| /** | ||
| * Get metadata path from snapshot path. | ||
| */ | ||
| declare function getMetadataPath(snapshotPath: string): string; | ||
| //#endregion | ||
| //#region src/name.d.ts | ||
| /** | ||
| * Build a screenshot name from a test name and options. | ||
| */ | ||
| declare function getScreenshotName(name: string, options?: { | ||
| viewportWidth?: number; | ||
| }): string; | ||
| //#endregion | ||
| //#region src/threshold.d.ts | ||
| /** | ||
| * Validates the threshold value. | ||
| */ | ||
| declare function validateThreshold(threshold: number): void; | ||
| //#endregion | ||
| export { getMetadataPath as i, getScreenshotName as n, ScreenshotMetadata as r, validateThreshold as t }; |
13946
-0.48%