@hot-updater/supabase 1.0.0-rc.18 → 1.0.0-rc.21
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 +1 -1
- package/dist/edge.d.cts +3 -3
- package/dist/edge.d.mts +3 -3
- package/dist/edge.mjs +1 -1
- package/dist/index.cjs +11 -12
- package/dist/index.d.cts +3 -4
- package/dist/index.d.mts +3 -4
- package/dist/index.mjs +2 -3
- package/dist/init/index.cjs +7593 -6
- package/dist/init/index.d.cts +97 -4
- package/dist/init/index.d.mts +97 -4
- package/dist/init/index.mjs +7578 -3
- package/dist/{plugins--10vxSpf.mjs → plugins-B8grmU79.mjs} +2 -3
- package/dist/{plugins-CcNpRRGq.cjs → plugins-DJUmZYvT.cjs} +5 -6
- package/dist/supabaseDatabase-DVb3-y2x.d.cts +726 -0
- package/dist/supabaseDatabase-DVb3-y2x.d.mts +726 -0
- package/package.json +9 -13
- package/dist/iac/index.cjs +0 -7680
- package/dist/iac/index.d.cts +0 -101
- package/dist/iac/index.d.mts +0 -101
- package/dist/iac/index.mjs +0 -7664
- package/dist/supabaseDatabase-C0-IshLi.d.cts +0 -436
- package/dist/supabaseDatabase-C0-IshLi.d.mts +0 -436
- package/supabase/edge-functions/runtime.docker.integration.spec.ts +0 -1301
- package/supabase/migrations.spec.ts +0 -287
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { SETTINGS_TABLE, createEngineDatabase, createSqlAdapter } from "@hot-updater/
|
|
1
|
+
import { SETTINGS_TABLE, createEngineDatabase, createSqlAdapter, createStorageAdapter, createStorageKeyBuilder, createStorageUri, parseStorageUri } from "@hot-updater/plugin-core";
|
|
2
2
|
import { createClient } from "@supabase/supabase-js";
|
|
3
|
-
import { createStorageKeyBuilder, createStoragePlugin, createStorageUri, parseStorageUri } from "@hot-updater/plugin-core";
|
|
4
3
|
import { apiKeys } from "@hot-updater/server/plugins/api-keys";
|
|
5
4
|
import { insights } from "@hot-updater/server/plugins/insights";
|
|
6
5
|
//#region src/supabaseConfig.ts
|
|
@@ -150,7 +149,7 @@ const supabaseStorage = (config) => {
|
|
|
150
149
|
if (parsed.bucket !== config.bucketName) throw new Error(`Bucket name mismatch: expected "${config.bucketName}", but found "${parsed.bucket}".`);
|
|
151
150
|
return parsed;
|
|
152
151
|
};
|
|
153
|
-
return
|
|
152
|
+
return createStorageAdapter({
|
|
154
153
|
name: "supabaseStorage",
|
|
155
154
|
protocol: "supabase-storage",
|
|
156
155
|
async put({ key, body, contentLength, contentType }) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
let _hot_updater_server_database = require("@hot-updater/server/database");
|
|
2
|
-
let _supabase_supabase_js = require("@supabase/supabase-js");
|
|
3
1
|
let _hot_updater_plugin_core = require("@hot-updater/plugin-core");
|
|
2
|
+
let _supabase_supabase_js = require("@supabase/supabase-js");
|
|
4
3
|
let _hot_updater_server_plugins_api_keys = require("@hot-updater/server/plugins/api-keys");
|
|
5
4
|
let _hot_updater_server_plugins_insights = require("@hot-updater/server/plugins/insights");
|
|
6
5
|
//#region src/supabaseConfig.ts
|
|
@@ -13,7 +12,7 @@ const resolveSupabaseServiceRoleKey = (config) => {
|
|
|
13
12
|
/** Namespaces Hot Updater's tables beside a project's own, and beside v0's. */
|
|
14
13
|
const SUPABASE_TABLE_PREFIX = "hot_updater_v1_";
|
|
15
14
|
const SUPABASE_APPLY_FUNCTION = "hot_updater_v1_apply";
|
|
16
|
-
"" +
|
|
15
|
+
"" + _hot_updater_plugin_core.SETTINGS_TABLE.name;
|
|
17
16
|
//#endregion
|
|
18
17
|
//#region src/supabaseExecutor.ts
|
|
19
18
|
/**
|
|
@@ -66,11 +65,11 @@ const supabaseExecutor = (client) => {
|
|
|
66
65
|
* create the tables.
|
|
67
66
|
*/
|
|
68
67
|
const supabaseDatabase = (config) => {
|
|
69
|
-
const { migrations: _migrations, ...adapter } = (0,
|
|
68
|
+
const { migrations: _migrations, ...adapter } = (0, _hot_updater_plugin_core.createSqlAdapter)({
|
|
70
69
|
executor: supabaseExecutor((0, _supabase_supabase_js.createClient)(config.supabaseUrl, resolveSupabaseServiceRoleKey(config))),
|
|
71
70
|
tablePrefix: SUPABASE_TABLE_PREFIX
|
|
72
71
|
});
|
|
73
|
-
return (0,
|
|
72
|
+
return (0, _hot_updater_plugin_core.createEngineDatabase)({
|
|
74
73
|
name: "supabaseDatabase",
|
|
75
74
|
adapter
|
|
76
75
|
});
|
|
@@ -150,7 +149,7 @@ const supabaseStorage = (config) => {
|
|
|
150
149
|
if (parsed.bucket !== config.bucketName) throw new Error(`Bucket name mismatch: expected "${config.bucketName}", but found "${parsed.bucket}".`);
|
|
151
150
|
return parsed;
|
|
152
151
|
};
|
|
153
|
-
return (0, _hot_updater_plugin_core.
|
|
152
|
+
return (0, _hot_updater_plugin_core.createStorageAdapter)({
|
|
154
153
|
name: "supabaseStorage",
|
|
155
154
|
protocol: "supabase-storage",
|
|
156
155
|
async put({ key, body, contentLength, contentType }) {
|