Compare commits

...

2 Commits

Author SHA1 Message Date
Alisa 404828373e Merge branch 'main' into fix_benchmarking 2026-02-19 19:00:08 -08:00
Alisa Novikova 4a599db2bf fix(cli): resolve devtools build issues and update third-party notices 2026-02-19 18:11:46 -08:00
45 changed files with 5353 additions and 2960 deletions
@@ -56,6 +56,7 @@ creating a "discovery file."
} }
} }
``` ```
- `port` (number, required): The port of the MCP server. - `port` (number, required): The port of the MCP server.
- `workspacePath` (string, required): A list of all open workspace root paths, - `workspacePath` (string, required): A list of all open workspace root paths,
delimited by the OS-specific path separator (`:` for Linux/macOS, `;` for delimited by the OS-specific path separator (`:` for Linux/macOS, `;` for
+1 -1
View File
@@ -82,7 +82,7 @@ const commonAliases = {
const cliConfig = { const cliConfig = {
...baseConfig, ...baseConfig,
banner: { banner: {
js: `import { createRequire } from 'module'; const require = createRequire(import.meta.url); globalThis.__filename = require('url').fileURLToPath(import.meta.url); globalThis.__dirname = require('path').dirname(globalThis.__filename);`, js: `const require = (await import('module')).createRequire(import.meta.url); globalThis.__filename = require('url').fileURLToPath(import.meta.url); globalThis.__dirname = require('path').dirname(globalThis.__filename);`,
}, },
entryPoints: ['packages/cli/index.ts'], entryPoints: ['packages/cli/index.ts'],
outfile: 'bundle/gemini.js', outfile: 'bundle/gemini.js',
+5076 -2718
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -66,6 +66,7 @@
"overrides": { "overrides": {
"ink": "npm:@jrichman/ink@6.4.11", "ink": "npm:@jrichman/ink@6.4.11",
"wrap-ansi": "9.0.2", "wrap-ansi": "9.0.2",
"zod": "3.25.76",
"cliui": { "cliui": {
"wrap-ansi": "7.0.0" "wrap-ansi": "7.0.0"
} }
@@ -92,7 +93,7 @@
"@types/shell-quote": "^1.7.5", "@types/shell-quote": "^1.7.5",
"@types/ws": "^8.18.1", "@types/ws": "^8.18.1",
"@vitest/coverage-v8": "^3.1.1", "@vitest/coverage-v8": "^3.1.1",
"@vitest/eslint-plugin": "^1.3.4", "@vitest/eslint-plugin": "1.4.3",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"depcheck": "^1.4.7", "depcheck": "^1.4.7",
"esbuild": "^0.25.0", "esbuild": "^0.25.0",
+2
View File
@@ -31,6 +31,7 @@
"dependencies": { "dependencies": {
"@agentclientprotocol/sdk": "^0.12.0", "@agentclientprotocol/sdk": "^0.12.0",
"@google/gemini-cli-core": "file:../core", "@google/gemini-cli-core": "file:../core",
"@google/gemini-cli-devtools": "file:../devtools",
"@google/genai": "1.30.0", "@google/genai": "1.30.0",
"@iarna/toml": "^2.2.5", "@iarna/toml": "^2.2.5",
"@modelcontextprotocol/sdk": "^1.23.0", "@modelcontextprotocol/sdk": "^1.23.0",
@@ -81,6 +82,7 @@
"@types/ws": "^8.5.10", "@types/ws": "^8.5.10",
"@types/yargs": "^17.0.32", "@types/yargs": "^17.0.32",
"@xterm/headless": "^5.5.0", "@xterm/headless": "^5.5.0",
"ink-testing-library": "^4.0.0",
"typescript": "^5.3.3", "typescript": "^5.3.3",
"vitest": "^3.1.1" "vitest": "^3.1.1"
}, },
@@ -292,9 +292,8 @@ System using model: \${MODEL_NAME}
}); });
expect(extension.skills![0].body).toContain('Value is: first'); expect(extension.skills![0].body).toContain('Value is: first');
const { updateSetting, ExtensionSettingScope } = await import( const { updateSetting, ExtensionSettingScope } =
'./extensions/extensionSettings.js' await import('./extensions/extensionSettings.js');
);
const extensionConfig = const extensionConfig =
await extensionManager.loadExtensionConfig(extensionPath); await extensionManager.loadExtensionConfig(extensionPath);
+2 -3
View File
@@ -746,9 +746,8 @@ describe('gemini.tsx main function kitty protocol', () => {
}); });
it.skip('should log error when cleanupExpiredSessions fails', async () => { it.skip('should log error when cleanupExpiredSessions fails', async () => {
const { cleanupExpiredSessions } = await import( const { cleanupExpiredSessions } =
'./utils/sessionCleanup.js' await import('./utils/sessionCleanup.js');
);
vi.mocked(cleanupExpiredSessions).mockRejectedValue( vi.mocked(cleanupExpiredSessions).mockRejectedValue(
new Error('Cleanup failed'), new Error('Cleanup failed'),
); );
+7 -3
View File
@@ -568,10 +568,14 @@ export async function main() {
adminControlsListner.setConfig(config); adminControlsListner.setConfig(config);
if (config.isInteractive() && settings.merged.general.devtools) { if (config.isInteractive() && settings.merged.general.devtools) {
const { setupInitialActivityLogger } = await import( const { setupInitialActivityLogger, stopDevTools } =
'./utils/devtoolsService.js' await import('./utils/devtoolsService.js');
); const { ActivityLogger } = await import('./utils/activityLogger.js');
await setupInitialActivityLogger(config); await setupInitialActivityLogger(config);
registerCleanup(async () => {
await stopDevTools();
ActivityLogger.getInstance().dispose();
});
} }
// Register config for telemetry shutdown // Register config for telemetry shutdown
+2 -3
View File
@@ -180,9 +180,8 @@ describe('gemini.tsx main function cleanup', () => {
}); });
it('should log error when cleanupExpiredSessions fails', async () => { it('should log error when cleanupExpiredSessions fails', async () => {
const { loadCliConfig, parseArguments } = await import( const { loadCliConfig, parseArguments } =
'./config/config.js' await import('./config/config.js');
);
const { loadSettings } = await import('./config/settings.js'); const { loadSettings } = await import('./config/settings.js');
cleanupMockState.shouldThrow = true; cleanupMockState.shouldThrow = true;
cleanupMockState.called = false; cleanupMockState.called = false;
+10 -15
View File
@@ -212,9 +212,8 @@ describe('runNonInteractive', () => {
computeMergedSettings: vi.fn(), computeMergedSettings: vi.fn(),
} as unknown as LoadedSettings; } as unknown as LoadedSettings;
const { handleAtCommand } = await import( const { handleAtCommand } =
'./ui/hooks/atCommandProcessor.js' await import('./ui/hooks/atCommandProcessor.js');
);
vi.mocked(handleAtCommand).mockImplementation(async ({ query }) => ({ vi.mocked(handleAtCommand).mockImplementation(async ({ query }) => ({
processedQuery: [{ text: query }], processedQuery: [{ text: query }],
})); }));
@@ -636,9 +635,8 @@ describe('runNonInteractive', () => {
it('should preprocess @include commands before sending to the model', async () => { it('should preprocess @include commands before sending to the model', async () => {
// 1. Mock the imported atCommandProcessor // 1. Mock the imported atCommandProcessor
const { handleAtCommand } = await import( const { handleAtCommand } =
'./ui/hooks/atCommandProcessor.js' await import('./ui/hooks/atCommandProcessor.js');
);
const mockHandleAtCommand = vi.mocked(handleAtCommand); const mockHandleAtCommand = vi.mocked(handleAtCommand);
// 2. Define the raw input and the expected processed output // 2. Define the raw input and the expected processed output
@@ -995,9 +993,8 @@ describe('runNonInteractive', () => {
}); });
it('should handle slash commands', async () => { it('should handle slash commands', async () => {
const nonInteractiveCliCommands = await import( const nonInteractiveCliCommands =
'./nonInteractiveCliCommands.js' await import('./nonInteractiveCliCommands.js');
);
const handleSlashCommandSpy = vi.spyOn( const handleSlashCommandSpy = vi.spyOn(
nonInteractiveCliCommands, nonInteractiveCliCommands,
'handleSlashCommand', 'handleSlashCommand',
@@ -1276,13 +1273,11 @@ describe('runNonInteractive', () => {
it('should instantiate CommandService with correct loaders for slash commands', async () => { it('should instantiate CommandService with correct loaders for slash commands', async () => {
// This test indirectly checks that handleSlashCommand is using the right loaders. // This test indirectly checks that handleSlashCommand is using the right loaders.
const { FileCommandLoader } = await import( const { FileCommandLoader } =
'./services/FileCommandLoader.js' await import('./services/FileCommandLoader.js');
);
const { McpPromptLoader } = await import('./services/McpPromptLoader.js'); const { McpPromptLoader } = await import('./services/McpPromptLoader.js');
const { BuiltinCommandLoader } = await import( const { BuiltinCommandLoader } =
'./services/BuiltinCommandLoader.js' await import('./services/BuiltinCommandLoader.js');
);
mockGetCommands.mockReturnValue([]); // No commands found, so it will fall through mockGetCommands.mockReturnValue([]); // No commands found, so it will fall through
const events: ServerGeminiStreamEvent[] = [ const events: ServerGeminiStreamEvent[] = [
{ type: GeminiEventType.Content, value: 'Acknowledged' }, { type: GeminiEventType.Content, value: 'Acknowledged' },
+2 -3
View File
@@ -72,9 +72,8 @@ export async function runNonInteractive({
}); });
if (process.env['GEMINI_CLI_ACTIVITY_LOG_TARGET']) { if (process.env['GEMINI_CLI_ACTIVITY_LOG_TARGET']) {
const { setupInitialActivityLogger } = await import( const { setupInitialActivityLogger } =
'./utils/devtoolsService.js' await import('./utils/devtoolsService.js');
);
await setupInitialActivityLogger(config); await setupInitialActivityLogger(config);
} }
+2 -3
View File
@@ -42,9 +42,8 @@ import { AuthState } from '../ui/types.js';
vi.mock('@google/gemini-cli-core', async (importOriginal) => { vi.mock('@google/gemini-cli-core', async (importOriginal) => {
const original = const original =
await importOriginal<typeof import('@google/gemini-cli-core')>(); await importOriginal<typeof import('@google/gemini-cli-core')>();
const { MockShellExecutionService: MockService } = await import( const { MockShellExecutionService: MockService } =
'./MockShellExecutionService.js' await import('./MockShellExecutionService.js');
);
// Register the real execution logic so MockShellExecutionService can fall back to it // Register the real execution logic so MockShellExecutionService can fall back to it
MockService.setOriginalImplementation(original.ShellExecutionService.execute); MockService.setOriginalImplementation(original.ShellExecutionService.execute);
+2 -1
View File
@@ -357,7 +357,8 @@ export const render = (
debug: false, debug: false,
exitOnCtrlC: false, exitOnCtrlC: false,
patchConsole: false, patchConsole: false,
onRender: (metrics: { output: string; staticOutput?: string }) => { // eslint-disable-next-line @typescript-eslint/no-explicit-any
onRender: (metrics: any) => {
stdout.onRender(metrics.staticOutput ?? '', metrics.output); stdout.onRender(metrics.staticOutput ?? '', metrics.output);
}, },
}); });
+4 -6
View File
@@ -3292,9 +3292,8 @@ describe('AppContainer State Management', () => {
describe('Permission Handling', () => { describe('Permission Handling', () => {
it('shows permission dialog when checkPermissions returns paths', async () => { it('shows permission dialog when checkPermissions returns paths', async () => {
const { checkPermissions } = await import( const { checkPermissions } =
'./hooks/atCommandProcessor.js' await import('./hooks/atCommandProcessor.js');
);
vi.mocked(checkPermissions).mockResolvedValue(['/test/file.txt']); vi.mocked(checkPermissions).mockResolvedValue(['/test/file.txt']);
let unmount: () => void; let unmount: () => void;
@@ -3316,9 +3315,8 @@ describe('AppContainer State Management', () => {
it.each([true, false])( it.each([true, false])(
'handles permissions when allowed is %s', 'handles permissions when allowed is %s',
async (allowed) => { async (allowed) => {
const { checkPermissions } = await import( const { checkPermissions } =
'./hooks/atCommandProcessor.js' await import('./hooks/atCommandProcessor.js');
);
vi.mocked(checkPermissions).mockResolvedValue(['/test/file.txt']); vi.mocked(checkPermissions).mockResolvedValue(['/test/file.txt']);
const addReadOnlyPathSpy = vi.spyOn( const addReadOnlyPathSpy = vi.spyOn(
mockConfig.getWorkspaceContext(), mockConfig.getWorkspaceContext(),
+8 -11
View File
@@ -1392,9 +1392,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
}, []); }, []);
const shouldShowIdePrompt = Boolean( const shouldShowIdePrompt = Boolean(
currentIDE && currentIDE &&
!config.getIdeMode() && !config.getIdeMode() &&
!settings.merged.ide.hasSeenNudge && !settings.merged.ide.hasSeenNudge &&
!idePromptAnswered, !idePromptAnswered,
); );
const [showErrorDetails, setShowErrorDetails] = useState<boolean>(false); const [showErrorDetails, setShowErrorDetails] = useState<boolean>(false);
@@ -1656,9 +1656,8 @@ Logging in with Google... Restarting Gemini CLI to continue.
if (keyMatchers[Command.SHOW_ERROR_DETAILS](key)) { if (keyMatchers[Command.SHOW_ERROR_DETAILS](key)) {
if (settings.merged.general.devtools) { if (settings.merged.general.devtools) {
void (async () => { void (async () => {
const { toggleDevToolsPanel } = await import( const { toggleDevToolsPanel } =
'../utils/devtoolsService.js' await import('../utils/devtoolsService.js');
);
await toggleDevToolsPanel( await toggleDevToolsPanel(
config, config,
showErrorDetails, showErrorDetails,
@@ -2073,11 +2072,9 @@ Logging in with Google... Restarting Gemini CLI to continue.
let isMounted = true; let isMounted = true;
const fetchBannerTexts = async () => { const fetchBannerTexts = async () => {
const [defaultBanner, warningBanner] = await Promise.all([ // TODO: temporarily disabling the banner, it will be re-added.
// TODO: temporarily disabling the banner, it will be re-added. const defaultBanner = '';
'', const warningBanner = await config.getBannerTextCapacityIssues();
config.getBannerTextCapacityIssues(),
]);
if (isMounted) { if (isMounted) {
setDefaultBannerText(defaultBanner); setDefaultBannerText(defaultBanner);
@@ -73,9 +73,8 @@ describe('authCommand', () => {
const logoutCommand = authCommand.subCommands?.[1]; const logoutCommand = authCommand.subCommands?.[1];
expect(logoutCommand?.name).toBe('logout'); expect(logoutCommand?.name).toBe('logout');
const { clearCachedCredentialFile } = await import( const { clearCachedCredentialFile } =
'@google/gemini-cli-core' await import('@google/gemini-cli-core');
);
await logoutCommand!.action!(mockContext, ''); await logoutCommand!.action!(mockContext, '');
@@ -1048,9 +1048,8 @@ describe('extensionsCommand', () => {
const prompts = (await import('prompts')).default; const prompts = (await import('prompts')).default;
vi.mocked(prompts).mockResolvedValue({ overwrite: true }); vi.mocked(prompts).mockResolvedValue({ overwrite: true });
const { getScopedEnvContents } = await import( const { getScopedEnvContents } =
'../../config/extensions/extensionSettings.js' await import('../../config/extensions/extensionSettings.js');
);
vi.mocked(getScopedEnvContents).mockResolvedValue({}); vi.mocked(getScopedEnvContents).mockResolvedValue({});
}); });
+4 -4
View File
@@ -142,15 +142,15 @@ const inScreen = (): boolean =>
const isSSH = (): boolean => const isSSH = (): boolean =>
Boolean( Boolean(
process.env['SSH_TTY'] || process.env['SSH_TTY'] ||
process.env['SSH_CONNECTION'] || process.env['SSH_CONNECTION'] ||
process.env['SSH_CLIENT'], process.env['SSH_CLIENT'],
); );
const isWSL = (): boolean => const isWSL = (): boolean =>
Boolean( Boolean(
process.env['WSL_DISTRO_NAME'] || process.env['WSL_DISTRO_NAME'] ||
process.env['WSLENV'] || process.env['WSLENV'] ||
process.env['WSL_INTEROP'], process.env['WSL_INTEROP'],
); );
const isWindowsTerminal = (): boolean => const isWindowsTerminal = (): boolean =>
+10 -15
View File
@@ -220,9 +220,8 @@ describe('rewindFileOps', () => {
}); });
it('reverts exact match', async () => { it('reverts exact match', async () => {
const { getFileDiffFromResultDisplay } = await import( const { getFileDiffFromResultDisplay } =
'@google/gemini-cli-core' await import('@google/gemini-cli-core');
);
vi.mocked(getFileDiffFromResultDisplay).mockReturnValue({ vi.mocked(getFileDiffFromResultDisplay).mockReturnValue({
filePath: '/abs/path/test.ts', filePath: '/abs/path/test.ts',
fileName: 'test.ts', fileName: 'test.ts',
@@ -270,9 +269,8 @@ describe('rewindFileOps', () => {
}); });
it('deletes new file on revert', async () => { it('deletes new file on revert', async () => {
const { getFileDiffFromResultDisplay } = await import( const { getFileDiffFromResultDisplay } =
'@google/gemini-cli-core' await import('@google/gemini-cli-core');
);
vi.mocked(getFileDiffFromResultDisplay).mockReturnValue({ vi.mocked(getFileDiffFromResultDisplay).mockReturnValue({
filePath: '/abs/path/new.ts', filePath: '/abs/path/new.ts',
fileName: 'new.ts', fileName: 'new.ts',
@@ -317,9 +315,8 @@ describe('rewindFileOps', () => {
}); });
it('handles smart revert (patching) successfully', async () => { it('handles smart revert (patching) successfully', async () => {
const { getFileDiffFromResultDisplay } = await import( const { getFileDiffFromResultDisplay } =
'@google/gemini-cli-core' await import('@google/gemini-cli-core');
);
vi.mocked(getFileDiffFromResultDisplay).mockReturnValue({ vi.mocked(getFileDiffFromResultDisplay).mockReturnValue({
filePath: '/abs/path/test.ts', filePath: '/abs/path/test.ts',
fileName: 'test.ts', fileName: 'test.ts',
@@ -369,9 +366,8 @@ describe('rewindFileOps', () => {
}); });
it('emits warning on smart revert failure', async () => { it('emits warning on smart revert failure', async () => {
const { getFileDiffFromResultDisplay } = await import( const { getFileDiffFromResultDisplay } =
'@google/gemini-cli-core' await import('@google/gemini-cli-core');
);
vi.mocked(getFileDiffFromResultDisplay).mockReturnValue({ vi.mocked(getFileDiffFromResultDisplay).mockReturnValue({
filePath: '/abs/path/test.ts', filePath: '/abs/path/test.ts',
fileName: 'test.ts', fileName: 'test.ts',
@@ -421,9 +417,8 @@ describe('rewindFileOps', () => {
}); });
it('emits error if fs.readFile fails with a generic error', async () => { it('emits error if fs.readFile fails with a generic error', async () => {
const { getFileDiffFromResultDisplay } = await import( const { getFileDiffFromResultDisplay } =
'@google/gemini-cli-core' await import('@google/gemini-cli-core');
);
vi.mocked(getFileDiffFromResultDisplay).mockReturnValue({ vi.mocked(getFileDiffFromResultDisplay).mockReturnValue({
filePath: '/abs/path/test.ts', filePath: '/abs/path/test.ts',
fileName: 'test.ts', fileName: 'test.ts',
+3 -2
View File
@@ -47,13 +47,14 @@ describe('textUtils', () => {
describe('getCachedStringWidth', () => { describe('getCachedStringWidth', () => {
it('should handle unicode characters that crash string-width', () => { it('should handle unicode characters that crash string-width', () => {
// U+0602 caused string-width to crash (see #16418) // U+0602 caused string-width to crash (see #16418)
// Newer versions of string-width correctly identify it as width 0.
const char = '؂'; const char = '؂';
expect(getCachedStringWidth(char)).toBe(1); expect(getCachedStringWidth(char)).toBe(0);
}); });
it('should handle unicode characters that crash string-width with ANSI codes', () => { it('should handle unicode characters that crash string-width with ANSI codes', () => {
const charWithAnsi = '\u001b[31m' + '؂' + '\u001b[0m'; const charWithAnsi = '\u001b[31m' + '؂' + '\u001b[0m';
expect(getCachedStringWidth(charWithAnsi)).toBe(1); expect(getCachedStringWidth(charWithAnsi)).toBe(0);
}); });
}); });
+13
View File
@@ -561,6 +561,13 @@ export class ActivityLogger extends EventEmitter {
} }
this.emit('console', enriched); this.emit('console', enriched);
} }
dispose() {
this.networkLoggingEnabled = false;
this.removeAllListeners();
this.clearBufferedLogs();
this.emit('dispose');
}
} }
/** /**
@@ -820,6 +827,12 @@ function setupNetworkLogging(
flushBuffer(); flushBuffer();
}); });
capture.on('dispose', () => {
if (reconnectTimer) clearTimeout(reconnectTimer);
if (ws) ws.close();
cleanup();
});
// Cleanup on process exit // Cleanup on process exit
process.on('exit', () => { process.on('exit', () => {
if (reconnectTimer) clearTimeout(reconnectTimer); if (reconnectTimer) clearTimeout(reconnectTimer);
+6 -6
View File
@@ -100,14 +100,14 @@ async function drainStdin() {
await new Promise((resolve) => setTimeout(resolve, 50)); await new Promise((resolve) => setTimeout(resolve, 50));
} }
export async function cleanupCheckpoints() { export async function cleanupCheckpoints(cwd?: string) {
const storage = new Storage(process.cwd());
await storage.initialize();
const tempDir = storage.getProjectTempDir();
const checkpointsDir = join(tempDir, 'checkpoints');
try { try {
const storage = new Storage(cwd || process.cwd());
await storage.initialize();
const tempDir = storage.getProjectTempDir();
const checkpointsDir = join(tempDir, 'checkpoints');
await fs.rm(checkpointsDir, { recursive: true, force: true }); await fs.rm(checkpointsDir, { recursive: true, force: true });
} catch { } catch {
// Ignore errors if the directory doesn't exist or fails to delete. // Ignore errors if the directory doesn't exist, process.cwd() fails, or it fails to delete.
} }
} }
+17 -3
View File
@@ -230,9 +230,8 @@ export async function toggleDevToolsPanel(
} }
try { try {
const { openBrowserSecurely, shouldLaunchBrowser } = await import( const { openBrowserSecurely, shouldLaunchBrowser } =
'@google/gemini-cli-core' await import('@google/gemini-cli-core');
);
const url = await startDevToolsServer(config); const url = await startDevToolsServer(config);
if (shouldLaunchBrowser()) { if (shouldLaunchBrowser()) {
try { try {
@@ -257,3 +256,18 @@ export function resetForTesting() {
serverStartPromise = null; serverStartPromise = null;
connectedUrl = null; connectedUrl = null;
} }
/**
* Stops the DevTools server if it was started by this process.
*/
export async function stopDevTools() {
try {
const mod = await import('@google/gemini-cli-devtools');
const devtools: IDevTools = mod.DevTools.getInstance();
await devtools.stop();
serverStartPromise = null;
connectedUrl = null;
} catch (err) {
debugLogger.debug('Failed to stop DevTools:', err);
}
}
+1 -1
View File
@@ -14,5 +14,5 @@
"./package.json" "./package.json"
], ],
"exclude": ["node_modules", "dist"], "exclude": ["node_modules", "dist"],
"references": [{ "path": "../core" }] "references": [{ "path": "../core" }, { "path": "../devtools" }]
} }
+2 -4
View File
@@ -28,8 +28,7 @@ interface FrontmatterBaseAgentDefinition {
display_name?: string; display_name?: string;
} }
interface FrontmatterLocalAgentDefinition interface FrontmatterLocalAgentDefinition extends FrontmatterBaseAgentDefinition {
extends FrontmatterBaseAgentDefinition {
kind: 'local'; kind: 'local';
description: string; description: string;
tools?: string[]; tools?: string[];
@@ -57,8 +56,7 @@ interface FrontmatterAuthConfig {
password?: string; password?: string;
} }
interface FrontmatterRemoteAgentDefinition interface FrontmatterRemoteAgentDefinition extends FrontmatterBaseAgentDefinition {
extends FrontmatterBaseAgentDefinition {
kind: 'remote'; kind: 'remote';
description?: string; description?: string;
agent_card_url: string; agent_card_url: string;
+6 -9
View File
@@ -1374,9 +1374,8 @@ describe('oauth2', () => {
}); });
it('should save credentials using OAuthCredentialStorage during web login', async () => { it('should save credentials using OAuthCredentialStorage during web login', async () => {
const { OAuthCredentialStorage } = await import( const { OAuthCredentialStorage } =
'./oauth-credential-storage.js' await import('./oauth-credential-storage.js');
);
const mockAuthUrl = 'https://example.com/auth'; const mockAuthUrl = 'https://example.com/auth';
const mockCode = 'test-code'; const mockCode = 'test-code';
const mockState = 'test-state'; const mockState = 'test-state';
@@ -1476,9 +1475,8 @@ describe('oauth2', () => {
}); });
it('should load credentials using OAuthCredentialStorage and not from file', async () => { it('should load credentials using OAuthCredentialStorage and not from file', async () => {
const { OAuthCredentialStorage } = await import( const { OAuthCredentialStorage } =
'./oauth-credential-storage.js' await import('./oauth-credential-storage.js');
);
const cachedCreds = { refresh_token: 'cached-encrypted-token' }; const cachedCreds = { refresh_token: 'cached-encrypted-token' };
vi.mocked(OAuthCredentialStorage.loadCredentials).mockResolvedValue( vi.mocked(OAuthCredentialStorage.loadCredentials).mockResolvedValue(
cachedCreds, cachedCreds,
@@ -1514,9 +1512,8 @@ describe('oauth2', () => {
}); });
it('should clear credentials using OAuthCredentialStorage', async () => { it('should clear credentials using OAuthCredentialStorage', async () => {
const { OAuthCredentialStorage } = await import( const { OAuthCredentialStorage } =
'./oauth-credential-storage.js' await import('./oauth-credential-storage.js');
);
// Create a dummy unencrypted credential file. It should not be deleted. // Create a dummy unencrypted credential file. It should not be deleted.
const credsPath = path.join(tempHomeDir, GEMINI_DIR, 'oauth_creds.json'); const credsPath = path.join(tempHomeDir, GEMINI_DIR, 'oauth_creds.json');
+4 -6
View File
@@ -304,9 +304,8 @@ describe('Server Config (config.ts)', () => {
// interactive defaults to false // interactive defaults to false
}); });
const { McpClientManager } = await import( const { McpClientManager } =
'../tools/mcp-client-manager.js' await import('../tools/mcp-client-manager.js');
);
let mcpStarted = false; let mcpStarted = false;
vi.mocked(McpClientManager).mockImplementation( vi.mocked(McpClientManager).mockImplementation(
@@ -333,9 +332,8 @@ describe('Server Config (config.ts)', () => {
interactive: true, interactive: true,
}); });
const { McpClientManager } = await import( const { McpClientManager } =
'../tools/mcp-client-manager.js' await import('../tools/mcp-client-manager.js');
);
let mcpStarted = false; let mcpStarted = false;
let resolveMcp: (value: unknown) => void; let resolveMcp: (value: unknown) => void;
const mcpPromise = new Promise((resolve) => { const mcpPromise = new Promise((resolve) => {
+2 -3
View File
@@ -1636,9 +1636,8 @@ export class Config {
if (this.experimentalJitContext && this.contextManager) { if (this.experimentalJitContext && this.contextManager) {
await this.contextManager.refresh(); await this.contextManager.refresh();
} else { } else {
const { refreshServerHierarchicalMemory } = await import( const { refreshServerHierarchicalMemory } =
'../utils/memoryDiscovery.js' await import('../utils/memoryDiscovery.js');
);
await refreshServerHierarchicalMemory(this); await refreshServerHierarchicalMemory(this);
} }
if (this.geminiClient?.isInitialized()) { if (this.geminiClient?.isInitialized()) {
+12 -18
View File
@@ -1159,9 +1159,8 @@ ${JSON.stringify(
true, true,
); );
// Get the mocked checkNextSpeaker function and configure it to trigger infinite loop // Get the mocked checkNextSpeaker function and configure it to trigger infinite loop
const { checkNextSpeaker } = await import( const { checkNextSpeaker } =
'../utils/nextSpeakerChecker.js' await import('../utils/nextSpeakerChecker.js');
);
const mockCheckNextSpeaker = vi.mocked(checkNextSpeaker); const mockCheckNextSpeaker = vi.mocked(checkNextSpeaker);
mockCheckNextSpeaker.mockResolvedValue({ mockCheckNextSpeaker.mockResolvedValue({
next_speaker: 'model', next_speaker: 'model',
@@ -1283,9 +1282,8 @@ ${JSON.stringify(
// someone tries to bypass it by calling with a very large turns value // someone tries to bypass it by calling with a very large turns value
// Get the mocked checkNextSpeaker function and configure it to trigger infinite loop // Get the mocked checkNextSpeaker function and configure it to trigger infinite loop
const { checkNextSpeaker } = await import( const { checkNextSpeaker } =
'../utils/nextSpeakerChecker.js' await import('../utils/nextSpeakerChecker.js');
);
const mockCheckNextSpeaker = vi.mocked(checkNextSpeaker); const mockCheckNextSpeaker = vi.mocked(checkNextSpeaker);
mockCheckNextSpeaker.mockResolvedValue({ mockCheckNextSpeaker.mockResolvedValue({
next_speaker: 'model', next_speaker: 'model',
@@ -2791,9 +2789,8 @@ ${JSON.stringify(
it('should not call checkNextSpeaker when turn.run() yields an error', async () => { it('should not call checkNextSpeaker when turn.run() yields an error', async () => {
// Arrange // Arrange
const { checkNextSpeaker } = await import( const { checkNextSpeaker } =
'../utils/nextSpeakerChecker.js' await import('../utils/nextSpeakerChecker.js');
);
const mockCheckNextSpeaker = vi.mocked(checkNextSpeaker); const mockCheckNextSpeaker = vi.mocked(checkNextSpeaker);
const mockStream = (async function* () { const mockStream = (async function* () {
@@ -2828,9 +2825,8 @@ ${JSON.stringify(
it('should not call checkNextSpeaker when turn.run() yields a value then an error', async () => { it('should not call checkNextSpeaker when turn.run() yields a value then an error', async () => {
// Arrange // Arrange
const { checkNextSpeaker } = await import( const { checkNextSpeaker } =
'../utils/nextSpeakerChecker.js' await import('../utils/nextSpeakerChecker.js');
);
const mockCheckNextSpeaker = vi.mocked(checkNextSpeaker); const mockCheckNextSpeaker = vi.mocked(checkNextSpeaker);
const mockStream = (async function* () { const mockStream = (async function* () {
@@ -2995,9 +2991,8 @@ ${JSON.stringify(
}); });
it('should fire BeforeAgent once and AfterAgent once even with recursion', async () => { it('should fire BeforeAgent once and AfterAgent once even with recursion', async () => {
const { checkNextSpeaker } = await import( const { checkNextSpeaker } =
'../utils/nextSpeakerChecker.js' await import('../utils/nextSpeakerChecker.js');
);
vi.mocked(checkNextSpeaker) vi.mocked(checkNextSpeaker)
.mockResolvedValueOnce({ next_speaker: 'model', reasoning: 'more' }) .mockResolvedValueOnce({ next_speaker: 'model', reasoning: 'more' })
.mockResolvedValueOnce(null); .mockResolvedValueOnce(null);
@@ -3035,9 +3030,8 @@ ${JSON.stringify(
}); });
it('should use original request in AfterAgent hook even when continuation happened', async () => { it('should use original request in AfterAgent hook even when continuation happened', async () => {
const { checkNextSpeaker } = await import( const { checkNextSpeaker } =
'../utils/nextSpeakerChecker.js' await import('../utils/nextSpeakerChecker.js');
);
vi.mocked(checkNextSpeaker) vi.mocked(checkNextSpeaker)
.mockResolvedValueOnce({ next_speaker: 'model', reasoning: 'more' }) .mockResolvedValueOnce({ next_speaker: 'model', reasoning: 'more' })
.mockResolvedValueOnce(null); .mockResolvedValueOnce(null);
@@ -27,9 +27,8 @@ export class HybridTokenStorage extends BaseTokenStorage {
if (!forceFileStorage) { if (!forceFileStorage) {
try { try {
const { KeychainTokenStorage } = await import( const { KeychainTokenStorage } =
'./keychain-token-storage.js' await import('./keychain-token-storage.js');
);
const keychainStorage = new KeychainTokenStorage(this.serviceName); const keychainStorage = new KeychainTokenStorage(this.serviceName);
const isAvailable = await keychainStorage.isAvailable(); const isAvailable = await keychainStorage.isAvailable();
@@ -49,9 +49,8 @@ describe('KeychainTokenStorage', () => {
vi.resetAllMocks(); vi.resetAllMocks();
// Reset the internal state of the keychain-token-storage module // Reset the internal state of the keychain-token-storage module
vi.resetModules(); vi.resetModules();
const { KeychainTokenStorage } = await import( const { KeychainTokenStorage } =
'./keychain-token-storage.js' await import('./keychain-token-storage.js');
);
storage = new KeychainTokenStorage(mockServiceName); storage = new KeychainTokenStorage(mockServiceName);
}); });
+6 -9
View File
@@ -497,9 +497,8 @@ describe('createPolicyEngineConfig', () => {
stat: mockStat, stat: mockStat,
})); }));
vi.resetModules(); vi.resetModules();
const { createPolicyEngineConfig: createConfig } = await import( const { createPolicyEngineConfig: createConfig } =
'./config.js' await import('./config.js');
);
const config = await createConfig( const config = await createConfig(
settings, settings,
@@ -580,9 +579,8 @@ describe('createPolicyEngineConfig', () => {
it('should have YOLO allow-all rule beat write tool rules in YOLO mode', async () => { it('should have YOLO allow-all rule beat write tool rules in YOLO mode', async () => {
vi.resetModules(); vi.resetModules();
vi.doUnmock('node:fs/promises'); vi.doUnmock('node:fs/promises');
const { createPolicyEngineConfig: createConfig } = await import( const { createPolicyEngineConfig: createConfig } =
'./config.js' await import('./config.js');
);
// Re-mock Storage after resetModules because it was reloaded // Re-mock Storage after resetModules because it was reloaded
const { Storage: FreshStorage } = await import('../config/storage.js'); const { Storage: FreshStorage } = await import('../config/storage.js');
vi.spyOn(FreshStorage, 'getUserPoliciesDir').mockReturnValue( vi.spyOn(FreshStorage, 'getUserPoliciesDir').mockReturnValue(
@@ -988,9 +986,8 @@ name = "invalid-name"
it('should have default ASK_USER rule for discovered tools', async () => { it('should have default ASK_USER rule for discovered tools', async () => {
vi.resetModules(); vi.resetModules();
vi.doUnmock('node:fs/promises'); vi.doUnmock('node:fs/promises');
const { createPolicyEngineConfig: createConfig } = await import( const { createPolicyEngineConfig: createConfig } =
'./config.js' await import('./config.js');
);
// Re-mock Storage after resetModules because it was reloaded // Re-mock Storage after resetModules because it was reloaded
const { Storage: FreshStorage } = await import('../config/storage.js'); const { Storage: FreshStorage } = await import('../config/storage.js');
vi.spyOn(FreshStorage, 'getUserPoliciesDir').mockReturnValue( vi.spyOn(FreshStorage, 'getUserPoliciesDir').mockReturnValue(
@@ -66,9 +66,8 @@ describe('sessionSummaryUtils', () => {
mockGenerateSummary = vi.fn().mockResolvedValue('Add dark mode to the app'); mockGenerateSummary = vi.fn().mockResolvedValue('Add dark mode to the app');
// Import the mocked module to access the constructor // Import the mocked module to access the constructor
const { SessionSummaryService } = await import( const { SessionSummaryService } =
'./sessionSummaryService.js' await import('./sessionSummaryService.js');
);
( (
SessionSummaryService as unknown as ReturnType<typeof vi.fn> SessionSummaryService as unknown as ReturnType<typeof vi.fn>
).mockImplementation(() => ({ ).mockImplementation(() => ({
@@ -1475,9 +1475,8 @@ describe('ShellExecutionService environment variables', () => {
vi.stubEnv('GEMINI_CLI_TEST_VAR', 'test-value'); // A test var that should be kept vi.stubEnv('GEMINI_CLI_TEST_VAR', 'test-value'); // A test var that should be kept
vi.resetModules(); vi.resetModules();
const { ShellExecutionService } = await import( const { ShellExecutionService } =
'./shellExecutionService.js' await import('./shellExecutionService.js');
);
// Test pty path // Test pty path
await ShellExecutionService.execute( await ShellExecutionService.execute(
@@ -1534,9 +1533,8 @@ describe('ShellExecutionService environment variables', () => {
vi.stubEnv('GEMINI_CLI_TEST_VAR', 'test-value'); // A test var that should be kept vi.stubEnv('GEMINI_CLI_TEST_VAR', 'test-value'); // A test var that should be kept
vi.resetModules(); vi.resetModules();
const { ShellExecutionService } = await import( const { ShellExecutionService } =
'./shellExecutionService.js' await import('./shellExecutionService.js');
);
// Test pty path // Test pty path
await ShellExecutionService.execute( await ShellExecutionService.execute(
@@ -1590,9 +1588,8 @@ describe('ShellExecutionService environment variables', () => {
vi.stubEnv('GITHUB_SHA', ''); vi.stubEnv('GITHUB_SHA', '');
vi.stubEnv('SURFACE', ''); vi.stubEnv('SURFACE', '');
vi.resetModules(); vi.resetModules();
const { ShellExecutionService } = await import( const { ShellExecutionService } =
'./shellExecutionService.js' await import('./shellExecutionService.js');
);
// Test pty path // Test pty path
await ShellExecutionService.execute( await ShellExecutionService.execute(
+3 -2
View File
@@ -22,8 +22,9 @@ import { debugLogger } from '../utils/debugLogger.js';
/** /**
* A declarative tool that supports a modify operation. * A declarative tool that supports a modify operation.
*/ */
export interface ModifiableDeclarativeTool<TParams extends object> export interface ModifiableDeclarativeTool<
extends DeclarativeTool<TParams, ToolResult> { TParams extends object,
> extends DeclarativeTool<TParams, ToolResult> {
getModifyContext(abortSignal: AbortSignal): ModifyContext<TParams>; getModifyContext(abortSignal: AbortSignal): ModifyContext<TParams>;
} }
+2 -4
View File
@@ -83,8 +83,7 @@ export interface PolicyUpdateOptions {
export abstract class BaseToolInvocation< export abstract class BaseToolInvocation<
TParams extends object, TParams extends object,
TResult extends ToolResult, TResult extends ToolResult,
> implements ToolInvocation<TParams, TResult> > implements ToolInvocation<TParams, TResult> {
{
constructor( constructor(
readonly params: TParams, readonly params: TParams,
protected readonly messageBus: MessageBus, protected readonly messageBus: MessageBus,
@@ -353,8 +352,7 @@ export interface ToolBuilder<
export abstract class DeclarativeTool< export abstract class DeclarativeTool<
TParams extends object, TParams extends object,
TResult extends ToolResult, TResult extends ToolResult,
> implements ToolBuilder<TParams, TResult> > implements ToolBuilder<TParams, TResult> {
{
constructor( constructor(
readonly name: string, readonly name: string,
readonly displayName: string, readonly displayName: string,
+2 -1
View File
@@ -916,7 +916,8 @@ describe('WriteFileTool', () => {
const content = 'test content'; const content = 'test content';
let existsSyncSpy: // eslint-disable-next-line @typescript-eslint/no-explicit-any let existsSyncSpy: // eslint-disable-next-line @typescript-eslint/no-explicit-any
ReturnType<typeof vi.spyOn<any, 'existsSync'>> | undefined = undefined; ReturnType<typeof vi.spyOn<any, 'existsSync'>> | undefined =
undefined;
try { try {
if (mockFsExistsSync) { if (mockFsExistsSync) {
+10 -8
View File
@@ -5,7 +5,7 @@
*/ */
import React, { useState, useEffect, useRef, useMemo } from 'react'; import React, { useState, useEffect, useRef, useMemo } from 'react';
import { useDevToolsData, type ConsoleLog, type NetworkLog } from './hooks'; import { useDevToolsData, type ConsoleLog, type NetworkLog } from './hooks.js';
type ThemeMode = 'light' | 'dark' | null; // null means follow system type ThemeMode = 'light' | 'dark' | null; // null means follow system
@@ -115,7 +115,6 @@ export default function App() {
if (!networkMap.has(id)) { if (!networkMap.has(id)) {
networkMap.set(id, { networkMap.set(id, {
...payload, ...payload,
type,
timestamp, timestamp,
id, id,
} as NetworkLog); } as NetworkLog);
@@ -125,8 +124,7 @@ export default function App() {
networkMap.set(id, { networkMap.set(id, {
...existing, ...existing,
...payload, ...payload,
// Ensure we don't overwrite the original timestamp or type // Ensure we don't overwrite the original timestamp
type: existing.type,
timestamp: existing.timestamp, timestamp: existing.timestamp,
} as NetworkLog); } as NetworkLog);
} }
@@ -158,7 +156,7 @@ export default function App() {
const entries: Array<{ timestamp: number; data: object }> = []; const entries: Array<{ timestamp: number; data: object }> = [];
// Export console logs // Export console logs
filteredConsoleLogs.forEach((log) => { filteredConsoleLogs.forEach((log: ConsoleLog) => {
entries.push({ entries.push({
timestamp: log.timestamp, timestamp: log.timestamp,
data: { data: {
@@ -171,7 +169,7 @@ export default function App() {
}); });
// Export network logs // Export network logs
filteredNetworkLogs.forEach((log) => { filteredNetworkLogs.forEach((log: NetworkLog) => {
entries.push({ entries.push({
timestamp: log.timestamp, timestamp: log.timestamp,
data: { data: {
@@ -230,7 +228,9 @@ export default function App() {
if (selectedSessionId === importedSessionId && importedLogs) { if (selectedSessionId === importedSessionId && importedLogs) {
return importedLogs.console; return importedLogs.console;
} }
return consoleLogs.filter((l) => l.sessionId === selectedSessionId); return consoleLogs.filter(
(l: ConsoleLog) => l.sessionId === selectedSessionId,
);
}, [consoleLogs, selectedSessionId, importedSessionId, importedLogs]); }, [consoleLogs, selectedSessionId, importedSessionId, importedLogs]);
const filteredNetworkLogs = useMemo(() => { const filteredNetworkLogs = useMemo(() => {
@@ -238,7 +238,9 @@ export default function App() {
if (selectedSessionId === importedSessionId && importedLogs) { if (selectedSessionId === importedSessionId && importedLogs) {
return importedLogs.network; return importedLogs.network;
} }
return networkLogs.filter((l) => l.sessionId === selectedSessionId); return networkLogs.filter(
(l: NetworkLog) => l.sessionId === selectedSessionId,
);
}, [networkLogs, selectedSessionId, importedSessionId, importedLogs]); }, [networkLogs, selectedSessionId, importedSessionId, importedLogs]);
return ( return (
+1 -1
View File
@@ -6,7 +6,7 @@
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom/client'; import ReactDOM from 'react-dom/client';
import App from './App'; import App from './App.js';
ReactDOM.createRoot(document.getElementById('root')!).render( ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode> <React.StrictMode>
+1 -1
View File
@@ -12,7 +12,7 @@
} }
}, },
"scripts": { "scripts": {
"build": "npm run build:client && tsc -p tsconfig.build.json", "build": "npm run build:client && tsc -p tsconfig.json",
"build:client": "node esbuild.client.js" "build:client": "node esbuild.client.js"
}, },
"files": [ "files": [
+4 -2
View File
@@ -3,8 +3,10 @@
"compilerOptions": { "compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2023"], "lib": ["DOM", "DOM.Iterable", "ES2023"],
"jsx": "react-jsx", "jsx": "react-jsx",
"allowImportingTsExtensions": true, "skipLibCheck": true,
"noEmit": true "composite": true,
"noEmit": false,
"outDir": "dist"
}, },
"include": ["src", "client/src"] "include": ["src", "client/src"]
} }
+87 -66
View File
@@ -31,15 +31,15 @@ SOFTWARE.
@hono/node-server@1.19.9 @hono/node-server@1.19.9
(https://github.com/honojs/node-server.git) (https://github.com/honojs/node-server.git)
License text not found. License: MIT
============================================================ ============================================================
ajv@6.12.6 ajv@8.18.0
(https://github.com/ajv-validator/ajv.git) (No repository found)
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2015-2017 Evgeny Poberezkin Copyright (c) 2015-2021 Evgeny Poberezkin
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
@@ -89,34 +89,44 @@ SOFTWARE.
============================================================ ============================================================
fast-json-stable-stringify@2.1.0 fast-uri@3.1.0
(git://github.com/epoberezkin/fast-json-stable-stringify.git) (git+https://github.com/fastify/fast-uri.git)
This software is released under the MIT license: Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae
Copyright (c) 2021-present The Fastify team
All rights reserved.
Copyright (c) 2017 Evgeny Poberezkin The Fastify team members are listed at https://github.com/fastify/fastify#team.
Copyright (c) 2013 James Halliday
Permission is hereby granted, free of charge, to any person obtaining a copy of Redistribution and use in source and binary forms, with or without
this software and associated documentation files (the "Software"), to deal in modification, are permitted provided that the following conditions are met:
the Software without restriction, including without limitation the rights to * Redistributions of source code must retain the above copyright
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of notice, this list of conditions and the following disclaimer.
the Software, and to permit persons to whom the Software is furnished to do so, * Redistributions in binary form must reproduce the above copyright
subject to the following conditions: notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* The names of any contributors may not be used to endorse or promote
products derived from this software without specific prior written
permission.
The above copyright notice and this permission notice shall be included in all THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
copies or substantial portions of the Software. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * * *
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The complete list of contributors can be found at:
- https://github.com/garycourt/uri-js/graphs/contributors
============================================================ ============================================================
json-schema-traverse@0.4.1 json-schema-traverse@1.0.0
(git+https://github.com/epoberezkin/json-schema-traverse.git) (git+https://github.com/epoberezkin/json-schema-traverse.git)
MIT License MIT License
@@ -143,46 +153,30 @@ SOFTWARE.
============================================================ ============================================================
uri-js@4.4.1 require-from-string@2.0.2
(http://github.com/garycourt/uri-js) (No repository found)
Copyright 2011 Gary Court. All rights reserved. The MIT License (MIT)
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Copyright (c) Vsevolod Strukchinsky <floatdrop@gmail.com> (github.com/floatdrop)
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THIS SOFTWARE IS PROVIDED BY GARY COURT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Gary Court. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
============================================================ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
punycode@2.3.1 THE SOFTWARE.
(https://github.com/mathiasbynens/punycode.js.git)
Copyright Mathias Bynens <https://mathiasbynens.be/>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
============================================================ ============================================================
@@ -241,7 +235,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
============================================================ ============================================================
cors@2.8.5 cors@2.8.6
(No repository found) (No repository found)
(The MIT License) (The MIT License)
@@ -466,7 +460,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
============================================================ ============================================================
eventsource-parser@3.0.3 eventsource-parser@3.0.6
(git+ssh://git@github.com/rexxars/eventsource-parser.git) (git+ssh://git@github.com/rexxars/eventsource-parser.git)
MIT License MIT License
@@ -905,8 +899,8 @@ SOFTWARE.
============================================================ ============================================================
iconv-lite@0.6.3 iconv-lite@0.7.2
(git://github.com/ashtuchkin/iconv-lite.git) (https://github.com/pillarjs/iconv-lite.git)
Copyright (c) 2011 Alexander Shtuchkin Copyright (c) 2011 Alexander Shtuchkin
@@ -1016,7 +1010,7 @@ THE SOFTWARE.
============================================================ ============================================================
qs@6.14.2 qs@6.15.0
(https://github.com/ljharb/qs.git) (https://github.com/ljharb/qs.git)
BSD 3-Clause License BSD 3-Clause License
@@ -2129,6 +2123,33 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
============================================================
path-to-regexp@6.3.0
(https://github.com/pillarjs/path-to-regexp.git)
The MIT License (MIT)
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
============================================================ ============================================================
send@1.2.1 send@1.2.1
(No repository found) (No repository found)
@@ -2241,7 +2262,7 @@ THE SOFTWARE.
============================================================ ============================================================
hono@4.11.9 hono@4.12.0
(git+https://github.com/honojs/hono.git) (git+https://github.com/honojs/hono.git)
MIT License MIT License
@@ -2358,7 +2379,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
============================================================ ============================================================
pkce-challenge@5.0.0 pkce-challenge@5.0.1
(git+https://github.com/crouchcd/pkce-challenge.git) (git+https://github.com/crouchcd/pkce-challenge.git)
MIT License MIT License
@@ -78,6 +78,8 @@ async function getDependencyLicense(depName, depVersion) {
`Warning: Failed to read license file for ${depName}: ${e.message}`, `Warning: Failed to read license file for ${depName}: ${e.message}`,
); );
} }
} else if (depPackageJson.license) {
licenseContent = `License: ${depPackageJson.license}`;
} else { } else {
console.warn(`Warning: Could not find license file for ${depName}`); console.warn(`Warning: Could not find license file for ${depName}`);
} }
+10
View File
@@ -22,6 +22,16 @@ import { existsSync } from 'node:fs';
import { dirname, join } from 'node:path'; import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url'; import { fileURLToPath } from 'node:url';
// Increase memory limit for all subprocesses (tsc, etc) to prevent OOM in CI.
if (
!process.env.NODE_OPTIONS ||
!process.env.NODE_OPTIONS.includes('max-old-space-size')
) {
process.env.NODE_OPTIONS = `${
process.env.NODE_OPTIONS || ''
} --max-old-space-size=8192`.trim();
}
const __dirname = dirname(fileURLToPath(import.meta.url)); const __dirname = dirname(fileURLToPath(import.meta.url));
const root = join(__dirname, '..'); const root = join(__dirname, '..');
+6
View File
@@ -124,6 +124,12 @@ const LINTERS = {
function runCommand(command, stdio = 'inherit') { function runCommand(command, stdio = 'inherit') {
try { try {
const env = { ...process.env }; const env = { ...process.env };
// Increase memory limit for all subprocesses (ESLint, etc) to prevent OOM in CI.
if (!env.NODE_OPTIONS || !env.NODE_OPTIONS.includes('max-old-space-size')) {
env.NODE_OPTIONS = `${
env.NODE_OPTIONS || ''
} --max-old-space-size=8192`.trim();
}
const nodeBin = join(process.cwd(), 'node_modules', '.bin'); const nodeBin = join(process.cwd(), 'node_modules', '.bin');
env.PATH = `${nodeBin}:${TEMP_DIR}/actionlint:${TEMP_DIR}/shellcheck:${PYTHON_VENV_PATH}/bin:${env.PATH}`; env.PATH = `${nodeBin}:${TEMP_DIR}/actionlint:${TEMP_DIR}/shellcheck:${PYTHON_VENV_PATH}/bin:${env.PATH}`;
execSync(command, { stdio, env }); execSync(command, { stdio, env });