firebase-tools-with-isolate 13.29.1 → 14.10.1-1
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/README.md +53 -4
- package/lib/api.js +10 -2
- package/lib/appdistribution/client.js +2 -2
- package/lib/apphosting/backend.js +157 -55
- package/lib/apphosting/config.js +121 -101
- package/lib/apphosting/githubConnections.js +65 -100
- package/lib/apphosting/repo.js +22 -36
- package/lib/apphosting/rollout.js +5 -11
- package/lib/apphosting/secrets/dialogs.js +13 -11
- package/lib/apphosting/secrets/index.js +47 -5
- package/lib/apphosting/utils.js +1 -3
- package/lib/apphosting/yaml.js +35 -49
- package/lib/auth.js +23 -6
- package/lib/bin/cli.js +99 -0
- package/lib/bin/firebase.js +7 -123
- package/lib/bin/mcp.js +49 -0
- package/lib/checkValidTargetFilters.js +1 -0
- package/lib/command.js +3 -2
- package/lib/commands/appdistribution-distribute.js +1 -1
- package/lib/commands/appdistribution-groups-create.js +1 -1
- package/lib/commands/appdistribution-groups-delete.js +1 -1
- package/lib/commands/appdistribution-groups-list.js +2 -2
- package/lib/commands/appdistribution-testers-add.js +1 -1
- package/lib/commands/appdistribution-testers-list.js +3 -3
- package/lib/commands/appdistribution-testers-remove.js +1 -1
- package/lib/commands/apphosting-backends-create.js +3 -3
- package/lib/commands/apphosting-backends-delete.js +23 -27
- package/lib/commands/apphosting-backends-get.js +12 -12
- package/lib/commands/apphosting-backends-list.js +5 -5
- package/lib/commands/apphosting-builds-create.js +8 -2
- package/lib/commands/apphosting-builds-get.js +8 -1
- package/lib/commands/apphosting-rollouts-create.js +3 -3
- package/lib/commands/apphosting-rollouts-list.js +8 -2
- package/lib/commands/apphosting-secrets-access.js +1 -1
- package/lib/commands/apphosting-secrets-describe.js +2 -2
- package/lib/commands/apphosting-secrets-grantaccess.js +20 -10
- package/lib/commands/apphosting-secrets-set.js +27 -1
- package/lib/commands/apps-android-sha-create.js +1 -1
- package/lib/commands/apps-android-sha-delete.js +1 -1
- package/lib/commands/apps-android-sha-list.js +2 -2
- package/lib/commands/apps-create.js +4 -108
- package/lib/commands/apps-init.js +94 -0
- package/lib/commands/apps-list.js +1 -1
- package/lib/commands/apps-sdkconfig.js +5 -10
- package/lib/commands/auth-export.js +1 -1
- package/lib/commands/auth-import.js +1 -1
- package/lib/commands/database-import.js +4 -6
- package/lib/commands/database-instances-create.js +1 -1
- package/lib/commands/database-instances-list.js +1 -1
- package/lib/commands/database-profile.js +1 -2
- package/lib/commands/database-remove.js +4 -6
- package/lib/commands/database-set.js +6 -6
- package/lib/commands/database-settings-set.js +1 -1
- package/lib/commands/database-update.js +6 -6
- package/lib/commands/dataconnect-sdk-generate.js +5 -2
- package/lib/commands/dataconnect-services-list.js +2 -2
- package/lib/commands/dataconnect-sql-diff.js +2 -2
- package/lib/commands/dataconnect-sql-grant.js +3 -3
- package/lib/commands/dataconnect-sql-migrate.js +2 -2
- package/lib/commands/dataconnect-sql-setup.js +39 -0
- package/lib/commands/dataconnect-sql-shell.js +5 -7
- package/lib/commands/deploy.js +4 -3
- package/lib/commands/emulators-exec.js +1 -1
- package/lib/commands/emulators-start.js +4 -3
- package/lib/commands/experiments-list.js +1 -1
- package/lib/commands/ext-dev-deprecate.js +1 -0
- package/lib/commands/ext-dev-init.js +3 -12
- package/lib/commands/ext-dev-list.js +1 -1
- package/lib/commands/ext-dev-register.js +3 -5
- package/lib/commands/ext-dev-undeprecate.js +1 -2
- package/lib/commands/ext-dev-usage.js +4 -6
- package/lib/commands/ext-export.js +1 -2
- package/lib/commands/ext-install.js +3 -3
- package/lib/commands/ext-sdk-install.js +1 -0
- package/lib/commands/ext-update.js +1 -0
- package/lib/commands/firestore-backups-delete.js +3 -4
- package/lib/commands/firestore-backups-get.js +1 -1
- package/lib/commands/firestore-backups-list.js +2 -2
- package/lib/commands/firestore-backups-schedules-create.js +4 -4
- package/lib/commands/firestore-backups-schedules-delete.js +3 -4
- package/lib/commands/firestore-backups-schedules-list.js +2 -2
- package/lib/commands/firestore-backups-schedules-update.js +1 -1
- package/lib/commands/firestore-databases-create.js +6 -6
- package/lib/commands/firestore-databases-delete.js +3 -7
- package/lib/commands/firestore-databases-get.js +1 -1
- package/lib/commands/firestore-databases-list.js +1 -1
- package/lib/commands/firestore-databases-restore.js +5 -5
- package/lib/commands/firestore-databases-update.js +4 -4
- package/lib/commands/firestore-delete.js +13 -14
- package/lib/commands/firestore-indexes-list.js +4 -4
- package/lib/commands/firestore-locations.js +1 -1
- package/lib/commands/functions-artifacts-setpolicy.js +132 -0
- package/lib/commands/functions-config-export.js +6 -10
- package/lib/commands/functions-delete.js +5 -7
- package/lib/commands/functions-deletegcfartifacts.js +5 -5
- package/lib/commands/functions-list.js +24 -33
- package/lib/commands/functions-secrets-access.js +1 -1
- package/lib/commands/functions-secrets-describe.js +1 -1
- package/lib/commands/functions-secrets-destroy.js +10 -12
- package/lib/commands/functions-secrets-get.js +1 -1
- package/lib/commands/functions-secrets-prune.js +14 -15
- package/lib/commands/functions-secrets-set.js +14 -18
- package/lib/commands/hosting-channel-create.js +1 -2
- package/lib/commands/hosting-channel-delete.js +4 -4
- package/lib/commands/hosting-channel-list.js +1 -1
- package/lib/commands/hosting-channel-open.js +2 -3
- package/lib/commands/hosting-disable.js +5 -5
- package/lib/commands/hosting-sites-delete.js +4 -4
- package/lib/commands/hosting-sites-get.js +1 -1
- package/lib/commands/hosting-sites-list.js +1 -1
- package/lib/commands/index.js +7 -4
- package/lib/commands/init.js +54 -60
- package/lib/commands/internaltesting-frameworks-compose.js +1 -1
- package/lib/commands/login-use.js +2 -11
- package/lib/commands/login.js +10 -8
- package/lib/commands/logout.js +2 -3
- package/lib/commands/mcp.js +11 -0
- package/lib/commands/open.js +4 -2
- package/lib/commands/projects-create.js +1 -2
- package/lib/commands/projects-list.js +1 -1
- package/lib/commands/remoteconfig-get.js +1 -1
- package/lib/commands/remoteconfig-rollback.js +5 -5
- package/lib/commands/remoteconfig-versions-list.js +2 -2
- package/lib/commands/setup-emulators-database.js +1 -1
- package/lib/commands/setup-emulators-dataconnect.js +1 -1
- package/lib/commands/setup-emulators-firestore.js +1 -1
- package/lib/commands/setup-emulators-pubsub.js +1 -1
- package/lib/commands/setup-emulators-storage.js +1 -1
- package/lib/commands/setup-emulators-ui.js +1 -1
- package/lib/commands/use.js +115 -111
- package/lib/config.js +49 -33
- package/lib/crashlytics/buildToolsJarHelper.js +1 -1
- package/lib/crashlytics/listTopIssues.js +45 -0
- package/lib/dataconnect/build.js +61 -4
- package/lib/dataconnect/client.js +26 -17
- package/lib/dataconnect/cloudAICompanionClient.js +72 -0
- package/lib/dataconnect/dataplaneClient.js +19 -2
- package/lib/dataconnect/ensureApis.js +6 -3
- package/lib/dataconnect/fileUtils.js +39 -6
- package/lib/dataconnect/freeTrial.js +21 -9
- package/lib/dataconnect/graphqlError.js +56 -2
- package/lib/dataconnect/provisionCloudSql.js +23 -12
- package/lib/dataconnect/schemaMigration.js +46 -26
- package/lib/dataconnect/types.js +5 -1
- package/lib/defaultCredentials.js +12 -1
- package/lib/deploy/apphosting/args.js +2 -0
- package/lib/deploy/apphosting/deploy.js +77 -0
- package/lib/deploy/apphosting/index.js +9 -0
- package/lib/deploy/apphosting/prepare.js +138 -0
- package/lib/deploy/apphosting/release.js +56 -0
- package/lib/deploy/apphosting/util.js +65 -0
- package/lib/deploy/dataconnect/deploy.js +14 -7
- package/lib/deploy/dataconnect/prepare.js +3 -5
- package/lib/deploy/extensions/v2FunctionHelper.js +2 -1
- package/lib/deploy/firestore/deploy.js +50 -4
- package/lib/deploy/functions/build.js +1 -0
- package/lib/deploy/functions/checkIam.js +41 -6
- package/lib/deploy/functions/containerCleaner.js +17 -2
- package/lib/deploy/functions/ensure.js +2 -1
- package/lib/deploy/functions/params.js +10 -17
- package/lib/deploy/functions/prepare.js +51 -18
- package/lib/deploy/functions/prepareFunctionsUpload.js +9 -5
- package/lib/deploy/functions/prompts.js +24 -17
- package/lib/deploy/functions/release/fabricator.js +4 -4
- package/lib/deploy/functions/release/index.js +27 -9
- package/lib/deploy/functions/release/planner.js +1 -0
- package/lib/deploy/functions/runtimes/discovery/index.js +13 -5
- package/lib/deploy/functions/runtimes/discovery/v1alpha1.js +4 -4
- package/lib/deploy/functions/runtimes/python/index.js +4 -1
- package/lib/deploy/functions/runtimes/supported/types.js +17 -11
- package/lib/deploy/functions/services/firestore.js +23 -4
- package/lib/deploy/index.js +29 -10
- package/lib/deploy/lifecycleHooks.js +6 -12
- package/lib/emulator/ExpressBasedEmulator.js +1 -1
- package/lib/emulator/apphosting/config.js +15 -14
- package/lib/emulator/apphosting/index.js +2 -0
- package/lib/emulator/apphosting/serve.js +147 -10
- package/lib/emulator/auth/cloudFunctions.js +13 -1
- package/lib/emulator/auth/operations.js +2 -1
- package/lib/emulator/auth/widget_ui.js +2 -1
- package/lib/emulator/commandUtils.js +14 -20
- package/lib/emulator/constants.js +2 -0
- package/lib/emulator/controller.js +24 -9
- package/lib/emulator/dataconnect/pgliteServer.js +136 -45
- package/lib/emulator/dataconnectEmulator.js +34 -6
- package/lib/emulator/dataconnectToolkitController.js +5 -0
- package/lib/emulator/downloadableEmulatorInfo.json +81 -0
- package/lib/emulator/downloadableEmulators.js +28 -80
- package/lib/emulator/env.js +47 -1
- package/lib/emulator/extensionsEmulator.js +5 -3
- package/lib/emulator/functionsEmulator.js +6 -26
- package/lib/emulator/hub.js +5 -4
- package/lib/emulator/hubClient.js +5 -0
- package/lib/emulator/initEmulators.js +29 -15
- package/lib/emulator/ui.js +4 -8
- package/lib/ensureApiEnabled.js +32 -1
- package/lib/experiments.js +11 -12
- package/lib/extensions/askUserForEventsConfig.js +6 -15
- package/lib/extensions/askUserForParam.js +23 -52
- package/lib/extensions/change-log.js +1 -25
- package/lib/extensions/checkProjectBilling.js +3 -9
- package/lib/extensions/diagnose.js +3 -6
- package/lib/extensions/emulator/triggerHelper.js +4 -0
- package/lib/extensions/extensionsHelper.js +25 -31
- package/lib/extensions/listExtensions.js +1 -1
- package/lib/extensions/manifest.js +3 -7
- package/lib/extensions/paramHelper.js +11 -2
- package/lib/extensions/provisioningHelper.js +1 -1
- package/lib/extensions/tos.js +4 -2
- package/lib/extensions/utils.js +1 -10
- package/lib/firebaseConfigValidate.js +7 -5
- package/lib/firestore/delete.js +5 -4
- package/lib/firestore/pretty-print.js +1 -1
- package/lib/frameworks/angular/index.js +11 -6
- package/lib/frameworks/angular/utils.js +76 -47
- package/lib/frameworks/constants.js +1 -1
- package/lib/frameworks/index.js +6 -4
- package/lib/frameworks/next/index.js +7 -4
- package/lib/frameworks/utils.js +11 -3
- package/lib/frameworks/vite/index.js +2 -3
- package/lib/fsAsync.js +9 -2
- package/lib/fsutils.js +16 -1
- package/lib/functions/artifacts.js +196 -0
- package/lib/functions/secrets.js +15 -16
- package/lib/gcp/apphosting.js +13 -1
- package/lib/gcp/artifactregistry.js +27 -2
- package/lib/gcp/auth.js +113 -1
- package/lib/gcp/cloudbilling.js +12 -1
- package/lib/gcp/cloudfunctions.js +32 -4
- package/lib/gcp/cloudfunctionsv2.js +15 -9
- package/lib/gcp/cloudscheduler.js +2 -2
- package/lib/gcp/cloudsql/cloudsqladmin.js +32 -11
- package/lib/gcp/cloudsql/connect.js +21 -14
- package/lib/gcp/cloudsql/interactive.js +1 -1
- package/lib/gcp/cloudsql/permissions.js +46 -99
- package/lib/gcp/cloudsql/permissionsSetup.js +224 -0
- package/lib/gcp/computeEngine.js +19 -2
- package/lib/gcp/devConnect.js +6 -1
- package/lib/gcp/firestore.js +55 -16
- package/lib/gcp/iam.js +1 -5
- package/lib/gcp/proto.js +4 -3
- package/lib/gcp/run.js +18 -1
- package/lib/gcp/serviceusage.js +2 -1
- package/lib/gcp/storage.js +47 -1
- package/lib/gemini/fdcExperience.js +56 -0
- package/lib/gemini/types.js +2 -0
- package/lib/hosting/api.js +4 -0
- package/lib/hosting/implicitInit.js +7 -3
- package/lib/hosting/interactive.js +2 -3
- package/lib/index.js +1 -2
- package/lib/init/features/account.js +2 -4
- package/lib/init/features/apphosting.js +75 -6
- package/lib/init/features/database.js +63 -62
- package/lib/init/features/dataconnect/index.js +131 -85
- package/lib/init/features/dataconnect/sdk.js +73 -18
- package/lib/init/features/emulators.js +29 -46
- package/lib/init/features/firestore/index.js +79 -43
- package/lib/init/features/firestore/indexes.js +30 -45
- package/lib/init/features/firestore/rules.js +36 -62
- package/lib/init/features/functions/index.js +11 -16
- package/lib/init/features/functions/javascript.js +17 -30
- package/lib/init/features/functions/npm-dependencies.js +4 -8
- package/lib/init/features/functions/python.js +1 -3
- package/lib/init/features/functions/typescript.js +25 -43
- package/lib/init/features/genkit/index.js +111 -106
- package/lib/init/features/hosting/github.js +22 -52
- package/lib/init/features/hosting/index.js +37 -57
- package/lib/init/features/index.js +10 -5
- package/lib/init/features/project.js +18 -21
- package/lib/init/features/remoteconfig.js +5 -10
- package/lib/init/features/storage.js +30 -10
- package/lib/init/index.js +79 -24
- package/lib/logger.js +76 -3
- package/lib/management/apps.js +292 -7
- package/lib/management/projects.js +100 -52
- package/lib/mcp/errors.js +20 -0
- package/lib/mcp/index.js +227 -0
- package/lib/mcp/tool.js +12 -0
- package/lib/mcp/tools/apphosting/fetch_logs.js +68 -0
- package/lib/mcp/tools/apphosting/index.js +6 -0
- package/lib/mcp/tools/apphosting/list_backends.js +51 -0
- package/lib/mcp/tools/auth/disable_user.js +30 -0
- package/lib/mcp/tools/auth/get_user.js +38 -0
- package/lib/mcp/tools/auth/index.js +15 -0
- package/lib/mcp/tools/auth/list_users.js +36 -0
- package/lib/mcp/tools/auth/set_claims.js +43 -0
- package/lib/mcp/tools/auth/set_sms_region_policy.js +36 -0
- package/lib/mcp/tools/core/consult_assistant.js +28 -0
- package/lib/mcp/tools/core/create_android_sha.js +43 -0
- package/lib/mcp/tools/core/create_app.js +90 -0
- package/lib/mcp/tools/core/create_project.js +68 -0
- package/lib/mcp/tools/core/get_admin_sdk_config.js +26 -0
- package/lib/mcp/tools/core/get_environment.js +51 -0
- package/lib/mcp/tools/core/get_project.js +22 -0
- package/lib/mcp/tools/core/get_sdk_config.js +40 -0
- package/lib/mcp/tools/core/index.js +29 -0
- package/lib/mcp/tools/core/init.js +153 -0
- package/lib/mcp/tools/core/list_apps.js +34 -0
- package/lib/mcp/tools/core/list_projects.js +45 -0
- package/lib/mcp/tools/core/update_environment.js +55 -0
- package/lib/mcp/tools/crashlytics/index.js +5 -0
- package/lib/mcp/tools/crashlytics/list_top_issues.js +39 -0
- package/lib/mcp/tools/dataconnect/converter.js +60 -0
- package/lib/mcp/tools/dataconnect/emulator.js +16 -0
- package/lib/mcp/tools/dataconnect/execute_graphql.js +48 -0
- package/lib/mcp/tools/dataconnect/execute_graphql_read.js +48 -0
- package/lib/mcp/tools/dataconnect/execute_mutation.js +62 -0
- package/lib/mcp/tools/dataconnect/execute_query.js +62 -0
- package/lib/mcp/tools/dataconnect/generate_operation.js +34 -0
- package/lib/mcp/tools/dataconnect/generate_schema.js +26 -0
- package/lib/mcp/tools/dataconnect/get_connector.js +31 -0
- package/lib/mcp/tools/dataconnect/get_schema.js +31 -0
- package/lib/mcp/tools/dataconnect/index.js +23 -0
- package/lib/mcp/tools/dataconnect/list_services.js +23 -0
- package/lib/mcp/tools/firestore/converter.js +102 -0
- package/lib/mcp/tools/firestore/delete_document.js +50 -0
- package/lib/mcp/tools/firestore/get_documents.js +58 -0
- package/lib/mcp/tools/firestore/index.js +17 -0
- package/lib/mcp/tools/firestore/list_collections.js +36 -0
- package/lib/mcp/tools/firestore/query_collection.js +132 -0
- package/lib/mcp/tools/index.js +62 -0
- package/lib/mcp/tools/messaging/index.js +5 -0
- package/lib/mcp/tools/messaging/send_message.js +42 -0
- package/lib/mcp/tools/remoteconfig/get_template.js +27 -0
- package/lib/mcp/tools/remoteconfig/index.js +7 -0
- package/lib/mcp/tools/remoteconfig/publish_template.js +34 -0
- package/lib/mcp/tools/remoteconfig/rollback_template.js +29 -0
- package/lib/mcp/tools/rules/get_rules.js +29 -0
- package/lib/mcp/tools/rules/validate_rules.js +97 -0
- package/lib/mcp/tools/storage/get_download_url.js +40 -0
- package/lib/mcp/tools/storage/get_rules.js +26 -0
- package/lib/mcp/tools/storage/index.js +11 -0
- package/lib/mcp/types.js +13 -0
- package/lib/mcp/util.js +214 -0
- package/lib/mcp/util.test.js +468 -0
- package/lib/messaging/interfaces.js +2 -0
- package/lib/messaging/sendMessage.js +48 -0
- package/lib/operation-poller.js +3 -1
- package/lib/profileReport.js +1 -1
- package/lib/prompt.js +86 -54
- package/lib/remoteconfig/publish.js +39 -0
- package/lib/requireAuth.js +2 -2
- package/lib/requireTosAcceptance.js +4 -0
- package/lib/rulesDeploy.js +10 -15
- package/lib/track.js +7 -37
- package/lib/utils.js +28 -41
- package/lib/vsCodeUtils.js +7 -3
- package/package.json +31 -15
- package/schema/connector-yaml.json +12 -0
- package/schema/dataconnect-yaml.json +5 -0
- package/schema/extension-yaml.json +17 -4
- package/schema/firebase-config.json +1117 -2121
- package/standalone/package-lock.json +1255 -992
- package/standalone/package.json +1 -1
- package/templates/dataconnect-prompts/operation-generation-cursor-windsurf-rule.txt +273 -0
- package/templates/dataconnect-prompts/schema-generation-cursor-windsurf-rule.txt +653 -0
- package/templates/genkit/firebase.0.9.0.template +1 -1
- package/templates/genkit/firebase.1.0.0.template +71 -0
- package/templates/init/dataconnect/connector.yaml +4 -1
- package/templates/init/dataconnect/dataconnect.yaml +1 -1
- package/templates/init/dataconnect/mutations.gql +9 -26
- package/templates/init/dataconnect/queries.gql +9 -14
- package/templates/init/dataconnect/schema.gql +28 -21
- package/templates/init/firestore/firestore.rules +2 -0
- package/templates/init/functions/javascript/index.js +14 -1
- package/templates/init/functions/javascript/package.lint.json +1 -1
- package/templates/init/functions/javascript/package.nolint.json +1 -1
- package/templates/init/functions/python/_gitignore +6 -1
- package/templates/init/functions/python/main.py +8 -0
- package/templates/init/functions/typescript/index.ts +14 -1
- package/templates/init/functions/typescript/package.lint.json +2 -2
- package/templates/init/functions/typescript/package.nolint.json +3 -3
- package/lib/commands/apphosting-config-export.js +0 -28
- package/lib/commands/experimental-functions-shell.js +0 -13
- package/lib/emulator/dataconnect/pg-gateway/auth/base-auth-flow.js +0 -11
- package/lib/emulator/dataconnect/pg-gateway/auth/cert.js +0 -58
- package/lib/emulator/dataconnect/pg-gateway/auth/index.js +0 -22
- package/lib/emulator/dataconnect/pg-gateway/auth/md5.js +0 -124
- package/lib/emulator/dataconnect/pg-gateway/auth/password.js +0 -54
- package/lib/emulator/dataconnect/pg-gateway/auth/sasl/sasl-mechanism.js +0 -34
- package/lib/emulator/dataconnect/pg-gateway/auth/sasl/scram-sha-256.js +0 -270
- package/lib/emulator/dataconnect/pg-gateway/backend-error.js +0 -75
- package/lib/emulator/dataconnect/pg-gateway/buffer-reader.js +0 -54
- package/lib/emulator/dataconnect/pg-gateway/buffer-writer.js +0 -79
- package/lib/emulator/dataconnect/pg-gateway/connection.js +0 -315
- package/lib/emulator/dataconnect/pg-gateway/connection.types.js +0 -8
- package/lib/emulator/dataconnect/pg-gateway/crypto.js +0 -40
- package/lib/emulator/dataconnect/pg-gateway/duplex.js +0 -53
- package/lib/emulator/dataconnect/pg-gateway/index.js +0 -27
- package/lib/emulator/dataconnect/pg-gateway/message-buffer.js +0 -82
- package/lib/emulator/dataconnect/pg-gateway/message-codes.js +0 -52
- package/lib/emulator/dataconnect/pg-gateway/platforms/node/index.js +0 -16
- package/lib/emulator/dataconnect/pg-gateway/polyfills/readable-stream-async-iterator.js +0 -35
- package/lib/emulator/dataconnect/pg-gateway/utils.js +0 -40
- package/templates/setup/web.js +0 -5
- /package/lib/{emulator/dataconnect/pg-gateway/auth/trust.js → dataconnect/cloudAICompanionTypes.js} +0 -0
package/lib/prompt.js
CHANGED
|
@@ -1,70 +1,102 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const inquirer = require("inquirer");
|
|
5
|
-
const fsutils_1 = require("./fsutils");
|
|
3
|
+
exports.search = exports.password = exports.number = exports.select = exports.checkbox = exports.confirm = exports.input = exports.guard = exports.Separator = void 0;
|
|
4
|
+
const inquirer = require("@inquirer/prompts");
|
|
6
5
|
const error_1 = require("./error");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
var prompts_1 = require("@inquirer/prompts");
|
|
7
|
+
Object.defineProperty(exports, "Separator", { enumerable: true, get: function () { return prompts_1.Separator; } });
|
|
8
|
+
function guard(opts) {
|
|
9
|
+
if (!opts.nonInteractive) {
|
|
10
|
+
return { shouldReturn: false, value: undefined };
|
|
11
|
+
}
|
|
12
|
+
if (typeof opts.default !== "undefined") {
|
|
13
|
+
return { shouldReturn: true, value: opts.default };
|
|
14
|
+
}
|
|
15
|
+
throw new error_1.FirebaseError(`Question "${opts.message}" does not have a default and cannot be answered in non-interactive mode`);
|
|
16
|
+
}
|
|
17
|
+
exports.guard = guard;
|
|
18
|
+
async function input(opts) {
|
|
19
|
+
if (typeof opts === "string") {
|
|
20
|
+
opts = { message: opts };
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
const { shouldReturn, value } = guard(opts);
|
|
24
|
+
if (shouldReturn) {
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return inquirer.input(opts);
|
|
29
|
+
}
|
|
30
|
+
exports.input = input;
|
|
31
|
+
async function confirm(opts) {
|
|
32
|
+
if (typeof opts === "string") {
|
|
33
|
+
opts = { message: opts };
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
if (opts.force) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
const { shouldReturn, value } = guard(opts);
|
|
40
|
+
if (shouldReturn) {
|
|
41
|
+
return value;
|
|
14
42
|
}
|
|
15
43
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
44
|
+
return inquirer.confirm(opts);
|
|
45
|
+
}
|
|
46
|
+
exports.confirm = confirm;
|
|
47
|
+
async function checkbox(opts) {
|
|
48
|
+
const { shouldReturn, value } = guard(opts);
|
|
49
|
+
if (shouldReturn) {
|
|
50
|
+
return value;
|
|
21
51
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
52
|
+
return inquirer.checkbox({
|
|
53
|
+
...opts,
|
|
54
|
+
loop: true,
|
|
25
55
|
});
|
|
26
|
-
return answers;
|
|
27
56
|
}
|
|
28
|
-
exports.
|
|
29
|
-
async function
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
57
|
+
exports.checkbox = checkbox;
|
|
58
|
+
async function select(opts) {
|
|
59
|
+
const { shouldReturn, value } = guard(opts);
|
|
60
|
+
if (shouldReturn) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
return inquirer.select({
|
|
64
|
+
...opts,
|
|
65
|
+
loop: false,
|
|
66
|
+
});
|
|
33
67
|
}
|
|
34
|
-
exports.
|
|
35
|
-
async function
|
|
36
|
-
if (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
68
|
+
exports.select = select;
|
|
69
|
+
async function number(opts) {
|
|
70
|
+
if (typeof opts === "string") {
|
|
71
|
+
opts = { message: opts };
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
const { shouldReturn, value } = guard(opts);
|
|
75
|
+
if (shouldReturn) {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
43
78
|
}
|
|
44
|
-
|
|
45
|
-
|
|
79
|
+
return await inquirer.number({ required: true, ...opts });
|
|
80
|
+
}
|
|
81
|
+
exports.number = number;
|
|
82
|
+
async function password(opts) {
|
|
83
|
+
if (typeof opts === "string") {
|
|
84
|
+
opts = { message: opts };
|
|
46
85
|
}
|
|
47
86
|
else {
|
|
48
|
-
|
|
87
|
+
guard(opts);
|
|
49
88
|
}
|
|
89
|
+
return inquirer.password({
|
|
90
|
+
...opts,
|
|
91
|
+
mask: "",
|
|
92
|
+
});
|
|
50
93
|
}
|
|
51
|
-
exports.
|
|
52
|
-
async function
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
message: args.message,
|
|
57
|
-
}));
|
|
58
|
-
if ((0, fsutils_1.fileExistsSync)(target)) {
|
|
59
|
-
logger_1.logger.error(`Expected a directory, but ${target} is a file. Please provide a path to a directory.`);
|
|
60
|
-
}
|
|
61
|
-
else if (!(0, fsutils_1.dirExistsSync)(target)) {
|
|
62
|
-
logger_1.logger.error(`Directory ${target} not found. Please provide a path to a directory`);
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
dir = target;
|
|
66
|
-
}
|
|
94
|
+
exports.password = password;
|
|
95
|
+
async function search(opts) {
|
|
96
|
+
const { shouldReturn, value } = guard(opts);
|
|
97
|
+
if (shouldReturn) {
|
|
98
|
+
return value;
|
|
67
99
|
}
|
|
68
|
-
return
|
|
100
|
+
return inquirer.search(opts);
|
|
69
101
|
}
|
|
70
|
-
exports.
|
|
102
|
+
exports.search = search;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.publishTemplate = void 0;
|
|
4
|
+
const api_1 = require("../api");
|
|
5
|
+
const apiv2_1 = require("../apiv2");
|
|
6
|
+
const logger_1 = require("../logger");
|
|
7
|
+
const error_1 = require("../error");
|
|
8
|
+
const TIMEOUT = 30000;
|
|
9
|
+
const apiClient = new apiv2_1.Client({
|
|
10
|
+
urlPrefix: (0, api_1.remoteConfigApiOrigin)(),
|
|
11
|
+
apiVersion: "v1",
|
|
12
|
+
});
|
|
13
|
+
async function publishTemplate(projectId, template, options) {
|
|
14
|
+
try {
|
|
15
|
+
let ifMatch = template.etag;
|
|
16
|
+
if (options && options.force === true) {
|
|
17
|
+
ifMatch = "*";
|
|
18
|
+
}
|
|
19
|
+
const requestBody = {
|
|
20
|
+
conditions: template.conditions,
|
|
21
|
+
parameters: template.parameters,
|
|
22
|
+
parameterGroups: template.parameterGroups,
|
|
23
|
+
version: template.version,
|
|
24
|
+
};
|
|
25
|
+
const res = await apiClient.request({
|
|
26
|
+
method: "PUT",
|
|
27
|
+
path: `/projects/${projectId}/remoteConfig`,
|
|
28
|
+
timeout: TIMEOUT,
|
|
29
|
+
headers: { "If-Match": ifMatch },
|
|
30
|
+
body: JSON.stringify(requestBody),
|
|
31
|
+
});
|
|
32
|
+
return res.body;
|
|
33
|
+
}
|
|
34
|
+
catch (err) {
|
|
35
|
+
logger_1.logger.debug(err.message);
|
|
36
|
+
throw new error_1.FirebaseError(`Failed to publish Firebase Remote Config template for project ${projectId}. `, { original: err });
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.publishTemplate = publishTemplate;
|
package/lib/requireAuth.js
CHANGED
|
@@ -45,7 +45,7 @@ async function autoAuth(options, authScopes) {
|
|
|
45
45
|
(0, auth_1.setGlobalDefaultAccount)(activeAccount);
|
|
46
46
|
options.projectId = await client.getProjectId();
|
|
47
47
|
}
|
|
48
|
-
return clientEmail;
|
|
48
|
+
return clientEmail || null;
|
|
49
49
|
}
|
|
50
50
|
async function refreshAuth() {
|
|
51
51
|
if (!lastOptions) {
|
|
@@ -86,7 +86,7 @@ async function requireAuth(options) {
|
|
|
86
86
|
tokenOpt = tokenOpt || process.env.FIREBASE_TOKEN;
|
|
87
87
|
if (tokenOpt) {
|
|
88
88
|
(0, auth_1.setRefreshToken)(tokenOpt);
|
|
89
|
-
return;
|
|
89
|
+
return null;
|
|
90
90
|
}
|
|
91
91
|
if (!user || !tokens) {
|
|
92
92
|
throw new error_1.FirebaseError(AUTH_ERROR_MESSAGE);
|
|
@@ -4,6 +4,7 @@ exports.requireTosAcceptance = void 0;
|
|
|
4
4
|
const error_1 = require("./error");
|
|
5
5
|
const firedata_1 = require("./gcp/firedata");
|
|
6
6
|
const api_1 = require("./api");
|
|
7
|
+
const auth_1 = require("./auth");
|
|
7
8
|
const consoleLandingPage = new Map([
|
|
8
9
|
[firedata_1.APPHOSTING_TOS_ID, `${(0, api_1.consoleOrigin)()}/project/_/apphosting`],
|
|
9
10
|
[firedata_1.DATA_CONNECT_TOS_ID, `${(0, api_1.consoleOrigin)()}/project/_/dataconnect`],
|
|
@@ -13,6 +14,9 @@ function requireTosAcceptance(tosId) {
|
|
|
13
14
|
}
|
|
14
15
|
exports.requireTosAcceptance = requireTosAcceptance;
|
|
15
16
|
async function requireTos(tosId) {
|
|
17
|
+
if (!(0, auth_1.loggedIn)()) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
16
20
|
const res = await (0, firedata_1.getTosStatus)();
|
|
17
21
|
if ((0, firedata_1.isProductTosAccepted)(res, tosId)) {
|
|
18
22
|
return;
|
package/lib/rulesDeploy.js
CHANGED
|
@@ -71,13 +71,11 @@ class RulesDeploy {
|
|
|
71
71
|
if (await (0, resourceManager_1.serviceAccountHasRoles)(projectNumber, saEmail, [CROSS_SERVICE_RULES_ROLE], true)) {
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
|
-
const addRole =
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
default: true,
|
|
80
|
-
}, this.options));
|
|
74
|
+
const addRole = await (0, prompt_1.confirm)({
|
|
75
|
+
message: `Cloud Storage for Firebase needs an IAM Role to use cross-service rules. Grant the new role?`,
|
|
76
|
+
default: true,
|
|
77
|
+
force: this.options.force,
|
|
78
|
+
});
|
|
81
79
|
if (addRole) {
|
|
82
80
|
await (0, resourceManager_1.addServiceAccountToRoles)(projectNumber, saEmail, [CROSS_SERVICE_RULES_ROLE], true);
|
|
83
81
|
utils.logLabeledBullet(RulesetType[this.type], "updated service account for cross-service rules...");
|
|
@@ -118,14 +116,11 @@ class RulesDeploy {
|
|
|
118
116
|
utils.logLabeledBullet(RulesetType[this.type], "quota exceeded error while uploading rules");
|
|
119
117
|
const history = await gcp.rules.listAllRulesets(this.options.project);
|
|
120
118
|
if (history.length > RULESET_COUNT_LIMIT) {
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
default: false,
|
|
127
|
-
}, this.options));
|
|
128
|
-
if (confirm) {
|
|
119
|
+
const confirmed = await (0, prompt_1.confirm)({
|
|
120
|
+
message: `You have ${history.length} rules, do you want to delete the oldest ${RULESETS_TO_GC} to free up space?`,
|
|
121
|
+
force: this.options.force,
|
|
122
|
+
});
|
|
123
|
+
if (confirmed) {
|
|
129
124
|
const releases = await gcp.rules.listAllReleases(this.options.project);
|
|
130
125
|
const unreleased = history.filter((ruleset) => {
|
|
131
126
|
return !releases.find((release) => release.rulesetName === ruleset.name);
|
package/lib/track.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.cliSession = exports.vscodeSession = exports.emulatorSession = exports.trackVSCode = exports.trackEmulator = exports.trackGA4 = exports.usageEnabled = exports.GA4_PROPERTIES = void 0;
|
|
4
4
|
const node_fetch_1 = require("node-fetch");
|
|
5
|
-
const ua = require("universal-analytics");
|
|
6
5
|
const uuid_1 = require("uuid");
|
|
7
6
|
const auth_1 = require("./auth");
|
|
8
7
|
const configstore_1 = require("./configstore");
|
|
@@ -26,7 +25,7 @@ exports.GA4_PROPERTIES = {
|
|
|
26
25
|
},
|
|
27
26
|
};
|
|
28
27
|
function usageEnabled() {
|
|
29
|
-
return !!process.env.IS_FIREBASE_CLI && !!configstore_1.configstore.get("usage");
|
|
28
|
+
return ((!!process.env.IS_FIREBASE_CLI || !!process.env.IS_FIREBASE_MCP) && !!configstore_1.configstore.get("usage"));
|
|
30
29
|
}
|
|
31
30
|
exports.usageEnabled = usageEnabled;
|
|
32
31
|
const GA4_USER_PROPS = {
|
|
@@ -42,6 +41,9 @@ const GA4_USER_PROPS = {
|
|
|
42
41
|
firepit_version: {
|
|
43
42
|
value: process.env.FIREPIT_VERSION || "none",
|
|
44
43
|
},
|
|
44
|
+
is_firebase_studio: {
|
|
45
|
+
value: process.env.MONOSPACE_ENV ?? "false",
|
|
46
|
+
},
|
|
45
47
|
};
|
|
46
48
|
async function trackGA4(eventName, params, duration = 1) {
|
|
47
49
|
const session = cliSession();
|
|
@@ -163,7 +165,7 @@ function session(propertyName) {
|
|
|
163
165
|
const validateOnly = !!process.env.FIREBASE_CLI_MP_VALIDATE;
|
|
164
166
|
if (!usageEnabled() && propertyName !== "vscode") {
|
|
165
167
|
if (validateOnly) {
|
|
166
|
-
logger_1.logger.
|
|
168
|
+
logger_1.logger.debug("Google Analytics is DISABLED. To enable, (re)login and opt in to collection.");
|
|
167
169
|
}
|
|
168
170
|
return;
|
|
169
171
|
}
|
|
@@ -190,7 +192,7 @@ function isDebugMode() {
|
|
|
190
192
|
if (account?.user.email.endsWith("@google.com")) {
|
|
191
193
|
try {
|
|
192
194
|
require("../tsconfig.json");
|
|
193
|
-
logger_1.logger.
|
|
195
|
+
logger_1.logger.debug(`Using Google Analytics in DEBUG mode. Emulators (+ UI) events will be shown in GA Debug View only.`);
|
|
194
196
|
return true;
|
|
195
197
|
}
|
|
196
198
|
catch {
|
|
@@ -198,35 +200,3 @@ function isDebugMode() {
|
|
|
198
200
|
}
|
|
199
201
|
return false;
|
|
200
202
|
}
|
|
201
|
-
const FIREBASE_ANALYTICS_UA = process.env.FIREBASE_ANALYTICS_UA || "UA-29174744-3";
|
|
202
|
-
let visitor;
|
|
203
|
-
function ensureUAVisitor() {
|
|
204
|
-
if (!visitor) {
|
|
205
|
-
let anonId = configstore_1.configstore.get("analytics-uuid");
|
|
206
|
-
if (!anonId) {
|
|
207
|
-
anonId = (0, uuid_1.v4)();
|
|
208
|
-
configstore_1.configstore.set("analytics-uuid", anonId);
|
|
209
|
-
}
|
|
210
|
-
visitor = ua(FIREBASE_ANALYTICS_UA, anonId, {
|
|
211
|
-
strictCidFormat: false,
|
|
212
|
-
https: true,
|
|
213
|
-
});
|
|
214
|
-
visitor.set("cd1", process.platform);
|
|
215
|
-
visitor.set("cd2", process.version);
|
|
216
|
-
visitor.set("cd3", process.env.FIREPIT_VERSION || "none");
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
function track(action, label, duration = 0) {
|
|
220
|
-
ensureUAVisitor();
|
|
221
|
-
return new Promise((resolve) => {
|
|
222
|
-
if (usageEnabled() && configstore_1.configstore.get("tokens")) {
|
|
223
|
-
visitor.event("Firebase CLI " + pkg.version, action, label, duration).send(() => {
|
|
224
|
-
resolve();
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
else {
|
|
228
|
-
resolve();
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
exports.track = track;
|
package/lib/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.openInBrowser = exports.connectableHostname = exports.randomInt = exports.debounce = exports.last = exports.cloneDeep = exports.groupBy = exports.assertIsStringOrUndefined = exports.assertIsNumber = exports.assertIsString = exports.thirtyDaysFromNow = exports.isRunningInWSL = exports.isCloudEnvironment = exports.datetimeString = exports.createDestroyer = exports.sleep = exports.promiseWithSpinner = exports.
|
|
4
|
-
exports.updateOrCreateGitignore = exports.readSecretValue = exports.generateId = exports.wrappedSafeLoad = exports.readFileFromDirectory =
|
|
3
|
+
exports.getHostnameFromUrl = exports.openInBrowserPopup = exports.openInBrowser = exports.connectableHostname = exports.randomInt = exports.debounce = exports.last = exports.cloneDeep = exports.groupBy = exports.assertIsStringOrUndefined = exports.assertIsNumber = exports.assertIsString = exports.thirtyDaysFromNow = exports.isRunningInWSL = exports.isCloudEnvironment = exports.datetimeString = exports.createDestroyer = exports.sleep = exports.promiseWithSpinner = exports.tryParse = exports.promiseProps = exports.withTimeout = exports.promiseWhile = exports.promiseAllSettled = exports.getFunctionsEventProvider = exports.endpoint = exports.makeActiveProject = exports.streamToString = exports.stringToStream = exports.explainStdin = exports.allSettled = exports.reject = exports.logLabeledError = exports.logLabeledWarning = exports.logWarning = exports.logLabeledBullet = exports.logBullet = exports.logLabeledSuccess = exports.logSuccess = exports.addSubdomain = exports.addDatabaseNamespace = exports.getDatabaseViewDataUrl = exports.getDatabaseUrl = exports.envOverride = exports.setVSCodeEnvVars = exports.getInheritedOption = exports.consoleUrl = exports.vscodeEnvVars = exports.envOverrides = exports.IS_WINDOWS = void 0;
|
|
4
|
+
exports.promptForDirectory = exports.updateOrCreateGitignore = exports.readSecretValue = exports.generateId = exports.wrappedSafeLoad = exports.readFileFromDirectory = void 0;
|
|
5
5
|
const fs = require("fs-extra");
|
|
6
6
|
const tty = require("tty");
|
|
7
7
|
const path = require("node:path");
|
|
@@ -14,10 +14,7 @@ const open = require("open");
|
|
|
14
14
|
const ora = require("ora");
|
|
15
15
|
const process = require("process");
|
|
16
16
|
const stream_1 = require("stream");
|
|
17
|
-
const winston = require("winston");
|
|
18
|
-
const triple_beam_1 = require("triple-beam");
|
|
19
17
|
const assert_1 = require("assert");
|
|
20
|
-
const node_util_1 = require("node:util");
|
|
21
18
|
const portfinder_1 = require("portfinder");
|
|
22
19
|
const configstore_1 = require("./configstore");
|
|
23
20
|
const error_1 = require("./error");
|
|
@@ -25,6 +22,7 @@ const logger_1 = require("./logger");
|
|
|
25
22
|
const prompt_1 = require("./prompt");
|
|
26
23
|
const templates_1 = require("./templates");
|
|
27
24
|
const vsCodeUtils_1 = require("./vsCodeUtils");
|
|
25
|
+
const fsutils_1 = require("./fsutils");
|
|
28
26
|
exports.IS_WINDOWS = process.platform === "win32";
|
|
29
27
|
const SUCCESS_CHAR = exports.IS_WINDOWS ? "+" : "✔";
|
|
30
28
|
const WARNING_CHAR = exports.IS_WINDOWS ? "!" : "⚠";
|
|
@@ -286,18 +284,6 @@ async function promiseProps(obj) {
|
|
|
286
284
|
return Promise.all(promises).then(() => resultObj);
|
|
287
285
|
}
|
|
288
286
|
exports.promiseProps = promiseProps;
|
|
289
|
-
function tryStringify(value) {
|
|
290
|
-
if (typeof value === "string") {
|
|
291
|
-
return value;
|
|
292
|
-
}
|
|
293
|
-
try {
|
|
294
|
-
return JSON.stringify(value);
|
|
295
|
-
}
|
|
296
|
-
catch {
|
|
297
|
-
return value;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
exports.tryStringify = tryStringify;
|
|
301
287
|
function tryParse(value) {
|
|
302
288
|
if (typeof value !== "string") {
|
|
303
289
|
return value;
|
|
@@ -310,26 +296,6 @@ function tryParse(value) {
|
|
|
310
296
|
}
|
|
311
297
|
}
|
|
312
298
|
exports.tryParse = tryParse;
|
|
313
|
-
function setupLoggers() {
|
|
314
|
-
if (process.env.DEBUG) {
|
|
315
|
-
logger_1.logger.add(new winston.transports.Console({
|
|
316
|
-
level: "debug",
|
|
317
|
-
format: winston.format.printf((info) => {
|
|
318
|
-
const segments = [info.message, ...(info[triple_beam_1.SPLAT] || [])].map(tryStringify);
|
|
319
|
-
return `${(0, node_util_1.stripVTControlCharacters)(segments.join(" "))}`;
|
|
320
|
-
}),
|
|
321
|
-
}));
|
|
322
|
-
}
|
|
323
|
-
else if (process.env.IS_FIREBASE_CLI) {
|
|
324
|
-
logger_1.logger.add(new winston.transports.Console({
|
|
325
|
-
level: "info",
|
|
326
|
-
format: winston.format.printf((info) => [info.message, ...(info[triple_beam_1.SPLAT] || [])]
|
|
327
|
-
.filter((chunk) => typeof chunk === "string")
|
|
328
|
-
.join(" ")),
|
|
329
|
-
}));
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
exports.setupLoggers = setupLoggers;
|
|
333
299
|
async function promiseWithSpinner(action, message) {
|
|
334
300
|
const spinner = ora(message).start();
|
|
335
301
|
let data;
|
|
@@ -577,10 +543,7 @@ function generateId(n = 6) {
|
|
|
577
543
|
exports.generateId = generateId;
|
|
578
544
|
function readSecretValue(prompt, dataFile) {
|
|
579
545
|
if ((!dataFile || dataFile === "-") && tty.isatty(0)) {
|
|
580
|
-
return (0, prompt_1.
|
|
581
|
-
type: "password",
|
|
582
|
-
message: prompt,
|
|
583
|
-
});
|
|
546
|
+
return (0, prompt_1.password)({ message: prompt });
|
|
584
547
|
}
|
|
585
548
|
let input = 0;
|
|
586
549
|
if (dataFile && dataFile !== "-") {
|
|
@@ -612,3 +575,27 @@ function updateOrCreateGitignore(dirPath, entries) {
|
|
|
612
575
|
fs.writeFileSync(gitignorePath, content);
|
|
613
576
|
}
|
|
614
577
|
exports.updateOrCreateGitignore = updateOrCreateGitignore;
|
|
578
|
+
async function promptForDirectory(args) {
|
|
579
|
+
let dir = "";
|
|
580
|
+
while (!dir) {
|
|
581
|
+
const promptPath = await (0, prompt_1.input)(args.message);
|
|
582
|
+
let target;
|
|
583
|
+
if (args.relativeTo) {
|
|
584
|
+
target = path.resolve(args.relativeTo, promptPath);
|
|
585
|
+
}
|
|
586
|
+
else {
|
|
587
|
+
target = args.config.path(promptPath);
|
|
588
|
+
}
|
|
589
|
+
if ((0, fsutils_1.fileExistsSync)(target)) {
|
|
590
|
+
logger_1.logger.error(`Expected a directory, but ${target} is a file. Please provide a path to a directory.`);
|
|
591
|
+
}
|
|
592
|
+
else if (!(0, fsutils_1.dirExistsSync)(target)) {
|
|
593
|
+
logger_1.logger.error(`Directory ${target} not found. Please provide a path to a directory`);
|
|
594
|
+
}
|
|
595
|
+
else {
|
|
596
|
+
dir = target;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
return dir;
|
|
600
|
+
}
|
|
601
|
+
exports.promptForDirectory = promptForDirectory;
|
package/lib/vsCodeUtils.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isVSCodeExtension = void 0;
|
|
4
|
-
|
|
3
|
+
exports.setIsVSCodeExtension = exports.isVSCodeExtension = void 0;
|
|
4
|
+
let _IS_WEBPACKED_FOR_VSCE = false;
|
|
5
5
|
function isVSCodeExtension() {
|
|
6
|
-
return
|
|
6
|
+
return _IS_WEBPACKED_FOR_VSCE;
|
|
7
7
|
}
|
|
8
8
|
exports.isVSCodeExtension = isVSCodeExtension;
|
|
9
|
+
function setIsVSCodeExtension(v) {
|
|
10
|
+
_IS_WEBPACKED_FOR_VSCE = v;
|
|
11
|
+
}
|
|
12
|
+
exports.setIsVSCodeExtension = setIsVSCodeExtension;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "firebase-tools-with-isolate",
|
|
3
3
|
"description": "Command-Line Interface for Firebase with monorepo support",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "14.10.1-1",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"firebase": "lib/bin/firebase.js"
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"test": "npm run lint:quiet && npm run test:compile && npm run mocha",
|
|
29
29
|
"test:client-integration": "bash ./scripts/client-integration-tests/run.sh",
|
|
30
30
|
"test:compile": "tsc --project tsconfig.compile.json",
|
|
31
|
+
"test:management": "npm run lint:quiet && npm run test:compile && nyc mocha 'src/management/*.spec.{ts,js}'",
|
|
31
32
|
"test:dataconnect-deploy": "bash ./scripts/dataconnect-test/run.sh",
|
|
32
33
|
"test:dataconnect-emulator": "bash ./scripts/dataconnect-emulator-tests/run.sh",
|
|
33
34
|
"test:all-emulators": "npm run test:emulator && npm run test:extensions-emulator && npm run test:import-export && npm run test:storage-emulator-integration",
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
],
|
|
71
72
|
"preferGlobal": true,
|
|
72
73
|
"engines": {
|
|
73
|
-
"node": ">=
|
|
74
|
+
"node": ">=20.0.0 || >=22.0.0"
|
|
74
75
|
},
|
|
75
76
|
"author": "Firebase (https://firebase.google.com/)",
|
|
76
77
|
"license": "MIT",
|
|
@@ -98,38 +99,41 @@
|
|
|
98
99
|
]
|
|
99
100
|
},
|
|
100
101
|
"dependencies": {
|
|
101
|
-
"@electric-sql/pglite": "^0.
|
|
102
|
+
"@electric-sql/pglite": "^0.3.3",
|
|
103
|
+
"@electric-sql/pglite-tools": "^0.2.8",
|
|
102
104
|
"@google-cloud/cloud-sql-connector": "^1.3.3",
|
|
103
105
|
"@google-cloud/pubsub": "^4.5.0",
|
|
106
|
+
"@inquirer/prompts": "^7.4.0",
|
|
107
|
+
"@modelcontextprotocol/sdk": "^1.10.2",
|
|
104
108
|
"abort-controller": "^3.0.0",
|
|
105
|
-
"ajv": "^
|
|
109
|
+
"ajv": "^8.17.1",
|
|
110
|
+
"ajv-formats": "3.0.1",
|
|
106
111
|
"archiver": "^7.0.0",
|
|
107
112
|
"async-lock": "1.4.1",
|
|
108
113
|
"body-parser": "^1.19.0",
|
|
109
114
|
"chokidar": "^3.6.0",
|
|
110
115
|
"cjson": "^0.3.1",
|
|
111
|
-
"cli-
|
|
116
|
+
"cli-table3": "0.6.5",
|
|
112
117
|
"colorette": "^2.0.19",
|
|
113
118
|
"commander": "^5.1.0",
|
|
114
119
|
"configstore": "^5.0.1",
|
|
115
120
|
"cors": "^2.8.5",
|
|
116
|
-
"cross-env": "^
|
|
117
|
-
"cross-spawn": "^7.0.
|
|
121
|
+
"cross-env": "^7.0.3",
|
|
122
|
+
"cross-spawn": "^7.0.5",
|
|
118
123
|
"csv-parse": "^5.0.4",
|
|
119
124
|
"deep-equal-in-any-order": "^2.0.6",
|
|
120
125
|
"exegesis": "^4.2.0",
|
|
121
126
|
"exegesis-express": "^4.0.0",
|
|
122
127
|
"express": "^4.16.4",
|
|
123
128
|
"filesize": "^6.1.0",
|
|
124
|
-
"form-data": "^4.0.
|
|
129
|
+
"form-data": "^4.0.1",
|
|
125
130
|
"fs-extra": "^10.1.0",
|
|
126
131
|
"fuzzy": "^0.1.3",
|
|
127
132
|
"gaxios": "^6.7.0",
|
|
128
133
|
"glob": "^10.4.1",
|
|
129
134
|
"google-auth-library": "^9.11.0",
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"isolate-package": "^1.22.0",
|
|
135
|
+
"ignore": "^7.0.4",
|
|
136
|
+
"isolate-package": "^1.24.0-1",
|
|
133
137
|
"js-yaml": "^3.14.1",
|
|
134
138
|
"jsonwebtoken": "^9.0.0",
|
|
135
139
|
"leven": "^3.1.0",
|
|
@@ -146,6 +150,8 @@
|
|
|
146
150
|
"ora": "^5.4.1",
|
|
147
151
|
"p-limit": "^3.0.1",
|
|
148
152
|
"pg": "^8.11.3",
|
|
153
|
+
"pg-gateway": "^0.3.0-beta.4",
|
|
154
|
+
"pglite-2": "npm:@electric-sql/pglite@0.2.17",
|
|
149
155
|
"portfinder": "^1.0.32",
|
|
150
156
|
"progress": "^2.0.3",
|
|
151
157
|
"proxy-agent": "^6.3.0",
|
|
@@ -154,7 +160,7 @@
|
|
|
154
160
|
"sql-formatter": "^15.3.0",
|
|
155
161
|
"stream-chain": "^2.2.4",
|
|
156
162
|
"stream-json": "^1.7.3",
|
|
157
|
-
"superstatic": "^9.
|
|
163
|
+
"superstatic": "^9.2.0",
|
|
158
164
|
"tar": "^6.1.11",
|
|
159
165
|
"tcp-port-used": "^1.0.2",
|
|
160
166
|
"tmp": "^0.2.3",
|
|
@@ -165,7 +171,9 @@
|
|
|
165
171
|
"winston": "^3.0.0",
|
|
166
172
|
"winston-transport": "^4.4.0",
|
|
167
173
|
"ws": "^7.5.10",
|
|
168
|
-
"yaml": "^2.4.1"
|
|
174
|
+
"yaml": "^2.4.1",
|
|
175
|
+
"zod": "^3.24.3",
|
|
176
|
+
"zod-to-json-schema": "^3.24.5"
|
|
169
177
|
},
|
|
170
178
|
"devDependencies": {
|
|
171
179
|
"@angular-devkit/architect": "^0.1402.2",
|
|
@@ -177,7 +185,6 @@
|
|
|
177
185
|
"@types/chai": "^4.3.0",
|
|
178
186
|
"@types/chai-as-promised": "^7.1.4",
|
|
179
187
|
"@types/cjson": "^0.5.0",
|
|
180
|
-
"@types/cli-table": "^0.3.0",
|
|
181
188
|
"@types/configstore": "^4.0.0",
|
|
182
189
|
"@types/cors": "^2.8.10",
|
|
183
190
|
"@types/cross-spawn": "^6.0.1",
|
|
@@ -253,7 +260,16 @@
|
|
|
253
260
|
"swagger2openapi": "^7.0.8",
|
|
254
261
|
"ts-node": "^10.4.0",
|
|
255
262
|
"typescript": "^4.5.4",
|
|
256
|
-
"typescript-json-schema": "^0.
|
|
263
|
+
"typescript-json-schema": "^0.65.1",
|
|
257
264
|
"vite": "^4.2.1"
|
|
265
|
+
},
|
|
266
|
+
"overrides": {
|
|
267
|
+
"@angular-devkit/core": {
|
|
268
|
+
"ajv-formats": "3.0.1",
|
|
269
|
+
"ajv": "^8.17.1"
|
|
270
|
+
},
|
|
271
|
+
"node-fetch": {
|
|
272
|
+
"whatwg-url": "^14.0.0"
|
|
273
|
+
}
|
|
258
274
|
}
|
|
259
275
|
}
|
|
@@ -90,6 +90,18 @@
|
|
|
90
90
|
],
|
|
91
91
|
"description": "Configuration for a generated Javascript SDK"
|
|
92
92
|
},
|
|
93
|
+
"dartSdk": {
|
|
94
|
+
"oneOf": [
|
|
95
|
+
{ "$ref": "#/definitions/dartSdk" },
|
|
96
|
+
{
|
|
97
|
+
"type": "array",
|
|
98
|
+
"items": {
|
|
99
|
+
"$ref": "#/definitions/dartSdk"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"description": "Configuration for a generated Dart SDK"
|
|
104
|
+
},
|
|
93
105
|
"kotlinSdk": {
|
|
94
106
|
"oneOf": [
|
|
95
107
|
{ "$ref": "#/definitions/kotlinSdk" },
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
"instanceId": {
|
|
18
18
|
"type": "string",
|
|
19
19
|
"description": "The ID of the CloudSQL instance for this database"
|
|
20
|
+
},
|
|
21
|
+
"schemaValidation": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"enum": ["COMPATIBLE", "STRICT"],
|
|
24
|
+
"description": "Schema validation mode for schema migrations"
|
|
20
25
|
}
|
|
21
26
|
}
|
|
22
27
|
}
|