@tsonic/tsbindgen 0.7.4 → 0.7.6
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.js +14 -0
- package/lib/System.CommandLine.dll +0 -0
- package/lib/System.Reflection.MetadataLoadContext.dll +0 -0
- package/lib/tsbindgen.deps.json +98 -0
- package/lib/tsbindgen.dll +0 -0
- package/lib/tsbindgen.runtimeconfig.json +13 -0
- package/package.json +5 -11
- package/postinstall.js +0 -71
package/bin.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawnSync } from "node:child_process";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
|
|
7
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const dllPath = join(__dirname, "lib", "tsbindgen.dll");
|
|
9
|
+
|
|
10
|
+
const result = spawnSync("dotnet", [dllPath, ...process.argv.slice(2)], {
|
|
11
|
+
stdio: "inherit",
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
process.exit(result.status ?? 1);
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"runtimeTarget": {
|
|
3
|
+
"name": ".NETCoreApp,Version=v10.0",
|
|
4
|
+
"signature": ""
|
|
5
|
+
},
|
|
6
|
+
"compilationOptions": {},
|
|
7
|
+
"targets": {
|
|
8
|
+
".NETCoreApp,Version=v10.0": {
|
|
9
|
+
"tsbindgen/1.0.0": {
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"System.CommandLine": "2.0.0-beta4.22272.1",
|
|
12
|
+
"System.Reflection.MetadataLoadContext": "8.0.0"
|
|
13
|
+
},
|
|
14
|
+
"runtime": {
|
|
15
|
+
"tsbindgen.dll": {}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"System.CommandLine/2.0.0-beta4.22272.1": {
|
|
19
|
+
"runtime": {
|
|
20
|
+
"lib/net6.0/System.CommandLine.dll": {
|
|
21
|
+
"assemblyVersion": "2.0.0.0",
|
|
22
|
+
"fileVersion": "2.0.22.27201"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"resources": {
|
|
26
|
+
"lib/net6.0/cs/System.CommandLine.resources.dll": {
|
|
27
|
+
"locale": "cs"
|
|
28
|
+
},
|
|
29
|
+
"lib/net6.0/de/System.CommandLine.resources.dll": {
|
|
30
|
+
"locale": "de"
|
|
31
|
+
},
|
|
32
|
+
"lib/net6.0/es/System.CommandLine.resources.dll": {
|
|
33
|
+
"locale": "es"
|
|
34
|
+
},
|
|
35
|
+
"lib/net6.0/fr/System.CommandLine.resources.dll": {
|
|
36
|
+
"locale": "fr"
|
|
37
|
+
},
|
|
38
|
+
"lib/net6.0/it/System.CommandLine.resources.dll": {
|
|
39
|
+
"locale": "it"
|
|
40
|
+
},
|
|
41
|
+
"lib/net6.0/ja/System.CommandLine.resources.dll": {
|
|
42
|
+
"locale": "ja"
|
|
43
|
+
},
|
|
44
|
+
"lib/net6.0/ko/System.CommandLine.resources.dll": {
|
|
45
|
+
"locale": "ko"
|
|
46
|
+
},
|
|
47
|
+
"lib/net6.0/pl/System.CommandLine.resources.dll": {
|
|
48
|
+
"locale": "pl"
|
|
49
|
+
},
|
|
50
|
+
"lib/net6.0/pt-BR/System.CommandLine.resources.dll": {
|
|
51
|
+
"locale": "pt-BR"
|
|
52
|
+
},
|
|
53
|
+
"lib/net6.0/ru/System.CommandLine.resources.dll": {
|
|
54
|
+
"locale": "ru"
|
|
55
|
+
},
|
|
56
|
+
"lib/net6.0/tr/System.CommandLine.resources.dll": {
|
|
57
|
+
"locale": "tr"
|
|
58
|
+
},
|
|
59
|
+
"lib/net6.0/zh-Hans/System.CommandLine.resources.dll": {
|
|
60
|
+
"locale": "zh-Hans"
|
|
61
|
+
},
|
|
62
|
+
"lib/net6.0/zh-Hant/System.CommandLine.resources.dll": {
|
|
63
|
+
"locale": "zh-Hant"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"System.Reflection.MetadataLoadContext/8.0.0": {
|
|
68
|
+
"runtime": {
|
|
69
|
+
"lib/net8.0/System.Reflection.MetadataLoadContext.dll": {
|
|
70
|
+
"assemblyVersion": "8.0.0.0",
|
|
71
|
+
"fileVersion": "8.0.23.53103"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"libraries": {
|
|
78
|
+
"tsbindgen/1.0.0": {
|
|
79
|
+
"type": "project",
|
|
80
|
+
"serviceable": false,
|
|
81
|
+
"sha512": ""
|
|
82
|
+
},
|
|
83
|
+
"System.CommandLine/2.0.0-beta4.22272.1": {
|
|
84
|
+
"type": "package",
|
|
85
|
+
"serviceable": true,
|
|
86
|
+
"sha512": "sha512-1uqED/q2H0kKoLJ4+hI2iPSBSEdTuhfCYADeJrAqERmiGQ2NNacYKRNEQ+gFbU4glgVyK8rxI+ZOe1onEtr/Pg==",
|
|
87
|
+
"path": "system.commandline/2.0.0-beta4.22272.1",
|
|
88
|
+
"hashPath": "system.commandline.2.0.0-beta4.22272.1.nupkg.sha512"
|
|
89
|
+
},
|
|
90
|
+
"System.Reflection.MetadataLoadContext/8.0.0": {
|
|
91
|
+
"type": "package",
|
|
92
|
+
"serviceable": true,
|
|
93
|
+
"sha512": "sha512-SZxrQ4sQYnIcdwiO3G/lHZopbPYQ2lW0ioT4JezgccWUrKaKbHLJbAGZaDfkYjWcta1pWssAo3MOXLsR0ie4tQ==",
|
|
94
|
+
"path": "system.reflection.metadataloadcontext/8.0.0",
|
|
95
|
+
"hashPath": "system.reflection.metadataloadcontext.8.0.0.nupkg.sha512"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"runtimeOptions": {
|
|
3
|
+
"tfm": "net10.0",
|
|
4
|
+
"framework": {
|
|
5
|
+
"name": "Microsoft.NETCore.App",
|
|
6
|
+
"version": "10.0.0"
|
|
7
|
+
},
|
|
8
|
+
"configProperties": {
|
|
9
|
+
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
|
|
10
|
+
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,29 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsonic/tsbindgen",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.6",
|
|
4
4
|
"description": "Generate TypeScript declarations from .NET assemblies",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"tsbindgen": "./bin
|
|
7
|
+
"tsbindgen": "./bin.js"
|
|
8
8
|
},
|
|
9
9
|
"main": "./index.js",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": "./index.js"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
|
-
"
|
|
14
|
+
"bin.js",
|
|
15
15
|
"index.js",
|
|
16
|
+
"lib",
|
|
16
17
|
"README.md"
|
|
17
18
|
],
|
|
18
19
|
"scripts": {
|
|
19
|
-
"build": "
|
|
20
|
-
"postinstall": "node postinstall.js"
|
|
21
|
-
},
|
|
22
|
-
"optionalDependencies": {
|
|
23
|
-
"@tsonic/tsbindgen-darwin-arm64": "0.7.4",
|
|
24
|
-
"@tsonic/tsbindgen-darwin-x64": "0.7.4",
|
|
25
|
-
"@tsonic/tsbindgen-linux-arm64": "0.7.4",
|
|
26
|
-
"@tsonic/tsbindgen-linux-x64": "0.7.4"
|
|
20
|
+
"build": "dotnet publish src/tsbindgen/tsbindgen.csproj -c Release -o lib/"
|
|
27
21
|
},
|
|
28
22
|
"keywords": [
|
|
29
23
|
"tsonic",
|
package/postinstall.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { existsSync, mkdirSync, symlinkSync, unlinkSync, chmodSync } from "node:fs";
|
|
4
|
-
import { dirname, join } from "node:path";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
|
|
7
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
-
|
|
9
|
-
const PLATFORMS = {
|
|
10
|
-
"darwin-arm64": "tsbindgen-darwin-arm64",
|
|
11
|
-
"darwin-x64": "tsbindgen-darwin-x64",
|
|
12
|
-
"linux-arm64": "tsbindgen-linux-arm64",
|
|
13
|
-
"linux-x64": "tsbindgen-linux-x64",
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const getPlatformKey = () => `${process.platform}-${process.arch}`;
|
|
17
|
-
|
|
18
|
-
const findBinary = () => {
|
|
19
|
-
const key = getPlatformKey();
|
|
20
|
-
const packageName = PLATFORMS[key];
|
|
21
|
-
|
|
22
|
-
if (!packageName) {
|
|
23
|
-
console.error(`tsbindgen: Unsupported platform: ${key}`);
|
|
24
|
-
console.error("Supported: darwin-arm64, darwin-x64, linux-arm64, linux-x64");
|
|
25
|
-
process.exit(1);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const binaryName = "tsbindgen";
|
|
29
|
-
|
|
30
|
-
// Search paths for the platform-specific binary
|
|
31
|
-
const paths = [
|
|
32
|
-
// Nested in this package's node_modules
|
|
33
|
-
join(__dirname, "node_modules", "@tsonic", packageName, binaryName),
|
|
34
|
-
// Sibling in @tsonic scope (hoisted)
|
|
35
|
-
join(__dirname, "..", packageName, binaryName),
|
|
36
|
-
// At root node_modules level
|
|
37
|
-
join(__dirname, "..", "..", "@tsonic", packageName, binaryName),
|
|
38
|
-
];
|
|
39
|
-
|
|
40
|
-
for (const p of paths) {
|
|
41
|
-
if (existsSync(p)) {
|
|
42
|
-
return p;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
console.error(`tsbindgen: Could not find binary for ${key}`);
|
|
47
|
-
console.error(`Package @tsonic/${packageName} may not be installed.`);
|
|
48
|
-
process.exit(1);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
// Create bin directory if needed
|
|
52
|
-
const binDir = join(__dirname, "bin");
|
|
53
|
-
if (!existsSync(binDir)) {
|
|
54
|
-
mkdirSync(binDir);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// Find the platform binary
|
|
58
|
-
const binaryPath = findBinary();
|
|
59
|
-
|
|
60
|
-
// Create symlink
|
|
61
|
-
const symlinkPath = join(binDir, "tsbindgen");
|
|
62
|
-
|
|
63
|
-
// Remove existing symlink if present
|
|
64
|
-
if (existsSync(symlinkPath)) {
|
|
65
|
-
unlinkSync(symlinkPath);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
symlinkSync(binaryPath, symlinkPath);
|
|
69
|
-
chmodSync(symlinkPath, 0o755);
|
|
70
|
-
|
|
71
|
-
console.log(`tsbindgen: Linked to ${binaryPath}`);
|