freestyle-sandboxes 0.0.42 → 0.0.43

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.
@@ -1,4 +1,4 @@
1
- import { D as DeploymentSource } from '../types.gen-DkQ-Dbs1.js';
1
+ import { D as DeploymentSource } from '../types.gen-DDYpuDzZ.js';
2
2
 
3
3
  declare const prepareDirForDeployment: (directory: string) => Promise<DeploymentSource>;
4
4
  declare const prepareDirForDeploymentSync: (directory: string) => DeploymentSource;
@@ -1,4 +1,4 @@
1
- import { D as DeploymentSource } from '../types.gen-DkQ-Dbs1.js';
1
+ import { D as DeploymentSource } from '../types.gen-DDYpuDzZ.js';
2
2
 
3
3
  declare const prepareDirForDeployment: (directory: string) => Promise<DeploymentSource>;
4
4
  declare const prepareDirForDeploymentSync: (directory: string) => DeploymentSource;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freestyle-sandboxes",
3
- "version": "0.0.42",
3
+ "version": "0.0.43",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -80,7 +80,7 @@
80
80
  "@langchain/core": "^0.3.38",
81
81
  "@langchain/langgraph": "^0.2.44",
82
82
  "@mastra/core": "^0.6.0",
83
- "ai": "^4.0.25",
83
+ "ai": "^4.3.4",
84
84
  "humanlayer": "^0.7.0",
85
85
  "pkgroll": "^2.6.0"
86
86
  },
package/src/index.ts CHANGED
@@ -29,10 +29,12 @@ import type {
29
29
  HandleVerifyDomainResponse,
30
30
  ListGitTokensResponseSuccess,
31
31
  ListPermissionResponseSuccess,
32
+ BuildOptions,
32
33
  } from "../openapi/index.ts";
33
34
 
34
35
  export type {
35
36
  AccessLevel,
37
+ BuildOptions,
36
38
  CreatedToken,
37
39
  CreateRepositoryResponseSuccess,
38
40
  DescribePermissionResponseSuccess,
@@ -134,13 +136,23 @@ export class FreestyleSandboxes {
134
136
  */
135
137
  async deployWeb(
136
138
  source: sandbox_openapi.DeploymentSource,
137
- config?: FreestyleDeployWebConfiguration
139
+ config?: Omit<FreestyleDeployWebConfiguration, "build"> & {
140
+ build?:
141
+ | BuildOptions
142
+ | (Omit<BuildOptions, "command"> & {
143
+ command: string | string[];
144
+ });
145
+ }
138
146
  ): Promise<FreestyleDeployWebSuccessResponseV2> {
147
+ if (Array.isArray(config.build.command)) {
148
+ config.build.command = config.build.command.join(" && ") as string;
149
+ }
150
+
139
151
  const response = await sandbox_openapi.handleDeployWebV2({
140
152
  client: this.client,
141
153
  body: {
142
154
  source: source,
143
- config: config,
155
+ config: config as FreestyleDeployWebConfiguration,
144
156
  },
145
157
  });
146
158
  if (response.data) {