@dyrected/next 2.5.63 → 2.5.65
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/README.md +5 -1
- package/dist/admin.css +4 -0
- package/dist/handler.d.ts +2 -0
- package/dist/handler.d.ts.map +1 -1
- package/dist/handler.js +2 -0
- package/dist/handler.js.map +1 -1
- package/dist/index.d.ts +2 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -14
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +10 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +18 -0
- package/dist/server.js.map +1 -0
- package/package.json +12 -4
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Next.js App Router integration for Dyrected CMS.
|
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
// app/dyrected/[...route]/route.ts
|
|
7
|
-
import { dyrectedNextHandler } from "@dyrected/next";
|
|
7
|
+
import { dyrectedNextHandler } from "@dyrected/next/server";
|
|
8
8
|
import config from "../../../dyrected.config";
|
|
9
9
|
|
|
10
10
|
export const { GET, POST, PUT, PATCH, DELETE, OPTIONS } =
|
|
@@ -13,3 +13,7 @@ export const { GET, POST, PUT, PATCH, DELETE, OPTIONS } =
|
|
|
13
13
|
|
|
14
14
|
The handler lazily initializes Dyrected and mounts it at `/dyrected`. Pass
|
|
15
15
|
`{ basePath: "/cms" }` as the second argument when using a different route prefix.
|
|
16
|
+
|
|
17
|
+
Use the dedicated `@dyrected/next/server` entrypoint for route handlers and
|
|
18
|
+
other server-only helpers so Next can keep the server module graph free of
|
|
19
|
+
client React exports.
|
package/dist/admin.css
CHANGED
package/dist/handler.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export interface DyrectedNextHandlerOptions {
|
|
|
7
7
|
* Creates a lazily initialized Next.js App Router handler for Dyrected CMS.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
|
+
* import { dyrectedNextHandler } from "@dyrected/next/server";
|
|
11
|
+
*
|
|
10
12
|
* export const { GET, POST, PATCH, DELETE } = dyrectedNextHandler(config);
|
|
11
13
|
*/
|
|
12
14
|
export declare function dyrectedNextHandler(config: DyrectedConfig, options?: DyrectedNextHandlerOptions): {
|
package/dist/handler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../src/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAKrD,MAAM,WAAW,0BAA0B;IACzC,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../src/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAKrD,MAAM,WAAW,0BAA0B;IACzC,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,0BAA+B;mBAsBR,OAAO;oBAAP,OAAO;qBAAP,OAAO;sBAAP,OAAO;mBAAP,OAAO;uBAAP,OAAO;EAaxC"}
|
package/dist/handler.js
CHANGED
|
@@ -5,6 +5,8 @@ import { handle } from "hono/vercel";
|
|
|
5
5
|
* Creates a lazily initialized Next.js App Router handler for Dyrected CMS.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
|
+
* import { dyrectedNextHandler } from "@dyrected/next/server";
|
|
9
|
+
*
|
|
8
10
|
* export const { GET, POST, PATCH, DELETE } = dyrectedNextHandler(config);
|
|
9
11
|
*/
|
|
10
12
|
export function dyrectedNextHandler(config, options = {}) {
|
package/dist/handler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../src/handler.ts"],"names":[],"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UAAU,EAAE,CAAC;QAC3C,OAAO,eAAe,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC,CAAC;IAEF,OAAO;QACL,GAAG,EAAE,OAAO;QACZ,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,OAAO;QACf,GAAG,EAAE,OAAO;QACZ,OAAO,EAAE,OAAO;KACjB,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAgB;IACzC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IAC7D,OAAO,UAAU,CAAC,CAAC,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC5C,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
export type { DyrectedNextHandlerOptions } from "./handler.js";
|
|
4
|
-
/**
|
|
5
|
-
* Returns a pre-configured Dyrected SDK client for server-side use.
|
|
6
|
-
* Reads environment variables DYRECTED_URL and DYRECTED_API_KEY.
|
|
7
|
-
*/
|
|
8
|
-
export declare function getDyrectedClient(): DyrectedClient;
|
|
1
|
+
export { dyrectedNextHandler, getDyrectedClient } from "./server.js";
|
|
2
|
+
export type { DyrectedNextHandlerOptions } from "./server.js";
|
|
9
3
|
export * from "./components/DyrectedMedia.js";
|
|
10
4
|
export * from "./components/DyrectedImage.js";
|
|
11
5
|
export { DyrectedProvider, useDyrected, useLivePreview } from "@dyrected/react";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrE,YAAY,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAE9D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAG9C,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACjE,YAAY,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAEhF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACpE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC/D,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,YAAY,EACV,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAE/B,cAAc,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export { dyrectedNextHandler } from "./handler.js";
|
|
3
|
-
/**
|
|
4
|
-
* Returns a pre-configured Dyrected SDK client for server-side use.
|
|
5
|
-
* Reads environment variables DYRECTED_URL and DYRECTED_API_KEY.
|
|
6
|
-
*/
|
|
7
|
-
export function getDyrectedClient() {
|
|
8
|
-
const baseUrl = process.env.NEXT_PUBLIC_DYRECTED_URL || process.env.DYRECTED_URL || "http://localhost:3000";
|
|
9
|
-
const apiKey = process.env.NEXT_PUBLIC_DYRECTED_API_KEY || process.env.DYRECTED_API_KEY;
|
|
10
|
-
return createClient({
|
|
11
|
-
baseUrl,
|
|
12
|
-
apiKey,
|
|
13
|
-
});
|
|
14
|
-
}
|
|
1
|
+
export { dyrectedNextHandler, getDyrectedClient } from "./server.js";
|
|
15
2
|
export * from "./components/DyrectedMedia.js";
|
|
16
3
|
export * from "./components/DyrectedImage.js";
|
|
17
4
|
// Re-export React integration layer so Next.js users have one package to import from
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrE,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAE9C,qFAAqF;AACrF,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,2FAA2F;AAC3F,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEjE,qCAAqC;AACrC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAWpE,cAAc,eAAe,CAAC"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DyrectedClient } from "@dyrected/sdk";
|
|
2
|
+
export { dyrectedNextHandler } from "./handler.js";
|
|
3
|
+
export type { DyrectedNextHandlerOptions } from "./handler.js";
|
|
4
|
+
/**
|
|
5
|
+
* Returns a pre-configured Dyrected SDK client for server-side use.
|
|
6
|
+
* Reads environment variables DYRECTED_URL and DYRECTED_API_KEY.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getDyrectedClient(): DyrectedClient;
|
|
9
|
+
export * from "@dyrected/sdk";
|
|
10
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,cAAc,EAAE,MAAM,eAAe,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,YAAY,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE/D;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,CAYlD;AAED,cAAc,eAAe,CAAC"}
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createClient } from "@dyrected/sdk";
|
|
2
|
+
export { dyrectedNextHandler } from "./handler.js";
|
|
3
|
+
/**
|
|
4
|
+
* Returns a pre-configured Dyrected SDK client for server-side use.
|
|
5
|
+
* Reads environment variables DYRECTED_URL and DYRECTED_API_KEY.
|
|
6
|
+
*/
|
|
7
|
+
export function getDyrectedClient() {
|
|
8
|
+
const baseUrl = process.env.NEXT_PUBLIC_DYRECTED_URL ||
|
|
9
|
+
process.env.DYRECTED_URL ||
|
|
10
|
+
"http://localhost:3000";
|
|
11
|
+
const apiKey = process.env.NEXT_PUBLIC_DYRECTED_API_KEY || process.env.DYRECTED_API_KEY;
|
|
12
|
+
return createClient({
|
|
13
|
+
baseUrl,
|
|
14
|
+
apiKey,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
export * from "@dyrected/sdk";
|
|
18
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAkB,MAAM,eAAe,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,OAAO,GACX,OAAO,CAAC,GAAG,CAAC,wBAAwB;QACpC,OAAO,CAAC,GAAG,CAAC,YAAY;QACxB,uBAAuB,CAAC;IAC1B,MAAM,MAAM,GACV,OAAO,CAAC,GAAG,CAAC,4BAA4B,IAAI,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IAE3E,OAAO,YAAY,CAAC;QAClB,OAAO;QACP,MAAM;KACP,CAAC,CAAC;AACL,CAAC;AAED,cAAc,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dyrected/next",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.65",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -17,6 +17,14 @@
|
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"import": "./dist/index.js"
|
|
19
19
|
},
|
|
20
|
+
"./server": {
|
|
21
|
+
"types": "./dist/server.d.ts",
|
|
22
|
+
"import": "./dist/server.js"
|
|
23
|
+
},
|
|
24
|
+
"./handler": {
|
|
25
|
+
"types": "./dist/handler.d.ts",
|
|
26
|
+
"import": "./dist/handler.js"
|
|
27
|
+
},
|
|
20
28
|
"./admin": {
|
|
21
29
|
"types": "./dist/admin.d.ts",
|
|
22
30
|
"import": "./dist/admin.js"
|
|
@@ -31,9 +39,9 @@
|
|
|
31
39
|
},
|
|
32
40
|
"dependencies": {
|
|
33
41
|
"hono": "^4.0.0",
|
|
34
|
-
"@dyrected/core": "2.5.
|
|
35
|
-
"@dyrected/react": "2.5.
|
|
36
|
-
"@dyrected/sdk": "2.5.
|
|
42
|
+
"@dyrected/core": "2.5.65",
|
|
43
|
+
"@dyrected/react": "2.5.65",
|
|
44
|
+
"@dyrected/sdk": "2.5.65"
|
|
37
45
|
},
|
|
38
46
|
"devDependencies": {
|
|
39
47
|
"@types/node": "^20.12.12",
|