freestyle-sandboxes 0.0.73 → 0.0.74
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.
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1000,7 +1000,7 @@ ${response.error.message}`);
|
|
|
1000
1000
|
return response2.data.content.content;
|
|
1001
1001
|
},
|
|
1002
1002
|
async writeFile(path, content, encoding = "utf-8") {
|
|
1003
|
-
const contentStr = typeof content === "string" ? content :
|
|
1003
|
+
const contentStr = typeof content === "string" ? content : Buffer.from(content).toString(encoding);
|
|
1004
1004
|
const response2 = await handleWriteFileFromEphemeralDevServer({
|
|
1005
1005
|
client,
|
|
1006
1006
|
path: {
|
package/dist/index.mjs
CHANGED
|
@@ -998,7 +998,7 @@ ${response.error.message}`);
|
|
|
998
998
|
return response2.data.content.content;
|
|
999
999
|
},
|
|
1000
1000
|
async writeFile(path, content, encoding = "utf-8") {
|
|
1001
|
-
const contentStr = typeof content === "string" ? content :
|
|
1001
|
+
const contentStr = typeof content === "string" ? content : Buffer.from(content).toString(encoding);
|
|
1002
1002
|
const response2 = await handleWriteFileFromEphemeralDevServer({
|
|
1003
1003
|
client,
|
|
1004
1004
|
path: {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1076,12 +1076,12 @@ export class FreestyleSandboxes {
|
|
|
1076
1076
|
async writeFile(
|
|
1077
1077
|
path: string,
|
|
1078
1078
|
content: string | ArrayBuffer,
|
|
1079
|
-
encoding = "utf-8"
|
|
1079
|
+
encoding: BufferEncoding = "utf-8"
|
|
1080
1080
|
) {
|
|
1081
1081
|
const contentStr =
|
|
1082
1082
|
typeof content === "string"
|
|
1083
1083
|
? content
|
|
1084
|
-
:
|
|
1084
|
+
: Buffer.from(content).toString(encoding);
|
|
1085
1085
|
|
|
1086
1086
|
const response =
|
|
1087
1087
|
await sandbox_openapi.handleWriteFileFromEphemeralDevServer({
|