refactor(tenant-router): import embed routes from @cio/utils
Replace the cross-package relative source import with the workspace package subpath so embed routing uses the canonical constants module.
This commit is contained in:
@@ -12,7 +12,7 @@ The Worker forwards each request to one of two Render services based on path:
|
||||
|
||||
| Host / path | Upstream |
|
||||
| ------------- | ------------------------------------------------------------ |
|
||||
| `embed.*` | R2 `assets` bucket — `/{widget}` maps to internal keys (see `@cio/utils/constants/embeds`) |
|
||||
| `embed.*` | R2 `assets` bucket — `/{widget}` maps to internal keys (`@cio/utils/constants/embeds`) |
|
||||
| `/proxy/*` | API service (`/proxy` prefix stripped, rest forwarded as-is) |
|
||||
| anything else | Dashboard service |
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
"typecheck": "tsc --noEmit",
|
||||
"format": "prettier --write ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@cio/utils": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cloudflare/workers-types": "^4.20250109.0",
|
||||
"typescript": "^5.5.2",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { EMBED_WIDGET_ROUTES } from '../../../packages/utils/src/constants/embeds';
|
||||
import { EMBED_WIDGET_ROUTES } from '@cio/utils/constants/embeds';
|
||||
|
||||
const EMBED_CONTENT_TYPES: Record<string, string> = {
|
||||
html: 'text/html',
|
||||
|
||||
@@ -12,5 +12,5 @@
|
||||
"isolatedModules": true,
|
||||
"resolveJsonModule": true
|
||||
},
|
||||
"include": ["src/**/*.ts", "../../packages/utils/src/constants/embeds.ts"]
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user