e7948012f4
Admin Add/Edit App now supports: - Custom image upload (or fall back to Lucide icon) via the existing ServiceImageUploader; rendered on the home launcher when set. - Open mode picker: internal (default), external_tab (window.open), external_iframe (renders inside /embedded/:id). External URL input shown conditionally and required when an external mode is chosen. Internal route field is hidden entirely when an external mode is selected, and locked (readOnly + lock hint) when editing a built-in app whose path is hardcoded in the SPA. Backend: - apps schema gains image_url, external_url, open_mode (default 'internal'); drizzle-kit push applied. - New lib/db/src/built-in-apps.ts exports BUILTIN_APP_SLUGS + isBuiltinAppSlug. Exposed via subpath export `@workspace/db/built-in-apps`; the file has zero imports so the browser bundle can use it without pulling in `pg`. tx-os now imports it directly — duplicate FE constant removed. - Built-in slug list: services, notifications, admin, notes, my-orders, orders-incoming, executive-meetings (everything with a hardcoded <Route> in artifacts/tx-os/src/App.tsx). calendar / documents are seeded but admin-defined and remain editable. - PATCH /apps/:id rejects route changes whose previous slug is built-in with 400 + code='builtin_route_locked'. Same-route no-op is allowed; non-route updates on built-ins still work. Other: - New SPA route /embedded/:id and embedded-app page (iframe host with back + open-in-new-tab + error/not-embeddable states). - OpenAPI App / CreateAppBody / UpdateAppBody extended; codegen ran. - en/ar locales: admin.appImage, appExternalUrl, appOpenMode.*, builtinPathLocked, embeddedFrame.*. - scripts/src/seed.ts: drift guard throws if a seeded built-in slug uses a route that does not match the hardcoded SPA route. Tests: - New API test apps-builtin-route-lock.test.mjs (4/4 pass): reject built-in route change, allow non-route built-in updates, allow non-builtin route changes, allow built-in same-route no-op. - New Playwright E2E admin-app-image-external-embedded.spec.mjs (passes): launcher renders custom image_url, external_tab opens external URL via window.open, external_iframe navigates to /embedded/:id and renders <iframe src=externalUrl>. Out of scope (pre-existing, not introduced here): - 3 failing tests in executive-meetings-* and tsc errors in api-server/src/routes/executive-meetings.ts.
106 lines
3.6 KiB
JSON
106 lines
3.6 KiB
JSON
{
|
|
"name": "@workspace/tx-os",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite --config vite.config.ts --host 0.0.0.0",
|
|
"build": "vite build --config vite.config.ts",
|
|
"serve": "vite preview --config vite.config.ts --host 0.0.0.0",
|
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
"test": "node --test 'src/__tests__/**/*.test.mjs'",
|
|
"test:e2e": "playwright test --config playwright.config.mjs"
|
|
},
|
|
"devDependencies": {
|
|
"@hookform/resolvers": "^3.10.0",
|
|
"@playwright/test": "^1.59.1",
|
|
"@radix-ui/react-accordion": "^1.2.4",
|
|
"@radix-ui/react-alert-dialog": "^1.1.7",
|
|
"@radix-ui/react-aspect-ratio": "^1.1.3",
|
|
"@radix-ui/react-avatar": "^1.1.4",
|
|
"@radix-ui/react-checkbox": "^1.1.5",
|
|
"@radix-ui/react-collapsible": "^1.1.4",
|
|
"@radix-ui/react-context-menu": "^2.2.7",
|
|
"@radix-ui/react-dialog": "^1.1.7",
|
|
"@radix-ui/react-dropdown-menu": "^2.1.7",
|
|
"@radix-ui/react-hover-card": "^1.1.7",
|
|
"@radix-ui/react-label": "^2.1.3",
|
|
"@radix-ui/react-menubar": "^1.1.7",
|
|
"@radix-ui/react-navigation-menu": "^1.2.6",
|
|
"@radix-ui/react-popover": "^1.1.7",
|
|
"@radix-ui/react-progress": "^1.1.3",
|
|
"@radix-ui/react-radio-group": "^1.2.4",
|
|
"@radix-ui/react-scroll-area": "^1.2.4",
|
|
"@radix-ui/react-select": "^2.1.7",
|
|
"@radix-ui/react-separator": "^1.1.3",
|
|
"@radix-ui/react-slider": "^1.2.4",
|
|
"@radix-ui/react-slot": "^1.2.0",
|
|
"@radix-ui/react-switch": "^1.1.4",
|
|
"@radix-ui/react-tabs": "^1.1.4",
|
|
"@radix-ui/react-toast": "^1.2.7",
|
|
"@radix-ui/react-toggle": "^1.1.3",
|
|
"@radix-ui/react-toggle-group": "^1.1.3",
|
|
"@radix-ui/react-tooltip": "^1.2.0",
|
|
"@replit/vite-plugin-cartographer": "catalog:",
|
|
"@replit/vite-plugin-dev-banner": "catalog:",
|
|
"@replit/vite-plugin-runtime-error-modal": "catalog:",
|
|
"@tailwindcss/typography": "^0.5.15",
|
|
"@tailwindcss/vite": "catalog:",
|
|
"@tanstack/react-query": "catalog:",
|
|
"@types/node": "catalog:",
|
|
"@types/react": "catalog:",
|
|
"@types/react-dom": "catalog:",
|
|
"@vitejs/plugin-react": "catalog:",
|
|
"@workspace/api-client-react": "workspace:*",
|
|
"@workspace/db": "workspace:*",
|
|
"class-variance-authority": "catalog:",
|
|
"clsx": "catalog:",
|
|
"cmdk": "^1.1.1",
|
|
"date-fns": "^3.6.0",
|
|
"embla-carousel-react": "^8.6.0",
|
|
"framer-motion": "catalog:",
|
|
"i18next": "^26.0.6",
|
|
"input-otp": "^1.4.2",
|
|
"lucide-react": "catalog:",
|
|
"next-themes": "^0.4.6",
|
|
"pg": "^8.20.0",
|
|
"react": "catalog:",
|
|
"react-day-picker": "^9.11.1",
|
|
"react-dom": "catalog:",
|
|
"react-hook-form": "^7.55.0",
|
|
"react-i18next": "^17.0.4",
|
|
"react-icons": "^5.4.0",
|
|
"react-resizable-panels": "^2.1.7",
|
|
"recharts": "^2.15.2",
|
|
"socket.io-client": "^4.8.3",
|
|
"sonner": "^2.0.7",
|
|
"tailwind-merge": "catalog:",
|
|
"tailwindcss": "catalog:",
|
|
"tw-animate-css": "^1.4.0",
|
|
"vaul": "^1.1.2",
|
|
"vite": "catalog:",
|
|
"wouter": "^3.3.5",
|
|
"zod": "catalog:"
|
|
},
|
|
"dependencies": {
|
|
"@dnd-kit/core": "^6.3.1",
|
|
"@dnd-kit/sortable": "^10.0.0",
|
|
"@dnd-kit/utilities": "^3.2.2",
|
|
"@tiptap/core": "^3.22.4",
|
|
"@tiptap/extension-color": "^3.22.4",
|
|
"@tiptap/extension-font-family": "^3.22.4",
|
|
"@tiptap/extension-text-align": "^3.22.4",
|
|
"@tiptap/extension-text-style": "^3.22.4",
|
|
"@tiptap/extension-underline": "^3.22.4",
|
|
"@tiptap/react": "^3.22.4",
|
|
"@tiptap/starter-kit": "^3.22.4",
|
|
"@types/dompurify": "^3.2.0",
|
|
"@uppy/aws-s3": "^5.1.0",
|
|
"@uppy/core": "^5.2.0",
|
|
"@uppy/dashboard": "^5.1.1",
|
|
"@uppy/react": "^5.2.0",
|
|
"@workspace/object-storage-web": "workspace:*",
|
|
"dompurify": "^3.4.1"
|
|
}
|
|
}
|