@getpaseo/protocol 0.1.107 → 0.1.108

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.
@@ -9,6 +9,16 @@ export interface GitHubRemoteIdentity {
9
9
  repo: string;
10
10
  }
11
11
  export declare function parseGitHubRemoteUrl(remoteUrl: string): GitHubRemoteIdentity | null;
12
+ /**
13
+ * Whether `repo` is already a complete git remote (a URL or scp-like address)
14
+ * rather than `owner/repo` shorthand that still needs a clone protocol picked.
15
+ *
16
+ * Clients (app + CLI) and the daemon must agree on this classification: the
17
+ * daemon treats `parseGitRemoteLocation(repo) !== null` as "complete remote"
18
+ * and everything else as shorthand, so reuse the same parser here instead of a
19
+ * separate regex that would drift (e.g. accepting `git://` the parser rejects).
20
+ */
21
+ export declare function isCompleteGitRemote(repo: string): boolean;
12
22
  export declare function parseGitRemoteLocation(remoteUrl: string): GitRemoteLocation | null;
13
23
  export declare function parseGitHubRemoteIdentity(path: string): GitHubRemoteIdentity | null;
14
24
  export declare function isGitHubHost(host: string): boolean;
@@ -10,6 +10,18 @@ export function parseGitHubRemoteUrl(remoteUrl) {
10
10
  return null;
11
11
  return parseGitHubRemoteIdentity(location.path);
12
12
  }
13
+ /**
14
+ * Whether `repo` is already a complete git remote (a URL or scp-like address)
15
+ * rather than `owner/repo` shorthand that still needs a clone protocol picked.
16
+ *
17
+ * Clients (app + CLI) and the daemon must agree on this classification: the
18
+ * daemon treats `parseGitRemoteLocation(repo) !== null` as "complete remote"
19
+ * and everything else as shorthand, so reuse the same parser here instead of a
20
+ * separate regex that would drift (e.g. accepting `git://` the parser rejects).
21
+ */
22
+ export function isCompleteGitRemote(repo) {
23
+ return parseGitRemoteLocation(repo) !== null;
24
+ }
13
25
  export function parseGitRemoteLocation(remoteUrl) {
14
26
  const trimmed = remoteUrl.trim();
15
27
  if (!trimmed)