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
|
@@ -12,23 +12,37 @@ class EmulatorHubClient {
|
|
|
12
12
|
foundHub() {
|
|
13
13
|
return this.locator !== undefined;
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
getStatus() {
|
|
16
|
+
return this.tryOrigins(async (client, origin) => {
|
|
17
|
+
await client.get("/");
|
|
18
|
+
return origin;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
async tryOrigins(task) {
|
|
22
|
+
const origins = this.assertLocator().origins;
|
|
23
|
+
let err = undefined;
|
|
24
|
+
for (const origin of origins) {
|
|
25
|
+
try {
|
|
26
|
+
const apiClient = new apiv2_1.Client({ urlPrefix: origin, auth: false });
|
|
27
|
+
return await task(apiClient, origin);
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
if (!err) {
|
|
31
|
+
err = e;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
throw err !== null && err !== void 0 ? err : new Error("Cannot find working hub origin. Tried:" + origins.join(" "));
|
|
18
36
|
}
|
|
19
37
|
async getEmulators() {
|
|
20
|
-
const
|
|
21
|
-
const res = await apiClient.get(hub_1.EmulatorHub.PATH_EMULATORS);
|
|
38
|
+
const res = await this.tryOrigins((client) => client.get(hub_1.EmulatorHub.PATH_EMULATORS));
|
|
22
39
|
return res.body;
|
|
23
40
|
}
|
|
24
41
|
async postExport(options) {
|
|
25
|
-
const
|
|
42
|
+
const origin = await this.getStatus();
|
|
43
|
+
const apiClient = new apiv2_1.Client({ urlPrefix: origin, auth: false });
|
|
26
44
|
await apiClient.post(hub_1.EmulatorHub.PATH_EXPORT, options);
|
|
27
45
|
}
|
|
28
|
-
get origin() {
|
|
29
|
-
const locator = this.assertLocator();
|
|
30
|
-
return `http://${locator.host}:${locator.port}`;
|
|
31
|
-
}
|
|
32
46
|
assertLocator() {
|
|
33
47
|
if (this.locator === undefined) {
|
|
34
48
|
throw new error_1.FirebaseError(`Cannot contact the Emulator Hub for project ${this.projectId}`);
|
|
@@ -37,4 +51,3 @@ class EmulatorHubClient {
|
|
|
37
51
|
}
|
|
38
52
|
}
|
|
39
53
|
exports.EmulatorHubClient = EmulatorHubClient;
|
|
40
|
-
//# sourceMappingURL=hubClient.js.map
|
|
@@ -12,7 +12,6 @@ const error_1 = require("../error");
|
|
|
12
12
|
const hub_1 = require("./hub");
|
|
13
13
|
const downloadableEmulators_1 = require("./downloadableEmulators");
|
|
14
14
|
const rimraf = require("rimraf");
|
|
15
|
-
const apiv2_1 = require("../apiv2");
|
|
16
15
|
const track_1 = require("../track");
|
|
17
16
|
class HubExport {
|
|
18
17
|
constructor(projectId, options) {
|
|
@@ -83,20 +82,16 @@ class HubExport {
|
|
|
83
82
|
initiated_by: this.options.initiatedBy,
|
|
84
83
|
emulator_name: types_1.Emulators.FIRESTORE,
|
|
85
84
|
});
|
|
86
|
-
const firestoreInfo = registry_1.EmulatorRegistry.get(types_1.Emulators.FIRESTORE).getInfo();
|
|
87
|
-
const firestoreHost = `http://${registry_1.EmulatorRegistry.getInfoHostString(firestoreInfo)}`;
|
|
88
85
|
const firestoreExportBody = {
|
|
89
86
|
database: `projects/${this.projectId}/databases/(default)`,
|
|
90
87
|
export_directory: this.tmpDir,
|
|
91
88
|
export_name: metadata.firestore.path,
|
|
92
89
|
};
|
|
93
|
-
|
|
94
|
-
await client.post(`/emulator/v1/projects/${this.projectId}:export`, firestoreExportBody);
|
|
90
|
+
await registry_1.EmulatorRegistry.client(types_1.Emulators.FIRESTORE).post(`/emulator/v1/projects/${this.projectId}:export`, firestoreExportBody);
|
|
95
91
|
}
|
|
96
92
|
async exportDatabase(metadata) {
|
|
97
93
|
const databaseEmulator = registry_1.EmulatorRegistry.get(types_1.Emulators.DATABASE);
|
|
98
|
-
const
|
|
99
|
-
const client = new apiv2_1.Client({ urlPrefix: databaseAddr, auth: true });
|
|
94
|
+
const client = registry_1.EmulatorRegistry.client(types_1.Emulators.DATABASE, { auth: true });
|
|
100
95
|
const inspectURL = `/.inspect/databases.json`;
|
|
101
96
|
const inspectRes = await client.get(inspectURL, {
|
|
102
97
|
queryParams: { ns: this.projectId },
|
|
@@ -174,19 +169,16 @@ class HubExport {
|
|
|
174
169
|
}, configFile);
|
|
175
170
|
}
|
|
176
171
|
async exportStorage(metadata) {
|
|
177
|
-
const storageEmulator = registry_1.EmulatorRegistry.get(types_1.Emulators.STORAGE);
|
|
178
172
|
const storageExportPath = path.join(this.tmpDir, metadata.storage.path);
|
|
179
173
|
if (fs.existsSync(storageExportPath)) {
|
|
180
174
|
fse.removeSync(storageExportPath);
|
|
181
175
|
}
|
|
182
176
|
fs.mkdirSync(storageExportPath, { recursive: true });
|
|
183
|
-
const storageHost = `http://${registry_1.EmulatorRegistry.getInfoHostString(storageEmulator.getInfo())}`;
|
|
184
177
|
const storageExportBody = {
|
|
185
178
|
path: storageExportPath,
|
|
186
179
|
initiatedBy: this.options.initiatedBy,
|
|
187
180
|
};
|
|
188
|
-
const
|
|
189
|
-
const res = await client.request({
|
|
181
|
+
const res = await registry_1.EmulatorRegistry.client(types_1.Emulators.STORAGE).request({
|
|
190
182
|
method: "POST",
|
|
191
183
|
path: "/internal/export",
|
|
192
184
|
headers: { "Content-Type": "application/json" },
|
|
@@ -214,4 +206,3 @@ function fetchToFile(options, path) {
|
|
|
214
206
|
function shouldExport(e) {
|
|
215
207
|
return types_1.IMPORT_EXPORT_EMULATORS.includes(e) && registry_1.EmulatorRegistry.isRunning(e);
|
|
216
208
|
}
|
|
217
|
-
//# sourceMappingURL=hubExport.js.map
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
3
|
+
exports.resolveHostAndAssignPorts = exports.waitForPortClosed = exports.checkListenable = void 0;
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const tcpport = require("tcp-port-used");
|
|
6
|
-
const
|
|
6
|
+
const node_net_1 = require("node:net");
|
|
7
7
|
const error_1 = require("../error");
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const
|
|
8
|
+
const utils = require("../utils");
|
|
9
|
+
const dns_1 = require("./dns");
|
|
10
|
+
const types_1 = require("./types");
|
|
11
|
+
const constants_1 = require("./constants");
|
|
12
|
+
const emulatorLogger_1 = require("./emulatorLogger");
|
|
13
|
+
const RESTRICTED_PORTS = new Set([
|
|
11
14
|
1,
|
|
12
15
|
7,
|
|
13
16
|
9,
|
|
@@ -75,11 +78,10 @@ const RESTRICTED_PORTS = [
|
|
|
75
78
|
6668,
|
|
76
79
|
6669,
|
|
77
80
|
6697,
|
|
78
|
-
];
|
|
81
|
+
]);
|
|
79
82
|
function isRestricted(port) {
|
|
80
|
-
return RESTRICTED_PORTS.
|
|
83
|
+
return RESTRICTED_PORTS.has(port);
|
|
81
84
|
}
|
|
82
|
-
exports.isRestricted = isRestricted;
|
|
83
85
|
function suggestUnrestricted(port) {
|
|
84
86
|
if (!isRestricted(port)) {
|
|
85
87
|
return port;
|
|
@@ -90,27 +92,37 @@ function suggestUnrestricted(port) {
|
|
|
90
92
|
}
|
|
91
93
|
return newPort;
|
|
92
94
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
95
|
+
async function checkListenable(arg1, port) {
|
|
96
|
+
const addr = port === undefined ? arg1 : listenSpec(arg1, port);
|
|
97
|
+
return new Promise((resolve, reject) => {
|
|
98
|
+
const dummyServer = (0, node_net_1.createServer)(() => {
|
|
99
|
+
});
|
|
100
|
+
dummyServer.once("error", (err) => {
|
|
101
|
+
dummyServer.removeAllListeners();
|
|
102
|
+
const e = err;
|
|
103
|
+
if (e.code === "EADDRINUSE" || e.code === "EACCES") {
|
|
104
|
+
resolve(false);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
reject(e);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
dummyServer.once("listening", () => {
|
|
111
|
+
dummyServer.removeAllListeners();
|
|
112
|
+
dummyServer.close((err) => {
|
|
113
|
+
dummyServer.removeAllListeners();
|
|
114
|
+
if (err) {
|
|
115
|
+
reject(err);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
resolve(true);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
dummyServer.listen({ host: addr.address, port: addr.port, ipv6Only: addr.family === "IPv6" });
|
|
123
|
+
});
|
|
112
124
|
}
|
|
113
|
-
exports.
|
|
125
|
+
exports.checkListenable = checkListenable;
|
|
114
126
|
async function waitForPortClosed(port, host) {
|
|
115
127
|
const interval = 250;
|
|
116
128
|
const timeout = 60000;
|
|
@@ -122,4 +134,170 @@ async function waitForPortClosed(port, host) {
|
|
|
122
134
|
}
|
|
123
135
|
}
|
|
124
136
|
exports.waitForPortClosed = waitForPortClosed;
|
|
125
|
-
|
|
137
|
+
const EMULATOR_CAN_LISTEN_ON_PRIMARY_ONLY = {
|
|
138
|
+
database: true,
|
|
139
|
+
firestore: true,
|
|
140
|
+
"firestore.websocket": true,
|
|
141
|
+
pubsub: true,
|
|
142
|
+
hub: false,
|
|
143
|
+
ui: false,
|
|
144
|
+
auth: true,
|
|
145
|
+
eventarc: true,
|
|
146
|
+
extensions: true,
|
|
147
|
+
functions: true,
|
|
148
|
+
logging: true,
|
|
149
|
+
storage: true,
|
|
150
|
+
hosting: true,
|
|
151
|
+
};
|
|
152
|
+
const MAX_PORT = 65535;
|
|
153
|
+
async function resolveHostAndAssignPorts(listenConfig) {
|
|
154
|
+
const lookupForHost = new Map();
|
|
155
|
+
const takenPorts = new Map();
|
|
156
|
+
const result = {};
|
|
157
|
+
const tasks = [];
|
|
158
|
+
for (const name of Object.keys(listenConfig)) {
|
|
159
|
+
const config = listenConfig[name];
|
|
160
|
+
if (!config) {
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
else if (config instanceof Array) {
|
|
164
|
+
result[name] = config;
|
|
165
|
+
for (const { port } of config) {
|
|
166
|
+
takenPorts.set(port, name);
|
|
167
|
+
}
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
const { host, port, portFixed } = config;
|
|
171
|
+
let lookup = lookupForHost.get(host);
|
|
172
|
+
if (!lookup) {
|
|
173
|
+
lookup = dns_1.Resolver.DEFAULT.lookupAll(host);
|
|
174
|
+
lookupForHost.set(host, lookup);
|
|
175
|
+
}
|
|
176
|
+
const findAddrs = lookup.then(async (addrs) => {
|
|
177
|
+
const emuLogger = emulatorLogger_1.EmulatorLogger.forEmulator(name === "firestore.websocket" ? types_1.Emulators.FIRESTORE : name);
|
|
178
|
+
if (addrs.some((addr) => addr.address === dns_1.IPV6_UNSPECIFIED.address)) {
|
|
179
|
+
if (!addrs.some((addr) => addr.address === dns_1.IPV4_UNSPECIFIED.address)) {
|
|
180
|
+
emuLogger.logLabeled("DEBUG", name, `testing listening on IPv4 wildcard in addition to IPv6. To listen on IPv6 only, use "::0" instead.`);
|
|
181
|
+
addrs.push(dns_1.IPV4_UNSPECIFIED);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
for (let p = port; p <= MAX_PORT; p++) {
|
|
185
|
+
if (takenPorts.has(p)) {
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
if (!portFixed && RESTRICTED_PORTS.has(p)) {
|
|
189
|
+
emuLogger.logLabeled("DEBUG", name, `portUtils: skipping restricted port ${p}`);
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
const available = [];
|
|
193
|
+
const unavailable = [];
|
|
194
|
+
let i;
|
|
195
|
+
for (i = 0; i < addrs.length; i++) {
|
|
196
|
+
const addr = addrs[i];
|
|
197
|
+
const listen = listenSpec(addr, p);
|
|
198
|
+
if (await checkListenable(listen)) {
|
|
199
|
+
available.push(listen);
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
if (!portFixed) {
|
|
203
|
+
if (i > 0) {
|
|
204
|
+
emuLogger.logLabeled("DEBUG", name, `Port ${p} taken on secondary address ${addr.address}, will keep searching to find a better port.`);
|
|
205
|
+
}
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
unavailable.push(addr.address);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
if (i === addrs.length) {
|
|
212
|
+
if (unavailable.length > 0) {
|
|
213
|
+
if (unavailable[0] === addrs[0].address) {
|
|
214
|
+
return fixedPortNotAvailable(name, host, port, emuLogger, unavailable);
|
|
215
|
+
}
|
|
216
|
+
warnPartiallyAvailablePort(emuLogger, port, available, unavailable);
|
|
217
|
+
}
|
|
218
|
+
if (takenPorts.has(p)) {
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
takenPorts.set(p, name);
|
|
222
|
+
if (RESTRICTED_PORTS.has(p)) {
|
|
223
|
+
const suggested = suggestUnrestricted(port);
|
|
224
|
+
emuLogger.logLabeled("WARN", name, `Port ${port} is restricted by some web browsers, including Chrome. You may want to choose a different port such as ${suggested}.`);
|
|
225
|
+
}
|
|
226
|
+
if (p !== port && name !== "firestore.websocket") {
|
|
227
|
+
emuLogger.logLabeled("WARN", `${portDescription(name)} unable to start on port ${port}, starting on ${p} instead.`);
|
|
228
|
+
}
|
|
229
|
+
if (available.length > 1 && EMULATOR_CAN_LISTEN_ON_PRIMARY_ONLY[name]) {
|
|
230
|
+
emuLogger.logLabeled("DEBUG", name, `${portDescription(name)} only supports listening on one address (${available[0].address}). Not listening on ${addrs
|
|
231
|
+
.slice(1)
|
|
232
|
+
.map((s) => s.address)
|
|
233
|
+
.join(",")}`);
|
|
234
|
+
result[name] = [available[0]];
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
result[name] = available;
|
|
238
|
+
}
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return utils.reject(`Could not find any open port in ${port}-${MAX_PORT} for ${portDescription(name)}`, {});
|
|
243
|
+
});
|
|
244
|
+
tasks.push(findAddrs);
|
|
245
|
+
}
|
|
246
|
+
await Promise.all(tasks);
|
|
247
|
+
return result;
|
|
248
|
+
}
|
|
249
|
+
exports.resolveHostAndAssignPorts = resolveHostAndAssignPorts;
|
|
250
|
+
function portDescription(name) {
|
|
251
|
+
return name === "firestore.websocket"
|
|
252
|
+
? `websocket server for ${types_1.Emulators.FIRESTORE}`
|
|
253
|
+
: constants_1.Constants.description(name);
|
|
254
|
+
}
|
|
255
|
+
function warnPartiallyAvailablePort(emuLogger, port, available, unavailable) {
|
|
256
|
+
emuLogger.logLabeled("WARN", `Port ${port} is available on ` +
|
|
257
|
+
available.map((s) => s.address).join(",") +
|
|
258
|
+
` but not ${unavailable.join(",")}. This may cause issues with some clients.`);
|
|
259
|
+
emuLogger.logLabeled("WARN", `If you encounter connectivity issues, consider switching to a different port or explicitly specifying ${clc.yellow('"host": "<ip address>"')} instead of hostname in firebase.json`);
|
|
260
|
+
}
|
|
261
|
+
function fixedPortNotAvailable(name, host, port, emuLogger, unavailableAddrs) {
|
|
262
|
+
if (unavailableAddrs.length !== 1 || unavailableAddrs[0] !== host) {
|
|
263
|
+
host = `${host} (${unavailableAddrs.join(",")})`;
|
|
264
|
+
}
|
|
265
|
+
const description = portDescription(name);
|
|
266
|
+
emuLogger.logLabeled("WARN", `Port ${port} is not open on ${host}, could not start ${description}.`);
|
|
267
|
+
if (name === "firestore.websocket") {
|
|
268
|
+
emuLogger.logLabeled("WARN", `To select a different port, specify that port in a firebase.json config file:
|
|
269
|
+
{
|
|
270
|
+
// ...
|
|
271
|
+
"emulators": {
|
|
272
|
+
"${types_1.Emulators.FIRESTORE}": {
|
|
273
|
+
"host": "${clc.yellow("HOST")}",
|
|
274
|
+
...
|
|
275
|
+
"websocketPort": "${clc.yellow("WEBSOCKET_PORT")}"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}`);
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
emuLogger.logLabeled("WARN", `To select a different host/port, specify that host/port in a firebase.json config file:
|
|
282
|
+
{
|
|
283
|
+
// ...
|
|
284
|
+
"emulators": {
|
|
285
|
+
"${emuLogger.name}": {
|
|
286
|
+
"host": "${clc.yellow("HOST")}",
|
|
287
|
+
"port": "${clc.yellow("PORT")}"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}`);
|
|
291
|
+
}
|
|
292
|
+
return utils.reject(`Could not start ${description}, port taken.`, {});
|
|
293
|
+
}
|
|
294
|
+
function listenSpec(lookup, port) {
|
|
295
|
+
if (lookup.family !== 4 && lookup.family !== 6) {
|
|
296
|
+
throw new Error(`Unsupported address family "${lookup.family}" for address ${lookup.address}.`);
|
|
297
|
+
}
|
|
298
|
+
return {
|
|
299
|
+
address: lookup.address,
|
|
300
|
+
family: lookup.family === 4 ? "IPv4" : "IPv6",
|
|
301
|
+
port: port,
|
|
302
|
+
};
|
|
303
|
+
}
|
|
@@ -4,7 +4,6 @@ exports.PubsubEmulator = void 0;
|
|
|
4
4
|
const uuid = require("uuid");
|
|
5
5
|
const pubsub_1 = require("@google-cloud/pubsub");
|
|
6
6
|
const downloadableEmulators = require("./downloadableEmulators");
|
|
7
|
-
const apiv2_1 = require("../apiv2");
|
|
8
7
|
const emulatorLogger_1 = require("./emulatorLogger");
|
|
9
8
|
const types_1 = require("../emulator/types");
|
|
10
9
|
const constants_1 = require("./constants");
|
|
@@ -14,14 +13,18 @@ class PubsubEmulator {
|
|
|
14
13
|
constructor(args) {
|
|
15
14
|
this.args = args;
|
|
16
15
|
this.logger = emulatorLogger_1.EmulatorLogger.forEmulator(types_1.Emulators.PUBSUB);
|
|
17
|
-
const { host, port } = this.getInfo();
|
|
18
|
-
this.pubsub = new pubsub_1.PubSub({
|
|
19
|
-
apiEndpoint: `${host}:${port}`,
|
|
20
|
-
projectId: this.args.projectId,
|
|
21
|
-
});
|
|
22
16
|
this.triggersForTopic = new Map();
|
|
23
17
|
this.subscriptionForTopic = new Map();
|
|
24
18
|
}
|
|
19
|
+
get pubsub() {
|
|
20
|
+
if (!this._pubsub) {
|
|
21
|
+
this._pubsub = new pubsub_1.PubSub({
|
|
22
|
+
apiEndpoint: registry_1.EmulatorRegistry.url(types_1.Emulators.PUBSUB).host,
|
|
23
|
+
projectId: this.args.projectId,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return this._pubsub;
|
|
27
|
+
}
|
|
25
28
|
async start() {
|
|
26
29
|
return downloadableEmulators.start(types_1.Emulators.PUBSUB, this.args);
|
|
27
30
|
}
|
|
@@ -94,14 +97,10 @@ class PubsubEmulator {
|
|
|
94
97
|
ensureFunctionsClient() {
|
|
95
98
|
if (this.client !== undefined)
|
|
96
99
|
return;
|
|
97
|
-
|
|
98
|
-
if (!funcEmulator) {
|
|
100
|
+
if (!registry_1.EmulatorRegistry.isRunning(types_1.Emulators.FUNCTIONS)) {
|
|
99
101
|
throw new error_1.FirebaseError(`Attempted to execute pubsub trigger but could not find the Functions emulator`);
|
|
100
102
|
}
|
|
101
|
-
this.client =
|
|
102
|
-
urlPrefix: `http://${registry_1.EmulatorRegistry.getInfoHostString(funcEmulator.getInfo())}`,
|
|
103
|
-
auth: false,
|
|
104
|
-
});
|
|
103
|
+
this.client = registry_1.EmulatorRegistry.client(types_1.Emulators.FUNCTIONS);
|
|
105
104
|
}
|
|
106
105
|
createLegacyEventRequestBody(topic, message) {
|
|
107
106
|
return {
|
|
@@ -170,4 +169,3 @@ class PubsubEmulator {
|
|
|
170
169
|
}
|
|
171
170
|
}
|
|
172
171
|
exports.PubsubEmulator = PubsubEmulator;
|
|
173
|
-
//# sourceMappingURL=pubsubEmulator.js.map
|
package/lib/emulator/registry.js
CHANGED
|
@@ -6,6 +6,8 @@ const error_1 = require("../error");
|
|
|
6
6
|
const portUtils = require("./portUtils");
|
|
7
7
|
const constants_1 = require("./constants");
|
|
8
8
|
const emulatorLogger_1 = require("./emulatorLogger");
|
|
9
|
+
const utils_1 = require("../utils");
|
|
10
|
+
const apiv2_1 = require("../apiv2");
|
|
9
11
|
class EmulatorRegistry {
|
|
10
12
|
static async start(instance) {
|
|
11
13
|
const description = constants_1.Constants.description(instance.getName());
|
|
@@ -16,7 +18,7 @@ class EmulatorRegistry {
|
|
|
16
18
|
await instance.start();
|
|
17
19
|
if (instance.getName() !== types_1.Emulators.EXTENSIONS) {
|
|
18
20
|
const info = instance.getInfo();
|
|
19
|
-
await portUtils.waitForPortClosed(info.port, info.host);
|
|
21
|
+
await portUtils.waitForPortClosed(info.port, (0, utils_1.connectableHostname)(info.host));
|
|
20
22
|
}
|
|
21
23
|
}
|
|
22
24
|
static async stop(name) {
|
|
@@ -74,20 +76,12 @@ class EmulatorRegistry {
|
|
|
74
76
|
return this.INSTANCES.get(emulator);
|
|
75
77
|
}
|
|
76
78
|
static getInfo(emulator) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
var _a;
|
|
80
|
+
const info = (_a = EmulatorRegistry.get(emulator)) === null || _a === void 0 ? void 0 : _a.getInfo();
|
|
81
|
+
if (!info) {
|
|
79
82
|
return undefined;
|
|
80
83
|
}
|
|
81
|
-
return
|
|
82
|
-
}
|
|
83
|
-
static getInfoHostString(info) {
|
|
84
|
-
const { host, port } = info;
|
|
85
|
-
if (host.includes(":")) {
|
|
86
|
-
return `[${host}]:${port}`;
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
return `${host}:${port}`;
|
|
90
|
-
}
|
|
84
|
+
return Object.assign(Object.assign({}, info), { host: (0, utils_1.connectableHostname)(info.host) });
|
|
91
85
|
}
|
|
92
86
|
static url(emulator, req) {
|
|
93
87
|
const url = new URL("http://unknown/");
|
|
@@ -101,13 +95,7 @@ class EmulatorRegistry {
|
|
|
101
95
|
}
|
|
102
96
|
const info = EmulatorRegistry.getInfo(emulator);
|
|
103
97
|
if (info) {
|
|
104
|
-
if (info.host
|
|
105
|
-
url.hostname = "127.0.0.1";
|
|
106
|
-
}
|
|
107
|
-
else if (info.host === "::") {
|
|
108
|
-
url.hostname = "[::1]";
|
|
109
|
-
}
|
|
110
|
-
else if (info.host.includes(":")) {
|
|
98
|
+
if (info.host.includes(":")) {
|
|
111
99
|
url.hostname = `[${info.host}]`;
|
|
112
100
|
}
|
|
113
101
|
else {
|
|
@@ -120,6 +108,9 @@ class EmulatorRegistry {
|
|
|
120
108
|
}
|
|
121
109
|
return url;
|
|
122
110
|
}
|
|
111
|
+
static client(emulator, options = {}) {
|
|
112
|
+
return new apiv2_1.Client(Object.assign({ urlPrefix: EmulatorRegistry.url(emulator).toString(), auth: false }, options));
|
|
113
|
+
}
|
|
123
114
|
static set(emulator, instance) {
|
|
124
115
|
this.INSTANCES.set(emulator, instance);
|
|
125
116
|
}
|
|
@@ -129,4 +120,3 @@ class EmulatorRegistry {
|
|
|
129
120
|
}
|
|
130
121
|
exports.EmulatorRegistry = EmulatorRegistry;
|
|
131
122
|
EmulatorRegistry.INSTANCES = new Map();
|
|
132
|
-
//# sourceMappingURL=registry.js.map
|
|
@@ -187,7 +187,6 @@ function createCloudEndpoints(emulator) {
|
|
|
187
187
|
return res.json(new metadata_1.CloudStorageObjectMetadata(metadata));
|
|
188
188
|
});
|
|
189
189
|
gcloudStorageAPI.post("/b/:bucketId/o/:objectId/acl", async (req, res) => {
|
|
190
|
-
var _a, _b;
|
|
191
190
|
emulatorLogger_1.EmulatorLogger.forEmulator(types_1.Emulators.STORAGE).log("WARN_ONCE", "Cloud Storage ACLs are not supported in the Storage Emulator. All related methods will succeed, but have no effect.");
|
|
192
191
|
let getObjectResponse;
|
|
193
192
|
try {
|
|
@@ -207,11 +206,13 @@ function createCloudEndpoints(emulator) {
|
|
|
207
206
|
}
|
|
208
207
|
const { metadata } = getObjectResponse;
|
|
209
208
|
metadata.update({});
|
|
209
|
+
const selfLink = registry_1.EmulatorRegistry.url(types_1.Emulators.STORAGE);
|
|
210
|
+
selfLink.pathname = `/storage/v1/b/${metadata.bucket}/o/${encodeURIComponent(metadata.name)}/acl/allUsers`;
|
|
210
211
|
return res.json({
|
|
211
212
|
kind: "storage#objectAccessControl",
|
|
212
213
|
object: metadata.name,
|
|
213
214
|
id: `${req.params.bucketId}/${metadata.name}/${metadata.generation}/allUsers`,
|
|
214
|
-
selfLink:
|
|
215
|
+
selfLink: selfLink.toString(),
|
|
215
216
|
bucket: metadata.bucket,
|
|
216
217
|
entity: req.body.entity,
|
|
217
218
|
role: req.body.role,
|
|
@@ -222,10 +223,6 @@ function createCloudEndpoints(emulator) {
|
|
|
222
223
|
gcloudStorageAPI.post("/upload/storage/v1/b/:bucketId/o", async (req, res) => {
|
|
223
224
|
const uploadType = req.query.uploadType || req.header("X-Goog-Upload-Protocol");
|
|
224
225
|
if (uploadType === "resumable") {
|
|
225
|
-
const emulatorInfo = registry_1.EmulatorRegistry.getInfo(types_1.Emulators.STORAGE);
|
|
226
|
-
if (emulatorInfo === undefined) {
|
|
227
|
-
return res.sendStatus(500);
|
|
228
|
-
}
|
|
229
226
|
const name = getIncomingFileNameFromRequest(req.query, req.body);
|
|
230
227
|
if (name === undefined) {
|
|
231
228
|
res.sendStatus(400);
|
|
@@ -430,4 +427,3 @@ function getIncomingFileNameFromRequest(query, metadata) {
|
|
|
430
427
|
const name = ((_a = query === null || query === void 0 ? void 0 : query.name) === null || _a === void 0 ? void 0 : _a.toString()) || (metadata === null || metadata === void 0 ? void 0 : metadata.name);
|
|
431
428
|
return (name === null || name === void 0 ? void 0 : name.startsWith("/")) ? name.slice(1) : name;
|
|
432
429
|
}
|
|
433
|
-
//# sourceMappingURL=gcloud.js.map
|
|
@@ -6,7 +6,6 @@ const registry_1 = require("../registry");
|
|
|
6
6
|
const types_1 = require("../types");
|
|
7
7
|
const emulatorLogger_1 = require("../emulatorLogger");
|
|
8
8
|
const metadata_1 = require("./metadata");
|
|
9
|
-
const apiv2_1 = require("../../apiv2");
|
|
10
9
|
const STORAGE_V2_ACTION_MAP = {
|
|
11
10
|
finalize: "finalized",
|
|
12
11
|
metadataUpdate: "metadataUpdated",
|
|
@@ -17,16 +16,12 @@ class StorageCloudFunctions {
|
|
|
17
16
|
constructor(projectId) {
|
|
18
17
|
this.projectId = projectId;
|
|
19
18
|
this.logger = emulatorLogger_1.EmulatorLogger.forEmulator(types_1.Emulators.STORAGE);
|
|
20
|
-
this.multicastOrigin = "";
|
|
21
19
|
this.multicastPath = "";
|
|
22
20
|
this.enabled = false;
|
|
23
|
-
|
|
24
|
-
if (functionsEmulator) {
|
|
21
|
+
if (registry_1.EmulatorRegistry.isRunning(types_1.Emulators.FUNCTIONS)) {
|
|
25
22
|
this.enabled = true;
|
|
26
|
-
this.functionsEmulatorInfo = functionsEmulator.getInfo();
|
|
27
|
-
this.multicastOrigin = `http://${registry_1.EmulatorRegistry.getInfoHostString(this.functionsEmulatorInfo)}`;
|
|
28
23
|
this.multicastPath = `/functions/projects/${projectId}/trigger_multicast`;
|
|
29
|
-
this.client =
|
|
24
|
+
this.client = registry_1.EmulatorRegistry.client(types_1.Emulators.FUNCTIONS);
|
|
30
25
|
}
|
|
31
26
|
}
|
|
32
27
|
async dispatch(action, object) {
|
|
@@ -91,4 +86,3 @@ class StorageCloudFunctions {
|
|
|
91
86
|
}
|
|
92
87
|
}
|
|
93
88
|
exports.StorageCloudFunctions = StorageCloudFunctions;
|
|
94
|
-
//# sourceMappingURL=cloudFunctions.js.map
|
|
@@ -237,11 +237,12 @@ class OutgoingFirebaseMetadata {
|
|
|
237
237
|
exports.OutgoingFirebaseMetadata = OutgoingFirebaseMetadata;
|
|
238
238
|
class CloudStorageBucketMetadata {
|
|
239
239
|
constructor(id) {
|
|
240
|
-
var _a, _b;
|
|
241
240
|
this.kind = "storage#bucket";
|
|
242
241
|
this.name = id;
|
|
243
242
|
this.id = id;
|
|
244
|
-
|
|
243
|
+
const selfLink = registry_1.EmulatorRegistry.url(types_1.Emulators.STORAGE);
|
|
244
|
+
selfLink.pathname = `/v1/b/${this.id}`;
|
|
245
|
+
this.selfLink = selfLink.toString();
|
|
245
246
|
this.timeCreated = toSerializedDate(new Date());
|
|
246
247
|
this.updated = this.timeCreated;
|
|
247
248
|
this.projectNumber = "000000000000";
|
|
@@ -269,7 +270,6 @@ class CloudStorageObjectAccessControlMetadata {
|
|
|
269
270
|
exports.CloudStorageObjectAccessControlMetadata = CloudStorageObjectAccessControlMetadata;
|
|
270
271
|
class CloudStorageObjectMetadata {
|
|
271
272
|
constructor(metadata) {
|
|
272
|
-
var _a, _b, _c, _d;
|
|
273
273
|
this.kind = "storage#object";
|
|
274
274
|
this.name = metadata.name;
|
|
275
275
|
this.bucket = metadata.bucket;
|
|
@@ -311,8 +311,14 @@ class CloudStorageObjectMetadata {
|
|
|
311
311
|
this.crc32c = (0, crc_1.crc32cToString)(metadata.crc32c);
|
|
312
312
|
this.timeStorageClassUpdated = toSerializedDate(metadata.timeCreated);
|
|
313
313
|
this.id = `${metadata.bucket}/${metadata.name}/${metadata.generation}`;
|
|
314
|
-
|
|
315
|
-
|
|
314
|
+
const selfLink = registry_1.EmulatorRegistry.url(types_1.Emulators.STORAGE);
|
|
315
|
+
selfLink.pathname = `/storage/v1/b/${metadata.bucket}/o/${encodeURIComponent(metadata.name)}`;
|
|
316
|
+
this.selfLink = selfLink.toString();
|
|
317
|
+
const mediaLink = registry_1.EmulatorRegistry.url(types_1.Emulators.STORAGE);
|
|
318
|
+
mediaLink.pathname = `/download/storage/v1/b/${metadata.bucket}/o/${encodeURIComponent(metadata.name)}`;
|
|
319
|
+
mediaLink.searchParams.set("generation", metadata.generation.toString());
|
|
320
|
+
mediaLink.searchParams.set("alt", "media");
|
|
321
|
+
this.mediaLink = mediaLink.toString();
|
|
316
322
|
}
|
|
317
323
|
}
|
|
318
324
|
exports.CloudStorageObjectMetadata = CloudStorageObjectMetadata;
|
|
@@ -341,4 +347,3 @@ function generateETag(generation, metadatageneration) {
|
|
|
341
347
|
hash.update(`${generation}/${metadatageneration}`);
|
|
342
348
|
return hash.digest("base64").slice(0, -1);
|
|
343
349
|
}
|
|
344
|
-
//# sourceMappingURL=metadata.js.map
|