@easy-cms/nuxt 0.63.0 → 0.65.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/dist/module.js +7 -1
- package/dist/runtime/admin.js +3 -1
- package/dist/runtime/handler.js +1 -0
- package/package.json +5 -5
package/dist/module.js
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
import { existsSync, readFileSync } from "fs";
|
|
3
3
|
import { createRequire } from "module";
|
|
4
4
|
import { dirname, isAbsolute, join, relative, resolve } from "path";
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
renderShell,
|
|
7
|
+
SECURITY_HEADERS,
|
|
8
|
+
SHELL_FILE,
|
|
9
|
+
STRICT_TRANSPORT_SECURITY
|
|
10
|
+
} from "@easy-cms/admin";
|
|
6
11
|
import {
|
|
7
12
|
applyPlugins,
|
|
8
13
|
CONFIG_FILE_NAMES,
|
|
@@ -117,6 +122,7 @@ declare module '${SERVER}' {
|
|
|
117
122
|
nitro.virtual[ADMIN_SHELL] = `export const basePath = ${JSON.stringify(adminPath)}
|
|
118
123
|
export const html = ${JSON.stringify(shell)}
|
|
119
124
|
export const headers = ${JSON.stringify(SECURITY_HEADERS)}
|
|
125
|
+
export const hsts = ${JSON.stringify(STRICT_TRANSPORT_SECURITY)}
|
|
120
126
|
export const reload = ${nuxt.options.dev ? JSON.stringify({ file: shellFile, options: shellOptions }) : "null"}
|
|
121
127
|
`;
|
|
122
128
|
nitro.publicAssets = [
|
package/dist/runtime/admin.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
2
|
import { renderShell } from "@easy-cms/admin";
|
|
3
3
|
import { defineEventHandler, getRequestURL, setResponseHeaders, setResponseStatus } from "h3";
|
|
4
|
-
import { basePath, headers, html, reload } from "#easy-cms-admin-shell";
|
|
4
|
+
import { basePath, headers, hsts, html, reload } from "#easy-cms-admin-shell";
|
|
5
5
|
var admin_default = defineEventHandler((event) => {
|
|
6
6
|
const url = getRequestURL(event);
|
|
7
7
|
setResponseHeaders(event, headers);
|
|
8
|
+
if (process.env.NODE_ENV === "production")
|
|
9
|
+
setResponseHeaders(event, { "strict-transport-security": hsts });
|
|
8
10
|
if (event.method !== "GET" && event.method !== "HEAD") {
|
|
9
11
|
setResponseStatus(event, 405);
|
|
10
12
|
setResponseHeaders(event, { allow: "GET, HEAD" });
|
package/dist/runtime/handler.js
CHANGED
|
@@ -11,6 +11,7 @@ function createHandler(config, options) {
|
|
|
11
11
|
const clientIps = /* @__PURE__ */ new WeakMap();
|
|
12
12
|
const api = createApiHandler(config, {
|
|
13
13
|
basePath: options.basePath,
|
|
14
|
+
trustProxy: options.trustProxy,
|
|
14
15
|
getClientIp: (request) => clientIps.get(request)
|
|
15
16
|
});
|
|
16
17
|
return defineEventHandler(async (event) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easy-cms/nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.65.0",
|
|
4
4
|
"description": "Nuxt module for Easy CMS",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@nuxt/kit": "^4.5.2",
|
|
22
22
|
"h3": "^1.15.11",
|
|
23
|
-
"@easy-cms/admin": "^0.
|
|
23
|
+
"@easy-cms/admin": "^0.65.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"nuxt": "^4.0.0",
|
|
27
|
-
"@easy-cms/core": "^0.
|
|
27
|
+
"@easy-cms/core": "^0.65.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@nuxt/schema": "^4.5.2",
|
|
31
31
|
"@nuxt/test-utils": "^4.3.2",
|
|
32
32
|
"nuxt": "^4.5.2",
|
|
33
33
|
"vue": "^3.5.0",
|
|
34
|
-
"@easy-cms/core": "^0.
|
|
35
|
-
"@easy-cms/db-sqlite": "^0.
|
|
34
|
+
"@easy-cms/core": "^0.65.0",
|
|
35
|
+
"@easy-cms/db-sqlite": "^0.65.0"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|