Skip to content

Commit d101fb1

Browse files
committed
Remove dist prefix from main and types entrypoints
1 parent 691abcc commit d101fb1

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "0.8.21",
44
"private": false,
55
"repository": "https://github.com/humanloop/humanloop-node",
6-
"main": "./dist/index.js",
7-
"types": "./dist/index.d.ts",
6+
"main": "./index.js",
7+
"types": "./index.d.ts",
88
"scripts": {
99
"format": "prettier . --write --ignore-unknown",
1010
"build": "tsc",

src/sync/SyncClient.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,11 @@ export default class SyncClient {
176176
throw new Error(`Unsupported file type: ${file.type}`);
177177
}
178178

179-
this.saveSerializedFile((file as any).rawFileContent, file.path, file.type);
179+
if (!file.rawFileContent) {
180+
throw new Error(`No content found for ${file.type} ${file.id}`);
181+
}
182+
183+
this.saveSerializedFile(file.rawFileContent, file.path, file.type);
180184
}
181185

182186
/**
@@ -214,7 +218,7 @@ export default class SyncClient {
214218
}
215219

216220
// Skip if no raw file content
217-
if (!(file as any).rawFileContent) {
221+
if (!file.rawFileContent) {
218222
console.warn(
219223
`No content found for ${file.type} ${file.id || "<unknown>"}`,
220224
);
@@ -223,7 +227,7 @@ export default class SyncClient {
223227

224228
try {
225229
this.saveSerializedFile(
226-
(file as any).rawFileContent,
230+
file.rawFileContent,
227231
file.path,
228232
file.type,
229233
);

0 commit comments

Comments
 (0)