@ts-for-gir/cli 4.0.0-rc.2 → 4.0.0-rc.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.
- package/bin/ts-for-gir +5 -34
- package/package.json +10 -10
package/bin/ts-for-gir
CHANGED
|
@@ -7268,7 +7268,7 @@ import { dirname, join } from "node:path";
|
|
|
7268
7268
|
import { fileURLToPath } from "node:url";
|
|
7269
7269
|
function getPackageVersion() {
|
|
7270
7270
|
if (true) {
|
|
7271
|
-
return "4.0.0-rc.
|
|
7271
|
+
return "4.0.0-rc.3";
|
|
7272
7272
|
}
|
|
7273
7273
|
const currentModulePath = fileURLToPath(import.meta.url);
|
|
7274
7274
|
const currentDir = dirname(currentModulePath);
|
|
@@ -8165,7 +8165,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
|
8165
8165
|
var NEW_LINE_REG_EXP = /[\n\r]+/g;
|
|
8166
8166
|
function getPackageVersion2() {
|
|
8167
8167
|
if (true) {
|
|
8168
|
-
return "4.0.0-rc.
|
|
8168
|
+
return "4.0.0-rc.3";
|
|
8169
8169
|
}
|
|
8170
8170
|
const currentModulePath = fileURLToPath2(import.meta.url);
|
|
8171
8171
|
const currentDir = dirname2(currentModulePath);
|
|
@@ -12101,6 +12101,8 @@ function resolvePrimitiveType(name) {
|
|
|
12101
12101
|
case "gint64":
|
|
12102
12102
|
case "gssize":
|
|
12103
12103
|
case "gsize":
|
|
12104
|
+
case "guintptr":
|
|
12105
|
+
// Integer of the same width as a pointer
|
|
12104
12106
|
case "time_t":
|
|
12105
12107
|
// C standard library time type (seconds since Unix epoch)
|
|
12106
12108
|
case "ulong":
|
|
@@ -12113,8 +12115,6 @@ function resolvePrimitiveType(name) {
|
|
|
12113
12115
|
return ObjectType;
|
|
12114
12116
|
case "va_list":
|
|
12115
12117
|
return AnyType;
|
|
12116
|
-
case "guintptr":
|
|
12117
|
-
return NeverType;
|
|
12118
12118
|
case "never":
|
|
12119
12119
|
return NeverType;
|
|
12120
12120
|
case "unknown":
|
|
@@ -18662,33 +18662,6 @@ var ClassVisitor = class extends GirVisitor {
|
|
|
18662
18662
|
);
|
|
18663
18663
|
};
|
|
18664
18664
|
|
|
18665
|
-
// ../lib/src/validators/function-parameters.ts
|
|
18666
|
-
var FunctionParametersVisitor = class extends GirVisitor {
|
|
18667
|
-
makeEnumParamsNullable(node) {
|
|
18668
|
-
return node.copy({
|
|
18669
|
-
parameters: node.parameters.map((param) => {
|
|
18670
|
-
const type = param.type.deepUnwrap();
|
|
18671
|
-
if (type instanceof TypeIdentifier) {
|
|
18672
|
-
const ns = node.namespace.assertInstalledImport(type.namespace);
|
|
18673
|
-
const isEnumType = !!ns.getEnum(type.name);
|
|
18674
|
-
if (isEnumType) {
|
|
18675
|
-
return param.copy({
|
|
18676
|
-
type: new NullableType(param.type)
|
|
18677
|
-
});
|
|
18678
|
-
}
|
|
18679
|
-
}
|
|
18680
|
-
return param;
|
|
18681
|
-
})
|
|
18682
|
-
});
|
|
18683
|
-
}
|
|
18684
|
-
visitFunction = (node) => {
|
|
18685
|
-
return this.makeEnumParamsNullable(node);
|
|
18686
|
-
};
|
|
18687
|
-
visitClassFunction = (node) => {
|
|
18688
|
-
return this.makeEnumParamsNullable(node);
|
|
18689
|
-
};
|
|
18690
|
-
};
|
|
18691
|
-
|
|
18692
18665
|
// ../lib/src/validators/interface.ts
|
|
18693
18666
|
var InterfaceVisitor = class extends GirVisitor {
|
|
18694
18667
|
visitInterface = (node) => {
|
|
@@ -18783,8 +18756,6 @@ var NSRegistry = class {
|
|
|
18783
18756
|
this.registerTransformation(interfaceVisitor);
|
|
18784
18757
|
const classVisitor = new ClassVisitor();
|
|
18785
18758
|
this.registerTransformation(classVisitor);
|
|
18786
|
-
const enumParamsVisitor = new FunctionParametersVisitor();
|
|
18787
|
-
this.registerTransformation(enumParamsVisitor);
|
|
18788
18759
|
console.log("Adding generics...");
|
|
18789
18760
|
generify(this, options2.inferGenerics);
|
|
18790
18761
|
console.log("Injecting types...");
|
|
@@ -25693,7 +25664,7 @@ import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
|
25693
25664
|
import { i18n, JSX as JSX8, ReflectionKind as ReflectionKind4 } from "typedoc";
|
|
25694
25665
|
function getTsForGirVersion() {
|
|
25695
25666
|
if (true) {
|
|
25696
|
-
return "4.0.0-rc.
|
|
25667
|
+
return "4.0.0-rc.3";
|
|
25697
25668
|
}
|
|
25698
25669
|
const __dirname3 = dirname7(fileURLToPath4(import.meta.url));
|
|
25699
25670
|
return JSON.parse(readFileSync6(join13(__dirname3, "..", "..", "package.json"), "utf8")).version;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ts-for-gir/cli",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.3",
|
|
4
4
|
"description": "TypeScript type definition generator for GObject introspection GIR files",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"module": "src/index.ts",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
".": "./src/index.ts"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@gi.ts/parser": "^4.0.0-rc.
|
|
56
|
-
"@ts-for-gir/generator-base": "^4.0.0-rc.
|
|
57
|
-
"@ts-for-gir/generator-html-doc": "^4.0.0-rc.
|
|
58
|
-
"@ts-for-gir/generator-json": "^4.0.0-rc.
|
|
59
|
-
"@ts-for-gir/generator-typescript": "^4.0.0-rc.
|
|
60
|
-
"@ts-for-gir/lib": "^4.0.0-rc.
|
|
61
|
-
"@ts-for-gir/reporter": "^4.0.0-rc.
|
|
62
|
-
"@ts-for-gir/tsconfig": "^4.0.0-rc.
|
|
55
|
+
"@gi.ts/parser": "^4.0.0-rc.3",
|
|
56
|
+
"@ts-for-gir/generator-base": "^4.0.0-rc.3",
|
|
57
|
+
"@ts-for-gir/generator-html-doc": "^4.0.0-rc.3",
|
|
58
|
+
"@ts-for-gir/generator-json": "^4.0.0-rc.3",
|
|
59
|
+
"@ts-for-gir/generator-typescript": "^4.0.0-rc.3",
|
|
60
|
+
"@ts-for-gir/lib": "^4.0.0-rc.3",
|
|
61
|
+
"@ts-for-gir/reporter": "^4.0.0-rc.3",
|
|
62
|
+
"@ts-for-gir/tsconfig": "^4.0.0-rc.3",
|
|
63
63
|
"@types/ejs": "^3.1.5",
|
|
64
64
|
"@types/inquirer": "^9.0.9",
|
|
65
65
|
"@types/node": "^24.12.2",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@inquirer/prompts": "^8.3.2",
|
|
72
|
-
"@ts-for-gir/templates": "^4.0.0-rc.
|
|
72
|
+
"@ts-for-gir/templates": "^4.0.0-rc.3",
|
|
73
73
|
"colorette": "^2.0.20",
|
|
74
74
|
"cosmiconfig": "^9.0.1",
|
|
75
75
|
"ejs": "^5.0.1",
|