free-antigravity-cli 1.0.5 → 1.0.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": "free-antigravity-cli",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Open-source community CLI for Antigravity - supports custom AI models (OpenAI, Anthropic, Ollama, OpenRouter, Google AI Studio) alongside Gemini",
5
5
  "homepage": "https://github.com/vahapogut/free-antigravity-cli",
6
6
  "author": {
@@ -8,7 +8,7 @@ jest.mock('fs', () => {
8
8
  return {
9
9
  ...originalFs,
10
10
  existsSync: jest.fn((p) => {
11
- if (typeof p === 'string' && p.endsWith('models.json')) return true;
11
+ if (typeof p === 'string' && (p.endsWith('models.json') || p.includes('.free-antigravity'))) return true;
12
12
  return originalFs.existsSync(p);
13
13
  }),
14
14
  readFileSync: jest.fn((p, encoding) => {
@@ -19,7 +19,8 @@ jest.mock('fs', () => {
19
19
  name: 'models/custom-test-model',
20
20
  displayName: 'Custom Test Model',
21
21
  provider: 'openai',
22
- apiKey: 'test-key',
22
+ apiKey: 'enc:dGVzdC1rZXk=', // already encrypted format to bypass migration
23
+ encrypted: true,
23
24
  apiUrl: 'https://api.openai.com/v1/chat/completions',
24
25
  externalModelName: 'gpt-4o'
25
26
  }
@@ -27,6 +28,14 @@ jest.mock('fs', () => {
27
28
  });
28
29
  }
29
30
  return originalFs.readFileSync(p, encoding);
31
+ }),
32
+ writeFileSync: jest.fn((p, data, encoding) => {
33
+ if (typeof p === 'string' && p.endsWith('models.json')) return;
34
+ return originalFs.writeFileSync(p, data, encoding);
35
+ }),
36
+ mkdirSync: jest.fn((p, options) => {
37
+ if (typeof p === 'string' && p.includes('.free-antigravity')) return;
38
+ return originalFs.mkdirSync(p, options);
30
39
  })
31
40
  };
32
41
  });