complete
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
import { d as defineEventHandler, s as setResponseStatus } from '../nitro/nitro.mjs';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:events';
|
||||
import 'node:buffer';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import 'node:crypto';
|
||||
import 'vue';
|
||||
import 'node:url';
|
||||
import 'consola';
|
||||
import 'fast-xml-parser';
|
||||
import 'ipx';
|
||||
|
||||
const _nuxt = defineEventHandler((event) => {
|
||||
const pathname = event.node.req.url || "";
|
||||
if (pathname === "/_nuxt" || pathname === "/_nuxt/") {
|
||||
setResponseStatus(event, 204);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
export { _nuxt as default };
|
||||
@@ -1,78 +0,0 @@
|
||||
import { k as defineSitemapEventHandler } from '../../../nitro/nitro.mjs';
|
||||
import { createClient } from '@supabase/supabase-js';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:events';
|
||||
import 'node:buffer';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import 'node:crypto';
|
||||
import 'vue';
|
||||
import 'node:url';
|
||||
import 'consola';
|
||||
import 'fast-xml-parser';
|
||||
import 'ipx';
|
||||
|
||||
let _client = null;
|
||||
function ensureClient() {
|
||||
if (_client) return _client;
|
||||
const SUPABASE_URL = useState("supabase-url").value;
|
||||
const SUPABASE_KEY = useState("supabase-key").value;
|
||||
if (!SUPABASE_URL || !SUPABASE_KEY) {
|
||||
console.warn("[supabase] Missing SUPABASE_URL/KEY");
|
||||
}
|
||||
_client = createClient(SUPABASE_URL, SUPABASE_KEY);
|
||||
return _client;
|
||||
}
|
||||
const supabase = new Proxy({}, {
|
||||
get(_t, prop, receiver) {
|
||||
const c = ensureClient();
|
||||
return Reflect.get(c, prop, receiver);
|
||||
},
|
||||
apply(_t, thisArg, argArray) {
|
||||
var _a, _b;
|
||||
return (_b = (_a = ensureClient()) == null ? void 0 : _a.apply) == null ? void 0 : _b.call(_a, thisArg, argArray);
|
||||
}
|
||||
});
|
||||
|
||||
const urls = defineSitemapEventHandler(async () => {
|
||||
const urls = [];
|
||||
try {
|
||||
const { data: categorys, error } = await supabase.from("collections").select(`title`);
|
||||
if (categorys && categorys.length) {
|
||||
categorys.forEach((item) => {
|
||||
urls.push(`/search/main?category=${item.title}`);
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
try {
|
||||
const { data: brands, error } = await supabase.from("brands").select(`title`);
|
||||
if (brands && brands.length) {
|
||||
brands.forEach((item) => {
|
||||
urls.push(`/search/main?brand=${item.title}`);
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
try {
|
||||
const { data: products, error } = await supabase.from("products").select(`title`);
|
||||
if (products && products.length) {
|
||||
products.forEach((item) => {
|
||||
urls.push(`/product_detail/${item.title}`);
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
urls.push(`/`);
|
||||
urls.push(`/home`);
|
||||
urls.push(`/search`);
|
||||
urls.push(`/search/main`);
|
||||
urls.push(`/user`);
|
||||
return urls;
|
||||
});
|
||||
|
||||
export { urls as default };
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
import { d as defineEventHandler, g as getRequestHeader, a as getCachedConfig, b as sendRedirect } from '../nitro/nitro.mjs';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:events';
|
||||
import 'node:buffer';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import 'node:crypto';
|
||||
import 'vue';
|
||||
import 'node:url';
|
||||
import 'consola';
|
||||
import 'fast-xml-parser';
|
||||
import 'ipx';
|
||||
|
||||
const handler = defineEventHandler(async (event) => {
|
||||
const host = getRequestHeader(event, "host");
|
||||
const config = await getCachedConfig(host || "");
|
||||
if (config == null ? void 0 : config.storageLogo) {
|
||||
const remoteUrl = `${config.storageLogo}/favicon.ico`;
|
||||
return sendRedirect(event, remoteUrl, 302);
|
||||
}
|
||||
return sendRedirect(event, "https://node.newinsta.ir/", 302);
|
||||
});
|
||||
|
||||
export { handler as default };
|
||||
@@ -1,52 +0,0 @@
|
||||
import { d as defineEventHandler, c as getRequestHost, a as getCachedConfig, e as setResponseHeader } from '../nitro/nitro.mjs';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:events';
|
||||
import 'node:buffer';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import 'node:crypto';
|
||||
import 'vue';
|
||||
import 'node:url';
|
||||
import 'consola';
|
||||
import 'fast-xml-parser';
|
||||
import 'ipx';
|
||||
|
||||
const manifest_webmanifest_get = defineEventHandler(async (event) => {
|
||||
const host = getRequestHost(event);
|
||||
const config = await getCachedConfig(host);
|
||||
const name = (config == null ? void 0 : config.appNameEn) || "App Name";
|
||||
const shortName = (config == null ? void 0 : config.appNameEn) || "App";
|
||||
const description = (config == null ? void 0 : config.description) || "Best Shopping App";
|
||||
const iconSrc = (config == null ? void 0 : config.storageLogo) ? `${config.storageLogo}/pwa-icon-192.png` : "/pwa-icon-192.png";
|
||||
const manifest = {
|
||||
name,
|
||||
short_name: shortName,
|
||||
description,
|
||||
id: "/",
|
||||
start_url: "/",
|
||||
display: "standalone",
|
||||
orientation: "portrait-primary",
|
||||
background_color: "#ffffff",
|
||||
theme_color: "#ffffff",
|
||||
icons: [
|
||||
{
|
||||
src: iconSrc,
|
||||
sizes: "192x192",
|
||||
type: "image/png",
|
||||
purpose: "any maskable"
|
||||
},
|
||||
{
|
||||
// اینجا فرض میکنیم فایل 512 هم کنار 192 هست
|
||||
src: iconSrc.replace("192", "512"),
|
||||
sizes: "512x512",
|
||||
type: "image/png",
|
||||
purpose: "any maskable"
|
||||
}
|
||||
]
|
||||
};
|
||||
setResponseHeader(event, "Content-Type", "application/manifest+json");
|
||||
return manifest;
|
||||
});
|
||||
|
||||
export { manifest_webmanifest_get as default };
|
||||
@@ -1,24 +0,0 @@
|
||||
import { d as defineEventHandler, g as getRequestHeader, a as getCachedConfig, b as sendRedirect } from '../nitro/nitro.mjs';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:events';
|
||||
import 'node:buffer';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import 'node:crypto';
|
||||
import 'vue';
|
||||
import 'node:url';
|
||||
import 'consola';
|
||||
import 'fast-xml-parser';
|
||||
import 'ipx';
|
||||
|
||||
const handler = defineEventHandler(async (event) => {
|
||||
const host = getRequestHeader(event, "host");
|
||||
const config = await getCachedConfig(host || "");
|
||||
if (config == null ? void 0 : config.storageLogo) {
|
||||
return sendRedirect(event, `${config.storageLogo}/pwa-icon-192.png`, 302);
|
||||
}
|
||||
return sendRedirect(event, "https://node.newinsta.ir/default/pwa-icon-192.png");
|
||||
});
|
||||
|
||||
export { handler as default };
|
||||
@@ -1,24 +0,0 @@
|
||||
import { d as defineEventHandler, g as getRequestHeader, a as getCachedConfig, b as sendRedirect } from '../nitro/nitro.mjs';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:events';
|
||||
import 'node:buffer';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import 'node:crypto';
|
||||
import 'vue';
|
||||
import 'node:url';
|
||||
import 'consola';
|
||||
import 'fast-xml-parser';
|
||||
import 'ipx';
|
||||
|
||||
const handler = defineEventHandler(async (event) => {
|
||||
const host = getRequestHeader(event, "host");
|
||||
const config = await getCachedConfig(host || "");
|
||||
if (config == null ? void 0 : config.storageLogo) {
|
||||
return sendRedirect(event, `${config.storageLogo}/pwa-icon-512.png`, 302);
|
||||
}
|
||||
return sendRedirect(event, "https://node.newinsta.ir/default/pwa-icon-192.png");
|
||||
});
|
||||
|
||||
export { handler as default };
|
||||
@@ -1,20 +1,11 @@
|
||||
import { createRenderer, getRequestDependencies, getPreloadLinks, getPrefetchLinks } from 'vue-bundle-renderer/runtime';
|
||||
import { l as buildAssetsURL, u as useRuntimeConfig, m as getResponseStatusText, n as getResponseStatus, o as defineRenderHandler, q as publicAssetsURL, r as getQuery, t as createError, v as destr, x as getRouteRules, j as joinURL, y as useNitroApp } from '../nitro/nitro.mjs';
|
||||
import { b as buildAssetsURL, u as useRuntimeConfig, g as getResponseStatusText, a as getResponseStatus, d as decodePath, c as defineRenderHandler, p as publicAssetsURL, e as getQuery, f as createError, h as destr, i as getRouteRules, j as joinURL, k as useNitroApp } from '../nitro/nitro.mjs';
|
||||
import { renderToString } from 'vue/server-renderer';
|
||||
import { createHead as createHead$1, propsToString, renderSSRHead } from 'unhead/server';
|
||||
import { stringify, uneval } from 'devalue';
|
||||
import { isRef, toValue } from 'vue';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:events';
|
||||
import 'node:buffer';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import 'node:crypto';
|
||||
import 'node:url';
|
||||
import 'consola';
|
||||
import 'fast-xml-parser';
|
||||
import 'ipx';
|
||||
import { FlatMetaPlugin } from 'unhead/plugins';
|
||||
import { walkResolver } from 'unhead/utils';
|
||||
import { isRef, toValue, hasInjectionContext, inject, ref, watchEffect, getCurrentInstance, onBeforeUnmount, onDeactivated, onActivated } from 'vue';
|
||||
|
||||
const VueResolver = (_, value) => {
|
||||
return isRef(value) ? toValue(value) : value;
|
||||
@@ -33,6 +24,57 @@ function vueInstall(head) {
|
||||
return plugin.install;
|
||||
}
|
||||
|
||||
// @__NO_SIDE_EFFECTS__
|
||||
function injectHead() {
|
||||
if (hasInjectionContext()) {
|
||||
const instance = inject(headSymbol);
|
||||
if (!instance) {
|
||||
throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");
|
||||
}
|
||||
function useHead(input, options = {}) {
|
||||
const head = options.head || /* @__PURE__ */ injectHead();
|
||||
return head.ssr ? head.push(input || {}, options) : clientUseHead(head, input, options);
|
||||
}
|
||||
function clientUseHead(head, input, options = {}) {
|
||||
const deactivated = ref(false);
|
||||
let entry;
|
||||
watchEffect(() => {
|
||||
const i = deactivated.value ? {} : walkResolver(input, VueResolver);
|
||||
if (entry) {
|
||||
entry.patch(i);
|
||||
} else {
|
||||
entry = head.push(i, options);
|
||||
}
|
||||
});
|
||||
const vm = getCurrentInstance();
|
||||
if (vm) {
|
||||
onBeforeUnmount(() => {
|
||||
entry.dispose();
|
||||
});
|
||||
onDeactivated(() => {
|
||||
deactivated.value = true;
|
||||
});
|
||||
onActivated(() => {
|
||||
deactivated.value = false;
|
||||
});
|
||||
}
|
||||
return entry;
|
||||
}
|
||||
function useSeoMeta(input = {}, options = {}) {
|
||||
const head = options.head || /* @__PURE__ */ injectHead();
|
||||
head.use(FlatMetaPlugin);
|
||||
const { title, titleTemplate, ...meta } = input;
|
||||
return useHead({
|
||||
title,
|
||||
titleTemplate,
|
||||
_flatMeta: meta
|
||||
}, options);
|
||||
}
|
||||
|
||||
// @__NO_SIDE_EFFECTS__
|
||||
function createHead(options = {}) {
|
||||
const head = createHead$1({
|
||||
@@ -45,7 +87,7 @@ function createHead(options = {}) {
|
||||
|
||||
const NUXT_RUNTIME_PAYLOAD_EXTRACTION = false;
|
||||
|
||||
const appHead = {"meta":[{"name":"viewport","content":"width=device-width, initial-scale=1"},{"charset":"utf-8"},{"name":"screen-orientation","content":"portrait"}],"link":[{"rel":"manifest","href":"/manifest.webmanifest"}],"style":[],"script":[],"noscript":[],"title":"Loading..."};
|
||||
const appHead = {"meta":[{"name":"viewport","content":"width=device-width, initial-scale=1"},{"charset":"utf-8"}],"link":[{"rel":"icon","type":"image/png","href":"/favicon.ico"}],"style":[],"script":[],"noscript":[],"title":"اپ کو (Appco) | آژانس دیجیتال مارکتینگ و بازاریابی آنلاین"};
|
||||
|
||||
const appRootTag = "div";
|
||||
|
||||
@@ -64,7 +106,7 @@ const appId = "nuxt-app";
|
||||
const APP_ROOT_OPEN_TAG = `<${appRootTag}${propsToString(appRootAttrs)}>`;
|
||||
const APP_ROOT_CLOSE_TAG = `</${appRootTag}>`;
|
||||
// @ts-expect-error file will be produced after app build
|
||||
const getServerEntry = () => import('../build/server.mjs').then(function (n) { return n.bJ; }).then((r) => r.default || r);
|
||||
const getServerEntry = () => import('../build/server.mjs').then((r) => r.default || r);
|
||||
// @ts-expect-error file will be produced after app build
|
||||
const getPrecomputedDependencies = () => import('../build/client.precomputed.mjs').then((r) => r.default || r).then((r) => typeof r === "function" ? r() : r);
|
||||
// -- SSR Renderer --
|
||||
@@ -189,7 +231,7 @@ const unheadOptions = {
|
||||
|
||||
function createSSRContext(event) {
|
||||
const ssrContext = {
|
||||
url: event.path,
|
||||
url: decodePath(event.path),
|
||||
event,
|
||||
runtimeConfig: useRuntimeConfig(event),
|
||||
noSSR: event.context.nuxt?.noSSR || (false),
|
||||
@@ -420,4 +462,10 @@ function renderHTMLDocument(html) {
|
||||
return "<!DOCTYPE html>" + `<html${joinAttrs(html.htmlAttrs)}>` + `<head>${joinTags(html.head)}</head>` + `<body${joinAttrs(html.bodyAttrs)}>${joinTags(html.bodyPrepend)}${joinTags(html.body)}${joinTags(html.bodyAppend)}</body>` + "</html>";
|
||||
}
|
||||
|
||||
export { renderer as default };
|
||||
const renderer$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
||||
__proto__: null,
|
||||
default: renderer
|
||||
}, Symbol.toStringTag, { value: 'Module' }));
|
||||
|
||||
export { useSeoMeta as a, headSymbol as h, renderer$1 as r, useHead as u };
|
||||
//# sourceMappingURL=renderer.mjs.map
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"renderer.mjs","sources":["../../../../node_modules/@unhead/vue/dist/shared/vue.N9zWjxoK.mjs","../../../../node_modules/@unhead/vue/dist/shared/vue.Bm-NbY4b.mjs","../../../../node_modules/@unhead/vue/dist/server.mjs","../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/renderer/build-files.mjs","../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/renderer/payload.mjs","../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/renderer/app.mjs","../../../../node_modules/@nuxt/nitro-server/dist/runtime/handlers/renderer.mjs"],"names":["renderToString","_renderToString"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6]}
|
||||
Reference in New Issue
Block a user