astro-integration-pocketbase 1.4.0 → 1.4.2-next.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 CHANGED
@@ -1,10 +1,27 @@
1
1
  {
2
2
  "name": "astro-integration-pocketbase",
3
- "version": "1.4.0",
3
+ "version": "1.4.2-next.1",
4
4
  "description": "An Astro integration to support developers working with astro-loader-pocketbase.",
5
+ "keywords": [
6
+ "astro",
7
+ "astro-integration",
8
+ "pocketbase",
9
+ "withastro",
10
+ "devtools",
11
+ "dev-overlay",
12
+ "dev-toolbar",
13
+ "tooling"
14
+ ],
15
+ "homepage": "https://github.com/pawcoding/astro-integration-pocketbase",
16
+ "bugs": {
17
+ "url": "https://github.com/pawcoding/astro-integration-pocketbase/issues"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/pawcoding/astro-integration-pocketbase.git"
22
+ },
5
23
  "license": "MIT",
6
24
  "author": "Luis Wolf <development@pawcode.de> (https://pawcode.de)",
7
- "homepage": "https://github.com/pawcoding/astro-integration-pocketbase",
8
25
  "type": "module",
9
26
  "exports": {
10
27
  ".": "./index.ts"
@@ -14,33 +31,37 @@
14
31
  "index.ts"
15
32
  ],
16
33
  "scripts": {
17
- "lint": "npx eslint",
34
+ "format": "npx prettier . --write --cache",
35
+ "format:check": "npx prettier . --check --cache",
36
+ "lint": "npx eslint --cache",
37
+ "lint:fix": "npx eslint --cache --fix",
18
38
  "prepare": "husky"
19
39
  },
20
- "peerDependencies": {
21
- "astro": "^5.0.0",
22
- "eventsource": "^3.0.0"
23
- },
24
40
  "devDependencies": {
25
- "@eslint/js": "^9.19.0",
26
- "@stylistic/eslint-plugin": "^3.0.1",
27
- "@types/node": "^22.13.0",
28
- "astro": "^5.2.3",
29
- "eslint": "^9.19.0",
41
+ "@commitlint/cli": "^19.7.1",
42
+ "@commitlint/config-conventional": "^19.7.1",
43
+ "@eslint/js": "^9.20.0",
44
+ "@stylistic/eslint-plugin": "^3.1.0",
45
+ "@types/node": "^22.13.4",
46
+ "astro": "^5.3.0",
47
+ "eslint": "^9.20.1",
48
+ "eslint-config-prettier": "^10.0.1",
30
49
  "eventsource": "^3.0.5",
31
- "globals": "^15.14.0",
50
+ "globals": "^15.15.0",
32
51
  "husky": "^9.1.7",
52
+ "lint-staged": "^15.4.3",
53
+ "prettier": "^3.5.1",
54
+ "prettier-plugin-organize-imports": "^4.1.0",
55
+ "prettier-plugin-packagejson": "^2.5.8",
33
56
  "typescript": "^5.7.3",
34
- "typescript-eslint": "^8.22.0"
57
+ "typescript-eslint": "^8.24.0"
35
58
  },
36
- "keywords": [
37
- "astro",
38
- "astro-integration",
39
- "pocketbase",
40
- "withastro",
41
- "devtools",
42
- "dev-overlay",
43
- "dev-toolbar",
44
- "tooling"
45
- ]
59
+ "peerDependencies": {
60
+ "astro": "^5.0.0",
61
+ "eventsource": "^3.0.0"
62
+ },
63
+ "publishConfig": {
64
+ "access": "public",
65
+ "provenance": true
66
+ }
46
67
  }
@@ -7,6 +7,12 @@ export const onRequest = defineMiddleware(async (context, next) => {
7
7
  const entities = findEntitiesRecursive(props).map((entity) => entity.data);
8
8
 
9
9
  const response = await next();
10
+ const contentType = response.headers.get("content-type");
11
+ if (!contentType?.includes("text/html")) {
12
+ // Pass through non-HTML responses unchanged
13
+ return response;
14
+ }
15
+
10
16
  const body = await response.text();
11
17
 
12
18
  // Append the entities to the <head>
@@ -14,7 +14,11 @@ export function pocketbaseIntegration(
14
14
  return {
15
15
  name: "pocketbase-integration",
16
16
  hooks: {
17
- "astro:config:setup": ({ addDevToolbarApp, addMiddleware, command }): void => {
17
+ "astro:config:setup": ({
18
+ addDevToolbarApp,
19
+ addMiddleware,
20
+ command
21
+ }): void => {
18
22
  // This integration is only available in dev mode
19
23
  if (command !== "dev") {
20
24
  return;