CoolFace
Apppublic

AK-21/Graphite-Industrial-Intelligence

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
rls.cjs76 linesDownload Raw Back to supabase
1"use strict";2var __defProp = Object.defineProperty;3var __getOwnPropDesc = Object.getOwnPropertyDescriptor;4var __getOwnPropNames = Object.getOwnPropertyNames;5var __hasOwnProp = Object.prototype.hasOwnProperty;6var __export = (target, all) => {7  for (var name in all)8    __defProp(target, name, { get: all[name], enumerable: true });9};10var __copyProps = (to, from, except, desc) => {11  if (from && typeof from === "object" || typeof from === "function") {12    for (let key of __getOwnPropNames(from))13      if (!__hasOwnProp.call(to, key) && key !== except)14        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });15  }16  return to;17};18var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);19var rls_exports = {};20__export(rls_exports, {21  anonRole: () => anonRole,22  authUid: () => authUid,23  authUsers: () => authUsers,24  authenticatedRole: () => authenticatedRole,25  postgresRole: () => postgresRole,26  realtimeMessages: () => realtimeMessages,27  realtimeTopic: () => realtimeTopic,28  serviceRole: () => serviceRole,29  supabaseAuthAdminRole: () => supabaseAuthAdminRole30});31module.exports = __toCommonJS(rls_exports);32var import_pg_core = require("../pg-core/index.cjs");33var import_roles = require("../pg-core/roles.cjs");34var import_sql = require("../sql/sql.cjs");35const anonRole = (0, import_roles.pgRole)("anon").existing();36const authenticatedRole = (0, import_roles.pgRole)("authenticated").existing();37const serviceRole = (0, import_roles.pgRole)("service_role").existing();38const postgresRole = (0, import_roles.pgRole)("postgres_role").existing();39const supabaseAuthAdminRole = (0, import_roles.pgRole)("supabase_auth_admin").existing();40const auth = (0, import_pg_core.pgSchema)("auth");41const authUsers = auth.table("users", {42  id: (0, import_pg_core.uuid)().primaryKey().notNull(),43  email: (0, import_pg_core.varchar)({ length: 255 }),44  phone: (0, import_pg_core.text)().unique(),45  emailConfirmedAt: (0, import_pg_core.timestamp)("email_confirmed_at", { withTimezone: true }),46  phoneConfirmedAt: (0, import_pg_core.timestamp)("phone_confirmed_at", { withTimezone: true }),47  lastSignInAt: (0, import_pg_core.timestamp)("last_sign_in_at", { withTimezone: true }),48  createdAt: (0, import_pg_core.timestamp)("created_at", { withTimezone: true }),49  updatedAt: (0, import_pg_core.timestamp)("updated_at", { withTimezone: true })50});51const realtime = (0, import_pg_core.pgSchema)("realtime");52const realtimeMessages = realtime.table(53  "messages",54  {55    id: (0, import_pg_core.bigserial)({ mode: "bigint" }).primaryKey(),56    topic: (0, import_pg_core.text)().notNull(),57    extension: (0, import_pg_core.text)({58      enum: ["presence", "broadcast", "postgres_changes"]59    }).notNull()60  }61);62const authUid = import_sql.sql`(select auth.uid())`;63const realtimeTopic = import_sql.sql`realtime.topic()`;64// Annotate the CommonJS export names for ESM import in node:650 && (module.exports = {66  anonRole,67  authUid,68  authUsers,69  authenticatedRole,70  postgresRole,71  realtimeMessages,72  realtimeTopic,73  serviceRole,74  supabaseAuthAdminRole75});76//# sourceMappingURL=rls.cjs.map