diff --git a/packages/javascript/.gitignore b/packages/javascript/.gitignore index 63ef11bb..7300ff69 100644 --- a/packages/javascript/.gitignore +++ b/packages/javascript/.gitignore @@ -1,3 +1,3 @@ node_modules/ src/gen -!src/gen/version.d.ts \ No newline at end of file +!src/gen/dts/version.d.ts diff --git a/packages/javascript/package.json b/packages/javascript/package.json index 8098810b..06c81065 100644 --- a/packages/javascript/package.json +++ b/packages/javascript/package.json @@ -26,7 +26,7 @@ "generate:version": "pnpm generate:version:esm && pnpm generate:version:cjs", "generate:proto:esm": "protoc --es_out src/gen/esm --es_opt target=js -I=../../protobufs ../../protobufs/livekit_*.proto", "generate:proto:cjs": "protoc --es_out src/gen/cjs --es_opt target=js,js_import_style=legacy_commonjs -I=../../protobufs ../../protobufs/livekit_*.proto", - "generate:proto:dts": "mkdir -p src/gen/dts && protoc --es_out src/gen/dts --es_opt target=dts -I=../../protobufs ../../protobufs/livekit_*.proto", + "generate:proto:dts": "protoc --es_out src/gen/dts --es_opt target=dts -I=../../protobufs ../../protobufs/livekit_*.proto", "generate:proto": "pnpm generate:proto:esm && pnpm generate:proto:cjs && pnpm generate:proto:dts", "build": "pnpm generate:version && pnpm generate:proto" }, diff --git a/packages/javascript/src/gen/dts/version.d.ts b/packages/javascript/src/gen/dts/version.d.ts new file mode 100644 index 00000000..baaee2fd --- /dev/null +++ b/packages/javascript/src/gen/dts/version.d.ts @@ -0,0 +1 @@ +export declare const version: string; diff --git a/packages/javascript/src/index.d.ts b/packages/javascript/src/index.d.ts index a8371776..8d0a96cb 100644 --- a/packages/javascript/src/index.d.ts +++ b/packages/javascript/src/index.d.ts @@ -9,3 +9,4 @@ export type * from "./gen/dts/livekit_room_pb.d.ts"; export type * from "./gen/dts/livekit_rtc_pb.d.ts"; export type * from "./gen/dts/livekit_sip_pb.d.ts"; export type * from "./gen/dts/livekit_webhook_pb.d.ts"; +export type * from "./gen/dts/version.d.ts";