astro-integration-pocketbase 3.0.0 → 3.0.3-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,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-integration-pocketbase",
3
- "version": "3.0.0",
3
+ "version": "3.0.3-next.1",
4
4
  "description": "An Astro integration to support developers working with astro-loader-pocketbase.",
5
5
  "keywords": [
6
6
  "astro",
@@ -40,24 +40,24 @@
40
40
  "lint": "oxlint --type-aware --type-check",
41
41
  "lint:fix": "oxlint --type-aware --type-check --fix",
42
42
  "prepare": "husky",
43
- "typecheck": "npx @typescript/native-preview --noEmit"
43
+ "typecheck": "npx @typescript/native-preview --noEmit -p src/tsconfig.json"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@commitlint/cli": "20.5.0",
47
47
  "@commitlint/config-conventional": "20.5.0",
48
48
  "@types/node": "24.12.0",
49
- "astro": "6.0.8",
49
+ "astro": "6.1.5",
50
50
  "eventsource": "4.1.0",
51
- "globals": "17.4.0",
51
+ "globals": "17.5.0",
52
52
  "husky": "9.1.7",
53
53
  "lint-staged": "16.4.0",
54
- "oxfmt": "0.41.0",
55
- "oxlint": "1.56.0",
56
- "oxlint-tsgolint": "0.17.1"
54
+ "oxfmt": "0.44.0",
55
+ "oxlint": "1.59.0",
56
+ "oxlint-tsgolint": "0.20.0"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "astro": "^6.0.0",
60
60
  "eventsource": "^4.0.0"
61
61
  },
62
- "packageManager": "npm@11.12.0"
62
+ "packageManager": "npm@11.12.1"
63
63
  }
@@ -144,7 +144,7 @@ async function handleConnectEvent(
144
144
  Authorization: superuserToken || ""
145
145
  },
146
146
  body: JSON.stringify({
147
- clientId: clientId,
147
+ clientId,
148
148
  subscriptions: remoteCollections.map((collection) => `${collection}/*`)
149
149
  })
150
150
  });
@@ -33,7 +33,7 @@ export function handleRefreshCollections({
33
33
  loaders: ["pocketbase-loader"],
34
34
  context: {
35
35
  source: "astro-integration-pocketbase",
36
- force: force
36
+ force
37
37
  }
38
38
  });
39
39
 
@@ -35,20 +35,18 @@ function createEntity(data: Entity, baseUrl: string): string {
35
35
  <div class="entity">
36
36
  <pre>${JSON.stringify(data, undefined, 2).replaceAll("<", "&lt;")}</pre>
37
37
 
38
- ${
39
- baseUrl
40
- ? /* HTML */ `
38
+ ${baseUrl
39
+ ? /* HTML */ `
41
40
  <astro-dev-toolbar-button
42
41
  size="small"
43
42
  button-style="purple"
44
43
  title="View in PocketBase"
45
- onclick="window.open('${baseUrl}/_/#/collections?collection=${data.collectionId}&recordId=${data.id}', '_blank')"
44
+ onclick="window.open('${baseUrl}/_/#/collections?collection=${data.collectionId}&recordId=${data.id}&record=${data.id}', '_blank')"
46
45
  >
47
46
  View in PocketBase
48
47
  </astro-dev-toolbar-button>
49
48
  `
50
- : ""
51
- }
49
+ : ""}
52
50
  </div>
53
51
  </astro-dev-toolbar-card>
54
52
  `;
@@ -59,9 +59,8 @@ export function createHeader(
59
59
  </astro-dev-toolbar-badge>
60
60
 
61
61
  <div class="actions">
62
- ${
63
- realtime
64
- ? /* HTML */ `
62
+ ${realtime
63
+ ? /* HTML */ `
65
64
  <div class="toggle-container">
66
65
  <label
67
66
  for="real-time"
@@ -72,11 +71,9 @@ export function createHeader(
72
71
  <!-- real-time-toggle -->
73
72
  </div>
74
73
  `
75
- : ""
76
- }
77
- ${
78
- hasContentLoader
79
- ? /* HTML */ `
74
+ : ""}
75
+ ${hasContentLoader
76
+ ? /* HTML */ `
80
77
  <astro-dev-toolbar-button
81
78
  id="refresh-content"
82
79
  size="small"
@@ -86,8 +83,7 @@ export function createHeader(
86
83
  Refresh content
87
84
  </astro-dev-toolbar-button>
88
85
  `
89
- : ""
90
- }
86
+ : ""}
91
87
  </div>
92
88
  `;
93
89
 
@@ -75,11 +75,9 @@ export function initToolbar(
75
75
  <hr />
76
76
 
77
77
  <main>
78
- ${
79
- entities.length > 0
80
- ? createEntities(entities, options.baseUrl)
81
- : createPlaceholder()
82
- }
78
+ ${entities.length > 0
79
+ ? createEntities(entities, options.baseUrl)
80
+ : createPlaceholder()}
83
81
  </main>
84
82
  `);
85
83
 
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "../tsconfig.json",
3
+ "include": ["./**/*"],
4
+ "compilerOptions": {
5
+ "noUncheckedIndexedAccess": true
6
+ }
7
+ }
@@ -36,6 +36,9 @@ export function mapCollectionsToWatch(
36
36
  const collectionsMap = new Map<string, Array<string>>();
37
37
  for (const localCollection in collectionsToWatch) {
38
38
  const watch = collectionsToWatch[localCollection];
39
+ if (!watch) {
40
+ continue;
41
+ }
39
42
 
40
43
  // Check if collection should be watched by itself
41
44
  if (watch === true) {