freestyle-sandboxes 0.0.51 → 0.0.52
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/index.cjs +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
- package/src/index.ts +4 -1
package/dist/index.cjs
CHANGED
|
@@ -789,8 +789,10 @@ ${response.error.message}`);
|
|
|
789
789
|
} else if ("repoUrl" in repo) {
|
|
790
790
|
const parts = repo.repoUrl.split("/");
|
|
791
791
|
repoId = parts[parts.length - 1];
|
|
792
|
+
} else {
|
|
793
|
+
throw new Error("Either repoId or repoUrl must be provided");
|
|
792
794
|
}
|
|
793
|
-
const repoUrl = process.env.GIT_URL ?? "https://git.freestyle.sh/" + repoId;
|
|
795
|
+
const repoUrl = (process.env.GIT_URL ?? "https://git.freestyle.sh/") + repoId;
|
|
794
796
|
const response = await handleEphemeralDevServer({
|
|
795
797
|
client: this.client,
|
|
796
798
|
body: {
|
package/dist/index.mjs
CHANGED
|
@@ -787,8 +787,10 @@ ${response.error.message}`);
|
|
|
787
787
|
} else if ("repoUrl" in repo) {
|
|
788
788
|
const parts = repo.repoUrl.split("/");
|
|
789
789
|
repoId = parts[parts.length - 1];
|
|
790
|
+
} else {
|
|
791
|
+
throw new Error("Either repoId or repoUrl must be provided");
|
|
790
792
|
}
|
|
791
|
-
const repoUrl = process.env.GIT_URL ?? "https://git.freestyle.sh/" + repoId;
|
|
793
|
+
const repoUrl = (process.env.GIT_URL ?? "https://git.freestyle.sh/") + repoId;
|
|
792
794
|
const response = await handleEphemeralDevServer({
|
|
793
795
|
client: this.client,
|
|
794
796
|
body: {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -814,9 +814,12 @@ export class FreestyleSandboxes {
|
|
|
814
814
|
} else if ("repoUrl" in repo) {
|
|
815
815
|
const parts = repo.repoUrl.split("/");
|
|
816
816
|
repoId = parts[parts.length - 1]; // Get the last part of the URL path
|
|
817
|
+
} else {
|
|
818
|
+
throw new Error("Either repoId or repoUrl must be provided");
|
|
817
819
|
}
|
|
818
820
|
|
|
819
|
-
const repoUrl =
|
|
821
|
+
const repoUrl =
|
|
822
|
+
(process.env.GIT_URL ?? "https://git.freestyle.sh/") + repoId;
|
|
820
823
|
|
|
821
824
|
const response = await sandbox_openapi.handleEphemeralDevServer({
|
|
822
825
|
client: this.client,
|