astro-loader-pocketbase 1.0.0 → 1.0.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 +7 -7
- package/src/pocketbase-loader.ts +9 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro-loader-pocketbase",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A content loader for Astro that uses the PocketBase API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Luis Wolf <development@pawcode.de> (https://pawcode.de)",
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
"astro": "^5.0.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@eslint/js": "^9.
|
|
25
|
-
"@stylistic/eslint-plugin": "^2.
|
|
26
|
-
"@types/node": "^22.10.
|
|
27
|
-
"astro": "^5.0.
|
|
28
|
-
"eslint": "^9.
|
|
24
|
+
"@eslint/js": "^9.17.0",
|
|
25
|
+
"@stylistic/eslint-plugin": "^2.12.1",
|
|
26
|
+
"@types/node": "^22.10.2",
|
|
27
|
+
"astro": "^5.0.5",
|
|
28
|
+
"eslint": "^9.17.0",
|
|
29
29
|
"globals": "^15.13.0",
|
|
30
30
|
"husky": "^9.1.7",
|
|
31
31
|
"typescript": "^5.7.2",
|
|
32
|
-
"typescript-eslint": "^8.
|
|
32
|
+
"typescript-eslint": "^8.18.0"
|
|
33
33
|
},
|
|
34
34
|
"keywords": [
|
|
35
35
|
"astro",
|
package/src/pocketbase-loader.ts
CHANGED
|
@@ -18,9 +18,11 @@ export function pocketbaseLoader(options: PocketBaseLoaderOptions): Loader {
|
|
|
18
18
|
// Check if the version has changed to force an update
|
|
19
19
|
const lastVersion = context.meta.get("version");
|
|
20
20
|
if (lastVersion !== packageJson.version) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
if (lastVersion) {
|
|
22
|
+
context.logger.info(
|
|
23
|
+
`PocketBase loader was updated from ${lastVersion} to ${packageJson.version}. All entries will be loaded again.`
|
|
24
|
+
);
|
|
25
|
+
}
|
|
24
26
|
|
|
25
27
|
options.forceUpdate = true;
|
|
26
28
|
}
|
|
@@ -77,7 +79,10 @@ export function pocketbaseLoader(options: PocketBaseLoaderOptions): Loader {
|
|
|
77
79
|
context.meta.set("has-updated-column", `${hasUpdatedColumn}`);
|
|
78
80
|
|
|
79
81
|
// Set the last modified date to the current date
|
|
80
|
-
context.meta.set(
|
|
82
|
+
context.meta.set(
|
|
83
|
+
"last-modified",
|
|
84
|
+
new Date().toISOString().replace("T", " ")
|
|
85
|
+
);
|
|
81
86
|
|
|
82
87
|
context.meta.set("version", packageJson.version);
|
|
83
88
|
},
|