@restnfeel/agentc-starter-kit
Version:
한국어 기업용 CMS 모듈 - Task Master AI와 함께 빠르게 웹사이트를 구현할 수 있는 재사용 가능한 컴포넌트 시스템
35 lines (30 loc) • 928 B
JavaScript
import { __exports as parseUrl } from '../../../_virtual/parse-url.js';
var hasRequiredParseUrl;
function requireParseUrl () {
if (hasRequiredParseUrl) return parseUrl;
hasRequiredParseUrl = 1;
Object.defineProperty(parseUrl, "__esModule", {
value: true
});
parseUrl.default = parseUrl$1;
function parseUrl$1(url) {
var _url2;
const defaultUrl = new URL("http://localhost:3000/api/auth");
if (url && !url.startsWith("http")) {
url = `https://${url}`;
}
const _url = new URL((_url2 = url) !== null && _url2 !== void 0 ? _url2 : defaultUrl);
const path = (_url.pathname === "/" ? defaultUrl.pathname : _url.pathname).replace(/\/$/, "");
const base = `${_url.origin}${path}`;
return {
origin: _url.origin,
host: _url.host,
path,
base,
toString: () => base
};
}
return parseUrl;
}
export { requireParseUrl as __require };
//# sourceMappingURL=parse-url.js.map