@docker-doctor/cli 0.5.1 → 0.5.3

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/dist/index.d.cts CHANGED
@@ -13,6 +13,7 @@ interface Diagnostic {
13
13
  severity: DiagnosticSeverity;
14
14
  message: string;
15
15
  help: string;
16
+ category?: RuleCategory;
16
17
  line?: number;
17
18
  column?: number;
18
19
  }
@@ -45,34 +46,34 @@ interface DockerDoctorConfig {
45
46
  }
46
47
  //#endregion
47
48
  //#region ../core/src/project-info/discover.d.ts
48
- declare const discoverProject: (rootDir: string, options?: {
49
+ export declare const discoverProject: (rootDir: string, options?: {
49
50
  ignoreFiles?: readonly string[];
50
51
  }) => Promise<ProjectInfo>;
51
52
  //#endregion
52
53
  //#region ../core/src/parsers/dockerfile-parser.d.ts
53
- declare const parseDockerfile: (content: string) => DockerfileInstruction[];
54
+ export declare const parseDockerfile: (content: string, file?: string) => DockerfileInstruction[];
54
55
  //#endregion
55
56
  //#region ../core/src/parsers/compose-parser.d.ts
56
- declare const parseCompose: (content: string, filepath: string) => unknown;
57
+ export declare const parseCompose: (content: string, filepath: string) => unknown;
57
58
  //#endregion
58
59
  //#region ../core/src/runners/dockerfile-runner.d.ts
59
- declare const runDockerfileRules: (instructions: DockerfileInstruction[], file: string, projectFiles: string[], rulesConfig?: Record<string, RuleSeverity>, categoriesConfig?: Record<string, RuleSeverity>) => Diagnostic[];
60
+ export declare const runDockerfileRules: (instructions: DockerfileInstruction[], file: string, projectFiles: string[], rulesConfig?: Record<string, RuleSeverity>, categoriesConfig?: Record<string, RuleSeverity>) => Diagnostic[];
60
61
  //#endregion
61
62
  //#region ../core/src/runners/compose-runner.d.ts
62
- declare const runComposeRules: (composeContent: unknown, file: string, rulesConfig?: Record<string, RuleSeverity>, categoriesConfig?: Record<string, RuleSeverity>, locate?: ComposeLocator) => Diagnostic[];
63
+ export declare const runComposeRules: (composeContent: unknown, file: string, rulesConfig?: Record<string, RuleSeverity>, categoriesConfig?: Record<string, RuleSeverity>, locate?: ComposeLocator) => Diagnostic[];
63
64
  //#endregion
64
65
  //#region ../core/src/rules/index.d.ts
65
- declare const allRules: RuleDefinition[];
66
- declare const findRule: (key: string) => RuleDefinition | undefined;
66
+ export declare const allRules: RuleDefinition[];
67
+ export declare const findRule: (key: string) => RuleDefinition | undefined;
67
68
  //#endregion
68
69
  //#region ../core/src/config/define-config.d.ts
69
- declare const defineConfig: (config: DockerDoctorConfig) => DockerDoctorConfig;
70
+ export declare const defineConfig: (config: DockerDoctorConfig) => DockerDoctorConfig;
70
71
  //#endregion
71
72
  //#region ../core/src/config/loader.d.ts
72
- declare const loadConfig: (rootDir: string, customPath?: string, onWarning?: (message: string) => void) => Promise<DockerDoctorConfig>;
73
+ export declare const loadConfig: (rootDir: string, customPath?: string, onWarning?: (message: string) => void) => Promise<DockerDoctorConfig>;
73
74
  //#endregion
74
75
  //#region ../core/src/scoring.d.ts
75
- declare const calculateScore: (diagnostics: Diagnostic[]) => {
76
+ export declare const calculateScore: (diagnostics: Diagnostic[]) => {
76
77
  score: number;
77
78
  label: string;
78
79
  };
@@ -80,6 +81,7 @@ declare const calculateScore: (diagnostics: Diagnostic[]) => {
80
81
  //#region ../core/src/report.d.ts
81
82
  interface JsonReport {
82
83
  diagnostics: {
84
+ category: RuleCategory;
83
85
  column?: number;
84
86
  file: string;
85
87
  help: string;
@@ -94,10 +96,10 @@ interface JsonReport {
94
96
  score: number;
95
97
  timestamp: string;
96
98
  }
97
- declare const toJsonReport: (diagnostics: Diagnostic[], score: number, label: string, project: ProjectInfo) => JsonReport;
99
+ export declare const toJsonReport: (diagnostics: Diagnostic[], score: number, label: string, project: ProjectInfo) => JsonReport;
98
100
  //#endregion
99
101
  //#region src/index.d.ts
100
- declare const version: string;
102
+ export declare const version: string;
101
103
  //#endregion
102
- export { type Diagnostic, type DockerDoctorConfig, type RuleCategory, type RuleSeverity, allRules, calculateScore, defineConfig, discoverProject, findRule, loadConfig, parseCompose, parseDockerfile, runComposeRules, runDockerfileRules, toJsonReport, version };
104
+ export type { Diagnostic, DockerDoctorConfig, RuleCategory, RuleSeverity };
103
105
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.mts CHANGED
@@ -13,6 +13,7 @@ interface Diagnostic {
13
13
  severity: DiagnosticSeverity;
14
14
  message: string;
15
15
  help: string;
16
+ category?: RuleCategory;
16
17
  line?: number;
17
18
  column?: number;
18
19
  }
@@ -45,34 +46,34 @@ interface DockerDoctorConfig {
45
46
  }
46
47
  //#endregion
47
48
  //#region ../core/src/project-info/discover.d.ts
48
- declare const discoverProject: (rootDir: string, options?: {
49
+ export declare const discoverProject: (rootDir: string, options?: {
49
50
  ignoreFiles?: readonly string[];
50
51
  }) => Promise<ProjectInfo>;
51
52
  //#endregion
52
53
  //#region ../core/src/parsers/dockerfile-parser.d.ts
53
- declare const parseDockerfile: (content: string) => DockerfileInstruction[];
54
+ export declare const parseDockerfile: (content: string, file?: string) => DockerfileInstruction[];
54
55
  //#endregion
55
56
  //#region ../core/src/parsers/compose-parser.d.ts
56
- declare const parseCompose: (content: string, filepath: string) => unknown;
57
+ export declare const parseCompose: (content: string, filepath: string) => unknown;
57
58
  //#endregion
58
59
  //#region ../core/src/runners/dockerfile-runner.d.ts
59
- declare const runDockerfileRules: (instructions: DockerfileInstruction[], file: string, projectFiles: string[], rulesConfig?: Record<string, RuleSeverity>, categoriesConfig?: Record<string, RuleSeverity>) => Diagnostic[];
60
+ export declare const runDockerfileRules: (instructions: DockerfileInstruction[], file: string, projectFiles: string[], rulesConfig?: Record<string, RuleSeverity>, categoriesConfig?: Record<string, RuleSeverity>) => Diagnostic[];
60
61
  //#endregion
61
62
  //#region ../core/src/runners/compose-runner.d.ts
62
- declare const runComposeRules: (composeContent: unknown, file: string, rulesConfig?: Record<string, RuleSeverity>, categoriesConfig?: Record<string, RuleSeverity>, locate?: ComposeLocator) => Diagnostic[];
63
+ export declare const runComposeRules: (composeContent: unknown, file: string, rulesConfig?: Record<string, RuleSeverity>, categoriesConfig?: Record<string, RuleSeverity>, locate?: ComposeLocator) => Diagnostic[];
63
64
  //#endregion
64
65
  //#region ../core/src/rules/index.d.ts
65
- declare const allRules: RuleDefinition[];
66
- declare const findRule: (key: string) => RuleDefinition | undefined;
66
+ export declare const allRules: RuleDefinition[];
67
+ export declare const findRule: (key: string) => RuleDefinition | undefined;
67
68
  //#endregion
68
69
  //#region ../core/src/config/define-config.d.ts
69
- declare const defineConfig: (config: DockerDoctorConfig) => DockerDoctorConfig;
70
+ export declare const defineConfig: (config: DockerDoctorConfig) => DockerDoctorConfig;
70
71
  //#endregion
71
72
  //#region ../core/src/config/loader.d.ts
72
- declare const loadConfig: (rootDir: string, customPath?: string, onWarning?: (message: string) => void) => Promise<DockerDoctorConfig>;
73
+ export declare const loadConfig: (rootDir: string, customPath?: string, onWarning?: (message: string) => void) => Promise<DockerDoctorConfig>;
73
74
  //#endregion
74
75
  //#region ../core/src/scoring.d.ts
75
- declare const calculateScore: (diagnostics: Diagnostic[]) => {
76
+ export declare const calculateScore: (diagnostics: Diagnostic[]) => {
76
77
  score: number;
77
78
  label: string;
78
79
  };
@@ -80,6 +81,7 @@ declare const calculateScore: (diagnostics: Diagnostic[]) => {
80
81
  //#region ../core/src/report.d.ts
81
82
  interface JsonReport {
82
83
  diagnostics: {
84
+ category: RuleCategory;
83
85
  column?: number;
84
86
  file: string;
85
87
  help: string;
@@ -94,10 +96,10 @@ interface JsonReport {
94
96
  score: number;
95
97
  timestamp: string;
96
98
  }
97
- declare const toJsonReport: (diagnostics: Diagnostic[], score: number, label: string, project: ProjectInfo) => JsonReport;
99
+ export declare const toJsonReport: (diagnostics: Diagnostic[], score: number, label: string, project: ProjectInfo) => JsonReport;
98
100
  //#endregion
99
101
  //#region src/index.d.ts
100
- declare const version: string;
102
+ export declare const version: string;
101
103
  //#endregion
102
- export { type Diagnostic, type DockerDoctorConfig, type RuleCategory, type RuleSeverity, allRules, calculateScore, defineConfig, discoverProject, findRule, loadConfig, parseCompose, parseDockerfile, runComposeRules, runDockerfileRules, toJsonReport, version };
104
+ export type { Diagnostic, DockerDoctorConfig, RuleCategory, RuleSeverity };
103
105
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as runDockerfileRules, d as discoverProject, f as version$1, i as runComposeRules, l as parseCompose, n as calculateScore, o as allRules, r as loadConfig, s as findRule, t as toJsonReport, u as parseDockerfile } from "./src-NqSwkGiS.mjs";
2
+ import { a as runDockerfileRules, d as discoverProject, f as version$1, i as runComposeRules, l as parseCompose, n as calculateScore, o as allRules, r as loadConfig, s as findRule, t as toJsonReport, u as parseDockerfile } from "./src-CklEIXTX.mjs";
3
3
 
4
4
  //#region ../core/src/config/define-config.ts
5
5
  const defineConfig = (config) => config;