Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agents/agent-mastra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@eslint/compat": "^1.4.0",
"@eslint/js": "^9.38.0",
"@stylistic/eslint-plugin": "^5.5.0",
"@types/node": "^24.9.1",
"@types/node": "^24.9.2",
"eslint": "^9.38.0",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
Expand Down
2 changes: 1 addition & 1 deletion agents/agent-voltagent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"zod": "3.24.2"
},
"devDependencies": {
"@types/node": "^22.18.12",
"@types/node": "^22.18.13",
"tsx": "^4.20.6",
"typescript": "^5.9.3"
}
Expand Down
2 changes: 1 addition & 1 deletion basic/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@solidjs/router": "^0.15.3",
"@stylistic/eslint-plugin": "^5.5.0",
"@types/crypto-js": "^4.2.2",
"@types/node": "^22.18.12",
"@types/node": "^22.18.13",
"@types/uuid": "^10.0.0",
"crypto-js": "^4.2.0",
"eslint": "^9.38.0",
Expand Down
2 changes: 1 addition & 1 deletion basic/cdk/bin/cdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as cdk from 'aws-cdk-lib';
import {
CloudfrontCdnTemplateStack,
Config,
} from '../lib/cdk-stack';
} from '../lib/cdk-stack.js';
Comment thread
poad marked this conversation as resolved.

const app = new cdk.App();

Expand Down
2 changes: 1 addition & 1 deletion basic/cdk/lambda/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { APIGatewayProxyEvent } from 'aws-lambda';
import { handle } from './handler';
import { v7 as uuidv7 } from 'uuid';
import { handle } from './handler.js';

import { logger } from '@llm-ts-example/common-backend';

Expand Down
2 changes: 1 addition & 1 deletion basic/cdk/lib/cdk-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import * as lambda from 'aws-cdk-lib/aws-lambda';
import * as nodejs from 'aws-cdk-lib/aws-lambda-nodejs';
import * as awslogs from 'aws-cdk-lib/aws-logs';
import * as iam from 'aws-cdk-lib/aws-iam';
import { buildCommon, buildFrontend } from './process/setup';
import * as deployment from 'aws-cdk-lib/aws-s3-deployment';
import { buildCommon, buildFrontend } from './process/setup.js';

export interface Config extends cdk.StackProps {
bucketName: string;
Expand Down
10 changes: 5 additions & 5 deletions basic/cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"@eslint/core": "^0.16.0",
"@eslint/js": "^9.38.0",
"@stylistic/eslint-plugin": "^5.5.0",
"@types/aws-lambda": "^8.10.156",
"@types/node": "^24.9.1",
"@types/aws-lambda": "^8.10.157",
"@types/node": "^24.9.2",
"@vitest/eslint-plugin": "^1.3.26",
"aws-cdk": "^2.1031.0",
"dotenv": "^16.6.1",
Expand All @@ -42,9 +42,9 @@
"@aws-sdk/credential-provider-node": "^3.918.0",
"@langchain/anthropic": "^1.0.0",
"@langchain/aws": "^1.0.0",
"@langchain/classic": "^1.0.1",
"@langchain/core": "^1.0.2",
"@langchain/langgraph": "^1.0.1",
"@langchain/classic": "1.0.0",
"@langchain/core": "1.0.0",
"@langchain/langgraph": "1.0.0",
Comment thread
poad marked this conversation as resolved.
"@langchain/openai": "^1.0.0",
"@llm-ts-example/common-backend": "workspace:*",
"@opentelemetry/api": "^1.9.0",
Expand Down
2 changes: 1 addition & 1 deletion basic/cdk/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { test } from 'vitest';
import { handle } from '../lambda/handler';
import { stdout } from 'node:process';
import { PassThrough } from 'node:stream';
import { handle } from '../lambda/handler.js';

function sleep(time: number) {
return new Promise<void>((resolve) => {
Expand Down
4 changes: 2 additions & 2 deletions basic/cdk/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"module": "nodenext",
"lib": [
"esnext",
"dom"
],
"moduleResolution": "bundler",
"moduleResolution": "nodenext",
Comment thread
poad marked this conversation as resolved.
"moduleDetection": "force",
"resolveJsonModule": true,
"allowJs": true,
Expand Down
10 changes: 10 additions & 0 deletions common/backend/eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ export default defineConfig(
'@stylistic': stylistic,
},
extends: [importPlugin.flatConfigs.recommended, importPlugin.flatConfigs.typescript],
settings: {
'import/resolver': {
// You will also need to install and configure the TypeScript resolver
// See also https://github.com/import-js/eslint-import-resolver-typescript#configuration
'typescript': {
alwaysTryTypes: true,
},
'node': true,
},
},
Comment thread
poad marked this conversation as resolved.
rules: {
'@stylistic/semi': ['error', 'always'],
'@stylistic/indent': ['error', 2],
Expand Down
4 changes: 2 additions & 2 deletions common/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
"dependencies": {
"@aws-lambda-powertools/logger": "^2.28.1",
"@langchain/aws": "^1.0.0",
"@langchain/core": "^1.0.2",
"@langchain/core": "1.0.0",
"@langchain/openai": "^1.0.0",
"@llm-ts-example/common-core": "workspace:*"
},
"devDependencies": {
"@eslint/compat": "^1.4.0",
"@eslint/js": "^9.38.0",
"@stylistic/eslint-plugin": "^5.5.0",
"@types/node": "^24.9.1",
"@types/node": "^24.9.2",
"@vitest/eslint-plugin": "^1.3.26",
"eslint": "^9.38.0",
"eslint-import-resolver-typescript": "^4.4.4",
Expand Down
5 changes: 2 additions & 3 deletions common/backend/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logger from './logger';
import selectLlm from './langchain';
import { logger } from './logger';
import { selectLlm } from './langchain';

export default { logger, selectLlm };
export { logger, selectLlm };
11 changes: 7 additions & 4 deletions common/backend/src/langchain.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { AzureChatOpenAI } from '@langchain/openai';
import { ChatBedrockConverse } from '@langchain/aws';
import { BaseChatModel } from '@langchain/core/dist/language_models/chat_models';
import logger from './logger';
import { logger } from './logger';
// eslint-disable-next-line import/no-unresolved
import { LanguageModelLike } from '@langchain/core/language_models/base';
// eslint-disable-next-line import/no-unresolved
import { BaseChatModel } from '@langchain/core/language_models/chat_models';
Comment thread
poad marked this conversation as resolved.

import { models } from '@llm-ts-example/common-core';

function selectLlm(modelType?: string): {
export function selectLlm(modelType?: string): {
platform: 'aws' | 'azure';
modelName: string;
model: BaseChatModel;
model: LanguageModelLike & BaseChatModel;
} {
const model = models.find((model) => model.id === modelType);
if (!model) {
Expand Down
2 changes: 1 addition & 1 deletion common/backend/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class LocalLogFormatter extends LogFormatter {
}
}

const logger = new Logger({
export const logger = new Logger({
logFormatter: new LocalLogFormatter(),
});

Expand Down
2 changes: 1 addition & 1 deletion common/backend/tsconfig-eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"exclude": [
"node_modules",
"cdk.out",
"eslint.config.js",
"eslint.config.*",
"vite.config.ts",
"dist"
]
Expand Down
4 changes: 1 addition & 3 deletions common/backend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"dom"
],
"moduleResolution": "bundler",
"moduleDetection": "force",
"resolveJsonModule": true,
"allowJs": true,
"esModuleInterop": true,
Expand Down Expand Up @@ -37,8 +36,7 @@
],
"types": [
"node"
],
"composite": true
]
},
"exclude": [
"node_modules",
Expand Down
18 changes: 17 additions & 1 deletion common/core/eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import eslint from '@eslint/js';
import stylistic from '@stylistic/eslint-plugin';
import { configs, parser } from 'typescript-eslint';
import importPlugin from 'eslint-plugin-import';
import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript';

// @ts-expect-error 型エラーの不具合が修正されるまで
import pluginPromise from 'eslint-plugin-promise'
Expand Down Expand Up @@ -42,13 +43,28 @@ export default defineConfig(
sourceType: 'module',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig-eslint.json'],
project: ['./tsconfig.json', './tsconfig-eslint.json'],
},
},
plugins: {
'@stylistic': stylistic,
},
extends: [importPlugin.flatConfigs.recommended, importPlugin.flatConfigs.typescript],
settings: {
'import/resolver': {
// You will also need to install and configure the TypeScript resolver
// See also https://github.com/import-js/eslint-import-resolver-typescript#configuration
'typescript': {
alwaysTryTypes: true,
},
'node': true,
},
'import-x/resolver-next': [
createTypeScriptImportResolver({
alwaysTryTypes: true,
}),
],
},
rules: {
'@stylistic/semi': ['error', 'always'],
'@stylistic/indent': ['error', 2],
Expand Down
3 changes: 2 additions & 1 deletion common/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@
"@eslint/compat": "^1.4.0",
"@eslint/js": "^9.38.0",
"@stylistic/eslint-plugin": "^5.5.0",
"@types/node": "^22.18.12",
"@types/node": "^22.18.13",
"@vitest/eslint-plugin": "^1.3.26",
"aws-cdk": "^2.1031.0",
"eslint": "^9.38.0",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-import-x": "^4.16.1",
"eslint-plugin-promise": "^7.2.1",
"typescript": "^5.9.3",
"typescript-eslint": "^8.46.2"
Expand Down
3 changes: 2 additions & 1 deletion common/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { models } from './constants';
// eslint-disable-next-line import/no-unresolved
import { models } from './constants.js';

export { models };
5 changes: 2 additions & 3 deletions common/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"module": "nodenext",
"lib": [
"esnext",
"dom"
],
"moduleResolution": "bundler",
"moduleDetection": "force",
"moduleResolution": "nodenext",
"resolveJsonModule": true,
"allowJs": true,
"esModuleInterop": true,
Expand Down
4 changes: 2 additions & 2 deletions mcp/clients/langgraph-mcp-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"@eslint/compat": "^1.4.0",
"@eslint/js": "^9.38.0",
"@stylistic/eslint-plugin": "^5.5.0",
"@types/aws-lambda": "^8.10.156",
"@types/node": "^24.9.1",
"@types/aws-lambda": "^8.10.157",
"@types/node": "^24.9.2",
"@types/source-map-support": "^0.5.10",
"@types/uuid": "^10.0.0",
"@vitest/eslint-plugin": "^1.3.26",
Expand Down
2 changes: 1 addition & 1 deletion mcp/clients/mastra-mcp-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@eslint/compat": "^1.4.0",
"@eslint/js": "^9.38.0",
"@stylistic/eslint-plugin": "^5.5.0",
"@types/node": "^24.9.1",
"@types/node": "^24.9.2",
"eslint": "^9.38.0",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
Expand Down
2 changes: 1 addition & 1 deletion mcp/clients/mcp-client-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@eslint/compat": "^1.4.0",
"@eslint/js": "^9.38.0",
"@stylistic/eslint-plugin": "^5.5.0",
"@types/node": "^22.18.12",
"@types/node": "^22.18.13",
"eslint": "^9.38.0",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
Expand Down
2 changes: 1 addition & 1 deletion mcp/clients/mcp-client-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@eslint/compat": "^1.4.0",
"@eslint/js": "^9.38.0",
"@stylistic/eslint-plugin": "^5.5.0",
"@types/node": "^22.18.12",
"@types/node": "^22.18.13",
"eslint": "^9.38.0",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
Expand Down
4 changes: 2 additions & 2 deletions mcp/servers/postgresql-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"@eslint/compat": "^1.4.0",
"@eslint/js": "^9.38.0",
"@stylistic/eslint-plugin": "^5.5.0",
"@types/aws-lambda": "^8.10.156",
"@types/node": "^22.18.12",
"@types/aws-lambda": "^8.10.157",
"@types/node": "^22.18.13",
"@types/pg": "^8.15.6",
"@types/source-map-support": "^0.5.10",
"@vitest/eslint-plugin": "^1.3.26",
Expand Down
2 changes: 1 addition & 1 deletion mcp/servers/resource-mcp-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@eslint/js": "^9.38.0",
"@stylistic/eslint-plugin": "^5.5.0",
"@types/express": "^5.0.5",
"@types/node": "^22.18.12",
"@types/node": "^22.18.13",
"eslint": "^9.38.0",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
Expand Down
2 changes: 1 addition & 1 deletion mcp/servers/weather-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@eslint/js": "^9.38.0",
"@stylistic/eslint-plugin": "^5.5.0",
"@types/express": "^5.0.5",
"@types/node": "^22.18.12",
"@types/node": "^22.18.13",
"eslint": "^9.38.0",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
Expand Down
2 changes: 1 addition & 1 deletion mcp/servers/weather/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@eslint/compat": "^1.4.0",
"@eslint/js": "^9.38.0",
"@stylistic/eslint-plugin": "^5.5.0",
"@types/node": "^22.18.12",
"@types/node": "^22.18.13",
"eslint": "^9.38.0",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"devDependencies": {
"@llm-ts-example/common-backend": "workspace:*",
"@llm-ts-example/common-core": "workspace:*",
"pnpm": "^10.19.0",
"pnpm": "^10.20.0",
"vitest": "^3.2.4"
}
}
Loading