@buddysh/buddy 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1633 -0
- package/LICENSE.md +21 -0
- package/README.md +1087 -0
- package/bin/cli.ts +3401 -0
- package/dist/bin/cli.d.ts +1 -0
- package/dist/bin/cli.js +188 -0
- package/dist/chunk-0j7z87kh.js +3 -0
- package/dist/chunk-0r8zt3d7.js +2 -0
- package/dist/chunk-16yqbccr.js +3 -0
- package/dist/chunk-1a53wj0h.js +1 -0
- package/dist/chunk-1c1gznm9.js +3 -0
- package/dist/chunk-1h3ey7k5.js +3 -0
- package/dist/chunk-1stt2whn.js +62 -0
- package/dist/chunk-1wjnd24b.js +24 -0
- package/dist/chunk-1xe07hzm.js +2 -0
- package/dist/chunk-2bp7tqca.js +2 -0
- package/dist/chunk-2dbkpfy9.js +2 -0
- package/dist/chunk-3q6czqs4.js +6 -0
- package/dist/chunk-3zdcekfj.js +5 -0
- package/dist/chunk-49ey79p0.js +5 -0
- package/dist/chunk-4c9m61yd.js +5 -0
- package/dist/chunk-4efbxdjr.js +4 -0
- package/dist/chunk-4f7panqj.js +21 -0
- package/dist/chunk-4hd3rre0.js +2 -0
- package/dist/chunk-4xsq18p3.js +9 -0
- package/dist/chunk-52x8mvh4.js +15 -0
- package/dist/chunk-54sc18p8.js +2 -0
- package/dist/chunk-56q4pwb5.js +3 -0
- package/dist/chunk-5c3qf34r.js +2 -0
- package/dist/chunk-5k40mwd4.js +4 -0
- package/dist/chunk-5kt03hx5.js +2 -0
- package/dist/chunk-63ept76v.js +2 -0
- package/dist/chunk-65b3vq52.js +2 -0
- package/dist/chunk-6d9hmjt8.js +3 -0
- package/dist/chunk-6g1y9yqh.js +3 -0
- package/dist/chunk-6k653r8w.js +2 -0
- package/dist/chunk-6md7qf2g.js +4 -0
- package/dist/chunk-6patq6bw.js +2 -0
- package/dist/chunk-6sgh49z1.js +2 -0
- package/dist/chunk-74pxb991.js +7 -0
- package/dist/chunk-7mgec8kb.js +7 -0
- package/dist/chunk-7tfrww3v.js +2 -0
- package/dist/chunk-7xk28xrv.js +2 -0
- package/dist/chunk-82dv4p13.js +2 -0
- package/dist/chunk-8661pvb8.js +3 -0
- package/dist/chunk-887s0w81.js +2 -0
- package/dist/chunk-8rc6042h.js +4 -0
- package/dist/chunk-9750tenz.js +3 -0
- package/dist/chunk-978wtejw.js +44 -0
- package/dist/chunk-9eqpaxfz.js +2 -0
- package/dist/chunk-9h04nskh.js +8 -0
- package/dist/chunk-9p1xkmjy.js +2 -0
- package/dist/chunk-agdesgzv.js +2 -0
- package/dist/chunk-akffynkc.js +3 -0
- package/dist/chunk-ar01x04a.js +2 -0
- package/dist/chunk-ay43f085.js +2 -0
- package/dist/chunk-bk9bqd5j.js +2 -0
- package/dist/chunk-bm8d40j0.js +69 -0
- package/dist/chunk-bxfc4g2x.js +73 -0
- package/dist/chunk-c3fczawt.js +2 -0
- package/dist/chunk-c9r9nd4t.js +1 -0
- package/dist/chunk-ctsz0ynx.js +3 -0
- package/dist/chunk-czremqk7.js +2 -0
- package/dist/chunk-da3wbh04.js +2 -0
- package/dist/chunk-dat582cg.js +2 -0
- package/dist/chunk-dfesffnr.js +3 -0
- package/dist/chunk-djntbp7a.js +105 -0
- package/dist/chunk-eagjp0dh.js +3 -0
- package/dist/chunk-eht72nnj.js +2 -0
- package/dist/chunk-f4nv5x3z.js +2 -0
- package/dist/chunk-fdfk918n.js +2 -0
- package/dist/chunk-fdj0tewy.js +20 -0
- package/dist/chunk-fm8ckj9b.js +2 -0
- package/dist/chunk-fqj7e6xa.js +2 -0
- package/dist/chunk-frm8zz31.js +2 -0
- package/dist/chunk-fvpr07dn.js +16 -0
- package/dist/chunk-g0nv8psv.js +2 -0
- package/dist/chunk-g0w8n555.js +19 -0
- package/dist/chunk-gkmvxjbe.js +2 -0
- package/dist/chunk-gngwjf70.js +7 -0
- package/dist/chunk-h7hs95wn.js +5 -0
- package/dist/chunk-hfvezfxh.js +3 -0
- package/dist/chunk-hw70wbzg.js +3 -0
- package/dist/chunk-j8asz4hb.js +15 -0
- package/dist/chunk-k62w2v03.js +2 -0
- package/dist/chunk-mcrfxphm.js +5 -0
- package/dist/chunk-mh3x7j6h.js +2 -0
- package/dist/chunk-naq32yx3.js +86 -0
- package/dist/chunk-nsmcjkas.js +2 -0
- package/dist/chunk-p1xm1jvz.js +2 -0
- package/dist/chunk-p3wsm8kz.js +2 -0
- package/dist/chunk-p4zwy518.js +4 -0
- package/dist/chunk-p7zgy37f.js +2 -0
- package/dist/chunk-ph1b3vbp.js +315 -0
- package/dist/chunk-pkjm2r0a.js +2 -0
- package/dist/chunk-pkkwb0n0.js +4 -0
- package/dist/chunk-pnpx1kqn.js +6 -0
- package/dist/chunk-q9n79dd3.js +3 -0
- package/dist/chunk-qpz9k66h.js +2 -0
- package/dist/chunk-qvn1rtgp.js +2 -0
- package/dist/chunk-qyf90zz3.js +2 -0
- package/dist/chunk-r06ce5g6.js +2 -0
- package/dist/chunk-r2sbprdb.js +49 -0
- package/dist/chunk-r3zyw8x0.js +3 -0
- package/dist/chunk-rb1fh9vd.js +1 -0
- package/dist/chunk-rqdep14r.js +2 -0
- package/dist/chunk-s1km8cyq.js +2 -0
- package/dist/chunk-s4ms8zag.js +2 -0
- package/dist/chunk-sp818c27.js +9 -0
- package/dist/chunk-tb5y0350.js +3 -0
- package/dist/chunk-thaxgm5p.js +2 -0
- package/dist/chunk-tn8prpny.js +503 -0
- package/dist/chunk-ts35hc5t.js +3 -0
- package/dist/chunk-tzs22es2.js +3 -0
- package/dist/chunk-vagxqhef.js +13 -0
- package/dist/chunk-vh504tcv.js +6 -0
- package/dist/chunk-vkctfqpm.js +3 -0
- package/dist/chunk-vyapg8ca.js +186 -0
- package/dist/chunk-wdwvt7gb.js +43 -0
- package/dist/chunk-wtjhehz9.js +4 -0
- package/dist/chunk-x0ya2r4r.js +3 -0
- package/dist/chunk-x3kragh9.js +12 -0
- package/dist/chunk-x9ctz1qc.js +1 -0
- package/dist/chunk-xakpdqaq.js +3 -0
- package/dist/chunk-xqx460y2.js +3 -0
- package/dist/chunk-xvptf9jy.js +3 -0
- package/dist/chunk-yk23nc4t.js +2 -0
- package/dist/chunk-yncea6ty.js +2 -0
- package/dist/chunk-yq0gxtzv.js +2 -0
- package/dist/chunk-yqhs08ky.js +2 -0
- package/dist/chunk-zb62jhwm.js +31 -0
- package/dist/chunk-zs3jaj0g.js +1023 -0
- package/dist/chunk-zve5d96e.js +2 -0
- package/dist/src/agent/index.d.ts +44 -0
- package/dist/src/agent/modes.d.ts +33 -0
- package/dist/src/agent/runner.d.ts +44 -0
- package/dist/src/agent/stacked.d.ts +83 -0
- package/dist/src/agent/tasks.d.ts +41 -0
- package/dist/src/agent/toolbelt.d.ts +19 -0
- package/dist/src/agent/tools/fs.d.ts +26 -0
- package/dist/src/agent/tools/shell.d.ts +32 -0
- package/dist/src/agent/types.d.ts +56 -0
- package/dist/src/ai/aliases.d.ts +62 -0
- package/dist/src/ai/client.d.ts +42 -0
- package/dist/src/ai/index.d.ts +35 -0
- package/dist/src/ai/learnings.d.ts +78 -0
- package/dist/src/ai/providers/anthropic.d.ts +12 -0
- package/dist/src/ai/providers/google.d.ts +12 -0
- package/dist/src/ai/providers/openai.d.ts +15 -0
- package/dist/src/ai/redact.d.ts +30 -0
- package/dist/src/ai/types.d.ts +75 -0
- package/dist/src/analysis/analyzers/actionlint.d.ts +11 -0
- package/dist/src/analysis/analyzers/external.d.ts +57 -0
- package/dist/src/analysis/analyzers/github-actions.d.ts +9 -0
- package/dist/src/analysis/analyzers/hadolint.d.ts +9 -0
- package/dist/src/analysis/analyzers/linter.d.ts +53 -0
- package/dist/src/analysis/analyzers/markdownlint.d.ts +11 -0
- package/dist/src/analysis/analyzers/secrets.d.ts +23 -0
- package/dist/src/analysis/analyzers/shellcheck.d.ts +8 -0
- package/dist/src/analysis/analyzers/syntax.d.ts +13 -0
- package/dist/src/analysis/engine.d.ts +38 -0
- package/dist/src/analysis/index.d.ts +13 -0
- package/dist/src/analysis/types.d.ts +14 -0
- package/dist/src/buddy.d.ts +17 -0
- package/dist/src/ci/classify.d.ts +49 -0
- package/dist/src/ci/fix.d.ts +42 -0
- package/dist/src/ci/index.d.ts +8 -0
- package/dist/src/commands/dispatcher.d.ts +49 -0
- package/dist/src/commands/handlers.d.ts +23 -0
- package/dist/src/commands/index.d.ts +22 -0
- package/dist/src/commands/parser.d.ts +71 -0
- package/dist/src/config-validation.d.ts +38 -0
- package/dist/src/config.d.ts +22 -0
- package/dist/src/dashboard/dashboard-generator.d.ts +10 -0
- package/dist/src/doctor.d.ts +44 -0
- package/dist/src/ecosystems/go.d.ts +10 -0
- package/dist/src/ecosystems/index.d.ts +60 -0
- package/dist/src/ecosystems/pep440.d.ts +57 -0
- package/dist/src/ecosystems/python.d.ts +12 -0
- package/dist/src/ecosystems/ruby.d.ts +9 -0
- package/dist/src/ecosystems/rust.d.ts +8 -0
- package/dist/src/ecosystems/scan.d.ts +49 -0
- package/dist/src/ecosystems/shared.d.ts +45 -0
- package/dist/src/ecosystems/types.d.ts +58 -0
- package/dist/src/events/bus.d.ts +41 -0
- package/dist/src/events/index.d.ts +11 -0
- package/dist/src/events/sinks.d.ts +33 -0
- package/dist/src/gates/ai-checks.d.ts +77 -0
- package/dist/src/gates/checks.d.ts +84 -0
- package/dist/src/gates/index.d.ts +17 -0
- package/dist/src/gates/post-merge.d.ts +56 -0
- package/dist/src/git/bitbucket-provider.d.ts +50 -0
- package/dist/src/git/github-provider.d.ts +50 -0
- package/dist/src/git/gitlab-provider.d.ts +51 -0
- package/dist/src/git/provider.d.ts +210 -0
- package/dist/src/headless/run.d.ts +78 -0
- package/dist/src/index.d.ts +243 -0
- package/dist/src/index.js +2 -0
- package/dist/src/issues/enrichment.d.ts +76 -0
- package/dist/src/issues/index.d.ts +16 -0
- package/dist/src/issues/quick-links.d.ts +55 -0
- package/dist/src/pr/auto-merge.d.ts +75 -0
- package/dist/src/pr/pr-generator.d.ts +9 -0
- package/dist/src/pr/pr-manifest.d.ts +82 -0
- package/dist/src/pr/templates.d.ts +44 -0
- package/dist/src/registry/docker-tags.d.ts +56 -0
- package/dist/src/registry/eol.d.ts +87 -0
- package/dist/src/registry/oci-client.d.ts +98 -0
- package/dist/src/registry/registry-client.d.ts +39 -0
- package/dist/src/reports/history.d.ts +51 -0
- package/dist/src/reports/index.d.ts +23 -0
- package/dist/src/reports/metrics.d.ts +89 -0
- package/dist/src/reports/render.d.ts +33 -0
- package/dist/src/review/diff.d.ts +50 -0
- package/dist/src/review/engine.d.ts +49 -0
- package/dist/src/review/findings.d.ts +102 -0
- package/dist/src/review/guidelines.d.ts +46 -0
- package/dist/src/review/index.d.ts +48 -0
- package/dist/src/review/local.d.ts +81 -0
- package/dist/src/review/marker.d.ts +34 -0
- package/dist/src/review/poster.d.ts +39 -0
- package/dist/src/review/run.d.ts +24 -0
- package/dist/src/rules/engine.d.ts +108 -0
- package/dist/src/rules/index.d.ts +9 -0
- package/dist/src/rules/renovate.d.ts +25 -0
- package/dist/src/rules/schedule.d.ts +44 -0
- package/dist/src/scanner/catalog-scan.d.ts +39 -0
- package/dist/src/scanner/package-json-extras.d.ts +101 -0
- package/dist/src/scanner/package-scanner.d.ts +17 -0
- package/dist/src/scanner/resolution-drift.d.ts +81 -0
- package/dist/src/scanner/workspace-catalog.d.ts +53 -0
- package/dist/src/scheduler/scheduler.d.ts +27 -0
- package/dist/src/security/engine.d.ts +12 -0
- package/dist/src/security/loader.d.ts +7 -0
- package/dist/src/security/parser.d.ts +15 -0
- package/dist/src/security/rules/bash-injection.d.ts +18 -0
- package/dist/src/security/rules/dangerous-pull-request-target.d.ts +18 -0
- package/dist/src/security/rules/excessive-permissions.d.ts +14 -0
- package/dist/src/security/rules/index.d.ts +16 -0
- package/dist/src/security/rules/missing-timeout.d.ts +9 -0
- package/dist/src/security/rules/self-hosted-exposure.d.ts +13 -0
- package/dist/src/security/rules/unpinned-action.d.ts +10 -0
- package/dist/src/security/rules/walk.d.ts +13 -0
- package/dist/src/security/types.d.ts +64 -0
- package/dist/src/services/deprecated-dependencies-checker.d.ts +16 -0
- package/dist/src/services/release-notes-fetcher.d.ts +70 -0
- package/dist/src/services/security-advisories.d.ts +59 -0
- package/dist/src/setup.d.ts +162 -0
- package/dist/src/setup.js +2 -0
- package/dist/src/templates/github-actions.d.ts +31 -0
- package/dist/src/templates/gitlab-ci.d.ts +46 -0
- package/dist/src/types.d.ts +449 -0
- package/dist/src/upgrades/index.d.ts +18 -0
- package/dist/src/upgrades/migrate.d.ts +45 -0
- package/dist/src/upgrades/plan.d.ts +112 -0
- package/dist/src/upgrades/report.d.ts +22 -0
- package/dist/src/upgrades/span.d.ts +47 -0
- package/dist/src/upgrades/usage.d.ts +30 -0
- package/dist/src/upgrades/wire.d.ts +61 -0
- package/dist/src/utils/concurrency.d.ts +50 -0
- package/dist/src/utils/dependency-file-parser.d.ts +17 -0
- package/dist/src/utils/dockerfile-parser.d.ts +69 -0
- package/dist/src/utils/endpoints.d.ts +58 -0
- package/dist/src/utils/errors.d.ts +35 -0
- package/dist/src/utils/file-changes.d.ts +14 -0
- package/dist/src/utils/github-actions-parser.d.ts +21 -0
- package/dist/src/utils/globs.d.ts +22 -0
- package/dist/src/utils/helpers.d.ts +73 -0
- package/dist/src/utils/http.d.ts +81 -0
- package/dist/src/utils/lock-file.d.ts +28 -0
- package/dist/src/utils/logger.d.ts +45 -0
- package/dist/src/utils/package-paths.d.ts +6 -0
- package/dist/src/utils/pantry-parser.d.ts +30 -0
- package/dist/src/utils/repository.d.ts +41 -0
- package/dist/src/utils/security-format.d.ts +18 -0
- package/dist/src/utils/zig-parser.d.ts +18 -0
- package/dist/src/version/version-resolver.d.ts +9 -0
- package/package.json +115 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import type { Logger } from './utils/logger';
|
|
2
|
+
// Pre-flight validation functions
|
|
3
|
+
export declare function runPreflightChecks(): Promise<ValidationResult>;
|
|
4
|
+
export declare function analyzeProject(): Promise<ProjectAnalysis>;
|
|
5
|
+
export declare function createProgressTracker(totalSteps: number): SetupProgress;
|
|
6
|
+
export declare function updateProgress(progress: SetupProgress, stepName: string, completed?: boolean): SetupProgress;
|
|
7
|
+
export declare function displayProgress(progress: SetupProgress): void;
|
|
8
|
+
/**
|
|
9
|
+
* Work out the repository and platform from a git remote.
|
|
10
|
+
*
|
|
11
|
+
* The owner capture allows slashes so a GitLab subgroup path survives — those
|
|
12
|
+
* are part of the project's name, and truncating them would configure a
|
|
13
|
+
* project that does not exist.
|
|
14
|
+
*
|
|
15
|
+
* @param remoteUrl - A git remote, HTTPS or SSH
|
|
16
|
+
* @returns The repository, or null when the host is not one buddy knows
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* parseRemote('git@gitlab.com:group/sub/repo.git')
|
|
20
|
+
* // { owner: 'group/sub', name: 'repo', provider: 'gitlab' }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseRemote(remoteUrl: string): RepositoryInfo | null;
|
|
24
|
+
export declare function detectRepository(): Promise<RepositoryInfo | null>;
|
|
25
|
+
export declare function guideTokenCreation(repoInfo: RepositoryInfo): Promise<void>;
|
|
26
|
+
export declare function confirmTokenSetup(): Promise<{ hasCustomToken: boolean, needsGuide: boolean }>;
|
|
27
|
+
export declare function guideRepositorySettings(repoInfo: RepositoryInfo): Promise<void>;
|
|
28
|
+
export declare function generateConfigFile(repoInfo: RepositoryInfo, hasCustomToken: boolean): Promise<void>;
|
|
29
|
+
export declare function generateUnifiedWorkflow(_hasCustomToken: boolean): string;
|
|
30
|
+
export declare function generateCoreWorkflows(_preset: WorkflowPreset, _repoInfo: RepositoryInfo, hasCustomToken: boolean, logger: Logger): Promise<void>;
|
|
31
|
+
export declare function getWorkflowPreset(useCase: string): WorkflowPreset;
|
|
32
|
+
// Enhanced testing and validation functions
|
|
33
|
+
export declare function validateWorkflowGeneration(workflowContent: string): Promise<ValidationResult>;
|
|
34
|
+
export declare function validateRepositoryAccess(repoInfo: RepositoryInfo): Promise<ValidationResult>;
|
|
35
|
+
export declare function displayValidationResults(results: ValidationResult, title: string): void;
|
|
36
|
+
export declare function setupCustomWorkflow(preset: WorkflowPreset, _logger: Logger): Promise<void>;
|
|
37
|
+
export declare function showFinalInstructions(repoInfo: RepositoryInfo, hasCustomToken: boolean): Promise<void>;
|
|
38
|
+
export declare interface RepositoryInfo {
|
|
39
|
+
owner: string
|
|
40
|
+
name: string
|
|
41
|
+
provider?: 'github' | 'gitlab' | 'bitbucket'
|
|
42
|
+
}
|
|
43
|
+
export declare interface WorkflowPreset {
|
|
44
|
+
name: string
|
|
45
|
+
description: string
|
|
46
|
+
templates: {
|
|
47
|
+
comprehensive?: boolean
|
|
48
|
+
daily?: boolean
|
|
49
|
+
weekly?: boolean
|
|
50
|
+
monthly?: boolean
|
|
51
|
+
docker?: boolean
|
|
52
|
+
monorepo?: boolean
|
|
53
|
+
}
|
|
54
|
+
schedules: {
|
|
55
|
+
dashboard: string
|
|
56
|
+
updates: string
|
|
57
|
+
}
|
|
58
|
+
strategy: string
|
|
59
|
+
autoMerge: boolean
|
|
60
|
+
custom: Array<{
|
|
61
|
+
name: string
|
|
62
|
+
schedule: string
|
|
63
|
+
strategy: string
|
|
64
|
+
autoMerge: boolean
|
|
65
|
+
autoMergeStrategy?: string
|
|
66
|
+
}>
|
|
67
|
+
}
|
|
68
|
+
// New interfaces for enhanced functionality
|
|
69
|
+
export declare interface ValidationResult {
|
|
70
|
+
success: boolean
|
|
71
|
+
errors: string[]
|
|
72
|
+
warnings: string[]
|
|
73
|
+
suggestions: string[]
|
|
74
|
+
}
|
|
75
|
+
export declare interface ProjectAnalysis {
|
|
76
|
+
type: 'library' | 'application' | 'monorepo' | 'unknown'
|
|
77
|
+
packageManager: 'npm' | 'yarn' | 'pnpm' | 'bun' | 'composer' | 'unknown'
|
|
78
|
+
hasLockFile: boolean
|
|
79
|
+
hasDependencyFiles: boolean
|
|
80
|
+
hasGitHubActions: boolean
|
|
81
|
+
recommendedPreset: string
|
|
82
|
+
recommendations: string[]
|
|
83
|
+
}
|
|
84
|
+
export declare interface SetupProgress {
|
|
85
|
+
currentStep: number
|
|
86
|
+
totalSteps: number
|
|
87
|
+
stepName: string
|
|
88
|
+
completed: string[]
|
|
89
|
+
failed?: string
|
|
90
|
+
canResume: boolean
|
|
91
|
+
startTime: Date
|
|
92
|
+
}
|
|
93
|
+
// Configuration Migration & Import System
|
|
94
|
+
export declare interface MigrationResult {
|
|
95
|
+
source: 'renovate' | 'dependabot' | 'greenkeeper' | 'custom'
|
|
96
|
+
configFound: boolean
|
|
97
|
+
migratedSettings: Partial<any>
|
|
98
|
+
warnings: string[]
|
|
99
|
+
incompatibleFeatures: string[]
|
|
100
|
+
confidence: 'high' | 'medium' | 'low'
|
|
101
|
+
}
|
|
102
|
+
export declare interface DetectedTool {
|
|
103
|
+
name: string
|
|
104
|
+
configFile: string
|
|
105
|
+
version?: string
|
|
106
|
+
active: boolean
|
|
107
|
+
}
|
|
108
|
+
// Integration Ecosystem & Plugin Architecture
|
|
109
|
+
export declare interface SetupPlugin {
|
|
110
|
+
name: string
|
|
111
|
+
version: string
|
|
112
|
+
triggers: SetupTrigger[]
|
|
113
|
+
hooks: SetupHook[]
|
|
114
|
+
configuration: PluginConfig
|
|
115
|
+
enabled: boolean
|
|
116
|
+
}
|
|
117
|
+
export declare interface SetupTrigger {
|
|
118
|
+
event: 'pre_setup' | 'post_setup' | 'step_complete' | 'validation_error' | 'setup_complete'
|
|
119
|
+
condition?: string
|
|
120
|
+
}
|
|
121
|
+
export declare interface SetupHook {
|
|
122
|
+
name: string
|
|
123
|
+
priority: number
|
|
124
|
+
async: boolean
|
|
125
|
+
handler: (context: SetupContext) => Promise<void> | void
|
|
126
|
+
}
|
|
127
|
+
export declare interface PluginConfig {
|
|
128
|
+
[key: string]: any
|
|
129
|
+
}
|
|
130
|
+
export declare interface SetupContext {
|
|
131
|
+
step: string
|
|
132
|
+
progress: SetupProgress
|
|
133
|
+
config: any
|
|
134
|
+
repository: RepositoryInfo
|
|
135
|
+
analysis: ProjectAnalysis
|
|
136
|
+
plugins: SetupPlugin[]
|
|
137
|
+
}
|
|
138
|
+
export declare interface IntegrationPoint {
|
|
139
|
+
tool: string
|
|
140
|
+
endpoint: string
|
|
141
|
+
authentication: AuthConfig
|
|
142
|
+
dataMapping: Record<string, string>
|
|
143
|
+
enabled: boolean
|
|
144
|
+
}
|
|
145
|
+
export declare interface AuthConfig {
|
|
146
|
+
type: 'token' | 'oauth' | 'webhook' | 'api_key'
|
|
147
|
+
credentials: Record<string, string>
|
|
148
|
+
}
|
|
149
|
+
// Configuration Migration Implementation
|
|
150
|
+
export declare class ConfigurationMigrator {
|
|
151
|
+
detectExistingTools(): Promise<DetectedTool[]>;
|
|
152
|
+
migrateFromRenovate(configPath: string): Promise<MigrationResult>;
|
|
153
|
+
migrateFromDependabot(configPath: string): Promise<MigrationResult>;
|
|
154
|
+
generateMigrationReport(results: MigrationResult[]): Promise<string>;
|
|
155
|
+
}
|
|
156
|
+
// Plugin Architecture Implementation
|
|
157
|
+
export declare class PluginManager {
|
|
158
|
+
discoverPlugins(): Promise<SetupPlugin[]>;
|
|
159
|
+
loadPlugin(plugin: SetupPlugin): Promise<void>;
|
|
160
|
+
executePluginHooks(trigger: SetupTrigger): Promise<void>;
|
|
161
|
+
setContext(context: SetupContext): void;
|
|
162
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{ej as a,fj as b,gj as c,hj as d,ij as e,jj as f,kj as g,lj as h,mj as i,nj as j,oj as k,pj as l,qj as m,rj as n,sj as o,tj as p,uj as q,vj as r,wj as s,xj as t,yj as u}from"../chunk-zs3jaj0g.js";import"../chunk-tn8prpny.js";import"../chunk-5k40mwd4.js";import"../chunk-1h3ey7k5.js";import"../chunk-akffynkc.js";import"../chunk-6g1y9yqh.js";export{q as validateWorkflowGeneration,r as validateRepositoryAccess,f as updateProgress,u as showFinalInstructions,t as setupCustomWorkflow,c as runPreflightChecks,h as parseRemote,j as guideTokenCreation,l as guideRepositorySettings,p as getWorkflowPreset,n as generateUnifiedWorkflow,o as generateCoreWorkflows,m as generateConfigFile,s as displayValidationResults,g as displayProgress,i as detectRepository,e as createProgressTracker,k as confirmTokenSetup,d as analyzeProject,b as PluginManager,a as ConfigurationMigrator};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { BuddyConfig } from '../types';
|
|
2
|
+
export declare interface WorkflowConfig {
|
|
3
|
+
name: string
|
|
4
|
+
schedule: string
|
|
5
|
+
strategy?: 'major' | 'minor' | 'patch' | 'all'
|
|
6
|
+
timezone?: string
|
|
7
|
+
autoMerge?: boolean | {
|
|
8
|
+
enabled: boolean
|
|
9
|
+
strategy: 'merge' | 'squash' | 'rebase'
|
|
10
|
+
conditions?: string[]
|
|
11
|
+
}
|
|
12
|
+
reviewers?: string[]
|
|
13
|
+
labels?: string[]
|
|
14
|
+
}
|
|
15
|
+
export declare class GitHubActionsTemplate {
|
|
16
|
+
static generateWorkflow(config: WorkflowConfig): string;
|
|
17
|
+
static generateScheduledWorkflows(config?: BuddyConfig): Record<string, string>;
|
|
18
|
+
static generateComprehensiveWorkflow(_config?: BuddyConfig): string;
|
|
19
|
+
static generateDockerWorkflow(_config?: BuddyConfig): string;
|
|
20
|
+
static generateMonorepoWorkflow(_config?: BuddyConfig): string;
|
|
21
|
+
static generateTestingWorkflow(_config?: BuddyConfig): string;
|
|
22
|
+
static generateCustomWorkflow(customConfig: {
|
|
23
|
+
name: string
|
|
24
|
+
schedule: string
|
|
25
|
+
strategy?: 'major' | 'minor' | 'patch' | 'all'
|
|
26
|
+
autoMerge?: boolean | { enabled: boolean, strategy: 'merge' | 'squash' | 'rebase', conditions?: string[] }
|
|
27
|
+
reviewers?: string[]
|
|
28
|
+
labels?: string[]
|
|
29
|
+
}, config?: BuddyConfig): string;
|
|
30
|
+
static generateSecurityAuditWorkflow(): string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate a `.gitlab-ci.yml` fragment that runs Buddy.
|
|
3
|
+
*
|
|
4
|
+
* GitLab has no equivalent of a workflow's `schedule:` block — pipeline
|
|
5
|
+
* schedules are configured in the project UI and surface to the job as
|
|
6
|
+
* `$CI_PIPELINE_SOURCE == "schedule"` plus a variable the schedule sets. The
|
|
7
|
+
* generated file therefore branches on a `BUDDY_JOB` variable, and the
|
|
8
|
+
* instructions say which schedules to create. Pretending otherwise would
|
|
9
|
+
* produce a file that never runs and gives no clue why.
|
|
10
|
+
*
|
|
11
|
+
* @param options - Whether to include the review job
|
|
12
|
+
* @returns YAML to write to `.gitlab-ci.yml`
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* await Bun.write('.gitlab-ci.yml', generateGitLabPipeline({ review: true }))
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function generateGitLabPipeline(options?: { review?: boolean }): string;
|
|
19
|
+
/**
|
|
20
|
+
* Generate a `bitbucket-pipelines.yml` that runs Buddy.
|
|
21
|
+
*
|
|
22
|
+
* Bitbucket's scheduled pipelines are also configured in the UI, and they can
|
|
23
|
+
* only run a *branch* pipeline — a schedule cannot target a custom pipeline
|
|
24
|
+
* directly. The custom pipelines below are what a schedule points at, and the
|
|
25
|
+
* instructions say so rather than leaving a file that silently never fires.
|
|
26
|
+
*
|
|
27
|
+
* @param options - Whether to include the review pipeline
|
|
28
|
+
* @returns YAML to write to `bitbucket-pipelines.yml`
|
|
29
|
+
*/
|
|
30
|
+
export declare function generateBitbucketPipeline(options?: { review?: boolean }): string;
|
|
31
|
+
/**
|
|
32
|
+
* Pick the CI template for a provider.
|
|
33
|
+
*
|
|
34
|
+
* @param provider - Provider name
|
|
35
|
+
* @param options - Whether to include the review job
|
|
36
|
+
* @returns The file path to write and its content, or null for GitHub, whose
|
|
37
|
+
* workflows are generated by the richer path in `src/setup.ts`
|
|
38
|
+
*/
|
|
39
|
+
export declare function ciTemplateFor(provider: string, options?: { review?: boolean }): { path: string, content: string } | null;
|
|
40
|
+
/** Defaults matching the GitHub Actions "standard" preset. */
|
|
41
|
+
export declare const DEFAULT_SCHEDULE: PipelineSchedule;
|
|
42
|
+
/** How often the generated pipeline runs. */
|
|
43
|
+
export declare interface PipelineSchedule {
|
|
44
|
+
update: string
|
|
45
|
+
dashboard: string
|
|
46
|
+
}
|
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
import type { Drift } from './scanner/resolution-drift';
|
|
2
|
+
import type { GitProviderName } from './git/provider';
|
|
3
|
+
import type { LogLevel } from './utils/logger';
|
|
4
|
+
// The provider contract lives beside its implementations in `src/git/`, and is
|
|
5
|
+
// re-exported here so `import type { GitProvider } from '@buddysh/buddy'` keeps
|
|
6
|
+
// working. `IMPLEMENTED_PROVIDERS` — not the type — is what gates a name from
|
|
7
|
+
// reaching a workflow run.
|
|
8
|
+
export type {
|
|
9
|
+
CheckRunResult,
|
|
10
|
+
GitProvider,
|
|
11
|
+
GitProviderName,
|
|
12
|
+
ProviderBranch,
|
|
13
|
+
ProviderCapabilities,
|
|
14
|
+
ReviewSubmission,
|
|
15
|
+
ReviewSubmissionResult,
|
|
16
|
+
} from './git/provider';
|
|
17
|
+
// Core configuration types
|
|
18
|
+
export declare interface BuddyConfig {
|
|
19
|
+
verbose?: boolean
|
|
20
|
+
logLevel?: LogLevel
|
|
21
|
+
repository?: {
|
|
22
|
+
provider: GitProviderName
|
|
23
|
+
owner: string
|
|
24
|
+
name: string
|
|
25
|
+
baseBranch?: string
|
|
26
|
+
token?: string
|
|
27
|
+
apiUrl?: string
|
|
28
|
+
serverUrl?: string
|
|
29
|
+
}
|
|
30
|
+
registries?: {
|
|
31
|
+
npm?: string
|
|
32
|
+
npmScopes?: Record<string, string>
|
|
33
|
+
composer?: string
|
|
34
|
+
docker?: Record<string, {
|
|
35
|
+
username?: string
|
|
36
|
+
passwordEnv?: string
|
|
37
|
+
tokenEnv?: string
|
|
38
|
+
}>
|
|
39
|
+
}
|
|
40
|
+
security?: {
|
|
41
|
+
enabled?: boolean
|
|
42
|
+
prioritize?: boolean
|
|
43
|
+
label?: string
|
|
44
|
+
minimumSeverity?: VulnerabilitySeverity
|
|
45
|
+
}
|
|
46
|
+
schedule?: {
|
|
47
|
+
cron?: string
|
|
48
|
+
timezone?: string
|
|
49
|
+
}
|
|
50
|
+
packages?: {
|
|
51
|
+
strategy: 'major' | 'minor' | 'patch' | 'all'
|
|
52
|
+
ignore?: string[]
|
|
53
|
+
ignorePaths?: string[]
|
|
54
|
+
pin?: Record<string, string>
|
|
55
|
+
groups?: PackageGroup[]
|
|
56
|
+
includePrerelease?: boolean
|
|
57
|
+
excludeMajor?: boolean
|
|
58
|
+
respectLatest?: boolean
|
|
59
|
+
minimumReleaseAge?: number
|
|
60
|
+
minimumReleaseAgeExclude?: string[]
|
|
61
|
+
rules?: import('./rules/engine').PackageRule[]
|
|
62
|
+
detectResolutionDrift?: boolean
|
|
63
|
+
}
|
|
64
|
+
gates?: {
|
|
65
|
+
titleFormat?: 'off' | 'warning' | 'error'
|
|
66
|
+
description?: { mode: 'off' | 'warning' | 'error', requireSections?: string[] }
|
|
67
|
+
dependencyGate?: {
|
|
68
|
+
mode: 'off' | 'warning' | 'error'
|
|
69
|
+
licenseAllowlist?: string[]
|
|
70
|
+
blockVulnerable?: boolean
|
|
71
|
+
blockDeprecated?: boolean
|
|
72
|
+
blockEol?: boolean
|
|
73
|
+
}
|
|
74
|
+
linkedIssue?: 'off' | 'warning' | 'error'
|
|
75
|
+
custom?: Array<{
|
|
76
|
+
name: string
|
|
77
|
+
assertion: string
|
|
78
|
+
mode?: 'off' | 'warning' | 'error'
|
|
79
|
+
}>
|
|
80
|
+
postMerge?: {
|
|
81
|
+
changelog?: { enabled?: boolean, path?: string }
|
|
82
|
+
commentOnIssues?: boolean
|
|
83
|
+
refreshDashboard?: boolean
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
issues?: {
|
|
87
|
+
quickLinks?: boolean
|
|
88
|
+
dependencyContext?: boolean
|
|
89
|
+
}
|
|
90
|
+
reports?: {
|
|
91
|
+
enabled?: boolean
|
|
92
|
+
schedule?: string
|
|
93
|
+
period?: '7d' | '30d' | '90d'
|
|
94
|
+
prompt?: string
|
|
95
|
+
title?: string
|
|
96
|
+
labels?: string[]
|
|
97
|
+
}
|
|
98
|
+
analysis?: {
|
|
99
|
+
enabled?: boolean
|
|
100
|
+
tools?: Record<string, boolean>
|
|
101
|
+
}
|
|
102
|
+
ai?: {
|
|
103
|
+
enabled?: boolean
|
|
104
|
+
provider?: 'anthropic' | 'openai' | 'google' | 'openrouter' | 'openai-compatible'
|
|
105
|
+
model?: string
|
|
106
|
+
effort?: 'low' | 'medium' | 'high'
|
|
107
|
+
apiKeyEnv?: string
|
|
108
|
+
baseUrl?: string
|
|
109
|
+
maxTokensPerRun?: number
|
|
110
|
+
majorUpgrades?: {
|
|
111
|
+
enabled?: boolean
|
|
112
|
+
autoMigrate?: boolean
|
|
113
|
+
draftBelowConfidence?: 'high' | 'medium'
|
|
114
|
+
maxAttempts?: number
|
|
115
|
+
packages?: string[]
|
|
116
|
+
}
|
|
117
|
+
review?: {
|
|
118
|
+
enabled?: boolean
|
|
119
|
+
profile?: 'chill' | 'assertive'
|
|
120
|
+
drafts?: boolean
|
|
121
|
+
autoReview?: boolean
|
|
122
|
+
ignoreTitleKeywords?: string[]
|
|
123
|
+
ignoreUsernames?: string[]
|
|
124
|
+
requestChangesOn?: 'never' | 'critical'
|
|
125
|
+
summaryOnly?: boolean
|
|
126
|
+
pathFilters?: string[]
|
|
127
|
+
pathInstructions?: Array<{ path: string, instructions: string }>
|
|
128
|
+
guidelineFiles?: string[] | false
|
|
129
|
+
instructions?: string
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
notifications?: {
|
|
133
|
+
slack?: { webhookEnv?: string, events?: string[] }
|
|
134
|
+
discord?: { webhookEnv?: string, events?: string[] }
|
|
135
|
+
webhooks?: Array<{ url: string, secretEnv?: string, events?: string[] }>
|
|
136
|
+
}
|
|
137
|
+
maxPRsPerRun?: number
|
|
138
|
+
pullRequest?: {
|
|
139
|
+
commitMessageFormat?: string
|
|
140
|
+
titleFormat?: string
|
|
141
|
+
bodyTemplate?: string
|
|
142
|
+
autoMerge?: {
|
|
143
|
+
enabled: boolean
|
|
144
|
+
strategy: 'merge' | 'squash' | 'rebase'
|
|
145
|
+
conditions?: string[]
|
|
146
|
+
requireGreenCI?: boolean
|
|
147
|
+
optOutLabel?: string
|
|
148
|
+
}
|
|
149
|
+
reviewers?: string[]
|
|
150
|
+
teamReviewers?: string[]
|
|
151
|
+
assignees?: string[]
|
|
152
|
+
labels?: string[]
|
|
153
|
+
}
|
|
154
|
+
releaseNotes?: {
|
|
155
|
+
enabled?: boolean
|
|
156
|
+
sanitizeReferences?: boolean
|
|
157
|
+
maxReleases?: number
|
|
158
|
+
maxBodyLength?: number
|
|
159
|
+
includeCompareLinks?: boolean
|
|
160
|
+
}
|
|
161
|
+
workflows?: {
|
|
162
|
+
enabled?: boolean
|
|
163
|
+
outputDir?: string
|
|
164
|
+
templates?: {
|
|
165
|
+
comprehensive?: boolean
|
|
166
|
+
daily?: boolean
|
|
167
|
+
weekly?: boolean
|
|
168
|
+
monthly?: boolean
|
|
169
|
+
docker?: boolean
|
|
170
|
+
monorepo?: boolean
|
|
171
|
+
}
|
|
172
|
+
custom?: {
|
|
173
|
+
name: string
|
|
174
|
+
schedule: string
|
|
175
|
+
strategy?: 'major' | 'minor' | 'patch' | 'all'
|
|
176
|
+
autoMerge?: boolean
|
|
177
|
+
reviewers?: string[]
|
|
178
|
+
assignees?: string[]
|
|
179
|
+
labels?: string[]
|
|
180
|
+
}[]
|
|
181
|
+
}
|
|
182
|
+
dashboard?: {
|
|
183
|
+
enabled?: boolean
|
|
184
|
+
title?: string
|
|
185
|
+
bodyTemplate?: string
|
|
186
|
+
labels?: string[]
|
|
187
|
+
assignees?: string[]
|
|
188
|
+
includePackageJson?: boolean
|
|
189
|
+
includeDependencyFiles?: boolean
|
|
190
|
+
includeGitHubActions?: boolean
|
|
191
|
+
showOpenPRs?: boolean
|
|
192
|
+
showDetectedDependencies?: boolean
|
|
193
|
+
showDeprecatedDependencies?: boolean
|
|
194
|
+
issueNumber?: number
|
|
195
|
+
pin?: boolean
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
export declare interface PackageGroup {
|
|
199
|
+
name: string
|
|
200
|
+
patterns: string[]
|
|
201
|
+
strategy?: 'major' | 'minor' | 'patch' | 'all'
|
|
202
|
+
}
|
|
203
|
+
// Package management types
|
|
204
|
+
export declare interface PackageFile {
|
|
205
|
+
path: string
|
|
206
|
+
type: 'package.json' | 'bun.lock' | 'bun.lockb' | 'package-lock.json' | 'yarn.lock' | 'pnpm-lock.yaml' | 'deps.yaml' | 'deps.yml' | 'dependencies.yaml' | 'dependencies.yml' | 'pkgx.yaml' | 'pkgx.yml' | '.deps.yaml' | '.deps.yml' | 'composer.json' | 'composer.lock' | 'github-actions' | 'Dockerfile' | 'build.zig.zon' | 'pantry.lock'
|
|
207
|
+
content: string
|
|
208
|
+
dependencies: Dependency[]
|
|
209
|
+
}
|
|
210
|
+
export declare interface Dependency {
|
|
211
|
+
name: string
|
|
212
|
+
currentVersion: string
|
|
213
|
+
type: 'dependencies' | 'devDependencies' | 'peerDependencies' | 'optionalDependencies' | 'require' | 'require-dev' | 'github-actions' | 'docker-image' | 'zig-dependencies' | 'python' | 'rust' | 'go' | 'ruby' | 'engines' | 'catalog'
|
|
214
|
+
file: string
|
|
215
|
+
line?: number
|
|
216
|
+
metadata?: Record<string, string>
|
|
217
|
+
}
|
|
218
|
+
export declare interface PackageUpdate {
|
|
219
|
+
name: string
|
|
220
|
+
currentVersion: string
|
|
221
|
+
newVersion: string
|
|
222
|
+
updateType: 'major' | 'minor' | 'patch'
|
|
223
|
+
dependencyType: Dependency['type']
|
|
224
|
+
file: string
|
|
225
|
+
metadata?: PackageMetadata
|
|
226
|
+
resolved?: {
|
|
227
|
+
url?: string
|
|
228
|
+
hash?: string
|
|
229
|
+
catalog?: string
|
|
230
|
+
}
|
|
231
|
+
releaseNotesUrl?: string
|
|
232
|
+
changelogUrl?: string
|
|
233
|
+
homepage?: string
|
|
234
|
+
securityAdvisories?: SecurityAdvisory[]
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* A known vulnerability affecting a specific dependency version, as reported
|
|
238
|
+
* by the OSV.dev aggregated advisory database.
|
|
239
|
+
*/
|
|
240
|
+
export declare interface SecurityAdvisory {
|
|
241
|
+
id: string
|
|
242
|
+
aliases: string[]
|
|
243
|
+
summary: string
|
|
244
|
+
severity: VulnerabilitySeverity
|
|
245
|
+
url?: string
|
|
246
|
+
fixedVersion?: string
|
|
247
|
+
}
|
|
248
|
+
export declare interface PackageMetadata {
|
|
249
|
+
name: string
|
|
250
|
+
description?: string
|
|
251
|
+
repository?: string
|
|
252
|
+
homepage?: string
|
|
253
|
+
license?: string
|
|
254
|
+
author?: string | { name: string, email?: string }
|
|
255
|
+
keywords?: string[]
|
|
256
|
+
latestVersion: string
|
|
257
|
+
versions: string[]
|
|
258
|
+
weeklyDownloads?: number
|
|
259
|
+
dependencies?: Record<string, string>
|
|
260
|
+
devDependencies?: Record<string, string>
|
|
261
|
+
peerDependencies?: Record<string, string>
|
|
262
|
+
}
|
|
263
|
+
export declare interface FileChange {
|
|
264
|
+
path: string
|
|
265
|
+
content: string
|
|
266
|
+
type: 'create' | 'update' | 'delete'
|
|
267
|
+
}
|
|
268
|
+
export declare interface PullRequestOptions {
|
|
269
|
+
title: string
|
|
270
|
+
body: string
|
|
271
|
+
head: string
|
|
272
|
+
base: string
|
|
273
|
+
draft?: boolean
|
|
274
|
+
reviewers?: string[]
|
|
275
|
+
teamReviewers?: string[]
|
|
276
|
+
assignees?: string[]
|
|
277
|
+
labels?: string[]
|
|
278
|
+
milestone?: number
|
|
279
|
+
}
|
|
280
|
+
export declare interface PullRequest {
|
|
281
|
+
number: number
|
|
282
|
+
title: string
|
|
283
|
+
body: string
|
|
284
|
+
head: string
|
|
285
|
+
base: string
|
|
286
|
+
state: 'open' | 'closed' | 'merged'
|
|
287
|
+
url: string
|
|
288
|
+
createdAt: Date
|
|
289
|
+
updatedAt: Date
|
|
290
|
+
mergedAt?: Date
|
|
291
|
+
author: string
|
|
292
|
+
reviewers: string[]
|
|
293
|
+
assignees: string[]
|
|
294
|
+
labels: string[]
|
|
295
|
+
draft: boolean
|
|
296
|
+
}
|
|
297
|
+
export declare interface IssueOptions {
|
|
298
|
+
title: string
|
|
299
|
+
body: string
|
|
300
|
+
assignees?: string[]
|
|
301
|
+
labels?: string[]
|
|
302
|
+
milestone?: number
|
|
303
|
+
}
|
|
304
|
+
export declare interface Issue {
|
|
305
|
+
number: number
|
|
306
|
+
title: string
|
|
307
|
+
body: string
|
|
308
|
+
state: 'open' | 'closed'
|
|
309
|
+
url: string
|
|
310
|
+
createdAt: Date
|
|
311
|
+
updatedAt: Date
|
|
312
|
+
closedAt?: Date
|
|
313
|
+
author: string
|
|
314
|
+
assignees: string[]
|
|
315
|
+
labels: string[]
|
|
316
|
+
pinned?: boolean
|
|
317
|
+
}
|
|
318
|
+
// Update scanning and processing types
|
|
319
|
+
export declare interface UpdateScanResult {
|
|
320
|
+
totalPackages: number
|
|
321
|
+
updates: PackageUpdate[]
|
|
322
|
+
groups: UpdateGroup[]
|
|
323
|
+
scannedAt: Date
|
|
324
|
+
duration: number
|
|
325
|
+
}
|
|
326
|
+
export declare interface UpdateGroup {
|
|
327
|
+
name: string
|
|
328
|
+
updates: PackageUpdate[]
|
|
329
|
+
updateType: 'major' | 'minor' | 'patch'
|
|
330
|
+
title: string
|
|
331
|
+
body: string
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* A single dependency change recorded in a pull request's metadata manifest.
|
|
335
|
+
*
|
|
336
|
+
* Field names are deliberately short: the manifest is embedded in every PR
|
|
337
|
+
* body and competes with release notes for GitHub's 65,536 character limit.
|
|
338
|
+
*/
|
|
339
|
+
export declare interface PRManifestUpdate {
|
|
340
|
+
name: string
|
|
341
|
+
current: string
|
|
342
|
+
target: string
|
|
343
|
+
type?: 'major' | 'minor' | 'patch'
|
|
344
|
+
file: string
|
|
345
|
+
dependencyType?: string
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Machine-readable description of what a buddy pull request changes,
|
|
349
|
+
* embedded in the PR body as an HTML comment.
|
|
350
|
+
*
|
|
351
|
+
* Rebasing and auto-closing read this instead of re-parsing the rendered
|
|
352
|
+
* markdown tables, so PR body formatting can change freely without breaking
|
|
353
|
+
* PR lifecycle logic.
|
|
354
|
+
*/
|
|
355
|
+
export declare interface PRManifest {
|
|
356
|
+
schemaVersion: number
|
|
357
|
+
updates: PRManifestUpdate[]
|
|
358
|
+
group?: string
|
|
359
|
+
strategy?: string
|
|
360
|
+
branch?: string
|
|
361
|
+
generatedAt?: string
|
|
362
|
+
truncated?: boolean
|
|
363
|
+
}
|
|
364
|
+
export declare interface DashboardData {
|
|
365
|
+
openPRs: PullRequest[]
|
|
366
|
+
detectedDependencies: {
|
|
367
|
+
packageJson: PackageFile[]
|
|
368
|
+
dependencyFiles: PackageFile[]
|
|
369
|
+
githubActions: PackageFile[]
|
|
370
|
+
}
|
|
371
|
+
deprecatedDependencies?: DeprecatedDependency[]
|
|
372
|
+
vulnerableDependencies?: VulnerableDependency[]
|
|
373
|
+
cappedDependencies?: Drift[]
|
|
374
|
+
repository: {
|
|
375
|
+
owner: string
|
|
376
|
+
name: string
|
|
377
|
+
provider: string
|
|
378
|
+
}
|
|
379
|
+
lastUpdated: Date
|
|
380
|
+
}
|
|
381
|
+
/** A dependency version with one or more known advisories against it. */
|
|
382
|
+
export declare interface VulnerableDependency {
|
|
383
|
+
name: string
|
|
384
|
+
currentVersion: string
|
|
385
|
+
ecosystem: string
|
|
386
|
+
file: string
|
|
387
|
+
advisories: SecurityAdvisory[]
|
|
388
|
+
}
|
|
389
|
+
export declare interface DeprecatedDependency {
|
|
390
|
+
name: string
|
|
391
|
+
currentVersion: string
|
|
392
|
+
datasource: string
|
|
393
|
+
file: string
|
|
394
|
+
type: string
|
|
395
|
+
replacementAvailable: boolean
|
|
396
|
+
suggestedReplacement?: string
|
|
397
|
+
deprecationMessage?: string
|
|
398
|
+
}
|
|
399
|
+
// CLI and command types
|
|
400
|
+
export declare interface BuddyCommand {
|
|
401
|
+
name: string
|
|
402
|
+
description: string
|
|
403
|
+
options?: CommandOption[]
|
|
404
|
+
action: (args: any) => Promise<void>
|
|
405
|
+
}
|
|
406
|
+
export declare interface CommandOption {
|
|
407
|
+
name: string
|
|
408
|
+
description: string
|
|
409
|
+
type: 'string' | 'boolean' | 'number'
|
|
410
|
+
default?: any
|
|
411
|
+
required?: boolean
|
|
412
|
+
alias?: string
|
|
413
|
+
}
|
|
414
|
+
// Utility types
|
|
415
|
+
export declare interface Logger {
|
|
416
|
+
info: (message: string, ...args: any[]) => void
|
|
417
|
+
warn: (message: string, ...args: any[]) => void
|
|
418
|
+
error: (message: string, ...args: any[]) => void
|
|
419
|
+
debug: (message: string, ...args: any[]) => void
|
|
420
|
+
success: (message: string, ...args: any[]) => void
|
|
421
|
+
}
|
|
422
|
+
export declare interface VersionRange {
|
|
423
|
+
raw: string
|
|
424
|
+
range: string
|
|
425
|
+
isExact: boolean
|
|
426
|
+
satisfies: (version: string) => boolean
|
|
427
|
+
getLatest: (versions: string[]) => string | null
|
|
428
|
+
}
|
|
429
|
+
/** Advisory severity, ordered from least to most severe. */
|
|
430
|
+
export type VulnerabilitySeverity = 'low' | 'moderate' | 'high' | 'critical';
|
|
431
|
+
export type BuddyOptions = Partial<BuddyConfig>;
|
|
432
|
+
// Error types
|
|
433
|
+
export declare class BuddyError extends Error {
|
|
434
|
+
public code?: string;
|
|
435
|
+
public details?: any;
|
|
436
|
+
constructor(message: string, code?: string, details?: any);
|
|
437
|
+
}
|
|
438
|
+
export declare class PackageRegistryError extends BuddyError {
|
|
439
|
+
public packageName?: string;
|
|
440
|
+
constructor(message: string, packageName?: string);
|
|
441
|
+
}
|
|
442
|
+
export declare class GitProviderError extends BuddyError {
|
|
443
|
+
public operation?: string;
|
|
444
|
+
constructor(message: string, operation?: string);
|
|
445
|
+
}
|
|
446
|
+
export declare class ConfigurationError extends BuddyError {
|
|
447
|
+
public configKey?: string;
|
|
448
|
+
constructor(message: string, configKey?: string);
|
|
449
|
+
}
|