@ts-for-gir/lib 3.0.1 → 3.0.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.
Files changed (104) hide show
  1. package/lib/constants.d.ts +9 -1
  2. package/lib/constants.js +4 -1
  3. package/lib/constants.js.map +1 -1
  4. package/lib/dependency-manager.d.ts +11 -0
  5. package/lib/dependency-manager.js +28 -14
  6. package/lib/dependency-manager.js.map +1 -1
  7. package/lib/gir-module.js +2 -3
  8. package/lib/gir-module.js.map +1 -1
  9. package/lib/index.d.ts +0 -3
  10. package/lib/index.js +0 -3
  11. package/lib/index.js.map +1 -1
  12. package/lib/symtable.js +1 -2
  13. package/lib/symtable.js.map +1 -1
  14. package/lib/types/generate-config.d.ts +2 -0
  15. package/lib/types/user-config.d.ts +2 -0
  16. package/lib/utils.d.ts +6 -0
  17. package/lib/utils.js +10 -0
  18. package/lib/utils.js.map +1 -1
  19. package/package.json +9 -11
  20. package/lib/injection/classes/GLib-2-0.d.ts +0 -2
  21. package/lib/injection/classes/GLib-2-0.js +0 -35
  22. package/lib/injection/classes/GLib-2-0.js.map +0 -1
  23. package/lib/injection/classes/gjs/GLib-2.0.d.ts +0 -2
  24. package/lib/injection/classes/gjs/GLib-2.0.js +0 -205
  25. package/lib/injection/classes/gjs/GLib-2.0.js.map +0 -1
  26. package/lib/injection/classes/gjs/GObject-2.0.d.ts +0 -2
  27. package/lib/injection/classes/gjs/GObject-2.0.js +0 -634
  28. package/lib/injection/classes/gjs/GObject-2.0.js.map +0 -1
  29. package/lib/injection/classes/gjs/Gio-2.0.d.ts +0 -5
  30. package/lib/injection/classes/gjs/Gio-2.0.js +0 -218
  31. package/lib/injection/classes/gjs/Gio-2.0.js.map +0 -1
  32. package/lib/injection/classes/node-gtk/GLib-2.0.d.ts +0 -2
  33. package/lib/injection/classes/node-gtk/GLib-2.0.js +0 -19
  34. package/lib/injection/classes/node-gtk/GLib-2.0.js.map +0 -1
  35. package/lib/injection/classes/node-gtk/GObject-2.0.d.ts +0 -2
  36. package/lib/injection/classes/node-gtk/GObject-2.0.js +0 -66
  37. package/lib/injection/classes/node-gtk/GObject-2.0.js.map +0 -1
  38. package/lib/injection/classes/node-gtk/Gdk-4.0.d.ts +0 -2
  39. package/lib/injection/classes/node-gtk/Gdk-4.0.js +0 -32
  40. package/lib/injection/classes/node-gtk/Gdk-4.0.js.map +0 -1
  41. package/lib/injection/classes/node-gtk/Gio-2.0.d.ts +0 -2
  42. package/lib/injection/classes/node-gtk/Gio-2.0.js +0 -14
  43. package/lib/injection/classes/node-gtk/Gio-2.0.js.map +0 -1
  44. package/lib/injection/classes/node-gtk/Graphene-1.0.d.ts +0 -2
  45. package/lib/injection/classes/node-gtk/Graphene-1.0.js +0 -133
  46. package/lib/injection/classes/node-gtk/Graphene-1.0.js.map +0 -1
  47. package/lib/injection/classes/node-gtk/Gtk-3.0.d.ts +0 -2
  48. package/lib/injection/classes/node-gtk/Gtk-3.0.js +0 -31
  49. package/lib/injection/classes/node-gtk/Gtk-3.0.js.map +0 -1
  50. package/lib/injection/classes/node-gtk/Gtk-4.0.d.ts +0 -2
  51. package/lib/injection/classes/node-gtk/Gtk-4.0.js +0 -52
  52. package/lib/injection/classes/node-gtk/Gtk-4.0.js.map +0 -1
  53. package/lib/injection/classes/node-gtk/Pango-1.0.d.ts +0 -2
  54. package/lib/injection/classes/node-gtk/Pango-1.0.js +0 -31
  55. package/lib/injection/classes/node-gtk/Pango-1.0.js.map +0 -1
  56. package/lib/package-data-parser.d.ts +0 -13
  57. package/lib/package-data-parser.js +0 -67
  58. package/lib/package-data-parser.js.map +0 -1
  59. package/lib/package-data.d.ts +0 -9
  60. package/lib/package-data.js +0 -41
  61. package/lib/package-data.js.map +0 -1
  62. package/lib/template-processor.d.ts +0 -114
  63. package/lib/template-processor.js +0 -252
  64. package/lib/template-processor.js.map +0 -1
  65. package/lib/types/package-section.d.ts +0 -8
  66. package/lib/types/package-section.js +0 -2
  67. package/lib/types/package-section.js.map +0 -1
  68. package/packages.xml +0 -1213
  69. package/templates/README.md +0 -102
  70. package/templates/cogl-2-0.d.ts +0 -0
  71. package/templates/gjs/README-GJS.md +0 -109
  72. package/templates/gjs/ambient.d.ts +0 -59
  73. package/templates/gjs/cairo-1.0.d.ts +0 -9
  74. package/templates/gjs/cairo.d.ts +0 -8
  75. package/templates/gjs/cairo.js +0 -11
  76. package/templates/gjs/gettext.d.ts +0 -41
  77. package/templates/gjs/gettext.js +0 -11
  78. package/templates/gjs/gio-2.0.d.ts +0 -101
  79. package/templates/gjs/gjs.d.ts +0 -757
  80. package/templates/gjs/gjs.js +0 -10
  81. package/templates/gjs/gobject-2.0.d.ts +0 -238
  82. package/templates/gjs/module-ambient.d.ts +0 -31
  83. package/templates/gjs/module-import.d.ts +0 -33
  84. package/templates/gjs/module.append.d.ts +0 -1
  85. package/templates/gjs/module.d.ts +0 -12
  86. package/templates/gjs/module.js +0 -17
  87. package/templates/gjs/system.d.ts +0 -32
  88. package/templates/gjs/system.js +0 -11
  89. package/templates/gjs/tsconfig.alias.json +0 -12
  90. package/templates/granite-1.0.d.ts +0 -7
  91. package/templates/granite-7.0.d.ts +0 -7
  92. package/templates/gstbase-0.10.d.ts +0 -5
  93. package/templates/node-gtk/README-NODE-GTK.md +0 -71
  94. package/templates/node-gtk/ambient.d.ts +0 -19
  95. package/templates/node-gtk/gobject-2.0.d.ts +0 -57
  96. package/templates/node-gtk/module-import.d.ts +0 -29
  97. package/templates/node-gtk/module.append.d.ts +0 -1
  98. package/templates/node-gtk/module.d.ts +0 -10
  99. package/templates/node-gtk/module.js +0 -18
  100. package/templates/node-gtk/node-gtk.d.ts +0 -25
  101. package/templates/node-gtk/node-gtk.js +0 -7
  102. package/templates/package.json +0 -173
  103. package/templates/rygelserver-2.6.d.ts +0 -3
  104. package/templates/tsconfig.doc.json +0 -30
@@ -1,25 +0,0 @@
1
- /* eslint-disable @typescript-eslint/triple-slash-reference */
2
-
3
- /*
4
- * Type Definitions for node-gtk (https://github.com/romgrk/node-gtk)
5
- *
6
- * These type definitions are automatically generated, do not edit them by hand.
7
- * If you found a bug fix it in <%= APP_NAME %> itself or create a bug report on <%= APP_SOURCE %>
8
- */
9
- import './node-ambient.d.ts';
10
-
11
- declare global {
12
- interface NodeGtkGi {
13
- startLoop(): void;
14
- registerClass(object: any): void
15
- require(ns: string, ver?: string): any;
16
- }
17
- }
18
-
19
- declare const gi: NodeGtkGi;
20
-
21
- <% if(moduleType === 'esm'){ %>
22
- export default gi;
23
- <% } else { %>
24
- export = gi;
25
- <% } %>
@@ -1,7 +0,0 @@
1
- <% if(moduleType === 'esm'){ %>
2
- import * as gi from 'node-gtk';
3
- export default gi;
4
- <% } else { %>
5
- const gi = require('node-gtk');
6
- module.exports = gi;
7
- <% } %>
@@ -1,173 +0,0 @@
1
- <%# This template is used if the Option `package` is enabled %>
2
- <%_ let entryPointName = importName _%>
3
- <%_ if (packageName === 'Gjs') { _%>
4
- <%_ entryPointName = 'gjs' _%>
5
- <%_ } _%>
6
- <%_ if (packageName === 'node-gtk') { _%>
7
- <%_ entryPointName = 'node-gtk' _%>
8
- <%_ } _%>
9
- {
10
- "name": "<%- npmScope %>/<%- importName %>",
11
- <%_ if(typeof girModule !== "undefined"){ _%>
12
- "version": "<%- girModule.libraryVersion %>-<%- APP_VERSION %>",
13
- <%_ } else { _%>
14
- "version": "<%- APP_VERSION %>",
15
- <%_ } _%>
16
- "description": "<%- PACKAGE_DESC %>",
17
- <%_ if (moduleType === 'esm') { _%>
18
- "type": "module",
19
- "module": "<%- entryPointName %>.js",
20
- <%_ } else { _%>
21
- "type": "commonjs",
22
- "module": "<%- entryPointName %>.mjs",
23
- <%_ } _%>
24
- "main": "<%- entryPointName %>.js",
25
- "typedoc": {
26
- "entryPoint": "./<%- entryPointName %>.d.ts",
27
- "readmeFile": "./README.md",
28
- "displayName": "<%- packageName %>",
29
- "tsconfig": "./tsconfig.doc.json"
30
- },
31
- "exports": {
32
- <%_ if (packageName === 'Gjs' && generateAlias) { _%>
33
- "./tsconfig.alias.json": "./tsconfig.alias.json",
34
- <%_ } _%>
35
- <%_ if (packageName === 'Gjs') { _%>
36
- "./ambient": "./ambient.d.ts",
37
- "./gettext": {
38
- <%_ if (moduleType === 'esm') { _%>
39
- "import": {
40
- "types": "./gettext.d.ts",
41
- "default": "./gettext.js"
42
- },
43
- "require": {
44
- "types": "./gettext.d.cts",
45
- "default": "./gettext.cjs"
46
- }
47
- <%_ } else { _%>
48
- "import": {
49
- "types": "./gettext.d.mts",
50
- "default": "./gettext.mjs"
51
- },
52
- "require": {
53
- "types": "./gettext.d.ts",
54
- "default": "./gettext.js"
55
- }
56
- <%_ } _%>
57
- },
58
- "./system": {
59
- <%_ if (moduleType === 'esm') { _%>
60
- "import": {
61
- "types": "./system.d.ts",
62
- "default": "./system.js"
63
- },
64
- "require": {
65
- "types": "./system.d.cts",
66
- "default": "./system.cjs"
67
- }
68
- <%_ } else { _%>
69
- "import": {
70
- "types": "./system.d.mts",
71
- "default": "./system.mjs"
72
- },
73
- "require": {
74
- "types": "./system.d.ts",
75
- "default": "./system.js"
76
- }
77
- <%_ } _%>
78
- },
79
- "./cairo": {
80
- <%_ if (moduleType === 'esm') { _%>
81
- "import": {
82
- "types": "./cairo.d.ts",
83
- "default": "./cairo.js"
84
- },
85
- "require": {
86
- "types": "./cairo.d.cts",
87
- "default": "./cairo.cjs"
88
- }
89
- <%_ } else { _%>
90
- "import": {
91
- "types": "./cairo.d.mts",
92
- "default": "./cairo.mjs"
93
- },
94
- "require": {
95
- "types": "./cairo.d.ts",
96
- "default": "./cairo.js"
97
- }
98
- <%_ } _%>
99
- },
100
- <%_ } _%>
101
- <%_ if (entryPointName === 'gjs') { _%>
102
- "./ambient": "./ambient.d.ts",
103
- <%_ } else if (entryPointName === 'node-gtk') { _%>
104
- "./ambient": "./node-ambient.d.ts",
105
- <%_ } else {_%>
106
- "./ambient": "./<%- entryPointName %>-ambient.d.ts",
107
- "./import": "./<%- entryPointName %>-import.d.ts",
108
- <%_ } _%>
109
- ".": {
110
- <%_ if (moduleType === 'esm') { _%>
111
- "import": {
112
- "types": "./<%- entryPointName %>.d.ts",
113
- "default": "./<%- entryPointName %>.js"
114
- },
115
- "require": {
116
- "types": "./<%- entryPointName %>.d.cts",
117
- "default": "./<%- entryPointName %>.cjs"
118
- }
119
- <%_ } else { _%>
120
- "import": {
121
- "types": "./<%- entryPointName %>.d.mts",
122
- "default": "./<%- entryPointName %>.mjs"
123
- },
124
- "require": {
125
- "types": "./<%- entryPointName %>.d.ts",
126
- "default": "./<%- entryPointName %>.js"
127
- }
128
- <%_ } _%>
129
- }
130
- },
131
- "scripts": {
132
- "test": "yarn test:esm && yarn test:cjs",
133
- <%_ if (moduleType === 'esm') { _%>
134
- "test:esm": "tsc --noEmit <%- entryPointName %>.d.ts",
135
- "test:cjs": "tsc --noEmit <%- entryPointName %>.d.cts"
136
- <%_ } else { _%>
137
- "test:esm": "tsc --noEmit <%- entryPointName %>.d.mts",
138
- "test:cjs": "tsc --noEmit <%- entryPointName %>.d.ts"
139
- <%_ } _%>
140
- },
141
- "dependencies": {
142
- <%_ if (packageName !== 'Gjs' && packageName !== 'node-gtk') { _%>
143
- <%_ if (environment === 'node') { _%>
144
- "<%- npmScope %>/node-gtk": "workspace:^"<%_ if(deps.length > 0 ) { _%>,<%_ } _%>
145
- <%_ } else { _%>
146
- "<%- npmScope %>/gjs": "workspace:^"<%_ if(deps.length > 0 ) { _%>,<%_ } _%>
147
- <%_ } _%>
148
- <%_ } _%>
149
- <%_ for (let i = 0; i < deps.length; i++ ) { _%>
150
- <% const dep = deps[i] %>
151
- "<%- dep.importPath %>": "workspace:^"<%_ if(i < deps.length - 1) { _%>,<%_ } _%>
152
- <% } %>
153
- },
154
- <%_ if (environment === 'node') { _%>
155
- "peerDependencies": {
156
- "node-gtk": "*"
157
- },
158
- <%_ } _%>
159
- "devDependencies": {
160
- "typescript": "^5.0.4"
161
- },
162
- "keywords": [<%- PACKAGE_KEYWORDS %>],
163
- "author": "<%- APP_NAME %>",
164
- "license": "MIT",
165
- "repository": {
166
- "type": "git",
167
- "url": "git+https://github.com/gjsify/types.git"
168
- },
169
- "bugs": {
170
- "url": "https://github.com/gjsify/ts-for-gir/issues"
171
- },
172
- "homepage": "https://github.com/gjsify/types/tree/main/<%- importName %>#readme"
173
- }
@@ -1,3 +0,0 @@
1
- // Workaround
2
- /** @ignore */
3
- interface IconInfo extends RygelCore.IconInfo {}
@@ -1,30 +0,0 @@
1
- <%_ let entryPointName = importName _%>
2
- <%_ if (packageName === 'Gjs') { _%>
3
- <%_ entryPointName = 'gjs' _%>
4
- <%_ } _%>
5
- <%_ if (packageName === 'node-gtk') { _%>
6
- <%_ entryPointName = 'node-gtk' _%>
7
- <%_ } _%>
8
- {
9
- "compilerOptions": {
10
- // General settings for code interpretation
11
- "target": "ESNext",
12
- <%_ if (moduleType === 'esm') { _%>
13
- "module": "ESNext",
14
- <%_ } else { _%>
15
- "module": "CommonJS",
16
- <%_ } _%>
17
- "experimentalDecorators": true,
18
- "moduleResolution": "node",
19
- "noEmit": true,
20
- "noEmitOnError": false,
21
- "baseUrl": "./",
22
- "rootDir": ".",
23
- // General settings for code generation
24
- "removeComments": false,
25
- "inlineSourceMap": false,
26
- "inlineSources": false,
27
- "newLine": "LF"
28
- },
29
- "include": ["./<%- entryPointName %>.d.ts"]
30
- }