@isardsat/editorial-server 6.0.0-canary-002 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/routes/admin.js +4 -1
- package/package.json +3 -3
package/dist/routes/admin.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { serveStatic } from "@hono/node-server/serve-static";
|
|
2
2
|
import { OpenAPIHono } from "@hono/zod-openapi";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
3
4
|
import path from "path";
|
|
4
5
|
export function createAdminRoutes() {
|
|
5
6
|
const app = new OpenAPIHono();
|
|
6
7
|
// TODO: This is package manager dependent
|
|
7
|
-
const
|
|
8
|
+
const require = createRequire(import.meta.url);
|
|
9
|
+
const adminPackagePath = require.resolve("@isardsat/editorial-admin/package.json");
|
|
10
|
+
const adminPath = path.join(path.dirname(adminPackagePath), "build", "client");
|
|
8
11
|
const relativeAdminPath = path.relative(process.cwd(), adminPath);
|
|
9
12
|
app.use("/admin/*", serveStatic({
|
|
10
13
|
root: relativeAdminPath,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isardsat/editorial-server",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"hono": "^4.6.20",
|
|
15
15
|
"yaml": "^2.7.0",
|
|
16
16
|
"zod": "^3.24.1",
|
|
17
|
-
"@isardsat/editorial-common": "^6.0.
|
|
18
|
-
"@isardsat/editorial-admin": "^6.0.
|
|
17
|
+
"@isardsat/editorial-common": "^6.0.1",
|
|
18
|
+
"@isardsat/editorial-admin": "^6.0.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@tsconfig/node22": "^22.0.0",
|