@hogsend/cli 0.21.0 → 0.21.1

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/bin.js CHANGED
@@ -1228,7 +1228,17 @@ async function run2(ctx) {
1228
1228
  return bail(
1229
1229
  await text({
1230
1230
  message: "PostHog app/private host URL (e.g. https://posthog.example.com)",
1231
- placeholder: "https://posthog.example.com"
1231
+ placeholder: "https://posthog.example.com",
1232
+ validate: (value) => {
1233
+ try {
1234
+ const url = new URL(value ?? "");
1235
+ if (url.protocol !== "http:" && url.protocol !== "https:") {
1236
+ return "Enter a full URL, e.g. https://posthog.example.com";
1237
+ }
1238
+ } catch {
1239
+ return "Enter a full URL, e.g. https://posthog.example.com";
1240
+ }
1241
+ }
1232
1242
  })
1233
1243
  );
1234
1244
  },