axauth 1.7.1 → 1.7.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.
@@ -72,8 +72,8 @@ interface RemoveOptions {
72
72
  * - Either option specifies where to look for credentials
73
73
  *
74
74
  * **Agents with separation** (OpenCode):
75
- * - `dataDir` specifies where to look for credentials
76
- * - If only `configDir` provided, credentials are read from default data location
75
+ * - `dataDir` must be provided to specify where credentials are stored
76
+ * - If only `configDir` is provided, returns undefined (use extractRawCredentials() for default location)
77
77
  */
78
78
  interface ExtractOptions {
79
79
  /** Custom config directory for settings/preferences */
@@ -80,12 +80,12 @@ const opencodeAdapter = {
80
80
  return { agent: AGENT_ID, type: "oauth", data: auth };
81
81
  },
82
82
  extractRawCredentialsFromDirectory(options) {
83
- // OpenCode stores credentials in dataDir, not configDir
84
- const directory = options.dataDir ?? options.configDir;
85
- if (!directory)
83
+ // OpenCode stores credentials in dataDir only - configDir is for settings
84
+ // If dataDir not provided, return undefined (use extractRawCredentials() for default)
85
+ if (!options.dataDir)
86
86
  return undefined;
87
87
  // Only return if there's at least one provider
88
- return extractCredsFromDirectory(AGENT_ID, directory, CREDS_FILE_NAME, (data) => (Object.keys(data).length > 0 ? data : undefined));
88
+ return extractCredsFromDirectory(AGENT_ID, options.dataDir, CREDS_FILE_NAME, (data) => (Object.keys(data).length > 0 ? data : undefined));
89
89
  },
90
90
  installCredentials(creds, options) {
91
91
  // Resolve custom directory with validation (OpenCode supports separation)
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "axauth",
3
3
  "author": "Łukasz Jerciński",
4
4
  "license": "MIT",
5
- "version": "1.7.1",
5
+ "version": "1.7.2",
6
6
  "description": "Authentication management library and CLI for AI coding agents",
7
7
  "repository": {
8
8
  "type": "git",