@hot-updater/supabase 0.5.4 → 0.5.6
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.cjs
CHANGED
|
@@ -55,7 +55,7 @@ const supabaseDatabase = (config, hooks)=>(_)=>{
|
|
|
55
55
|
id: bundle.id,
|
|
56
56
|
enabled: bundle.enabled,
|
|
57
57
|
file_url: bundle.fileUrl,
|
|
58
|
-
|
|
58
|
+
should_force_update: bundle.shouldForceUpdate,
|
|
59
59
|
file_hash: bundle.fileHash,
|
|
60
60
|
git_commit_hash: bundle.gitCommitHash,
|
|
61
61
|
message: bundle.message,
|
|
@@ -85,7 +85,7 @@ const supabaseDatabase = (config, hooks)=>(_)=>{
|
|
|
85
85
|
return {
|
|
86
86
|
enabled: data.enabled,
|
|
87
87
|
fileUrl: data.file_url,
|
|
88
|
-
|
|
88
|
+
shouldForceUpdate: data.should_force_update,
|
|
89
89
|
fileHash: data.file_hash,
|
|
90
90
|
gitCommitHash: data.git_commit_hash,
|
|
91
91
|
id: data.id,
|
|
@@ -103,7 +103,7 @@ const supabaseDatabase = (config, hooks)=>(_)=>{
|
|
|
103
103
|
return data.map((bundle)=>({
|
|
104
104
|
enabled: bundle.enabled,
|
|
105
105
|
fileUrl: bundle.file_url,
|
|
106
|
-
|
|
106
|
+
shouldForceUpdate: bundle.should_force_update,
|
|
107
107
|
fileHash: bundle.file_hash,
|
|
108
108
|
gitCommitHash: bundle.git_commit_hash,
|
|
109
109
|
id: bundle.id,
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ const supabaseDatabase = (config, hooks)=>(_)=>{
|
|
|
11
11
|
id: bundle.id,
|
|
12
12
|
enabled: bundle.enabled,
|
|
13
13
|
file_url: bundle.fileUrl,
|
|
14
|
-
|
|
14
|
+
should_force_update: bundle.shouldForceUpdate,
|
|
15
15
|
file_hash: bundle.fileHash,
|
|
16
16
|
git_commit_hash: bundle.gitCommitHash,
|
|
17
17
|
message: bundle.message,
|
|
@@ -41,7 +41,7 @@ const supabaseDatabase = (config, hooks)=>(_)=>{
|
|
|
41
41
|
return {
|
|
42
42
|
enabled: data.enabled,
|
|
43
43
|
fileUrl: data.file_url,
|
|
44
|
-
|
|
44
|
+
shouldForceUpdate: data.should_force_update,
|
|
45
45
|
fileHash: data.file_hash,
|
|
46
46
|
gitCommitHash: data.git_commit_hash,
|
|
47
47
|
id: data.id,
|
|
@@ -59,7 +59,7 @@ const supabaseDatabase = (config, hooks)=>(_)=>{
|
|
|
59
59
|
return data.map((bundle)=>({
|
|
60
60
|
enabled: bundle.enabled,
|
|
61
61
|
fileUrl: bundle.file_url,
|
|
62
|
-
|
|
62
|
+
shouldForceUpdate: bundle.should_force_update,
|
|
63
63
|
fileHash: bundle.file_hash,
|
|
64
64
|
gitCommitHash: bundle.git_commit_hash,
|
|
65
65
|
id: bundle.id,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/supabase",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.6",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"package.json"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@hot-updater/core": "0.5.
|
|
33
|
-
"@hot-updater/plugin-core": "0.5.
|
|
32
|
+
"@hot-updater/core": "0.5.6",
|
|
33
|
+
"@hot-updater/plugin-core": "0.5.6",
|
|
34
34
|
"@supabase/supabase-js": "^2.47.10",
|
|
35
35
|
"picocolors": "^1.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@hot-updater/postgres": "0.5.
|
|
38
|
+
"@hot-updater/postgres": "0.5.6",
|
|
39
39
|
"dayjs": "^1.11.13",
|
|
40
40
|
"mime": "^4.0.4"
|
|
41
41
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
postgresql://postgres.
|
|
1
|
+
postgresql://postgres.grrxzwwyrnkiivfibpcx:[YOUR-PASSWORD]@aws-0-ap-northeast-2.pooler.supabase.com:6543/postgres
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
grrxzwwyrnkiivfibpcx
|
package/supabase/config.toml
CHANGED
|
@@ -6,7 +6,7 @@ CREATE TABLE bundles (
|
|
|
6
6
|
id uuid PRIMARY KEY,
|
|
7
7
|
platform platforms NOT NULL,
|
|
8
8
|
target_app_version text NOT NULL,
|
|
9
|
-
|
|
9
|
+
should_force_update boolean NOT NULL,
|
|
10
10
|
enabled boolean NOT NULL,
|
|
11
11
|
file_url text NOT NULL,
|
|
12
12
|
file_hash text NOT NULL,
|
|
@@ -26,7 +26,7 @@ CREATE OR REPLACE FUNCTION get_update_info (
|
|
|
26
26
|
)
|
|
27
27
|
RETURNS TABLE (
|
|
28
28
|
id uuid,
|
|
29
|
-
|
|
29
|
+
should_force_update boolean,
|
|
30
30
|
file_url text,
|
|
31
31
|
file_hash text,
|
|
32
32
|
status text
|
|
@@ -41,8 +41,8 @@ BEGIN
|
|
|
41
41
|
WITH rollback_candidate AS (
|
|
42
42
|
SELECT
|
|
43
43
|
b.id,
|
|
44
|
-
-- If status is 'ROLLBACK',
|
|
45
|
-
TRUE AS
|
|
44
|
+
-- If status is 'ROLLBACK', should_force_update is always TRUE
|
|
45
|
+
TRUE AS should_force_update,
|
|
46
46
|
b.file_url,
|
|
47
47
|
b.file_hash,
|
|
48
48
|
'ROLLBACK' AS status
|
|
@@ -56,7 +56,7 @@ BEGIN
|
|
|
56
56
|
update_candidate AS (
|
|
57
57
|
SELECT
|
|
58
58
|
b.id,
|
|
59
|
-
b.
|
|
59
|
+
b.should_force_update,
|
|
60
60
|
b.file_url,
|
|
61
61
|
b.file_hash,
|
|
62
62
|
'UPDATE' AS status
|
|
@@ -85,11 +85,11 @@ BEGIN
|
|
|
85
85
|
/*
|
|
86
86
|
When there are no final results and bundle_id != NIL_UUID,
|
|
87
87
|
add one fallback row.
|
|
88
|
-
This fallback row is also ROLLBACK so
|
|
88
|
+
This fallback row is also ROLLBACK so shouldForceUpdate = TRUE.
|
|
89
89
|
*/
|
|
90
90
|
SELECT
|
|
91
91
|
NIL_UUID AS id,
|
|
92
|
-
TRUE AS
|
|
92
|
+
TRUE AS should_force_update, -- Always TRUE
|
|
93
93
|
NULL AS file_url,
|
|
94
94
|
NULL AS file_hash,
|
|
95
95
|
'ROLLBACK' AS status
|