freestyle-sandboxes 0.0.76 → 0.0.78
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/ai/inde.d.cts +1 -1
- package/dist/ai/inde.d.mts +1 -1
- package/dist/ai/index.d.cts +1 -1
- package/dist/ai/index.d.mts +1 -1
- package/dist/inde.d.cts +35 -12
- package/dist/inde.d.mts +35 -12
- package/dist/index.cjs +31 -6
- package/dist/index.d.cts +35 -12
- package/dist/index.d.mts +35 -12
- package/dist/index.mjs +31 -6
- package/dist/langgraph/inde.d.cts +1 -1
- package/dist/langgraph/inde.d.mts +1 -1
- package/dist/langgraph/index.d.cts +1 -1
- package/dist/langgraph/index.d.mts +1 -1
- package/dist/mastra/inde.d.cts +1 -1
- package/dist/mastra/inde.d.mts +1 -1
- package/dist/mastra/index.d.cts +1 -1
- package/dist/mastra/index.d.mts +1 -1
- package/dist/types.gen-DkFlXKTr.d.ts +1354 -0
- package/dist/utils/inde.d.cts +1 -1
- package/dist/utils/inde.d.mts +1 -1
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/openapi/sdk.gen.ts +22 -11
- package/openapi/types.gen.ts +80 -20
- package/openapi.json +1 -1
- package/package.json +1 -1
- package/src/dev-server.ts +3 -0
- package/src/index.ts +65 -16
- package/src/temp.ts +0 -10
package/package.json
CHANGED
package/src/dev-server.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -70,6 +70,34 @@ export type {
|
|
|
70
70
|
DeploymentBuildOptions,
|
|
71
71
|
} from "../openapi/index.ts";
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Create a new git repository with a single commit from a static import.
|
|
75
|
+
*/
|
|
76
|
+
type CreateGitRepositoryImport = {
|
|
77
|
+
/**
|
|
78
|
+
* Create a new git repository with a single commit from a static import.
|
|
79
|
+
*/
|
|
80
|
+
import: sandbox_openapi.CreateRepoImport;
|
|
81
|
+
/**
|
|
82
|
+
* Create a git repository from another git reopsitory
|
|
83
|
+
*/
|
|
84
|
+
source?: never;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Create a git repository from another git reopsitory
|
|
89
|
+
*/
|
|
90
|
+
type CreateGitRepositorySource = {
|
|
91
|
+
/**
|
|
92
|
+
* Create a git repository from another git reopsitory
|
|
93
|
+
*/
|
|
94
|
+
source: sandbox_openapi.CreateRepoSource;
|
|
95
|
+
/**
|
|
96
|
+
* Create a new git repository with a single commit from a static import.
|
|
97
|
+
*/
|
|
98
|
+
import?: never;
|
|
99
|
+
};
|
|
100
|
+
|
|
73
101
|
type Options = {
|
|
74
102
|
/**
|
|
75
103
|
* The base URL for the API.
|
|
@@ -257,6 +285,24 @@ export class FreestyleSandboxes {
|
|
|
257
285
|
throw new Error(response.error.message);
|
|
258
286
|
}
|
|
259
287
|
|
|
288
|
+
async verifyDomainVerificationRequest(
|
|
289
|
+
id: string
|
|
290
|
+
): Promise<HandleVerifyDomainResponse> {
|
|
291
|
+
const response = await sandbox_openapi.handleVerifyDomain({
|
|
292
|
+
client: this.client,
|
|
293
|
+
body: {
|
|
294
|
+
id,
|
|
295
|
+
},
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
if (response.data) {
|
|
299
|
+
return response.data;
|
|
300
|
+
}
|
|
301
|
+
throw new Error(
|
|
302
|
+
`Failed to verify domain verification request with ID ${id}: ${response.error.message}`
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
|
|
260
306
|
/**
|
|
261
307
|
* Verify a domain. Note, this requires the domain verification token to be already set up.
|
|
262
308
|
* @param domain The domain to verify.
|
|
@@ -405,22 +451,21 @@ export class FreestyleSandboxes {
|
|
|
405
451
|
name,
|
|
406
452
|
public: pub = false,
|
|
407
453
|
source,
|
|
454
|
+
import: _import,
|
|
408
455
|
}: {
|
|
409
|
-
name
|
|
456
|
+
name?: string;
|
|
410
457
|
public?: boolean;
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
depth?: number;
|
|
416
|
-
};
|
|
417
|
-
}): Promise<CreateRepositoryResponseSuccess> {
|
|
458
|
+
} & (
|
|
459
|
+
| CreateGitRepositorySource
|
|
460
|
+
| CreateGitRepositoryImport
|
|
461
|
+
)): Promise<CreateRepositoryResponseSuccess> {
|
|
418
462
|
const response = await sandbox_openapi.handleCreateRepo({
|
|
419
463
|
client: this.client,
|
|
420
464
|
body: {
|
|
421
465
|
name,
|
|
422
466
|
public: pub,
|
|
423
467
|
source,
|
|
468
|
+
import: _import,
|
|
424
469
|
},
|
|
425
470
|
});
|
|
426
471
|
|
|
@@ -1083,14 +1128,18 @@ export class FreestyleSandboxes {
|
|
|
1083
1128
|
? content
|
|
1084
1129
|
: Buffer.from(content).toString(encoding);
|
|
1085
1130
|
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1131
|
+
const response =
|
|
1132
|
+
await sandbox_openapi.handleWriteFileFromEphemeralDevServer({
|
|
1133
|
+
client,
|
|
1134
|
+
path: {
|
|
1135
|
+
filepath: path,
|
|
1136
|
+
},
|
|
1137
|
+
body: {
|
|
1138
|
+
devServer: devServerInstance,
|
|
1139
|
+
content: contentStr,
|
|
1140
|
+
encoding,
|
|
1141
|
+
},
|
|
1142
|
+
});
|
|
1094
1143
|
|
|
1095
1144
|
if (response.error) {
|
|
1096
1145
|
throw new Error(
|
package/src/temp.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FreestyleSandboxes } from "./index";
|
|
2
|
-
import "dotenv/config"
|
|
3
|
-
|
|
4
|
-
const api = new FreestyleSandboxes({
|
|
5
|
-
apiKey: process.env.FREESTYLE_API_KEY,
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
api.requestDevServer({
|
|
9
|
-
repoUrl: "https://c6709211-2d68-478e-80b3-7ebe7313f3ac:QqasQD331e3woNyK.Q9dnXy3MR9Aeo759@git.freestyle.sh/15b7ed11-0e7c-452b-b044-70f0dcab9161"
|
|
10
|
-
}).then(console.log)
|