commet 3.1.1 → 3.1.2
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.js +6 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ var import_commander11 = require("commander");
|
|
|
30
30
|
// package.json
|
|
31
31
|
var package_default = {
|
|
32
32
|
name: "commet",
|
|
33
|
-
version: "3.1.
|
|
33
|
+
version: "3.1.2",
|
|
34
34
|
description: "Commet CLI - Manage your billing platform from the command line",
|
|
35
35
|
bin: {
|
|
36
36
|
commet: "./bin/commet"
|
|
@@ -163,7 +163,7 @@ function clearProjectConfig() {
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
// src/utils/telemetry.ts
|
|
166
|
-
var CLI_VERSION = true ? "3.1.
|
|
166
|
+
var CLI_VERSION = true ? "3.1.2" : "0.0.0";
|
|
167
167
|
var TELEMETRY_URL = "https://commet.co/api/cli/telemetry";
|
|
168
168
|
function detectRuntime() {
|
|
169
169
|
if ("Bun" in globalThis) {
|
|
@@ -1252,11 +1252,11 @@ function resolveTargetUrl(input2) {
|
|
|
1252
1252
|
if (/^\d+$/.test(input2)) {
|
|
1253
1253
|
return `http://localhost:${input2}/`;
|
|
1254
1254
|
}
|
|
1255
|
-
const
|
|
1256
|
-
const parsed = new URL(
|
|
1257
|
-
if (!parsed.port) {
|
|
1255
|
+
const hasProtocol = input2.startsWith("http://") || input2.startsWith("https://");
|
|
1256
|
+
const parsed = new URL(hasProtocol ? input2 : `http://${input2}`);
|
|
1257
|
+
if (!hasProtocol && !parsed.port) {
|
|
1258
1258
|
throw new Error(
|
|
1259
|
-
`Missing port in "${input2}".
|
|
1259
|
+
`Missing port in "${input2}". Pass a port (commet listen localhost:3000/webhooks) or a full URL (commet listen https://app.localhost/webhooks).`
|
|
1260
1260
|
);
|
|
1261
1261
|
}
|
|
1262
1262
|
if (!parsed.pathname.endsWith("/")) {
|