@inline-chat/protocol 0.0.1 → 0.0.2

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
@@ -17,8 +17,6 @@ bun add @inline-chat/protocol
17
17
 
18
18
  - `@inline-chat/protocol`
19
19
  - `@inline-chat/protocol/core`
20
- - `@inline-chat/protocol/client`
21
- - `@inline-chat/protocol/server`
22
20
 
23
21
  ## Regenerate
24
22
 
package/dist/index.d.ts CHANGED
@@ -1,3 +1 @@
1
1
  export * from "./core.js";
2
- export * from "./client.js";
3
- export * from "./server.js";
package/dist/index.js CHANGED
@@ -1,3 +1 @@
1
1
  export * from "./core.js";
2
- export * from "./client.js";
3
- export * from "./server.js";
package/package.json CHANGED
@@ -1,10 +1,14 @@
1
1
  {
2
2
  "name": "@inline-chat/protocol",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [
7
- "dist"
7
+ "dist/core.d.ts",
8
+ "dist/core.js",
9
+ "dist/index.d.ts",
10
+ "dist/index.js",
11
+ "README.md"
8
12
  ],
9
13
  "main": "./dist/index.js",
10
14
  "types": "./dist/index.d.ts",
@@ -16,14 +20,6 @@
16
20
  "./core": {
17
21
  "types": "./dist/core.d.ts",
18
22
  "default": "./dist/core.js"
19
- },
20
- "./client": {
21
- "types": "./dist/client.d.ts",
22
- "default": "./dist/client.js"
23
- },
24
- "./server": {
25
- "types": "./dist/server.d.ts",
26
- "default": "./dist/server.js"
27
23
  }
28
24
  },
29
25
  "scripts": {
package/dist/client.d.ts DELETED
@@ -1,35 +0,0 @@
1
- import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
- import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
- import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
- import type { IBinaryReader } from "@protobuf-ts/runtime";
5
- import type { PartialMessage } from "@protobuf-ts/runtime";
6
- import { MessageType } from "@protobuf-ts/runtime";
7
- import { RpcCall } from "./core.js";
8
- /**
9
- * @generated from protobuf message client.Transaction
10
- */
11
- export interface Transaction {
12
- /**
13
- * @generated from protobuf field: string id = 1;
14
- */
15
- id: string;
16
- /**
17
- * @generated from protobuf field: int64 date = 2;
18
- */
19
- date: bigint;
20
- /**
21
- * @generated from protobuf field: RpcCall call = 3;
22
- */
23
- call?: RpcCall;
24
- }
25
- declare class Transaction$Type extends MessageType<Transaction> {
26
- constructor();
27
- create(value?: PartialMessage<Transaction>): Transaction;
28
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Transaction): Transaction;
29
- internalBinaryWrite(message: Transaction, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
30
- }
31
- /**
32
- * @generated MessageType for protobuf message client.Transaction
33
- */
34
- export declare const Transaction: Transaction$Type;
35
- export {};
package/dist/client.js DELETED
@@ -1,67 +0,0 @@
1
- import { WireType } from "@protobuf-ts/runtime";
2
- import { UnknownFieldHandler } from "@protobuf-ts/runtime";
3
- import { reflectionMergePartial } from "@protobuf-ts/runtime";
4
- import { MessageType } from "@protobuf-ts/runtime";
5
- import { RpcCall } from "./core.js";
6
- // @generated message type with reflection information, may provide speed optimized methods
7
- class Transaction$Type extends MessageType {
8
- constructor() {
9
- super("client.Transaction", [
10
- { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
11
- { no: 2, name: "date", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
12
- { no: 3, name: "call", kind: "message", T: () => RpcCall }
13
- ]);
14
- }
15
- create(value) {
16
- const message = globalThis.Object.create((this.messagePrototype));
17
- message.id = "";
18
- message.date = 0n;
19
- if (value !== undefined)
20
- reflectionMergePartial(this, message, value);
21
- return message;
22
- }
23
- internalBinaryRead(reader, length, options, target) {
24
- let message = target ?? this.create(), end = reader.pos + length;
25
- while (reader.pos < end) {
26
- let [fieldNo, wireType] = reader.tag();
27
- switch (fieldNo) {
28
- case /* string id */ 1:
29
- message.id = reader.string();
30
- break;
31
- case /* int64 date */ 2:
32
- message.date = reader.int64().toBigInt();
33
- break;
34
- case /* RpcCall call */ 3:
35
- message.call = RpcCall.internalBinaryRead(reader, reader.uint32(), options, message.call);
36
- break;
37
- default:
38
- let u = options.readUnknownField;
39
- if (u === "throw")
40
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
41
- let d = reader.skip(wireType);
42
- if (u !== false)
43
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
44
- }
45
- }
46
- return message;
47
- }
48
- internalBinaryWrite(message, writer, options) {
49
- /* string id = 1; */
50
- if (message.id !== "")
51
- writer.tag(1, WireType.LengthDelimited).string(message.id);
52
- /* int64 date = 2; */
53
- if (message.date !== 0n)
54
- writer.tag(2, WireType.Varint).int64(message.date);
55
- /* RpcCall call = 3; */
56
- if (message.call)
57
- RpcCall.internalBinaryWrite(message.call, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
58
- let u = options.writeUnknownFields;
59
- if (u !== false)
60
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
61
- return writer;
62
- }
63
- }
64
- /**
65
- * @generated MessageType for protobuf message client.Transaction
66
- */
67
- export const Transaction = new Transaction$Type();