@ts-for-gir/lib 4.0.0-beta.2 → 4.0.0-beta.21

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 (319) hide show
  1. package/lib/constants.d.ts +6 -7
  2. package/lib/constants.js +74 -9
  3. package/lib/constants.js.map +1 -1
  4. package/lib/dependency-manager.d.ts +60 -14
  5. package/lib/dependency-manager.js +148 -46
  6. package/lib/dependency-manager.js.map +1 -1
  7. package/lib/generators/dts-inline.d.ts +4 -2
  8. package/lib/generators/dts-inline.js +10 -12
  9. package/lib/generators/dts-inline.js.map +1 -1
  10. package/lib/generators/dts-modules.d.ts +4 -2
  11. package/lib/generators/dts-modules.js +12 -14
  12. package/lib/generators/dts-modules.js.map +1 -1
  13. package/lib/generators/dts.d.ts +2 -2
  14. package/lib/generators/dts.js +10 -9
  15. package/lib/generators/dts.js.map +1 -1
  16. package/lib/generators/generator.d.ts +3 -3
  17. package/lib/generators/generator.js.map +1 -1
  18. package/lib/generators/json.d.ts +6 -5
  19. package/lib/generators/json.js +18 -21
  20. package/lib/generators/json.js.map +1 -1
  21. package/lib/generics/clutter.d.ts +15 -0
  22. package/lib/generics/clutter.js +3 -0
  23. package/lib/generics/clutter.js.map +1 -1
  24. package/lib/generics/generify.js +11 -3
  25. package/lib/generics/generify.js.map +1 -1
  26. package/lib/generics/gtk.d.ts +7 -0
  27. package/lib/generics/gtk.js +56 -0
  28. package/lib/generics/gtk.js.map +1 -0
  29. package/lib/generics/meta.d.ts +15 -0
  30. package/lib/generics/meta.js +3 -0
  31. package/lib/generics/meta.js.map +1 -1
  32. package/lib/generics/st.d.ts +15 -0
  33. package/lib/generics/st.js +16 -10
  34. package/lib/generics/st.js.map +1 -1
  35. package/lib/generics/visitor.js +5 -9
  36. package/lib/generics/visitor.js.map +1 -1
  37. package/lib/gir/alias.d.ts +2 -2
  38. package/lib/gir/alias.js +3 -3
  39. package/lib/gir/alias.js.map +1 -1
  40. package/lib/gir/base.d.ts +3 -3
  41. package/lib/gir/base.js +2 -14
  42. package/lib/gir/base.js.map +1 -1
  43. package/lib/gir/class.d.ts +6 -7
  44. package/lib/gir/class.js +35 -108
  45. package/lib/gir/class.js.map +1 -1
  46. package/lib/gir/const.d.ts +2 -2
  47. package/lib/gir/const.js +1 -1
  48. package/lib/gir/const.js.map +1 -1
  49. package/lib/gir/enum.d.ts +5 -5
  50. package/lib/gir/enum.js +7 -7
  51. package/lib/gir/enum.js.map +1 -1
  52. package/lib/gir/function.d.ts +11 -10
  53. package/lib/gir/function.js +4 -4
  54. package/lib/gir/function.js.map +1 -1
  55. package/lib/gir/index.d.ts +14 -0
  56. package/lib/gir/index.js +15 -0
  57. package/lib/gir/index.js.map +1 -0
  58. package/lib/gir/nodes.d.ts +1 -1
  59. package/lib/gir/nodes.js +1 -1
  60. package/lib/gir/nodes.js.map +1 -1
  61. package/lib/gir/promisify.d.ts +5 -0
  62. package/lib/gir/promisify.js +158 -0
  63. package/lib/gir/promisify.js.map +1 -0
  64. package/lib/gir/property.d.ts +2 -2
  65. package/lib/gir/property.js.map +1 -1
  66. package/lib/gir/registry.d.ts +6 -6
  67. package/lib/gir/registry.js +6 -3
  68. package/lib/gir/registry.js.map +1 -1
  69. package/lib/gir/signal.d.ts +2 -2
  70. package/lib/gir/signal.js.map +1 -1
  71. package/lib/gir/util.d.ts +3 -3
  72. package/lib/gir/util.js +17 -14
  73. package/lib/gir/util.js.map +1 -1
  74. package/lib/gir-module.d.ts +27 -39
  75. package/lib/gir-module.js +161 -149
  76. package/lib/gir-module.js.map +1 -1
  77. package/lib/gir.d.ts +43 -40
  78. package/lib/gir.js +28 -27
  79. package/lib/gir.js.map +1 -1
  80. package/lib/index.d.ts +1 -2
  81. package/lib/index.js +1 -2
  82. package/lib/index.js.map +1 -1
  83. package/lib/injections/gio.js +133 -1
  84. package/lib/injections/gio.js.map +1 -1
  85. package/lib/injections/glib.js +6 -0
  86. package/lib/injections/glib.js.map +1 -1
  87. package/lib/injections/gobject.js +84 -64
  88. package/lib/injections/gobject.js.map +1 -1
  89. package/lib/injections/gtk4.d.ts +7 -0
  90. package/lib/injections/gtk4.js +19 -0
  91. package/lib/injections/gtk4.js.map +1 -0
  92. package/lib/injections/inject.js +5 -0
  93. package/lib/injections/inject.js.map +1 -1
  94. package/lib/injections/shell.d.ts +20 -0
  95. package/lib/injections/shell.js +34 -0
  96. package/lib/injections/shell.js.map +1 -0
  97. package/lib/library-version.d.ts +2 -0
  98. package/lib/library-version.js +13 -0
  99. package/lib/library-version.js.map +1 -1
  100. package/lib/logger.d.ts +18 -16
  101. package/lib/logger.js +28 -26
  102. package/lib/logger.js.map +1 -1
  103. package/lib/messages.d.ts +0 -3
  104. package/lib/messages.js +0 -3
  105. package/lib/messages.js.map +1 -1
  106. package/lib/registry.d.ts +0 -1
  107. package/lib/registry.js +0 -1
  108. package/lib/registry.js.map +1 -1
  109. package/lib/transformation.d.ts +5 -15
  110. package/lib/transformation.js +9 -89
  111. package/lib/transformation.js.map +1 -1
  112. package/lib/types/dependency.d.ts +13 -1
  113. package/lib/types/format.d.ts +1 -0
  114. package/lib/types/format.js +2 -0
  115. package/lib/types/format.js.map +1 -0
  116. package/lib/types/gir-instance-parameter.d.ts +1 -2
  117. package/lib/types/gir-module-resolved-by.d.ts +5 -0
  118. package/lib/types/index.d.ts +7 -2
  119. package/lib/types/index.js +7 -2
  120. package/lib/types/index.js.map +1 -1
  121. package/lib/types/metadata.d.ts +8 -0
  122. package/lib/types/metadata.js +2 -0
  123. package/lib/types/metadata.js.map +1 -0
  124. package/lib/types/options-base.d.ts +4 -0
  125. package/lib/types/options-base.js +2 -0
  126. package/lib/types/options-base.js.map +1 -0
  127. package/lib/types/{generate-config.d.ts → options-generation.d.ts} +21 -11
  128. package/lib/types/options-generation.js +2 -0
  129. package/lib/types/options-generation.js.map +1 -0
  130. package/lib/types/options-load.d.ts +5 -0
  131. package/lib/types/options-load.js +2 -0
  132. package/lib/types/options-load.js.map +1 -0
  133. package/lib/types/options-transform.d.ts +4 -0
  134. package/lib/types/options-transform.js +2 -0
  135. package/lib/types/options-transform.js.map +1 -0
  136. package/lib/types/output-format.d.ts +1 -0
  137. package/lib/types/output-format.js +2 -0
  138. package/lib/types/output-format.js.map +1 -0
  139. package/lib/types/property-case.d.ts +1 -0
  140. package/lib/types/property-case.js +2 -0
  141. package/lib/types/property-case.js.map +1 -0
  142. package/lib/types/template-data.d.ts +2 -2
  143. package/lib/types/user-config.d.ts +21 -6
  144. package/lib/utils/files.d.ts +21 -0
  145. package/lib/utils/files.js +62 -0
  146. package/lib/utils/files.js.map +1 -0
  147. package/lib/utils/girs.d.ts +45 -0
  148. package/lib/utils/girs.js +101 -0
  149. package/lib/utils/girs.js.map +1 -0
  150. package/lib/utils/index.d.ts +6 -0
  151. package/lib/utils/index.js +7 -0
  152. package/lib/utils/index.js.map +1 -0
  153. package/lib/utils/numbers.d.ts +6 -0
  154. package/lib/utils/numbers.js +9 -0
  155. package/lib/utils/numbers.js.map +1 -0
  156. package/lib/utils/objects.d.ts +136 -0
  157. package/lib/utils/objects.js +121 -0
  158. package/lib/utils/objects.js.map +1 -0
  159. package/lib/utils/path.d.ts +1 -0
  160. package/lib/utils/path.js +7 -0
  161. package/lib/utils/path.js.map +1 -0
  162. package/lib/utils/strings.d.ts +74 -0
  163. package/lib/utils/strings.js +121 -0
  164. package/lib/utils/strings.js.map +1 -0
  165. package/lib/utils.d.ts +21 -15
  166. package/lib/utils.js +58 -13
  167. package/lib/utils.js.map +1 -1
  168. package/lib/validators/enum-parameters.d.ts +16 -0
  169. package/lib/validators/enum-parameters.js +42 -0
  170. package/lib/validators/enum-parameters.js.map +1 -0
  171. package/lib/validators/function-parameters.d.ts +14 -0
  172. package/lib/validators/function-parameters.js +31 -0
  173. package/lib/validators/function-parameters.js.map +1 -0
  174. package/lib/validators/interface.js +1 -1
  175. package/lib/validators/interface.js.map +1 -1
  176. package/package.json +15 -14
  177. package/lib/conflict-resolver.d.ts +0 -119
  178. package/lib/conflict-resolver.js +0 -893
  179. package/lib/conflict-resolver.js.map +0 -1
  180. package/lib/generators/dts/gio.d.ts +0 -2
  181. package/lib/generators/dts/gio.js +0 -9
  182. package/lib/generators/dts/gio.js.map +0 -1
  183. package/lib/gir-factory.d.ts +0 -52
  184. package/lib/gir-factory.js +0 -340
  185. package/lib/gir-factory.js.map +0 -1
  186. package/lib/injection/callbacks/gjs/Gio-2.0.d.ts +0 -2
  187. package/lib/injection/callbacks/gjs/Gio-2.0.js +0 -36
  188. package/lib/injection/callbacks/gjs/Gio-2.0.js.map +0 -1
  189. package/lib/injection/callbacks/gjs/index.d.ts +0 -2
  190. package/lib/injection/callbacks/gjs/index.js +0 -3
  191. package/lib/injection/callbacks/gjs/index.js.map +0 -1
  192. package/lib/injection/callbacks/index.d.ts +0 -3
  193. package/lib/injection/callbacks/index.js +0 -3
  194. package/lib/injection/callbacks/index.js.map +0 -1
  195. package/lib/injection/classes/gjs/gio-2.0.d.ts +0 -5
  196. package/lib/injection/classes/gjs/gio-2.0.js +0 -254
  197. package/lib/injection/classes/gjs/gio-2.0.js.map +0 -1
  198. package/lib/injection/classes/gjs/glib-2.0.d.ts +0 -2
  199. package/lib/injection/classes/gjs/glib-2.0.js +0 -225
  200. package/lib/injection/classes/gjs/glib-2.0.js.map +0 -1
  201. package/lib/injection/classes/gjs/gobject-2.0.d.ts +0 -2
  202. package/lib/injection/classes/gjs/gobject-2.0.js +0 -634
  203. package/lib/injection/classes/gjs/gobject-2.0.js.map +0 -1
  204. package/lib/injection/classes/gjs/index.d.ts +0 -2
  205. package/lib/injection/classes/gjs/index.js +0 -5
  206. package/lib/injection/classes/gjs/index.js.map +0 -1
  207. package/lib/injection/classes/glib-2.0.d.ts +0 -2
  208. package/lib/injection/classes/glib-2.0.js +0 -35
  209. package/lib/injection/classes/glib-2.0.js.map +0 -1
  210. package/lib/injection/classes/index.d.ts +0 -3
  211. package/lib/injection/classes/index.js +0 -4
  212. package/lib/injection/classes/index.js.map +0 -1
  213. package/lib/injection/index.d.ts +0 -3
  214. package/lib/injection/index.js +0 -4
  215. package/lib/injection/index.js.map +0 -1
  216. package/lib/injection/injector.d.ts +0 -16
  217. package/lib/injection/injector.js +0 -138
  218. package/lib/injection/injector.js.map +0 -1
  219. package/lib/symtable.d.ts +0 -24
  220. package/lib/symtable.js +0 -63
  221. package/lib/symtable.js.map +0 -1
  222. package/lib/types/conflict-child-element.d.ts +0 -10
  223. package/lib/types/conflict-child-element.js +0 -2
  224. package/lib/types/conflict-child-element.js.map +0 -1
  225. package/lib/types/conflict-grouped-element.d.ts +0 -6
  226. package/lib/types/conflict-grouped-element.js +0 -2
  227. package/lib/types/conflict-grouped-element.js.map +0 -1
  228. package/lib/types/conflict-grouped-elements.d.ts +0 -4
  229. package/lib/types/conflict-grouped-elements.js +0 -2
  230. package/lib/types/conflict-grouped-elements.js.map +0 -1
  231. package/lib/types/generate-config.js +0 -2
  232. package/lib/types/generate-config.js.map +0 -1
  233. package/lib/types/injection-callback.d.ts +0 -16
  234. package/lib/types/injection-callback.js +0 -2
  235. package/lib/types/injection-callback.js.map +0 -1
  236. package/lib/types/injection-class.d.ts +0 -25
  237. package/lib/types/injection-class.js +0 -2
  238. package/lib/types/injection-class.js.map +0 -1
  239. package/lib/types/injection-function.d.ts +0 -7
  240. package/lib/types/injection-function.js +0 -2
  241. package/lib/types/injection-function.js.map +0 -1
  242. package/lib/types/injection-generic-parameter.d.ts +0 -2
  243. package/lib/types/injection-generic-parameter.js +0 -2
  244. package/lib/types/injection-generic-parameter.js.map +0 -1
  245. package/lib/types/injection-instance-parameter.d.ts +0 -2
  246. package/lib/types/injection-instance-parameter.js +0 -2
  247. package/lib/types/injection-instance-parameter.js.map +0 -1
  248. package/lib/types/injection-parameter.d.ts +0 -8
  249. package/lib/types/injection-parameter.js +0 -2
  250. package/lib/types/injection-parameter.js.map +0 -1
  251. package/lib/types/injection-property.d.ts +0 -4
  252. package/lib/types/injection-property.js +0 -2
  253. package/lib/types/injection-property.js.map +0 -1
  254. package/lib/types/injection-type.d.ts +0 -2
  255. package/lib/types/injection-type.js +0 -2
  256. package/lib/types/injection-type.js.map +0 -1
  257. package/lib/types/injection.d.ts +0 -5
  258. package/lib/types/injection.js +0 -2
  259. package/lib/types/injection.js.map +0 -1
  260. package/lib/types/promisify-func.d.ts +0 -7
  261. package/lib/types/promisify-func.js +0 -2
  262. package/lib/types/promisify-func.js.map +0 -1
  263. package/lib/types/sym-table-items.d.ts +0 -4
  264. package/lib/types/sym-table-items.js +0 -2
  265. package/lib/types/sym-table-items.js.map +0 -1
  266. package/lib/types/ts-alias.d.ts +0 -10
  267. package/lib/types/ts-alias.js +0 -2
  268. package/lib/types/ts-alias.js.map +0 -1
  269. package/lib/types/ts-callback-interface.d.ts +0 -10
  270. package/lib/types/ts-callback-interface.js +0 -2
  271. package/lib/types/ts-callback-interface.js.map +0 -1
  272. package/lib/types/ts-callback.d.ts +0 -17
  273. package/lib/types/ts-callback.js +0 -2
  274. package/lib/types/ts-callback.js.map +0 -1
  275. package/lib/types/ts-class.d.ts +0 -85
  276. package/lib/types/ts-class.js +0 -2
  277. package/lib/types/ts-class.js.map +0 -1
  278. package/lib/types/ts-enum.d.ts +0 -12
  279. package/lib/types/ts-enum.js +0 -2
  280. package/lib/types/ts-enum.js.map +0 -1
  281. package/lib/types/ts-function.d.ts +0 -55
  282. package/lib/types/ts-function.js +0 -2
  283. package/lib/types/ts-function.js.map +0 -1
  284. package/lib/types/ts-generic-parameter.d.ts +0 -8
  285. package/lib/types/ts-generic-parameter.js +0 -2
  286. package/lib/types/ts-generic-parameter.js.map +0 -1
  287. package/lib/types/ts-instance-parameter.d.ts +0 -4
  288. package/lib/types/ts-instance-parameter.js +0 -2
  289. package/lib/types/ts-instance-parameter.js.map +0 -1
  290. package/lib/types/ts-member.d.ts +0 -10
  291. package/lib/types/ts-member.js +0 -2
  292. package/lib/types/ts-member.js.map +0 -1
  293. package/lib/types/ts-method.d.ts +0 -5
  294. package/lib/types/ts-method.js +0 -2
  295. package/lib/types/ts-method.js.map +0 -1
  296. package/lib/types/ts-parameter.d.ts +0 -15
  297. package/lib/types/ts-parameter.js +0 -2
  298. package/lib/types/ts-parameter.js.map +0 -1
  299. package/lib/types/ts-property.d.ts +0 -17
  300. package/lib/types/ts-property.js +0 -2
  301. package/lib/types/ts-property.js.map +0 -1
  302. package/lib/types/ts-signal.d.ts +0 -17
  303. package/lib/types/ts-signal.js +0 -2
  304. package/lib/types/ts-signal.js.map +0 -1
  305. package/lib/types/ts-type-name.d.ts +0 -1
  306. package/lib/types/ts-type-name.js +0 -2
  307. package/lib/types/ts-type-name.js.map +0 -1
  308. package/lib/types/ts-type-separator.d.ts +0 -1
  309. package/lib/types/ts-type-separator.js +0 -2
  310. package/lib/types/ts-type-separator.js.map +0 -1
  311. package/lib/types/ts-type.d.ts +0 -26
  312. package/lib/types/ts-type.js +0 -2
  313. package/lib/types/ts-type.js.map +0 -1
  314. package/lib/types/ts-var.d.ts +0 -17
  315. package/lib/types/ts-var.js +0 -2
  316. package/lib/types/ts-var.js.map +0 -1
  317. package/lib/types.d.ts +0 -23
  318. package/lib/types.js +0 -2
  319. package/lib/types.js.map +0 -1
@@ -1,35 +0,0 @@
1
- export const classesGLib20All = [
2
- {
3
- versions: ['2.0'],
4
- qualifiedName: 'GLib.List',
5
- generics: [
6
- {
7
- name: 'A',
8
- value: 'any',
9
- },
10
- ],
11
- },
12
- {
13
- versions: ['2.0'],
14
- qualifiedName: 'GLib.HashTable',
15
- // TODO
16
- // [key: A]: B;
17
- // properties: [
18
- // {
19
- // name: '[key: A]'
20
- // type: 'B'
21
- // }
22
- // ],
23
- generics: [
24
- {
25
- name: 'A',
26
- value: 'symbol | string | number',
27
- },
28
- {
29
- name: 'B',
30
- value: 'string | number | boolean',
31
- },
32
- ],
33
- },
34
- ];
35
- //# sourceMappingURL=glib-2.0.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"glib-2.0.js","sourceRoot":"","sources":["../../../src/injection/classes/glib-2.0.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAqB;IAC9C;QACI,QAAQ,EAAE,CAAC,KAAK,CAAC;QACjB,aAAa,EAAE,WAAW;QAC1B,QAAQ,EAAE;YACN;gBACI,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,KAAK;aACf;SACJ;KACJ;IACD;QACI,QAAQ,EAAE,CAAC,KAAK,CAAC;QACjB,aAAa,EAAE,gBAAgB;QAC/B,OAAO;QACP,eAAe;QACf,gBAAgB;QAChB,QAAQ;QACR,2BAA2B;QAC3B,oBAAoB;QACpB,QAAQ;QACR,KAAK;QACL,QAAQ,EAAE;YACN;gBACI,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,0BAA0B;aACpC;YACD;gBACI,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,2BAA2B;aACrC;SACJ;KACJ;CACJ,CAAA"}
@@ -1,3 +0,0 @@
1
- import type { InjectionClass } from '../../types/index.js';
2
- export { classesGjs } from './gjs/index.js';
3
- export declare const classesAll: InjectionClass[];
@@ -1,4 +0,0 @@
1
- import { classesGLib20All } from './glib-2.0.js';
2
- export { classesGjs } from './gjs/index.js';
3
- export const classesAll = [...classesGLib20All];
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/injection/classes/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,MAAM,CAAC,MAAM,UAAU,GAAqB,CAAC,GAAG,gBAAgB,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- export * from './classes/index.js';
2
- export * from './callbacks/index.js';
3
- export * from './injector.js';
@@ -1,4 +0,0 @@
1
- export * from './classes/index.js';
2
- export * from './callbacks/index.js';
3
- export * from './injector.js';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/injection/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA"}
@@ -1,16 +0,0 @@
1
- import type { GirClassElement, GirRecordElement, GirUnionElement, GirInterfaceElement, GirCallbackElement, GirCallableParamElement } from '../types/index.js';
2
- import { Logger } from '../logger.js';
3
- import { GirFactory } from '../gir-factory.js';
4
- /**
5
- * Inject additional methods, properties, etc
6
- */
7
- export declare class Injector {
8
- girFactory: GirFactory;
9
- log: Logger;
10
- constructor();
11
- /** Inject additional generics, methods, properties, etc to a existing class */
12
- toClass(girClass: GirClassElement | GirUnionElement | GirInterfaceElement | GirRecordElement): GirUnionElement | GirInterfaceElement | GirRecordElement | undefined;
13
- /** Inject additional generics to existing callback interfaces */
14
- toCallback(girCallback: GirCallbackElement): GirCallbackElement;
15
- toParameterType(girParam: GirCallableParamElement): GirCallableParamElement;
16
- }
@@ -1,138 +0,0 @@
1
- import { Logger } from '../logger.js';
2
- import { classesAll, classesGjs, callbacksGjs, callbacksAll } from './index.js';
3
- import { GirFactory } from '../gir-factory.js';
4
- /**
5
- * Inject additional methods, properties, etc
6
- */
7
- export class Injector {
8
- girFactory = new GirFactory();
9
- log;
10
- constructor() {
11
- this.log = new Logger(true, 'ConflictResolver');
12
- }
13
- /** Inject additional generics, methods, properties, etc to a existing class */
14
- toClass(girClass) {
15
- if (!girClass._tsData) {
16
- return;
17
- }
18
- const classes = [...classesAll, ...classesGjs];
19
- const toClass = classes.find((cls) => {
20
- return (girClass._tsData &&
21
- cls.qualifiedName === girClass._tsData.qualifiedName &&
22
- cls.versions.includes(girClass._tsData.version));
23
- });
24
- if (!toClass) {
25
- return girClass;
26
- }
27
- if (toClass.staticFunctions) {
28
- girClass._tsData.staticFunctions.push(...this.girFactory.newGirFunctions(toClass.staticFunctions, girClass._tsData, { isInjected: true }));
29
- }
30
- if (toClass.properties) {
31
- girClass._tsData.properties.push(...this.girFactory.newGirProperties(toClass.properties, { isInjected: true }));
32
- }
33
- if (toClass.constructors) {
34
- girClass._tsData.constructors.push(...this.girFactory.newGirFunctions(toClass.constructors, girClass._tsData, { isInjected: true }));
35
- }
36
- if (toClass.methods) {
37
- girClass._tsData.methods.push(...this.girFactory.newGirFunctions(toClass.methods, girClass._tsData, { isInjected: true }));
38
- }
39
- if (toClass.virtualMethods) {
40
- girClass._tsData.virtualMethods.push(...this.girFactory.newGirFunctions(toClass.virtualMethods, girClass._tsData, { isInjected: true }));
41
- }
42
- if (toClass.propertySignalMethods) {
43
- for (const propertySignalMethod of toClass.propertySignalMethods) {
44
- propertySignalMethod.isInjected = true;
45
- girClass._tsData.propertySignalMethods.push(propertySignalMethod);
46
- }
47
- }
48
- if (toClass.generics) {
49
- girClass._tsData.generics.push(...this.girFactory.newGenerics(toClass.generics));
50
- }
51
- return girClass;
52
- }
53
- /** Inject additional generics to existing callback interfaces */
54
- toCallback(girCallback) {
55
- const callbacks = [...callbacksAll, ...callbacksGjs];
56
- if (!girCallback._module || !girCallback._tsData) {
57
- return girCallback;
58
- }
59
- const toCallback = callbacks.find((injectCallback) => {
60
- return (girCallback._module &&
61
- girCallback._tsData &&
62
- injectCallback.name === girCallback._tsData.name &&
63
- girCallback._module.namespace === injectCallback.namespace &&
64
- injectCallback.versions.includes(girCallback._module.version));
65
- });
66
- // if (toCallback?.generics) {
67
- // girCallback._tsData.generics.push(...this.girFactory.newGenerics(toCallback.generics))
68
- // }
69
- // NOTICE: We merge the in parameters here
70
- // TODO: Unify injections, merges and overrides
71
- if (toCallback?.inParams) {
72
- for (let i = 0; i < girCallback._tsData.inParams.length; i++) {
73
- const newInParam = toCallback.inParams[i];
74
- const oldInParam = girCallback._tsData.inParams[i];
75
- if (newInParam && oldInParam && oldInParam._tsData?.name === newInParam.name) {
76
- oldInParam._tsData.type = this.girFactory.newTsTypes(newInParam.type);
77
- }
78
- }
79
- }
80
- if (toCallback?.tsCallbackInterface) {
81
- if (toCallback?.tsCallbackInterface.generics) {
82
- girCallback._tsData.tsCallbackInterface?.generics.push(...this.girFactory.newGenerics(toCallback.tsCallbackInterface.generics));
83
- }
84
- }
85
- return girCallback;
86
- }
87
- toParameterType(girParam) {
88
- const tsTypes = girParam._tsData?.type;
89
- const callbacks = [...callbacksAll, ...callbacksGjs];
90
- if (!girParam._module || !girParam._tsData) {
91
- return girParam;
92
- }
93
- // Use the the callback generic injections also for the type of the callback parameters
94
- if (tsTypes) {
95
- for (const tsType of tsTypes) {
96
- const toCallback = callbacks.find((injectCallback) => {
97
- return (girParam._module &&
98
- girParam._tsData &&
99
- // TODO: compare versions
100
- `${injectCallback.namespace}.${injectCallback.name}` === tsType.type);
101
- });
102
- if (toCallback?.generics) {
103
- const tsFunc = girParam._tsData.parent;
104
- const tsClass = tsFunc.parent;
105
- for (const generic of toCallback.generics) {
106
- // Currently only used for `Gio.AsyncReadyCallback`
107
- if (generic.value === 'this') {
108
- if (tsFunc.isStatic && tsClass) {
109
- tsType.generics.push({
110
- ...generic,
111
- value: `${tsClass.namespace}.${tsClass.name}`,
112
- });
113
- }
114
- else if (tsFunc.isGlobal) {
115
- // Add generic parameter to global function
116
- tsFunc.generics.push({
117
- name: 'Z',
118
- value: 'unknown',
119
- });
120
- tsType.generics.push({
121
- value: 'Z',
122
- });
123
- }
124
- else {
125
- tsType.generics.push(generic);
126
- }
127
- }
128
- else {
129
- tsType.generics.push(generic);
130
- }
131
- }
132
- }
133
- }
134
- }
135
- return girParam;
136
- }
137
- }
138
- //# sourceMappingURL=injector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"injector.js","sourceRoot":"","sources":["../../src/injection/injector.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC/E,OAAO,EAAE,UAA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,IAAI,OAAO,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;4BAC3B,IAAI,MAAM,CAAC,QAAQ,IAAI,OAAO,EAAE,CAAC;gCAC7B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;oCACjB,GAAG,OAAO;oCACV,KAAK,EAAE,GAAG,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,IAAI,EAAE;iCAChD,CAAC,CAAA;4BACN,CAAC;iCAAM,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;gCACzB,2CAA2C;gCAC3C,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;oCACjB,IAAI,EAAE,GAAG;oCACT,KAAK,EAAE,SAAS;iCACnB,CAAC,CAAA;gCACF,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;oCACjB,KAAK,EAAE,GAAG;iCACb,CAAC,CAAA;4BACN,CAAC;iCAAM,CAAC;gCACJ,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;4BACjC,CAAC;wBACL,CAAC;6BAAM,CAAC;4BACJ,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;wBACjC,CAAC;oBACL,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;QAED,OAAO,QAAQ,CAAA;IACnB,CAAC;CACJ"}
package/lib/symtable.d.ts DELETED
@@ -1,24 +0,0 @@
1
- import type { GenerateConfig, GirAnyElement, Dependency } from './types/index.js';
2
- /**
3
- * The SymTable is used to get any Type from any dependency to compare or to get information from
4
- */
5
- export declare class SymTable {
6
- private readonly config;
7
- private readonly modPackageName;
8
- private readonly modNamespace;
9
- /**
10
- * The items are static because any GirModule has the same items to be able to access the types of dependencies as well
11
- */
12
- private static items;
13
- private log;
14
- constructor(config: GenerateConfig, modPackageName: string, modNamespace: string);
15
- /**
16
- * Get symTable key, we use this method to prepend the package version to each key to prevent version conflicts e.g. in 'Gtk-3.0' and 'Gtk-4.0'
17
- * @param implementation E.g. Gtk.Window
18
- * @returns E.g. 'Gtk-3.0.Gtk.Window'
19
- */
20
- getKey(dependencies: Dependency[], implementation: string): string | null;
21
- get<T = object>(dependencies: Dependency[], fullTypeName: string): T | null;
22
- getByHand<T = GirAnyElement>(key: string): T | null;
23
- set(dependencies: Dependency[], fullTypeName: string, GirElement: GirAnyElement): void;
24
- }
package/lib/symtable.js DELETED
@@ -1,63 +0,0 @@
1
- import { Logger } from './logger.js';
2
- import { WARN_NOT_FOUND_PACKAGE_NAME } from './messages.js';
3
- /**
4
- * The SymTable is used to get any Type from any dependency to compare or to get information from
5
- */
6
- export class SymTable {
7
- config;
8
- modPackageName;
9
- modNamespace;
10
- /**
11
- * The items are static because any GirModule has the same items to be able to access the types of dependencies as well
12
- */
13
- static items = {};
14
- log;
15
- constructor(config, modPackageName, modNamespace) {
16
- this.config = config;
17
- this.modPackageName = modPackageName;
18
- this.modNamespace = modNamespace;
19
- this.log = new Logger(this.config.verbose, 'SymTable');
20
- }
21
- /**
22
- * Get symTable key, we use this method to prepend the package version to each key to prevent version conflicts e.g. in 'Gtk-3.0' and 'Gtk-4.0'
23
- * @param implementation E.g. Gtk.Window
24
- * @returns E.g. 'Gtk-3.0.Gtk.Window'
25
- */
26
- getKey(dependencies, implementation) {
27
- if (implementation.startsWith(this.modPackageName + '.')) {
28
- return implementation;
29
- }
30
- if (implementation.startsWith(this.modNamespace + '.')) {
31
- return this.modPackageName + '.' + implementation;
32
- }
33
- if (!implementation.includes('.')) {
34
- return this.modPackageName + '.' + this.modNamespace + '.' + implementation;
35
- }
36
- const split = implementation.split('.');
37
- const namespace = split[0];
38
- const packageName = dependencies.find((dependency) => dependency.packageName.startsWith(namespace + '-'))?.packageName;
39
- if (!packageName) {
40
- this.log.warn(WARN_NOT_FOUND_PACKAGE_NAME(namespace, implementation));
41
- return null;
42
- }
43
- return packageName + '.' + implementation;
44
- }
45
- get(dependencies, fullTypeName) {
46
- const key = this.getKey(dependencies, fullTypeName);
47
- if (!key || !SymTable.items[key]) {
48
- return null;
49
- }
50
- const result = SymTable.items[key] || null;
51
- return result;
52
- }
53
- getByHand(key) {
54
- return (SymTable.items[key] || null);
55
- }
56
- set(dependencies, fullTypeName, GirElement) {
57
- const key = this.getKey(dependencies, fullTypeName);
58
- if (key) {
59
- SymTable.items[key] = GirElement;
60
- }
61
- }
62
- }
63
- //# sourceMappingURL=symtable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"symtable.js","sourceRoot":"","sources":["../src/symtable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAA;AAE3D;;GAEG;AACH,MAAM,OAAO,QAAQ;IAQI;IACA;IACA;IATrB;;OAEG;IACK,MAAM,CAAC,KAAK,GAAkB,EAAE,CAAA;IAChC,GAAG,CAAQ;IAEnB,YACqB,MAAsB,EACtB,cAAsB,EACtB,YAAoB;QAFpB,WAAM,GAAN,MAAM,CAAgB;QACtB,mBAAc,GAAd,cAAc,CAAQ;QACtB,iBAAY,GAAZ,YAAY,CAAQ;QAErC,IAAI,CAAC,GAAG,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,CAAA;IAC1D,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,YAA0B,EAAE,cAAsB;QAC5D,IAAI,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,EAAE,CAAC;YACvD,OAAO,cAAc,CAAA;QACzB,CAAC;QAED,IAAI,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,EAAE,CAAC;YACrD,OAAO,IAAI,CAAC,cAAc,GAAG,GAAG,GAAG,cAAc,CAAA;QACrD,CAAC;QAED,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAChC,OAAO,IAAI,CAAC,c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AQ,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,UAAU,CAAA;QACpC,CAAC;IACL,CAAC"}
@@ -1,10 +0,0 @@
1
- import type { TsFunction, TsProperty, TsVar } from './index.js';
2
- export interface ConflictChildElement<T = TsFunction | TsProperty | TsVar> {
3
- /**
4
- * The depth of the inheritance, starts at 1.
5
- * 1 means it is a direct inheritance,
6
- * greater means it is an indirect inheritance
7
- */
8
- depth: number;
9
- data: T;
10
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=conflict-child-element.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conflict-child-element.js","sourceRoot":"","sources":["../../src/types/conflict-child-element.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- import type { TsFunction, TsProperty, TsVar, TsClass, ConflictChildElement } from './index.js';
2
- export interface ConflictGroupedElement<T = TsFunction | TsProperty | TsVar> {
3
- baseElements: ConflictChildElement<T>[];
4
- inheritedElements: ConflictChildElement<T>[];
5
- baseClass: TsClass;
6
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=conflict-grouped-element.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conflict-grouped-element.js","sourceRoot":"","sources":["../../src/types/conflict-grouped-element.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import type { TsFunction, TsProperty, TsVar, ConflictGroupedElement } from './index.js';
2
- export interface ConflictGroupedElements<T = TsFunction | TsProperty | TsVar> {
3
- [name: string]: ConflictGroupedElement<T>;
4
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=conflict-grouped-elements.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conflict-grouped-elements.js","sourceRoot":"","sources":["../../src/types/conflict-grouped-elements.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=generate-config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate-config.js","sourceRoot":"","sources":["../../src/types/generate-config.ts"],"names":[],"mappings":""}
@@ -1,16 +0,0 @@
1
- import type { InjectionGenericParameter, InjectionParameter } from './index.js';
2
- /** Interface to inject additional methods, properties, etc to a class */
3
- export interface InjectionCallback {
4
- /** The versions on which the injections are to be applied. E.g. `["3.0", "2.0"]` */
5
- versions: string[];
6
- /** The versions on which the injections are to be applied. E.g. `"Gtk"` */
7
- namespace: string;
8
- name: string;
9
- /** Generic type parameters */
10
- generics?: InjectionGenericParameter[];
11
- inParams?: InjectionParameter[];
12
- tsCallbackInterface: {
13
- /** Generic type parameters */
14
- generics?: InjectionGenericParameter[];
15
- };
16
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=injection-callback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"injection-callback.js","sourceRoot":"","sources":["../../src/types/injection-callback.ts"],"names":[],"mappings":""}
@@ -1,25 +0,0 @@
1
- import type { InjectionFunction, InjectionGenericParameter, InjectionProperty, TsMethod } from './index.js';
2
- /** Interface to inject additional methods, properties, etc to a class */
3
- export interface InjectionClass {
4
- /** The versions on which the injections are to be applied. E.g. `["3.0", "2.0"]` */
5
- versions: string[];
6
- /** The class namespace and name on which the injections are to be applied. E.g. "Gtk.Window "*/
7
- qualifiedName: string;
8
- /** Fields of the base class itself */
9
- /** Properties of the base class itself */
10
- properties?: InjectionProperty[];
11
- /** Constructor properties of the base class itself */
12
- /** Array of signal methods for GObject properties */
13
- propertySignalMethods?: TsMethod[];
14
- /** Methods of the base class itself */
15
- methods?: InjectionFunction[];
16
- /** Virtual methods of the base class itself */
17
- virtualMethods?: InjectionFunction[];
18
- /** Constructor methods of the base class itself */
19
- constructors?: InjectionFunction[];
20
- /** Static functions of the base class itself */
21
- staticFunctions?: InjectionFunction[];
22
- /** Signals of the base class itself */
23
- /** Generic type parameters */
24
- generics?: InjectionGenericParameter[];
25
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=injection-class.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"injection-class.js","sourceRoot":"","sources":["../../src/types/injection-class.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- import type { TsFunction, InjectionParameter, InjectionInstanceParameter, InjectionType, GirCallableParamElement, GirInstanceParameter } from './index.js';
2
- export interface InjectionFunction extends Pick<TsFunction, 'name' | 'girTypeName'>, Partial<Pick<TsFunction, 'isArrowType' | 'isStatic' | 'isGlobal' | 'isVirtual' | 'isInjected' | 'isPromise' | 'overloads' | 'generics' | 'doc' | 'parent'>> {
3
- returnTypes?: InjectionType[];
4
- inParams?: Array<InjectionParameter | GirCallableParamElement>;
5
- outParams?: Array<InjectionParameter | GirCallableParamElement>;
6
- instanceParameters?: Array<InjectionInstanceParameter | GirInstanceParameter>;
7
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=injection-function.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"injection-function.js","sourceRoot":"","sources":["../../src/types/injection-function.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import type { TsGenericParameter } from './index.js';
2
- export type InjectionGenericParameter = Partial<TsGenericParameter>;
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=injection-generic-parameter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"injection-generic-parameter.js","sourceRoot":"","sources":["../../src/types/injection-generic-parameter.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import type { TsInstanceParameter } from './index.js';
2
- export type InjectionInstanceParameter = TsInstanceParameter;
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=injection-instance-parameter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"injection-instance-parameter.js","sourceRoot":"","sources":["../../src/types/injection-instance-parameter.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- import type { InjectionType, TsDoc } from './index.js';
2
- export interface InjectionParameter {
3
- name: string;
4
- type: InjectionType[];
5
- /** If `true` the parameter is a rest parameter like `(...names: string[])` */
6
- isRest?: boolean;
7
- doc?: Partial<TsDoc>;
8
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=injection-parameter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"injection-parameter.js","sourceRoot":"","sources":["../../src/types/injection-parameter.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import type { TsProperty, InjectionType } from './index.js';
2
- export interface InjectionProperty extends Pick<TsProperty, 'name' | 'girTypeName'>, Partial<Pick<TsProperty, 'readonly' | 'isStatic' | 'isInjected' | 'doc'>> {
3
- type?: InjectionType[];
4
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=injection-property.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"injection-property.js","sourceRoot":"","sources":["../../src/types/injection-property.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import type { TsType } from './ts-type.js';
2
- export type InjectionType = Partial<TsType>;
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=injection-type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"injection-type.js","sourceRoot":"","sources":["../../src/types/injection-type.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import type { InjectionClass } from './injection-class.js';
2
- /** Interface to inject additional methods, properties, etc to the generated type definitions (like gjs overrides) */
3
- export interface Injection {
4
- classes: InjectionClass[];
5
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=injection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"injection.js","sourceRoot":"","sources":["../../src/types/injection.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- import { TsFunction } from './ts-function';
2
- export interface PromisifyFunc {
3
- /** The Gio async function */
4
- asyncFn?: TsFunction;
5
- /** The Gio finish function to get the result of the `asyncFn` */
6
- finishFn?: TsFunction;
7
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=promisify-func.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"promisify-func.js","sourceRoot":"","sources":["../../src/types/promisify-func.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import { GirAnyElement } from './index';
2
- export interface SymTableItems {
3
- [name: string]: GirAnyElement;
4
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=sym-table-items.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sym-table-items.js","sourceRoot":"","sources":["../../src/types/sym-table-items.ts"],"names":[],"mappings":""}
@@ -1,10 +0,0 @@
1
- /**
2
- * Holds the data to generate an alias in/for Typescript
3
- */
4
- export interface TsAlias {
5
- name: string;
6
- type: string;
7
- girTypeName: 'alias';
8
- /** Will be exported in Typescript as "type": `export type = ${name} = ${type}` */
9
- tsTypeName: 'type';
10
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ts-alias.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ts-alias.js","sourceRoot":"","sources":["../../src/types/ts-alias.ts"],"names":[],"mappings":""}
@@ -1,10 +0,0 @@
1
- import { TsDoc, TsGenericParameter } from './index.js';
2
- /**
3
- * Holds the data to generate an interface for `GirCallbackElements` in/for Typescript
4
- */
5
- export interface TsCallbackInterface {
6
- name: string;
7
- overwriteDoc?: Partial<TsDoc>;
8
- /** Generic type parameter of this callback interface */
9
- generics: TsGenericParameter[];
10
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ts-callback-interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ts-callback-interface.js","sourceRoot":"","sources":["../../src/types/ts-callback-interface.ts"],"names":[],"mappings":""}