firebase-tools 15.34.1 → 15.35.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/lib/api.js +2 -4
- package/lib/apphosting/constants.js +1 -4
- package/lib/apphosting/utils.js +0 -26
- package/lib/commands/apps-android-sha-create.js +1 -1
- package/lib/commands/apps-android-sha-delete.js +1 -1
- package/lib/commands/apps-android-sha-list.js +1 -1
- package/lib/commands/{crashlytics-onboard-web.js → crashlytics-setup.js} +5 -5
- package/lib/commands/crashlytics-sourcemap-upload.js +4 -0
- package/lib/commands/emulators-start.js +2 -2
- package/lib/commands/index.js +5 -6
- package/lib/commands/run-services-get.js +19 -0
- package/lib/commands/run-services-list.js +11 -0
- package/lib/crashlytics/alerts.js +1 -0
- package/lib/crashlytics/firebasetelemetry.js +5 -3
- package/lib/crashlytics/onboarding.js +15 -23
- package/lib/crashlytics/reports.js +46 -17
- package/lib/crashlytics/sourcemap.js +19 -5
- package/lib/dataconnect/dataplaneClient.js +0 -10
- package/lib/deploy/apphosting/deploy.js +20 -41
- package/lib/deploy/apphosting/localBuild.js +49 -0
- package/lib/deploy/apphosting/prepare.js +12 -25
- package/lib/deploy/apphosting/release.js +1 -1
- package/lib/deploy/apphosting/util.js +27 -4
- package/lib/deploy/functions/containerCleaner.js +1 -142
- package/lib/deploy/functions/functionsDeployHelper.js +0 -4
- package/lib/deploy/functions/release/fabricator.js +6 -3
- package/lib/deploy/functions/validate.js +1 -1
- package/lib/deploy/run/deploy.js +26 -43
- package/lib/deploy/run/get.js +30 -0
- package/lib/deploy/run/list.js +38 -0
- package/lib/deploy/run/prereqs.js +0 -3
- package/lib/deploy/run/util.js +9 -0
- package/lib/emulator/commandUtils.js +105 -23
- package/lib/emulator/dataconnect/pgliteServer.js +1 -0
- package/lib/emulator/downloadableEmulatorInfo.json +22 -22
- package/lib/emulator/downloadableEmulators.js +43 -5
- package/lib/emulator/firestoreEmulator.js +5 -0
- package/lib/emulator/functionsEmulator.js +22 -7
- package/lib/emulator/pubsubEmulator.js +64 -11
- package/lib/emulator/storage/rules/manager.js +31 -15
- package/lib/emulator/storage/rules/runtime.js +1 -0
- package/lib/emulator/taskQueue.js +5 -4
- package/lib/experiments.js +0 -5
- package/lib/extensions/emulator/specHelper.js +0 -4
- package/lib/extensions/extensionsApi.js +0 -8
- package/lib/extensions/extensionsHelper.js +1 -71
- package/lib/extensions/runtimes/common.js +0 -12
- package/lib/extensions/secretsUtils.js +0 -24
- package/lib/extensions/updateHelper.js +2 -88
- package/lib/frameworks/angular/utils.js +3 -2
- package/lib/frameworks/next/utils.js +0 -11
- package/lib/fsAsync.js +34 -20
- package/lib/functions/kits/install.js +37 -337
- package/lib/functions/kits/sources/directory.js +59 -0
- package/lib/functions/kits/sources/index.js +19 -0
- package/lib/functions/kits/sources/npm.js +274 -0
- package/lib/functions/kits/sources/types.js +12 -0
- package/lib/gcp/artifactregistry.js +0 -5
- package/lib/gcp/cloudlogging.js +0 -54
- package/lib/gcp/iam.js +0 -4
- package/lib/gcp/pubsub.js +0 -14
- package/lib/gcp/storage.js +2 -1
- package/lib/init/features/aitools/promptUpdater.js +3 -2
- package/lib/init/features/run.js +3 -7
- package/lib/mcp/errors.js +1 -1
- package/lib/mcp/resources/guides/crashlytics_reports.js +33 -71
- package/lib/mcp/tools/crashlytics/reports.js +25 -30
- package/lib/mcp/util/dataconnect/converter.js +0 -29
- package/lib/tsconfig.compile.tsbuildinfo +1 -1
- package/lib/tsconfig.publish.tsbuildinfo +1 -1
- package/package.json +9 -6
- package/lib/apphosting/repo.js +0 -243
- package/lib/deploy/hosting/args.js +0 -2
|
@@ -7,17 +7,6 @@ const reports_1 = require("../../../crashlytics/reports");
|
|
|
7
7
|
const tool_1 = require("../../tool");
|
|
8
8
|
const app_id_1 = require("../../resources/guides/app_id");
|
|
9
9
|
const DUMP_OPTIONS = { lineWidth: 200 };
|
|
10
|
-
const REPORT_ERROR_CONTENT = `
|
|
11
|
-
Must specify the desired report:
|
|
12
|
-
* TOP_ISSUES - metrics grouped by *issue*.
|
|
13
|
-
* TOP_VARIANTS - metrics grouped by issue *variant*
|
|
14
|
-
* TOP_VERSIONS - metrics grouped by *version*
|
|
15
|
-
* TOP_OPERATING_SYSTEMS - metrics grouped by *operating system*
|
|
16
|
-
* TOP_ANDROID_DEVICES - metrics grouped by *device*
|
|
17
|
-
* TOP_APPLE_DEVICES - metrics grouped by *device*
|
|
18
|
-
* TOP_BROWSERS - metrics grouped by *browser*
|
|
19
|
-
* WEB_METRICS - metrics by *error type*
|
|
20
|
-
`.trim();
|
|
21
10
|
function toText(response, filters) {
|
|
22
11
|
const result = {
|
|
23
12
|
name: response.name || "",
|
|
@@ -44,12 +33,8 @@ exports.get_report = (0, tool_1.tool)("crashlytics", {
|
|
|
44
33
|
_meta: {
|
|
45
34
|
requiresAuth: true,
|
|
46
35
|
},
|
|
47
|
-
}, async ({ appId, report, pageSize, filter }) => {
|
|
36
|
+
}, async ({ appId, report, pageSize, filter, granularity }) => {
|
|
48
37
|
const result = { content: [] };
|
|
49
|
-
if (!report) {
|
|
50
|
-
result.isError = true;
|
|
51
|
-
result.content.push({ type: "text", text: `Error: ${REPORT_ERROR_CONTENT}` });
|
|
52
|
-
}
|
|
53
38
|
if (!appId) {
|
|
54
39
|
result.isError = true;
|
|
55
40
|
result.content.push({ type: "text", text: "Must specify 'appId' parameter" });
|
|
@@ -59,23 +44,33 @@ exports.get_report = (0, tool_1.tool)("crashlytics", {
|
|
|
59
44
|
filter = (0, filters_1.validateEventFilters)(filter || {});
|
|
60
45
|
}
|
|
61
46
|
catch (error) {
|
|
47
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
62
48
|
result.isError = true;
|
|
63
|
-
result.content.push({ type: "text", text: `Error: ${
|
|
49
|
+
result.content.push({ type: "text", text: `Error: ${message}` });
|
|
64
50
|
}
|
|
65
51
|
if (result.content.length > 0) {
|
|
66
52
|
return result;
|
|
67
53
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
reportResponse.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
54
|
+
try {
|
|
55
|
+
const reportResponse = (0, reports_1.simplifyReport)(await (0, reports_1.getReport)(report, appId, filter, pageSize, granularity));
|
|
56
|
+
reportResponse.usage =
|
|
57
|
+
reportResponse.groups && reportResponse.groups.length
|
|
58
|
+
? reportResponse.usage || ""
|
|
59
|
+
: "This report response contains no results.";
|
|
60
|
+
return {
|
|
61
|
+
content: [
|
|
62
|
+
{
|
|
63
|
+
type: "text",
|
|
64
|
+
text: (0, js_yaml_1.dump)(toText(reportResponse, filter), DUMP_OPTIONS),
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
71
|
+
return {
|
|
72
|
+
isError: true,
|
|
73
|
+
content: [{ type: "text", text: `Error: ${message}` }],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
81
76
|
});
|
|
@@ -1,38 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.schemaToText = schemaToText;
|
|
4
|
-
exports.connectorToText = connectorToText;
|
|
5
|
-
exports.sourceToText = sourceToText;
|
|
6
3
|
exports.graphqlResponseToToolResponse = graphqlResponseToToolResponse;
|
|
7
4
|
exports.parseVariables = parseVariables;
|
|
8
|
-
const js_yaml_1 = require("js-yaml");
|
|
9
5
|
const types_1 = require("../../../dataconnect/types");
|
|
10
6
|
const util_1 = require("../../util");
|
|
11
|
-
function schemaToText(s) {
|
|
12
|
-
return ((0, js_yaml_1.dump)({
|
|
13
|
-
name: s.name,
|
|
14
|
-
datasources: s.datasources,
|
|
15
|
-
}) +
|
|
16
|
-
"\n\n" +
|
|
17
|
-
sourceToText(s.source));
|
|
18
|
-
}
|
|
19
|
-
function connectorToText(s) {
|
|
20
|
-
return ((0, js_yaml_1.dump)({
|
|
21
|
-
name: s.name,
|
|
22
|
-
}) +
|
|
23
|
-
"\n\n" +
|
|
24
|
-
sourceToText(s.source));
|
|
25
|
-
}
|
|
26
|
-
function sourceToText(s) {
|
|
27
|
-
let output = "";
|
|
28
|
-
s.files?.forEach((f) => {
|
|
29
|
-
output += `\n# ${f.path}`;
|
|
30
|
-
output += "\n```graphql\n";
|
|
31
|
-
output += `${f.content.trim()}\n`;
|
|
32
|
-
output += "```\n";
|
|
33
|
-
});
|
|
34
|
-
return output;
|
|
35
|
-
}
|
|
36
7
|
function graphqlResponseToToolResponse(g) {
|
|
37
8
|
if ((0, types_1.isGraphQLResponse)(g)) {
|
|
38
9
|
const isError = g.errors?.length > 0;
|