freestyle-sandboxes 0.0.49 → 0.0.51
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 +15 -10
- package/dist/inde.d.mts +15 -10
- package/dist/index.cjs +19 -13
- package/dist/index.d.cts +15 -10
- package/dist/index.d.mts +15 -10
- package/dist/index.mjs +19 -13
- 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-627pxroW.d.ts +830 -0
- package/dist/types.gen-mg_JNXrq.d.ts +830 -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 +13 -2
- package/openapi/types.gen.ts +33 -6
- package/openapi.json +1 -4649
- package/package.json +2 -2
- package/src/index.ts +55 -57
package/dist/ai/inde.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess,
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b2 as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponseV2 } from '../types.gen-627pxroW.js';
|
|
2
2
|
import { T as Tool, a as ToolExecutionOptions } from '../index.d-9H_wnIbz.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import 'node:http';
|
package/dist/ai/inde.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess,
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b2 as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponseV2 } from '../types.gen-627pxroW.js';
|
|
2
2
|
import { T as Tool, a as ToolExecutionOptions } from '../index.d-9H_wnIbz.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import 'node:http';
|
package/dist/ai/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess,
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b2 as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponseV2 } from '../types.gen-627pxroW.js';
|
|
2
2
|
import { T as Tool, a as ToolExecutionOptions } from '../index.d-9H_wnIbz.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import 'node:http';
|
package/dist/ai/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess,
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b2 as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponseV2 } from '../types.gen-627pxroW.js';
|
|
2
2
|
import { T as Tool, a as ToolExecutionOptions } from '../index.d-9H_wnIbz.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import 'node:http';
|
package/dist/inde.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration,
|
|
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 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, B as HandleCreateGitTriggerResponse } from './types.gen-627pxroW.js';
|
|
2
|
+
export { J as AccessTokenInfo, I as AccessibleRepository, K as Behavior, M as CreateDomainMappingRequest, N as CreateRecordParams, O as CreateRepoRequest, Q as CreateRepoSource, P as CreateRepositoryRequest, S as CustomBuildOptions, E as DeploymentBuildOptions, 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, br as HandleCreateGitTokenData, bt as HandleCreateGitTokenError, bs as HandleCreateGitTokenResponse, bG as HandleCreateGitTriggerData, bH as HandleCreateGitTriggerError, b7 as HandleCreateIdentityError, b6 as HandleCreateIdentityResponse, aA as HandleCreateRecordData, aC as HandleCreateRecordError, aB as HandleCreateRecordResponse, bz as HandleCreateRepoData, bB as HandleCreateRepoError, bA as HandleCreateRepoResponse, aM as HandleDeleteDomainMappingData, aO as HandleDeleteDomainMappingError, aN as HandleDeleteDomainMappingResponse, aT as HandleDeleteDomainVerificationData, aU as HandleDeleteDomainVerificationError, bI as HandleDeleteGitTriggerData, bK as HandleDeleteGitTriggerError, bJ as HandleDeleteGitTriggerResponse, b8 as HandleDeleteIdentityData, b9 as HandleDeleteIdentityError, aD as HandleDeleteRecordData, aF as HandleDeleteRecordError, aE as HandleDeleteRecordResponse, bC as HandleDeleteRepoData, bD as HandleDeleteRepoError, as as HandleDeployCloudstateData, au as HandleDeployCloudstateError, at as HandleDeployCloudstateResponse, bN as HandleDeployWebData, bP as HandleDeployWebError, bO as HandleDeployWebResponse, bQ as HandleDeployWebV2Data, bS as HandleDeployWebV2Error, bR as HandleDeployWebV2Response, bd as HandleDescribePermissionData, bf as HandleDescribePermissionError, be as HandleDescribePermissionResponse, aV as HandleEphemeralDevServerData, aX as HandleEphemeralDevServerError, aW as HandleEphemeralDevServerResponse, b0 as HandleExecuteScriptData, b2 as HandleExecuteScriptError, b1 as HandleExecuteScriptResponse, a_ as HandleGetExecuteRunData, a$ as HandleGetExecuteRunError, bL as HandleGetLogsData, bM as HandleGetLogsError, bV as HandleGetWebDeployDetailsData, bg as HandleGrantPermissionData, bh as HandleGrantPermissionError, aJ as HandleInsertDomainMappingData, aL as HandleInsertDomainMappingError, aK as HandleInsertDomainMappingResponse, aP as HandleListDomainVerificationRequestsError, aI as HandleListDomainsError, aY as HandleListExecuteRunsData, aZ as HandleListExecuteRunsError, bo as HandleListGitTokensData, bq as HandleListGitTokensError, bp as HandleListGitTokensResponse, bE as HandleListGitTriggersData, bF as HandleListGitTriggersError, b3 as HandleListIdentitiesData, b5 as HandleListIdentitiesError, b4 as HandleListIdentitiesResponse, ba as HandleListPermissionsData, bc as HandleListPermissionsError, bb as HandleListPermissionsResponse, ax as HandleListRecordsData, az as HandleListRecordsError, ay as HandleListRecordsResponse, bx as HandleListRepositoriesData, by as HandleListRepositoriesError, bT as HandleListWebDeploysData, bU as HandleListWebDeploysError, bu as HandleRevokeGitTokenData, bw as HandleRevokeGitTokenError, bv as HandleRevokeGitTokenResponse, bi as HandleRevokePermissionData, bk as HandleRevokePermissionError, bj as HandleRevokePermissionResponse, bl as HandleUpdatePermissionData, bn as HandleUpdatePermissionError, bm 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, R as type } from './types.gen-627pxroW.js';
|
|
3
3
|
|
|
4
4
|
declare class FreestyleSandboxes {
|
|
5
5
|
private client;
|
|
@@ -24,11 +24,7 @@ declare class FreestyleSandboxes {
|
|
|
24
24
|
/**
|
|
25
25
|
* Deploy a Web project to a sandbox.
|
|
26
26
|
*/
|
|
27
|
-
deployWeb(source: DeploymentSource, config?:
|
|
28
|
-
build?: BuildOptions | (Omit<BuildOptions, "command"> & {
|
|
29
|
-
command: string | string[];
|
|
30
|
-
});
|
|
31
|
-
}): Promise<FreestyleDeployWebSuccessResponseV2>;
|
|
27
|
+
deployWeb(source: DeploymentSource, config?: FreestyleDeployWebConfiguration): Promise<FreestyleDeployWebSuccessResponseV2>;
|
|
32
28
|
/**
|
|
33
29
|
* Deploy a Cloudstate project to a sandbox.
|
|
34
30
|
*/
|
|
@@ -184,9 +180,18 @@ declare class FreestyleSandboxes {
|
|
|
184
180
|
* ephemeral so you should call this function every time you need a url. Do
|
|
185
181
|
* not store the url in your database!
|
|
186
182
|
*/
|
|
187
|
-
requestDevServer(
|
|
183
|
+
requestDevServer(repo: {
|
|
184
|
+
repoId: string;
|
|
185
|
+
} | {
|
|
188
186
|
repoUrl: string;
|
|
189
|
-
}): Promise<
|
|
187
|
+
}): Promise<{
|
|
188
|
+
mcpEphemeralUrl: unknown;
|
|
189
|
+
ephemeralUrl: any;
|
|
190
|
+
url: string;
|
|
191
|
+
isNew: boolean;
|
|
192
|
+
devCommandRunning: boolean;
|
|
193
|
+
installCommandRunning: boolean;
|
|
194
|
+
}>;
|
|
190
195
|
}
|
|
191
196
|
|
|
192
|
-
export { AccessLevel,
|
|
197
|
+
export { AccessLevel, 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 };
|
package/dist/inde.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration,
|
|
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 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, B as HandleCreateGitTriggerResponse } from './types.gen-627pxroW.js';
|
|
2
|
+
export { J as AccessTokenInfo, I as AccessibleRepository, K as Behavior, M as CreateDomainMappingRequest, N as CreateRecordParams, O as CreateRepoRequest, Q as CreateRepoSource, P as CreateRepositoryRequest, S as CustomBuildOptions, E as DeploymentBuildOptions, 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, br as HandleCreateGitTokenData, bt as HandleCreateGitTokenError, bs as HandleCreateGitTokenResponse, bG as HandleCreateGitTriggerData, bH as HandleCreateGitTriggerError, b7 as HandleCreateIdentityError, b6 as HandleCreateIdentityResponse, aA as HandleCreateRecordData, aC as HandleCreateRecordError, aB as HandleCreateRecordResponse, bz as HandleCreateRepoData, bB as HandleCreateRepoError, bA as HandleCreateRepoResponse, aM as HandleDeleteDomainMappingData, aO as HandleDeleteDomainMappingError, aN as HandleDeleteDomainMappingResponse, aT as HandleDeleteDomainVerificationData, aU as HandleDeleteDomainVerificationError, bI as HandleDeleteGitTriggerData, bK as HandleDeleteGitTriggerError, bJ as HandleDeleteGitTriggerResponse, b8 as HandleDeleteIdentityData, b9 as HandleDeleteIdentityError, aD as HandleDeleteRecordData, aF as HandleDeleteRecordError, aE as HandleDeleteRecordResponse, bC as HandleDeleteRepoData, bD as HandleDeleteRepoError, as as HandleDeployCloudstateData, au as HandleDeployCloudstateError, at as HandleDeployCloudstateResponse, bN as HandleDeployWebData, bP as HandleDeployWebError, bO as HandleDeployWebResponse, bQ as HandleDeployWebV2Data, bS as HandleDeployWebV2Error, bR as HandleDeployWebV2Response, bd as HandleDescribePermissionData, bf as HandleDescribePermissionError, be as HandleDescribePermissionResponse, aV as HandleEphemeralDevServerData, aX as HandleEphemeralDevServerError, aW as HandleEphemeralDevServerResponse, b0 as HandleExecuteScriptData, b2 as HandleExecuteScriptError, b1 as HandleExecuteScriptResponse, a_ as HandleGetExecuteRunData, a$ as HandleGetExecuteRunError, bL as HandleGetLogsData, bM as HandleGetLogsError, bV as HandleGetWebDeployDetailsData, bg as HandleGrantPermissionData, bh as HandleGrantPermissionError, aJ as HandleInsertDomainMappingData, aL as HandleInsertDomainMappingError, aK as HandleInsertDomainMappingResponse, aP as HandleListDomainVerificationRequestsError, aI as HandleListDomainsError, aY as HandleListExecuteRunsData, aZ as HandleListExecuteRunsError, bo as HandleListGitTokensData, bq as HandleListGitTokensError, bp as HandleListGitTokensResponse, bE as HandleListGitTriggersData, bF as HandleListGitTriggersError, b3 as HandleListIdentitiesData, b5 as HandleListIdentitiesError, b4 as HandleListIdentitiesResponse, ba as HandleListPermissionsData, bc as HandleListPermissionsError, bb as HandleListPermissionsResponse, ax as HandleListRecordsData, az as HandleListRecordsError, ay as HandleListRecordsResponse, bx as HandleListRepositoriesData, by as HandleListRepositoriesError, bT as HandleListWebDeploysData, bU as HandleListWebDeploysError, bu as HandleRevokeGitTokenData, bw as HandleRevokeGitTokenError, bv as HandleRevokeGitTokenResponse, bi as HandleRevokePermissionData, bk as HandleRevokePermissionError, bj as HandleRevokePermissionResponse, bl as HandleUpdatePermissionData, bn as HandleUpdatePermissionError, bm 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, R as type } from './types.gen-627pxroW.js';
|
|
3
3
|
|
|
4
4
|
declare class FreestyleSandboxes {
|
|
5
5
|
private client;
|
|
@@ -24,11 +24,7 @@ declare class FreestyleSandboxes {
|
|
|
24
24
|
/**
|
|
25
25
|
* Deploy a Web project to a sandbox.
|
|
26
26
|
*/
|
|
27
|
-
deployWeb(source: DeploymentSource, config?:
|
|
28
|
-
build?: BuildOptions | (Omit<BuildOptions, "command"> & {
|
|
29
|
-
command: string | string[];
|
|
30
|
-
});
|
|
31
|
-
}): Promise<FreestyleDeployWebSuccessResponseV2>;
|
|
27
|
+
deployWeb(source: DeploymentSource, config?: FreestyleDeployWebConfiguration): Promise<FreestyleDeployWebSuccessResponseV2>;
|
|
32
28
|
/**
|
|
33
29
|
* Deploy a Cloudstate project to a sandbox.
|
|
34
30
|
*/
|
|
@@ -184,9 +180,18 @@ declare class FreestyleSandboxes {
|
|
|
184
180
|
* ephemeral so you should call this function every time you need a url. Do
|
|
185
181
|
* not store the url in your database!
|
|
186
182
|
*/
|
|
187
|
-
requestDevServer(
|
|
183
|
+
requestDevServer(repo: {
|
|
184
|
+
repoId: string;
|
|
185
|
+
} | {
|
|
188
186
|
repoUrl: string;
|
|
189
|
-
}): Promise<
|
|
187
|
+
}): Promise<{
|
|
188
|
+
mcpEphemeralUrl: unknown;
|
|
189
|
+
ephemeralUrl: any;
|
|
190
|
+
url: string;
|
|
191
|
+
isNew: boolean;
|
|
192
|
+
devCommandRunning: boolean;
|
|
193
|
+
installCommandRunning: boolean;
|
|
194
|
+
}>;
|
|
190
195
|
}
|
|
191
196
|
|
|
192
|
-
export { AccessLevel,
|
|
197
|
+
export { AccessLevel, 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 };
|
package/dist/index.cjs
CHANGED
|
@@ -244,9 +244,6 @@ ${JSON.stringify(
|
|
|
244
244
|
* Deploy a Web project to a sandbox.
|
|
245
245
|
*/
|
|
246
246
|
async deployWeb(source, config) {
|
|
247
|
-
if (Array.isArray(config.build?.command)) {
|
|
248
|
-
config.build.command = config.build.command.join(" && ");
|
|
249
|
-
}
|
|
250
247
|
const response = await handleDeployWebV2({
|
|
251
248
|
client: this.client,
|
|
252
249
|
body: {
|
|
@@ -780,22 +777,27 @@ ${response.error.message}`);
|
|
|
780
777
|
* ephemeral so you should call this function every time you need a url. Do
|
|
781
778
|
* not store the url in your database!
|
|
782
779
|
*/
|
|
783
|
-
async requestDevServer({
|
|
784
|
-
repoUrl
|
|
785
|
-
}) {
|
|
780
|
+
async requestDevServer(repo) {
|
|
786
781
|
function formatHook(serverUrl, repoUrl2) {
|
|
787
782
|
const hook = serverUrl + "/__freestyle_dev_server/update/git?repo=" + encodeURIComponent(repoUrl2);
|
|
788
783
|
console.log(hook);
|
|
789
784
|
return hook;
|
|
790
785
|
}
|
|
786
|
+
let repoId;
|
|
787
|
+
if ("repoId" in repo) {
|
|
788
|
+
repoId = repo.repoId;
|
|
789
|
+
} else if ("repoUrl" in repo) {
|
|
790
|
+
const parts = repo.repoUrl.split("/");
|
|
791
|
+
repoId = parts[parts.length - 1];
|
|
792
|
+
}
|
|
793
|
+
const repoUrl = process.env.GIT_URL ?? "https://git.freestyle.sh/" + repoId;
|
|
791
794
|
const response = await handleEphemeralDevServer({
|
|
792
795
|
client: this.client,
|
|
793
796
|
body: {
|
|
794
|
-
|
|
797
|
+
repoId
|
|
795
798
|
}
|
|
796
799
|
});
|
|
797
800
|
if (response.data.isNew) {
|
|
798
|
-
const repoId = repoUrl.split("/").at(-1);
|
|
799
801
|
await this.createGitTrigger({
|
|
800
802
|
repoId,
|
|
801
803
|
action: {
|
|
@@ -808,11 +810,15 @@ ${response.error.message}`);
|
|
|
808
810
|
}).then(console.log);
|
|
809
811
|
}
|
|
810
812
|
if (!response.data) {
|
|
811
|
-
throw new Error(
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
813
|
+
throw new Error(`Failed to request dev server: ${response.error}`);
|
|
814
|
+
}
|
|
815
|
+
return {
|
|
816
|
+
...response.data,
|
|
817
|
+
// @ts-ignore
|
|
818
|
+
mcpEphemeralUrl: response.data.mcpEphemeralUrl || response.data.url + "/mcp",
|
|
819
|
+
// @ts-ignore
|
|
820
|
+
ephemeralUrl: response.data.ephemeralUrl ?? response.data.url
|
|
821
|
+
};
|
|
816
822
|
}
|
|
817
823
|
}
|
|
818
824
|
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration,
|
|
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 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, B as HandleCreateGitTriggerResponse } from './types.gen-627pxroW.js';
|
|
2
|
+
export { J as AccessTokenInfo, I as AccessibleRepository, K as Behavior, M as CreateDomainMappingRequest, N as CreateRecordParams, O as CreateRepoRequest, Q as CreateRepoSource, P as CreateRepositoryRequest, S as CustomBuildOptions, E as DeploymentBuildOptions, 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, br as HandleCreateGitTokenData, bt as HandleCreateGitTokenError, bs as HandleCreateGitTokenResponse, bG as HandleCreateGitTriggerData, bH as HandleCreateGitTriggerError, b7 as HandleCreateIdentityError, b6 as HandleCreateIdentityResponse, aA as HandleCreateRecordData, aC as HandleCreateRecordError, aB as HandleCreateRecordResponse, bz as HandleCreateRepoData, bB as HandleCreateRepoError, bA as HandleCreateRepoResponse, aM as HandleDeleteDomainMappingData, aO as HandleDeleteDomainMappingError, aN as HandleDeleteDomainMappingResponse, aT as HandleDeleteDomainVerificationData, aU as HandleDeleteDomainVerificationError, bI as HandleDeleteGitTriggerData, bK as HandleDeleteGitTriggerError, bJ as HandleDeleteGitTriggerResponse, b8 as HandleDeleteIdentityData, b9 as HandleDeleteIdentityError, aD as HandleDeleteRecordData, aF as HandleDeleteRecordError, aE as HandleDeleteRecordResponse, bC as HandleDeleteRepoData, bD as HandleDeleteRepoError, as as HandleDeployCloudstateData, au as HandleDeployCloudstateError, at as HandleDeployCloudstateResponse, bN as HandleDeployWebData, bP as HandleDeployWebError, bO as HandleDeployWebResponse, bQ as HandleDeployWebV2Data, bS as HandleDeployWebV2Error, bR as HandleDeployWebV2Response, bd as HandleDescribePermissionData, bf as HandleDescribePermissionError, be as HandleDescribePermissionResponse, aV as HandleEphemeralDevServerData, aX as HandleEphemeralDevServerError, aW as HandleEphemeralDevServerResponse, b0 as HandleExecuteScriptData, b2 as HandleExecuteScriptError, b1 as HandleExecuteScriptResponse, a_ as HandleGetExecuteRunData, a$ as HandleGetExecuteRunError, bL as HandleGetLogsData, bM as HandleGetLogsError, bV as HandleGetWebDeployDetailsData, bg as HandleGrantPermissionData, bh as HandleGrantPermissionError, aJ as HandleInsertDomainMappingData, aL as HandleInsertDomainMappingError, aK as HandleInsertDomainMappingResponse, aP as HandleListDomainVerificationRequestsError, aI as HandleListDomainsError, aY as HandleListExecuteRunsData, aZ as HandleListExecuteRunsError, bo as HandleListGitTokensData, bq as HandleListGitTokensError, bp as HandleListGitTokensResponse, bE as HandleListGitTriggersData, bF as HandleListGitTriggersError, b3 as HandleListIdentitiesData, b5 as HandleListIdentitiesError, b4 as HandleListIdentitiesResponse, ba as HandleListPermissionsData, bc as HandleListPermissionsError, bb as HandleListPermissionsResponse, ax as HandleListRecordsData, az as HandleListRecordsError, ay as HandleListRecordsResponse, bx as HandleListRepositoriesData, by as HandleListRepositoriesError, bT as HandleListWebDeploysData, bU as HandleListWebDeploysError, bu as HandleRevokeGitTokenData, bw as HandleRevokeGitTokenError, bv as HandleRevokeGitTokenResponse, bi as HandleRevokePermissionData, bk as HandleRevokePermissionError, bj as HandleRevokePermissionResponse, bl as HandleUpdatePermissionData, bn as HandleUpdatePermissionError, bm 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, R as type } from './types.gen-627pxroW.js';
|
|
3
3
|
|
|
4
4
|
declare class FreestyleSandboxes {
|
|
5
5
|
private client;
|
|
@@ -24,11 +24,7 @@ declare class FreestyleSandboxes {
|
|
|
24
24
|
/**
|
|
25
25
|
* Deploy a Web project to a sandbox.
|
|
26
26
|
*/
|
|
27
|
-
deployWeb(source: DeploymentSource, config?:
|
|
28
|
-
build?: BuildOptions | (Omit<BuildOptions, "command"> & {
|
|
29
|
-
command: string | string[];
|
|
30
|
-
});
|
|
31
|
-
}): Promise<FreestyleDeployWebSuccessResponseV2>;
|
|
27
|
+
deployWeb(source: DeploymentSource, config?: FreestyleDeployWebConfiguration): Promise<FreestyleDeployWebSuccessResponseV2>;
|
|
32
28
|
/**
|
|
33
29
|
* Deploy a Cloudstate project to a sandbox.
|
|
34
30
|
*/
|
|
@@ -184,9 +180,18 @@ declare class FreestyleSandboxes {
|
|
|
184
180
|
* ephemeral so you should call this function every time you need a url. Do
|
|
185
181
|
* not store the url in your database!
|
|
186
182
|
*/
|
|
187
|
-
requestDevServer(
|
|
183
|
+
requestDevServer(repo: {
|
|
184
|
+
repoId: string;
|
|
185
|
+
} | {
|
|
188
186
|
repoUrl: string;
|
|
189
|
-
}): Promise<
|
|
187
|
+
}): Promise<{
|
|
188
|
+
mcpEphemeralUrl: unknown;
|
|
189
|
+
ephemeralUrl: any;
|
|
190
|
+
url: string;
|
|
191
|
+
isNew: boolean;
|
|
192
|
+
devCommandRunning: boolean;
|
|
193
|
+
installCommandRunning: boolean;
|
|
194
|
+
}>;
|
|
190
195
|
}
|
|
191
196
|
|
|
192
|
-
export { AccessLevel,
|
|
197
|
+
export { AccessLevel, 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 };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration,
|
|
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 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, B as HandleCreateGitTriggerResponse } from './types.gen-627pxroW.js';
|
|
2
|
+
export { J as AccessTokenInfo, I as AccessibleRepository, K as Behavior, M as CreateDomainMappingRequest, N as CreateRecordParams, O as CreateRepoRequest, Q as CreateRepoSource, P as CreateRepositoryRequest, S as CustomBuildOptions, E as DeploymentBuildOptions, 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, br as HandleCreateGitTokenData, bt as HandleCreateGitTokenError, bs as HandleCreateGitTokenResponse, bG as HandleCreateGitTriggerData, bH as HandleCreateGitTriggerError, b7 as HandleCreateIdentityError, b6 as HandleCreateIdentityResponse, aA as HandleCreateRecordData, aC as HandleCreateRecordError, aB as HandleCreateRecordResponse, bz as HandleCreateRepoData, bB as HandleCreateRepoError, bA as HandleCreateRepoResponse, aM as HandleDeleteDomainMappingData, aO as HandleDeleteDomainMappingError, aN as HandleDeleteDomainMappingResponse, aT as HandleDeleteDomainVerificationData, aU as HandleDeleteDomainVerificationError, bI as HandleDeleteGitTriggerData, bK as HandleDeleteGitTriggerError, bJ as HandleDeleteGitTriggerResponse, b8 as HandleDeleteIdentityData, b9 as HandleDeleteIdentityError, aD as HandleDeleteRecordData, aF as HandleDeleteRecordError, aE as HandleDeleteRecordResponse, bC as HandleDeleteRepoData, bD as HandleDeleteRepoError, as as HandleDeployCloudstateData, au as HandleDeployCloudstateError, at as HandleDeployCloudstateResponse, bN as HandleDeployWebData, bP as HandleDeployWebError, bO as HandleDeployWebResponse, bQ as HandleDeployWebV2Data, bS as HandleDeployWebV2Error, bR as HandleDeployWebV2Response, bd as HandleDescribePermissionData, bf as HandleDescribePermissionError, be as HandleDescribePermissionResponse, aV as HandleEphemeralDevServerData, aX as HandleEphemeralDevServerError, aW as HandleEphemeralDevServerResponse, b0 as HandleExecuteScriptData, b2 as HandleExecuteScriptError, b1 as HandleExecuteScriptResponse, a_ as HandleGetExecuteRunData, a$ as HandleGetExecuteRunError, bL as HandleGetLogsData, bM as HandleGetLogsError, bV as HandleGetWebDeployDetailsData, bg as HandleGrantPermissionData, bh as HandleGrantPermissionError, aJ as HandleInsertDomainMappingData, aL as HandleInsertDomainMappingError, aK as HandleInsertDomainMappingResponse, aP as HandleListDomainVerificationRequestsError, aI as HandleListDomainsError, aY as HandleListExecuteRunsData, aZ as HandleListExecuteRunsError, bo as HandleListGitTokensData, bq as HandleListGitTokensError, bp as HandleListGitTokensResponse, bE as HandleListGitTriggersData, bF as HandleListGitTriggersError, b3 as HandleListIdentitiesData, b5 as HandleListIdentitiesError, b4 as HandleListIdentitiesResponse, ba as HandleListPermissionsData, bc as HandleListPermissionsError, bb as HandleListPermissionsResponse, ax as HandleListRecordsData, az as HandleListRecordsError, ay as HandleListRecordsResponse, bx as HandleListRepositoriesData, by as HandleListRepositoriesError, bT as HandleListWebDeploysData, bU as HandleListWebDeploysError, bu as HandleRevokeGitTokenData, bw as HandleRevokeGitTokenError, bv as HandleRevokeGitTokenResponse, bi as HandleRevokePermissionData, bk as HandleRevokePermissionError, bj as HandleRevokePermissionResponse, bl as HandleUpdatePermissionData, bn as HandleUpdatePermissionError, bm 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, R as type } from './types.gen-627pxroW.js';
|
|
3
3
|
|
|
4
4
|
declare class FreestyleSandboxes {
|
|
5
5
|
private client;
|
|
@@ -24,11 +24,7 @@ declare class FreestyleSandboxes {
|
|
|
24
24
|
/**
|
|
25
25
|
* Deploy a Web project to a sandbox.
|
|
26
26
|
*/
|
|
27
|
-
deployWeb(source: DeploymentSource, config?:
|
|
28
|
-
build?: BuildOptions | (Omit<BuildOptions, "command"> & {
|
|
29
|
-
command: string | string[];
|
|
30
|
-
});
|
|
31
|
-
}): Promise<FreestyleDeployWebSuccessResponseV2>;
|
|
27
|
+
deployWeb(source: DeploymentSource, config?: FreestyleDeployWebConfiguration): Promise<FreestyleDeployWebSuccessResponseV2>;
|
|
32
28
|
/**
|
|
33
29
|
* Deploy a Cloudstate project to a sandbox.
|
|
34
30
|
*/
|
|
@@ -184,9 +180,18 @@ declare class FreestyleSandboxes {
|
|
|
184
180
|
* ephemeral so you should call this function every time you need a url. Do
|
|
185
181
|
* not store the url in your database!
|
|
186
182
|
*/
|
|
187
|
-
requestDevServer(
|
|
183
|
+
requestDevServer(repo: {
|
|
184
|
+
repoId: string;
|
|
185
|
+
} | {
|
|
188
186
|
repoUrl: string;
|
|
189
|
-
}): Promise<
|
|
187
|
+
}): Promise<{
|
|
188
|
+
mcpEphemeralUrl: unknown;
|
|
189
|
+
ephemeralUrl: any;
|
|
190
|
+
url: string;
|
|
191
|
+
isNew: boolean;
|
|
192
|
+
devCommandRunning: boolean;
|
|
193
|
+
installCommandRunning: boolean;
|
|
194
|
+
}>;
|
|
190
195
|
}
|
|
191
196
|
|
|
192
|
-
export { AccessLevel,
|
|
197
|
+
export { AccessLevel, 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 };
|
package/dist/index.mjs
CHANGED
|
@@ -242,9 +242,6 @@ ${JSON.stringify(
|
|
|
242
242
|
* Deploy a Web project to a sandbox.
|
|
243
243
|
*/
|
|
244
244
|
async deployWeb(source, config) {
|
|
245
|
-
if (Array.isArray(config.build?.command)) {
|
|
246
|
-
config.build.command = config.build.command.join(" && ");
|
|
247
|
-
}
|
|
248
245
|
const response = await handleDeployWebV2({
|
|
249
246
|
client: this.client,
|
|
250
247
|
body: {
|
|
@@ -778,22 +775,27 @@ ${response.error.message}`);
|
|
|
778
775
|
* ephemeral so you should call this function every time you need a url. Do
|
|
779
776
|
* not store the url in your database!
|
|
780
777
|
*/
|
|
781
|
-
async requestDevServer({
|
|
782
|
-
repoUrl
|
|
783
|
-
}) {
|
|
778
|
+
async requestDevServer(repo) {
|
|
784
779
|
function formatHook(serverUrl, repoUrl2) {
|
|
785
780
|
const hook = serverUrl + "/__freestyle_dev_server/update/git?repo=" + encodeURIComponent(repoUrl2);
|
|
786
781
|
console.log(hook);
|
|
787
782
|
return hook;
|
|
788
783
|
}
|
|
784
|
+
let repoId;
|
|
785
|
+
if ("repoId" in repo) {
|
|
786
|
+
repoId = repo.repoId;
|
|
787
|
+
} else if ("repoUrl" in repo) {
|
|
788
|
+
const parts = repo.repoUrl.split("/");
|
|
789
|
+
repoId = parts[parts.length - 1];
|
|
790
|
+
}
|
|
791
|
+
const repoUrl = process.env.GIT_URL ?? "https://git.freestyle.sh/" + repoId;
|
|
789
792
|
const response = await handleEphemeralDevServer({
|
|
790
793
|
client: this.client,
|
|
791
794
|
body: {
|
|
792
|
-
|
|
795
|
+
repoId
|
|
793
796
|
}
|
|
794
797
|
});
|
|
795
798
|
if (response.data.isNew) {
|
|
796
|
-
const repoId = repoUrl.split("/").at(-1);
|
|
797
799
|
await this.createGitTrigger({
|
|
798
800
|
repoId,
|
|
799
801
|
action: {
|
|
@@ -806,11 +808,15 @@ ${response.error.message}`);
|
|
|
806
808
|
}).then(console.log);
|
|
807
809
|
}
|
|
808
810
|
if (!response.data) {
|
|
809
|
-
throw new Error(
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
811
|
+
throw new Error(`Failed to request dev server: ${response.error}`);
|
|
812
|
+
}
|
|
813
|
+
return {
|
|
814
|
+
...response.data,
|
|
815
|
+
// @ts-ignore
|
|
816
|
+
mcpEphemeralUrl: response.data.mcpEphemeralUrl || response.data.url + "/mcp",
|
|
817
|
+
// @ts-ignore
|
|
818
|
+
ephemeralUrl: response.data.ephemeralUrl ?? response.data.url
|
|
819
|
+
};
|
|
814
820
|
}
|
|
815
821
|
}
|
|
816
822
|
|
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-627pxroW.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-627pxroW.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-627pxroW.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-627pxroW.js';
|
|
9
9
|
import 'node:http';
|
|
10
10
|
|
|
11
11
|
// Type definitions for pino-std-serializers 2.4
|