@hot-updater/supabase 1.2.0-rc.50 → 1.2.0-rc.51
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/init/index.cjs
CHANGED
|
@@ -7707,6 +7707,7 @@ const runInitWithoutCliMetadata = async ({ build, envFile, secretsEnv }) => {
|
|
|
7707
7707
|
});
|
|
7708
7708
|
({clientPlugins} = managedServer);
|
|
7709
7709
|
try {
|
|
7710
|
+
await (0, _hot_updater_cli_tools.fillReleaseLabels)(managedServer);
|
|
7710
7711
|
credential = await (0, _hot_updater_cli_tools.provisionClientCredential)(managedServer, {
|
|
7711
7712
|
env: initInputEnv,
|
|
7712
7713
|
name: "Supabase init"
|
package/dist/init/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import fs from "fs/promises";
|
|
3
3
|
import path from "path";
|
|
4
|
-
import { ConfigBuilder, InitError, MissingInitInputsError, assembleServer, assertInfrastructureGenerationAtUrl, assertInitInputs, assertInitProviderInputs, confirmInitInputPersistence, copyDirToTmp, createHotUpdaterConfigScaffoldFromBuilder, getHotUpdaterEnvValue, getHotUpdaterInitInputEnv, getInitProviderEnvVars, getInitProviderTextPromptValues, link, makeEnv, moduleSpecifiersOf, p, printAppSetup, provisionClientCredential, readHotUpdaterInitEnv, resolveInitProviderInput, resolvePackageVersion, transformEnv, transformTemplate, writeHotUpdaterFiles } from "@hot-updater/cli-tools";
|
|
4
|
+
import { ConfigBuilder, InitError, MissingInitInputsError, assembleServer, assertInfrastructureGenerationAtUrl, assertInitInputs, assertInitProviderInputs, confirmInitInputPersistence, copyDirToTmp, createHotUpdaterConfigScaffoldFromBuilder, fillReleaseLabels, getHotUpdaterEnvValue, getHotUpdaterInitInputEnv, getInitProviderEnvVars, getInitProviderTextPromptValues, link, makeEnv, moduleSpecifiersOf, p, printAppSetup, provisionClientCredential, readHotUpdaterInitEnv, resolveInitProviderInput, resolvePackageVersion, transformEnv, transformTemplate, writeHotUpdaterFiles } from "@hot-updater/cli-tools";
|
|
5
5
|
import { apiKeys, insights, remoteConfig } from "@hot-updater/server/plugins";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
|
|
@@ -7702,6 +7702,7 @@ const runInitWithoutCliMetadata = async ({ build, envFile, secretsEnv }) => {
|
|
|
7702
7702
|
});
|
|
7703
7703
|
({clientPlugins} = managedServer);
|
|
7704
7704
|
try {
|
|
7705
|
+
await fillReleaseLabels(managedServer);
|
|
7705
7706
|
credential = await provisionClientCredential(managedServer, {
|
|
7706
7707
|
env: initInputEnv,
|
|
7707
7708
|
name: "Supabase init"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/supabase",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.0-rc.
|
|
4
|
+
"version": "1.2.0-rc.51",
|
|
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/
|
|
55
|
-
"@hot-updater/
|
|
56
|
-
"@hot-updater/
|
|
57
|
-
"@hot-updater/
|
|
54
|
+
"@hot-updater/plugin-core": "1.2.0-rc.51",
|
|
55
|
+
"@hot-updater/protocol": "1.2.0-rc.51",
|
|
56
|
+
"@hot-updater/cli-tools": "1.2.0-rc.51",
|
|
57
|
+
"@hot-updater/server": "1.2.0-rc.51"
|
|
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.2.0-rc.
|
|
68
|
-
"@hot-updater/test-utils": "1.2.0-rc.
|
|
69
|
-
"@hot-updater/postgres": "1.2.0-rc.
|
|
67
|
+
"@hot-updater/mock": "1.2.0-rc.51",
|
|
68
|
+
"@hot-updater/test-utils": "1.2.0-rc.51",
|
|
69
|
+
"@hot-updater/postgres": "1.2.0-rc.51"
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|
|
72
72
|
"build": "tsdown",
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
-- HotUpdater.schema
|
|
2
2
|
|
|
3
|
+
ALTER TABLE "hot_updater_v1_releases" ADD COLUMN IF NOT EXISTS "label" bigint;
|
|
4
|
+
|
|
5
|
+
CREATE UNIQUE INDEX IF NOT EXISTS "hot_updater_v1_releases_byLabel" ON "hot_updater_v1_releases" ("channel_id", "platform", "label");
|
|
6
|
+
|
|
3
7
|
CREATE TABLE IF NOT EXISTS "hot_updater_v1_native_builds" ("id" varchar(36) COLLATE "C" NOT NULL, "scope_key" varchar(2048) COLLATE "C" NOT NULL, "platform" varchar(16) COLLATE "C" NOT NULL, "channel_id" varchar(1408) COLLATE "C" NOT NULL, "fingerprint_hash" varchar(255) COLLATE "C", "app_version" text COLLATE "C", "min_bundle_id" varchar(36) COLLATE "C" NOT NULL, "artifact_kind" varchar(16) COLLATE "C" NOT NULL, "artifact_storage_uri" text COLLATE "C" NOT NULL, "byte_size" bigint NOT NULL, "git_commit_hash" varchar(255) COLLATE "C", "created_at_ms" bigint NOT NULL, "build_key" varchar(69) COLLATE "C", "build_number" varchar(64) COLLATE "C", "submitted_to" varchar(16) COLLATE "C", "submitted_at_ms" bigint, "submitted_version" varchar(255) COLLATE "C", "is_store_build" boolean NOT NULL, "is_sandbox" boolean NOT NULL, "sandbox_url_scheme" varchar(255) COLLATE "C", "export_method" varchar(16) COLLATE "C", "native_app_version" text COLLATE "C", "store_build_scope_key" varchar(2048) COLLATE "C", "_v" bigint NOT NULL DEFAULT 0, PRIMARY KEY ("id"));
|
|
4
8
|
|
|
5
9
|
CREATE INDEX IF NOT EXISTS "hot_updater_v1_native_builds_byScope" ON "hot_updater_v1_native_builds" ("scope_key", "id");
|
|
@@ -24,6 +28,8 @@ CREATE UNIQUE INDEX IF NOT EXISTS "hot_updater_v1_ios_devices_udid" ON "hot_upda
|
|
|
24
28
|
|
|
25
29
|
CREATE TABLE IF NOT EXISTS "hot_updater_v1_ios_device_account" ("id" varchar(16) COLLATE "C" NOT NULL, "apple_issuer_id" varchar(64) COLLATE "C" NOT NULL, "claimed_at_ms" bigint NOT NULL, "_v" bigint NOT NULL DEFAULT 0, PRIMARY KEY ("id"));
|
|
26
30
|
|
|
31
|
+
CREATE TABLE IF NOT EXISTS "hot_updater_v1_label_sequences" ("id" varchar(1440) COLLATE "C" NOT NULL, "last_label" bigint NOT NULL, "is_filled" boolean NOT NULL, "_v" bigint NOT NULL DEFAULT 0, PRIMARY KEY ("id"));
|
|
32
|
+
|
|
27
33
|
CREATE INDEX IF NOT EXISTS "hot_updater_v1_bundle_events__byBundle__key" ON "hot_updater_v1_bundle_events__byBundle" ("id");
|
|
28
34
|
|
|
29
35
|
ALTER TABLE "hot_updater_v1_native_builds" ENABLE ROW LEVEL SECURITY;
|
|
@@ -32,6 +38,8 @@ ALTER TABLE "hot_updater_v1_ios_devices" ENABLE ROW LEVEL SECURITY;
|
|
|
32
38
|
|
|
33
39
|
ALTER TABLE "hot_updater_v1_ios_device_account" ENABLE ROW LEVEL SECURITY;
|
|
34
40
|
|
|
41
|
+
ALTER TABLE "hot_updater_v1_label_sequences" ENABLE ROW LEVEL SECURITY;
|
|
42
|
+
|
|
35
43
|
CREATE OR REPLACE FUNCTION public.hot_updater_v1_apply(p_statements jsonb)
|
|
36
44
|
RETURNS jsonb
|
|
37
45
|
LANGUAGE plpgsql
|
|
@@ -51,7 +59,7 @@ BEGIN
|
|
|
51
59
|
FOR item IN SELECT value FROM jsonb_array_elements(p_statements) LOOP
|
|
52
60
|
statement := item->>'sql';
|
|
53
61
|
FOR target IN SELECT (regexp_matches(statement, '(?:FROM|INTO|UPDATE|JOIN) "([^"]+)"', 'g'))[1] LOOP
|
|
54
|
-
IF NOT target = ANY (ARRAY['hot_updater_v1_bundles', 'hot_updater_v1_bundle_patches', 'hot_updater_v1_releases', 'hot_updater_v1_release_catalogs', 'hot_updater_v1_channels', 'hot_updater_v1_bundle_totals', 'hot_updater_v1_native_builds', 'hot_updater_v1_ios_devices', 'hot_updater_v1_ios_device_account', 'hot_updater_v1_bundle_events', 'hot_updater_v1_bundle_events__byBundle', 'hot_updater_v1_bundle_event_heads', 'hot_updater_v1_insights_overview', 'hot_updater_v1_insights_sketches', 'hot_updater_v1_insights_overview_daily', 'hot_updater_v1_insights_sketches_daily', 'hot_updater_v1_insights_overview_lifetime', 'hot_updater_v1_insights_sketches_lifetime', 'hot_updater_v1_insights_distribution', 'hot_updater_v1_insights_builtin_distribution', 'hot_updater_v1_insights_latest_by_bundle', 'hot_updater_v1_insights_outcomes', 'hot_updater_v1_insights_failures', 'hot_updater_v1_api_keys', 'hot_updater_v1_remote_config_active', 'hot_updater_v1_remote_config_versions', 'hot_updater_v1_private_hot_updater_settings', 'hot_updater_v1__hu_write']) THEN
|
|
62
|
+
IF NOT target = ANY (ARRAY['hot_updater_v1_bundles', 'hot_updater_v1_bundle_patches', 'hot_updater_v1_releases', 'hot_updater_v1_release_catalogs', 'hot_updater_v1_channels', 'hot_updater_v1_bundle_totals', 'hot_updater_v1_native_builds', 'hot_updater_v1_ios_devices', 'hot_updater_v1_ios_device_account', 'hot_updater_v1_label_sequences', 'hot_updater_v1_bundle_events', 'hot_updater_v1_bundle_events__byBundle', 'hot_updater_v1_bundle_event_heads', 'hot_updater_v1_insights_overview', 'hot_updater_v1_insights_sketches', 'hot_updater_v1_insights_overview_daily', 'hot_updater_v1_insights_sketches_daily', 'hot_updater_v1_insights_overview_lifetime', 'hot_updater_v1_insights_sketches_lifetime', 'hot_updater_v1_insights_distribution', 'hot_updater_v1_insights_builtin_distribution', 'hot_updater_v1_insights_latest_by_bundle', 'hot_updater_v1_insights_outcomes', 'hot_updater_v1_insights_failures', 'hot_updater_v1_api_keys', 'hot_updater_v1_remote_config_active', 'hot_updater_v1_remote_config_versions', 'hot_updater_v1_private_hot_updater_settings', 'hot_updater_v1__hu_write']) THEN
|
|
55
63
|
RAISE EXCEPTION 'hot_updater_v1_apply: % is not a Hot Updater table', target USING ERRCODE = '42501';
|
|
56
64
|
END IF;
|
|
57
65
|
END LOOP;
|