freestyle-sandboxes 0.0.53 → 0.0.54
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 -4
- package/dist/inde.d.mts +7 -4
- package/dist/index.cjs +1 -5
- package/dist/index.d.cts +7 -4
- package/dist/index.d.mts +7 -4
- package/dist/index.mjs +1 -5
- 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/react/dev-server/index..d.cts +3 -3
- package/dist/react/dev-server/index..d.mts +3 -3
- package/dist/react/dev-server/index.cjs +6 -6
- package/dist/react/dev-server/index.d.cts +3 -3
- package/dist/react/dev-server/index.d.mts +3 -3
- package/dist/react/dev-server/index.mjs +6 -6
- package/dist/types.gen-BqN1t03N.d.ts +842 -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/types.gen.ts +12 -0
- package/openapi.json +1 -1
- package/package.json +2 -2
- package/src/index.ts +8 -9
- package/src/react/dev-server/index.tsx +7 -7
- package/src/react/dev-server/types.ts +1 -1
package/src/index.ts
CHANGED
|
@@ -798,14 +798,16 @@ export class FreestyleSandboxes {
|
|
|
798
798
|
* not store the url in your database!
|
|
799
799
|
*/
|
|
800
800
|
async requestDevServer({
|
|
801
|
-
repo,
|
|
802
801
|
repoUrl,
|
|
803
802
|
repoId,
|
|
804
803
|
}: {
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
804
|
+
/**
|
|
805
|
+
* @deprecated
|
|
806
|
+
*/
|
|
807
|
+
repoUrl?: string,
|
|
808
|
+
repoId?: string, repo?: string
|
|
808
809
|
}) {
|
|
810
|
+
|
|
809
811
|
function formatHook(serverUrl: string, repoUrl: string) {
|
|
810
812
|
const hook =
|
|
811
813
|
serverUrl +
|
|
@@ -829,11 +831,8 @@ export class FreestyleSandboxes {
|
|
|
829
831
|
await this.createGitTrigger({
|
|
830
832
|
repoId: rId,
|
|
831
833
|
action: {
|
|
832
|
-
endpoint: formatHook(
|
|
833
|
-
|
|
834
|
-
repoUrl || repo || `https://git.freestyle.sh/${rId}`
|
|
835
|
-
),
|
|
836
|
-
action: "webhook",
|
|
834
|
+
endpoint: formatHook(response.data?.url!, repoUrl || `https://git.freestyle.sh/${rId}`),
|
|
835
|
+
action: "webhook"
|
|
837
836
|
},
|
|
838
837
|
trigger: {
|
|
839
838
|
event: "push",
|
|
@@ -39,11 +39,11 @@ export function DefaultLoadingComponent({
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export function FreestyleDevServer({
|
|
42
|
-
repoUrl,
|
|
43
42
|
loadingComponent,
|
|
44
43
|
actions,
|
|
44
|
+
repoId,
|
|
45
45
|
}: {
|
|
46
|
-
|
|
46
|
+
repoId: string;
|
|
47
47
|
loadingComponent?: (props: {
|
|
48
48
|
devCommandRunning: boolean;
|
|
49
49
|
installCommandRunning: boolean;
|
|
@@ -55,7 +55,7 @@ export function FreestyleDevServer({
|
|
|
55
55
|
<QueryClientProvider client={queryClient}>
|
|
56
56
|
<FreestyleDevServerInner
|
|
57
57
|
loadingComponent={loadingComponent ?? DefaultLoadingComponent}
|
|
58
|
-
|
|
58
|
+
repoId={repoId}
|
|
59
59
|
actions={actions}
|
|
60
60
|
/>
|
|
61
61
|
</QueryClientProvider>
|
|
@@ -63,11 +63,11 @@ export function FreestyleDevServer({
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
function FreestyleDevServerInner({
|
|
66
|
-
|
|
66
|
+
repoId,
|
|
67
67
|
loadingComponent,
|
|
68
68
|
actions: { requestDevServer },
|
|
69
69
|
}: {
|
|
70
|
-
|
|
70
|
+
repoId: string;
|
|
71
71
|
loadingComponent: (props: {
|
|
72
72
|
devCommandRunning: boolean;
|
|
73
73
|
installCommandRunning: boolean;
|
|
@@ -76,8 +76,8 @@ function FreestyleDevServerInner({
|
|
|
76
76
|
actions: RequestDevServerActions;
|
|
77
77
|
}) {
|
|
78
78
|
const { data, isLoading } = useQuery({
|
|
79
|
-
queryKey: ["dev-server",
|
|
80
|
-
queryFn: async () => await requestDevServer({
|
|
79
|
+
queryKey: ["dev-server", repoId],
|
|
80
|
+
queryFn: async () => await requestDevServer({ repoId: repoId }),
|
|
81
81
|
refetchInterval: 1000,
|
|
82
82
|
});
|
|
83
83
|
|