freestyle-sandboxes 0.0.82 → 0.0.84
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 +45 -4
- package/dist/inde.d.mts +45 -4
- package/dist/index.cjs +170 -7
- package/dist/index.d.cts +45 -4
- package/dist/index.d.mts +45 -4
- package/dist/index.mjs +170 -7
- 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-BWwhCgTX.d.ts +1462 -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/package.json +1 -1
- package/src/index.ts +2 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponseV2, 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, C as CreateRepoSource, q as CreateRepoImport, r as CreateRepositoryResponseSuccess, s as HandleListRepositoriesResponse, t as HandleDeleteRepoResponse, G as GitIdentity, u as HandleDeleteIdentityResponse, A as AccessLevel, v as HandleGrantPermissionResponse, L as ListPermissionResponseSuccess, w as DescribePermissionResponseSuccess, x as CreatedToken, y as ListGitTokensResponseSuccess, z as HandleListGitTriggersResponse, B as GitTrigger, E as GitTriggerAction, I as HandleCreateGitTriggerResponse } from './types.gen-
|
|
2
|
-
export {
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponseV2, 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, C as CreateRepoSource, q as CreateRepoImport, r as CreateRepositoryResponseSuccess, s as HandleListRepositoriesResponse, t as HandleDeleteRepoResponse, G as GitIdentity, u as HandleDeleteIdentityResponse, A as AccessLevel, v as HandleGrantPermissionResponse, L as ListPermissionResponseSuccess, w as DescribePermissionResponseSuccess, x as CreatedToken, y as ListGitTokensResponseSuccess, z as HandleListGitTriggersResponse, B as GitTrigger, E as GitTriggerAction, I as HandleCreateGitTriggerResponse, S as SetDefaultBranchRequest, J as HandleGetContentsResponse, K as GetGithubSyncResponse } from './types.gen-BWwhCgTX.js';
|
|
2
|
+
export { O as AccessTokenInfo, N as AccessibleRepository, P as Behavior, Q as BlobEncoding, R as BlobObject, T as BranchDetails, U as CommitObject, V as CommitParent, W as CommitTree, cH as ConfigureGithubSyncData, cJ as ConfigureGithubSyncError, X as ConfigureGithubSyncRequest, cI as ConfigureGithubSyncResponse, Y as CreateDomainMappingRequest, Z as CreateRecordParams, $ as CreateRepoRequest, a0 as CreateRepositoryRequest, a2 as CustomBuildOptions, M as DeploymentBuildOptions, a3 as DeploymentLogEntry, a5 as DeploymentState, a6 as DevServer, a8 as DevServerRequest, a9 as DevServerStatusRequest, aa as DevServerWatchFilesRequest, ab as DnsRecord, ac as DnsRecordData, ad as DnsRecordKind, ae as DomainVerificationRequest, af as ExecRequest, ag as ExecuteLogEntry, ah as ExecuteRunInfo, ai as ExecuteRunState, aj as FileReadContent, al as FreestyleCloudstateDeployConfiguration, am as FreestyleCloudstateDeployErrorResponse, an as FreestyleDeleteDomainVerificationRequest, ao as FreestyleDeployWebErrorResponse, ap as FreestyleDeployWebPayload, aq as FreestyleDeployWebPayloadV2, ar as FreestyleDomainVerificationRequest, as as FreestyleExecuteScriptParams, at as FreestyleFile, au as FreestyleGetLogsResponse, av as FreestyleJavaScriptLog, aw as FreestyleLogResponseObject, ax as FreestyleNetworkPermission, az as FreestyleVerifyDomainRequest, aA as GetDefaultBranchResponse, cF as GetGithubSyncData, cG as GetGithubSyncError, aB as GitCommitPushRequest, aC as GitContents, aE as GitContentsDirEntryItem, aH as GitReference, aI as GitRepositoryTrigger, aF as GithubRepoSyncConfig, aG as GithubSyncConfigResponse, aL as GrantPermissionRequest, b7 as HandleBackupCloudstateData, b8 as HandleBackupCloudstateError, bt as HandleCreateDomainVerificationData, bu as HandleCreateDomainVerificationError, co as HandleCreateGitTokenData, cq as HandleCreateGitTokenError, cp as HandleCreateGitTokenResponse, dc as HandleCreateGitTriggerData, dd as HandleCreateGitTriggerError, c4 as HandleCreateIdentityError, c3 as HandleCreateIdentityResponse, bc as HandleCreateRecordData, be as HandleCreateRecordError, bd as HandleCreateRecordResponse, cw as HandleCreateRepoData, cy as HandleCreateRepoError, cx as HandleCreateRepoResponse, bo as HandleDeleteDomainMappingData, bq as HandleDeleteDomainMappingError, bp as HandleDeleteDomainMappingResponse, bv as HandleDeleteDomainVerificationData, bw as HandleDeleteDomainVerificationError, de as HandleDeleteGitTriggerData, dg as HandleDeleteGitTriggerError, df as HandleDeleteGitTriggerResponse, c5 as HandleDeleteIdentityData, c6 as HandleDeleteIdentityError, bf as HandleDeleteRecordData, bh as HandleDeleteRecordError, bg as HandleDeleteRecordResponse, cN as HandleDeleteRepoData, cO as HandleDeleteRepoError, b4 as HandleDeployCloudstateData, b6 as HandleDeployCloudstateError, b5 as HandleDeployCloudstateResponse, dm as HandleDeployWebData, dp as HandleDeployWebError, dn as HandleDeployWebResponse, dq as HandleDeployWebV2Data, ds as HandleDeployWebV2Error, dr as HandleDeployWebV2Response, ca as HandleDescribePermissionData, cc as HandleDescribePermissionError, cb as HandleDescribePermissionResponse, bP as HandleDevServerStatusData, bR as HandleDevServerStatusError, bQ as HandleDevServerStatusResponse, d7 as HandleDownloadTarballData, d9 as HandleDownloadTarballError, d8 as HandleDownloadTarballResponse, dh as HandleDownloadZipData, dj as HandleDownloadZipError, di as HandleDownloadZipResponse, bx as HandleEphemeralDevServerData, bz as HandleEphemeralDevServerError, by as HandleEphemeralDevServerResponse, bA as HandleExecOnEphemeralDevServerData, bC as HandleExecOnEphemeralDevServerError, bB as HandleExecOnEphemeralDevServerResponse, bZ as HandleExecuteScriptData, b$ as HandleExecuteScriptError, b_ as HandleExecuteScriptResponse, cR as HandleGetBlobData, cT as HandleGetBlobError, cS as HandleGetBlobResponse, cU as HandleGetCommitData, cW as HandleGetCommitError, cV as HandleGetCommitResponse, cP as HandleGetContentsData, cQ as HandleGetContentsError, cz as HandleGetDefaultBranchData, cB as HandleGetDefaultBranchError, cA as HandleGetDefaultBranchResponse, bX as HandleGetExecuteRunData, bY as HandleGetExecuteRunError, dk as HandleGetLogsData, dl as HandleGetLogsError, cX as HandleGetRefBranchData, cZ as HandleGetRefBranchError, cY as HandleGetRefBranchResponse, c_ as HandleGetRefTagData, d0 as HandleGetRefTagError, c$ as HandleGetRefTagResponse, d1 as HandleGetTagData, d3 as HandleGetTagError, d2 as HandleGetTagResponse, d4 as HandleGetTreeData, d6 as HandleGetTreeError, d5 as HandleGetTreeResponse, dv as HandleGetWebDeployDetailsData, bJ as HandleGitCommitPushData, bL as HandleGitCommitPushError, bK as HandleGitCommitPushResponse, cd as HandleGrantPermissionData, ce as HandleGrantPermissionError, bl as HandleInsertDomainMappingData, bn as HandleInsertDomainMappingError, bm as HandleInsertDomainMappingResponse, br as HandleListDomainVerificationRequestsError, bk as HandleListDomainsError, bV as HandleListExecuteRunsData, bW as HandleListExecuteRunsError, cl as HandleListGitTokensData, cn as HandleListGitTokensError, cm as HandleListGitTokensResponse, da as HandleListGitTriggersData, db as HandleListGitTriggersError, c0 as HandleListIdentitiesData, c2 as HandleListIdentitiesError, c1 as HandleListIdentitiesResponse, c7 as HandleListPermissionsData, c9 as HandleListPermissionsError, c8 as HandleListPermissionsResponse, b9 as HandleListRecordsData, bb as HandleListRecordsError, ba as HandleListRecordsResponse, cu as HandleListRepositoriesData, cv as HandleListRepositoriesError, dt as HandleListWebDeploysData, du as HandleListWebDeploysError, bG as HandleReadFileFromEphemeralDevServerData, bI as HandleReadFileFromEphemeralDevServerError, bH as HandleReadFileFromEphemeralDevServerResponse, cr as HandleRevokeGitTokenData, ct as HandleRevokeGitTokenError, cs as HandleRevokeGitTokenResponse, cf as HandleRevokePermissionData, ch as HandleRevokePermissionError, cg as HandleRevokePermissionResponse, cC as HandleSetDefaultBranchData, cE as HandleSetDefaultBranchError, cD as HandleSetDefaultBranchResponse, bM as HandleShutdownDevServerData, bO as HandleShutdownDevServerError, bN as HandleShutdownDevServerResponse, ci as HandleUpdatePermissionData, ck as HandleUpdatePermissionError, cj as HandleUpdatePermissionResponse, bs as HandleVerifyDomainData, bi as HandleVerifyWildcardData, bj as HandleVerifyWildcardError, bS as HandleWatchDevServerFilesData, bU as HandleWatchDevServerFilesError, bT as HandleWatchDevServerFilesResponse, bD as HandleWriteFileFromEphemeralDevServerData, bF as HandleWriteFileFromEphemeralDevServerError, bE as HandleWriteFileFromEphemeralDevServerResponse, aM as InternalServerError, aN as ListRecordsResponse, aO as NetworkPermissionData, aP as ReadFileEphemeralDevServerResponses, aQ as ReadFileRequest, cK as RemoveGithubSyncData, cM as RemoveGithubSyncError, cL as RemoveGithubSyncResponse, aR as RepositoryInfo, aS as RepositoryMetadata, aT as RevokeGitTokenRequest, aU as SetDefaultBranchResponse, aV as ShutdownDevServerRequest, aW as Signature, aX as TagDetails, aY as TagObject, aZ as TagTarget, a_ as TreeEntry, b0 as TreeObject, b1 as UpdatePermissionRequest, b2 as Visibility, b3 as WriteFileRequest, ay as action, aK as action2, aJ as event, a4 as kind, a7 as kind2, ak as kind3, _ as type, a1 as type2, aD as type3, a$ as type4 } from './types.gen-BWwhCgTX.js';
|
|
3
3
|
|
|
4
4
|
interface FreestyleDevServer {
|
|
5
5
|
/**
|
|
@@ -155,6 +155,7 @@ declare class FreestyleSandboxes {
|
|
|
155
155
|
* @returns The domain verification token.
|
|
156
156
|
*/
|
|
157
157
|
createDomainVerificationRequest(domain: string): Promise<HandleCreateDomainVerificationResponse>;
|
|
158
|
+
verifyDomainVerificationRequest(id: string): Promise<HandleVerifyDomainResponse>;
|
|
158
159
|
/**
|
|
159
160
|
* Verify a domain. Note, this requires the domain verification token to be already set up.
|
|
160
161
|
* @param domain The domain to verify.
|
|
@@ -172,9 +173,10 @@ declare class FreestyleSandboxes {
|
|
|
172
173
|
/**
|
|
173
174
|
* Create a new git repository.
|
|
174
175
|
*/
|
|
175
|
-
createGitRepository({ name, public: pub, source, import: _import, }: {
|
|
176
|
+
createGitRepository({ name, public: pub, source, import: _import, defaultBranch, }: {
|
|
176
177
|
name?: string;
|
|
177
178
|
public?: boolean;
|
|
179
|
+
defaultBranch?: string;
|
|
178
180
|
} & (CreateGitRepositorySource | CreateGitRepositoryImport)): Promise<CreateRepositoryResponseSuccess>;
|
|
179
181
|
/**
|
|
180
182
|
* List git repositories.
|
|
@@ -274,6 +276,45 @@ declare class FreestyleSandboxes {
|
|
|
274
276
|
deleteGitTrigger({ triggerId }: {
|
|
275
277
|
triggerId: string;
|
|
276
278
|
}): Promise<void>;
|
|
279
|
+
/**
|
|
280
|
+
* Set the default branch for a git repository.
|
|
281
|
+
*/
|
|
282
|
+
setGitRepoDefaultBranch({ repoId, defaultBranch, }: SetDefaultBranchRequest & {
|
|
283
|
+
repoId: string;
|
|
284
|
+
}): Promise<void>;
|
|
285
|
+
/**
|
|
286
|
+
* Get the default branch for a git repository.
|
|
287
|
+
*/
|
|
288
|
+
getGitRepoDefaultBranch({ repoId, }: {
|
|
289
|
+
repoId: string;
|
|
290
|
+
}): Promise<string>;
|
|
291
|
+
/**
|
|
292
|
+
* Get the contents of a git repository at the given path.
|
|
293
|
+
*/
|
|
294
|
+
getGitRepoContents({ repoId, path, ref, }: {
|
|
295
|
+
repoId: string;
|
|
296
|
+
path?: string;
|
|
297
|
+
ref?: string;
|
|
298
|
+
}): Promise<HandleGetContentsResponse>;
|
|
299
|
+
/**
|
|
300
|
+
* Configure a git repository to sync with GitHub.
|
|
301
|
+
*/
|
|
302
|
+
configureGitRepoGitHubSync({ repoId, githubRepoName, }: {
|
|
303
|
+
repoId: string;
|
|
304
|
+
githubRepoName: string;
|
|
305
|
+
}): Promise<void>;
|
|
306
|
+
/**
|
|
307
|
+
* Remove the GitHub sync configuration for a git repository.
|
|
308
|
+
*/
|
|
309
|
+
removeGitRepoGitHubSync({ repoId }: {
|
|
310
|
+
repoId: string;
|
|
311
|
+
}): Promise<void>;
|
|
312
|
+
/**
|
|
313
|
+
* Get the GitHub sync configuration for a git repository.
|
|
314
|
+
*/
|
|
315
|
+
getGitRepoGitHubSyncConfig({ repoId, }: {
|
|
316
|
+
repoId: any;
|
|
317
|
+
}): Promise<GetGithubSyncResponse | null>;
|
|
277
318
|
/**
|
|
278
319
|
* Request a dev server for a repository. If a dev server is already running
|
|
279
320
|
* for that repository, it will return a url to that server. Dev servers are
|
|
@@ -300,4 +341,4 @@ declare class FreestyleSandboxes {
|
|
|
300
341
|
fetch(path: string, init?: RequestInit): Promise<Response>;
|
|
301
342
|
}
|
|
302
343
|
|
|
303
|
-
export { AccessLevel, CreateRepoImport, CreateRepoSource, CreateRepositoryResponseSuccess, CreatedToken, DeploymentSource, DescribePermissionResponseSuccess, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponseV2, type FreestyleDevServer, type FreestyleDevServerFilesystem, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, GitIdentity, GitTrigger, GitTriggerAction, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleCreateGitTriggerResponse, HandleDeleteDomainVerificationResponse, HandleDeleteIdentityResponse, HandleDeleteRepoResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleGrantPermissionResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListGitTriggersResponse, HandleListRepositoriesResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse, ListGitTokensResponseSuccess, ListPermissionResponseSuccess };
|
|
344
|
+
export { AccessLevel, CreateRepoImport, CreateRepoSource, CreateRepositoryResponseSuccess, CreatedToken, DeploymentSource, DescribePermissionResponseSuccess, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponseV2, type FreestyleDevServer, type FreestyleDevServerFilesystem, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, GetGithubSyncResponse, GitIdentity, GitTrigger, GitTriggerAction, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleCreateGitTriggerResponse, HandleDeleteDomainVerificationResponse, HandleDeleteIdentityResponse, HandleDeleteRepoResponse, HandleGetContentsResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleGrantPermissionResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListGitTriggersResponse, HandleListRepositoriesResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse, ListGitTokensResponseSuccess, ListPermissionResponseSuccess, SetDefaultBranchRequest };
|
package/dist/index.mjs
CHANGED
|
@@ -181,12 +181,48 @@ const handleCreateRepo = (options) => {
|
|
|
181
181
|
url: "/git/v1/repo"
|
|
182
182
|
});
|
|
183
183
|
};
|
|
184
|
+
const handleGetDefaultBranch = (options) => {
|
|
185
|
+
return (options?.client ?? client).get({
|
|
186
|
+
...options,
|
|
187
|
+
url: "/git/v1/repo/{repo_id}/default-branch"
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
const handleSetDefaultBranch = (options) => {
|
|
191
|
+
return (options?.client ?? client).put({
|
|
192
|
+
...options,
|
|
193
|
+
url: "/git/v1/repo/{repo_id}/default-branch"
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
const getGithubSync = (options) => {
|
|
197
|
+
return (options?.client ?? client).get({
|
|
198
|
+
...options,
|
|
199
|
+
url: "/git/v1/repo/{repo_id}/github-sync"
|
|
200
|
+
});
|
|
201
|
+
};
|
|
202
|
+
const configureGithubSync = (options) => {
|
|
203
|
+
return (options?.client ?? client).post({
|
|
204
|
+
...options,
|
|
205
|
+
url: "/git/v1/repo/{repo_id}/github-sync"
|
|
206
|
+
});
|
|
207
|
+
};
|
|
208
|
+
const removeGithubSync = (options) => {
|
|
209
|
+
return (options?.client ?? client).delete({
|
|
210
|
+
...options,
|
|
211
|
+
url: "/git/v1/repo/{repo_id}/github-sync"
|
|
212
|
+
});
|
|
213
|
+
};
|
|
184
214
|
const handleDeleteRepo = (options) => {
|
|
185
215
|
return (options?.client ?? client).delete({
|
|
186
216
|
...options,
|
|
187
217
|
url: "/git/v1/repo/{repo}"
|
|
188
218
|
});
|
|
189
219
|
};
|
|
220
|
+
const handleGetContents = (options) => {
|
|
221
|
+
return (options?.client ?? client).get({
|
|
222
|
+
...options,
|
|
223
|
+
url: "/git/v1/repo/{repo}/contents/{*path}"
|
|
224
|
+
});
|
|
225
|
+
};
|
|
190
226
|
const handleListGitTriggers = (options) => {
|
|
191
227
|
return (options?.client ?? client).get({
|
|
192
228
|
...options,
|
|
@@ -232,11 +268,6 @@ class FreestyleSandboxes {
|
|
|
232
268
|
if (!options?.apiKey) {
|
|
233
269
|
this.options.apiKey = process.env.FREESTYLE_API_KEY;
|
|
234
270
|
}
|
|
235
|
-
if (!this.options.apiKey) {
|
|
236
|
-
throw new Error(
|
|
237
|
-
"No API key provided. Please set the FREESTYLE_API_KEY environment variable or configure apiKey when constructing FreestyleSandboxes."
|
|
238
|
-
);
|
|
239
|
-
}
|
|
240
271
|
if (typeof Deno !== "undefined") {
|
|
241
272
|
class FreestyleRequest extends Request {
|
|
242
273
|
constructor(input, init) {
|
|
@@ -375,6 +406,20 @@ Message: ${response.error?.message}`
|
|
|
375
406
|
}
|
|
376
407
|
throw new Error(response.error.message);
|
|
377
408
|
}
|
|
409
|
+
async verifyDomainVerificationRequest(id) {
|
|
410
|
+
const response = await handleVerifyDomain({
|
|
411
|
+
client: this.client,
|
|
412
|
+
body: {
|
|
413
|
+
id
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
if (response.data) {
|
|
417
|
+
return response.data;
|
|
418
|
+
}
|
|
419
|
+
throw new Error(
|
|
420
|
+
`Failed to verify domain verification request with ID ${id}: ${response.error.message}`
|
|
421
|
+
);
|
|
422
|
+
}
|
|
378
423
|
/**
|
|
379
424
|
* Verify a domain. Note, this requires the domain verification token to be already set up.
|
|
380
425
|
* @param domain The domain to verify.
|
|
@@ -499,7 +544,8 @@ ${response.error.message}`);
|
|
|
499
544
|
name,
|
|
500
545
|
public: pub = false,
|
|
501
546
|
source,
|
|
502
|
-
import: _import
|
|
547
|
+
import: _import,
|
|
548
|
+
defaultBranch
|
|
503
549
|
}) {
|
|
504
550
|
const response = await handleCreateRepo({
|
|
505
551
|
client: this.client,
|
|
@@ -507,7 +553,8 @@ ${response.error.message}`);
|
|
|
507
553
|
name,
|
|
508
554
|
public: pub,
|
|
509
555
|
source,
|
|
510
|
-
import: _import
|
|
556
|
+
import: _import,
|
|
557
|
+
defaultBranch
|
|
511
558
|
}
|
|
512
559
|
});
|
|
513
560
|
if (response.data) {
|
|
@@ -817,6 +864,122 @@ ${response.error.message}`);
|
|
|
817
864
|
`Failed to delete git trigger ${triggerId}: ${response.error.message}`
|
|
818
865
|
);
|
|
819
866
|
}
|
|
867
|
+
/**
|
|
868
|
+
* Set the default branch for a git repository.
|
|
869
|
+
*/
|
|
870
|
+
async setGitRepoDefaultBranch({
|
|
871
|
+
repoId,
|
|
872
|
+
defaultBranch
|
|
873
|
+
}) {
|
|
874
|
+
const response = await handleSetDefaultBranch({
|
|
875
|
+
client: this.client,
|
|
876
|
+
path: {
|
|
877
|
+
repo_id: repoId
|
|
878
|
+
},
|
|
879
|
+
body: {
|
|
880
|
+
defaultBranch
|
|
881
|
+
}
|
|
882
|
+
});
|
|
883
|
+
if (response.error) {
|
|
884
|
+
throw new Error(`Failed to set default branch: ${response.error}`);
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* Get the default branch for a git repository.
|
|
889
|
+
*/
|
|
890
|
+
async getGitRepoDefaultBranch({
|
|
891
|
+
repoId
|
|
892
|
+
}) {
|
|
893
|
+
const response = await handleGetDefaultBranch({
|
|
894
|
+
client: this.client,
|
|
895
|
+
path: { repo_id: repoId }
|
|
896
|
+
});
|
|
897
|
+
if (response.data) {
|
|
898
|
+
return response.data.defaultBranch;
|
|
899
|
+
}
|
|
900
|
+
throw new Error(
|
|
901
|
+
`Failed to get default branch for repository ${repoId}: ${response.error}`
|
|
902
|
+
);
|
|
903
|
+
}
|
|
904
|
+
/**
|
|
905
|
+
* Get the contents of a git repository at the given path.
|
|
906
|
+
*/
|
|
907
|
+
async getGitRepoContents({
|
|
908
|
+
repoId,
|
|
909
|
+
path,
|
|
910
|
+
ref
|
|
911
|
+
}) {
|
|
912
|
+
const response = await handleGetContents({
|
|
913
|
+
client: this.client,
|
|
914
|
+
path: {
|
|
915
|
+
repo: repoId,
|
|
916
|
+
"*path": path ?? null
|
|
917
|
+
},
|
|
918
|
+
query: {
|
|
919
|
+
ref
|
|
920
|
+
}
|
|
921
|
+
});
|
|
922
|
+
if (response.data) {
|
|
923
|
+
return response.data;
|
|
924
|
+
}
|
|
925
|
+
throw new Error(
|
|
926
|
+
`Failed to get git repository contents: ${response.error.message}`
|
|
927
|
+
);
|
|
928
|
+
}
|
|
929
|
+
/**
|
|
930
|
+
* Configure a git repository to sync with GitHub.
|
|
931
|
+
*/
|
|
932
|
+
async configureGitRepoGitHubSync({
|
|
933
|
+
repoId,
|
|
934
|
+
githubRepoName
|
|
935
|
+
}) {
|
|
936
|
+
const response = await configureGithubSync({
|
|
937
|
+
client: this.client,
|
|
938
|
+
path: {
|
|
939
|
+
repo_id: repoId
|
|
940
|
+
},
|
|
941
|
+
body: {
|
|
942
|
+
githubRepoName
|
|
943
|
+
}
|
|
944
|
+
});
|
|
945
|
+
if (response.error) {
|
|
946
|
+
throw new Error(`Failed to configure GitHub sync: ${response.error}`);
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* Remove the GitHub sync configuration for a git repository.
|
|
951
|
+
*/
|
|
952
|
+
async removeGitRepoGitHubSync({ repoId }) {
|
|
953
|
+
const response = await removeGithubSync({
|
|
954
|
+
client: this.client,
|
|
955
|
+
path: {
|
|
956
|
+
repo_id: repoId
|
|
957
|
+
}
|
|
958
|
+
});
|
|
959
|
+
if (response.error) {
|
|
960
|
+
throw new Error(`Failed to remove GitHub sync: ${response.error}`);
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
/**
|
|
964
|
+
* Get the GitHub sync configuration for a git repository.
|
|
965
|
+
*/
|
|
966
|
+
async getGitRepoGitHubSyncConfig({
|
|
967
|
+
repoId
|
|
968
|
+
}) {
|
|
969
|
+
const response = await getGithubSync({
|
|
970
|
+
client: this.client,
|
|
971
|
+
path: {
|
|
972
|
+
repo_id: repoId
|
|
973
|
+
}
|
|
974
|
+
});
|
|
975
|
+
if (response.response.status === 404) {
|
|
976
|
+
return null;
|
|
977
|
+
}
|
|
978
|
+
if (response.error) {
|
|
979
|
+
throw new Error(`Failed to get GitHub sync config: ${response.error}`);
|
|
980
|
+
}
|
|
981
|
+
return response.data ?? null;
|
|
982
|
+
}
|
|
820
983
|
/**
|
|
821
984
|
* Request a dev server for a repository. If a dev server is already running
|
|
822
985
|
* for that repository, it will return a url to that server. Dev servers are
|
package/dist/mastra/inde.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ import { Transform } from 'stream';
|
|
|
5
5
|
import { EventEmitter } from 'events';
|
|
6
6
|
import { ServerResponse, IncomingMessage } from 'http';
|
|
7
7
|
import { WorkerOptions } from 'worker_threads';
|
|
8
|
-
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-
|
|
8
|
+
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-BWwhCgTX.js';
|
|
9
9
|
import 'node:http';
|
|
10
10
|
|
|
11
11
|
// Type definitions for pino-std-serializers 2.4
|
package/dist/mastra/inde.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import { Transform } from 'stream';
|
|
|
5
5
|
import { EventEmitter } from 'events';
|
|
6
6
|
import { ServerResponse, IncomingMessage } from 'http';
|
|
7
7
|
import { WorkerOptions } from 'worker_threads';
|
|
8
|
-
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-
|
|
8
|
+
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-BWwhCgTX.js';
|
|
9
9
|
import 'node:http';
|
|
10
10
|
|
|
11
11
|
// Type definitions for pino-std-serializers 2.4
|
package/dist/mastra/index.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ import { Transform } from 'stream';
|
|
|
5
5
|
import { EventEmitter } from 'events';
|
|
6
6
|
import { ServerResponse, IncomingMessage } from 'http';
|
|
7
7
|
import { WorkerOptions } from 'worker_threads';
|
|
8
|
-
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-
|
|
8
|
+
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-BWwhCgTX.js';
|
|
9
9
|
import 'node:http';
|
|
10
10
|
|
|
11
11
|
// Type definitions for pino-std-serializers 2.4
|
package/dist/mastra/index.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import { Transform } from 'stream';
|
|
|
5
5
|
import { EventEmitter } from 'events';
|
|
6
6
|
import { ServerResponse, IncomingMessage } from 'http';
|
|
7
7
|
import { WorkerOptions } from 'worker_threads';
|
|
8
|
-
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-
|
|
8
|
+
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-BWwhCgTX.js';
|
|
9
9
|
import 'node:http';
|
|
10
10
|
|
|
11
11
|
// Type definitions for pino-std-serializers 2.4
|