Skip to content

Commit ee04d9e

Browse files
committed
use newer writeFile api
1 parent dd69b9e commit ee04d9e

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

src/packages/frontend/client/project.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,8 @@ export class ProjectClient {
7373
};
7474

7575
// This can write small text files in one message.
76-
public async write_text_file({
77-
project_id,
78-
path,
79-
content,
80-
}: {
81-
project_id: string;
82-
path: string;
83-
content: string;
84-
}): Promise<void> {
85-
await this.natsApi(project_id).system.writeTextFileToProject({
86-
path,
87-
content,
88-
});
76+
public async write_text_file(opts): Promise<void> {
77+
await this.writeFile(opts);
8978
}
9079

9180
// writeFile -- easily write **arbitrarily large text or binary files**

src/packages/nats/project-api/system.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const system = {
2121
realpath: true,
2222
canonicalPaths: true,
2323

24+
// these should be completel deprecated -- the new streaming writeFile and readFile in nats/files are much better.
2425
writeTextFileToProject: true,
2526
readTextFileFromProject: true,
2627

0 commit comments

Comments
 (0)