@tsonic/tsbindgen 0.7.20 → 0.7.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.
package/README.md CHANGED
@@ -132,6 +132,44 @@ output/
132
132
  └── metadata.json
133
133
  ```
134
134
 
135
+ ### Publishing Bindings Packages (dist/ + npm `exports`)
136
+
137
+ When you publish bindings for your own assemblies (or generate them inside an npm workspace), you can keep generated artifacts out of git by writing them under `dist/` and exposing the facades via npm `exports`:
138
+
139
+ ```
140
+ dist/tsonic/bindings/
141
+ Acme.Domain.js
142
+ Acme.Domain.d.ts
143
+ Acme.Domain/
144
+ bindings.json
145
+ internal/
146
+ index.d.ts
147
+ metadata.json
148
+ ```
149
+
150
+ `package.json`:
151
+
152
+ ```json
153
+ {
154
+ "type": "module",
155
+ "exports": {
156
+ "./package.json": "./package.json",
157
+ "./*.js": {
158
+ "types": "./dist/tsonic/bindings/*.d.ts",
159
+ "default": "./dist/tsonic/bindings/*.js"
160
+ }
161
+ }
162
+ }
163
+ ```
164
+
165
+ Consumers can then import CLR namespaces ergonomically:
166
+
167
+ ```ts
168
+ import { TodoItem } from "@acme/domain/Acme.Domain.js";
169
+ ```
170
+
171
+ Tsonic resolves the import using Node’s module resolution (including `exports`) and locates the nearest `bindings.json` for CLR discovery.
172
+
135
173
  ### Output Files
136
174
 
137
175
  | File | Description |
package/lib/tsbindgen.dll CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsonic/tsbindgen",
3
- "version": "0.7.20",
3
+ "version": "0.7.21",
4
4
  "description": "Generate TypeScript declarations from .NET assemblies",
5
5
  "type": "module",
6
6
  "bin": {
package/lib/tsbindgen DELETED
Binary file
package/lib/tsbindgen.pdb DELETED
Binary file