firebase-tools 15.34.2 → 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/api.js +2 -4
- 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/constants.js +1 -4
- package/lib/apphosting/githubConnections.js +1 -1
- package/lib/apphosting/utils.js +0 -26
- 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/{crashlytics-onboard-web.js → crashlytics-setup.js} +5 -5
- package/lib/commands/crashlytics-sourcemap-upload.js +4 -0
- package/lib/commands/deploy.js +1 -3
- package/lib/commands/emulators-start.js +2 -2
- 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 +4 -2
- 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/events.js +122 -1
- package/lib/crashlytics/filters.js +12 -6
- package/lib/crashlytics/firebasetelemetry.js +5 -3
- package/lib/crashlytics/onboarding.js +8 -7
- package/lib/crashlytics/profilingManager.js +14 -34
- package/lib/crashlytics/reports.js +46 -17
- package/lib/crashlytics/sourcemap.js +19 -5
- package/lib/crashlytics/utils.js +14 -0
- package/lib/database/import.js +5 -4
- package/lib/dataconnect/dataplaneClient.js +0 -10
- package/lib/dataconnect/names.js +3 -3
- package/lib/dataconnect/schemaMigration.js +1 -1
- 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/backend.js +0 -10
- package/lib/deploy/functions/cel.js +1 -1
- package/lib/deploy/functions/containerCleaner.js +1 -142
- package/lib/deploy/functions/functionsDeployHelper.js +0 -4
- 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/functions/validate.js +1 -1
- package/lib/deploy/hosting/prepare.js +1 -3
- package/lib/deploy/lifecycleHooks.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/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 +109 -24
- package/lib/emulator/databaseEmulator.js +16 -11
- package/lib/emulator/dataconnect/pgliteServer.js +31 -24
- package/lib/emulator/downloadableEmulatorInfo.json +24 -24
- package/lib/emulator/downloadableEmulators.js +45 -7
- 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/rules/runtime.js +1 -0
- package/lib/emulator/storage/server.js +10 -5
- package/lib/extensions/extensionsApi.js +0 -8
- package/lib/extensions/extensionsHelper.js +3 -24
- package/lib/extensions/paramHelper.js +1 -1
- package/lib/extensions/provisioningHelper.js +1 -6
- package/lib/extensions/secretsUtils.js +0 -24
- package/lib/firestore/util.js +3 -3
- package/lib/frameworks/angular/utils.js +1 -1
- package/lib/frameworks/next/utils.js +1 -12
- package/lib/fsAsync.js +34 -20
- package/lib/functions/kits/install.js +233 -628
- package/lib/functions/kits/sources/directory.js +91 -0
- package/lib/functions/kits/sources/npm.js +324 -0
- package/lib/functions/kits/sources/types.js +12 -0
- package/lib/functionsConfig.js +0 -4
- package/lib/functionsShellCommandAction.js +1 -1
- package/lib/gcp/artifactregistry.js +0 -5
- package/lib/gcp/cloudfunctionsv2.js +0 -6
- package/lib/gcp/devConnect.js +2 -2
- package/lib/gcp/iam.js +0 -4
- package/lib/gcp/pubsub.js +0 -14
- package/lib/gcp/storage.js +2 -1
- 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/init/features/run.js +3 -7
- 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/crashlytics_reports.js +33 -71
- 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 +26 -31
- 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 -2
- package/lib/deploy/hosting/args.js +0 -2
|
@@ -8,9 +8,7 @@ exports.isRewriteSupportedByHosting = isRewriteSupportedByHosting;
|
|
|
8
8
|
exports.isRedirectSupportedByHosting = isRedirectSupportedByHosting;
|
|
9
9
|
exports.isHeaderSupportedByHosting = isHeaderSupportedByHosting;
|
|
10
10
|
exports.getNextjsRewritesToUse = getNextjsRewritesToUse;
|
|
11
|
-
exports.usesAppDirRouter = usesAppDirRouter;
|
|
12
11
|
exports.usesNextImage = usesNextImage;
|
|
13
|
-
exports.hasUnoptimizedImage = hasUnoptimizedImage;
|
|
14
12
|
exports.isUsingMiddleware = isUsingMiddleware;
|
|
15
13
|
exports.isUsingImageOptimization = isUsingImageOptimization;
|
|
16
14
|
exports.isUsingNextImageInAppDirectory = isUsingNextImageInAppDirectory;
|
|
@@ -34,7 +32,6 @@ exports.findEsbuildPath = findEsbuildPath;
|
|
|
34
32
|
exports.getGlobalEsbuildVersion = getGlobalEsbuildVersion;
|
|
35
33
|
exports.installEsbuild = installEsbuild;
|
|
36
34
|
exports.isNextJsVersionVulnerable = isNextJsVersionVulnerable;
|
|
37
|
-
const fs_1 = require("fs");
|
|
38
35
|
const fs_extra_1 = require("fs-extra");
|
|
39
36
|
const path_1 = require("path");
|
|
40
37
|
const promises_1 = require("fs/promises");
|
|
@@ -49,7 +46,7 @@ const streamJson_1 = require("../../streamJson");
|
|
|
49
46
|
const constants_2 = require("../constants");
|
|
50
47
|
const child_process_1 = require("child_process");
|
|
51
48
|
const error_1 = require("../../error");
|
|
52
|
-
exports.I18N_SOURCE = /\/:nextInternalLocale(\([
|
|
49
|
+
exports.I18N_SOURCE = /\/:nextInternalLocale(\([^)]+\))?/;
|
|
53
50
|
function cleanEscapedChars(path) {
|
|
54
51
|
return path.replace(/\\([(){}:+?*])/g, (a, b) => b);
|
|
55
52
|
}
|
|
@@ -92,18 +89,10 @@ function getNextjsRewritesToUse(nextJsRewrites) {
|
|
|
92
89
|
}
|
|
93
90
|
return [];
|
|
94
91
|
}
|
|
95
|
-
function usesAppDirRouter(sourceDir) {
|
|
96
|
-
const appPathRoutesManifestPath = (0, path_1.join)(sourceDir, constants_1.APP_PATH_ROUTES_MANIFEST);
|
|
97
|
-
return (0, fs_1.existsSync)(appPathRoutesManifestPath);
|
|
98
|
-
}
|
|
99
92
|
async function usesNextImage(sourceDir, distDir) {
|
|
100
93
|
const exportMarker = await (0, utils_1.readJSON)((0, path_1.join)(sourceDir, distDir, constants_1.EXPORT_MARKER));
|
|
101
94
|
return exportMarker.isNextImageImported;
|
|
102
95
|
}
|
|
103
|
-
async function hasUnoptimizedImage(sourceDir, distDir) {
|
|
104
|
-
const imagesManifest = await (0, utils_1.readJSON)((0, path_1.join)(sourceDir, distDir, constants_1.IMAGES_MANIFEST));
|
|
105
|
-
return imagesManifest.images.unoptimized;
|
|
106
|
-
}
|
|
107
96
|
async function isUsingMiddleware(dir, isDevMode) {
|
|
108
97
|
if (isDevMode) {
|
|
109
98
|
const middlewareFiles = await Promise.all([
|
package/lib/fsAsync.js
CHANGED
|
@@ -6,31 +6,42 @@ const ignore_1 = require("ignore");
|
|
|
6
6
|
const _ = require("lodash");
|
|
7
7
|
const minimatch = require("minimatch");
|
|
8
8
|
const path_1 = require("path");
|
|
9
|
-
const
|
|
9
|
+
const error_1 = require("./error");
|
|
10
|
+
function readGitIgnore(dirPath) {
|
|
11
|
+
const gitIgnorePath = (0, path_1.join)(dirPath, ".gitignore");
|
|
12
|
+
try {
|
|
13
|
+
const lines = (0, fs_extra_1.readFileSync)(gitIgnorePath)
|
|
14
|
+
.toString()
|
|
15
|
+
.split("\n")
|
|
16
|
+
.map((line) => line.trim())
|
|
17
|
+
.filter((line) => !line.startsWith("#") && line !== "");
|
|
18
|
+
return { dirPath, ignore: (0, ignore_1.default)().add(lines) };
|
|
19
|
+
}
|
|
20
|
+
catch (err) {
|
|
21
|
+
throw new error_1.FirebaseError(`Could not read ${gitIgnorePath}: ${(0, error_1.getErrMsg)(err)}`, {
|
|
22
|
+
original: (0, error_1.getError)(err),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function parentGitIgnores(root, dir) {
|
|
27
|
+
const folders = (0, path_1.relative)(root, dir).split(path_1.sep).filter(Boolean);
|
|
28
|
+
const states = [];
|
|
29
|
+
for (let depth = 0; depth < folders.length; depth++) {
|
|
30
|
+
const ancestor = (0, path_1.join)(root, ...folders.slice(0, depth));
|
|
31
|
+
const gitIgnorePath = (0, path_1.join)(ancestor, ".gitignore");
|
|
32
|
+
if (!(0, fs_extra_1.existsSync)(gitIgnorePath) || !(0, fs_extra_1.statSync)(gitIgnorePath).isFile()) {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
states.push(readGitIgnore(ancestor));
|
|
36
|
+
}
|
|
37
|
+
return states;
|
|
38
|
+
}
|
|
10
39
|
async function readdirRecursiveHelper(options) {
|
|
11
40
|
const dirContents = (0, fs_extra_1.readdirSync)(options.path, { withFileTypes: true });
|
|
12
41
|
let currentGitIgnoreStack = options.gitIgnoreStack || [];
|
|
13
42
|
if (options.supportGitIgnore) {
|
|
14
43
|
if (dirContents.find((n) => n.name === ".gitignore")?.isFile()) {
|
|
15
|
-
|
|
16
|
-
try {
|
|
17
|
-
const lines = (0, fs_extra_1.readFileSync)(localGitIgnore)
|
|
18
|
-
.toString()
|
|
19
|
-
.split("\n")
|
|
20
|
-
.map((line) => line.trim())
|
|
21
|
-
.filter((line) => !line.startsWith("#") && line !== "");
|
|
22
|
-
const subIgnore = (0, ignore_1.default)().add(lines);
|
|
23
|
-
currentGitIgnoreStack = [
|
|
24
|
-
...currentGitIgnoreStack,
|
|
25
|
-
{
|
|
26
|
-
dirPath: options.path,
|
|
27
|
-
ignore: subIgnore,
|
|
28
|
-
},
|
|
29
|
-
];
|
|
30
|
-
}
|
|
31
|
-
catch (e) {
|
|
32
|
-
logger_1.logger.debug(`Error reading .gitignore file at ${localGitIgnore}:`, e);
|
|
33
|
-
}
|
|
44
|
+
currentGitIgnoreStack = [...currentGitIgnoreStack, readGitIgnore(options.path)];
|
|
34
45
|
}
|
|
35
46
|
}
|
|
36
47
|
const fullPaths = dirContents
|
|
@@ -91,6 +102,9 @@ async function readdirRecursive(options) {
|
|
|
91
102
|
dirPath: options.path,
|
|
92
103
|
ignore: (0, ignore_1.default)().add(options.ignoreStrings || []),
|
|
93
104
|
});
|
|
105
|
+
if (options.gitIgnoreRoot) {
|
|
106
|
+
initialGitIgnoreStack.push(...parentGitIgnores(options.gitIgnoreRoot, options.path));
|
|
107
|
+
}
|
|
94
108
|
}
|
|
95
109
|
const maxDepth = options.maxDepth && options.maxDepth > 0 ? options.maxDepth : Infinity;
|
|
96
110
|
return await readdirRecursiveHelper({
|