@vizzly-testing/cli 0.29.1 → 0.29.3
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/api/endpoints.js +3 -1
- package/dist/cli.js +5 -3
- package/dist/commands/builds.js +1 -0
- package/dist/commands/comparisons.js +1 -0
- package/dist/reporter/reporter-bundle.iife.js +49 -49
- package/dist/server/handlers/tdd-handler.js +81 -26
- package/dist/server/routers/dashboard.js +50 -1
- package/dist/server/routers/events.js +87 -7
- package/package.json +1 -1
package/dist/api/endpoints.js
CHANGED
|
@@ -214,7 +214,7 @@ export async function getComparison(client, comparisonId) {
|
|
|
214
214
|
* Search for comparisons by name
|
|
215
215
|
* @param {Object} client - API client
|
|
216
216
|
* @param {string} name - Screenshot name to search for
|
|
217
|
-
* @param {Object} filters - Optional filters (branch, limit, offset)
|
|
217
|
+
* @param {Object} filters - Optional filters (branch, project, organization, limit, offset)
|
|
218
218
|
* @returns {Promise<Object>} Search results with comparisons and pagination
|
|
219
219
|
*/
|
|
220
220
|
export async function searchComparisons(client, name, filters = {}) {
|
|
@@ -224,6 +224,7 @@ export async function searchComparisons(client, name, filters = {}) {
|
|
|
224
224
|
let {
|
|
225
225
|
branch,
|
|
226
226
|
project,
|
|
227
|
+
organization,
|
|
227
228
|
limit = 50,
|
|
228
229
|
offset = 0
|
|
229
230
|
} = filters;
|
|
@@ -234,6 +235,7 @@ export async function searchComparisons(client, name, filters = {}) {
|
|
|
234
235
|
};
|
|
235
236
|
if (branch) params.branch = branch;
|
|
236
237
|
if (project) params.project = project;
|
|
238
|
+
if (organization) params.organization = organization;
|
|
237
239
|
let endpoint = buildEndpointWithParams('/api/sdk/comparisons/search', params);
|
|
238
240
|
return client.request(endpoint);
|
|
239
241
|
}
|
package/dist/cli.js
CHANGED
|
@@ -432,11 +432,12 @@ program.command('status').description('Check the status of a build').argument('<
|
|
|
432
432
|
}
|
|
433
433
|
await statusCommand(buildId, options, globalOptions);
|
|
434
434
|
});
|
|
435
|
-
program.command('builds').description('List and query builds').option('-b, --build <id>', 'Get a specific build by ID').option('--branch <branch>', 'Filter by branch').option('--status <status>', 'Filter by status (created, pending, processing, completed, failed)').option('--environment <env>', 'Filter by environment').option('-p, --project <slug>', 'Filter by project slug').option('--limit <n>', 'Maximum results to return (1-250)', val => parseInt(val, 10), 20).option('--offset <n>', 'Skip first N results', val => parseInt(val, 10), 0).option('--comparisons', 'Include comparisons when fetching a specific build').addHelpText('after', `
|
|
435
|
+
program.command('builds').description('List and query builds').option('-b, --build <id>', 'Get a specific build by ID').option('--branch <branch>', 'Filter by branch').option('--status <status>', 'Filter by status (created, pending, processing, completed, failed)').option('--environment <env>', 'Filter by environment').option('-p, --project <slug>', 'Filter by project slug').option('--org <slug>', 'Filter by organization slug').option('--limit <n>', 'Maximum results to return (1-250)', val => parseInt(val, 10), 20).option('--offset <n>', 'Skip first N results', val => parseInt(val, 10), 0).option('--comparisons', 'Include comparisons when fetching a specific build').addHelpText('after', `
|
|
436
436
|
Examples:
|
|
437
437
|
$ vizzly builds # List recent builds
|
|
438
438
|
$ vizzly builds --branch main # Filter by branch
|
|
439
|
-
$ vizzly builds --project
|
|
439
|
+
$ vizzly builds --project storybook # Filter by project
|
|
440
|
+
$ vizzly builds --project storybook --org my-org # Disambiguate by org
|
|
440
441
|
$ vizzly builds --status completed # Filter by status
|
|
441
442
|
$ vizzly builds -b abc123-def456 # Get specific build by ID
|
|
442
443
|
$ vizzly builds -b abc123 --comparisons # Include comparisons
|
|
@@ -455,12 +456,13 @@ Examples:
|
|
|
455
456
|
}
|
|
456
457
|
await buildsCommand(options, globalOptions);
|
|
457
458
|
});
|
|
458
|
-
program.command('comparisons').description('Query and search comparisons').option('-b, --build <id>', 'Get comparisons for a specific build').option('--id <id>', 'Get a specific comparison by ID').option('--name <pattern>', 'Search comparisons by name (supports wildcards)').option('--status <status>', 'Filter by status (identical, new, changed)').option('--branch <branch>', 'Filter by branch (for name search)').option('--limit <n>', 'Maximum results to return (1-250)', val => parseInt(val, 10), 50).option('--offset <n>', 'Skip first N results', val => parseInt(val, 10), 0).option('-p, --project <slug>', 'Filter by project slug').addHelpText('after', `
|
|
459
|
+
program.command('comparisons').description('Query and search comparisons').option('-b, --build <id>', 'Get comparisons for a specific build').option('--id <id>', 'Get a specific comparison by ID').option('--name <pattern>', 'Search comparisons by name (supports wildcards)').option('--status <status>', 'Filter by status (identical, new, changed)').option('--branch <branch>', 'Filter by branch (for name search)').option('--limit <n>', 'Maximum results to return (1-250)', val => parseInt(val, 10), 50).option('--offset <n>', 'Skip first N results', val => parseInt(val, 10), 0).option('-p, --project <slug>', 'Filter by project slug').option('--org <slug>', 'Filter by organization slug').addHelpText('after', `
|
|
459
460
|
Examples:
|
|
460
461
|
$ vizzly comparisons -b abc123 # List comparisons for a build
|
|
461
462
|
$ vizzly comparisons --id def456 # Get specific comparison by ID
|
|
462
463
|
$ vizzly comparisons --name "Button" # Search by screenshot name
|
|
463
464
|
$ vizzly comparisons --name "Login*" # Wildcard search
|
|
465
|
+
$ vizzly comparisons --name "Button" --org my-org # Filter by org
|
|
464
466
|
$ vizzly comparisons --status changed # Only changed comparisons
|
|
465
467
|
$ vizzly comparisons --json # Output as JSON for scripting
|
|
466
468
|
`).action(async options => {
|
package/dist/commands/builds.js
CHANGED
|
@@ -73,6 +73,7 @@ export async function buildsCommand(options = {}, globalOptions = {}, deps = {})
|
|
|
73
73
|
if (options.status) filters.status = options.status;
|
|
74
74
|
if (options.environment) filters.environment = options.environment;
|
|
75
75
|
if (options.project) filters.project = options.project;
|
|
76
|
+
if (options.org) filters.organization = options.org;
|
|
76
77
|
let response = await getBuilds(client, filters);
|
|
77
78
|
output.stopSpinner();
|
|
78
79
|
let builds = response.builds || [];
|
|
@@ -107,6 +107,7 @@ export async function comparisonsCommand(options = {}, globalOptions = {}, deps
|
|
|
107
107
|
let filters = {
|
|
108
108
|
branch: options.branch,
|
|
109
109
|
project: options.project,
|
|
110
|
+
organization: options.org,
|
|
110
111
|
limit: options.limit || 50,
|
|
111
112
|
offset: options.offset || 0
|
|
112
113
|
};
|