163c7ff791
* refactor: replace i18n HTTP requests with build-time bundling - Create translationBundler.ts for build-time translation loading - Replace HTTP fetch in loadTranslations with file system reads - Add CalComVersion cache invalidation to prevent stale translations - Fix TypeScript errors in booking page components - Eliminate 60s timeout issues by removing network dependency Resolves translation timeout issues by bundling translations at build time instead of making runtime HTTP requests to /static/locales/ endpoints. Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: move i18n files back to packages/lib/server with proper imports - Move i18n.ts and translationBundler.ts back to packages/lib/server/ - Replace all relative imports with @calcom/lib/server/i18n pattern - Fix LOCALES_PATH to point to correct directory - Maintain optimized serverless-friendly translation loading Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * refactor: move locale files to packages/lib/server to eliminate circular deps - Move all locale files from apps/web/public/static/locales to packages/lib/server/locales - Create copy-locales-static.js script to copy files during build - Update all references to use new location for build-time access - Maintain public folder copying for Next.js runtime access - Update platform atoms, scripts, and config files - Fix copy script relative path issue Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: update test imports after locale refactor - Fix import paths in test files updated by pre-commit hooks - Ensure all tests use correct locale import paths Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: revert import paths from @calcom/web/lib/i18n to @calcom/lib/server/i18n - Revert all test file imports back to @calcom/lib/server/i18n as requested - Addresses GitHub comment feedback to stick with packages/lib/server location - Fixes import paths in 6 test files that were incorrectly changed Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: update vite config alias to use new locale path - Update @calcom/web/public/static/locales/en/common.json to @calcom/lib/server/locales/en/common.json - Addresses GitHub comment about updating platform atoms vite config - Maintains correct path resolution after locale files moved to packages/lib/server Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: update translationBundler path resolution for production builds - Use process.cwd() instead of __dirname for locale file path resolution - Ensures locale files can be found in both development and production environments - Fixes E2E test failures caused by missing locale files in .next/server/chunks/ Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: use relative path resolution for locale files in translationBundler - Change from process.cwd() to __dirname with relative paths - Ensures locale files can be found in both development and production environments - Fixes E2E test failures caused by incorrect path resolution in Next.js builds Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: use process.cwd() for locale path resolution in production builds - Change from __dirname to process.cwd() with relative paths - Ensures locale files can be found when bundled into Next.js server chunks - Fixes E2E test failures caused by incorrect path resolution in production environment - Follows same pattern used in getStaticProps.tsx for cross-package file access Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: use path.resolve pattern from sendVerificationRequest for locale access - Change from process.cwd() to path.resolve(process.cwd(), '..', '..', 'packages/lib/server/locales') - Follows same pattern used in sendVerificationRequest.ts for cross-environment file access - Should resolve E2E test failures by ensuring locale files can be found when bundled into Next.js server chunks - Pattern navigates up from current working directory to reach packages directory consistently Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: use dynamic monorepo root detection for locale path resolution - Replace relative path resolution with dynamic monorepo root finder - Ensures locale files can be found from any working directory (root, apps/web, apps/api/v2) - Update API v2 i18n config to use new locale path - Fixes remaining E2E test failures in API v2 and E2E (1/4) test suites Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * fix: use require.resolve(__filename) for robust path resolution in all contexts - Replace __dirname with require.resolve(__filename) in monorepo root detection - Ensures locale files can be found when running from any working directory - Fixes E2E API v2 test failures where __dirname resolves to '.' instead of actual file path Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * Revert "fix: use require.resolve(__filename) for robust path resolution in all contexts" This reverts commit b37d8226000da8f7d5fb98b83dd0e95a53d45372. * fix: update copied locale files after translationBundler path resolution fix - Copy script updated all locale files in public directory - Ensures E2E tests have access to latest locale files - Fixes regression where all E2E tests were failing Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * feat: remove existing locale files to establish copy script as single source of truth - Delete all common.json files from apps/web/public/static/locales/ - Eliminates developer confusion about which files are authoritative - copy-locales-static.js script now clearly the only mechanism for populating public folder - packages/lib/server/locales/ remains the definitive source of truth for translations Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * add comment * refactor: simplify findMonorepoRoot by removing redundant fallback loop - Remove unnecessary second while loop using process.cwd() - The first loop from __dirname will always find the monorepo root - Add clear error message for fail-fast behavior if repo structure is corrupted - Improves code clarity and maintainability Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * feat: integrate updated translations from main branch - Restore all common.json files from main branch to apps/web/public/static/locales/ - Overwrite packages/lib/server/locales/ with up-to-date translation content - Resolve merge conflicts using Benny's safer 2-step approach - Ensure translation source of truth remains in packages/lib/server/locales/ - Complete safer conflict resolution to eliminate merge conflicts on PR #22422 Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * chore: update package.json and yarn.lock after translation integration - Update dependencies after ts-node installation for pre-commit hooks - Ensure yarn.lock reflects current dependency state - Complete translation integration process Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> * feat: remove duplicate locale files from apps/web to establish single source of truth - Delete all common.json files from apps/web/public/static/locales/ - Maintain packages/lib/server/locales/ as the single source of truth for translations - copy-locales-static.js script will populate public folder during build process - Complete Benny's safer 2-step approach: restore from main, then remove duplicates - Resolve merge conflicts and eliminate developer confusion about translation file locations Co-Authored-By: keith@cal.com <keithwillcode@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: hbjORbj <sldisek783@gmail.com>
169 lines
7.6 KiB
JSON
169 lines
7.6 KiB
JSON
{
|
|
"name": "calcom-monorepo",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"workspaces": [
|
|
"apps/*",
|
|
"apps/api/*",
|
|
"packages/*",
|
|
"packages/embeds/*",
|
|
"packages/features/*",
|
|
"packages/app-store/*",
|
|
"packages/app-store/ee/*",
|
|
"packages/platform/*",
|
|
"packages/platform/examples/base",
|
|
"example-apps/*"
|
|
],
|
|
"scripts": {
|
|
"app-store-cli": "yarn workspace @calcom/app-store-cli",
|
|
"app-store:build": "yarn app-store-cli build",
|
|
"app-store:watch": "yarn app-store-cli watch",
|
|
"app-store": "yarn app-store-cli cli",
|
|
"create-app": "yarn app-store create",
|
|
"edit-app": "yarn app-store edit",
|
|
"withEmbedPublishEnv": "NEXT_PUBLIC_EMBED_LIB_URL='https://app.cal.com/embed/embed.js' NEXT_PUBLIC_WEBAPP_URL='https://app.cal.com' yarn",
|
|
"publish-embed": "yarn withEmbedPublishEnv workspace @calcom/embed-core build && yarn withEmbedPublishEnv workspace @calcom/embed-snippet build && yarn workspaces foreach --from=\"@calcom/embed*\" npm publish --access=public",
|
|
"delete-app": "yarn app-store delete",
|
|
"create-app-template": "yarn app-store create-template",
|
|
"edit-app-template": "yarn app-store edit-template",
|
|
"delete-app-template": "yarn app-store delete-template",
|
|
"build": "turbo run build --filter=@calcom/web...",
|
|
"build:ai": "turbo run build --scope=\"@calcom/ai\"",
|
|
"clean": "find . -name node_modules -o -name .next -o -name .turbo -o -name dist -type d -prune | xargs rm -rf",
|
|
"db-deploy": "turbo run db-deploy",
|
|
"db-seed": "turbo run db-seed",
|
|
"db-studio": "yarn prisma studio",
|
|
"deploy": "turbo run deploy",
|
|
"dev:all": "turbo run dev --scope=\"@calcom/web\" --scope=\"@calcom/website\" --scope=\"@calcom/console\"",
|
|
"dev:ai": "turbo run dev --scope=\"@calcom/web\" --scope=\"@calcom/api-proxy\" --scope=\"@calcom/api\" --scope=\"@calcom/ai\"",
|
|
"dev:api": "turbo run dev --scope=\"@calcom/web\" --scope=\"@calcom/api-proxy\" --scope=\"@calcom/api\"",
|
|
"dev:api:console": "turbo run dev --scope=\"@calcom/web\" --scope=\"@calcom/api-proxy\" --scope=\"@calcom/api\" --scope=\"@calcom/console\"",
|
|
"dev:console": "turbo run dev --scope=\"@calcom/web\" --scope=\"@calcom/console\"",
|
|
"dev:swagger": "turbo run dev --scope=\"@calcom/api-proxy\" --scope=\"@calcom/api\" --scope=\"@calcom/swagger\"",
|
|
"dev:website": "turbo run dev --scope=\"@calcom/web\" --scope=\"@calcom/website\"",
|
|
"dev": "turbo run dev --scope=\"@calcom/web\"",
|
|
"build-storybook": "turbo run build --scope=\"@calcom/storybook\"",
|
|
"dx": "turbo run dx",
|
|
"i-dev": "infisical run -- turbo run dev --scope=\"@calcom/web\"",
|
|
"i-dx": "infisical run -- turbo run dx",
|
|
"i-gen-web-example-env": "infisical secrets generate-example-env --tags=web > .env.example",
|
|
"i-gen-app-store-example-env": "infisical secrets generate-example-env --tags=appstore > .env.appStore.example",
|
|
"embed-tests-quick": "turbo run embed-tests-quick",
|
|
"embed-tests": "turbo run embed-tests",
|
|
"env-check:app-store": "dotenv-checker --schema .env.appStore.example --env .env.appStore",
|
|
"env-check:common": "dotenv-checker --schema .env.example --env .env",
|
|
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
|
|
"heroku-postbuild": "turbo run @calcom/web#build",
|
|
"lint:fix": "turbo run lint:fix",
|
|
"lint:report": "turbo run lint:report",
|
|
"lint": "turbo run lint",
|
|
"postinstall": "husky install && turbo run post-install",
|
|
"pre-commit": "lint-staged",
|
|
"predev": "echo 'Checking env files'",
|
|
"prisma": "yarn workspace @calcom/prisma prisma",
|
|
"start": "turbo run start --scope=\"@calcom/web\"",
|
|
"tdd": "vitest watch",
|
|
"e2e": "NEXT_PUBLIC_IS_E2E=1 yarn playwright test --project=@calcom/web",
|
|
"e2e:app-store": "QUICK=true yarn playwright test --project=@calcom/app-store",
|
|
"e2e:embed": "NEXT_PUBLIC_IS_E2E=1 yarn playwright test --project=@calcom/embed-core",
|
|
"e2e:embed-react": "QUICK=true yarn playwright test --project=@calcom/embed-react",
|
|
"test-e2e": "yarn db-seed && yarn e2e",
|
|
"test-e2e:app-store": "yarn db-seed && yarn e2e:app-store",
|
|
"test-e2e:embed": "yarn db-seed && yarn e2e:embed",
|
|
"test-e2e:embed-react": "yarn db-seed && yarn e2e:embed-react",
|
|
"test-playwright": "yarn playwright test --config=playwright.config.ts",
|
|
"test": "vitest run",
|
|
"test:ui": "vitest --ui",
|
|
"type-check": "turbo run type-check",
|
|
"type-check:ci": "turbo run type-check:ci --log-prefix=none",
|
|
"web": "yarn workspace @calcom/web",
|
|
"docker-build-api": "docker build -t cal-api -f ./infra/docker/api/Dockerfile .",
|
|
"docker-run-api": "docker run -p 80:80 cal-api",
|
|
"docker-stop-api": "docker ps --filter 'ancestor=cal-api' -q | xargs docker stop",
|
|
"changesets-add": "yarn changeset add",
|
|
"changesets-version": "yarn changeset version",
|
|
"changesets-release": "NODE_OPTIONS='--max_old_space_size=12288' turbo run build --filter=@calcom/atoms && yarn changeset publish"
|
|
},
|
|
"devDependencies": {
|
|
"@changesets/changelog-github": "^0.5.1",
|
|
"@changesets/cli": "2.29.4",
|
|
"@jetstreamapp/soql-parser-js": "^6.1.0",
|
|
"@playwright/test": "^1.45.3",
|
|
"@snaplet/copycat": "^4.1.0",
|
|
"@testing-library/jest-dom": "^5.16.5",
|
|
"@testing-library/react": "^16.0.1",
|
|
"@vitest/ui": "^2.1.1",
|
|
"c8": "^7.13.0",
|
|
"checkly": "latest",
|
|
"dotenv-checker": "^1.1.5",
|
|
"husky": "^8.0.0",
|
|
"i18n-unused": "^0.13.0",
|
|
"jest-diff": "^29.5.0",
|
|
"jest-summarizing-reporter": "^1.1.4",
|
|
"lint-staged": "^12.5.0",
|
|
"mailhog": "^4.16.0",
|
|
"next-router-mock": "^0.9.12",
|
|
"node-gyp": "^10.2.0",
|
|
"node-ical": "^0.16.1",
|
|
"prettier": "^2.8.6",
|
|
"prismock": "^1.33.4",
|
|
"resize-observer-polyfill": "^1.5.1",
|
|
"ts-node": "^10.9.2",
|
|
"tsc-absolute": "^1.0.0",
|
|
"typescript": "^5.7.2",
|
|
"vitest": "^2.1.1",
|
|
"vitest-fetch-mock": "^0.3.0",
|
|
"vitest-mock-extended": "^2.0.2"
|
|
},
|
|
"dependencies": {
|
|
"@daily-co/daily-js": "^0.76.0",
|
|
"@evyweb/ioctopus": "^1.2.0",
|
|
"@next/third-parties": "^14.2.5",
|
|
"@vercel/functions": "^1.4.0",
|
|
"city-timezones": "^1.2.1",
|
|
"eslint": "^8.34.0",
|
|
"p-limit": "^6.2.0",
|
|
"turbo": "^1.10.1"
|
|
},
|
|
"resolutions": {
|
|
"types-ramda": "0.29.4",
|
|
"@apidevtools/json-schema-ref-parser": "9.0.9",
|
|
"@types/react": "18.0.26",
|
|
"@types/react-dom": "^18.0.9",
|
|
"@types/node": "^20.17.23",
|
|
"next-i18next@^13.2.2": "patch:next-i18next@npm%3A13.3.0#./.yarn/patches/next-i18next-npm-13.3.0-bf25b0943c.patch",
|
|
"libphonenumber-js": "patch:libphonenumber-js@1.11.18#./.yarn/patches/libphonenumber-js+1.11.18.patch",
|
|
"dayjs@1.11.2": "patch:dayjs@npm%3A1.11.4#./.yarn/patches/dayjs-npm-1.11.4-97921cd375.patch",
|
|
"dayjs@^1": "patch:dayjs@npm%3A1.11.4#./.yarn/patches/dayjs-npm-1.11.4-97921cd375.patch",
|
|
"dayjs@^1.8.29": "patch:dayjs@npm%3A1.11.4#./.yarn/patches/dayjs-npm-1.11.4-97921cd375.patch",
|
|
"@prisma/client@^5.4.2": "patch:@prisma/client@npm%3A5.4.2#./.yarn/patches/@prisma-client-npm-5.4.2-fca489b2dc.patch",
|
|
"@prisma/client@5.4.2": "patch:@prisma/client@npm%3A5.4.2#./.yarn/patches/@prisma-client-npm-5.4.2-fca489b2dc.patch"
|
|
},
|
|
"lint-staged": {
|
|
"(apps|packages)/**/*.{js,ts,jsx,tsx}": [
|
|
"prettier --write",
|
|
"eslint --fix"
|
|
],
|
|
"*.json": [
|
|
"prettier --write"
|
|
],
|
|
"packages/prisma/schema.prisma": [
|
|
"prisma format"
|
|
]
|
|
},
|
|
"engines": {
|
|
"node": ">=18.x",
|
|
"npm": ">=7.0.0",
|
|
"yarn": "3.4.1"
|
|
},
|
|
"prisma": {
|
|
"schema": "packages/prisma/schema.prisma",
|
|
"seed": "ts-node --transpile-only ./packages/prisma/seed.ts"
|
|
},
|
|
"packageManager": "yarn@3.4.1",
|
|
"syncpack": {
|
|
"filter": "^(?!@calcom).*",
|
|
"semverRange": ""
|
|
}
|
|
}
|