freestyle-sandboxes 0.0.84 → 0.0.86

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.
Files changed (32) hide show
  1. package/dist/{index-CGc0kRd_.cjs → index-BBXyg0JQ.cjs} +5 -9
  2. package/dist/index-BQHqnjZK.mjs +3231 -0
  3. package/dist/index-CEEa9WHp.cjs +3238 -0
  4. package/dist/{index-jh-93svX.mjs → index-DCF70Xbq.mjs} +5 -9
  5. package/dist/index.cjs +2 -2
  6. package/dist/index.mjs +2 -2
  7. package/dist/types.gen-1sd31qLV.d.ts +172 -0
  8. package/dist/types.gen-627pxroW.d.ts +830 -0
  9. package/dist/types.gen-BCdfx7yt.d.ts +760 -0
  10. package/dist/{types.gen-0bQ5Wn0o.d.ts → types.gen-BVXmFV7d.d.ts} +17 -18
  11. package/dist/types.gen-BaMKzqxQ.d.ts +233 -0
  12. package/dist/types.gen-BbekD8Sd.d.ts +1119 -0
  13. package/dist/types.gen-BqN1t03N.d.ts +842 -0
  14. package/dist/types.gen-BtK6PMQy.d.ts +195 -0
  15. package/dist/types.gen-C03gaIPq.d.ts +297 -0
  16. package/dist/{types.gen-BJArgpto.d.ts → types.gen-CIf3ciN7.d.ts} +5 -2
  17. package/dist/types.gen-CMuCas4r.d.ts +183 -0
  18. package/dist/{types.gen-DxZanGNF.d.ts → types.gen-CZUnqmzP.d.ts} +6 -9
  19. package/dist/types.gen-CnEkmbco.d.ts +314 -0
  20. package/dist/types.gen-DDYpuDzZ.d.ts +764 -0
  21. package/dist/types.gen-DHmdEOOa.d.ts +172 -0
  22. package/dist/{types.gen-CfrGF-JI.d.ts → types.gen-DLYohMJT.d.ts} +1 -1
  23. package/dist/types.gen-DbTb_SrD.d.ts +156 -0
  24. package/dist/types.gen-DkQ-Dbs1.d.ts +764 -0
  25. package/dist/types.gen-DyY7Deri.d.ts +138 -0
  26. package/dist/types.gen-MBZCvIhE.d.ts +311 -0
  27. package/dist/types.gen-YhJAHBw8.d.ts +233 -0
  28. package/dist/types.gen-cCnnhnB6.d.ts +182 -0
  29. package/dist/types.gen-mg_JNXrq.d.ts +830 -0
  30. package/dist/types.gen-uDTr6v-7.d.ts +731 -0
  31. package/package.json +1 -1
  32. package/src/index.ts +44 -44
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freestyle-sandboxes",
3
- "version": "0.0.84",
3
+ "version": "0.0.86",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
package/src/index.ts CHANGED
@@ -152,7 +152,7 @@ export class FreestyleSandboxes {
152
152
  */
153
153
  async executeScript(
154
154
  script: string,
155
- config?: FreestyleExecuteScriptParamsConfiguration,
155
+ config?: FreestyleExecuteScriptParamsConfiguration
156
156
  ): Promise<FreestyleExecuteScriptResultSuccess> {
157
157
  const response = await sandbox_openapi.handleExecuteScript({
158
158
  client: this.client,
@@ -167,7 +167,7 @@ export class FreestyleSandboxes {
167
167
  }
168
168
  throw {
169
169
  message: `Failed to execute script: \n\n${script}\n\nError:\n\n${JSON.stringify(
170
- response,
170
+ response
171
171
  )}`,
172
172
  error: response.error,
173
173
  };
@@ -181,7 +181,7 @@ export class FreestyleSandboxes {
181
181
  */
182
182
  async deployWeb(
183
183
  source: sandbox_openapi.DeploymentSource,
184
- config?: FreestyleDeployWebConfiguration,
184
+ config?: FreestyleDeployWebConfiguration
185
185
  ): Promise<FreestyleDeployWebSuccessResponseV2> {
186
186
  const response = await sandbox_openapi.handleDeployWebV2({
187
187
  client: this.client,
@@ -194,7 +194,7 @@ export class FreestyleSandboxes {
194
194
  return response.data;
195
195
  }
196
196
  throw new Error(
197
- `Failed to deploy web project\n\nStatus: ${response.response.status}\n\nMessage: ${response.error?.message}`,
197
+ `Failed to deploy web project\n\nStatus: ${response.response.status}\n\nMessage: ${response.error?.message}`
198
198
  );
199
199
  }
200
200
 
@@ -202,7 +202,7 @@ export class FreestyleSandboxes {
202
202
  * Deploy a Cloudstate project to a sandbox.
203
203
  */
204
204
  async deployCloudstate(
205
- body: FreestyleCloudstateDeployRequest,
205
+ body: FreestyleCloudstateDeployRequest
206
206
  ): Promise<FreestyleCloudstateDeploySuccessResponse> {
207
207
  const response = await sandbox_openapi.handleDeployCloudstate({
208
208
  client: this.client,
@@ -265,7 +265,7 @@ export class FreestyleSandboxes {
265
265
  * @returns The domain verification token.
266
266
  */
267
267
  async createDomainVerificationRequest(
268
- domain: string,
268
+ domain: string
269
269
  ): Promise<HandleCreateDomainVerificationResponse> {
270
270
  const response = await sandbox_openapi.handleCreateDomainVerification({
271
271
  client: this.client,
@@ -281,7 +281,7 @@ export class FreestyleSandboxes {
281
281
  }
282
282
 
283
283
  async verifyDomainVerificationRequest(
284
- id: string,
284
+ id: string
285
285
  ): Promise<HandleVerifyDomainResponse> {
286
286
  const response = await sandbox_openapi.handleVerifyDomain({
287
287
  client: this.client,
@@ -294,7 +294,7 @@ export class FreestyleSandboxes {
294
294
  return response.data;
295
295
  }
296
296
  throw new Error(
297
- `Failed to verify domain verification request with ID ${id}: ${response.error.message}`,
297
+ `Failed to verify domain verification request with ID ${id}: ${response.error.message}`
298
298
  );
299
299
  }
300
300
 
@@ -304,7 +304,7 @@ export class FreestyleSandboxes {
304
304
  * @returns The domain verification request.
305
305
  */
306
306
  async verifyDomain(
307
- domain: string,
307
+ domain: string
308
308
  ): Promise<HandleVerifyDomainResponse | HandleVerifyDomainError> {
309
309
  const response = await sandbox_openapi.handleVerifyDomain({
310
310
  client: this.client,
@@ -316,7 +316,7 @@ export class FreestyleSandboxes {
316
316
  return response.data;
317
317
  }
318
318
  throw new Error(
319
- `Failed to verify domain ${domain}: ${response.error.message}`,
319
+ `Failed to verify domain ${domain}: ${response.error.message}`
320
320
  );
321
321
  }
322
322
 
@@ -335,20 +335,20 @@ export class FreestyleSandboxes {
335
335
  const response = await sandbox_openapi.handleListDomainVerificationRequests(
336
336
  {
337
337
  client: this.client,
338
- },
338
+ }
339
339
  );
340
340
  if (response.data) {
341
341
  return response.data;
342
342
  }
343
343
 
344
344
  throw new Error(
345
- `Failed to list domain verification requests\n${response.error.message}`,
345
+ `Failed to list domain verification requests\n${response.error.message}`
346
346
  );
347
347
  }
348
348
 
349
349
  async deleteDomainVerificationRequest(
350
350
  domain: string,
351
- verificationCode: string,
351
+ verificationCode: string
352
352
  ): Promise<HandleDeleteDomainVerificationResponse> {
353
353
  const response = await sandbox_openapi.handleDeleteDomainVerification({
354
354
  client: this.client,
@@ -362,13 +362,13 @@ export class FreestyleSandboxes {
362
362
  }
363
363
 
364
364
  throw new Error(
365
- `Failed to delete domain verification request for domain ${domain}: ${response.error.message}`,
365
+ `Failed to delete domain verification request for domain ${domain}: ${response.error.message}`
366
366
  );
367
367
  }
368
368
 
369
369
  async listWebDeployments(
370
370
  limit?: number,
371
- offset?: number,
371
+ offset?: number
372
372
  ): Promise<HandleListWebDeploysResponse> {
373
373
  const response = await sandbox_openapi.handleListWebDeploys({
374
374
  client: this.client,
@@ -383,13 +383,13 @@ export class FreestyleSandboxes {
383
383
  }
384
384
 
385
385
  throw new Error(
386
- `Failed to list web deployments\n${response.error.message}`,
386
+ `Failed to list web deployments\n${response.error.message}`
387
387
  );
388
388
  }
389
389
 
390
390
  async listExecuteRuns(
391
391
  limit?: number,
392
- offset?: number,
392
+ offset?: number
393
393
  ): Promise<HandleListExecuteRunsResponse> {
394
394
  const response = await sandbox_openapi.handleListExecuteRuns({
395
395
  client: this.client,
@@ -417,7 +417,7 @@ export class FreestyleSandboxes {
417
417
  }
418
418
 
419
419
  throw new Error(
420
- `Failed to get execute run with ID ${id}: ${response.error.message}`,
420
+ `Failed to get execute run with ID ${id}: ${response.error.message}`
421
421
  );
422
422
  }
423
423
 
@@ -435,7 +435,7 @@ export class FreestyleSandboxes {
435
435
  }
436
436
 
437
437
  throw new Error(
438
- `Failed to provision wildcard for domain ${domain}: ${response.error.message}`,
438
+ `Failed to provision wildcard for domain ${domain}: ${response.error.message}`
439
439
  );
440
440
  }
441
441
 
@@ -472,7 +472,7 @@ export class FreestyleSandboxes {
472
472
  }
473
473
 
474
474
  throw new Error(
475
- `Failed to create git repository ${name}: ${response.error}`,
475
+ `Failed to create git repository ${name}: ${response.error}`
476
476
  );
477
477
  }
478
478
 
@@ -521,7 +521,7 @@ export class FreestyleSandboxes {
521
521
  }
522
522
 
523
523
  throw new Error(
524
- `Failed to delete git repository ${repoId}: ${response.error}`,
524
+ `Failed to delete git repository ${repoId}: ${response.error}`
525
525
  );
526
526
  }
527
527
 
@@ -590,7 +590,7 @@ export class FreestyleSandboxes {
590
590
  }
591
591
 
592
592
  throw new Error(
593
- `Failed to grant access to git identity ${identityId} for repository ${repoId}: ${response.error}`,
593
+ `Failed to grant access to git identity ${identityId} for repository ${repoId}: ${response.error}`
594
594
  );
595
595
  }
596
596
 
@@ -622,7 +622,7 @@ export class FreestyleSandboxes {
622
622
  }
623
623
 
624
624
  throw new Error(
625
- `Failed to update permission for git identity ${identityId} for repository ${repoId}: ${response.error}`,
625
+ `Failed to update permission for git identity ${identityId} for repository ${repoId}: ${response.error}`
626
626
  );
627
627
  }
628
628
 
@@ -649,7 +649,7 @@ export class FreestyleSandboxes {
649
649
  }
650
650
 
651
651
  throw new Error(
652
- `Failed to revoke access to git identity ${identityId} for repository ${repoId}: ${response.error}`,
652
+ `Failed to revoke access to git identity ${identityId} for repository ${repoId}: ${response.error}`
653
653
  );
654
654
  }
655
655
 
@@ -673,7 +673,7 @@ export class FreestyleSandboxes {
673
673
  }
674
674
 
675
675
  throw new Error(
676
- `Failed to list permissions for git identity ${identityId}: ${response.error}`,
676
+ `Failed to list permissions for git identity ${identityId}: ${response.error}`
677
677
  );
678
678
  }
679
679
 
@@ -700,7 +700,7 @@ export class FreestyleSandboxes {
700
700
  }
701
701
 
702
702
  throw new Error(
703
- `Failed to get permission for git identity ${identityId} on repository ${repoId}: ${response.error}`,
703
+ `Failed to get permission for git identity ${identityId} on repository ${repoId}: ${response.error}`
704
704
  );
705
705
  }
706
706
 
@@ -724,7 +724,7 @@ export class FreestyleSandboxes {
724
724
  }
725
725
 
726
726
  throw new Error(
727
- `Failed to create git access token: ${response.error.message}`,
727
+ `Failed to create git access token: ${response.error.message}`
728
728
  );
729
729
  }
730
730
 
@@ -753,7 +753,7 @@ export class FreestyleSandboxes {
753
753
  }
754
754
 
755
755
  throw new Error(
756
- `Failed to revoke git access token ${tokenId}: ${response.error.message}`,
756
+ `Failed to revoke git access token ${tokenId}: ${response.error.message}`
757
757
  );
758
758
  }
759
759
 
@@ -777,7 +777,7 @@ export class FreestyleSandboxes {
777
777
  }
778
778
 
779
779
  throw new Error(
780
- `Failed to list git access tokens: ${response.error.message}`,
780
+ `Failed to list git access tokens: ${response.error.message}`
781
781
  );
782
782
  }
783
783
 
@@ -801,7 +801,7 @@ export class FreestyleSandboxes {
801
801
  }
802
802
 
803
803
  throw new Error(
804
- `Failed to list git triggers for repository ${repoId}: ${response.error.message}`,
804
+ `Failed to list git triggers for repository ${repoId}: ${response.error.message}`
805
805
  );
806
806
  }
807
807
 
@@ -833,7 +833,7 @@ export class FreestyleSandboxes {
833
833
  }
834
834
 
835
835
  throw new Error(
836
- `Failed to create git trigger for repository ${repoId}: ${response.error.message}`,
836
+ `Failed to create git trigger for repository ${repoId}: ${response.error.message}`
837
837
  );
838
838
  }
839
839
 
@@ -853,7 +853,7 @@ export class FreestyleSandboxes {
853
853
  }
854
854
 
855
855
  throw new Error(
856
- `Failed to delete git trigger ${triggerId}: ${response.error.message}`,
856
+ `Failed to delete git trigger ${triggerId}: ${response.error.message}`
857
857
  );
858
858
  }
859
859
 
@@ -899,7 +899,7 @@ export class FreestyleSandboxes {
899
899
  }
900
900
 
901
901
  throw new Error(
902
- `Failed to get default branch for repository ${repoId}: ${response.error}`,
902
+ `Failed to get default branch for repository ${repoId}: ${response.error}`
903
903
  );
904
904
  }
905
905
 
@@ -931,7 +931,7 @@ export class FreestyleSandboxes {
931
931
  }
932
932
 
933
933
  throw new Error(
934
- `Failed to get git repository contents: ${response.error.message}`,
934
+ `Failed to get git repository contents: ${response.error.message}`
935
935
  );
936
936
  }
937
937
 
@@ -1043,7 +1043,7 @@ export class FreestyleSandboxes {
1043
1043
  if (response.error) {
1044
1044
  throw new Error(
1045
1045
  // @ts-ignore
1046
- `Failed to request dev server: ${response.error.message}`,
1046
+ `Failed to request dev server: ${response.error.message}`
1047
1047
  );
1048
1048
  }
1049
1049
 
@@ -1055,7 +1055,7 @@ export class FreestyleSandboxes {
1055
1055
  action: {
1056
1056
  endpoint: formatHook(
1057
1057
  response.data?.url!,
1058
- options.repoUrl || `https://git.freestyle.sh/${rId}`,
1058
+ options.repoUrl || `https://git.freestyle.sh/${rId}`
1059
1059
  ),
1060
1060
  action: "webhook",
1061
1061
  },
@@ -1187,12 +1187,12 @@ export class FreestyleSandboxes {
1187
1187
  kind: devServerInstance.kind,
1188
1188
  },
1189
1189
  }),
1190
- },
1190
+ }
1191
1191
  );
1192
1192
 
1193
1193
  if (!response.ok) {
1194
1194
  throw new Error(
1195
- `Failed to fetch stream: ${response.status} ${response.statusText}`,
1195
+ `Failed to fetch stream: ${response.status} ${response.statusText}`
1196
1196
  );
1197
1197
  }
1198
1198
 
@@ -1237,7 +1237,7 @@ export class FreestyleSandboxes {
1237
1237
  await sandbox_openapi.handleReadFileFromEphemeralDevServer({
1238
1238
  client,
1239
1239
  path: {
1240
- filepath: path,
1240
+ "*filepath": path,
1241
1241
  },
1242
1242
  body: {
1243
1243
  devServer: devServerInstance,
@@ -1262,7 +1262,7 @@ export class FreestyleSandboxes {
1262
1262
  async writeFile(
1263
1263
  path: string,
1264
1264
  content: string | ArrayBuffer,
1265
- encoding: BufferEncoding = "utf-8",
1265
+ encoding: BufferEncoding = "utf-8"
1266
1266
  ) {
1267
1267
  const contentStr =
1268
1268
  typeof content === "string"
@@ -1273,7 +1273,7 @@ export class FreestyleSandboxes {
1273
1273
  await sandbox_openapi.handleWriteFileFromEphemeralDevServer({
1274
1274
  client,
1275
1275
  path: {
1276
- filepath: path,
1276
+ "*filepath": path,
1277
1277
  },
1278
1278
  body: {
1279
1279
  devServer: devServerInstance,
@@ -1284,7 +1284,7 @@ export class FreestyleSandboxes {
1284
1284
 
1285
1285
  if (response.error) {
1286
1286
  throw new Error(
1287
- `Failed to write file: ${JSON.stringify(response.error)}`,
1287
+ `Failed to write file: ${JSON.stringify(response.error)}`
1288
1288
  );
1289
1289
  }
1290
1290
  },
@@ -1300,7 +1300,7 @@ export class FreestyleSandboxes {
1300
1300
  command: cmd,
1301
1301
  background,
1302
1302
  },
1303
- },
1303
+ }
1304
1304
  );
1305
1305
 
1306
1306
  if (response.error) {
@@ -1337,7 +1337,7 @@ export class FreestyleSandboxes {
1337
1337
 
1338
1338
  const url = new URL(
1339
1339
  path,
1340
- this.options.baseUrl ?? "https://api.freestyle.sh",
1340
+ this.options.baseUrl ?? "https://api.freestyle.sh"
1341
1341
  );
1342
1342
 
1343
1343
  return fetch(url, {