@fctc/interface-logic 4.6.2 → 4.6.3
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/dist/provider.d.mts +2 -2
- package/dist/provider.d.ts +2 -2
- package/dist/provider.js +6 -4
- package/dist/provider.mjs +6 -4
- package/package.json +1 -1
package/dist/provider.d.mts
CHANGED
|
@@ -205,10 +205,10 @@ declare const MetaProvider: ({ children }: MetaProviderProps) => react_jsx_runti
|
|
|
205
205
|
type SupabaseProviderProps = {
|
|
206
206
|
supabaseUrl: string;
|
|
207
207
|
supabaseKey: string;
|
|
208
|
-
|
|
208
|
+
tenantId: string;
|
|
209
209
|
children: React$1.ReactNode;
|
|
210
210
|
};
|
|
211
|
-
declare const SupabaseProvider: ({ supabaseUrl, supabaseKey,
|
|
211
|
+
declare const SupabaseProvider: ({ supabaseUrl, supabaseKey, tenantId, children, }: SupabaseProviderProps) => react_jsx_runtime.JSX.Element;
|
|
212
212
|
declare const useSupabase: () => SupabaseClient<any, any, any, any, any>;
|
|
213
213
|
|
|
214
214
|
export { EnvProvider, MainProvider, MetaProvider, ReactQueryProvider, ServiceProvider, SupabaseProvider, VersionGate, useEnv, useService, useSupabase };
|
package/dist/provider.d.ts
CHANGED
|
@@ -205,10 +205,10 @@ declare const MetaProvider: ({ children }: MetaProviderProps) => react_jsx_runti
|
|
|
205
205
|
type SupabaseProviderProps = {
|
|
206
206
|
supabaseUrl: string;
|
|
207
207
|
supabaseKey: string;
|
|
208
|
-
|
|
208
|
+
tenantId: string;
|
|
209
209
|
children: React$1.ReactNode;
|
|
210
210
|
};
|
|
211
|
-
declare const SupabaseProvider: ({ supabaseUrl, supabaseKey,
|
|
211
|
+
declare const SupabaseProvider: ({ supabaseUrl, supabaseKey, tenantId, children, }: SupabaseProviderProps) => react_jsx_runtime.JSX.Element;
|
|
212
212
|
declare const useSupabase: () => SupabaseClient<any, any, any, any, any>;
|
|
213
213
|
|
|
214
214
|
export { EnvProvider, MainProvider, MetaProvider, ReactQueryProvider, ServiceProvider, SupabaseProvider, VersionGate, useEnv, useService, useSupabase };
|
package/dist/provider.js
CHANGED
|
@@ -3298,17 +3298,19 @@ var SupabaseContext = (0, import_react4.createContext)(null);
|
|
|
3298
3298
|
var SupabaseProvider = ({
|
|
3299
3299
|
supabaseUrl,
|
|
3300
3300
|
supabaseKey,
|
|
3301
|
-
|
|
3301
|
+
tenantId,
|
|
3302
3302
|
children
|
|
3303
3303
|
}) => {
|
|
3304
3304
|
const supabase = (0, import_react4.useMemo)(() => {
|
|
3305
3305
|
if (!supabaseUrl || !supabaseKey) return null;
|
|
3306
3306
|
return (0, import_supabase_js.createClient)(supabaseUrl, supabaseKey, {
|
|
3307
|
-
|
|
3308
|
-
|
|
3307
|
+
global: {
|
|
3308
|
+
headers: {
|
|
3309
|
+
"X-Tenant-ID": tenantId
|
|
3310
|
+
}
|
|
3309
3311
|
}
|
|
3310
3312
|
});
|
|
3311
|
-
}, [supabaseUrl, supabaseKey
|
|
3313
|
+
}, [supabaseUrl, supabaseKey]);
|
|
3312
3314
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SupabaseContext.Provider, { value: supabase, children });
|
|
3313
3315
|
};
|
|
3314
3316
|
var useSupabase = () => {
|
package/dist/provider.mjs
CHANGED
|
@@ -3253,17 +3253,19 @@ var SupabaseContext = createContext(null);
|
|
|
3253
3253
|
var SupabaseProvider = ({
|
|
3254
3254
|
supabaseUrl,
|
|
3255
3255
|
supabaseKey,
|
|
3256
|
-
|
|
3256
|
+
tenantId,
|
|
3257
3257
|
children
|
|
3258
3258
|
}) => {
|
|
3259
3259
|
const supabase = useMemo(() => {
|
|
3260
3260
|
if (!supabaseUrl || !supabaseKey) return null;
|
|
3261
3261
|
return createClient(supabaseUrl, supabaseKey, {
|
|
3262
|
-
|
|
3263
|
-
|
|
3262
|
+
global: {
|
|
3263
|
+
headers: {
|
|
3264
|
+
"X-Tenant-ID": tenantId
|
|
3265
|
+
}
|
|
3264
3266
|
}
|
|
3265
3267
|
});
|
|
3266
|
-
}, [supabaseUrl, supabaseKey
|
|
3268
|
+
}, [supabaseUrl, supabaseKey]);
|
|
3267
3269
|
return /* @__PURE__ */ jsx4(SupabaseContext.Provider, { value: supabase, children });
|
|
3268
3270
|
};
|
|
3269
3271
|
var useSupabase = () => {
|