freestyle-sandboxes 0.0.31 → 0.0.33
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/index.cjs +7 -1
- package/dist/ai/index.d.cts +1 -1
- package/dist/ai/index.d.mts +1 -1
- package/dist/ai/index.mjs +7 -1
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +4 -7
- package/dist/index.d.mts +4 -7
- package/dist/index.mjs +5 -5
- package/dist/langgraph/index.d.cts +1 -1
- package/dist/langgraph/index.d.mts +1 -1
- package/dist/mastra/index.d.cts +1 -1
- package/dist/mastra/index.d.mts +1 -1
- package/dist/types.gen-BCdfx7yt.d.ts +760 -0
- package/dist/utils/index.cjs +8 -2
- package/dist/utils/index.d.cts +4 -6
- package/dist/utils/index.d.mts +4 -6
- package/dist/utils/index.mjs +8 -2
- package/openapi/sdk.gen.ts +14 -2
- package/openapi/types.gen.ts +36 -0
- package/openapi.json +1 -3016
- package/package.json +1 -1
- package/src/ai/index.ts +7 -1
- package/src/index.ts +3 -9
- package/src/utils/index.ts +13 -5
package/package.json
CHANGED
package/src/ai/index.ts
CHANGED
|
@@ -112,7 +112,13 @@ export const deployWebTool = (
|
|
|
112
112
|
return acc;
|
|
113
113
|
}, {} as Record<string, { content: string }>);
|
|
114
114
|
try {
|
|
115
|
-
const res = await api.deployWeb(
|
|
115
|
+
const res = await api.deployWeb(
|
|
116
|
+
{
|
|
117
|
+
kind: "files",
|
|
118
|
+
files: new_files,
|
|
119
|
+
},
|
|
120
|
+
config
|
|
121
|
+
);
|
|
116
122
|
return res;
|
|
117
123
|
} catch (e) {
|
|
118
124
|
console.log("ERROR: ", e.message);
|
package/src/index.ts
CHANGED
|
@@ -133,19 +133,13 @@ export class FreestyleSandboxes {
|
|
|
133
133
|
* Deploy a Web project to a sandbox.
|
|
134
134
|
*/
|
|
135
135
|
async deployWeb(
|
|
136
|
-
|
|
137
|
-
string,
|
|
138
|
-
{
|
|
139
|
-
content: string;
|
|
140
|
-
encoding?: string;
|
|
141
|
-
}
|
|
142
|
-
>,
|
|
136
|
+
source: sandbox_openapi.DeploymentSource,
|
|
143
137
|
config?: FreestyleDeployWebConfiguration
|
|
144
138
|
): Promise<FreestyleDeployWebSuccessResponse> {
|
|
145
|
-
const response = await sandbox_openapi.
|
|
139
|
+
const response = await sandbox_openapi.handleDeployWebV2({
|
|
146
140
|
client: this.client,
|
|
147
141
|
body: {
|
|
148
|
-
|
|
142
|
+
source: source,
|
|
149
143
|
config: config,
|
|
150
144
|
},
|
|
151
145
|
});
|
package/src/utils/index.ts
CHANGED
|
@@ -6,7 +6,7 @@ import * as path from "path";
|
|
|
6
6
|
|
|
7
7
|
export const prepareDirForDeployment = async (
|
|
8
8
|
directory: string
|
|
9
|
-
): Promise<sandbox_openapi.
|
|
9
|
+
): Promise<sandbox_openapi.DeploymentSource> => {
|
|
10
10
|
const files: sandbox_openapi.FreestyleDeployWebPayload["files"] = {};
|
|
11
11
|
|
|
12
12
|
const patterns = await glob("**/*", {
|
|
@@ -29,10 +29,15 @@ export const prepareDirForDeployment = async (
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
return
|
|
32
|
+
return {
|
|
33
|
+
kind: "files",
|
|
34
|
+
files,
|
|
35
|
+
};
|
|
33
36
|
};
|
|
34
37
|
|
|
35
|
-
export const prepareDirForDeploymentSync = (
|
|
38
|
+
export const prepareDirForDeploymentSync = (
|
|
39
|
+
directory: string
|
|
40
|
+
): sandbox_openapi.DeploymentSource => {
|
|
36
41
|
const files: sandbox_openapi.FreestyleDeployWebPayload["files"] = {};
|
|
37
42
|
|
|
38
43
|
const patterns = globSync("**/*", {
|
|
@@ -55,7 +60,10 @@ export const prepareDirForDeploymentSync = (directory: string) => {
|
|
|
55
60
|
}
|
|
56
61
|
}
|
|
57
62
|
|
|
58
|
-
return
|
|
63
|
+
return {
|
|
64
|
+
kind: "files",
|
|
65
|
+
files,
|
|
66
|
+
};
|
|
59
67
|
};
|
|
60
68
|
|
|
61
69
|
/**
|
|
@@ -63,7 +71,7 @@ export const prepareDirForDeploymentSync = (directory: string) => {
|
|
|
63
71
|
*/
|
|
64
72
|
export const prepareNextJsForDeployment = async (
|
|
65
73
|
directory: string
|
|
66
|
-
): Promise<sandbox_openapi.
|
|
74
|
+
): Promise<sandbox_openapi.DeploymentSource> => {
|
|
67
75
|
const publicDir = path.join(directory, "public");
|
|
68
76
|
const nextPublicDestination = path.join(directory, ".next/standalone/public");
|
|
69
77
|
|