@thru/thru-sdk 0.1.19 → 0.1.21

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.
Files changed (88) hide show
  1. package/README.md +19 -0
  2. package/dist/{chunk-PH7P5EEU.js → chunk-SHMREHP5.js} +13 -9
  3. package/dist/chunk-SHMREHP5.js.map +1 -0
  4. package/dist/client.d.ts +2 -1
  5. package/dist/client.js +3 -2
  6. package/dist/client.js.map +1 -1
  7. package/dist/metafile-esm.json +1 -1
  8. package/dist/sdk.d.ts +3 -3
  9. package/dist/sdk.js +1 -1
  10. package/dist/{transactions-BzD9hYlc.d.ts → transactions-CLezIeXO.d.ts} +20 -18
  11. package/package.json +7 -3
  12. package/buf.gen.yaml +0 -12
  13. package/buf.lock +0 -9
  14. package/buf.yaml +0 -15
  15. package/dist/chunk-PH7P5EEU.js.map +0 -1
  16. package/proto/thru/common/v1/consensus.proto +0 -73
  17. package/proto/thru/common/v1/errors.proto +0 -65
  18. package/proto/thru/common/v1/filters.proto +0 -60
  19. package/proto/thru/common/v1/pagination.proto +0 -45
  20. package/proto/thru/core/v1/account.proto +0 -137
  21. package/proto/thru/core/v1/block.proto +0 -80
  22. package/proto/thru/core/v1/state.proto +0 -35
  23. package/proto/thru/core/v1/transaction.proto +0 -136
  24. package/proto/thru/core/v1/types.proto +0 -50
  25. package/proto/thru/services/v1/command_service.proto +0 -70
  26. package/proto/thru/services/v1/query_service.proto +0 -344
  27. package/proto/thru/services/v1/streaming_service.proto +0 -126
  28. package/thru-ts-client-sdk/__tests__/helpers/test-utils.ts +0 -228
  29. package/thru-ts-client-sdk/client.ts +0 -10
  30. package/thru-ts-client-sdk/core/__tests__/bound-client.test.ts +0 -354
  31. package/thru-ts-client-sdk/core/__tests__/client.test.ts +0 -53
  32. package/thru-ts-client-sdk/core/bound-client.ts +0 -156
  33. package/thru-ts-client-sdk/core/client.ts +0 -38
  34. package/thru-ts-client-sdk/defaults.ts +0 -26
  35. package/thru-ts-client-sdk/modules/__tests__/accounts.test.ts +0 -406
  36. package/thru-ts-client-sdk/modules/__tests__/blocks.test.ts +0 -199
  37. package/thru-ts-client-sdk/modules/__tests__/events.test.ts +0 -74
  38. package/thru-ts-client-sdk/modules/__tests__/height.test.ts +0 -39
  39. package/thru-ts-client-sdk/modules/__tests__/helpers.test.ts +0 -288
  40. package/thru-ts-client-sdk/modules/__tests__/keys.test.ts +0 -55
  41. package/thru-ts-client-sdk/modules/__tests__/proofs.test.ts +0 -119
  42. package/thru-ts-client-sdk/modules/__tests__/streaming.test.ts +0 -152
  43. package/thru-ts-client-sdk/modules/__tests__/transactions.test.ts +0 -730
  44. package/thru-ts-client-sdk/modules/__tests__/version.test.ts +0 -40
  45. package/thru-ts-client-sdk/modules/accounts.ts +0 -141
  46. package/thru-ts-client-sdk/modules/blocks.ts +0 -75
  47. package/thru-ts-client-sdk/modules/events.ts +0 -20
  48. package/thru-ts-client-sdk/modules/height.ts +0 -9
  49. package/thru-ts-client-sdk/modules/helpers.ts +0 -131
  50. package/thru-ts-client-sdk/modules/keys.ts +0 -29
  51. package/thru-ts-client-sdk/modules/proofs.ts +0 -20
  52. package/thru-ts-client-sdk/modules/streaming.ts +0 -133
  53. package/thru-ts-client-sdk/modules/transactions.ts +0 -374
  54. package/thru-ts-client-sdk/modules/version.ts +0 -10
  55. package/thru-ts-client-sdk/proto/buf/validate/validate_pb.ts +0 -4761
  56. package/thru-ts-client-sdk/proto/google/api/annotations_pb.ts +0 -39
  57. package/thru-ts-client-sdk/proto/google/api/client_pb.ts +0 -953
  58. package/thru-ts-client-sdk/proto/google/api/field_behavior_pb.ts +0 -157
  59. package/thru-ts-client-sdk/proto/google/api/http_pb.ts +0 -474
  60. package/thru-ts-client-sdk/proto/google/api/launch_stage_pb.ts +0 -118
  61. package/thru-ts-client-sdk/proto/thru/common/v1/consensus_pb.ts +0 -162
  62. package/thru-ts-client-sdk/proto/thru/common/v1/errors_pb.ts +0 -129
  63. package/thru-ts-client-sdk/proto/thru/common/v1/filters_pb.ts +0 -129
  64. package/thru-ts-client-sdk/proto/thru/common/v1/pagination_pb.ts +0 -79
  65. package/thru-ts-client-sdk/proto/thru/core/v1/account_pb.ts +0 -359
  66. package/thru-ts-client-sdk/proto/thru/core/v1/block_pb.ts +0 -259
  67. package/thru-ts-client-sdk/proto/thru/core/v1/state_pb.ts +0 -103
  68. package/thru-ts-client-sdk/proto/thru/core/v1/transaction_pb.ts +0 -528
  69. package/thru-ts-client-sdk/proto/thru/core/v1/types_pb.ts +0 -100
  70. package/thru-ts-client-sdk/proto/thru/services/v1/command_service_pb.ts +0 -146
  71. package/thru-ts-client-sdk/proto/thru/services/v1/query_service_pb.ts +0 -819
  72. package/thru-ts-client-sdk/proto/thru/services/v1/streaming_service_pb.ts +0 -390
  73. package/thru-ts-client-sdk/sdk.ts +0 -42
  74. package/thru-ts-client-sdk/test-scripts/counter.ts +0 -469
  75. package/thru-ts-client-sdk/test-scripts/create-account.ts +0 -74
  76. package/thru-ts-client-sdk/test-scripts/get-height.ts +0 -52
  77. package/thru-ts-client-sdk/transactions/Transaction.ts +0 -240
  78. package/thru-ts-client-sdk/transactions/TransactionBuilder.ts +0 -53
  79. package/thru-ts-client-sdk/transactions/__tests__/TransactionBuilder.test.ts +0 -411
  80. package/thru-ts-client-sdk/transactions/__tests__/utils.test.ts +0 -214
  81. package/thru-ts-client-sdk/transactions/index.ts +0 -3
  82. package/thru-ts-client-sdk/transactions/types.ts +0 -74
  83. package/thru-ts-client-sdk/transactions/utils.ts +0 -132
  84. package/thru-ts-client-sdk/types/types.ts +0 -8
  85. package/thru-ts-client-sdk/utils/utils.ts +0 -27
  86. package/tsconfig.json +0 -9
  87. package/tsup.config.ts +0 -14
  88. package/vitest.config.ts +0 -31
@@ -1,214 +0,0 @@
1
- import { decodeAddress } from "@thru/helpers";
2
- import { describe, expect, it } from "vitest";
3
- import { generateTestAddress, generateTestPubkey } from "../../__tests__/helpers/test-utils";
4
- import {
5
- normalizeAccountList,
6
- parseAccountIdentifier,
7
- parseInstructionData,
8
- resolveProgramIdentifier,
9
- } from "../utils";
10
-
11
- describe("transaction utils", () => {
12
- describe("normalizeAccountList", () => {
13
- it("should return empty array for empty input", () => {
14
- const result = normalizeAccountList([]);
15
- expect(result).toEqual([]);
16
- });
17
-
18
- it("should return single account unchanged", () => {
19
- const account = generateTestPubkey(0x01);
20
- const result = normalizeAccountList([account]);
21
-
22
- expect(result).toHaveLength(1);
23
- expect(result[0]).toEqual(account);
24
- });
25
-
26
- it("should deduplicate accounts", () => {
27
- const account1 = generateTestPubkey(0x01);
28
- const account2 = generateTestPubkey(0x02);
29
- const account1Duplicate = new Uint8Array(account1);
30
-
31
- const result = normalizeAccountList([account1, account2, account1Duplicate]);
32
-
33
- expect(result).toHaveLength(2);
34
- expect(result[0]).toEqual(account1);
35
- expect(result[1]).toEqual(account2);
36
- });
37
-
38
- it("should sort accounts", () => {
39
- const account1 = generateTestPubkey(0x02);
40
- const account2 = generateTestPubkey(0x01);
41
- const account3 = generateTestPubkey(0x03);
42
-
43
- const result = normalizeAccountList([account1, account2, account3]);
44
-
45
- expect(result).toHaveLength(3);
46
- // Should be sorted
47
- expect(result[0]).toEqual(account2); // 0x01
48
- expect(result[1]).toEqual(account1); // 0x02
49
- expect(result[2]).toEqual(account3); // 0x03
50
- });
51
-
52
- it("should throw error for too many accounts", () => {
53
- const accounts = Array.from({ length: 1025 }, () => generateTestPubkey());
54
-
55
- expect(() => normalizeAccountList(accounts)).toThrow("Too many accounts provided: 1025 (max 1024)");
56
- });
57
-
58
- it("should throw error for invalid account length", () => {
59
- const invalidAccount = new Uint8Array(31); // Should be 32
60
-
61
- expect(() => normalizeAccountList([invalidAccount])).toThrow("Account addresses must contain 32 bytes");
62
- });
63
- });
64
-
65
- describe("resolveProgramIdentifier", () => {
66
- it("should accept Uint8Array with 32 bytes", () => {
67
- const program = generateTestPubkey(0x01);
68
- const result = resolveProgramIdentifier(program);
69
-
70
- expect(result).toEqual(program);
71
- expect(result).not.toBe(program); // Should be a copy
72
- });
73
-
74
- it("should accept ta- prefixed address string", () => {
75
- const address = generateTestAddress(0x01);
76
- const result = resolveProgramIdentifier(address);
77
-
78
- expect(result.length).toBe(32);
79
- const decoded = decodeAddress(address);
80
- expect(result).toEqual(decoded);
81
- });
82
-
83
- it("should accept hex string", () => {
84
- const programBytes = generateTestPubkey(0x01);
85
- const hexString = Array.from(programBytes)
86
- .map(b => b.toString(16).padStart(2, "0"))
87
- .join("");
88
-
89
- const result = resolveProgramIdentifier(hexString);
90
-
91
- expect(result.length).toBe(32);
92
- expect(result).toEqual(programBytes);
93
- });
94
-
95
- it("should throw error for Uint8Array with wrong length", () => {
96
- const invalidProgram = new Uint8Array(31);
97
-
98
- expect(() => resolveProgramIdentifier(invalidProgram)).toThrow("Program public key must contain 32 bytes");
99
- });
100
-
101
- it("should throw error for invalid string format", () => {
102
- expect(() => resolveProgramIdentifier("invalid-format")).toThrow("Unsupported program identifier format");
103
- });
104
-
105
- it("should throw error for hex string with wrong length", () => {
106
- const shortHex = "0123"; // Too short
107
-
108
- expect(() => resolveProgramIdentifier(shortHex)).toThrow("Hex-encoded program key must contain 32 bytes");
109
- });
110
- });
111
-
112
- describe("parseAccountIdentifier", () => {
113
- it("should accept Uint8Array with 32 bytes", () => {
114
- const account = generateTestPubkey(0x01);
115
- const result = parseAccountIdentifier(account, "testField");
116
-
117
- expect(result).toEqual(account);
118
- expect(result).not.toBe(account); // Should be a copy
119
- });
120
-
121
- it("should accept ta- prefixed address string", () => {
122
- const address = generateTestAddress(0x01);
123
- const result = parseAccountIdentifier(address, "testField");
124
-
125
- expect(result.length).toBe(32);
126
- const decoded = decodeAddress(address);
127
- expect(result).toEqual(decoded);
128
- });
129
-
130
- it("should accept hex string", () => {
131
- const accountBytes = generateTestPubkey(0x01);
132
- const hexString = Array.from(accountBytes)
133
- .map(b => b.toString(16).padStart(2, "0"))
134
- .join("");
135
-
136
- const result = parseAccountIdentifier(hexString, "testField");
137
-
138
- expect(result.length).toBe(32);
139
- expect(result).toEqual(accountBytes);
140
- });
141
-
142
- it("should throw error for Uint8Array with wrong length", () => {
143
- const invalidAccount = new Uint8Array(31);
144
-
145
- expect(() => parseAccountIdentifier(invalidAccount, "testField")).toThrow("testField must contain 32 bytes");
146
- });
147
-
148
- it("should throw error for invalid string format", () => {
149
- expect(() => parseAccountIdentifier("invalid-format", "testField")).toThrow(
150
- "testField must be a 32-byte value, ta-address, or 64-character hex string"
151
- );
152
- });
153
-
154
- it("should include field name in error message", () => {
155
- const invalidAccount = new Uint8Array(31);
156
-
157
- expect(() => parseAccountIdentifier(invalidAccount, "myCustomField")).toThrow("myCustomField must contain 32 bytes");
158
- });
159
- });
160
-
161
- describe("parseInstructionData", () => {
162
- it("should return undefined for undefined input", () => {
163
- const result = parseInstructionData(undefined);
164
- expect(result).toBeUndefined();
165
- });
166
-
167
- it("should accept Uint8Array", () => {
168
- const data = new Uint8Array([0x01, 0x02, 0x03]);
169
- const result = parseInstructionData(data);
170
-
171
- expect(result).toEqual(data);
172
- expect(result).not.toBe(data); // Should be a copy
173
- });
174
-
175
- it("should accept empty Uint8Array", () => {
176
- const data = new Uint8Array(0);
177
- const result = parseInstructionData(data);
178
-
179
- expect(result).toEqual(data);
180
- });
181
-
182
- it("should accept hex string", () => {
183
- const dataBytes = new Uint8Array([0x01, 0x02, 0x03]);
184
- const hexString = Array.from(dataBytes)
185
- .map(b => b.toString(16).padStart(2, "0"))
186
- .join("");
187
-
188
- const result = parseInstructionData(hexString);
189
-
190
- expect(result).toEqual(dataBytes);
191
- });
192
-
193
- it("should accept empty hex string", () => {
194
- const result = parseInstructionData("");
195
-
196
- expect(result).toBeInstanceOf(Uint8Array);
197
- expect(result?.length).toBe(0);
198
- });
199
-
200
- it("should throw error for invalid string format", () => {
201
- expect(() => parseInstructionData("not-hex")).toThrow("Instruction data must be provided as hex string or Uint8Array");
202
- });
203
-
204
- it("should handle large instruction data", () => {
205
- const largeData = new Uint8Array(1000);
206
- largeData.fill(0x42);
207
- const result = parseInstructionData(largeData);
208
-
209
- expect(result).toEqual(largeData);
210
- expect(result?.length).toBe(1000);
211
- });
212
- });
213
- });
214
-
@@ -1,3 +0,0 @@
1
- export * from "./Transaction";
2
- export * from "./TransactionBuilder";
3
- export * from "./types";
@@ -1,74 +0,0 @@
1
- import { BytesLike } from "@thru/helpers";
2
-
3
- export type Bytes32 = Uint8Array;
4
- export type Bytes64 = Uint8Array;
5
-
6
- export type AccountAddress = Bytes32;
7
-
8
- export type ProgramIdentifier = BytesLike;
9
-
10
- export interface ResourceLimits {
11
- computeUnits?: number;
12
- stateUnits?: number;
13
- memoryUnits?: number;
14
- }
15
-
16
- export interface OptionalProofs {
17
- feePayerStateProof?: Uint8Array;
18
- feePayerAccountMetaRaw?: Uint8Array;
19
- }
20
-
21
- export interface TransactionHeaderInput extends ResourceLimits {
22
- fee: bigint;
23
- nonce: bigint;
24
- startSlot: bigint;
25
- expiryAfter?: number;
26
- flags?: number;
27
- }
28
-
29
- export interface TransactionAccountsInput {
30
- readWriteAccounts?: AccountAddress[];
31
- readOnlyAccounts?: AccountAddress[];
32
- }
33
-
34
- /**
35
- * Builder context provided to instruction data functions.
36
- * Contains all transaction accounts in their final sorted order and helper functions
37
- * for looking up account indexes.
38
- */
39
- export interface TransactionBuilderContext {
40
- /** All accounts in final transaction order: [feePayer, program, ...readWrite, ...readOnly] */
41
- accounts: AccountAddress[];
42
- /** Get the index of an account by its public key. Throws if account is not found in transaction. */
43
- getAccountIndex: (pubkey: AccountAddress) => number;
44
- }
45
-
46
-
47
-
48
- export interface FeePayerInput {
49
- publicKey: AccountAddress;
50
- privateKey?: Bytes32;
51
- }
52
-
53
- export interface BuildTransactionParams {
54
- feePayer: FeePayerInput;
55
- program: ProgramIdentifier;
56
- header: TransactionHeaderInput;
57
- accounts?: TransactionAccountsInput;
58
- instructionData?: BytesLike;
59
- proofs?: OptionalProofs;
60
- }
61
-
62
- export interface BuiltTransactionResult {
63
- transaction: TransactionLike;
64
- }
65
-
66
- export interface SignedTransactionResult extends BuiltTransactionResult {
67
- signature: Bytes64;
68
- rawTransaction: Uint8Array;
69
- }
70
-
71
- // Forward declaration to avoid circular imports in type layer
72
- export interface TransactionLike {
73
- toWire(): Uint8Array;
74
- }
@@ -1,132 +0,0 @@
1
- import { BytesLike, decodeAddress, hexToBytes, isHexString } from "@thru/helpers";
2
- import type { AccountAddress, ProgramIdentifier } from "./types";
3
-
4
- const ACCOUNT_LIMIT = 1024;
5
-
6
- export function normalizeAccountList(accounts: AccountAddress[]): AccountAddress[] {
7
- if (accounts.length === 0) {
8
- return [];
9
- }
10
-
11
- if (accounts.length > ACCOUNT_LIMIT) {
12
- throw new Error(`Too many accounts provided: ${accounts.length} (max ${ACCOUNT_LIMIT})`);
13
- }
14
-
15
- const deduped = dedupeAccountList(accounts);
16
- return deduped;
17
- }
18
-
19
- function dedupeAccountList(accounts: AccountAddress[]): AccountAddress[] {
20
- const seen = new Map<string, AccountAddress>();
21
- for (const account of accounts) {
22
- if (account.length !== 32) {
23
- throw new Error("Account addresses must contain 32 bytes");
24
- }
25
-
26
- const key = toHex(account);
27
- if (!seen.has(key)) {
28
- seen.set(key, new Uint8Array(account));
29
- }
30
- }
31
-
32
- return Array.from(seen.values()).sort(compareAccounts);
33
- }
34
-
35
- function compareAccounts(a: Uint8Array, b: Uint8Array): number {
36
- for (let i = 0; i < 32; i++) {
37
- if (a[i] !== b[i]) {
38
- return a[i] - b[i];
39
- }
40
- }
41
- return 0;
42
- }
43
-
44
- function toHex(bytes: Uint8Array): string {
45
- let result = "";
46
- for (let i = 0; i < bytes.length; i++) {
47
- const hex = bytes[i].toString(16).padStart(2, "0");
48
- result += hex;
49
- }
50
- return result;
51
- }
52
-
53
- export function resolveProgramIdentifier(identifier: ProgramIdentifier): AccountAddress {
54
- if (identifier instanceof Uint8Array) {
55
- if (identifier.length !== 32) {
56
- throw new Error("Program public key must contain 32 bytes");
57
- }
58
- return copyAccount(identifier);
59
- }
60
-
61
- if (typeof identifier === "string") {
62
- const parsed = parseProgramString(identifier);
63
- if (parsed) {
64
- return parsed;
65
- }
66
- }
67
-
68
- throw new Error("Unsupported program identifier format");
69
- }
70
-
71
- function parseProgramString(value: string): AccountAddress | undefined {
72
- if (value.startsWith("ta") && value.length === 46) {
73
- return copyAccount(decodeAddress(value));
74
- }
75
- if (isHexString(value)) {
76
- const bytes = hexToBytes(value);
77
- if (bytes.length !== 32) {
78
- throw new Error("Hex-encoded program key must contain 32 bytes");
79
- }
80
- return bytes;
81
- }
82
- return undefined;
83
- }
84
-
85
- function copyAccount(value: AccountAddress): AccountAddress {
86
- if (value.length !== 32) {
87
- throw new Error("Program public key must contain 32 bytes");
88
- }
89
- return new Uint8Array(value);
90
- }
91
-
92
- export function parseAccountIdentifier(value: BytesLike, field: string): AccountAddress {
93
- if (value instanceof Uint8Array) {
94
- if (value.length !== 32) {
95
- throw new Error(`${field} must contain 32 bytes`);
96
- }
97
- return new Uint8Array(value);
98
- }
99
-
100
- if (typeof value === "string") {
101
- if (value.startsWith("ta") && value.length === 46) {
102
- return copyAccount(decodeAddress(value));
103
- }
104
- if (isHexString(value)) {
105
- const bytes = hexToBytes(value);
106
- if (bytes.length !== 32) {
107
- throw new Error(`${field} hex string must decode to 32 bytes`);
108
- }
109
- return bytes;
110
- }
111
- }
112
-
113
- throw new Error(`${field} must be a 32-byte value, ta-address, or 64-character hex string`);
114
- }
115
-
116
- export function parseInstructionData(value?: BytesLike): Uint8Array | undefined {
117
- if (value === undefined) {
118
- return undefined;
119
- }
120
- if (value instanceof Uint8Array) {
121
- return new Uint8Array(value);
122
- }
123
- if (typeof value === "string") {
124
- if (value.length === 0) {
125
- return new Uint8Array();
126
- }
127
- if (isHexString(value)) {
128
- return hexToBytes(value);
129
- }
130
- }
131
- throw new Error("Instruction data must be provided as hex string or Uint8Array");
132
- }
@@ -1,8 +0,0 @@
1
- import { BytesLike } from "@thru/helpers";
2
- import { StateProofType } from "../proto/thru/core/v1/state_pb";
3
-
4
- export type GenerateStateProofOptions = {
5
- address?: BytesLike;
6
- proofType: StateProofType;
7
- targetSlot: bigint;
8
- }
@@ -1,27 +0,0 @@
1
- import { BytesLike } from "@thru/helpers";
2
-
3
- import { TransactionHeaderInput } from "../transactions";
4
-
5
- export type BlockSelector = { slot: number | bigint } | { blockHash: BytesLike };
6
-
7
- export function isSlotSelector(selector: BlockSelector): selector is { slot: number | bigint } {
8
- return "slot" in selector;
9
- }
10
-
11
- export function mergeTransactionHeader(
12
- defaults: TransactionHeaderInput,
13
- overrides?: Partial<TransactionHeaderInput>,
14
- ): TransactionHeaderInput {
15
- if (!overrides) {
16
- return defaults;
17
- }
18
-
19
- const sanitized = Object.fromEntries(
20
- Object.entries(overrides).filter(([, value]) => value !== undefined),
21
- ) as Partial<TransactionHeaderInput>;
22
-
23
- return {
24
- ...defaults,
25
- ...sanitized,
26
- };
27
- }
package/tsconfig.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "../tsconfig.base.json",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "rootDir": "./thru-ts-client-sdk",
6
- },
7
- "include": ["thru-ts-client-sdk/**/*"],
8
- "exclude": ["node_modules", "dist", "thru-ts-client-sdk/**/__tests__/**"]
9
- }
package/tsup.config.ts DELETED
@@ -1,14 +0,0 @@
1
- import { defineConfig } from 'tsup';
2
-
3
- export default defineConfig({
4
- entry: {
5
- sdk: 'thru-ts-client-sdk/sdk.ts',
6
- client: 'thru-ts-client-sdk/client.ts'
7
- },
8
- format: ['esm'],
9
- dts: true,
10
- sourcemap: true,
11
- clean: true,
12
- treeshake: true,
13
- metafile: true
14
- });
package/vitest.config.ts DELETED
@@ -1,31 +0,0 @@
1
- import { defineConfig } from "vitest/config";
2
-
3
- export default defineConfig({
4
- test: {
5
- environment: "jsdom",
6
- globals: true, // Enable describe, it, expect globally
7
- include: ["thru-ts-client-sdk/**/*.{test,spec}.{ts,tsx}"],
8
- exclude: [
9
- "**/node_modules/**",
10
- "**/dist/**",
11
- "**/proto/**",
12
- "**/test-scripts/**",
13
- ],
14
- // Don't fail when no tests are found (useful during development)
15
- passWithNoTests: true,
16
- coverage: {
17
- provider: "v8",
18
- reporter: ["text", "json", "html"],
19
- include: ["thru-ts-client-sdk/**/*.ts"],
20
- exclude: [
21
- "**/__tests__/**",
22
- "**/proto/**",
23
- "**/dist/**",
24
- "**/test-scripts/**",
25
- "**/*.test.ts",
26
- "**/*.spec.ts",
27
- ],
28
- },
29
- },
30
- });
31
-