From 14e7d23098cdb6cd5587c64499af859309ea0b35 Mon Sep 17 00:00:00 2001 From: Youngteac Hong Date: Tue, 25 Jun 2024 19:40:34 +0900 Subject: [PATCH] Use module import style for Protobuf This commit switchs Protobuf build to use js_import_style=module. This change is possible due to migration from Webpack to Vite. --- buf.gen.yaml | 12 +-- src/api/yorkie/v1/resources_pb.d.ts | 2 +- src/api/yorkie/v1/resources_pb.js | 149 +++++++++----------------- src/api/yorkie/v1/yorkie_connect.d.ts | 2 +- src/api/yorkie/v1/yorkie_connect.js | 13 +-- src/api/yorkie/v1/yorkie_pb.d.ts | 2 +- src/api/yorkie/v1/yorkie_pb.js | 61 ++++------- 7 files changed, 82 insertions(+), 159 deletions(-) diff --git a/buf.gen.yaml b/buf.gen.yaml index ea878f5e1..1b20df7bc 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -2,11 +2,11 @@ version: v1 plugins: - plugin: es out: . - opt: - - target=js+dts - - js_import_style=legacy_commonjs + opt: + - target=js+dts + - js_import_style=module - plugin: connect-es out: . - opt: - - target=js+dts - - js_import_style=legacy_commonjs + opt: + - target=js+dts + - js_import_style=module diff --git a/src/api/yorkie/v1/resources_pb.d.ts b/src/api/yorkie/v1/resources_pb.d.ts index 9b364f4a5..7d77073f6 100644 --- a/src/api/yorkie/v1/resources_pb.d.ts +++ b/src/api/yorkie/v1/resources_pb.d.ts @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-es v1.6.0 with parameter "target=js+dts,js_import_style=legacy_commonjs" +// @generated by protoc-gen-es v1.6.0 with parameter "target=js+dts,js_import_style=module" // @generated from file src/api/yorkie/v1/resources.proto (package yorkie.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/src/api/yorkie/v1/resources_pb.js b/src/api/yorkie/v1/resources_pb.js index 8b71378b2..6b3a5aa71 100644 --- a/src/api/yorkie/v1/resources_pb.js +++ b/src/api/yorkie/v1/resources_pb.js @@ -13,20 +13,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-es v1.6.0 with parameter "target=js+dts,js_import_style=legacy_commonjs" +// @generated by protoc-gen-es v1.6.0 with parameter "target=js+dts,js_import_style=module" // @generated from file src/api/yorkie/v1/resources.proto (package yorkie.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); - -const { proto3, StringValue, Timestamp } = require("@bufbuild/protobuf"); +import { proto3, StringValue, Timestamp } from "@bufbuild/protobuf"; /** * @generated from enum yorkie.v1.ValueType */ -const ValueType = proto3.makeEnum( +export const ValueType = proto3.makeEnum( "yorkie.v1.ValueType", [ {no: 0, name: "VALUE_TYPE_NULL", localName: "NULL"}, @@ -49,7 +46,7 @@ const ValueType = proto3.makeEnum( /** * @generated from enum yorkie.v1.DocEventType */ -const DocEventType = proto3.makeEnum( +export const DocEventType = proto3.makeEnum( "yorkie.v1.DocEventType", [ {no: 0, name: "DOC_EVENT_TYPE_DOCUMENT_CHANGED", localName: "DOCUMENT_CHANGED"}, @@ -66,7 +63,7 @@ const DocEventType = proto3.makeEnum( * * @generated from message yorkie.v1.Snapshot */ -const Snapshot = proto3.makeMessageType( +export const Snapshot = proto3.makeMessageType( "yorkie.v1.Snapshot", () => [ { no: 1, name: "root", kind: "message", T: JSONElement }, @@ -80,7 +77,7 @@ const Snapshot = proto3.makeMessageType( * * @generated from message yorkie.v1.ChangePack */ -const ChangePack = proto3.makeMessageType( +export const ChangePack = proto3.makeMessageType( "yorkie.v1.ChangePack", () => [ { no: 1, name: "document_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -95,7 +92,7 @@ const ChangePack = proto3.makeMessageType( /** * @generated from message yorkie.v1.Change */ -const Change = proto3.makeMessageType( +export const Change = proto3.makeMessageType( "yorkie.v1.Change", () => [ { no: 1, name: "id", kind: "message", T: ChangeID }, @@ -108,7 +105,7 @@ const Change = proto3.makeMessageType( /** * @generated from message yorkie.v1.ChangeID */ -const ChangeID = proto3.makeMessageType( +export const ChangeID = proto3.makeMessageType( "yorkie.v1.ChangeID", () => [ { no: 1, name: "client_seq", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, @@ -121,7 +118,7 @@ const ChangeID = proto3.makeMessageType( /** * @generated from message yorkie.v1.Operation */ -const Operation = proto3.makeMessageType( +export const Operation = proto3.makeMessageType( "yorkie.v1.Operation", () => [ { no: 1, name: "set", kind: "message", T: Operation_Set, oneof: "body" }, @@ -140,7 +137,7 @@ const Operation = proto3.makeMessageType( /** * @generated from message yorkie.v1.Operation.Set */ -const Operation_Set = proto3.makeMessageType( +export const Operation_Set = proto3.makeMessageType( "yorkie.v1.Operation.Set", () => [ { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, @@ -154,7 +151,7 @@ const Operation_Set = proto3.makeMessageType( /** * @generated from message yorkie.v1.Operation.Add */ -const Operation_Add = proto3.makeMessageType( +export const Operation_Add = proto3.makeMessageType( "yorkie.v1.Operation.Add", () => [ { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, @@ -168,7 +165,7 @@ const Operation_Add = proto3.makeMessageType( /** * @generated from message yorkie.v1.Operation.Move */ -const Operation_Move = proto3.makeMessageType( +export const Operation_Move = proto3.makeMessageType( "yorkie.v1.Operation.Move", () => [ { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, @@ -182,7 +179,7 @@ const Operation_Move = proto3.makeMessageType( /** * @generated from message yorkie.v1.Operation.Remove */ -const Operation_Remove = proto3.makeMessageType( +export const Operation_Remove = proto3.makeMessageType( "yorkie.v1.Operation.Remove", () => [ { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, @@ -195,7 +192,7 @@ const Operation_Remove = proto3.makeMessageType( /** * @generated from message yorkie.v1.Operation.Edit */ -const Operation_Edit = proto3.makeMessageType( +export const Operation_Edit = proto3.makeMessageType( "yorkie.v1.Operation.Edit", () => [ { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, @@ -217,7 +214,7 @@ const Operation_Edit = proto3.makeMessageType( * * @generated from message yorkie.v1.Operation.Select */ -const Operation_Select = proto3.makeMessageType( +export const Operation_Select = proto3.makeMessageType( "yorkie.v1.Operation.Select", () => [ { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, @@ -231,7 +228,7 @@ const Operation_Select = proto3.makeMessageType( /** * @generated from message yorkie.v1.Operation.Style */ -const Operation_Style = proto3.makeMessageType( +export const Operation_Style = proto3.makeMessageType( "yorkie.v1.Operation.Style", () => [ { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, @@ -247,7 +244,7 @@ const Operation_Style = proto3.makeMessageType( /** * @generated from message yorkie.v1.Operation.Increase */ -const Operation_Increase = proto3.makeMessageType( +export const Operation_Increase = proto3.makeMessageType( "yorkie.v1.Operation.Increase", () => [ { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, @@ -260,7 +257,7 @@ const Operation_Increase = proto3.makeMessageType( /** * @generated from message yorkie.v1.Operation.TreeEdit */ -const Operation_TreeEdit = proto3.makeMessageType( +export const Operation_TreeEdit = proto3.makeMessageType( "yorkie.v1.Operation.TreeEdit", () => [ { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, @@ -277,7 +274,7 @@ const Operation_TreeEdit = proto3.makeMessageType( /** * @generated from message yorkie.v1.Operation.TreeStyle */ -const Operation_TreeStyle = proto3.makeMessageType( +export const Operation_TreeStyle = proto3.makeMessageType( "yorkie.v1.Operation.TreeStyle", () => [ { no: 1, name: "parent_created_at", kind: "message", T: TimeTicket }, @@ -294,7 +291,7 @@ const Operation_TreeStyle = proto3.makeMessageType( /** * @generated from message yorkie.v1.JSONElementSimple */ -const JSONElementSimple = proto3.makeMessageType( +export const JSONElementSimple = proto3.makeMessageType( "yorkie.v1.JSONElementSimple", () => [ { no: 1, name: "created_at", kind: "message", T: TimeTicket }, @@ -308,7 +305,7 @@ const JSONElementSimple = proto3.makeMessageType( /** * @generated from message yorkie.v1.JSONElement */ -const JSONElement = proto3.makeMessageType( +export const JSONElement = proto3.makeMessageType( "yorkie.v1.JSONElement", () => [ { no: 1, name: "json_object", kind: "message", T: JSONElement_JSONObject, oneof: "body" }, @@ -323,7 +320,7 @@ const JSONElement = proto3.makeMessageType( /** * @generated from message yorkie.v1.JSONElement.JSONObject */ -const JSONElement_JSONObject = proto3.makeMessageType( +export const JSONElement_JSONObject = proto3.makeMessageType( "yorkie.v1.JSONElement.JSONObject", () => [ { no: 1, name: "nodes", kind: "message", T: RHTNode, repeated: true }, @@ -337,7 +334,7 @@ const JSONElement_JSONObject = proto3.makeMessageType( /** * @generated from message yorkie.v1.JSONElement.JSONArray */ -const JSONElement_JSONArray = proto3.makeMessageType( +export const JSONElement_JSONArray = proto3.makeMessageType( "yorkie.v1.JSONElement.JSONArray", () => [ { no: 1, name: "nodes", kind: "message", T: RGANode, repeated: true }, @@ -351,7 +348,7 @@ const JSONElement_JSONArray = proto3.makeMessageType( /** * @generated from message yorkie.v1.JSONElement.Primitive */ -const JSONElement_Primitive = proto3.makeMessageType( +export const JSONElement_Primitive = proto3.makeMessageType( "yorkie.v1.JSONElement.Primitive", () => [ { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(ValueType) }, @@ -366,7 +363,7 @@ const JSONElement_Primitive = proto3.makeMessageType( /** * @generated from message yorkie.v1.JSONElement.Text */ -const JSONElement_Text = proto3.makeMessageType( +export const JSONElement_Text = proto3.makeMessageType( "yorkie.v1.JSONElement.Text", () => [ { no: 1, name: "nodes", kind: "message", T: TextNode, repeated: true }, @@ -380,7 +377,7 @@ const JSONElement_Text = proto3.makeMessageType( /** * @generated from message yorkie.v1.JSONElement.Counter */ -const JSONElement_Counter = proto3.makeMessageType( +export const JSONElement_Counter = proto3.makeMessageType( "yorkie.v1.JSONElement.Counter", () => [ { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(ValueType) }, @@ -395,7 +392,7 @@ const JSONElement_Counter = proto3.makeMessageType( /** * @generated from message yorkie.v1.JSONElement.Tree */ -const JSONElement_Tree = proto3.makeMessageType( +export const JSONElement_Tree = proto3.makeMessageType( "yorkie.v1.JSONElement.Tree", () => [ { no: 1, name: "nodes", kind: "message", T: TreeNode, repeated: true }, @@ -409,7 +406,7 @@ const JSONElement_Tree = proto3.makeMessageType( /** * @generated from message yorkie.v1.RHTNode */ -const RHTNode = proto3.makeMessageType( +export const RHTNode = proto3.makeMessageType( "yorkie.v1.RHTNode", () => [ { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -420,7 +417,7 @@ const RHTNode = proto3.makeMessageType( /** * @generated from message yorkie.v1.RGANode */ -const RGANode = proto3.makeMessageType( +export const RGANode = proto3.makeMessageType( "yorkie.v1.RGANode", () => [ { no: 1, name: "next", kind: "message", T: RGANode }, @@ -431,7 +428,7 @@ const RGANode = proto3.makeMessageType( /** * @generated from message yorkie.v1.NodeAttr */ -const NodeAttr = proto3.makeMessageType( +export const NodeAttr = proto3.makeMessageType( "yorkie.v1.NodeAttr", () => [ { no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -443,7 +440,7 @@ const NodeAttr = proto3.makeMessageType( /** * @generated from message yorkie.v1.TextNode */ -const TextNode = proto3.makeMessageType( +export const TextNode = proto3.makeMessageType( "yorkie.v1.TextNode", () => [ { no: 1, name: "id", kind: "message", T: TextNodeID }, @@ -457,7 +454,7 @@ const TextNode = proto3.makeMessageType( /** * @generated from message yorkie.v1.TextNodeID */ -const TextNodeID = proto3.makeMessageType( +export const TextNodeID = proto3.makeMessageType( "yorkie.v1.TextNodeID", () => [ { no: 1, name: "created_at", kind: "message", T: TimeTicket }, @@ -468,7 +465,7 @@ const TextNodeID = proto3.makeMessageType( /** * @generated from message yorkie.v1.TreeNode */ -const TreeNode = proto3.makeMessageType( +export const TreeNode = proto3.makeMessageType( "yorkie.v1.TreeNode", () => [ { no: 1, name: "id", kind: "message", T: TreeNodeID }, @@ -485,7 +482,7 @@ const TreeNode = proto3.makeMessageType( /** * @generated from message yorkie.v1.TreeNodes */ -const TreeNodes = proto3.makeMessageType( +export const TreeNodes = proto3.makeMessageType( "yorkie.v1.TreeNodes", () => [ { no: 1, name: "content", kind: "message", T: TreeNode, repeated: true }, @@ -495,7 +492,7 @@ const TreeNodes = proto3.makeMessageType( /** * @generated from message yorkie.v1.TreeNodeID */ -const TreeNodeID = proto3.makeMessageType( +export const TreeNodeID = proto3.makeMessageType( "yorkie.v1.TreeNodeID", () => [ { no: 1, name: "created_at", kind: "message", T: TimeTicket }, @@ -506,7 +503,7 @@ const TreeNodeID = proto3.makeMessageType( /** * @generated from message yorkie.v1.TreePos */ -const TreePos = proto3.makeMessageType( +export const TreePos = proto3.makeMessageType( "yorkie.v1.TreePos", () => [ { no: 1, name: "parent_id", kind: "message", T: TreeNodeID }, @@ -517,7 +514,7 @@ const TreePos = proto3.makeMessageType( /** * @generated from message yorkie.v1.User */ -const User = proto3.makeMessageType( +export const User = proto3.makeMessageType( "yorkie.v1.User", () => [ { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -529,7 +526,7 @@ const User = proto3.makeMessageType( /** * @generated from message yorkie.v1.Project */ -const Project = proto3.makeMessageType( +export const Project = proto3.makeMessageType( "yorkie.v1.Project", () => [ { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -547,7 +544,7 @@ const Project = proto3.makeMessageType( /** * @generated from message yorkie.v1.UpdatableProjectFields */ -const UpdatableProjectFields = proto3.makeMessageType( +export const UpdatableProjectFields = proto3.makeMessageType( "yorkie.v1.UpdatableProjectFields", () => [ { no: 1, name: "name", kind: "message", T: StringValue }, @@ -560,7 +557,7 @@ const UpdatableProjectFields = proto3.makeMessageType( /** * @generated from message yorkie.v1.UpdatableProjectFields.AuthWebhookMethods */ -const UpdatableProjectFields_AuthWebhookMethods = proto3.makeMessageType( +export const UpdatableProjectFields_AuthWebhookMethods = proto3.makeMessageType( "yorkie.v1.UpdatableProjectFields.AuthWebhookMethods", () => [ { no: 1, name: "methods", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, @@ -571,7 +568,7 @@ const UpdatableProjectFields_AuthWebhookMethods = proto3.makeMessageType( /** * @generated from message yorkie.v1.DocumentSummary */ -const DocumentSummary = proto3.makeMessageType( +export const DocumentSummary = proto3.makeMessageType( "yorkie.v1.DocumentSummary", () => [ { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -586,7 +583,7 @@ const DocumentSummary = proto3.makeMessageType( /** * @generated from message yorkie.v1.PresenceChange */ -const PresenceChange = proto3.makeMessageType( +export const PresenceChange = proto3.makeMessageType( "yorkie.v1.PresenceChange", () => [ { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(PresenceChange_ChangeType) }, @@ -597,7 +594,7 @@ const PresenceChange = proto3.makeMessageType( /** * @generated from enum yorkie.v1.PresenceChange.ChangeType */ -const PresenceChange_ChangeType = proto3.makeEnum( +export const PresenceChange_ChangeType = proto3.makeEnum( "yorkie.v1.PresenceChange.ChangeType", [ {no: 0, name: "CHANGE_TYPE_UNSPECIFIED", localName: "UNSPECIFIED"}, @@ -610,7 +607,7 @@ const PresenceChange_ChangeType = proto3.makeEnum( /** * @generated from message yorkie.v1.Presence */ -const Presence = proto3.makeMessageType( +export const Presence = proto3.makeMessageType( "yorkie.v1.Presence", () => [ { no: 1, name: "data", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, @@ -620,7 +617,7 @@ const Presence = proto3.makeMessageType( /** * @generated from message yorkie.v1.Checkpoint */ -const Checkpoint = proto3.makeMessageType( +export const Checkpoint = proto3.makeMessageType( "yorkie.v1.Checkpoint", () => [ { no: 1, name: "server_seq", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */ }, @@ -631,7 +628,7 @@ const Checkpoint = proto3.makeMessageType( /** * @generated from message yorkie.v1.TextNodePos */ -const TextNodePos = proto3.makeMessageType( +export const TextNodePos = proto3.makeMessageType( "yorkie.v1.TextNodePos", () => [ { no: 1, name: "created_at", kind: "message", T: TimeTicket }, @@ -643,7 +640,7 @@ const TextNodePos = proto3.makeMessageType( /** * @generated from message yorkie.v1.TimeTicket */ -const TimeTicket = proto3.makeMessageType( +export const TimeTicket = proto3.makeMessageType( "yorkie.v1.TimeTicket", () => [ { no: 1, name: "lamport", kind: "scalar", T: 3 /* ScalarType.INT64 */, L: 1 /* LongType.STRING */ }, @@ -655,7 +652,7 @@ const TimeTicket = proto3.makeMessageType( /** * @generated from message yorkie.v1.DocEventBody */ -const DocEventBody = proto3.makeMessageType( +export const DocEventBody = proto3.makeMessageType( "yorkie.v1.DocEventBody", () => [ { no: 1, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -666,7 +663,7 @@ const DocEventBody = proto3.makeMessageType( /** * @generated from message yorkie.v1.DocEvent */ -const DocEvent = proto3.makeMessageType( +export const DocEvent = proto3.makeMessageType( "yorkie.v1.DocEvent", () => [ { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(DocEventType) }, @@ -675,51 +672,3 @@ const DocEvent = proto3.makeMessageType( ], ); - -exports.ValueType = ValueType; -exports.DocEventType = DocEventType; -exports.Snapshot = Snapshot; -exports.ChangePack = ChangePack; -exports.Change = Change; -exports.ChangeID = ChangeID; -exports.Operation = Operation; -exports.Operation_Set = Operation_Set; -exports.Operation_Add = Operation_Add; -exports.Operation_Move = Operation_Move; -exports.Operation_Remove = Operation_Remove; -exports.Operation_Edit = Operation_Edit; -exports.Operation_Select = Operation_Select; -exports.Operation_Style = Operation_Style; -exports.Operation_Increase = Operation_Increase; -exports.Operation_TreeEdit = Operation_TreeEdit; -exports.Operation_TreeStyle = Operation_TreeStyle; -exports.JSONElementSimple = JSONElementSimple; -exports.JSONElement = JSONElement; -exports.JSONElement_JSONObject = JSONElement_JSONObject; -exports.JSONElement_JSONArray = JSONElement_JSONArray; -exports.JSONElement_Primitive = JSONElement_Primitive; -exports.JSONElement_Text = JSONElement_Text; -exports.JSONElement_Counter = JSONElement_Counter; -exports.JSONElement_Tree = JSONElement_Tree; -exports.RHTNode = RHTNode; -exports.RGANode = RGANode; -exports.NodeAttr = NodeAttr; -exports.TextNode = TextNode; -exports.TextNodeID = TextNodeID; -exports.TreeNode = TreeNode; -exports.TreeNodes = TreeNodes; -exports.TreeNodeID = TreeNodeID; -exports.TreePos = TreePos; -exports.User = User; -exports.Project = Project; -exports.UpdatableProjectFields = UpdatableProjectFields; -exports.UpdatableProjectFields_AuthWebhookMethods = UpdatableProjectFields_AuthWebhookMethods; -exports.DocumentSummary = DocumentSummary; -exports.PresenceChange = PresenceChange; -exports.PresenceChange_ChangeType = PresenceChange_ChangeType; -exports.Presence = Presence; -exports.Checkpoint = Checkpoint; -exports.TextNodePos = TextNodePos; -exports.TimeTicket = TimeTicket; -exports.DocEventBody = DocEventBody; -exports.DocEvent = DocEvent; diff --git a/src/api/yorkie/v1/yorkie_connect.d.ts b/src/api/yorkie/v1/yorkie_connect.d.ts index 89315b90a..3bb2e01ea 100644 --- a/src/api/yorkie/v1/yorkie_connect.d.ts +++ b/src/api/yorkie/v1/yorkie_connect.d.ts @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-es v1.2.0 with parameter "target=js+dts,js_import_style=legacy_commonjs" +// @generated by protoc-gen-connect-es v1.2.0 with parameter "target=js+dts,js_import_style=module" // @generated from file src/api/yorkie/v1/yorkie.proto (package yorkie.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/src/api/yorkie/v1/yorkie_connect.js b/src/api/yorkie/v1/yorkie_connect.js index 2e1be4fdb..49e24a07b 100644 --- a/src/api/yorkie/v1/yorkie_connect.js +++ b/src/api/yorkie/v1/yorkie_connect.js @@ -13,23 +13,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-es v1.2.0 with parameter "target=js+dts,js_import_style=legacy_commonjs" +// @generated by protoc-gen-connect-es v1.2.0 with parameter "target=js+dts,js_import_style=module" // @generated from file src/api/yorkie/v1/yorkie.proto (package yorkie.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); - -const { ActivateClientRequest, ActivateClientResponse, AttachDocumentRequest, AttachDocumentResponse, BroadcastRequest, BroadcastResponse, DeactivateClientRequest, DeactivateClientResponse, DetachDocumentRequest, DetachDocumentResponse, PushPullChangesRequest, PushPullChangesResponse, RemoveDocumentRequest, RemoveDocumentResponse, WatchDocumentRequest, WatchDocumentResponse } = require("./yorkie_pb.js"); -const { MethodKind } = require("@bufbuild/protobuf"); +import { ActivateClientRequest, ActivateClientResponse, AttachDocumentRequest, AttachDocumentResponse, BroadcastRequest, BroadcastResponse, DeactivateClientRequest, DeactivateClientResponse, DetachDocumentRequest, DetachDocumentResponse, PushPullChangesRequest, PushPullChangesResponse, RemoveDocumentRequest, RemoveDocumentResponse, WatchDocumentRequest, WatchDocumentResponse } from "./yorkie_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; /** * Yorkie is a service that provides a API for SDKs. * * @generated from service yorkie.v1.YorkieService */ -const YorkieService = { +export const YorkieService = { typeName: "yorkie.v1.YorkieService", methods: { /** @@ -107,5 +104,3 @@ const YorkieService = { } }; - -exports.YorkieService = YorkieService; diff --git a/src/api/yorkie/v1/yorkie_pb.d.ts b/src/api/yorkie/v1/yorkie_pb.d.ts index 0c685f6ad..fa54d0267 100644 --- a/src/api/yorkie/v1/yorkie_pb.d.ts +++ b/src/api/yorkie/v1/yorkie_pb.d.ts @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-es v1.6.0 with parameter "target=js+dts,js_import_style=legacy_commonjs" +// @generated by protoc-gen-es v1.6.0 with parameter "target=js+dts,js_import_style=module" // @generated from file src/api/yorkie/v1/yorkie.proto (package yorkie.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/src/api/yorkie/v1/yorkie_pb.js b/src/api/yorkie/v1/yorkie_pb.js index 97b8ad6e8..95abb98d2 100644 --- a/src/api/yorkie/v1/yorkie_pb.js +++ b/src/api/yorkie/v1/yorkie_pb.js @@ -13,21 +13,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-es v1.6.0 with parameter "target=js+dts,js_import_style=legacy_commonjs" +// @generated by protoc-gen-es v1.6.0 with parameter "target=js+dts,js_import_style=module" // @generated from file src/api/yorkie/v1/yorkie.proto (package yorkie.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); - -const { proto3 } = require("@bufbuild/protobuf"); -const { ChangePack, DocEvent } = require("./resources_pb.js"); +import { proto3 } from "@bufbuild/protobuf"; +import { ChangePack, DocEvent } from "./resources_pb.js"; /** * @generated from message yorkie.v1.ActivateClientRequest */ -const ActivateClientRequest = proto3.makeMessageType( +export const ActivateClientRequest = proto3.makeMessageType( "yorkie.v1.ActivateClientRequest", () => [ { no: 1, name: "client_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -37,7 +34,7 @@ const ActivateClientRequest = proto3.makeMessageType( /** * @generated from message yorkie.v1.ActivateClientResponse */ -const ActivateClientResponse = proto3.makeMessageType( +export const ActivateClientResponse = proto3.makeMessageType( "yorkie.v1.ActivateClientResponse", () => [ { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -47,7 +44,7 @@ const ActivateClientResponse = proto3.makeMessageType( /** * @generated from message yorkie.v1.DeactivateClientRequest */ -const DeactivateClientRequest = proto3.makeMessageType( +export const DeactivateClientRequest = proto3.makeMessageType( "yorkie.v1.DeactivateClientRequest", () => [ { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -57,7 +54,7 @@ const DeactivateClientRequest = proto3.makeMessageType( /** * @generated from message yorkie.v1.DeactivateClientResponse */ -const DeactivateClientResponse = proto3.makeMessageType( +export const DeactivateClientResponse = proto3.makeMessageType( "yorkie.v1.DeactivateClientResponse", [], ); @@ -65,7 +62,7 @@ const DeactivateClientResponse = proto3.makeMessageType( /** * @generated from message yorkie.v1.AttachDocumentRequest */ -const AttachDocumentRequest = proto3.makeMessageType( +export const AttachDocumentRequest = proto3.makeMessageType( "yorkie.v1.AttachDocumentRequest", () => [ { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -76,7 +73,7 @@ const AttachDocumentRequest = proto3.makeMessageType( /** * @generated from message yorkie.v1.AttachDocumentResponse */ -const AttachDocumentResponse = proto3.makeMessageType( +export const AttachDocumentResponse = proto3.makeMessageType( "yorkie.v1.AttachDocumentResponse", () => [ { no: 1, name: "document_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -87,7 +84,7 @@ const AttachDocumentResponse = proto3.makeMessageType( /** * @generated from message yorkie.v1.DetachDocumentRequest */ -const DetachDocumentRequest = proto3.makeMessageType( +export const DetachDocumentRequest = proto3.makeMessageType( "yorkie.v1.DetachDocumentRequest", () => [ { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -100,7 +97,7 @@ const DetachDocumentRequest = proto3.makeMessageType( /** * @generated from message yorkie.v1.DetachDocumentResponse */ -const DetachDocumentResponse = proto3.makeMessageType( +export const DetachDocumentResponse = proto3.makeMessageType( "yorkie.v1.DetachDocumentResponse", () => [ { no: 2, name: "change_pack", kind: "message", T: ChangePack }, @@ -110,7 +107,7 @@ const DetachDocumentResponse = proto3.makeMessageType( /** * @generated from message yorkie.v1.WatchDocumentRequest */ -const WatchDocumentRequest = proto3.makeMessageType( +export const WatchDocumentRequest = proto3.makeMessageType( "yorkie.v1.WatchDocumentRequest", () => [ { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -121,7 +118,7 @@ const WatchDocumentRequest = proto3.makeMessageType( /** * @generated from message yorkie.v1.WatchDocumentResponse */ -const WatchDocumentResponse = proto3.makeMessageType( +export const WatchDocumentResponse = proto3.makeMessageType( "yorkie.v1.WatchDocumentResponse", () => [ { no: 1, name: "initialization", kind: "message", T: WatchDocumentResponse_Initialization, oneof: "body" }, @@ -132,7 +129,7 @@ const WatchDocumentResponse = proto3.makeMessageType( /** * @generated from message yorkie.v1.WatchDocumentResponse.Initialization */ -const WatchDocumentResponse_Initialization = proto3.makeMessageType( +export const WatchDocumentResponse_Initialization = proto3.makeMessageType( "yorkie.v1.WatchDocumentResponse.Initialization", () => [ { no: 1, name: "client_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, @@ -143,7 +140,7 @@ const WatchDocumentResponse_Initialization = proto3.makeMessageType( /** * @generated from message yorkie.v1.RemoveDocumentRequest */ -const RemoveDocumentRequest = proto3.makeMessageType( +export const RemoveDocumentRequest = proto3.makeMessageType( "yorkie.v1.RemoveDocumentRequest", () => [ { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -155,7 +152,7 @@ const RemoveDocumentRequest = proto3.makeMessageType( /** * @generated from message yorkie.v1.RemoveDocumentResponse */ -const RemoveDocumentResponse = proto3.makeMessageType( +export const RemoveDocumentResponse = proto3.makeMessageType( "yorkie.v1.RemoveDocumentResponse", () => [ { no: 1, name: "change_pack", kind: "message", T: ChangePack }, @@ -165,7 +162,7 @@ const RemoveDocumentResponse = proto3.makeMessageType( /** * @generated from message yorkie.v1.PushPullChangesRequest */ -const PushPullChangesRequest = proto3.makeMessageType( +export const PushPullChangesRequest = proto3.makeMessageType( "yorkie.v1.PushPullChangesRequest", () => [ { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -178,7 +175,7 @@ const PushPullChangesRequest = proto3.makeMessageType( /** * @generated from message yorkie.v1.PushPullChangesResponse */ -const PushPullChangesResponse = proto3.makeMessageType( +export const PushPullChangesResponse = proto3.makeMessageType( "yorkie.v1.PushPullChangesResponse", () => [ { no: 1, name: "change_pack", kind: "message", T: ChangePack }, @@ -188,7 +185,7 @@ const PushPullChangesResponse = proto3.makeMessageType( /** * @generated from message yorkie.v1.BroadcastRequest */ -const BroadcastRequest = proto3.makeMessageType( +export const BroadcastRequest = proto3.makeMessageType( "yorkie.v1.BroadcastRequest", () => [ { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -201,26 +198,8 @@ const BroadcastRequest = proto3.makeMessageType( /** * @generated from message yorkie.v1.BroadcastResponse */ -const BroadcastResponse = proto3.makeMessageType( +export const BroadcastResponse = proto3.makeMessageType( "yorkie.v1.BroadcastResponse", [], ); - -exports.ActivateClientRequest = ActivateClientRequest; -exports.ActivateClientResponse = ActivateClientResponse; -exports.DeactivateClientRequest = DeactivateClientRequest; -exports.DeactivateClientResponse = DeactivateClientResponse; -exports.AttachDocumentRequest = AttachDocumentRequest; -exports.AttachDocumentResponse = AttachDocumentResponse; -exports.DetachDocumentRequest = DetachDocumentRequest; -exports.DetachDocumentResponse = DetachDocumentResponse; -exports.WatchDocumentRequest = WatchDocumentRequest; -exports.WatchDocumentResponse = WatchDocumentResponse; -exports.WatchDocumentResponse_Initialization = WatchDocumentResponse_Initialization; -exports.RemoveDocumentRequest = RemoveDocumentRequest; -exports.RemoveDocumentResponse = RemoveDocumentResponse; -exports.PushPullChangesRequest = PushPullChangesRequest; -exports.PushPullChangesResponse = PushPullChangesResponse; -exports.BroadcastRequest = BroadcastRequest; -exports.BroadcastResponse = BroadcastResponse;