@amplitude/wizard 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +47 -0
- package/README.md +119 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +763 -0
- package/dist/package.json +144 -0
- package/dist/src/frameworks/android/android-wizard-agent.d.ts +6 -0
- package/dist/src/frameworks/android/android-wizard-agent.js +72 -0
- package/dist/src/frameworks/android/utils.d.ts +11 -0
- package/dist/src/frameworks/android/utils.js +32 -0
- package/dist/src/frameworks/django/django-wizard-agent.d.ts +8 -0
- package/dist/src/frameworks/django/django-wizard-agent.js +171 -0
- package/dist/src/frameworks/django/utils.d.ts +31 -0
- package/dist/src/frameworks/django/utils.js +305 -0
- package/dist/src/frameworks/fastapi/fastapi-wizard-agent.d.ts +11 -0
- package/dist/src/frameworks/fastapi/fastapi-wizard-agent.js +189 -0
- package/dist/src/frameworks/fastapi/utils.d.ts +26 -0
- package/dist/src/frameworks/fastapi/utils.js +257 -0
- package/dist/src/frameworks/flask/flask-wizard-agent.d.ts +8 -0
- package/dist/src/frameworks/flask/flask-wizard-agent.js +177 -0
- package/dist/src/frameworks/flask/utils.d.ts +28 -0
- package/dist/src/frameworks/flask/utils.js +343 -0
- package/dist/src/frameworks/flutter/flutter-wizard-agent.d.ts +4 -0
- package/dist/src/frameworks/flutter/flutter-wizard-agent.js +57 -0
- package/dist/src/frameworks/flutter/utils.d.ts +7 -0
- package/dist/src/frameworks/flutter/utils.js +64 -0
- package/dist/src/frameworks/generic/generic-wizard-agent.d.ts +2 -0
- package/dist/src/frameworks/generic/generic-wizard-agent.js +176 -0
- package/dist/src/frameworks/go/go-wizard-agent.d.ts +4 -0
- package/dist/src/frameworks/go/go-wizard-agent.js +57 -0
- package/dist/src/frameworks/go/utils.d.ts +5 -0
- package/dist/src/frameworks/go/utils.js +44 -0
- package/dist/src/frameworks/java/java-wizard-agent.d.ts +7 -0
- package/dist/src/frameworks/java/java-wizard-agent.js +73 -0
- package/dist/src/frameworks/java/utils.d.ts +15 -0
- package/dist/src/frameworks/java/utils.js +64 -0
- package/dist/src/frameworks/javascript-node/javascript-node-wizard-agent.d.ts +4 -0
- package/dist/src/frameworks/javascript-node/javascript-node-wizard-agent.js +57 -0
- package/dist/src/frameworks/javascript-web/javascript-web-wizard-agent.d.ts +3 -0
- package/dist/src/frameworks/javascript-web/javascript-web-wizard-agent.js +151 -0
- package/dist/src/frameworks/javascript-web/utils.d.ts +28 -0
- package/dist/src/frameworks/javascript-web/utils.js +153 -0
- package/dist/src/frameworks/nextjs/nextjs-wizard-agent.d.ts +7 -0
- package/dist/src/frameworks/nextjs/nextjs-wizard-agent.js +98 -0
- package/dist/src/frameworks/nextjs/utils.d.ts +12 -0
- package/dist/src/frameworks/nextjs/utils.js +51 -0
- package/dist/src/frameworks/python/python-wizard-agent.d.ts +7 -0
- package/dist/src/frameworks/python/python-wizard-agent.js +193 -0
- package/dist/src/frameworks/python/utils.d.ts +28 -0
- package/dist/src/frameworks/python/utils.js +146 -0
- package/dist/src/frameworks/react-native/react-native-wizard-agent.d.ts +6 -0
- package/dist/src/frameworks/react-native/react-native-wizard-agent.js +84 -0
- package/dist/src/frameworks/react-native/utils.d.ts +21 -0
- package/dist/src/frameworks/react-native/utils.js +82 -0
- package/dist/src/frameworks/react-router/react-router-wizard-agent.d.ts +7 -0
- package/dist/src/frameworks/react-router/react-router-wizard-agent.js +98 -0
- package/dist/src/frameworks/react-router/utils.d.ts +13 -0
- package/dist/src/frameworks/react-router/utils.js +160 -0
- package/dist/src/frameworks/swift/swift-wizard-agent.d.ts +7 -0
- package/dist/src/frameworks/swift/swift-wizard-agent.js +72 -0
- package/dist/src/frameworks/swift/utils.d.ts +12 -0
- package/dist/src/frameworks/swift/utils.js +82 -0
- package/dist/src/frameworks/unity/unity-wizard-agent.d.ts +6 -0
- package/dist/src/frameworks/unity/unity-wizard-agent.js +79 -0
- package/dist/src/frameworks/unity/utils.d.ts +12 -0
- package/dist/src/frameworks/unity/utils.js +66 -0
- package/dist/src/frameworks/unreal/unreal-wizard-agent.d.ts +6 -0
- package/dist/src/frameworks/unreal/unreal-wizard-agent.js +77 -0
- package/dist/src/frameworks/unreal/utils.d.ts +10 -0
- package/dist/src/frameworks/unreal/utils.js +29 -0
- package/dist/src/frameworks/vue/vue-wizard-agent.d.ts +4 -0
- package/dist/src/frameworks/vue/vue-wizard-agent.js +64 -0
- package/dist/src/lib/agent-hooks.d.ts +26 -0
- package/dist/src/lib/agent-hooks.js +118 -0
- package/dist/src/lib/agent-interface.d.ts +175 -0
- package/dist/src/lib/agent-interface.js +1217 -0
- package/dist/src/lib/agent-runner.d.ts +9 -0
- package/dist/src/lib/agent-runner.js +415 -0
- package/dist/src/lib/ampli-config.d.ts +105 -0
- package/dist/src/lib/ampli-config.js +178 -0
- package/dist/src/lib/api.d.ts +107 -0
- package/dist/src/lib/api.js +442 -0
- package/dist/src/lib/commandments.d.ts +1 -0
- package/dist/src/lib/commandments.js +24 -0
- package/dist/src/lib/console-query.d.ts +27 -0
- package/dist/src/lib/console-query.js +121 -0
- package/dist/src/lib/constants.d.ts +124 -0
- package/dist/src/lib/constants.js +170 -0
- package/dist/src/lib/detect-amplitude.d.ts +31 -0
- package/dist/src/lib/detect-amplitude.js +407 -0
- package/dist/src/lib/framework-config.d.ts +188 -0
- package/dist/src/lib/framework-config.js +21 -0
- package/dist/src/lib/health-checks/endpoints.d.ts +3 -0
- package/dist/src/lib/health-checks/endpoints.js +45 -0
- package/dist/src/lib/health-checks/index.d.ts +4 -0
- package/dist/src/lib/health-checks/index.js +22 -0
- package/dist/src/lib/health-checks/readiness.d.ts +24 -0
- package/dist/src/lib/health-checks/readiness.js +118 -0
- package/dist/src/lib/health-checks/statuspage.d.ts +9 -0
- package/dist/src/lib/health-checks/statuspage.js +104 -0
- package/dist/src/lib/health-checks/types.d.ts +31 -0
- package/dist/src/lib/health-checks/types.js +9 -0
- package/dist/src/lib/helper-functions.d.ts +1 -0
- package/dist/src/lib/helper-functions.js +5 -0
- package/dist/src/lib/middleware/benchmark.d.ts +54 -0
- package/dist/src/lib/middleware/benchmark.js +48 -0
- package/dist/src/lib/middleware/benchmarks/cache-tracker.d.ts +44 -0
- package/dist/src/lib/middleware/benchmarks/cache-tracker.js +80 -0
- package/dist/src/lib/middleware/benchmarks/compaction-tracker.d.ts +29 -0
- package/dist/src/lib/middleware/benchmarks/compaction-tracker.js +59 -0
- package/dist/src/lib/middleware/benchmarks/context-size-tracker.d.ts +26 -0
- package/dist/src/lib/middleware/benchmarks/context-size-tracker.js +55 -0
- package/dist/src/lib/middleware/benchmarks/cost-tracker.d.ts +16 -0
- package/dist/src/lib/middleware/benchmarks/cost-tracker.js +75 -0
- package/dist/src/lib/middleware/benchmarks/duration-tracker.d.ts +20 -0
- package/dist/src/lib/middleware/benchmarks/duration-tracker.js +39 -0
- package/dist/src/lib/middleware/benchmarks/index.d.ts +9 -0
- package/dist/src/lib/middleware/benchmarks/index.js +67 -0
- package/dist/src/lib/middleware/benchmarks/json-writer.d.ts +15 -0
- package/dist/src/lib/middleware/benchmarks/json-writer.js +144 -0
- package/dist/src/lib/middleware/benchmarks/summary.d.ts +9 -0
- package/dist/src/lib/middleware/benchmarks/summary.js +105 -0
- package/dist/src/lib/middleware/benchmarks/token-tracker.d.ts +40 -0
- package/dist/src/lib/middleware/benchmarks/token-tracker.js +76 -0
- package/dist/src/lib/middleware/benchmarks/turn-counter.d.ts +34 -0
- package/dist/src/lib/middleware/benchmarks/turn-counter.js +58 -0
- package/dist/src/lib/middleware/config.d.ts +24 -0
- package/dist/src/lib/middleware/config.js +96 -0
- package/dist/src/lib/middleware/index.d.ts +11 -0
- package/dist/src/lib/middleware/index.js +17 -0
- package/dist/src/lib/middleware/phase-detector.d.ts +8 -0
- package/dist/src/lib/middleware/phase-detector.js +63 -0
- package/dist/src/lib/middleware/pipeline.d.ts +29 -0
- package/dist/src/lib/middleware/pipeline.js +81 -0
- package/dist/src/lib/middleware/schemas.d.ts +27 -0
- package/dist/src/lib/middleware/schemas.js +84 -0
- package/dist/src/lib/middleware/types.d.ts +94 -0
- package/dist/src/lib/middleware/types.js +8 -0
- package/dist/src/lib/package-manager-detection.d.ts +42 -0
- package/dist/src/lib/package-manager-detection.js +292 -0
- package/dist/src/lib/registry.d.ts +3 -0
- package/dist/src/lib/registry.js +42 -0
- package/dist/src/lib/safe-tools.d.ts +2 -0
- package/dist/src/lib/safe-tools.js +214 -0
- package/dist/src/lib/wizard-session.d.ts +220 -0
- package/dist/src/lib/wizard-session.js +127 -0
- package/dist/src/lib/wizard-tools.d.ts +82 -0
- package/dist/src/lib/wizard-tools.js +499 -0
- package/dist/src/run.d.ts +19 -0
- package/dist/src/run.js +151 -0
- package/dist/src/steps/add-mcp-server-to-clients/MCPClient.d.ts +30 -0
- package/dist/src/steps/add-mcp-server-to-clients/MCPClient.js +141 -0
- package/dist/src/steps/add-mcp-server-to-clients/clients/claude-code.d.ts +29 -0
- package/dist/src/steps/add-mcp-server-to-clients/clients/claude-code.js +180 -0
- package/dist/src/steps/add-mcp-server-to-clients/clients/claude.d.ts +20 -0
- package/dist/src/steps/add-mcp-server-to-clients/clients/claude.js +63 -0
- package/dist/src/steps/add-mcp-server-to-clients/clients/codex.d.ts +28 -0
- package/dist/src/steps/add-mcp-server-to-clients/clients/codex.js +77 -0
- package/dist/src/steps/add-mcp-server-to-clients/clients/cursor.d.ts +24 -0
- package/dist/src/steps/add-mcp-server-to-clients/clients/cursor.js +60 -0
- package/dist/src/steps/add-mcp-server-to-clients/clients/visual-studio-code.d.ts +27 -0
- package/dist/src/steps/add-mcp-server-to-clients/clients/visual-studio-code.js +101 -0
- package/dist/src/steps/add-mcp-server-to-clients/clients/zed.d.ts +26 -0
- package/dist/src/steps/add-mcp-server-to-clients/clients/zed.js +102 -0
- package/dist/src/steps/add-mcp-server-to-clients/defaults.d.ts +44 -0
- package/dist/src/steps/add-mcp-server-to-clients/defaults.js +123 -0
- package/dist/src/steps/add-mcp-server-to-clients/index.d.ts +19 -0
- package/dist/src/steps/add-mcp-server-to-clients/index.js +110 -0
- package/dist/src/steps/add-or-update-environment-variables.d.ts +10 -0
- package/dist/src/steps/add-or-update-environment-variables.js +188 -0
- package/dist/src/steps/index.d.ts +4 -0
- package/dist/src/steps/index.js +20 -0
- package/dist/src/steps/run-prettier.d.ts +5 -0
- package/dist/src/steps/run-prettier.js +90 -0
- package/dist/src/steps/upload-environment-variables/EnvironmentProvider.d.ts +11 -0
- package/dist/src/steps/upload-environment-variables/EnvironmentProvider.js +11 -0
- package/dist/src/steps/upload-environment-variables/index.d.ts +6 -0
- package/dist/src/steps/upload-environment-variables/index.js +37 -0
- package/dist/src/steps/upload-environment-variables/providers/vercel.d.ts +15 -0
- package/dist/src/steps/upload-environment-variables/providers/vercel.js +145 -0
- package/dist/src/telemetry.d.ts +2 -0
- package/dist/src/telemetry.js +12 -0
- package/dist/src/ui/index.d.ts +8 -0
- package/dist/src/ui/index.js +16 -0
- package/dist/src/ui/logging-ui.d.ts +56 -0
- package/dist/src/ui/logging-ui.js +157 -0
- package/dist/src/ui/tui/App.d.ts +6 -0
- package/dist/src/ui/tui/App.js +34 -0
- package/dist/src/ui/tui/components/AmplitudeLogo.d.ts +5 -0
- package/dist/src/ui/tui/components/AmplitudeLogo.js +81 -0
- package/dist/src/ui/tui/components/AmplitudeTextLogo.d.ts +3 -0
- package/dist/src/ui/tui/components/AmplitudeTextLogo.js +31 -0
- package/dist/src/ui/tui/components/ConsoleView.d.ts +23 -0
- package/dist/src/ui/tui/components/ConsoleView.js +220 -0
- package/dist/src/ui/tui/components/TitleBar.d.ts +6 -0
- package/dist/src/ui/tui/components/TitleBar.js +16 -0
- package/dist/src/ui/tui/console-commands.d.ts +16 -0
- package/dist/src/ui/tui/console-commands.js +31 -0
- package/dist/src/ui/tui/context/CommandModeContext.d.ts +2 -0
- package/dist/src/ui/tui/context/CommandModeContext.js +3 -0
- package/dist/src/ui/tui/flows.d.ts +48 -0
- package/dist/src/ui/tui/flows.js +154 -0
- package/dist/src/ui/tui/hooks/useScreenInput.d.ts +13 -0
- package/dist/src/ui/tui/hooks/useScreenInput.js +18 -0
- package/dist/src/ui/tui/hooks/useStdoutDimensions.d.ts +9 -0
- package/dist/src/ui/tui/hooks/useStdoutDimensions.js +29 -0
- package/dist/src/ui/tui/ink-ui.d.ts +62 -0
- package/dist/src/ui/tui/ink-ui.js +142 -0
- package/dist/src/ui/tui/primitives/CardLayout.d.ts +12 -0
- package/dist/src/ui/tui/primitives/CardLayout.js +9 -0
- package/dist/src/ui/tui/primitives/ConfirmationInput.d.ts +13 -0
- package/dist/src/ui/tui/primitives/ConfirmationInput.js +35 -0
- package/dist/src/ui/tui/primitives/DissolveTransition.d.ts +21 -0
- package/dist/src/ui/tui/primitives/DissolveTransition.js +143 -0
- package/dist/src/ui/tui/primitives/EventPlanViewer.d.ts +9 -0
- package/dist/src/ui/tui/primitives/EventPlanViewer.js +9 -0
- package/dist/src/ui/tui/primitives/KagiSmallWebViewer.d.ts +7 -0
- package/dist/src/ui/tui/primitives/KagiSmallWebViewer.js +101 -0
- package/dist/src/ui/tui/primitives/LoadingBox.d.ts +8 -0
- package/dist/src/ui/tui/primitives/LoadingBox.js +9 -0
- package/dist/src/ui/tui/primitives/LogViewer.d.ts +11 -0
- package/dist/src/ui/tui/primitives/LogViewer.js +55 -0
- package/dist/src/ui/tui/primitives/PickerMenu.d.ts +20 -0
- package/dist/src/ui/tui/primitives/PickerMenu.js +212 -0
- package/dist/src/ui/tui/primitives/ProgressList.d.ts +15 -0
- package/dist/src/ui/tui/primitives/ProgressList.js +29 -0
- package/dist/src/ui/tui/primitives/PromptLabel.d.ts +11 -0
- package/dist/src/ui/tui/primitives/PromptLabel.js +12 -0
- package/dist/src/ui/tui/primitives/ReportViewer.d.ts +12 -0
- package/dist/src/ui/tui/primitives/ReportViewer.js +99 -0
- package/dist/src/ui/tui/primitives/ScreenErrorBoundary.d.ts +26 -0
- package/dist/src/ui/tui/primitives/ScreenErrorBoundary.js +29 -0
- package/dist/src/ui/tui/primitives/SlashCommandInput.d.ts +21 -0
- package/dist/src/ui/tui/primitives/SlashCommandInput.js +85 -0
- package/dist/src/ui/tui/primitives/SnakeGame.d.ts +1 -0
- package/dist/src/ui/tui/primitives/SnakeGame.js +1 -0
- package/dist/src/ui/tui/primitives/SplitView.d.ts +11 -0
- package/dist/src/ui/tui/primitives/SplitView.js +8 -0
- package/dist/src/ui/tui/primitives/TabContainer.d.ts +18 -0
- package/dist/src/ui/tui/primitives/TabContainer.js +30 -0
- package/dist/src/ui/tui/primitives/index.d.ts +23 -0
- package/dist/src/ui/tui/primitives/index.js +19 -0
- package/dist/src/ui/tui/router.d.ts +61 -0
- package/dist/src/ui/tui/router.js +104 -0
- package/dist/src/ui/tui/screen-registry.d.ts +19 -0
- package/dist/src/ui/tui/screen-registry.js +56 -0
- package/dist/src/ui/tui/screens/ActivationOptionsScreen.d.ts +12 -0
- package/dist/src/ui/tui/screens/ActivationOptionsScreen.js +57 -0
- package/dist/src/ui/tui/screens/AuthScreen.d.ts +18 -0
- package/dist/src/ui/tui/screens/AuthScreen.js +107 -0
- package/dist/src/ui/tui/screens/ChecklistScreen.d.ts +22 -0
- package/dist/src/ui/tui/screens/ChecklistScreen.js +122 -0
- package/dist/src/ui/tui/screens/DataIngestionCheckScreen.d.ts +24 -0
- package/dist/src/ui/tui/screens/DataIngestionCheckScreen.js +113 -0
- package/dist/src/ui/tui/screens/DataSetupScreen.d.ts +17 -0
- package/dist/src/ui/tui/screens/DataSetupScreen.js +73 -0
- package/dist/src/ui/tui/screens/IntroScreen.d.ts +16 -0
- package/dist/src/ui/tui/screens/IntroScreen.js +86 -0
- package/dist/src/ui/tui/screens/LoginScreen.d.ts +15 -0
- package/dist/src/ui/tui/screens/LoginScreen.js +65 -0
- package/dist/src/ui/tui/screens/LogoutScreen.d.ts +12 -0
- package/dist/src/ui/tui/screens/LogoutScreen.js +28 -0
- package/dist/src/ui/tui/screens/McpScreen.d.ts +26 -0
- package/dist/src/ui/tui/screens/McpScreen.js +148 -0
- package/dist/src/ui/tui/screens/OutageScreen.d.ts +10 -0
- package/dist/src/ui/tui/screens/OutageScreen.js +17 -0
- package/dist/src/ui/tui/screens/OutroScreen.d.ts +11 -0
- package/dist/src/ui/tui/screens/OutroScreen.js +69 -0
- package/dist/src/ui/tui/screens/RegionSelectScreen.d.ts +17 -0
- package/dist/src/ui/tui/screens/RegionSelectScreen.js +40 -0
- package/dist/src/ui/tui/screens/RunScreen.d.ts +16 -0
- package/dist/src/ui/tui/screens/RunScreen.js +212 -0
- package/dist/src/ui/tui/screens/SettingsOverrideScreen.d.ts +10 -0
- package/dist/src/ui/tui/screens/SettingsOverrideScreen.js +23 -0
- package/dist/src/ui/tui/screens/SetupScreen.d.ts +13 -0
- package/dist/src/ui/tui/screens/SetupScreen.js +73 -0
- package/dist/src/ui/tui/screens/SlackScreen.d.ts +25 -0
- package/dist/src/ui/tui/screens/SlackScreen.js +97 -0
- package/dist/src/ui/tui/services/mcp-installer.d.ts +25 -0
- package/dist/src/ui/tui/services/mcp-installer.js +82 -0
- package/dist/src/ui/tui/start-tui.d.ts +10 -0
- package/dist/src/ui/tui/start-tui.js +50 -0
- package/dist/src/ui/tui/store.d.ts +231 -0
- package/dist/src/ui/tui/store.js +568 -0
- package/dist/src/ui/tui/styles.d.ts +31 -0
- package/dist/src/ui/tui/styles.js +33 -0
- package/dist/src/ui/wizard-ui.d.ts +110 -0
- package/dist/src/ui/wizard-ui.js +18 -0
- package/dist/src/utils/ampli-settings.d.ts +37 -0
- package/dist/src/utils/ampli-settings.js +182 -0
- package/dist/src/utils/analytics.d.ts +35 -0
- package/dist/src/utils/analytics.js +133 -0
- package/dist/src/utils/anthropic-status.d.ts +17 -0
- package/dist/src/utils/anthropic-status.js +51 -0
- package/dist/src/utils/api-key-store.d.ts +35 -0
- package/dist/src/utils/api-key-store.js +176 -0
- package/dist/src/utils/bash.d.ts +2 -0
- package/dist/src/utils/bash.js +53 -0
- package/dist/src/utils/custom-headers.d.ts +9 -0
- package/dist/src/utils/custom-headers.js +23 -0
- package/dist/src/utils/debug.d.ts +23 -0
- package/dist/src/utils/debug.js +86 -0
- package/dist/src/utils/environment.d.ts +4 -0
- package/dist/src/utils/environment.js +76 -0
- package/dist/src/utils/file-utils.d.ts +2 -0
- package/dist/src/utils/file-utils.js +16 -0
- package/dist/src/utils/get-api-key.d.ts +17 -0
- package/dist/src/utils/get-api-key.js +50 -0
- package/dist/src/utils/logging.d.ts +9 -0
- package/dist/src/utils/logging.js +48 -0
- package/dist/src/utils/oauth.d.ts +53 -0
- package/dist/src/utils/oauth.js +354 -0
- package/dist/src/utils/package-json.d.ts +25 -0
- package/dist/src/utils/package-json.js +26 -0
- package/dist/src/utils/package-manager.d.ts +21 -0
- package/dist/src/utils/package-manager.js +208 -0
- package/dist/src/utils/semver.d.ts +21 -0
- package/dist/src/utils/semver.js +61 -0
- package/dist/src/utils/setup-utils.d.ts +82 -0
- package/dist/src/utils/setup-utils.js +467 -0
- package/dist/src/utils/shell-completions.d.ts +10 -0
- package/dist/src/utils/shell-completions.js +199 -0
- package/dist/src/utils/string.d.ts +1 -0
- package/dist/src/utils/string.js +8 -0
- package/dist/src/utils/types.d.ts +72 -0
- package/dist/src/utils/types.js +2 -0
- package/dist/src/utils/urls.d.ts +14 -0
- package/dist/src/utils/urls.js +69 -0
- package/dist/src/utils/vendor/is-unicorn-supported.d.ts +1 -0
- package/dist/src/utils/vendor/is-unicorn-supported.js +23 -0
- package/dist/src/utils/wizard-abort.d.ts +13 -0
- package/dist/src/utils/wizard-abort.js +56 -0
- package/man/amplitude-wizard.1 +170 -0
- package/package.json +144 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.FastAPIProjectType = void 0;
|
|
40
|
+
exports.getFastAPIVersionBucket = getFastAPIVersionBucket;
|
|
41
|
+
exports.getFastAPIVersion = getFastAPIVersion;
|
|
42
|
+
exports.getFastAPIProjectType = getFastAPIProjectType;
|
|
43
|
+
exports.getFastAPIProjectTypeName = getFastAPIProjectTypeName;
|
|
44
|
+
exports.findFastAPIAppFile = findFastAPIAppFile;
|
|
45
|
+
const semver_1 = require("semver");
|
|
46
|
+
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
47
|
+
const ui_1 = require("../../ui");
|
|
48
|
+
const fs = __importStar(require("node:fs"));
|
|
49
|
+
const path = __importStar(require("node:path"));
|
|
50
|
+
var FastAPIProjectType;
|
|
51
|
+
(function (FastAPIProjectType) {
|
|
52
|
+
FastAPIProjectType["STANDARD"] = "standard";
|
|
53
|
+
FastAPIProjectType["ROUTER"] = "router";
|
|
54
|
+
FastAPIProjectType["FULLSTACK"] = "fullstack";
|
|
55
|
+
})(FastAPIProjectType || (exports.FastAPIProjectType = FastAPIProjectType = {}));
|
|
56
|
+
const IGNORE_PATTERNS = [
|
|
57
|
+
'**/node_modules/**',
|
|
58
|
+
'**/dist/**',
|
|
59
|
+
'**/build/**',
|
|
60
|
+
'**/venv/**',
|
|
61
|
+
'**/.venv/**',
|
|
62
|
+
'**/env/**',
|
|
63
|
+
'**/.env/**',
|
|
64
|
+
'**/__pycache__/**',
|
|
65
|
+
'**/migrations/**',
|
|
66
|
+
];
|
|
67
|
+
/**
|
|
68
|
+
* Get FastAPI version bucket for analytics
|
|
69
|
+
*/
|
|
70
|
+
function getFastAPIVersionBucket(version) {
|
|
71
|
+
if (!version) {
|
|
72
|
+
return 'none';
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
const minVer = (0, semver_1.minVersion)(version);
|
|
76
|
+
if (!minVer) {
|
|
77
|
+
return 'invalid';
|
|
78
|
+
}
|
|
79
|
+
const majorVersion = (0, semver_1.major)(minVer);
|
|
80
|
+
// FastAPI 0.x is still the common version range
|
|
81
|
+
if (majorVersion === 0) {
|
|
82
|
+
return '0.x';
|
|
83
|
+
}
|
|
84
|
+
return `${majorVersion}.x`;
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
return 'unknown';
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Extract FastAPI version from requirements files or pyproject.toml
|
|
92
|
+
*/
|
|
93
|
+
async function getFastAPIVersion(options) {
|
|
94
|
+
const { installDir } = options;
|
|
95
|
+
// Check requirements files
|
|
96
|
+
const requirementsFiles = await (0, fast_glob_1.default)(['**/requirements*.txt', '**/pyproject.toml', '**/setup.py', '**/Pipfile'], {
|
|
97
|
+
cwd: installDir,
|
|
98
|
+
ignore: IGNORE_PATTERNS,
|
|
99
|
+
});
|
|
100
|
+
for (const reqFile of requirementsFiles) {
|
|
101
|
+
try {
|
|
102
|
+
const content = fs.readFileSync(path.join(installDir, reqFile), 'utf-8');
|
|
103
|
+
// Try to extract version from requirements.txt format (fastapi==0.109.0 or fastapi>=0.100)
|
|
104
|
+
const requirementsMatch = content.match(/[Ff]ast[Aa][Pp][Ii][=<>~!]+([0-9]+\.[0-9]+(?:\.[0-9]+)?)/);
|
|
105
|
+
if (requirementsMatch) {
|
|
106
|
+
return requirementsMatch[1];
|
|
107
|
+
}
|
|
108
|
+
// Try to extract from pyproject.toml format
|
|
109
|
+
const pyprojectMatch = content.match(/[Ff]ast[Aa][Pp][Ii]["\s]*[=<>~!]+\s*["']?([0-9]+\.[0-9]+(?:\.[0-9]+)?)/);
|
|
110
|
+
if (pyprojectMatch) {
|
|
111
|
+
return pyprojectMatch[1];
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
// Skip files that can't be read
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return undefined;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Check if app uses FastAPI APIRouter
|
|
123
|
+
*/
|
|
124
|
+
async function hasAPIRouter({ installDir, }) {
|
|
125
|
+
const pyFiles = await (0, fast_glob_1.default)(['**/*.py'], {
|
|
126
|
+
cwd: installDir,
|
|
127
|
+
ignore: IGNORE_PATTERNS,
|
|
128
|
+
});
|
|
129
|
+
for (const pyFile of pyFiles) {
|
|
130
|
+
try {
|
|
131
|
+
const content = fs.readFileSync(path.join(installDir, pyFile), 'utf-8');
|
|
132
|
+
if (content.includes('APIRouter(') ||
|
|
133
|
+
content.includes('include_router(') ||
|
|
134
|
+
content.includes('from fastapi import APIRouter')) {
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
catch {
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Check if app uses Jinja2 templates (fullstack pattern)
|
|
146
|
+
*/
|
|
147
|
+
async function hasTemplates({ installDir, }) {
|
|
148
|
+
// Check for Jinja2Templates usage in Python files
|
|
149
|
+
const pyFiles = await (0, fast_glob_1.default)(['**/*.py'], {
|
|
150
|
+
cwd: installDir,
|
|
151
|
+
ignore: IGNORE_PATTERNS,
|
|
152
|
+
});
|
|
153
|
+
for (const pyFile of pyFiles) {
|
|
154
|
+
try {
|
|
155
|
+
const content = fs.readFileSync(path.join(installDir, pyFile), 'utf-8');
|
|
156
|
+
if (content.includes('Jinja2Templates') ||
|
|
157
|
+
content.includes('from fastapi.templating import')) {
|
|
158
|
+
return true;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
catch {
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
// Check for templates directory
|
|
166
|
+
const templateDirs = await (0, fast_glob_1.default)(['**/templates'], {
|
|
167
|
+
cwd: installDir,
|
|
168
|
+
ignore: IGNORE_PATTERNS,
|
|
169
|
+
onlyDirectories: true,
|
|
170
|
+
});
|
|
171
|
+
return templateDirs.length > 0;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Detect FastAPI project type
|
|
175
|
+
*/
|
|
176
|
+
async function getFastAPIProjectType(options) {
|
|
177
|
+
const { installDir } = options;
|
|
178
|
+
// Check for fullstack pattern (templates)
|
|
179
|
+
if (await hasTemplates({ installDir })) {
|
|
180
|
+
(0, ui_1.getUI)().setDetectedFramework('FastAPI fullstack with templates');
|
|
181
|
+
return FastAPIProjectType.FULLSTACK;
|
|
182
|
+
}
|
|
183
|
+
// Check for APIRouter (modular structure)
|
|
184
|
+
if (await hasAPIRouter({ installDir })) {
|
|
185
|
+
(0, ui_1.getUI)().setDetectedFramework('FastAPI with APIRouter');
|
|
186
|
+
return FastAPIProjectType.ROUTER;
|
|
187
|
+
}
|
|
188
|
+
// Default to standard FastAPI
|
|
189
|
+
(0, ui_1.getUI)().setDetectedFramework('FastAPI');
|
|
190
|
+
return FastAPIProjectType.STANDARD;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Get human-readable name for FastAPI project type
|
|
194
|
+
*/
|
|
195
|
+
function getFastAPIProjectTypeName(projectType) {
|
|
196
|
+
switch (projectType) {
|
|
197
|
+
case FastAPIProjectType.STANDARD:
|
|
198
|
+
return 'Standard FastAPI';
|
|
199
|
+
case FastAPIProjectType.ROUTER:
|
|
200
|
+
return 'FastAPI with APIRouter';
|
|
201
|
+
case FastAPIProjectType.FULLSTACK:
|
|
202
|
+
return 'FastAPI Fullstack';
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Find the main FastAPI app file
|
|
207
|
+
*/
|
|
208
|
+
async function findFastAPIAppFile(options) {
|
|
209
|
+
const { installDir } = options;
|
|
210
|
+
// Common FastAPI app file patterns
|
|
211
|
+
const commonPatterns = [
|
|
212
|
+
'**/main.py',
|
|
213
|
+
'**/app.py',
|
|
214
|
+
'**/application.py',
|
|
215
|
+
'**/api.py',
|
|
216
|
+
'**/__init__.py',
|
|
217
|
+
];
|
|
218
|
+
const appFiles = await (0, fast_glob_1.default)(commonPatterns, {
|
|
219
|
+
cwd: installDir,
|
|
220
|
+
ignore: IGNORE_PATTERNS,
|
|
221
|
+
});
|
|
222
|
+
// Look for files with FastAPI() instantiation
|
|
223
|
+
for (const appFile of appFiles) {
|
|
224
|
+
try {
|
|
225
|
+
const content = fs.readFileSync(path.join(installDir, appFile), 'utf-8');
|
|
226
|
+
// Check for FastAPI app instantiation
|
|
227
|
+
if (content.includes('FastAPI(') ||
|
|
228
|
+
content.includes('from fastapi import FastAPI')) {
|
|
229
|
+
return appFile;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
catch {
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
// If no file with FastAPI() found, check all Python files
|
|
237
|
+
const allPyFiles = await (0, fast_glob_1.default)(['**/*.py'], {
|
|
238
|
+
cwd: installDir,
|
|
239
|
+
ignore: IGNORE_PATTERNS,
|
|
240
|
+
});
|
|
241
|
+
for (const pyFile of allPyFiles) {
|
|
242
|
+
try {
|
|
243
|
+
const content = fs.readFileSync(path.join(installDir, pyFile), 'utf-8');
|
|
244
|
+
if (content.includes('FastAPI(')) {
|
|
245
|
+
return pyFile;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
catch {
|
|
249
|
+
continue;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
// Return first common pattern file if exists
|
|
253
|
+
if (appFiles.length > 0) {
|
|
254
|
+
return appFiles[0];
|
|
255
|
+
}
|
|
256
|
+
return undefined;
|
|
257
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FrameworkConfig } from '../../lib/framework-config';
|
|
2
|
+
import { FlaskProjectType } from './utils';
|
|
3
|
+
type FlaskContext = {
|
|
4
|
+
projectType?: FlaskProjectType;
|
|
5
|
+
appFile?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const FLASK_AGENT_CONFIG: FrameworkConfig<FlaskContext>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.FLASK_AGENT_CONFIG = void 0;
|
|
40
|
+
const framework_config_1 = require("../../lib/framework-config");
|
|
41
|
+
const package_manager_detection_1 = require("../../lib/package-manager-detection");
|
|
42
|
+
const constants_1 = require("../../lib/constants");
|
|
43
|
+
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
44
|
+
const fs = __importStar(require("node:fs"));
|
|
45
|
+
const path = __importStar(require("node:path"));
|
|
46
|
+
const utils_1 = require("./utils");
|
|
47
|
+
exports.FLASK_AGENT_CONFIG = {
|
|
48
|
+
metadata: {
|
|
49
|
+
name: 'Flask',
|
|
50
|
+
integration: constants_1.Integration.flask,
|
|
51
|
+
beta: true,
|
|
52
|
+
docsUrl: 'https://amplitude.com/docs/sdks/analytics/python',
|
|
53
|
+
unsupportedVersionDocsUrl: 'https://amplitude.com/docs/sdks/analytics/python',
|
|
54
|
+
gatherContext: async (options) => {
|
|
55
|
+
const projectType = await (0, utils_1.getFlaskProjectType)(options);
|
|
56
|
+
const appFile = await (0, utils_1.findFlaskAppFile)(options);
|
|
57
|
+
return { projectType, appFile };
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
detection: {
|
|
61
|
+
packageName: 'flask',
|
|
62
|
+
packageDisplayName: 'Flask',
|
|
63
|
+
usesPackageJson: false,
|
|
64
|
+
getVersion: () => undefined,
|
|
65
|
+
getVersionBucket: utils_1.getFlaskVersionBucket,
|
|
66
|
+
minimumVersion: '2.0.0',
|
|
67
|
+
getInstalledVersion: (options) => (0, utils_1.getFlaskVersion)(options),
|
|
68
|
+
detect: async (options) => {
|
|
69
|
+
const { installDir } = options;
|
|
70
|
+
const requirementsFiles = await (0, fast_glob_1.default)([
|
|
71
|
+
'**/requirements*.txt',
|
|
72
|
+
'**/pyproject.toml',
|
|
73
|
+
'**/setup.py',
|
|
74
|
+
'**/Pipfile',
|
|
75
|
+
], {
|
|
76
|
+
cwd: installDir,
|
|
77
|
+
ignore: ['**/venv/**', '**/.venv/**', '**/env/**', '**/.env/**'],
|
|
78
|
+
});
|
|
79
|
+
for (const reqFile of requirementsFiles) {
|
|
80
|
+
try {
|
|
81
|
+
const content = fs.readFileSync(path.join(installDir, reqFile), 'utf-8');
|
|
82
|
+
if (/^flask([<>=~!]|$|\s)/im.test(content) ||
|
|
83
|
+
/["']flask["']/i.test(content)) {
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
catch {
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const pyFiles = await (0, fast_glob_1.default)(['**/app.py', '**/wsgi.py', '**/application.py', '**/__init__.py'], {
|
|
92
|
+
cwd: installDir,
|
|
93
|
+
ignore: [
|
|
94
|
+
'**/venv/**',
|
|
95
|
+
'**/.venv/**',
|
|
96
|
+
'**/env/**',
|
|
97
|
+
'**/.env/**',
|
|
98
|
+
'**/__pycache__/**',
|
|
99
|
+
],
|
|
100
|
+
});
|
|
101
|
+
for (const pyFile of pyFiles) {
|
|
102
|
+
try {
|
|
103
|
+
const content = fs.readFileSync(path.join(installDir, pyFile), 'utf-8');
|
|
104
|
+
if (content.includes('from flask import') ||
|
|
105
|
+
content.includes('import flask') ||
|
|
106
|
+
/Flask\s*\(/.test(content)) {
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return false;
|
|
115
|
+
},
|
|
116
|
+
detectPackageManager: package_manager_detection_1.detectPythonPackageManagers,
|
|
117
|
+
},
|
|
118
|
+
environment: {
|
|
119
|
+
uploadToHosting: false,
|
|
120
|
+
getEnvVars: (apiKey, _host) => ({
|
|
121
|
+
AMPLITUDE_API_KEY: apiKey,
|
|
122
|
+
}),
|
|
123
|
+
},
|
|
124
|
+
analytics: {
|
|
125
|
+
getTags: (context) => ({
|
|
126
|
+
projectType: context.projectType || 'unknown',
|
|
127
|
+
}),
|
|
128
|
+
},
|
|
129
|
+
prompts: {
|
|
130
|
+
packageInstallation: framework_config_1.PYTHON_PACKAGE_INSTALLATION,
|
|
131
|
+
projectTypeDetection: 'This is a Python/Flask project. Look for requirements.txt, pyproject.toml, setup.py, Pipfile, or app.py/wsgi.py to confirm.',
|
|
132
|
+
getAdditionalContextLines: (context) => {
|
|
133
|
+
const projectTypeName = context.projectType
|
|
134
|
+
? (0, utils_1.getFlaskProjectTypeName)(context.projectType)
|
|
135
|
+
: 'unknown';
|
|
136
|
+
// Map project type to framework ID for MCP docs resource
|
|
137
|
+
const frameworkIdMap = {
|
|
138
|
+
[utils_1.FlaskProjectType.STANDARD]: 'flask',
|
|
139
|
+
[utils_1.FlaskProjectType.RESTFUL]: 'flask',
|
|
140
|
+
[utils_1.FlaskProjectType.RESTX]: 'flask',
|
|
141
|
+
[utils_1.FlaskProjectType.SMOREST]: 'flask',
|
|
142
|
+
[utils_1.FlaskProjectType.BLUEPRINT]: 'flask',
|
|
143
|
+
};
|
|
144
|
+
const frameworkId = context.projectType
|
|
145
|
+
? frameworkIdMap[context.projectType]
|
|
146
|
+
: 'flask';
|
|
147
|
+
const lines = [
|
|
148
|
+
`Project type: ${projectTypeName}`,
|
|
149
|
+
`Framework docs ID: ${frameworkId} (use amplitude://docs/frameworks/${frameworkId} for documentation)`,
|
|
150
|
+
];
|
|
151
|
+
if (context.appFile) {
|
|
152
|
+
lines.push(`App file: ${context.appFile}`);
|
|
153
|
+
}
|
|
154
|
+
return lines;
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
ui: {
|
|
158
|
+
successMessage: 'Amplitude integration complete',
|
|
159
|
+
estimatedDurationMinutes: 5,
|
|
160
|
+
getOutroChanges: (context) => {
|
|
161
|
+
const projectTypeName = context.projectType
|
|
162
|
+
? (0, utils_1.getFlaskProjectTypeName)(context.projectType)
|
|
163
|
+
: 'Flask';
|
|
164
|
+
return [
|
|
165
|
+
`Analyzed your ${projectTypeName} project structure`,
|
|
166
|
+
`Installed the Amplitude Python package`,
|
|
167
|
+
`Configured Amplitude in your Flask application`,
|
|
168
|
+
`Added Amplitude initialization with automatic event tracking`,
|
|
169
|
+
];
|
|
170
|
+
},
|
|
171
|
+
getOutroNextSteps: () => [
|
|
172
|
+
'Start your Flask development server to see Amplitude in action',
|
|
173
|
+
'Visit your Amplitude dashboard to see incoming events',
|
|
174
|
+
'Use amplitude.identify() to associate events with users',
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { WizardOptions } from '../../utils/types';
|
|
2
|
+
export declare enum FlaskProjectType {
|
|
3
|
+
STANDARD = "standard",// Basic Flask app
|
|
4
|
+
RESTFUL = "restful",// Flask-RESTful API
|
|
5
|
+
RESTX = "restx",// Flask-RESTX (Swagger docs)
|
|
6
|
+
SMOREST = "smorest",// flask-smorest (OpenAPI)
|
|
7
|
+
BLUEPRINT = "blueprint"
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get Flask version bucket for analytics
|
|
11
|
+
*/
|
|
12
|
+
export declare const getFlaskVersionBucket: (version: string | undefined) => string;
|
|
13
|
+
/**
|
|
14
|
+
* Extract Flask version from requirements files or pyproject.toml
|
|
15
|
+
*/
|
|
16
|
+
export declare function getFlaskVersion(options: Pick<WizardOptions, 'installDir'>): Promise<string | undefined>;
|
|
17
|
+
/**
|
|
18
|
+
* Detect Flask project type
|
|
19
|
+
*/
|
|
20
|
+
export declare function getFlaskProjectType(options: WizardOptions): Promise<FlaskProjectType>;
|
|
21
|
+
/**
|
|
22
|
+
* Get human-readable name for Flask project type
|
|
23
|
+
*/
|
|
24
|
+
export declare function getFlaskProjectTypeName(projectType: FlaskProjectType): string;
|
|
25
|
+
/**
|
|
26
|
+
* Find the main Flask app file
|
|
27
|
+
*/
|
|
28
|
+
export declare function findFlaskAppFile(options: Pick<WizardOptions, 'installDir'>): Promise<string | undefined>;
|