@dereekb/firebase-server 13.15.0 → 13.16.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/index.cjs.js +34 -30
- package/index.esm.js +35 -31
- package/mailgun/package.json +9 -9
- package/mcp/index.cjs.js +7 -7
- package/mcp/index.esm.js +7 -7
- package/mcp/package.json +11 -11
- package/model/index.cjs.js +216 -222
- package/model/index.esm.js +217 -223
- package/model/package.json +9 -9
- package/oidc/index.cjs.js +8 -8
- package/oidc/index.esm.js +8 -8
- package/oidc/package.json +10 -10
- package/package.json +10 -10
- package/test/index.cjs.js +3 -3
- package/test/index.esm.js +3 -3
- package/test/package.json +11 -11
- package/twilio/package.json +8 -8
- package/zoho/index.cjs.js +3 -3
- package/zoho/index.esm.js +3 -3
- package/zoho/package.json +9 -9
package/index.cjs.js
CHANGED
|
@@ -18,7 +18,7 @@ var model = require('@dereekb/model');
|
|
|
18
18
|
var admin = require('firebase-admin');
|
|
19
19
|
var storage = require('@google-cloud/storage');
|
|
20
20
|
var dateFns = require('date-fns');
|
|
21
|
-
var types = require('util/types');
|
|
21
|
+
var types = require('node:util/types');
|
|
22
22
|
var rxjs$1 = require('@dereekb/rxjs');
|
|
23
23
|
var platformExpress = require('@nestjs/platform-express');
|
|
24
24
|
var express = require('express');
|
|
@@ -1335,7 +1335,7 @@ function _ts_generator$g(thisArg, body) {
|
|
|
1335
1335
|
];
|
|
1336
1336
|
case 1:
|
|
1337
1337
|
claims = _state.sent();
|
|
1338
|
-
result = claims.resetPassword
|
|
1338
|
+
result = claims.resetPassword == null ? undefined : claims;
|
|
1339
1339
|
return [
|
|
1340
1340
|
2,
|
|
1341
1341
|
result
|
|
@@ -1746,15 +1746,21 @@ function _ts_generator$g(thisArg, body) {
|
|
|
1746
1746
|
case 1:
|
|
1747
1747
|
userRecord = _state.sent();
|
|
1748
1748
|
createdUser = false;
|
|
1749
|
-
if (
|
|
1749
|
+
if (!userRecord) return [
|
|
1750
1750
|
3,
|
|
1751
|
-
|
|
1751
|
+
2
|
|
1752
|
+
];
|
|
1753
|
+
userRecordId = userRecord.uid;
|
|
1754
|
+
return [
|
|
1755
|
+
3,
|
|
1756
|
+
6
|
|
1752
1757
|
];
|
|
1758
|
+
case 2:
|
|
1753
1759
|
return [
|
|
1754
1760
|
4,
|
|
1755
1761
|
this.createNewUser(input)
|
|
1756
1762
|
];
|
|
1757
|
-
case
|
|
1763
|
+
case 3:
|
|
1758
1764
|
createResult = _state.sent();
|
|
1759
1765
|
// add the setup password to the user's credentials
|
|
1760
1766
|
userContext = this.authService.userContext(createResult.user.uid);
|
|
@@ -1762,7 +1768,7 @@ function _ts_generator$g(thisArg, body) {
|
|
|
1762
1768
|
4,
|
|
1763
1769
|
this.addNewUserSetupClaims(userContext, createResult.password)
|
|
1764
1770
|
];
|
|
1765
|
-
case
|
|
1771
|
+
case 4:
|
|
1766
1772
|
_state.sent();
|
|
1767
1773
|
createdUser = true;
|
|
1768
1774
|
userRecordId = userContext.uid;
|
|
@@ -1770,14 +1776,8 @@ function _ts_generator$g(thisArg, body) {
|
|
|
1770
1776
|
4,
|
|
1771
1777
|
userContext.loadRecord()
|
|
1772
1778
|
];
|
|
1773
|
-
case 4:
|
|
1774
|
-
userRecord = _state.sent();
|
|
1775
|
-
return [
|
|
1776
|
-
3,
|
|
1777
|
-
6
|
|
1778
|
-
];
|
|
1779
1779
|
case 5:
|
|
1780
|
-
|
|
1780
|
+
userRecord = _state.sent();
|
|
1781
1781
|
_state.label = 6;
|
|
1782
1782
|
case 6:
|
|
1783
1783
|
if (!(createdUser && sendSetupContent === true || sendSetupContentIfUserExists)) return [
|
|
@@ -3611,10 +3611,10 @@ function _define_property$v(obj, key, value) {
|
|
|
3611
3611
|
{
|
|
3612
3612
|
key: "update",
|
|
3613
3613
|
value: function update(data, params) {
|
|
3614
|
-
if ((params === null || params === void 0 ? void 0 : params.precondition)
|
|
3615
|
-
this.batch.update(this.documentRef, data, params.precondition);
|
|
3616
|
-
} else {
|
|
3614
|
+
if ((params === null || params === void 0 ? void 0 : params.precondition) == null) {
|
|
3617
3615
|
this.batch.update(this.documentRef, data);
|
|
3616
|
+
} else {
|
|
3617
|
+
this.batch.update(this.documentRef, data, params.precondition);
|
|
3618
3618
|
}
|
|
3619
3619
|
return Promise.resolve();
|
|
3620
3620
|
}
|
|
@@ -9577,7 +9577,7 @@ function _object_spread_props$7(target, source) {
|
|
|
9577
9577
|
*
|
|
9578
9578
|
* @__NO_SIDE_EFFECTS__
|
|
9579
9579
|
*/ function makeBlockingFunctionWithHandler(blockingFunctionBuilder, handler, opts) {
|
|
9580
|
-
var blockingFn = opts
|
|
9580
|
+
var blockingFn = opts == null ? blockingFunctionBuilder(handler) : blockingFunctionBuilder(opts, handler);
|
|
9581
9581
|
blockingFn.__handler = handler;
|
|
9582
9582
|
return blockingFn;
|
|
9583
9583
|
}
|
|
@@ -10244,7 +10244,7 @@ function _ts_generator$5(thisArg, body) {
|
|
|
10244
10244
|
* @__NO_SIDE_EFFECTS__
|
|
10245
10245
|
*/ function firebaseServerActionsTransformFactory(options) {
|
|
10246
10246
|
var logError = (options !== null && options !== void 0 ? options : {}).logError;
|
|
10247
|
-
var logErrorFunction = logError
|
|
10247
|
+
var logErrorFunction = logError === false ? util.mapIdentityFunction : typeof logError === 'function' ? logError : defaultFirebaseServerActionsTransformFactoryLogErrorFunction;
|
|
10248
10248
|
return model.transformAndValidateObjectFactory({
|
|
10249
10249
|
handleValidationError: function handleValidationError(validationErrors) {
|
|
10250
10250
|
return _async_to_generator$5(function() {
|
|
@@ -10556,15 +10556,11 @@ exports.FirebaseAppCheckMiddleware = __decorate([
|
|
|
10556
10556
|
switch(_state.label){
|
|
10557
10557
|
case 0:
|
|
10558
10558
|
appCheckToken = req.header('X-Firebase-AppCheck');
|
|
10559
|
-
if (
|
|
10560
|
-
3,
|
|
10561
|
-
1
|
|
10562
|
-
];
|
|
10563
|
-
error = new common.ForbiddenException();
|
|
10564
|
-
return [
|
|
10559
|
+
if (!appCheckToken) return [
|
|
10565
10560
|
3,
|
|
10566
|
-
|
|
10561
|
+
5
|
|
10567
10562
|
];
|
|
10563
|
+
_state.label = 1;
|
|
10568
10564
|
case 1:
|
|
10569
10565
|
_state.trys.push([
|
|
10570
10566
|
1,
|
|
@@ -10590,6 +10586,14 @@ exports.FirebaseAppCheckMiddleware = __decorate([
|
|
|
10590
10586
|
4
|
|
10591
10587
|
];
|
|
10592
10588
|
case 4:
|
|
10589
|
+
return [
|
|
10590
|
+
3,
|
|
10591
|
+
6
|
|
10592
|
+
];
|
|
10593
|
+
case 5:
|
|
10594
|
+
error = new common.ForbiddenException();
|
|
10595
|
+
_state.label = 6;
|
|
10596
|
+
case 6:
|
|
10593
10597
|
return [
|
|
10594
10598
|
2,
|
|
10595
10599
|
error
|
|
@@ -11239,7 +11243,7 @@ function _ts_generator$2(thisArg, body) {
|
|
|
11239
11243
|
contentEncoding: (_options_metadata3 = options.metadata) === null || _options_metadata3 === void 0 ? void 0 : _options_metadata3.contentEncoding,
|
|
11240
11244
|
contentLanguage: (_options_metadata4 = options.metadata) === null || _options_metadata4 === void 0 ? void 0 : _options_metadata4.contentLanguage,
|
|
11241
11245
|
contentType: (_options_metadata5 = options.metadata) === null || _options_metadata5 === void 0 ? void 0 : _options_metadata5.contentType,
|
|
11242
|
-
metadata:
|
|
11246
|
+
metadata: util.objectHasNoKeys(customMetadata) ? undefined : customMetadata
|
|
11243
11247
|
});
|
|
11244
11248
|
}
|
|
11245
11249
|
function makeUploadOptions(options) {
|
|
@@ -11335,8 +11339,8 @@ function _ts_generator$2(thisArg, body) {
|
|
|
11335
11339
|
return _async_to_generator$2(function() {
|
|
11336
11340
|
var _ref, _ref1, expires, config;
|
|
11337
11341
|
return _ts_generator$2(this, function(_state) {
|
|
11338
|
-
expires = (_ref = input === null || input === void 0 ? void 0 : input.expiresAt) !== null && _ref !== void 0 ? _ref : (input === null || input === void 0 ? void 0 : input.expiresIn)
|
|
11339
|
-
: dateFns.
|
|
11342
|
+
expires = (_ref = input === null || input === void 0 ? void 0 : input.expiresAt) !== null && _ref !== void 0 ? _ref : (input === null || input === void 0 ? void 0 : input.expiresIn) == null ? dateFns.addHours(new Date(), 1) // use expiresIn if provided
|
|
11343
|
+
: dateFns.addMilliseconds(new Date(), input.expiresIn); // default expiration in 1 hour
|
|
11340
11344
|
config = _object_spread_props$3(_object_spread$3({}, input), {
|
|
11341
11345
|
action: (_ref1 = input === null || input === void 0 ? void 0 : input.action) !== null && _ref1 !== void 0 ? _ref1 : 'read',
|
|
11342
11346
|
expires: expires,
|
|
@@ -11502,9 +11506,9 @@ function _ts_generator$2(thisArg, body) {
|
|
|
11502
11506
|
});
|
|
11503
11507
|
},
|
|
11504
11508
|
makePublic: function makePublic(setPublic) {
|
|
11505
|
-
return (setPublic
|
|
11509
|
+
return (setPublic === false ? file.acl.delete({
|
|
11506
11510
|
entity: PUBLIC_ACL.entity
|
|
11507
|
-
})).then(function() {
|
|
11511
|
+
}) : file.acl.add(PUBLIC_ACL)).then(function() {
|
|
11508
11512
|
return undefined;
|
|
11509
11513
|
});
|
|
11510
11514
|
},
|
package/index.esm.js
CHANGED
|
@@ -15,8 +15,8 @@ import { https, scheduler } from 'firebase-functions/v2';
|
|
|
15
15
|
import { toTransformAndValidateFunctionResultFactory, transformAndValidateObjectFactory } from '@dereekb/model';
|
|
16
16
|
import admin from 'firebase-admin';
|
|
17
17
|
import { ApiError } from '@google-cloud/storage';
|
|
18
|
-
import {
|
|
19
|
-
import { isUint8Array, isArrayBuffer } from 'util/types';
|
|
18
|
+
import { addHours, addMilliseconds } from 'date-fns';
|
|
19
|
+
import { isUint8Array, isArrayBuffer } from 'node:util/types';
|
|
20
20
|
import { fetchAssetLoader, delegatedAssetLoader, AssetLoader } from '@dereekb/rxjs';
|
|
21
21
|
import { ExpressAdapter } from '@nestjs/platform-express';
|
|
22
22
|
import express from 'express';
|
|
@@ -1333,7 +1333,7 @@ function _ts_generator$g(thisArg, body) {
|
|
|
1333
1333
|
];
|
|
1334
1334
|
case 1:
|
|
1335
1335
|
claims = _state.sent();
|
|
1336
|
-
result = claims.resetPassword
|
|
1336
|
+
result = claims.resetPassword == null ? undefined : claims;
|
|
1337
1337
|
return [
|
|
1338
1338
|
2,
|
|
1339
1339
|
result
|
|
@@ -1744,15 +1744,21 @@ function _ts_generator$g(thisArg, body) {
|
|
|
1744
1744
|
case 1:
|
|
1745
1745
|
userRecord = _state.sent();
|
|
1746
1746
|
createdUser = false;
|
|
1747
|
-
if (
|
|
1747
|
+
if (!userRecord) return [
|
|
1748
1748
|
3,
|
|
1749
|
-
|
|
1749
|
+
2
|
|
1750
|
+
];
|
|
1751
|
+
userRecordId = userRecord.uid;
|
|
1752
|
+
return [
|
|
1753
|
+
3,
|
|
1754
|
+
6
|
|
1750
1755
|
];
|
|
1756
|
+
case 2:
|
|
1751
1757
|
return [
|
|
1752
1758
|
4,
|
|
1753
1759
|
this.createNewUser(input)
|
|
1754
1760
|
];
|
|
1755
|
-
case
|
|
1761
|
+
case 3:
|
|
1756
1762
|
createResult = _state.sent();
|
|
1757
1763
|
// add the setup password to the user's credentials
|
|
1758
1764
|
userContext = this.authService.userContext(createResult.user.uid);
|
|
@@ -1760,7 +1766,7 @@ function _ts_generator$g(thisArg, body) {
|
|
|
1760
1766
|
4,
|
|
1761
1767
|
this.addNewUserSetupClaims(userContext, createResult.password)
|
|
1762
1768
|
];
|
|
1763
|
-
case
|
|
1769
|
+
case 4:
|
|
1764
1770
|
_state.sent();
|
|
1765
1771
|
createdUser = true;
|
|
1766
1772
|
userRecordId = userContext.uid;
|
|
@@ -1768,14 +1774,8 @@ function _ts_generator$g(thisArg, body) {
|
|
|
1768
1774
|
4,
|
|
1769
1775
|
userContext.loadRecord()
|
|
1770
1776
|
];
|
|
1771
|
-
case 4:
|
|
1772
|
-
userRecord = _state.sent();
|
|
1773
|
-
return [
|
|
1774
|
-
3,
|
|
1775
|
-
6
|
|
1776
|
-
];
|
|
1777
1777
|
case 5:
|
|
1778
|
-
|
|
1778
|
+
userRecord = _state.sent();
|
|
1779
1779
|
_state.label = 6;
|
|
1780
1780
|
case 6:
|
|
1781
1781
|
if (!(createdUser && sendSetupContent === true || sendSetupContentIfUserExists)) return [
|
|
@@ -3609,10 +3609,10 @@ function _define_property$v(obj, key, value) {
|
|
|
3609
3609
|
{
|
|
3610
3610
|
key: "update",
|
|
3611
3611
|
value: function update(data, params) {
|
|
3612
|
-
if ((params === null || params === void 0 ? void 0 : params.precondition)
|
|
3613
|
-
this.batch.update(this.documentRef, data, params.precondition);
|
|
3614
|
-
} else {
|
|
3612
|
+
if ((params === null || params === void 0 ? void 0 : params.precondition) == null) {
|
|
3615
3613
|
this.batch.update(this.documentRef, data);
|
|
3614
|
+
} else {
|
|
3615
|
+
this.batch.update(this.documentRef, data, params.precondition);
|
|
3616
3616
|
}
|
|
3617
3617
|
return Promise.resolve();
|
|
3618
3618
|
}
|
|
@@ -9575,7 +9575,7 @@ function _object_spread_props$7(target, source) {
|
|
|
9575
9575
|
*
|
|
9576
9576
|
* @__NO_SIDE_EFFECTS__
|
|
9577
9577
|
*/ function makeBlockingFunctionWithHandler(blockingFunctionBuilder, handler, opts) {
|
|
9578
|
-
var blockingFn = opts
|
|
9578
|
+
var blockingFn = opts == null ? blockingFunctionBuilder(handler) : blockingFunctionBuilder(opts, handler);
|
|
9579
9579
|
blockingFn.__handler = handler;
|
|
9580
9580
|
return blockingFn;
|
|
9581
9581
|
}
|
|
@@ -10242,7 +10242,7 @@ function _ts_generator$5(thisArg, body) {
|
|
|
10242
10242
|
* @__NO_SIDE_EFFECTS__
|
|
10243
10243
|
*/ function firebaseServerActionsTransformFactory(options) {
|
|
10244
10244
|
var logError = (options !== null && options !== void 0 ? options : {}).logError;
|
|
10245
|
-
var logErrorFunction = logError
|
|
10245
|
+
var logErrorFunction = logError === false ? mapIdentityFunction : typeof logError === 'function' ? logError : defaultFirebaseServerActionsTransformFactoryLogErrorFunction;
|
|
10246
10246
|
return transformAndValidateObjectFactory({
|
|
10247
10247
|
handleValidationError: function handleValidationError(validationErrors) {
|
|
10248
10248
|
return _async_to_generator$5(function() {
|
|
@@ -10554,15 +10554,11 @@ FirebaseAppCheckMiddleware = __decorate([
|
|
|
10554
10554
|
switch(_state.label){
|
|
10555
10555
|
case 0:
|
|
10556
10556
|
appCheckToken = req.header('X-Firebase-AppCheck');
|
|
10557
|
-
if (
|
|
10558
|
-
3,
|
|
10559
|
-
1
|
|
10560
|
-
];
|
|
10561
|
-
error = new ForbiddenException();
|
|
10562
|
-
return [
|
|
10557
|
+
if (!appCheckToken) return [
|
|
10563
10558
|
3,
|
|
10564
|
-
|
|
10559
|
+
5
|
|
10565
10560
|
];
|
|
10561
|
+
_state.label = 1;
|
|
10566
10562
|
case 1:
|
|
10567
10563
|
_state.trys.push([
|
|
10568
10564
|
1,
|
|
@@ -10588,6 +10584,14 @@ FirebaseAppCheckMiddleware = __decorate([
|
|
|
10588
10584
|
4
|
|
10589
10585
|
];
|
|
10590
10586
|
case 4:
|
|
10587
|
+
return [
|
|
10588
|
+
3,
|
|
10589
|
+
6
|
|
10590
|
+
];
|
|
10591
|
+
case 5:
|
|
10592
|
+
error = new ForbiddenException();
|
|
10593
|
+
_state.label = 6;
|
|
10594
|
+
case 6:
|
|
10591
10595
|
return [
|
|
10592
10596
|
2,
|
|
10593
10597
|
error
|
|
@@ -11237,7 +11241,7 @@ function _ts_generator$2(thisArg, body) {
|
|
|
11237
11241
|
contentEncoding: (_options_metadata3 = options.metadata) === null || _options_metadata3 === void 0 ? void 0 : _options_metadata3.contentEncoding,
|
|
11238
11242
|
contentLanguage: (_options_metadata4 = options.metadata) === null || _options_metadata4 === void 0 ? void 0 : _options_metadata4.contentLanguage,
|
|
11239
11243
|
contentType: (_options_metadata5 = options.metadata) === null || _options_metadata5 === void 0 ? void 0 : _options_metadata5.contentType,
|
|
11240
|
-
metadata:
|
|
11244
|
+
metadata: objectHasNoKeys(customMetadata) ? undefined : customMetadata
|
|
11241
11245
|
});
|
|
11242
11246
|
}
|
|
11243
11247
|
function makeUploadOptions(options) {
|
|
@@ -11333,8 +11337,8 @@ function _ts_generator$2(thisArg, body) {
|
|
|
11333
11337
|
return _async_to_generator$2(function() {
|
|
11334
11338
|
var _ref, _ref1, expires, config;
|
|
11335
11339
|
return _ts_generator$2(this, function(_state) {
|
|
11336
|
-
expires = (_ref = input === null || input === void 0 ? void 0 : input.expiresAt) !== null && _ref !== void 0 ? _ref : (input === null || input === void 0 ? void 0 : input.expiresIn)
|
|
11337
|
-
:
|
|
11340
|
+
expires = (_ref = input === null || input === void 0 ? void 0 : input.expiresAt) !== null && _ref !== void 0 ? _ref : (input === null || input === void 0 ? void 0 : input.expiresIn) == null ? addHours(new Date(), 1) // use expiresIn if provided
|
|
11341
|
+
: addMilliseconds(new Date(), input.expiresIn); // default expiration in 1 hour
|
|
11338
11342
|
config = _object_spread_props$3(_object_spread$3({}, input), {
|
|
11339
11343
|
action: (_ref1 = input === null || input === void 0 ? void 0 : input.action) !== null && _ref1 !== void 0 ? _ref1 : 'read',
|
|
11340
11344
|
expires: expires,
|
|
@@ -11500,9 +11504,9 @@ function _ts_generator$2(thisArg, body) {
|
|
|
11500
11504
|
});
|
|
11501
11505
|
},
|
|
11502
11506
|
makePublic: function makePublic(setPublic) {
|
|
11503
|
-
return (setPublic
|
|
11507
|
+
return (setPublic === false ? file.acl.delete({
|
|
11504
11508
|
entity: PUBLIC_ACL.entity
|
|
11505
|
-
})).then(function() {
|
|
11509
|
+
}) : file.acl.add(PUBLIC_ACL)).then(function() {
|
|
11506
11510
|
return undefined;
|
|
11507
11511
|
});
|
|
11508
11512
|
},
|
package/mailgun/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase-server/mailgun",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.16.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@dereekb/analytics": "13.
|
|
6
|
-
"@dereekb/firebase": "13.
|
|
7
|
-
"@dereekb/firebase-server": "13.
|
|
8
|
-
"@dereekb/date": "13.
|
|
9
|
-
"@dereekb/nestjs": "13.
|
|
10
|
-
"@dereekb/model": "13.
|
|
11
|
-
"@dereekb/rxjs": "13.
|
|
12
|
-
"@dereekb/util": "13.
|
|
5
|
+
"@dereekb/analytics": "13.16.0",
|
|
6
|
+
"@dereekb/firebase": "13.16.0",
|
|
7
|
+
"@dereekb/firebase-server": "13.16.0",
|
|
8
|
+
"@dereekb/date": "13.16.0",
|
|
9
|
+
"@dereekb/nestjs": "13.16.0",
|
|
10
|
+
"@dereekb/model": "13.16.0",
|
|
11
|
+
"@dereekb/rxjs": "13.16.0",
|
|
12
|
+
"@dereekb/util": "13.16.0"
|
|
13
13
|
},
|
|
14
14
|
"exports": {
|
|
15
15
|
"./package.json": "./package.json",
|
package/mcp/index.cjs.js
CHANGED
|
@@ -1994,11 +1994,11 @@ function findGroupCount(query, manifest) {
|
|
|
1994
1994
|
function buildModelNotFoundMessage(query, manifest) {
|
|
1995
1995
|
var groupMatch = findGroupCount(query, manifest);
|
|
1996
1996
|
var message;
|
|
1997
|
-
if (groupMatch
|
|
1997
|
+
if (groupMatch == null) {
|
|
1998
|
+
message = 'model-info: no exact match for "'.concat(query, '". Call `model-info` with no arguments to list groups, or pass all:true for the full catalog.');
|
|
1999
|
+
} else {
|
|
1998
2000
|
var plural = groupMatch.modelCount === 1 ? '' : 's';
|
|
1999
2001
|
message = 'model-info: no exact match for "'.concat(query, '" — did you mean group:"').concat(groupMatch.modelGroup, '" (').concat(groupMatch.modelCount, " model").concat(plural, ')? Use modelGroup:"').concat(groupMatch.modelGroup, '", or all:true for everything.');
|
|
2000
|
-
} else {
|
|
2001
|
-
message = 'model-info: no exact match for "'.concat(query, '". Call `model-info` with no arguments to list groups, or pass all:true for the full catalog.');
|
|
2002
2002
|
}
|
|
2003
2003
|
return message;
|
|
2004
2004
|
}
|
|
@@ -3437,7 +3437,7 @@ function parseJsonArrayOperations(fileText) {
|
|
|
3437
3437
|
});
|
|
3438
3438
|
}
|
|
3439
3439
|
if (!Array.isArray(parsed)) {
|
|
3440
|
-
throw new
|
|
3440
|
+
throw new TypeError('batch-execute: with format "json" the file must contain a top-level array of operations.');
|
|
3441
3441
|
}
|
|
3442
3442
|
return parsed;
|
|
3443
3443
|
}
|
|
@@ -3719,10 +3719,10 @@ function maybeDeleteUpload(input) {
|
|
|
3719
3719
|
* @param bucketId - The bucket id, or `undefined` for the default bucket.
|
|
3720
3720
|
* @returns The resolved storage path input.
|
|
3721
3721
|
*/ function toStoragePathInput(pathString, bucketId) {
|
|
3722
|
-
return bucketId
|
|
3723
|
-
bucketId: bucketId,
|
|
3722
|
+
return bucketId == null ? {
|
|
3724
3723
|
pathString: pathString
|
|
3725
3724
|
} : {
|
|
3725
|
+
bucketId: bucketId,
|
|
3726
3726
|
pathString: pathString
|
|
3727
3727
|
};
|
|
3728
3728
|
}
|
|
@@ -5669,7 +5669,7 @@ var FirebaseServerMcpAnalyticsService_1;
|
|
|
5669
5669
|
value: function handleMcpAnalyticsEvent(event) {
|
|
5670
5670
|
if (this._logEvents) {
|
|
5671
5671
|
var uidSuffix = event.uid ? " uid=".concat(event.uid) : '';
|
|
5672
|
-
var durationSuffix = event.durationMs
|
|
5672
|
+
var durationSuffix = event.durationMs == null ? '' : " (".concat(event.durationMs, "ms)");
|
|
5673
5673
|
var outcome = event.isSuccessful ? 'Succeeded' : 'Failed';
|
|
5674
5674
|
this._logger.log("MCP ".concat(event.toolName, " [").concat(event.toolKind, "] ").concat(outcome).concat(uidSuffix).concat(durationSuffix));
|
|
5675
5675
|
}
|
package/mcp/index.esm.js
CHANGED
|
@@ -1992,11 +1992,11 @@ function findGroupCount(query, manifest) {
|
|
|
1992
1992
|
function buildModelNotFoundMessage(query, manifest) {
|
|
1993
1993
|
var groupMatch = findGroupCount(query, manifest);
|
|
1994
1994
|
var message;
|
|
1995
|
-
if (groupMatch
|
|
1995
|
+
if (groupMatch == null) {
|
|
1996
|
+
message = 'model-info: no exact match for "'.concat(query, '". Call `model-info` with no arguments to list groups, or pass all:true for the full catalog.');
|
|
1997
|
+
} else {
|
|
1996
1998
|
var plural = groupMatch.modelCount === 1 ? '' : 's';
|
|
1997
1999
|
message = 'model-info: no exact match for "'.concat(query, '" — did you mean group:"').concat(groupMatch.modelGroup, '" (').concat(groupMatch.modelCount, " model").concat(plural, ')? Use modelGroup:"').concat(groupMatch.modelGroup, '", or all:true for everything.');
|
|
1998
|
-
} else {
|
|
1999
|
-
message = 'model-info: no exact match for "'.concat(query, '". Call `model-info` with no arguments to list groups, or pass all:true for the full catalog.');
|
|
2000
2000
|
}
|
|
2001
2001
|
return message;
|
|
2002
2002
|
}
|
|
@@ -3435,7 +3435,7 @@ function parseJsonArrayOperations(fileText) {
|
|
|
3435
3435
|
});
|
|
3436
3436
|
}
|
|
3437
3437
|
if (!Array.isArray(parsed)) {
|
|
3438
|
-
throw new
|
|
3438
|
+
throw new TypeError('batch-execute: with format "json" the file must contain a top-level array of operations.');
|
|
3439
3439
|
}
|
|
3440
3440
|
return parsed;
|
|
3441
3441
|
}
|
|
@@ -3717,10 +3717,10 @@ function maybeDeleteUpload(input) {
|
|
|
3717
3717
|
* @param bucketId - The bucket id, or `undefined` for the default bucket.
|
|
3718
3718
|
* @returns The resolved storage path input.
|
|
3719
3719
|
*/ function toStoragePathInput(pathString, bucketId) {
|
|
3720
|
-
return bucketId
|
|
3721
|
-
bucketId: bucketId,
|
|
3720
|
+
return bucketId == null ? {
|
|
3722
3721
|
pathString: pathString
|
|
3723
3722
|
} : {
|
|
3723
|
+
bucketId: bucketId,
|
|
3724
3724
|
pathString: pathString
|
|
3725
3725
|
};
|
|
3726
3726
|
}
|
|
@@ -5667,7 +5667,7 @@ var FirebaseServerMcpAnalyticsService_1;
|
|
|
5667
5667
|
value: function handleMcpAnalyticsEvent(event) {
|
|
5668
5668
|
if (this._logEvents) {
|
|
5669
5669
|
var uidSuffix = event.uid ? " uid=".concat(event.uid) : '';
|
|
5670
|
-
var durationSuffix = event.durationMs
|
|
5670
|
+
var durationSuffix = event.durationMs == null ? '' : " (".concat(event.durationMs, "ms)");
|
|
5671
5671
|
var outcome = event.isSuccessful ? 'Succeeded' : 'Failed';
|
|
5672
5672
|
this._logger.log("MCP ".concat(event.toolName, " [").concat(event.toolKind, "] ").concat(outcome).concat(uidSuffix).concat(durationSuffix));
|
|
5673
5673
|
}
|
package/mcp/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase-server/mcp",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.16.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@dereekb/analytics": "13.
|
|
6
|
-
"@dereekb/date": "13.
|
|
7
|
-
"@dereekb/firebase": "13.
|
|
8
|
-
"@dereekb/firebase-server": "13.
|
|
9
|
-
"@dereekb/firebase-server/oidc": "13.
|
|
10
|
-
"@dereekb/model": "13.
|
|
11
|
-
"@dereekb/nestjs": "13.
|
|
12
|
-
"@dereekb/rxjs": "13.
|
|
13
|
-
"@dereekb/util": "13.
|
|
14
|
-
"@dereekb/zoho": "13.
|
|
5
|
+
"@dereekb/analytics": "13.16.0",
|
|
6
|
+
"@dereekb/date": "13.16.0",
|
|
7
|
+
"@dereekb/firebase": "13.16.0",
|
|
8
|
+
"@dereekb/firebase-server": "13.16.0",
|
|
9
|
+
"@dereekb/firebase-server/oidc": "13.16.0",
|
|
10
|
+
"@dereekb/model": "13.16.0",
|
|
11
|
+
"@dereekb/nestjs": "13.16.0",
|
|
12
|
+
"@dereekb/rxjs": "13.16.0",
|
|
13
|
+
"@dereekb/util": "13.16.0",
|
|
14
|
+
"@dereekb/zoho": "13.16.0",
|
|
15
15
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
16
16
|
"@nestjs/common": "^11.1.19",
|
|
17
17
|
"@nestjs/core": "^11.1.19",
|