@ts-for-gir/cli 4.0.0-beta.25 → 4.0.0-beta.27

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.
Files changed (63) hide show
  1. package/README.md +84 -2
  2. package/bin/ts-for-gir-dev.js +43 -0
  3. package/bin/ts-for-gir.js +20046 -0
  4. package/package.json +34 -36
  5. package/src/commands/analyze.ts +344 -0
  6. package/src/commands/command-builder.ts +30 -0
  7. package/src/commands/copy.ts +71 -76
  8. package/src/commands/doc.ts +58 -46
  9. package/src/commands/generate.ts +97 -77
  10. package/src/commands/index.ts +6 -4
  11. package/src/commands/json.ts +104 -0
  12. package/src/commands/list.ts +81 -90
  13. package/src/config/config-loader.ts +203 -0
  14. package/src/config/config-writer.ts +52 -0
  15. package/src/config/defaults.ts +61 -0
  16. package/src/config/index.ts +8 -0
  17. package/src/config/options.ts +292 -0
  18. package/src/config.ts +3 -456
  19. package/src/formatters/typescript-formatter.ts +24 -0
  20. package/src/generation-handler.ts +122 -67
  21. package/src/index.ts +4 -4
  22. package/src/module-loader/dependency-resolver.ts +100 -0
  23. package/src/module-loader/file-finder.ts +58 -0
  24. package/src/module-loader/index.ts +8 -0
  25. package/src/module-loader/module-grouper.ts +77 -0
  26. package/src/module-loader/prompt-handler.ts +111 -0
  27. package/src/module-loader.ts +280 -580
  28. package/src/start.ts +17 -14
  29. package/src/types/command-args.ts +110 -0
  30. package/src/types/command-definition.ts +15 -0
  31. package/src/types/commands.ts +35 -0
  32. package/src/types/index.ts +15 -0
  33. package/src/types/report-types.ts +34 -0
  34. package/lib/commands/copy.d.ts +0 -12
  35. package/lib/commands/copy.js +0 -78
  36. package/lib/commands/copy.js.map +0 -1
  37. package/lib/commands/doc.d.ts +0 -12
  38. package/lib/commands/doc.js +0 -38
  39. package/lib/commands/doc.js.map +0 -1
  40. package/lib/commands/generate.d.ts +0 -12
  41. package/lib/commands/generate.js +0 -70
  42. package/lib/commands/generate.js.map +0 -1
  43. package/lib/commands/index.d.ts +0 -4
  44. package/lib/commands/index.js +0 -5
  45. package/lib/commands/index.js.map +0 -1
  46. package/lib/commands/list.d.ts +0 -12
  47. package/lib/commands/list.js +0 -79
  48. package/lib/commands/list.js.map +0 -1
  49. package/lib/config.d.ts +0 -108
  50. package/lib/config.js +0 -409
  51. package/lib/config.js.map +0 -1
  52. package/lib/generation-handler.d.ts +0 -10
  53. package/lib/generation-handler.js +0 -48
  54. package/lib/generation-handler.js.map +0 -1
  55. package/lib/index.d.ts +0 -4
  56. package/lib/index.js +0 -5
  57. package/lib/index.js.map +0 -1
  58. package/lib/module-loader.d.ts +0 -154
  59. package/lib/module-loader.js +0 -465
  60. package/lib/module-loader.js.map +0 -1
  61. package/lib/start.d.ts +0 -2
  62. package/lib/start.js +0 -16
  63. package/lib/start.js.map +0 -1
package/src/start.ts CHANGED
@@ -1,17 +1,20 @@
1
- #!/usr/bin/env node
2
- import yargs from 'yargs'
3
- import { hideBin } from 'yargs/helpers'
1
+ import { APP_NAME, APP_USAGE, APP_VERSION } from "@ts-for-gir/lib";
2
+ import yargs, { type CommandModule } from "yargs";
3
+ import { hideBin } from "yargs/helpers";
4
4
 
5
- import { generate, list, doc, copy } from './commands/index.js'
6
- import { Config } from './config.js'
5
+ import { analyze, copy, doc, generate, json, list } from "./commands/index.ts";
7
6
 
8
7
  void yargs(hideBin(process.argv))
9
- .scriptName(Config.appName)
10
- .strict()
11
- .usage(Config.usage)
12
- .command(generate.command, generate.description, generate.builder, generate.handler)
13
- .command(list.command, list.description, list.builder, list.handler)
14
- .command(copy.command, copy.description, copy.builder, copy.handler)
15
- .command(doc.command, doc.description, doc.builder, doc.handler)
16
- .demandCommand(1)
17
- .help().argv
8
+ .scriptName(APP_NAME)
9
+ .strict()
10
+ .usage(APP_USAGE)
11
+ .version(APP_VERSION)
12
+ // TODO: Fix this
13
+ .command(analyze as unknown as CommandModule)
14
+ .command(generate as unknown as CommandModule)
15
+ .command(json as unknown as CommandModule)
16
+ .command(list as unknown as CommandModule)
17
+ .command(copy as unknown as CommandModule)
18
+ .command(doc as unknown as CommandModule)
19
+ .demandCommand(1)
20
+ .help().argv;
@@ -0,0 +1,110 @@
1
+ /**
2
+ * Base interface for all command arguments extending ConfigFlags
3
+ */
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
17
+ }
18
+
19
+ /**
20
+ * Arguments for the generate command
21
+ */
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
51
+ }
52
+
53
+ /**
54
+ * Arguments for the list command
55
+ */
56
+ export interface ListCommandArgs extends BaseCommandArgs {
57
+ // List command only uses base arguments
58
+ }
59
+
60
+ /**
61
+ * Arguments for the copy command
62
+ */
63
+ export interface CopyCommandArgs extends BaseCommandArgs {
64
+ /** Directory to output to */
65
+ outdir: string | null
66
+ }
67
+
68
+ /**
69
+ * Arguments for the doc command
70
+ */
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
76
+ }
77
+
78
+ /**
79
+ * Arguments for the analyze command
80
+ */
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
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Base interface for command definition structure
3
+ */
4
+ 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
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Type definitions for command structure and exports
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'
11
+
12
+ /**
13
+ * Generate command definition type
14
+ */
15
+ export type GenerateCommand = CommandDefinition<GenerateCommandArgs>
16
+
17
+ /**
18
+ * List command definition type
19
+ */
20
+ export type ListCommand = CommandDefinition<ListCommandArgs>
21
+
22
+ /**
23
+ * Copy command definition type
24
+ */
25
+ export type CopyCommand = CommandDefinition<CopyCommandArgs>
26
+
27
+ /**
28
+ * Doc command definition type
29
+ */
30
+ export type DocCommand = CommandDefinition<DocCommandArgs>
31
+
32
+ /**
33
+ * Union type for all command types
34
+ */
35
+ export type AnyCommand = GenerateCommand | ListCommand | CopyCommand | DocCommand
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Export all types from the CLI types module
3
+ */
4
+
5
+ // Command argument interfaces
6
+ export * from './command-args.ts'
7
+
8
+ // Command definition interfaces
9
+ export * from './command-definition.ts'
10
+
11
+ // Command type definitions
12
+ export * from './commands.ts'
13
+
14
+ // Report analysis types
15
+ export * from './report-types.ts'
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Type definitions for report analysis functionality
3
+ */
4
+
5
+ import type { ProblemEntry } from "@ts-for-gir/reporter";
6
+
7
+ export interface TypeStatistics {
8
+ commonUnresolvedTypes: Array<{ type: string; count: number; namespaces: string[] }>;
9
+ commonTypeConflicts: Array<{ conflictType: string; count: number; examples: string[] }>;
10
+ problematicNamespaces: Array<{ namespace: string; problems: number; types: string[] }>;
11
+ }
12
+
13
+ export interface ReportStatistics {
14
+ bySeverity: Record<string, number>;
15
+ byCategory: Record<string, number>;
16
+ byModule: Record<string, number>;
17
+ totalProblems: number;
18
+ mostProblematicModules: Array<{ module: string; count: number }>;
19
+ typeStatistics: TypeStatistics;
20
+ startTime: string | Date;
21
+ endTime?: string | Date;
22
+ durationMs?: number;
23
+ }
24
+
25
+ export interface ReportMetadata {
26
+ version: string;
27
+ generatedAt: string | Date;
28
+ }
29
+
30
+ export interface ReportData {
31
+ metadata: ReportMetadata;
32
+ statistics: ReportStatistics;
33
+ problems: ProblemEntry[];
34
+ }
@@ -1,12 +0,0 @@
1
- /**
2
- * Everything you need for the `ts-for-gir copy` command is located here
3
- */
4
- import { Argv } from 'yargs';
5
- import type { ConfigFlags } from '@ts-for-gir/lib';
6
- export declare const copy: {
7
- command: string;
8
- description: string;
9
- builder: ((args: Argv<any>) => Argv<ConfigFlags>) | ((args: Argv<any>) => void);
10
- handler: (args: ConfigFlags) => Promise<void>;
11
- examples: readonly [string, (string | undefined)?][];
12
- };
@@ -1,78 +0,0 @@
1
- /**
2
- * Everything you need for the `ts-for-gir copy` command is located here
3
- */
4
- import { copyFile, mkdir } from 'fs/promises';
5
- import { basename, join } from 'path';
6
- import { ModuleLoader } from '../module-loader.js';
7
- import { Config } from '../config.js';
8
- import { Logger, ERROR_NO_MODULES_FOUND } from '@ts-for-gir/lib';
9
- const command = 'copy [modules..]';
10
- const description = 'Scan for *.gir files and copy them to a new directory';
11
- const builder = (yargs) => {
12
- const optionNames = Object.keys(Config.copyOptions);
13
- for (const optionName of optionNames) {
14
- yargs = yargs.option(optionName, Config.copyOptions[optionName]);
15
- }
16
- return yargs.example(examples);
17
- };
18
- const copyGirFile = async (config, depModule) => {
19
- if (!depModule.path) {
20
- Logger.danger(`- ${depModule.packageName} not found`);
21
- return;
22
- }
23
- if (!config.outdir) {
24
- Logger.error(`outdir not found`);
25
- return;
26
- }
27
- const filename = basename(depModule.path);
28
- const dest = join(config.outdir, filename);
29
- if (depModule.path === dest) {
30
- Logger.yellow(`Skip ${depModule.path}`);
31
- return;
32
- }
33
- Logger.success(`Copy ${depModule.path}`);
34
- await copyFile(depModule.path, dest);
35
- };
36
- const handler = async (args) => {
37
- const config = await Config.load(args);
38
- const generateConfig = Config.getOptionsGeneration(config);
39
- const moduleLoader = new ModuleLoader(generateConfig);
40
- const { grouped, failed } = await moduleLoader.getModules(config.modules, config.ignore);
41
- const moduleGroups = Object.values(grouped);
42
- if (Object.keys(grouped).length === 0) {
43
- return Logger.error(ERROR_NO_MODULES_FOUND(config.girDirectories));
44
- }
45
- if (!config.outdir) {
46
- Logger.error(`outdir not found`);
47
- return;
48
- }
49
- await mkdir(config.outdir, { recursive: true }).catch((err) => {
50
- Logger.error(`Failed to copy gir files to ${config.outdir}: ${err}`);
51
- });
52
- for (const module of moduleGroups) {
53
- for (const mod of module.modules) {
54
- await copyGirFile(config, mod);
55
- }
56
- }
57
- if (failed.length > 0) {
58
- Logger.danger('\nDependencies not found:');
59
- for (const fail of failed) {
60
- Logger.white(`- ${fail}`);
61
- }
62
- }
63
- };
64
- const examples = [
65
- [`${Config.appName} copy -o ./gir`, `Copy found *.gir files to ./gir`],
66
- [
67
- `${Config.appName} copy -g /usr/share/gir-1.0 --ignore=Gtk-3.0 xrandr-1.3 -o ./gir`,
68
- 'Copy all found *.gir files in /usr/share/gir-1.0 excluding Gtk-3.0 and xrandr-1.3 to ./gir',
69
- ],
70
- ];
71
- export const copy = {
72
- command,
73
- description,
74
- builder,
75
- handler,
76
- examples,
77
- };
78
- //# sourceMappingURL=copy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copy.js","sourceRoot":"","sources":["../../src/commands/copy.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAIhE,MAAM,OAAO,GAAG,kBAAkB,CAAA;AAElC,MAAM,WAAW,GAAG,uDAAuD,CAAA;AAG3E,MAAM,OAAO,GAAsC,CAAC,KAAgB,EAAE,EAAE;IACpE,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI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B,CAAC;IACL,CAAC;AACL,CAAC,CAAA;AAED,MAAM,QAAQ,GAAqC;IAC/C,CAAC,GAAG,MAAM,CAAC,OAAO,gBAAgB,EAAE,iCAAiC,CAAC;IACtE;QACI,GAAG,MAAM,CAAC,OAAO,kEAAkE;QACnF,4FAA4F;KAC/F;CACJ,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG;IAChB,OAAO;IACP,WAAW;IACX,OAAO;IACP,OAAO;IACP,QAAQ;CACX,CAAA"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Everything you need for the `ts-for-gir generate` command is located here
3
- */
4
- import { Argv } from 'yargs';
5
- import type { ConfigFlags } from '@ts-for-gir/lib';
6
- export declare const doc: {
7
- command: string;
8
- description: string;
9
- builder: ((args: Argv<any>) => Argv<ConfigFlags>) | ((args: Argv<any>) => void);
10
- handler: (args: ConfigFlags) => Promise<void>;
11
- examples: readonly [string, (string | undefined)?][];
12
- };
@@ -1,38 +0,0 @@
1
- /**
2
- * Everything you need for the `ts-for-gir generate` command is located here
3
- */
4
- import { Logger, ERROR_NO_MODULES_FOUND } from '@ts-for-gir/lib';
5
- import { GeneratorType } from '@ts-for-gir/generator-base';
6
- import { GenerationHandler } from '../generation-handler.js';
7
- import { Config } from '../config.js';
8
- import { ModuleLoader } from '../module-loader.js';
9
- const command = 'doc [modules..]';
10
- const description = 'The HTML documentation generator is not yet implemented, but feel free to implement it 🤗';
11
- const builder = (yargs) => {
12
- const optionNames = Object.keys(Config.docOptions);
13
- for (const optionName of optionNames) {
14
- yargs = yargs.option(optionName, Config.docOptions[optionName]);
15
- }
16
- return yargs.example(examples);
17
- };
18
- const handler = async (args) => {
19
- const config = await Config.load(args);
20
- const generateConfig = Config.getOptionsGeneration(config);
21
- const moduleLoader = new ModuleLoader(generateConfig);
22
- const { keep } = await moduleLoader.getModulesResolved(config.modules, config.ignore || [], config.ignoreVersionConflicts);
23
- if (keep.length === 0) {
24
- return Logger.error(ERROR_NO_MODULES_FOUND(config.girDirectories));
25
- }
26
- const tsForGir = new GenerationHandler(generateConfig, GeneratorType.HTML_DOC);
27
- const registry = moduleLoader.dependencyManager;
28
- await tsForGir.start(Array.from(keep).map((girModuleResolvedBy) => girModuleResolvedBy.module), registry);
29
- };
30
- const examples = [];
31
- export const doc = {
32
- command,
33
- description,
34
- builder,
35
- handler,
36
- examples,
37
- };
38
- //# sourceMappingURL=doc.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"doc.js","sourceRoot":"","sources":["../../src/commands/doc.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAIlD,MAAM,OAAO,GAAG,iBAAiB,CAAA;AAEjC,MAAM,WAAW,GAAG,2FAA2F,CAAA;AAG/G,MAAM,OAAO,GAAsC,CAAC,KAAgB,EAAE,EAAE;IACpE,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;IAClD,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACnC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAA;IACnE,CAAC;IACD,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAsB,CAAA;AACvD,CAAC,CAAA;AAGD,MAAM,OAAO,GAAG,KAAK,EAAE,IAAiB,EAAE,EAAE;IACxC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAEtC,MAAM,cAAc,GAAG,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAA;IAC1D,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,cAAc,CAAC,CAAA;IACrD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,YAAY,CAAC,kBAAkB,CAClD,MAAM,CAAC,OAAO,EACd,MAAM,CAAC,MAAM,IAAI,EAAE,EACnB,MAAM,CAAC,sBAAsB,CAChC,CAAA;IACD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACpB,OAAO,MAAM,CAAC,KAAK,CAAC,sBAAsB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAA;IACtE,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,iBAAiB,CAAC,cAAc,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAA;IAC9E,MAAM,QAAQ,GAAG,YAAY,CAAC,iBAAiB,CAAA;IAE/C,MAAM,QAAQ,CAAC,KAAK,CAChB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,mBAAmB,EAAE,EAAE,CAAC,mBAAmB,CAAC,MAAM,CAAC,EACzE,QAAQ,CACX,CAAA;AACL,CAAC,CAAA;AAED,MAAM,QAAQ,GAAqC,EAAE,CAAA;AAErD,MAAM,CAAC,MAAM,GAAG,GAAG;IACf,OAAO;IACP,WAAW;IACX,OAAO;IACP,OAAO;IACP,QAAQ;CACX,CAAA"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Everything you need for the `ts-for-gir generate` command is located here
3
- */
4
- import { Argv } from 'yargs';
5
- import type { ConfigFlags } from '@ts-for-gir/lib';
6
- export declare const generate: {
7
- command: string;
8
- description: string;
9
- builder: ((args: Argv<any>) => Argv<ConfigFlags>) | ((args: Argv<any>) => void);
10
- handler: (args: ConfigFlags) => Promise<void>;
11
- examples: readonly [string, (string | undefined)?][];
12
- };
@@ -1,70 +0,0 @@
1
- /**
2
- * Everything you need for the `ts-for-gir generate` command is located here
3
- */
4
- import { ERROR_NO_MODULES_FOUND, Logger } from '@ts-for-gir/lib';
5
- import { GeneratorType } from '@ts-for-gir/generator-base';
6
- import { GenerationHandler } from '../generation-handler.js';
7
- import { Config } from '../config.js';
8
- import { ModuleLoader } from '../module-loader.js';
9
- import prettier from 'prettier';
10
- import { Formatter } from '@ts-for-gir/lib';
11
- const command = 'generate [modules..]';
12
- const description = 'Generates Typescript type definition .d.ts files from GIR for GJS';
13
- const builder = (yargs) => {
14
- const optionNames = Object.keys(Config.generateOptions);
15
- for (const optionName of optionNames) {
16
- yargs = yargs.option(optionName, Config.generateOptions[optionName]);
17
- }
18
- return yargs.example(examples);
19
- };
20
- const handler = async (args) => {
21
- const config = await Config.load(args);
22
- const generateConfig = Config.getOptionsGeneration(config);
23
- const moduleLoader = new ModuleLoader(generateConfig);
24
- const { keep } = await moduleLoader.getModulesResolved(config.modules, config.ignore || [], config.ignoreVersionConflicts);
25
- if (keep.length === 0) {
26
- return Logger.error(ERROR_NO_MODULES_FOUND(config.girDirectories));
27
- }
28
- moduleLoader.parse(keep);
29
- const tsForGir = new GenerationHandler(generateConfig, GeneratorType.TYPES);
30
- const girModules = Array.from(keep).map((girModuleResolvedBy) => girModuleResolvedBy.module);
31
- moduleLoader.dependencyManager.registerFormatter('dts', new TypeScriptFormatter());
32
- await tsForGir.start(girModules, moduleLoader.dependencyManager);
33
- };
34
- const examples = [
35
- [
36
- `${Config.appName} generate`,
37
- `Run '${Config.appName} generate' in your gjs project to generate typings for your project, pass the gir modules you need for your project`,
38
- ],
39
- [`${Config.appName} generate Gtk*`, 'You can also use wild cards'],
40
- [`${Config.appName} generate '*'`, 'If you want to parse all of your locally installed gir modules run'],
41
- [`${Config.appName} generate --configName='.ts-for-gir.gtk4.rc.js`, 'Use a special config file'],
42
- [
43
- `${Config.appName} generate --ignore=Gtk-4.0 xrandr-1.3`,
44
- 'Generate .d.ts. files but not for Gtk-4.0 and xrandr-1.3',
45
- ],
46
- ];
47
- class TypeScriptFormatter extends Formatter {
48
- format(input) {
49
- try {
50
- return prettier.format(input, {
51
- singleQuote: true,
52
- parser: 'typescript',
53
- printWidth: 120,
54
- tabWidth: 4,
55
- });
56
- }
57
- catch (error) {
58
- Logger.warn('[TypeScriptFormatter] Failed to format with prettier, returning original input', error);
59
- return Promise.resolve(input);
60
- }
61
- }
62
- }
63
- export const generate = {
64
- command,
65
- description,
66
- builder,
67
- handler,
68
- examples,
69
- };
70
- //# sourceMappingURL=generate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,QAAQ,MAAM,UAAU,CAAA;AAG/B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,MAAM,OAAO,GAAG,sBAAsB,CAAA;AAEtC,MAAM,WAAW,GAAG,mEAAmE,CAAA;AAGvF,MAAM,OAAO,GAAsC,CAAC,KAAgB,EAAE,EAAE;IACpE,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAA;IACvD,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACnC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAA;IACxE,CAAC;IACD,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAsB,CAAA;AACvD,CAAC,CAAA;AAGD,MAAM,OAAO,GAAG,KAAK,EAAE,IAAiB,EAAE,EA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IACxG,CAAC,GAAG,MAAM,CAAC,OAAO,gDAAgD,EAAE,2BAA2B,CAAC;IAChG;QACI,GAAG,MAAM,CAAC,OAAO,uCAAuC;QACxD,0DAA0D;KAC7D;CACJ,CAAA;AAED,MAAM,mBAAoB,SAAQ,SAAS;IACvC,MAAM,CAAC,KAAa;QAChB,IAAI,CAAC;YACD,OAAO,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE;gBAC1B,WAAW,EAAE,IAAI;gBACjB,MAAM,EAAE,YAAY;gBACpB,UAAU,EAAE,GAAG;gBACf,QAAQ,EAAE,CAAC;aACd,CAAC,CAAA;QACN,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,MAAM,CAAC,IAAI,CAAC,gFAAgF,EAAE,KAAK,CAAC,CAAA;YACpG,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QACjC,CAAC;IACL,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG;IACpB,OAAO;IACP,WAAW;IACX,OAAO;IACP,OAAO;IACP,QAAQ;CACX,CAAA"}
@@ -1,4 +0,0 @@
1
- export * from './copy.js';
2
- export * from './doc.js';
3
- export * from './generate.js';
4
- export * from './list.js';
@@ -1,5 +0,0 @@
1
- export * from './copy.js';
2
- export * from './doc.js';
3
- export * from './generate.js';
4
- export * from './list.js';
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Everything you need for the `ts-for-gir list` command is located here
3
- */
4
- import { Argv } from 'yargs';
5
- import type { ConfigFlags } from '@ts-for-gir/lib';
6
- export declare const list: {
7
- command: string;
8
- description: string;
9
- builder: ((args: Argv<any>) => Argv<ConfigFlags>) | ((args: Argv<any>) => void);
10
- handler: (args: ConfigFlags) => Promise<void>;
11
- examples: readonly [string, (string | undefined)?][];
12
- };
@@ -1,79 +0,0 @@
1
- /**
2
- * Everything you need for the `ts-for-gir list` command is located here
3
- */
4
- import { ModuleLoader } from '../module-loader.js';
5
- import { Config } from '../config.js';
6
- import { Logger, ERROR_NO_MODULES_FOUND, ResolveType } from '@ts-for-gir/lib';
7
- const command = 'list [modules..]';
8
- const description = 'Lists all available GIR modules';
9
- const builder = (yargs) => {
10
- const optionNames = Object.keys(Config.listOptions);
11
- for (const optionName of optionNames) {
12
- yargs = yargs.option(optionName, Config.listOptions[optionName]);
13
- }
14
- return yargs.example(examples);
15
- };
16
- const handler = async (args) => {
17
- const config = await Config.load(args);
18
- const generateConfig = Config.getOptionsGeneration(config);
19
- const moduleLoader = new ModuleLoader(generateConfig);
20
- const { grouped, failed } = await moduleLoader.getModules(config.modules, config.ignore);
21
- const moduleGroups = Object.values(grouped);
22
- if (Object.keys(grouped).length === 0) {
23
- return Logger.error(ERROR_NO_MODULES_FOUND(config.girDirectories));
24
- }
25
- const conflictModules = moduleGroups.filter((moduleGroup) => moduleGroup.hasConflict);
26
- const byHandModules = moduleGroups.filter((moduleGroup) => moduleGroup.modules[0].resolvedBy === ResolveType.BY_HAND);
27
- const depModules = moduleGroups.filter((moduleGroup) => moduleGroup.modules[0].resolvedBy === ResolveType.DEPENDENCE);
28
- Logger.info('\nSearch for gir files in:');
29
- for (const dir of config.girDirectories) {
30
- Logger.white(`- ${dir}`);
31
- }
32
- Logger.info('\nSelected Modules:');
33
- for (const moduleGroup of byHandModules) {
34
- for (const depModule of moduleGroup.modules) {
35
- Logger.white(`- ${depModule.packageName}`);
36
- Logger.gray(` - ${depModule.path}`);
37
- }
38
- }
39
- if (depModules.length > 0) {
40
- Logger.yellow('\nDependencies:');
41
- for (const moduleGroup of depModules) {
42
- for (const depModule of moduleGroup.modules) {
43
- Logger.white(`- ${depModule.packageName}`);
44
- Logger.gray(`- ${depModule.path}`);
45
- }
46
- }
47
- }
48
- if (conflictModules.length > 0) {
49
- Logger.danger('\nConflicts:');
50
- for (const moduleGroup of conflictModules) {
51
- Logger.white(`- ${moduleGroup.namespace}`);
52
- for (const conflictModule of moduleGroup.modules) {
53
- Logger.white(` - ${conflictModule.packageName}`);
54
- Logger.gray(` - ${conflictModule.path}`);
55
- }
56
- }
57
- }
58
- if (failed.length > 0) {
59
- Logger.danger('\nDependencies not found:');
60
- for (const fail of failed) {
61
- Logger.white(`- ${fail}`);
62
- }
63
- }
64
- };
65
- const examples = [
66
- [`${Config.appName} list -g ./vala-girs/gir-1.0`, `Lists all available GIR modules in ./vala-girs/gir-1.0`],
67
- [
68
- `${Config.appName} list --ignore=Gtk-3.0 xrandr-1.3`,
69
- 'Lists all available GIR modules in /usr/share/gir-1.0 but not Gtk-3.0 and xrandr-1.3',
70
- ],
71
- ];
72
- export const list = {
73
- command,
74
- description,
75
- builder,
76
- handler,
77
- examples,
78
- };
79
- //# sourceMappingURL=list.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAI7E,MAAM,OAAO,GAAG,kBAAkB,CAAA;AAElC,MAAM,WAAW,GAAG,iCAAiC,CAAA;AAGrD,MAAM,OAAO,GAAsC,CAAC,KAAgB,EAAE,EAAE;IACpE,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAA;IACnD,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACnC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,WAAW,C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