MCPcopy Index your code
hub / github.com/anomalyco/opencode / parseShareUrl

Function parseShareUrl

packages/opencode/src/cli/cmd/import.ts:28–31  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

26
27/** Extract share ID from a share URL like https://opncd.ai/share/abc123 */
28export function parseShareUrl(url: string): string | null {
29 const match = url.match(/^https?:\/\/[^/]+\/share\/([a-zA-Z0-9_-]+)$/)
30 return match ? match[1] : null
31}
32
33export function shouldAttachShareAuthHeaders(shareUrl: string, accountBaseUrl: string): boolean {
34 try {

Callers 2

import.test.tsFile · 0.90
import.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected