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
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.I18N_SOURCE = void 0;
|
|
4
|
+
exports.cleanEscapedChars = cleanEscapedChars;
|
|
5
|
+
exports.cleanCustomRouteI18n = cleanCustomRouteI18n;
|
|
6
|
+
exports.cleanI18n = cleanI18n;
|
|
7
|
+
exports.isRewriteSupportedByHosting = isRewriteSupportedByHosting;
|
|
8
|
+
exports.isRedirectSupportedByHosting = isRedirectSupportedByHosting;
|
|
9
|
+
exports.isHeaderSupportedByHosting = isHeaderSupportedByHosting;
|
|
10
|
+
exports.getNextjsRewritesToUse = getNextjsRewritesToUse;
|
|
11
|
+
exports.usesAppDirRouter = usesAppDirRouter;
|
|
12
|
+
exports.usesNextImage = usesNextImage;
|
|
13
|
+
exports.hasUnoptimizedImage = hasUnoptimizedImage;
|
|
14
|
+
exports.isUsingMiddleware = isUsingMiddleware;
|
|
15
|
+
exports.isUsingImageOptimization = isUsingImageOptimization;
|
|
16
|
+
exports.isUsingNextImageInAppDirectory = isUsingNextImageInAppDirectory;
|
|
17
|
+
exports.isUsingAppDirectory = isUsingAppDirectory;
|
|
18
|
+
exports.allDependencyNames = allDependencyNames;
|
|
19
|
+
exports.getMiddlewareMatcherRegexes = getMiddlewareMatcherRegexes;
|
|
20
|
+
exports.getNonStaticRoutes = getNonStaticRoutes;
|
|
21
|
+
exports.getNonStaticServerComponents = getNonStaticServerComponents;
|
|
22
|
+
exports.getAppMetadataFromMetaFiles = getAppMetadataFromMetaFiles;
|
|
23
|
+
exports.getBuildId = getBuildId;
|
|
24
|
+
exports.getNextVersion = getNextVersion;
|
|
25
|
+
exports.getNextVersionRaw = getNextVersionRaw;
|
|
26
|
+
exports.hasStaticAppNotFoundComponent = hasStaticAppNotFoundComponent;
|
|
27
|
+
exports.getRoutesWithServerAction = getRoutesWithServerAction;
|
|
28
|
+
exports.getProductionDistDirFiles = getProductionDistDirFiles;
|
|
29
|
+
exports.whichNextConfigFile = whichNextConfigFile;
|
|
30
|
+
exports.findEsbuildPath = findEsbuildPath;
|
|
31
|
+
exports.getGlobalEsbuildVersion = getGlobalEsbuildVersion;
|
|
32
|
+
exports.installEsbuild = installEsbuild;
|
|
33
|
+
exports.isNextJsVersionVulnerable = isNextJsVersionVulnerable;
|
|
4
34
|
const fs_1 = require("fs");
|
|
5
35
|
const fs_extra_1 = require("fs-extra");
|
|
6
36
|
const path_1 = require("path");
|
|
@@ -17,64 +47,57 @@ exports.I18N_SOURCE = /\/:nextInternalLocale(\([^\)]+\))?/;
|
|
|
17
47
|
function cleanEscapedChars(path) {
|
|
18
48
|
return path.replace(/\\([(){}:+?*])/g, (a, b) => b);
|
|
19
49
|
}
|
|
20
|
-
exports.cleanEscapedChars = cleanEscapedChars;
|
|
21
50
|
function cleanCustomRouteI18n(path) {
|
|
22
51
|
return path.replace(exports.I18N_SOURCE, "");
|
|
23
52
|
}
|
|
24
|
-
exports.cleanCustomRouteI18n = cleanCustomRouteI18n;
|
|
25
53
|
function cleanI18n(it) {
|
|
26
54
|
const [, localesRegex] = it.source.match(exports.I18N_SOURCE) || [undefined, undefined];
|
|
27
55
|
const source = localesRegex ? cleanCustomRouteI18n(it.source) : it.source;
|
|
28
56
|
const destination = "destination" in it && localesRegex ? cleanCustomRouteI18n(it.destination) : it.destination;
|
|
29
57
|
const regex = "regex" in it && localesRegex ? it.regex.replace(`(?:/${localesRegex})`, "") : it.regex;
|
|
30
|
-
return
|
|
58
|
+
return {
|
|
59
|
+
...it,
|
|
60
|
+
source,
|
|
31
61
|
destination,
|
|
32
|
-
regex
|
|
62
|
+
regex,
|
|
63
|
+
};
|
|
33
64
|
}
|
|
34
|
-
exports.cleanI18n = cleanI18n;
|
|
35
65
|
function isRewriteSupportedByHosting(rewrite) {
|
|
36
66
|
return !("has" in rewrite ||
|
|
37
67
|
"missing" in rewrite ||
|
|
38
68
|
(0, utils_1.isUrl)(rewrite.destination) ||
|
|
39
69
|
rewrite.destination.includes("?"));
|
|
40
70
|
}
|
|
41
|
-
exports.isRewriteSupportedByHosting = isRewriteSupportedByHosting;
|
|
42
71
|
function isRedirectSupportedByHosting(redirect) {
|
|
43
72
|
return !("has" in redirect ||
|
|
44
73
|
"missing" in redirect ||
|
|
45
74
|
"internal" in redirect ||
|
|
46
75
|
redirect.destination.includes("?"));
|
|
47
76
|
}
|
|
48
|
-
exports.isRedirectSupportedByHosting = isRedirectSupportedByHosting;
|
|
49
77
|
function isHeaderSupportedByHosting(header) {
|
|
50
78
|
return !("has" in header || "missing" in header);
|
|
51
79
|
}
|
|
52
|
-
exports.isHeaderSupportedByHosting = isHeaderSupportedByHosting;
|
|
53
80
|
function getNextjsRewritesToUse(nextJsRewrites) {
|
|
54
81
|
if (Array.isArray(nextJsRewrites)) {
|
|
55
82
|
return nextJsRewrites.map(cleanI18n);
|
|
56
83
|
}
|
|
57
|
-
if (nextJsRewrites
|
|
84
|
+
if (nextJsRewrites?.beforeFiles) {
|
|
58
85
|
return nextJsRewrites.beforeFiles.map(cleanI18n);
|
|
59
86
|
}
|
|
60
87
|
return [];
|
|
61
88
|
}
|
|
62
|
-
exports.getNextjsRewritesToUse = getNextjsRewritesToUse;
|
|
63
89
|
function usesAppDirRouter(sourceDir) {
|
|
64
90
|
const appPathRoutesManifestPath = (0, path_1.join)(sourceDir, constants_1.APP_PATH_ROUTES_MANIFEST);
|
|
65
91
|
return (0, fs_1.existsSync)(appPathRoutesManifestPath);
|
|
66
92
|
}
|
|
67
|
-
exports.usesAppDirRouter = usesAppDirRouter;
|
|
68
93
|
async function usesNextImage(sourceDir, distDir) {
|
|
69
94
|
const exportMarker = await (0, utils_1.readJSON)((0, path_1.join)(sourceDir, distDir, constants_1.EXPORT_MARKER));
|
|
70
95
|
return exportMarker.isNextImageImported;
|
|
71
96
|
}
|
|
72
|
-
exports.usesNextImage = usesNextImage;
|
|
73
97
|
async function hasUnoptimizedImage(sourceDir, distDir) {
|
|
74
98
|
const imagesManifest = await (0, utils_1.readJSON)((0, path_1.join)(sourceDir, distDir, constants_1.IMAGES_MANIFEST));
|
|
75
99
|
return imagesManifest.images.unoptimized;
|
|
76
100
|
}
|
|
77
|
-
exports.hasUnoptimizedImage = hasUnoptimizedImage;
|
|
78
101
|
async function isUsingMiddleware(dir, isDevMode) {
|
|
79
102
|
if (isDevMode) {
|
|
80
103
|
const [middlewareJs, middlewareTs] = await Promise.all([
|
|
@@ -88,7 +111,6 @@ async function isUsingMiddleware(dir, isDevMode) {
|
|
|
88
111
|
return Object.keys(middlewareManifest.middleware).length > 0;
|
|
89
112
|
}
|
|
90
113
|
}
|
|
91
|
-
exports.isUsingMiddleware = isUsingMiddleware;
|
|
92
114
|
async function isUsingImageOptimization(projectDir, distDir) {
|
|
93
115
|
let isNextImageImported = await usesNextImage(projectDir, distDir);
|
|
94
116
|
if (!isNextImageImported && isUsingAppDirectory((0, path_1.join)(projectDir, distDir))) {
|
|
@@ -102,7 +124,6 @@ async function isUsingImageOptimization(projectDir, distDir) {
|
|
|
102
124
|
}
|
|
103
125
|
return false;
|
|
104
126
|
}
|
|
105
|
-
exports.isUsingImageOptimization = isUsingImageOptimization;
|
|
106
127
|
async function isUsingNextImageInAppDirectory(projectDir, nextDir) {
|
|
107
128
|
const nextImagePath = ["node_modules", "next", "dist", "client", "image"];
|
|
108
129
|
const nextImageString = utils_2.IS_WINDOWS
|
|
@@ -118,19 +139,16 @@ async function isUsingNextImageInAppDirectory(projectDir, nextDir) {
|
|
|
118
139
|
}
|
|
119
140
|
return false;
|
|
120
141
|
}
|
|
121
|
-
exports.isUsingNextImageInAppDirectory = isUsingNextImageInAppDirectory;
|
|
122
142
|
function isUsingAppDirectory(dir) {
|
|
123
143
|
const appPathRoutesManifestPath = (0, path_1.join)(dir, constants_1.APP_PATH_ROUTES_MANIFEST);
|
|
124
144
|
return (0, fsutils_1.fileExistsSync)(appPathRoutesManifestPath);
|
|
125
145
|
}
|
|
126
|
-
exports.isUsingAppDirectory = isUsingAppDirectory;
|
|
127
146
|
function allDependencyNames(mod) {
|
|
128
147
|
if (!mod.dependencies)
|
|
129
148
|
return [];
|
|
130
149
|
const dependencyNames = Object.keys(mod.dependencies).reduce((acc, it) => [...acc, it, ...allDependencyNames(mod.dependencies[it])], []);
|
|
131
150
|
return dependencyNames;
|
|
132
151
|
}
|
|
133
|
-
exports.allDependencyNames = allDependencyNames;
|
|
134
152
|
function getMiddlewareMatcherRegexes(middlewareManifest) {
|
|
135
153
|
const middlewareObjectValues = Object.values(middlewareManifest.middleware);
|
|
136
154
|
let middlewareMatchers;
|
|
@@ -144,7 +162,6 @@ function getMiddlewareMatcherRegexes(middlewareManifest) {
|
|
|
144
162
|
}
|
|
145
163
|
return middlewareMatchers.map((matcher) => new RegExp(matcher.regexp));
|
|
146
164
|
}
|
|
147
|
-
exports.getMiddlewareMatcherRegexes = getMiddlewareMatcherRegexes;
|
|
148
165
|
function getNonStaticRoutes(pagesManifestJSON, prerenderedRoutes, dynamicRoutes) {
|
|
149
166
|
const nonStaticRoutes = Object.entries(pagesManifestJSON)
|
|
150
167
|
.filter(([it, src]) => !((0, path_1.extname)(src) !== ".js" ||
|
|
@@ -154,7 +171,6 @@ function getNonStaticRoutes(pagesManifestJSON, prerenderedRoutes, dynamicRoutes)
|
|
|
154
171
|
.map(([it]) => it);
|
|
155
172
|
return nonStaticRoutes;
|
|
156
173
|
}
|
|
157
|
-
exports.getNonStaticRoutes = getNonStaticRoutes;
|
|
158
174
|
function getNonStaticServerComponents(appPathsManifest, appPathRoutesManifest, prerenderedRoutes, dynamicRoutes) {
|
|
159
175
|
const nonStaticServerComponents = Object.entries(appPathsManifest)
|
|
160
176
|
.filter(([it, src]) => {
|
|
@@ -166,7 +182,6 @@ function getNonStaticServerComponents(appPathsManifest, appPathRoutesManifest, p
|
|
|
166
182
|
.map(([it]) => it);
|
|
167
183
|
return new Set(nonStaticServerComponents);
|
|
168
184
|
}
|
|
169
|
-
exports.getNonStaticServerComponents = getNonStaticServerComponents;
|
|
170
185
|
async function getAppMetadataFromMetaFiles(sourceDir, distDir, basePath, appPathRoutesManifest) {
|
|
171
186
|
const headers = [];
|
|
172
187
|
const pprRoutes = [];
|
|
@@ -190,12 +205,10 @@ async function getAppMetadataFromMetaFiles(sourceDir, distDir, basePath, appPath
|
|
|
190
205
|
}));
|
|
191
206
|
return { headers, pprRoutes };
|
|
192
207
|
}
|
|
193
|
-
exports.getAppMetadataFromMetaFiles = getAppMetadataFromMetaFiles;
|
|
194
208
|
async function getBuildId(distDir) {
|
|
195
209
|
const buildId = await (0, promises_1.readFile)((0, path_1.join)(distDir, "BUILD_ID"));
|
|
196
210
|
return buildId.toString();
|
|
197
211
|
}
|
|
198
|
-
exports.getBuildId = getBuildId;
|
|
199
212
|
function getNextVersion(cwd) {
|
|
200
213
|
const dependency = (0, utils_1.findDependency)("next", { cwd, depth: 0, omitDev: false });
|
|
201
214
|
if (!dependency)
|
|
@@ -205,16 +218,13 @@ function getNextVersion(cwd) {
|
|
|
205
218
|
return dependency.version;
|
|
206
219
|
return nextVersionSemver.toString();
|
|
207
220
|
}
|
|
208
|
-
exports.getNextVersion = getNextVersion;
|
|
209
221
|
function getNextVersionRaw(cwd) {
|
|
210
222
|
const dependency = (0, utils_1.findDependency)("next", { cwd, depth: 0, omitDev: false });
|
|
211
|
-
return dependency
|
|
223
|
+
return dependency?.version;
|
|
212
224
|
}
|
|
213
|
-
exports.getNextVersionRaw = getNextVersionRaw;
|
|
214
225
|
async function hasStaticAppNotFoundComponent(sourceDir, distDir) {
|
|
215
226
|
return (0, fs_extra_1.pathExists)((0, path_1.join)(sourceDir, distDir, "server", "app", "_not-found.html"));
|
|
216
227
|
}
|
|
217
|
-
exports.hasStaticAppNotFoundComponent = hasStaticAppNotFoundComponent;
|
|
218
228
|
function getRoutesWithServerAction(serverReferenceManifest, appPathRoutesManifest) {
|
|
219
229
|
const routesWithServerAction = new Set();
|
|
220
230
|
for (const key of Object.keys(serverReferenceManifest)) {
|
|
@@ -233,7 +243,6 @@ function getRoutesWithServerAction(serverReferenceManifest, appPathRoutesManifes
|
|
|
233
243
|
}
|
|
234
244
|
return Array.from(routesWithServerAction);
|
|
235
245
|
}
|
|
236
|
-
exports.getRoutesWithServerAction = getRoutesWithServerAction;
|
|
237
246
|
async function getProductionDistDirFiles(sourceDir, distDir) {
|
|
238
247
|
return (0, glob_1.glob)("**", {
|
|
239
248
|
ignore: [(0, path_1.join)("cache", "webpack", "*-development", "**"), (0, path_1.join)("cache", "eslint", "**")],
|
|
@@ -242,7 +251,6 @@ async function getProductionDistDirFiles(sourceDir, distDir) {
|
|
|
242
251
|
absolute: false,
|
|
243
252
|
});
|
|
244
253
|
}
|
|
245
|
-
exports.getProductionDistDirFiles = getProductionDistDirFiles;
|
|
246
254
|
async function whichNextConfigFile(dir) {
|
|
247
255
|
for (const file of constants_1.CONFIG_FILES) {
|
|
248
256
|
if (await (0, fs_extra_1.pathExists)((0, path_1.join)(dir, file)))
|
|
@@ -250,11 +258,9 @@ async function whichNextConfigFile(dir) {
|
|
|
250
258
|
}
|
|
251
259
|
return null;
|
|
252
260
|
}
|
|
253
|
-
exports.whichNextConfigFile = whichNextConfigFile;
|
|
254
261
|
function findEsbuildPath() {
|
|
255
|
-
var _a;
|
|
256
262
|
try {
|
|
257
|
-
const esbuildBinPath = (
|
|
263
|
+
const esbuildBinPath = (0, child_process_1.execSync)("npx which esbuild", { encoding: "utf8" })?.trim();
|
|
258
264
|
if (!esbuildBinPath) {
|
|
259
265
|
return null;
|
|
260
266
|
}
|
|
@@ -269,11 +275,9 @@ function findEsbuildPath() {
|
|
|
269
275
|
return null;
|
|
270
276
|
}
|
|
271
277
|
}
|
|
272
|
-
exports.findEsbuildPath = findEsbuildPath;
|
|
273
278
|
function getGlobalEsbuildVersion(binPath) {
|
|
274
|
-
var _a;
|
|
275
279
|
try {
|
|
276
|
-
const versionOutput = (
|
|
280
|
+
const versionOutput = (0, child_process_1.execSync)(`"${binPath}" --version`, { encoding: "utf8" })?.trim();
|
|
277
281
|
if (!versionOutput) {
|
|
278
282
|
return null;
|
|
279
283
|
}
|
|
@@ -285,7 +289,6 @@ function getGlobalEsbuildVersion(binPath) {
|
|
|
285
289
|
return null;
|
|
286
290
|
}
|
|
287
291
|
}
|
|
288
|
-
exports.getGlobalEsbuildVersion = getGlobalEsbuildVersion;
|
|
289
292
|
function installEsbuild(version) {
|
|
290
293
|
const installCommand = `npm install esbuild@${version} --no-save`;
|
|
291
294
|
try {
|
|
@@ -300,7 +303,6 @@ function installEsbuild(version) {
|
|
|
300
303
|
}
|
|
301
304
|
}
|
|
302
305
|
}
|
|
303
|
-
exports.installEsbuild = installEsbuild;
|
|
304
306
|
function isNextJsVersionVulnerable(versionStr) {
|
|
305
307
|
const v = (0, semver_1.parse)(versionStr);
|
|
306
308
|
if (!v)
|
|
@@ -335,4 +337,3 @@ function isNextJsVersionVulnerable(versionStr) {
|
|
|
335
337
|
}
|
|
336
338
|
return false;
|
|
337
339
|
}
|
|
338
|
-
exports.isNextJsVersionVulnerable = isNextJsVersionVulnerable;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.supportedRange = exports.type = exports.support = exports.name = void 0;
|
|
4
|
+
exports.discover = discover;
|
|
5
|
+
exports.build = build;
|
|
6
|
+
exports.ɵcodegenPublicDirectory = ɵcodegenPublicDirectory;
|
|
7
|
+
exports.ɵcodegenFunctionsDirectory = ɵcodegenFunctionsDirectory;
|
|
8
|
+
exports.getDevModeHandle = getDevModeHandle;
|
|
9
|
+
exports.getConfig = getConfig;
|
|
10
|
+
exports.init = init;
|
|
4
11
|
const fs_extra_1 = require("fs-extra");
|
|
5
12
|
const promises_1 = require("fs/promises");
|
|
6
13
|
const path_1 = require("path");
|
|
@@ -28,7 +35,6 @@ async function discover(dir) {
|
|
|
28
35
|
const { ssr: mayWantBackend } = await getConfig(dir);
|
|
29
36
|
return { mayWantBackend, version };
|
|
30
37
|
}
|
|
31
|
-
exports.discover = discover;
|
|
32
38
|
async function build(cwd) {
|
|
33
39
|
await (0, utils_1.warnIfCustomBuildScript)(cwd, exports.name, DEFAULT_BUILD_SCRIPT);
|
|
34
40
|
const cli = (0, utils_1.getNodeModuleBin)("nuxt", cwd);
|
|
@@ -37,7 +43,7 @@ async function build(cwd) {
|
|
|
37
43
|
const build = (0, cross_spawn_1.sync)(cli, command, {
|
|
38
44
|
cwd,
|
|
39
45
|
stdio: "inherit",
|
|
40
|
-
env:
|
|
46
|
+
env: { ...process.env, NITRO_PRESET: "node" },
|
|
41
47
|
});
|
|
42
48
|
if (build.status !== 0)
|
|
43
49
|
throw new error_1.FirebaseError("Was unable to build your Nuxt application.");
|
|
@@ -51,7 +57,6 @@ async function build(cwd) {
|
|
|
51
57
|
];
|
|
52
58
|
return { wantsBackend, rewrites, baseUrl };
|
|
53
59
|
}
|
|
54
|
-
exports.build = build;
|
|
55
60
|
async function ɵcodegenPublicDirectory(root, dest) {
|
|
56
61
|
const { app: { baseURL }, } = await getConfig(root);
|
|
57
62
|
const distPath = (0, path_1.join)(root, ".output", "public");
|
|
@@ -59,7 +64,6 @@ async function ɵcodegenPublicDirectory(root, dest) {
|
|
|
59
64
|
await (0, fs_extra_1.mkdirp)(fullDest);
|
|
60
65
|
await (0, fs_extra_1.copy)(distPath, fullDest);
|
|
61
66
|
}
|
|
62
|
-
exports.ɵcodegenPublicDirectory = ɵcodegenPublicDirectory;
|
|
63
67
|
async function ɵcodegenFunctionsDirectory(sourceDir) {
|
|
64
68
|
const serverDir = (0, path_1.join)(sourceDir, ".output", "server");
|
|
65
69
|
const packageJsonBuffer = await (0, promises_1.readFile)((0, path_1.join)(sourceDir, "package.json"));
|
|
@@ -68,7 +72,6 @@ async function ɵcodegenFunctionsDirectory(sourceDir) {
|
|
|
68
72
|
packageJson.dependencies["nitro-output"] = `file:${serverDir}`;
|
|
69
73
|
return { packageJson, frameworksEntry: "nitro" };
|
|
70
74
|
}
|
|
71
|
-
exports.ɵcodegenFunctionsDirectory = ɵcodegenFunctionsDirectory;
|
|
72
75
|
async function getDevModeHandle(cwd) {
|
|
73
76
|
const host = new Promise((resolve, reject) => {
|
|
74
77
|
const cli = (0, utils_1.getNodeModuleBin)("nuxt", cwd);
|
|
@@ -86,12 +89,10 @@ async function getDevModeHandle(cwd) {
|
|
|
86
89
|
});
|
|
87
90
|
return (0, utils_1.simpleProxy)(await host);
|
|
88
91
|
}
|
|
89
|
-
exports.getDevModeHandle = getDevModeHandle;
|
|
90
92
|
async function getConfig(cwd) {
|
|
91
93
|
const { loadNuxtConfig } = await (0, utils_1.relativeRequire)(cwd, "@nuxt/kit");
|
|
92
94
|
return await loadNuxtConfig({ cwd });
|
|
93
95
|
}
|
|
94
|
-
exports.getConfig = getConfig;
|
|
95
96
|
function init(setup, config) {
|
|
96
97
|
(0, child_process_1.execSync)(`npx --yes nuxi@"${exports.supportedRange}" init ${setup.featureInfo.hosting.source}`, {
|
|
97
98
|
stdio: "inherit",
|
|
@@ -99,4 +100,3 @@ function init(setup, config) {
|
|
|
99
100
|
});
|
|
100
101
|
return Promise.resolve();
|
|
101
102
|
}
|
|
102
|
-
exports.init = init;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getNuxtVersion = getNuxtVersion;
|
|
4
|
+
exports.nuxtConfigFilesExist = nuxtConfigFilesExist;
|
|
4
5
|
const fs_extra_1 = require("fs-extra");
|
|
5
6
|
const path_1 = require("path");
|
|
6
7
|
const utils_1 = require("../utils");
|
|
7
8
|
function getNuxtVersion(cwd) {
|
|
8
|
-
|
|
9
|
-
return (_a = (0, utils_1.findDependency)("nuxt", {
|
|
9
|
+
return (0, utils_1.findDependency)("nuxt", {
|
|
10
10
|
cwd,
|
|
11
11
|
depth: 0,
|
|
12
12
|
omitDev: false,
|
|
13
|
-
})
|
|
13
|
+
})?.version;
|
|
14
14
|
}
|
|
15
|
-
exports.getNuxtVersion = getNuxtVersion;
|
|
16
15
|
async function nuxtConfigFilesExist(dir) {
|
|
17
16
|
const configFilesExist = await Promise.all([
|
|
18
17
|
(0, fs_extra_1.pathExists)((0, path_1.join)(dir, "nuxt.config.js")),
|
|
@@ -20,4 +19,3 @@ async function nuxtConfigFilesExist(dir) {
|
|
|
20
19
|
]);
|
|
21
20
|
return configFilesExist.some((it) => it);
|
|
22
21
|
}
|
|
23
|
-
exports.nuxtConfigFilesExist = nuxtConfigFilesExist;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.supportedRange = exports.type = exports.support = exports.name = void 0;
|
|
4
|
+
exports.discover = discover;
|
|
5
|
+
exports.build = build;
|
|
6
|
+
exports.ɵcodegenPublicDirectory = ɵcodegenPublicDirectory;
|
|
7
|
+
exports.ɵcodegenFunctionsDirectory = ɵcodegenFunctionsDirectory;
|
|
8
|
+
exports.getDevModeHandle = getDevModeHandle;
|
|
4
9
|
const fs_extra_1 = require("fs-extra");
|
|
5
10
|
const promises_1 = require("fs/promises");
|
|
6
11
|
const path_1 = require("path");
|
|
@@ -27,7 +32,6 @@ async function discover(rootDir) {
|
|
|
27
32
|
return;
|
|
28
33
|
return { mayWantBackend: true, version };
|
|
29
34
|
}
|
|
30
|
-
exports.discover = discover;
|
|
31
35
|
async function build(rootDir) {
|
|
32
36
|
const { app, nuxt } = await getAndLoadNuxt({ rootDir, for: "build" });
|
|
33
37
|
const { options: { ssr, target }, } = app;
|
|
@@ -43,12 +47,10 @@ async function build(rootDir) {
|
|
|
43
47
|
const rewrites = wantsBackend ? [] : [{ source: "**", destination: "/200.html" }];
|
|
44
48
|
return { wantsBackend, rewrites };
|
|
45
49
|
}
|
|
46
|
-
exports.build = build;
|
|
47
50
|
async function ɵcodegenPublicDirectory(rootDir, dest) {
|
|
48
51
|
const { app: { options }, } = await getAndLoadNuxt({ rootDir, for: "build" });
|
|
49
52
|
await (0, fs_extra_1.copy)(options.generate.dir, dest);
|
|
50
53
|
}
|
|
51
|
-
exports.ɵcodegenPublicDirectory = ɵcodegenPublicDirectory;
|
|
52
54
|
async function ɵcodegenFunctionsDirectory(rootDir, destDir) {
|
|
53
55
|
const packageJsonBuffer = await (0, promises_1.readFile)((0, path_1.join)(rootDir, "package.json"));
|
|
54
56
|
const packageJson = JSON.parse(packageJsonBuffer.toString());
|
|
@@ -56,9 +58,8 @@ async function ɵcodegenFunctionsDirectory(rootDir, destDir) {
|
|
|
56
58
|
const { buildDir, _nuxtConfigFile: configFilePath } = options;
|
|
57
59
|
await (0, fs_extra_1.copy)(buildDir, (0, path_1.join)(destDir, (0, path_1.relative)(rootDir, buildDir)));
|
|
58
60
|
await (0, fs_extra_1.copy)(configFilePath, (0, path_1.join)(destDir, (0, path_1.basename)(configFilePath)));
|
|
59
|
-
return { packageJson:
|
|
61
|
+
return { packageJson: { ...packageJson }, frameworksEntry: "nuxt" };
|
|
60
62
|
}
|
|
61
|
-
exports.ɵcodegenFunctionsDirectory = ɵcodegenFunctionsDirectory;
|
|
62
63
|
async function getDevModeHandle(cwd) {
|
|
63
64
|
const host = new Promise((resolve, reject) => {
|
|
64
65
|
const cli = (0, utils_1.getNodeModuleBin)("nuxt", cwd);
|
|
@@ -76,4 +77,3 @@ async function getDevModeHandle(cwd) {
|
|
|
76
77
|
});
|
|
77
78
|
return (0, utils_3.simpleProxy)(await host);
|
|
78
79
|
}
|
|
79
|
-
exports.getDevModeHandle = getDevModeHandle;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports
|
|
3
|
+
exports.supportedRange = exports.getDevModeHandle = exports.discover = exports.type = exports.support = exports.name = void 0;
|
|
4
|
+
exports.build = build;
|
|
5
|
+
exports.ɵcodegenPublicDirectory = ɵcodegenPublicDirectory;
|
|
6
|
+
exports.ɵcodegenFunctionsDirectory = ɵcodegenFunctionsDirectory;
|
|
4
7
|
const fs_extra_1 = require("fs-extra");
|
|
5
8
|
const path_1 = require("path");
|
|
6
9
|
const vite_1 = require("../vite");
|
|
@@ -14,13 +17,11 @@ var vite_2 = require("../vite");
|
|
|
14
17
|
Object.defineProperty(exports, "getDevModeHandle", { enumerable: true, get: function () { return vite_2.getDevModeHandle; } });
|
|
15
18
|
Object.defineProperty(exports, "supportedRange", { enumerable: true, get: function () { return vite_2.supportedRange; } });
|
|
16
19
|
async function build(root, target) {
|
|
17
|
-
var _a;
|
|
18
20
|
const config = await getConfig(root);
|
|
19
|
-
const wantsBackend =
|
|
21
|
+
const wantsBackend = config.kit.adapter?.name !== "@sveltejs/adapter-static";
|
|
20
22
|
await (0, vite_1.build)(root, target);
|
|
21
23
|
return { wantsBackend };
|
|
22
24
|
}
|
|
23
|
-
exports.build = build;
|
|
24
25
|
async function ɵcodegenPublicDirectory(root, dest) {
|
|
25
26
|
const config = await getConfig(root);
|
|
26
27
|
const output = (0, path_1.join)(root, config.kit.outDir, "output");
|
|
@@ -30,19 +31,16 @@ async function ɵcodegenPublicDirectory(root, dest) {
|
|
|
30
31
|
await (0, fs_extra_1.copy)(prerenderedPath, dest);
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
|
-
exports.ɵcodegenPublicDirectory = ɵcodegenPublicDirectory;
|
|
34
34
|
async function ɵcodegenFunctionsDirectory(sourceDir, destDir) {
|
|
35
35
|
var _a;
|
|
36
|
-
var _b;
|
|
37
36
|
const packageJsonBuffer = await (0, fs_extra_1.readFile)((0, path_1.join)(sourceDir, "package.json"));
|
|
38
37
|
const packageJson = JSON.parse(packageJsonBuffer.toString());
|
|
39
38
|
packageJson.dependencies || (packageJson.dependencies = {});
|
|
40
|
-
(_a =
|
|
39
|
+
(_a = packageJson.dependencies)["@sveltejs/kit"] ?? (_a["@sveltejs/kit"] = packageJson.devDependencies["@sveltejs/kit"]);
|
|
41
40
|
const config = await getConfig(sourceDir);
|
|
42
41
|
await (0, fs_extra_1.copy)((0, path_1.join)(sourceDir, config.kit.outDir, "output", "server"), destDir);
|
|
43
42
|
return { packageJson, frameworksEntry: "sveltekit" };
|
|
44
43
|
}
|
|
45
|
-
exports.ɵcodegenFunctionsDirectory = ɵcodegenFunctionsDirectory;
|
|
46
44
|
async function getConfig(root) {
|
|
47
45
|
var _a;
|
|
48
46
|
const configPath = ["svelte.config.js", "svelte.config.mjs"]
|
package/lib/frameworks/utils.js
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isUrl = isUrl;
|
|
4
|
+
exports.readJSON = readJSON;
|
|
5
|
+
exports.warnIfCustomBuildScript = warnIfCustomBuildScript;
|
|
6
|
+
exports.proxyResponse = proxyResponse;
|
|
7
|
+
exports.simpleProxy = simpleProxy;
|
|
8
|
+
exports.getNpmRoot = getNpmRoot;
|
|
9
|
+
exports.getNodeModuleBin = getNodeModuleBin;
|
|
10
|
+
exports.findDependency = findDependency;
|
|
11
|
+
exports.relativeRequire = relativeRequire;
|
|
12
|
+
exports.conjoinOptions = conjoinOptions;
|
|
13
|
+
exports.frameworksCallToAction = frameworksCallToAction;
|
|
14
|
+
exports.validateLocales = validateLocales;
|
|
15
|
+
exports.getFrameworksBuildTarget = getFrameworksBuildTarget;
|
|
4
16
|
const fs_extra_1 = require("fs-extra");
|
|
5
17
|
const path_1 = require("path");
|
|
6
18
|
const promises_1 = require("fs/promises");
|
|
@@ -19,21 +31,17 @@ const NPM_ROOT_MEMO = new Map();
|
|
|
19
31
|
function isUrl(url) {
|
|
20
32
|
return /^https?:\/\//.test(url);
|
|
21
33
|
}
|
|
22
|
-
exports.isUrl = isUrl;
|
|
23
34
|
function readJSON(file, options) {
|
|
24
35
|
return (0, fs_extra_1.readJSON)(file, options);
|
|
25
36
|
}
|
|
26
|
-
exports.readJSON = readJSON;
|
|
27
37
|
async function warnIfCustomBuildScript(dir, framework, defaultBuildScripts) {
|
|
28
|
-
var _a;
|
|
29
38
|
const packageJsonBuffer = await (0, promises_1.readFile)((0, path_1.join)(dir, "package.json"));
|
|
30
39
|
const packageJson = JSON.parse(packageJsonBuffer.toString());
|
|
31
|
-
const buildScript =
|
|
40
|
+
const buildScript = packageJson.scripts?.build;
|
|
32
41
|
if (buildScript && !defaultBuildScripts.includes(buildScript)) {
|
|
33
42
|
console.warn(`\nWARNING: Your package.json contains a custom build that is being ignored. Only the ${framework} default build script (e.g, "${defaultBuildScripts[0]}") is respected. If you have a more advanced build process you should build a custom integration https://firebase.google.com/docs/hosting/express\n`);
|
|
34
43
|
}
|
|
35
44
|
}
|
|
36
|
-
exports.warnIfCustomBuildScript = warnIfCustomBuildScript;
|
|
37
45
|
function proxyResponse(req, res, next) {
|
|
38
46
|
const proxiedRes = new http_1.ServerResponse(req);
|
|
39
47
|
const buffer = [];
|
|
@@ -78,7 +86,6 @@ function proxyResponse(req, res, next) {
|
|
|
78
86
|
});
|
|
79
87
|
return proxiedRes;
|
|
80
88
|
}
|
|
81
|
-
exports.proxyResponse = proxyResponse;
|
|
82
89
|
function simpleProxy(hostOrRequestHandler) {
|
|
83
90
|
const agent = new http_1.Agent({ keepAlive: true });
|
|
84
91
|
const firebaseDefaultsJSON = process.env.__FIREBASE_DEFAULTS__;
|
|
@@ -104,7 +111,11 @@ function simpleProxy(hostOrRequestHandler) {
|
|
|
104
111
|
port,
|
|
105
112
|
path,
|
|
106
113
|
method,
|
|
107
|
-
headers:
|
|
114
|
+
headers: {
|
|
115
|
+
...headers,
|
|
116
|
+
host,
|
|
117
|
+
"X-Forwarded-Host": headers.host,
|
|
118
|
+
},
|
|
108
119
|
};
|
|
109
120
|
const req = (0, http_1.request)(opts, (response) => {
|
|
110
121
|
const { statusCode, statusMessage, headers } = response;
|
|
@@ -130,7 +141,6 @@ function simpleProxy(hostOrRequestHandler) {
|
|
|
130
141
|
}
|
|
131
142
|
};
|
|
132
143
|
}
|
|
133
|
-
exports.simpleProxy = simpleProxy;
|
|
134
144
|
function scanDependencyTree(searchingFor, dependencies = {}) {
|
|
135
145
|
for (const [name, dependency] of Object.entries(dependencies)) {
|
|
136
146
|
if (name === searchingFor)
|
|
@@ -142,19 +152,18 @@ function scanDependencyTree(searchingFor, dependencies = {}) {
|
|
|
142
152
|
return;
|
|
143
153
|
}
|
|
144
154
|
function getNpmRoot(cwd) {
|
|
145
|
-
var _a;
|
|
146
155
|
let npmRoot = NPM_ROOT_MEMO.get(cwd);
|
|
147
156
|
if (npmRoot)
|
|
148
157
|
return npmRoot;
|
|
149
|
-
npmRoot = (
|
|
158
|
+
npmRoot = (0, cross_spawn_1.sync)("npm", ["root"], {
|
|
150
159
|
cwd,
|
|
151
160
|
timeout: NPM_ROOT_TIMEOUT_MILLIES,
|
|
152
161
|
})
|
|
153
|
-
.stdout
|
|
162
|
+
.stdout?.toString()
|
|
163
|
+
.trim();
|
|
154
164
|
NPM_ROOT_MEMO.set(cwd, npmRoot);
|
|
155
165
|
return npmRoot;
|
|
156
166
|
}
|
|
157
|
-
exports.getNpmRoot = getNpmRoot;
|
|
158
167
|
function getNodeModuleBin(name, cwd) {
|
|
159
168
|
const npmRoot = getNpmRoot(cwd);
|
|
160
169
|
if (!npmRoot) {
|
|
@@ -166,13 +175,12 @@ function getNodeModuleBin(name, cwd) {
|
|
|
166
175
|
}
|
|
167
176
|
return path;
|
|
168
177
|
}
|
|
169
|
-
exports.getNodeModuleBin = getNodeModuleBin;
|
|
170
178
|
const DEFAULT_FIND_DEP_OPTIONS = {
|
|
171
179
|
cwd: process.cwd(),
|
|
172
180
|
omitDev: true,
|
|
173
181
|
};
|
|
174
182
|
function findDependency(name, options = {}) {
|
|
175
|
-
const { cwd: dir, depth, omitDev } =
|
|
183
|
+
const { cwd: dir, depth, omitDev } = { ...DEFAULT_FIND_DEP_OPTIONS, ...options };
|
|
176
184
|
const cwd = getNpmRoot(dir);
|
|
177
185
|
if (!cwd)
|
|
178
186
|
return;
|
|
@@ -193,10 +201,9 @@ function findDependency(name, options = {}) {
|
|
|
193
201
|
}
|
|
194
202
|
catch (e) {
|
|
195
203
|
const packageJson = (0, fs_extra_1.readJsonSync)((0, path_1.join)(cwd, name, "package.json"), { throws: false });
|
|
196
|
-
return
|
|
204
|
+
return packageJson?.version ? { version: packageJson.version } : undefined;
|
|
197
205
|
}
|
|
198
206
|
}
|
|
199
|
-
exports.findDependency = findDependency;
|
|
200
207
|
async function relativeRequire(dir, mod) {
|
|
201
208
|
try {
|
|
202
209
|
const requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : require;
|
|
@@ -205,10 +212,10 @@ async function relativeRequire(dir, mod) {
|
|
|
205
212
|
let isEsm = (0, path_1.extname)(path) === ".mjs";
|
|
206
213
|
if (!isEsm) {
|
|
207
214
|
packageJson = await readJSON((0, path_1.join)((0, path_1.dirname)(path), "package.json")).catch(() => undefined);
|
|
208
|
-
isEsm =
|
|
215
|
+
isEsm = packageJson?.type === "module";
|
|
209
216
|
}
|
|
210
217
|
if (isEsm) {
|
|
211
|
-
if ((0, path_1.extname)(path) === ".cjs" &&
|
|
218
|
+
if ((0, path_1.extname)(path) === ".cjs" && packageJson?.main) {
|
|
212
219
|
return dynamicImport((0, path_1.join)((0, path_1.dirname)(path), packageJson.main));
|
|
213
220
|
}
|
|
214
221
|
return dynamicImport((0, url_1.pathToFileURL)(path).toString());
|
|
@@ -223,7 +230,6 @@ async function relativeRequire(dir, mod) {
|
|
|
223
230
|
throw e;
|
|
224
231
|
}
|
|
225
232
|
}
|
|
226
|
-
exports.relativeRequire = relativeRequire;
|
|
227
233
|
function conjoinOptions(_opts, conjunction = "and", separator = ",") {
|
|
228
234
|
if (!_opts.length)
|
|
229
235
|
return "";
|
|
@@ -236,7 +242,6 @@ function conjoinOptions(_opts, conjunction = "and", separator = ",") {
|
|
|
236
242
|
const allButLast = opts.slice(0, -1);
|
|
237
243
|
return `${allButLast.join(`${separator} `)}${separator} ${conjunction} ${lastElement}`;
|
|
238
244
|
}
|
|
239
|
-
exports.conjoinOptions = conjoinOptions;
|
|
240
245
|
function frameworksCallToAction(message, docsUrl = constants_1.DEFAULT_DOCS_URL, prefix = "", framework, version, supportedRange, vite = false) {
|
|
241
246
|
return `${prefix}${message}${framework && supportedRange && (!version || !(0, semver_1.satisfies)(version, supportedRange))
|
|
242
247
|
? clc.yellow(`\n${prefix}The integration is known to work with ${vite ? "Vite" : framework} version ${clc.italic(conjoinOptions(supportedRange.split("||")))}. You may encounter errors.`)
|
|
@@ -248,14 +253,12 @@ ${prefix}${clc.bold("Submit a feature request:")} ${constants_1.FEATURE_REQUEST_
|
|
|
248
253
|
|
|
249
254
|
${prefix}We'd love to learn from you. Express your interest in helping us shape the future of Firebase Hosting: ${constants_1.MAILING_LIST_URL}`;
|
|
250
255
|
}
|
|
251
|
-
exports.frameworksCallToAction = frameworksCallToAction;
|
|
252
256
|
function validateLocales(locales = []) {
|
|
253
257
|
const invalidLocales = locales.filter((locale) => !constants_1.VALID_LOCALE_FORMATS.some((format) => locale.match(format)));
|
|
254
258
|
if (invalidLocales.length) {
|
|
255
259
|
throw new error_1.FirebaseError(`Invalid i18n locales (${invalidLocales.join(", ")}) for Firebase. See our docs for more information https://firebase.google.com/docs/hosting/i18n-rewrites#country-and-language-codes`);
|
|
256
260
|
}
|
|
257
261
|
}
|
|
258
|
-
exports.validateLocales = validateLocales;
|
|
259
262
|
function getFrameworksBuildTarget(purpose, validOptions) {
|
|
260
263
|
const frameworksBuild = process.env.FIREBASE_FRAMEWORKS_BUILD_TARGET;
|
|
261
264
|
if (frameworksBuild) {
|
|
@@ -278,4 +281,3 @@ function getFrameworksBuildTarget(purpose, validOptions) {
|
|
|
278
281
|
throw new error_1.FirebaseError(`We cannot infer your build target from a non-standard NODE_ENV. Please set the FIREBASE_FRAMEWORKS_BUILD_TARGET environment variable. Valid values are: ${validOptions.join(", ")}`);
|
|
279
282
|
}
|
|
280
283
|
}
|
|
281
|
-
exports.getFrameworksBuildTarget = getFrameworksBuildTarget;
|