Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions packages/sdk/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -580,11 +580,7 @@ export class Dormice {
name,
files: files.map((file) => ({
path: file.path,
contentBase64: Buffer.from(
typeof file.content === 'string'
? new TextEncoder().encode(file.content)
: file.content,
).toString('base64'),
contentBase64: Buffer.from(file.content).toString('base64'),
})),
});
return writeFilesResponseSchema.parse(data);
Expand All @@ -602,11 +598,7 @@ export class Dormice {
const data = await this.rpc('writeFile', {
name,
path,
contentBase64: Buffer.from(
typeof content === 'string'
? new TextEncoder().encode(content)
: content,
).toString('base64'),
contentBase64: Buffer.from(content).toString('base64'),
});
return writeFileResponseSchema.parse(data);
}
Expand Down