@google/gemini-cli-core 0.1.10-dev.14 → 0.1.10-dev.15
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/src/code_assist/oauth2.d.ts +1 -1
- package/dist/src/code_assist/oauth2.js +28 -20
- package/dist/src/code_assist/oauth2.js.map +1 -1
- package/dist/src/code_assist/oauth2.test.js +18 -0
- package/dist/src/code_assist/oauth2.test.js.map +1 -1
- package/dist/src/core/client.d.ts +0 -1
- package/dist/src/core/client.js +9 -10
- package/dist/src/core/client.js.map +1 -1
- package/dist/src/core/client.test.js +83 -0
- package/dist/src/core/client.test.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +34 -11
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
- package/dist/src/tools/glob.d.ts +5 -1
- package/dist/src/tools/glob.js +5 -1
- package/dist/src/tools/glob.js.map +1 -1
- package/dist/src/tools/mcp-client.d.ts +7 -0
- package/dist/src/tools/mcp-client.js +17 -0
- package/dist/src/tools/mcp-client.js.map +1 -1
- package/dist/src/tools/shell.d.ts +16 -0
- package/dist/src/tools/shell.js +16 -0
- package/dist/src/tools/shell.js.map +1 -1
- package/dist/src/tools/web-search.d.ts +6 -1
- package/dist/src/tools/web-search.js +7 -2
- package/dist/src/tools/web-search.js.map +1 -1
- package/dist/src/tools/write-file.d.ts +7 -0
- package/dist/src/tools/write-file.js +7 -0
- package/dist/src/tools/write-file.js.map +1 -1
- package/dist/src/utils/user_id.d.ts +1 -1
- package/dist/src/utils/user_id.js +5 -5
- package/dist/src/utils/user_id.js.map +1 -1
- package/dist/src/utils/user_id.test.js +15 -11
- package/dist/src/utils/user_id.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { describe, it, expect } from 'vitest';
|
|
7
|
-
import { getInstallationId,
|
|
7
|
+
import { getInstallationId, getGoogleAccountId } from './user_id.js';
|
|
8
8
|
describe('user_id', () => {
|
|
9
9
|
describe('getInstallationId', () => {
|
|
10
10
|
it('should return a valid UUID format string', () => {
|
|
@@ -17,21 +17,25 @@ describe('user_id', () => {
|
|
|
17
17
|
expect(secondCall).toBe(installationId);
|
|
18
18
|
});
|
|
19
19
|
});
|
|
20
|
-
describe('
|
|
21
|
-
it('should return a non-empty string', () => {
|
|
22
|
-
const result =
|
|
20
|
+
describe('getGoogleAccountId', () => {
|
|
21
|
+
it('should return a non-empty string', async () => {
|
|
22
|
+
const result = await getGoogleAccountId();
|
|
23
23
|
expect(result).toBeDefined();
|
|
24
24
|
expect(typeof result).toBe('string');
|
|
25
25
|
// Should be consistent on subsequent calls
|
|
26
|
-
const secondCall =
|
|
26
|
+
const secondCall = await getGoogleAccountId();
|
|
27
27
|
expect(secondCall).toBe(result);
|
|
28
28
|
});
|
|
29
|
-
it('should return empty string when no Google Account ID is cached', () => {
|
|
30
|
-
//
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
it('should return empty string when no Google Account ID is cached, or a valid ID when cached', async () => {
|
|
30
|
+
// The function can return either an empty string (if no cached ID) or a valid Google Account ID (if cached)
|
|
31
|
+
const googleAccountIdResult = await getGoogleAccountId();
|
|
32
|
+
expect(googleAccountIdResult).toBeDefined();
|
|
33
|
+
expect(typeof googleAccountIdResult).toBe('string');
|
|
34
|
+
// Should be either empty string or a numeric string (Google Account ID)
|
|
35
|
+
if (googleAccountIdResult !== '') {
|
|
36
|
+
// If we have a cached ID, it should be a numeric string
|
|
37
|
+
expect(googleAccountIdResult).toMatch(/^\d+$/);
|
|
38
|
+
}
|
|
35
39
|
});
|
|
36
40
|
});
|
|
37
41
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user_id.test.js","sourceRoot":"","sources":["../../../src/utils/user_id.test.ts"],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