firebase-tools 15.1.0 → 15.2.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 +3 -5
- package/lib/accountImporter.js +4 -5
- package/lib/api.js +3 -3
- package/lib/apiv2.js +9 -13
- package/lib/appUtils.js +19 -21
- package/lib/appdistribution/client.js +4 -8
- package/lib/appdistribution/distribution.js +4 -4
- package/lib/appdistribution/options-parser-util.js +8 -9
- package/lib/appdistribution/types.js +2 -2
- package/lib/appdistribution/yaml_helper.js +33 -17
- package/lib/apphosting/app.js +8 -13
- package/lib/apphosting/backend.js +34 -24
- package/lib/apphosting/config.js +14 -14
- package/lib/apphosting/githubConnections.js +38 -35
- package/lib/apphosting/localbuilds.js +4 -6
- package/lib/apphosting/repo.js +24 -20
- package/lib/apphosting/rollout.js +12 -5
- package/lib/apphosting/secrets/dialogs.js +9 -9
- package/lib/apphosting/secrets/index.js +9 -11
- package/lib/apphosting/utils.js +2 -3
- package/lib/apphosting/yaml.js +12 -11
- package/lib/apptesting/ensureProjectConfigured.js +1 -2
- package/lib/apptesting/invokeTests.js +2 -3
- package/lib/apptesting/parseTestFiles.js +5 -6
- package/lib/apptesting/types.js +2 -2
- package/lib/archiveDirectory.js +1 -2
- package/lib/auth.js +36 -40
- package/lib/bin/cli.js +2 -3
- package/lib/bin/mcp.js +1 -2
- package/lib/checkMinRequiredVersion.js +1 -2
- package/lib/checkValidTargetFilters.js +1 -2
- package/lib/command.js +6 -9
- package/lib/commands/appdistribution-testers-list.js +2 -3
- package/lib/commands/apphosting-backends-list.js +4 -6
- package/lib/commands/apphosting-builds-create.js +2 -3
- package/lib/commands/apphosting-builds-get.js +1 -2
- package/lib/commands/apphosting-rollouts-list.js +1 -2
- package/lib/commands/apps-init.js +1 -1
- package/lib/commands/{apptesting-execute.js → apptesting-wata.js} +3 -4
- package/lib/commands/crashlytics-symbols-upload.js +2 -2
- package/lib/commands/dataconnect-execute.js +4 -4
- package/lib/commands/dataconnect-sdk-generate.js +5 -6
- package/lib/commands/dataconnect-services-list.js +7 -8
- package/lib/commands/dataconnect-sql-diff.js +1 -2
- package/lib/commands/dataconnect-sql-migrate.js +4 -3
- package/lib/commands/dataconnect-sql-setup.js +2 -2
- package/lib/commands/dataconnect-sql-shell.js +5 -1
- package/lib/commands/emulators-start.js +1 -2
- package/lib/commands/ext-configure.js +6 -4
- package/lib/commands/ext-dev-list.js +2 -3
- package/lib/commands/ext-dev-upload.js +2 -2
- package/lib/commands/ext-export.js +1 -1
- package/lib/commands/ext-info.js +2 -3
- package/lib/commands/ext-install.js +5 -7
- package/lib/commands/firestore-backups-list.js +1 -2
- package/lib/commands/firestore-backups-schedules-list.js +1 -2
- package/lib/commands/firestore-indexes-list.js +1 -2
- package/lib/commands/firestore-utils.js +1 -2
- package/lib/commands/functions-artifacts-setpolicy.js +1 -2
- package/lib/commands/functions-config-export.js +2 -3
- package/lib/commands/hosting-channel-deploy.js +2 -2
- package/lib/commands/hosting-clone.js +2 -3
- package/lib/commands/hosting-sites-create.js +1 -1
- package/lib/commands/index.js +2 -3
- package/lib/commands/init.js +4 -5
- package/lib/commands/internaltesting-functions-discover.js +1 -1
- package/lib/commands/login.js +4 -5
- package/lib/commands/logout.js +3 -3
- package/lib/commands/projects-create.js +1 -1
- package/lib/commands/remoteconfig-experiments-list.js +2 -3
- package/lib/commands/remoteconfig-get.js +1 -1
- package/lib/commands/remoteconfig-rollback.js +1 -2
- package/lib/commands/remoteconfig-rollouts-list.js +2 -3
- package/lib/commands/remoteconfig-versions-list.js +3 -4
- package/lib/commands/use.js +3 -3
- package/lib/config.js +4 -5
- package/lib/crashlytics/buildToolsJarHelper.js +3 -5
- package/lib/crashlytics/events.js +4 -7
- package/lib/crashlytics/filters.js +10 -12
- package/lib/crashlytics/issues.js +2 -3
- package/lib/crashlytics/notes.js +3 -4
- package/lib/crashlytics/reports.js +21 -15
- package/lib/crashlytics/types.js +7 -7
- package/lib/crashlytics/utils.js +4 -4
- package/lib/database/api.js +2 -3
- package/lib/database/import.js +4 -4
- package/lib/database/metadata.js +5 -6
- package/lib/database/rulesConfig.js +2 -3
- package/lib/dataconnect/build.js +10 -13
- package/lib/dataconnect/checkIam.js +1 -2
- package/lib/dataconnect/client.js +15 -18
- package/lib/dataconnect/dataplaneClient.js +6 -6
- package/lib/dataconnect/ensureApis.js +2 -3
- package/lib/dataconnect/errors.js +8 -11
- package/lib/dataconnect/filters.js +2 -3
- package/lib/dataconnect/freeTrial.js +3 -4
- package/lib/dataconnect/graphqlError.js +5 -8
- package/lib/dataconnect/load.js +10 -11
- package/lib/dataconnect/names.js +14 -18
- package/lib/dataconnect/prompts.js +1 -2
- package/lib/dataconnect/provisionCloudSql.js +13 -17
- package/lib/dataconnect/schemaMigration.js +60 -27
- package/lib/dataconnect/types.js +10 -12
- package/lib/dataconnect/webhook.js +3 -3
- package/lib/defaultCredentials.js +3 -4
- package/lib/deploy/apphosting/deploy.js +2 -3
- package/lib/deploy/apphosting/prepare.js +3 -5
- package/lib/deploy/apphosting/release.js +1 -1
- package/lib/deploy/apphosting/util.js +1 -2
- package/lib/deploy/database/deploy.js +1 -2
- package/lib/deploy/database/prepare.js +1 -2
- package/lib/deploy/database/release.js +1 -2
- package/lib/deploy/dataconnect/context.js +15 -4
- package/lib/deploy/dataconnect/deploy.js +5 -6
- package/lib/deploy/dataconnect/prepare.js +7 -9
- package/lib/deploy/dataconnect/release.js +7 -10
- package/lib/deploy/extensions/deploy.js +7 -9
- package/lib/deploy/extensions/deploymentSummary.js +6 -7
- package/lib/deploy/extensions/planner.js +15 -18
- package/lib/deploy/extensions/prepare.js +9 -11
- package/lib/deploy/extensions/release.js +10 -12
- package/lib/deploy/extensions/secrets.js +8 -11
- package/lib/deploy/extensions/tasks.js +6 -8
- package/lib/deploy/extensions/v2FunctionHelper.js +2 -3
- package/lib/deploy/extensions/validate.js +1 -2
- package/lib/deploy/firestore/deploy.js +3 -5
- package/lib/deploy/firestore/prepare.js +2 -3
- package/lib/deploy/firestore/release.js +3 -4
- package/lib/deploy/functions/backend.js +52 -42
- package/lib/deploy/functions/build.js +41 -15
- package/lib/deploy/functions/cache/applyHash.js +3 -5
- package/lib/deploy/functions/cache/hash.js +4 -5
- package/lib/deploy/functions/cel.js +3 -3
- package/lib/deploy/functions/checkIam.js +8 -8
- package/lib/deploy/functions/containerCleaner.js +10 -6
- package/lib/deploy/functions/deploy.js +6 -8
- package/lib/deploy/functions/ensure.js +6 -9
- package/lib/deploy/functions/functionsDeployHelper.js +10 -11
- package/lib/deploy/functions/params.js +10 -10
- package/lib/deploy/functions/prepare.js +41 -36
- package/lib/deploy/functions/prepareFunctionsUpload.js +24 -10
- package/lib/deploy/functions/pricing.js +3 -3
- package/lib/deploy/functions/prompts.js +7 -10
- package/lib/deploy/functions/release/executor.js +5 -6
- package/lib/deploy/functions/release/fabricator.js +76 -29
- package/lib/deploy/functions/release/index.js +23 -14
- package/lib/deploy/functions/release/planner.js +15 -14
- package/lib/deploy/functions/release/reporter.js +20 -20
- package/lib/deploy/functions/release/sourceTokenScraper.js +4 -5
- package/lib/deploy/functions/remoteSource.js +3 -4
- package/lib/deploy/functions/runtimes/discovery/index.js +9 -12
- package/lib/deploy/functions/runtimes/discovery/parsing.js +2 -3
- package/lib/deploy/functions/runtimes/discovery/v1alpha1.js +29 -10
- package/lib/deploy/functions/runtimes/index.js +1 -2
- package/lib/deploy/functions/runtimes/node/index.js +18 -9
- package/lib/deploy/functions/runtimes/node/parseRuntimeAndValidateSDK.js +2 -2
- package/lib/deploy/functions/runtimes/node/validate.js +1 -2
- package/lib/deploy/functions/runtimes/node/versioning.js +6 -7
- package/lib/deploy/functions/runtimes/python/index.js +12 -12
- package/lib/deploy/functions/runtimes/supported/index.js +5 -6
- package/lib/deploy/functions/services/auth.js +49 -36
- package/lib/deploy/functions/services/database.js +1 -2
- package/lib/deploy/functions/services/dataconnect.js +16 -2
- package/lib/deploy/functions/services/firebaseAlerts.js +1 -2
- package/lib/deploy/functions/services/firestore.js +3 -5
- package/lib/deploy/functions/services/index.js +2 -2
- package/lib/deploy/functions/services/remoteConfig.js +1 -2
- package/lib/deploy/functions/services/storage.js +3 -5
- package/lib/deploy/functions/services/testLab.js +1 -2
- package/lib/deploy/functions/triggerRegionHelper.js +1 -2
- package/lib/deploy/functions/validate.js +12 -11
- package/lib/deploy/hosting/convertConfig.js +38 -22
- package/lib/deploy/hosting/deploy.js +4 -7
- package/lib/deploy/hosting/hashcache.js +2 -3
- package/lib/deploy/hosting/prepare.js +14 -14
- package/lib/deploy/hosting/release.js +1 -2
- package/lib/deploy/index.js +7 -8
- package/lib/deploy/lifecycleHooks.js +3 -5
- package/lib/deploy/remoteconfig/deploy.js +1 -1
- package/lib/deploy/remoteconfig/functions.js +5 -6
- package/lib/deploy/remoteconfig/prepare.js +2 -3
- package/lib/deploy/remoteconfig/release.js +2 -2
- package/lib/deploy/storage/deploy.js +1 -1
- package/lib/deploy/storage/prepare.js +1 -1
- package/lib/deploy/storage/release.js +1 -1
- package/lib/deploymentTool.js +5 -6
- package/lib/detectProjectRoot.js +1 -2
- package/lib/downloadUtils.js +2 -3
- package/lib/emulator/adminSdkConfig.js +2 -3
- package/lib/emulator/apphosting/config.js +1 -2
- package/lib/emulator/apphosting/developmentServer.js +3 -3
- package/lib/emulator/apphosting/serve.js +20 -14
- package/lib/emulator/auth/cloudFunctions.js +2 -3
- package/lib/emulator/auth/errors.js +2 -2
- package/lib/emulator/auth/handlers.js +3 -4
- package/lib/emulator/auth/index.js +6 -6
- package/lib/emulator/auth/operations.js +171 -129
- package/lib/emulator/auth/server.js +30 -22
- package/lib/emulator/auth/state.js +26 -36
- package/lib/emulator/auth/utils.js +12 -13
- package/lib/emulator/commandUtils.js +20 -20
- package/lib/emulator/controller.js +32 -29
- package/lib/emulator/databaseEmulator.js +1 -2
- package/lib/emulator/dataconnect/pgliteServer.js +48 -104
- package/lib/emulator/dataconnectEmulator.js +6 -9
- package/lib/emulator/download.js +2 -3
- package/lib/emulator/downloadableEmulatorInfo.json +7 -7
- package/lib/emulator/downloadableEmulators.js +49 -24
- package/lib/emulator/emulatorLogger.js +19 -4
- package/lib/emulator/env.js +6 -8
- package/lib/emulator/eventarcEmulator.js +2 -3
- package/lib/emulator/eventarcEmulatorUtils.js +3 -6
- package/lib/emulator/extensions/postinstall.js +1 -2
- package/lib/emulator/extensions/validation.js +4 -7
- package/lib/emulator/extensionsEmulator.js +6 -9
- package/lib/emulator/functionsEmulator.js +89 -46
- package/lib/emulator/functionsEmulatorRuntime.js +1 -1
- package/lib/emulator/functionsEmulatorShared.js +30 -30
- package/lib/emulator/functionsEmulatorShell.js +4 -6
- package/lib/emulator/functionsEmulatorUtils.js +8 -9
- package/lib/emulator/functionsRuntimeWorker.js +18 -9
- package/lib/emulator/hub.js +41 -34
- package/lib/emulator/hubClient.js +1 -1
- package/lib/emulator/initEmulators.js +2 -3
- package/lib/emulator/loggingEmulator.js +2 -2
- package/lib/emulator/portUtils.js +4 -5
- package/lib/emulator/registry.js +10 -4
- package/lib/emulator/shared/request.js +1 -2
- package/lib/emulator/storage/apis/firebase.js +16 -20
- package/lib/emulator/storage/apis/gcloud.js +6 -9
- package/lib/emulator/storage/apis/shared.js +1 -2
- package/lib/emulator/storage/crc.js +2 -3
- package/lib/emulator/storage/files.js +18 -41
- package/lib/emulator/storage/metadata.js +10 -4
- package/lib/emulator/storage/multipart.js +1 -2
- package/lib/emulator/storage/rfc.js +1 -2
- package/lib/emulator/storage/rules/config.js +1 -2
- package/lib/emulator/storage/rules/manager.js +3 -5
- package/lib/emulator/storage/rules/runtime.js +15 -13
- package/lib/emulator/storage/rules/types.js +2 -2
- package/lib/emulator/storage/rules/utils.js +5 -6
- package/lib/emulator/storage/server.js +1 -2
- package/lib/emulator/storage/upload.js +3 -4
- package/lib/emulator/taskQueue.js +11 -4
- package/lib/emulator/tasksEmulator.js +11 -12
- package/lib/emulator/types.js +6 -6
- package/lib/emulator/ui.js +6 -1
- package/lib/ensureApiEnabled.js +7 -9
- package/lib/env.js +2 -3
- package/lib/error.js +11 -13
- package/lib/errorOut.js +1 -2
- package/lib/experiments.js +15 -18
- package/lib/extensions/askUserForEventsConfig.js +12 -13
- package/lib/extensions/askUserForParam.js +11 -12
- package/lib/extensions/change-log.js +4 -5
- package/lib/extensions/checkProjectBilling.js +1 -2
- package/lib/extensions/diagnose.js +1 -2
- package/lib/extensions/displayExtensionInfo.js +25 -32
- package/lib/extensions/emulator/optionsHelper.js +6 -8
- package/lib/extensions/emulator/specHelper.js +15 -16
- package/lib/extensions/emulator/triggerHelper.js +3 -5
- package/lib/extensions/etags.js +2 -3
- package/lib/extensions/export.js +7 -9
- package/lib/extensions/extensionsApi.js +23 -29
- package/lib/extensions/extensionsHelper.js +52 -80
- package/lib/extensions/listExtensions.js +3 -5
- package/lib/extensions/localHelper.js +5 -5
- package/lib/extensions/manifest.js +15 -16
- package/lib/extensions/metricsUtils.js +3 -4
- package/lib/extensions/paramHelper.js +21 -18
- package/lib/extensions/provisioningHelper.js +17 -21
- package/lib/extensions/publishHelpers.js +1 -2
- package/lib/extensions/publisherApi.js +11 -13
- package/lib/extensions/refs.js +6 -7
- package/lib/extensions/runtimes/common.js +18 -19
- package/lib/extensions/runtimes/node.js +5 -6
- package/lib/extensions/secretsUtils.js +8 -8
- package/lib/extensions/tos.js +7 -8
- package/lib/extensions/types.js +3 -3
- package/lib/extensions/updateHelper.js +6 -7
- package/lib/extensions/utils.js +6 -8
- package/lib/extensions/versionHelper.js +1 -2
- package/lib/extensions/warnings.js +6 -8
- package/lib/fetchMOTD.js +1 -2
- package/lib/fetchWebSetup.js +3 -4
- package/lib/filterTargets.js +1 -2
- package/lib/firebaseConfigValidate.js +2 -3
- package/lib/firestore/api-sort.js +8 -9
- package/lib/firestore/api-types.js +15 -15
- package/lib/firestore/api.js +15 -13
- package/lib/firestore/backupUtils.js +3 -3
- package/lib/firestore/checkDatabaseType.js +1 -2
- package/lib/firestore/delete.js +1 -2
- package/lib/firestore/encodeFirestoreValue.js +1 -2
- package/lib/firestore/fsConfig.js +1 -2
- package/lib/firestore/options.js +1 -1
- package/lib/firestore/util.js +5 -6
- package/lib/firestore/validator.js +4 -5
- package/lib/frameworks/angular/index.js +14 -15
- package/lib/frameworks/angular/utils.js +21 -23
- package/lib/frameworks/astro/index.js +7 -7
- package/lib/frameworks/astro/utils.js +4 -6
- package/lib/frameworks/compose/discover/filesystem.js +3 -3
- package/lib/frameworks/compose/discover/frameworkMatcher.js +4 -5
- package/lib/frameworks/compose/discover/index.js +1 -2
- package/lib/frameworks/compose/discover/runtime/node.js +8 -11
- package/lib/frameworks/compose/driver/docker.js +3 -5
- package/lib/frameworks/compose/driver/hooks.js +2 -2
- package/lib/frameworks/compose/driver/index.js +2 -2
- package/lib/frameworks/compose/driver/local.js +2 -3
- package/lib/frameworks/compose/index.js +5 -7
- package/lib/frameworks/constants.js +3 -3
- package/lib/frameworks/express/index.js +7 -8
- package/lib/frameworks/flutter/index.js +6 -7
- package/lib/frameworks/flutter/utils.js +4 -5
- package/lib/frameworks/index.js +21 -22
- package/lib/frameworks/next/constants.js +5 -2
- package/lib/frameworks/next/index.js +34 -32
- package/lib/frameworks/next/utils.js +40 -39
- package/lib/frameworks/nuxt/index.js +9 -9
- package/lib/frameworks/nuxt/utils.js +4 -6
- package/lib/frameworks/nuxt2/index.js +7 -7
- package/lib/frameworks/sveltekit/index.js +6 -8
- package/lib/frameworks/utils.js +26 -24
- package/lib/frameworks/vite/index.js +8 -9
- package/lib/fsAsync.js +1 -2
- package/lib/fsutils.js +5 -6
- package/lib/functional.js +11 -11
- package/lib/functions/artifacts.js +25 -22
- package/lib/functions/ensureTargeted.js +1 -2
- package/lib/functions/env.js +13 -14
- package/lib/functions/functionslog.js +2 -3
- package/lib/functions/projectConfig.js +29 -33
- package/lib/functions/python.js +10 -4
- package/lib/functions/secrets.js +32 -18
- package/lib/functionsConfig.js +14 -14
- package/lib/functionsConfigClone.js +1 -2
- package/lib/functionsShellCommandAction.js +2 -3
- package/lib/gcp/apphosting.js +43 -28
- package/lib/gcp/apptesting.js +2 -2
- package/lib/gcp/artifactregistry.js +5 -5
- package/lib/gcp/auth.js +11 -13
- package/lib/gcp/cloudbilling.js +4 -5
- package/lib/gcp/cloudbuild.js +10 -11
- package/lib/gcp/cloudfunctions.js +61 -45
- package/lib/gcp/cloudfunctionsv2.js +81 -43
- package/lib/gcp/cloudlogging.js +2 -4
- package/lib/gcp/cloudmonitoring.js +7 -7
- package/lib/gcp/cloudscheduler.js +12 -14
- package/lib/gcp/cloudsql/cloudsqladmin.js +18 -20
- package/lib/gcp/cloudsql/connect.js +14 -9
- package/lib/gcp/cloudsql/fbToolsAuthClient.js +5 -3
- package/lib/gcp/cloudsql/interactive.js +2 -3
- package/lib/gcp/cloudsql/permissions.js +8 -8
- package/lib/gcp/cloudsql/permissionsSetup.js +9 -9
- package/lib/gcp/cloudtasks.js +19 -18
- package/lib/gcp/computeEngine.js +1 -2
- package/lib/gcp/devConnect.js +32 -29
- package/lib/gcp/docker.js +2 -4
- package/lib/gcp/eventarc.js +5 -5
- package/lib/gcp/firedata.js +4 -4
- package/lib/gcp/firestore.js +16 -16
- package/lib/gcp/iam.js +11 -12
- package/lib/gcp/identityPlatform.js +4 -5
- package/lib/gcp/k8s.js +1 -2
- package/lib/gcp/location.js +2 -2
- package/lib/gcp/proto.js +10 -11
- package/lib/gcp/pubsub.js +4 -5
- package/lib/gcp/resourceManager.js +5 -5
- package/lib/gcp/rules.js +13 -14
- package/lib/gcp/run.js +24 -31
- package/lib/gcp/runv2.js +39 -27
- package/lib/gcp/secretManager.js +60 -39
- package/lib/gcp/serviceusage.js +8 -4
- package/lib/gcp/storage.js +22 -20
- package/lib/gemini/fdcExperience.js +5 -5
- package/lib/getDefaultDatabaseInstance.js +2 -4
- package/lib/getDefaultHostingSite.js +3 -4
- package/lib/getProjectNumber.js +1 -2
- package/lib/hosting/api.js +32 -36
- package/lib/hosting/cloudRunProxy.js +2 -3
- package/lib/hosting/config.js +17 -17
- package/lib/hosting/expireUtils.js +3 -3
- package/lib/hosting/functionsProxy.js +1 -2
- package/lib/hosting/implicitInit.js +1 -2
- package/lib/hosting/initMiddleware.js +1 -2
- package/lib/hosting/interactive.js +1 -2
- package/lib/hosting/proxy.js +3 -5
- package/lib/hosting/runTags.js +8 -11
- package/lib/init/features/account.js +1 -2
- package/lib/init/features/ailogic/index.js +3 -5
- package/lib/init/features/ailogic/utils.js +6 -8
- package/lib/init/features/aitools/claude.js +1 -2
- package/lib/init/features/aitools/cursor.js +1 -2
- package/lib/init/features/aitools/gemini.js +1 -1
- package/lib/init/features/aitools/promptUpdater.js +10 -12
- package/lib/init/features/aitools.js +1 -2
- package/lib/init/features/apphosting.js +3 -4
- package/lib/init/features/apptesting/index.js +9 -9
- package/lib/init/features/database.js +4 -5
- package/lib/init/features/dataconnect/create_app.js +3 -4
- package/lib/init/features/dataconnect/index.js +25 -22
- package/lib/init/features/dataconnect/resolver.js +6 -10
- package/lib/init/features/dataconnect/sdk.js +31 -24
- package/lib/init/features/emulators.js +7 -6
- package/lib/init/features/extensions/index.js +3 -5
- package/lib/init/features/firestore/index.js +7 -9
- package/lib/init/features/firestore/indexes.js +2 -2
- package/lib/init/features/firestore/rules.js +3 -3
- package/lib/init/features/functions/index.js +3 -5
- package/lib/init/features/functions/javascript.js +1 -2
- package/lib/init/features/functions/npm-dependencies.js +1 -2
- package/lib/init/features/functions/python.js +1 -2
- package/lib/init/features/functions/typescript.js +1 -2
- package/lib/init/features/genkit/index.js +44 -18
- package/lib/init/features/hosting/github.js +6 -8
- package/lib/init/features/hosting/index.js +10 -13
- package/lib/init/features/project.js +4 -7
- package/lib/init/features/remoteconfig.js +1 -2
- package/lib/init/features/storage.js +3 -5
- package/lib/init/index.js +4 -7
- package/lib/init/spawn.js +7 -9
- package/lib/listFiles.js +1 -2
- package/lib/loadCJSON.js +1 -2
- package/lib/localFunction.js +14 -15
- package/lib/logError.js +1 -2
- package/lib/logger.js +7 -7
- package/lib/management/apps.js +22 -22
- package/lib/management/database.js +11 -12
- package/lib/management/projects.js +57 -56
- package/lib/management/provisioning/errorHandler.js +3 -5
- package/lib/management/provisioning/provision.js +15 -9
- package/lib/management/studio.js +2 -3
- package/lib/mcp/errors.js +4 -4
- package/lib/mcp/index.js +16 -23
- package/lib/mcp/prompt.js +1 -2
- package/lib/mcp/prompts/core/consult.js +2 -3
- package/lib/mcp/prompts/crashlytics/connect.js +15 -122
- package/lib/mcp/prompts/dataconnect/schema.js +3 -3
- package/lib/mcp/prompts/index.js +8 -10
- package/lib/mcp/resource.js +3 -15
- package/lib/mcp/resources/guides/app_id.js +39 -0
- package/lib/mcp/resources/guides/crashlytics_connect.js +51 -0
- package/lib/mcp/resources/guides/crashlytics_investigations.js +51 -0
- package/lib/mcp/resources/guides/crashlytics_issues.js +42 -0
- package/lib/mcp/resources/guides/crashlytics_reports.js +112 -0
- package/lib/mcp/resources/index.js +11 -3
- package/lib/mcp/tool.js +3 -15
- package/lib/mcp/tools/apphosting/fetch_logs.js +3 -4
- package/lib/mcp/tools/apphosting/list_backends.js +1 -1
- package/lib/mcp/tools/auth/get_users.js +5 -16
- package/lib/mcp/tools/core/create_android_sha.js +4 -1
- package/lib/mcp/tools/core/get_environment.js +3 -3
- package/lib/mcp/tools/core/get_sdk_config.js +4 -5
- package/lib/mcp/tools/core/get_security_rules.js +1 -2
- package/lib/mcp/tools/core/init.js +2 -2
- package/lib/mcp/tools/core/logout.js +1 -1
- package/lib/mcp/tools/core/read_resources.js +2 -2
- package/lib/mcp/tools/core/validate_security_rules.js +1 -2
- package/lib/mcp/tools/crashlytics/events.js +43 -19
- package/lib/mcp/tools/crashlytics/index.js +1 -6
- package/lib/mcp/tools/crashlytics/issues.js +33 -12
- package/lib/mcp/tools/crashlytics/reports.js +66 -117
- package/lib/mcp/tools/dataconnect/list_services.js +2 -3
- package/lib/mcp/tools/firestore/converter.js +3 -5
- package/lib/mcp/tools/firestore/delete_document.js +1 -1
- package/lib/mcp/tools/functions/get_logs.js +14 -12
- package/lib/mcp/tools/functions/list_functions.js +1 -1
- package/lib/mcp/tools/index.js +17 -9
- package/lib/mcp/util/apptesting/availability.js +1 -2
- package/lib/mcp/util/availability.js +1 -2
- package/lib/mcp/util/crashlytics/availability.js +1 -2
- package/lib/mcp/util/dataconnect/compile.js +7 -6
- package/lib/mcp/util/dataconnect/converter.js +7 -10
- package/lib/mcp/util/dataconnect/emulator.js +1 -2
- package/lib/mcp/util.js +9 -11
- package/lib/messaging/sendMessage.js +1 -2
- package/lib/metaprogramming.js +1 -2
- package/lib/operation-poller.js +2 -2
- package/lib/profileReport.js +6 -6
- package/lib/profiler.js +1 -2
- package/lib/projectPath.js +1 -2
- package/lib/projectUtils.js +5 -6
- package/lib/prompt.js +22 -13
- package/lib/rc.js +5 -7
- package/lib/remoteconfig/deleteExperiment.js +1 -2
- package/lib/remoteconfig/deleteRollout.js +1 -2
- package/lib/remoteconfig/get.js +2 -3
- package/lib/remoteconfig/getExperiment.js +2 -2
- package/lib/remoteconfig/getRollout.js +2 -2
- package/lib/remoteconfig/interfaces.js +1 -1
- package/lib/remoteconfig/listExperiments.js +2 -2
- package/lib/remoteconfig/listRollouts.js +2 -2
- package/lib/remoteconfig/publish.js +1 -2
- package/lib/remoteconfig/rollback.js +1 -2
- package/lib/remoteconfig/versionslist.js +1 -2
- package/lib/requireAuth.js +4 -6
- package/lib/requireConfig.js +5 -8
- package/lib/requireDatabaseInstance.js +2 -2
- package/lib/requireHostingSite.js +1 -2
- package/lib/requireInteractive.js +1 -1
- package/lib/requirePermissions.js +1 -2
- package/lib/requireTosAcceptance.js +1 -2
- package/lib/responseToError.js +1 -2
- package/lib/rtdb.js +2 -3
- package/lib/rulesDeploy.js +3 -4
- package/lib/serve/functions.js +9 -1
- package/lib/serve/hosting.js +4 -5
- package/lib/serve/index.js +1 -2
- package/lib/shortenUrl.js +1 -2
- package/lib/templates.js +3 -4
- package/lib/throttler/throttler.js +3 -3
- package/lib/timeout.js +2 -3
- package/lib/track.js +23 -14
- package/lib/tsconfig.publish.tsbuildinfo +1 -0
- package/lib/unzip.js +2 -3
- package/lib/utils.js +62 -63
- package/lib/vsCodeUtils.js +2 -3
- package/package.json +6 -6
- package/templates/extensions/typescript/index.ts +1 -1
- package/templates/extensions/typescript/package.lint.json +1 -1
- package/templates/extensions/typescript/package.nolint.json +1 -1
- package/templates/extensions/typescript/tsconfig.json +2 -1
package/lib/utils.js
CHANGED
|
@@ -1,7 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.vscodeEnvVars = exports.envOverrides = exports.IS_WINDOWS = void 0;
|
|
4
|
+
exports.consoleUrl = consoleUrl;
|
|
5
|
+
exports.getInheritedOption = getInheritedOption;
|
|
6
|
+
exports.setVSCodeEnvVars = setVSCodeEnvVars;
|
|
7
|
+
exports.envOverride = envOverride;
|
|
8
|
+
exports.getDatabaseUrl = getDatabaseUrl;
|
|
9
|
+
exports.getDatabaseViewDataUrl = getDatabaseViewDataUrl;
|
|
10
|
+
exports.addDatabaseNamespace = addDatabaseNamespace;
|
|
11
|
+
exports.addSubdomain = addSubdomain;
|
|
12
|
+
exports.logSuccess = logSuccess;
|
|
13
|
+
exports.logLabeledSuccess = logLabeledSuccess;
|
|
14
|
+
exports.logBullet = logBullet;
|
|
15
|
+
exports.logLabeledBullet = logLabeledBullet;
|
|
16
|
+
exports.logWarning = logWarning;
|
|
17
|
+
exports.logWarningToStderr = logWarningToStderr;
|
|
18
|
+
exports.logLabeledWarning = logLabeledWarning;
|
|
19
|
+
exports.logLabeledError = logLabeledError;
|
|
20
|
+
exports.reject = reject;
|
|
21
|
+
exports.allSettled = allSettled;
|
|
22
|
+
exports.explainStdin = explainStdin;
|
|
23
|
+
exports.stringToStream = stringToStream;
|
|
24
|
+
exports.streamToString = streamToString;
|
|
25
|
+
exports.makeActiveProject = makeActiveProject;
|
|
26
|
+
exports.endpoint = endpoint;
|
|
27
|
+
exports.getFunctionsEventProvider = getFunctionsEventProvider;
|
|
28
|
+
exports.promiseAllSettled = promiseAllSettled;
|
|
29
|
+
exports.promiseWhile = promiseWhile;
|
|
30
|
+
exports.withTimeout = withTimeout;
|
|
31
|
+
exports.promiseProps = promiseProps;
|
|
32
|
+
exports.tryParse = tryParse;
|
|
33
|
+
exports.promiseWithSpinner = promiseWithSpinner;
|
|
34
|
+
exports.sleep = sleep;
|
|
35
|
+
exports.createDestroyer = createDestroyer;
|
|
36
|
+
exports.datetimeString = datetimeString;
|
|
37
|
+
exports.isCloudEnvironment = isCloudEnvironment;
|
|
38
|
+
exports.isRunningInWSL = isRunningInWSL;
|
|
39
|
+
exports.isRunningInGithubAction = isRunningInGithubAction;
|
|
40
|
+
exports.thirtyDaysFromNow = thirtyDaysFromNow;
|
|
41
|
+
exports.assertIsString = assertIsString;
|
|
42
|
+
exports.assertIsNumber = assertIsNumber;
|
|
43
|
+
exports.assertIsStringOrUndefined = assertIsStringOrUndefined;
|
|
44
|
+
exports.groupBy = groupBy;
|
|
45
|
+
exports.cloneDeep = cloneDeep;
|
|
46
|
+
exports.last = last;
|
|
47
|
+
exports.debounce = debounce;
|
|
48
|
+
exports.randomInt = randomInt;
|
|
49
|
+
exports.connectableHostname = connectableHostname;
|
|
50
|
+
exports.openInBrowser = openInBrowser;
|
|
51
|
+
exports.openInBrowserPopup = openInBrowserPopup;
|
|
52
|
+
exports.getHostnameFromUrl = getHostnameFromUrl;
|
|
53
|
+
exports.readFileFromDirectory = readFileFromDirectory;
|
|
54
|
+
exports.wrappedSafeLoad = wrappedSafeLoad;
|
|
55
|
+
exports.generateId = generateId;
|
|
56
|
+
exports.generatePassword = generatePassword;
|
|
57
|
+
exports.readSecretValue = readSecretValue;
|
|
58
|
+
exports.updateOrCreateGitignore = updateOrCreateGitignore;
|
|
59
|
+
exports.promptForDirectory = promptForDirectory;
|
|
60
|
+
exports.deepEqual = deepEqual;
|
|
61
|
+
exports.newUniqueId = newUniqueId;
|
|
62
|
+
exports.commandExistsSync = commandExistsSync;
|
|
63
|
+
exports.resolveWithin = resolveWithin;
|
|
5
64
|
const fs = require("fs-extra");
|
|
6
65
|
const tty = require("tty");
|
|
7
66
|
const path = require("node:path");
|
|
@@ -37,7 +96,6 @@ function consoleUrl(project, path) {
|
|
|
37
96
|
const api = require("./api");
|
|
38
97
|
return `${api.consoleOrigin()}/project/${project}${path}`;
|
|
39
98
|
}
|
|
40
|
-
exports.consoleUrl = consoleUrl;
|
|
41
99
|
function getInheritedOption(options, key) {
|
|
42
100
|
let target = options;
|
|
43
101
|
while (target) {
|
|
@@ -47,11 +105,9 @@ function getInheritedOption(options, key) {
|
|
|
47
105
|
target = target.parent;
|
|
48
106
|
}
|
|
49
107
|
}
|
|
50
|
-
exports.getInheritedOption = getInheritedOption;
|
|
51
108
|
function setVSCodeEnvVars(envVar, value) {
|
|
52
109
|
exports.vscodeEnvVars[envVar] = value;
|
|
53
110
|
}
|
|
54
|
-
exports.setVSCodeEnvVars = setVSCodeEnvVars;
|
|
55
111
|
function envOverride(envname, value, coerce) {
|
|
56
112
|
const currentEnvValue = (0, vsCodeUtils_1.isVSCodeExtension)() && exports.vscodeEnvVars[envname] ? exports.vscodeEnvVars[envname] : process.env[envname];
|
|
57
113
|
if (currentEnvValue && currentEnvValue.length) {
|
|
@@ -68,12 +124,10 @@ function envOverride(envname, value, coerce) {
|
|
|
68
124
|
}
|
|
69
125
|
return value;
|
|
70
126
|
}
|
|
71
|
-
exports.envOverride = envOverride;
|
|
72
127
|
function getDatabaseUrl(origin, namespace, pathname) {
|
|
73
128
|
const withPath = url.resolve(origin, pathname);
|
|
74
129
|
return addDatabaseNamespace(withPath, namespace);
|
|
75
130
|
}
|
|
76
|
-
exports.getDatabaseUrl = getDatabaseUrl;
|
|
77
131
|
function getDatabaseViewDataUrl(origin, project, namespace, pathname) {
|
|
78
132
|
const urlObj = new url.URL(origin);
|
|
79
133
|
if (urlObj.hostname.includes("firebaseio") || urlObj.hostname.includes("firebasedatabase")) {
|
|
@@ -81,7 +135,6 @@ function getDatabaseViewDataUrl(origin, project, namespace, pathname) {
|
|
|
81
135
|
}
|
|
82
136
|
return getDatabaseUrl(origin, namespace, pathname + ".json");
|
|
83
137
|
}
|
|
84
|
-
exports.getDatabaseViewDataUrl = getDatabaseViewDataUrl;
|
|
85
138
|
function addDatabaseNamespace(origin, namespace) {
|
|
86
139
|
const urlObj = new url.URL(origin);
|
|
87
140
|
if (urlObj.hostname.includes(namespace)) {
|
|
@@ -93,48 +146,37 @@ function addDatabaseNamespace(origin, namespace) {
|
|
|
93
146
|
urlObj.searchParams.set("ns", namespace);
|
|
94
147
|
return urlObj.href;
|
|
95
148
|
}
|
|
96
|
-
exports.addDatabaseNamespace = addDatabaseNamespace;
|
|
97
149
|
function addSubdomain(origin, subdomain) {
|
|
98
150
|
return origin.replace("//", `//${subdomain}.`);
|
|
99
151
|
}
|
|
100
|
-
exports.addSubdomain = addSubdomain;
|
|
101
152
|
function logSuccess(message, type = "info", data = undefined) {
|
|
102
153
|
logger_1.logger[type](clc.green(clc.bold(`${SUCCESS_CHAR} `)), message, data);
|
|
103
154
|
}
|
|
104
|
-
exports.logSuccess = logSuccess;
|
|
105
155
|
function logLabeledSuccess(label, message, type = "info", data = undefined) {
|
|
106
156
|
logger_1.logger[type](clc.green(clc.bold(`${SUCCESS_CHAR} ${label}:`)), message, data);
|
|
107
157
|
}
|
|
108
|
-
exports.logLabeledSuccess = logLabeledSuccess;
|
|
109
158
|
function logBullet(message, type = "info", data = undefined) {
|
|
110
159
|
logger_1.logger[type](clc.cyan(clc.bold("i ")), message, data);
|
|
111
160
|
}
|
|
112
|
-
exports.logBullet = logBullet;
|
|
113
161
|
function logLabeledBullet(label, message, type = "info", data = undefined) {
|
|
114
162
|
logger_1.logger[type](clc.cyan(clc.bold(`i ${label}:`)), message, data);
|
|
115
163
|
}
|
|
116
|
-
exports.logLabeledBullet = logLabeledBullet;
|
|
117
164
|
function logWarning(message, type = "warn", data = undefined) {
|
|
118
165
|
logger_1.logger[type](clc.yellow(clc.bold(`${WARNING_CHAR} `)), message, data);
|
|
119
166
|
}
|
|
120
|
-
exports.logWarning = logWarning;
|
|
121
167
|
function logWarningToStderr(message) {
|
|
122
168
|
const prefix = clc.bold(`${WARNING_CHAR} `);
|
|
123
169
|
process.stderr.write(clc.yellow(prefix + message) + "\n");
|
|
124
170
|
}
|
|
125
|
-
exports.logWarningToStderr = logWarningToStderr;
|
|
126
171
|
function logLabeledWarning(label, message, type = "warn", data = undefined) {
|
|
127
172
|
logger_1.logger[type](clc.yellow(clc.bold(`${WARNING_CHAR} ${label}:`)), message, data);
|
|
128
173
|
}
|
|
129
|
-
exports.logLabeledWarning = logLabeledWarning;
|
|
130
174
|
function logLabeledError(label, message, type = "error", data = undefined) {
|
|
131
175
|
logger_1.logger[type](clc.red(clc.bold(`${ERROR_CHAR} ${label}:`)), message, data);
|
|
132
176
|
}
|
|
133
|
-
exports.logLabeledError = logLabeledError;
|
|
134
177
|
function reject(message, options) {
|
|
135
178
|
return Promise.reject(new error_1.FirebaseError(message, options));
|
|
136
179
|
}
|
|
137
|
-
exports.reject = reject;
|
|
138
180
|
function allSettled(promises) {
|
|
139
181
|
if (!promises.length) {
|
|
140
182
|
return Promise.resolve([]);
|
|
@@ -163,7 +205,6 @@ function allSettled(promises) {
|
|
|
163
205
|
}
|
|
164
206
|
});
|
|
165
207
|
}
|
|
166
|
-
exports.allSettled = allSettled;
|
|
167
208
|
function explainStdin() {
|
|
168
209
|
if (exports.IS_WINDOWS) {
|
|
169
210
|
throw new error_1.FirebaseError("STDIN input is not available on Windows.", {
|
|
@@ -174,7 +215,6 @@ function explainStdin() {
|
|
|
174
215
|
logger_1.logger.info(clc.bold("Note:"), "Reading STDIN. Type JSON data and then press Ctrl-D");
|
|
175
216
|
}
|
|
176
217
|
}
|
|
177
|
-
exports.explainStdin = explainStdin;
|
|
178
218
|
function stringToStream(text) {
|
|
179
219
|
if (!text) {
|
|
180
220
|
return undefined;
|
|
@@ -184,7 +224,6 @@ function stringToStream(text) {
|
|
|
184
224
|
s.push(null);
|
|
185
225
|
return s;
|
|
186
226
|
}
|
|
187
|
-
exports.stringToStream = stringToStream;
|
|
188
227
|
function streamToString(s) {
|
|
189
228
|
return new Promise((resolve, reject) => {
|
|
190
229
|
let b = "";
|
|
@@ -193,7 +232,6 @@ function streamToString(s) {
|
|
|
193
232
|
s.once("end", () => resolve(b));
|
|
194
233
|
});
|
|
195
234
|
}
|
|
196
|
-
exports.streamToString = streamToString;
|
|
197
235
|
function makeActiveProject(projectDir, newActive) {
|
|
198
236
|
const activeProjects = configstore_1.configstore.get("activeProjects") || {};
|
|
199
237
|
if (newActive) {
|
|
@@ -204,11 +242,9 @@ function makeActiveProject(projectDir, newActive) {
|
|
|
204
242
|
}
|
|
205
243
|
configstore_1.configstore.set("activeProjects", activeProjects);
|
|
206
244
|
}
|
|
207
|
-
exports.makeActiveProject = makeActiveProject;
|
|
208
245
|
function endpoint(parts) {
|
|
209
246
|
return `/${parts.join("/")}`;
|
|
210
247
|
}
|
|
211
|
-
exports.endpoint = endpoint;
|
|
212
248
|
function getFunctionsEventProvider(eventType) {
|
|
213
249
|
const parts = eventType.split("/");
|
|
214
250
|
if (parts.length > 1) {
|
|
@@ -238,7 +274,6 @@ function getFunctionsEventProvider(eventType) {
|
|
|
238
274
|
}
|
|
239
275
|
return _.capitalize(eventType.split(".")[1]);
|
|
240
276
|
}
|
|
241
|
-
exports.getFunctionsEventProvider = getFunctionsEventProvider;
|
|
242
277
|
function promiseAllSettled(promises) {
|
|
243
278
|
const wrappedPromises = promises.map(async (p) => {
|
|
244
279
|
try {
|
|
@@ -251,7 +286,6 @@ function promiseAllSettled(promises) {
|
|
|
251
286
|
});
|
|
252
287
|
return Promise.all(wrappedPromises);
|
|
253
288
|
}
|
|
254
|
-
exports.promiseAllSettled = promiseAllSettled;
|
|
255
289
|
async function promiseWhile(action, check, interval = 2500) {
|
|
256
290
|
return new Promise((resolve, promiseReject) => {
|
|
257
291
|
const run = async () => {
|
|
@@ -269,7 +303,6 @@ async function promiseWhile(action, check, interval = 2500) {
|
|
|
269
303
|
run();
|
|
270
304
|
});
|
|
271
305
|
}
|
|
272
|
-
exports.promiseWhile = promiseWhile;
|
|
273
306
|
function withTimeout(timeoutMs, promise) {
|
|
274
307
|
return new Promise((resolve, reject) => {
|
|
275
308
|
const timeout = setTimeout(() => reject(new Error("Timed out.")), timeoutMs);
|
|
@@ -282,7 +315,6 @@ function withTimeout(timeoutMs, promise) {
|
|
|
282
315
|
});
|
|
283
316
|
});
|
|
284
317
|
}
|
|
285
|
-
exports.withTimeout = withTimeout;
|
|
286
318
|
async function promiseProps(obj) {
|
|
287
319
|
const resultObj = {};
|
|
288
320
|
const promises = Object.keys(obj).map(async (key) => {
|
|
@@ -291,7 +323,6 @@ async function promiseProps(obj) {
|
|
|
291
323
|
});
|
|
292
324
|
return Promise.all(promises).then(() => resultObj);
|
|
293
325
|
}
|
|
294
|
-
exports.promiseProps = promiseProps;
|
|
295
326
|
function tryParse(value) {
|
|
296
327
|
if (typeof value !== "string") {
|
|
297
328
|
return value;
|
|
@@ -299,11 +330,10 @@ function tryParse(value) {
|
|
|
299
330
|
try {
|
|
300
331
|
return JSON.parse(value);
|
|
301
332
|
}
|
|
302
|
-
catch
|
|
333
|
+
catch {
|
|
303
334
|
return value;
|
|
304
335
|
}
|
|
305
336
|
}
|
|
306
|
-
exports.tryParse = tryParse;
|
|
307
337
|
async function promiseWithSpinner(action, message) {
|
|
308
338
|
const spinner = ora(message).start();
|
|
309
339
|
let data;
|
|
@@ -317,11 +347,9 @@ async function promiseWithSpinner(action, message) {
|
|
|
317
347
|
}
|
|
318
348
|
return data;
|
|
319
349
|
}
|
|
320
|
-
exports.promiseWithSpinner = promiseWithSpinner;
|
|
321
350
|
function sleep(ms) {
|
|
322
351
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
323
352
|
}
|
|
324
|
-
exports.sleep = sleep;
|
|
325
353
|
function createDestroyer(server) {
|
|
326
354
|
const connections = new Set();
|
|
327
355
|
server.on("connection", (conn) => {
|
|
@@ -343,7 +371,6 @@ function createDestroyer(server) {
|
|
|
343
371
|
return destroyPromise;
|
|
344
372
|
};
|
|
345
373
|
}
|
|
346
|
-
exports.createDestroyer = createDestroyer;
|
|
347
374
|
function datetimeString(d) {
|
|
348
375
|
const day = `${d.getFullYear()}-${(d.getMonth() + 1).toString().padStart(2, "0")}-${d
|
|
349
376
|
.getDate()
|
|
@@ -355,26 +382,21 @@ function datetimeString(d) {
|
|
|
355
382
|
.padStart(2, "0")}:${d.getSeconds().toString().padStart(2, "0")}`;
|
|
356
383
|
return `${day} ${time}`;
|
|
357
384
|
}
|
|
358
|
-
exports.datetimeString = datetimeString;
|
|
359
385
|
function isCloudEnvironment() {
|
|
360
386
|
return (!!process.env.CODESPACES ||
|
|
361
387
|
!!process.env.GOOGLE_CLOUD_WORKSTATIONS ||
|
|
362
388
|
!!process.env.CLOUD_SHELL ||
|
|
363
389
|
!!process.env.GOOGLE_CLOUD_SHELL);
|
|
364
390
|
}
|
|
365
|
-
exports.isCloudEnvironment = isCloudEnvironment;
|
|
366
391
|
function isRunningInWSL() {
|
|
367
392
|
return !!process.env.WSL_DISTRO_NAME;
|
|
368
393
|
}
|
|
369
|
-
exports.isRunningInWSL = isRunningInWSL;
|
|
370
394
|
function isRunningInGithubAction() {
|
|
371
395
|
return process.env.GITHUB_ACTION_REPOSITORY === "FirebaseExtended/action-hosting-deploy";
|
|
372
396
|
}
|
|
373
|
-
exports.isRunningInGithubAction = isRunningInGithubAction;
|
|
374
397
|
function thirtyDaysFromNow() {
|
|
375
398
|
return new Date(Date.now() + THIRTY_DAYS_IN_MILLISECONDS);
|
|
376
399
|
}
|
|
377
|
-
exports.thirtyDaysFromNow = thirtyDaysFromNow;
|
|
378
400
|
function assertIsString(val, message) {
|
|
379
401
|
if (typeof val !== "string") {
|
|
380
402
|
throw new assert_1.AssertionError({
|
|
@@ -382,7 +404,6 @@ function assertIsString(val, message) {
|
|
|
382
404
|
});
|
|
383
405
|
}
|
|
384
406
|
}
|
|
385
|
-
exports.assertIsString = assertIsString;
|
|
386
407
|
function assertIsNumber(val, message) {
|
|
387
408
|
if (typeof val !== "number") {
|
|
388
409
|
throw new assert_1.AssertionError({
|
|
@@ -390,7 +411,6 @@ function assertIsNumber(val, message) {
|
|
|
390
411
|
});
|
|
391
412
|
}
|
|
392
413
|
}
|
|
393
|
-
exports.assertIsNumber = assertIsNumber;
|
|
394
414
|
function assertIsStringOrUndefined(val, message) {
|
|
395
415
|
if (!(val === undefined || typeof val === "string")) {
|
|
396
416
|
throw new assert_1.AssertionError({
|
|
@@ -398,7 +418,6 @@ function assertIsStringOrUndefined(val, message) {
|
|
|
398
418
|
});
|
|
399
419
|
}
|
|
400
420
|
}
|
|
401
|
-
exports.assertIsStringOrUndefined = assertIsStringOrUndefined;
|
|
402
421
|
function groupBy(arr, f) {
|
|
403
422
|
return arr.reduce((result, item) => {
|
|
404
423
|
const key = f(item);
|
|
@@ -411,7 +430,6 @@ function groupBy(arr, f) {
|
|
|
411
430
|
return result;
|
|
412
431
|
}, {});
|
|
413
432
|
}
|
|
414
|
-
exports.groupBy = groupBy;
|
|
415
433
|
function cloneArray(arr) {
|
|
416
434
|
return arr.map((e) => cloneDeep(e));
|
|
417
435
|
}
|
|
@@ -440,14 +458,12 @@ function cloneDeep(obj) {
|
|
|
440
458
|
}
|
|
441
459
|
return cloneObject(obj);
|
|
442
460
|
}
|
|
443
|
-
exports.cloneDeep = cloneDeep;
|
|
444
461
|
function last(arr) {
|
|
445
462
|
if (!Array.isArray(arr)) {
|
|
446
463
|
return undefined;
|
|
447
464
|
}
|
|
448
465
|
return arr[arr.length - 1];
|
|
449
466
|
}
|
|
450
|
-
exports.last = last;
|
|
451
467
|
function debounce(fn, delay, { leading } = {}) {
|
|
452
468
|
let timer;
|
|
453
469
|
return (...args) => {
|
|
@@ -458,13 +474,11 @@ function debounce(fn, delay, { leading } = {}) {
|
|
|
458
474
|
timer = setTimeout(() => fn(...args), delay);
|
|
459
475
|
};
|
|
460
476
|
}
|
|
461
|
-
exports.debounce = debounce;
|
|
462
477
|
function randomInt(min, max) {
|
|
463
478
|
min = Math.floor(min);
|
|
464
479
|
max = Math.ceil(max) + 1;
|
|
465
480
|
return Math.floor(Math.random() * (max - min) + min);
|
|
466
481
|
}
|
|
467
|
-
exports.randomInt = randomInt;
|
|
468
482
|
function connectableHostname(hostname) {
|
|
469
483
|
if (hostname === "0.0.0.0") {
|
|
470
484
|
hostname = "127.0.0.1";
|
|
@@ -477,11 +491,9 @@ function connectableHostname(hostname) {
|
|
|
477
491
|
}
|
|
478
492
|
return hostname;
|
|
479
493
|
}
|
|
480
|
-
exports.connectableHostname = connectableHostname;
|
|
481
494
|
async function openInBrowser(url) {
|
|
482
495
|
await open(url);
|
|
483
496
|
}
|
|
484
|
-
exports.openInBrowser = openInBrowser;
|
|
485
497
|
async function openInBrowserPopup(url, buttonText) {
|
|
486
498
|
const popupPage = (0, templates_1.readTemplateSync)("popup.html")
|
|
487
499
|
.replace("${url}", url)
|
|
@@ -505,7 +517,6 @@ async function openInBrowserPopup(url, buttonText) {
|
|
|
505
517
|
},
|
|
506
518
|
};
|
|
507
519
|
}
|
|
508
|
-
exports.openInBrowserPopup = openInBrowserPopup;
|
|
509
520
|
function getHostnameFromUrl(url) {
|
|
510
521
|
try {
|
|
511
522
|
return new URL(url).hostname;
|
|
@@ -514,7 +525,6 @@ function getHostnameFromUrl(url) {
|
|
|
514
525
|
return null;
|
|
515
526
|
}
|
|
516
527
|
}
|
|
517
|
-
exports.getHostnameFromUrl = getHostnameFromUrl;
|
|
518
528
|
function readFileFromDirectory(directory, file) {
|
|
519
529
|
return new Promise((resolve, reject) => {
|
|
520
530
|
fs.readFile(path.resolve(directory, file), "utf8", (err, data) => {
|
|
@@ -535,7 +545,6 @@ function readFileFromDirectory(directory, file) {
|
|
|
535
545
|
};
|
|
536
546
|
});
|
|
537
547
|
}
|
|
538
|
-
exports.readFileFromDirectory = readFileFromDirectory;
|
|
539
548
|
function wrappedSafeLoad(source) {
|
|
540
549
|
try {
|
|
541
550
|
return yaml.parse(source);
|
|
@@ -544,7 +553,6 @@ function wrappedSafeLoad(source) {
|
|
|
544
553
|
throw new error_1.FirebaseError(`YAML Error: ${(0, error_1.getErrMsg)(err)}`, { original: (0, error_1.getError)(err) });
|
|
545
554
|
}
|
|
546
555
|
}
|
|
547
|
-
exports.wrappedSafeLoad = wrappedSafeLoad;
|
|
548
556
|
function generateId(n = 6) {
|
|
549
557
|
const letters = "abcdefghijklmnopqrstuvwxyz";
|
|
550
558
|
const allChars = "01234567890-abcdefghijklmnopqrstuvwxyz";
|
|
@@ -555,7 +563,6 @@ function generateId(n = 6) {
|
|
|
555
563
|
}
|
|
556
564
|
return id;
|
|
557
565
|
}
|
|
558
|
-
exports.generateId = generateId;
|
|
559
566
|
function generatePassword(n = 20) {
|
|
560
567
|
const lower = "abcdefghijklmnopqrstuvwxyz";
|
|
561
568
|
const upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
@@ -577,7 +584,6 @@ function generatePassword(n = 20) {
|
|
|
577
584
|
}
|
|
578
585
|
return pwArray.join("");
|
|
579
586
|
}
|
|
580
|
-
exports.generatePassword = generatePassword;
|
|
581
587
|
function readSecretValue(prompt, dataFile) {
|
|
582
588
|
if ((!dataFile || dataFile === "-") && tty.isatty(0)) {
|
|
583
589
|
return (0, prompt_1.password)({ message: prompt });
|
|
@@ -596,7 +602,6 @@ function readSecretValue(prompt, dataFile) {
|
|
|
596
602
|
throw e;
|
|
597
603
|
}
|
|
598
604
|
}
|
|
599
|
-
exports.readSecretValue = readSecretValue;
|
|
600
605
|
function updateOrCreateGitignore(dirPath, entries) {
|
|
601
606
|
const gitignorePath = path.join(dirPath, ".gitignore");
|
|
602
607
|
if (!fs.existsSync(gitignorePath)) {
|
|
@@ -611,7 +616,6 @@ function updateOrCreateGitignore(dirPath, entries) {
|
|
|
611
616
|
}
|
|
612
617
|
fs.writeFileSync(gitignorePath, content);
|
|
613
618
|
}
|
|
614
|
-
exports.updateOrCreateGitignore = updateOrCreateGitignore;
|
|
615
619
|
async function promptForDirectory(args) {
|
|
616
620
|
let dir = "";
|
|
617
621
|
while (!dir) {
|
|
@@ -635,7 +639,6 @@ async function promptForDirectory(args) {
|
|
|
635
639
|
}
|
|
636
640
|
return dir;
|
|
637
641
|
}
|
|
638
|
-
exports.promptForDirectory = promptForDirectory;
|
|
639
642
|
function deepEqual(a, b) {
|
|
640
643
|
if (a === b) {
|
|
641
644
|
return true;
|
|
@@ -655,7 +658,6 @@ function deepEqual(a, b) {
|
|
|
655
658
|
}
|
|
656
659
|
return true;
|
|
657
660
|
}
|
|
658
|
-
exports.deepEqual = deepEqual;
|
|
659
661
|
function newUniqueId(recommended, existingIDs) {
|
|
660
662
|
let id = recommended;
|
|
661
663
|
let i = 1;
|
|
@@ -665,7 +667,6 @@ function newUniqueId(recommended, existingIDs) {
|
|
|
665
667
|
}
|
|
666
668
|
return id;
|
|
667
669
|
}
|
|
668
|
-
exports.newUniqueId = newUniqueId;
|
|
669
670
|
function commandExistsSync(command) {
|
|
670
671
|
try {
|
|
671
672
|
const isWindows = (0, node_os_1.platform)() === "win32";
|
|
@@ -679,7 +680,6 @@ function commandExistsSync(command) {
|
|
|
679
680
|
return false;
|
|
680
681
|
}
|
|
681
682
|
}
|
|
682
|
-
exports.commandExistsSync = commandExistsSync;
|
|
683
683
|
function resolveWithin(base, subPath, errMsg) {
|
|
684
684
|
const abs = path.resolve(base, subPath);
|
|
685
685
|
const rel = path.relative(base, abs);
|
|
@@ -688,4 +688,3 @@ function resolveWithin(base, subPath, errMsg) {
|
|
|
688
688
|
}
|
|
689
689
|
return abs;
|
|
690
690
|
}
|
|
691
|
-
exports.resolveWithin = resolveWithin;
|
package/lib/vsCodeUtils.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isVSCodeExtension = isVSCodeExtension;
|
|
4
|
+
exports.setIsVSCodeExtension = setIsVSCodeExtension;
|
|
4
5
|
let _IS_WEBPACKED_FOR_VSCE = false;
|
|
5
6
|
function isVSCodeExtension() {
|
|
6
7
|
return _IS_WEBPACKED_FOR_VSCE;
|
|
7
8
|
}
|
|
8
|
-
exports.isVSCodeExtension = isVSCodeExtension;
|
|
9
9
|
function setIsVSCodeExtension(v) {
|
|
10
10
|
_IS_WEBPACKED_FOR_VSCE = v;
|
|
11
11
|
}
|
|
12
|
-
exports.setIsVSCodeExtension = setIsVSCodeExtension;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "firebase-tools",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.2.0",
|
|
4
4
|
"description": "Command-Line Interface for Firebase",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"mcpName": "io.github.firebase/firebase-mcp",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"@electric-sql/pglite-tools": "^0.2.8",
|
|
69
69
|
"@google-cloud/cloud-sql-connector": "^1.3.3",
|
|
70
70
|
"@google-cloud/pubsub": "^5.2.0",
|
|
71
|
-
"@inquirer/prompts": "^
|
|
72
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
71
|
+
"@inquirer/prompts": "^8.1.0",
|
|
72
|
+
"@modelcontextprotocol/sdk": "^1.24.0",
|
|
73
73
|
"abort-controller": "^3.0.0",
|
|
74
74
|
"ajv": "^8.17.1",
|
|
75
75
|
"ajv-formats": "3.0.1",
|
|
@@ -95,11 +95,11 @@
|
|
|
95
95
|
"fs-extra": "^10.1.0",
|
|
96
96
|
"fuzzy": "^0.1.3",
|
|
97
97
|
"gaxios": "^6.7.0",
|
|
98
|
-
"glob": "^10.
|
|
98
|
+
"glob": "^10.5.0",
|
|
99
99
|
"google-auth-library": "^9.11.0",
|
|
100
100
|
"ignore": "^7.0.4",
|
|
101
|
-
"js-yaml": "^3.14.
|
|
102
|
-
"jsonwebtoken": "^9.0.
|
|
101
|
+
"js-yaml": "^3.14.2",
|
|
102
|
+
"jsonwebtoken": "^9.0.2",
|
|
103
103
|
"leven": "^3.1.0",
|
|
104
104
|
"libsodium-wrappers": "^0.7.10",
|
|
105
105
|
"lodash": "^4.17.21",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* https://firebase.google.com/docs/extensions/publishers
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import * as functions from "firebase-functions";
|
|
11
|
+
import * as functions from "firebase-functions/v1";
|
|
12
12
|
|
|
13
13
|
exports.greetTheWorld = functions.https.onRequest(
|
|
14
14
|
(req: functions.Request, res: functions.Response) => {
|