@arponascension/express-inertia 1.5.2 → 1.6.0
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 +26 -34
- package/dist/base.ejs +4 -4
- package/dist/engine.d.mts +4 -4
- package/dist/engine.d.ts +4 -4
- package/dist/engine.js +2 -82
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +2 -82
- package/dist/engine.mjs.map +1 -1
- package/dist/index.d.mts +3 -19
- package/dist/index.d.ts +3 -19
- package/dist/index.js +2 -93
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -91
- package/dist/index.mjs.map +1 -1
- package/dist/{types-DgBPobaU.d.mts → types-BlUoEa9x.d.mts} +6 -14
- package/dist/{types-DgBPobaU.d.ts → types-BlUoEa9x.d.ts} +6 -14
- package/dist/vite.d.mts +1 -1
- package/dist/vite.d.ts +1 -1
- package/package.json +2 -3
- package/templates/base.ejs +4 -4
|
@@ -258,7 +258,7 @@ interface InertiaOptions {
|
|
|
258
258
|
*/
|
|
259
259
|
inertiaVersion?: 1 | 2;
|
|
260
260
|
/**
|
|
261
|
-
* Whether
|
|
261
|
+
* Whether `inertia()` should automatically render the root container `<div id="app"></div>`.
|
|
262
262
|
* Set to `false` if you write `<div id="app"></div>` manually in your root template.
|
|
263
263
|
* @default true
|
|
264
264
|
*/
|
|
@@ -372,27 +372,19 @@ interface InertiaRequestHelper {
|
|
|
372
372
|
version: string | null;
|
|
373
373
|
}
|
|
374
374
|
/**
|
|
375
|
-
* Custom
|
|
375
|
+
* Custom View Engine Options for the Inertia EJS engine.
|
|
376
376
|
*/
|
|
377
|
-
|
|
378
|
-
/**
|
|
379
|
-
* Custom View Engine Options for Blade EJS.
|
|
380
|
-
*/
|
|
381
|
-
interface BladeEngineOptions {
|
|
377
|
+
interface InertiaEngineOptions {
|
|
382
378
|
/**
|
|
383
379
|
* Enable template caching.
|
|
384
380
|
* Defaults to true when the Vite dev server is not running (i.e. build mode),
|
|
385
|
-
* matching the same auto-detection as the
|
|
381
|
+
* matching the same auto-detection as the `vite()` helper.
|
|
386
382
|
*/
|
|
387
383
|
cache?: boolean;
|
|
388
384
|
/**
|
|
389
385
|
* Vite helper configuration.
|
|
390
386
|
*/
|
|
391
387
|
vite?: ViteConfig;
|
|
392
|
-
/**
|
|
393
|
-
* Custom Blade directives.
|
|
394
|
-
*/
|
|
395
|
-
directives?: Record<string, DirectiveHandler>;
|
|
396
388
|
/**
|
|
397
389
|
* Inertia protocol version for initial HTML payload (1 or 2).
|
|
398
390
|
* @default 2
|
|
@@ -411,7 +403,7 @@ interface BladeEngineOptions {
|
|
|
411
403
|
templateSource?: string;
|
|
412
404
|
/**
|
|
413
405
|
* Custom template compiler. Receives the raw template source and returns a compiled EJS string.
|
|
414
|
-
* Useful for custom preprocessing before
|
|
406
|
+
* Useful for custom preprocessing before EJS compilation.
|
|
415
407
|
*/
|
|
416
408
|
compileTemplate?: (source: string) => string;
|
|
417
409
|
}
|
|
@@ -430,4 +422,4 @@ declare global {
|
|
|
430
422
|
}
|
|
431
423
|
}
|
|
432
424
|
|
|
433
|
-
export { type AlwaysProp as A,
|
|
425
|
+
export { type AlwaysProp as A, CircuitBreaker as C, type DeferredProp as D, type InertiaOptions as I, type LazyProp as L, type MergeProp as M, type OptionalProp as O, type PropCallback as P, type RetryOptions as R, type SecurityOptions as S, type ViteConfig as V, type PageProps as a, type Page as b, type SSROptions as c, type SSRResult as d, type CircuitBreakerOptions as e, type InertiaEngineOptions as f, type InertiaRequestHelper as g, type InertiaResponseHandler as h, type SSRResilienceOptions as i, calculateBackoff as j, shouldRetry as s };
|
|
@@ -258,7 +258,7 @@ interface InertiaOptions {
|
|
|
258
258
|
*/
|
|
259
259
|
inertiaVersion?: 1 | 2;
|
|
260
260
|
/**
|
|
261
|
-
* Whether
|
|
261
|
+
* Whether `inertia()` should automatically render the root container `<div id="app"></div>`.
|
|
262
262
|
* Set to `false` if you write `<div id="app"></div>` manually in your root template.
|
|
263
263
|
* @default true
|
|
264
264
|
*/
|
|
@@ -372,27 +372,19 @@ interface InertiaRequestHelper {
|
|
|
372
372
|
version: string | null;
|
|
373
373
|
}
|
|
374
374
|
/**
|
|
375
|
-
* Custom
|
|
375
|
+
* Custom View Engine Options for the Inertia EJS engine.
|
|
376
376
|
*/
|
|
377
|
-
|
|
378
|
-
/**
|
|
379
|
-
* Custom View Engine Options for Blade EJS.
|
|
380
|
-
*/
|
|
381
|
-
interface BladeEngineOptions {
|
|
377
|
+
interface InertiaEngineOptions {
|
|
382
378
|
/**
|
|
383
379
|
* Enable template caching.
|
|
384
380
|
* Defaults to true when the Vite dev server is not running (i.e. build mode),
|
|
385
|
-
* matching the same auto-detection as the
|
|
381
|
+
* matching the same auto-detection as the `vite()` helper.
|
|
386
382
|
*/
|
|
387
383
|
cache?: boolean;
|
|
388
384
|
/**
|
|
389
385
|
* Vite helper configuration.
|
|
390
386
|
*/
|
|
391
387
|
vite?: ViteConfig;
|
|
392
|
-
/**
|
|
393
|
-
* Custom Blade directives.
|
|
394
|
-
*/
|
|
395
|
-
directives?: Record<string, DirectiveHandler>;
|
|
396
388
|
/**
|
|
397
389
|
* Inertia protocol version for initial HTML payload (1 or 2).
|
|
398
390
|
* @default 2
|
|
@@ -411,7 +403,7 @@ interface BladeEngineOptions {
|
|
|
411
403
|
templateSource?: string;
|
|
412
404
|
/**
|
|
413
405
|
* Custom template compiler. Receives the raw template source and returns a compiled EJS string.
|
|
414
|
-
* Useful for custom preprocessing before
|
|
406
|
+
* Useful for custom preprocessing before EJS compilation.
|
|
415
407
|
*/
|
|
416
408
|
compileTemplate?: (source: string) => string;
|
|
417
409
|
}
|
|
@@ -430,4 +422,4 @@ declare global {
|
|
|
430
422
|
}
|
|
431
423
|
}
|
|
432
424
|
|
|
433
|
-
export { type AlwaysProp as A,
|
|
425
|
+
export { type AlwaysProp as A, CircuitBreaker as C, type DeferredProp as D, type InertiaOptions as I, type LazyProp as L, type MergeProp as M, type OptionalProp as O, type PropCallback as P, type RetryOptions as R, type SecurityOptions as S, type ViteConfig as V, type PageProps as a, type Page as b, type SSROptions as c, type SSRResult as d, type CircuitBreakerOptions as e, type InertiaEngineOptions as f, type InertiaRequestHelper as g, type InertiaResponseHandler as h, type SSRResilienceOptions as i, calculateBackoff as j, shouldRetry as s };
|
package/dist/vite.d.mts
CHANGED
package/dist/vite.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arponascension/express-inertia",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Inertia.js adapter and middleware for Express.js — build SPAs with Vue 3, React, or Svelte using classic server-side routing,
|
|
3
|
+
"version": "1.6.0",
|
|
4
|
+
"description": "Inertia.js adapter and middleware for Express.js — build SPAs with Vue 3, React, or Svelte using classic server-side routing, EJS templates, Vite, and server-side rendering (SSR).",
|
|
5
5
|
"homepage": "https://github.com/arponascension/express-inertia#readme",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
"express-inertia",
|
|
53
53
|
"middleware",
|
|
54
54
|
"express-middleware",
|
|
55
|
-
"blade",
|
|
56
55
|
"ejs",
|
|
57
56
|
"vite",
|
|
58
57
|
"vite-plugin",
|
package/templates/base.ejs
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
|
|
6
6
|
<title inertia><%= typeof title !== 'undefined' ? title : (page && page.props && page.props.title ? page.props.title : 'App') %></title>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
<%- inertiaHead() %>
|
|
8
|
+
<%- viteReactRefresh() %>
|
|
9
|
+
<%- vite('src/main.js') %>
|
|
10
10
|
</head>
|
|
11
11
|
<body class="font-sans antialiased bg-gray-50 text-gray-900">
|
|
12
|
-
|
|
12
|
+
<%- inertia() %>
|
|
13
13
|
</body>
|
|
14
14
|
</html>
|