@scrymore/scry-deployer 0.2.0 → 0.2.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.
package/lib/apiClient.js CHANGED
@@ -321,7 +321,7 @@ async function uploadMetadataZip(apiClient, target, metadataZipPath, customLogge
321
321
  };
322
322
  } catch (error) {
323
323
  const message = error.response?.data?.error || error.message || 'Unknown error';
324
- customLogger.warn(`Metadata ZIP upload failed: ${message}`);
324
+ customLogger.error(`Metadata ZIP upload failed: ${message}`);
325
325
  return { success: false, error: message };
326
326
  }
327
327
  }
package/lib/coverage.js CHANGED
@@ -81,7 +81,20 @@ async function runCoverageAnalysis(options) {
81
81
  // Allow local override for E2E testing before package publication.
82
82
  // Example:
83
83
  // SCRY_SBCOV_CMD="node /abs/path/to/scry-sbcov/dist/cli/index.js"
84
- const sbcovCommandPrefix = (process.env.SCRY_SBCOV_CMD || 'npx -y @scrymore/scry-sbcov').trim();
84
+ //
85
+ // Default: resolve the CLI from the installed dependency to avoid npx cache
86
+ // issues where `npx -y` might resolve a stale older version.
87
+ let defaultSbcovCmd = 'npx -y @scrymore/scry-sbcov';
88
+ try {
89
+ const sbcovCli = require.resolve('@scrymore/scry-sbcov/dist/cli/index.js');
90
+ defaultSbcovCmd = `node ${shellEscape(sbcovCli)}`;
91
+ } catch (error) {
92
+ // Fall back to npx if resolve fails (e.g. not installed as dependency)
93
+ if (error.code !== 'MODULE_NOT_FOUND') {
94
+ console.warn('[scry-deployer] Unexpected error resolving @scrymore/scry-sbcov, falling back to npx:', error);
95
+ }
96
+ }
97
+ const sbcovCommandPrefix = (process.env.SCRY_SBCOV_CMD || defaultSbcovCmd).trim();
85
98
  const npxCommand = `${sbcovCommandPrefix} ${cliArgs.map(shellEscape).join(' ')}`;
86
99
 
87
100
  // Debug logging to show the exact command being executed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrymore/scry-deployer",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "A CLI to automate the deployment of Storybook static builds.",
5
5
  "main": "index.js",
6
6
  "bin": {