diff --git a/apps/auth/.codespellignore b/apps/auth/.codespellignore new file mode 100644 index 00000000..e69de29b diff --git a/apps/auth/.dockerignore b/apps/auth/.dockerignore new file mode 100644 index 00000000..d97359f1 --- /dev/null +++ b/apps/auth/.dockerignore @@ -0,0 +1,4 @@ +node_modules +.next +.git +.env \ No newline at end of file diff --git a/apps/auth/.gitignore b/apps/auth/.gitignore new file mode 100644 index 00000000..494dcfd9 --- /dev/null +++ b/apps/auth/.gitignore @@ -0,0 +1,28 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? + +# LangGraph API +.langgraph_api +.env \ No newline at end of file diff --git a/apps/auth/.prettierrc b/apps/auth/.prettierrc new file mode 100644 index 00000000..222861c3 --- /dev/null +++ b/apps/auth/.prettierrc @@ -0,0 +1,4 @@ +{ + "tabWidth": 2, + "useTabs": false +} diff --git a/apps/auth/eslint.config.js b/apps/auth/eslint.config.js new file mode 100644 index 00000000..28e5f3a3 --- /dev/null +++ b/apps/auth/eslint.config.js @@ -0,0 +1,28 @@ +import js from "@eslint/js"; +import globals from "globals"; +import tseslint from "typescript-eslint"; + +export default tseslint.config( + { ignores: ["dist"] }, + { + extends: [js.configs.recommended, ...tseslint.configs.recommended], + files: ["**/*.{ts,tsx}"], + languageOptions: { + ecmaVersion: 2020, + globals: globals.node, + }, + rules: { + "@typescript-eslint/no-explicit-any": 0, + "@typescript-eslint/no-unused-vars": [ + "error", + { + args: "none", + argsIgnorePattern: "^_", + varsIgnorePattern: "^_", + caughtErrorsIgnorePattern: "^_", + }, + ], + "no-console": ["error"], + }, + }, +); diff --git a/apps/auth/jest.config.js b/apps/auth/jest.config.js new file mode 100644 index 00000000..9e893743 --- /dev/null +++ b/apps/auth/jest.config.js @@ -0,0 +1,18 @@ +export default { + preset: "ts-jest/presets/default-esm", + moduleNameMapper: { + "^(\\.{1,2}/.*)\\.js$": "$1", + }, + transform: { + "^.+\\.tsx?$": [ + "ts-jest", + { + useESM: true, + }, + ], + }, + extensionsToTreatAsEsm: [".ts"], + setupFiles: ["dotenv/config"], + passWithNoTests: true, + testTimeout: 20_000, +}; diff --git a/apps/auth/package.json b/apps/auth/package.json new file mode 100644 index 00000000..0465b5f8 --- /dev/null +++ b/apps/auth/package.json @@ -0,0 +1,41 @@ +{ + "name": "@open-swe/auth", + "homepage": "https://github.com/langchain-ai/open-swe/blob/main/README.md", + "repository": { + "type": "git", + "url": "https://github.com/langchain-ai/open-swe.git" + }, + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "build": "tsc", + "lint": "eslint .", + "lint:fix": "eslint . --fix", + "format": "prettier --write .", + "format:check": "prettier --check .", + "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --testPathPattern=\\.test\\.ts$ --testPathIgnorePatterns=\\.int\\.test\\.ts$", + "test:int": "node --experimental-vm-modules node_modules/jest/bin/jest.js --testPathPattern=\\.int\\.test\\.ts$", + "test:single": "NODE_OPTIONS=--experimental-vm-modules yarn run jest --config jest.config.js --testTimeout 100000" + }, + "devDependencies": { + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "^9.19.0", + "@jest/globals": "^29.7.0", + "@tsconfig/recommended": "^1.0.8", + "@types/jest": "^29.5.0", + "@types/node": "^22.13.5", + "dotenv": "^16.4.7", + "eslint": "^9.19.0", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-import": "^2.27.5", + "eslint-plugin-no-instanceof": "^1.0.1", + "eslint-plugin-prettier": "^4.2.1", + "jest": "^29.7.0", + "prettier": "^3.5.2", + "ts-jest": "^29.1.0", + "typescript": "~5.7.2", + "typescript-eslint": "^8.22.0" + }, + "packageManager": "yarn@3.5.1" +} diff --git a/apps/auth/src/index.ts b/apps/auth/src/index.ts new file mode 100644 index 00000000..e69de29b diff --git a/apps/auth/tsconfig.json b/apps/auth/tsconfig.json new file mode 100644 index 00000000..6781640c --- /dev/null +++ b/apps/auth/tsconfig.json @@ -0,0 +1,25 @@ +{ + "extends": "@tsconfig/recommended", + "compilerOptions": { + "target": "ES2021", + "lib": ["ES2021", "ES2022.Object", "DOM"], + "module": "NodeNext", + "moduleResolution": "nodenext", + "esModuleInterop": true, + "noImplicitReturns": true, + "declaration": true, + "noFallthroughCasesInSwitch": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "useDefineForClassFields": true, + "strictPropertyInitialization": false, + "allowJs": true, + "strict": true, + "strictFunctionTypes": false, + "outDir": "dist", + "types": ["jest", "node"], + "resolveJsonModule": true + }, + "include": ["**/*.ts", "**/*.js", "jest.setup.cjs"], + "exclude": ["node_modules", "dist"] +} diff --git a/apps/auth/turbo.json b/apps/auth/turbo.json new file mode 100644 index 00000000..4b7f6560 --- /dev/null +++ b/apps/auth/turbo.json @@ -0,0 +1,11 @@ +{ + "extends": ["//"], + "tasks": { + "build": { + "outputs": [".dist/**"] + }, + "dev": { + "dependsOn": ["^dev"] + } + } +} diff --git a/apps/open-swe/package.json b/apps/open-swe/package.json index 26a83445..ab318f37 100644 --- a/apps/open-swe/package.json +++ b/apps/open-swe/package.json @@ -54,5 +54,5 @@ "typescript": "~5.7.2", "typescript-eslint": "^8.22.0" }, - "packageManager": "yarn@1.22.22" + "packageManager": "yarn@3.5.1" } diff --git a/apps/open-swe/turbo.json b/apps/open-swe/turbo.json index d8807616..4b7f6560 100644 --- a/apps/open-swe/turbo.json +++ b/apps/open-swe/turbo.json @@ -2,10 +2,7 @@ "extends": ["//"], "tasks": { "build": { - "outputs": [".next/**", "!.next/cache/**"] - }, - "build:internal": { - "dependsOn": ["^build:internal"] + "outputs": [".dist/**"] }, "dev": { "dependsOn": ["^dev"] diff --git a/package.json b/package.json index 33a1eea1..bdfc4c16 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "build": "turbo build", "turbo:command": "turbo", "format": "turbo format", + "format:check": "turbo format:check", "lint": "turbo lint", "lint:fix": "turbo lint:fix" }, diff --git a/turbo.json b/turbo.json index ae024316..fa8a462f 100644 --- a/turbo.json +++ b/turbo.json @@ -15,6 +15,9 @@ "format": { "dependsOn": ["^format"] }, + "format:check": { + "dependsOn": ["^format:check"] + }, "dev": { "dependsOn": ["^dev"] } diff --git a/yarn.lock b/yarn.lock index 9c54c4f1..8b28727d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2181,6 +2181,30 @@ __metadata: languageName: unknown linkType: soft +"@open-swe/auth@workspace:apps/auth": + version: 0.0.0-use.local + resolution: "@open-swe/auth@workspace:apps/auth" + dependencies: + "@eslint/eslintrc": ^3.1.0 + "@eslint/js": ^9.19.0 + "@jest/globals": ^29.7.0 + "@tsconfig/recommended": ^1.0.8 + "@types/jest": ^29.5.0 + "@types/node": ^22.13.5 + dotenv: ^16.4.7 + eslint: ^9.19.0 + eslint-config-prettier: ^8.8.0 + eslint-plugin-import: ^2.27.5 + eslint-plugin-no-instanceof: ^1.0.1 + eslint-plugin-prettier: ^4.2.1 + jest: ^29.7.0 + prettier: ^3.5.2 + ts-jest: ^29.1.0 + typescript: ~5.7.2 + typescript-eslint: ^8.22.0 + languageName: unknown + linkType: soft + "@openapi-contrib/openapi-schema-to-json-schema@npm:~3.2.0": version: 3.2.0 resolution: "@openapi-contrib/openapi-schema-to-json-schema@npm:3.2.0"