mobileclaude-agent 0.1.0 → 0.1.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/dist/config.js +9 -0
- package/dist/index.js +0 -0
- package/package.json +1 -1
package/dist/config.js
CHANGED
|
@@ -21,6 +21,15 @@ export const AGENT_VERSION = '0.1.0';
|
|
|
21
21
|
const configDir = join(homedir(), '.mobileclaude');
|
|
22
22
|
const tokenPath = join(configDir, 'token');
|
|
23
23
|
export function getRelayToken() {
|
|
24
|
+
// Env var override — set via: MOBILECLAUDE_TOKEN=<ios-token> npx mobileclaude-agent
|
|
25
|
+
const envToken = process.env.MOBILECLAUDE_TOKEN?.trim();
|
|
26
|
+
if (envToken && envToken.length > 0) {
|
|
27
|
+
// Persist it so future runs without env var keep using it
|
|
28
|
+
if (!existsSync(configDir))
|
|
29
|
+
mkdirSync(configDir, { recursive: true });
|
|
30
|
+
writeFileSync(tokenPath, envToken, 'utf-8');
|
|
31
|
+
return envToken;
|
|
32
|
+
}
|
|
24
33
|
if (!existsSync(configDir)) {
|
|
25
34
|
mkdirSync(configDir, { recursive: true });
|
|
26
35
|
}
|
package/dist/index.js
CHANGED
|
File without changes
|