@hot-updater/supabase 0.5.10 → 0.6.1-rc.0

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/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import * as __WEBPACK_EXTERNAL_MODULE__supabase_supabase_js__ from "@supabase/supabase-js";
1
+ import * as __WEBPACK_EXTERNAL_MODULE__supabase_supabase_js_06b6e9fe__ from "@supabase/supabase-js";
2
2
  import * as __WEBPACK_EXTERNAL_MODULE_path__ from "path";
3
- import * as __WEBPACK_EXTERNAL_MODULE_fs_promises__ from "fs/promises";
3
+ import * as __WEBPACK_EXTERNAL_MODULE_fs_promises_400951f8__ from "fs/promises";
4
4
  const supabaseDatabase = (config, hooks)=>(_)=>{
5
- const supabase = (0, __WEBPACK_EXTERNAL_MODULE__supabase_supabase_js__.createClient)(config.supabaseUrl, config.supabaseAnonKey);
5
+ const supabase = (0, __WEBPACK_EXTERNAL_MODULE__supabase_supabase_js_06b6e9fe__.createClient)(config.supabaseUrl, config.supabaseAnonKey);
6
6
  let bundles = [];
7
7
  return {
8
8
  name: "supabaseDatabase",
@@ -3375,7 +3375,7 @@ _Mime_extensionToType = new WeakMap(), _Mime_typeToExtension = new WeakMap(), _M
3375
3375
  const src_Mime = Mime;
3376
3376
  const src = new src_Mime(standard, other)._freeze();
3377
3377
  const supabaseStorage = (config, hooks)=>(_)=>{
3378
- const supabase = (0, __WEBPACK_EXTERNAL_MODULE__supabase_supabase_js__.createClient)(config.supabaseUrl, config.supabaseAnonKey);
3378
+ const supabase = (0, __WEBPACK_EXTERNAL_MODULE__supabase_supabase_js_06b6e9fe__.createClient)(config.supabaseUrl, config.supabaseAnonKey);
3379
3379
  const bucket = supabase.storage.from(config.bucketName);
3380
3380
  return {
3381
3381
  name: "supabaseStorage",
@@ -3389,7 +3389,7 @@ const supabaseStorage = (config, hooks)=>(_)=>{
3389
3389
  return Key;
3390
3390
  },
3391
3391
  async uploadBundle (bundleId, bundlePath) {
3392
- const Body = await __WEBPACK_EXTERNAL_MODULE_fs_promises__["default"].readFile(bundlePath);
3392
+ const Body = await __WEBPACK_EXTERNAL_MODULE_fs_promises_400951f8__["default"].readFile(bundlePath);
3393
3393
  const ContentType = src.getType(bundlePath) ?? void 0;
3394
3394
  const filename = __WEBPACK_EXTERNAL_MODULE_path__["default"].basename(bundlePath);
3395
3395
  const Key = [
@@ -3410,7 +3410,7 @@ const supabaseStorage = (config, hooks)=>(_)=>{
3410
3410
  };
3411
3411
  };
3412
3412
  const supabaseApi = (supabaseUrl, supabaseAnonKey)=>{
3413
- const supabase = (0, __WEBPACK_EXTERNAL_MODULE__supabase_supabase_js__.createClient)(supabaseUrl, supabaseAnonKey);
3413
+ const supabase = (0, __WEBPACK_EXTERNAL_MODULE__supabase_supabase_js_06b6e9fe__.createClient)(supabaseUrl, supabaseAnonKey);
3414
3414
  return {
3415
3415
  listBuckets: async ()=>{
3416
3416
  const { data, error } = await supabase.storage.listBuckets();
package/dist/types.d.ts CHANGED
@@ -1,16 +1,11 @@
1
- import type { Bundle } from "@hot-updater/core";
2
- type SnakeCase<S extends string> = S extends `${infer T}${infer U}` ? `${T extends Capitalize<T> ? "_" : ""}${Lowercase<T>}${SnakeCase<U>}` : S;
3
- type SnakeKeyObject<T> = T extends Record<string, any> ? {
4
- [K in keyof T as SnakeCase<Extract<K, string>>]: T[K] extends object ? SnakeKeyObject<T[K]> : T[K];
5
- } : T;
6
- export type BundlesTable = SnakeKeyObject<Bundle>;
1
+ import type { SnakeCaseBundle } from "@hot-updater/core";
7
2
  export type Database = {
8
3
  public: {
9
4
  Tables: {
10
5
  bundles: {
11
- Row: BundlesTable;
12
- Insert: BundlesTable;
13
- Update: BundlesTable;
6
+ Row: SnakeCaseBundle;
7
+ Insert: SnakeCaseBundle;
8
+ Update: SnakeCaseBundle;
14
9
  Relationships: [];
15
10
  };
16
11
  };
@@ -20,4 +15,3 @@ export type Database = {
20
15
  Functions: any;
21
16
  };
22
17
  };
23
- export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hot-updater/supabase",
3
3
  "type": "module",
4
- "version": "0.5.10",
4
+ "version": "0.6.1-rc.0",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "main": "dist/index.cjs",
7
7
  "module": "dist/index.js",
@@ -31,10 +31,10 @@
31
31
  "dependencies": {
32
32
  "@hot-updater/core": "0.5.10",
33
33
  "@hot-updater/plugin-core": "0.5.10",
34
- "@supabase/supabase-js": "^2.47.10",
35
- "picocolors": "^1.0.0"
34
+ "@supabase/supabase-js": "^2.47.10"
36
35
  },
37
36
  "devDependencies": {
37
+ "picocolors": "^1.0.0",
38
38
  "@hot-updater/postgres": "0.5.10",
39
39
  "dayjs": "^1.11.13",
40
40
  "mime": "^4.0.4"
@@ -2,7 +2,6 @@ import "jsr:@supabase/functions-js/edge-runtime.d.ts";
2
2
  import camelcaseKeys from "npm:camelcase-keys@9.1.3";
3
3
  import { createClient } from "jsr:@supabase/supabase-js@2.47.10";
4
4
 
5
- // 에러 응답 생성 함수
6
5
  const createErrorResponse = (message: string, statusCode: number) => {
7
6
  return new Response(JSON.stringify({ code: statusCode, message }), {
8
7
  headers: { "Content-Type": "application/json" },
@@ -12,7 +11,6 @@ const createErrorResponse = (message: string, statusCode: number) => {
12
11
 
13
12
  Deno.serve(async (req) => {
14
13
  try {
15
- // Supabase 클라이언트 초기화
16
14
  const supabase = createClient(
17
15
  Deno.env.get("SUPABASE_URL") ?? "",
18
16
  Deno.env.get("SUPABASE_ANON_KEY") ?? "",
@@ -23,12 +21,10 @@ Deno.serve(async (req) => {
23
21
  },
24
22
  );
25
23
 
26
- // 요청 헤더에서 필요한 정보 추출
27
24
  const bundleId = req.headers.get("x-bundle-id") as string;
28
25
  const appPlatform = req.headers.get("x-app-platform") as "ios" | "android";
29
26
  const appVersion = req.headers.get("x-app-version") as string;
30
27
 
31
- // 필수 헤더 검증
32
28
  if (!bundleId || !appPlatform || !appVersion) {
33
29
  return createErrorResponse(
34
30
  "Missing bundleId, appPlatform, or appVersion",