@ts-for-gir/cli 4.0.0-beta.37 → 4.0.0-beta.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ts-for-gir/cli",
3
- "version": "4.0.0-beta.37",
3
+ "version": "4.0.0-beta.38",
4
4
  "description": "TypeScript type definition generator for GObject introspection GIR files",
5
5
  "main": "src/index.ts",
6
6
  "module": "src/index.ts",
@@ -53,13 +53,13 @@
53
53
  ".": "./src/index.ts"
54
54
  },
55
55
  "devDependencies": {
56
- "@gi.ts/parser": "^4.0.0-beta.37",
57
- "@ts-for-gir/generator-base": "^4.0.0-beta.37",
58
- "@ts-for-gir/generator-html-doc": "^4.0.0-beta.37",
59
- "@ts-for-gir/generator-json": "^4.0.0-beta.37",
60
- "@ts-for-gir/generator-typescript": "^4.0.0-beta.37",
61
- "@ts-for-gir/lib": "^4.0.0-beta.37",
62
- "@ts-for-gir/reporter": "^4.0.0-beta.37",
56
+ "@gi.ts/parser": "^4.0.0-beta.38",
57
+ "@ts-for-gir/generator-base": "^4.0.0-beta.38",
58
+ "@ts-for-gir/generator-html-doc": "^4.0.0-beta.38",
59
+ "@ts-for-gir/generator-json": "^4.0.0-beta.38",
60
+ "@ts-for-gir/generator-typescript": "^4.0.0-beta.38",
61
+ "@ts-for-gir/lib": "^4.0.0-beta.38",
62
+ "@ts-for-gir/reporter": "^4.0.0-beta.38",
63
63
  "@types/ejs": "^3.1.5",
64
64
  "@types/inquirer": "^9.0.9",
65
65
  "@types/node": "^24.5.2",
@@ -70,7 +70,7 @@
70
70
  },
71
71
  "dependencies": {
72
72
  "@inquirer/prompts": "^7.8.6",
73
- "@ts-for-gir/templates": "^4.0.0-beta.37",
73
+ "@ts-for-gir/templates": "^4.0.0-beta.38",
74
74
  "colorette": "^2.0.20",
75
75
  "cosmiconfig": "^9.0.0",
76
76
  "ejs": "^3.1.10",
@@ -2,109 +2,109 @@
2
2
  * Base interface for all command arguments extending ConfigFlags
3
3
  */
4
4
  export interface BaseCommandArgs {
5
- /** GIR modules to load, e.g. 'Gio-2.0'. Accepts multiple modules */
6
- modules: string[]
7
- /** GIR directories */
8
- girDirectories: string[]
9
- /** Root directory of your project */
10
- root: string
11
- /** Modules that should be ignored */
12
- ignore: string[]
13
- /** Specify a custom name for the configuration file */
14
- configName: string
15
- /** Switch on/off the verbose mode */
16
- verbose: boolean
5
+ /** GIR modules to load, e.g. 'Gio-2.0'. Accepts multiple modules */
6
+ modules: string[];
7
+ /** GIR directories */
8
+ girDirectories: string[];
9
+ /** Root directory of your project */
10
+ root: string;
11
+ /** Modules that should be ignored */
12
+ ignore: string[];
13
+ /** Specify a custom name for the configuration file */
14
+ configName: string;
15
+ /** Switch on/off the verbose mode */
16
+ verbose: boolean;
17
17
  }
18
18
 
19
19
  /**
20
20
  * Arguments for the generate command
21
21
  */
22
22
  export interface GenerateCommandArgs extends BaseCommandArgs {
23
- /** Directory to output to */
24
- outdir: string | null
25
- /** Skip prompts for library version selection when multiple versions are detected */
26
- ignoreVersionConflicts: boolean
27
- /** Print the output to console and create no files */
28
- print: boolean
29
- /** Do not export all symbols for each module as a namespace */
30
- noNamespace: boolean
31
- /** Do not generate documentation comments */
32
- noComments: boolean
33
- /** Generate promisified functions for async/finish calls */
34
- promisify: boolean
35
- /** Scope of the generated NPM packages */
36
- npmScope: string
37
- /** Uses the workspace protocol for the generated packages which can be used with package managers like Yarn and PNPM */
38
- workspace: boolean
39
- /** Only use the version prefix for the ambient module exports */
40
- onlyVersionPrefix: boolean
41
- /** Do not prettify the generated types */
42
- noPrettyPrint: boolean
43
- /** Disable GLib.Variant class with string parsing */
44
- noAdvancedVariants: boolean
45
- /** Generate the typescript types with package.json support */
46
- package: boolean
47
- /** Enable generation problem reporter and create a detailed report file */
48
- reporter: boolean
49
- /** Output file path for the reporter */
50
- reporterOutput: string
23
+ /** Directory to output to */
24
+ outdir: string | null;
25
+ /** Skip prompts for library version selection when multiple versions are detected */
26
+ ignoreVersionConflicts: boolean;
27
+ /** Print the output to console and create no files */
28
+ print: boolean;
29
+ /** Do not export all symbols for each module as a namespace */
30
+ noNamespace: boolean;
31
+ /** Do not generate documentation comments */
32
+ noComments: boolean;
33
+ /** Generate promisified functions for async/finish calls */
34
+ promisify: boolean;
35
+ /** Scope of the generated NPM packages */
36
+ npmScope: string;
37
+ /** Uses the workspace protocol for the generated packages which can be used with package managers like Yarn and PNPM */
38
+ workspace: boolean;
39
+ /** Only use the version prefix for the ambient module exports */
40
+ onlyVersionPrefix: boolean;
41
+ /** Do not prettify the generated types */
42
+ noPrettyPrint: boolean;
43
+ /** Disable GLib.Variant class with string parsing */
44
+ noAdvancedVariants: boolean;
45
+ /** Generate the typescript types with package.json support */
46
+ package: boolean;
47
+ /** Enable generation problem reporter and create a detailed report file */
48
+ reporter: boolean;
49
+ /** Output file path for the reporter */
50
+ reporterOutput: string;
51
51
  }
52
52
 
53
53
  /**
54
54
  * Arguments for the list command
55
55
  */
56
56
  export interface ListCommandArgs extends BaseCommandArgs {
57
- // List command only uses base arguments
57
+ // List command only uses base arguments
58
58
  }
59
59
 
60
60
  /**
61
61
  * Arguments for the copy command
62
62
  */
63
63
  export interface CopyCommandArgs extends BaseCommandArgs {
64
- /** Directory to output to */
65
- outdir: string | null
64
+ /** Directory to output to */
65
+ outdir: string | null;
66
66
  }
67
67
 
68
68
  /**
69
69
  * Arguments for the doc command
70
70
  */
71
71
  export interface DocCommandArgs extends BaseCommandArgs {
72
- /** Directory to output to */
73
- outdir: string | null
74
- /** Skip prompts for library version selection when multiple versions are detected */
75
- ignoreVersionConflicts: boolean
72
+ /** Directory to output to */
73
+ outdir: string | null;
74
+ /** Skip prompts for library version selection when multiple versions are detected */
75
+ ignoreVersionConflicts: boolean;
76
76
  }
77
77
 
78
78
  /**
79
79
  * Arguments for the analyze command
80
80
  */
81
81
  export interface AnalyzeCommandArgs {
82
- /** Path to the report file to analyze */
83
- reportFile: string
84
- /** Filter by problem severity (debug, info, warning, error, critical) */
85
- severity?: string[]
86
- /** Filter by problem category */
87
- category?: string[]
88
- /** Filter by namespace/module */
89
- namespace?: string[]
90
- /** Filter by specific type name */
91
- type?: string[]
92
- /** Show top N most problematic items */
93
- top?: number
94
- /** Export filtered results to file */
95
- export?: string
96
- /** Output format (json, csv, table) */
97
- format?: string
98
- /** Show detailed problem information */
99
- detailed?: boolean
100
- /** Show summary statistics only */
101
- summary?: boolean
102
- /** Search for problems containing specific text */
103
- search?: string
104
- /** Show problems from a specific time range (ISO date) */
105
- since?: string
106
- /** Show problems until a specific time (ISO date) */
107
- until?: string
108
- /** Switch on/off the verbose mode */
109
- verbose?: boolean
110
- }
82
+ /** Path to the report file to analyze */
83
+ reportFile: string;
84
+ /** Filter by problem severity (debug, info, warning, error, critical) */
85
+ severity?: string[];
86
+ /** Filter by problem category */
87
+ category?: string[];
88
+ /** Filter by namespace/module */
89
+ namespace?: string[];
90
+ /** Filter by specific type name */
91
+ type?: string[];
92
+ /** Show top N most problematic items */
93
+ top?: number;
94
+ /** Export filtered results to file */
95
+ export?: string;
96
+ /** Output format (json, csv, table) */
97
+ format?: string;
98
+ /** Show detailed problem information */
99
+ detailed?: boolean;
100
+ /** Show summary statistics only */
101
+ summary?: boolean;
102
+ /** Search for problems containing specific text */
103
+ search?: string;
104
+ /** Show problems from a specific time range (ISO date) */
105
+ since?: string;
106
+ /** Show problems until a specific time (ISO date) */
107
+ until?: string;
108
+ /** Switch on/off the verbose mode */
109
+ verbose?: boolean;
110
+ }
@@ -1,15 +1,17 @@
1
+ import type { ConfigFlags } from "@ts-for-gir/lib";
2
+ import type { BuilderCallback } from "yargs";
1
3
  /**
2
4
  * Base interface for command definition structure
3
5
  */
4
6
  export interface CommandDefinition<TArgs> {
5
- /** Command name and parameters */
6
- command: string
7
- /** Command description */
8
- description: string
9
- /** Builder function for yargs configuration */
10
- builder: (yargs: any) => any
11
- /** Handler function for command execution */
12
- handler: (args: TArgs) => Promise<void>
13
- /** Example usage array */
14
- examples: ReadonlyArray<[string, string?]>
15
- }
7
+ /** Command name and parameters */
8
+ command: string;
9
+ /** Command description */
10
+ description: string;
11
+ /** Builder function for yargs configuration */
12
+ builder: BuilderCallback<TArgs, ConfigFlags>;
13
+ /** Handler function for command execution */
14
+ handler: (args: ConfigFlags) => Promise<void>;
15
+ /** Example usage array */
16
+ examples: ReadonlyArray<[string, string?]>;
17
+ }
@@ -1,35 +1,30 @@
1
1
  /**
2
2
  * Type definitions for command structure and exports
3
3
  */
4
- import type {
5
- GenerateCommandArgs,
6
- ListCommandArgs,
7
- CopyCommandArgs,
8
- DocCommandArgs
9
- } from './command-args.ts'
10
- import type { CommandDefinition } from './command-definition.ts'
4
+ import type { CopyCommandArgs, DocCommandArgs, GenerateCommandArgs, ListCommandArgs } from "./command-args.ts";
5
+ import type { CommandDefinition } from "./command-definition.ts";
11
6
 
12
7
  /**
13
8
  * Generate command definition type
14
9
  */
15
- export type GenerateCommand = CommandDefinition<GenerateCommandArgs>
10
+ export type GenerateCommand = CommandDefinition<GenerateCommandArgs>;
16
11
 
17
12
  /**
18
13
  * List command definition type
19
14
  */
20
- export type ListCommand = CommandDefinition<ListCommandArgs>
15
+ export type ListCommand = CommandDefinition<ListCommandArgs>;
21
16
 
22
17
  /**
23
18
  * Copy command definition type
24
19
  */
25
- export type CopyCommand = CommandDefinition<CopyCommandArgs>
20
+ export type CopyCommand = CommandDefinition<CopyCommandArgs>;
26
21
 
27
22
  /**
28
23
  * Doc command definition type
29
24
  */
30
- export type DocCommand = CommandDefinition<DocCommandArgs>
25
+ export type DocCommand = CommandDefinition<DocCommandArgs>;
31
26
 
32
27
  /**
33
28
  * Union type for all command types
34
29
  */
35
- export type AnyCommand = GenerateCommand | ListCommand | CopyCommand | DocCommand
30
+ export type AnyCommand = GenerateCommand | ListCommand | CopyCommand | DocCommand;
@@ -3,13 +3,13 @@
3
3
  */
4
4
 
5
5
  // Command argument interfaces
6
- export * from './command-args.ts'
6
+ export * from "./command-args.ts";
7
7
 
8
8
  // Command definition interfaces
9
- export * from './command-definition.ts'
9
+ export * from "./command-definition.ts";
10
10
 
11
11
  // Command type definitions
12
- export * from './commands.ts'
12
+ export * from "./commands.ts";
13
13
 
14
14
  // Report analysis types
15
- export * from './report-types.ts'
15
+ export * from "./report-types.ts";
@@ -31,4 +31,4 @@ export interface ReportData {
31
31
  metadata: ReportMetadata;
32
32
  statistics: ReportStatistics;
33
33
  problems: ProblemEntry[];
34
- }
34
+ }