firebase-tools-with-isolate 15.32.0 → 15.34.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/accountImporter.js +6 -3
- package/lib/api.js +3 -3
- package/lib/apphosting/backend.js +1 -1
- package/lib/apphosting/secrets/index.js +7 -2
- package/lib/checkValidTargetFilters.js +1 -0
- package/lib/command.js +31 -24
- package/lib/commands/apps-create.js +34 -3
- package/lib/commands/crashlytics-heapdumps-disable.js +26 -0
- package/lib/commands/crashlytics-heapdumps-enable.js +54 -0
- package/lib/commands/crashlytics-heapdumps-status.js +32 -0
- package/lib/commands/deploy.js +3 -0
- package/lib/commands/functions-kits-uninstall.js +43 -21
- package/lib/commands/functions-lifecycle-list.js +5 -6
- package/lib/commands/hosting-channel-deploy.js +3 -3
- package/lib/commands/hosting-clone.js +102 -31
- package/lib/commands/hosting-disable.js +5 -1
- package/lib/commands/index.js +9 -0
- package/lib/commands/init.js +7 -0
- package/lib/commands/run-services-update.js +16 -0
- package/lib/config.js +1 -0
- package/lib/crashlytics/alerts.js +122 -0
- package/lib/crashlytics/onboarding.js +71 -3
- package/lib/crashlytics/profilingManager.js +195 -0
- package/lib/crashlytics/sourcemap.js +46 -11
- package/lib/crashlytics/types.js +6 -1
- package/lib/deploy/apphosting/prepare.js +1 -0
- package/lib/deploy/auth/deploy.js +1 -1
- package/lib/deploy/auth/prepare.js +6 -7
- package/lib/deploy/firestore/prepare.js +5 -5
- package/lib/deploy/functions/build.js +3 -0
- package/lib/deploy/functions/cel.js +89 -58
- package/lib/deploy/functions/functionsDeployHelper.js +10 -0
- package/lib/deploy/functions/params.js +4 -2
- package/lib/deploy/functions/prepare.js +25 -8
- package/lib/deploy/functions/release/executor.js +7 -3
- package/lib/deploy/functions/release/fabricator.js +42 -14
- package/lib/deploy/functions/release/planner.js +3 -2
- package/lib/deploy/functions/release/sourceTokenScraper.js +1 -1
- package/lib/deploy/functions/validate.js +16 -0
- package/lib/deploy/hosting/prepare.js +1 -1
- package/lib/deploy/hosting/release.js +2 -2
- package/lib/deploy/index.js +5 -0
- package/lib/deploy/run/args.js +2 -0
- package/lib/deploy/run/buildEnv.js +72 -0
- package/lib/deploy/run/deploy.js +214 -0
- package/lib/deploy/run/index.js +23 -0
- package/lib/deploy/run/prepare.js +47 -0
- package/lib/deploy/run/prereqs.js +32 -0
- package/lib/deploy/run/release.js +9 -0
- package/lib/deploy/run/update.js +50 -0
- package/lib/deploy/run/util.js +73 -0
- package/lib/emulator/apphosting/serve.js +1 -1
- package/lib/emulator/auth/operations.js +8 -4
- package/lib/emulator/auth/utils.js +1 -1
- package/lib/emulator/commandUtils.js +7 -3
- package/lib/emulator/databaseEmulator.js +7 -3
- package/lib/emulator/dataconnect/pgliteServer.js +1 -1
- package/lib/emulator/dataconnectEmulator.js +1 -1
- package/lib/emulator/download.js +1 -1
- package/lib/emulator/downloadableEmulatorInfo.json +31 -31
- package/lib/emulator/downloadableEmulators.js +1 -3
- package/lib/emulator/emulatorLogger.js +2 -1
- package/lib/emulator/eventarcEmulator.js +1 -1
- package/lib/emulator/functionsEmulatorRuntime.js +2 -1
- package/lib/emulator/functionsEmulatorShared.js +1 -41
- package/lib/experiments.js +17 -11
- package/lib/extensions/warnings.js +48 -7
- package/lib/firestore/validator.js +1 -1
- package/lib/frameworks/next/constants.js +20 -12
- package/lib/frameworks/next/index.js +4 -23
- package/lib/frameworks/next/utils.js +28 -0
- package/lib/functions/env.js +4 -2
- package/lib/functions/projectConfig.js +10 -5
- package/lib/gcp/artifactregistry.js +20 -0
- package/lib/gcp/cloudmonitoring.js +80 -3
- package/lib/gcp/cloudsql/permissions.js +21 -32
- package/lib/gcp/cloudsql/permissionsSetup.js +6 -6
- package/lib/gcp/cloudtasks.js +15 -1
- package/lib/gcp/cloudtrace.js +38 -0
- package/lib/gcp/run.js +5 -0
- package/lib/gcp/runv2.js +32 -11
- package/lib/gcp/storage.js +9 -5
- package/lib/hosting/api.js +15 -15
- package/lib/hosting/runTags.js +1 -1
- package/lib/init/features/auth.js +46 -8
- package/lib/init/features/hosting/index.js +4 -2
- package/lib/init/features/index.js +4 -1
- package/lib/init/features/run.js +159 -0
- package/lib/init/index.js +6 -0
- package/lib/management/apps.js +4 -2
- package/lib/mcp/tools/firestore/converter.js +2 -2
- package/lib/mcp/util.js +11 -10
- package/lib/profileReport.js +12 -9
- package/lib/scopes.js +1 -3
- package/lib/streamJson.js +1 -0
- package/lib/throttler/throttler.js +1 -0
- package/lib/tsconfig.publish.tsbuildinfo +1 -1
- package/lib/utils.js +0 -15
- package/package.json +11 -17
- package/schema/firebase-config.json +41 -0
- package/schema/firebaserc.json +133 -0
- package/lib/mcp/resources/guides/init_data_connect.js +0 -30
- package/lib/mcp/resources/guides/init_rtdb.js +0 -30
package/lib/mcp/util.js
CHANGED
|
@@ -114,13 +114,13 @@ function deepClean(obj, isRootLevel = false) {
|
|
|
114
114
|
return obj;
|
|
115
115
|
}
|
|
116
116
|
const cleanedObj = { ...obj };
|
|
117
|
-
if (
|
|
117
|
+
if (Object.prototype.hasOwnProperty.call(cleanedObj, "$schema")) {
|
|
118
118
|
delete cleanedObj.$schema;
|
|
119
119
|
}
|
|
120
|
-
if (
|
|
120
|
+
if (Object.prototype.hasOwnProperty.call(cleanedObj, "additionalProperties")) {
|
|
121
121
|
delete cleanedObj.additionalProperties;
|
|
122
122
|
}
|
|
123
|
-
if (
|
|
123
|
+
if (Object.prototype.hasOwnProperty.call(cleanedObj, "type")) {
|
|
124
124
|
const currentType = cleanedObj.type;
|
|
125
125
|
if (Array.isArray(currentType)) {
|
|
126
126
|
let filteredTypes = currentType.filter((t) => t !== "null");
|
|
@@ -159,12 +159,12 @@ function deepClean(obj, isRootLevel = false) {
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
if (
|
|
162
|
+
if (Object.prototype.hasOwnProperty.call(cleanedObj, "properties") &&
|
|
163
163
|
typeof cleanedObj.properties === "object" &&
|
|
164
164
|
cleanedObj.properties !== null) {
|
|
165
165
|
const newProperties = {};
|
|
166
166
|
for (const key in cleanedObj.properties) {
|
|
167
|
-
if (
|
|
167
|
+
if (Object.prototype.hasOwnProperty.call(cleanedObj.properties, key)) {
|
|
168
168
|
const cleanedPropertySchema = deepClean(cleanedObj.properties[key], false);
|
|
169
169
|
if (cleanedPropertySchema !== null) {
|
|
170
170
|
newProperties[key] = cleanedPropertySchema;
|
|
@@ -178,7 +178,7 @@ function deepClean(obj, isRootLevel = false) {
|
|
|
178
178
|
cleanedObj.properties = newProperties;
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
if (
|
|
181
|
+
if (Object.prototype.hasOwnProperty.call(cleanedObj, "items") &&
|
|
182
182
|
typeof cleanedObj.items === "object" &&
|
|
183
183
|
cleanedObj.items !== null) {
|
|
184
184
|
const cleanedItemsSchema = deepClean(cleanedObj.items, false);
|
|
@@ -191,12 +191,12 @@ function deepClean(obj, isRootLevel = false) {
|
|
|
191
191
|
}
|
|
192
192
|
const defKeywords = ["$defs", "definitions"];
|
|
193
193
|
for (const keyword of defKeywords) {
|
|
194
|
-
if (
|
|
194
|
+
if (Object.prototype.hasOwnProperty.call(cleanedObj, keyword) &&
|
|
195
195
|
typeof cleanedObj[keyword] === "object" &&
|
|
196
196
|
cleanedObj[keyword] !== null) {
|
|
197
197
|
const newDefs = {};
|
|
198
198
|
for (const defKey in cleanedObj[keyword]) {
|
|
199
|
-
if (cleanedObj[keyword]
|
|
199
|
+
if (Object.prototype.hasOwnProperty.call(cleanedObj[keyword], defKey)) {
|
|
200
200
|
const cleanedDef = deepClean(cleanedObj[keyword][defKey], false);
|
|
201
201
|
if (cleanedDef !== null) {
|
|
202
202
|
newDefs[defKey] = cleanedDef;
|
|
@@ -213,7 +213,8 @@ function deepClean(obj, isRootLevel = false) {
|
|
|
213
213
|
}
|
|
214
214
|
const schemaArrayKeywords = ["anyOf", "allOf", "oneOf"];
|
|
215
215
|
for (const keyword of schemaArrayKeywords) {
|
|
216
|
-
if (
|
|
216
|
+
if (Object.prototype.hasOwnProperty.call(cleanedObj, keyword) &&
|
|
217
|
+
Array.isArray(cleanedObj[keyword])) {
|
|
217
218
|
const newSchemaArray = cleanedObj[keyword]
|
|
218
219
|
.map((subSchema) => deepClean(subSchema, false))
|
|
219
220
|
.filter((subSchema) => subSchema !== null);
|
|
@@ -228,7 +229,7 @@ function deepClean(obj, isRootLevel = false) {
|
|
|
228
229
|
return cleanedObj;
|
|
229
230
|
}
|
|
230
231
|
function cleanSchema(schema) {
|
|
231
|
-
if (schema &&
|
|
232
|
+
if (schema && Object.prototype.hasOwnProperty.call(schema, "type")) {
|
|
232
233
|
const topLevelType = schema.type;
|
|
233
234
|
if (topLevelType === "array") {
|
|
234
235
|
return {};
|
package/lib/profileReport.js
CHANGED
|
@@ -13,7 +13,6 @@ const _ = require("lodash");
|
|
|
13
13
|
const readline = require("readline");
|
|
14
14
|
const error_1 = require("./error");
|
|
15
15
|
const logger_1 = require("./logger");
|
|
16
|
-
const DATA_LINE_REGEX = /^data: /;
|
|
17
16
|
const BANDWIDTH_NOTE = "NOTE: The numbers reported here are only estimates of the data" +
|
|
18
17
|
" payloads from read operations. They are NOT a valid measure of your bandwidth bill.";
|
|
19
18
|
const SPEED_NOTE = "NOTE: Speeds are reported at millisecond resolution and" +
|
|
@@ -24,11 +23,11 @@ const SPEED_NOTE = "NOTE: Speeds are reported at millisecond resolution and" +
|
|
|
24
23
|
const COLLAPSE_THRESHOLD = 25;
|
|
25
24
|
const COLLAPSE_WILDCARD = ["$wildcard"];
|
|
26
25
|
function extractJSON(line, input) {
|
|
27
|
-
if (!input && !
|
|
26
|
+
if (!input && !line.startsWith("data: ")) {
|
|
28
27
|
return null;
|
|
29
28
|
}
|
|
30
29
|
else if (!input) {
|
|
31
|
-
line = line.substring(
|
|
30
|
+
line = line.substring(6);
|
|
32
31
|
}
|
|
33
32
|
try {
|
|
34
33
|
return JSON.parse(line);
|
|
@@ -120,10 +119,10 @@ class ProfileReport {
|
|
|
120
119
|
opStats.rejected = 0;
|
|
121
120
|
}
|
|
122
121
|
opStats.times += 1;
|
|
123
|
-
if (
|
|
122
|
+
if (Object.prototype.hasOwnProperty.call(data, "millis")) {
|
|
124
123
|
opStats.millis += data.millis;
|
|
125
124
|
}
|
|
126
|
-
if (
|
|
125
|
+
if (Object.prototype.hasOwnProperty.call(data, "pendingTime")) {
|
|
127
126
|
opStats.pendingCount++;
|
|
128
127
|
opStats.pendingTime += data.pendingTime;
|
|
129
128
|
}
|
|
@@ -143,10 +142,10 @@ class ProfileReport {
|
|
|
143
142
|
}
|
|
144
143
|
const node = opType[path];
|
|
145
144
|
node.times += 1;
|
|
146
|
-
if (
|
|
145
|
+
if (Object.prototype.hasOwnProperty.call(data, "millis")) {
|
|
147
146
|
node.millis += data.millis;
|
|
148
147
|
}
|
|
149
|
-
if (
|
|
148
|
+
if (Object.prototype.hasOwnProperty.call(data, "pendingTime")) {
|
|
150
149
|
node.pendingCount++;
|
|
151
150
|
node.pendingTime += data.pendingTime;
|
|
152
151
|
}
|
|
@@ -466,8 +465,12 @@ class ProfileReport {
|
|
|
466
465
|
}
|
|
467
466
|
}
|
|
468
467
|
});
|
|
469
|
-
rl.on("error", () => {
|
|
470
|
-
reject(
|
|
468
|
+
rl.on("error", (err) => {
|
|
469
|
+
reject(err instanceof Error
|
|
470
|
+
? err
|
|
471
|
+
: new error_1.FirebaseError("There was an error creating the report.", {
|
|
472
|
+
original: err,
|
|
473
|
+
}));
|
|
471
474
|
});
|
|
472
475
|
outStream.on("error", () => {
|
|
473
476
|
errored = true;
|
package/lib/scopes.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.CLOUD_PLATFORM = exports.FIREBASE_PLATFORM = exports.CLOUD_PROJECTS_READONLY = exports.USERINFO_EMAIL = exports.EMAIL = exports.OPENID = void 0;
|
|
4
4
|
exports.OPENID = "openid";
|
|
5
5
|
exports.EMAIL = "email";
|
|
6
6
|
exports.USERINFO_EMAIL = "https://www.googleapis.com/auth/userinfo.email";
|
|
7
7
|
exports.CLOUD_PROJECTS_READONLY = "https://www.googleapis.com/auth/cloudplatformprojects.readonly";
|
|
8
8
|
exports.FIREBASE_PLATFORM = "https://www.googleapis.com/auth/firebase";
|
|
9
9
|
exports.CLOUD_PLATFORM = "https://www.googleapis.com/auth/cloud-platform";
|
|
10
|
-
exports.CLOUD_STORAGE = "https://www.googleapis.com/auth/devstorage.read_write";
|
|
11
|
-
exports.CLOUD_PUBSUB = "https://www.googleapis.com/auth/pubsub";
|
package/lib/streamJson.js
CHANGED