freestyle-sandboxes 0.0.46 → 0.0.48
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 +71 -0
- package/dist/ai/inde.d.mts +71 -0
- package/dist/ai/index.d.cts +1 -1
- package/dist/ai/index.d.mts +1 -1
- package/dist/expo/inde.d.cts +6 -0
- package/dist/expo/inde.d.mts +6 -0
- package/dist/inde.d.cts +192 -0
- package/dist/inde.d.mts +192 -0
- package/dist/{index-CGc0kRd_.cjs → index-BBXyg0JQ.cjs} +5 -9
- package/dist/index-BQHqnjZK.mjs +3231 -0
- package/dist/index-CEEa9WHp.cjs +3238 -0
- package/dist/{index-jh-93svX.mjs → index-DCF70Xbq.mjs} +5 -9
- package/dist/index.cjs +28 -0
- package/dist/index.d.cts +12 -3
- package/dist/index.d.mts +12 -3
- package/dist/index.mjs +28 -0
- package/dist/langgraph/inde.d.cts +2162 -0
- package/dist/langgraph/inde.d.mts +2162 -0
- package/dist/langgraph/index.d.cts +1 -1
- package/dist/langgraph/index.d.mts +1 -1
- package/dist/mastra/inde.d.cts +2623 -0
- package/dist/mastra/inde.d.mts +2623 -0
- package/dist/mastra/index.d.cts +1 -1
- package/dist/mastra/index.d.mts +1 -1
- package/dist/react/dev-server/index..d.cts +28 -0
- package/dist/react/dev-server/index..d.mts +28 -0
- package/dist/react/dev-server/index.cjs +94 -0
- package/dist/react/dev-server/index.d.cts +28 -0
- package/dist/react/dev-server/index.d.mts +28 -0
- package/dist/react/dev-server/index.mjs +91 -0
- package/dist/types.gen-1sd31qLV.d.ts +172 -0
- package/dist/types.gen-BCdfx7yt.d.ts +760 -0
- package/dist/types.gen-BaMKzqxQ.d.ts +233 -0
- package/dist/types.gen-BtK6PMQy.d.ts +195 -0
- package/dist/types.gen-C03gaIPq.d.ts +297 -0
- package/dist/{types.gen-BJArgpto.d.ts → types.gen-CIf3ciN7.d.ts} +5 -2
- package/dist/types.gen-CMuCas4r.d.ts +183 -0
- package/dist/{types.gen-DxZanGNF.d.ts → types.gen-CZUnqmzP.d.ts} +6 -9
- package/dist/types.gen-CnEkmbco.d.ts +314 -0
- package/dist/types.gen-DDYpuDzZ.d.ts +764 -0
- package/dist/types.gen-DHmdEOOa.d.ts +172 -0
- package/dist/{types.gen-CfrGF-JI.d.ts → types.gen-DLYohMJT.d.ts} +1 -1
- package/dist/types.gen-DbTb_SrD.d.ts +156 -0
- package/dist/types.gen-DkQ-Dbs1.d.ts +764 -0
- package/dist/types.gen-DyY7Deri.d.ts +138 -0
- package/dist/types.gen-MBZCvIhE.d.ts +311 -0
- package/dist/types.gen-YhJAHBw8.d.ts +233 -0
- package/dist/types.gen-cCnnhnB6.d.ts +182 -0
- package/dist/types.gen-uDTr6v-7.d.ts +731 -0
- package/dist/utils/inde.d.cts +10 -0
- package/dist/utils/inde.d.mts +10 -0
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/openapi/types.gen.ts +4 -1
- package/openapi.json +4649 -1
- package/package.json +14 -2
- package/src/index.ts +29 -4
- package/src/react/dev-server/index.tsx +127 -0
- package/src/react/dev-server/types.ts +5 -0
- package/tsconfig.json +1 -1
|
@@ -3167,12 +3167,11 @@ const executeTool = (config) => {
|
|
|
3167
3167
|
return tool({
|
|
3168
3168
|
description: executeCodeDescription(envVars, nodeModules),
|
|
3169
3169
|
parameters: executeCodeSchema,
|
|
3170
|
-
execute: async ({ script, ...otherParams }
|
|
3170
|
+
execute: async ({ script, ...otherParams }) => {
|
|
3171
3171
|
try {
|
|
3172
3172
|
const res = await api.executeScript(script, config);
|
|
3173
3173
|
if (config.onResult) {
|
|
3174
3174
|
await config.onResult({
|
|
3175
|
-
toolCallId,
|
|
3176
3175
|
result: res,
|
|
3177
3176
|
input: {
|
|
3178
3177
|
script,
|
|
@@ -3215,13 +3214,10 @@ ${nodeModules.length > 0 ? `You can use the following node modules: ${nodeModule
|
|
|
3215
3214
|
`)
|
|
3216
3215
|
}),
|
|
3217
3216
|
execute: async ({ files }) => {
|
|
3218
|
-
const new_files = Object.keys(files).reduce(
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
},
|
|
3223
|
-
{}
|
|
3224
|
-
);
|
|
3217
|
+
const new_files = Object.keys(files).reduce((acc, key) => {
|
|
3218
|
+
acc[key] = { content: files[key] };
|
|
3219
|
+
return acc;
|
|
3220
|
+
}, {});
|
|
3225
3221
|
try {
|
|
3226
3222
|
const res = await api.deployWeb(
|
|
3227
3223
|
{
|
package/dist/index.cjs
CHANGED
|
@@ -51,6 +51,12 @@ const handleDeleteDomainVerification = (options) => {
|
|
|
51
51
|
url: "/domains/v1/verifications"
|
|
52
52
|
});
|
|
53
53
|
};
|
|
54
|
+
const handleEphemeralDevServer = (options) => {
|
|
55
|
+
return (options?.client ?? client).post({
|
|
56
|
+
...options,
|
|
57
|
+
url: "/ephemeral/v1/dev-servers"
|
|
58
|
+
});
|
|
59
|
+
};
|
|
54
60
|
const handleListExecuteRuns = (options) => {
|
|
55
61
|
return (options?.client ?? client).get({
|
|
56
62
|
...options,
|
|
@@ -768,6 +774,28 @@ ${response.error.message}`);
|
|
|
768
774
|
`Failed to delete git trigger ${triggerId}: ${response.error.message}`
|
|
769
775
|
);
|
|
770
776
|
}
|
|
777
|
+
/**
|
|
778
|
+
* Request a dev server for a repository. If a dev server is already running
|
|
779
|
+
* for that repository, it will return a url to that server. Dev servers are
|
|
780
|
+
* ephemeral so you should call this function every time you need a url. Do
|
|
781
|
+
* not store the url in your database!
|
|
782
|
+
*/
|
|
783
|
+
async requestDevServer({
|
|
784
|
+
repoUrl
|
|
785
|
+
}) {
|
|
786
|
+
const response = await handleEphemeralDevServer({
|
|
787
|
+
client: this.client,
|
|
788
|
+
body: {
|
|
789
|
+
repo: repoUrl
|
|
790
|
+
}
|
|
791
|
+
});
|
|
792
|
+
if (!response.data) {
|
|
793
|
+
throw new Error(
|
|
794
|
+
`Failed to request dev server: ${response.error}`
|
|
795
|
+
);
|
|
796
|
+
}
|
|
797
|
+
return response.data;
|
|
798
|
+
}
|
|
771
799
|
}
|
|
772
800
|
|
|
773
801
|
exports.FreestyleSandboxes = FreestyleSandboxes;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration, B as BuildOptions, 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 CreateRepositoryResponseSuccess, q as HandleListRepositoriesResponse, r as HandleDeleteRepoResponse, G as GitIdentity, s as HandleDeleteIdentityResponse, A as AccessLevel, t as HandleGrantPermissionResponse, L as ListPermissionResponseSuccess, u as DescribePermissionResponseSuccess, v as CreatedToken, w as ListGitTokensResponseSuccess, x as HandleListGitTriggersResponse, y as GitTrigger, z as GitTriggerAction, E as HandleCreateGitTriggerResponse } from './types.gen-
|
|
2
|
-
export {
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration, B as BuildOptions, 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 CreateRepositoryResponseSuccess, q as HandleListRepositoriesResponse, r as HandleDeleteRepoResponse, G as GitIdentity, s as HandleDeleteIdentityResponse, A as AccessLevel, t as HandleGrantPermissionResponse, L as ListPermissionResponseSuccess, u as DescribePermissionResponseSuccess, v as CreatedToken, w as ListGitTokensResponseSuccess, x as HandleListGitTriggersResponse, y as GitTrigger, z as GitTriggerAction, E as HandleCreateGitTriggerResponse, I as HandleEphemeralDevServerResponse } from './types.gen-CIf3ciN7.js';
|
|
2
|
+
export { K as AccessTokenInfo, J as AccessibleRepository, M as Behavior, N as CreateDomainMappingRequest, O as CreateRecordParams, P as CreateRepoRequest, R as CreateRepoSource, Q as CreateRepositoryRequest, T as DeploymentLogEntry, V as DeploymentState, W as DevServer, X as DnsRecord, Y as DnsRecordData, Z as DnsRecordKind, _ as DomainVerificationRequest, $ as ExecuteLogEntry, a0 as ExecuteRunInfo, a1 as ExecuteRunState, a2 as FreestyleCloudstateDeployConfiguration, a3 as FreestyleCloudstateDeployErrorResponse, a4 as FreestyleDeleteDomainVerificationRequest, a5 as FreestyleDeployWebErrorResponse, a6 as FreestyleDeployWebPayload, a7 as FreestyleDeployWebPayloadV2, a8 as FreestyleDomainVerificationRequest, a9 as FreestyleExecuteScriptParams, aa as FreestyleFile, ab as FreestyleGetLogsResponse, ac as FreestyleJavaScriptLog, ad as FreestyleLogResponseObject, ae as FreestyleNetworkPermission, ag as FreestyleVerifyDomainRequest, ah as GitRepositoryTrigger, ak as GrantPermissionRequest, av as HandleBackupCloudstateData, aw as HandleBackupCloudstateError, aR as HandleCreateDomainVerificationData, aS as HandleCreateDomainVerificationError, bn as HandleCreateGitTokenData, bp as HandleCreateGitTokenError, bo as HandleCreateGitTokenResponse, bC as HandleCreateGitTriggerData, bD as HandleCreateGitTriggerError, b3 as HandleCreateIdentityError, b2 as HandleCreateIdentityResponse, aA as HandleCreateRecordData, aC as HandleCreateRecordError, aB as HandleCreateRecordResponse, bv as HandleCreateRepoData, bx as HandleCreateRepoError, bw as HandleCreateRepoResponse, aM as HandleDeleteDomainMappingData, aO as HandleDeleteDomainMappingError, aN as HandleDeleteDomainMappingResponse, aT as HandleDeleteDomainVerificationData, aU as HandleDeleteDomainVerificationError, bE as HandleDeleteGitTriggerData, bG as HandleDeleteGitTriggerError, bF as HandleDeleteGitTriggerResponse, b4 as HandleDeleteIdentityData, b5 as HandleDeleteIdentityError, aD as HandleDeleteRecordData, aF as HandleDeleteRecordError, aE as HandleDeleteRecordResponse, by as HandleDeleteRepoData, bz as HandleDeleteRepoError, as as HandleDeployCloudstateData, au as HandleDeployCloudstateError, at as HandleDeployCloudstateResponse, bJ as HandleDeployWebData, bL as HandleDeployWebError, bK as HandleDeployWebResponse, bM as HandleDeployWebV2Data, bO as HandleDeployWebV2Error, bN as HandleDeployWebV2Response, b9 as HandleDescribePermissionData, bb as HandleDescribePermissionError, ba as HandleDescribePermissionResponse, aV as HandleEphemeralDevServerData, aW as HandleEphemeralDevServerError, a$ as HandleExecuteScriptData, b1 as HandleExecuteScriptError, b0 as HandleExecuteScriptResponse, aZ as HandleGetExecuteRunData, a_ as HandleGetExecuteRunError, bH as HandleGetLogsData, bI as HandleGetLogsError, bR as HandleGetWebDeployDetailsData, bc as HandleGrantPermissionData, bd as HandleGrantPermissionError, aJ as HandleInsertDomainMappingData, aL as HandleInsertDomainMappingError, aK as HandleInsertDomainMappingResponse, aP as HandleListDomainVerificationRequestsError, aI as HandleListDomainsError, aX as HandleListExecuteRunsData, aY as HandleListExecuteRunsError, bk as HandleListGitTokensData, bm as HandleListGitTokensError, bl as HandleListGitTokensResponse, bA as HandleListGitTriggersData, bB as HandleListGitTriggersError, b6 as HandleListPermissionsData, b8 as HandleListPermissionsError, b7 as HandleListPermissionsResponse, ax as HandleListRecordsData, az as HandleListRecordsError, ay as HandleListRecordsResponse, bt as HandleListRepositoriesData, bu as HandleListRepositoriesError, bP as HandleListWebDeploysData, bQ as HandleListWebDeploysError, bq as HandleRevokeGitTokenData, bs as HandleRevokeGitTokenError, br as HandleRevokeGitTokenResponse, be as HandleRevokePermissionData, bg as HandleRevokePermissionError, bf as HandleRevokePermissionResponse, bh as HandleUpdatePermissionData, bj as HandleUpdatePermissionError, bi as HandleUpdatePermissionResponse, aQ as HandleVerifyDomainData, aG as HandleVerifyWildcardData, aH as HandleVerifyWildcardError, al as InternalServerError, am as ListRecordsResponse, an as NetworkPermissionData, ao as RepositoryInfo, ap as RevokeGitTokenRequest, aq as UpdatePermissionRequest, ar as Visibility, af as action, aj as action2, ai as event, U as kind, S as type } from './types.gen-CIf3ciN7.js';
|
|
3
3
|
|
|
4
4
|
declare class FreestyleSandboxes {
|
|
5
5
|
private client;
|
|
@@ -178,6 +178,15 @@ declare class FreestyleSandboxes {
|
|
|
178
178
|
deleteGitTrigger({ triggerId }: {
|
|
179
179
|
triggerId: string;
|
|
180
180
|
}): Promise<void>;
|
|
181
|
+
/**
|
|
182
|
+
* Request a dev server for a repository. If a dev server is already running
|
|
183
|
+
* for that repository, it will return a url to that server. Dev servers are
|
|
184
|
+
* ephemeral so you should call this function every time you need a url. Do
|
|
185
|
+
* not store the url in your database!
|
|
186
|
+
*/
|
|
187
|
+
requestDevServer({ repoUrl }: {
|
|
188
|
+
repoUrl: string;
|
|
189
|
+
}): Promise<HandleEphemeralDevServerResponse>;
|
|
181
190
|
}
|
|
182
191
|
|
|
183
|
-
export { AccessLevel, BuildOptions, CreateRepositoryResponseSuccess, CreatedToken, DeploymentSource, DescribePermissionResponseSuccess, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponseV2, 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 };
|
|
192
|
+
export { AccessLevel, BuildOptions, CreateRepositoryResponseSuccess, CreatedToken, DeploymentSource, DescribePermissionResponseSuccess, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponseV2, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, GitIdentity, GitTrigger, GitTriggerAction, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleCreateGitTriggerResponse, HandleDeleteDomainVerificationResponse, HandleDeleteIdentityResponse, HandleDeleteRepoResponse, HandleEphemeralDevServerResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleGrantPermissionResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListGitTriggersResponse, HandleListRepositoriesResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse, ListGitTokensResponseSuccess, ListPermissionResponseSuccess };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration, B as BuildOptions, 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 CreateRepositoryResponseSuccess, q as HandleListRepositoriesResponse, r as HandleDeleteRepoResponse, G as GitIdentity, s as HandleDeleteIdentityResponse, A as AccessLevel, t as HandleGrantPermissionResponse, L as ListPermissionResponseSuccess, u as DescribePermissionResponseSuccess, v as CreatedToken, w as ListGitTokensResponseSuccess, x as HandleListGitTriggersResponse, y as GitTrigger, z as GitTriggerAction, E as HandleCreateGitTriggerResponse } from './types.gen-
|
|
2
|
-
export {
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration, B as BuildOptions, 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 CreateRepositoryResponseSuccess, q as HandleListRepositoriesResponse, r as HandleDeleteRepoResponse, G as GitIdentity, s as HandleDeleteIdentityResponse, A as AccessLevel, t as HandleGrantPermissionResponse, L as ListPermissionResponseSuccess, u as DescribePermissionResponseSuccess, v as CreatedToken, w as ListGitTokensResponseSuccess, x as HandleListGitTriggersResponse, y as GitTrigger, z as GitTriggerAction, E as HandleCreateGitTriggerResponse, I as HandleEphemeralDevServerResponse } from './types.gen-CIf3ciN7.js';
|
|
2
|
+
export { K as AccessTokenInfo, J as AccessibleRepository, M as Behavior, N as CreateDomainMappingRequest, O as CreateRecordParams, P as CreateRepoRequest, R as CreateRepoSource, Q as CreateRepositoryRequest, T as DeploymentLogEntry, V as DeploymentState, W as DevServer, X as DnsRecord, Y as DnsRecordData, Z as DnsRecordKind, _ as DomainVerificationRequest, $ as ExecuteLogEntry, a0 as ExecuteRunInfo, a1 as ExecuteRunState, a2 as FreestyleCloudstateDeployConfiguration, a3 as FreestyleCloudstateDeployErrorResponse, a4 as FreestyleDeleteDomainVerificationRequest, a5 as FreestyleDeployWebErrorResponse, a6 as FreestyleDeployWebPayload, a7 as FreestyleDeployWebPayloadV2, a8 as FreestyleDomainVerificationRequest, a9 as FreestyleExecuteScriptParams, aa as FreestyleFile, ab as FreestyleGetLogsResponse, ac as FreestyleJavaScriptLog, ad as FreestyleLogResponseObject, ae as FreestyleNetworkPermission, ag as FreestyleVerifyDomainRequest, ah as GitRepositoryTrigger, ak as GrantPermissionRequest, av as HandleBackupCloudstateData, aw as HandleBackupCloudstateError, aR as HandleCreateDomainVerificationData, aS as HandleCreateDomainVerificationError, bn as HandleCreateGitTokenData, bp as HandleCreateGitTokenError, bo as HandleCreateGitTokenResponse, bC as HandleCreateGitTriggerData, bD as HandleCreateGitTriggerError, b3 as HandleCreateIdentityError, b2 as HandleCreateIdentityResponse, aA as HandleCreateRecordData, aC as HandleCreateRecordError, aB as HandleCreateRecordResponse, bv as HandleCreateRepoData, bx as HandleCreateRepoError, bw as HandleCreateRepoResponse, aM as HandleDeleteDomainMappingData, aO as HandleDeleteDomainMappingError, aN as HandleDeleteDomainMappingResponse, aT as HandleDeleteDomainVerificationData, aU as HandleDeleteDomainVerificationError, bE as HandleDeleteGitTriggerData, bG as HandleDeleteGitTriggerError, bF as HandleDeleteGitTriggerResponse, b4 as HandleDeleteIdentityData, b5 as HandleDeleteIdentityError, aD as HandleDeleteRecordData, aF as HandleDeleteRecordError, aE as HandleDeleteRecordResponse, by as HandleDeleteRepoData, bz as HandleDeleteRepoError, as as HandleDeployCloudstateData, au as HandleDeployCloudstateError, at as HandleDeployCloudstateResponse, bJ as HandleDeployWebData, bL as HandleDeployWebError, bK as HandleDeployWebResponse, bM as HandleDeployWebV2Data, bO as HandleDeployWebV2Error, bN as HandleDeployWebV2Response, b9 as HandleDescribePermissionData, bb as HandleDescribePermissionError, ba as HandleDescribePermissionResponse, aV as HandleEphemeralDevServerData, aW as HandleEphemeralDevServerError, a$ as HandleExecuteScriptData, b1 as HandleExecuteScriptError, b0 as HandleExecuteScriptResponse, aZ as HandleGetExecuteRunData, a_ as HandleGetExecuteRunError, bH as HandleGetLogsData, bI as HandleGetLogsError, bR as HandleGetWebDeployDetailsData, bc as HandleGrantPermissionData, bd as HandleGrantPermissionError, aJ as HandleInsertDomainMappingData, aL as HandleInsertDomainMappingError, aK as HandleInsertDomainMappingResponse, aP as HandleListDomainVerificationRequestsError, aI as HandleListDomainsError, aX as HandleListExecuteRunsData, aY as HandleListExecuteRunsError, bk as HandleListGitTokensData, bm as HandleListGitTokensError, bl as HandleListGitTokensResponse, bA as HandleListGitTriggersData, bB as HandleListGitTriggersError, b6 as HandleListPermissionsData, b8 as HandleListPermissionsError, b7 as HandleListPermissionsResponse, ax as HandleListRecordsData, az as HandleListRecordsError, ay as HandleListRecordsResponse, bt as HandleListRepositoriesData, bu as HandleListRepositoriesError, bP as HandleListWebDeploysData, bQ as HandleListWebDeploysError, bq as HandleRevokeGitTokenData, bs as HandleRevokeGitTokenError, br as HandleRevokeGitTokenResponse, be as HandleRevokePermissionData, bg as HandleRevokePermissionError, bf as HandleRevokePermissionResponse, bh as HandleUpdatePermissionData, bj as HandleUpdatePermissionError, bi as HandleUpdatePermissionResponse, aQ as HandleVerifyDomainData, aG as HandleVerifyWildcardData, aH as HandleVerifyWildcardError, al as InternalServerError, am as ListRecordsResponse, an as NetworkPermissionData, ao as RepositoryInfo, ap as RevokeGitTokenRequest, aq as UpdatePermissionRequest, ar as Visibility, af as action, aj as action2, ai as event, U as kind, S as type } from './types.gen-CIf3ciN7.js';
|
|
3
3
|
|
|
4
4
|
declare class FreestyleSandboxes {
|
|
5
5
|
private client;
|
|
@@ -178,6 +178,15 @@ declare class FreestyleSandboxes {
|
|
|
178
178
|
deleteGitTrigger({ triggerId }: {
|
|
179
179
|
triggerId: string;
|
|
180
180
|
}): Promise<void>;
|
|
181
|
+
/**
|
|
182
|
+
* Request a dev server for a repository. If a dev server is already running
|
|
183
|
+
* for that repository, it will return a url to that server. Dev servers are
|
|
184
|
+
* ephemeral so you should call this function every time you need a url. Do
|
|
185
|
+
* not store the url in your database!
|
|
186
|
+
*/
|
|
187
|
+
requestDevServer({ repoUrl }: {
|
|
188
|
+
repoUrl: string;
|
|
189
|
+
}): Promise<HandleEphemeralDevServerResponse>;
|
|
181
190
|
}
|
|
182
191
|
|
|
183
|
-
export { AccessLevel, BuildOptions, CreateRepositoryResponseSuccess, CreatedToken, DeploymentSource, DescribePermissionResponseSuccess, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponseV2, 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 };
|
|
192
|
+
export { AccessLevel, BuildOptions, CreateRepositoryResponseSuccess, CreatedToken, DeploymentSource, DescribePermissionResponseSuccess, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponseV2, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, GitIdentity, GitTrigger, GitTriggerAction, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleCreateGitTriggerResponse, HandleDeleteDomainVerificationResponse, HandleDeleteIdentityResponse, HandleDeleteRepoResponse, HandleEphemeralDevServerResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleGrantPermissionResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListGitTriggersResponse, HandleListRepositoriesResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse, ListGitTokensResponseSuccess, ListPermissionResponseSuccess };
|
package/dist/index.mjs
CHANGED
|
@@ -49,6 +49,12 @@ const handleDeleteDomainVerification = (options) => {
|
|
|
49
49
|
url: "/domains/v1/verifications"
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
+
const handleEphemeralDevServer = (options) => {
|
|
53
|
+
return (options?.client ?? client).post({
|
|
54
|
+
...options,
|
|
55
|
+
url: "/ephemeral/v1/dev-servers"
|
|
56
|
+
});
|
|
57
|
+
};
|
|
52
58
|
const handleListExecuteRuns = (options) => {
|
|
53
59
|
return (options?.client ?? client).get({
|
|
54
60
|
...options,
|
|
@@ -766,6 +772,28 @@ ${response.error.message}`);
|
|
|
766
772
|
`Failed to delete git trigger ${triggerId}: ${response.error.message}`
|
|
767
773
|
);
|
|
768
774
|
}
|
|
775
|
+
/**
|
|
776
|
+
* Request a dev server for a repository. If a dev server is already running
|
|
777
|
+
* for that repository, it will return a url to that server. Dev servers are
|
|
778
|
+
* ephemeral so you should call this function every time you need a url. Do
|
|
779
|
+
* not store the url in your database!
|
|
780
|
+
*/
|
|
781
|
+
async requestDevServer({
|
|
782
|
+
repoUrl
|
|
783
|
+
}) {
|
|
784
|
+
const response = await handleEphemeralDevServer({
|
|
785
|
+
client: this.client,
|
|
786
|
+
body: {
|
|
787
|
+
repo: repoUrl
|
|
788
|
+
}
|
|
789
|
+
});
|
|
790
|
+
if (!response.data) {
|
|
791
|
+
throw new Error(
|
|
792
|
+
`Failed to request dev server: ${response.error}`
|
|
793
|
+
);
|
|
794
|
+
}
|
|
795
|
+
return response.data;
|
|
796
|
+
}
|
|
769
797
|
}
|
|
770
798
|
|
|
771
799
|
export { FreestyleSandboxes };
|