firebase-tools 15.36.0 → 15.36.1-main.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/accountExporter.js +1 -1
- package/lib/accountImporter.js +7 -6
- package/lib/apiv2.js +0 -1
- package/lib/apptesting/parseTestFiles.js +1 -1
- package/lib/auth.js +1 -1
- package/lib/bin/progressiveHelp.js +1 -1
- package/lib/command.js +1 -2
- package/lib/commands/crashlytics-events-get.js +48 -0
- package/lib/commands/crashlytics-events-list.js +70 -0
- package/lib/commands/crashlytics-heapdumps-enable.js +3 -4
- package/lib/commands/crashlytics-heapdumps-status.js +5 -3
- package/lib/commands/crashlytics-issues-get.js +61 -0
- package/lib/commands/crashlytics-reports-get.js +179 -0
- package/lib/commands/crashlytics-reports-list.js +42 -0
- package/lib/commands/ext-dev-init.js +1 -1
- package/lib/commands/hosting-channel-open.js +4 -1
- package/lib/commands/index.js +10 -0
- package/lib/commands/open.js +3 -1
- package/lib/commands/serve.js +1 -1
- package/lib/commands/use.js +1 -1
- package/lib/config.js +1 -1
- package/lib/crashlytics/commandUtils.js +194 -0
- package/lib/crashlytics/events.js +8 -8
- package/lib/crashlytics/filters.js +1 -1
- package/lib/crashlytics/profilingManager.js +63 -16
- package/lib/crashlytics/reports.js +5 -1
- package/lib/deploy/firestore/prepare.js +21 -3
- package/lib/deploy/functions/cel.js +1 -1
- package/lib/deploy/functions/deploy.js +2 -1
- package/lib/deploy/functions/release/fabricator.js +9 -2
- package/lib/deploy/functions/release/planner.js +3 -0
- package/lib/deploy/functions/runtimes/discovery/parsing.js +1 -1
- package/lib/emulator/downloadableEmulatorInfo.json +31 -31
- package/lib/emulator/functionsEmulatorRuntime.js +2 -2
- package/lib/experiments.js +5 -0
- package/lib/extensions/listExtensions.js +1 -1
- package/lib/firestore/delete.js +2 -3
- package/lib/frameworks/next/constants.js +17 -14
- package/lib/frameworks/next/index.js +25 -3
- package/lib/frameworks/next/utils.js +6 -8
- package/lib/gcp/cloudbilling.js +2 -2
- package/lib/gcp/cloudbuild.js +0 -77
- package/lib/gcp/cloudtasks.js +0 -4
- package/lib/gcp/devConnect.js +0 -6
- package/lib/gcp/iam.js +15 -1
- package/lib/gcp/resourceManager.js +1 -14
- package/lib/gcp/storage.js +87 -4
- package/lib/hosting/api.js +0 -7
- package/lib/hosting/implicitInit.js +1 -1
- package/lib/hosting/proxy.js +1 -1
- package/lib/init/features/firestore/rules.js +1 -1
- package/lib/init/features/functions/index.js +2 -2
- package/lib/init/features/functions/npm-dependencies.js +1 -1
- package/lib/init/features/storage/rules.js +1 -1
- package/lib/localFunction.js +3 -3
- package/lib/management/database.js +1 -1
- package/lib/mcp/apps/init/mcp-app.js +1 -1
- package/lib/mcp/apps/update_environment/mcp-app.js +1 -1
- package/lib/mcp/index.js +6 -2
- package/lib/mcp/tools/crashlytics/reports.js +2 -2
- package/lib/mcp/util/dataconnect/converter.js +1 -1
- package/lib/profileReport.js +1 -1
- package/lib/profiler.js +1 -1
- package/lib/rulesDeploy.js +0 -1
- package/lib/throttler/throttler.js +1 -1
- package/lib/tsconfig.compile.tsbuildinfo +1 -1
- package/lib/tsconfig.publish.tsbuildinfo +1 -1
- package/lib/utils.js +1 -1
- package/package.json +4 -4
package/lib/hosting/proxy.js
CHANGED
|
@@ -33,7 +33,7 @@ function proxyRequestHandler(url, rewriteIdentifier, options = {}) {
|
|
|
33
33
|
const sessionCookie = cookie.split(/; ?/).find((c) => {
|
|
34
34
|
return c.trim().startsWith("__session=");
|
|
35
35
|
});
|
|
36
|
-
const u = new url_1.URL(url
|
|
36
|
+
const u = new url_1.URL(`${url}${req.url ?? ""}`);
|
|
37
37
|
const c = new apiv2_1.Client({ urlPrefix: u.origin, auth: false });
|
|
38
38
|
let body;
|
|
39
39
|
let passThrough;
|
|
@@ -49,7 +49,7 @@ async function getRulesFromConsole(projectId) {
|
|
|
49
49
|
return utils.reject("Ruleset has no files", { exit: 1 });
|
|
50
50
|
}
|
|
51
51
|
if (rules.length > 1) {
|
|
52
|
-
return utils.reject(
|
|
52
|
+
return utils.reject(`Ruleset has too many files: ${rules.length}`, { exit: 1 });
|
|
53
53
|
}
|
|
54
54
|
return rules[0].content;
|
|
55
55
|
}
|
|
@@ -195,7 +195,7 @@ async function languageSetup(setup) {
|
|
|
195
195
|
}
|
|
196
196
|
async function actuate(setup, config) {
|
|
197
197
|
if (setup.languageOverride) {
|
|
198
|
-
return require(
|
|
198
|
+
return require(`./${String(setup.languageOverride)}`).setup(setup, config);
|
|
199
199
|
}
|
|
200
|
-
return require(
|
|
200
|
+
return require(`./${String(setup.functions.languageChoice)}`).setup(setup, config);
|
|
201
201
|
}
|
|
@@ -11,7 +11,7 @@ async function askInstallDependencies(setup, config) {
|
|
|
11
11
|
});
|
|
12
12
|
if (setup.npm) {
|
|
13
13
|
try {
|
|
14
|
-
await (0, spawn_1.wrapSpawn)("npm", ["install"], config.projectDir
|
|
14
|
+
await (0, spawn_1.wrapSpawn)("npm", ["install"], `${String(config.projectDir)}/${setup.source}`);
|
|
15
15
|
}
|
|
16
16
|
catch (e) {
|
|
17
17
|
logger_1.logger.info();
|
|
@@ -15,7 +15,7 @@ async function getRulesFromConsole(projectId) {
|
|
|
15
15
|
return utils.reject("Ruleset has no files", { exit: 1 });
|
|
16
16
|
}
|
|
17
17
|
if (rules.length > 1) {
|
|
18
|
-
return utils.reject(
|
|
18
|
+
return utils.reject(`Ruleset has too many files: ${rules.length}`, { exit: 1 });
|
|
19
19
|
}
|
|
20
20
|
return rules[0].content;
|
|
21
21
|
}
|
package/lib/localFunction.js
CHANGED
|
@@ -20,7 +20,7 @@ class LocalFunction {
|
|
|
20
20
|
return resource.replace(this.paramWildcardRegex, (wildcard) => {
|
|
21
21
|
const wildcardNoBraces = wildcard.slice(1, -1);
|
|
22
22
|
const sub = params?.[wildcardNoBraces];
|
|
23
|
-
return sub || wildcardNoBraces
|
|
23
|
+
return sub || `${wildcardNoBraces}${utils.randomInt(1, 9)}`;
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
constructCallableFunc(data, opts) {
|
|
@@ -156,9 +156,9 @@ class LocalFunction {
|
|
|
156
156
|
}
|
|
157
157
|
requestCallBack(err, response, body) {
|
|
158
158
|
if (err) {
|
|
159
|
-
return console.warn(
|
|
159
|
+
return console.warn(`\nERROR SENDING REQUEST: ${String(err)}`);
|
|
160
160
|
}
|
|
161
|
-
const status = response ? response.status
|
|
161
|
+
const status = response ? `${response.status}, ` : "";
|
|
162
162
|
let bodyString = body;
|
|
163
163
|
if (typeof bodyString === "string") {
|
|
164
164
|
try {
|
|
@@ -104,7 +104,7 @@ async function checkInstanceNameAvailable(projectId, instanceName, databaseType,
|
|
|
104
104
|
return { available: true };
|
|
105
105
|
}
|
|
106
106
|
catch (err) {
|
|
107
|
-
logger_1.logger.debug(`Invalid Realtime Database instance name: ${instanceName}.${err.message ?
|
|
107
|
+
logger_1.logger.debug(`Invalid Realtime Database instance name: ${instanceName}.${err.message ? ` ${String(err.message)}` : ""}`);
|
|
108
108
|
const errBody = err.context.body.error;
|
|
109
109
|
if (errBody?.details?.[0]?.metadata?.suggested_database_ids) {
|
|
110
110
|
return {
|
|
@@ -174,7 +174,7 @@ app.onhostcontextchanged = (ctx) => {
|
|
|
174
174
|
document.body.style.padding = `${top}px ${right}px ${bottom}px ${left}px`;
|
|
175
175
|
}
|
|
176
176
|
};
|
|
177
|
-
(async () => {
|
|
177
|
+
void (async () => {
|
|
178
178
|
const envDirEl = document.getElementById("env-dir");
|
|
179
179
|
try {
|
|
180
180
|
await app.connect();
|
package/lib/mcp/index.js
CHANGED
|
@@ -493,12 +493,16 @@ class FirebaseMcpServer {
|
|
|
493
493
|
const message = this._pendingMessages.shift();
|
|
494
494
|
if (!message)
|
|
495
495
|
continue;
|
|
496
|
-
this.server
|
|
496
|
+
this.server
|
|
497
|
+
.sendLoggingMessage({
|
|
497
498
|
level: message.level,
|
|
498
499
|
data: message.data,
|
|
500
|
+
})
|
|
501
|
+
.catch(() => {
|
|
499
502
|
});
|
|
500
503
|
}
|
|
501
|
-
|
|
504
|
+
this.server.sendLoggingMessage({ level, data }).catch(() => {
|
|
505
|
+
});
|
|
502
506
|
}
|
|
503
507
|
else {
|
|
504
508
|
this._pendingMessages.push({ level, data });
|
|
@@ -33,7 +33,7 @@ exports.get_report = (0, tool_1.tool)("crashlytics", {
|
|
|
33
33
|
_meta: {
|
|
34
34
|
requiresAuth: true,
|
|
35
35
|
},
|
|
36
|
-
}, async ({ appId, report, pageSize, filter, granularity }) => {
|
|
36
|
+
}, async ({ appId, report, pageSize, filter, filterExpression, granularity }) => {
|
|
37
37
|
const result = { content: [] };
|
|
38
38
|
if (!appId) {
|
|
39
39
|
result.isError = true;
|
|
@@ -52,7 +52,7 @@ exports.get_report = (0, tool_1.tool)("crashlytics", {
|
|
|
52
52
|
return result;
|
|
53
53
|
}
|
|
54
54
|
try {
|
|
55
|
-
const reportResponse = (0, reports_1.simplifyReport)(await (0, reports_1.getReport)(report, appId, filter, pageSize, granularity));
|
|
55
|
+
const reportResponse = (0, reports_1.simplifyReport)(await (0, reports_1.getReport)(report, appId, filter, pageSize, granularity, filterExpression));
|
|
56
56
|
reportResponse.usage =
|
|
57
57
|
reportResponse.groups && reportResponse.groups.length
|
|
58
58
|
? reportResponse.usage || ""
|
|
@@ -23,7 +23,7 @@ function parseVariables(unparsedVariables) {
|
|
|
23
23
|
obj = JSON.parse(unparsedVariables || "{}");
|
|
24
24
|
}
|
|
25
25
|
catch (e) {
|
|
26
|
-
throw new Error(
|
|
26
|
+
throw new Error(`Provided variables string \`${String(unparsedVariables)}\` is not valid JSON.`);
|
|
27
27
|
}
|
|
28
28
|
if (typeof obj !== "object" || obj == null)
|
|
29
29
|
throw new Error("not an object");
|
package/lib/profileReport.js
CHANGED
|
@@ -50,7 +50,7 @@ function formatNumber(num) {
|
|
|
50
50
|
function formatBytes(bytes) {
|
|
51
51
|
const threshold = 1000;
|
|
52
52
|
if (Math.round(bytes) < threshold) {
|
|
53
|
-
return bytes
|
|
53
|
+
return `${bytes} B`;
|
|
54
54
|
}
|
|
55
55
|
const units = ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
56
56
|
let u = -1;
|
package/lib/profiler.js
CHANGED
package/lib/rulesDeploy.js
CHANGED