@open-xamu-co/firebase-nuxt 1.1.0 → 1.1.1-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/CHANGELOG.md +53 -0
- package/dist/module.json +1 -1
- package/dist/runtime/functions/utils/event.js +1 -1
- package/dist/runtime/functions/utils/search.js +2 -2
- package/dist/runtime/functions/utils/slugs.js +1 -1
- package/dist/runtime/server/api/all-collection-document.get.d.ts +1 -1
- package/dist/runtime/server/api/all-collection-document.get.js +3 -3
- package/dist/runtime/server/api/all-collection.get.js +3 -3
- package/dist/runtime/server/api/media.get.js +3 -3
- package/dist/runtime/server/utils/firestore.d.ts +1 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
Firebase nuxt
|
|
2
2
|
|
|
3
|
+
## [1.1.1-next.1](https://github.com/xamu-co/firebase-nuxt/compare/v1.1.0...v1.1.1-next.1) (2026-01-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* resolve firebase deploy sdk compatibility ([fd7df17](https://github.com/xamu-co/firebase-nuxt/commit/fd7df1779f772ddcc0ebd868a70f82633491d7ca))
|
|
9
|
+
* validate instance first ([7726ce7](https://github.com/xamu-co/firebase-nuxt/commit/7726ce71c80f0c3840c529a210871bf248dfec5f))
|
|
10
|
+
|
|
3
11
|
# [1.1.0](https://github.com/xamu-co/firebase-nuxt/compare/v1.0.0...v1.1.0) (2026-01-08)
|
|
4
12
|
|
|
5
13
|
|
|
@@ -15,6 +23,51 @@ Firebase nuxt
|
|
|
15
23
|
* conditional media handler ([d472288](https://github.com/xamu-co/firebase-nuxt/commit/d4722881de6b4b7238e3bcc3fd31378dd8fb1489))
|
|
16
24
|
* get instance documents & files ([4846801](https://github.com/xamu-co/firebase-nuxt/commit/4846801d6b80fb95fde8475943ef872351ba43ac))
|
|
17
25
|
|
|
26
|
+
# [1.0.0-next.5](https://github.com/xamu-co/firebase-nuxt/compare/v1.0.0-next.4...v1.0.0-next.5) (2026-01-08)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* remove problematic schema ([c53c195](https://github.com/xamu-co/firebase-nuxt/commit/c53c1952d5713e75479d4d32d99645d5fccb9a1f))
|
|
32
|
+
|
|
33
|
+
# [1.0.0-next.4](https://github.com/xamu-co/firebase-nuxt/compare/v1.0.0-next.3...v1.0.0-next.4) (2026-01-08)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* include missing distributables ([a455111](https://github.com/xamu-co/firebase-nuxt/commit/a455111cb9500bc5755590cdd45da4b6e46f8ee3))
|
|
39
|
+
|
|
40
|
+
# [1.0.0-next.3](https://github.com/xamu-co/firebase-nuxt/compare/v1.0.0-next.2...v1.0.0-next.3) (2026-01-08)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
* make stable ([38ba0fe](https://github.com/xamu-co/firebase-nuxt/commit/38ba0fea5aa365c9c5354df566d3181a3e716d5c))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Features
|
|
49
|
+
|
|
50
|
+
* conditional media handler ([d472288](https://github.com/xamu-co/firebase-nuxt/commit/d4722881de6b4b7238e3bcc3fd31378dd8fb1489))
|
|
51
|
+
|
|
52
|
+
# [1.0.0-next.2](https://github.com/xamu-co/firebase-nuxt/compare/v1.0.0-next.1...v1.0.0-next.2) (2026-01-08)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Features
|
|
56
|
+
|
|
57
|
+
* get instance documents & files ([4846801](https://github.com/xamu-co/firebase-nuxt/commit/4846801d6b80fb95fde8475943ef872351ba43ac))
|
|
58
|
+
|
|
59
|
+
# 1.0.0-next.1 (2026-01-08)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Bug Fixes
|
|
63
|
+
|
|
64
|
+
* include upload worker ([00facd4](https://github.com/xamu-co/firebase-nuxt/commit/00facd4048c90f6f363b61c452175c48b7e92bfa))
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### Features
|
|
68
|
+
|
|
69
|
+
* initial commit ([a3e9a1d](https://github.com/xamu-co/firebase-nuxt/commit/a3e9a1d81d2b947216c0c2c1d48f03bdd4c3acb7))
|
|
70
|
+
|
|
18
71
|
# 1.0.0 (2026-01-08)
|
|
19
72
|
|
|
20
73
|
|
package/dist/module.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { omit } from "lodash-es";
|
|
2
1
|
import {
|
|
3
2
|
onDocumentDeleted,
|
|
4
3
|
onDocumentCreated,
|
|
@@ -6,6 +5,7 @@ import {
|
|
|
6
5
|
} from "firebase-functions/v2/firestore";
|
|
7
6
|
import { onSchedule as onScheduleV2 } from "firebase-functions/v2/scheduler";
|
|
8
7
|
import { onTaskDispatched } from "firebase-functions/tasks";
|
|
8
|
+
import omit from "lodash-es/omit.js";
|
|
9
9
|
import { getFirebase } from "./firebase.js";
|
|
10
10
|
import { makeFunctionsLogger } from "./logger.js";
|
|
11
11
|
function getDocumentPath(collectionPath) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import words from "lodash-es/words";
|
|
2
|
-
import deburr from "lodash-es/deburr";
|
|
1
|
+
import words from "lodash-es/words.js";
|
|
2
|
+
import deburr from "lodash-es/deburr.js";
|
|
3
3
|
export function getWords(phrase) {
|
|
4
4
|
return words(deburr(phrase.toUpperCase())).map((word) => word.replace(/[^a-z0-9]/gi, ""));
|
|
5
5
|
}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @auth guest
|
|
5
5
|
*/
|
|
6
|
-
declare const _default: import("../types/index.js").CachedEventHandler<import("h3").EventHandlerRequest, Promise<void |
|
|
6
|
+
declare const _default: import("../types/index.js").CachedEventHandler<import("h3").EventHandlerRequest, Promise<void | FirebaseFirestore.DocumentData>>;
|
|
7
7
|
export default _default;
|
|
@@ -24,13 +24,13 @@ export default defineConditionallyCachedEventHandler(
|
|
|
24
24
|
}
|
|
25
25
|
let collectionRef = firebaseFirestore.collection(collectionId);
|
|
26
26
|
if (event.path.startsWith("/api/instance/all")) {
|
|
27
|
-
if (!
|
|
27
|
+
if (!currentInstanceRef) {
|
|
28
|
+
throw createError({ statusCode: 401, statusMessage: "Missing instance" });
|
|
29
|
+
} else if (!readInstanceCollection(collectionId, event.context)) {
|
|
28
30
|
throw createError({
|
|
29
31
|
statusCode: 401,
|
|
30
32
|
statusMessage: `Can't get "instance/${collectionId}" document`
|
|
31
33
|
});
|
|
32
|
-
} else if (!currentInstanceRef) {
|
|
33
|
-
throw createError({ statusCode: 401, statusMessage: "Missing instance" });
|
|
34
34
|
}
|
|
35
35
|
collectionRef = currentInstanceRef.collection(collectionId);
|
|
36
36
|
} else if (!readCollection(collectionId, event.context)) {
|
|
@@ -26,13 +26,13 @@ export default defineConditionallyCachedEventHandler(
|
|
|
26
26
|
}
|
|
27
27
|
let query = firebaseFirestore.collection(collectionId);
|
|
28
28
|
if (event.path.startsWith("/api/instance/all")) {
|
|
29
|
-
if (!
|
|
29
|
+
if (!currentInstanceRef) {
|
|
30
|
+
throw createError({ statusCode: 401, statusMessage: "Missing instance" });
|
|
31
|
+
} else if (!readInstanceCollection(collectionId, event.context)) {
|
|
30
32
|
throw createError({
|
|
31
33
|
statusCode: 401,
|
|
32
34
|
statusMessage: `Can't list "instance/${collectionId}"`
|
|
33
35
|
});
|
|
34
|
-
} else if (!currentInstanceRef) {
|
|
35
|
-
throw createError({ statusCode: 401, statusMessage: "Missing instance" });
|
|
36
36
|
}
|
|
37
37
|
query = currentInstanceRef.collection(collectionId);
|
|
38
38
|
} else if (!readCollection(collectionId, event.context)) {
|
|
@@ -29,13 +29,13 @@ const cachedBufferHandler = defineCachedFunction(
|
|
|
29
29
|
const [baseAndExtension] = path.split("?");
|
|
30
30
|
const [, collectionId, , fileOrSubCollectionId] = baseAndExtension.split("/");
|
|
31
31
|
if (collectionId === "instances" && !fileOrSubCollectionId.includes(".")) {
|
|
32
|
-
if (!
|
|
32
|
+
if (!currentInstanceRef) {
|
|
33
|
+
throw createError({ statusCode: 401, statusMessage: "Missing instance" });
|
|
34
|
+
} else if (!readInstanceCollection(fileOrSubCollectionId, event.context)) {
|
|
33
35
|
throw createError({
|
|
34
36
|
statusCode: 401,
|
|
35
37
|
statusMessage: `Can't get "instance/${fileOrSubCollectionId}" file`
|
|
36
38
|
});
|
|
37
|
-
} else if (!currentInstanceRef) {
|
|
38
|
-
throw createError({ statusCode: 401, statusMessage: "Missing instance" });
|
|
39
39
|
}
|
|
40
40
|
} else if (!readCollection(collectionId, event.context)) {
|
|
41
41
|
throw createError({
|
|
@@ -10,7 +10,7 @@ export declare function debugFirebaseServer<T extends EventHandlerRequest>(event
|
|
|
10
10
|
/**
|
|
11
11
|
* This one is used on api endpoints
|
|
12
12
|
*/
|
|
13
|
-
export declare function resolveServerDocumentRefs<T extends PseudoNode, R extends FirebaseDocument = FirebaseDocument>(event: H3Event, snapshot?: DocumentSnapshot<T>, collection?: string, withAuth?: boolean): Promise<R | undefined>;
|
|
13
|
+
export declare function resolveServerDocumentRefs<T extends PseudoNode, R extends FirebaseDocument = FirebaseDocument>(event: H3Event, snapshot?: DocumentSnapshot<T, R>, collection?: string, withAuth?: boolean): Promise<R | undefined>;
|
|
14
14
|
/**
|
|
15
15
|
* Resolve general refs
|
|
16
16
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-xamu-co/firebase-nuxt",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1-next.1",
|
|
4
4
|
"description": "Nuxt 3 module for the xamu project",
|
|
5
5
|
"author": "@xamu-co",
|
|
6
6
|
"type": "module",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@pinia/nuxt": "^0.11.0",
|
|
91
91
|
"firebase": "^11.0.2",
|
|
92
92
|
"firebase-admin": "^13.6.0",
|
|
93
|
-
"firebase-functions": "^
|
|
93
|
+
"firebase-functions": "^7.0.3",
|
|
94
94
|
"lodash-es": "^4.17.21",
|
|
95
95
|
"nuxt-csurf": "^1.6.5",
|
|
96
96
|
"pinia": "^3.0.2",
|
|
@@ -160,5 +160,6 @@
|
|
|
160
160
|
},
|
|
161
161
|
"browserslist": [
|
|
162
162
|
"defaults"
|
|
163
|
-
]
|
|
163
|
+
],
|
|
164
|
+
"stableVersion": "1.1.0"
|
|
164
165
|
}
|