@nosto/nosto-cli 1.2.5 → 1.2.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nosto/nosto-cli",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "main": "./src/index.ts",
5
5
  "bin": {
6
6
  "nosto": "./src/bootstrap.mjs"
@@ -44,7 +44,7 @@
44
44
  "devDependencies": {
45
45
  "@commitlint/cli": "^20.1.0",
46
46
  "@commitlint/config-conventional": "^20.0.0",
47
- "@eslint/js": "^9.37.0",
47
+ "@eslint/js": "^10.0.1",
48
48
  "@types/node": "^25.0.2",
49
49
  "@vitest/coverage-v8": "^4.0.6",
50
50
  "@vitest/ui": "^4.0.6",
package/src/api/retry.ts CHANGED
@@ -22,7 +22,9 @@ async function executeWithRetry<T>(
22
22
  if (operationType === "fetch") {
23
23
  Logger.error(`${chalk.red("✗")} ${chalk.cyan(filePath)}: ${errorMessage}`)
24
24
  }
25
- throw new Error(`Failed to ${operationType} ${filePath} after ${MAX_RETRIES} retries: ${errorMessage}`)
25
+ throw new Error(`Failed to ${operationType} ${filePath} after ${MAX_RETRIES} retries: ${errorMessage}`, {
26
+ cause: error
27
+ })
26
28
  }
27
29
  const delay = INITIAL_RETRY_DELAY * Math.pow(2, retryCount)
28
30
  Logger.warn(
@@ -32,10 +32,10 @@ export function parseAuthFile({ allowIncomplete }: { allowIncomplete?: boolean }
32
32
  return AuthConfigSchema.parse(rawConfig)
33
33
  } catch (error) {
34
34
  if (error instanceof z.ZodError) {
35
- throw new Error(`Invalid auth file at ${AuthConfigFilePath}: ${error.message}`)
35
+ throw new Error(`Invalid auth file at ${AuthConfigFilePath}: ${error.message}`, { cause: error })
36
36
  }
37
37
  if (error instanceof SyntaxError) {
38
- throw new Error(`Invalid JSON in auth file at ${AuthConfigFilePath}: ${error.message}`)
38
+ throw new Error(`Invalid JSON in auth file at ${AuthConfigFilePath}: ${error.message}`, { cause: error })
39
39
  }
40
40
  throw error
41
41
  }
@@ -29,10 +29,10 @@ export function parseConfigFile({
29
29
  return PartialPersistentConfigSchema.parse(rawConfig)
30
30
  } catch (error) {
31
31
  if (error instanceof z.ZodError) {
32
- throw new Error(`Invalid configuration file at ${configPath}: ${error.message}`)
32
+ throw new Error(`Invalid configuration file at ${configPath}: ${error.message}`, { cause: error })
33
33
  }
34
34
  if (error instanceof SyntaxError) {
35
- throw new Error(`Invalid JSON in configuration file at ${configPath}: ${error.message}`)
35
+ throw new Error(`Invalid JSON in configuration file at ${configPath}: ${error.message}`, { cause: error })
36
36
  }
37
37
  throw error
38
38
  }
@@ -14,7 +14,7 @@ type RedeployOptions = {
14
14
  }
15
15
 
16
16
  export async function deploymentsRedeploy({ deploymentId, force }: RedeployOptions) {
17
- let selectedDeployment = null
17
+ let selectedDeployment
18
18
  let selectedDeploymentId
19
19
 
20
20
  if (deploymentId) {