@oktis-works/admin 0.1.3 → 0.1.5
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/bin/admin.js +14 -0
- package/bin/listen-log.d.ts +8 -0
- package/bin/listen-log.js +66 -0
- package/dist/client/_astro/BaseLayout.COf3Eran.css +1 -0
- package/dist/client/_astro/ContentEditor.COyD6bGV.js +1 -0
- package/dist/client/_astro/PostTypesManager.APvO7Cs9.js +1 -0
- package/dist/client/_astro/TaxonomiesManager.CVFdfaUR.js +1 -0
- package/dist/client/_astro/api.DSP61PKM.js +1 -0
- package/dist/client/_astro/client.D7G9q8lk.js +1 -0
- package/dist/client/_astro/login.astro_astro_type_script_index_0_lang.BLhqPWk8.js +1 -0
- package/dist/client/_astro/web.BRlgYXBp.js +1 -0
- package/dist/server/chunks/BaseLayout_Mvr1_6Ng.mjs +12 -0
- package/dist/server/chunks/DashboardLayout_CP5ag-_P.mjs +17 -0
- package/dist/server/chunks/_virtual_astro_server-island-manifest_C1Q2srgE.mjs +5 -0
- package/dist/server/chunks/_virtual_astro_session-driver_Ei6unT4E.mjs +123 -0
- package/dist/server/chunks/api_Cy8sbUHf.mjs +153 -0
- package/dist/server/chunks/compiler_CYjwXhLT.mjs +35 -0
- package/dist/server/chunks/console_tZnymcoE.mjs +170 -0
- package/dist/server/chunks/dist_CP9QIrJI.mjs +7807 -0
- package/dist/server/chunks/edit_D14rRl_p.mjs +845 -0
- package/dist/server/chunks/errors_mm28nMpQ.mjs +383 -0
- package/dist/server/chunks/index_BgbHlcwr.mjs +23 -0
- package/dist/server/chunks/index_c3b5hMDp.mjs +22 -0
- package/dist/server/chunks/login_B7vbWIed.mjs +40 -0
- package/dist/server/chunks/node_C0YbdEL-.mjs +2263 -0
- package/dist/server/chunks/noop-entrypoint_Z3zFhrGC.mjs +4 -0
- package/dist/server/chunks/post-types_BtNyF2Iv.mjs +137 -0
- package/dist/server/chunks/remote_DUw5DMmE.mjs +169 -0
- package/dist/server/chunks/rolldown-runtime_BMI-E3GI.mjs +44 -0
- package/dist/server/chunks/semver_WbqCUY_o.mjs +1395 -0
- package/dist/server/chunks/server_CnzC2Y0K.mjs +7582 -0
- package/dist/server/chunks/sharp_CfXj7Ul-.mjs +152 -0
- package/dist/server/chunks/taxonomies_DSgstawN.mjs +126 -0
- package/dist/server/entry.mjs +17510 -9592
- package/dist/server/virtual_astro_middleware.mjs +4 -0
- package/package.json +9 -9
- package/dist/client/_astro/ContentEditor.A5N-aCxT.js +0 -1
- package/dist/client/_astro/PostTypesManager.w66_1tDh.js +0 -1
- package/dist/client/_astro/TaxonomiesManager.Dv_OOCEw.js +0 -1
- package/dist/client/_astro/api.GqKwASBH.js +0 -1
- package/dist/client/_astro/client.CCQ0X2AX.js +0 -1
- package/dist/client/_astro/edit.B4LyOiwH.css +0 -1
- package/dist/client/_astro/hoisted.SqllSTyr.js +0 -1
- package/dist/client/_astro/web.D5F0ytYW.js +0 -1
- package/dist/server/_empty-middleware.mjs +0 -3
- package/dist/server/chunks/astro/assets-service_BADPYD54.mjs +0 -438
- package/dist/server/chunks/astro_C5DJOQ1V.mjs +0 -2038
- package/dist/server/chunks/edit_C98B4jh0.mjs +0 -6
- package/dist/server/chunks/index_53XIf90M.mjs +0 -6
- package/dist/server/chunks/index_CHiEzckm.mjs +0 -6
- package/dist/server/chunks/login_C_Jl-EtG.mjs +0 -6
- package/dist/server/chunks/node_Cb_YHUva.mjs +0 -6
- package/dist/server/chunks/pages/edit_AQihQPyy.mjs +0 -2173
- package/dist/server/chunks/pages/index_NImiBHcL.mjs +0 -61
- package/dist/server/chunks/pages/login_B9ODIzLV.mjs +0 -12
- package/dist/server/chunks/pages/node_B3GvoMAw.mjs +0 -268
- package/dist/server/chunks/pages/post-types_ClxoBrjv.mjs +0 -246
- package/dist/server/chunks/pages/taxonomies_CMtxsQlk.mjs +0 -69
- package/dist/server/chunks/post-types_w-FxNhTw.mjs +0 -6
- package/dist/server/chunks/taxonomies_4sch1jA4.mjs +0 -6
- package/dist/server/manifest_BHg4-rj9.mjs +0 -455
- package/dist/server/renderers.mjs +0 -101
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
|
|
2
|
+
import { d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_CnzC2Y0K.mjs";
|
|
3
|
+
import { t as createComponent$1 } from "./compiler_CYjwXhLT.mjs";
|
|
4
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_CP5ag-_P.mjs";
|
|
5
|
+
import { t as apiClient } from "./api_Cy8sbUHf.mjs";
|
|
6
|
+
import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
|
|
7
|
+
import { For, Show, createSignal, onMount } from "solid-js";
|
|
8
|
+
//#region src/components/apps/settings/PostTypesManager.tsx
|
|
9
|
+
var _tmpl$ = [
|
|
10
|
+
"<div",
|
|
11
|
+
" class=\"notice notice--error\">",
|
|
12
|
+
"</div>"
|
|
13
|
+
];
|
|
14
|
+
var _tmpl$2 = [
|
|
15
|
+
"<div",
|
|
16
|
+
" class=\"post-types-manager\"><!--$-->",
|
|
17
|
+
"<!--/--><form class=\"card\"><h3>Criar Content Type</h3><div class=\"form-grid\"><label>Slug (singular, ex.: portfolio)<input class=\"input\" required pattern=\"[a-z0-9_]+\" title=\"Apenas letras minúsculas, números e underscore\"",
|
|
18
|
+
"></label><label>Nome no singular<input class=\"input\" required",
|
|
19
|
+
"></label><label>Nome no plural<input class=\"input\" required",
|
|
20
|
+
"></label></div><fieldset class=\"supports\"><legend>Suporta</legend><!--$-->",
|
|
21
|
+
"<!--/--><label><input type=\"checkbox\"",
|
|
22
|
+
"> Possui arquivo público (/slug)</label></fieldset><button type=\"submit\" class=\"btn btn-primary\"",
|
|
23
|
+
">Criar</button></form><table class=\"table\"><thead><tr><th>Slug</th><th>Singular</th><th>Plural</th><th>Origem</th><th>Suporta</th><th>Arquivo</th><th></th></tr></thead><tbody>",
|
|
24
|
+
"</tbody></table></div>"
|
|
25
|
+
];
|
|
26
|
+
var _tmpl$3 = [
|
|
27
|
+
"<label",
|
|
28
|
+
"><input type=\"checkbox\"",
|
|
29
|
+
"> <!--$-->",
|
|
30
|
+
"<!--/--></label>"
|
|
31
|
+
];
|
|
32
|
+
var _tmpl$4 = ["<button", " type=\"button\" class=\"btn btn-danger\">Remover</button>"];
|
|
33
|
+
var _tmpl$5 = [
|
|
34
|
+
"<tr",
|
|
35
|
+
"><td>",
|
|
36
|
+
"</td><td>",
|
|
37
|
+
"</td><td>",
|
|
38
|
+
"</td><td>",
|
|
39
|
+
"</td><td>",
|
|
40
|
+
"</td><td>",
|
|
41
|
+
"</td><td>",
|
|
42
|
+
"</td></tr>"
|
|
43
|
+
];
|
|
44
|
+
var SUPPORTS_OPTIONS = [
|
|
45
|
+
{
|
|
46
|
+
value: "title",
|
|
47
|
+
label: "Título"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
value: "editor",
|
|
51
|
+
label: "Editor"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
value: "thumbnail",
|
|
55
|
+
label: "Imagem destacada"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
value: "excerpt",
|
|
59
|
+
label: "Resumo"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
value: "revisions",
|
|
63
|
+
label: "Revisões"
|
|
64
|
+
}
|
|
65
|
+
];
|
|
66
|
+
function PostTypesManager() {
|
|
67
|
+
const [types, setTypes] = createSignal([]);
|
|
68
|
+
const [error, setError] = createSignal("");
|
|
69
|
+
const [saving, setSaving] = createSignal(false);
|
|
70
|
+
const [form, setForm] = createSignal({
|
|
71
|
+
name: "",
|
|
72
|
+
slug: "",
|
|
73
|
+
singularLabel: "",
|
|
74
|
+
pluralLabel: "",
|
|
75
|
+
hasArchive: false,
|
|
76
|
+
supports: ["title", "editor"]
|
|
77
|
+
});
|
|
78
|
+
const load = async () => {
|
|
79
|
+
try {
|
|
80
|
+
setTypes(await apiClient.getContentTypes());
|
|
81
|
+
} catch (err) {
|
|
82
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
onMount(load);
|
|
86
|
+
return ssr(_tmpl$2, ssrHydrationKey(), escape(createComponent(Show, {
|
|
87
|
+
get when() {
|
|
88
|
+
return error();
|
|
89
|
+
},
|
|
90
|
+
get children() {
|
|
91
|
+
return ssr(_tmpl$, ssrHydrationKey(), escape(error()));
|
|
92
|
+
}
|
|
93
|
+
})), ssrAttribute("value", escape(form().slug, true), false), ssrAttribute("value", escape(form().singularLabel, true), false), ssrAttribute("value", escape(form().pluralLabel, true), false), escape(createComponent(For, {
|
|
94
|
+
get each() {
|
|
95
|
+
return [...SUPPORTS_OPTIONS];
|
|
96
|
+
},
|
|
97
|
+
children: (option) => ssr(_tmpl$3, ssrHydrationKey(), ssrAttribute("checked", form().supports.includes(option.value), true), escape(option.label))
|
|
98
|
+
})), ssrAttribute("checked", form().hasArchive, true), ssrAttribute("disabled", saving(), true), escape(createComponent(For, {
|
|
99
|
+
get each() {
|
|
100
|
+
return types();
|
|
101
|
+
},
|
|
102
|
+
children: (type) => ssr(_tmpl$5, ssrHydrationKey(), escape(type.slug), escape(type.singularLabel), escape(type.pluralLabel), escape(type.source ?? "ADMIN"), escape((type.supports ?? []).join(", ")), type.hasArchive ? "Sim" : "Não", escape(createComponent(Show, {
|
|
103
|
+
get when() {
|
|
104
|
+
return type.source !== "CORE";
|
|
105
|
+
},
|
|
106
|
+
get children() {
|
|
107
|
+
return ssr(_tmpl$4, ssrHydrationKey());
|
|
108
|
+
}
|
|
109
|
+
})))
|
|
110
|
+
})));
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/pages/settings/post-types.astro
|
|
114
|
+
var post_types_exports = /* @__PURE__ */ __exportAll({
|
|
115
|
+
default: () => $$PostTypes,
|
|
116
|
+
file: () => $$file,
|
|
117
|
+
url: () => $$url
|
|
118
|
+
});
|
|
119
|
+
var $$PostTypes = createComponent$1(($$result, $$props, $$slots) => {
|
|
120
|
+
return renderTemplate`${renderComponent($$result, "DashboardLayout", $$DashboardLayout, {
|
|
121
|
+
"title": "Post Types",
|
|
122
|
+
"data-astro-cid-jfwjjply": true
|
|
123
|
+
}, { "default": ($$result) => renderTemplate`${maybeRenderHead($$result)}<div class="settings-page" data-astro-cid-jfwjjply><div class="page-header" data-astro-cid-jfwjjply><h2 data-astro-cid-jfwjjply>Content Types</h2><p data-astro-cid-jfwjjply>Crie tipos de conteúdo personalizados (CPTs) além de Posts e Páginas.</p></div>${renderComponent($$result, "PostTypesManager", PostTypesManager, {
|
|
124
|
+
"client:load": true,
|
|
125
|
+
"data-astro-cid-jfwjjply": true,
|
|
126
|
+
"client:component-hydration": "load",
|
|
127
|
+
"client:component-path": "/home/runner/work/cms/cms/apps/admin/src/components/apps/settings/PostTypesManager.tsx",
|
|
128
|
+
"client:component-export": "PostTypesManager"
|
|
129
|
+
})}</div>` })}`;
|
|
130
|
+
}, "/home/runner/work/cms/cms/apps/admin/src/pages/settings/post-types.astro", void 0);
|
|
131
|
+
var $$file = "/home/runner/work/cms/cms/apps/admin/src/pages/settings/post-types.astro";
|
|
132
|
+
var $$url = "/settings/post-types";
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region \0virtual:astro:page:src/pages/settings/post-types@_@astro
|
|
135
|
+
var page = () => post_types_exports;
|
|
136
|
+
//#endregion
|
|
137
|
+
export { page };
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
//#region ../../node_modules/.bun/@astrojs+internal-helpers@0.11.0/node_modules/@astrojs/internal-helpers/dist/path.js
|
|
2
|
+
function appendForwardSlash(path) {
|
|
3
|
+
return path.endsWith("/") ? path : path + "/";
|
|
4
|
+
}
|
|
5
|
+
function prependForwardSlash(path) {
|
|
6
|
+
return path[0] === "/" ? path : "/" + path;
|
|
7
|
+
}
|
|
8
|
+
var MANY_LEADING_SLASHES = /^\/{2,}/;
|
|
9
|
+
function collapseDuplicateLeadingSlashes(path) {
|
|
10
|
+
if (!path) return path;
|
|
11
|
+
return path.replace(MANY_LEADING_SLASHES, "/");
|
|
12
|
+
}
|
|
13
|
+
var MANY_SLASHES = /\/{2,}/g;
|
|
14
|
+
function collapseDuplicateSlashes(path) {
|
|
15
|
+
if (!path) return path;
|
|
16
|
+
return path.replace(MANY_SLASHES, "/");
|
|
17
|
+
}
|
|
18
|
+
var MANY_TRAILING_SLASHES = /\/{2,}$/g;
|
|
19
|
+
function collapseDuplicateTrailingSlashes(path, trailingSlash) {
|
|
20
|
+
if (!path) return path;
|
|
21
|
+
return path.replace(MANY_TRAILING_SLASHES, trailingSlash ? "/" : "") || "/";
|
|
22
|
+
}
|
|
23
|
+
function removeTrailingForwardSlash(path) {
|
|
24
|
+
return path.endsWith("/") ? path.slice(0, path.length - 1) : path;
|
|
25
|
+
}
|
|
26
|
+
function removeLeadingForwardSlash(path) {
|
|
27
|
+
return path.startsWith("/") ? path.substring(1) : path;
|
|
28
|
+
}
|
|
29
|
+
function trimSlashes(path) {
|
|
30
|
+
return path.replace(/^\/|\/$/g, "");
|
|
31
|
+
}
|
|
32
|
+
function isString(path) {
|
|
33
|
+
return typeof path === "string" || path instanceof String;
|
|
34
|
+
}
|
|
35
|
+
var INTERNAL_PREFIXES = /* @__PURE__ */ new Set([
|
|
36
|
+
"/_",
|
|
37
|
+
"/@",
|
|
38
|
+
"/.",
|
|
39
|
+
"//"
|
|
40
|
+
]);
|
|
41
|
+
var JUST_SLASHES = /^\/{2,}$/;
|
|
42
|
+
function isInternalPath(path) {
|
|
43
|
+
const prefix = path.slice(0, 2).replace(/\\/g, "/");
|
|
44
|
+
return INTERNAL_PREFIXES.has(prefix) && !JUST_SLASHES.test(path);
|
|
45
|
+
}
|
|
46
|
+
function joinPaths(...paths) {
|
|
47
|
+
return paths.filter(isString).map((path, i) => {
|
|
48
|
+
if (i === 0) return removeTrailingForwardSlash(path);
|
|
49
|
+
else if (i === paths.length - 1) return removeLeadingForwardSlash(path);
|
|
50
|
+
else return trimSlashes(path);
|
|
51
|
+
}).join("/");
|
|
52
|
+
}
|
|
53
|
+
function removeQueryString(path) {
|
|
54
|
+
const index = path.lastIndexOf("?");
|
|
55
|
+
return index > 0 ? path.substring(0, index) : path;
|
|
56
|
+
}
|
|
57
|
+
function isRemotePath(src) {
|
|
58
|
+
if (!src) return false;
|
|
59
|
+
const trimmed = src.trim();
|
|
60
|
+
if (!trimmed) return false;
|
|
61
|
+
let decoded = trimmed;
|
|
62
|
+
let previousDecoded = "";
|
|
63
|
+
let maxIterations = 10;
|
|
64
|
+
while (decoded !== previousDecoded && maxIterations > 0) {
|
|
65
|
+
previousDecoded = decoded;
|
|
66
|
+
try {
|
|
67
|
+
decoded = decodeURIComponent(decoded);
|
|
68
|
+
} catch {
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
maxIterations--;
|
|
72
|
+
}
|
|
73
|
+
if (/^[a-zA-Z]:/.test(decoded)) return false;
|
|
74
|
+
if (decoded[0] === "/" && /^\/[\w.@-]/.test(decoded)) return false;
|
|
75
|
+
if (decoded[0] === "\\") return true;
|
|
76
|
+
if (decoded.startsWith("//")) return true;
|
|
77
|
+
try {
|
|
78
|
+
const url = new URL(decoded, "http://n");
|
|
79
|
+
if (url.username || url.password) return true;
|
|
80
|
+
if (decoded.includes("@") && !url.pathname.includes("@") && !url.search.includes("@")) return true;
|
|
81
|
+
if (url.origin !== "http://n") {
|
|
82
|
+
if (url.protocol.toLowerCase() === "file:") return false;
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
if (URL.canParse(decoded)) return true;
|
|
86
|
+
return false;
|
|
87
|
+
} catch {
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function isParentDirectory(parentPath, childPath) {
|
|
92
|
+
if (!parentPath || !childPath) return false;
|
|
93
|
+
if (parentPath.includes("://") || childPath.includes("://")) return false;
|
|
94
|
+
if (isRemotePath(parentPath) || isRemotePath(childPath)) return false;
|
|
95
|
+
if (parentPath.includes("..") || childPath.includes("..")) return false;
|
|
96
|
+
if (parentPath.includes("\0") || childPath.includes("\0")) return false;
|
|
97
|
+
const normalizedParent = appendForwardSlash(slash(parentPath).toLowerCase());
|
|
98
|
+
const normalizedChild = slash(childPath).toLowerCase();
|
|
99
|
+
if (normalizedParent === normalizedChild || normalizedParent === normalizedChild + "/") return false;
|
|
100
|
+
return normalizedChild.startsWith(normalizedParent);
|
|
101
|
+
}
|
|
102
|
+
function slash(path) {
|
|
103
|
+
return path.replace(/\\/g, "/");
|
|
104
|
+
}
|
|
105
|
+
function fileExtension(path) {
|
|
106
|
+
const ext = path.split(".").pop();
|
|
107
|
+
return ext !== path ? `.${ext}` : "";
|
|
108
|
+
}
|
|
109
|
+
function stripRequestBase(pathname, base) {
|
|
110
|
+
pathname = collapseDuplicateLeadingSlashes(pathname);
|
|
111
|
+
const baseWithoutTrailingSlash = removeTrailingForwardSlash(base);
|
|
112
|
+
if (pathname === baseWithoutTrailingSlash) return "/";
|
|
113
|
+
if (pathname.startsWith(baseWithoutTrailingSlash + "/")) return pathname.slice(baseWithoutTrailingSlash.length);
|
|
114
|
+
return pathname;
|
|
115
|
+
}
|
|
116
|
+
var WITH_FILE_EXT = /\/[^/]+\.\w+$/;
|
|
117
|
+
function hasFileExtension(path) {
|
|
118
|
+
return WITH_FILE_EXT.test(path);
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region ../../node_modules/.bun/@astrojs+internal-helpers@0.11.0/node_modules/@astrojs/internal-helpers/dist/remote.js
|
|
122
|
+
function matchPattern(url, remotePattern) {
|
|
123
|
+
return matchProtocol(url, remotePattern.protocol) && matchHostname(url, remotePattern.hostname, true) && matchPort(url, remotePattern.port) && matchPathname(url, remotePattern.pathname, true);
|
|
124
|
+
}
|
|
125
|
+
function matchPort(url, port) {
|
|
126
|
+
return !port || port === url.port;
|
|
127
|
+
}
|
|
128
|
+
function matchProtocol(url, protocol) {
|
|
129
|
+
return !protocol || protocol === url.protocol.slice(0, -1);
|
|
130
|
+
}
|
|
131
|
+
function matchHostname(url, hostname, allowWildcard = false) {
|
|
132
|
+
if (!hostname) return true;
|
|
133
|
+
else if (!allowWildcard || !hostname.startsWith("*")) return hostname === url.hostname;
|
|
134
|
+
else if (hostname.startsWith("**.")) {
|
|
135
|
+
const slicedHostname = hostname.slice(2);
|
|
136
|
+
return slicedHostname !== url.hostname && url.hostname.endsWith(slicedHostname);
|
|
137
|
+
} else if (hostname.startsWith("*.")) {
|
|
138
|
+
const slicedHostname = hostname.slice(1);
|
|
139
|
+
if (!url.hostname.endsWith(slicedHostname)) return false;
|
|
140
|
+
const subdomainWithDot = url.hostname.slice(0, -(slicedHostname.length - 1));
|
|
141
|
+
return subdomainWithDot.endsWith(".") && !subdomainWithDot.slice(0, -1).includes(".");
|
|
142
|
+
}
|
|
143
|
+
return false;
|
|
144
|
+
}
|
|
145
|
+
function matchPathname(url, pathname, allowWildcard = false) {
|
|
146
|
+
if (!pathname) return true;
|
|
147
|
+
else if (!allowWildcard || !pathname.endsWith("*")) return pathname === url.pathname;
|
|
148
|
+
else if (pathname.endsWith("/**")) {
|
|
149
|
+
const slicedPathname = pathname.slice(0, -2);
|
|
150
|
+
return slicedPathname !== url.pathname && url.pathname.startsWith(slicedPathname);
|
|
151
|
+
} else if (pathname.endsWith("/*")) {
|
|
152
|
+
const slicedPathname = pathname.slice(0, -1);
|
|
153
|
+
if (!url.pathname.startsWith(slicedPathname)) return false;
|
|
154
|
+
return url.pathname.slice(slicedPathname.length).split("/").filter(Boolean).length === 1;
|
|
155
|
+
}
|
|
156
|
+
return false;
|
|
157
|
+
}
|
|
158
|
+
function isRemoteAllowed(src, { domains, remotePatterns }) {
|
|
159
|
+
if (!URL.canParse(src)) return false;
|
|
160
|
+
const url = new URL(src);
|
|
161
|
+
if (![
|
|
162
|
+
"http:",
|
|
163
|
+
"https:",
|
|
164
|
+
"data:"
|
|
165
|
+
].includes(url.protocol)) return false;
|
|
166
|
+
return domains.some((domain) => matchHostname(url, domain)) || remotePatterns.some((remotePattern) => matchPattern(url, remotePattern));
|
|
167
|
+
}
|
|
168
|
+
//#endregion
|
|
169
|
+
export { slash as _, collapseDuplicateSlashes as a, hasFileExtension as c, isRemotePath as d, joinPaths as f, removeTrailingForwardSlash as g, removeQueryString as h, collapseDuplicateLeadingSlashes as i, isInternalPath as l, removeLeadingForwardSlash as m, matchPattern as n, collapseDuplicateTrailingSlashes as o, prependForwardSlash as p, appendForwardSlash as r, fileExtension as s, isRemoteAllowed as t, isParentDirectory as u, stripRequestBase as v, trimSlashes as y };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __esmMin = (fn, res, err) => () => {
|
|
10
|
+
if (err) throw err[0];
|
|
11
|
+
try {
|
|
12
|
+
return fn && (res = fn(fn = 0)), res;
|
|
13
|
+
} catch (e) {
|
|
14
|
+
throw err = [e], e;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
18
|
+
var __exportAll = (all, no_symbols) => {
|
|
19
|
+
let target = {};
|
|
20
|
+
for (var name in all) __defProp(target, name, {
|
|
21
|
+
get: all[name],
|
|
22
|
+
enumerable: true
|
|
23
|
+
});
|
|
24
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
25
|
+
return target;
|
|
26
|
+
};
|
|
27
|
+
var __copyProps = (to, from, except, desc) => {
|
|
28
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
29
|
+
key = keys[i];
|
|
30
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
31
|
+
get: ((k) => from[k]).bind(null, key),
|
|
32
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return to;
|
|
36
|
+
};
|
|
37
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
38
|
+
value: mod,
|
|
39
|
+
enumerable: true
|
|
40
|
+
}) : target, mod));
|
|
41
|
+
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
42
|
+
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
43
|
+
//#endregion
|
|
44
|
+
export { __toCommonJS as a, __require as i, __esmMin as n, __toESM as o, __exportAll as r, __commonJSMin as t };
|