tsbindgen 0.7.7

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 (3) hide show
  1. package/README.md +25 -0
  2. package/bin.js +20 -0
  3. package/package.json +26 -0
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # tsbindgen
2
+
3
+ Generate TypeScript declarations from .NET assemblies.
4
+
5
+ This is a convenience wrapper for [@tsonic/tsbindgen](https://www.npmjs.com/package/@tsonic/tsbindgen).
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install tsbindgen
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```bash
16
+ npx tsbindgen generate -a MyAssembly.dll -o out/
17
+ ```
18
+
19
+ ## Requirements
20
+
21
+ - .NET 8.0+ runtime
22
+
23
+ ## Documentation
24
+
25
+ See the full documentation at [@tsonic/tsbindgen](https://github.com/tsoniclang/tsbindgen).
package/bin.js ADDED
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+
3
+ // Forward to @tsonic/tsbindgen
4
+ import { createRequire } from "node:module";
5
+ import { spawn } from "node:child_process";
6
+ import { dirname, join } from "node:path";
7
+ import { fileURLToPath } from "node:url";
8
+
9
+ const __dirname = dirname(fileURLToPath(import.meta.url));
10
+ const require = createRequire(import.meta.url);
11
+
12
+ // Find the real bin.js from @tsonic/tsbindgen
13
+ const realBinPath = require.resolve("@tsonic/tsbindgen/bin.js");
14
+
15
+ // Spawn it with same args
16
+ const child = spawn(process.execPath, [realBinPath, ...process.argv.slice(2)], {
17
+ stdio: "inherit",
18
+ });
19
+
20
+ child.on("exit", (code) => process.exit(code ?? 1));
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "tsbindgen",
3
+ "version": "0.7.7",
4
+ "description": "Generate TypeScript declarations from .NET assemblies",
5
+ "type": "module",
6
+ "bin": {
7
+ "tsbindgen": "./bin.js"
8
+ },
9
+ "dependencies": {
10
+ "@tsonic/tsbindgen": "0.7.7"
11
+ },
12
+ "keywords": [
13
+ "tsonic",
14
+ "typescript",
15
+ "dotnet",
16
+ "csharp",
17
+ "codegen",
18
+ "bindings"
19
+ ],
20
+ "author": "Tsonic Team",
21
+ "license": "MIT",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/tsoniclang/tsbindgen.git"
25
+ }
26
+ }