@intuitionrobotics/firebase 0.45.1 → 0.46.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/app-backend/FirebaseModule.d.ts +1 -4
- package/app-backend/FirebaseModule.js +11 -28
- package/app-backend/FirebaseModule.js.map +1 -1
- package/app-backend/auth/FirebaseBaseWrapper.d.ts +1 -1
- package/app-backend/auth/FirebaseBaseWrapper.js +2 -19
- package/app-backend/auth/FirebaseBaseWrapper.js.map +1 -1
- package/app-backend/auth/FirebaseSession_Admin.js +3 -20
- package/app-backend/auth/FirebaseSession_Admin.js.map +1 -1
- package/app-backend/auth/FirebaseSession_UserPassword.js +0 -22
- package/app-backend/auth/FirebaseSession_UserPassword.js.map +1 -1
- package/app-backend/auth/firebase-session.d.ts +2 -2
- package/app-backend/auth/firebase-session.js +2 -19
- package/app-backend/auth/firebase-session.js.map +1 -1
- package/app-backend/database/DatabaseWrapper.d.ts +1 -1
- package/app-backend/database/DatabaseWrapper.js +10 -26
- package/app-backend/database/DatabaseWrapper.js.map +1 -1
- package/app-backend/database/types.js +0 -17
- package/app-backend/database/types.js.map +1 -1
- package/app-backend/firestore/FirestoreCollection.d.ts +4 -6
- package/app-backend/firestore/FirestoreCollection.js +7 -22
- package/app-backend/firestore/FirestoreCollection.js.map +1 -1
- package/app-backend/firestore/FirestoreInterface.d.ts +1 -1
- package/app-backend/firestore/FirestoreInterface.js +10 -25
- package/app-backend/firestore/FirestoreInterface.js.map +1 -1
- package/app-backend/firestore/FirestoreTransaction.d.ts +1 -1
- package/app-backend/firestore/FirestoreTransaction.js +6 -22
- package/app-backend/firestore/FirestoreTransaction.js.map +1 -1
- package/app-backend/firestore/FirestoreV2Collection.js +0 -17
- package/app-backend/firestore/FirestoreV2Collection.js.map +1 -1
- package/app-backend/firestore/FirestoreWrapper.js.map +1 -1
- package/app-backend/firestore/types.d.ts +9 -9
- package/app-backend/firestore/types.js +0 -17
- package/app-backend/firestore/types.js.map +1 -1
- package/app-backend/functions/firebase-function.d.ts +2 -1
- package/app-backend/functions/firebase-function.js +17 -13
- package/app-backend/functions/firebase-function.js.map +1 -1
- package/app-backend/push/PushMessagesWrapper.d.ts +1 -1
- package/app-backend/push/PushMessagesWrapper.js +0 -17
- package/app-backend/push/PushMessagesWrapper.js.map +1 -1
- package/app-backend/push/types.js +0 -17
- package/app-backend/push/types.js.map +1 -1
- package/app-backend/storage/StorageWrapper.js +8 -24
- package/app-backend/storage/StorageWrapper.js.map +1 -1
- package/app-backend/storage/types.js +0 -17
- package/app-backend/storage/types.js.map +1 -1
- package/app-frontend/FirebaseModule.d.ts +2 -5
- package/app-frontend/FirebaseModule.js +6 -25
- package/app-frontend/FirebaseModule.js.map +1 -1
- package/app-frontend/analytics/AnalyticsModule.d.ts +1 -1
- package/app-frontend/analytics/AnalyticsModule.js +5 -21
- package/app-frontend/analytics/AnalyticsModule.js.map +1 -1
- package/app-frontend/analytics/AnalyticsWrapper.d.ts +1 -1
- package/app-frontend/analytics/AnalyticsWrapper.js +2 -20
- package/app-frontend/analytics/AnalyticsWrapper.js.map +1 -1
- package/app-frontend/analytics/types.js +0 -18
- package/app-frontend/analytics/types.js.map +1 -1
- package/app-frontend/auth/FirebaseSession.d.ts +2 -5
- package/app-frontend/auth/FirebaseSession.js +5 -25
- package/app-frontend/auth/FirebaseSession.js.map +1 -1
- package/app-frontend/auth/SwFirebaseSession.d.ts +1 -4
- package/app-frontend/auth/SwFirebaseSession.js +2 -21
- package/app-frontend/auth/SwFirebaseSession.js.map +1 -1
- package/app-frontend/database/DatabaseWrapper.d.ts +1 -1
- package/app-frontend/database/DatabaseWrapper.js +9 -25
- package/app-frontend/database/DatabaseWrapper.js.map +1 -1
- package/app-frontend/database/types.js +0 -17
- package/app-frontend/database/types.js.map +1 -1
- package/app-frontend/messaging/MessagingWrapper.d.ts +1 -1
- package/app-frontend/messaging/MessagingWrapper.js +2 -19
- package/app-frontend/messaging/MessagingWrapper.js.map +1 -1
- package/app-frontend/messaging/SwMessagingWrapper.d.ts +1 -1
- package/app-frontend/messaging/SwMessagingWrapper.js +2 -20
- package/app-frontend/messaging/SwMessagingWrapper.js.map +1 -1
- package/app-frontend/messaging/types.js +0 -17
- package/app-frontend/messaging/types.js.map +1 -1
- package/index.d.ts +0 -1
- package/index.js +0 -29
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/shared/types.d.ts +1 -4
- package/shared/types.js +0 -17
- package/shared/types.js.map +1 -1
- package/backend-functions.d.ts +0 -1
- package/backend-functions.js +0 -31
- package/backend-functions.js.map +0 -1
- package/backend.d.ts +0 -13
- package/backend.js +0 -44
- package/backend.js.map +0 -1
- package/frontend.d.ts +0 -4
- package/frontend.js +0 -35
- package/frontend.js.map +0 -1
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Firebase is a simpler Typescript wrapper to all of firebase services.
|
|
4
|
-
*
|
|
5
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
3
|
exports.FirestoreInterface = void 0;
|
|
21
|
-
const
|
|
22
|
-
const
|
|
4
|
+
const types_1 = require("../../shared/types");
|
|
5
|
+
const exceptions_1 = require("@intuitionrobotics/ts-common/core/exceptions");
|
|
6
|
+
const tools_1 = require("@intuitionrobotics/ts-common/utils/tools");
|
|
7
|
+
const object_tools_1 = require("@intuitionrobotics/ts-common/utils/object-tools");
|
|
23
8
|
class FirestoreInterface {
|
|
24
9
|
static buildQuery(collection, query) {
|
|
25
10
|
let myQuery = collection;
|
|
@@ -36,7 +21,7 @@ class FirestoreInterface {
|
|
|
36
21
|
const valueType = typeof _whereValue;
|
|
37
22
|
if (Array.isArray(_whereValue)) {
|
|
38
23
|
if (_whereValue.length === 0 || _whereValue.length > 10)
|
|
39
|
-
throw new
|
|
24
|
+
throw new exceptions_1.BadImplementationException("While querying in an array you can only provide one or more values to query by and not more than 10... this " +
|
|
40
25
|
"is due to Firestore limitation... ");
|
|
41
26
|
if (_whereValue.length === 1)
|
|
42
27
|
return _query.where(whereKey, 'array-contains', _whereValue[0]);
|
|
@@ -44,7 +29,7 @@ class FirestoreInterface {
|
|
|
44
29
|
}
|
|
45
30
|
if (this.isQueryObject(_whereValue)) {
|
|
46
31
|
// @ts-ignore
|
|
47
|
-
return _query.where(whereKey,
|
|
32
|
+
return _query.where(whereKey, types_1.ComparatorMap[Object.keys(_whereValue)[0]], Object.values(_whereValue)[0]);
|
|
48
33
|
}
|
|
49
34
|
if (valueType === "string" || valueType === "number" || valueType === "boolean")
|
|
50
35
|
return ___query.where(whereKey, "==", _whereValue);
|
|
@@ -53,7 +38,7 @@ class FirestoreInterface {
|
|
|
53
38
|
return processObject(__query, `${whereKey}.${key}`, _whereValue[key]);
|
|
54
39
|
}, ___query);
|
|
55
40
|
}
|
|
56
|
-
throw new
|
|
41
|
+
throw new exceptions_1.ImplementationMissingException(`Could not compose where clause for '${whereKey}' with value type '${valueType}'in query: ${tools_1.__stringify(___query)}`);
|
|
57
42
|
};
|
|
58
43
|
return processObject(_query, whereField, whereValue);
|
|
59
44
|
}, myQuery);
|
|
@@ -80,16 +65,16 @@ class FirestoreInterface {
|
|
|
80
65
|
}
|
|
81
66
|
static assertUniqueDocument(results, query, collectionName) {
|
|
82
67
|
if (results.length > 1)
|
|
83
|
-
throw new
|
|
68
|
+
throw new exceptions_1.BadImplementationException(`too many results for query: ${tools_1.__stringify(query)} in collection: ${collectionName}`);
|
|
84
69
|
if (results.length === 0)
|
|
85
70
|
return;
|
|
86
71
|
return results[0];
|
|
87
72
|
}
|
|
88
73
|
;
|
|
89
74
|
static buildUniqueQuery(collection, instance) {
|
|
90
|
-
|
|
75
|
+
object_tools_1._keys(instance).forEach((key) => {
|
|
91
76
|
if (instance[key] === undefined || instance[key] === null) {
|
|
92
|
-
throw new
|
|
77
|
+
throw new exceptions_1.BadImplementationException(`No where properties are allowed to be null or undefined.\nWhile querying collection '${collection.name}' we found property '${key}' to be '${instance[key]}'`);
|
|
93
78
|
}
|
|
94
79
|
});
|
|
95
80
|
const where = collection.externalUniqueFilter(instance);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FirestoreInterface.js","sourceRoot":"","sources":["../../../src/main/app-backend/firestore/FirestoreInterface.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FirestoreInterface.js","sourceRoot":"","sources":["../../../src/main/app-backend/firestore/FirestoreInterface.ts"],"names":[],"mappings":";;;AAMA,8CAAkE;AAClE,6EAA0H;AAC1H,oEAAuE;AACvE,kFAAwE;AAExE,MAAa,kBAAkB;IAE9B,MAAM,CAAC,UAAU,CAAsB,UAAqC,EAAE,KAA4B;QACzG,IAAI,OAAO,GAAe,UAAU,CAAC;QACrC,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM;YACxB,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAkB,CAAC,CAAC;QAEvD,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE;YACzB,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC;YAChC,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,MAA2B,EAAE,WAAW,EAAE,EAAE;gBACtF,MAAM,UAAU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AK,CAAC;YACjB,UAAU,CAAC,MAAM,CAAC;YAClB,UAAU,CAAC,KAAK,CAAC;YACjB,UAAU,CAAC,MAAM,CAAC;YAClB,UAAU,CAAC,MAAM,CAAC;YAClB,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IACrB,CAAC;IAED,MAAM,CAAC,oBAAoB,CAAC,OAA8C,EAAE,KAA0B,EAAE,cAAsB;QAC7H,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;YACrB,MAAM,IAAI,uCAA0B,CAAC,+BAA+B,mBAAW,CAAC,KAAK,CAAC,mBAAmB,cAAc,EAAE,CAAC,CAAC;QAE5H,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YACvB,OAAO;QAER,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC;IAAA,CAAC;IAEF,MAAM,CAAC,gBAAgB,CAAsB,UAAqC,EAAE,QAAc;QACjG,oBAAK,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YAC/B,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,SAAS,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE;gBAC1D,MAAM,IAAI,uCAA0B,CACnC,wFAAwF,UAAU,CAAC,IAAI,wBAAwB,GAAG,YAAY,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;aAChK;QACF,CAAC,CAAC,CAAC;QAEH,MAAM,KAAK,GAAG,UAAU,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;QACxD,OAAO,EAAC,KAAK,EAAC,CAAC;IAChB,CAAC;CACD;AAlGD,gDAkGC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as admin from "firebase-admin";
|
|
2
2
|
import { firestore } from "firebase-admin";
|
|
3
3
|
import { FirestoreCollection } from "./FirestoreCollection";
|
|
4
|
-
import { Subset } from "@intuitionrobotics/ts-common";
|
|
5
4
|
import { FirestoreQuery } from "../../shared/types";
|
|
6
5
|
import { SetOptions } from "firebase-admin/firestore";
|
|
6
|
+
import { Subset } from "@intuitionrobotics/ts-common/utils/types";
|
|
7
7
|
import Transaction = firestore.Transaction;
|
|
8
8
|
export declare class FirestoreTransaction {
|
|
9
9
|
private transaction;
|
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Firebase is a simpler Typescript wrapper to all of firebase services.
|
|
4
|
-
*
|
|
5
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
20
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
21
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -27,8 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
27
10
|
};
|
|
28
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
12
|
exports.FirestoreTransaction = void 0;
|
|
30
|
-
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
31
13
|
const FirestoreInterface_1 = require("./FirestoreInterface");
|
|
14
|
+
const exceptions_1 = require("@intuitionrobotics/ts-common/core/exceptions");
|
|
15
|
+
const merge_tools_1 = require("@intuitionrobotics/ts-common/utils/merge-tools");
|
|
32
16
|
class FirestoreTransaction {
|
|
33
17
|
constructor(transaction) {
|
|
34
18
|
this.transaction = transaction;
|
|
@@ -106,7 +90,7 @@ class FirestoreTransaction {
|
|
|
106
90
|
upsertAll(collection, instances) {
|
|
107
91
|
return __awaiter(this, void 0, void 0, function* () {
|
|
108
92
|
if (instances.length > 500)
|
|
109
|
-
throw new
|
|
93
|
+
throw new exceptions_1.BadImplementationException('Firestore transaction supports maximum 500 at a time');
|
|
110
94
|
return (yield this.upsertAll_Read(collection, instances))();
|
|
111
95
|
});
|
|
112
96
|
}
|
|
@@ -125,9 +109,9 @@ class FirestoreTransaction {
|
|
|
125
109
|
return __awaiter(this, void 0, void 0, function* () {
|
|
126
110
|
const doc = yield this._queryItem(collection, instance);
|
|
127
111
|
if (!doc)
|
|
128
|
-
throw new
|
|
112
|
+
throw new exceptions_1.BadImplementationException(`Patching a non existent doc for query ${FirestoreInterface_1.FirestoreInterface.buildUniqueQuery(collection, instance)}`);
|
|
129
113
|
return () => {
|
|
130
|
-
const patchedInstance =
|
|
114
|
+
const patchedInstance = merge_tools_1.merge(doc.data(), instance);
|
|
131
115
|
this.transaction.set(doc.ref, patchedInstance);
|
|
132
116
|
return patchedInstance;
|
|
133
117
|
};
|
|
@@ -142,7 +126,7 @@ class FirestoreTransaction {
|
|
|
142
126
|
return __awaiter(this, void 0, void 0, function* () {
|
|
143
127
|
const docs = yield this._query(collection, ourQuery);
|
|
144
128
|
if (docs.length > 500)
|
|
145
|
-
throw new
|
|
129
|
+
throw new exceptions_1.BadImplementationException(`Trying to delete ${docs.length} documents. Not allowed more then 5oo in a single transaction`);
|
|
146
130
|
return () => {
|
|
147
131
|
const toReturn = docs.map(doc => doc.data());
|
|
148
132
|
docs.forEach((doc) => this.transaction.delete(doc.ref));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FirestoreTransaction.js","sourceRoot":"","sources":["../../../src/main/app-backend/firestore/FirestoreTransaction.ts"],"names":[],"m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E,QAAc,EAAE,EAAU;QACzF,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC5E,CAAC;IAED,cAAc;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;CACJ;AArKD,oDAqKC"}
|
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Firebase is a simpler Typescript wrapper to all of firebase services.
|
|
4
|
-
*
|
|
5
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
3
|
exports.enhanceCollection = void 0;
|
|
21
4
|
const FirestoreInterface_1 = require("./FirestoreInterface");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FirestoreV2Collection.js","sourceRoot":"","sources":["../../../src/main/app-backend/firestore/FirestoreV2Collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FirestoreV2Collection.js","sourceRoot":"","sources":["../../../src/main/app-backend/firestore/FirestoreV2Collection.ts"],"names":[],"mappings":";;;AAEA,6DAAwD;AAQjD,MAAM,iBAAiB,GAAG,CAAsB,UAAqC,EAA+B,EAAE;IACzH,MAAM,aAAa,GAAG,UAAyC,CAAC;IAChE,aAAa,CAAC,UAAU,GAAG,CAAC,QAA+B,EAAe,EAAE;QACxE,OAAO,uCAAkB,CAAC,UAAU,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC/D,CAAC,CAAC;IAEF,OAAO,aAAa,CAAC;AACzB,CAAC,CAAC;AAPW,QAAA,iBAAiB,qBAO5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FirestoreWrapper.js","sourceRoot":"","sources":["../../../src/main/app-backend/firestore/FirestoreWrapper.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA0D;AAI1D,qEAAgE;AAChE,wDAA2E;AAC3E,mEAAiF;
|
|
1
|
+
{"version":3,"file":"FirestoreWrapper.js","sourceRoot":"","sources":["../../../src/main/app-backend/firestore/FirestoreWrapper.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA0D;AAI1D,qEAAgE;AAChE,wDAA2E;AAC3E,mEAAiF;AAEjF,MAAa,gBACT,SAAQ,yCAAmB;IAM3B,YAAY,eAA0C;QAClD,KAAK,CAAC,eAAe,CAAC,CAAC;QAJV,gBAAW,GAA2D,EAAE,CAAC;QACzE,kBAAa,GAA6D,EAAE,CAAC;QAI1F,IAAI,CAAC,SAAS,GAAG,wBAAY,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;IACtD,CAAC;IAEM,aAAa,CAAsB,IAAY,EAAE,kBAAqC;QACzF,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,UAAU;YACV,OAAO,UAAU,CAAC;QAEtB,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,yCAAmB,CAAO,IAAI,EAAE,IAAI,EAAE,kBAAkB,CAAC,CAAC;IAClG,CAAC;IAEM,eAAe,CAAsB,IAAY;QACpD,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,UAAU;YACV,OAAO,UAAU,CAAC;QAEtB,MAAM,mBAAmB,GAAG,yCAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAA8B,CAA+B,CAAC;QAC1I,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,mBAAmB,CAAC;IAC1D,CAAC;IAED,cAAc;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAEY,gBAAgB,CAAC,IAAY;;YACtC,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;QAChD,CAAC;KAAA;IAEY,eAAe;;YACxB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,eAAe;gBAC/B,OAAO,EAAE,CAAC;YAEd,OAAO,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,CAAC;QAC5C,CAAC;KAAA;CACJ;AA3CD,4CA2CC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare type FirestoreType_Collection<T extends any = any> =
|
|
3
|
-
export declare type FirestoreType_QueryDocumentSnapshot<T extends any = any> =
|
|
4
|
-
export declare type FirestoreType_DocumentSnapshot<T extends any = any> =
|
|
5
|
-
export declare type FirestoreType_QuerySnapshot<T> =
|
|
6
|
-
export declare type FirestoreType_Query =
|
|
7
|
-
export declare type FirestoreType_DocumentReference =
|
|
8
|
-
export declare type FirestoreType =
|
|
9
|
-
export declare type FirestoreType_Transaction =
|
|
1
|
+
import { firestore } from "firebase-admin";
|
|
2
|
+
export declare type FirestoreType_Collection<T extends any = any> = firestore.CollectionReference<T>;
|
|
3
|
+
export declare type FirestoreType_QueryDocumentSnapshot<T extends any = any> = firestore.QueryDocumentSnapshot<T>;
|
|
4
|
+
export declare type FirestoreType_DocumentSnapshot<T extends any = any> = firestore.DocumentSnapshot<T>;
|
|
5
|
+
export declare type FirestoreType_QuerySnapshot<T> = firestore.QuerySnapshot<T>;
|
|
6
|
+
export declare type FirestoreType_Query = firestore.Query;
|
|
7
|
+
export declare type FirestoreType_DocumentReference = firestore.DocumentReference;
|
|
8
|
+
export declare type FirestoreType = firestore.Firestore;
|
|
9
|
+
export declare type FirestoreType_Transaction = firestore.Transaction;
|
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Firebase is a simpler Typescript wrapper to all of firebase services.
|
|
4
|
-
*
|
|
5
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
3
|
// export type FirestoreType_Collection = admin.firestore.CollectionReference | firebase.firestore.CollectionReference;
|
|
21
4
|
// export type FirestoreType_DocumentSnapshot = admin.firestore.QueryDocumentSnapshot | firebase.firestore.QueryDocumentSnapshot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/main/app-backend/firestore/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/main/app-backend/firestore/types.ts"],"names":[],"mappings":";;AAWA,uHAAuH;AACvH,iIAAiI;AACjI,mJAAmJ;AACnJ,0HAA0H;AAC1H,8JAA8J;AAC9J,wGAAwG;AACxG,EAAE"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as functions from "firebase-functions";
|
|
2
2
|
import { EventContext, HttpsFunction, RuntimeOptions } from "firebase-functions";
|
|
3
|
+
import { Module } from "@intuitionrobotics/ts-common/core/module";
|
|
3
4
|
import { Express, Request, Response } from "express";
|
|
4
|
-
import { Module, StringMap } from "@intuitionrobotics/ts-common";
|
|
5
5
|
import { ObjectMetadata } from "firebase-functions/lib/v1/providers/storage";
|
|
6
|
+
import { StringMap } from "@intuitionrobotics/ts-common/utils/types";
|
|
6
7
|
export interface FirebaseFunctionInterface {
|
|
7
8
|
getFunction(): HttpsFunction;
|
|
8
9
|
}
|
|
@@ -11,8 +11,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Firebase_PubSubFunction = exports.Firebase_StorageFunction = exports.FirebaseScheduledFunction = exports.FirestoreFunctionModule = exports.FirebaseFunctionModule = exports.Firebase_HttpsFunction = exports.Firebase_ExpressFunction = exports.FirebaseFunction = void 0;
|
|
13
13
|
const functions = require("firebase-functions");
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const module_1 = require("@intuitionrobotics/ts-common/core/module");
|
|
15
|
+
const object_tools_1 = require("@intuitionrobotics/ts-common/utils/object-tools");
|
|
16
|
+
const exceptions_1 = require("@intuitionrobotics/ts-common/core/exceptions");
|
|
17
|
+
const tools_1 = require("@intuitionrobotics/ts-common/utils/tools");
|
|
18
|
+
const error_handling_1 = require("@intuitionrobotics/ts-common/core/error-handling");
|
|
19
|
+
class FirebaseFunction extends module_1.Module {
|
|
16
20
|
}
|
|
17
21
|
exports.FirebaseFunction = FirebaseFunction;
|
|
18
22
|
class Firebase_ExpressFunction {
|
|
@@ -79,7 +83,7 @@ class FirebaseFunctionModule extends FirebaseFunction {
|
|
|
79
83
|
return this.function = functions.runWith(runtimeOptions).database.ref(this.listeningPath).onWrite((change, context) => {
|
|
80
84
|
const before = change.before && change.before.val();
|
|
81
85
|
const after = change.after && change.after.val();
|
|
82
|
-
const params =
|
|
86
|
+
const params = object_tools_1.deepClone(context.params);
|
|
83
87
|
return this.processChanges(before, after, params);
|
|
84
88
|
});
|
|
85
89
|
};
|
|
@@ -104,7 +108,7 @@ class FirestoreFunctionModule extends FirebaseFunction {
|
|
|
104
108
|
return this.function = functions.runWith(runtimeOptions).firestore.document(`${this.collectionName}/{docId}`).onWrite((change, context) => {
|
|
105
109
|
const before = change.before && change.before.data();
|
|
106
110
|
const after = change.after && change.after.data();
|
|
107
|
-
const params =
|
|
111
|
+
const params = object_tools_1.deepClone(context.params);
|
|
108
112
|
return this.processChanges(params, before, after);
|
|
109
113
|
});
|
|
110
114
|
};
|
|
@@ -119,7 +123,7 @@ class FirebaseScheduledFunction extends FirebaseFunction {
|
|
|
119
123
|
this.getFunction = () => {
|
|
120
124
|
var _a, _b;
|
|
121
125
|
if (!this.schedule)
|
|
122
|
-
throw new
|
|
126
|
+
throw new exceptions_1.ImplementationMissingException("MUST set schedule !!");
|
|
123
127
|
if (this.function)
|
|
124
128
|
return this.function;
|
|
125
129
|
const runtimeOptions = Object.assign({ labels: {
|
|
@@ -144,7 +148,7 @@ class FirebaseScheduledFunction extends FirebaseFunction {
|
|
|
144
148
|
};
|
|
145
149
|
}
|
|
146
150
|
addRunningCondition(runningCondition) {
|
|
147
|
-
|
|
151
|
+
this.runningCondition.push(runningCondition);
|
|
148
152
|
return this;
|
|
149
153
|
}
|
|
150
154
|
setSchedule(schedule) {
|
|
@@ -173,10 +177,10 @@ class Firebase_StorageFunction extends FirebaseFunction {
|
|
|
173
177
|
}
|
|
174
178
|
catch (e) {
|
|
175
179
|
const _message = `Error handling callback to onFinalize bucket listener method` +
|
|
176
|
-
"\n" + `File changed ${object.name}` + "\n with attributes: " +
|
|
180
|
+
"\n" + `File changed ${object.name}` + "\n with attributes: " + tools_1.__stringify(context) + "\n" + tools_1.__stringify(e);
|
|
177
181
|
this.logError(_message);
|
|
178
182
|
try {
|
|
179
|
-
yield
|
|
183
|
+
yield error_handling_1.dispatch_onServerError.dispatchModuleAsync([error_handling_1.ServerErrorSeverity.Critical, this, _message]);
|
|
180
184
|
}
|
|
181
185
|
catch (_e) {
|
|
182
186
|
this.logError("Error while handing bucket listener error", _e);
|
|
@@ -188,7 +192,7 @@ class Firebase_StorageFunction extends FirebaseFunction {
|
|
|
188
192
|
}
|
|
189
193
|
exports.Firebase_StorageFunction = Firebase_StorageFunction;
|
|
190
194
|
function getFormattedFunctionName(name) {
|
|
191
|
-
return name.
|
|
195
|
+
return name.toLowerCase().replace(/\s/g, "_");
|
|
192
196
|
}
|
|
193
197
|
class Firebase_PubSubFunction extends FirebaseFunction {
|
|
194
198
|
constructor(topic, name) {
|
|
@@ -198,11 +202,11 @@ class Firebase_PubSubFunction extends FirebaseFunction {
|
|
|
198
202
|
return yield this.onPublish(object, originalMessage, context);
|
|
199
203
|
}
|
|
200
204
|
catch (e) {
|
|
201
|
-
const _message = `Error publishing pub/sub message` +
|
|
202
|
-
"\n" + ` to topic ${this.topic}` + "\n with attributes: " +
|
|
205
|
+
const _message = `Error publishing pub/sub message` + tools_1.__stringify(object) +
|
|
206
|
+
"\n" + ` to topic ${this.topic}` + "\n with attributes: " + tools_1.__stringify(originalMessage.attributes) + "\n" + tools_1.__stringify(e);
|
|
203
207
|
this.logError(_message);
|
|
204
208
|
try {
|
|
205
|
-
yield
|
|
209
|
+
yield error_handling_1.dispatch_onServerError.dispatchModuleAsync([error_handling_1.ServerErrorSeverity.Critical, this, _message]);
|
|
206
210
|
}
|
|
207
211
|
catch (_e) {
|
|
208
212
|
this.logError("Error while handing pubsub error", _e);
|
|
@@ -228,7 +232,7 @@ class Firebase_PubSubFunction extends FirebaseFunction {
|
|
|
228
232
|
}
|
|
229
233
|
catch (e) {
|
|
230
234
|
this.logError(`Error parsing the data attribute from pub/sub message to topic ${this.topic}` +
|
|
231
|
-
"\n" +
|
|
235
|
+
"\n" + tools_1.__stringify(originalMessage.data) + "\n" + tools_1.__stringify(e));
|
|
232
236
|
}
|
|
233
237
|
return this._onPublish(data, originalMessage, context);
|
|
234
238
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firebase-function.js","sourceRoot":"","sources":["../../../src/main/app-backend/functions/firebase-function.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gDAAgD;AAGhD,
|
|
1
|
+
{"version":3,"file":"firebase-function.js","sourceRoot":"","sources":["../../../src/main/app-backend/functions/firebase-function.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gDAAgD;AAGhD,qEAAgE;AAIhE,kFAA0E;AAC1E,6EAA4F;AAC5F,oEAAqE;AAErE,qFAA6G;AAQ7G,MAAsB,gBAClB,SAAQ,eAAc;CAIzB;AALD,4CAKC;AAED,MAAa,wBAAwB;IAOjC,YAAY,QAAiB,EAAE,IAAI,GAAG,KAAK;QAa3C,gBAAW,GAAG,GAAG,EAAE;YACf,IAAI,IAAI,CAAC,QAAQ;gBACb,OAAO,IAAI,CAAC,QAAQ,CAAC;YAEzB,MAAM,cAAc,mBAChB,MAAM,EAAE;oBACJ,KAAK,EAAE,cAAc;oBACrB,aAAa,EAAE,wBAAwB,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;oBACvD,IAAI,EAAE,OAAO;oBACb,OAAO,EAAE,IAAI;iBAChB,IACE,wBAAwB,CAAC,MAAM,CACrC,CAAC;YAEF,OAAO,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC3F,CAAC,CAAC;QA3BE,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,MAAsB;QACnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,OAAO;QACH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,CAAC;gBACxB,IAAI;oBACA,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;iBAC7E;gBAAC,OAAO,CAAC,EAAE;oBACR,IAAI,CAAC,QAAQ,CAAC,kEAAkE,IAAI,CAAC,KAAK,EAAE;wBACxF,IAAI,GAAG,mBAAW,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,mBAAW,CAAC,CAAC,CAAC,CAAC,CAAC;iBACzE;gBAED,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;YAC3D,CAAC,CAAA,CAAC,CAAC;QACP,CAAC,CAAC;QA/CE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;CA+CJ;AAxDD,0DAwDC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FirebaseType_BatchResponse, FirebaseType_Message, FirebaseType_SubscriptionResponse, FirebaseType_TopicResponse } from "./types";
|
|
2
2
|
import { FirebaseBaseWrapper } from "../auth/FirebaseBaseWrapper";
|
|
3
3
|
import { FirebaseSession } from "../auth/firebase-session";
|
|
4
|
-
import { StringMap } from "@intuitionrobotics/ts-common";
|
|
4
|
+
import { StringMap } from "@intuitionrobotics/ts-common/utils/types";
|
|
5
5
|
export declare class PushMessagesWrapper extends FirebaseBaseWrapper {
|
|
6
6
|
private readonly messaging;
|
|
7
7
|
constructor(firebaseSession: FirebaseSession<any, any>);
|
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Firebase is a simpler Typescript wrapper to all of firebase services.
|
|
4
|
-
*
|
|
5
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
20
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
21
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PushMessagesWrapper.js","sourceRoot":"","sources":["../../../src/main/app-backend/push/PushMessagesWrapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PushMessagesWrapper.js","sourceRoot":"","sources":["../../../src/main/app-backend/push/PushMessagesWrapper.ts"],"names":[],"mappings":";;;;;;;;;;;;AAOA,qEAAgE;AAGhE,wDAAsD;AAEtD,MAAa,mBACZ,SAAQ,yCAAmB;IAI3B,YAAY,eAA0C;QACrD,KAAK,CAAC,eAAe,CAAC,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,wBAAY,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;IACnD,CAAC;IAEK,IAAI,CAAC,OAA6B,EAAE,MAAgB;;YACzD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC7C,CAAC;KAAA;IAEK,OAAO,CAAC,QAAgC;;YAC7C,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC1C,CAAC;KAAA;IAEK,aAAa,CAAC,MAAgB,EAAE,IAAe;;YACpD,OAAO,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC,CAAC;QAC5D,CAAC;KAAA;IAEK,WAAW,CAAC,KAAa,EAAE,IAAe,EAAE,MAAgB;;YACjE,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,MAAM,EAAC,CAAC,CAAA;QAC3D,CAAC;KAAA;IAEK,gBAAgB,CAAC,MAAgB,EAAE,KAAa;;YACrD,OAAO,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACtD,CAAC;KAAA;IAEK,oBAAoB,CAAC,MAAgB,EAAE,KAAa;;YACzD,OAAO,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QAC1D,CAAC;KAAA;CACD;AAjCD,kDAiCC"}
|
|
@@ -1,20 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Firebase is a simpler Typescript wrapper to all of firebase services.
|
|
4
|
-
*
|
|
5
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
3
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/main/app-backend/push/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/main/app-backend/push/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Firebase is a simpler Typescript wrapper to all of firebase services.
|
|
4
|
-
*
|
|
5
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
-
* you may not use this file except in compliance with the License.
|
|
9
|
-
* You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
* See the License for the specific language governing permissions and
|
|
17
|
-
* limitations under the License.
|
|
18
|
-
*/
|
|
19
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
20
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
21
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -27,9 +10,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
27
10
|
};
|
|
28
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
12
|
exports.FileWrapper = exports.BucketWrapper = exports.StorageWrapper = void 0;
|
|
30
|
-
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
31
13
|
const FirebaseBaseWrapper_1 = require("../auth/FirebaseBaseWrapper");
|
|
32
14
|
const storage_1 = require("firebase-admin/storage");
|
|
15
|
+
const exceptions_1 = require("@intuitionrobotics/ts-common/core/exceptions");
|
|
16
|
+
const date_time_tools_1 = require("@intuitionrobotics/ts-common/utils/date-time-tools");
|
|
33
17
|
class StorageWrapper extends FirebaseBaseWrapper_1.FirebaseBaseWrapper {
|
|
34
18
|
constructor(firebaseSession) {
|
|
35
19
|
super(firebaseSession);
|
|
@@ -41,7 +25,7 @@ class StorageWrapper extends FirebaseBaseWrapper_1.FirebaseBaseWrapper {
|
|
|
41
25
|
if (!_bucketName)
|
|
42
26
|
_bucketName = `gs://${this.firebaseSession.getProjectId()}.appspot.com`;
|
|
43
27
|
if (!_bucketName.startsWith("gs://"))
|
|
44
|
-
throw new
|
|
28
|
+
throw new exceptions_1.BadImplementationException("Bucket name MUST start with 'gs://'");
|
|
45
29
|
const bucket = (yield this.storage.bucket(_bucketName).get({ autoCreate: true }))[0];
|
|
46
30
|
// @ts-ignore
|
|
47
31
|
return new BucketWrapper(_bucketName, bucket, this);
|
|
@@ -106,7 +90,7 @@ class FileWrapper {
|
|
|
106
90
|
const options = {
|
|
107
91
|
action: 'write',
|
|
108
92
|
contentType: contentType,
|
|
109
|
-
expires:
|
|
93
|
+
expires: date_time_tools_1.currentTimeMillies() + expiresInMs,
|
|
110
94
|
};
|
|
111
95
|
return this.getSignedUrl(options);
|
|
112
96
|
});
|
|
@@ -115,7 +99,7 @@ class FileWrapper {
|
|
|
115
99
|
return __awaiter(this, void 0, void 0, function* () {
|
|
116
100
|
const options = {
|
|
117
101
|
action: 'read',
|
|
118
|
-
expires:
|
|
102
|
+
expires: date_time_tools_1.currentTimeMillies() + expiresInMs,
|
|
119
103
|
};
|
|
120
104
|
return this.getSignedUrl(options);
|
|
121
105
|
});
|
|
@@ -134,7 +118,7 @@ class FileWrapper {
|
|
|
134
118
|
case "symbol":
|
|
135
119
|
case "bigint":
|
|
136
120
|
case "undefined":
|
|
137
|
-
throw new
|
|
121
|
+
throw new exceptions_1.BadImplementationException(`Cannot save file: ${this.file.name}, data is ${typeof data}`);
|
|
138
122
|
case "object":
|
|
139
123
|
return this.file.save(JSON.stringify(data));
|
|
140
124
|
case "boolean":
|
|
@@ -192,9 +176,9 @@ class FileWrapper {
|
|
|
192
176
|
yield file.delete();
|
|
193
177
|
}
|
|
194
178
|
catch (err) {
|
|
195
|
-
throw new
|
|
179
|
+
throw new exceptions_1.ThisShouldNotHappenException('Error during the deletion of the recently copied file, check the attached error', err);
|
|
196
180
|
}
|
|
197
|
-
throw new
|
|
181
|
+
throw new exceptions_1.BadImplementationException('Error during the deletion of the file after a successful copy, attached error stack', e);
|
|
198
182
|
}
|
|
199
183
|
});
|
|
200
184
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorageWrapper.js","sourceRoot":"","sources":["../../../src/main/app-backend/storage/StorageWrapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StorageWrapper.js","sourceRoot":"","sources":["../../../src/main/app-backend/storage/StorageWrapper.ts"],"names":[],"mappings":";;;;;;;;;;;;AAaA,qEAAgE;AAChE,oDAAkD;AAClD,6EAAwH;AACxH,wFAAwF;AAExF,MAAa,cACZ,SAAQ,yCAAmB;IAK3B,YAAY,eAA0C;QACrD,KAAK,CAAC,eAAe,CAAC,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,oBAAU,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC;IAEK,iBAAiB,CAAC,UAAmB;;YAC1C,IAAI,WAAW,GAAG,UAAU,CAAC;YAC7B,IAAI,CAAC,WAAW;gBACf,WAAW,GAAG,QAAQ,IAAI,CAAC,eAAe,CAAC,YAAY,EAAE,cAAc,CAAC;YAEzE,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC;gBACnC,MAAM,IAAI,uCAA0B,CAAC,qCAAqC,CAAC,CAAC;YAE7E,MAAM,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,EAAC,UAAU,EAAE,IAA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