nomoreide 0.2.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -9
- package/bin/nomoreide.js +82 -0
- package/package.json +24 -132
- package/dist/cli/agents.d.ts +0 -2
- package/dist/cli/agents.js +0 -43
- package/dist/cli/agents.js.map +0 -1
- package/dist/cli/commands.d.ts +0 -11
- package/dist/cli/commands.js +0 -235
- package/dist/cli/commands.js.map +0 -1
- package/dist/cli/daemon.d.ts +0 -15
- package/dist/cli/daemon.js +0 -139
- package/dist/cli/daemon.js.map +0 -1
- package/dist/cli/database.d.ts +0 -2
- package/dist/cli/database.js +0 -145
- package/dist/cli/database.js.map +0 -1
- package/dist/cli/errors.d.ts +0 -2
- package/dist/cli/errors.js +0 -3
- package/dist/cli/errors.js.map +0 -1
- package/dist/cli/flags.d.ts +0 -1
- package/dist/cli/flags.js +0 -19
- package/dist/cli/flags.js.map +0 -1
- package/dist/cli/git.d.ts +0 -2
- package/dist/cli/git.js +0 -113
- package/dist/cli/git.js.map +0 -1
- package/dist/cli/profile.d.ts +0 -2
- package/dist/cli/profile.js +0 -171
- package/dist/cli/profile.js.map +0 -1
- package/dist/core/agent-context.d.ts +0 -9
- package/dist/core/agent-context.js +0 -43
- package/dist/core/agent-context.js.map +0 -1
- package/dist/core/agent-env/antigravity-reader.d.ts +0 -7
- package/dist/core/agent-env/antigravity-reader.js +0 -86
- package/dist/core/agent-env/antigravity-reader.js.map +0 -1
- package/dist/core/agent-env/availability.d.ts +0 -6
- package/dist/core/agent-env/availability.js +0 -79
- package/dist/core/agent-env/availability.js.map +0 -1
- package/dist/core/agent-env/claude-reader.d.ts +0 -7
- package/dist/core/agent-env/claude-reader.js +0 -101
- package/dist/core/agent-env/claude-reader.js.map +0 -1
- package/dist/core/agent-env/codex-reader.d.ts +0 -11
- package/dist/core/agent-env/codex-reader.js +0 -164
- package/dist/core/agent-env/codex-reader.js.map +0 -1
- package/dist/core/agent-env/index.d.ts +0 -9
- package/dist/core/agent-env/index.js +0 -29
- package/dist/core/agent-env/index.js.map +0 -1
- package/dist/core/agent-env/managed-plugins.d.ts +0 -18
- package/dist/core/agent-env/managed-plugins.js +0 -68
- package/dist/core/agent-env/managed-plugins.js.map +0 -1
- package/dist/core/agent-env/plugin-reader.d.ts +0 -9
- package/dist/core/agent-env/plugin-reader.js +0 -174
- package/dist/core/agent-env/plugin-reader.js.map +0 -1
- package/dist/core/agent-env/shared.d.ts +0 -26
- package/dist/core/agent-env/shared.js +0 -116
- package/dist/core/agent-env/shared.js.map +0 -1
- package/dist/core/agent-env/types.d.ts +0 -66
- package/dist/core/agent-env/types.js +0 -7
- package/dist/core/agent-env/types.js.map +0 -1
- package/dist/core/agent-env-actions.d.ts +0 -117
- package/dist/core/agent-env-actions.js +0 -273
- package/dist/core/agent-env-actions.js.map +0 -1
- package/dist/core/agent-env-plugin-uninstall.d.ts +0 -11
- package/dist/core/agent-env-plugin-uninstall.js +0 -189
- package/dist/core/agent-env-plugin-uninstall.js.map +0 -1
- package/dist/core/agent-env-writers.d.ts +0 -71
- package/dist/core/agent-env-writers.js +0 -632
- package/dist/core/agent-env-writers.js.map +0 -1
- package/dist/core/agent-profiles/apply.d.ts +0 -57
- package/dist/core/agent-profiles/apply.js +0 -209
- package/dist/core/agent-profiles/apply.js.map +0 -1
- package/dist/core/agent-profiles/builtin.d.ts +0 -8
- package/dist/core/agent-profiles/builtin.js +0 -33
- package/dist/core/agent-profiles/builtin.js.map +0 -1
- package/dist/core/agent-profiles/credentials.d.ts +0 -26
- package/dist/core/agent-profiles/credentials.js +0 -151
- package/dist/core/agent-profiles/credentials.js.map +0 -1
- package/dist/core/agent-profiles/debug-setup.d.ts +0 -18
- package/dist/core/agent-profiles/debug-setup.js +0 -237
- package/dist/core/agent-profiles/debug-setup.js.map +0 -1
- package/dist/core/agent-profiles/index.d.ts +0 -18
- package/dist/core/agent-profiles/index.js +0 -19
- package/dist/core/agent-profiles/index.js.map +0 -1
- package/dist/core/agent-profiles/plugin-apply.d.ts +0 -16
- package/dist/core/agent-profiles/plugin-apply.js +0 -383
- package/dist/core/agent-profiles/plugin-apply.js.map +0 -1
- package/dist/core/agent-profiles/plugin-bundle.d.ts +0 -6
- package/dist/core/agent-profiles/plugin-bundle.js +0 -32
- package/dist/core/agent-profiles/plugin-bundle.js.map +0 -1
- package/dist/core/agent-profiles/publication.d.ts +0 -105
- package/dist/core/agent-profiles/publication.js +0 -126
- package/dist/core/agent-profiles/publication.js.map +0 -1
- package/dist/core/agent-profiles/registry-auth.d.ts +0 -25
- package/dist/core/agent-profiles/registry-auth.js +0 -78
- package/dist/core/agent-profiles/registry-auth.js.map +0 -1
- package/dist/core/agent-profiles/registry-client.d.ts +0 -98
- package/dist/core/agent-profiles/registry-client.js +0 -109
- package/dist/core/agent-profiles/registry-client.js.map +0 -1
- package/dist/core/agent-profiles/registry-config.d.ts +0 -62
- package/dist/core/agent-profiles/registry-config.js +0 -221
- package/dist/core/agent-profiles/registry-config.js.map +0 -1
- package/dist/core/agent-profiles/registry-transfer.d.ts +0 -42
- package/dist/core/agent-profiles/registry-transfer.js +0 -133
- package/dist/core/agent-profiles/registry-transfer.js.map +0 -1
- package/dist/core/agent-profiles/store.d.ts +0 -62
- package/dist/core/agent-profiles/store.js +0 -479
- package/dist/core/agent-profiles/store.js.map +0 -1
- package/dist/core/agent-profiles/transfer.d.ts +0 -27
- package/dist/core/agent-profiles/transfer.js +0 -359
- package/dist/core/agent-profiles/transfer.js.map +0 -1
- package/dist/core/agent-profiles/types.d.ts +0 -364
- package/dist/core/agent-profiles/types.js +0 -79
- package/dist/core/agent-profiles/types.js.map +0 -1
- package/dist/core/agent-runtime.d.ts +0 -114
- package/dist/core/agent-runtime.js +0 -494
- package/dist/core/agent-runtime.js.map +0 -1
- package/dist/core/agent-sessions.d.ts +0 -46
- package/dist/core/agent-sessions.js +0 -109
- package/dist/core/agent-sessions.js.map +0 -1
- package/dist/core/agent-settings.d.ts +0 -31
- package/dist/core/agent-settings.js +0 -129
- package/dist/core/agent-settings.js.map +0 -1
- package/dist/core/agent-terminal.d.ts +0 -22
- package/dist/core/agent-terminal.js +0 -62
- package/dist/core/agent-terminal.js.map +0 -1
- package/dist/core/agent-transcripts.d.ts +0 -29
- package/dist/core/agent-transcripts.js +0 -281
- package/dist/core/agent-transcripts.js.map +0 -1
- package/dist/core/app-settings.d.ts +0 -74
- package/dist/core/app-settings.js +0 -118
- package/dist/core/app-settings.js.map +0 -1
- package/dist/core/app-version.d.ts +0 -2
- package/dist/core/app-version.js +0 -16
- package/dist/core/app-version.js.map +0 -1
- package/dist/core/approval-broker.d.ts +0 -29
- package/dist/core/approval-broker.js +0 -48
- package/dist/core/approval-broker.js.map +0 -1
- package/dist/core/claude-settings.d.ts +0 -18
- package/dist/core/claude-settings.js +0 -48
- package/dist/core/claude-settings.js.map +0 -1
- package/dist/core/cloudflare-actions.d.ts +0 -90
- package/dist/core/cloudflare-actions.js +0 -178
- package/dist/core/cloudflare-actions.js.map +0 -1
- package/dist/core/cloudflare-auth.d.ts +0 -61
- package/dist/core/cloudflare-auth.js +0 -149
- package/dist/core/cloudflare-auth.js.map +0 -1
- package/dist/core/cloudflare-context.d.ts +0 -2
- package/dist/core/cloudflare-context.js +0 -106
- package/dist/core/cloudflare-context.js.map +0 -1
- package/dist/core/cloudflare-manager.d.ts +0 -258
- package/dist/core/cloudflare-manager.js +0 -414
- package/dist/core/cloudflare-manager.js.map +0 -1
- package/dist/core/cloudflare-provider.d.ts +0 -64
- package/dist/core/cloudflare-provider.js +0 -348
- package/dist/core/cloudflare-provider.js.map +0 -1
- package/dist/core/config-files.d.ts +0 -27
- package/dist/core/config-files.js +0 -154
- package/dist/core/config-files.js.map +0 -1
- package/dist/core/config-store.d.ts +0 -181
- package/dist/core/config-store.js +0 -1026
- package/dist/core/config-store.js.map +0 -1
- package/dist/core/context-library.d.ts +0 -53
- package/dist/core/context-library.js +0 -605
- package/dist/core/context-library.js.map +0 -1
- package/dist/core/context-types.d.ts +0 -83
- package/dist/core/context-types.js +0 -9
- package/dist/core/context-types.js.map +0 -1
- package/dist/core/daemon-client.d.ts +0 -84
- package/dist/core/daemon-client.js +0 -156
- package/dist/core/daemon-client.js.map +0 -1
- package/dist/core/daemon-lifecycle.d.ts +0 -59
- package/dist/core/daemon-lifecycle.js +0 -147
- package/dist/core/daemon-lifecycle.js.map +0 -1
- package/dist/core/db/catalog.d.ts +0 -57
- package/dist/core/db/catalog.js +0 -38
- package/dist/core/db/catalog.js.map +0 -1
- package/dist/core/db/data-masking.d.ts +0 -3
- package/dist/core/db/data-masking.js +0 -14
- package/dist/core/db/data-masking.js.map +0 -1
- package/dist/core/db/driver.d.ts +0 -151
- package/dist/core/db/driver.js +0 -209
- package/dist/core/db/driver.js.map +0 -1
- package/dist/core/db/export.d.ts +0 -17
- package/dist/core/db/export.js +0 -67
- package/dist/core/db/export.js.map +0 -1
- package/dist/core/db/mysql-driver.d.ts +0 -33
- package/dist/core/db/mysql-driver.js +0 -364
- package/dist/core/db/mysql-driver.js.map +0 -1
- package/dist/core/db/postgres-driver.d.ts +0 -34
- package/dist/core/db/postgres-driver.js +0 -430
- package/dist/core/db/postgres-driver.js.map +0 -1
- package/dist/core/db/sqlite-driver.d.ts +0 -30
- package/dist/core/db/sqlite-driver.js +0 -301
- package/dist/core/db/sqlite-driver.js.map +0 -1
- package/dist/core/db-peek.d.ts +0 -99
- package/dist/core/db-peek.js +0 -322
- package/dist/core/db-peek.js.map +0 -1
- package/dist/core/db-write.d.ts +0 -45
- package/dist/core/db-write.js +0 -190
- package/dist/core/db-write.js.map +0 -1
- package/dist/core/docker-inspect.d.ts +0 -34
- package/dist/core/docker-inspect.js +0 -108
- package/dist/core/docker-inspect.js.map +0 -1
- package/dist/core/docker-resources.d.ts +0 -28
- package/dist/core/docker-resources.js +0 -59
- package/dist/core/docker-resources.js.map +0 -1
- package/dist/core/docker-service-runner.d.ts +0 -21
- package/dist/core/docker-service-runner.js +0 -80
- package/dist/core/docker-service-runner.js.map +0 -1
- package/dist/core/docker-stats.d.ts +0 -24
- package/dist/core/docker-stats.js +0 -76
- package/dist/core/docker-stats.js.map +0 -1
- package/dist/core/docker.d.ts +0 -75
- package/dist/core/docker.js +0 -219
- package/dist/core/docker.js.map +0 -1
- package/dist/core/env-file.d.ts +0 -24
- package/dist/core/env-file.js +0 -123
- package/dist/core/env-file.js.map +0 -1
- package/dist/core/env-runtime.d.ts +0 -32
- package/dist/core/env-runtime.js +0 -42
- package/dist/core/env-runtime.js.map +0 -1
- package/dist/core/error-inbox.d.ts +0 -91
- package/dist/core/error-inbox.js +0 -292
- package/dist/core/error-inbox.js.map +0 -1
- package/dist/core/extensions.d.ts +0 -78
- package/dist/core/extensions.js +0 -41
- package/dist/core/extensions.js.map +0 -1
- package/dist/core/external-terminal.d.ts +0 -60
- package/dist/core/external-terminal.js +0 -429
- package/dist/core/external-terminal.js.map +0 -1
- package/dist/core/fix-loop.d.ts +0 -55
- package/dist/core/fix-loop.js +0 -73
- package/dist/core/fix-loop.js.map +0 -1
- package/dist/core/git-actions.d.ts +0 -69
- package/dist/core/git-actions.js +0 -161
- package/dist/core/git-actions.js.map +0 -1
- package/dist/core/git-graph-layout.d.ts +0 -34
- package/dist/core/git-graph-layout.js +0 -94
- package/dist/core/git-graph-layout.js.map +0 -1
- package/dist/core/git-identity.d.ts +0 -78
- package/dist/core/git-identity.js +0 -178
- package/dist/core/git-identity.js.map +0 -1
- package/dist/core/git-manager.d.ts +0 -129
- package/dist/core/git-manager.js +0 -509
- package/dist/core/git-manager.js.map +0 -1
- package/dist/core/git-worktrees.d.ts +0 -35
- package/dist/core/git-worktrees.js +0 -142
- package/dist/core/git-worktrees.js.map +0 -1
- package/dist/core/github-auth.d.ts +0 -28
- package/dist/core/github-auth.js +0 -134
- package/dist/core/github-auth.js.map +0 -1
- package/dist/core/github-context.d.ts +0 -12
- package/dist/core/github-context.js +0 -36
- package/dist/core/github-context.js.map +0 -1
- package/dist/core/github-manager.d.ts +0 -230
- package/dist/core/github-manager.js +0 -324
- package/dist/core/github-manager.js.map +0 -1
- package/dist/core/host-metrics.d.ts +0 -41
- package/dist/core/host-metrics.js +0 -93
- package/dist/core/host-metrics.js.map +0 -1
- package/dist/core/http-inspector.d.ts +0 -20
- package/dist/core/http-inspector.js +0 -106
- package/dist/core/http-inspector.js.map +0 -1
- package/dist/core/jetbrains-import.d.ts +0 -85
- package/dist/core/jetbrains-import.js +0 -599
- package/dist/core/jetbrains-import.js.map +0 -1
- package/dist/core/log-sources.d.ts +0 -21
- package/dist/core/log-sources.js +0 -219
- package/dist/core/log-sources.js.map +0 -1
- package/dist/core/log-store.d.ts +0 -33
- package/dist/core/log-store.js +0 -94
- package/dist/core/log-store.js.map +0 -1
- package/dist/core/log-volume.d.ts +0 -41
- package/dist/core/log-volume.js +0 -81
- package/dist/core/log-volume.js.map +0 -1
- package/dist/core/mcp-auth.d.ts +0 -27
- package/dist/core/mcp-auth.js +0 -90
- package/dist/core/mcp-auth.js.map +0 -1
- package/dist/core/metrics-store.d.ts +0 -74
- package/dist/core/metrics-store.js +0 -187
- package/dist/core/metrics-store.js.map +0 -1
- package/dist/core/one-time-skills.d.ts +0 -27
- package/dist/core/one-time-skills.js +0 -185
- package/dist/core/one-time-skills.js.map +0 -1
- package/dist/core/port-utils.d.ts +0 -23
- package/dist/core/port-utils.js +0 -83
- package/dist/core/port-utils.js.map +0 -1
- package/dist/core/process-manager.d.ts +0 -99
- package/dist/core/process-manager.js +0 -738
- package/dist/core/process-manager.js.map +0 -1
- package/dist/core/process-tree.d.ts +0 -17
- package/dist/core/process-tree.js +0 -64
- package/dist/core/process-tree.js.map +0 -1
- package/dist/core/project-overview.d.ts +0 -52
- package/dist/core/project-overview.js +0 -122
- package/dist/core/project-overview.js.map +0 -1
- package/dist/core/providers/api-base.d.ts +0 -24
- package/dist/core/providers/api-base.js +0 -44
- package/dist/core/providers/api-base.js.map +0 -1
- package/dist/core/providers/credentials.d.ts +0 -93
- package/dist/core/providers/credentials.js +0 -88
- package/dist/core/providers/credentials.js.map +0 -1
- package/dist/core/providers/deploy-provider.d.ts +0 -327
- package/dist/core/providers/deploy-provider.js +0 -25
- package/dist/core/providers/deploy-provider.js.map +0 -1
- package/dist/core/providers/egress.d.ts +0 -58
- package/dist/core/providers/egress.js +0 -124
- package/dist/core/providers/egress.js.map +0 -1
- package/dist/core/providers/host-bridge.d.ts +0 -20
- package/dist/core/providers/host-bridge.js +0 -57
- package/dist/core/providers/host-bridge.js.map +0 -1
- package/dist/core/providers/host-provider.d.ts +0 -160
- package/dist/core/providers/host-provider.js +0 -2
- package/dist/core/providers/host-provider.js.map +0 -1
- package/dist/core/providers/oauth.d.ts +0 -97
- package/dist/core/providers/oauth.js +0 -238
- package/dist/core/providers/oauth.js.map +0 -1
- package/dist/core/providers/project-resolution.d.ts +0 -81
- package/dist/core/providers/project-resolution.js +0 -101
- package/dist/core/providers/project-resolution.js.map +0 -1
- package/dist/core/providers/registry.d.ts +0 -73
- package/dist/core/providers/registry.js +0 -53
- package/dist/core/providers/registry.js.map +0 -1
- package/dist/core/providers/strings.d.ts +0 -95
- package/dist/core/providers/strings.js +0 -59
- package/dist/core/providers/strings.js.map +0 -1
- package/dist/core/public-config.d.ts +0 -18
- package/dist/core/public-config.js +0 -76
- package/dist/core/public-config.js.map +0 -1
- package/dist/core/read-only-files.d.ts +0 -28
- package/dist/core/read-only-files.js +0 -93
- package/dist/core/read-only-files.js.map +0 -1
- package/dist/core/repo-create.d.ts +0 -11
- package/dist/core/repo-create.js +0 -54
- package/dist/core/repo-create.js.map +0 -1
- package/dist/core/repo-match.d.ts +0 -12
- package/dist/core/repo-match.js +0 -40
- package/dist/core/repo-match.js.map +0 -1
- package/dist/core/repo-onboard.d.ts +0 -297
- package/dist/core/repo-onboard.js +0 -667
- package/dist/core/repo-onboard.js.map +0 -1
- package/dist/core/repro-bundle.d.ts +0 -30
- package/dist/core/repro-bundle.js +0 -116
- package/dist/core/repro-bundle.js.map +0 -1
- package/dist/core/service-graph.d.ts +0 -50
- package/dist/core/service-graph.js +0 -143
- package/dist/core/service-graph.js.map +0 -1
- package/dist/core/service-health.d.ts +0 -10
- package/dist/core/service-health.js +0 -46
- package/dist/core/service-health.js.map +0 -1
- package/dist/core/service-log-source.d.ts +0 -9
- package/dist/core/service-log-source.js +0 -49
- package/dist/core/service-log-source.js.map +0 -1
- package/dist/core/service-registry.d.ts +0 -52
- package/dist/core/service-registry.js +0 -101
- package/dist/core/service-registry.js.map +0 -1
- package/dist/core/snapshot-manager.d.ts +0 -62
- package/dist/core/snapshot-manager.js +0 -219
- package/dist/core/snapshot-manager.js.map +0 -1
- package/dist/core/ssh-servers.d.ts +0 -89
- package/dist/core/ssh-servers.js +0 -251
- package/dist/core/ssh-servers.js.map +0 -1
- package/dist/core/ssh-service-runner.d.ts +0 -7
- package/dist/core/ssh-service-runner.js +0 -36
- package/dist/core/ssh-service-runner.js.map +0 -1
- package/dist/core/ssh-setup.d.ts +0 -11
- package/dist/core/ssh-setup.js +0 -49
- package/dist/core/ssh-setup.js.map +0 -1
- package/dist/core/system-processes.d.ts +0 -29
- package/dist/core/system-processes.js +0 -119
- package/dist/core/system-processes.js.map +0 -1
- package/dist/core/terminal-manager.d.ts +0 -123
- package/dist/core/terminal-manager.js +0 -470
- package/dist/core/terminal-manager.js.map +0 -1
- package/dist/core/terminal-session.d.ts +0 -122
- package/dist/core/terminal-session.js +0 -242
- package/dist/core/terminal-session.js.map +0 -1
- package/dist/core/terminal-spawn.d.ts +0 -26
- package/dist/core/terminal-spawn.js +0 -63
- package/dist/core/terminal-spawn.js.map +0 -1
- package/dist/core/test-runner.d.ts +0 -69
- package/dist/core/test-runner.js +0 -199
- package/dist/core/test-runner.js.map +0 -1
- package/dist/core/timeline-store.d.ts +0 -20
- package/dist/core/timeline-store.js +0 -36
- package/dist/core/timeline-store.js.map +0 -1
- package/dist/core/tool-call-store.d.ts +0 -25
- package/dist/core/tool-call-store.js +0 -62
- package/dist/core/tool-call-store.js.map +0 -1
- package/dist/core/types.d.ts +0 -312
- package/dist/core/types.js +0 -2
- package/dist/core/types.js.map +0 -1
- package/dist/core/usage-history.d.ts +0 -81
- package/dist/core/usage-history.js +0 -149
- package/dist/core/usage-history.js.map +0 -1
- package/dist/core/vercel-actions.d.ts +0 -71
- package/dist/core/vercel-actions.js +0 -109
- package/dist/core/vercel-actions.js.map +0 -1
- package/dist/core/vercel-auth.d.ts +0 -40
- package/dist/core/vercel-auth.js +0 -88
- package/dist/core/vercel-auth.js.map +0 -1
- package/dist/core/vercel-context.d.ts +0 -2
- package/dist/core/vercel-context.js +0 -97
- package/dist/core/vercel-context.js.map +0 -1
- package/dist/core/vercel-manager.d.ts +0 -268
- package/dist/core/vercel-manager.js +0 -401
- package/dist/core/vercel-manager.js.map +0 -1
- package/dist/core/vercel-oauth.d.ts +0 -37
- package/dist/core/vercel-oauth.js +0 -57
- package/dist/core/vercel-oauth.js.map +0 -1
- package/dist/core/vercel-provider.d.ts +0 -23
- package/dist/core/vercel-provider.js +0 -276
- package/dist/core/vercel-provider.js.map +0 -1
- package/dist/core/vultr-actions.d.ts +0 -52
- package/dist/core/vultr-actions.js +0 -62
- package/dist/core/vultr-actions.js.map +0 -1
- package/dist/core/vultr-auth.d.ts +0 -32
- package/dist/core/vultr-auth.js +0 -54
- package/dist/core/vultr-auth.js.map +0 -1
- package/dist/core/vultr-context.d.ts +0 -2
- package/dist/core/vultr-context.js +0 -55
- package/dist/core/vultr-context.js.map +0 -1
- package/dist/core/vultr-manager.d.ts +0 -113
- package/dist/core/vultr-manager.js +0 -170
- package/dist/core/vultr-manager.js.map +0 -1
- package/dist/core/vultr-provider.d.ts +0 -69
- package/dist/core/vultr-provider.js +0 -226
- package/dist/core/vultr-provider.js.map +0 -1
- package/dist/core/workflow-triggers.d.ts +0 -139
- package/dist/core/workflow-triggers.js +0 -208
- package/dist/core/workflow-triggers.js.map +0 -1
- package/dist/core/workflows.d.ts +0 -290
- package/dist/core/workflows.js +0 -190
- package/dist/core/workflows.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -66
- package/dist/index.js.map +0 -1
- package/dist/mcp/server.d.ts +0 -37
- package/dist/mcp/server.js +0 -84
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/tools/agent-env.d.ts +0 -9
- package/dist/mcp/tools/agent-env.js +0 -160
- package/dist/mcp/tools/agent-env.js.map +0 -1
- package/dist/mcp/tools/agent-profiles.d.ts +0 -9
- package/dist/mcp/tools/agent-profiles.js +0 -197
- package/dist/mcp/tools/agent-profiles.js.map +0 -1
- package/dist/mcp/tools/agent-registry.d.ts +0 -9
- package/dist/mcp/tools/agent-registry.js +0 -81
- package/dist/mcp/tools/agent-registry.js.map +0 -1
- package/dist/mcp/tools/agent.d.ts +0 -4
- package/dist/mcp/tools/agent.js +0 -29
- package/dist/mcp/tools/agent.js.map +0 -1
- package/dist/mcp/tools/context.d.ts +0 -36
- package/dist/mcp/tools/context.js +0 -69
- package/dist/mcp/tools/context.js.map +0 -1
- package/dist/mcp/tools/database.d.ts +0 -9
- package/dist/mcp/tools/database.js +0 -166
- package/dist/mcp/tools/database.js.map +0 -1
- package/dist/mcp/tools/docs.d.ts +0 -29
- package/dist/mcp/tools/docs.js +0 -134
- package/dist/mcp/tools/docs.js.map +0 -1
- package/dist/mcp/tools/errors.d.ts +0 -12
- package/dist/mcp/tools/errors.js +0 -47
- package/dist/mcp/tools/errors.js.map +0 -1
- package/dist/mcp/tools/git.d.ts +0 -4
- package/dist/mcp/tools/git.js +0 -209
- package/dist/mcp/tools/git.js.map +0 -1
- package/dist/mcp/tools/github.d.ts +0 -4
- package/dist/mcp/tools/github.js +0 -196
- package/dist/mcp/tools/github.js.map +0 -1
- package/dist/mcp/tools/index.d.ts +0 -36
- package/dist/mcp/tools/index.js +0 -61
- package/dist/mcp/tools/index.js.map +0 -1
- package/dist/mcp/tools/onboard.d.ts +0 -10
- package/dist/mcp/tools/onboard.js +0 -30
- package/dist/mcp/tools/onboard.js.map +0 -1
- package/dist/mcp/tools/provider.d.ts +0 -16
- package/dist/mcp/tools/provider.js +0 -110
- package/dist/mcp/tools/provider.js.map +0 -1
- package/dist/mcp/tools/services.d.ts +0 -13
- package/dist/mcp/tools/services.js +0 -204
- package/dist/mcp/tools/services.js.map +0 -1
- package/dist/mcp/tools/snapshots.d.ts +0 -8
- package/dist/mcp/tools/snapshots.js +0 -37
- package/dist/mcp/tools/snapshots.js.map +0 -1
- package/dist/mcp/tools/terminal.d.ts +0 -4
- package/dist/mcp/tools/terminal.js +0 -38
- package/dist/mcp/tools/terminal.js.map +0 -1
- package/dist/tui/app.d.ts +0 -22
- package/dist/tui/app.js +0 -138
- package/dist/tui/app.js.map +0 -1
- package/dist/web/agent-info.d.ts +0 -82
- package/dist/web/agent-info.js +0 -775
- package/dist/web/agent-info.js.map +0 -1
- package/dist/web/client/assets/SymbolsNerdFontMono-Regular-DDncdh2F.ttf +0 -0
- package/dist/web/client/assets/code-editor-TE0sjFGO.js +0 -30
- package/dist/web/client/assets/context-graph-B9MnBpp6.js +0 -7
- package/dist/web/client/assets/core-DhEqZVGG.js +0 -1
- package/dist/web/client/assets/event-BK_86lmQ.js +0 -1
- package/dist/web/client/assets/index-BhDAhmA1.js +0 -1
- package/dist/web/client/assets/index-CSo__8A6.css +0 -1
- package/dist/web/client/assets/index-DAJvBqn9.js +0 -352
- package/dist/web/client/assets/nomoreide-favicon-Ds7Tgj9p.svg +0 -24
- package/dist/web/client/assets/system-process-table-DetWu0Gj.js +0 -1
- package/dist/web/client/assets/window-DlR023_X.js +0 -1
- package/dist/web/client/index.html +0 -44
- package/dist/web/dashboard.d.ts +0 -61
- package/dist/web/dashboard.js +0 -221
- package/dist/web/dashboard.js.map +0 -1
- package/dist/web/directories.d.ts +0 -27
- package/dist/web/directories.js +0 -81
- package/dist/web/directories.js.map +0 -1
- package/dist/web/http-utils.d.ts +0 -13
- package/dist/web/http-utils.js +0 -72
- package/dist/web/http-utils.js.map +0 -1
- package/dist/web/routes/agent-chat-routes.d.ts +0 -3
- package/dist/web/routes/agent-chat-routes.js +0 -186
- package/dist/web/routes/agent-chat-routes.js.map +0 -1
- package/dist/web/routes/agent-env-routes.d.ts +0 -9
- package/dist/web/routes/agent-env-routes.js +0 -86
- package/dist/web/routes/agent-env-routes.js.map +0 -1
- package/dist/web/routes/agent-profile-routes.d.ts +0 -8
- package/dist/web/routes/agent-profile-routes.js +0 -211
- package/dist/web/routes/agent-profile-routes.js.map +0 -1
- package/dist/web/routes/agent-registry-routes.d.ts +0 -2
- package/dist/web/routes/agent-registry-routes.js +0 -375
- package/dist/web/routes/agent-registry-routes.js.map +0 -1
- package/dist/web/routes/agent-routes.d.ts +0 -3
- package/dist/web/routes/agent-routes.js +0 -73
- package/dist/web/routes/agent-routes.js.map +0 -1
- package/dist/web/routes/agent-settings-routes.d.ts +0 -8
- package/dist/web/routes/agent-settings-routes.js +0 -67
- package/dist/web/routes/agent-settings-routes.js.map +0 -1
- package/dist/web/routes/context-library-routes.d.ts +0 -2
- package/dist/web/routes/context-library-routes.js +0 -139
- package/dist/web/routes/context-library-routes.js.map +0 -1
- package/dist/web/routes/context.d.ts +0 -73
- package/dist/web/routes/context.js +0 -48
- package/dist/web/routes/context.js.map +0 -1
- package/dist/web/routes/dashboard-routes.d.ts +0 -3
- package/dist/web/routes/dashboard-routes.js +0 -47
- package/dist/web/routes/dashboard-routes.js.map +0 -1
- package/dist/web/routes/database-routes.d.ts +0 -3
- package/dist/web/routes/database-routes.js +0 -341
- package/dist/web/routes/database-routes.js.map +0 -1
- package/dist/web/routes/docker-routes.d.ts +0 -7
- package/dist/web/routes/docker-routes.js +0 -122
- package/dist/web/routes/docker-routes.js.map +0 -1
- package/dist/web/routes/errors-routes.d.ts +0 -3
- package/dist/web/routes/errors-routes.js +0 -77
- package/dist/web/routes/errors-routes.js.map +0 -1
- package/dist/web/routes/extensions-routes.d.ts +0 -14
- package/dist/web/routes/extensions-routes.js +0 -21
- package/dist/web/routes/extensions-routes.js.map +0 -1
- package/dist/web/routes/git-routes.d.ts +0 -3
- package/dist/web/routes/git-routes.js +0 -598
- package/dist/web/routes/git-routes.js.map +0 -1
- package/dist/web/routes/github-context.d.ts +0 -11
- package/dist/web/routes/github-context.js +0 -34
- package/dist/web/routes/github-context.js.map +0 -1
- package/dist/web/routes/github-routes.d.ts +0 -2
- package/dist/web/routes/github-routes.js +0 -699
- package/dist/web/routes/github-routes.js.map +0 -1
- package/dist/web/routes/host-routes.d.ts +0 -2
- package/dist/web/routes/host-routes.js +0 -188
- package/dist/web/routes/host-routes.js.map +0 -1
- package/dist/web/routes/index.d.ts +0 -10
- package/dist/web/routes/index.js +0 -72
- package/dist/web/routes/index.js.map +0 -1
- package/dist/web/routes/jetbrains-import-routes.d.ts +0 -2
- package/dist/web/routes/jetbrains-import-routes.js +0 -121
- package/dist/web/routes/jetbrains-import-routes.js.map +0 -1
- package/dist/web/routes/log-sources-routes.d.ts +0 -6
- package/dist/web/routes/log-sources-routes.js +0 -102
- package/dist/web/routes/log-sources-routes.js.map +0 -1
- package/dist/web/routes/metrics-routes.d.ts +0 -3
- package/dist/web/routes/metrics-routes.js +0 -60
- package/dist/web/routes/metrics-routes.js.map +0 -1
- package/dist/web/routes/onboard-routes.d.ts +0 -9
- package/dist/web/routes/onboard-routes.js +0 -146
- package/dist/web/routes/onboard-routes.js.map +0 -1
- package/dist/web/routes/overview-routes.d.ts +0 -2
- package/dist/web/routes/overview-routes.js +0 -36
- package/dist/web/routes/overview-routes.js.map +0 -1
- package/dist/web/routes/provider-routes.d.ts +0 -2
- package/dist/web/routes/provider-routes.js +0 -558
- package/dist/web/routes/provider-routes.js.map +0 -1
- package/dist/web/routes/service-routes.d.ts +0 -3
- package/dist/web/routes/service-routes.js +0 -511
- package/dist/web/routes/service-routes.js.map +0 -1
- package/dist/web/routes/settings-routes.d.ts +0 -2
- package/dist/web/routes/settings-routes.js +0 -151
- package/dist/web/routes/settings-routes.js.map +0 -1
- package/dist/web/routes/shell-routes.d.ts +0 -22
- package/dist/web/routes/shell-routes.js +0 -75
- package/dist/web/routes/shell-routes.js.map +0 -1
- package/dist/web/routes/skills-routes.d.ts +0 -2
- package/dist/web/routes/skills-routes.js +0 -49
- package/dist/web/routes/skills-routes.js.map +0 -1
- package/dist/web/routes/snapshot-routes.d.ts +0 -8
- package/dist/web/routes/snapshot-routes.js +0 -194
- package/dist/web/routes/snapshot-routes.js.map +0 -1
- package/dist/web/routes/ssh-server-routes.d.ts +0 -10
- package/dist/web/routes/ssh-server-routes.js +0 -163
- package/dist/web/routes/ssh-server-routes.js.map +0 -1
- package/dist/web/routes/terminal-routes.d.ts +0 -7
- package/dist/web/routes/terminal-routes.js +0 -313
- package/dist/web/routes/terminal-routes.js.map +0 -1
- package/dist/web/routes/workflow-routes.d.ts +0 -8
- package/dist/web/routes/workflow-routes.js +0 -45
- package/dist/web/routes/workflow-routes.js.map +0 -1
- package/dist/web/routes/workflow-trigger-routes.d.ts +0 -9
- package/dist/web/routes/workflow-trigger-routes.js +0 -78
- package/dist/web/routes/workflow-trigger-routes.js.map +0 -1
- package/dist/web/server.d.ts +0 -31
- package/dist/web/server.js +0 -325
- package/dist/web/server.js.map +0 -1
- package/dist/web/service-tester.d.ts +0 -16
- package/dist/web/service-tester.js +0 -107
- package/dist/web/service-tester.js.map +0 -1
- package/dist/web/static-assets.d.ts +0 -9
- package/dist/web/static-assets.js +0 -77
- package/dist/web/static-assets.js.map +0 -1
- package/dist/web/usage-info.d.ts +0 -56
- package/dist/web/usage-info.js +0 -265
- package/dist/web/usage-info.js.map +0 -1
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import type { DatabaseConnection, DatabaseEngine, ServiceDefinition } from "./types.js";
|
|
2
|
-
export interface JetBrainsRunPreview {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
runType: string;
|
|
6
|
-
source: string;
|
|
7
|
-
command: string;
|
|
8
|
-
args?: string[];
|
|
9
|
-
cwd: string;
|
|
10
|
-
envKeys: string[];
|
|
11
|
-
conflict: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface UnsupportedJetBrainsRun {
|
|
14
|
-
name: string;
|
|
15
|
-
runType: string;
|
|
16
|
-
source: string;
|
|
17
|
-
reason: string;
|
|
18
|
-
}
|
|
19
|
-
export interface JetBrainsImportPreview {
|
|
20
|
-
sessionId: string;
|
|
21
|
-
projectRoot: string;
|
|
22
|
-
candidates: JetBrainsRunPreview[];
|
|
23
|
-
unsupported: UnsupportedJetBrainsRun[];
|
|
24
|
-
databases: JetBrainsDatabasePreview[];
|
|
25
|
-
unsupportedDatabases: UnsupportedJetBrainsDatabase[];
|
|
26
|
-
expiresAt: string;
|
|
27
|
-
}
|
|
28
|
-
export interface JetBrainsDatabasePreview {
|
|
29
|
-
id: string;
|
|
30
|
-
name: string;
|
|
31
|
-
engine: DatabaseEngine;
|
|
32
|
-
source: string;
|
|
33
|
-
host?: string;
|
|
34
|
-
port?: number;
|
|
35
|
-
database?: string;
|
|
36
|
-
path?: string;
|
|
37
|
-
username?: string;
|
|
38
|
-
conflict: boolean;
|
|
39
|
-
}
|
|
40
|
-
export interface UnsupportedJetBrainsDatabase {
|
|
41
|
-
name: string;
|
|
42
|
-
source: string;
|
|
43
|
-
reason: string;
|
|
44
|
-
}
|
|
45
|
-
export interface JetBrainsDatabaseSelection {
|
|
46
|
-
id: string;
|
|
47
|
-
conflict: "add" | "skip" | "replace" | "rename";
|
|
48
|
-
name?: string;
|
|
49
|
-
username?: string;
|
|
50
|
-
password?: string;
|
|
51
|
-
test?: boolean;
|
|
52
|
-
}
|
|
53
|
-
export interface JetBrainsImportSelection {
|
|
54
|
-
id: string;
|
|
55
|
-
conflict: "add" | "skip" | "replace" | "rename";
|
|
56
|
-
name?: string;
|
|
57
|
-
command?: string;
|
|
58
|
-
args?: string[];
|
|
59
|
-
cwd?: string;
|
|
60
|
-
}
|
|
61
|
-
export interface JetBrainsImportService {
|
|
62
|
-
definition: ServiceDefinition;
|
|
63
|
-
onConflict: "error" | "replace";
|
|
64
|
-
}
|
|
65
|
-
export interface JetBrainsImportDatabase {
|
|
66
|
-
definition: DatabaseConnection;
|
|
67
|
-
onConflict: "error" | "replace";
|
|
68
|
-
test: boolean;
|
|
69
|
-
}
|
|
70
|
-
export declare class JetBrainsImportSessions {
|
|
71
|
-
private readonly sessions;
|
|
72
|
-
scan(options: {
|
|
73
|
-
projectRoot: string;
|
|
74
|
-
includePersonal: boolean;
|
|
75
|
-
existingNames: string[];
|
|
76
|
-
existingDatabaseNames?: string[];
|
|
77
|
-
}): Promise<JetBrainsImportPreview>;
|
|
78
|
-
consume(sessionId: string, selections: JetBrainsImportSelection[], databaseSelections?: JetBrainsDatabaseSelection[]): Promise<{
|
|
79
|
-
services: JetBrainsImportService[];
|
|
80
|
-
databases: JetBrainsImportDatabase[];
|
|
81
|
-
}>;
|
|
82
|
-
complete(sessionId: string): void;
|
|
83
|
-
private preview;
|
|
84
|
-
private prune;
|
|
85
|
-
}
|
|
@@ -1,599 +0,0 @@
|
|
|
1
|
-
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { readdir, readFile, realpath, stat } from "node:fs/promises";
|
|
3
|
-
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
4
|
-
import { isSensitiveConnectionParameter } from "./db-peek.js";
|
|
5
|
-
const MAX_FILES = 100;
|
|
6
|
-
const MAX_FILE_BYTES = 2 * 1024 * 1024;
|
|
7
|
-
const MAX_TOTAL_BYTES = 6 * 1024 * 1024;
|
|
8
|
-
const SESSION_TTL_MS = 10 * 60 * 1000;
|
|
9
|
-
export class JetBrainsImportSessions {
|
|
10
|
-
sessions = new Map();
|
|
11
|
-
async scan(options) {
|
|
12
|
-
this.prune();
|
|
13
|
-
const projectRoot = await realpath(options.projectRoot);
|
|
14
|
-
if (!(await stat(projectRoot)).isDirectory()) {
|
|
15
|
-
throw new Error("Project root must be a directory.");
|
|
16
|
-
}
|
|
17
|
-
const files = await knownRunConfigurationFiles(projectRoot, options.includePersonal);
|
|
18
|
-
const candidates = [];
|
|
19
|
-
const unsupported = [];
|
|
20
|
-
let totalBytes = 0;
|
|
21
|
-
for (const file of files) {
|
|
22
|
-
const metadata = await stat(file.path);
|
|
23
|
-
if (!metadata.isFile())
|
|
24
|
-
continue;
|
|
25
|
-
if (metadata.size > MAX_FILE_BYTES) {
|
|
26
|
-
unsupported.push({
|
|
27
|
-
name: file.source,
|
|
28
|
-
runType: "file",
|
|
29
|
-
source: file.source,
|
|
30
|
-
reason: "File exceeds the 2 MB import limit.",
|
|
31
|
-
});
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
totalBytes += metadata.size;
|
|
35
|
-
if (totalBytes > MAX_TOTAL_BYTES) {
|
|
36
|
-
throw new Error("JetBrains configuration files exceed the 6 MB import limit.");
|
|
37
|
-
}
|
|
38
|
-
const xml = await readFile(file.path, "utf8");
|
|
39
|
-
if (/<!DOCTYPE|<!ENTITY/i.test(xml)) {
|
|
40
|
-
unsupported.push({
|
|
41
|
-
name: file.source,
|
|
42
|
-
runType: "file",
|
|
43
|
-
source: file.source,
|
|
44
|
-
reason: "DTD and entity declarations are not allowed.",
|
|
45
|
-
});
|
|
46
|
-
continue;
|
|
47
|
-
}
|
|
48
|
-
for (const configuration of extractConfigurations(xml)) {
|
|
49
|
-
const parsed = await adaptConfiguration(configuration, projectRoot, file.source);
|
|
50
|
-
if ("definition" in parsed)
|
|
51
|
-
candidates.push(parsed);
|
|
52
|
-
else
|
|
53
|
-
unsupported.push(parsed);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
const databaseScan = await scanDataSources(projectRoot);
|
|
57
|
-
if (totalBytes + databaseScan.bytes > MAX_TOTAL_BYTES) {
|
|
58
|
-
throw new Error("JetBrains configuration files exceed the 6 MB import limit.");
|
|
59
|
-
}
|
|
60
|
-
const sessionId = randomUUID();
|
|
61
|
-
const expiresAt = Date.now() + SESSION_TTL_MS;
|
|
62
|
-
const session = {
|
|
63
|
-
projectRoot,
|
|
64
|
-
candidates,
|
|
65
|
-
unsupported,
|
|
66
|
-
databases: databaseScan.candidates,
|
|
67
|
-
unsupportedDatabases: databaseScan.unsupported,
|
|
68
|
-
expiresAt,
|
|
69
|
-
};
|
|
70
|
-
this.sessions.set(sessionId, session);
|
|
71
|
-
return this.preview(sessionId, session, new Set(options.existingNames), new Set(options.existingDatabaseNames ?? []));
|
|
72
|
-
}
|
|
73
|
-
async consume(sessionId, selections, databaseSelections = []) {
|
|
74
|
-
this.prune();
|
|
75
|
-
const session = this.sessions.get(sessionId);
|
|
76
|
-
if (!session)
|
|
77
|
-
throw new Error("Import preview expired. Scan the project again.");
|
|
78
|
-
const byId = new Map(session.candidates.map((candidate) => [candidate.id, candidate]));
|
|
79
|
-
const names = new Set();
|
|
80
|
-
const services = [];
|
|
81
|
-
for (const selection of selections) {
|
|
82
|
-
const candidate = byId.get(selection.id);
|
|
83
|
-
if (!candidate)
|
|
84
|
-
throw new Error(`Unknown import candidate: ${selection.id}`);
|
|
85
|
-
if (selection.conflict === "skip")
|
|
86
|
-
continue;
|
|
87
|
-
const requestedName = selection.conflict === "rename" ? selection.name?.trim() : candidate.definition.name;
|
|
88
|
-
if (!requestedName)
|
|
89
|
-
throw new Error("Renamed services require a name.");
|
|
90
|
-
if (names.has(requestedName)) {
|
|
91
|
-
throw new Error(`Import contains duplicate service name: ${requestedName}`);
|
|
92
|
-
}
|
|
93
|
-
names.add(requestedName);
|
|
94
|
-
const command = selection.command?.trim() || candidate.definition.command;
|
|
95
|
-
if (!command)
|
|
96
|
-
throw new Error("Imported services require a command.");
|
|
97
|
-
const cwd = selection.cwd?.trim() || candidate.definition.cwd || session.projectRoot;
|
|
98
|
-
const normalizedCwd = await canonicalProjectPath(cwd, session.projectRoot);
|
|
99
|
-
if (!normalizedCwd) {
|
|
100
|
-
throw new Error(`Imported working directory escapes the project: ${cwd}`);
|
|
101
|
-
}
|
|
102
|
-
services.push({
|
|
103
|
-
definition: {
|
|
104
|
-
...candidate.definition,
|
|
105
|
-
name: requestedName,
|
|
106
|
-
command,
|
|
107
|
-
cwd: normalizedCwd,
|
|
108
|
-
...(selection.args === undefined ? {} : { args: selection.args }),
|
|
109
|
-
},
|
|
110
|
-
onConflict: selection.conflict === "replace" ? "replace" : "error",
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
const databaseById = new Map(session.databases.map((candidate) => [candidate.id, candidate]));
|
|
114
|
-
const databaseNames = new Set();
|
|
115
|
-
const databases = [];
|
|
116
|
-
for (const selection of databaseSelections) {
|
|
117
|
-
const candidate = databaseById.get(selection.id);
|
|
118
|
-
if (!candidate)
|
|
119
|
-
throw new Error(`Unknown database import candidate: ${selection.id}`);
|
|
120
|
-
if (selection.conflict === "skip")
|
|
121
|
-
continue;
|
|
122
|
-
const name = selection.conflict === "rename" ? selection.name?.trim() : candidate.definition.name;
|
|
123
|
-
if (!name)
|
|
124
|
-
throw new Error("Renamed database connections require a name.");
|
|
125
|
-
if (databaseNames.has(name))
|
|
126
|
-
throw new Error(`Import contains duplicate database name: ${name}`);
|
|
127
|
-
databaseNames.add(name);
|
|
128
|
-
const definition = databaseDefinition(candidate, selection, name);
|
|
129
|
-
databases.push({
|
|
130
|
-
definition,
|
|
131
|
-
onConflict: selection.conflict === "replace" ? "replace" : "error",
|
|
132
|
-
test: selection.test === true,
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
return { services, databases };
|
|
136
|
-
}
|
|
137
|
-
complete(sessionId) {
|
|
138
|
-
this.sessions.delete(sessionId);
|
|
139
|
-
}
|
|
140
|
-
preview(sessionId, session, existingNames, existingDatabaseNames) {
|
|
141
|
-
return {
|
|
142
|
-
sessionId,
|
|
143
|
-
projectRoot: session.projectRoot,
|
|
144
|
-
candidates: session.candidates.map((candidate) => ({
|
|
145
|
-
id: candidate.id,
|
|
146
|
-
name: candidate.definition.name,
|
|
147
|
-
runType: candidate.runType,
|
|
148
|
-
source: candidate.source,
|
|
149
|
-
command: candidate.definition.command ?? "",
|
|
150
|
-
...(candidate.definition.args === undefined ? {} : { args: candidate.definition.args }),
|
|
151
|
-
cwd: candidate.definition.cwd ?? session.projectRoot,
|
|
152
|
-
envKeys: Object.keys(candidate.definition.env ?? {}).sort(),
|
|
153
|
-
conflict: existingNames.has(candidate.definition.name),
|
|
154
|
-
})),
|
|
155
|
-
unsupported: session.unsupported,
|
|
156
|
-
databases: session.databases.map((candidate) => databasePreview(candidate, existingDatabaseNames)),
|
|
157
|
-
unsupportedDatabases: session.unsupportedDatabases,
|
|
158
|
-
expiresAt: new Date(session.expiresAt).toISOString(),
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
prune() {
|
|
162
|
-
const now = Date.now();
|
|
163
|
-
for (const [id, session] of this.sessions) {
|
|
164
|
-
if (session.expiresAt <= now)
|
|
165
|
-
this.sessions.delete(id);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
async function scanDataSources(projectRoot) {
|
|
170
|
-
const requested = join(projectRoot, ".idea", "dataSources.xml");
|
|
171
|
-
let path;
|
|
172
|
-
try {
|
|
173
|
-
path = await realpath(requested);
|
|
174
|
-
}
|
|
175
|
-
catch (error) {
|
|
176
|
-
if (error.code === "ENOENT") {
|
|
177
|
-
return { candidates: [], unsupported: [], bytes: 0 };
|
|
178
|
-
}
|
|
179
|
-
throw error;
|
|
180
|
-
}
|
|
181
|
-
assertInside(projectRoot, path);
|
|
182
|
-
const metadata = await stat(path);
|
|
183
|
-
if (!metadata.isFile())
|
|
184
|
-
return { candidates: [], unsupported: [], bytes: 0 };
|
|
185
|
-
if (metadata.size > MAX_FILE_BYTES) {
|
|
186
|
-
return {
|
|
187
|
-
candidates: [],
|
|
188
|
-
unsupported: [{
|
|
189
|
-
name: "dataSources.xml",
|
|
190
|
-
source: ".idea/dataSources.xml",
|
|
191
|
-
reason: "File exceeds the 2 MB import limit.",
|
|
192
|
-
}],
|
|
193
|
-
bytes: metadata.size,
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
const xml = await readFile(path, "utf8");
|
|
197
|
-
if (/<!DOCTYPE|<!ENTITY/i.test(xml)) {
|
|
198
|
-
return {
|
|
199
|
-
candidates: [],
|
|
200
|
-
unsupported: [{
|
|
201
|
-
name: "dataSources.xml",
|
|
202
|
-
source: ".idea/dataSources.xml",
|
|
203
|
-
reason: "DTD and entity declarations are not allowed.",
|
|
204
|
-
}],
|
|
205
|
-
bytes: metadata.size,
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
const candidates = [];
|
|
209
|
-
const unsupported = [];
|
|
210
|
-
for (const match of xml.matchAll(/<data-source\b([^>]*)>([\s\S]*?)<\/data-source>/gi)) {
|
|
211
|
-
const attributes = attributesOf(match[1] ?? "");
|
|
212
|
-
const body = match[2] ?? "";
|
|
213
|
-
const name = attributes.name || "Unnamed data source";
|
|
214
|
-
const source = ".idea/dataSources.xml";
|
|
215
|
-
const jdbcUrl = tagText(body, "jdbc-url");
|
|
216
|
-
const driver = tagText(body, "driver-ref") ?? tagText(body, "jdbc-driver") ?? "";
|
|
217
|
-
if (!jdbcUrl) {
|
|
218
|
-
unsupported.push({ name, source, reason: "JDBC URL is missing." });
|
|
219
|
-
continue;
|
|
220
|
-
}
|
|
221
|
-
const parsed = await parseJdbcDatabase(name, jdbcUrl, driver, projectRoot);
|
|
222
|
-
if ("reason" in parsed)
|
|
223
|
-
unsupported.push({ name, source, reason: parsed.reason });
|
|
224
|
-
else
|
|
225
|
-
candidates.push({ id: randomUUID(), source, ...parsed });
|
|
226
|
-
}
|
|
227
|
-
return { candidates, unsupported, bytes: metadata.size };
|
|
228
|
-
}
|
|
229
|
-
async function parseJdbcDatabase(name, jdbcUrl, driver, projectRoot) {
|
|
230
|
-
if (/sqlite/i.test(driver) || jdbcUrl.startsWith("jdbc:sqlite:")) {
|
|
231
|
-
const rawPath = jdbcUrl.replace(/^jdbc:sqlite:/i, "");
|
|
232
|
-
const expanded = rawPath
|
|
233
|
-
.replaceAll("$PROJECT_DIR$", projectRoot)
|
|
234
|
-
.replaceAll("$ProjectFileDir$", projectRoot);
|
|
235
|
-
const path = await canonicalProjectPath(expanded, projectRoot);
|
|
236
|
-
if (!path)
|
|
237
|
-
return { reason: "SQLite path resolves outside the project." };
|
|
238
|
-
return {
|
|
239
|
-
definition: {
|
|
240
|
-
name,
|
|
241
|
-
engine: "sqlite",
|
|
242
|
-
url: path,
|
|
243
|
-
writeUnlocked: false,
|
|
244
|
-
projectPath: projectRoot,
|
|
245
|
-
},
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
const engine = /postgres/i.test(driver) || jdbcUrl.startsWith("jdbc:postgresql:")
|
|
249
|
-
? "postgres"
|
|
250
|
-
: /mysql/i.test(driver) || jdbcUrl.startsWith("jdbc:mysql:")
|
|
251
|
-
? "mysql"
|
|
252
|
-
: undefined;
|
|
253
|
-
if (!engine)
|
|
254
|
-
return { reason: "Only PostgreSQL, MySQL, and SQLite data sources are supported." };
|
|
255
|
-
try {
|
|
256
|
-
const url = new URL(jdbcUrl.replace(/^jdbc:/i, ""));
|
|
257
|
-
const username = decodeURIComponent(url.username || url.searchParams.get("user") || "");
|
|
258
|
-
url.username = username;
|
|
259
|
-
url.password = "";
|
|
260
|
-
for (const key of [...url.searchParams.keys()]) {
|
|
261
|
-
if (/^(?:user|username)$/i.test(key) || isSensitiveConnectionParameter(key)) {
|
|
262
|
-
url.searchParams.delete(key);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
return {
|
|
266
|
-
definition: {
|
|
267
|
-
name,
|
|
268
|
-
engine,
|
|
269
|
-
url: url.toString(),
|
|
270
|
-
writeUnlocked: false,
|
|
271
|
-
projectPath: projectRoot,
|
|
272
|
-
},
|
|
273
|
-
...(username ? { username } : {}),
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
catch {
|
|
277
|
-
return { reason: "JDBC URL is invalid." };
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
function databasePreview(candidate, existingNames) {
|
|
281
|
-
const base = {
|
|
282
|
-
id: candidate.id,
|
|
283
|
-
name: candidate.definition.name,
|
|
284
|
-
engine: candidate.definition.engine,
|
|
285
|
-
source: candidate.source,
|
|
286
|
-
conflict: existingNames.has(candidate.definition.name),
|
|
287
|
-
};
|
|
288
|
-
if (candidate.definition.engine === "sqlite") {
|
|
289
|
-
return { ...base, path: candidate.definition.url };
|
|
290
|
-
}
|
|
291
|
-
const url = new URL(candidate.definition.url);
|
|
292
|
-
return {
|
|
293
|
-
...base,
|
|
294
|
-
host: url.hostname,
|
|
295
|
-
...(url.port ? { port: Number(url.port) } : {}),
|
|
296
|
-
database: url.pathname.replace(/^\//, ""),
|
|
297
|
-
...(candidate.username ? { username: candidate.username } : {}),
|
|
298
|
-
};
|
|
299
|
-
}
|
|
300
|
-
function databaseDefinition(candidate, selection, name) {
|
|
301
|
-
if (candidate.definition.engine === "sqlite") {
|
|
302
|
-
return { ...candidate.definition, name, writeUnlocked: false };
|
|
303
|
-
}
|
|
304
|
-
const username = selection.username?.trim() || candidate.username || "";
|
|
305
|
-
const password = selection.password ?? "";
|
|
306
|
-
if (!username)
|
|
307
|
-
throw new Error(`Username is required for database "${name}".`);
|
|
308
|
-
if (!password)
|
|
309
|
-
throw new Error(`Password is required for database "${name}".`);
|
|
310
|
-
const url = new URL(candidate.definition.url);
|
|
311
|
-
url.username = username;
|
|
312
|
-
url.password = password;
|
|
313
|
-
return { ...candidate.definition, name, url: url.toString(), writeUnlocked: false };
|
|
314
|
-
}
|
|
315
|
-
function tagText(body, tag) {
|
|
316
|
-
const match = new RegExp(`<${tag}\\b[^>]*>([\\s\\S]*?)<\\/${tag}>`, "i").exec(body);
|
|
317
|
-
const value = match ? decodeXml(match[1] ?? "").trim() : "";
|
|
318
|
-
return value || undefined;
|
|
319
|
-
}
|
|
320
|
-
async function knownRunConfigurationFiles(projectRoot, includePersonal) {
|
|
321
|
-
const requested = [];
|
|
322
|
-
for (const directory of [join(projectRoot, ".run"), join(projectRoot, ".idea", "runConfigurations")]) {
|
|
323
|
-
let entries;
|
|
324
|
-
try {
|
|
325
|
-
entries = await readdir(directory, { withFileTypes: true });
|
|
326
|
-
}
|
|
327
|
-
catch (error) {
|
|
328
|
-
if (error.code === "ENOENT")
|
|
329
|
-
continue;
|
|
330
|
-
throw error;
|
|
331
|
-
}
|
|
332
|
-
for (const entry of entries) {
|
|
333
|
-
const supportedName = directory.endsWith(`${sep}.run`)
|
|
334
|
-
? entry.name.endsWith(".run.xml")
|
|
335
|
-
: entry.name.endsWith(".xml");
|
|
336
|
-
if ((entry.isFile() || entry.isSymbolicLink()) && supportedName) {
|
|
337
|
-
requested.push(join(directory, entry.name));
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
if (includePersonal)
|
|
342
|
-
requested.push(join(projectRoot, ".idea", "workspace.xml"));
|
|
343
|
-
if (requested.length > MAX_FILES)
|
|
344
|
-
throw new Error(`Found more than ${MAX_FILES} JetBrains config files.`);
|
|
345
|
-
const files = [];
|
|
346
|
-
for (const requestedPath of requested) {
|
|
347
|
-
let canonical;
|
|
348
|
-
try {
|
|
349
|
-
canonical = await realpath(requestedPath);
|
|
350
|
-
}
|
|
351
|
-
catch (error) {
|
|
352
|
-
if (error.code === "ENOENT")
|
|
353
|
-
continue;
|
|
354
|
-
throw error;
|
|
355
|
-
}
|
|
356
|
-
assertInside(projectRoot, canonical);
|
|
357
|
-
files.push({ path: canonical, source: relative(projectRoot, requestedPath) });
|
|
358
|
-
}
|
|
359
|
-
return files.sort((left, right) => left.source.localeCompare(right.source));
|
|
360
|
-
}
|
|
361
|
-
function extractConfigurations(xml) {
|
|
362
|
-
const configurations = [];
|
|
363
|
-
const pattern = /<configuration\b([^>]*)>([\s\S]*?)<\/configuration>/gi;
|
|
364
|
-
for (const match of xml.matchAll(pattern)) {
|
|
365
|
-
const attributes = attributesOf(match[1] ?? "");
|
|
366
|
-
const body = match[2] ?? "";
|
|
367
|
-
const options = {};
|
|
368
|
-
for (const option of body.matchAll(/<option\b([^>]*)\/?\s*>/gi)) {
|
|
369
|
-
const attrs = attributesOf(option[1] ?? "");
|
|
370
|
-
if (attrs.name && attrs.value !== undefined)
|
|
371
|
-
options[attrs.name] = attrs.value;
|
|
372
|
-
}
|
|
373
|
-
const env = {};
|
|
374
|
-
for (const entry of body.matchAll(/<env\b([^>]*)\/?\s*>/gi)) {
|
|
375
|
-
const attrs = attributesOf(entry[1] ?? "");
|
|
376
|
-
if (attrs.name && attrs.value !== undefined && isEnvKey(attrs.name)) {
|
|
377
|
-
env[attrs.name] = attrs.value;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
configurations.push({
|
|
381
|
-
name: attributes.name || "Unnamed configuration",
|
|
382
|
-
type: attributes.type || attributes.factoryName || "unknown",
|
|
383
|
-
body,
|
|
384
|
-
options,
|
|
385
|
-
env,
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
|
-
return configurations;
|
|
389
|
-
}
|
|
390
|
-
function attributesOf(input) {
|
|
391
|
-
const result = {};
|
|
392
|
-
for (const match of input.matchAll(/([\w:-]+)\s*=\s*(["'])([\s\S]*?)\2/g)) {
|
|
393
|
-
result[match[1]] = decodeXml(match[3] ?? "");
|
|
394
|
-
}
|
|
395
|
-
return result;
|
|
396
|
-
}
|
|
397
|
-
async function adaptConfiguration(config, projectRoot, source) {
|
|
398
|
-
const unsupported = (reason) => ({
|
|
399
|
-
name: config.name,
|
|
400
|
-
runType: config.type,
|
|
401
|
-
source,
|
|
402
|
-
reason,
|
|
403
|
-
});
|
|
404
|
-
const cwd = await canonicalProjectPath(option(config, "workingDirectory", "WORKING_DIRECTORY", "working-dir", "externalProjectPath") ??
|
|
405
|
-
projectRoot, projectRoot);
|
|
406
|
-
if (!cwd)
|
|
407
|
-
return unsupported("Working directory resolves outside the project.");
|
|
408
|
-
let definition;
|
|
409
|
-
if (/npm/i.test(config.type)) {
|
|
410
|
-
const script = option(config, "scripts", "scriptName", "SCRIPT_NAME") ??
|
|
411
|
-
firstTagAttribute(config.body, "script", "value");
|
|
412
|
-
if (!script)
|
|
413
|
-
return unsupported("npm script name is missing.");
|
|
414
|
-
const packageJson = option(config, "package-json", "packageJson");
|
|
415
|
-
const packageCwd = packageJson
|
|
416
|
-
? await canonicalProjectPath(dirname(expandProjectPath(packageJson, projectRoot)), projectRoot)
|
|
417
|
-
: cwd;
|
|
418
|
-
if (!packageCwd)
|
|
419
|
-
return unsupported("package.json resolves outside the project.");
|
|
420
|
-
definition = localDefinition(config, "npm", ["run", script], packageCwd);
|
|
421
|
-
}
|
|
422
|
-
else if (/NodeJSConfigurationType|node\.js/i.test(config.type)) {
|
|
423
|
-
const script = option(config, "path-to-js-file", "pathToJsFile", "JS_FILE");
|
|
424
|
-
if (!script)
|
|
425
|
-
return unsupported("Node entry file is missing.");
|
|
426
|
-
const scriptPath = await canonicalProjectPath(script, projectRoot);
|
|
427
|
-
if (!scriptPath)
|
|
428
|
-
return unsupported("Node entry file resolves outside the project.");
|
|
429
|
-
definition = localDefinition(config, "node", [scriptPath, ...tokenize(option(config, "application-parameters", "applicationParameters") ?? "")], cwd);
|
|
430
|
-
}
|
|
431
|
-
else if (/ShConfigurationType|Shell Script/i.test(config.type)) {
|
|
432
|
-
const text = option(config, "SCRIPT_TEXT", "scriptText");
|
|
433
|
-
const path = option(config, "SCRIPT_PATH", "scriptPath");
|
|
434
|
-
if (text)
|
|
435
|
-
definition = { ...localDefinition(config, text, undefined, cwd), args: undefined };
|
|
436
|
-
else if (path) {
|
|
437
|
-
const scriptPath = await canonicalProjectPath(path, projectRoot);
|
|
438
|
-
if (!scriptPath)
|
|
439
|
-
return unsupported("Shell script resolves outside the project.");
|
|
440
|
-
definition = localDefinition(config, "/bin/sh", [scriptPath, ...tokenize(option(config, "SCRIPT_OPTIONS") ?? "")], cwd);
|
|
441
|
-
}
|
|
442
|
-
else
|
|
443
|
-
return unsupported("Shell script text or path is missing.");
|
|
444
|
-
}
|
|
445
|
-
else if (/MavenRunConfiguration/i.test(config.type)) {
|
|
446
|
-
const goals = option(config, "goals", "commandLine");
|
|
447
|
-
if (!goals)
|
|
448
|
-
return unsupported("Maven goals are missing.");
|
|
449
|
-
definition = localDefinition(config, "mvn", tokenize(goals), cwd);
|
|
450
|
-
}
|
|
451
|
-
else if (/GradleRunConfiguration/i.test(config.type)) {
|
|
452
|
-
const tasks = listOption(config.body, "taskNames");
|
|
453
|
-
if (tasks.length === 0)
|
|
454
|
-
return unsupported("Gradle task names are missing.");
|
|
455
|
-
let wrapper = "gradle";
|
|
456
|
-
if (await fileExists(join(projectRoot, "gradlew"))) {
|
|
457
|
-
const wrapperPath = await canonicalProjectPath(join(projectRoot, "gradlew"), projectRoot);
|
|
458
|
-
if (!wrapperPath)
|
|
459
|
-
return unsupported("Gradle wrapper resolves outside the project.");
|
|
460
|
-
wrapper = wrapperPath;
|
|
461
|
-
}
|
|
462
|
-
definition = localDefinition(config, wrapper, tasks, cwd);
|
|
463
|
-
}
|
|
464
|
-
else if (/CargoCommandRunConfiguration/i.test(config.type)) {
|
|
465
|
-
const command = option(config, "command");
|
|
466
|
-
if (!command)
|
|
467
|
-
return unsupported("Cargo command is missing.");
|
|
468
|
-
definition = localDefinition(config, "cargo", tokenize(command), cwd);
|
|
469
|
-
}
|
|
470
|
-
else {
|
|
471
|
-
return unsupported("This JetBrains run configuration type is not supported.");
|
|
472
|
-
}
|
|
473
|
-
return { id: randomUUID(), runType: config.type, source, definition };
|
|
474
|
-
}
|
|
475
|
-
function localDefinition(config, command, args, cwd) {
|
|
476
|
-
return {
|
|
477
|
-
name: config.name,
|
|
478
|
-
command,
|
|
479
|
-
...(args === undefined ? {} : { args }),
|
|
480
|
-
cwd,
|
|
481
|
-
...(Object.keys(config.env).length > 0 ? { env: config.env } : {}),
|
|
482
|
-
description: `Imported from JetBrains (${config.type})`,
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
|
-
function option(config, ...names) {
|
|
486
|
-
for (const name of names) {
|
|
487
|
-
const value = config.options[name];
|
|
488
|
-
if (value?.trim())
|
|
489
|
-
return value.trim();
|
|
490
|
-
}
|
|
491
|
-
return undefined;
|
|
492
|
-
}
|
|
493
|
-
function listOption(body, name) {
|
|
494
|
-
const escaped = name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
495
|
-
const match = new RegExp(`<option\\b[^>]*name=["']${escaped}["'][^>]*>([\\s\\S]*?)<\\/option>`, "i").exec(body);
|
|
496
|
-
if (!match)
|
|
497
|
-
return [];
|
|
498
|
-
return [...(match[1] ?? "").matchAll(/<option\b([^>]*)\/?\s*>/gi)]
|
|
499
|
-
.map((entry) => attributesOf(entry[1] ?? "").value)
|
|
500
|
-
.filter((value) => Boolean(value));
|
|
501
|
-
}
|
|
502
|
-
function firstTagAttribute(body, tag, attribute) {
|
|
503
|
-
const match = new RegExp(`<${tag}\\b([^>]*)\\/?\\s*>`, "i").exec(body);
|
|
504
|
-
return match ? attributesOf(match[1] ?? "")[attribute] : undefined;
|
|
505
|
-
}
|
|
506
|
-
async function canonicalProjectPath(value, projectRoot) {
|
|
507
|
-
const expanded = expandProjectPath(value, projectRoot);
|
|
508
|
-
const target = resolve(isAbsolute(expanded) ? expanded : join(projectRoot, expanded));
|
|
509
|
-
if (!isInside(projectRoot, target))
|
|
510
|
-
return undefined;
|
|
511
|
-
let existing = target;
|
|
512
|
-
const missingSegments = [];
|
|
513
|
-
while (true) {
|
|
514
|
-
try {
|
|
515
|
-
const canonical = await realpath(existing);
|
|
516
|
-
if (!isInside(projectRoot, canonical))
|
|
517
|
-
return undefined;
|
|
518
|
-
const normalized = resolve(canonical, ...missingSegments.reverse());
|
|
519
|
-
return isInside(projectRoot, normalized) ? normalized : undefined;
|
|
520
|
-
}
|
|
521
|
-
catch (error) {
|
|
522
|
-
if (error.code !== "ENOENT")
|
|
523
|
-
throw error;
|
|
524
|
-
if (existing === projectRoot)
|
|
525
|
-
return undefined;
|
|
526
|
-
missingSegments.push(basename(existing));
|
|
527
|
-
existing = dirname(existing);
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
function expandProjectPath(value, projectRoot) {
|
|
532
|
-
return value
|
|
533
|
-
.replaceAll("$PROJECT_DIR$", projectRoot)
|
|
534
|
-
.replaceAll("$MODULE_WORKING_DIR$", projectRoot);
|
|
535
|
-
}
|
|
536
|
-
function tokenize(value) {
|
|
537
|
-
const tokens = [];
|
|
538
|
-
let current = "";
|
|
539
|
-
let quote;
|
|
540
|
-
let escaped = false;
|
|
541
|
-
for (const char of value) {
|
|
542
|
-
if (escaped) {
|
|
543
|
-
current += char;
|
|
544
|
-
escaped = false;
|
|
545
|
-
}
|
|
546
|
-
else if (char === "\\" && quote !== "'")
|
|
547
|
-
escaped = true;
|
|
548
|
-
else if (quote) {
|
|
549
|
-
if (char === quote)
|
|
550
|
-
quote = undefined;
|
|
551
|
-
else
|
|
552
|
-
current += char;
|
|
553
|
-
}
|
|
554
|
-
else if (char === "'" || char === '"')
|
|
555
|
-
quote = char;
|
|
556
|
-
else if (/\s/.test(char)) {
|
|
557
|
-
if (current)
|
|
558
|
-
tokens.push(current);
|
|
559
|
-
current = "";
|
|
560
|
-
}
|
|
561
|
-
else
|
|
562
|
-
current += char;
|
|
563
|
-
}
|
|
564
|
-
if (quote)
|
|
565
|
-
throw new Error("Run configuration contains an unterminated quoted argument.");
|
|
566
|
-
if (escaped)
|
|
567
|
-
current += "\\";
|
|
568
|
-
if (current)
|
|
569
|
-
tokens.push(current);
|
|
570
|
-
return tokens;
|
|
571
|
-
}
|
|
572
|
-
function decodeXml(value) {
|
|
573
|
-
return value
|
|
574
|
-
.replaceAll(""", '"')
|
|
575
|
-
.replaceAll("'", "'")
|
|
576
|
-
.replaceAll("<", "<")
|
|
577
|
-
.replaceAll(">", ">")
|
|
578
|
-
.replaceAll("&", "&");
|
|
579
|
-
}
|
|
580
|
-
function isEnvKey(value) {
|
|
581
|
-
return /^[A-Za-z_][A-Za-z0-9_]*$/.test(value);
|
|
582
|
-
}
|
|
583
|
-
function isInside(root, target) {
|
|
584
|
-
const rel = relative(root, target);
|
|
585
|
-
return rel === "" || (!rel.startsWith(`..${sep}`) && rel !== ".." && !isAbsolute(rel));
|
|
586
|
-
}
|
|
587
|
-
function assertInside(root, target) {
|
|
588
|
-
if (!isInside(root, target))
|
|
589
|
-
throw new Error("JetBrains config path escapes the project root.");
|
|
590
|
-
}
|
|
591
|
-
async function fileExists(path) {
|
|
592
|
-
try {
|
|
593
|
-
return (await stat(path)).isFile();
|
|
594
|
-
}
|
|
595
|
-
catch {
|
|
596
|
-
return false;
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
//# sourceMappingURL=jetbrains-import.js.map
|