@uniformdev/canvas-next 18.8.0 → 18.8.1-alpha.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/index.d.ts +4 -2
- package/dist/index.esm.js +3 -1
- package/dist/index.js +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ParsedUrlQuery } from 'querystring';
|
|
2
2
|
export { U as UniformCompositionNextPage, c as UniformGetServerSideProps, b as UniformGetStaticProps, a as UniformPreviewData } from './models-6ff72d91.js';
|
|
3
|
-
import { NextApiHandler } from 'next';
|
|
3
|
+
import { NextApiHandler, NextApiRequest } from 'next';
|
|
4
4
|
import { RootComponentInstance } from '@uniformdev/canvas';
|
|
5
5
|
import '@uniformdev/canvas-react';
|
|
6
6
|
|
|
@@ -33,7 +33,9 @@ declare const createPreviewHandlerGet: CreatePreviewHandlerGet;
|
|
|
33
33
|
|
|
34
34
|
type CreatePreviewHandlerPostOptions = {
|
|
35
35
|
secret?: () => string;
|
|
36
|
-
enhance?: (composition: RootComponentInstance
|
|
36
|
+
enhance?: (composition: RootComponentInstance, { req, }: {
|
|
37
|
+
req: NextApiRequest;
|
|
38
|
+
}) => Promise<void>;
|
|
37
39
|
};
|
|
38
40
|
type CreatePreviewHandlerPost = (options?: CreatePreviewHandlerPostOptions) => NextApiHandler;
|
|
39
41
|
declare const createPreviewHandlerPost: CreatePreviewHandlerPost;
|
package/dist/index.esm.js
CHANGED
|
@@ -75,7 +75,9 @@ var createPreviewHandlerPost = ({ secret, enhance } = {}) => async (req, res) =>
|
|
|
75
75
|
} else if (hasConfiguredHash) {
|
|
76
76
|
return res.status(401).json({ message: "Not authorized" });
|
|
77
77
|
}
|
|
78
|
-
await (enhance == null ? void 0 : enhance(composition
|
|
78
|
+
await (enhance == null ? void 0 : enhance(composition, {
|
|
79
|
+
req
|
|
80
|
+
}));
|
|
79
81
|
return res.status(200).json({
|
|
80
82
|
composition
|
|
81
83
|
});
|
package/dist/index.js
CHANGED
|
@@ -111,7 +111,9 @@ var createPreviewHandlerPost = ({ secret, enhance } = {}) => async (req, res) =>
|
|
|
111
111
|
} else if (hasConfiguredHash) {
|
|
112
112
|
return res.status(401).json({ message: "Not authorized" });
|
|
113
113
|
}
|
|
114
|
-
await (enhance == null ? void 0 : enhance(composition
|
|
114
|
+
await (enhance == null ? void 0 : enhance(composition, {
|
|
115
|
+
req
|
|
116
|
+
}));
|
|
115
117
|
return res.status(200).json({
|
|
116
118
|
composition
|
|
117
119
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -75,7 +75,9 @@ var createPreviewHandlerPost = ({ secret, enhance } = {}) => async (req, res) =>
|
|
|
75
75
|
} else if (hasConfiguredHash) {
|
|
76
76
|
return res.status(401).json({ message: "Not authorized" });
|
|
77
77
|
}
|
|
78
|
-
await (enhance == null ? void 0 : enhance(composition
|
|
78
|
+
await (enhance == null ? void 0 : enhance(composition, {
|
|
79
|
+
req
|
|
80
|
+
}));
|
|
79
81
|
return res.status(200).json({
|
|
80
82
|
composition
|
|
81
83
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-next",
|
|
3
|
-
"version": "18.8.
|
|
3
|
+
"version": "18.8.1-alpha.1+bd6b62da8",
|
|
4
4
|
"description": "Next.js SDK for Uniform Canvas",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"format": "prettier --write \"src/**/*.{js,ts,tsx}\""
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@uniformdev/canvas": "18.8.
|
|
56
|
-
"@uniformdev/canvas-react": "18.8.
|
|
57
|
-
"@uniformdev/project-map": "18.8.
|
|
55
|
+
"@uniformdev/canvas": "18.8.1-alpha.1+bd6b62da8",
|
|
56
|
+
"@uniformdev/canvas-react": "18.8.1-alpha.1+bd6b62da8",
|
|
57
|
+
"@uniformdev/project-map": "18.8.1-alpha.1+bd6b62da8"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"next": ">= 12.0.0",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "bd6b62da892304cf7aa52da4d5214858fd6ee5ba"
|
|
77
77
|
}
|