@coherent.js/integrations 1.0.0-rc.6 → 1.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/package.json +2 -2
- package/types/express/index.d.ts +27 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coherent.js/integrations",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Framework integration adapters for Coherent.js: Express, Fastify, Koa, Next.js, Astro, Remix, SvelteKit.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"koa": ">=2.13.0 < 4.0.0",
|
|
60
60
|
"next": ">=13.0.0",
|
|
61
61
|
"react": ">=18.0.0",
|
|
62
|
-
"@coherent.js/core": "1.0.
|
|
62
|
+
"@coherent.js/core": "1.0.1"
|
|
63
63
|
},
|
|
64
64
|
"peerDependenciesMeta": {
|
|
65
65
|
"@remix-run/server-runtime": {
|
package/types/express/index.d.ts
CHANGED
|
@@ -121,6 +121,32 @@ export function setupCoherent(
|
|
|
121
121
|
options?: SetupCoherentExpressOptions
|
|
122
122
|
): void;
|
|
123
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Verify Express is installed, then return a setup function that applies
|
|
126
|
+
* {@link setupCoherent} to an app and returns it.
|
|
127
|
+
*
|
|
128
|
+
* Rejects when Express is not resolvable, and the returned function throws
|
|
129
|
+
* when handed something that is not an Express app.
|
|
130
|
+
*
|
|
131
|
+
* @param options Configuration forwarded to setupCoherent
|
|
132
|
+
*/
|
|
133
|
+
export function createExpressIntegration(
|
|
134
|
+
options?: SetupCoherentExpressOptions
|
|
135
|
+
): Promise<(app: Application) => Application>;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* A classic Express view engine that renders the component passed as the
|
|
139
|
+
* `options` argument.
|
|
140
|
+
*
|
|
141
|
+
* Kept for consumers migrating from the standalone `@coherent.js/express`
|
|
142
|
+
* package; new code should prefer {@link setupCoherent}.
|
|
143
|
+
*/
|
|
144
|
+
export function expressEngine(): (
|
|
145
|
+
filePath: string,
|
|
146
|
+
options: unknown,
|
|
147
|
+
callback: (err: Error | null, html?: string) => void
|
|
148
|
+
) => void;
|
|
149
|
+
|
|
124
150
|
/**
|
|
125
151
|
* Default export with all utilities
|
|
126
152
|
*/
|
|
@@ -129,6 +155,7 @@ declare const coherentExpress: {
|
|
|
129
155
|
createCoherentHandler: typeof createCoherentHandler;
|
|
130
156
|
enhancedExpressEngine: typeof enhancedExpressEngine;
|
|
131
157
|
setupCoherent: typeof setupCoherent;
|
|
158
|
+
createExpressIntegration: typeof createExpressIntegration;
|
|
132
159
|
};
|
|
133
160
|
|
|
134
161
|
export default coherentExpress;
|