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:
Rotimi Best
2026-06-12 02:23:48 +01:00
parent 367ddcddd7
commit 0b5fc27d1c
4 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -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 |
+3
View File
@@ -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 -1
View File
@@ -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',
+1 -1
View File
@@ -12,5 +12,5 @@
"isolatedModules": true,
"resolveJsonModule": true
},
"include": ["src/**/*.ts", "../../packages/utils/src/constants/embeds.ts"]
"include": ["src/**/*.ts"]
}