@geoql/doctor-core 1.3.3 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,7 +21,7 @@ It also owns the pieces the CLIs surface: the config loader (`doctor.config.ts`
21
21
  npm i @geoql/doctor-core
22
22
  ```
23
23
 
24
- Published on [npm](https://www.npmjs.com/package/@geoql/doctor-core) and [JSR](https://jsr.io/@geoql/doctor-core) at `v0.1.0` with provenance. ESM-only. `knip` and `oxlint` are peer dependencies (the dead-code and script passes shell out to them).
24
+ Published on [npm](https://www.npmjs.com/package/@geoql/doctor-core) and [JSR](https://jsr.io/@geoql/doctor-core) with provenance. ESM-only. `knip` and `oxlint` are peer dependencies (the dead-code and script passes shell out to them).
25
25
 
26
26
  ## API
27
27
 
package/dist/index.d.ts CHANGED
@@ -70,6 +70,7 @@ type Capability = string;
70
70
  type MonorepoKind = 'pnpm' | 'yarn' | 'npm' | 'turbo' | null;
71
71
  interface ProjectInfo {
72
72
  readonly framework: Framework;
73
+ readonly frameworkDetected: boolean;
73
74
  readonly rootDirectory: string;
74
75
  readonly packageJsonPath: string | null;
75
76
  readonly vueVersion: string | null;
@@ -94,6 +95,7 @@ interface ProjectInfo {
94
95
  //#region src/reporters/types.d.ts
95
96
  interface ProjectInfoLite {
96
97
  readonly framework: Framework;
98
+ readonly frameworkDetected: boolean;
97
99
  readonly vueVersion: string | null;
98
100
  readonly nuxtVersion: string | null;
99
101
  readonly capabilities: readonly string[];
@@ -108,6 +110,8 @@ interface ReporterInput {
108
110
  readonly diagnostics: readonly Diagnostic[];
109
111
  readonly score: ScoreResult;
110
112
  readonly projectInfo: ProjectInfoLite;
113
+ readonly incomplete?: boolean;
114
+ readonly skippedCheckReasons?: readonly SkippedCheckReason[];
111
115
  }
112
116
  interface ReporterOptions {
113
117
  readonly color?: boolean;
@@ -143,6 +147,13 @@ interface AuditConfig {
143
147
  respectInlineDisables?: boolean;
144
148
  fix?: boolean;
145
149
  fixExcludes?: string[];
150
+ maxDurationMs?: number;
151
+ }
152
+ interface SkippedCheckReason {
153
+ kind: 'time-budget-exhausted';
154
+ deadlineMs: number;
155
+ elapsedMs: number;
156
+ skippedPasses: readonly string[];
146
157
  }
147
158
  interface AuditTimings {
148
159
  template: number;
@@ -165,6 +176,8 @@ interface AuditReport {
165
176
  elapsedMs: number;
166
177
  timings: AuditTimings;
167
178
  ruleCounts: Record<string, number>;
179
+ incomplete: boolean;
180
+ skippedCheckReasons?: readonly SkippedCheckReason[];
168
181
  }
169
182
  //#endregion
170
183
  //#region src/annotations.d.ts
@@ -392,6 +405,34 @@ declare function renderDetectSummary(project: ProjectInfo, sfcCount: number): st
392
405
  declare function detectSummary(dir: string): Promise<string>;
393
406
  declare function planInit(options: InitOptions): Promise<InitPlan>;
394
407
  //#endregion
408
+ //#region src/ci/provider-detect.d.ts
409
+ type CiProvider = 'github' | 'gitlab' | 'unknown';
410
+ /**
411
+ * Detects the CI provider from an explicit env snapshot. Takes the env as an
412
+ * argument (instead of reading process.env) so provider detection stays a
413
+ * deterministic, fully-testable pure function.
414
+ */
415
+ declare function detectCiProvider(env: Readonly<Record<string, string | undefined>>): CiProvider;
416
+ //#endregion
417
+ //#region src/ci/scaffold-workflow.d.ts
418
+ interface CiScaffoldOptions {
419
+ bin: 'vue-doctor' | 'nuxt-doctor';
420
+ framework: 'vue' | 'nuxt';
421
+ dir: string;
422
+ provider?: 'github' | 'gitlab' | 'auto';
423
+ pr?: boolean;
424
+ noComments?: boolean;
425
+ force?: boolean;
426
+ env?: Readonly<Record<string, string | undefined>>;
427
+ }
428
+ interface CiScaffoldPlan {
429
+ writes: InitFileWrite[];
430
+ conflict: boolean;
431
+ conflictPath: string | null;
432
+ provider: 'github' | 'gitlab';
433
+ }
434
+ declare function scaffoldCiWorkflow(opts: CiScaffoldOptions): Promise<CiScaffoldPlan>;
435
+ //#endregion
395
436
  //#region src/project-info/find-monorepo-root.d.ts
396
437
  interface MonorepoResult {
397
438
  root: string;
@@ -519,6 +560,7 @@ interface DoctorReport {
519
560
  };
520
561
  projectInfo: {
521
562
  framework: string;
563
+ frameworkDetected: boolean;
522
564
  vueVersion: string | null;
523
565
  nuxtVersion: string | null;
524
566
  capabilities: string[];
@@ -547,6 +589,8 @@ interface DoctorReport {
547
589
  elapsedMs: number;
548
590
  analyzedFileCount: number;
549
591
  };
592
+ incomplete?: boolean;
593
+ skippedCheckReasons?: SkippedCheckReason[];
550
594
  }
551
595
  declare function buildDoctorReport(input: ReporterInput): DoctorReport;
552
596
  declare function jsonReport(input: ReporterInput): string;
@@ -705,5 +749,5 @@ declare function buildPushPayload(input: PushPayloadInput): PushPayload;
705
749
  */
706
750
  declare function pushFindings(opts: PushOptions): Promise<PushResult>;
707
751
  //#endregion
708
- export { type ApplyInlineDisablesOptions, type AuditConfig, type AuditReport, type AuditTimings, BUILT_IN_RECOMMENDED, type Capability, type CliOverrides, ConfigCycleError, ConfigFileNotFoundError, type ConfigSource, DOCTOR_REPORT_SCHEMA_VERSION, DeadCodeImportFailed, DeadCodeTimeoutError, type Diagnostic, type DiagnosticSource, type DimensionScore, type DirectiveLine, type DirectiveRange, type DirectiveSet, type DoctorReport, type DoctorUserConfig, type DoctorUserConfigInput, DoctorUserConfigSchema, type Framework, type GitScopeMode, type InitConfigFormat, type InitFileWrite, type InitOptions, type InitPlan, type InitPreset, InvalidConfigError, LevelSchema, type ListRulesFilter, type LoadRuleDocOptions, type MonorepoKind, type MonorepoResult, OxlintOutputTooLarge, OxlintSpawnFailed, type ProjectInfo, type ProjectInfoLite, type PushOptions, type PushPayload, type PushPayloadInput, type PushResult, type PushedFinding, RULE_REGISTRY, type RawInitAnswers, type RegisteredRule, type ReporterFormat, type ReporterInput, type ReporterOptions, type ResolvedDoctorConfig, type ResolvedInitAnswers, type RuleCategory, type RuleDoc, RuleEntrySchema, type RuleSource, SCORE_DIMENSIONS, type ScoreBreakdownEntry, type ScoreConfig, type ScoreDimension, type ScoreResult, type Severity, type VerboseTraceOptions, type WorkspacePackage, agentReport, applyInlineDisables, audit, buildDoctorReport, buildJsonSchema, buildPushPayload, categoriesForDimension, checkBuildQuality, checkDeadCode, checkDeps, checkNuxtProject, dedupeDeadCodeAgainstLint, defineConfig, detectProject, detectSummary, dimensionForCategory, docsUrl, encodeAnnotation, encodeAnnotations, filterReportByRules, filterRuleIdsByCategory, findMonorepoRoot, format, isNuxtLayoutFile, isNuxtPageFile, isNuxtServerFile, isScoreDimension, jsonCompactReport, jsonReport, listChangedFiles, listRules, listWorkspacePackages, loadAllRuleDocs, loadDoctorConfig, loadRuleDoc, mergeCliOverrides, normalizeInitAnswers, parseDirectives, parseExcludeList, planInit, prCommentReport, prettyReport, pushFindings, renderAgentPlaybook, renderDetectSummary, renderRulePrompt, renderVerboseTrace, resolveCategoryScope, runCrossFilePass, sarifReport, scoreDiagnostics, stripFindings, validateConfig };
752
+ export { type ApplyInlineDisablesOptions, type AuditConfig, type AuditReport, type AuditTimings, BUILT_IN_RECOMMENDED, type Capability, type CiProvider, type CiScaffoldOptions, type CiScaffoldPlan, type CliOverrides, ConfigCycleError, ConfigFileNotFoundError, type ConfigSource, DOCTOR_REPORT_SCHEMA_VERSION, DeadCodeImportFailed, DeadCodeTimeoutError, type Diagnostic, type DiagnosticSource, type DimensionScore, type DirectiveLine, type DirectiveRange, type DirectiveSet, type DoctorReport, type DoctorUserConfig, type DoctorUserConfigInput, DoctorUserConfigSchema, type Framework, type GitScopeMode, type InitConfigFormat, type InitFileWrite, type InitOptions, type InitPlan, type InitPreset, InvalidConfigError, LevelSchema, type ListRulesFilter, type LoadRuleDocOptions, type MonorepoKind, type MonorepoResult, OxlintOutputTooLarge, OxlintSpawnFailed, type ProjectInfo, type ProjectInfoLite, type PushOptions, type PushPayload, type PushPayloadInput, type PushResult, type PushedFinding, RULE_REGISTRY, type RawInitAnswers, type RegisteredRule, type ReporterFormat, type ReporterInput, type ReporterOptions, type ResolvedDoctorConfig, type ResolvedInitAnswers, type RuleCategory, type RuleDoc, RuleEntrySchema, type RuleSource, SCORE_DIMENSIONS, type ScoreBreakdownEntry, type ScoreConfig, type ScoreDimension, type ScoreResult, type Severity, type SkippedCheckReason, type VerboseTraceOptions, type WorkspacePackage, agentReport, applyInlineDisables, audit, buildDoctorReport, buildJsonSchema, buildPushPayload, categoriesForDimension, checkBuildQuality, checkDeadCode, checkDeps, checkNuxtProject, dedupeDeadCodeAgainstLint, defineConfig, detectCiProvider, detectProject, detectSummary, dimensionForCategory, docsUrl, encodeAnnotation, encodeAnnotations, filterReportByRules, filterRuleIdsByCategory, findMonorepoRoot, format, isNuxtLayoutFile, isNuxtPageFile, isNuxtServerFile, isScoreDimension, jsonCompactReport, jsonReport, listChangedFiles, listRules, listWorkspacePackages, loadAllRuleDocs, loadDoctorConfig, loadRuleDoc, mergeCliOverrides, normalizeInitAnswers, parseDirectives, parseExcludeList, planInit, prCommentReport, prettyReport, pushFindings, renderAgentPlaybook, renderDetectSummary, renderRulePrompt, renderVerboseTrace, resolveCategoryScope, runCrossFilePass, sarifReport, scaffoldCiWorkflow, scoreDiagnostics, stripFindings, validateConfig };
709
753
  //# sourceMappingURL=index.d.ts.map