firebase-tools-with-isolate 15.35.0 → 15.37.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/appcheck/debugTokens.js +293 -0
- package/lib/appcheck/localConfig.js +191 -0
- package/lib/appdistribution/options-parser-util.js +1 -1
- package/lib/apphosting/githubConnections.js +1 -1
- package/lib/apptesting/parseTestFiles.js +1 -1
- package/lib/auth.js +9 -3
- package/lib/bin/progressiveHelp.js +1 -1
- package/lib/command.js +1 -2
- package/lib/commands/appcheck-debugtokens-create.js +60 -35
- package/lib/commands/appcheck-debugtokens-delete.js +21 -7
- package/lib/commands/appcheck-debugtokens-list.js +37 -8
- package/lib/commands/appcheck-debugtokens-prune.js +59 -0
- 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/dataconnect-services-list.js +8 -2
- package/lib/commands/deploy.js +1 -3
- package/lib/commands/ext-dev-init.js +1 -1
- package/lib/commands/hosting-channel-create.js +1 -3
- package/lib/commands/hosting-channel-delete.js +1 -3
- package/lib/commands/hosting-channel-deploy.js +1 -3
- package/lib/commands/hosting-channel-list.js +1 -3
- package/lib/commands/hosting-channel-open.js +5 -4
- package/lib/commands/hosting-clone.js +3 -5
- package/lib/commands/hosting-disable.js +2 -2
- package/lib/commands/hosting-sites-create.js +1 -3
- package/lib/commands/hosting-sites-delete.js +1 -3
- package/lib/commands/hosting-sites-get.js +1 -3
- package/lib/commands/hosting-sites-list.js +1 -3
- package/lib/commands/index.js +11 -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 +122 -1
- package/lib/crashlytics/filters.js +12 -6
- package/lib/crashlytics/profilingManager.js +77 -50
- package/lib/crashlytics/reports.js +5 -1
- package/lib/crashlytics/utils.js +14 -0
- package/lib/database/import.js +5 -4
- package/lib/dataconnect/client.js +14 -8
- package/lib/dataconnect/names.js +3 -3
- package/lib/dataconnect/schemaMigration.js +1 -1
- package/lib/deploy/dataconnect/release.js +2 -2
- package/lib/deploy/firestore/prepare.js +21 -3
- package/lib/deploy/functions/backend.js +0 -10
- package/lib/deploy/functions/cel.js +2 -2
- package/lib/deploy/functions/deploy.js +2 -1
- package/lib/deploy/functions/prepare.js +28 -0
- package/lib/deploy/functions/release/fabricator.js +27 -3
- package/lib/deploy/functions/release/planner.js +3 -0
- package/lib/deploy/functions/release/reporter.js +0 -26
- package/lib/deploy/functions/runtimes/discovery/index.js +4 -1
- package/lib/deploy/functions/runtimes/discovery/parsing.js +1 -1
- package/lib/deploy/functions/runtimes/discovery/v1alpha1.js +1 -1
- package/lib/deploy/functions/runtimes/supported/index.js +10 -4
- package/lib/deploy/functions/runtimes/supported/types.js +7 -1
- package/lib/deploy/functions/services/index.js +13 -11
- package/lib/deploy/hosting/prepare.js +1 -3
- package/lib/deploy/lifecycleHooks.js +1 -1
- package/lib/emulator/auth/operations.js +2 -2
- package/lib/emulator/auth/server.js +4 -2
- package/lib/emulator/auth/widget_ui.js +1 -1
- package/lib/emulator/commandUtils.js +4 -1
- package/lib/emulator/databaseEmulator.js +16 -11
- package/lib/emulator/dataconnect/pgliteServer.js +30 -24
- package/lib/emulator/downloadableEmulatorInfo.json +31 -31
- package/lib/emulator/downloadableEmulators.js +2 -2
- package/lib/emulator/extensions/postinstall.js +6 -6
- package/lib/emulator/firestoreEmulator.js +21 -15
- package/lib/emulator/functionsEmulator.js +84 -8
- package/lib/emulator/functionsEmulatorRuntime.js +9 -4
- package/lib/emulator/hub.js +12 -8
- package/lib/emulator/shared/express.js +30 -0
- package/lib/emulator/storage/apis/firebase.js +11 -10
- package/lib/emulator/storage/apis/gcloud.js +21 -20
- package/lib/emulator/storage/files.js +1 -1
- package/lib/emulator/storage/rules/manager.js +15 -12
- package/lib/emulator/storage/server.js +10 -5
- package/lib/experiments.js +5 -0
- package/lib/extensions/extensionsHelper.js +2 -2
- package/lib/extensions/listExtensions.js +1 -1
- package/lib/extensions/paramHelper.js +1 -1
- package/lib/extensions/provisioningHelper.js +1 -6
- package/lib/firestore/delete.js +2 -3
- package/lib/firestore/util.js +3 -3
- package/lib/frameworks/angular/utils.js +1 -1
- package/lib/frameworks/next/constants.js +17 -14
- package/lib/frameworks/next/index.js +25 -3
- package/lib/frameworks/next/utils.js +7 -9
- package/lib/functions/kits/install.js +221 -316
- package/lib/functions/kits/sources/directory.js +32 -0
- package/lib/functions/kits/sources/npm.js +55 -5
- package/lib/functionsConfig.js +0 -4
- package/lib/functionsShellCommandAction.js +1 -1
- package/lib/gcp/cloudbilling.js +2 -2
- package/lib/gcp/cloudbuild.js +0 -77
- package/lib/gcp/cloudfunctionsv2.js +0 -6
- package/lib/gcp/cloudscheduler.js +12 -0
- package/lib/gcp/cloudtasks.js +0 -4
- package/lib/gcp/devConnect.js +2 -8
- 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 +79 -7
- package/lib/hosting/implicitInit.js +1 -1
- package/lib/hosting/proxy.js +5 -2
- 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/hosting/github.js +6 -4
- package/lib/init/features/hosting/index.js +4 -0
- 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 +5 -2
- package/lib/mcp/apps/update_environment/mcp-app.js +1 -1
- package/lib/mcp/index.js +14 -4
- package/lib/mcp/prompts/apptesting/run_test.js +3 -3
- package/lib/mcp/prompts/core/deploy.js +3 -3
- package/lib/mcp/resources/guides/init_ai.js +10 -10
- package/lib/mcp/tools/crashlytics/events.js +18 -93
- package/lib/mcp/tools/crashlytics/index.js +2 -0
- package/lib/mcp/tools/crashlytics/reports.js +3 -3
- package/lib/mcp/tools/crashlytics/setup.js +392 -0
- 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.publish.tsbuildinfo +1 -1
- package/lib/utils.js +5 -11
- package/package.json +16 -14
- package/schema/firebase-config.json +3 -0
- package/lib/functions/kits/sources/index.js +0 -19
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DeferredProduct = void 0;
|
|
4
|
-
exports.checkProductsProvisioned = checkProductsProvisioned;
|
|
5
4
|
exports.bulkCheckProductsProvisioned = bulkCheckProductsProvisioned;
|
|
6
5
|
exports.getUsedProducts = getUsedProducts;
|
|
7
6
|
const marked_1 = require("marked");
|
|
@@ -16,10 +15,6 @@ var DeferredProduct;
|
|
|
16
15
|
DeferredProduct[DeferredProduct["STORAGE"] = 0] = "STORAGE";
|
|
17
16
|
DeferredProduct[DeferredProduct["AUTH"] = 1] = "AUTH";
|
|
18
17
|
})(DeferredProduct || (exports.DeferredProduct = DeferredProduct = {}));
|
|
19
|
-
async function checkProductsProvisioned(projectId, spec) {
|
|
20
|
-
const usedProducts = getUsedProducts(spec);
|
|
21
|
-
await checkProducts(projectId, usedProducts);
|
|
22
|
-
}
|
|
23
18
|
async function bulkCheckProductsProvisioned(projectId, instanceSpecs) {
|
|
24
19
|
const usedProducts = await Promise.all(instanceSpecs.map(async (i) => {
|
|
25
20
|
const extensionSpec = await (0, planner_1.getExtensionSpec)(i);
|
|
@@ -86,7 +81,7 @@ function getUsedProducts(spec) {
|
|
|
86
81
|
return usedProducts;
|
|
87
82
|
}
|
|
88
83
|
function getTriggerType(propertiesYaml) {
|
|
89
|
-
return propertiesYaml?.match(/eventType
|
|
84
|
+
return propertiesYaml?.match(/eventType: ([\S]+)/)?.[1];
|
|
90
85
|
}
|
|
91
86
|
async function isStorageProvisioned(projectId) {
|
|
92
87
|
const client = new apiv2_1.Client({ urlPrefix: (0, api_1.firebaseStorageOrigin)(), apiVersion: "v1beta" });
|
package/lib/firestore/delete.js
CHANGED
|
@@ -16,7 +16,6 @@ class FirestoreDelete {
|
|
|
16
16
|
this.path = path || "";
|
|
17
17
|
this.recursive = Boolean(options.recursive);
|
|
18
18
|
this.shallow = Boolean(options.shallow);
|
|
19
|
-
this.allCollections = Boolean(options.allCollections);
|
|
20
19
|
this.databaseId = options.databaseId;
|
|
21
20
|
this.urlPrefix = options.urlPrefix ?? (0, api_1.firestoreOriginOrEmulator)();
|
|
22
21
|
this.readBatchSize = 7500;
|
|
@@ -176,7 +175,7 @@ class FirestoreDelete {
|
|
|
176
175
|
return true;
|
|
177
176
|
}
|
|
178
177
|
if (failures.length > 0) {
|
|
179
|
-
logger_1.logger.debug(
|
|
178
|
+
logger_1.logger.debug(`Found ${failures.length} failed operations, failing.`);
|
|
180
179
|
return true;
|
|
181
180
|
}
|
|
182
181
|
if (queue.length <= this.maxQueueSize && pagesRemaining && !pageIncoming) {
|
|
@@ -193,7 +192,7 @@ class FirestoreDelete {
|
|
|
193
192
|
lastDocName = docs[docs.length - 1].name;
|
|
194
193
|
})
|
|
195
194
|
.catch((e) => {
|
|
196
|
-
logger_1.logger.debug(
|
|
195
|
+
logger_1.logger.debug(`Failed to fetch page after ${String(lastDocName)}`, e);
|
|
197
196
|
pageIncoming = false;
|
|
198
197
|
fetchFailures++;
|
|
199
198
|
if (fetchFailures >= 3) {
|
package/lib/firestore/util.js
CHANGED
|
@@ -6,9 +6,9 @@ exports.parseFieldName = parseFieldName;
|
|
|
6
6
|
exports.booleanXOR = booleanXOR;
|
|
7
7
|
exports.getCurrentMinuteAsIsoString = getCurrentMinuteAsIsoString;
|
|
8
8
|
const error_1 = require("../error");
|
|
9
|
-
const DATABASE_NAME_REGEX = /projects\/([
|
|
10
|
-
const INDEX_NAME_REGEX = /projects\/([
|
|
11
|
-
const FIELD_NAME_REGEX = /projects\/([
|
|
9
|
+
const DATABASE_NAME_REGEX = /projects\/([^/]+?)\/databases\/([^/]+)/;
|
|
10
|
+
const INDEX_NAME_REGEX = /projects\/([^/]+?)\/databases\/([^/]+?)\/collectionGroups\/([^/]+?)\/indexes\/([^/]*)/;
|
|
11
|
+
const FIELD_NAME_REGEX = /projects\/([^/]+?)\/databases\/([^/]+?)\/collectionGroups\/([^/]+?)\/fields\/([^/]*)/;
|
|
12
12
|
function parseDatabaseName(name) {
|
|
13
13
|
if (!name) {
|
|
14
14
|
throw new error_1.FirebaseError(`Cannot parse undefined database name.`);
|
|
@@ -52,7 +52,7 @@ async function localesForTarget(dir, architectHost, target, workspaceProject) {
|
|
|
52
52
|
locales = [defaultLocale];
|
|
53
53
|
for (const [locale, { baseHref }] of Object.entries(i18n.locales)) {
|
|
54
54
|
if (baseHref !== "")
|
|
55
|
-
throw new error_1.FirebaseError(`All your i18n locales must have a baseHref of
|
|
55
|
+
throw new error_1.FirebaseError(`All your i18n locales must have a baseHref of "" on Firebase, errored on ${locale}.`);
|
|
56
56
|
locales.push(locale);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -23,42 +23,45 @@ const WEBPACK_LAYERS_NAMES = {
|
|
|
23
23
|
reactServerComponents: "rsc",
|
|
24
24
|
serverSideRendering: "ssr",
|
|
25
25
|
actionBrowser: "action-browser",
|
|
26
|
-
|
|
27
|
-
apiEdge: "api-edge",
|
|
26
|
+
api: "api",
|
|
28
27
|
middleware: "middleware",
|
|
29
|
-
instrument: "instrument",
|
|
30
28
|
edgeAsset: "edge-asset",
|
|
31
29
|
appPagesBrowser: "app-pages-browser",
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
pagesDirNode: "pages-dir-node",
|
|
30
|
+
appMetadataRoute: "app-metadata-route",
|
|
31
|
+
appRouteHandler: "app-route-handler",
|
|
35
32
|
};
|
|
36
33
|
exports.WEBPACK_LAYERS = {
|
|
37
34
|
...WEBPACK_LAYERS_NAMES,
|
|
35
|
+
pagesDirBrowser: "pages-dir-browser",
|
|
36
|
+
pagesDirEdge: "pages-dir-edge",
|
|
37
|
+
pagesDirNode: "pages-dir-node",
|
|
38
|
+
apiNode: "api-node",
|
|
39
|
+
apiEdge: "api-edge",
|
|
40
|
+
instrument: "instrument",
|
|
38
41
|
GROUP: {
|
|
39
42
|
builtinReact: [WEBPACK_LAYERS_NAMES.reactServerComponents, WEBPACK_LAYERS_NAMES.actionBrowser],
|
|
40
43
|
serverOnly: [
|
|
44
|
+
WEBPACK_LAYERS_NAMES.middleware,
|
|
41
45
|
WEBPACK_LAYERS_NAMES.reactServerComponents,
|
|
42
46
|
WEBPACK_LAYERS_NAMES.actionBrowser,
|
|
43
|
-
|
|
44
|
-
WEBPACK_LAYERS_NAMES.middleware,
|
|
47
|
+
"instrument",
|
|
45
48
|
],
|
|
46
|
-
neutralTarget: [
|
|
49
|
+
neutralTarget: ["api-node", "api-edge"],
|
|
47
50
|
clientOnly: [WEBPACK_LAYERS_NAMES.serverSideRendering, WEBPACK_LAYERS_NAMES.appPagesBrowser],
|
|
48
51
|
bundled: [
|
|
52
|
+
WEBPACK_LAYERS_NAMES.shared,
|
|
53
|
+
WEBPACK_LAYERS_NAMES.middleware,
|
|
49
54
|
WEBPACK_LAYERS_NAMES.reactServerComponents,
|
|
50
|
-
WEBPACK_LAYERS_NAMES.actionBrowser,
|
|
51
55
|
WEBPACK_LAYERS_NAMES.serverSideRendering,
|
|
56
|
+
WEBPACK_LAYERS_NAMES.actionBrowser,
|
|
57
|
+
"instrument",
|
|
52
58
|
WEBPACK_LAYERS_NAMES.appPagesBrowser,
|
|
53
|
-
WEBPACK_LAYERS_NAMES.shared,
|
|
54
|
-
WEBPACK_LAYERS_NAMES.instrument,
|
|
55
|
-
WEBPACK_LAYERS_NAMES.middleware,
|
|
56
59
|
],
|
|
57
60
|
appPages: [
|
|
58
61
|
WEBPACK_LAYERS_NAMES.reactServerComponents,
|
|
59
62
|
WEBPACK_LAYERS_NAMES.serverSideRendering,
|
|
60
|
-
WEBPACK_LAYERS_NAMES.appPagesBrowser,
|
|
61
63
|
WEBPACK_LAYERS_NAMES.actionBrowser,
|
|
64
|
+
WEBPACK_LAYERS_NAMES.appPagesBrowser,
|
|
62
65
|
],
|
|
63
66
|
},
|
|
64
67
|
};
|
|
@@ -16,6 +16,7 @@ const url_1 = require("url");
|
|
|
16
16
|
const semver_1 = require("semver");
|
|
17
17
|
const clc = require("colorette");
|
|
18
18
|
const fsutils_1 = require("../../fsutils");
|
|
19
|
+
const streamJson_1 = require("../../streamJson");
|
|
19
20
|
const prompt_1 = require("../../prompt");
|
|
20
21
|
const error_1 = require("../../error");
|
|
21
22
|
const utils_1 = require("../utils");
|
|
@@ -290,11 +291,11 @@ async function ɵcodegenPublicDirectory(sourceDir, destDir, _, context) {
|
|
|
290
291
|
{
|
|
291
292
|
srcRoute: null,
|
|
292
293
|
initialRevalidateSeconds: false,
|
|
293
|
-
initialExpireSeconds: undefined,
|
|
294
294
|
dataRoute: "",
|
|
295
295
|
experimentalPPR: false,
|
|
296
|
-
renderingMode: undefined,
|
|
297
296
|
prefetchDataRoute: "",
|
|
297
|
+
initialExpireSeconds: undefined,
|
|
298
|
+
renderingMode: undefined,
|
|
298
299
|
allowHeader: [],
|
|
299
300
|
},
|
|
300
301
|
];
|
|
@@ -394,7 +395,28 @@ async function ɵcodegenFunctionsDirectory(sourceDir, destDir, target, context)
|
|
|
394
395
|
if (!esbuild) {
|
|
395
396
|
throw new error_1.FirebaseError(`Failed to load esbuild from path: ${esbuildPath}`);
|
|
396
397
|
}
|
|
397
|
-
const
|
|
398
|
+
const { chain, parser, pick, streamObject } = await (0, streamJson_1.loadStreamJson)();
|
|
399
|
+
const productionDeps = await new Promise((resolve) => {
|
|
400
|
+
const dependencies = [];
|
|
401
|
+
const npmLs = (0, cross_spawn_1.spawn)("npm", ["ls", "--omit=dev", "--all", "--json=true"], {
|
|
402
|
+
cwd: sourceDir,
|
|
403
|
+
timeout: constants_1.NPM_COMMAND_TIMEOUT_MILLIES,
|
|
404
|
+
});
|
|
405
|
+
const pipeline = chain([
|
|
406
|
+
npmLs.stdout,
|
|
407
|
+
parser({ packValues: false, packKeys: true, streamValues: false }),
|
|
408
|
+
pick({ filter: "dependencies" }),
|
|
409
|
+
streamObject(),
|
|
410
|
+
({ key, value }) => [
|
|
411
|
+
key,
|
|
412
|
+
...(0, utils_2.allDependencyNames)(value),
|
|
413
|
+
],
|
|
414
|
+
]);
|
|
415
|
+
pipeline.on("data", (it) => dependencies.push(it));
|
|
416
|
+
pipeline.on("end", () => {
|
|
417
|
+
resolve([...new Set(dependencies)]);
|
|
418
|
+
});
|
|
419
|
+
});
|
|
398
420
|
const esbuildArgs = {
|
|
399
421
|
entryPoints: [(0, path_1.join)(sourceDir, configFile)],
|
|
400
422
|
outfile: (0, path_1.join)(destDir, configFile),
|
|
@@ -46,7 +46,7 @@ const streamJson_1 = require("../../streamJson");
|
|
|
46
46
|
const constants_2 = require("../constants");
|
|
47
47
|
const child_process_1 = require("child_process");
|
|
48
48
|
const error_1 = require("../../error");
|
|
49
|
-
exports.I18N_SOURCE = /\/:nextInternalLocale(\([
|
|
49
|
+
exports.I18N_SOURCE = /\/:nextInternalLocale(\([^)]+\))?/;
|
|
50
50
|
function cleanEscapedChars(path) {
|
|
51
51
|
return path.replace(/\\([(){}:+?*])/g, (a, b) => b);
|
|
52
52
|
}
|
|
@@ -193,26 +193,24 @@ async function getProductionDependencyNames(sourceDir) {
|
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
195
|
function getMiddlewareMatcherRegexes(middlewareManifest, functionsConfigManifest) {
|
|
196
|
-
const middlewareObjectValues = Object.values(middlewareManifest.middleware);
|
|
197
196
|
const middlewareMatchers = [];
|
|
198
197
|
if (middlewareManifest.version === 1) {
|
|
199
|
-
|
|
198
|
+
const values = Object.values(middlewareManifest.middleware);
|
|
199
|
+
middlewareMatchers.push(...values.map((page) => ({
|
|
200
200
|
regexp: page.regexp,
|
|
201
201
|
})));
|
|
202
202
|
}
|
|
203
203
|
else if (middlewareManifest.version === 2) {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
.flat());
|
|
204
|
+
const values = Object.values(middlewareManifest.middleware);
|
|
205
|
+
middlewareMatchers.push(...values.map((page) => page.matchers || []).flat());
|
|
207
206
|
}
|
|
208
207
|
else if (middlewareManifest.version === 3) {
|
|
209
208
|
if (functionsConfigManifest?.functions?.["/_middleware"]) {
|
|
210
209
|
middlewareMatchers.push(...(functionsConfigManifest.functions["/_middleware"].matchers || []));
|
|
211
210
|
}
|
|
212
211
|
else {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
.flat());
|
|
212
|
+
const values = Object.values(middlewareManifest.middleware);
|
|
213
|
+
middlewareMatchers.push(...values.map((page) => page.matchers || []).flat());
|
|
216
214
|
}
|
|
217
215
|
}
|
|
218
216
|
return middlewareMatchers.map((matcher) => new RegExp(matcher.regexp));
|