@nosto/nosto-cli 1.2.3 → 1.2.5

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.
@@ -8,6 +8,12 @@ updates:
8
8
  prefix: "deps"
9
9
  open-pull-requests-limit: 10
10
10
  groups:
11
+ minor-updates:
12
+ update-types:
13
+ - "minor"
14
+ patch-updates:
15
+ update-types:
16
+ - "patch"
11
17
  eslint:
12
18
  patterns:
13
19
  - "@eslint/*"
@@ -17,4 +23,8 @@ updates:
17
23
  vitest:
18
24
  patterns:
19
25
  - "@vitest/*"
20
- - "vitest"
26
+ - "vitest"
27
+ commitlint:
28
+ patterns:
29
+ - "@commitlint/*"
30
+ - "commitlint"
@@ -23,7 +23,7 @@ jobs:
23
23
  persist-credentials: false
24
24
 
25
25
  - name: Setup NodeJS
26
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v4.0.0
26
+ uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
27
27
  with:
28
28
  node-version: 24
29
29
  cache: "npm"
@@ -39,7 +39,7 @@ jobs:
39
39
 
40
40
  - name: Create GitHub App Token
41
41
  id: app-token
42
- uses: actions/create-github-app-token@b96fde71c0080358ed6e2d162f11c612c92a97d1
42
+ uses: actions/create-github-app-token@b96fde71c0080358ed6e2d162f11c612c92a97d1 # v2.1.4
43
43
  with:
44
44
  app-id: ${{ secrets.APP_ID }}
45
45
  private-key: ${{ secrets.APP_PRIVATE_KEY }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nosto/nosto-cli",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "main": "./src/index.ts",
5
5
  "bin": {
6
6
  "nosto": "./src/bootstrap.mjs"
@@ -48,7 +48,7 @@
48
48
  "@types/node": "^25.0.2",
49
49
  "@vitest/coverage-v8": "^4.0.6",
50
50
  "@vitest/ui": "^4.0.6",
51
- "eslint": "^9.37.0",
51
+ "eslint": "^10.0.1",
52
52
  "eslint-config-prettier": "^10.1.8",
53
53
  "eslint-plugin-prettier": "^5.5.4",
54
54
  "eslint-plugin-simple-import-sort": "^12.1.1",
@@ -57,7 +57,7 @@
57
57
  "memfs": "^4.48.1",
58
58
  "msw": "^2.11.5",
59
59
  "prettier": "^3.6.2",
60
- "typescript-eslint": "^8.46.0",
60
+ "typescript-eslint": "^8.56.1-alpha.3",
61
61
  "vitest": "^4.0.6"
62
62
  },
63
63
  "publishConfig": {
@@ -4,7 +4,7 @@ import { cleanUrl } from "#api/utils.ts"
4
4
  import { Logger } from "#console/logger.ts"
5
5
  import { MissingConfigurationError } from "#errors/MissingConfigurationError.ts"
6
6
 
7
- import { authFileExists, getAuthFileMissingError, parseAuthFile } from "./authConfig.ts"
7
+ import { parseAuthFile } from "./authConfig.ts"
8
8
  import { getEnvConfig } from "./envConfig.ts"
9
9
  import { parseConfigFile } from "./fileConfig.ts"
10
10
  import {
@@ -48,10 +48,7 @@ export async function loadConfig({ projectPath, options, allowIncomplete }: Load
48
48
 
49
49
  const fullPath = resolve(projectPath)
50
50
  Logger.debug(`Loading configuration from folder: ${fullPath}`)
51
- if (!allowIncomplete && !authFileExists()) {
52
- throw getAuthFileMissingError()
53
- }
54
- const authConfig = parseAuthFile({ allowIncomplete })
51
+
55
52
  const searchTemplatesConfig = await parseSearchTemplatesConfigFile({ projectPath })
56
53
  const fileConfig = parseConfigFile({ projectPath, allowIncomplete })
57
54
  const envConfig = getEnvConfig()
@@ -63,6 +60,9 @@ export async function loadConfig({ projectPath, options, allowIncomplete }: Load
63
60
  ...fileConfig,
64
61
  ...envConfig
65
62
  }
63
+
64
+ const authConfig = parseAuthFile({ allowIncomplete: allowIncomplete || !!combinedConfig.apiKey })
65
+
66
66
  if (!combinedConfig.merchant && !allowIncomplete) {
67
67
  throw new MissingConfigurationError("Invalid configuration: Missing merchant ID")
68
68
  }
@@ -68,4 +68,9 @@ describe("Config", () => {
68
68
  /not implemented/
69
69
  )
70
70
  })
71
+
72
+ it("does not throw if auth file is missing while an api key is provided", async () => {
73
+ fs.mockConfigFile({ apiKey: "test-api-key" })
74
+ await expect(loadConfig({ projectPath: ".", options: {} })).resolves.not.toThrow()
75
+ })
71
76
  })
@@ -48,7 +48,6 @@ export function setupMockFileSystem() {
48
48
  const content = {
49
49
  ...getDefaultConfig(),
50
50
  merchant: "test-merchant",
51
- apiKey: "test-api-key",
52
51
  ...overrides
53
52
  }
54
53
  writeFileContent(".nosto.json", JSON.stringify(content))