contextgit 0.0.10 → 0.0.12
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/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +32 -0
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/doctor.test.d.ts +2 -0
- package/dist/commands/doctor.test.d.ts.map +1 -0
- package/dist/commands/doctor.test.js +29 -0
- package/dist/commands/doctor.test.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +36 -121
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/pull.d.ts.map +1 -1
- package/dist/commands/pull.js +13 -9
- package/dist/commands/pull.js.map +1 -1
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +6 -8
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/set-remote.d.ts +2 -1
- package/dist/commands/set-remote.d.ts.map +1 -1
- package/dist/commands/set-remote.js +32 -10
- package/dist/commands/set-remote.js.map +1 -1
- package/dist/commands/set-remote.test.d.ts +2 -0
- package/dist/commands/set-remote.test.d.ts.map +1 -0
- package/dist/commands/set-remote.test.js +37 -0
- package/dist/commands/set-remote.test.js.map +1 -0
- package/dist/lib/client-config.d.ts +1 -18
- package/dist/lib/client-config.d.ts.map +1 -1
- package/dist/lib/client-config.js +1 -73
- package/dist/lib/client-config.js.map +1 -1
- package/dist/lib/client-config.test.js +1 -96
- package/dist/lib/client-config.test.js.map +1 -1
- package/dist/lib/init-helpers.d.ts +24 -0
- package/dist/lib/init-helpers.d.ts.map +1 -0
- package/dist/lib/init-helpers.js +185 -0
- package/dist/lib/init-helpers.js.map +1 -0
- package/dist/lib/init-helpers.test.d.ts +2 -0
- package/dist/lib/init-helpers.test.d.ts.map +1 -0
- package/dist/lib/init-helpers.test.js +73 -0
- package/dist/lib/init-helpers.test.js.map +1 -0
- package/dist/lib/remote-store.d.ts +4 -0
- package/dist/lib/remote-store.d.ts.map +1 -0
- package/dist/lib/remote-store.js +28 -0
- package/dist/lib/remote-store.js.map +1 -0
- package/dist/lib/remote-store.test.d.ts +2 -0
- package/dist/lib/remote-store.test.d.ts.map +1 -0
- package/dist/lib/remote-store.test.js +40 -0
- package/dist/lib/remote-store.test.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-store.test.d.ts","sourceRoot":"","sources":["../../src/lib/remote-store.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { describe, it, expect, vi } from 'vitest';
|
|
2
|
+
import { resolveRemoteStore } from './remote-store.js';
|
|
3
|
+
import { SupabaseStore } from '@contextgit/store';
|
|
4
|
+
import { RemoteStore } from '@contextgit/store';
|
|
5
|
+
vi.mock('@contextgit/store', () => ({
|
|
6
|
+
SupabaseStore: vi.fn(),
|
|
7
|
+
RemoteStore: vi.fn(),
|
|
8
|
+
LocalStore: vi.fn(),
|
|
9
|
+
}));
|
|
10
|
+
describe('resolveRemoteStore', () => {
|
|
11
|
+
const baseConfig = { projectId: 'p1', project: 'test', store: 'local',
|
|
12
|
+
agentRole: 'solo', workflowType: 'interactive',
|
|
13
|
+
autoSnapshot: false, snapshotInterval: 30,
|
|
14
|
+
embeddingModel: 'local' };
|
|
15
|
+
it('uses SupabaseStore when supabaseUrl is set and key is in env', () => {
|
|
16
|
+
process.env['SUPABASE_SERVICE_KEY'] = 'test-key';
|
|
17
|
+
resolveRemoteStore({ ...baseConfig, supabaseUrl: 'https://x.supabase.co' });
|
|
18
|
+
expect(SupabaseStore).toHaveBeenCalledWith('https://x.supabase.co', 'test-key');
|
|
19
|
+
delete process.env['SUPABASE_SERVICE_KEY'];
|
|
20
|
+
});
|
|
21
|
+
it('throws when supabaseUrl is set but SUPABASE_SERVICE_KEY is missing', () => {
|
|
22
|
+
delete process.env['SUPABASE_SERVICE_KEY'];
|
|
23
|
+
expect(() => resolveRemoteStore({ ...baseConfig, supabaseUrl: 'https://x.supabase.co' }))
|
|
24
|
+
.toThrow('SUPABASE_SERVICE_KEY');
|
|
25
|
+
});
|
|
26
|
+
it('uses RemoteStore when --remote flag is passed (always HTTP, regardless of supabaseUrl)', () => {
|
|
27
|
+
process.env['SUPABASE_SERVICE_KEY'] = 'key';
|
|
28
|
+
resolveRemoteStore({ ...baseConfig, supabaseUrl: 'https://x.supabase.co' }, 'https://api.example.com');
|
|
29
|
+
expect(RemoteStore).toHaveBeenCalledWith('https://api.example.com');
|
|
30
|
+
delete process.env['SUPABASE_SERVICE_KEY'];
|
|
31
|
+
});
|
|
32
|
+
it('uses RemoteStore when config.remote is set and supabaseUrl is absent', () => {
|
|
33
|
+
resolveRemoteStore({ ...baseConfig, remote: 'https://api.example.com' });
|
|
34
|
+
expect(RemoteStore).toHaveBeenCalledWith('https://api.example.com');
|
|
35
|
+
});
|
|
36
|
+
it('throws when no remote is configured at all', () => {
|
|
37
|
+
expect(() => resolveRemoteStore(baseConfig)).toThrow('No remote configured');
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=remote-store.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-store.test.js","sourceRoot":"","sources":["../../src/lib/remote-store.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,GAAG,EAAE,CAAC,CAAC;IAClC,aAAa,EAAE,EAAE,CAAC,EAAE,EAAE;IACtB,WAAW,EAAE,EAAE,CAAC,EAAE,EAAE;IACpB,UAAU,EAAE,EAAE,CAAC,EAAE,E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,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAA;IAC5C,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,sEAAsE,EAAE,GAAG,EAAE;QAC9E,kBAAkB,CAAC,EAAE,GAAG,UAAU,EAAE,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAAA;QACxE,MAAM,CAAC,WAAW,CAAC,CAAC,oBAAoB,CAAC,yBAAyB,CAAC,CAAA;IACrE,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACpD,MAAM,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAC9E,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contextgit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"contextgit": "./bin/run.js"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"typecheck": "tsc --noEmit"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@contextgit/core": "0.0.
|
|
23
|
-
"@contextgit/store": "0.0.
|
|
24
|
-
"@contextgit/api": "0.0.
|
|
22
|
+
"@contextgit/core": "0.0.12",
|
|
23
|
+
"@contextgit/store": "0.0.12",
|
|
24
|
+
"@contextgit/api": "0.0.12",
|
|
25
25
|
"@oclif/core": "^3.27.0",
|
|
26
26
|
"nanoid": "^5.0.0",
|
|
27
27
|
"simple-git": "^3.27.0"
|