feat(zitadel-proto): add CJS and ESM support; export in Zitadel api structure; add build configuration

This commit is contained in:
Thomas Faust
2025-03-15 18:18:05 +01:00
parent f310277add
commit 314379da0f
9 changed files with 282 additions and 14 deletions

View File

@@ -5,22 +5,40 @@
"publishConfig": {
"access": "public"
},
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"files": [
"index.ts",
"v1.ts",
"v2.ts",
"v3alpha.ts",
"zitadel/**",
"validate/**",
"google/**",
"protoc-gen-openapiv2/**"
"dist/**"
],
"sideEffects": false,
"scripts": {
"generate": "buf generate https://github.com/zitadel/zitadel.git#tag=v2.71.1 --path ./proto/zitadel",
"clean": "rm -rf zitadel .turbo node_modules google protoc-gen-openapiv2 validate"
"clean": "rm -rf zitadel .turbo node_modules google protoc-gen-openapiv2 validate",
"build": "tsup",
"test:cjs": "node test/cjs-test.cjs",
"test:esm": "node test/esm-test.mjs",
"test": "pnpm build && pnpm test:cjs && pnpm test:esm"
},
"dependencies": {
"@bufbuild/protobuf": "^2.2.2"
},
"devDependencies": {
"@bufbuild/buf": "^1.47.2"
"@bufbuild/buf": "^1.47.2",
"tsup": "^8.0.0"
}
}
}