@hot-updater/supabase 1.2.0-rc.57 → 1.2.0-rc.59

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.
@@ -7717,6 +7717,18 @@ const runInitWithoutCliMetadata = async ({ build, envFile, secretsEnv }) => {
7717
7717
  await database.dispose?.();
7718
7718
  }
7719
7719
  await deployEdgeFunction(accessToken, tmpDir, project.id, functionName);
7720
+ const backfillDatabase = supabaseDatabase({
7721
+ supabaseServiceRoleKey: projectAccess.serviceRoleApiKey,
7722
+ supabaseUrl: `https://${project.id}.supabase.co`
7723
+ });
7724
+ try {
7725
+ await (0, _hot_updater_cli_tools.backfillInsightsReleaseRefs)((0, _hot_updater_cli_tools.assembleServer)({
7726
+ database: backfillDatabase,
7727
+ plugins: managedServer.plugins
7728
+ }));
7729
+ } finally {
7730
+ await backfillDatabase.dispose?.();
7731
+ }
7720
7732
  } finally {
7721
7733
  await removeTmpDir();
7722
7734
  }
@@ -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, fillReleaseLabels, 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, backfillInsightsReleaseRefs, 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";
@@ -7712,6 +7712,18 @@ const runInitWithoutCliMetadata = async ({ build, envFile, secretsEnv }) => {
7712
7712
  await database.dispose?.();
7713
7713
  }
7714
7714
  await deployEdgeFunction(accessToken, tmpDir, project.id, functionName);
7715
+ const backfillDatabase = supabaseDatabase({
7716
+ supabaseServiceRoleKey: projectAccess.serviceRoleApiKey,
7717
+ supabaseUrl: `https://${project.id}.supabase.co`
7718
+ });
7719
+ try {
7720
+ await backfillInsightsReleaseRefs(assembleServer({
7721
+ database: backfillDatabase,
7722
+ plugins: managedServer.plugins
7723
+ }));
7724
+ } finally {
7725
+ await backfillDatabase.dispose?.();
7726
+ }
7715
7727
  } finally {
7716
7728
  await removeTmpDir();
7717
7729
  }
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.57",
4
+ "version": "1.2.0-rc.59",
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/protocol": "1.2.0-rc.57",
55
- "@hot-updater/plugin-core": "1.2.0-rc.57",
56
- "@hot-updater/cli-tools": "1.2.0-rc.57",
57
- "@hot-updater/server": "1.2.0-rc.57"
54
+ "@hot-updater/plugin-core": "1.2.0-rc.59",
55
+ "@hot-updater/cli-tools": "1.2.0-rc.59",
56
+ "@hot-updater/server": "1.2.0-rc.59",
57
+ "@hot-updater/protocol": "1.2.0-rc.59"
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/test-utils": "1.2.0-rc.57",
68
- "@hot-updater/postgres": "1.2.0-rc.57",
69
- "@hot-updater/mock": "1.2.0-rc.57"
67
+ "@hot-updater/test-utils": "1.2.0-rc.59",
68
+ "@hot-updater/mock": "1.2.0-rc.59",
69
+ "@hot-updater/postgres": "1.2.0-rc.59"
70
70
  },
71
71
  "scripts": {
72
72
  "build": "tsdown",