UNPKG

firebase-tools

Version:
16 lines (14 loc) 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mcpAuthError = exports.NO_PROJECT_ERROR = void 0; const util_1 = require("./util"); exports.NO_PROJECT_ERROR = (0, util_1.mcpError)('No active project was found. Use the `firebase_update_environment` tool to set the project directory to an absolute folder location containing a firebase.json config file. Alternatively, change the MCP server config to add [...,"--dir","/absolute/path/to/project/directory"] in its command-line arguments.', "PRECONDITION_FAILED"); function mcpAuthError() { const cmd = (0, util_1.commandExistsSync)("firebase") ? "firebase" : "npx -y firebase-tools"; return (0, util_1.mcpError)(`The user is not currently logged into the Firebase CLI, which is required to use this tool. Please instruct the user to execute this shell command to sign in or to configure [Application Default Credentials][ADC] on their machine. \`\`\`sh ${cmd} login \`\`\` [ADC]: https://cloud.google.com/docs/authentication/application-default-credentials`); } exports.mcpAuthError = mcpAuthError;