@arkstack/inertia 0.17.15 → 0.17.17
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/commands/InertiaSsrCommand.d.ts +0 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +5 -3
- package/dist/setup.d.ts +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Response } from "@arkstack/http";
|
|
2
|
-
|
|
3
2
|
//#region src/types.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* A bag of props passed to an Inertia page. Values may be plain JSON-serializable
|
|
@@ -55,7 +54,9 @@ interface InertiaConfig {
|
|
|
55
54
|
version: string | null | (() => string | null | Promise<string | null>);
|
|
56
55
|
/** Server-side rendering options. */
|
|
57
56
|
ssr: {
|
|
58
|
-
/** Whether the initial visit is rendered by the external SSR server. */
|
|
57
|
+
/** Whether the initial visit is rendered by the external SSR server. */
|
|
58
|
+
enabled: boolean;
|
|
59
|
+
/** The SSR server's render endpoint. Defaults to the standard Inertia address. */
|
|
59
60
|
url?: string;
|
|
60
61
|
/**
|
|
61
62
|
* Path to the built SSR bundle run by `ark inertia:ssr`. Relative paths
|
package/dist/index.js
CHANGED
|
@@ -311,10 +311,11 @@ var Inertia = class Inertia {
|
|
|
311
311
|
const appName = globalThis.config?.("app.name");
|
|
312
312
|
if (appName !== void 0 && Inertia.shared().appName === void 0) Inertia.share("appName", appName);
|
|
313
313
|
if (isInertiaRequest(request) && request.method === "GET" && (request.header("x-inertia-version") ?? "") !== version) return Inertia.conflict(request.url);
|
|
314
|
-
const
|
|
314
|
+
const merged = {
|
|
315
315
|
...sharedData(),
|
|
316
316
|
...props
|
|
317
|
-
}
|
|
317
|
+
};
|
|
318
|
+
const { props: resolved, deferredProps } = await resolveProps(component, merged, request);
|
|
318
319
|
const page = {
|
|
319
320
|
component,
|
|
320
321
|
props: resolved,
|
|
@@ -341,8 +342,9 @@ var Inertia = class Inertia {
|
|
|
341
342
|
*/
|
|
342
343
|
static redirect(url, status) {
|
|
343
344
|
const method = Inertia.request().method;
|
|
345
|
+
const code = status ?? (SEE_OTHER_METHODS.has(method) ? 303 : 302);
|
|
344
346
|
return new Response({
|
|
345
|
-
statusCode:
|
|
347
|
+
statusCode: code,
|
|
346
348
|
body: null
|
|
347
349
|
}).header("Location", url);
|
|
348
350
|
}
|
package/dist/setup.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkstack/inertia",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "InertiaJS server-side adapter for Arkstack, building the modern monolith with server-driven SPAs.",
|
|
6
6
|
"homepage": "https://arkstack.toneflix.net/guide/inertia",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"./package.json": "./package.json"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@arkstack/common": "^0.17.
|
|
36
|
+
"@arkstack/common": "^0.17.17"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@h3ravel/musket": "^2.2.
|
|
40
|
-
"@arkstack/contract": "^0.17.
|
|
41
|
-
"@arkstack/
|
|
42
|
-
"@arkstack/
|
|
39
|
+
"@h3ravel/musket": "^2.2.13",
|
|
40
|
+
"@arkstack/contract": "^0.17.17",
|
|
41
|
+
"@arkstack/http": "^0.17.17",
|
|
42
|
+
"@arkstack/view": "^0.17.17"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"@arkstack/view": {
|