firebase-tools 11.14.0 → 11.14.2
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 +0 -1
- package/lib/accountImporter.js +0 -1
- package/lib/api.js +0 -1
- package/lib/apiv2.js +0 -1
- package/lib/appdistribution/client.js +0 -1
- package/lib/appdistribution/distribution.js +0 -1
- package/lib/appdistribution/options-parser-util.js +0 -1
- package/lib/archiveDirectory.js +0 -1
- package/lib/auth.js +0 -1
- package/lib/bin/firebase.js +3 -4
- package/lib/checkMinRequiredVersion.js +0 -1
- package/lib/checkValidTargetFilters.js +0 -1
- package/lib/command.js +0 -1
- package/lib/commands/appdistribution-distribute.js +0 -1
- package/lib/commands/appdistribution-testers-add.js +0 -1
- package/lib/commands/appdistribution-testers-remove.js +0 -1
- package/lib/commands/apps-android-sha-create.js +0 -1
- package/lib/commands/apps-android-sha-delete.js +0 -1
- package/lib/commands/apps-android-sha-list.js +0 -1
- package/lib/commands/apps-create.js +0 -1
- package/lib/commands/apps-list.js +0 -1
- package/lib/commands/apps-sdkconfig.js +0 -1
- package/lib/commands/auth-export.js +0 -1
- package/lib/commands/auth-import.js +0 -1
- package/lib/commands/crashlytics-mappingfile-generateid.js +0 -1
- package/lib/commands/crashlytics-mappingfile-upload.js +0 -1
- package/lib/commands/crashlytics-symbols-upload.js +0 -1
- package/lib/commands/database-get.js +0 -1
- package/lib/commands/database-instances-create.js +0 -1
- package/lib/commands/database-instances-list.js +0 -1
- package/lib/commands/database-profile.js +0 -1
- package/lib/commands/database-push.js +0 -1
- package/lib/commands/database-remove.js +0 -1
- package/lib/commands/database-rules-canary.js +0 -1
- package/lib/commands/database-rules-get.js +0 -1
- package/lib/commands/database-rules-list.js +0 -1
- package/lib/commands/database-rules-release.js +0 -1
- package/lib/commands/database-rules-stage.js +0 -1
- package/lib/commands/database-set.js +0 -1
- package/lib/commands/database-settings-get.js +0 -1
- package/lib/commands/database-settings-set.js +0 -1
- package/lib/commands/database-update.js +0 -1
- package/lib/commands/deploy.js +3 -4
- package/lib/commands/emulators-exec.js +0 -1
- package/lib/commands/emulators-export.js +0 -1
- package/lib/commands/emulators-start.js +20 -17
- package/lib/commands/experimental-functions-shell.js +0 -1
- package/lib/commands/experiments-describe.js +0 -1
- package/lib/commands/experiments-disable.js +0 -1
- package/lib/commands/experiments-enable.js +0 -1
- package/lib/commands/experiments-list.js +0 -1
- package/lib/commands/ext-configure.js +0 -1
- package/lib/commands/ext-dev-deprecate.js +0 -1
- package/lib/commands/ext-dev-emulators-exec.js +0 -1
- package/lib/commands/ext-dev-emulators-start.js +0 -1
- package/lib/commands/ext-dev-extension-delete.js +0 -1
- package/lib/commands/ext-dev-init.js +0 -1
- package/lib/commands/ext-dev-list.js +0 -1
- package/lib/commands/ext-dev-publish.js +0 -1
- package/lib/commands/ext-dev-register.js +0 -1
- package/lib/commands/ext-dev-undeprecate.js +0 -1
- package/lib/commands/ext-dev-unpublish.js +0 -1
- package/lib/commands/ext-dev-usage.js +0 -1
- package/lib/commands/ext-export.js +0 -1
- package/lib/commands/ext-info.js +0 -1
- package/lib/commands/ext-install.js +0 -1
- package/lib/commands/ext-list.js +0 -1
- package/lib/commands/ext-sources-create.js +0 -1
- package/lib/commands/ext-uninstall.js +0 -1
- package/lib/commands/ext-update.js +0 -1
- package/lib/commands/ext.js +0 -1
- package/lib/commands/firestore-delete.js +0 -1
- package/lib/commands/firestore-indexes-list.js +0 -1
- package/lib/commands/functions-config-clone.js +0 -1
- package/lib/commands/functions-config-export.js +0 -1
- package/lib/commands/functions-config-get.js +0 -1
- package/lib/commands/functions-config-set.js +0 -1
- package/lib/commands/functions-config-unset.js +0 -1
- package/lib/commands/functions-delete.js +0 -1
- package/lib/commands/functions-deletegcfartifacts.js +0 -1
- package/lib/commands/functions-list.js +0 -1
- package/lib/commands/functions-log.js +0 -1
- package/lib/commands/functions-secrets-access.js +0 -1
- package/lib/commands/functions-secrets-destroy.js +0 -1
- package/lib/commands/functions-secrets-get.js +0 -1
- package/lib/commands/functions-secrets-prune.js +0 -1
- package/lib/commands/functions-secrets-set.js +0 -1
- package/lib/commands/functions-shell.js +0 -1
- package/lib/commands/help.js +0 -1
- package/lib/commands/hosting-channel-create.js +0 -1
- package/lib/commands/hosting-channel-delete.js +0 -1
- package/lib/commands/hosting-channel-deploy.js +0 -1
- package/lib/commands/hosting-channel-list.js +0 -1
- package/lib/commands/hosting-channel-open.js +0 -1
- package/lib/commands/hosting-clone.js +0 -1
- package/lib/commands/hosting-disable.js +0 -1
- package/lib/commands/hosting-sites-create.js +0 -1
- package/lib/commands/hosting-sites-delete.js +0 -1
- package/lib/commands/hosting-sites-get.js +0 -1
- package/lib/commands/hosting-sites-list.js +0 -1
- package/lib/commands/index.js +0 -1
- package/lib/commands/init.js +0 -1
- package/lib/commands/login-add.js +0 -1
- package/lib/commands/login-ci.js +0 -1
- package/lib/commands/login-list.js +0 -1
- package/lib/commands/login-use.js +0 -1
- package/lib/commands/login.js +0 -1
- package/lib/commands/logout.js +0 -1
- package/lib/commands/open.js +0 -1
- package/lib/commands/projects-addfirebase.js +0 -1
- package/lib/commands/projects-create.js +0 -1
- package/lib/commands/projects-list.js +0 -1
- package/lib/commands/remoteconfig-get.js +0 -1
- package/lib/commands/remoteconfig-rollback.js +0 -1
- package/lib/commands/remoteconfig-versions-list.js +0 -1
- package/lib/commands/serve.js +0 -1
- package/lib/commands/setup-emulators-database.js +0 -1
- package/lib/commands/setup-emulators-firestore.js +0 -1
- package/lib/commands/setup-emulators-pubsub.js +0 -1
- package/lib/commands/setup-emulators-storage.js +0 -1
- package/lib/commands/setup-emulators-ui.js +0 -1
- package/lib/commands/target-apply.js +0 -1
- package/lib/commands/target-clear.js +0 -1
- package/lib/commands/target-remove.js +0 -1
- package/lib/commands/target.js +0 -1
- package/lib/commands/use.js +0 -1
- package/lib/config.js +0 -1
- package/lib/configstore.js +0 -1
- package/lib/crashlytics/buildToolsJarHelper.js +0 -1
- package/lib/database/api.js +0 -1
- package/lib/database/listRemote.js +0 -1
- package/lib/database/metadata.js +0 -1
- package/lib/database/remove.js +0 -1
- package/lib/database/removeRemote.js +0 -1
- package/lib/database/rulesConfig.js +0 -1
- package/lib/database/settings.js +0 -1
- package/lib/defaultCredentials.js +0 -1
- package/lib/deploy/database/deploy.js +0 -1
- package/lib/deploy/database/index.js +0 -1
- package/lib/deploy/database/prepare.js +0 -1
- package/lib/deploy/database/release.js +0 -1
- package/lib/deploy/extensions/args.js +0 -1
- package/lib/deploy/extensions/deploy.js +0 -1
- package/lib/deploy/extensions/deploymentSummary.js +0 -1
- package/lib/deploy/extensions/errors.js +0 -1
- package/lib/deploy/extensions/index.js +0 -1
- package/lib/deploy/extensions/planner.js +0 -1
- package/lib/deploy/extensions/prepare.js +0 -1
- package/lib/deploy/extensions/release.js +0 -1
- package/lib/deploy/extensions/secrets.js +0 -1
- package/lib/deploy/extensions/tasks.js +0 -1
- package/lib/deploy/extensions/validate.js +0 -1
- package/lib/deploy/firestore/deploy.js +0 -1
- package/lib/deploy/firestore/index.js +0 -1
- package/lib/deploy/firestore/prepare.js +0 -1
- package/lib/deploy/firestore/release.js +0 -1
- package/lib/deploy/functions/args.js +0 -1
- package/lib/deploy/functions/backend.js +0 -1
- package/lib/deploy/functions/build.js +0 -1
- package/lib/deploy/functions/cache/applyHash.js +0 -1
- package/lib/deploy/functions/cache/hash.js +0 -1
- package/lib/deploy/functions/cel.js +0 -1
- package/lib/deploy/functions/checkIam.js +0 -1
- package/lib/deploy/functions/containerCleaner.js +0 -1
- package/lib/deploy/functions/deploy.js +0 -1
- package/lib/deploy/functions/ensure.js +0 -1
- package/lib/deploy/functions/ensureCloudBuildEnabled.js +0 -1
- package/lib/deploy/functions/functionsDeployHelper.js +0 -1
- package/lib/deploy/functions/index.js +0 -1
- package/lib/deploy/functions/params.js +9 -2
- package/lib/deploy/functions/prepare.js +0 -1
- package/lib/deploy/functions/prepareFunctionsUpload.js +0 -1
- package/lib/deploy/functions/pricing.js +0 -1
- package/lib/deploy/functions/prompts.js +0 -1
- package/lib/deploy/functions/release/executor.js +0 -1
- package/lib/deploy/functions/release/fabricator.js +1 -1
- package/lib/deploy/functions/release/index.js +0 -1
- package/lib/deploy/functions/release/planner.js +0 -1
- package/lib/deploy/functions/release/reporter.js +0 -1
- package/lib/deploy/functions/release/sourceTokenScraper.js +0 -1
- package/lib/deploy/functions/release/timer.js +0 -1
- package/lib/deploy/functions/runtimes/discovery/index.js +0 -1
- package/lib/deploy/functions/runtimes/discovery/mockDiscoveryServer.js +0 -1
- package/lib/deploy/functions/runtimes/discovery/parsing.js +0 -1
- package/lib/deploy/functions/runtimes/discovery/v1alpha1.js +0 -1
- package/lib/deploy/functions/runtimes/golang/gomod.js +0 -1
- package/lib/deploy/functions/runtimes/golang/index.js +0 -1
- package/lib/deploy/functions/runtimes/index.js +0 -1
- package/lib/deploy/functions/runtimes/node/extractTriggers.js +0 -1
- package/lib/deploy/functions/runtimes/node/index.js +0 -1
- package/lib/deploy/functions/runtimes/node/parseRuntimeAndValidateSDK.js +0 -1
- package/lib/deploy/functions/runtimes/node/parseTriggers.js +0 -1
- package/lib/deploy/functions/runtimes/node/triggerParser.js +0 -1
- package/lib/deploy/functions/runtimes/node/validate.js +0 -1
- package/lib/deploy/functions/runtimes/node/versioning.js +0 -1
- package/lib/deploy/functions/services/auth.js +0 -1
- package/lib/deploy/functions/services/database.js +0 -1
- package/lib/deploy/functions/services/firebaseAlerts.js +0 -1
- package/lib/deploy/functions/services/index.js +0 -1
- package/lib/deploy/functions/services/remoteConfig.js +0 -1
- package/lib/deploy/functions/services/storage.js +0 -1
- package/lib/deploy/functions/services/testLab.js +0 -1
- package/lib/deploy/functions/triggerRegionHelper.js +0 -1
- package/lib/deploy/functions/validate.js +0 -1
- package/lib/deploy/hosting/args.js +0 -1
- package/lib/deploy/hosting/context.js +0 -1
- package/lib/deploy/hosting/convertConfig.js +24 -7
- package/lib/deploy/hosting/deploy.js +5 -1
- package/lib/deploy/hosting/hashcache.js +0 -1
- package/lib/deploy/hosting/index.js +0 -1
- package/lib/deploy/hosting/prepare.js +0 -1
- package/lib/deploy/hosting/release.js +0 -1
- package/lib/deploy/hosting/uploader.js +0 -1
- package/lib/deploy/index.js +10 -1
- package/lib/deploy/lifecycleHooks.js +0 -1
- package/lib/deploy/remoteconfig/deploy.js +0 -1
- package/lib/deploy/remoteconfig/functions.js +0 -1
- package/lib/deploy/remoteconfig/index.js +0 -1
- package/lib/deploy/remoteconfig/prepare.js +0 -1
- package/lib/deploy/remoteconfig/release.js +0 -1
- package/lib/deploy/storage/deploy.js +0 -1
- package/lib/deploy/storage/index.js +0 -1
- package/lib/deploy/storage/prepare.js +0 -1
- package/lib/deploy/storage/release.js +0 -1
- package/lib/deploymentTool.js +0 -1
- package/lib/detectProjectRoot.js +0 -1
- package/lib/downloadUtils.js +0 -1
- package/lib/dynamicImport.js +10 -7
- package/lib/emulator/ExpressBasedEmulator.js +92 -0
- package/lib/emulator/adminSdkConfig.js +0 -1
- package/lib/emulator/auth/apiSpec.js +0 -1
- package/lib/emulator/auth/cloudFunctions.js +3 -13
- package/lib/emulator/auth/errors.js +0 -1
- package/lib/emulator/auth/handlers.js +0 -1
- package/lib/emulator/auth/index.js +10 -5
- package/lib/emulator/auth/operations.js +0 -1
- package/lib/emulator/auth/schema.js +0 -1
- package/lib/emulator/auth/server.js +15 -2
- package/lib/emulator/auth/state.js +0 -1
- package/lib/emulator/auth/types.js +0 -1
- package/lib/emulator/auth/utils.js +1 -2
- package/lib/emulator/auth/widget_ui.js +0 -1
- package/lib/emulator/commandUtils.js +21 -45
- package/lib/emulator/constants.js +2 -10
- package/lib/emulator/controller.js +135 -133
- package/lib/emulator/databaseEmulator.js +3 -9
- package/lib/emulator/dns.js +49 -0
- package/lib/emulator/download.js +0 -1
- package/lib/emulator/downloadableEmulators.js +19 -14
- package/lib/emulator/emulatorLogger.js +14 -8
- package/lib/emulator/env.js +35 -0
- package/lib/emulator/eventarcEmulator.js +2 -9
- package/lib/emulator/events/types.js +0 -1
- package/lib/emulator/extensions/postinstall.js +8 -9
- package/lib/emulator/extensions/validation.js +0 -1
- package/lib/emulator/extensionsEmulator.js +7 -8
- package/lib/emulator/firestoreEmulator.js +5 -12
- package/lib/emulator/functionsEmulator.js +24 -61
- package/lib/emulator/functionsEmulatorRuntime.js +0 -1
- package/lib/emulator/functionsEmulatorShared.js +5 -4
- package/lib/emulator/functionsEmulatorShell.js +1 -2
- package/lib/emulator/functionsEmulatorUtils.js +0 -1
- package/lib/emulator/functionsRuntimeWorker.js +0 -1
- package/lib/emulator/hostingEmulator.js +0 -1
- package/lib/emulator/hub.js +50 -59
- package/lib/emulator/hubClient.js +24 -11
- package/lib/emulator/hubExport.js +3 -12
- package/lib/emulator/loggingEmulator.js +0 -1
- package/lib/emulator/portUtils.js +208 -30
- package/lib/emulator/pubsubEmulator.js +11 -13
- package/lib/emulator/registry.js +11 -21
- package/lib/emulator/shared/request.js +0 -1
- package/lib/emulator/storage/apis/firebase.js +0 -1
- package/lib/emulator/storage/apis/gcloud.js +3 -7
- package/lib/emulator/storage/cloudFunctions.js +2 -8
- package/lib/emulator/storage/crc.js +0 -1
- package/lib/emulator/storage/errors.js +0 -1
- package/lib/emulator/storage/files.js +0 -1
- package/lib/emulator/storage/index.js +0 -1
- package/lib/emulator/storage/metadata.js +11 -6
- package/lib/emulator/storage/multipart.js +0 -1
- package/lib/emulator/storage/persistence.js +0 -1
- package/lib/emulator/storage/rules/config.js +0 -1
- package/lib/emulator/storage/rules/expressionValue.js +0 -1
- package/lib/emulator/storage/rules/manager.js +0 -1
- package/lib/emulator/storage/rules/runtime.js +1 -7
- package/lib/emulator/storage/rules/types.js +0 -1
- package/lib/emulator/storage/rules/utils.js +0 -1
- package/lib/emulator/storage/server.js +0 -1
- package/lib/emulator/storage/upload.js +0 -1
- package/lib/emulator/types.js +0 -1
- package/lib/emulator/ui.js +6 -8
- package/lib/emulator/workQueue.js +0 -1
- package/lib/ensureApiEnabled.js +0 -1
- package/lib/ensureCloudResourceLocation.js +0 -1
- package/lib/error.js +0 -1
- package/lib/errorOut.js +0 -1
- package/lib/experiments.js +10 -2
- package/lib/extensions/askUserForConsent.js +0 -1
- package/lib/extensions/askUserForEventsConfig.js +0 -1
- package/lib/extensions/askUserForParam.js +0 -1
- package/lib/extensions/billingMigrationHelper.js +0 -1
- package/lib/extensions/change-log.js +0 -1
- package/lib/extensions/checkProjectBilling.js +0 -1
- package/lib/extensions/diagnose.js +0 -1
- package/lib/extensions/displayExtensionInfo.js +43 -7
- package/lib/extensions/emulator/optionsHelper.js +0 -1
- package/lib/extensions/emulator/specHelper.js +0 -1
- package/lib/extensions/emulator/triggerHelper.js +0 -1
- package/lib/extensions/etags.js +0 -1
- package/lib/extensions/export.js +0 -1
- package/lib/extensions/extensionsApi.js +0 -1
- package/lib/extensions/extensionsHelper.js +0 -1
- package/lib/extensions/listExtensions.js +0 -1
- package/lib/extensions/localHelper.js +0 -1
- package/lib/extensions/manifest.js +0 -1
- package/lib/extensions/metricsTypeDef.js +0 -1
- package/lib/extensions/metricsUtils.js +0 -1
- package/lib/extensions/paramHelper.js +0 -1
- package/lib/extensions/provisioningHelper.js +0 -1
- package/lib/extensions/publishHelpers.js +0 -1
- package/lib/extensions/refs.js +0 -1
- package/lib/extensions/resolveSource.js +0 -1
- package/lib/extensions/secretsUtils.js +2 -2
- package/lib/extensions/types.js +0 -1
- package/lib/extensions/updateHelper.js +0 -1
- package/lib/extensions/utils.js +0 -1
- package/lib/extensions/versionHelper.js +0 -1
- package/lib/extensions/warnings.js +0 -1
- package/lib/fetchMOTD.js +0 -1
- package/lib/fetchWebSetup.js +0 -1
- package/lib/filterTargets.js +0 -1
- package/lib/firebaseConfig.js +0 -1
- package/lib/firebaseConfigValidate.js +0 -1
- package/lib/firestore/checkDatabaseType.js +0 -1
- package/lib/firestore/delete.js +0 -1
- package/lib/firestore/encodeFirestoreValue.js +0 -1
- package/lib/firestore/indexes-api.js +0 -1
- package/lib/firestore/indexes-sort.js +0 -1
- package/lib/firestore/indexes-spec.js +0 -1
- package/lib/firestore/indexes.js +0 -1
- package/lib/firestore/util.js +0 -1
- package/lib/firestore/validator.js +0 -1
- package/lib/frameworks/angular/index.js +1 -2
- package/lib/frameworks/express/index.js +1 -2
- package/lib/frameworks/index.js +33 -18
- package/lib/frameworks/lit/index.js +0 -1
- package/lib/frameworks/next/index.js +1 -2
- package/lib/frameworks/nuxt/index.js +1 -2
- package/lib/frameworks/preact/index.js +0 -1
- package/lib/frameworks/react/index.js +0 -1
- package/lib/frameworks/svelte/index.js +0 -1
- package/lib/frameworks/vite/index.js +1 -2
- package/lib/fsAsync.js +0 -1
- package/lib/fsutils.js +0 -1
- package/lib/functional.js +0 -1
- package/lib/functions/constants.js +0 -1
- package/lib/functions/ensureTargeted.js +21 -0
- package/lib/functions/env.js +33 -20
- package/lib/functions/events/index.js +0 -1
- package/lib/functions/events/v1.js +0 -1
- package/lib/functions/events/v2.js +0 -1
- package/lib/functions/functionslog.js +0 -1
- package/lib/functions/projectConfig.js +0 -1
- package/lib/functions/runtimeConfigExport.js +0 -1
- package/lib/functions/secrets.js +0 -1
- package/lib/functionsConfig.js +0 -1
- package/lib/functionsConfigClone.js +0 -1
- package/lib/functionsShellCommandAction.js +12 -6
- package/lib/gcp/artifactregistry.js +0 -1
- package/lib/gcp/auth.js +0 -1
- package/lib/gcp/cloudbilling.js +0 -1
- package/lib/gcp/cloudfunctions.js +0 -1
- package/lib/gcp/cloudfunctionsv2.js +0 -1
- package/lib/gcp/cloudlogging.js +0 -1
- package/lib/gcp/cloudmonitoring.js +0 -1
- package/lib/gcp/cloudscheduler.js +0 -1
- package/lib/gcp/cloudtasks.js +0 -1
- package/lib/gcp/docker.js +0 -1
- package/lib/gcp/firedata.js +0 -1
- package/lib/gcp/firestore.js +0 -1
- package/lib/gcp/iam.js +0 -1
- package/lib/gcp/identityPlatform.js +0 -1
- package/lib/gcp/index.js +0 -1
- package/lib/gcp/location.js +0 -1
- package/lib/gcp/proto.js +0 -1
- package/lib/gcp/pubsub.js +0 -1
- package/lib/gcp/resourceManager.js +0 -1
- package/lib/gcp/rules.js +0 -1
- package/lib/gcp/run.js +0 -2
- package/lib/gcp/runtimeconfig.js +0 -1
- package/lib/gcp/secretManager.js +0 -1
- package/lib/gcp/serviceusage.js +0 -1
- package/lib/gcp/storage.js +0 -1
- package/lib/getDefaultDatabaseInstance.js +0 -1
- package/lib/getDefaultHostingSite.js +0 -1
- package/lib/getProjectNumber.js +0 -1
- package/lib/handlePreviewToggles.js +2 -3
- package/lib/hosting/api.js +0 -1
- package/lib/hosting/cloudRunProxy.js +0 -1
- package/lib/hosting/config.js +4 -4
- package/lib/hosting/expireUtils.js +0 -1
- package/lib/hosting/functionsProxy.js +2 -4
- package/lib/hosting/implicitInit.js +2 -12
- package/lib/hosting/initMiddleware.js +0 -1
- package/lib/hosting/options.js +0 -1
- package/lib/hosting/proxy.js +0 -1
- package/lib/hosting/runTags.js +3 -5
- package/lib/index.js +0 -1
- package/lib/init/features/account.js +0 -1
- package/lib/init/features/database.js +0 -1
- package/lib/init/features/emulators.js +0 -1
- package/lib/init/features/firestore/index.js +0 -1
- package/lib/init/features/firestore/indexes.js +0 -1
- package/lib/init/features/firestore/rules.js +0 -1
- package/lib/init/features/functions/golang.js +0 -1
- package/lib/init/features/functions/index.js +0 -1
- package/lib/init/features/functions/javascript.js +0 -1
- package/lib/init/features/functions/npm-dependencies.js +0 -1
- package/lib/init/features/functions/typescript.js +0 -1
- package/lib/init/features/hosting/github.js +0 -1
- package/lib/init/features/hosting/index.js +0 -1
- package/lib/init/features/index.js +0 -1
- package/lib/init/features/project.js +0 -1
- package/lib/init/features/remoteconfig.js +0 -1
- package/lib/init/features/storage.js +0 -1
- package/lib/init/index.js +0 -1
- package/lib/listFiles.js +0 -1
- package/lib/loadCJSON.js +0 -1
- package/lib/localFunction.js +0 -1
- package/lib/logError.js +0 -1
- package/lib/logger.js +0 -1
- package/lib/management/apps.js +0 -1
- package/lib/management/database.js +0 -1
- package/lib/management/projects.js +0 -1
- package/lib/metaprogramming.js +0 -1
- package/lib/operation-poller.js +0 -1
- package/lib/options.js +0 -1
- package/lib/parseBoltRules.js +0 -1
- package/lib/profileReport.js +0 -1
- package/lib/profiler.js +0 -1
- package/lib/projectPath.js +0 -1
- package/lib/projectUtils.js +0 -1
- package/lib/prompt.js +0 -1
- package/lib/rc.js +0 -1
- package/lib/remoteconfig/get.js +0 -1
- package/lib/remoteconfig/interfaces.js +0 -1
- package/lib/remoteconfig/rollback.js +0 -1
- package/lib/remoteconfig/versionslist.js +0 -1
- package/lib/requireAuth.js +0 -1
- package/lib/requireConfig.js +0 -1
- package/lib/requireDatabaseInstance.js +0 -1
- package/lib/requireHostingSite.js +0 -1
- package/lib/requireInteractive.js +0 -1
- package/lib/requirePermissions.js +0 -1
- package/lib/responseToError.js +0 -1
- package/lib/rtdb.js +0 -1
- package/lib/rulesDeploy.js +0 -1
- package/lib/scopes.js +0 -1
- package/lib/serve/functions.js +8 -11
- package/lib/serve/hosting.js +10 -5
- package/lib/serve/index.js +2 -3
- package/lib/shortenUrl.js +0 -1
- package/lib/throttler/errors/retries-exhausted-error.js +0 -1
- package/lib/throttler/errors/task-error.js +0 -1
- package/lib/throttler/errors/timeout-error.js +0 -1
- package/lib/throttler/queue.js +0 -1
- package/lib/throttler/stack.js +0 -1
- package/lib/throttler/throttler.js +0 -1
- package/lib/track.js +0 -1
- package/lib/utils.js +14 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/templates/hosting/init.js +3 -2
- package/lib/accountExporter.js.map +0 -1
- package/lib/accountImporter.js.map +0 -1
- package/lib/api.js.map +0 -1
- package/lib/apiv2.js.map +0 -1
- package/lib/appdistribution/client.js.map +0 -1
- package/lib/appdistribution/distribution.js.map +0 -1
- package/lib/appdistribution/options-parser-util.js.map +0 -1
- package/lib/archiveDirectory.js.map +0 -1
- package/lib/auth.js.map +0 -1
- package/lib/bin/firebase.js.map +0 -1
- package/lib/checkMinRequiredVersion.js.map +0 -1
- package/lib/checkValidTargetFilters.js.map +0 -1
- package/lib/command.js.map +0 -1
- package/lib/commands/appdistribution-distribute.js.map +0 -1
- package/lib/commands/appdistribution-testers-add.js.map +0 -1
- package/lib/commands/appdistribution-testers-remove.js.map +0 -1
- package/lib/commands/apps-android-sha-create.js.map +0 -1
- package/lib/commands/apps-android-sha-delete.js.map +0 -1
- package/lib/commands/apps-android-sha-list.js.map +0 -1
- package/lib/commands/apps-create.js.map +0 -1
- package/lib/commands/apps-list.js.map +0 -1
- package/lib/commands/apps-sdkconfig.js.map +0 -1
- package/lib/commands/auth-export.js.map +0 -1
- package/lib/commands/auth-import.js.map +0 -1
- package/lib/commands/crashlytics-mappingfile-generateid.js.map +0 -1
- package/lib/commands/crashlytics-mappingfile-upload.js.map +0 -1
- package/lib/commands/crashlytics-symbols-upload.js.map +0 -1
- package/lib/commands/database-get.js.map +0 -1
- package/lib/commands/database-instances-create.js.map +0 -1
- package/lib/commands/database-instances-list.js.map +0 -1
- package/lib/commands/database-profile.js.map +0 -1
- package/lib/commands/database-push.js.map +0 -1
- package/lib/commands/database-remove.js.map +0 -1
- package/lib/commands/database-rules-canary.js.map +0 -1
- package/lib/commands/database-rules-get.js.map +0 -1
- package/lib/commands/database-rules-list.js.map +0 -1
- package/lib/commands/database-rules-release.js.map +0 -1
- package/lib/commands/database-rules-stage.js.map +0 -1
- package/lib/commands/database-set.js.map +0 -1
- package/lib/commands/database-settings-get.js.map +0 -1
- package/lib/commands/database-settings-set.js.map +0 -1
- package/lib/commands/database-update.js.map +0 -1
- package/lib/commands/deploy.js.map +0 -1
- package/lib/commands/emulators-exec.js.map +0 -1
- package/lib/commands/emulators-export.js.map +0 -1
- package/lib/commands/emulators-start.js.map +0 -1
- package/lib/commands/experimental-functions-shell.js.map +0 -1
- package/lib/commands/experiments-describe.js.map +0 -1
- package/lib/commands/experiments-disable.js.map +0 -1
- package/lib/commands/experiments-enable.js.map +0 -1
- package/lib/commands/experiments-list.js.map +0 -1
- package/lib/commands/ext-configure.js.map +0 -1
- package/lib/commands/ext-dev-deprecate.js.map +0 -1
- package/lib/commands/ext-dev-emulators-exec.js.map +0 -1
- package/lib/commands/ext-dev-emulators-start.js.map +0 -1
- package/lib/commands/ext-dev-extension-delete.js.map +0 -1
- package/lib/commands/ext-dev-init.js.map +0 -1
- package/lib/commands/ext-dev-list.js.map +0 -1
- package/lib/commands/ext-dev-publish.js.map +0 -1
- package/lib/commands/ext-dev-register.js.map +0 -1
- package/lib/commands/ext-dev-undeprecate.js.map +0 -1
- package/lib/commands/ext-dev-unpublish.js.map +0 -1
- package/lib/commands/ext-dev-usage.js.map +0 -1
- package/lib/commands/ext-export.js.map +0 -1
- package/lib/commands/ext-info.js.map +0 -1
- package/lib/commands/ext-install.js.map +0 -1
- package/lib/commands/ext-list.js.map +0 -1
- package/lib/commands/ext-sources-create.js.map +0 -1
- package/lib/commands/ext-uninstall.js.map +0 -1
- package/lib/commands/ext-update.js.map +0 -1
- package/lib/commands/ext.js.map +0 -1
- package/lib/commands/firestore-delete.js.map +0 -1
- package/lib/commands/firestore-indexes-list.js.map +0 -1
- package/lib/commands/functions-config-clone.js.map +0 -1
- package/lib/commands/functions-config-export.js.map +0 -1
- package/lib/commands/functions-config-get.js.map +0 -1
- package/lib/commands/functions-config-set.js.map +0 -1
- package/lib/commands/functions-config-unset.js.map +0 -1
- package/lib/commands/functions-delete.js.map +0 -1
- package/lib/commands/functions-deletegcfartifacts.js.map +0 -1
- package/lib/commands/functions-list.js.map +0 -1
- package/lib/commands/functions-log.js.map +0 -1
- package/lib/commands/functions-secrets-access.js.map +0 -1
- package/lib/commands/functions-secrets-destroy.js.map +0 -1
- package/lib/commands/functions-secrets-get.js.map +0 -1
- package/lib/commands/functions-secrets-prune.js.map +0 -1
- package/lib/commands/functions-secrets-set.js.map +0 -1
- package/lib/commands/functions-shell.js.map +0 -1
- package/lib/commands/help.js.map +0 -1
- package/lib/commands/hosting-channel-create.js.map +0 -1
- package/lib/commands/hosting-channel-delete.js.map +0 -1
- package/lib/commands/hosting-channel-deploy.js.map +0 -1
- package/lib/commands/hosting-channel-list.js.map +0 -1
- package/lib/commands/hosting-channel-open.js.map +0 -1
- package/lib/commands/hosting-clone.js.map +0 -1
- package/lib/commands/hosting-disable.js.map +0 -1
- package/lib/commands/hosting-sites-create.js.map +0 -1
- package/lib/commands/hosting-sites-delete.js.map +0 -1
- package/lib/commands/hosting-sites-get.js.map +0 -1
- package/lib/commands/hosting-sites-list.js.map +0 -1
- package/lib/commands/index.js.map +0 -1
- package/lib/commands/init.js.map +0 -1
- package/lib/commands/login-add.js.map +0 -1
- package/lib/commands/login-ci.js.map +0 -1
- package/lib/commands/login-list.js.map +0 -1
- package/lib/commands/login-use.js.map +0 -1
- package/lib/commands/login.js.map +0 -1
- package/lib/commands/logout.js.map +0 -1
- package/lib/commands/open.js.map +0 -1
- package/lib/commands/projects-addfirebase.js.map +0 -1
- package/lib/commands/projects-create.js.map +0 -1
- package/lib/commands/projects-list.js.map +0 -1
- package/lib/commands/remoteconfig-get.js.map +0 -1
- package/lib/commands/remoteconfig-rollback.js.map +0 -1
- package/lib/commands/remoteconfig-versions-list.js.map +0 -1
- package/lib/commands/serve.js.map +0 -1
- package/lib/commands/setup-emulators-database.js.map +0 -1
- package/lib/commands/setup-emulators-firestore.js.map +0 -1
- package/lib/commands/setup-emulators-pubsub.js.map +0 -1
- package/lib/commands/setup-emulators-storage.js.map +0 -1
- package/lib/commands/setup-emulators-ui.js.map +0 -1
- package/lib/commands/target-apply.js.map +0 -1
- package/lib/commands/target-clear.js.map +0 -1
- package/lib/commands/target-remove.js.map +0 -1
- package/lib/commands/target.js.map +0 -1
- package/lib/commands/use.js.map +0 -1
- package/lib/config.js.map +0 -1
- package/lib/configstore.js.map +0 -1
- package/lib/crashlytics/buildToolsJarHelper.js.map +0 -1
- package/lib/database/api.js.map +0 -1
- package/lib/database/listRemote.js.map +0 -1
- package/lib/database/metadata.js.map +0 -1
- package/lib/database/remove.js.map +0 -1
- package/lib/database/removeRemote.js.map +0 -1
- package/lib/database/rulesConfig.js.map +0 -1
- package/lib/database/settings.js.map +0 -1
- package/lib/defaultCredentials.js.map +0 -1
- package/lib/deploy/database/deploy.js.map +0 -1
- package/lib/deploy/database/index.js.map +0 -1
- package/lib/deploy/database/prepare.js.map +0 -1
- package/lib/deploy/database/release.js.map +0 -1
- package/lib/deploy/extensions/args.js.map +0 -1
- package/lib/deploy/extensions/deploy.js.map +0 -1
- package/lib/deploy/extensions/deploymentSummary.js.map +0 -1
- package/lib/deploy/extensions/errors.js.map +0 -1
- package/lib/deploy/extensions/index.js.map +0 -1
- package/lib/deploy/extensions/planner.js.map +0 -1
- package/lib/deploy/extensions/prepare.js.map +0 -1
- package/lib/deploy/extensions/release.js.map +0 -1
- package/lib/deploy/extensions/secrets.js.map +0 -1
- package/lib/deploy/extensions/tasks.js.map +0 -1
- package/lib/deploy/extensions/validate.js.map +0 -1
- package/lib/deploy/firestore/deploy.js.map +0 -1
- package/lib/deploy/firestore/index.js.map +0 -1
- package/lib/deploy/firestore/prepare.js.map +0 -1
- package/lib/deploy/firestore/release.js.map +0 -1
- package/lib/deploy/functions/args.js.map +0 -1
- package/lib/deploy/functions/backend.js.map +0 -1
- package/lib/deploy/functions/build.js.map +0 -1
- package/lib/deploy/functions/cache/applyHash.js.map +0 -1
- package/lib/deploy/functions/cache/hash.js.map +0 -1
- package/lib/deploy/functions/cel.js.map +0 -1
- package/lib/deploy/functions/checkIam.js.map +0 -1
- package/lib/deploy/functions/containerCleaner.js.map +0 -1
- package/lib/deploy/functions/deploy.js.map +0 -1
- package/lib/deploy/functions/ensure.js.map +0 -1
- package/lib/deploy/functions/ensureCloudBuildEnabled.js.map +0 -1
- package/lib/deploy/functions/functionsDeployHelper.js.map +0 -1
- package/lib/deploy/functions/index.js.map +0 -1
- package/lib/deploy/functions/params.js.map +0 -1
- package/lib/deploy/functions/prepare.js.map +0 -1
- package/lib/deploy/functions/prepareFunctionsUpload.js.map +0 -1
- package/lib/deploy/functions/pricing.js.map +0 -1
- package/lib/deploy/functions/prompts.js.map +0 -1
- package/lib/deploy/functions/release/executor.js.map +0 -1
- package/lib/deploy/functions/release/fabricator.js.map +0 -1
- package/lib/deploy/functions/release/index.js.map +0 -1
- package/lib/deploy/functions/release/planner.js.map +0 -1
- package/lib/deploy/functions/release/reporter.js.map +0 -1
- package/lib/deploy/functions/release/sourceTokenScraper.js.map +0 -1
- package/lib/deploy/functions/release/timer.js.map +0 -1
- package/lib/deploy/functions/runtimes/discovery/index.js.map +0 -1
- package/lib/deploy/functions/runtimes/discovery/mockDiscoveryServer.js.map +0 -1
- package/lib/deploy/functions/runtimes/discovery/parsing.js.map +0 -1
- package/lib/deploy/functions/runtimes/discovery/v1alpha1.js.map +0 -1
- package/lib/deploy/functions/runtimes/golang/gomod.js.map +0 -1
- package/lib/deploy/functions/runtimes/golang/index.js.map +0 -1
- package/lib/deploy/functions/runtimes/index.js.map +0 -1
- package/lib/deploy/functions/runtimes/node/extractTriggers.js.map +0 -1
- package/lib/deploy/functions/runtimes/node/index.js.map +0 -1
- package/lib/deploy/functions/runtimes/node/parseRuntimeAndValidateSDK.js.map +0 -1
- package/lib/deploy/functions/runtimes/node/parseTriggers.js.map +0 -1
- package/lib/deploy/functions/runtimes/node/triggerParser.js.map +0 -1
- package/lib/deploy/functions/runtimes/node/validate.js.map +0 -1
- package/lib/deploy/functions/runtimes/node/versioning.js.map +0 -1
- package/lib/deploy/functions/services/auth.js.map +0 -1
- package/lib/deploy/functions/services/database.js.map +0 -1
- package/lib/deploy/functions/services/firebaseAlerts.js.map +0 -1
- package/lib/deploy/functions/services/index.js.map +0 -1
- package/lib/deploy/functions/services/remoteConfig.js.map +0 -1
- package/lib/deploy/functions/services/storage.js.map +0 -1
- package/lib/deploy/functions/services/testLab.js.map +0 -1
- package/lib/deploy/functions/triggerRegionHelper.js.map +0 -1
- package/lib/deploy/functions/validate.js.map +0 -1
- package/lib/deploy/hosting/args.js.map +0 -1
- package/lib/deploy/hosting/context.js.map +0 -1
- package/lib/deploy/hosting/convertConfig.js.map +0 -1
- package/lib/deploy/hosting/deploy.js.map +0 -1
- package/lib/deploy/hosting/hashcache.js.map +0 -1
- package/lib/deploy/hosting/index.js.map +0 -1
- package/lib/deploy/hosting/prepare.js.map +0 -1
- package/lib/deploy/hosting/release.js.map +0 -1
- package/lib/deploy/hosting/uploader.js.map +0 -1
- package/lib/deploy/index.js.map +0 -1
- package/lib/deploy/lifecycleHooks.js.map +0 -1
- package/lib/deploy/remoteconfig/deploy.js.map +0 -1
- package/lib/deploy/remoteconfig/functions.js.map +0 -1
- package/lib/deploy/remoteconfig/index.js.map +0 -1
- package/lib/deploy/remoteconfig/prepare.js.map +0 -1
- package/lib/deploy/remoteconfig/release.js.map +0 -1
- package/lib/deploy/storage/deploy.js.map +0 -1
- package/lib/deploy/storage/index.js.map +0 -1
- package/lib/deploy/storage/prepare.js.map +0 -1
- package/lib/deploy/storage/release.js.map +0 -1
- package/lib/deploymentTool.js.map +0 -1
- package/lib/detectProjectRoot.js.map +0 -1
- package/lib/downloadUtils.js.map +0 -1
- package/lib/emulator/adminSdkConfig.js.map +0 -1
- package/lib/emulator/auth/apiSpec.js.map +0 -1
- package/lib/emulator/auth/cloudFunctions.js.map +0 -1
- package/lib/emulator/auth/errors.js.map +0 -1
- package/lib/emulator/auth/handlers.js.map +0 -1
- package/lib/emulator/auth/index.js.map +0 -1
- package/lib/emulator/auth/operations.js.map +0 -1
- package/lib/emulator/auth/schema.js.map +0 -1
- package/lib/emulator/auth/server.js.map +0 -1
- package/lib/emulator/auth/state.js.map +0 -1
- package/lib/emulator/auth/types.js.map +0 -1
- package/lib/emulator/auth/utils.js.map +0 -1
- package/lib/emulator/auth/widget_ui.js.map +0 -1
- package/lib/emulator/commandUtils.js.map +0 -1
- package/lib/emulator/constants.js.map +0 -1
- package/lib/emulator/controller.js.map +0 -1
- package/lib/emulator/databaseEmulator.js.map +0 -1
- package/lib/emulator/download.js.map +0 -1
- package/lib/emulator/downloadableEmulators.js.map +0 -1
- package/lib/emulator/emulatorLogger.js.map +0 -1
- package/lib/emulator/emulatorServer.js +0 -30
- package/lib/emulator/emulatorServer.js.map +0 -1
- package/lib/emulator/eventarcEmulator.js.map +0 -1
- package/lib/emulator/events/types.js.map +0 -1
- package/lib/emulator/extensions/postinstall.js.map +0 -1
- package/lib/emulator/extensions/validation.js.map +0 -1
- package/lib/emulator/extensionsEmulator.js.map +0 -1
- package/lib/emulator/firestoreEmulator.js.map +0 -1
- package/lib/emulator/functionsEmulator.js.map +0 -1
- package/lib/emulator/functionsEmulatorRuntime.js.map +0 -1
- package/lib/emulator/functionsEmulatorShared.js.map +0 -1
- package/lib/emulator/functionsEmulatorShell.js.map +0 -1
- package/lib/emulator/functionsEmulatorUtils.js.map +0 -1
- package/lib/emulator/functionsRuntimeWorker.js.map +0 -1
- package/lib/emulator/hostingEmulator.js.map +0 -1
- package/lib/emulator/hub.js.map +0 -1
- package/lib/emulator/hubClient.js.map +0 -1
- package/lib/emulator/hubExport.js.map +0 -1
- package/lib/emulator/loggingEmulator.js.map +0 -1
- package/lib/emulator/portUtils.js.map +0 -1
- package/lib/emulator/pubsubEmulator.js.map +0 -1
- package/lib/emulator/registry.js.map +0 -1
- package/lib/emulator/shared/request.js.map +0 -1
- package/lib/emulator/storage/apis/firebase.js.map +0 -1
- package/lib/emulator/storage/apis/gcloud.js.map +0 -1
- package/lib/emulator/storage/cloudFunctions.js.map +0 -1
- package/lib/emulator/storage/crc.js.map +0 -1
- package/lib/emulator/storage/errors.js.map +0 -1
- package/lib/emulator/storage/files.js.map +0 -1
- package/lib/emulator/storage/index.js.map +0 -1
- package/lib/emulator/storage/metadata.js.map +0 -1
- package/lib/emulator/storage/multipart.js.map +0 -1
- package/lib/emulator/storage/persistence.js.map +0 -1
- package/lib/emulator/storage/rules/config.js.map +0 -1
- package/lib/emulator/storage/rules/expressionValue.js.map +0 -1
- package/lib/emulator/storage/rules/manager.js.map +0 -1
- package/lib/emulator/storage/rules/runtime.js.map +0 -1
- package/lib/emulator/storage/rules/types.js.map +0 -1
- package/lib/emulator/storage/rules/utils.js.map +0 -1
- package/lib/emulator/storage/server.js.map +0 -1
- package/lib/emulator/storage/upload.js.map +0 -1
- package/lib/emulator/types.js.map +0 -1
- package/lib/emulator/ui.js.map +0 -1
- package/lib/emulator/workQueue.js.map +0 -1
- package/lib/ensureApiEnabled.js.map +0 -1
- package/lib/ensureCloudResourceLocation.js.map +0 -1
- package/lib/error.js.map +0 -1
- package/lib/errorOut.js.map +0 -1
- package/lib/experiments.js.map +0 -1
- package/lib/extensions/askUserForConsent.js.map +0 -1
- package/lib/extensions/askUserForEventsConfig.js.map +0 -1
- package/lib/extensions/askUserForParam.js.map +0 -1
- package/lib/extensions/billingMigrationHelper.js.map +0 -1
- package/lib/extensions/change-log.js.map +0 -1
- package/lib/extensions/checkProjectBilling.js.map +0 -1
- package/lib/extensions/diagnose.js.map +0 -1
- package/lib/extensions/displayExtensionInfo.js.map +0 -1
- package/lib/extensions/emulator/optionsHelper.js.map +0 -1
- package/lib/extensions/emulator/specHelper.js.map +0 -1
- package/lib/extensions/emulator/triggerHelper.js.map +0 -1
- package/lib/extensions/etags.js.map +0 -1
- package/lib/extensions/export.js.map +0 -1
- package/lib/extensions/extensionsApi.js.map +0 -1
- package/lib/extensions/extensionsHelper.js.map +0 -1
- package/lib/extensions/listExtensions.js.map +0 -1
- package/lib/extensions/localHelper.js.map +0 -1
- package/lib/extensions/manifest.js.map +0 -1
- package/lib/extensions/metricsTypeDef.js.map +0 -1
- package/lib/extensions/metricsUtils.js.map +0 -1
- package/lib/extensions/paramHelper.js.map +0 -1
- package/lib/extensions/provisioningHelper.js.map +0 -1
- package/lib/extensions/publishHelpers.js.map +0 -1
- package/lib/extensions/refs.js.map +0 -1
- package/lib/extensions/resolveSource.js.map +0 -1
- package/lib/extensions/secretsUtils.js.map +0 -1
- package/lib/extensions/types.js.map +0 -1
- package/lib/extensions/updateHelper.js.map +0 -1
- package/lib/extensions/utils.js.map +0 -1
- package/lib/extensions/versionHelper.js.map +0 -1
- package/lib/extensions/warnings.js.map +0 -1
- package/lib/fetchMOTD.js.map +0 -1
- package/lib/fetchWebSetup.js.map +0 -1
- package/lib/filterTargets.js.map +0 -1
- package/lib/firebaseConfig.js.map +0 -1
- package/lib/firebaseConfigValidate.js.map +0 -1
- package/lib/firestore/checkDatabaseType.js.map +0 -1
- package/lib/firestore/delete.js.map +0 -1
- package/lib/firestore/encodeFirestoreValue.js.map +0 -1
- package/lib/firestore/indexes-api.js.map +0 -1
- package/lib/firestore/indexes-sort.js.map +0 -1
- package/lib/firestore/indexes-spec.js.map +0 -1
- package/lib/firestore/indexes.js.map +0 -1
- package/lib/firestore/util.js.map +0 -1
- package/lib/firestore/validator.js.map +0 -1
- package/lib/frameworks/angular/index.js.map +0 -1
- package/lib/frameworks/express/index.js.map +0 -1
- package/lib/frameworks/index.js.map +0 -1
- package/lib/frameworks/lit/index.js.map +0 -1
- package/lib/frameworks/next/index.js.map +0 -1
- package/lib/frameworks/nuxt/index.js.map +0 -1
- package/lib/frameworks/preact/index.js.map +0 -1
- package/lib/frameworks/react/index.js.map +0 -1
- package/lib/frameworks/svelte/index.js.map +0 -1
- package/lib/frameworks/vite/index.js.map +0 -1
- package/lib/fsAsync.js.map +0 -1
- package/lib/fsutils.js.map +0 -1
- package/lib/functional.js.map +0 -1
- package/lib/functions/constants.js.map +0 -1
- package/lib/functions/env.js.map +0 -1
- package/lib/functions/events/index.js.map +0 -1
- package/lib/functions/events/v1.js.map +0 -1
- package/lib/functions/events/v2.js.map +0 -1
- package/lib/functions/functionslog.js.map +0 -1
- package/lib/functions/projectConfig.js.map +0 -1
- package/lib/functions/runtimeConfigExport.js.map +0 -1
- package/lib/functions/secrets.js.map +0 -1
- package/lib/functionsConfig.js.map +0 -1
- package/lib/functionsConfigClone.js.map +0 -1
- package/lib/functionsShellCommandAction.js.map +0 -1
- package/lib/gcp/artifactregistry.js.map +0 -1
- package/lib/gcp/auth.js.map +0 -1
- package/lib/gcp/cloudbilling.js.map +0 -1
- package/lib/gcp/cloudfunctions.js.map +0 -1
- package/lib/gcp/cloudfunctionsv2.js.map +0 -1
- package/lib/gcp/cloudlogging.js.map +0 -1
- package/lib/gcp/cloudmonitoring.js.map +0 -1
- package/lib/gcp/cloudscheduler.js.map +0 -1
- package/lib/gcp/cloudtasks.js.map +0 -1
- package/lib/gcp/docker.js.map +0 -1
- package/lib/gcp/firedata.js.map +0 -1
- package/lib/gcp/firestore.js.map +0 -1
- package/lib/gcp/iam.js.map +0 -1
- package/lib/gcp/identityPlatform.js.map +0 -1
- package/lib/gcp/index.js.map +0 -1
- package/lib/gcp/location.js.map +0 -1
- package/lib/gcp/proto.js.map +0 -1
- package/lib/gcp/pubsub.js.map +0 -1
- package/lib/gcp/resourceManager.js.map +0 -1
- package/lib/gcp/rules.js.map +0 -1
- package/lib/gcp/run.js.map +0 -1
- package/lib/gcp/runtimeconfig.js.map +0 -1
- package/lib/gcp/secretManager.js.map +0 -1
- package/lib/gcp/serviceusage.js.map +0 -1
- package/lib/gcp/storage.js.map +0 -1
- package/lib/getDefaultDatabaseInstance.js.map +0 -1
- package/lib/getDefaultHostingSite.js.map +0 -1
- package/lib/getProjectNumber.js.map +0 -1
- package/lib/handlePreviewToggles.js.map +0 -1
- package/lib/hosting/api.js.map +0 -1
- package/lib/hosting/cloudRunProxy.js.map +0 -1
- package/lib/hosting/config.js.map +0 -1
- package/lib/hosting/expireUtils.js.map +0 -1
- package/lib/hosting/functionsProxy.js.map +0 -1
- package/lib/hosting/implicitInit.js.map +0 -1
- package/lib/hosting/initMiddleware.js.map +0 -1
- package/lib/hosting/options.js.map +0 -1
- package/lib/hosting/proxy.js.map +0 -1
- package/lib/hosting/runTags.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/init/features/account.js.map +0 -1
- package/lib/init/features/database.js.map +0 -1
- package/lib/init/features/emulators.js.map +0 -1
- package/lib/init/features/firestore/index.js.map +0 -1
- package/lib/init/features/firestore/indexes.js.map +0 -1
- package/lib/init/features/firestore/rules.js.map +0 -1
- package/lib/init/features/functions/golang.js.map +0 -1
- package/lib/init/features/functions/index.js.map +0 -1
- package/lib/init/features/functions/javascript.js.map +0 -1
- package/lib/init/features/functions/npm-dependencies.js.map +0 -1
- package/lib/init/features/functions/typescript.js.map +0 -1
- package/lib/init/features/hosting/github.js.map +0 -1
- package/lib/init/features/hosting/index.js.map +0 -1
- package/lib/init/features/index.js.map +0 -1
- package/lib/init/features/project.js.map +0 -1
- package/lib/init/features/remoteconfig.js.map +0 -1
- package/lib/init/features/storage.js.map +0 -1
- package/lib/init/index.js.map +0 -1
- package/lib/listFiles.js.map +0 -1
- package/lib/loadCJSON.js.map +0 -1
- package/lib/localFunction.js.map +0 -1
- package/lib/logError.js.map +0 -1
- package/lib/logger.js.map +0 -1
- package/lib/management/apps.js.map +0 -1
- package/lib/management/database.js.map +0 -1
- package/lib/management/projects.js.map +0 -1
- package/lib/metaprogramming.js.map +0 -1
- package/lib/operation-poller.js.map +0 -1
- package/lib/options.js.map +0 -1
- package/lib/parseBoltRules.js.map +0 -1
- package/lib/profileReport.js.map +0 -1
- package/lib/profiler.js.map +0 -1
- package/lib/projectPath.js.map +0 -1
- package/lib/projectUtils.js.map +0 -1
- package/lib/prompt.js.map +0 -1
- package/lib/rc.js.map +0 -1
- package/lib/remoteconfig/get.js.map +0 -1
- package/lib/remoteconfig/interfaces.js.map +0 -1
- package/lib/remoteconfig/rollback.js.map +0 -1
- package/lib/remoteconfig/versionslist.js.map +0 -1
- package/lib/requireAuth.js.map +0 -1
- package/lib/requireConfig.js.map +0 -1
- package/lib/requireDatabaseInstance.js.map +0 -1
- package/lib/requireHostingSite.js.map +0 -1
- package/lib/requireInteractive.js.map +0 -1
- package/lib/requirePermissions.js.map +0 -1
- package/lib/responseToError.js.map +0 -1
- package/lib/rtdb.js.map +0 -1
- package/lib/rulesDeploy.js.map +0 -1
- package/lib/scopes.js.map +0 -1
- package/lib/serve/functions.js.map +0 -1
- package/lib/serve/hosting.js.map +0 -1
- package/lib/serve/index.js.map +0 -1
- package/lib/shortenUrl.js.map +0 -1
- package/lib/throttler/errors/retries-exhausted-error.js.map +0 -1
- package/lib/throttler/errors/task-error.js.map +0 -1
- package/lib/throttler/errors/timeout-error.js.map +0 -1
- package/lib/throttler/queue.js.map +0 -1
- package/lib/throttler/stack.js.map +0 -1
- package/lib/throttler/throttler.js.map +0 -1
- package/lib/track.js.map +0 -1
- package/lib/utils.js.map +0 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setEnvVarsForEmulators = void 0;
|
|
4
|
+
const constants_1 = require("./constants");
|
|
5
|
+
const types_1 = require("./types");
|
|
6
|
+
const registry_1 = require("./registry");
|
|
7
|
+
function setEnvVarsForEmulators(env) {
|
|
8
|
+
if (registry_1.EmulatorRegistry.isRunning(types_1.Emulators.DATABASE)) {
|
|
9
|
+
env[constants_1.Constants.FIREBASE_DATABASE_EMULATOR_HOST] = registry_1.EmulatorRegistry.url(types_1.Emulators.DATABASE).host;
|
|
10
|
+
}
|
|
11
|
+
if (registry_1.EmulatorRegistry.isRunning(types_1.Emulators.FIRESTORE)) {
|
|
12
|
+
const { host } = registry_1.EmulatorRegistry.url(types_1.Emulators.FIRESTORE);
|
|
13
|
+
env[constants_1.Constants.FIRESTORE_EMULATOR_HOST] = host;
|
|
14
|
+
env[constants_1.Constants.FIRESTORE_EMULATOR_ENV_ALT] = host;
|
|
15
|
+
}
|
|
16
|
+
if (registry_1.EmulatorRegistry.isRunning(types_1.Emulators.STORAGE)) {
|
|
17
|
+
const { host } = registry_1.EmulatorRegistry.url(types_1.Emulators.STORAGE);
|
|
18
|
+
env[constants_1.Constants.FIREBASE_STORAGE_EMULATOR_HOST] = host;
|
|
19
|
+
env[constants_1.Constants.CLOUD_STORAGE_EMULATOR_HOST] = `http://${host}`;
|
|
20
|
+
}
|
|
21
|
+
if (registry_1.EmulatorRegistry.isRunning(types_1.Emulators.AUTH)) {
|
|
22
|
+
env[constants_1.Constants.FIREBASE_AUTH_EMULATOR_HOST] = registry_1.EmulatorRegistry.url(types_1.Emulators.AUTH).host;
|
|
23
|
+
}
|
|
24
|
+
if (registry_1.EmulatorRegistry.isRunning(types_1.Emulators.HUB)) {
|
|
25
|
+
env[constants_1.Constants.FIREBASE_EMULATOR_HUB] = registry_1.EmulatorRegistry.url(types_1.Emulators.HUB).host;
|
|
26
|
+
}
|
|
27
|
+
const pubsubEmulator = registry_1.EmulatorRegistry.isRunning(types_1.Emulators.PUBSUB);
|
|
28
|
+
if (pubsubEmulator) {
|
|
29
|
+
env[constants_1.Constants.PUBSUB_EMULATOR_HOST] = registry_1.EmulatorRegistry.url(types_1.Emulators.PUBSUB).host;
|
|
30
|
+
}
|
|
31
|
+
if (registry_1.EmulatorRegistry.isRunning(types_1.Emulators.EVENTARC)) {
|
|
32
|
+
env[constants_1.Constants.CLOUD_EVENTARC_EMULATOR_HOST] = `http://${registry_1.EmulatorRegistry.url(types_1.Emulators.EVENTARC).host}`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.setEnvVarsForEmulators = setEnvVarsForEmulators;
|
|
@@ -7,7 +7,6 @@ const types_1 = require("./types");
|
|
|
7
7
|
const utils_1 = require("../utils");
|
|
8
8
|
const emulatorLogger_1 = require("./emulatorLogger");
|
|
9
9
|
const registry_1 = require("./registry");
|
|
10
|
-
const apiv2_1 = require("../apiv2");
|
|
11
10
|
const error_1 = require("../error");
|
|
12
11
|
class EventarcEmulator {
|
|
13
12
|
constructor(args) {
|
|
@@ -77,21 +76,16 @@ class EventarcEmulator {
|
|
|
77
76
|
return hub;
|
|
78
77
|
}
|
|
79
78
|
async triggerCustomEventFunction(channel, event) {
|
|
80
|
-
|
|
81
|
-
if (!functionsEmulator) {
|
|
79
|
+
if (!registry_1.EmulatorRegistry.isRunning(types_1.Emulators.FUNCTIONS)) {
|
|
82
80
|
this.logger.log("INFO", "Functions emulator not found. This should not happen.");
|
|
83
81
|
return Promise.reject();
|
|
84
82
|
}
|
|
85
83
|
const key = `${event.type}-${channel}`;
|
|
86
84
|
const triggers = this.customEvents[key] || [];
|
|
87
|
-
const apiClient = new apiv2_1.Client({
|
|
88
|
-
urlPrefix: `http://${registry_1.EmulatorRegistry.getInfoHostString(functionsEmulator.getInfo())}`,
|
|
89
|
-
auth: false,
|
|
90
|
-
});
|
|
91
85
|
return await Promise.all(triggers
|
|
92
86
|
.filter((trigger) => !trigger.eventTrigger.eventFilters ||
|
|
93
87
|
this.matchesAll(event, trigger.eventTrigger.eventFilters))
|
|
94
|
-
.map((trigger) =>
|
|
88
|
+
.map((trigger) => registry_1.EmulatorRegistry.client(types_1.Emulators.FUNCTIONS)
|
|
95
89
|
.request({
|
|
96
90
|
method: "POST",
|
|
97
91
|
path: `/functions/projects/${trigger.projectId}/triggers/${trigger.triggerName}`,
|
|
@@ -146,4 +140,3 @@ class EventarcEmulator {
|
|
|
146
140
|
}
|
|
147
141
|
}
|
|
148
142
|
exports.EventarcEmulator = EventarcEmulator;
|
|
149
|
-
//# sourceMappingURL=eventarcEmulator.js.map
|
|
@@ -4,33 +4,33 @@ exports.replaceConsoleLinks = void 0;
|
|
|
4
4
|
const registry_1 = require("../registry");
|
|
5
5
|
const types_1 = require("../types");
|
|
6
6
|
function replaceConsoleLinks(postinstall) {
|
|
7
|
-
const
|
|
8
|
-
const uiUrl =
|
|
7
|
+
const uiRunning = registry_1.EmulatorRegistry.isRunning(types_1.Emulators.UI);
|
|
8
|
+
const uiUrl = uiRunning ? registry_1.EmulatorRegistry.url(types_1.Emulators.UI).toString() : "unknown";
|
|
9
9
|
let subbedPostinstall = postinstall;
|
|
10
10
|
const linkReplacements = new Map([
|
|
11
11
|
[
|
|
12
12
|
/(http[s]?:\/\/)?console\.firebase\.google\.com\/(u\/[0-9]\/)?project\/[A-Za-z0-9-]+\/storage[A-Za-z0-9\/-]*(?=[\)\]\s])/,
|
|
13
|
-
`${uiUrl}
|
|
13
|
+
`${uiUrl}${types_1.Emulators.STORAGE}`,
|
|
14
14
|
],
|
|
15
15
|
[
|
|
16
16
|
/(http[s]?:\/\/)?console\.firebase\.google\.com\/(u\/[0-9]\/)?project\/[A-Za-z0-9-]+\/firestore[A-Za-z0-9\/-]*(?=[\)\]\s])/,
|
|
17
|
-
`${uiUrl}
|
|
17
|
+
`${uiUrl}${types_1.Emulators.FIRESTORE}`,
|
|
18
18
|
],
|
|
19
19
|
[
|
|
20
20
|
/(http[s]?:\/\/)?console\.firebase\.google\.com\/(u\/[0-9]\/)?project\/[A-Za-z0-9-]+\/database[A-Za-z0-9\/-]*(?=[\)\]\s])/,
|
|
21
|
-
`${uiUrl}
|
|
21
|
+
`${uiUrl}${types_1.Emulators.DATABASE}`,
|
|
22
22
|
],
|
|
23
23
|
[
|
|
24
24
|
/(http[s]?:\/\/)?console\.firebase\.google\.com\/(u\/[0-9]\/)?project\/[A-Za-z0-9-]+\/authentication[A-Za-z0-9\/-]*(?=[\)\]\s])/,
|
|
25
|
-
`${uiUrl}
|
|
25
|
+
`${uiUrl}${types_1.Emulators.AUTH}`,
|
|
26
26
|
],
|
|
27
27
|
[
|
|
28
28
|
/(http[s]?:\/\/)?console\.firebase\.google\.com\/(u\/[0-9]\/)?project\/[A-Za-z0-9-]+\/functions[A-Za-z0-9\/-]*(?=[\)\]\s])/,
|
|
29
|
-
`${uiUrl}
|
|
29
|
+
`${uiUrl}logs`,
|
|
30
30
|
],
|
|
31
31
|
[
|
|
32
32
|
/(http[s]?:\/\/)?console\.firebase\.google\.com\/(u\/[0-9]\/)?project\/[A-Za-z0-9-]+\/extensions[A-Za-z0-9\/-]*(?=[\)\]\s])/,
|
|
33
|
-
`${uiUrl}
|
|
33
|
+
`${uiUrl}${types_1.Emulators.EXTENSIONS}`,
|
|
34
34
|
],
|
|
35
35
|
]);
|
|
36
36
|
for (const [consoleLinkRegex, replacement] of linkReplacements) {
|
|
@@ -39,4 +39,3 @@ function replaceConsoleLinks(postinstall) {
|
|
|
39
39
|
return subbedPostinstall;
|
|
40
40
|
}
|
|
41
41
|
exports.replaceConsoleLinks = replaceConsoleLinks;
|
|
42
|
-
//# sourceMappingURL=postinstall.js.map
|
|
@@ -40,11 +40,11 @@ class ExtensionsEmulator {
|
|
|
40
40
|
return Promise.resolve();
|
|
41
41
|
}
|
|
42
42
|
getInfo() {
|
|
43
|
-
const
|
|
44
|
-
if (!
|
|
43
|
+
const functionsEmulator = registry_1.EmulatorRegistry.get(types_1.Emulators.FUNCTIONS);
|
|
44
|
+
if (!functionsEmulator) {
|
|
45
45
|
throw new error_1.FirebaseError("Extensions Emulator is running but Functions emulator is not. This should never happen.");
|
|
46
46
|
}
|
|
47
|
-
return
|
|
47
|
+
return functionsEmulator.getInfo();
|
|
48
48
|
}
|
|
49
49
|
getName() {
|
|
50
50
|
return types_1.Emulators.EXTENSIONS;
|
|
@@ -222,12 +222,12 @@ class ExtensionsEmulator {
|
|
|
222
222
|
return filteredBackends;
|
|
223
223
|
}
|
|
224
224
|
extensionDetailsUILink(backend) {
|
|
225
|
-
|
|
226
|
-
if (!uiInfo || !backend.extensionInstanceId) {
|
|
225
|
+
if (!registry_1.EmulatorRegistry.isRunning(types_1.Emulators.UI) || !backend.extensionInstanceId) {
|
|
227
226
|
return "";
|
|
228
227
|
}
|
|
229
|
-
const uiUrl = registry_1.EmulatorRegistry.
|
|
230
|
-
|
|
228
|
+
const uiUrl = registry_1.EmulatorRegistry.url(types_1.Emulators.UI);
|
|
229
|
+
uiUrl.pathname = `/${types_1.Emulators.EXTENSIONS}/${backend.extensionInstanceId}`;
|
|
230
|
+
return clc.underline(clc.bold(uiUrl.toString()));
|
|
231
231
|
}
|
|
232
232
|
extensionsInfoTable(options) {
|
|
233
233
|
var _a;
|
|
@@ -250,4 +250,3 @@ class ExtensionsEmulator {
|
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
exports.ExtensionsEmulator = ExtensionsEmulator;
|
|
253
|
-
//# sourceMappingURL=extensionsEmulator.js.map
|
|
@@ -10,15 +10,13 @@ const downloadableEmulators = require("./downloadableEmulators");
|
|
|
10
10
|
const types_1 = require("../emulator/types");
|
|
11
11
|
const registry_1 = require("./registry");
|
|
12
12
|
const constants_1 = require("./constants");
|
|
13
|
-
const apiv2_1 = require("../apiv2");
|
|
14
13
|
class FirestoreEmulator {
|
|
15
14
|
constructor(args) {
|
|
16
15
|
this.args = args;
|
|
17
16
|
}
|
|
18
17
|
async start() {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this.args.functions_emulator = registry_1.EmulatorRegistry.getInfoHostString(functionsInfo);
|
|
18
|
+
if (registry_1.EmulatorRegistry.isRunning(types_1.Emulators.FUNCTIONS)) {
|
|
19
|
+
this.args.functions_emulator = registry_1.EmulatorRegistry.url(types_1.Emulators.FUNCTIONS).host;
|
|
22
20
|
}
|
|
23
21
|
if (this.args.rules && this.args.project_id) {
|
|
24
22
|
const rulesPath = this.args.rules;
|
|
@@ -62,6 +60,8 @@ class FirestoreEmulator {
|
|
|
62
60
|
port,
|
|
63
61
|
pid: downloadableEmulators.getPID(types_1.Emulators.FIRESTORE),
|
|
64
62
|
reservedPorts: reservedPorts,
|
|
63
|
+
webSocketHost: this.args.websocket_port ? host : undefined,
|
|
64
|
+
webSocketPort: this.args.websocket_port ? this.args.websocket_port : undefined,
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
getName() {
|
|
@@ -69,7 +69,6 @@ class FirestoreEmulator {
|
|
|
69
69
|
}
|
|
70
70
|
async updateRules(content) {
|
|
71
71
|
const projectId = this.args.project_id;
|
|
72
|
-
const info = this.getInfo();
|
|
73
72
|
const body = {
|
|
74
73
|
ignore_errors: true,
|
|
75
74
|
rules: {
|
|
@@ -81,11 +80,7 @@ class FirestoreEmulator {
|
|
|
81
80
|
],
|
|
82
81
|
},
|
|
83
82
|
};
|
|
84
|
-
const
|
|
85
|
-
urlPrefix: `http://${registry_1.EmulatorRegistry.getInfoHostString(info)}`,
|
|
86
|
-
auth: false,
|
|
87
|
-
});
|
|
88
|
-
const res = await client.put(`/emulator/v1/projects/${projectId}:securityRules`, body);
|
|
83
|
+
const res = await registry_1.EmulatorRegistry.client(types_1.Emulators.FIRESTORE).put(`/emulator/v1/projects/${projectId}:securityRules`, body);
|
|
89
84
|
if (res.body && Array.isArray(res.body.issues)) {
|
|
90
85
|
return res.body.issues;
|
|
91
86
|
}
|
|
@@ -99,5 +94,3 @@ class FirestoreEmulator {
|
|
|
99
94
|
}
|
|
100
95
|
}
|
|
101
96
|
exports.FirestoreEmulator = FirestoreEmulator;
|
|
102
|
-
FirestoreEmulator.FIRESTORE_EMULATOR_ENV_ALT = "FIREBASE_FIRESTORE_EMULATOR_ADDRESS";
|
|
103
|
-
//# sourceMappingURL=firestoreEmulator.js.map
|
|
@@ -31,8 +31,8 @@ const runtimes = require("../deploy/functions/runtimes");
|
|
|
31
31
|
const backend = require("../deploy/functions/backend");
|
|
32
32
|
const functionsEnv = require("../functions/env");
|
|
33
33
|
const v1_1 = require("../functions/events/v1");
|
|
34
|
-
const apiv2_1 = require("../apiv2");
|
|
35
34
|
const build_1 = require("../deploy/functions/build");
|
|
35
|
+
const env_1 = require("./env");
|
|
36
36
|
const EVENT_INVOKE = "functions:invoke";
|
|
37
37
|
const EVENT_INVOKE_GA4 = "functions_invoke";
|
|
38
38
|
const DATABASE_PATH_PATTERN = new RegExp("^projects/[^/]+/instances/([^/]+)/refs(/.*)$");
|
|
@@ -60,8 +60,16 @@ class FunctionsEmulator {
|
|
|
60
60
|
}
|
|
61
61
|
this.workQueue = new workQueue_1.WorkQueue(mode);
|
|
62
62
|
}
|
|
63
|
-
static getHttpFunctionUrl(
|
|
64
|
-
|
|
63
|
+
static getHttpFunctionUrl(projectId, name, region, info) {
|
|
64
|
+
let url;
|
|
65
|
+
if (info) {
|
|
66
|
+
url = new url_1.URL("http://" + (0, functionsEmulatorShared_1.formatHost)(info));
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
url = registry_1.EmulatorRegistry.url(types_1.Emulators.FUNCTIONS);
|
|
70
|
+
}
|
|
71
|
+
url.pathname = `/${projectId}/${region}/${name}`;
|
|
72
|
+
return url.toString();
|
|
65
73
|
}
|
|
66
74
|
async getCredentialsEnvironment() {
|
|
67
75
|
const credentialEnv = {};
|
|
@@ -124,7 +132,7 @@ class FunctionsEmulator {
|
|
|
124
132
|
this.workQueue.submit(() => {
|
|
125
133
|
return new Promise((resolve, reject) => {
|
|
126
134
|
const trigReq = http.request({
|
|
127
|
-
host,
|
|
135
|
+
host: (0, utils_1.connectableHostname)(host),
|
|
128
136
|
port,
|
|
129
137
|
method: req.method,
|
|
130
138
|
path: `/functions/projects/${projectId}/triggers/${triggerId}`,
|
|
@@ -312,10 +320,9 @@ class FunctionsEmulator {
|
|
|
312
320
|
}
|
|
313
321
|
let added = false;
|
|
314
322
|
let url = undefined;
|
|
315
|
-
const { host, port } = this.getInfo();
|
|
316
323
|
if (definition.httpsTrigger) {
|
|
317
324
|
added = true;
|
|
318
|
-
url = FunctionsEmulator.getHttpFunctionUrl(
|
|
325
|
+
url = FunctionsEmulator.getHttpFunctionUrl(this.args.projectId, definition.name, definition.region);
|
|
319
326
|
}
|
|
320
327
|
else if (definition.eventTrigger) {
|
|
321
328
|
const service = (0, functionsEmulatorShared_1.getFunctionService)(definition);
|
|
@@ -346,8 +353,7 @@ class FunctionsEmulator {
|
|
|
346
353
|
}
|
|
347
354
|
}
|
|
348
355
|
else if (definition.blockingTrigger) {
|
|
349
|
-
|
|
350
|
-
url = FunctionsEmulator.getHttpFunctionUrl(host, port, this.args.projectId, definition.name, definition.region);
|
|
356
|
+
url = FunctionsEmulator.getHttpFunctionUrl(this.args.projectId, definition.name, definition.region);
|
|
351
357
|
added = this.addBlockingTrigger(url, definition.blockingTrigger);
|
|
352
358
|
}
|
|
353
359
|
else {
|
|
@@ -374,19 +380,14 @@ class FunctionsEmulator {
|
|
|
374
380
|
}
|
|
375
381
|
}
|
|
376
382
|
addEventarcTrigger(projectId, key, eventTrigger) {
|
|
377
|
-
|
|
378
|
-
if (!eventarcEmu) {
|
|
383
|
+
if (!registry_1.EmulatorRegistry.isRunning(types_1.Emulators.EVENTARC)) {
|
|
379
384
|
return Promise.resolve(false);
|
|
380
385
|
}
|
|
381
386
|
const bundle = {
|
|
382
387
|
eventTrigger: Object.assign(Object.assign({}, eventTrigger), { service: "eventarc.googleapis.com" }),
|
|
383
388
|
};
|
|
384
389
|
logger_1.logger.debug(`addEventarcTrigger`, JSON.stringify(bundle));
|
|
385
|
-
|
|
386
|
-
urlPrefix: `http://${registry_1.EmulatorRegistry.getInfoHostString(eventarcEmu.getInfo())}`,
|
|
387
|
-
auth: false,
|
|
388
|
-
});
|
|
389
|
-
return client
|
|
390
|
+
return registry_1.EmulatorRegistry.client(types_1.Emulators.EVENTARC)
|
|
390
391
|
.post(`/emulator/v1/projects/${projectId}/triggers/${key}`, bundle)
|
|
391
392
|
.then(() => true)
|
|
392
393
|
.catch((err) => {
|
|
@@ -399,16 +400,12 @@ class FunctionsEmulator {
|
|
|
399
400
|
!this.blockingFunctionsConfig.forwardInboundCredentials) {
|
|
400
401
|
return;
|
|
401
402
|
}
|
|
402
|
-
|
|
403
|
-
if (!authEmu) {
|
|
403
|
+
if (!registry_1.EmulatorRegistry.isRunning(types_1.Emulators.AUTH)) {
|
|
404
404
|
return;
|
|
405
405
|
}
|
|
406
406
|
const path = `/identitytoolkit.googleapis.com/v2/projects/${this.getProjectId()}/config?updateMask=blockingFunctions`;
|
|
407
407
|
try {
|
|
408
|
-
const client =
|
|
409
|
-
urlPrefix: `http://${registry_1.EmulatorRegistry.getInfoHostString(authEmu.getInfo())}`,
|
|
410
|
-
auth: false,
|
|
411
|
-
});
|
|
408
|
+
const client = registry_1.EmulatorRegistry.client(types_1.Emulators.AUTH);
|
|
412
409
|
await client.patch(path, { blockingFunctions: this.blockingFunctionsConfig }, {
|
|
413
410
|
headers: { Authorization: "Bearer owner" },
|
|
414
411
|
});
|
|
@@ -461,18 +458,14 @@ class FunctionsEmulator {
|
|
|
461
458
|
return { bundle, apiPath, instance };
|
|
462
459
|
}
|
|
463
460
|
async addRealtimeDatabaseTrigger(projectId, key, eventTrigger, signature, region) {
|
|
464
|
-
|
|
465
|
-
if (!databaseEmu) {
|
|
461
|
+
if (!registry_1.EmulatorRegistry.isRunning(types_1.Emulators.DATABASE)) {
|
|
466
462
|
return false;
|
|
467
463
|
}
|
|
468
464
|
const { bundle, apiPath, instance } = signature === "cloudevent"
|
|
469
465
|
? this.getV2DatabaseApiAttributes(projectId, key, eventTrigger, region)
|
|
470
466
|
: this.getV1DatabaseApiAttributes(projectId, key, eventTrigger);
|
|
471
467
|
logger_1.logger.debug(`addRealtimeDatabaseTrigger[${instance}]`, JSON.stringify(bundle));
|
|
472
|
-
const client =
|
|
473
|
-
urlPrefix: `http://${registry_1.EmulatorRegistry.getInfoHostString(databaseEmu.getInfo())}`,
|
|
474
|
-
auth: false,
|
|
475
|
-
});
|
|
468
|
+
const client = registry_1.EmulatorRegistry.client(types_1.Emulators.DATABASE);
|
|
476
469
|
try {
|
|
477
470
|
await client.post(apiPath, bundle, { headers: { Authorization: "Bearer owner" } });
|
|
478
471
|
}
|
|
@@ -483,18 +476,14 @@ class FunctionsEmulator {
|
|
|
483
476
|
return true;
|
|
484
477
|
}
|
|
485
478
|
async addFirestoreTrigger(projectId, key, eventTrigger) {
|
|
486
|
-
|
|
487
|
-
if (!firestoreEmu) {
|
|
479
|
+
if (!registry_1.EmulatorRegistry.isRunning(types_1.Emulators.FIRESTORE)) {
|
|
488
480
|
return Promise.resolve(false);
|
|
489
481
|
}
|
|
490
482
|
const bundle = JSON.stringify({
|
|
491
483
|
eventTrigger: Object.assign(Object.assign({}, eventTrigger), { service: "firestore.googleapis.com" }),
|
|
492
484
|
});
|
|
493
485
|
logger_1.logger.debug(`addFirestoreTrigger`, JSON.stringify(bundle));
|
|
494
|
-
const client =
|
|
495
|
-
urlPrefix: `http://${registry_1.EmulatorRegistry.getInfoHostString(firestoreEmu.getInfo())}`,
|
|
496
|
-
auth: false,
|
|
497
|
-
});
|
|
486
|
+
const client = registry_1.EmulatorRegistry.client(types_1.Emulators.FIRESTORE);
|
|
498
487
|
try {
|
|
499
488
|
await client.put(`/emulator/v1/projects/${projectId}/triggers/${key}`, bundle);
|
|
500
489
|
}
|
|
@@ -718,32 +707,7 @@ class FunctionsEmulator {
|
|
|
718
707
|
skipTokenVerification: true,
|
|
719
708
|
enableCors: true,
|
|
720
709
|
});
|
|
721
|
-
|
|
722
|
-
if (firestoreEmulator != null) {
|
|
723
|
-
envs[constants_1.Constants.FIRESTORE_EMULATOR_HOST] = (0, functionsEmulatorShared_1.formatHost)(firestoreEmulator);
|
|
724
|
-
}
|
|
725
|
-
const databaseEmulator = this.getEmulatorInfo(types_1.Emulators.DATABASE);
|
|
726
|
-
if (databaseEmulator) {
|
|
727
|
-
envs[constants_1.Constants.FIREBASE_DATABASE_EMULATOR_HOST] = (0, functionsEmulatorShared_1.formatHost)(databaseEmulator);
|
|
728
|
-
}
|
|
729
|
-
const authEmulator = this.getEmulatorInfo(types_1.Emulators.AUTH);
|
|
730
|
-
if (authEmulator) {
|
|
731
|
-
envs[constants_1.Constants.FIREBASE_AUTH_EMULATOR_HOST] = (0, functionsEmulatorShared_1.formatHost)(authEmulator);
|
|
732
|
-
}
|
|
733
|
-
const storageEmulator = this.getEmulatorInfo(types_1.Emulators.STORAGE);
|
|
734
|
-
if (storageEmulator) {
|
|
735
|
-
envs[constants_1.Constants.FIREBASE_STORAGE_EMULATOR_HOST] = (0, functionsEmulatorShared_1.formatHost)(storageEmulator);
|
|
736
|
-
envs[constants_1.Constants.CLOUD_STORAGE_EMULATOR_HOST] = `http://${(0, functionsEmulatorShared_1.formatHost)(storageEmulator)}`;
|
|
737
|
-
}
|
|
738
|
-
const pubsubEmulator = this.getEmulatorInfo(types_1.Emulators.PUBSUB);
|
|
739
|
-
if (pubsubEmulator) {
|
|
740
|
-
const pubsubHost = (0, functionsEmulatorShared_1.formatHost)(pubsubEmulator);
|
|
741
|
-
process.env.PUBSUB_EMULATOR_HOST = pubsubHost;
|
|
742
|
-
}
|
|
743
|
-
const eventarcEmulator = this.getEmulatorInfo(types_1.Emulators.EVENTARC);
|
|
744
|
-
if (eventarcEmulator) {
|
|
745
|
-
envs[constants_1.Constants.CLOUD_EVENTARC_EMULATOR_HOST] = `http://${(0, functionsEmulatorShared_1.formatHost)(eventarcEmulator)}`;
|
|
746
|
-
}
|
|
710
|
+
(0, env_1.setEnvVarsForEmulators)(envs);
|
|
747
711
|
if (this.args.debugPort) {
|
|
748
712
|
envs["FUNCTION_DEBUG_MODE"] = "true";
|
|
749
713
|
}
|
|
@@ -821,7 +785,7 @@ class FunctionsEmulator {
|
|
|
821
785
|
}
|
|
822
786
|
else {
|
|
823
787
|
const { host } = this.getInfo();
|
|
824
|
-
args.unshift(`--inspect=${host}:${this.args.debugPort}`);
|
|
788
|
+
args.unshift(`--inspect=${(0, utils_1.connectableHostname)(host)}:${this.args.debugPort}`);
|
|
825
789
|
}
|
|
826
790
|
}
|
|
827
791
|
const pnpPath = path.join(backend.functionsDir, ".pnp.js");
|
|
@@ -959,4 +923,3 @@ class FunctionsEmulator {
|
|
|
959
923
|
}
|
|
960
924
|
}
|
|
961
925
|
exports.FunctionsEmulator = FunctionsEmulator;
|
|
962
|
-
//# sourceMappingURL=functionsEmulator.js.map
|
|
@@ -14,6 +14,7 @@ const postinstall_1 = require("./extensions/postinstall");
|
|
|
14
14
|
const services_1 = require("../deploy/functions/services");
|
|
15
15
|
const prepare_1 = require("../deploy/functions/prepare");
|
|
16
16
|
const events = require("../functions/events");
|
|
17
|
+
const utils_1 = require("../utils");
|
|
17
18
|
const V2_EVENTS = [
|
|
18
19
|
events.v2.PUBSUB_PUBLISH_EVENT,
|
|
19
20
|
...events.v2.STORAGE_EVENTS,
|
|
@@ -246,11 +247,12 @@ function findModuleRoot(moduleName, filepath) {
|
|
|
246
247
|
}
|
|
247
248
|
exports.findModuleRoot = findModuleRoot;
|
|
248
249
|
function formatHost(info) {
|
|
249
|
-
|
|
250
|
-
|
|
250
|
+
const host = (0, utils_1.connectableHostname)(info.host);
|
|
251
|
+
if (host.includes(":")) {
|
|
252
|
+
return `[${host}]:${info.port}`;
|
|
251
253
|
}
|
|
252
254
|
else {
|
|
253
|
-
return `${
|
|
255
|
+
return `${host}:${info.port}`;
|
|
254
256
|
}
|
|
255
257
|
}
|
|
256
258
|
exports.formatHost = formatHost;
|
|
@@ -303,4 +305,3 @@ function toBackendInfo(e, cf3Triggers) {
|
|
|
303
305
|
}));
|
|
304
306
|
}
|
|
305
307
|
exports.toBackendInfo = toBackendInfo;
|
|
306
|
-
//# sourceMappingURL=functionsEmulatorShared.js.map
|
|
@@ -16,7 +16,7 @@ class FunctionsEmulatorShell {
|
|
|
16
16
|
utils.logLabeledBullet("functions", `Loaded functions: ${entryPoints.join(", ")}`);
|
|
17
17
|
for (const trigger of this.triggers) {
|
|
18
18
|
if (trigger.httpsTrigger) {
|
|
19
|
-
this.urls[trigger.id] = functionsEmulator_1.FunctionsEmulator.getHttpFunctionUrl(this.emu.
|
|
19
|
+
this.urls[trigger.id] = functionsEmulator_1.FunctionsEmulator.getHttpFunctionUrl(this.emu.getProjectId(), trigger.name, trigger.region, this.emu.getInfo());
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -54,4 +54,3 @@ class FunctionsEmulatorShell {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
exports.FunctionsEmulatorShell = FunctionsEmulatorShell;
|
|
57
|
-
//# sourceMappingURL=functionsEmulatorShell.js.map
|
package/lib/emulator/hub.js
CHANGED
|
@@ -1,37 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EmulatorHub = void 0;
|
|
4
|
-
const cors = require("cors");
|
|
5
|
-
const express = require("express");
|
|
6
4
|
const os = require("os");
|
|
7
5
|
const fs = require("fs");
|
|
8
6
|
const path = require("path");
|
|
9
|
-
const bodyParser = require("body-parser");
|
|
10
7
|
const utils = require("../utils");
|
|
11
8
|
const logger_1 = require("../logger");
|
|
12
|
-
const constants_1 = require("./constants");
|
|
13
9
|
const types_1 = require("./types");
|
|
14
10
|
const hubExport_1 = require("./hubExport");
|
|
15
11
|
const registry_1 = require("./registry");
|
|
12
|
+
const ExpressBasedEmulator_1 = require("./ExpressBasedEmulator");
|
|
16
13
|
const pkg = require("../../package.json");
|
|
17
|
-
class EmulatorHub {
|
|
14
|
+
class EmulatorHub extends ExpressBasedEmulator_1.ExpressBasedEmulator {
|
|
18
15
|
constructor(args) {
|
|
16
|
+
super({
|
|
17
|
+
listen: args.listen,
|
|
18
|
+
});
|
|
19
19
|
this.args = args;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
this.
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
}
|
|
21
|
+
static readLocatorFile(projectId) {
|
|
22
|
+
const locatorPath = this.getLocatorFilePath(projectId);
|
|
23
|
+
if (!fs.existsSync(locatorPath)) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
const data = fs.readFileSync(locatorPath, "utf8").toString();
|
|
27
|
+
const locator = JSON.parse(data);
|
|
28
|
+
if (locator.version !== this.CLI_VERSION) {
|
|
29
|
+
logger_1.logger.debug(`Found locator with mismatched version, ignoring: ${JSON.stringify(locator)}`);
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
return locator;
|
|
33
|
+
}
|
|
34
|
+
static getLocatorFilePath(projectId) {
|
|
35
|
+
const dir = os.tmpdir();
|
|
36
|
+
const filename = `hub-${projectId}.json`;
|
|
37
|
+
return path.join(dir, filename);
|
|
38
|
+
}
|
|
39
|
+
async start() {
|
|
40
|
+
await super.start();
|
|
41
|
+
await this.writeLocatorFile();
|
|
42
|
+
}
|
|
43
|
+
async createExpressApp() {
|
|
44
|
+
const app = await super.createExpressApp();
|
|
45
|
+
app.get("/", (req, res) => {
|
|
46
|
+
res.json(Object.assign(Object.assign({}, this.getLocator()), { host: utils.connectableHostname(this.args.listen[0].address), port: this.args.listen[0].port }));
|
|
25
47
|
});
|
|
26
|
-
|
|
48
|
+
app.get(EmulatorHub.PATH_EMULATORS, (req, res) => {
|
|
27
49
|
const body = {};
|
|
28
|
-
for (const
|
|
29
|
-
|
|
30
|
-
body[emulator] = info;
|
|
50
|
+
for (const info of registry_1.EmulatorRegistry.listRunningWithInfo()) {
|
|
51
|
+
body[info.name] = Object.assign({ listen: this.args.listenForEmulator[info.name] }, info);
|
|
31
52
|
}
|
|
32
53
|
res.json(body);
|
|
33
54
|
});
|
|
34
|
-
|
|
55
|
+
app.post(EmulatorHub.PATH_EXPORT, async (req, res) => {
|
|
35
56
|
const path = req.body.path;
|
|
36
57
|
const initiatedBy = req.body.initiatedBy || "unknown";
|
|
37
58
|
utils.logLabeledBullet("emulators", `Received export request. Exporting data to ${path}.`);
|
|
@@ -53,7 +74,7 @@ class EmulatorHub {
|
|
|
53
74
|
});
|
|
54
75
|
}
|
|
55
76
|
});
|
|
56
|
-
|
|
77
|
+
app.put(EmulatorHub.PATH_DISABLE_FUNCTIONS, async (req, res) => {
|
|
57
78
|
utils.logLabeledBullet("emulators", `Disabling Cloud Functions triggers, non-HTTP functions will not execute.`);
|
|
58
79
|
const instance = registry_1.EmulatorRegistry.get(types_1.Emulators.FUNCTIONS);
|
|
59
80
|
if (!instance) {
|
|
@@ -64,7 +85,7 @@ class EmulatorHub {
|
|
|
64
85
|
await emu.disableBackgroundTriggers();
|
|
65
86
|
res.status(200).json({ enabled: false });
|
|
66
87
|
});
|
|
67
|
-
|
|
88
|
+
app.put(EmulatorHub.PATH_ENABLE_FUNCTIONS, async (req, res) => {
|
|
68
89
|
utils.logLabeledBullet("emulators", `Enabling Cloud Functions triggers, non-HTTP functions will execute.`);
|
|
69
90
|
const instance = registry_1.EmulatorRegistry.get(types_1.Emulators.FUNCTIONS);
|
|
70
91
|
if (!instance) {
|
|
@@ -75,58 +96,29 @@ class EmulatorHub {
|
|
|
75
96
|
await emu.reloadTriggers();
|
|
76
97
|
res.status(200).json({ enabled: true });
|
|
77
98
|
});
|
|
78
|
-
|
|
79
|
-
static readLocatorFile(projectId) {
|
|
80
|
-
const locatorPath = this.getLocatorFilePath(projectId);
|
|
81
|
-
if (!fs.existsSync(locatorPath)) {
|
|
82
|
-
return undefined;
|
|
83
|
-
}
|
|
84
|
-
const data = fs.readFileSync(locatorPath, "utf8").toString();
|
|
85
|
-
const locator = JSON.parse(data);
|
|
86
|
-
if (locator.version !== this.CLI_VERSION) {
|
|
87
|
-
logger_1.logger.debug(`Found locator with mismatched version, ignoring: ${JSON.stringify(locator)}`);
|
|
88
|
-
return undefined;
|
|
89
|
-
}
|
|
90
|
-
return locator;
|
|
91
|
-
}
|
|
92
|
-
static getLocatorFilePath(projectId) {
|
|
93
|
-
const dir = os.tmpdir();
|
|
94
|
-
const filename = `hub-${projectId}.json`;
|
|
95
|
-
return path.join(dir, filename);
|
|
96
|
-
}
|
|
97
|
-
async start() {
|
|
98
|
-
const { host, port } = this.getInfo();
|
|
99
|
-
const server = this.hub.listen(port, host);
|
|
100
|
-
this.destroyServer = utils.createDestroyer(server);
|
|
101
|
-
await this.writeLocatorFile();
|
|
102
|
-
}
|
|
103
|
-
async connect() {
|
|
99
|
+
return app;
|
|
104
100
|
}
|
|
105
101
|
async stop() {
|
|
106
|
-
|
|
107
|
-
await this.destroyServer();
|
|
108
|
-
}
|
|
102
|
+
await super.stop();
|
|
109
103
|
await this.deleteLocatorFile();
|
|
110
104
|
}
|
|
111
|
-
getInfo() {
|
|
112
|
-
const host = this.args.host || constants_1.Constants.getDefaultHost();
|
|
113
|
-
const port = this.args.port || constants_1.Constants.getDefaultPort(types_1.Emulators.HUB);
|
|
114
|
-
return {
|
|
115
|
-
name: this.getName(),
|
|
116
|
-
host,
|
|
117
|
-
port,
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
105
|
getName() {
|
|
121
106
|
return types_1.Emulators.HUB;
|
|
122
107
|
}
|
|
123
108
|
getLocator() {
|
|
124
|
-
const { host, port } = this.getInfo();
|
|
125
109
|
const version = pkg.version;
|
|
110
|
+
const origins = [];
|
|
111
|
+
for (const spec of this.args.listen) {
|
|
112
|
+
if (spec.family === "IPv6") {
|
|
113
|
+
origins.push(`http://[${utils.connectableHostname(spec.address)}]:${spec.port}`);
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
origins.push(`http://${utils.connectableHostname(spec.address)}:${spec.port}`);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
126
119
|
return {
|
|
127
120
|
version,
|
|
128
|
-
|
|
129
|
-
port,
|
|
121
|
+
origins,
|
|
130
122
|
};
|
|
131
123
|
}
|
|
132
124
|
async writeLocatorFile() {
|
|
@@ -168,4 +160,3 @@ EmulatorHub.PATH_EXPORT = "/_admin/export";
|
|
|
168
160
|
EmulatorHub.PATH_DISABLE_FUNCTIONS = "/functions/disableBackgroundTriggers";
|
|
169
161
|
EmulatorHub.PATH_ENABLE_FUNCTIONS = "/functions/enableBackgroundTriggers";
|
|
170
162
|
EmulatorHub.PATH_EMULATORS = "/emulators";
|
|
171
|
-
//# sourceMappingURL=hub.js.map
|