crca 1.4.0__py3-none-any.whl
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.
- .github/ISSUE_TEMPLATE/bug_report.md +65 -0
- .github/ISSUE_TEMPLATE/feature_request.md +41 -0
- .github/PULL_REQUEST_TEMPLATE.md +20 -0
- .github/workflows/publish-manual.yml +61 -0
- .github/workflows/publish.yml +64 -0
- .gitignore +214 -0
- CRCA.py +4156 -0
- LICENSE +201 -0
- MANIFEST.in +43 -0
- PKG-INFO +5035 -0
- README.md +4959 -0
- __init__.py +17 -0
- branches/CRCA-Q.py +2728 -0
- branches/crca_cg/corposwarm.py +9065 -0
- branches/crca_cg/fix_rancher_docker_creds.ps1 +155 -0
- branches/crca_cg/package.json +5 -0
- branches/crca_cg/test_bolt_integration.py +446 -0
- branches/crca_cg/test_corposwarm_comprehensive.py +773 -0
- branches/crca_cg/test_new_features.py +163 -0
- branches/crca_sd/__init__.py +149 -0
- branches/crca_sd/crca_sd_core.py +770 -0
- branches/crca_sd/crca_sd_governance.py +1325 -0
- branches/crca_sd/crca_sd_mpc.py +1130 -0
- branches/crca_sd/crca_sd_realtime.py +1844 -0
- branches/crca_sd/crca_sd_tui.py +1133 -0
- crca-1.4.0.dist-info/METADATA +5035 -0
- crca-1.4.0.dist-info/RECORD +501 -0
- crca-1.4.0.dist-info/WHEEL +4 -0
- crca-1.4.0.dist-info/licenses/LICENSE +201 -0
- docs/CRCA-Q.md +2333 -0
- examples/config.yaml.example +25 -0
- examples/crca_sd_example.py +513 -0
- examples/data_broker_example.py +294 -0
- examples/logistics_corporation.py +861 -0
- examples/palantir_example.py +299 -0
- examples/policy_bench.py +934 -0
- examples/pridnestrovia-sd.py +705 -0
- examples/pridnestrovia_realtime.py +1902 -0
- prompts/__init__.py +10 -0
- prompts/default_crca.py +101 -0
- pyproject.toml +151 -0
- requirements.txt +76 -0
- schemas/__init__.py +43 -0
- schemas/mcpSchemas.py +51 -0
- schemas/policy.py +458 -0
- templates/__init__.py +38 -0
- templates/base_specialized_agent.py +195 -0
- templates/drift_detection.py +325 -0
- templates/examples/causal_agent_template.py +309 -0
- templates/examples/drag_drop_example.py +213 -0
- templates/examples/logistics_agent_template.py +207 -0
- templates/examples/trading_agent_template.py +206 -0
- templates/feature_mixins.py +253 -0
- templates/graph_management.py +442 -0
- templates/llm_integration.py +194 -0
- templates/module_registry.py +276 -0
- templates/mpc_planner.py +280 -0
- templates/policy_loop.py +1168 -0
- templates/prediction_framework.py +448 -0
- templates/statistical_methods.py +778 -0
- tests/sanity.yml +31 -0
- tests/sanity_check +406 -0
- tests/test_core.py +47 -0
- tests/test_crca_excel.py +166 -0
- tests/test_crca_sd.py +780 -0
- tests/test_data_broker.py +424 -0
- tests/test_palantir.py +349 -0
- tools/__init__.py +38 -0
- tools/actuators.py +437 -0
- tools/bolt.diy/Dockerfile +103 -0
- tools/bolt.diy/app/components/@settings/core/AvatarDropdown.tsx +175 -0
- tools/bolt.diy/app/components/@settings/core/ControlPanel.tsx +345 -0
- tools/bolt.diy/app/components/@settings/core/constants.tsx +108 -0
- tools/bolt.diy/app/components/@settings/core/types.ts +114 -0
- tools/bolt.diy/app/components/@settings/index.ts +12 -0
- tools/bolt.diy/app/components/@settings/shared/components/TabTile.tsx +151 -0
- tools/bolt.diy/app/components/@settings/shared/service-integration/ConnectionForm.tsx +193 -0
- tools/bolt.diy/app/components/@settings/shared/service-integration/ConnectionTestIndicator.tsx +60 -0
- tools/bolt.diy/app/components/@settings/shared/service-integration/ErrorState.tsx +102 -0
- tools/bolt.diy/app/components/@settings/shared/service-integration/LoadingState.tsx +94 -0
- tools/bolt.diy/app/components/@settings/shared/service-integration/ServiceHeader.tsx +72 -0
- tools/bolt.diy/app/components/@settings/shared/service-integration/index.ts +6 -0
- tools/bolt.diy/app/components/@settings/tabs/data/DataTab.tsx +721 -0
- tools/bolt.diy/app/components/@settings/tabs/data/DataVisualization.tsx +384 -0
- tools/bolt.diy/app/components/@settings/tabs/event-logs/EventLogsTab.tsx +1013 -0
- tools/bolt.diy/app/components/@settings/tabs/features/FeaturesTab.tsx +295 -0
- tools/bolt.diy/app/components/@settings/tabs/github/GitHubTab.tsx +281 -0
- tools/bolt.diy/app/components/@settings/tabs/github/components/GitHubAuthDialog.tsx +173 -0
- tools/bolt.diy/app/components/@settings/tabs/github/components/GitHubCacheManager.tsx +367 -0
- tools/bolt.diy/app/components/@settings/tabs/github/components/GitHubConnection.tsx +233 -0
- tools/bolt.diy/app/components/@settings/tabs/github/components/GitHubErrorBoundary.tsx +105 -0
- tools/bolt.diy/app/components/@settings/tabs/github/components/GitHubProgressiveLoader.tsx +266 -0
- tools/bolt.diy/app/components/@settings/tabs/github/components/GitHubRepositoryCard.tsx +121 -0
- tools/bolt.diy/app/components/@settings/tabs/github/components/GitHubRepositorySelector.tsx +312 -0
- tools/bolt.diy/app/components/@settings/tabs/github/components/GitHubStats.tsx +291 -0
- tools/bolt.diy/app/components/@settings/tabs/github/components/GitHubUserProfile.tsx +46 -0
- tools/bolt.diy/app/components/@settings/tabs/github/components/shared/GitHubStateIndicators.tsx +264 -0
- tools/bolt.diy/app/components/@settings/tabs/github/components/shared/RepositoryCard.tsx +361 -0
- tools/bolt.diy/app/components/@settings/tabs/github/components/shared/index.ts +11 -0
- tools/bolt.diy/app/components/@settings/tabs/gitlab/GitLabTab.tsx +305 -0
- tools/bolt.diy/app/components/@settings/tabs/gitlab/components/GitLabAuthDialog.tsx +186 -0
- tools/bolt.diy/app/components/@settings/tabs/gitlab/components/GitLabConnection.tsx +253 -0
- tools/bolt.diy/app/components/@settings/tabs/gitlab/components/GitLabRepositorySelector.tsx +358 -0
- tools/bolt.diy/app/components/@settings/tabs/gitlab/components/RepositoryCard.tsx +79 -0
- tools/bolt.diy/app/components/@settings/tabs/gitlab/components/RepositoryList.tsx +142 -0
- tools/bolt.diy/app/components/@settings/tabs/gitlab/components/StatsDisplay.tsx +91 -0
- tools/bolt.diy/app/components/@settings/tabs/gitlab/components/index.ts +4 -0
- tools/bolt.diy/app/components/@settings/tabs/mcp/McpServerList.tsx +99 -0
- tools/bolt.diy/app/components/@settings/tabs/mcp/McpServerListItem.tsx +70 -0
- tools/bolt.diy/app/components/@settings/tabs/mcp/McpStatusBadge.tsx +37 -0
- tools/bolt.diy/app/components/@settings/tabs/mcp/McpTab.tsx +239 -0
- tools/bolt.diy/app/components/@settings/tabs/netlify/NetlifyTab.tsx +1393 -0
- tools/bolt.diy/app/components/@settings/tabs/netlify/components/NetlifyConnection.tsx +990 -0
- tools/bolt.diy/app/components/@settings/tabs/netlify/components/index.ts +1 -0
- tools/bolt.diy/app/components/@settings/tabs/notifications/NotificationsTab.tsx +300 -0
- tools/bolt.diy/app/components/@settings/tabs/profile/ProfileTab.tsx +181 -0
- tools/bolt.diy/app/components/@settings/tabs/providers/cloud/CloudProvidersTab.tsx +308 -0
- tools/bolt.diy/app/components/@settings/tabs/providers/local/ErrorBoundary.tsx +68 -0
- tools/bolt.diy/app/components/@settings/tabs/providers/local/HealthStatusBadge.tsx +64 -0
- tools/bolt.diy/app/components/@settings/tabs/providers/local/LoadingSkeleton.tsx +107 -0
- tools/bolt.diy/app/components/@settings/tabs/providers/local/LocalProvidersTab.tsx +556 -0
- tools/bolt.diy/app/components/@settings/tabs/providers/local/ModelCard.tsx +106 -0
- tools/bolt.diy/app/components/@settings/tabs/providers/local/ProviderCard.tsx +120 -0
- tools/bolt.diy/app/components/@settings/tabs/providers/local/SetupGuide.tsx +671 -0
- tools/bolt.diy/app/components/@settings/tabs/providers/local/StatusDashboard.tsx +91 -0
- tools/bolt.diy/app/components/@settings/tabs/providers/local/types.ts +44 -0
- tools/bolt.diy/app/components/@settings/tabs/settings/SettingsTab.tsx +215 -0
- tools/bolt.diy/app/components/@settings/tabs/supabase/SupabaseTab.tsx +1089 -0
- tools/bolt.diy/app/components/@settings/tabs/vercel/VercelTab.tsx +909 -0
- tools/bolt.diy/app/components/@settings/tabs/vercel/components/VercelConnection.tsx +368 -0
- tools/bolt.diy/app/components/@settings/tabs/vercel/components/index.ts +1 -0
- tools/bolt.diy/app/components/@settings/utils/tab-helpers.ts +54 -0
- tools/bolt.diy/app/components/chat/APIKeyManager.tsx +169 -0
- tools/bolt.diy/app/components/chat/Artifact.tsx +296 -0
- tools/bolt.diy/app/components/chat/AssistantMessage.tsx +192 -0
- tools/bolt.diy/app/components/chat/BaseChat.module.scss +47 -0
- tools/bolt.diy/app/components/chat/BaseChat.tsx +522 -0
- tools/bolt.diy/app/components/chat/Chat.client.tsx +670 -0
- tools/bolt.diy/app/components/chat/ChatAlert.tsx +108 -0
- tools/bolt.diy/app/components/chat/ChatBox.tsx +334 -0
- tools/bolt.diy/app/components/chat/CodeBlock.module.scss +10 -0
- tools/bolt.diy/app/components/chat/CodeBlock.tsx +85 -0
- tools/bolt.diy/app/components/chat/DicussMode.tsx +17 -0
- tools/bolt.diy/app/components/chat/ExamplePrompts.tsx +37 -0
- tools/bolt.diy/app/components/chat/FilePreview.tsx +38 -0
- tools/bolt.diy/app/components/chat/GitCloneButton.tsx +327 -0
- tools/bolt.diy/app/components/chat/ImportFolderButton.tsx +141 -0
- tools/bolt.diy/app/components/chat/LLMApiAlert.tsx +109 -0
- tools/bolt.diy/app/components/chat/MCPTools.tsx +129 -0
- tools/bolt.diy/app/components/chat/Markdown.module.scss +171 -0
- tools/bolt.diy/app/components/chat/Markdown.spec.ts +48 -0
- tools/bolt.diy/app/components/chat/Markdown.tsx +252 -0
- tools/bolt.diy/app/components/chat/Messages.client.tsx +102 -0
- tools/bolt.diy/app/components/chat/ModelSelector.tsx +797 -0
- tools/bolt.diy/app/components/chat/NetlifyDeploymentLink.client.tsx +51 -0
- tools/bolt.diy/app/components/chat/ProgressCompilation.tsx +110 -0
- tools/bolt.diy/app/components/chat/ScreenshotStateManager.tsx +33 -0
- tools/bolt.diy/app/components/chat/SendButton.client.tsx +39 -0
- tools/bolt.diy/app/components/chat/SpeechRecognition.tsx +28 -0
- tools/bolt.diy/app/components/chat/StarterTemplates.tsx +38 -0
- tools/bolt.diy/app/components/chat/SupabaseAlert.tsx +199 -0
- tools/bolt.diy/app/components/chat/SupabaseConnection.tsx +339 -0
- tools/bolt.diy/app/components/chat/ThoughtBox.tsx +43 -0
- tools/bolt.diy/app/components/chat/ToolInvocations.tsx +409 -0
- tools/bolt.diy/app/components/chat/UserMessage.tsx +101 -0
- tools/bolt.diy/app/components/chat/VercelDeploymentLink.client.tsx +158 -0
- tools/bolt.diy/app/components/chat/chatExportAndImport/ExportChatButton.tsx +49 -0
- tools/bolt.diy/app/components/chat/chatExportAndImport/ImportButtons.tsx +96 -0
- tools/bolt.diy/app/components/deploy/DeployAlert.tsx +197 -0
- tools/bolt.diy/app/components/deploy/DeployButton.tsx +277 -0
- tools/bolt.diy/app/components/deploy/GitHubDeploy.client.tsx +171 -0
- tools/bolt.diy/app/components/deploy/GitHubDeploymentDialog.tsx +1041 -0
- tools/bolt.diy/app/components/deploy/GitLabDeploy.client.tsx +171 -0
- tools/bolt.diy/app/components/deploy/GitLabDeploymentDialog.tsx +764 -0
- tools/bolt.diy/app/components/deploy/NetlifyDeploy.client.tsx +246 -0
- tools/bolt.diy/app/components/deploy/VercelDeploy.client.tsx +235 -0
- tools/bolt.diy/app/components/editor/codemirror/BinaryContent.tsx +7 -0
- tools/bolt.diy/app/components/editor/codemirror/CodeMirrorEditor.tsx +555 -0
- tools/bolt.diy/app/components/editor/codemirror/EnvMasking.ts +80 -0
- tools/bolt.diy/app/components/editor/codemirror/cm-theme.ts +192 -0
- tools/bolt.diy/app/components/editor/codemirror/indent.ts +68 -0
- tools/bolt.diy/app/components/editor/codemirror/languages.ts +112 -0
- tools/bolt.diy/app/components/git/GitUrlImport.client.tsx +147 -0
- tools/bolt.diy/app/components/header/Header.tsx +42 -0
- tools/bolt.diy/app/components/header/HeaderActionButtons.client.tsx +54 -0
- tools/bolt.diy/app/components/mandate/MandateSubmission.tsx +167 -0
- tools/bolt.diy/app/components/observability/DeploymentStatus.tsx +168 -0
- tools/bolt.diy/app/components/observability/EventTimeline.tsx +119 -0
- tools/bolt.diy/app/components/observability/FileDiffViewer.tsx +121 -0
- tools/bolt.diy/app/components/observability/GovernanceStatus.tsx +197 -0
- tools/bolt.diy/app/components/observability/GovernorMetrics.tsx +246 -0
- tools/bolt.diy/app/components/observability/LogStream.tsx +244 -0
- tools/bolt.diy/app/components/observability/MandateDetails.tsx +201 -0
- tools/bolt.diy/app/components/observability/ObservabilityDashboard.tsx +200 -0
- tools/bolt.diy/app/components/sidebar/HistoryItem.tsx +187 -0
- tools/bolt.diy/app/components/sidebar/Menu.client.tsx +536 -0
- tools/bolt.diy/app/components/sidebar/date-binning.ts +59 -0
- tools/bolt.diy/app/components/txt +1 -0
- tools/bolt.diy/app/components/ui/BackgroundRays/index.tsx +18 -0
- tools/bolt.diy/app/components/ui/BackgroundRays/styles.module.scss +246 -0
- tools/bolt.diy/app/components/ui/Badge.tsx +53 -0
- tools/bolt.diy/app/components/ui/BranchSelector.tsx +270 -0
- tools/bolt.diy/app/components/ui/Breadcrumbs.tsx +101 -0
- tools/bolt.diy/app/components/ui/Button.tsx +46 -0
- tools/bolt.diy/app/components/ui/Card.tsx +55 -0
- tools/bolt.diy/app/components/ui/Checkbox.tsx +32 -0
- tools/bolt.diy/app/components/ui/CloseButton.tsx +49 -0
- tools/bolt.diy/app/components/ui/CodeBlock.tsx +103 -0
- tools/bolt.diy/app/components/ui/Collapsible.tsx +9 -0
- tools/bolt.diy/app/components/ui/ColorSchemeDialog.tsx +378 -0
- tools/bolt.diy/app/components/ui/Dialog.tsx +449 -0
- tools/bolt.diy/app/components/ui/Dropdown.tsx +63 -0
- tools/bolt.diy/app/components/ui/EmptyState.tsx +154 -0
- tools/bolt.diy/app/components/ui/FileIcon.tsx +346 -0
- tools/bolt.diy/app/components/ui/FilterChip.tsx +92 -0
- tools/bolt.diy/app/components/ui/GlowingEffect.tsx +192 -0
- tools/bolt.diy/app/components/ui/GradientCard.tsx +100 -0
- tools/bolt.diy/app/components/ui/IconButton.tsx +84 -0
- tools/bolt.diy/app/components/ui/Input.tsx +22 -0
- tools/bolt.diy/app/components/ui/Label.tsx +20 -0
- tools/bolt.diy/app/components/ui/LoadingDots.tsx +27 -0
- tools/bolt.diy/app/components/ui/LoadingOverlay.tsx +32 -0
- tools/bolt.diy/app/components/ui/PanelHeader.tsx +20 -0
- tools/bolt.diy/app/components/ui/PanelHeaderButton.tsx +36 -0
- tools/bolt.diy/app/components/ui/Popover.tsx +29 -0
- tools/bolt.diy/app/components/ui/Progress.tsx +22 -0
- tools/bolt.diy/app/components/ui/RepositoryStats.tsx +87 -0
- tools/bolt.diy/app/components/ui/ScrollArea.tsx +41 -0
- tools/bolt.diy/app/components/ui/SearchInput.tsx +80 -0
- tools/bolt.diy/app/components/ui/SearchResultItem.tsx +134 -0
- tools/bolt.diy/app/components/ui/Separator.tsx +22 -0
- tools/bolt.diy/app/components/ui/SettingsButton.tsx +35 -0
- tools/bolt.diy/app/components/ui/Slider.tsx +73 -0
- tools/bolt.diy/app/components/ui/StatusIndicator.tsx +90 -0
- tools/bolt.diy/app/components/ui/Switch.tsx +37 -0
- tools/bolt.diy/app/components/ui/Tabs.tsx +52 -0
- tools/bolt.diy/app/components/ui/TabsWithSlider.tsx +112 -0
- tools/bolt.diy/app/components/ui/ThemeSwitch.tsx +29 -0
- tools/bolt.diy/app/components/ui/Tooltip.tsx +122 -0
- tools/bolt.diy/app/components/ui/index.ts +38 -0
- tools/bolt.diy/app/components/ui/use-toast.ts +66 -0
- tools/bolt.diy/app/components/workbench/DiffView.tsx +796 -0
- tools/bolt.diy/app/components/workbench/EditorPanel.tsx +174 -0
- tools/bolt.diy/app/components/workbench/ExpoQrModal.tsx +55 -0
- tools/bolt.diy/app/components/workbench/FileBreadcrumb.tsx +150 -0
- tools/bolt.diy/app/components/workbench/FileTree.tsx +565 -0
- tools/bolt.diy/app/components/workbench/Inspector.tsx +126 -0
- tools/bolt.diy/app/components/workbench/InspectorPanel.tsx +146 -0
- tools/bolt.diy/app/components/workbench/LockManager.tsx +262 -0
- tools/bolt.diy/app/components/workbench/PortDropdown.tsx +91 -0
- tools/bolt.diy/app/components/workbench/Preview.tsx +1049 -0
- tools/bolt.diy/app/components/workbench/ScreenshotSelector.tsx +293 -0
- tools/bolt.diy/app/components/workbench/Search.tsx +257 -0
- tools/bolt.diy/app/components/workbench/Workbench.client.tsx +506 -0
- tools/bolt.diy/app/components/workbench/terminal/Terminal.tsx +131 -0
- tools/bolt.diy/app/components/workbench/terminal/TerminalManager.tsx +68 -0
- tools/bolt.diy/app/components/workbench/terminal/TerminalTabs.tsx +277 -0
- tools/bolt.diy/app/components/workbench/terminal/theme.ts +36 -0
- tools/bolt.diy/app/components/workflow/WorkflowPhase.tsx +109 -0
- tools/bolt.diy/app/components/workflow/WorkflowStatus.tsx +60 -0
- tools/bolt.diy/app/components/workflow/WorkflowTimeline.tsx +150 -0
- tools/bolt.diy/app/entry.client.tsx +7 -0
- tools/bolt.diy/app/entry.server.tsx +80 -0
- tools/bolt.diy/app/root.tsx +156 -0
- tools/bolt.diy/app/routes/_index.tsx +175 -0
- tools/bolt.diy/app/routes/api.bug-report.ts +254 -0
- tools/bolt.diy/app/routes/api.chat.ts +463 -0
- tools/bolt.diy/app/routes/api.check-env-key.ts +41 -0
- tools/bolt.diy/app/routes/api.configured-providers.ts +110 -0
- tools/bolt.diy/app/routes/api.corporate-swarm-status.ts +55 -0
- tools/bolt.diy/app/routes/api.enhancer.ts +137 -0
- tools/bolt.diy/app/routes/api.export-api-keys.ts +44 -0
- tools/bolt.diy/app/routes/api.git-info.ts +69 -0
- tools/bolt.diy/app/routes/api.git-proxy.$.ts +178 -0
- tools/bolt.diy/app/routes/api.github-branches.ts +166 -0
- tools/bolt.diy/app/routes/api.github-deploy.ts +67 -0
- tools/bolt.diy/app/routes/api.github-stats.ts +198 -0
- tools/bolt.diy/app/routes/api.github-template.ts +242 -0
- tools/bolt.diy/app/routes/api.github-user.ts +287 -0
- tools/bolt.diy/app/routes/api.gitlab-branches.ts +143 -0
- tools/bolt.diy/app/routes/api.gitlab-deploy.ts +67 -0
- tools/bolt.diy/app/routes/api.gitlab-projects.ts +105 -0
- tools/bolt.diy/app/routes/api.health.ts +8 -0
- tools/bolt.diy/app/routes/api.llmcall.ts +298 -0
- tools/bolt.diy/app/routes/api.mandate.ts +351 -0
- tools/bolt.diy/app/routes/api.mcp-check.ts +16 -0
- tools/bolt.diy/app/routes/api.mcp-update-config.ts +23 -0
- tools/bolt.diy/app/routes/api.models.$provider.ts +2 -0
- tools/bolt.diy/app/routes/api.models.ts +90 -0
- tools/bolt.diy/app/routes/api.netlify-deploy.ts +240 -0
- tools/bolt.diy/app/routes/api.netlify-user.ts +142 -0
- tools/bolt.diy/app/routes/api.supabase-user.ts +199 -0
- tools/bolt.diy/app/routes/api.supabase.query.ts +92 -0
- tools/bolt.diy/app/routes/api.supabase.ts +56 -0
- tools/bolt.diy/app/routes/api.supabase.variables.ts +32 -0
- tools/bolt.diy/app/routes/api.system.diagnostics.ts +142 -0
- tools/bolt.diy/app/routes/api.system.disk-info.ts +311 -0
- tools/bolt.diy/app/routes/api.system.git-info.ts +332 -0
- tools/bolt.diy/app/routes/api.update.ts +21 -0
- tools/bolt.diy/app/routes/api.vercel-deploy.ts +497 -0
- tools/bolt.diy/app/routes/api.vercel-user.ts +161 -0
- tools/bolt.diy/app/routes/api.workflow-status.$proposalId.ts +309 -0
- tools/bolt.diy/app/routes/chat.$id.tsx +8 -0
- tools/bolt.diy/app/routes/execute.$mandateId.tsx +432 -0
- tools/bolt.diy/app/routes/git.tsx +25 -0
- tools/bolt.diy/app/routes/observability.$mandateId.tsx +50 -0
- tools/bolt.diy/app/routes/webcontainer.connect.$id.tsx +32 -0
- tools/bolt.diy/app/routes/webcontainer.preview.$id.tsx +97 -0
- tools/bolt.diy/app/routes/workflow.$proposalId.tsx +170 -0
- tools/bolt.diy/app/styles/animations.scss +49 -0
- tools/bolt.diy/app/styles/components/code.scss +9 -0
- tools/bolt.diy/app/styles/components/editor.scss +135 -0
- tools/bolt.diy/app/styles/components/resize-handle.scss +30 -0
- tools/bolt.diy/app/styles/components/terminal.scss +3 -0
- tools/bolt.diy/app/styles/components/toast.scss +23 -0
- tools/bolt.diy/app/styles/diff-view.css +72 -0
- tools/bolt.diy/app/styles/index.scss +73 -0
- tools/bolt.diy/app/styles/variables.scss +255 -0
- tools/bolt.diy/app/styles/z-index.scss +37 -0
- tools/bolt.diy/app/types/GitHub.ts +182 -0
- tools/bolt.diy/app/types/GitLab.ts +103 -0
- tools/bolt.diy/app/types/actions.ts +85 -0
- tools/bolt.diy/app/types/artifact.ts +5 -0
- tools/bolt.diy/app/types/context.ts +26 -0
- tools/bolt.diy/app/types/design-scheme.ts +93 -0
- tools/bolt.diy/app/types/global.d.ts +13 -0
- tools/bolt.diy/app/types/mandate.ts +333 -0
- tools/bolt.diy/app/types/model.ts +25 -0
- tools/bolt.diy/app/types/netlify.ts +94 -0
- tools/bolt.diy/app/types/supabase.ts +54 -0
- tools/bolt.diy/app/types/template.ts +8 -0
- tools/bolt.diy/app/types/terminal.ts +9 -0
- tools/bolt.diy/app/types/theme.ts +1 -0
- tools/bolt.diy/app/types/vercel.ts +67 -0
- tools/bolt.diy/app/utils/buffer.ts +29 -0
- tools/bolt.diy/app/utils/classNames.ts +65 -0
- tools/bolt.diy/app/utils/constants.ts +147 -0
- tools/bolt.diy/app/utils/debounce.ts +13 -0
- tools/bolt.diy/app/utils/debugLogger.ts +1284 -0
- tools/bolt.diy/app/utils/diff.spec.ts +11 -0
- tools/bolt.diy/app/utils/diff.ts +117 -0
- tools/bolt.diy/app/utils/easings.ts +3 -0
- tools/bolt.diy/app/utils/fileLocks.ts +96 -0
- tools/bolt.diy/app/utils/fileUtils.ts +121 -0
- tools/bolt.diy/app/utils/folderImport.ts +73 -0
- tools/bolt.diy/app/utils/formatSize.ts +12 -0
- tools/bolt.diy/app/utils/getLanguageFromExtension.ts +24 -0
- tools/bolt.diy/app/utils/githubStats.ts +9 -0
- tools/bolt.diy/app/utils/gitlabStats.ts +54 -0
- tools/bolt.diy/app/utils/logger.ts +162 -0
- tools/bolt.diy/app/utils/markdown.ts +155 -0
- tools/bolt.diy/app/utils/mobile.ts +4 -0
- tools/bolt.diy/app/utils/os.ts +4 -0
- tools/bolt.diy/app/utils/path.ts +19 -0
- tools/bolt.diy/app/utils/projectCommands.ts +197 -0
- tools/bolt.diy/app/utils/promises.ts +19 -0
- tools/bolt.diy/app/utils/react.ts +6 -0
- tools/bolt.diy/app/utils/sampler.ts +49 -0
- tools/bolt.diy/app/utils/selectStarterTemplate.ts +255 -0
- tools/bolt.diy/app/utils/shell.ts +384 -0
- tools/bolt.diy/app/utils/stacktrace.ts +27 -0
- tools/bolt.diy/app/utils/stripIndent.ts +23 -0
- tools/bolt.diy/app/utils/terminal.ts +11 -0
- tools/bolt.diy/app/utils/unreachable.ts +3 -0
- tools/bolt.diy/app/vite-env.d.ts +2 -0
- tools/bolt.diy/assets/entitlements.mac.plist +25 -0
- tools/bolt.diy/assets/icons/icon.icns +0 -0
- tools/bolt.diy/assets/icons/icon.ico +0 -0
- tools/bolt.diy/assets/icons/icon.png +0 -0
- tools/bolt.diy/bindings.js +78 -0
- tools/bolt.diy/bindings.sh +33 -0
- tools/bolt.diy/docker-compose.yaml +145 -0
- tools/bolt.diy/electron/main/index.ts +201 -0
- tools/bolt.diy/electron/main/tsconfig.json +30 -0
- tools/bolt.diy/electron/main/ui/menu.ts +29 -0
- tools/bolt.diy/electron/main/ui/window.ts +54 -0
- tools/bolt.diy/electron/main/utils/auto-update.ts +110 -0
- tools/bolt.diy/electron/main/utils/constants.ts +4 -0
- tools/bolt.diy/electron/main/utils/cookie.ts +40 -0
- tools/bolt.diy/electron/main/utils/reload.ts +35 -0
- tools/bolt.diy/electron/main/utils/serve.ts +71 -0
- tools/bolt.diy/electron/main/utils/store.ts +3 -0
- tools/bolt.diy/electron/main/utils/vite-server.ts +44 -0
- tools/bolt.diy/electron/main/vite.config.ts +44 -0
- tools/bolt.diy/electron/preload/index.ts +22 -0
- tools/bolt.diy/electron/preload/tsconfig.json +7 -0
- tools/bolt.diy/electron/preload/vite.config.ts +31 -0
- tools/bolt.diy/electron-builder.yml +64 -0
- tools/bolt.diy/electron-update.yml +4 -0
- tools/bolt.diy/eslint.config.mjs +57 -0
- tools/bolt.diy/functions/[[path]].ts +12 -0
- tools/bolt.diy/icons/angular.svg +1 -0
- tools/bolt.diy/icons/astro.svg +8 -0
- tools/bolt.diy/icons/chat.svg +1 -0
- tools/bolt.diy/icons/expo-brand.svg +1 -0
- tools/bolt.diy/icons/expo.svg +4 -0
- tools/bolt.diy/icons/logo-text.svg +1 -0
- tools/bolt.diy/icons/logo.svg +4 -0
- tools/bolt.diy/icons/mcp.svg +1 -0
- tools/bolt.diy/icons/nativescript.svg +1 -0
- tools/bolt.diy/icons/netlify.svg +10 -0
- tools/bolt.diy/icons/nextjs.svg +1 -0
- tools/bolt.diy/icons/nuxt.svg +1 -0
- tools/bolt.diy/icons/qwik.svg +1 -0
- tools/bolt.diy/icons/react.svg +1 -0
- tools/bolt.diy/icons/remix.svg +24 -0
- tools/bolt.diy/icons/remotion.svg +1 -0
- tools/bolt.diy/icons/shadcn.svg +21 -0
- tools/bolt.diy/icons/slidev.svg +60 -0
- tools/bolt.diy/icons/solidjs.svg +1 -0
- tools/bolt.diy/icons/stars.svg +1 -0
- tools/bolt.diy/icons/svelte.svg +1 -0
- tools/bolt.diy/icons/typescript.svg +1 -0
- tools/bolt.diy/icons/vite.svg +1 -0
- tools/bolt.diy/icons/vue.svg +1 -0
- tools/bolt.diy/load-context.ts +9 -0
- tools/bolt.diy/notarize.cjs +31 -0
- tools/bolt.diy/package.json +218 -0
- tools/bolt.diy/playwright.config.preview.ts +35 -0
- tools/bolt.diy/pre-start.cjs +26 -0
- tools/bolt.diy/public/apple-touch-icon-precomposed.png +0 -0
- tools/bolt.diy/public/apple-touch-icon.png +0 -0
- tools/bolt.diy/public/favicon.ico +0 -0
- tools/bolt.diy/public/favicon.svg +4 -0
- tools/bolt.diy/public/icons/AmazonBedrock.svg +1 -0
- tools/bolt.diy/public/icons/Anthropic.svg +4 -0
- tools/bolt.diy/public/icons/Cohere.svg +4 -0
- tools/bolt.diy/public/icons/Deepseek.svg +5 -0
- tools/bolt.diy/public/icons/Default.svg +4 -0
- tools/bolt.diy/public/icons/Google.svg +4 -0
- tools/bolt.diy/public/icons/Groq.svg +4 -0
- tools/bolt.diy/public/icons/HuggingFace.svg +4 -0
- tools/bolt.diy/public/icons/Hyperbolic.svg +3 -0
- tools/bolt.diy/public/icons/LMStudio.svg +5 -0
- tools/bolt.diy/public/icons/Mistral.svg +4 -0
- tools/bolt.diy/public/icons/Ollama.svg +4 -0
- tools/bolt.diy/public/icons/OpenAI.svg +4 -0
- tools/bolt.diy/public/icons/OpenAILike.svg +4 -0
- tools/bolt.diy/public/icons/OpenRouter.svg +4 -0
- tools/bolt.diy/public/icons/Perplexity.svg +4 -0
- tools/bolt.diy/public/icons/Together.svg +4 -0
- tools/bolt.diy/public/icons/xAI.svg +5 -0
- tools/bolt.diy/public/inspector-script.js +292 -0
- tools/bolt.diy/public/logo-dark-styled.png +0 -0
- tools/bolt.diy/public/logo-dark.png +0 -0
- tools/bolt.diy/public/logo-light-styled.png +0 -0
- tools/bolt.diy/public/logo-light.png +0 -0
- tools/bolt.diy/public/logo.svg +15 -0
- tools/bolt.diy/public/social_preview_index.jpg +0 -0
- tools/bolt.diy/scripts/clean.js +45 -0
- tools/bolt.diy/scripts/electron-dev.mjs +181 -0
- tools/bolt.diy/scripts/setup-env.sh +41 -0
- tools/bolt.diy/scripts/update-imports.sh +7 -0
- tools/bolt.diy/scripts/update.sh +52 -0
- tools/bolt.diy/services/execution-governor/Dockerfile +41 -0
- tools/bolt.diy/services/execution-governor/config.ts +42 -0
- tools/bolt.diy/services/execution-governor/index.ts +683 -0
- tools/bolt.diy/services/execution-governor/metrics.ts +141 -0
- tools/bolt.diy/services/execution-governor/package.json +31 -0
- tools/bolt.diy/services/execution-governor/priority-queue.ts +139 -0
- tools/bolt.diy/services/execution-governor/tsconfig.json +21 -0
- tools/bolt.diy/services/execution-governor/types.ts +145 -0
- tools/bolt.diy/services/headless-executor/Dockerfile +43 -0
- tools/bolt.diy/services/headless-executor/executor.ts +210 -0
- tools/bolt.diy/services/headless-executor/index.ts +323 -0
- tools/bolt.diy/services/headless-executor/package.json +27 -0
- tools/bolt.diy/services/headless-executor/tsconfig.json +21 -0
- tools/bolt.diy/services/headless-executor/types.ts +38 -0
- tools/bolt.diy/test-workflows.sh +240 -0
- tools/bolt.diy/tests/integration/corporate-swarm.test.ts +208 -0
- tools/bolt.diy/tests/mandates/budget-limited.json +34 -0
- tools/bolt.diy/tests/mandates/complex.json +53 -0
- tools/bolt.diy/tests/mandates/constraint-enforced.json +36 -0
- tools/bolt.diy/tests/mandates/simple.json +35 -0
- tools/bolt.diy/tsconfig.json +37 -0
- tools/bolt.diy/types/istextorbinary.d.ts +15 -0
- tools/bolt.diy/uno.config.ts +279 -0
- tools/bolt.diy/vite-electron.config.ts +76 -0
- tools/bolt.diy/vite.config.ts +112 -0
- tools/bolt.diy/worker-configuration.d.ts +22 -0
- tools/bolt.diy/wrangler.toml +6 -0
- tools/code_generator.py +461 -0
- tools/file_operations.py +465 -0
- tools/mandate_generator.py +337 -0
- tools/mcpClientUtils.py +1216 -0
- tools/sensors.py +285 -0
- utils/Agent_types.py +15 -0
- utils/AnyToStr.py +0 -0
- utils/HHCS.py +277 -0
- utils/__init__.py +30 -0
- utils/agent.py +3627 -0
- utils/aop.py +2948 -0
- utils/canonical.py +143 -0
- utils/conversation.py +1195 -0
- utils/doctrine_versioning +230 -0
- utils/formatter.py +474 -0
- utils/ledger.py +311 -0
- utils/out_types.py +16 -0
- utils/rollback.py +339 -0
- utils/router.py +929 -0
- utils/tui.py +1908 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path d="M22.282 11.846c0-.813-.195-1.618-.57-2.341a4.757 4.757 0 0 0-1.573-1.724 4.813 4.813 0 0 0 .21-1.425c0-.813-.195-1.618-.57-2.341a4.846 4.846 0 0 0-1.557-1.724A4.846 4.846 0 0 0 16.026 1.5a4.846 4.846 0 0 0-2.341.195 4.846 4.846 0 0 0-1.724 1.557 4.813 4.813 0 0 0-1.425-.21c-.813 0-1.618.195-2.341.57a4.846 4.846 0 0 0-1.724 1.557A4.846 4.846 0 0 0 5.5 7.974c0 .488.065.975.195 1.441a4.757 4.757 0 0 0-1.573 1.724 4.813 4.813 0 0 0-.57 2.341c0 .813.195 1.618.57 2.341a4.757 4.757 0 0 0 1.573 1.724 4.813 4.813 0 0 0-.21 1.425c0 .813.195 1.618.57 2.341a4.846 4.846 0 0 0 1.557 1.724 4.846 4.846 0 0 0 2.195.791c.813 0 1.618-.195 2.341-.57a4.846 4.846 0 0 0 1.724-1.557c.456.13.928.195 1.425.195.813 0 1.618-.195 2.341-.57a4.846 4.846 0 0 0 1.724-1.557 4.846 4.846 0 0 0 .791-2.195c0-.488-.065-.975-.195-1.441a4.757 4.757 0 0 0 1.573-1.724c.375-.723.57-1.528.57-2.341z" fill="none" stroke="#000000" stroke-width="1.5"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path d="M12 2L4.5 6V18L12 22L19.5 18V6L12 2ZM12 4.236L17.14 7L12 9.764L6.86 7L12 4.236ZM6.5 8.764L11.5 11.464V16.764L6.5 14.064V8.764ZM12.5 16.764V11.464L17.5 8.764V14.064L12.5 16.764Z" fill="#000000"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path d="M12 2C6.477 2 2 6.477 2 12C2 17.523 6.477 22 12 22C17.523 22 22 17.523 22 12C22 6.477 17.523 2 12 2ZM12 4.5C16.142 4.5 19.5 7.858 19.5 12C19.5 16.142 16.142 19.5 12 19.5C7.858 19.5 4.5 16.142 4.5 12C4.5 7.858 7.858 4.5 12 4.5ZM12 7C9.239 7 7 9.239 7 12C7 14.761 9.239 17 12 17C14.761 17 17 14.761 17 12C17 9.239 14.761 7 12 7Z" fill="#000000"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM15 6H9C7.34 6 6 7.34 6 9V15C6 16.66 7.34 18 9 18H15C16.66 18 18 16.66 18 15V9C18 7.34 16.66 6 15 6ZM16 15C16 15.55 15.55 16 15 16H9C8.45 16 8 15.55 8 15V9C8 8.45 8.45 8 9 8H15C15.55 8 16 8.45 16 9V15Z" fill="#000000"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path d="M3.5 3L9 12L3.5 21H6.5L10.5 14L14.5 21H17.5L12 12L17.5 3H14.5L10.5 10L6.5 3H3.5Z" fill="#000000"/>
|
|
4
|
+
<path d="M18 3L20.5 7L23 3H18Z" fill="#000000"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
(function() {
|
|
2
|
+
let isInspectorActive = false;
|
|
3
|
+
let inspectorStyle = null;
|
|
4
|
+
let currentHighlight = null;
|
|
5
|
+
|
|
6
|
+
// Function to get relevant styles
|
|
7
|
+
function getRelevantStyles(element) {
|
|
8
|
+
const computedStyles = window.getComputedStyle(element);
|
|
9
|
+
const relevantProps = [
|
|
10
|
+
'display', 'position', 'width', 'height', 'margin', 'padding',
|
|
11
|
+
'border', 'background', 'color', 'font-size', 'font-family',
|
|
12
|
+
'text-align', 'flex-direction', 'justify-content', 'align-items'
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const styles = {};
|
|
16
|
+
relevantProps.forEach(prop => {
|
|
17
|
+
const value = computedStyles.getPropertyValue(prop);
|
|
18
|
+
if (value) styles[prop] = value;
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
return styles;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Function to create a readable element selector
|
|
25
|
+
function createReadableSelector(element) {
|
|
26
|
+
let selector = element.tagName.toLowerCase();
|
|
27
|
+
|
|
28
|
+
// Add ID if present
|
|
29
|
+
if (element.id) {
|
|
30
|
+
selector += `#${element.id}`;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Add classes if present
|
|
34
|
+
let className = '';
|
|
35
|
+
if (element.className) {
|
|
36
|
+
if (typeof element.className === 'string') {
|
|
37
|
+
className = element.className;
|
|
38
|
+
} else if (element.className.baseVal !== undefined) {
|
|
39
|
+
className = element.className.baseVal;
|
|
40
|
+
} else {
|
|
41
|
+
className = element.className.toString();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (className.trim()) {
|
|
45
|
+
const classes = className.trim().split(/\s+/).slice(0, 3); // Limit to first 3 classes
|
|
46
|
+
selector += `.${classes.join('.')}`;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return selector;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Function to create element display text
|
|
54
|
+
function createElementDisplayText(element) {
|
|
55
|
+
const tagName = element.tagName.toLowerCase();
|
|
56
|
+
let displayText = `<${tagName}`;
|
|
57
|
+
|
|
58
|
+
// Add ID attribute
|
|
59
|
+
if (element.id) {
|
|
60
|
+
displayText += ` id="${element.id}"`;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Add class attribute (limit to first 3 classes for readability)
|
|
64
|
+
let className = '';
|
|
65
|
+
if (element.className) {
|
|
66
|
+
if (typeof element.className === 'string') {
|
|
67
|
+
className = element.className;
|
|
68
|
+
} else if (element.className.baseVal !== undefined) {
|
|
69
|
+
className = element.className.baseVal;
|
|
70
|
+
} else {
|
|
71
|
+
className = element.className.toString();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (className.trim()) {
|
|
75
|
+
const classes = className.trim().split(/\s+/);
|
|
76
|
+
const displayClasses = classes.length > 3 ?
|
|
77
|
+
classes.slice(0, 3).join(' ') + '...' :
|
|
78
|
+
classes.join(' ');
|
|
79
|
+
displayText += ` class="${displayClasses}"`;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Add other important attributes
|
|
84
|
+
const importantAttrs = ['type', 'name', 'href', 'src', 'alt', 'title'];
|
|
85
|
+
importantAttrs.forEach(attr => {
|
|
86
|
+
const value = element.getAttribute(attr);
|
|
87
|
+
if (value) {
|
|
88
|
+
const truncatedValue = value.length > 30 ? value.substring(0, 30) + '...' : value;
|
|
89
|
+
displayText += ` ${attr}="${truncatedValue}"`;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
displayText += '>';
|
|
94
|
+
|
|
95
|
+
// Add text content preview for certain elements
|
|
96
|
+
const textElements = ['span', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'button', 'a', 'label'];
|
|
97
|
+
if (textElements.includes(tagName) && element.textContent) {
|
|
98
|
+
const textPreview = element.textContent.trim().substring(0, 50);
|
|
99
|
+
if (textPreview) {
|
|
100
|
+
displayText += textPreview.length < element.textContent.trim().length ?
|
|
101
|
+
textPreview + '...' : textPreview;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
displayText += `</${tagName}>`;
|
|
106
|
+
|
|
107
|
+
return displayText;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Function to create element info
|
|
111
|
+
function createElementInfo(element) {
|
|
112
|
+
const rect = element.getBoundingClientRect();
|
|
113
|
+
|
|
114
|
+
return {
|
|
115
|
+
tagName: element.tagName,
|
|
116
|
+
className: getElementClassName(element),
|
|
117
|
+
id: element.id || '',
|
|
118
|
+
textContent: element.textContent?.slice(0, 100) || '',
|
|
119
|
+
styles: getRelevantStyles(element),
|
|
120
|
+
rect: {
|
|
121
|
+
x: rect.x,
|
|
122
|
+
y: rect.y,
|
|
123
|
+
width: rect.width,
|
|
124
|
+
height: rect.height,
|
|
125
|
+
top: rect.top,
|
|
126
|
+
left: rect.left
|
|
127
|
+
},
|
|
128
|
+
// Add new readable formats
|
|
129
|
+
selector: createReadableSelector(element),
|
|
130
|
+
displayText: createElementDisplayText(element),
|
|
131
|
+
elementPath: getElementPath(element)
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Helper function to get element class name consistently
|
|
136
|
+
function getElementClassName(element) {
|
|
137
|
+
if (!element.className) return '';
|
|
138
|
+
|
|
139
|
+
if (typeof element.className === 'string') {
|
|
140
|
+
return element.className;
|
|
141
|
+
} else if (element.className.baseVal !== undefined) {
|
|
142
|
+
return element.className.baseVal;
|
|
143
|
+
} else {
|
|
144
|
+
return element.className.toString();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Function to get element path (breadcrumb)
|
|
149
|
+
function getElementPath(element) {
|
|
150
|
+
const path = [];
|
|
151
|
+
let current = element;
|
|
152
|
+
|
|
153
|
+
while (current && current !== document.body && current !== document.documentElement) {
|
|
154
|
+
let pathSegment = current.tagName.toLowerCase();
|
|
155
|
+
|
|
156
|
+
if (current.id) {
|
|
157
|
+
pathSegment += `#${current.id}`;
|
|
158
|
+
} else if (current.className) {
|
|
159
|
+
const className = getElementClassName(current);
|
|
160
|
+
if (className.trim()) {
|
|
161
|
+
const firstClass = className.trim().split(/\s+/)[0];
|
|
162
|
+
pathSegment += `.${firstClass}`;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
path.unshift(pathSegment);
|
|
167
|
+
current = current.parentElement;
|
|
168
|
+
|
|
169
|
+
// Limit path length
|
|
170
|
+
if (path.length >= 5) break;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return path.join(' > ');
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Event handlers
|
|
177
|
+
function handleMouseMove(e) {
|
|
178
|
+
if (!isInspectorActive) return;
|
|
179
|
+
|
|
180
|
+
const target = e.target;
|
|
181
|
+
if (!target || target === document.body || target === document.documentElement) return;
|
|
182
|
+
|
|
183
|
+
// Remove previous highlight
|
|
184
|
+
if (currentHighlight) {
|
|
185
|
+
currentHighlight.classList.remove('inspector-highlight');
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Add highlight to current element
|
|
189
|
+
target.classList.add('inspector-highlight');
|
|
190
|
+
currentHighlight = target;
|
|
191
|
+
|
|
192
|
+
const elementInfo = createElementInfo(target);
|
|
193
|
+
|
|
194
|
+
// Send message to parent
|
|
195
|
+
window.parent.postMessage({
|
|
196
|
+
type: 'INSPECTOR_HOVER',
|
|
197
|
+
elementInfo: elementInfo
|
|
198
|
+
}, '*');
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
function handleClick(e) {
|
|
202
|
+
if (!isInspectorActive) return;
|
|
203
|
+
|
|
204
|
+
e.preventDefault();
|
|
205
|
+
e.stopPropagation();
|
|
206
|
+
|
|
207
|
+
const target = e.target;
|
|
208
|
+
if (!target || target === document.body || target === document.documentElement) return;
|
|
209
|
+
|
|
210
|
+
const elementInfo = createElementInfo(target);
|
|
211
|
+
|
|
212
|
+
// Send message to parent
|
|
213
|
+
window.parent.postMessage({
|
|
214
|
+
type: 'INSPECTOR_CLICK',
|
|
215
|
+
elementInfo: elementInfo
|
|
216
|
+
}, '*');
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
function handleMouseLeave() {
|
|
220
|
+
if (!isInspectorActive) return;
|
|
221
|
+
|
|
222
|
+
// Remove highlight
|
|
223
|
+
if (currentHighlight) {
|
|
224
|
+
currentHighlight.classList.remove('inspector-highlight');
|
|
225
|
+
currentHighlight = null;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Send message to parent
|
|
229
|
+
window.parent.postMessage({
|
|
230
|
+
type: 'INSPECTOR_LEAVE'
|
|
231
|
+
}, '*');
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// Function to activate/deactivate inspector
|
|
235
|
+
function setInspectorActive(active) {
|
|
236
|
+
isInspectorActive = active;
|
|
237
|
+
|
|
238
|
+
if (active) {
|
|
239
|
+
// Add inspector styles
|
|
240
|
+
if (!inspectorStyle) {
|
|
241
|
+
inspectorStyle = document.createElement('style');
|
|
242
|
+
inspectorStyle.textContent = `
|
|
243
|
+
.inspector-active * {
|
|
244
|
+
cursor: crosshair !important;
|
|
245
|
+
}
|
|
246
|
+
.inspector-highlight {
|
|
247
|
+
outline: 2px solid #3b82f6 !important;
|
|
248
|
+
outline-offset: -2px !important;
|
|
249
|
+
background-color: rgba(59, 130, 246, 0.1) !important;
|
|
250
|
+
}
|
|
251
|
+
`;
|
|
252
|
+
document.head.appendChild(inspectorStyle);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
document.body.classList.add('inspector-active');
|
|
256
|
+
|
|
257
|
+
// Add event listeners
|
|
258
|
+
document.addEventListener('mousemove', handleMouseMove, true);
|
|
259
|
+
document.addEventListener('click', handleClick, true);
|
|
260
|
+
document.addEventListener('mouseleave', handleMouseLeave, true);
|
|
261
|
+
} else {
|
|
262
|
+
document.body.classList.remove('inspector-active');
|
|
263
|
+
|
|
264
|
+
// Remove highlight
|
|
265
|
+
if (currentHighlight) {
|
|
266
|
+
currentHighlight.classList.remove('inspector-highlight');
|
|
267
|
+
currentHighlight = null;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// Remove event listeners
|
|
271
|
+
document.removeEventListener('mousemove', handleMouseMove, true);
|
|
272
|
+
document.removeEventListener('click', handleClick, true);
|
|
273
|
+
document.removeEventListener('mouseleave', handleMouseLeave, true);
|
|
274
|
+
|
|
275
|
+
// Remove styles
|
|
276
|
+
if (inspectorStyle) {
|
|
277
|
+
inspectorStyle.remove();
|
|
278
|
+
inspectorStyle = null;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// Listen for messages from parent
|
|
284
|
+
window.addEventListener('message', function(event) {
|
|
285
|
+
if (event.data.type === 'INSPECTOR_ACTIVATE') {
|
|
286
|
+
setInspectorActive(event.data.active);
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
// Auto-inject if inspector is already active
|
|
291
|
+
window.parent.postMessage({ type: 'INSPECTOR_READY' }, '*');
|
|
292
|
+
})();
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="95" height="83" fill="none"><g filter="url(#a)"><path fill="url(#b)" d="M66.657 0H28.343a7.948 7.948 0 0 0-6.887 3.979L2.288 37.235a7.948 7.948 0 0 0 0 7.938L21.456 78.43a7.948 7.948 0 0 0 6.887 3.979h38.314a7.948 7.948 0 0 0 6.886-3.98l19.17-33.256a7.948 7.948 0 0 0 0-7.938L73.542 3.98A7.948 7.948 0 0 0 66.657 0Z"/></g><g filter="url(#c)"><path fill="#fff" fill-rule="evenodd" d="M50.642 59.608c-3.468 0-6.873-1.261-8.827-3.973l-.69 3.198-12.729 6.762 1.374-6.762 9.27-42.04h11.35l-3.279 14.818c2.649-2.9 5.108-3.973 8.26-3.973 6.81 0 11.35 4.477 11.35 12.675 0 8.45-5.233 19.295-16.079 19.295Zm4.351-16.9c0 3.91-2.774 6.874-6.368 6.874-2.018 0-3.847-.757-5.045-2.08l1.766-7.757c1.324-1.324 2.837-2.08 4.603-2.08 2.711 0 5.044 2.017 5.044 5.044Z" clip-rule="evenodd"/></g><defs><filter id="a" width="92.549" height="82.409" x="1.226" y="0" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset/><feGaussianBlur stdDeviation="1.717"/><feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.65 0"/><feBlend in2="shape" result="effect1_innerShadow_615_13380"/></filter><filter id="c" width="38.326" height="48.802" x="28.396" y="16.793" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset/><feGaussianBlur stdDeviation=".072"/><feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"/><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.95 0"/><feBlend in2="shape" result="effect1_innerShadow_615_13380"/></filter>
|
|
2
|
+
<linearGradient id="b" x1="47.5" x2="47.5" y1="0" y2="82.409" gradientUnits="userSpaceOnUse">
|
|
3
|
+
<stop offset="0%" stop-color="#F8F5FF" />
|
|
4
|
+
<stop offset="10%" stop-color="#F0EBFF" />
|
|
5
|
+
<stop offset="20%" stop-color="#E1D6FF" />
|
|
6
|
+
<stop offset="30%" stop-color="#CEBEFF" />
|
|
7
|
+
<stop offset="40%" stop-color="#B69EFF" />
|
|
8
|
+
<stop offset="50%" stop-color="#9C7DFF" />
|
|
9
|
+
<stop offset="60%" stop-color="#8A5FFF" />
|
|
10
|
+
<stop offset="70%" stop-color="#7645E8" />
|
|
11
|
+
<stop offset="80%" stop-color="#6234BB" />
|
|
12
|
+
<stop offset="90%" stop-color="#502D93" />
|
|
13
|
+
<stop offset="100%" stop-color="#2D1959" />
|
|
14
|
+
</linearGradient>
|
|
15
|
+
</defs></svg>
|
|
Binary file
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { rm, existsSync } from 'fs';
|
|
2
|
+
import { join } from 'path';
|
|
3
|
+
import { execSync } from 'child_process';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { dirname } from 'path';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = dirname(__filename);
|
|
9
|
+
|
|
10
|
+
const dirsToRemove = ['node_modules/.vite', 'node_modules/.cache', '.cache', 'dist'];
|
|
11
|
+
|
|
12
|
+
console.log('đ§š Cleaning project...');
|
|
13
|
+
|
|
14
|
+
// Remove directories
|
|
15
|
+
for (const dir of dirsToRemove) {
|
|
16
|
+
const fullPath = join(__dirname, '..', dir);
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
if (existsSync(fullPath)) {
|
|
20
|
+
console.log(`Removing ${dir}...`);
|
|
21
|
+
rm(fullPath, { recursive: true, force: true }, (err) => {
|
|
22
|
+
if (err) {
|
|
23
|
+
console.error(`Error removing ${dir}:`, err.message);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
} catch (err) {
|
|
28
|
+
console.error(`Error removing ${dir}:`, err.message);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Run pnpm commands
|
|
33
|
+
console.log('\nđĻ Reinstalling dependencies...');
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
execSync('pnpm install', { stdio: 'inherit' });
|
|
37
|
+
console.log('\nđī¸ Clearing pnpm cache...');
|
|
38
|
+
execSync('pnpm cache clean', { stdio: 'inherit' });
|
|
39
|
+
console.log('\nđī¸ Rebuilding project...');
|
|
40
|
+
execSync('pnpm build', { stdio: 'inherit' });
|
|
41
|
+
console.log('\n⨠Clean completed! You can now run pnpm dev');
|
|
42
|
+
} catch (err) {
|
|
43
|
+
console.error('\nâ Error during cleanup:', err.message);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Electron Development Script
|
|
5
|
+
*
|
|
6
|
+
* This script provides hot-reload development mode for Electron applications.
|
|
7
|
+
* It automatically builds Electron dependencies, starts the Remix development server,
|
|
8
|
+
* and launches the Electron application with hot-reload capabilities.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { spawn, exec } from 'node:child_process';
|
|
12
|
+
import path from 'node:path';
|
|
13
|
+
import fs from 'node:fs';
|
|
14
|
+
import { fileURLToPath } from 'node:url';
|
|
15
|
+
|
|
16
|
+
// Get current file directory
|
|
17
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
18
|
+
const __dirname = path.dirname(__filename);
|
|
19
|
+
|
|
20
|
+
// Constants
|
|
21
|
+
const REMIX_PORT = 5173;
|
|
22
|
+
const CHECK_INTERVAL = 1000;
|
|
23
|
+
const MAX_RETRIES = 30;
|
|
24
|
+
|
|
25
|
+
// Set environment variables
|
|
26
|
+
process.env.NODE_ENV = 'development';
|
|
27
|
+
|
|
28
|
+
console.log('đ Starting Electron hot-reload development mode...');
|
|
29
|
+
console.log('đ§ Environment:', process.env.NODE_ENV);
|
|
30
|
+
|
|
31
|
+
let electronProcess = null;
|
|
32
|
+
let remixProcess = null;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Cleanup function to gracefully shutdown all processes
|
|
36
|
+
*/
|
|
37
|
+
function cleanup() {
|
|
38
|
+
console.log('\nđ Shutting down all processes...');
|
|
39
|
+
|
|
40
|
+
if (electronProcess) {
|
|
41
|
+
electronProcess.kill('SIGTERM');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (remixProcess) {
|
|
45
|
+
remixProcess.kill('SIGTERM');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
process.exit(0);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Handle process exit signals
|
|
52
|
+
process.on('SIGINT', cleanup);
|
|
53
|
+
process.on('SIGTERM', cleanup);
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Wait for a server to start on the specified port
|
|
57
|
+
* @param {number} port - Port number to check
|
|
58
|
+
* @param {string} serverName - Name of the server for logging
|
|
59
|
+
* @returns {Promise<void>}
|
|
60
|
+
*/
|
|
61
|
+
async function waitForServer(port, serverName) {
|
|
62
|
+
return new Promise((resolve, reject) => {
|
|
63
|
+
let retries = 0;
|
|
64
|
+
|
|
65
|
+
const checkServer = () => {
|
|
66
|
+
exec(`lsof -i :${port}`, (error, stdout) => {
|
|
67
|
+
if (stdout) {
|
|
68
|
+
console.log(`â
${serverName} started`);
|
|
69
|
+
resolve();
|
|
70
|
+
} else if (retries >= MAX_RETRIES) {
|
|
71
|
+
reject(new Error(`Timeout waiting for ${serverName} to start`));
|
|
72
|
+
} else {
|
|
73
|
+
retries++;
|
|
74
|
+
setTimeout(checkServer, CHECK_INTERVAL);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
checkServer();
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Build Electron dependencies
|
|
85
|
+
* @returns {Promise<void>}
|
|
86
|
+
*/
|
|
87
|
+
async function buildElectronDeps() {
|
|
88
|
+
return new Promise((resolve, reject) => {
|
|
89
|
+
const buildProcess = spawn('pnpm', ['electron:build:deps'], {
|
|
90
|
+
stdio: 'inherit',
|
|
91
|
+
env: { ...process.env },
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
buildProcess.on('close', (code) => {
|
|
95
|
+
if (code === 0) {
|
|
96
|
+
console.log('â
Electron dependencies built successfully');
|
|
97
|
+
resolve();
|
|
98
|
+
} else {
|
|
99
|
+
reject(new Error(`Build failed with exit code: ${code}`));
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
buildProcess.on('error', (error) => {
|
|
104
|
+
reject(new Error(`Build process error: ${error.message}`));
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Main function to start Electron development mode
|
|
111
|
+
* @returns {Promise<void>}
|
|
112
|
+
*/
|
|
113
|
+
async function startElectronDev() {
|
|
114
|
+
try {
|
|
115
|
+
// 1. Build Electron dependencies first
|
|
116
|
+
console.log('đĻ Building Electron dependencies...');
|
|
117
|
+
await buildElectronDeps();
|
|
118
|
+
|
|
119
|
+
// 2. Start Remix development server
|
|
120
|
+
console.log('đ Starting Remix development server...');
|
|
121
|
+
remixProcess = spawn('pnpm', ['dev'], {
|
|
122
|
+
stdio: 'pipe',
|
|
123
|
+
env: { ...process.env },
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
remixProcess.stdout.on('data', (data) => {
|
|
127
|
+
const output = data.toString();
|
|
128
|
+
console.log(`[Remix] ${output.trim()}`);
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
remixProcess.stderr.on('data', (data) => {
|
|
132
|
+
console.error(`[Remix Error] ${data.toString().trim()}`);
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// Wait for Remix server to start
|
|
136
|
+
await waitForServer(REMIX_PORT, 'Remix development server');
|
|
137
|
+
|
|
138
|
+
// 3. Start Electron application
|
|
139
|
+
console.log('⥠Starting Electron application...');
|
|
140
|
+
|
|
141
|
+
const electronPath = path.join(__dirname, '..', 'node_modules', '.bin', 'electron');
|
|
142
|
+
const mainPath = path.join(__dirname, '..', 'build', 'electron', 'main', 'index.mjs');
|
|
143
|
+
|
|
144
|
+
// Check if main process file exists
|
|
145
|
+
if (!fs.existsSync(mainPath)) {
|
|
146
|
+
throw new Error(`Main process file not found: ${mainPath}`);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
electronProcess = spawn(electronPath, [mainPath], {
|
|
150
|
+
stdio: 'inherit',
|
|
151
|
+
env: {
|
|
152
|
+
...process.env,
|
|
153
|
+
NODE_ENV: 'development',
|
|
154
|
+
ELECTRON_IS_DEV: '1',
|
|
155
|
+
},
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
electronProcess.on('error', (error) => {
|
|
159
|
+
console.error('â Failed to start Electron:', error);
|
|
160
|
+
cleanup();
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
electronProcess.on('exit', (code) => {
|
|
164
|
+
console.log(`đą Electron process exited with code: ${code}`);
|
|
165
|
+
|
|
166
|
+
if (code !== 0) {
|
|
167
|
+
cleanup();
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
console.log('đ Electron hot-reload development mode started!');
|
|
172
|
+
console.log('đĄ Code changes will automatically reload');
|
|
173
|
+
console.log('đ Press Ctrl+C to exit');
|
|
174
|
+
} catch (error) {
|
|
175
|
+
console.error('â Startup failed:', error.message);
|
|
176
|
+
cleanup();
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Start development mode
|
|
181
|
+
startElectronDev();
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Setup script for Docker environment variables
|
|
4
|
+
# This script helps resolve the issue where .env.local is not being loaded in Docker
|
|
5
|
+
|
|
6
|
+
echo "đ§ Setting up environment files for Docker..."
|
|
7
|
+
|
|
8
|
+
# Check if .env.local exists
|
|
9
|
+
if [ -f ".env.local" ]; then
|
|
10
|
+
echo "â
Found .env.local file"
|
|
11
|
+
|
|
12
|
+
# Create symlink or copy to .env for Docker Compose
|
|
13
|
+
if [ ! -f ".env" ] || [ ".env" -ot ".env.local" ]; then
|
|
14
|
+
echo "đ Copying .env.local to .env for Docker Compose compatibility..."
|
|
15
|
+
cp .env.local .env
|
|
16
|
+
echo "â
Environment file synced"
|
|
17
|
+
else
|
|
18
|
+
echo "âšī¸ .env file already up to date"
|
|
19
|
+
fi
|
|
20
|
+
else
|
|
21
|
+
echo "â ī¸ No .env.local file found"
|
|
22
|
+
|
|
23
|
+
# Check if .env.example exists and offer to copy it
|
|
24
|
+
if [ -f ".env.example" ]; then
|
|
25
|
+
echo "đ Found .env.example file"
|
|
26
|
+
read -p "Would you like to create .env.local from .env.example? (y/n) " -n 1 -r
|
|
27
|
+
echo
|
|
28
|
+
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
29
|
+
cp .env.example .env.local
|
|
30
|
+
cp .env.example .env
|
|
31
|
+
echo "â
Created .env.local and .env from .env.example"
|
|
32
|
+
echo "đ Please edit .env.local with your API keys"
|
|
33
|
+
fi
|
|
34
|
+
fi
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
echo "⨠Environment setup complete!"
|
|
38
|
+
echo ""
|
|
39
|
+
echo "đ Note: Docker Compose reads both .env and .env.local files"
|
|
40
|
+
echo " - .env is used for variable substitution in docker-compose.yaml"
|
|
41
|
+
echo " - .env.local is passed to the container for runtime variables"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Update imports in TypeScript files
|
|
4
|
+
find app -type f -name "*.ts" -o -name "*.tsx" | xargs sed -i '' 's|~/components/settings/settings.types|~/components/@settings/core/types|g'
|
|
5
|
+
|
|
6
|
+
# Update imports for specific components
|
|
7
|
+
find app -type f -name "*.ts" -o -name "*.tsx" | xargs sed -i '' 's|~/components/settings/|~/components/@settings/tabs/|g'
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Exit on any error
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
echo "Starting Bolt.DIY update process..."
|
|
7
|
+
|
|
8
|
+
# Get the current directory
|
|
9
|
+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
10
|
+
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
11
|
+
|
|
12
|
+
# Store current version
|
|
13
|
+
CURRENT_VERSION=$(cat "$PROJECT_ROOT/package.json" | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')
|
|
14
|
+
|
|
15
|
+
echo "Current version: $CURRENT_VERSION"
|
|
16
|
+
echo "Fetching latest version..."
|
|
17
|
+
|
|
18
|
+
# Create temp directory
|
|
19
|
+
TMP_DIR=$(mktemp -d)
|
|
20
|
+
cd "$TMP_DIR"
|
|
21
|
+
|
|
22
|
+
# Download latest release
|
|
23
|
+
LATEST_RELEASE_URL=$(curl -s https://api.github.com/repos/stackblitz-labs/bolt.diy/releases/latest | grep "browser_download_url.*zip" | cut -d : -f 2,3 | tr -d \")
|
|
24
|
+
if [ -z "$LATEST_RELEASE_URL" ]; then
|
|
25
|
+
echo "Error: Could not find latest release download URL"
|
|
26
|
+
exit 1
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
echo "Downloading latest release..."
|
|
30
|
+
curl -L -o latest.zip "$LATEST_RELEASE_URL"
|
|
31
|
+
|
|
32
|
+
echo "Extracting update..."
|
|
33
|
+
unzip -q latest.zip
|
|
34
|
+
|
|
35
|
+
# Backup current installation
|
|
36
|
+
echo "Creating backup..."
|
|
37
|
+
BACKUP_DIR="$PROJECT_ROOT/backup_$(date +%Y%m%d_%H%M%S)"
|
|
38
|
+
mkdir -p "$BACKUP_DIR"
|
|
39
|
+
cp -r "$PROJECT_ROOT"/* "$BACKUP_DIR/"
|
|
40
|
+
|
|
41
|
+
# Install update
|
|
42
|
+
echo "Installing update..."
|
|
43
|
+
cp -r ./* "$PROJECT_ROOT/"
|
|
44
|
+
|
|
45
|
+
# Clean up
|
|
46
|
+
cd "$PROJECT_ROOT"
|
|
47
|
+
rm -rf "$TMP_DIR"
|
|
48
|
+
|
|
49
|
+
echo "Update completed successfully!"
|
|
50
|
+
echo "Please restart the application to apply the changes."
|
|
51
|
+
|
|
52
|
+
exit 0
|