@nextblock-cms/db 0.2.32 → 0.8.1
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/cache-Bb4TkKGq.js +38 -0
- package/cache-D0Q6YeSV.mjs +10150 -0
- package/index.cjs.js +1 -1
- package/index.es.js +66 -61
- package/package.json +1 -1
- package/server.cjs.js +1 -1
- package/server.es.js +48 -43
- package/supabase/config.toml +330 -319
- package/supabase/functions/import_map.json +6 -0
- package/supabase/functions/nextblock-migration-ingest/index.d.ts +1 -0
- package/supabase/functions/nextblock-migration-ingest/index.js +519 -0
- package/supabase/functions/nextblock-migration-ingest/index.js.map +7 -0
- package/supabase/functions/nextblock-migration-ingest/index.ts +646 -0
- package/supabase/migrations/00000000000000_setup_foundation_and_enums.sql +40 -0
- package/supabase/migrations/00000000000001_setup_cms_core.sql +124 -0
- package/supabase/migrations/00000000000002_setup_content_tables.sql +138 -0
- package/supabase/migrations/00000000000003_setup_catalog_and_licensing.sql +160 -0
- package/supabase/migrations/00000000000004_setup_fulfillment_shipping_taxes_and_currencies.sql +797 -0
- package/supabase/migrations/00000000000005_setup_functions_and_triggers.sql +767 -0
- package/supabase/migrations/00000000000006_setup_rls_and_grants.sql +872 -0
- package/supabase/migrations/00000000000007_setup_indexes.sql +158 -0
- package/supabase/migrations/00000000000008_seed_platform_defaults.sql +155 -0
- package/supabase/migrations/00000000000009_seed_translations.sql +801 -0
- package/supabase/migrations/00000000000010_seed_content_scaffold.sql +1088 -0
- package/supabase/migrations/00000000000011_setup_cortex_ai_settings.sql +81 -0
- package/supabase/migrations/00000000000012_setup_commerce_coupons.sql +275 -0
- package/supabase/migrations/00000000000013_setup_cortex_ai_db_mutation_audit.sql +47 -0
- package/supabase/migrations/00000000000014_setup_content_drafts.sql +119 -0
- package/supabase/migrations/00000000000015_setup_product_drafts.sql +97 -0
- package/supabase/migrations/00000000000016_add_feature_image_to_pages.sql +8 -0
- package/supabase/migrations/00000000000017_add_product_blocks.sql +118 -0
- package/supabase/migrations/00000000000018_setup_bot_protection_settings.sql +77 -0
- package/supabase/migrations/00000000000019_add_product_categories.sql +64 -0
- package/supabase/migrations/00000000000020_add_category_translations.sql +10 -0
- package/supabase/migrations/00000000000021_migrate_hero_blocks_to_sections.sql +29 -0
- package/supabase/migrations/00000000000022_seed_cortex_ai_guide_post.sql +184 -0
- package/supabase/migrations/00000000000023_setup_custom_block_definitions.sql +183 -0
- package/supabase/migrations/00000000000024_setup_ucp_cart_sessions.sql +72 -0
- package/supabase/migrations/00000000000025_add_sale_schedule_columns.sql +406 -0
- package/supabase/migrations/00000000000026_seed_on_sale_translation.sql +9 -0
- package/supabase/migrations/00000000000027_setup_privacy_and_mfa.sql +479 -0
- package/supabase/migrations/00000000000028_clear_advisor_warnings.sql +93 -0
- package/supabase/migrations/00000000000029_refresh_setup_article.sql +252 -0
- package/supabase/templates/confirmation.html +54 -0
- package/supabase/templates/email_change.html +53 -0
- package/supabase/templates/invite.html +53 -0
- package/supabase/templates/magic_link.html +53 -0
- package/supabase/templates/reauthentication.html +45 -0
- package/supabase/templates/recovery.html +54 -0
- package/index.d.ts +0 -4
- package/lib/supabase/client.d.ts +0 -9
- package/lib/supabase/middleware.d.ts +0 -2
- package/lib/supabase/server.d.ts +0 -7
- package/lib/supabase/ssg-client.d.ts +0 -2
- package/lib/supabase/types.d.ts +0 -635
- package/server.d.ts +0 -2
- package/ssg-client-CiaENGEv.js +0 -1
- package/ssg-client-DgUYZgPq.mjs +0 -8
- package/supabase/migrations/00000000000000_setup_extensions_and_roles.sql +0 -54
- package/supabase/migrations/00000000000001_setup_site_settings.sql +0 -19
- package/supabase/migrations/00000000000002_setup_profiles.sql +0 -87
- package/supabase/migrations/00000000000003_setup_languages.sql +0 -43
- package/supabase/migrations/00000000000004_setup_media.sql +0 -54
- package/supabase/migrations/00000000000005_setup_posts.sql +0 -56
- package/supabase/migrations/00000000000006_setup_pages.sql +0 -51
- package/supabase/migrations/00000000000007_setup_blocks.sql +0 -47
- package/supabase/migrations/00000000000008_setup_navigation.sql +0 -51
- package/supabase/migrations/00000000000009_setup_logos.sql +0 -13
- package/supabase/migrations/00000000000010_setup_translations.sql +0 -29
- package/supabase/migrations/00000000000011_setup_revisions.sql +0 -38
- package/supabase/migrations/00000000000012_setup_rls_policies.sql +0 -239
- package/supabase/migrations/00000000000013_seed_data.sql +0 -149
- package/supabase/migrations/00000000000014_seed_homepage_blocks.sql +0 -661
- package/supabase/migrations/00000000000015_seed_how_it_works.sql +0 -89
- package/supabase/migrations/00000000000016_sandbox_setup.sql +0 -834
package/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("@supabase/ssr"),m=require("./cache-Bb4TkKGq.js"),c=require("@nextblock-cms/utils/server"),g=()=>{const e=process.env.NEXT_PUBLIC_SUPABASE_URL,i=process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;if(!e||!i)throw new Error(`CRITICAL: Supabase URL or Anon Key is missing. Please ensure NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY are set in your production environment. URL_IS_SET: ${!!e}, ANON_KEY_IS_SET: ${!!i}`);return A.createBrowserClient(e,i)};async function S(e,i){const{data:a,error:s}=await e.from("profiles").select("id, full_name, avatar_url, role, updated_at, website").eq("id",i).single();return s||!a?null:a}async function U(){const e=g(),{data:i,error:a}=await e.from("languages").select("id, code, name, is_default, is_active, created_at, updated_at").order("name",{ascending:!0});return a?[]:i||[]}const v={public:{Enums:{menu_location:["HEADER","FOOTER","SIDEBAR"],page_status:["draft","published","archived"],revision_type:["snapshot","diff"],user_role:["ADMIN","WRITER","USER"]}}};async function R(e,i){const a=m.createClient(),{data:{user:s},error:_}=await a.auth.getUser();if(_||!s)return i?{error:"User not authenticated for media record."}:c.encodedRedirect("error","/cms/media","User not authenticated for media record.");const{data:l}=await a.from("profiles").select("role").eq("id",s.id).single();if(!l||!["ADMIN","WRITER"].includes(l.role))return i?{error:"Forbidden: Insufficient permissions to record media."}:c.encodedRedirect("error","/cms/media","Forbidden: Insufficient permissions to record media.");let t=e.r2Variants.find(r=>r.variantLabel==="original_avif")||e.r2Variants.find(r=>r.variantLabel==="xlarge_avif")||e.r2Variants[0]||e.originalImageDetails;t||(t=e.originalImageDetails||{objectKey:e.r2OriginalKey,url:"",width:0,height:0,fileType:"application/octet-stream",sizeBytes:0,variantLabel:"fallback_original"});const p=[...e.originalImageDetails&&e.originalImageDetails.objectKey!==t.objectKey?[e.originalImageDetails]:[],...e.r2Variants].filter((r,n,d)=>n===d.findIndex(u=>u.objectKey===r.objectKey)),b=r=>{const n=r.lastIndexOf(".");return(n>0?r.substring(0,n):r).replace(/[-+_\\]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w+/g,f=>f.charAt(0).toUpperCase()+f.slice(1))},h=e.description??(t.fileType?.startsWith("image/")||e.originalImageDetails?.fileType?.startsWith("image/")?b(e.fileName):null),E={uploader_id:s.id,file_name:e.fileName,object_key:t.objectKey,file_path:t.objectKey,folder:(()=>{const r=t.objectKey.match(/^(.*\/)?.*$/);return r&&r[1]?r[1]:null})(),file_type:t.fileType,size_bytes:t.sizeBytes,description:h,width:t.width,height:t.height,variants:p,blur_data_url:e.blurDataUrl||null},{data:I,error:o}=await a.from("media").insert(E).select().single();if(o)return console.error("Error recording media upload:",o),i?{error:`Failed to record media: ${o.message}`}:c.encodedRedirect("error","/cms/media",`Failed to record media: ${o.message}`);if(m.cacheExports.revalidatePath("/cms/media"),i)return{success:!0,data:I};c.encodedRedirect("success","/cms/media","Media recorded successfully.")}exports.Constants=v;exports.createClient=g;exports.getActiveLanguagesClientSide=U;exports.getProfileWithRoleClientSide=S;exports.recordMediaUpload=R;
|
package/index.es.js
CHANGED
|
@@ -1,61 +1,21 @@
|
|
|
1
|
-
import { createBrowserClient as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
const e = process.env.NEXT_PUBLIC_SUPABASE_URL,
|
|
6
|
-
if (!e || !
|
|
7
|
-
throw new Error(
|
|
8
|
-
|
|
9
|
-
);
|
|
10
|
-
return u(e, r);
|
|
1
|
+
import { createBrowserClient as E } from "@supabase/ssr";
|
|
2
|
+
import { c as I, a as A } from "./cache-D0Q6YeSV.mjs";
|
|
3
|
+
import { encodedRedirect as c } from "@nextblock-cms/utils/server";
|
|
4
|
+
const U = () => {
|
|
5
|
+
const e = process.env.NEXT_PUBLIC_SUPABASE_URL, i = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;
|
|
6
|
+
if (!e || !i)
|
|
7
|
+
throw new Error(`CRITICAL: Supabase URL or Anon Key is missing. Please ensure NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY are set in your production environment. URL_IS_SET: ${!!e}, ANON_KEY_IS_SET: ${!!i}`);
|
|
8
|
+
return E(e, i);
|
|
11
9
|
};
|
|
12
|
-
async function
|
|
13
|
-
const { data:
|
|
14
|
-
return s || !
|
|
10
|
+
async function T(e, i) {
|
|
11
|
+
const { data: a, error: s } = await e.from("profiles").select("id, full_name, avatar_url, role, updated_at, website").eq("id", i).single();
|
|
12
|
+
return s || !a ? null : a;
|
|
15
13
|
}
|
|
16
|
-
async function
|
|
17
|
-
const e =
|
|
18
|
-
return
|
|
14
|
+
async function K() {
|
|
15
|
+
const e = U(), { data: i, error: a } = await e.from("languages").select("id, code, name, is_default, is_active, created_at, updated_at").order("name", { ascending: !0 });
|
|
16
|
+
return a ? [] : i || [];
|
|
19
17
|
}
|
|
20
|
-
const
|
|
21
|
-
try {
|
|
22
|
-
let r = n.next({
|
|
23
|
-
request: {
|
|
24
|
-
headers: e.headers
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
const t = process.env.NEXT_PUBLIC_SUPABASE_URL, s = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;
|
|
28
|
-
if (!t || !s)
|
|
29
|
-
throw new Error("Missing Supabase environment variables");
|
|
30
|
-
const i = await _(
|
|
31
|
-
t,
|
|
32
|
-
s,
|
|
33
|
-
{
|
|
34
|
-
cookies: {
|
|
35
|
-
getAll() {
|
|
36
|
-
return e.cookies.getAll();
|
|
37
|
-
},
|
|
38
|
-
setAll(c) {
|
|
39
|
-
c.forEach(
|
|
40
|
-
({ name: a, value: o }) => e.cookies.set(a, o)
|
|
41
|
-
), r = n.next({
|
|
42
|
-
request: e
|
|
43
|
-
}), c.forEach(
|
|
44
|
-
({ name: a, value: o, options: l }) => r.cookies.set(a, o, l)
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
).auth.getUser();
|
|
50
|
-
return e.nextUrl.pathname.startsWith("/protected") && i.error ? n.redirect(new URL("/sign-in", e.url)) : e.nextUrl.pathname === "/" && !i.error ? n.redirect(new URL("/protected", e.url)) : r;
|
|
51
|
-
} catch {
|
|
52
|
-
return n.next({
|
|
53
|
-
request: {
|
|
54
|
-
headers: e.headers
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}, g = {
|
|
18
|
+
const N = {
|
|
59
19
|
public: {
|
|
60
20
|
Enums: {
|
|
61
21
|
menu_location: ["HEADER", "FOOTER", "SIDEBAR"],
|
|
@@ -65,11 +25,56 @@ const f = async (e) => {
|
|
|
65
25
|
}
|
|
66
26
|
}
|
|
67
27
|
};
|
|
28
|
+
async function w(e, i) {
|
|
29
|
+
const a = I(), { data: { user: s }, error: m } = await a.auth.getUser();
|
|
30
|
+
if (m || !s)
|
|
31
|
+
return i ? { error: "User not authenticated for media record." } : c("error", "/cms/media", "User not authenticated for media record.");
|
|
32
|
+
const { data: l } = await a.from("profiles").select("role").eq("id", s.id).single();
|
|
33
|
+
if (!l || !["ADMIN", "WRITER"].includes(l.role))
|
|
34
|
+
return i ? { error: "Forbidden: Insufficient permissions to record media." } : c("error", "/cms/media", "Forbidden: Insufficient permissions to record media.");
|
|
35
|
+
let t = e.r2Variants.find((r) => r.variantLabel === "original_avif") || e.r2Variants.find((r) => r.variantLabel === "xlarge_avif") || e.r2Variants[0] || e.originalImageDetails;
|
|
36
|
+
t || (t = e.originalImageDetails || {
|
|
37
|
+
objectKey: e.r2OriginalKey,
|
|
38
|
+
url: "",
|
|
39
|
+
width: 0,
|
|
40
|
+
height: 0,
|
|
41
|
+
fileType: "application/octet-stream",
|
|
42
|
+
sizeBytes: 0,
|
|
43
|
+
variantLabel: "fallback_original"
|
|
44
|
+
});
|
|
45
|
+
const _ = [
|
|
46
|
+
...e.originalImageDetails && e.originalImageDetails.objectKey !== t.objectKey ? [e.originalImageDetails] : [],
|
|
47
|
+
...e.r2Variants
|
|
48
|
+
].filter((r, n, d) => n === d.findIndex((u) => u.objectKey === r.objectKey)), g = (r) => {
|
|
49
|
+
const n = r.lastIndexOf(".");
|
|
50
|
+
return (n > 0 ? r.substring(0, n) : r).replace(/[-+_\\]+/g, " ").replace(/\s+/g, " ").trim().replace(/\b\w+/g, (f) => f.charAt(0).toUpperCase() + f.slice(1));
|
|
51
|
+
}, p = e.description ?? (t.fileType?.startsWith("image/") || e.originalImageDetails?.fileType?.startsWith("image/") ? g(e.fileName) : null), b = {
|
|
52
|
+
uploader_id: s.id,
|
|
53
|
+
file_name: e.fileName,
|
|
54
|
+
object_key: t.objectKey,
|
|
55
|
+
file_path: t.objectKey,
|
|
56
|
+
folder: (() => {
|
|
57
|
+
const r = t.objectKey.match(/^(.*\/)?.*$/);
|
|
58
|
+
return r && r[1] ? r[1] : null;
|
|
59
|
+
})(),
|
|
60
|
+
file_type: t.fileType,
|
|
61
|
+
size_bytes: t.sizeBytes,
|
|
62
|
+
description: p,
|
|
63
|
+
width: t.width,
|
|
64
|
+
height: t.height,
|
|
65
|
+
variants: _,
|
|
66
|
+
blur_data_url: e.blurDataUrl || null
|
|
67
|
+
}, { data: h, error: o } = await a.from("media").insert(b).select().single();
|
|
68
|
+
if (o)
|
|
69
|
+
return console.error("Error recording media upload:", o), i ? { error: `Failed to record media: ${o.message}` } : c("error", "/cms/media", `Failed to record media: ${o.message}`);
|
|
70
|
+
if (A.revalidatePath("/cms/media"), i)
|
|
71
|
+
return { success: !0, data: h };
|
|
72
|
+
c("success", "/cms/media", "Media recorded successfully.");
|
|
73
|
+
}
|
|
68
74
|
export {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
f as updateSession
|
|
75
|
+
N as Constants,
|
|
76
|
+
U as createClient,
|
|
77
|
+
K as getActiveLanguagesClientSide,
|
|
78
|
+
T as getProfileWithRoleClientSide,
|
|
79
|
+
w as recordMediaUpload
|
|
75
80
|
};
|
package/package.json
CHANGED
package/server.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./cache-Bb4TkKGq.js"),o=require("@supabase/supabase-js"),u=()=>{const e=process.env.NEXT_PUBLIC_SUPABASE_URL||"https://dummy.supabase.co",r=process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY||"dummy-key";return(!process.env.NEXT_PUBLIC_SUPABASE_URL||!process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY)&&console.warn("Supabase URL or Anon Key is missing for SSG client. Returning dummy client to prevent build crash."),o.createClient(e,r)};var S={},i;function l(){if(i)return S;throw i=1,new Error("This module cannot be imported from a Client Component module. It should only be used from a Server Component.")}l();async function a(e,r){try{const{data:t,error:s}=await r.from("package_activations").select("status").eq("package_id",e).single();return s||!t?!1:t.status==="active"}catch(t){return console.error(`Error verifying package ${e}:`,t),!1}}const v=n.cacheExports.unstable_cache(async e=>{const r=process.env.NEXT_PUBLIC_SUPABASE_URL,t=process.env.SUPABASE_SERVICE_ROLE_KEY||process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;if(!r||!t)return!1;const s=o.createClient(r,t,{auth:{persistSession:!1,autoRefreshToken:!1,detectSessionInUrl:!1}});return a(e,s)},["package-activation"],{revalidate:60});async function _(e,r){if(r)return a(e,r);const t=process.env.NEXT_PUBLIC_SUPABASE_URL,s=process.env.SUPABASE_SERVICE_ROLE_KEY||process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;if(t&&s)return v(e);const c=await n.createClient();return a(e,c)}exports.createClient=n.createClient;exports.getActiveLanguagesServerSide=n.getActiveLanguagesServerSide;exports.getProfileWithRoleServerSide=n.getProfileWithRoleServerSide;exports.getServiceRoleSupabaseClient=n.getServiceRoleSupabaseClient;exports.getSsgSupabaseClient=u;exports.verifyPackageOnline=_;
|
package/server.es.js
CHANGED
|
@@ -1,48 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const c = () => {
|
|
8
|
-
const r = process.env.NEXT_PUBLIC_SUPABASE_URL, t = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;
|
|
9
|
-
if (!r || !t)
|
|
10
|
-
throw new Error("Missing Supabase environment variables");
|
|
11
|
-
return l(
|
|
12
|
-
r,
|
|
13
|
-
t,
|
|
14
|
-
{
|
|
15
|
-
cookies: {
|
|
16
|
-
getAll: async () => {
|
|
17
|
-
try {
|
|
18
|
-
return (await i()).getAll();
|
|
19
|
-
} catch {
|
|
20
|
-
return [];
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
setAll: async (e) => {
|
|
24
|
-
try {
|
|
25
|
-
const o = await i();
|
|
26
|
-
for (const { name: s, value: a, options: n } of e)
|
|
27
|
-
a && a.length > 0 ? o.set({ name: s, value: a, ...n }) : n && Object.keys(n).length > 0 ? o.delete({ name: s, ...n }) : o.delete(s);
|
|
28
|
-
} catch {
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
);
|
|
1
|
+
import { a as i, c as u } from "./cache-D0Q6YeSV.mjs";
|
|
2
|
+
import { g as P, b as y, d as m } from "./cache-D0Q6YeSV.mjs";
|
|
3
|
+
import { createClient as o } from "@supabase/supabase-js";
|
|
4
|
+
const p = () => {
|
|
5
|
+
const e = process.env.NEXT_PUBLIC_SUPABASE_URL || "https://dummy.supabase.co", r = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY || "dummy-key";
|
|
6
|
+
return (!process.env.NEXT_PUBLIC_SUPABASE_URL || !process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY) && console.warn("Supabase URL or Anon Key is missing for SSG client. Returning dummy client to prevent build crash."), o(e, r);
|
|
34
7
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
8
|
+
var S = {}, a;
|
|
9
|
+
function _() {
|
|
10
|
+
if (a) return S;
|
|
11
|
+
throw a = 1, new Error(
|
|
12
|
+
"This module cannot be imported from a Client Component module. It should only be used from a Server Component."
|
|
13
|
+
);
|
|
38
14
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
15
|
+
_();
|
|
16
|
+
async function t(e, r) {
|
|
17
|
+
try {
|
|
18
|
+
const { data: s, error: n } = await r.from("package_activations").select("status").eq("package_id", e).single();
|
|
19
|
+
return n || !s ? !1 : s.status === "active";
|
|
20
|
+
} catch (s) {
|
|
21
|
+
return console.error(`Error verifying package ${e}:`, s), !1;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const l = i.unstable_cache(async (e) => {
|
|
25
|
+
const r = process.env.NEXT_PUBLIC_SUPABASE_URL, s = process.env.SUPABASE_SERVICE_ROLE_KEY || process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;
|
|
26
|
+
if (!r || !s)
|
|
27
|
+
return !1;
|
|
28
|
+
const n = o(r, s, {
|
|
29
|
+
auth: {
|
|
30
|
+
persistSession: !1,
|
|
31
|
+
autoRefreshToken: !1,
|
|
32
|
+
detectSessionInUrl: !1
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return t(e, n);
|
|
36
|
+
}, ["package-activation"], { revalidate: 60 });
|
|
37
|
+
async function f(e, r) {
|
|
38
|
+
if (r)
|
|
39
|
+
return t(e, r);
|
|
40
|
+
const s = process.env.NEXT_PUBLIC_SUPABASE_URL, n = process.env.SUPABASE_SERVICE_ROLE_KEY || process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;
|
|
41
|
+
if (s && n)
|
|
42
|
+
return l(e);
|
|
43
|
+
const c = await u();
|
|
44
|
+
return t(e, c);
|
|
42
45
|
}
|
|
43
46
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
u as createClient,
|
|
48
|
+
P as getActiveLanguagesServerSide,
|
|
49
|
+
y as getProfileWithRoleServerSide,
|
|
50
|
+
m as getServiceRoleSupabaseClient,
|
|
51
|
+
p as getSsgSupabaseClient,
|
|
52
|
+
f as verifyPackageOnline
|
|
48
53
|
};
|