@vizzly-testing/cli 0.24.1 → 0.25.1

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.
@@ -307,7 +307,7 @@ export function getPullRequestBaseSha() {
307
307
  return process.env.CI_MERGE_REQUEST_TARGET_BRANCH_SHA ||
308
308
  // GitLab CI
309
309
  null // Most CIs don't provide this
310
- ;
310
+ ;
311
311
  }
312
312
 
313
313
  /**
@@ -1,7 +1,7 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { cosmiconfigSync } from 'cosmiconfig';
3
3
  import { validateVizzlyConfigWithDefaults } from './config-schema.js';
4
- import { getApiToken, getApiUrl, getParallelId } from './environment-config.js';
4
+ import { getApiToken, getApiUrl, getBuildName, getParallelId } from './environment-config.js';
5
5
  import { getProjectMapping } from './global-config.js';
6
6
  import * as output from './output.js';
7
7
  const DEFAULT_CONFIG = {
@@ -98,12 +98,17 @@ export async function loadConfig(configPath = null, cliOverrides = {}) {
98
98
  // 4. Override with environment variables (higher priority than fallbacks)
99
99
  const envApiKey = getApiToken();
100
100
  const envApiUrl = getApiUrl();
101
+ const envBuildName = getBuildName();
101
102
  const envParallelId = getParallelId();
102
103
  if (envApiKey) {
103
104
  config.apiKey = envApiKey;
104
105
  output.debug('config', 'using token from environment');
105
106
  }
106
107
  if (envApiUrl !== 'https://app.vizzly.dev') config.apiUrl = envApiUrl;
108
+ if (envBuildName) {
109
+ config.build.name = envBuildName;
110
+ output.debug('config', 'using build name from environment');
111
+ }
107
112
  if (envParallelId) config.parallelId = envParallelId;
108
113
 
109
114
  // 5. Apply CLI overrides (highest priority)
@@ -77,6 +77,14 @@ export function getParallelId() {
77
77
  return process.env.VIZZLY_PARALLEL_ID;
78
78
  }
79
79
 
80
+ /**
81
+ * Get build name from environment
82
+ * @returns {string|undefined} Build name
83
+ */
84
+ export function getBuildName() {
85
+ return process.env.VIZZLY_BUILD_NAME;
86
+ }
87
+
80
88
  /**
81
89
  * Check if TDD mode is enabled
82
90
  * @returns {boolean} Whether TDD mode is enabled
@@ -107,6 +115,7 @@ export function getAllEnvironmentConfig() {
107
115
  enabled: isVizzlyEnabled(),
108
116
  serverUrl: getServerUrl(),
109
117
  buildId: getBuildId(),
118
+ buildName: getBuildName(),
110
119
  parallelId: getParallelId(),
111
120
  tddMode: isTddMode()
112
121
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizzly-testing/cli",
3
- "version": "0.24.1",
3
+ "version": "0.25.1",
4
4
  "description": "Visual review platform for UI developers and designers",
5
5
  "keywords": [
6
6
  "visual-testing",