@hot-updater/supabase 1.0.0-rc.45 → 1.0.0-rc.47

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/edge.cjs CHANGED
@@ -1,7 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_supabaseStorage = require("./supabaseStorage-DAl3pyb7.cjs");
3
- //#region src/supabaseEdgeFunctionStorage.ts
4
- const supabaseEdgeFunctionStorage = (config) => require_supabaseStorage.supabaseStorage(config);
5
- //#endregion
6
3
  exports.supabaseDatabase = require_supabaseStorage.supabaseDatabase;
7
- exports.supabaseStorage = supabaseEdgeFunctionStorage;
4
+ exports.supabaseStorage = require_supabaseStorage.supabaseStorage;
package/dist/edge.d.cts CHANGED
@@ -1,13 +1,2 @@
1
- import { n as supabaseDatabase, t as SupabaseDatabaseConfig } from "./supabaseDatabase-DGm2NBGf.cjs";
2
- import { StorageAdapterWith } from "@hot-updater/plugin-core";
3
- //#region src/supabaseEdgeFunctionStorage.d.ts
4
- interface SupabaseEdgeFunctionStorageConfig {
5
- supabaseUrl: string;
6
- supabaseServiceRoleKey: string;
7
- bucketName: string;
8
- basePath?: string;
9
- signedUrlExpiresIn?: number;
10
- }
11
- declare const supabaseEdgeFunctionStorage: (config: SupabaseEdgeFunctionStorageConfig) => StorageAdapterWith<"put" | "get" | "getDownloadUrl" | "exists" | "delete">;
12
- //#endregion
13
- export { type SupabaseDatabaseConfig, type SupabaseEdgeFunctionStorageConfig as SupabaseStorageConfig, supabaseDatabase, supabaseEdgeFunctionStorage as supabaseStorage };
1
+ import { i as supabaseDatabase, n as supabaseStorage, r as SupabaseDatabaseConfig, t as SupabaseStorageConfig } from "./supabaseStorage-BryXQ72m.cjs";
2
+ export { type SupabaseDatabaseConfig, type SupabaseStorageConfig, supabaseDatabase, supabaseStorage };
package/dist/edge.d.mts CHANGED
@@ -1,13 +1,2 @@
1
- import { n as supabaseDatabase, t as SupabaseDatabaseConfig } from "./supabaseDatabase-DGm2NBGf.mjs";
2
- import { StorageAdapterWith } from "@hot-updater/plugin-core";
3
- //#region src/supabaseEdgeFunctionStorage.d.ts
4
- interface SupabaseEdgeFunctionStorageConfig {
5
- supabaseUrl: string;
6
- supabaseServiceRoleKey: string;
7
- bucketName: string;
8
- basePath?: string;
9
- signedUrlExpiresIn?: number;
10
- }
11
- declare const supabaseEdgeFunctionStorage: (config: SupabaseEdgeFunctionStorageConfig) => StorageAdapterWith<"put" | "get" | "getDownloadUrl" | "exists" | "delete">;
12
- //#endregion
13
- export { type SupabaseDatabaseConfig, type SupabaseEdgeFunctionStorageConfig as SupabaseStorageConfig, supabaseDatabase, supabaseEdgeFunctionStorage as supabaseStorage };
1
+ import { i as supabaseDatabase, n as supabaseStorage, r as SupabaseDatabaseConfig, t as SupabaseStorageConfig } from "./supabaseStorage-BryXQ72m.mjs";
2
+ export { type SupabaseDatabaseConfig, type SupabaseStorageConfig, supabaseDatabase, supabaseStorage };
package/dist/edge.mjs CHANGED
@@ -1,5 +1,2 @@
1
1
  import { n as supabaseDatabase, t as supabaseStorage } from "./supabaseStorage-C8xQ3nyM.mjs";
2
- //#region src/supabaseEdgeFunctionStorage.ts
3
- const supabaseEdgeFunctionStorage = (config) => supabaseStorage(config);
4
- //#endregion
5
- export { supabaseDatabase, supabaseEdgeFunctionStorage as supabaseStorage };
2
+ export { supabaseDatabase, supabaseStorage };
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { r as SupabaseServiceRoleConfig, t as SupabaseDatabaseConfig } from "./supabaseDatabase-DGm2NBGf.cjs";
2
- import { StorageAdapterWith, ToolingDatabase } from "@hot-updater/plugin-core";
1
+ import { n as supabaseStorage, r as SupabaseDatabaseConfig, t as SupabaseStorageConfig } from "./supabaseStorage-BryXQ72m.cjs";
2
+ import { ToolingDatabase } from "@hot-updater/plugin-core";
3
3
  //#region src/supabaseMigration.d.ts
4
4
  /**
5
5
  * Hot Updater's database on Supabase, with the migration `hot-updater db
@@ -9,14 +9,4 @@ import { StorageAdapterWith, ToolingDatabase } from "@hot-updater/plugin-core";
9
9
  */
10
10
  declare const supabaseDatabase: (config: SupabaseDatabaseConfig) => ToolingDatabase;
11
11
  //#endregion
12
- //#region src/supabaseStorage.d.ts
13
- type SupabaseStorageConfig = SupabaseServiceRoleConfig & {
14
- bucketName: string;
15
- /** Base path where bundles will be stored in the bucket. */
16
- basePath?: string;
17
- /** Signed download URL lifetime in seconds. @default 3600 */
18
- signedUrlExpiresIn?: number;
19
- };
20
- declare const supabaseStorage: (config: SupabaseStorageConfig) => StorageAdapterWith<"put" | "get" | "getDownloadUrl" | "exists" | "delete">;
21
- //#endregion
22
12
  export { type SupabaseDatabaseConfig, SupabaseStorageConfig, supabaseDatabase, supabaseStorage };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { r as SupabaseServiceRoleConfig, t as SupabaseDatabaseConfig } from "./supabaseDatabase-DGm2NBGf.mjs";
2
- import { StorageAdapterWith, ToolingDatabase } from "@hot-updater/plugin-core";
1
+ import { n as supabaseStorage, r as SupabaseDatabaseConfig, t as SupabaseStorageConfig } from "./supabaseStorage-BryXQ72m.mjs";
2
+ import { ToolingDatabase } from "@hot-updater/plugin-core";
3
3
  //#region src/supabaseMigration.d.ts
4
4
  /**
5
5
  * Hot Updater's database on Supabase, with the migration `hot-updater db
@@ -9,14 +9,4 @@ import { StorageAdapterWith, ToolingDatabase } from "@hot-updater/plugin-core";
9
9
  */
10
10
  declare const supabaseDatabase: (config: SupabaseDatabaseConfig) => ToolingDatabase;
11
11
  //#endregion
12
- //#region src/supabaseStorage.d.ts
13
- type SupabaseStorageConfig = SupabaseServiceRoleConfig & {
14
- bucketName: string;
15
- /** Base path where bundles will be stored in the bucket. */
16
- basePath?: string;
17
- /** Signed download URL lifetime in seconds. @default 3600 */
18
- signedUrlExpiresIn?: number;
19
- };
20
- declare const supabaseStorage: (config: SupabaseStorageConfig) => StorageAdapterWith<"put" | "get" | "getDownloadUrl" | "exists" | "delete">;
21
- //#endregion
22
12
  export { type SupabaseDatabaseConfig, SupabaseStorageConfig, supabaseDatabase, supabaseStorage };
@@ -6555,10 +6555,7 @@ const supabaseApi = (supabaseUrl, supabaseServiceRoleKey) => {
6555
6555
  const marker = await supabase.from(SUPABASE_SETTINGS_TABLE).select("value").eq("key", "schema.engine").maybeSingle();
6556
6556
  if (!marker.error) return marker.data?.value === "1" ? "v1" : "incompatible";
6557
6557
  if (!missing(marker.error.code)) throw marker.error;
6558
- const legacy = await supabase.from("hot_updater_v1_private_settings").select("key").limit(1);
6559
- if (!legacy.error) return "incompatible";
6560
- if (missing(legacy.error.code)) return "fresh";
6561
- throw legacy.error;
6558
+ return "fresh";
6562
6559
  },
6563
6560
  listBuckets: async () => {
6564
6561
  const { data, error } = await supabase.storage.listBuckets();
@@ -6550,10 +6550,7 @@ const supabaseApi = (supabaseUrl, supabaseServiceRoleKey) => {
6550
6550
  const marker = await supabase.from(SUPABASE_SETTINGS_TABLE).select("value").eq("key", "schema.engine").maybeSingle();
6551
6551
  if (!marker.error) return marker.data?.value === "1" ? "v1" : "incompatible";
6552
6552
  if (!missing(marker.error.code)) throw marker.error;
6553
- const legacy = await supabase.from("hot_updater_v1_private_settings").select("key").limit(1);
6554
- if (!legacy.error) return "incompatible";
6555
- if (missing(legacy.error.code)) return "fresh";
6556
- throw legacy.error;
6553
+ return "fresh";
6557
6554
  },
6558
6555
  listBuckets: async () => {
6559
6556
  const { data, error } = await supabase.storage.listBuckets();
@@ -0,0 +1,28 @@
1
+ import { EngineDatabase, StorageAdapterWith } from "@hot-updater/plugin-core";
2
+ //#region src/supabaseConfig.d.ts
3
+ type SupabaseServiceRoleConfig = {
4
+ supabaseUrl: string;
5
+ supabaseServiceRoleKey: string;
6
+ };
7
+ //#endregion
8
+ //#region src/supabaseDatabase.d.ts
9
+ type SupabaseDatabaseConfig = SupabaseServiceRoleConfig;
10
+ /**
11
+ * Hot Updater's database on Supabase: the storage engine through the shared
12
+ * SQL core, fenced by the schema settings. Every read and write goes through
13
+ * the service-role-only apply RPC, which runs no DDL, so Supabase migrations
14
+ * create the tables.
15
+ */
16
+ declare const supabaseDatabase: (config: SupabaseDatabaseConfig) => EngineDatabase;
17
+ //#endregion
18
+ //#region src/supabaseStorage.d.ts
19
+ type SupabaseStorageConfig = SupabaseServiceRoleConfig & {
20
+ bucketName: string;
21
+ /** Base path where bundles will be stored in the bucket. */
22
+ basePath?: string;
23
+ /** Signed download URL lifetime in seconds. @default 3600 */
24
+ signedUrlExpiresIn?: number;
25
+ };
26
+ declare const supabaseStorage: (config: SupabaseStorageConfig) => StorageAdapterWith<"put" | "get" | "getDownloadUrl" | "exists" | "delete">;
27
+ //#endregion
28
+ export { supabaseDatabase as i, supabaseStorage as n, SupabaseDatabaseConfig as r, SupabaseStorageConfig as t };
@@ -0,0 +1,28 @@
1
+ import { EngineDatabase, StorageAdapterWith } from "@hot-updater/plugin-core";
2
+ //#region src/supabaseConfig.d.ts
3
+ type SupabaseServiceRoleConfig = {
4
+ supabaseUrl: string;
5
+ supabaseServiceRoleKey: string;
6
+ };
7
+ //#endregion
8
+ //#region src/supabaseDatabase.d.ts
9
+ type SupabaseDatabaseConfig = SupabaseServiceRoleConfig;
10
+ /**
11
+ * Hot Updater's database on Supabase: the storage engine through the shared
12
+ * SQL core, fenced by the schema settings. Every read and write goes through
13
+ * the service-role-only apply RPC, which runs no DDL, so Supabase migrations
14
+ * create the tables.
15
+ */
16
+ declare const supabaseDatabase: (config: SupabaseDatabaseConfig) => EngineDatabase;
17
+ //#endregion
18
+ //#region src/supabaseStorage.d.ts
19
+ type SupabaseStorageConfig = SupabaseServiceRoleConfig & {
20
+ bucketName: string;
21
+ /** Base path where bundles will be stored in the bucket. */
22
+ basePath?: string;
23
+ /** Signed download URL lifetime in seconds. @default 3600 */
24
+ signedUrlExpiresIn?: number;
25
+ };
26
+ declare const supabaseStorage: (config: SupabaseStorageConfig) => StorageAdapterWith<"put" | "get" | "getDownloadUrl" | "exists" | "delete">;
27
+ //#endregion
28
+ export { supabaseDatabase as i, supabaseStorage as n, SupabaseDatabaseConfig as r, SupabaseStorageConfig as t };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hot-updater/supabase",
3
3
  "type": "module",
4
- "version": "1.0.0-rc.45",
4
+ "version": "1.0.0-rc.47",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "main": "dist/index.cjs",
7
7
  "module": "dist/index.mjs",
@@ -51,10 +51,10 @@
51
51
  "@supabase/supabase-js": "2.76.1",
52
52
  "hono": "4.12.34",
53
53
  "uuidv7": "^1.0.2",
54
- "@hot-updater/cli-tools": "1.0.0-rc.45",
55
- "@hot-updater/plugin-core": "1.0.0-rc.45",
56
- "@hot-updater/server": "1.0.0-rc.45",
57
- "@hot-updater/protocol": "1.0.0-rc.45"
54
+ "@hot-updater/protocol": "1.0.0-rc.47",
55
+ "@hot-updater/plugin-core": "1.0.0-rc.47",
56
+ "@hot-updater/cli-tools": "1.0.0-rc.47",
57
+ "@hot-updater/server": "1.0.0-rc.47"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@electric-sql/pglite": "0.4.1",
@@ -64,9 +64,9 @@
64
64
  "execa": "9.5.2",
65
65
  "@types/node": "^20",
66
66
  "mime": "^4.0.4",
67
- "@hot-updater/mock": "1.0.0-rc.45",
68
- "@hot-updater/test-utils": "1.0.0-rc.45",
69
- "@hot-updater/postgres": "1.0.0-rc.45"
67
+ "@hot-updater/mock": "1.0.0-rc.47",
68
+ "@hot-updater/test-utils": "1.0.0-rc.47",
69
+ "@hot-updater/postgres": "1.0.0-rc.47"
70
70
  },
71
71
  "scripts": {
72
72
  "build": "tsdown",
@@ -1,18 +0,0 @@
1
- import { EngineDatabase } from "@hot-updater/plugin-core";
2
- //#region src/supabaseConfig.d.ts
3
- type SupabaseServiceRoleConfig = {
4
- supabaseUrl: string;
5
- supabaseServiceRoleKey: string;
6
- };
7
- //#endregion
8
- //#region src/supabaseDatabase.d.ts
9
- type SupabaseDatabaseConfig = SupabaseServiceRoleConfig;
10
- /**
11
- * Hot Updater's database on Supabase: the storage engine through the shared
12
- * SQL core, fenced by the schema settings. Every read and write goes through
13
- * the service-role-only apply RPC, which runs no DDL, so Supabase migrations
14
- * create the tables.
15
- */
16
- declare const supabaseDatabase: (config: SupabaseDatabaseConfig) => EngineDatabase;
17
- //#endregion
18
- export { supabaseDatabase as n, SupabaseServiceRoleConfig as r, SupabaseDatabaseConfig as t };
@@ -1,18 +0,0 @@
1
- import { EngineDatabase } from "@hot-updater/plugin-core";
2
- //#region src/supabaseConfig.d.ts
3
- type SupabaseServiceRoleConfig = {
4
- supabaseUrl: string;
5
- supabaseServiceRoleKey: string;
6
- };
7
- //#endregion
8
- //#region src/supabaseDatabase.d.ts
9
- type SupabaseDatabaseConfig = SupabaseServiceRoleConfig;
10
- /**
11
- * Hot Updater's database on Supabase: the storage engine through the shared
12
- * SQL core, fenced by the schema settings. Every read and write goes through
13
- * the service-role-only apply RPC, which runs no DDL, so Supabase migrations
14
- * create the tables.
15
- */
16
- declare const supabaseDatabase: (config: SupabaseDatabaseConfig) => EngineDatabase;
17
- //#endregion
18
- export { supabaseDatabase as n, SupabaseServiceRoleConfig as r, SupabaseDatabaseConfig as t };