Skip to content

Commit

Permalink
move to one dir again to fix dts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nbsp committed Nov 18, 2024
1 parent df45c99 commit 35c5319
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 40 deletions.
12 changes: 6 additions & 6 deletions packages/javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
}
},
"scripts": {
"generate:version:esm": "genversion --esm --semi src/gen/esm/version.js",
"generate:version:cjs": "genversion --semi src/gen/cjs/version.js",
"generate:version:esm": "genversion --esm --semi src/gen/version.mjs",
"generate:version:cjs": "genversion --semi src/gen/version.cjs",
"generate:version": "pnpm generate:version:esm && pnpm generate:version:cjs",
"generate:proto:esm": "mkdir -p src/gen/esm && protoc --es_out src/gen/esm --es_opt target=js -I=../../protobufs ../../protobufs/livekit_*.proto",
"generate:proto:cjs": "mkdir -p src/gen/cjs && protoc --es_out src/gen/cjs --es_opt target=js,js_import_style=legacy_commonjs -I=../../protobufs ../../protobufs/livekit_*.proto && rename \"s/js$/cjs/\" src/gen/cjs/*.js && sed -i 's/\\.js\")/.cjs\")/' src/gen/cjs/*.cjs",
"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",
"generate:proto:esm": "protoc --es_out src/gen --es_opt target=js -I=../../protobufs ../../protobufs/livekit_*.proto",
"generate:proto:cjs": "protoc --es_out src/gen --es_opt target=js,js_import_style=legacy_commonjs -I=../../protobufs ../../protobufs/livekit_*.proto && rename \"s/js$/cjs/\" src/gen/*.js && sed -i 's/\\.js\")/.cjs\")/' src/gen/*.cjs",
"generate:proto:dts": "protoc --es_out src/gen --es_opt target=dts -I=../../protobufs ../../protobufs/livekit_*.proto",
"generate:proto": "pnpm generate:proto:cjs && pnpm generate:proto:esm && pnpm generate:proto:dts",
"build": "pnpm generate:version && pnpm generate:proto"
},
"keywords": [],
Expand Down
1 change: 0 additions & 1 deletion packages/javascript/src/gen/dts/version.d.ts

This file was deleted.

22 changes: 11 additions & 11 deletions packages/javascript/src/index.cjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// @ts-check
const { protoInt64 } = require("@bufbuild/protobuf");
const agentDispatch = require("./gen/cjs/livekit_agent_dispatch_pb.cjs");
const agent = require("./gen/cjs/livekit_agent_pb.cjs");
const egress = require("./gen/cjs/livekit_egress_pb.cjs");
const ingress = require("./gen/cjs/livekit_ingress_pb.cjs");
const metrics = require("./gen/cjs/livekit_metrics_pb.cjs");
const models = require("./gen/cjs/livekit_models_pb.cjs");
const room = require("./gen/cjs/livekit_room_pb.cjs");
const rtc = require("./gen/cjs/livekit_rtc_pb.cjs");
const sip = require("./gen/cjs/livekit_sip_pb.cjs");
const webhook = require("./gen/cjs/livekit_webhook_pb.cjs");
const version = require("./gen/cjs/version.cjs");
const agentDispatch = require("./gen/livekit_agent_dispatch_pb.cjs");
const agent = require("./gen/livekit_agent_pb.cjs");
const egress = require("./gen/livekit_egress_pb.cjs");
const ingress = require("./gen/livekit_ingress_pb.cjs");
const metrics = require("./gen/livekit_metrics_pb.cjs");
const models = require("./gen/livekit_models_pb.cjs");
const room = require("./gen/livekit_room_pb.cjs");
const rtc = require("./gen/livekit_rtc_pb.cjs");
const sip = require("./gen/livekit_sip_pb.cjs");
const webhook = require("./gen/livekit_webhook_pb.cjs");
const version = require("./gen/version.cjs");

module.exports = {
protoInt64,
Expand Down
22 changes: 11 additions & 11 deletions packages/javascript/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export { protoInt64 } from "@bufbuild/protobuf";
export type * from "./gen/dts/livekit_agent_dispatch_pb.d.ts";
export type * from "./gen/dts/livekit_agent_pb.d.ts";
export type * from "./gen/dts/livekit_egress_pb.d.ts";
export type * from "./gen/dts/livekit_ingress_pb.d.ts";
export type * from "./gen/dts/livekit_metrics_pb.d.ts";
export type * from "./gen/dts/livekit_models_pb.d.ts";
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";
export * from "./gen/livekit_agent_dispatch_pb.js";
export * from "./gen/livekit_agent_pb.js";
export * from "./gen/livekit_egress_pb.js";
export * from "./gen/livekit_ingress_pb.js";
export * from "./gen/livekit_metrics_pb.js";
export * from "./gen/livekit_models_pb.js";
export * from "./gen/livekit_room_pb.js";
export * from "./gen/livekit_rtc_pb.js";
export * from "./gen/livekit_sip_pb.js";
export * from "./gen/livekit_webhook_pb.js";
export * from "./gen/version.js";
22 changes: 11 additions & 11 deletions packages/javascript/src/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// @ts-check
export { protoInt64 } from "@bufbuild/protobuf";
export * from "./gen/esm/livekit_agent_dispatch_pb.js";
export * from "./gen/esm/livekit_agent_pb.js";
export * from "./gen/esm/livekit_egress_pb.js";
export * from "./gen/esm/livekit_ingress_pb.js";
export * from "./gen/esm/livekit_metrics_pb.js";
export * from "./gen/esm/livekit_models_pb.js";
export * from "./gen/esm/livekit_room_pb.js";
export * from "./gen/esm/livekit_rtc_pb.js";
export * from "./gen/esm/livekit_sip_pb.js";
export * from "./gen/esm/livekit_webhook_pb.js";
export * from "./gen/esm/version.js";
export * from "./gen/livekit_agent_dispatch_pb.js";
export * from "./gen/livekit_agent_pb.js";
export * from "./gen/livekit_egress_pb.js";
export * from "./gen/livekit_ingress_pb.js";
export * from "./gen/livekit_metrics_pb.js";
export * from "./gen/livekit_models_pb.js";
export * from "./gen/livekit_room_pb.js";
export * from "./gen/livekit_rtc_pb.js";
export * from "./gen/livekit_sip_pb.js";
export * from "./gen/livekit_webhook_pb.js";
export * from "./gen/version.mjs";

0 comments on commit 35c5319

Please sign in to comment.