firebase-tools 15.35.0 → 15.36.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/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/auth.js +8 -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-heapdumps-status.js +1 -1
- package/lib/commands/deploy.js +1 -3
- 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 +1 -3
- 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 +1 -0
- package/lib/crashlytics/events.js +122 -1
- package/lib/crashlytics/filters.js +12 -6
- package/lib/crashlytics/profilingManager.js +14 -34
- package/lib/crashlytics/utils.js +14 -0
- package/lib/database/import.js +5 -4
- package/lib/dataconnect/names.js +3 -3
- package/lib/dataconnect/schemaMigration.js +1 -1
- package/lib/deploy/functions/backend.js +0 -10
- package/lib/deploy/functions/cel.js +1 -1
- 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/v1alpha1.js +1 -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 +24 -24
- 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 +11 -7
- package/lib/emulator/functionsEmulatorRuntime.js +7 -2
- 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/extensions/extensionsHelper.js +2 -2
- package/lib/extensions/paramHelper.js +1 -1
- package/lib/extensions/provisioningHelper.js +1 -6
- package/lib/firestore/util.js +3 -3
- package/lib/frameworks/angular/utils.js +1 -1
- package/lib/frameworks/next/utils.js +1 -1
- 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/cloudfunctionsv2.js +0 -6
- package/lib/gcp/devConnect.js +2 -2
- package/lib/hosting/api.js +79 -0
- package/lib/hosting/proxy.js +4 -1
- package/lib/init/features/hosting/github.js +6 -4
- package/lib/init/features/hosting/index.js +4 -0
- package/lib/mcp/apps/init/mcp-app.js +4 -1
- package/lib/mcp/index.js +8 -2
- 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 +1 -1
- package/lib/mcp/tools/crashlytics/setup.js +392 -0
- package/lib/tsconfig.compile.tsbuildinfo +1 -1
- package/lib/tsconfig.publish.tsbuildinfo +1 -1
- package/lib/utils.js +4 -10
- package/package.json +1 -1
- package/lib/functions/kits/sources/index.js +0 -19
|
@@ -86,7 +86,7 @@ exports.AUTOPOPULATED_PARAM_PLACEHOLDERS = {
|
|
|
86
86
|
exports.resourceTypeToNiceName = {
|
|
87
87
|
"firebaseextensions.v1beta.function": "Cloud Function",
|
|
88
88
|
};
|
|
89
|
-
const repoRegex = new RegExp(`^https
|
|
89
|
+
const repoRegex = new RegExp(`^https://github.com/[^/]+/[^/]+$`);
|
|
90
90
|
const stageOptions = ["rc", "alpha", "beta", "stable"];
|
|
91
91
|
function getDBInstanceFromURL(databaseUrl = "") {
|
|
92
92
|
const instanceRegex = new RegExp("(?:https://)(.*)(?:.firebaseio.com)");
|
|
@@ -268,7 +268,7 @@ function validateSpec(spec) {
|
|
|
268
268
|
async function promptForValidInstanceId(instanceId) {
|
|
269
269
|
let instanceIdIsValid = false;
|
|
270
270
|
let newInstanceId = "";
|
|
271
|
-
const instanceIdRegex = /^[a-z][a-z\d
|
|
271
|
+
const instanceIdRegex = /^[a-z][a-z\d-]*[a-z\d]$/;
|
|
272
272
|
while (!instanceIdIsValid) {
|
|
273
273
|
newInstanceId = await (0, prompt_1.input)({
|
|
274
274
|
default: instanceId,
|
|
@@ -181,7 +181,7 @@ function readEnvFile(envPath) {
|
|
|
181
181
|
return result.envs;
|
|
182
182
|
}
|
|
183
183
|
function isSystemParam(paramName) {
|
|
184
|
-
const regex = /^firebaseextensions\.[a-zA-Z0-9
|
|
184
|
+
const regex = /^firebaseextensions\.[a-zA-Z0-9.]*\//;
|
|
185
185
|
return regex.test(paramName);
|
|
186
186
|
}
|
|
187
187
|
function partitionParams(params) {
|
|
@@ -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/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
|
}
|
|
@@ -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
|
}
|