ebay-mcp 1.18.0 → 1.18.2

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.
Files changed (161) hide show
  1. package/README.md +24 -35
  2. package/build/api/account-management/accountV2.js +22 -22
  3. package/build/api/account-management/finances.js +10 -10
  4. package/build/api/analytics-and-report/analytics.js +1 -1
  5. package/build/api/{client.js → client/ebayApiClient.js} +37 -41
  6. package/build/api/{clientTrading.js → client/tradingApiClient.js} +22 -22
  7. package/build/api/communication/feedback.js +21 -21
  8. package/build/api/communication/message.js +23 -23
  9. package/build/api/communication/negotiation.js +7 -7
  10. package/build/api/communication/notification.js +52 -52
  11. package/build/api/developer/developer.js +3 -3
  12. package/build/api/{index.js → ebaySellerApi.js} +4 -4
  13. package/build/api/listing-management/feedReportTasks.js +6 -6
  14. package/build/api/listing-management/feedRequest.js +6 -6
  15. package/build/api/listing-management/feedSchedules.js +4 -4
  16. package/build/api/listing-management/feedTasks.js +2 -2
  17. package/build/api/listing-management/items.js +22 -22
  18. package/build/api/listing-management/locations.js +4 -4
  19. package/build/api/listing-management/media.js +14 -14
  20. package/build/api/listing-management/mediaAttach.js +14 -14
  21. package/build/api/listing-management/mediaResources.js +15 -13
  22. package/build/api/listing-management/offerFormat.js +1 -1
  23. package/build/api/listing-management/offers.js +23 -23
  24. package/build/api/listing-management/stores.js +9 -9
  25. package/build/api/listing-metadata/metadata.js +10 -10
  26. package/build/api/marketing-and-promotions/ads.js +34 -34
  27. package/build/api/marketing-and-promotions/campaigns.js +19 -19
  28. package/build/api/marketing-and-promotions/promotions.js +22 -22
  29. package/build/api/marketing-and-promotions/reports.js +7 -7
  30. package/build/api/order-management/dispute.js +11 -9
  31. package/build/api/order-management/fulfillment.js +4 -4
  32. package/build/api/order-management/logistics.js +7 -7
  33. package/build/api/other/browseMappers.js +15 -13
  34. package/build/api/other/browseValidators.js +4 -4
  35. package/build/api/other/edelivery.js +19 -19
  36. package/build/api/other/finding.js +13 -13
  37. package/build/api/other/translation.js +2 -2
  38. package/build/api/other/vero.js +2 -2
  39. package/build/api/shared/download.js +7 -7
  40. package/build/api/shared/request.js +28 -19
  41. package/build/api/trading/listingFormat.js +37 -30
  42. package/build/api/trading/trading.js +33 -33
  43. package/build/auth/credentialSession.js +5 -5
  44. package/build/auth/oauth.js +3 -3
  45. package/build/auth/oauthHelper.js +24 -24
  46. package/build/auth/oauthMetadata.js +4 -4
  47. package/build/auth/oauthMiddleware.js +16 -16
  48. package/build/auth/scopeUtils.js +2 -2
  49. package/build/auth/tokenVerifier.js +23 -23
  50. package/build/config/environment.js +4 -45
  51. package/build/config/oauthScopes.js +132 -0
  52. package/build/index.js +5 -5
  53. package/build/mcp/httpTransport.js +32 -20
  54. package/build/mcp/runtime.js +12 -12
  55. package/build/mcp/toolGating.js +6 -12
  56. package/build/mcp/uiBridge.js +3 -3
  57. package/build/schemas/account-management/account.js +2 -52
  58. package/build/schemas/account-management/accountV2.js +2 -2
  59. package/build/schemas/account-management/finances.js +1 -1
  60. package/build/schemas/analytics/analytics.js +2 -48
  61. package/build/schemas/communication/messages.js +2 -46
  62. package/build/schemas/developer/developer.js +1 -27
  63. package/build/schemas/fulfillment/logistics.js +1 -1
  64. package/build/schemas/fulfillment/orders.js +2 -47
  65. package/build/schemas/inventory-management/feed.js +1 -1
  66. package/build/schemas/inventory-management/inventory.js +2 -50
  67. package/build/schemas/inventory-management/media.js +2 -2
  68. package/build/schemas/inventory-management/mediaDocuments.js +1 -1
  69. package/build/schemas/inventory-management/stores.js +1 -1
  70. package/build/schemas/marketing/ads.js +2 -2
  71. package/build/schemas/marketing/campaigns.js +2 -2
  72. package/build/schemas/marketing/common.js +2 -2
  73. package/build/schemas/marketing/marketing.js +0 -1
  74. package/build/schemas/marketing/promotions.js +2 -2
  75. package/build/schemas/marketing/reports.js +2 -2
  76. package/build/schemas/metadata/metadata.js +2 -90
  77. package/build/schemas/metadata/shipping.js +1 -1
  78. package/build/schemas/other/browse.js +2 -2
  79. package/build/schemas/other/finding.js +2 -2
  80. package/build/schemas/other/otherApis.js +2 -114
  81. package/build/schemas/taxonomy/categoryTree.js +1 -1
  82. package/build/schemas/taxonomy/charity.js +1 -1
  83. package/build/schemas/taxonomy/taxonomy.js +2 -69
  84. package/build/scripts/autoSetup.js +3 -3
  85. package/build/scripts/{buildUi.js → buildMcpApps.js} +13 -13
  86. package/build/scripts/devSync.js +19 -68
  87. package/build/scripts/diagnostics.js +15 -16
  88. package/build/scripts/interactiveSetup.js +25 -25
  89. package/build/scripts/scopeHelper.js +2 -2
  90. package/build/scripts/securityChecker.js +20 -20
  91. package/build/scripts/setup.js +76 -76
  92. package/build/scripts/setupShared.js +5 -30
  93. package/build/scripts/setupValidator.js +9 -9
  94. package/build/scripts/setupWizard.js +23 -23
  95. package/build/scripts/skills.js +14 -17
  96. package/build/scripts/specRefs.js +1 -1
  97. package/build/scripts/specSources.js +144 -0
  98. package/build/serverHttp.js +4 -7
  99. package/build/skills/content.js +13 -13
  100. package/build/skills/install.js +9 -9
  101. package/build/skills/render.js +2 -2
  102. package/build/tools/categories/communication.js +1 -1
  103. package/build/tools/categories/connector.js +19 -16
  104. package/build/tools/categories/fulfillment.js +4 -4
  105. package/build/tools/categories/inventory.js +1 -1
  106. package/build/tools/categories/metadata.js +1 -1
  107. package/build/tools/categories/taxonomy.js +1 -1
  108. package/build/tools/categories/tokenManagement.js +8 -8
  109. package/build/tools/contracts.js +2 -2
  110. package/build/tools/defineTool.js +27 -12
  111. package/build/tools/registry.js +2 -2
  112. package/build/tools/schemas.js +2 -2
  113. package/build/tools/ui/mapHelpers.js +12 -12
  114. package/build/tools/ui/maps.js +101 -97
  115. package/build/tools/ui/viewModels.js +2 -2
  116. package/build/utils/apiStatusFeed.js +12 -12
  117. package/build/utils/communication/feedback.js +3 -3
  118. package/build/utils/communication/message.js +3 -3
  119. package/build/utils/communication/negotiation.js +3 -3
  120. package/build/utils/communication/notification.js +3 -3
  121. package/build/utils/entryModule.js +33 -0
  122. package/build/utils/envFile.js +47 -0
  123. package/build/utils/envParser.js +5 -5
  124. package/build/utils/errors.js +4 -4
  125. package/build/utils/http.js +38 -38
  126. package/build/utils/localFeedFiles.js +3 -3
  127. package/build/utils/logRedaction.js +21 -0
  128. package/build/utils/logger.js +49 -35
  129. package/build/utils/other/compliance.js +3 -3
  130. package/build/utils/other/identity.js +3 -3
  131. package/build/utils/other/translation.js +3 -3
  132. package/build/utils/other/vero.js +3 -3
  133. package/build/utils/schemaHelpers.js +2 -2
  134. package/build/utils/tokenUtils.js +2 -2
  135. package/build/utils/trading/trading.js +1 -1
  136. package/build/utils/version.js +1 -1
  137. package/build/utils/zodIssues.js +14 -0
  138. package/package.json +8 -11
  139. package/README.de.md +0 -426
  140. package/README.es.md +0 -426
  141. package/README.fr.md +0 -426
  142. package/README.ja.md +0 -426
  143. package/README.ko.md +0 -426
  144. package/README.pt-BR.md +0 -426
  145. package/README.ru.md +0 -426
  146. package/README.zh-CN.md +0 -426
  147. package/build/schemas/index.js +0 -76
  148. package/build/schemas/marketing/jsonSchemas.js +0 -118
  149. package/build/scripts/downloadSpecs.js +0 -117
  150. package/build/scripts/updateApiStatusDoc.js +0 -71
  151. package/build/utils/effectSchema.js +0 -203
  152. package/build/utils/effectSchemaAdapter.js +0 -121
  153. package/build/utils/effectSchemaChainMethods.js +0 -146
  154. package/build/utils/effectSchemaRefinements.js +0 -104
  155. package/build/utils/effectSchemaStringMethods.js +0 -63
  156. package/build/utils/effectSchemaTypes.js +0 -47
  157. package/docs/auth/production_scopes.json +0 -111
  158. package/docs/auth/sandbox_scopes.json +0 -142
  159. /package/build/api/{clientRequestError.js → client/ebayClientRequestError.js} +0 -0
  160. /package/build/api/{rateLimitTracker.js → client/rateLimitTracker.js} +0 -0
  161. /package/build/api/{clientTradingError.js → client/tradingApiFailure.js} +0 -0
@@ -8,7 +8,7 @@
8
8
  */
9
9
  import chalk from 'chalk';
10
10
  import { writeFileSync } from 'fs';
11
- import { join, dirname, resolve } from 'path';
11
+ import { join, dirname } from 'path';
12
12
  import { fileURLToPath } from 'url';
13
13
  import { runSecurityChecks, displaySecurityResults } from '../scripts/securityChecker.js';
14
14
  import { validateSetup, displayRecommendations } from '../scripts/setupValidator.js';
@@ -16,11 +16,12 @@ import { parseEnvFile } from '../utils/envParser.js';
16
16
  import { detectLLMClients } from '../utils/llmClientDetector.js';
17
17
  import { displayScopeVerification, parseScopeString } from '../scripts/scopeHelper.js';
18
18
  import { readEnvironment } from './setupShared.js';
19
- import { EbaySellerApi } from '../api/index.js';
19
+ import { EbaySellerApi } from '../api/ebaySellerApi.js';
20
20
  import { getErrorMessage } from '../utils/errors.js';
21
21
  import { getUpdateInfo, getVersion } from '../utils/version.js';
22
22
  import { Effect, Either } from 'effect';
23
23
  import process from 'node:process';
24
+ import { isEntryModule } from '../utils/entryModule.js';
24
25
  const __filename = fileURLToPath(import.meta.url);
25
26
  const __dirname = dirname(__filename);
26
27
  const PROJECT_ROOT = join(__dirname, '../..');
@@ -129,12 +130,12 @@ function displayConfigurationStatus(envVars) {
129
130
  { key: 'EBAY_APP_ACCESS_TOKEN', label: 'App Access Token', redact: true },
130
131
  ];
131
132
  for (const check of checks) {
132
- const value = envVars[check.key];
133
+ const envValue = envVars[check.key];
133
134
  let status;
134
135
  let displayValue;
135
- if (value && value.trim() && !value.includes('_here')) {
136
+ if (envValue && envValue.trim() && !envValue.includes('_here')) {
136
137
  status = chalk.green('✓ Set');
137
- displayValue = check.redact ? `${value.substring(0, 10)}...` : value;
138
+ displayValue = check.redact ? `${envValue.substring(0, 10)}...` : envValue;
138
139
  }
139
140
  else {
140
141
  status = chalk.red('✗ Not set');
@@ -167,18 +168,18 @@ function displayLLMClientStatus() {
167
168
  */
168
169
  async function displayAuthenticationTest(config) {
169
170
  console.log(chalk.bold.cyan('🔐 API Authentication Test\n'));
170
- const result = await testEbayAuthentication(config);
171
- if (result.success) {
171
+ const authCheck = await testEbayAuthentication(config);
172
+ if (authCheck.success) {
172
173
  console.log(chalk.green(' ✓ Successfully authenticated with eBay API\n'));
173
- if (result.userInfo) {
174
+ if (authCheck.userInfo) {
174
175
  console.log(chalk.bold.white(' User Information:'));
175
- console.log(chalk.gray(JSON.stringify(result.userInfo, null, 2)));
176
+ console.log(chalk.gray(JSON.stringify(authCheck.userInfo, null, 2)));
176
177
  console.log('');
177
178
  }
178
179
  }
179
180
  else {
180
181
  console.log(chalk.red(' ✗ Authentication failed\n'));
181
- console.log(chalk.yellow(` Error: ${result.error}\n`));
182
+ console.log(chalk.yellow(` Error: ${authCheck.error}\n`));
182
183
  }
183
184
  }
184
185
  /**
@@ -299,17 +300,15 @@ export const runDiagnostics = async (exportReport = false) => {
299
300
  };
300
301
  // Direct script entry (`node build/scripts/diagnostics.js` / `npm run diagnose`).
301
302
  // Guarded so importing from the bin does not auto-run diagnostics.
302
- const entryPath = process.argv[1] ? resolve(process.argv[1]) : undefined;
303
- const modulePath = resolve(fileURLToPath(import.meta.url));
304
- if (entryPath && modulePath === entryPath) {
303
+ if (isEntryModule(import.meta.url)) {
305
304
  const cliArgs = process.argv.slice(2);
306
305
  const exportReport = cliArgs.includes('--export') || cliArgs.includes('-e');
307
306
  void Effect.runPromise(Effect.either(Effect.tryPromise({
308
307
  try: () => runDiagnostics(exportReport),
309
308
  catch: (error) => error,
310
- }))).then((result) => {
311
- if (Either.isLeft(result)) {
312
- console.error(chalk.red('\n❌ Diagnostics failed:'), getErrorMessage(result.left));
309
+ }))).then((diagnosticsOutcome) => {
310
+ if (Either.isLeft(diagnosticsOutcome)) {
311
+ console.error(chalk.red('\n❌ Diagnostics failed:'), getErrorMessage(diagnosticsOutcome.left));
313
312
  process.exitCode = 1;
314
313
  }
315
314
  });
@@ -33,7 +33,7 @@ import { displayScopeCategories, getRecommendedScopes, displayScopeVerification,
33
33
  import { detectLLMClients, configureLLMClient } from '../utils/llmClientDetector.js';
34
34
  import { validateSetup, displayRecommendations } from '../scripts/setupValidator.js';
35
35
  import { loadExistingConfig, readEnvironment } from './setupShared.js';
36
- import { EbaySellerApi } from '../api/index.js';
36
+ import { EbaySellerApi } from '../api/ebaySellerApi.js';
37
37
  import { EbayOAuthClient } from '../auth/oauth.js';
38
38
  import { getErrorMessage } from '../utils/errors.js';
39
39
  import process from 'node:process';
@@ -49,11 +49,11 @@ const ebayColors = {
49
49
  yellow: chalk.hex('#F5AF02'),
50
50
  green: chalk.hex('#85B716'),
51
51
  };
52
- function readOptionalEnvironment(value) {
53
- if (!value) {
52
+ function readOptionalEnvironment(rawEnvironment) {
53
+ if (!rawEnvironment) {
54
54
  return;
55
55
  }
56
- return readEnvironment(value);
56
+ return readEnvironment(rawEnvironment);
57
57
  }
58
58
  function parseInteractiveArgs() {
59
59
  const args = process.argv.slice(2);
@@ -113,8 +113,8 @@ function displayLogo() {
113
113
  console.log(EBAY_LOGO);
114
114
  console.log(CREATOR_CREDIT);
115
115
  }
116
- function validateRequired(value) {
117
- return value.trim().length > 0 || 'This field is required';
116
+ function validateRequired(input) {
117
+ return input.trim().length > 0 || 'This field is required';
118
118
  }
119
119
  function generateEnvFile(config, environment) {
120
120
  const envPath = join(PROJECT_ROOT, `.env${environment === 'sandbox' ? '' : `.${environment}`}`);
@@ -184,25 +184,25 @@ async function acquireRefreshToken(config, useInteractiveFlow) {
184
184
  }
185
185
  // Manual flow
186
186
  displayManualOAuthInstructions(config.clientId, config.redirectUri || 'http://localhost:3000/oauth/callback', config.environment, getRecommendedScopes(config.environment));
187
- const response = await prompts({
187
+ const pastedToken = await prompts({
188
188
  type: 'text',
189
189
  name: 'refreshToken',
190
190
  message: 'Paste your refresh token here:',
191
- validate: (value) => {
192
- if (!value || value.trim() === '') {
191
+ validate: (input) => {
192
+ if (!input || input.trim() === '') {
193
193
  return 'Refresh token is required';
194
194
  }
195
- const cleanValue = value.trim().replace(/^["']|["']$/g, '');
196
- if (!cleanValue.startsWith('v^1.1#')) {
195
+ const cleanToken = input.trim().replace(/^["']|["']$/g, '');
196
+ if (!cleanToken.startsWith('v^1.1#')) {
197
197
  return 'Token should start with "v^1.1#"';
198
198
  }
199
199
  return true;
200
200
  },
201
201
  });
202
- if (!response.refreshToken) {
202
+ if (!pastedToken.refreshToken) {
203
203
  return null;
204
204
  }
205
- return response.refreshToken.trim().replace(/^["']|["']$/g, '');
205
+ return pastedToken.refreshToken.trim().replace(/^["']|["']$/g, '');
206
206
  }
207
207
  async function validateAndGenerateTokens(config) {
208
208
  console.log(chalk.bold.cyan('\n🔄 Validating Credentials & Generating Tokens...\n'));
@@ -286,7 +286,7 @@ async function detectAndConfigureLLMClients() {
286
286
  console.log(chalk.bold.cyan('│ 🤖 LLM Client Detection & Configuration │'));
287
287
  console.log(chalk.bold.cyan('└─────────────────────────────────────────────────────────────┘\n'));
288
288
  const clients = detectLLMClients();
289
- const detectedClients = clients.filter((c) => c.detected);
289
+ const detectedClients = clients.filter((client) => client.detected);
290
290
  if (detectedClients.length === 0) {
291
291
  console.log(chalk.yellow('⚠️ No compatible LLM clients detected on your system.\n'));
292
292
  console.log(chalk.white('Supported clients:'));
@@ -353,7 +353,7 @@ async function detectAndConfigureLLMClients() {
353
353
  chalk.gray(' to select, ') +
354
354
  chalk.cyan('Enter') +
355
355
  chalk.gray(' to confirm\n'));
356
- const response = await prompts({
356
+ const clientSelection = await prompts({
357
357
  type: 'multiselect',
358
358
  name: 'selectedClients',
359
359
  message: 'Select clients to configure:',
@@ -370,7 +370,7 @@ async function detectAndConfigureLLMClients() {
370
370
  hint: '← → or Space to toggle • Enter to confirm',
371
371
  instructions: false,
372
372
  });
373
- if (!response.selectedClients || response.selectedClients.length === 0) {
373
+ if (!clientSelection.selectedClients || clientSelection.selectedClients.length === 0) {
374
374
  console.log(chalk.gray('\n⏭️ Skipping LLM client configuration.\n'));
375
375
  return;
376
376
  }
@@ -378,8 +378,8 @@ async function detectAndConfigureLLMClients() {
378
378
  console.log(chalk.bold.cyan('\n┌─────────────────────────────────────────────────────────────┐'));
379
379
  console.log(chalk.bold.cyan('│ ⚙️ Configuring Selected Clients │'));
380
380
  console.log(chalk.bold.cyan('└─────────────────────────────────────────────────────────────┘\n'));
381
- for (const clientName of response.selectedClients) {
382
- const client = detectedClients.find((c) => c.name === clientName);
381
+ for (const clientName of clientSelection.selectedClients) {
382
+ const client = detectedClients.find((detected) => detected.name === clientName);
383
383
  if (!client)
384
384
  continue;
385
385
  console.log(chalk.cyan(`Configuring ${client.displayName}...`));
@@ -641,12 +641,12 @@ async function runInteractiveSetup(args) {
641
641
  name: 'token',
642
642
  message: 'Paste your refresh token:',
643
643
  initial: refreshToken,
644
- validate: (value) => {
645
- if (!value || value.trim() === '') {
644
+ validate: (input) => {
645
+ if (!input || input.trim() === '') {
646
646
  return 'Refresh token is required';
647
647
  }
648
- const cleanValue = value.trim().replace(/^["']|["']$/g, '');
649
- if (!cleanValue.startsWith('v^1.1#')) {
648
+ const cleanToken = input.trim().replace(/^["']|["']$/g, '');
649
+ if (!cleanToken.startsWith('v^1.1#')) {
650
650
  return 'Token should start with "v^1.1#"';
651
651
  }
652
652
  return true;
@@ -746,9 +746,9 @@ process.on('SIGINT', () => {
746
746
  void Effect.runPromise(Effect.either(Effect.tryPromise({
747
747
  try: () => main(),
748
748
  catch: (error) => error,
749
- }))).then((result) => {
750
- if (Either.isLeft(result)) {
751
- console.error(chalk.red('\n❌ Setup failed:'), getErrorMessage(result.left));
749
+ }))).then((setupOutcome) => {
750
+ if (Either.isLeft(setupOutcome)) {
751
+ console.error(chalk.red('\n❌ Setup failed:'), getErrorMessage(setupOutcome.left));
752
752
  process.exitCode = 1;
753
753
  }
754
754
  });
@@ -266,5 +266,5 @@ export const getAllScopesString = (environment) => getRecommendedScopes(environm
266
266
  */
267
267
  export const parseScopeString = (scopeString) => scopeString
268
268
  .split(/\s+/)
269
- .map((s) => s.trim())
270
- .filter((s) => s.length > 0);
269
+ .map((scope) => scope.trim())
270
+ .filter((scope) => scope.length > 0);
@@ -14,7 +14,7 @@ import { writeCliLine } from '../utils/cliOutput.js';
14
14
  * @returns A security check result for the active Node.js process.
15
15
  * @example
16
16
  * ```ts
17
- * const result = checkNodeVersion();
17
+ * const nodeVersionCheck = checkNodeVersion();
18
18
  * ```
19
19
  */
20
20
  export const checkNodeVersion = () => {
@@ -43,7 +43,7 @@ export const checkNodeVersion = () => {
43
43
  * @returns A security check result for credential file ignore coverage.
44
44
  * @example
45
45
  * ```ts
46
- * const result = checkGitignore(process.cwd());
46
+ * const gitignoreCheck = checkGitignore(process.cwd());
47
47
  * ```
48
48
  */
49
49
  export const checkGitignore = (projectRoot) => {
@@ -84,7 +84,7 @@ export const checkGitignore = (projectRoot) => {
84
84
  * @returns A security check result for the eBay API reachability probe.
85
85
  * @example
86
86
  * ```ts
87
- * const result = await checkNetworkConnectivity();
87
+ * const connectivityCheck = await checkNetworkConnectivity();
88
88
  * ```
89
89
  */
90
90
  export const checkNetworkConnectivity = async () => {
@@ -107,8 +107,8 @@ export const checkNetworkConnectivity = async () => {
107
107
  fix: 'Check your internet connection, proxy settings, and firewall',
108
108
  };
109
109
  }
110
- const response = reached.right;
111
- if (response.ok || response.status === 404) {
110
+ const healthResponse = reached.right;
111
+ if (healthResponse.ok || healthResponse.status === 404) {
112
112
  // 404 is fine, means we can reach eBay servers
113
113
  return {
114
114
  check: 'Network Connectivity',
@@ -120,7 +120,7 @@ export const checkNetworkConnectivity = async () => {
120
120
  return {
121
121
  check: 'Network Connectivity',
122
122
  passed: false,
123
- message: `Unexpected response from eBay API: ${response.status}`,
123
+ message: `Unexpected response from eBay API: ${healthResponse.status}`,
124
124
  severity: 'warning',
125
125
  fix: 'Check your internet connection and firewall settings',
126
126
  };
@@ -132,7 +132,7 @@ export const checkNetworkConnectivity = async () => {
132
132
  * @returns A security check result for build output presence.
133
133
  * @example
134
134
  * ```ts
135
- * const result = checkProjectBuild(process.cwd());
135
+ * const buildCheck = checkProjectBuild(process.cwd());
136
136
  * ```
137
137
  */
138
138
  export const checkProjectBuild = (projectRoot) => {
@@ -160,7 +160,7 @@ export const checkProjectBuild = (projectRoot) => {
160
160
  * @returns A security check result for dependency installation state.
161
161
  * @example
162
162
  * ```ts
163
- * const result = checkDependencies(process.cwd());
163
+ * const dependencyCheck = checkDependencies(process.cwd());
164
164
  * ```
165
165
  */
166
166
  export const checkDependencies = (projectRoot) => {
@@ -188,7 +188,7 @@ export const checkDependencies = (projectRoot) => {
188
188
  * @returns A security check result for credential tracking risk.
189
189
  * @example
190
190
  * ```ts
191
- * const result = checkGitTracking(process.cwd());
191
+ * const gitTrackingCheck = checkGitTracking(process.cwd());
192
192
  * ```
193
193
  */
194
194
  export const checkGitTracking = (projectRoot) => {
@@ -275,24 +275,24 @@ export const runSecurityChecks = async (projectRoot) => {
275
275
  */
276
276
  export const displaySecurityResults = (results) => {
277
277
  writeCliLine(chalk.bold.cyan('\n🔒 Security & Environment Checks\n'));
278
- for (const result of results) {
279
- const icon = result.passed ? chalk.green('✓') : chalk.red('✗');
278
+ for (const checkResult of results) {
279
+ const icon = checkResult.passed ? chalk.green('✓') : chalk.red('✗');
280
280
  let severity = chalk.gray('[INFO]');
281
- if (result.severity === 'critical') {
281
+ if (checkResult.severity === 'critical') {
282
282
  severity = chalk.red('[CRITICAL]');
283
283
  }
284
- else if (result.severity === 'warning') {
284
+ else if (checkResult.severity === 'warning') {
285
285
  severity = chalk.yellow('[WARNING]');
286
286
  }
287
- writeCliLine(`${icon} ${chalk.bold(result.check)}: ${severity}`);
288
- writeCliLine(` ${chalk.gray(result.message)}`);
289
- if (result.fix) {
290
- writeCliLine(` ${chalk.yellow('→ Fix:')} ${result.fix}`);
287
+ writeCliLine(`${icon} ${chalk.bold(checkResult.check)}: ${severity}`);
288
+ writeCliLine(` ${chalk.gray(checkResult.message)}`);
289
+ if (checkResult.fix) {
290
+ writeCliLine(` ${chalk.yellow('→ Fix:')} ${checkResult.fix}`);
291
291
  }
292
292
  writeCliLine('');
293
293
  }
294
- const critical = results.filter((r) => !r.passed && r.severity === 'critical');
295
- const warnings = results.filter((r) => !r.passed && r.severity === 'warning');
294
+ const critical = results.filter((checkResult) => !checkResult.passed && checkResult.severity === 'critical');
295
+ const warnings = results.filter((checkResult) => !checkResult.passed && checkResult.severity === 'warning');
296
296
  if (critical.length > 0) {
297
297
  writeCliLine(chalk.red.bold(`⚠️ ${critical.length} critical issue(s) found. Please fix before continuing.\n`));
298
298
  }
@@ -313,4 +313,4 @@ export const displaySecurityResults = (results) => {
313
313
  * if (hasCriticalFailures(results)) process.exit(1);
314
314
  * ```
315
315
  */
316
- export const hasCriticalFailures = (results) => results.some((r) => !r.passed && r.severity === 'critical');
316
+ export const hasCriticalFailures = (results) => results.some((check) => !check.passed && check.severity === 'critical');