freestyle-sandboxes 0.0.48 → 0.0.50
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 +7 -9
- package/dist/inde.d.mts +7 -9
- package/dist/index.cjs +28 -10
- package/dist/index.d.cts +7 -9
- package/dist/index.d.mts +7 -9
- package/dist/index.mjs +28 -10
- 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-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 +68 -50
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-mg_JNXrq.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-mg_JNXrq.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-mg_JNXrq.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-mg_JNXrq.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 { 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,
|
|
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, E as HandleEphemeralDevServerResponse } from './types.gen-mg_JNXrq.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 CustomBuildOptions, I as DeploymentBuildOptions, U as DeploymentLogEntry, W as DeploymentState, X as DevServer, Y as DnsRecord, Z as DnsRecordData, _ as DnsRecordKind, $ as DomainVerificationRequest, a0 as ExecuteLogEntry, a1 as ExecuteRunInfo, a2 as ExecuteRunState, a3 as FreestyleCloudstateDeployConfiguration, a4 as FreestyleCloudstateDeployErrorResponse, a5 as FreestyleDeleteDomainVerificationRequest, a6 as FreestyleDeployWebErrorResponse, a7 as FreestyleDeployWebPayload, a8 as FreestyleDeployWebPayloadV2, a9 as FreestyleDomainVerificationRequest, aa as FreestyleExecuteScriptParams, ab as FreestyleFile, ac as FreestyleGetLogsResponse, ad as FreestyleJavaScriptLog, ae as FreestyleLogResponseObject, af as FreestyleNetworkPermission, ah as FreestyleVerifyDomainRequest, ai as GitRepositoryTrigger, al as GrantPermissionRequest, aw as HandleBackupCloudstateData, ax as HandleBackupCloudstateError, aS as HandleCreateDomainVerificationData, aT as HandleCreateDomainVerificationError, br as HandleCreateGitTokenData, bt as HandleCreateGitTokenError, bs as HandleCreateGitTokenResponse, bG as HandleCreateGitTriggerData, bH as HandleCreateGitTriggerError, b7 as HandleCreateIdentityError, b6 as HandleCreateIdentityResponse, aB as HandleCreateRecordData, aD as HandleCreateRecordError, aC as HandleCreateRecordResponse, bz as HandleCreateRepoData, bB as HandleCreateRepoError, bA as HandleCreateRepoResponse, aN as HandleDeleteDomainMappingData, aP as HandleDeleteDomainMappingError, aO as HandleDeleteDomainMappingResponse, aU as HandleDeleteDomainVerificationData, aV as HandleDeleteDomainVerificationError, bI as HandleDeleteGitTriggerData, bK as HandleDeleteGitTriggerError, bJ as HandleDeleteGitTriggerResponse, b8 as HandleDeleteIdentityData, b9 as HandleDeleteIdentityError, aE as HandleDeleteRecordData, aG as HandleDeleteRecordError, aF as HandleDeleteRecordResponse, bC as HandleDeleteRepoData, bD as HandleDeleteRepoError, at as HandleDeployCloudstateData, av as HandleDeployCloudstateError, au 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, aW as HandleEphemeralDevServerData, aX as HandleEphemeralDevServerError, 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, aK as HandleInsertDomainMappingData, aM as HandleInsertDomainMappingError, aL as HandleInsertDomainMappingResponse, aQ as HandleListDomainVerificationRequestsError, aJ 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, ay as HandleListRecordsData, aA as HandleListRecordsError, az 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, aR as HandleVerifyDomainData, aH as HandleVerifyWildcardData, aI as HandleVerifyWildcardError, am as InternalServerError, an as ListRecordsResponse, ao as NetworkPermissionData, ap as RepositoryInfo, aq as RevokeGitTokenRequest, ar as UpdatePermissionRequest, as as Visibility, ag as action, ak as action2, aj as event, V as kind, S as type } from './types.gen-mg_JNXrq.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,11 @@ 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
187
|
}): Promise<HandleEphemeralDevServerResponse>;
|
|
190
188
|
}
|
|
191
189
|
|
|
192
|
-
export { AccessLevel,
|
|
190
|
+
export { AccessLevel, 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/inde.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration,
|
|
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,
|
|
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, E as HandleEphemeralDevServerResponse } from './types.gen-mg_JNXrq.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 CustomBuildOptions, I as DeploymentBuildOptions, U as DeploymentLogEntry, W as DeploymentState, X as DevServer, Y as DnsRecord, Z as DnsRecordData, _ as DnsRecordKind, $ as DomainVerificationRequest, a0 as ExecuteLogEntry, a1 as ExecuteRunInfo, a2 as ExecuteRunState, a3 as FreestyleCloudstateDeployConfiguration, a4 as FreestyleCloudstateDeployErrorResponse, a5 as FreestyleDeleteDomainVerificationRequest, a6 as FreestyleDeployWebErrorResponse, a7 as FreestyleDeployWebPayload, a8 as FreestyleDeployWebPayloadV2, a9 as FreestyleDomainVerificationRequest, aa as FreestyleExecuteScriptParams, ab as FreestyleFile, ac as FreestyleGetLogsResponse, ad as FreestyleJavaScriptLog, ae as FreestyleLogResponseObject, af as FreestyleNetworkPermission, ah as FreestyleVerifyDomainRequest, ai as GitRepositoryTrigger, al as GrantPermissionRequest, aw as HandleBackupCloudstateData, ax as HandleBackupCloudstateError, aS as HandleCreateDomainVerificationData, aT as HandleCreateDomainVerificationError, br as HandleCreateGitTokenData, bt as HandleCreateGitTokenError, bs as HandleCreateGitTokenResponse, bG as HandleCreateGitTriggerData, bH as HandleCreateGitTriggerError, b7 as HandleCreateIdentityError, b6 as HandleCreateIdentityResponse, aB as HandleCreateRecordData, aD as HandleCreateRecordError, aC as HandleCreateRecordResponse, bz as HandleCreateRepoData, bB as HandleCreateRepoError, bA as HandleCreateRepoResponse, aN as HandleDeleteDomainMappingData, aP as HandleDeleteDomainMappingError, aO as HandleDeleteDomainMappingResponse, aU as HandleDeleteDomainVerificationData, aV as HandleDeleteDomainVerificationError, bI as HandleDeleteGitTriggerData, bK as HandleDeleteGitTriggerError, bJ as HandleDeleteGitTriggerResponse, b8 as HandleDeleteIdentityData, b9 as HandleDeleteIdentityError, aE as HandleDeleteRecordData, aG as HandleDeleteRecordError, aF as HandleDeleteRecordResponse, bC as HandleDeleteRepoData, bD as HandleDeleteRepoError, at as HandleDeployCloudstateData, av as HandleDeployCloudstateError, au 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, aW as HandleEphemeralDevServerData, aX as HandleEphemeralDevServerError, 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, aK as HandleInsertDomainMappingData, aM as HandleInsertDomainMappingError, aL as HandleInsertDomainMappingResponse, aQ as HandleListDomainVerificationRequestsError, aJ 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, ay as HandleListRecordsData, aA as HandleListRecordsError, az 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, aR as HandleVerifyDomainData, aH as HandleVerifyWildcardData, aI as HandleVerifyWildcardError, am as InternalServerError, an as ListRecordsResponse, ao as NetworkPermissionData, ap as RepositoryInfo, aq as RevokeGitTokenRequest, ar as UpdatePermissionRequest, as as Visibility, ag as action, ak as action2, aj as event, V as kind, S as type } from './types.gen-mg_JNXrq.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,11 @@ 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
187
|
}): Promise<HandleEphemeralDevServerResponse>;
|
|
190
188
|
}
|
|
191
189
|
|
|
192
|
-
export { AccessLevel,
|
|
190
|
+
export { AccessLevel, 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.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,19 +777,40 @@ ${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
|
-
|
|
785
|
-
|
|
780
|
+
async requestDevServer(repo) {
|
|
781
|
+
function formatHook(serverUrl, repoUrl2) {
|
|
782
|
+
const hook = serverUrl + "/__freestyle_dev_server/update/git?repo=" + encodeURIComponent(repoUrl2);
|
|
783
|
+
console.log(hook);
|
|
784
|
+
return hook;
|
|
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;
|
|
786
794
|
const response = await handleEphemeralDevServer({
|
|
787
795
|
client: this.client,
|
|
788
796
|
body: {
|
|
789
|
-
|
|
797
|
+
repoId
|
|
790
798
|
}
|
|
791
799
|
});
|
|
800
|
+
if (response.data.isNew) {
|
|
801
|
+
await this.createGitTrigger({
|
|
802
|
+
repoId,
|
|
803
|
+
action: {
|
|
804
|
+
endpoint: formatHook(response.data?.url, repoUrl),
|
|
805
|
+
action: "webhook"
|
|
806
|
+
},
|
|
807
|
+
trigger: {
|
|
808
|
+
event: "push"
|
|
809
|
+
}
|
|
810
|
+
}).then(console.log);
|
|
811
|
+
}
|
|
792
812
|
if (!response.data) {
|
|
793
|
-
throw new Error(
|
|
794
|
-
`Failed to request dev server: ${response.error}`
|
|
795
|
-
);
|
|
813
|
+
throw new Error(`Failed to request dev server: ${response.error}`);
|
|
796
814
|
}
|
|
797
815
|
return response.data;
|
|
798
816
|
}
|
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 { 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,
|
|
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, E as HandleEphemeralDevServerResponse } from './types.gen-mg_JNXrq.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 CustomBuildOptions, I as DeploymentBuildOptions, U as DeploymentLogEntry, W as DeploymentState, X as DevServer, Y as DnsRecord, Z as DnsRecordData, _ as DnsRecordKind, $ as DomainVerificationRequest, a0 as ExecuteLogEntry, a1 as ExecuteRunInfo, a2 as ExecuteRunState, a3 as FreestyleCloudstateDeployConfiguration, a4 as FreestyleCloudstateDeployErrorResponse, a5 as FreestyleDeleteDomainVerificationRequest, a6 as FreestyleDeployWebErrorResponse, a7 as FreestyleDeployWebPayload, a8 as FreestyleDeployWebPayloadV2, a9 as FreestyleDomainVerificationRequest, aa as FreestyleExecuteScriptParams, ab as FreestyleFile, ac as FreestyleGetLogsResponse, ad as FreestyleJavaScriptLog, ae as FreestyleLogResponseObject, af as FreestyleNetworkPermission, ah as FreestyleVerifyDomainRequest, ai as GitRepositoryTrigger, al as GrantPermissionRequest, aw as HandleBackupCloudstateData, ax as HandleBackupCloudstateError, aS as HandleCreateDomainVerificationData, aT as HandleCreateDomainVerificationError, br as HandleCreateGitTokenData, bt as HandleCreateGitTokenError, bs as HandleCreateGitTokenResponse, bG as HandleCreateGitTriggerData, bH as HandleCreateGitTriggerError, b7 as HandleCreateIdentityError, b6 as HandleCreateIdentityResponse, aB as HandleCreateRecordData, aD as HandleCreateRecordError, aC as HandleCreateRecordResponse, bz as HandleCreateRepoData, bB as HandleCreateRepoError, bA as HandleCreateRepoResponse, aN as HandleDeleteDomainMappingData, aP as HandleDeleteDomainMappingError, aO as HandleDeleteDomainMappingResponse, aU as HandleDeleteDomainVerificationData, aV as HandleDeleteDomainVerificationError, bI as HandleDeleteGitTriggerData, bK as HandleDeleteGitTriggerError, bJ as HandleDeleteGitTriggerResponse, b8 as HandleDeleteIdentityData, b9 as HandleDeleteIdentityError, aE as HandleDeleteRecordData, aG as HandleDeleteRecordError, aF as HandleDeleteRecordResponse, bC as HandleDeleteRepoData, bD as HandleDeleteRepoError, at as HandleDeployCloudstateData, av as HandleDeployCloudstateError, au 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, aW as HandleEphemeralDevServerData, aX as HandleEphemeralDevServerError, 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, aK as HandleInsertDomainMappingData, aM as HandleInsertDomainMappingError, aL as HandleInsertDomainMappingResponse, aQ as HandleListDomainVerificationRequestsError, aJ 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, ay as HandleListRecordsData, aA as HandleListRecordsError, az 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, aR as HandleVerifyDomainData, aH as HandleVerifyWildcardData, aI as HandleVerifyWildcardError, am as InternalServerError, an as ListRecordsResponse, ao as NetworkPermissionData, ap as RepositoryInfo, aq as RevokeGitTokenRequest, ar as UpdatePermissionRequest, as as Visibility, ag as action, ak as action2, aj as event, V as kind, S as type } from './types.gen-mg_JNXrq.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,11 @@ 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
187
|
}): Promise<HandleEphemeralDevServerResponse>;
|
|
190
188
|
}
|
|
191
189
|
|
|
192
|
-
export { AccessLevel,
|
|
190
|
+
export { AccessLevel, 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,
|
|
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,
|
|
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, E as HandleEphemeralDevServerResponse } from './types.gen-mg_JNXrq.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 CustomBuildOptions, I as DeploymentBuildOptions, U as DeploymentLogEntry, W as DeploymentState, X as DevServer, Y as DnsRecord, Z as DnsRecordData, _ as DnsRecordKind, $ as DomainVerificationRequest, a0 as ExecuteLogEntry, a1 as ExecuteRunInfo, a2 as ExecuteRunState, a3 as FreestyleCloudstateDeployConfiguration, a4 as FreestyleCloudstateDeployErrorResponse, a5 as FreestyleDeleteDomainVerificationRequest, a6 as FreestyleDeployWebErrorResponse, a7 as FreestyleDeployWebPayload, a8 as FreestyleDeployWebPayloadV2, a9 as FreestyleDomainVerificationRequest, aa as FreestyleExecuteScriptParams, ab as FreestyleFile, ac as FreestyleGetLogsResponse, ad as FreestyleJavaScriptLog, ae as FreestyleLogResponseObject, af as FreestyleNetworkPermission, ah as FreestyleVerifyDomainRequest, ai as GitRepositoryTrigger, al as GrantPermissionRequest, aw as HandleBackupCloudstateData, ax as HandleBackupCloudstateError, aS as HandleCreateDomainVerificationData, aT as HandleCreateDomainVerificationError, br as HandleCreateGitTokenData, bt as HandleCreateGitTokenError, bs as HandleCreateGitTokenResponse, bG as HandleCreateGitTriggerData, bH as HandleCreateGitTriggerError, b7 as HandleCreateIdentityError, b6 as HandleCreateIdentityResponse, aB as HandleCreateRecordData, aD as HandleCreateRecordError, aC as HandleCreateRecordResponse, bz as HandleCreateRepoData, bB as HandleCreateRepoError, bA as HandleCreateRepoResponse, aN as HandleDeleteDomainMappingData, aP as HandleDeleteDomainMappingError, aO as HandleDeleteDomainMappingResponse, aU as HandleDeleteDomainVerificationData, aV as HandleDeleteDomainVerificationError, bI as HandleDeleteGitTriggerData, bK as HandleDeleteGitTriggerError, bJ as HandleDeleteGitTriggerResponse, b8 as HandleDeleteIdentityData, b9 as HandleDeleteIdentityError, aE as HandleDeleteRecordData, aG as HandleDeleteRecordError, aF as HandleDeleteRecordResponse, bC as HandleDeleteRepoData, bD as HandleDeleteRepoError, at as HandleDeployCloudstateData, av as HandleDeployCloudstateError, au 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, aW as HandleEphemeralDevServerData, aX as HandleEphemeralDevServerError, 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, aK as HandleInsertDomainMappingData, aM as HandleInsertDomainMappingError, aL as HandleInsertDomainMappingResponse, aQ as HandleListDomainVerificationRequestsError, aJ 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, ay as HandleListRecordsData, aA as HandleListRecordsError, az 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, aR as HandleVerifyDomainData, aH as HandleVerifyWildcardData, aI as HandleVerifyWildcardError, am as InternalServerError, an as ListRecordsResponse, ao as NetworkPermissionData, ap as RepositoryInfo, aq as RevokeGitTokenRequest, ar as UpdatePermissionRequest, as as Visibility, ag as action, ak as action2, aj as event, V as kind, S as type } from './types.gen-mg_JNXrq.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,11 @@ 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
187
|
}): Promise<HandleEphemeralDevServerResponse>;
|
|
190
188
|
}
|
|
191
189
|
|
|
192
|
-
export { AccessLevel,
|
|
190
|
+
export { AccessLevel, 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
|
@@ -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,19 +775,40 @@ ${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
|
-
|
|
783
|
-
|
|
778
|
+
async requestDevServer(repo) {
|
|
779
|
+
function formatHook(serverUrl, repoUrl2) {
|
|
780
|
+
const hook = serverUrl + "/__freestyle_dev_server/update/git?repo=" + encodeURIComponent(repoUrl2);
|
|
781
|
+
console.log(hook);
|
|
782
|
+
return hook;
|
|
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;
|
|
784
792
|
const response = await handleEphemeralDevServer({
|
|
785
793
|
client: this.client,
|
|
786
794
|
body: {
|
|
787
|
-
|
|
795
|
+
repoId
|
|
788
796
|
}
|
|
789
797
|
});
|
|
798
|
+
if (response.data.isNew) {
|
|
799
|
+
await this.createGitTrigger({
|
|
800
|
+
repoId,
|
|
801
|
+
action: {
|
|
802
|
+
endpoint: formatHook(response.data?.url, repoUrl),
|
|
803
|
+
action: "webhook"
|
|
804
|
+
},
|
|
805
|
+
trigger: {
|
|
806
|
+
event: "push"
|
|
807
|
+
}
|
|
808
|
+
}).then(console.log);
|
|
809
|
+
}
|
|
790
810
|
if (!response.data) {
|
|
791
|
-
throw new Error(
|
|
792
|
-
`Failed to request dev server: ${response.error}`
|
|
793
|
-
);
|
|
811
|
+
throw new Error(`Failed to request dev server: ${response.error}`);
|
|
794
812
|
}
|
|
795
813
|
return response.data;
|
|
796
814
|
}
|
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-mg_JNXrq.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-mg_JNXrq.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-mg_JNXrq.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-mg_JNXrq.js';
|
|
9
9
|
import 'node:http';
|
|
10
10
|
|
|
11
11
|
// Type definitions for pino-std-serializers 2.4
|