freestyle-sandboxes 0.0.93 → 0.0.94

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freestyle-sandboxes",
3
- "version": "0.0.93",
3
+ "version": "0.0.94",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
package/src/index.ts CHANGED
@@ -537,6 +537,7 @@ export class FreestyleSandboxes {
537
537
  } & (
538
538
  | CreateGitRepositorySource
539
539
  | CreateGitRepositoryImport
540
+ | { source: never; import: never }
540
541
  )): Promise<CreateRepositoryResponseSuccess> {
541
542
  const response = await sandbox_openapi.handleCreateRepo({
542
543
  client: this.client,
@@ -922,11 +923,18 @@ export class FreestyleSandboxes {
922
923
  /**
923
924
  * Delete a git trigger.
924
925
  */
925
- async deleteGitTrigger({ triggerId }: { triggerId: string }): Promise<void> {
926
+ async deleteGitTrigger({
927
+ triggerId,
928
+ repo,
929
+ }: {
930
+ triggerId: string;
931
+ repo: string;
932
+ }): Promise<void> {
926
933
  const response = await sandbox_openapi.handleDeleteGitTrigger({
927
934
  client: this.client,
928
935
  path: {
929
936
  trigger: triggerId,
937
+ repo: repo,
930
938
  },
931
939
  });
932
940
 
@@ -1001,6 +1009,7 @@ export class FreestyleSandboxes {
1001
1009
  client: this.client,
1002
1010
  path: {
1003
1011
  repo: repoId,
1012
+ path: path ?? "",
1004
1013
  "*path": path ?? null,
1005
1014
  },
1006
1015
  query: {
@@ -1104,6 +1113,11 @@ export class FreestyleSandboxes {
1104
1113
  envVars?: Record<string, string>;
1105
1114
  computeClass?: string;
1106
1115
  timeout?: number;
1116
+ gitRef?: string;
1117
+ ports?: {
1118
+ port: number;
1119
+ targetPort: number;
1120
+ }[];
1107
1121
  }): Promise<FreestyleDevServer> {
1108
1122
  function formatHook(serverUrl: string, repoUrl: string) {
1109
1123
  const hook =
@@ -1157,6 +1171,7 @@ export class FreestyleSandboxes {
1157
1171
  const devServerInstance: DevServer = {
1158
1172
  repoId: options.repoId || options.repo || "",
1159
1173
  kind: "repo",
1174
+ gitRef: options.gitRef,
1160
1175
  };
1161
1176
 
1162
1177
  const client = this.client;
@@ -1232,6 +1247,7 @@ export class FreestyleSandboxes {
1232
1247
  await sandbox_openapi.handleReadFileFromEphemeralDevServer({
1233
1248
  client,
1234
1249
  path: {
1250
+ filepath: path,
1235
1251
  "*filepath": path,
1236
1252
  },
1237
1253
  body: {
@@ -1319,6 +1335,7 @@ export class FreestyleSandboxes {
1319
1335
  await sandbox_openapi.handleReadFileFromEphemeralDevServer({
1320
1336
  client,
1321
1337
  path: {
1338
+ filepath: path,
1322
1339
  "*filepath": path,
1323
1340
  },
1324
1341
  body: {
@@ -1355,6 +1372,7 @@ export class FreestyleSandboxes {
1355
1372
  await sandbox_openapi.handleWriteFileFromEphemeralDevServer({
1356
1373
  client,
1357
1374
  path: {
1375
+ filepath: path,
1358
1376
  "*filepath": path,
1359
1377
  },
1360
1378
  body: {