freestyle-sandboxes 0.0.20 → 0.0.21
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/index.cjs +2 -0
- package/dist/ai/index.d.cts +1 -1
- package/dist/ai/index.d.mts +1 -1
- package/dist/ai/index.mjs +2 -0
- package/dist/index.cjs +88 -5
- package/dist/index.d.cts +24 -5
- package/dist/index.d.mts +24 -5
- package/dist/index.mjs +88 -5
- package/dist/langgraph/index.d.cts +1 -1
- package/dist/langgraph/index.d.mts +1 -1
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.d.cts +1 -1
- package/dist/mastra/index.d.mts +1 -1
- package/dist/mastra/index.mjs +1 -1
- package/dist/types.gen-DLYohMJT.d.ts +382 -0
- package/openapi/sdk.gen.ts +42 -4
- package/openapi/types.gen.ts +86 -2
- package/openapi.json +1 -1
- package/package.json +1 -1
- package/src/ai/index.ts +2 -0
- package/src/index.ts +105 -21
- package/src/mastra/index.ts +5 -5
package/dist/ai/index.cjs
CHANGED
package/dist/ai/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as ai from 'ai';
|
|
2
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, c as FreestyleDeployWebSuccessResponse } from '../types.gen-
|
|
2
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, c as FreestyleDeployWebSuccessResponse } from '../types.gen-DLYohMJT.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
declare const executeCodeSchema: z.ZodObject<{
|
package/dist/ai/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as ai from 'ai';
|
|
2
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, c as FreestyleDeployWebSuccessResponse } from '../types.gen-
|
|
2
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, c as FreestyleDeployWebSuccessResponse } from '../types.gen-DLYohMJT.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
declare const executeCodeSchema: z.ZodObject<{
|
package/dist/ai/index.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -69,6 +69,24 @@ const handleExecuteScript = (options) => {
|
|
|
69
69
|
url: "/execute/v1/script"
|
|
70
70
|
});
|
|
71
71
|
};
|
|
72
|
+
const listRepositoriesHandler = (options) => {
|
|
73
|
+
return (options?.client ?? client).get({
|
|
74
|
+
...options,
|
|
75
|
+
url: "/git/v1/repo"
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
const createRepoHandler = (options) => {
|
|
79
|
+
return (options?.client ?? client).post({
|
|
80
|
+
...options,
|
|
81
|
+
url: "/git/v1/repo"
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
const deleteRepoHandler = (options) => {
|
|
85
|
+
return (options?.client ?? client).delete({
|
|
86
|
+
...options,
|
|
87
|
+
url: "/git/v1/repo/{repo}"
|
|
88
|
+
});
|
|
89
|
+
};
|
|
72
90
|
const handleGetLogs = (options) => {
|
|
73
91
|
return (options?.client ?? client).get({
|
|
74
92
|
...options,
|
|
@@ -284,9 +302,13 @@ Message: ${response.error?.message}`
|
|
|
284
302
|
);
|
|
285
303
|
}
|
|
286
304
|
}
|
|
287
|
-
async listWebDeployments() {
|
|
305
|
+
async listWebDeployments(limit, offset) {
|
|
288
306
|
const response = await handleListWebDeploys({
|
|
289
|
-
client: this.client
|
|
307
|
+
client: this.client,
|
|
308
|
+
query: {
|
|
309
|
+
limit: limit ?? 10,
|
|
310
|
+
offset: offset ?? 0
|
|
311
|
+
}
|
|
290
312
|
});
|
|
291
313
|
if (response.data) {
|
|
292
314
|
return response.data;
|
|
@@ -296,9 +318,13 @@ Message: ${response.error?.message}`
|
|
|
296
318
|
);
|
|
297
319
|
}
|
|
298
320
|
}
|
|
299
|
-
async listExecuteRuns() {
|
|
321
|
+
async listExecuteRuns(limit, offset) {
|
|
300
322
|
const response = await handleListExecuteRuns({
|
|
301
|
-
client: this.client
|
|
323
|
+
client: this.client,
|
|
324
|
+
query: {
|
|
325
|
+
limit: limit ?? 10,
|
|
326
|
+
offset: offset ?? 0
|
|
327
|
+
}
|
|
302
328
|
});
|
|
303
329
|
if (response.data) {
|
|
304
330
|
return response.data;
|
|
@@ -313,11 +339,68 @@ Message: ${response.error?.message}`
|
|
|
313
339
|
deployment: id
|
|
314
340
|
}
|
|
315
341
|
});
|
|
342
|
+
if (response.data) {
|
|
343
|
+
return response.data;
|
|
344
|
+
}
|
|
345
|
+
throw new Error(
|
|
346
|
+
`Failed to get execute run with ID ${id}: ${response.error.message}`
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Create a new git repository.
|
|
351
|
+
*
|
|
352
|
+
* @param name The name of the repository.
|
|
353
|
+
*/
|
|
354
|
+
async createGitRepository(name) {
|
|
355
|
+
const response = await createRepoHandler({
|
|
356
|
+
client: this.client,
|
|
357
|
+
body: {
|
|
358
|
+
name
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
if (response.data) {
|
|
362
|
+
return response.data;
|
|
363
|
+
}
|
|
364
|
+
throw new Error(
|
|
365
|
+
`Failed to create git repository ${name}: ${response.error}`
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* List git repositories.
|
|
370
|
+
*
|
|
371
|
+
* @param limit The maximum number of repositories to return. Defaults to 10.
|
|
372
|
+
* @param offset The offset to start at. Defaults to 0.
|
|
373
|
+
*/
|
|
374
|
+
async listGitRepositories(limit, offset) {
|
|
375
|
+
const response = await listRepositoriesHandler({
|
|
376
|
+
client: this.client,
|
|
377
|
+
query: {
|
|
378
|
+
limit: limit ?? 10,
|
|
379
|
+
offset: offset ?? 0
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
if (response.data) {
|
|
383
|
+
return response.data;
|
|
384
|
+
}
|
|
385
|
+
throw new Error(`Failed to list git repositories: ${response.error}`);
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Delete a git repository.
|
|
389
|
+
*
|
|
390
|
+
* @param repositoryId The ID of the repository to delete.
|
|
391
|
+
*/
|
|
392
|
+
async deleteGitRepository(repositoryId) {
|
|
393
|
+
const response = await deleteRepoHandler({
|
|
394
|
+
client: this.client,
|
|
395
|
+
path: {
|
|
396
|
+
repo: repositoryId
|
|
397
|
+
}
|
|
398
|
+
});
|
|
316
399
|
if (response.data) {
|
|
317
400
|
return response.data;
|
|
318
401
|
} else {
|
|
319
402
|
throw new Error(
|
|
320
|
-
`Failed to
|
|
403
|
+
`Failed to delete git repository ${repositoryId}: ${response.error}`
|
|
321
404
|
);
|
|
322
405
|
}
|
|
323
406
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponse, d as FreestyleCloudstateDeployRequest, e as FreestyleCloudstateDeploySuccessResponse, H as HandleBackupCloudstateResponse, f as HandleGetLogsResponse, g as HandleCreateDomainVerificationResponse, h as HandleVerifyDomainResponse, i as HandleVerifyDomainError, j as HandleListDomainsResponse, k as HandleListDomainVerificationRequestsResponse, l as HandleDeleteDomainVerificationResponse, m as HandleListWebDeploysResponse, n as HandleListExecuteRunsResponse, o as HandleGetExecuteRunResponse, p as HandleVerifyWildcardResponse } from './types.gen-
|
|
2
|
-
export {
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponse, d as FreestyleCloudstateDeployRequest, e as FreestyleCloudstateDeploySuccessResponse, H as HandleBackupCloudstateResponse, f as HandleGetLogsResponse, g as HandleCreateDomainVerificationResponse, h as HandleVerifyDomainResponse, i as HandleVerifyDomainError, j as HandleListDomainsResponse, k as HandleListDomainVerificationRequestsResponse, l as HandleDeleteDomainVerificationResponse, m as HandleListWebDeploysResponse, n as HandleListExecuteRunsResponse, o as HandleGetExecuteRunResponse, C as CreateRepoHandlerResponse, L as ListRepositoriesHandlerResponse, D as DeleteRepoHandlerResponse, p as HandleVerifyWildcardResponse } from './types.gen-DLYohMJT.js';
|
|
2
|
+
export { B as Behavior, ac as CreateRepoHandlerData, ad as CreateRepoHandlerError, q as CreateRepositoryRequest, ae as DeleteRepoHandlerData, af as DeleteRepoHandlerError, r as DeploymentLogEntry, s as DeploymentState, E as ExecuteLogEntry, t as ExecuteRunInfo, u as ExecuteRunState, v as FreestyleCloudstateDeployConfiguration, w as FreestyleCloudstateDeployErrorResponse, x as FreestyleDeleteDomainVerificationRequest, y as FreestyleDeployWebErrorResponse, z as FreestyleDeployWebPayload, A as FreestyleDomainVerificationRequest, G as FreestyleExecuteScriptParams, I as FreestyleFile, J as FreestyleGetLogsResponse, K as FreestyleJavaScriptLog, M as FreestyleLogResponseObject, N as FreestyleNetworkPermission, P as FreestyleVerifyDomainRequest, V as HandleBackupCloudstateData, W as HandleBackupCloudstateError, $ as HandleCreateDomainVerificationData, a0 as HandleCreateDomainVerificationError, a1 as HandleDeleteDomainVerificationData, a2 as HandleDeleteDomainVerificationError, S as HandleDeployCloudstateData, U as HandleDeployCloudstateError, T as HandleDeployCloudstateResponse, ai as HandleDeployWebData, ak as HandleDeployWebError, aj as HandleDeployWebResponse, a7 as HandleExecuteScriptData, a9 as HandleExecuteScriptError, a8 as HandleExecuteScriptResponse, a5 as HandleGetExecuteRunData, a6 as HandleGetExecuteRunError, ag as HandleGetLogsData, ah as HandleGetLogsError, an as HandleGetWebDeployDetailsData, Z as HandleListDomainVerificationRequestsError, Y as HandleListDomainsError, a3 as HandleListExecuteRunsData, a4 as HandleListExecuteRunsError, al as HandleListWebDeploysData, am as HandleListWebDeploysError, _ as HandleVerifyDomainData, X as HandleVerifyWildcardError, aa as ListRepositoriesHandlerData, ab as ListRepositoriesHandlerError, Q as NetworkPermissionData, R as RepositoryInfo, O as action } from './types.gen-DLYohMJT.js';
|
|
3
3
|
|
|
4
4
|
declare class FreestyleSandboxes {
|
|
5
5
|
private client;
|
|
@@ -61,11 +61,30 @@ declare class FreestyleSandboxes {
|
|
|
61
61
|
listDomains(): Promise<HandleListDomainsResponse>;
|
|
62
62
|
listDomainVerificationRequests(): Promise<HandleListDomainVerificationRequestsResponse>;
|
|
63
63
|
deleteDomainVerificationRequest(domain: string, verificationCode: string): Promise<HandleDeleteDomainVerificationResponse>;
|
|
64
|
-
listWebDeployments(): Promise<HandleListWebDeploysResponse>;
|
|
65
|
-
listExecuteRuns(): Promise<HandleListExecuteRunsResponse>;
|
|
64
|
+
listWebDeployments(limit?: number, offset?: number): Promise<HandleListWebDeploysResponse>;
|
|
65
|
+
listExecuteRuns(limit?: number, offset?: number): Promise<HandleListExecuteRunsResponse>;
|
|
66
66
|
getExecuteRun(id: string): Promise<HandleGetExecuteRunResponse>;
|
|
67
|
+
/**
|
|
68
|
+
* Create a new git repository.
|
|
69
|
+
*
|
|
70
|
+
* @param name The name of the repository.
|
|
71
|
+
*/
|
|
72
|
+
createGitRepository(name: string): Promise<CreateRepoHandlerResponse>;
|
|
73
|
+
/**
|
|
74
|
+
* List git repositories.
|
|
75
|
+
*
|
|
76
|
+
* @param limit The maximum number of repositories to return. Defaults to 10.
|
|
77
|
+
* @param offset The offset to start at. Defaults to 0.
|
|
78
|
+
*/
|
|
79
|
+
listGitRepositories(limit?: number, offset?: number): Promise<ListRepositoriesHandlerResponse>;
|
|
80
|
+
/**
|
|
81
|
+
* Delete a git repository.
|
|
82
|
+
*
|
|
83
|
+
* @param repositoryId The ID of the repository to delete.
|
|
84
|
+
*/
|
|
85
|
+
deleteGitRepository(repositoryId: string): Promise<DeleteRepoHandlerResponse>;
|
|
67
86
|
/** Provision a wildcard certificate for domain. */
|
|
68
87
|
provisionWildcard(domain: string): Promise<HandleVerifyWildcardResponse>;
|
|
69
88
|
}
|
|
70
89
|
|
|
71
|
-
export { FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponse, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleDeleteDomainVerificationResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse };
|
|
90
|
+
export { CreateRepoHandlerResponse, DeleteRepoHandlerResponse, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponse, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleDeleteDomainVerificationResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse, ListRepositoriesHandlerResponse };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponse, d as FreestyleCloudstateDeployRequest, e as FreestyleCloudstateDeploySuccessResponse, H as HandleBackupCloudstateResponse, f as HandleGetLogsResponse, g as HandleCreateDomainVerificationResponse, h as HandleVerifyDomainResponse, i as HandleVerifyDomainError, j as HandleListDomainsResponse, k as HandleListDomainVerificationRequestsResponse, l as HandleDeleteDomainVerificationResponse, m as HandleListWebDeploysResponse, n as HandleListExecuteRunsResponse, o as HandleGetExecuteRunResponse, p as HandleVerifyWildcardResponse } from './types.gen-
|
|
2
|
-
export {
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponse, d as FreestyleCloudstateDeployRequest, e as FreestyleCloudstateDeploySuccessResponse, H as HandleBackupCloudstateResponse, f as HandleGetLogsResponse, g as HandleCreateDomainVerificationResponse, h as HandleVerifyDomainResponse, i as HandleVerifyDomainError, j as HandleListDomainsResponse, k as HandleListDomainVerificationRequestsResponse, l as HandleDeleteDomainVerificationResponse, m as HandleListWebDeploysResponse, n as HandleListExecuteRunsResponse, o as HandleGetExecuteRunResponse, C as CreateRepoHandlerResponse, L as ListRepositoriesHandlerResponse, D as DeleteRepoHandlerResponse, p as HandleVerifyWildcardResponse } from './types.gen-DLYohMJT.js';
|
|
2
|
+
export { B as Behavior, ac as CreateRepoHandlerData, ad as CreateRepoHandlerError, q as CreateRepositoryRequest, ae as DeleteRepoHandlerData, af as DeleteRepoHandlerError, r as DeploymentLogEntry, s as DeploymentState, E as ExecuteLogEntry, t as ExecuteRunInfo, u as ExecuteRunState, v as FreestyleCloudstateDeployConfiguration, w as FreestyleCloudstateDeployErrorResponse, x as FreestyleDeleteDomainVerificationRequest, y as FreestyleDeployWebErrorResponse, z as FreestyleDeployWebPayload, A as FreestyleDomainVerificationRequest, G as FreestyleExecuteScriptParams, I as FreestyleFile, J as FreestyleGetLogsResponse, K as FreestyleJavaScriptLog, M as FreestyleLogResponseObject, N as FreestyleNetworkPermission, P as FreestyleVerifyDomainRequest, V as HandleBackupCloudstateData, W as HandleBackupCloudstateError, $ as HandleCreateDomainVerificationData, a0 as HandleCreateDomainVerificationError, a1 as HandleDeleteDomainVerificationData, a2 as HandleDeleteDomainVerificationError, S as HandleDeployCloudstateData, U as HandleDeployCloudstateError, T as HandleDeployCloudstateResponse, ai as HandleDeployWebData, ak as HandleDeployWebError, aj as HandleDeployWebResponse, a7 as HandleExecuteScriptData, a9 as HandleExecuteScriptError, a8 as HandleExecuteScriptResponse, a5 as HandleGetExecuteRunData, a6 as HandleGetExecuteRunError, ag as HandleGetLogsData, ah as HandleGetLogsError, an as HandleGetWebDeployDetailsData, Z as HandleListDomainVerificationRequestsError, Y as HandleListDomainsError, a3 as HandleListExecuteRunsData, a4 as HandleListExecuteRunsError, al as HandleListWebDeploysData, am as HandleListWebDeploysError, _ as HandleVerifyDomainData, X as HandleVerifyWildcardError, aa as ListRepositoriesHandlerData, ab as ListRepositoriesHandlerError, Q as NetworkPermissionData, R as RepositoryInfo, O as action } from './types.gen-DLYohMJT.js';
|
|
3
3
|
|
|
4
4
|
declare class FreestyleSandboxes {
|
|
5
5
|
private client;
|
|
@@ -61,11 +61,30 @@ declare class FreestyleSandboxes {
|
|
|
61
61
|
listDomains(): Promise<HandleListDomainsResponse>;
|
|
62
62
|
listDomainVerificationRequests(): Promise<HandleListDomainVerificationRequestsResponse>;
|
|
63
63
|
deleteDomainVerificationRequest(domain: string, verificationCode: string): Promise<HandleDeleteDomainVerificationResponse>;
|
|
64
|
-
listWebDeployments(): Promise<HandleListWebDeploysResponse>;
|
|
65
|
-
listExecuteRuns(): Promise<HandleListExecuteRunsResponse>;
|
|
64
|
+
listWebDeployments(limit?: number, offset?: number): Promise<HandleListWebDeploysResponse>;
|
|
65
|
+
listExecuteRuns(limit?: number, offset?: number): Promise<HandleListExecuteRunsResponse>;
|
|
66
66
|
getExecuteRun(id: string): Promise<HandleGetExecuteRunResponse>;
|
|
67
|
+
/**
|
|
68
|
+
* Create a new git repository.
|
|
69
|
+
*
|
|
70
|
+
* @param name The name of the repository.
|
|
71
|
+
*/
|
|
72
|
+
createGitRepository(name: string): Promise<CreateRepoHandlerResponse>;
|
|
73
|
+
/**
|
|
74
|
+
* List git repositories.
|
|
75
|
+
*
|
|
76
|
+
* @param limit The maximum number of repositories to return. Defaults to 10.
|
|
77
|
+
* @param offset The offset to start at. Defaults to 0.
|
|
78
|
+
*/
|
|
79
|
+
listGitRepositories(limit?: number, offset?: number): Promise<ListRepositoriesHandlerResponse>;
|
|
80
|
+
/**
|
|
81
|
+
* Delete a git repository.
|
|
82
|
+
*
|
|
83
|
+
* @param repositoryId The ID of the repository to delete.
|
|
84
|
+
*/
|
|
85
|
+
deleteGitRepository(repositoryId: string): Promise<DeleteRepoHandlerResponse>;
|
|
67
86
|
/** Provision a wildcard certificate for domain. */
|
|
68
87
|
provisionWildcard(domain: string): Promise<HandleVerifyWildcardResponse>;
|
|
69
88
|
}
|
|
70
89
|
|
|
71
|
-
export { FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponse, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleDeleteDomainVerificationResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse };
|
|
90
|
+
export { CreateRepoHandlerResponse, DeleteRepoHandlerResponse, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponse, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleDeleteDomainVerificationResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse, ListRepositoriesHandlerResponse };
|
package/dist/index.mjs
CHANGED
|
@@ -67,6 +67,24 @@ const handleExecuteScript = (options) => {
|
|
|
67
67
|
url: "/execute/v1/script"
|
|
68
68
|
});
|
|
69
69
|
};
|
|
70
|
+
const listRepositoriesHandler = (options) => {
|
|
71
|
+
return (options?.client ?? client).get({
|
|
72
|
+
...options,
|
|
73
|
+
url: "/git/v1/repo"
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
const createRepoHandler = (options) => {
|
|
77
|
+
return (options?.client ?? client).post({
|
|
78
|
+
...options,
|
|
79
|
+
url: "/git/v1/repo"
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
const deleteRepoHandler = (options) => {
|
|
83
|
+
return (options?.client ?? client).delete({
|
|
84
|
+
...options,
|
|
85
|
+
url: "/git/v1/repo/{repo}"
|
|
86
|
+
});
|
|
87
|
+
};
|
|
70
88
|
const handleGetLogs = (options) => {
|
|
71
89
|
return (options?.client ?? client).get({
|
|
72
90
|
...options,
|
|
@@ -282,9 +300,13 @@ Message: ${response.error?.message}`
|
|
|
282
300
|
);
|
|
283
301
|
}
|
|
284
302
|
}
|
|
285
|
-
async listWebDeployments() {
|
|
303
|
+
async listWebDeployments(limit, offset) {
|
|
286
304
|
const response = await handleListWebDeploys({
|
|
287
|
-
client: this.client
|
|
305
|
+
client: this.client,
|
|
306
|
+
query: {
|
|
307
|
+
limit: limit ?? 10,
|
|
308
|
+
offset: offset ?? 0
|
|
309
|
+
}
|
|
288
310
|
});
|
|
289
311
|
if (response.data) {
|
|
290
312
|
return response.data;
|
|
@@ -294,9 +316,13 @@ Message: ${response.error?.message}`
|
|
|
294
316
|
);
|
|
295
317
|
}
|
|
296
318
|
}
|
|
297
|
-
async listExecuteRuns() {
|
|
319
|
+
async listExecuteRuns(limit, offset) {
|
|
298
320
|
const response = await handleListExecuteRuns({
|
|
299
|
-
client: this.client
|
|
321
|
+
client: this.client,
|
|
322
|
+
query: {
|
|
323
|
+
limit: limit ?? 10,
|
|
324
|
+
offset: offset ?? 0
|
|
325
|
+
}
|
|
300
326
|
});
|
|
301
327
|
if (response.data) {
|
|
302
328
|
return response.data;
|
|
@@ -311,11 +337,68 @@ Message: ${response.error?.message}`
|
|
|
311
337
|
deployment: id
|
|
312
338
|
}
|
|
313
339
|
});
|
|
340
|
+
if (response.data) {
|
|
341
|
+
return response.data;
|
|
342
|
+
}
|
|
343
|
+
throw new Error(
|
|
344
|
+
`Failed to get execute run with ID ${id}: ${response.error.message}`
|
|
345
|
+
);
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Create a new git repository.
|
|
349
|
+
*
|
|
350
|
+
* @param name The name of the repository.
|
|
351
|
+
*/
|
|
352
|
+
async createGitRepository(name) {
|
|
353
|
+
const response = await createRepoHandler({
|
|
354
|
+
client: this.client,
|
|
355
|
+
body: {
|
|
356
|
+
name
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
if (response.data) {
|
|
360
|
+
return response.data;
|
|
361
|
+
}
|
|
362
|
+
throw new Error(
|
|
363
|
+
`Failed to create git repository ${name}: ${response.error}`
|
|
364
|
+
);
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* List git repositories.
|
|
368
|
+
*
|
|
369
|
+
* @param limit The maximum number of repositories to return. Defaults to 10.
|
|
370
|
+
* @param offset The offset to start at. Defaults to 0.
|
|
371
|
+
*/
|
|
372
|
+
async listGitRepositories(limit, offset) {
|
|
373
|
+
const response = await listRepositoriesHandler({
|
|
374
|
+
client: this.client,
|
|
375
|
+
query: {
|
|
376
|
+
limit: limit ?? 10,
|
|
377
|
+
offset: offset ?? 0
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
if (response.data) {
|
|
381
|
+
return response.data;
|
|
382
|
+
}
|
|
383
|
+
throw new Error(`Failed to list git repositories: ${response.error}`);
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Delete a git repository.
|
|
387
|
+
*
|
|
388
|
+
* @param repositoryId The ID of the repository to delete.
|
|
389
|
+
*/
|
|
390
|
+
async deleteGitRepository(repositoryId) {
|
|
391
|
+
const response = await deleteRepoHandler({
|
|
392
|
+
client: this.client,
|
|
393
|
+
path: {
|
|
394
|
+
repo: repositoryId
|
|
395
|
+
}
|
|
396
|
+
});
|
|
314
397
|
if (response.data) {
|
|
315
398
|
return response.data;
|
|
316
399
|
} else {
|
|
317
400
|
throw new Error(
|
|
318
|
-
`Failed to
|
|
401
|
+
`Failed to delete git repository ${repositoryId}: ${response.error}`
|
|
319
402
|
);
|
|
320
403
|
}
|
|
321
404
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-DLYohMJT.js';
|
|
2
2
|
import { DynamicStructuredTool } from '@langchain/core/tools';
|
|
3
3
|
|
|
4
4
|
declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-DLYohMJT.js';
|
|
2
2
|
import { DynamicStructuredTool } from '@langchain/core/tools';
|
|
3
3
|
|
|
4
4
|
declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
|
package/dist/mastra/index.cjs
CHANGED
|
@@ -18,10 +18,10 @@ const executeTool = (config) => {
|
|
|
18
18
|
return core.createTool({
|
|
19
19
|
id: "Execute a TypeScript or JavaScript Script",
|
|
20
20
|
description,
|
|
21
|
-
inputSchema: index.executeCodeSchema,
|
|
22
21
|
execute: async ({ context: { script } }) => {
|
|
23
22
|
return await client.executeScript(script, config);
|
|
24
23
|
},
|
|
24
|
+
inputSchema: index.executeCodeSchema,
|
|
25
25
|
outputSchema: zod.z.object({
|
|
26
26
|
logs: zod.z.array(
|
|
27
27
|
zod.z.object({
|
package/dist/mastra/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _mastra_core from '@mastra/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-
|
|
3
|
+
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-DLYohMJT.js';
|
|
4
4
|
|
|
5
5
|
declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
|
|
6
6
|
apiKey: string;
|
package/dist/mastra/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _mastra_core from '@mastra/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-
|
|
3
|
+
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-DLYohMJT.js';
|
|
4
4
|
|
|
5
5
|
declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
|
|
6
6
|
apiKey: string;
|
package/dist/mastra/index.mjs
CHANGED
|
@@ -16,10 +16,10 @@ const executeTool = (config) => {
|
|
|
16
16
|
return createTool({
|
|
17
17
|
id: "Execute a TypeScript or JavaScript Script",
|
|
18
18
|
description,
|
|
19
|
-
inputSchema: executeCodeSchema,
|
|
20
19
|
execute: async ({ context: { script } }) => {
|
|
21
20
|
return await client.executeScript(script, config);
|
|
22
21
|
},
|
|
22
|
+
inputSchema: executeCodeSchema,
|
|
23
23
|
outputSchema: z.object({
|
|
24
24
|
logs: z.array(
|
|
25
25
|
z.object({
|