@ts-for-gir/cli 4.0.0-beta.36 → 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/bin/ts-for-gir CHANGED
@@ -5990,9 +5990,7 @@ var ConsoleReporter = class _ConsoleReporter extends ReporterBase {
5990
5990
  generateSummary(statistics) {
5991
5991
  const { bySeverity, byCategory, totalProblems } = statistics;
5992
5992
  let status = "success";
5993
- if (bySeverity["critical" /* CRITICAL */] > 0 || bySeverity["error" /* ERROR */] > 10) {
5994
- status = "failed";
5995
- } else if (bySeverity["error" /* ERROR */] > 0 || bySeverity["warning" /* WARNING */] > 20) {
5993
+ if (bySeverity["error" /* ERROR */] > 0 || bySeverity["warning" /* WARNING */] > 20) {
5996
5994
  status = "partial";
5997
5995
  }
5998
5996
  const keyIssues = [];
@@ -6386,12 +6384,10 @@ var ReporterService = class _ReporterService {
6386
6384
  problemsByCategory[problem.category].push(problem);
6387
6385
  }
6388
6386
  const errorCount = statistics.bySeverity["error" /* ERROR */] || 0;
6389
- const criticalCount = statistics.bySeverity["critical" /* CRITICAL */] || 0;
6387
+ const _criticalCount = statistics.bySeverity["critical" /* CRITICAL */] || 0;
6390
6388
  const warningCount = statistics.bySeverity["warning" /* WARNING */] || 0;
6391
6389
  let status = "success";
6392
- if (criticalCount > 0 || errorCount > 10) {
6393
- status = "failed";
6394
- } else if (errorCount > 0 || warningCount > 20) {
6390
+ if (errorCount > 0 || warningCount > 20) {
6395
6391
  status = "partial";
6396
6392
  }
6397
6393
  const keyIssues = [];
@@ -6464,7 +6460,7 @@ var ReporterService = class _ReporterService {
6464
6460
  ${"=".repeat(60)}`);
6465
6461
  console.log("\u{1F4CA} COMPREHENSIVE GENERATION REPORT");
6466
6462
  console.log("=".repeat(60));
6467
- const statusColor = summary.status === "success" ? green2 : summary.status === "partial" ? yellow2 : red2;
6463
+ const statusColor = summary.status === "success" ? green2 : yellow2;
6468
6464
  console.log(`
6469
6465
  \u{1F3AF} Overall Status: ${statusColor(summary.status.toUpperCase())}`);
6470
6466
  console.log(`
@@ -13101,6 +13097,10 @@ var clutter13 = createClutterTemplate("13");
13101
13097
  var clutter14 = createClutterTemplate("14");
13102
13098
  var clutter15 = createClutterTemplate("15");
13103
13099
  var clutter16 = createClutterTemplate("16");
13100
+ var clutter17 = createClutterTemplate("17");
13101
+ var clutter18 = createClutterTemplate("18");
13102
+ var clutter19 = createClutterTemplate("19");
13103
+ var clutter20 = createClutterTemplate("20");
13104
13104
 
13105
13105
  // ../lib/src/generics/gio.ts
13106
13106
  function createGioConfig() {
@@ -13302,6 +13302,10 @@ var meta13 = createMetaTemplate("13");
13302
13302
  var meta14 = createMetaTemplate("14");
13303
13303
  var meta15 = createMetaTemplate("15");
13304
13304
  var meta16 = createMetaTemplate("16");
13305
+ var meta17 = createMetaTemplate("17");
13306
+ var meta18 = createMetaTemplate("18");
13307
+ var meta19 = createMetaTemplate("19");
13308
+ var meta20 = createMetaTemplate("20");
13305
13309
 
13306
13310
  // ../lib/src/generics/st.ts
13307
13311
  function createStTemplate(version) {
@@ -13445,6 +13449,10 @@ var st13 = createStTemplate("13");
13445
13449
  var st14 = createStTemplate("14");
13446
13450
  var st15 = createStTemplate("15");
13447
13451
  var st16 = createStTemplate("16");
13452
+ var st17 = createStTemplate("17");
13453
+ var st18 = createStTemplate("18");
13454
+ var st19 = createStTemplate("19");
13455
+ var st20 = createStTemplate("20");
13448
13456
 
13449
13457
  // ../lib/src/visitor.ts
13450
13458
  var GirVisitor = class {
@@ -13805,17 +13813,32 @@ var OPTIONAL_DEFINITIONS = [
13805
13813
  clutter13,
13806
13814
  clutter14,
13807
13815
  clutter15,
13816
+ clutter16,
13817
+ clutter17,
13818
+ clutter18,
13819
+ clutter19,
13820
+ clutter20,
13808
13821
  st1,
13809
13822
  st12,
13810
13823
  st13,
13811
13824
  st14,
13812
13825
  st15,
13826
+ st16,
13827
+ st17,
13828
+ st18,
13829
+ st19,
13830
+ st20,
13813
13831
  meta10,
13814
13832
  meta11,
13815
13833
  meta12,
13816
13834
  meta13,
13817
13835
  meta14,
13818
- meta15
13836
+ meta15,
13837
+ meta16,
13838
+ meta17,
13839
+ meta18,
13840
+ meta19,
13841
+ meta20
13819
13842
  ];
13820
13843
  function createDefinitionProcessor(registry, inferGenerics, required = true) {
13821
13844
  return (definition) => {
@@ -15546,6 +15569,10 @@ var shellTemplate = (version) => ({
15546
15569
  var shell14 = shellTemplate("14");
15547
15570
  var shell15 = shellTemplate("15");
15548
15571
  var shell16 = shellTemplate("16");
15572
+ var shell17 = shellTemplate("17");
15573
+ var shell18 = shellTemplate("18");
15574
+ var shell19 = shellTemplate("19");
15575
+ var shell20 = shellTemplate("20");
15549
15576
 
15550
15577
  // ../lib/src/injections/tracker1.ts
15551
15578
  var tracker1_default = {
@@ -15596,6 +15623,11 @@ function inject(registry) {
15596
15623
  $_(gtk4_default);
15597
15624
  $_(shell14);
15598
15625
  $_(shell15);
15626
+ $_(shell16);
15627
+ $_(shell17);
15628
+ $_(shell18);
15629
+ $_(shell19);
15630
+ $_(shell20);
15599
15631
  }
15600
15632
 
15601
15633
  // ../lib/src/validators/class.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ts-for-gir/cli",
3
- "version": "4.0.0-beta.36",
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,29 +53,29 @@
53
53
  ".": "./src/index.ts"
54
54
  },
55
55
  "devDependencies": {
56
- "@gi.ts/parser": "^4.0.0-beta.36",
57
- "@ts-for-gir/generator-base": "^4.0.0-beta.36",
58
- "@ts-for-gir/generator-html-doc": "^4.0.0-beta.36",
59
- "@ts-for-gir/generator-json": "^4.0.0-beta.36",
60
- "@ts-for-gir/generator-typescript": "^4.0.0-beta.36",
61
- "@ts-for-gir/lib": "^4.0.0-beta.36",
62
- "@ts-for-gir/reporter": "^4.0.0-beta.36",
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
- "@types/node": "^24.2.1",
65
+ "@types/node": "^24.5.2",
66
66
  "@types/yargs": "^17.0.33",
67
67
  "dpdm": "^3.14.0",
68
- "esbuild": "^0.25.9",
68
+ "esbuild": "^0.25.10",
69
69
  "typescript": "^5.9.2"
70
70
  },
71
71
  "dependencies": {
72
- "@inquirer/prompts": "^7.8.2",
73
- "@ts-for-gir/templates": "^4.0.0-beta.36",
72
+ "@inquirer/prompts": "^7.8.6",
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",
77
77
  "glob": "^11.0.3",
78
- "inquirer": "^12.9.2",
78
+ "inquirer": "^12.9.6",
79
79
  "prettier": "^3.6.2",
80
80
  "yargs": "^18.0.0"
81
81
  }
@@ -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
+ }