File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments