@hot-updater/supabase 1.2.0-rc.7 → 1.2.0-rc.8
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.d.cts +1 -1
- package/dist/edge.d.mts +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/init/index.cjs +9 -9
- package/dist/init/index.mjs +10 -10
- package/dist/{supabaseStorage-B131_auF.d.cts → supabaseStorage-DFBKC3sm.d.cts} +4 -4
- package/dist/{supabaseStorage-B131_auF.d.mts → supabaseStorage-DFBKC3sm.d.mts} +4 -4
- package/package.json +8 -8
package/dist/edge.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as supabaseDatabase, n as supabaseStorage, r as SupabaseDatabaseConfig, t as SupabaseStorageConfig } from "./supabaseStorage-
|
|
1
|
+
import { i as supabaseDatabase, n as supabaseStorage, r as SupabaseDatabaseConfig, t as SupabaseStorageConfig } from "./supabaseStorage-DFBKC3sm.cjs";
|
|
2
2
|
export { type SupabaseDatabaseConfig, type SupabaseStorageConfig, supabaseDatabase, supabaseStorage };
|
package/dist/edge.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as supabaseDatabase, n as supabaseStorage, r as SupabaseDatabaseConfig, t as SupabaseStorageConfig } from "./supabaseStorage-
|
|
1
|
+
import { i as supabaseDatabase, n as supabaseStorage, r as SupabaseDatabaseConfig, t as SupabaseStorageConfig } from "./supabaseStorage-DFBKC3sm.mjs";
|
|
2
2
|
export { type SupabaseDatabaseConfig, type SupabaseStorageConfig, supabaseDatabase, supabaseStorage };
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as supabaseStorage, r as SupabaseDatabaseConfig, t as SupabaseStorageConfig } from "./supabaseStorage-
|
|
1
|
+
import { n as supabaseStorage, r as SupabaseDatabaseConfig, t as SupabaseStorageConfig } from "./supabaseStorage-DFBKC3sm.cjs";
|
|
2
2
|
import { ToolingDatabase } from "@hot-updater/plugin-core";
|
|
3
3
|
//#region src/supabaseMigration.d.ts
|
|
4
4
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as supabaseStorage, r as SupabaseDatabaseConfig, t as SupabaseStorageConfig } from "./supabaseStorage-
|
|
1
|
+
import { n as supabaseStorage, r as SupabaseDatabaseConfig, t as SupabaseStorageConfig } from "./supabaseStorage-DFBKC3sm.mjs";
|
|
2
2
|
import { ToolingDatabase } from "@hot-updater/plugin-core";
|
|
3
3
|
//#region src/supabaseMigration.d.ts
|
|
4
4
|
/**
|
package/dist/init/index.cjs
CHANGED
|
@@ -6421,14 +6421,15 @@ const supabaseDatabase = (config) => {
|
|
|
6421
6421
|
//#region iac/configTemplate.ts
|
|
6422
6422
|
/**
|
|
6423
6423
|
* The config init writes. With the `resources` init set up, it names them,
|
|
6424
|
-
* and reads the service role key with `
|
|
6424
|
+
* and reads the service role key with `secret()`, from the environment and
|
|
6425
6425
|
* `.env.hotupdater`, then the config's `secrets` adapter. Without them, as
|
|
6426
|
-
* the agent scaffold writes it
|
|
6426
|
+
* the agent scaffold writes it before the agent creates the project, it
|
|
6427
|
+
* reads the URL and bucket from the environment, where the agent records
|
|
6428
|
+
* them, and the key with `secret()` alike.
|
|
6427
6429
|
*/
|
|
6428
6430
|
const getConfigScaffold = (build, resources) => {
|
|
6429
6431
|
const supabaseUrl = resources === void 0 ? "process.env.HOT_UPDATER_SUPABASE_URL!" : JSON.stringify(resources.supabaseUrl);
|
|
6430
|
-
const serviceRoleKey =
|
|
6431
|
-
(await deploySecrets()).HOT_UPDATER_SUPABASE_SERVICE_ROLE_KEY`;
|
|
6432
|
+
const serviceRoleKey = "secret(\"HOT_UPDATER_SUPABASE_SERVICE_ROLE_KEY\")";
|
|
6432
6433
|
const storageConfig = {
|
|
6433
6434
|
imports: [{
|
|
6434
6435
|
pkg: "@hot-updater/supabase",
|
|
@@ -6450,7 +6451,6 @@ const getConfigScaffold = (build, resources) => {
|
|
|
6450
6451
|
supabaseServiceRoleKey: ${serviceRoleKey},
|
|
6451
6452
|
})`
|
|
6452
6453
|
};
|
|
6453
|
-
const helperStatements = resources === void 0 ? [] : [(0, _hot_updater_cli_tools.secretEnvHelper)("deploySecrets", ["HOT_UPDATER_SUPABASE_SERVICE_ROLE_KEY"])];
|
|
6454
6454
|
const builder = new _hot_updater_cli_tools.ConfigBuilder().setBuildType(build).setStorage(storageConfig).setDatabase(databaseConfig).setPlugins({
|
|
6455
6455
|
imports: [{
|
|
6456
6456
|
pkg: "hot-updater/plugins",
|
|
@@ -6462,11 +6462,11 @@ const getConfigScaffold = (build, resources) => {
|
|
|
6462
6462
|
}],
|
|
6463
6463
|
configString: "[apiKeys(), insights(), remoteConfig()]"
|
|
6464
6464
|
});
|
|
6465
|
-
|
|
6465
|
+
builder.addImport({
|
|
6466
6466
|
pkg: "hot-updater",
|
|
6467
|
-
named: ["
|
|
6468
|
-
})
|
|
6469
|
-
return (0, _hot_updater_cli_tools.createHotUpdaterConfigScaffoldFromBuilder)(builder
|
|
6467
|
+
named: ["secret"]
|
|
6468
|
+
});
|
|
6469
|
+
return (0, _hot_updater_cli_tools.createHotUpdaterConfigScaffoldFromBuilder)(builder);
|
|
6470
6470
|
};
|
|
6471
6471
|
//#endregion
|
|
6472
6472
|
//#region iac/init/index.ts
|
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,
|
|
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";
|
|
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";
|
|
@@ -6416,14 +6416,15 @@ const supabaseDatabase = (config) => {
|
|
|
6416
6416
|
//#region iac/configTemplate.ts
|
|
6417
6417
|
/**
|
|
6418
6418
|
* The config init writes. With the `resources` init set up, it names them,
|
|
6419
|
-
* and reads the service role key with `
|
|
6419
|
+
* and reads the service role key with `secret()`, from the environment and
|
|
6420
6420
|
* `.env.hotupdater`, then the config's `secrets` adapter. Without them, as
|
|
6421
|
-
* the agent scaffold writes it
|
|
6421
|
+
* the agent scaffold writes it before the agent creates the project, it
|
|
6422
|
+
* reads the URL and bucket from the environment, where the agent records
|
|
6423
|
+
* them, and the key with `secret()` alike.
|
|
6422
6424
|
*/
|
|
6423
6425
|
const getConfigScaffold = (build, resources) => {
|
|
6424
6426
|
const supabaseUrl = resources === void 0 ? "process.env.HOT_UPDATER_SUPABASE_URL!" : JSON.stringify(resources.supabaseUrl);
|
|
6425
|
-
const serviceRoleKey =
|
|
6426
|
-
(await deploySecrets()).HOT_UPDATER_SUPABASE_SERVICE_ROLE_KEY`;
|
|
6427
|
+
const serviceRoleKey = "secret(\"HOT_UPDATER_SUPABASE_SERVICE_ROLE_KEY\")";
|
|
6427
6428
|
const storageConfig = {
|
|
6428
6429
|
imports: [{
|
|
6429
6430
|
pkg: "@hot-updater/supabase",
|
|
@@ -6445,7 +6446,6 @@ const getConfigScaffold = (build, resources) => {
|
|
|
6445
6446
|
supabaseServiceRoleKey: ${serviceRoleKey},
|
|
6446
6447
|
})`
|
|
6447
6448
|
};
|
|
6448
|
-
const helperStatements = resources === void 0 ? [] : [secretEnvHelper("deploySecrets", ["HOT_UPDATER_SUPABASE_SERVICE_ROLE_KEY"])];
|
|
6449
6449
|
const builder = new ConfigBuilder().setBuildType(build).setStorage(storageConfig).setDatabase(databaseConfig).setPlugins({
|
|
6450
6450
|
imports: [{
|
|
6451
6451
|
pkg: "hot-updater/plugins",
|
|
@@ -6457,11 +6457,11 @@ const getConfigScaffold = (build, resources) => {
|
|
|
6457
6457
|
}],
|
|
6458
6458
|
configString: "[apiKeys(), insights(), remoteConfig()]"
|
|
6459
6459
|
});
|
|
6460
|
-
|
|
6460
|
+
builder.addImport({
|
|
6461
6461
|
pkg: "hot-updater",
|
|
6462
|
-
named: ["
|
|
6463
|
-
})
|
|
6464
|
-
return createHotUpdaterConfigScaffoldFromBuilder(builder
|
|
6462
|
+
named: ["secret"]
|
|
6463
|
+
});
|
|
6464
|
+
return createHotUpdaterConfigScaffoldFromBuilder(builder);
|
|
6465
6465
|
};
|
|
6466
6466
|
//#endregion
|
|
6467
6467
|
//#region iac/init/index.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { EngineDatabase, StorageAdapterWith } from "@hot-updater/plugin-core";
|
|
1
|
+
import { EngineDatabase, Lazy, StorageAdapterWith } from "@hot-updater/plugin-core";
|
|
2
2
|
//#region src/supabaseConfig.d.ts
|
|
3
3
|
type SupabaseServiceRoleConfig = {
|
|
4
4
|
supabaseUrl: string;
|
|
5
5
|
/**
|
|
6
6
|
* The project's service role key, or a function that returns it, such as
|
|
7
|
-
*
|
|
8
|
-
* config loads without the key.
|
|
7
|
+
* `secret("<name>")` in `hot-updater.config.ts`: called on the first
|
|
8
|
+
* request, so a config loads without the key.
|
|
9
9
|
*/
|
|
10
|
-
supabaseServiceRoleKey:
|
|
10
|
+
supabaseServiceRoleKey: Lazy<string>;
|
|
11
11
|
};
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/supabaseDatabase.d.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { EngineDatabase, StorageAdapterWith } from "@hot-updater/plugin-core";
|
|
1
|
+
import { EngineDatabase, Lazy, StorageAdapterWith } from "@hot-updater/plugin-core";
|
|
2
2
|
//#region src/supabaseConfig.d.ts
|
|
3
3
|
type SupabaseServiceRoleConfig = {
|
|
4
4
|
supabaseUrl: string;
|
|
5
5
|
/**
|
|
6
6
|
* The project's service role key, or a function that returns it, such as
|
|
7
|
-
*
|
|
8
|
-
* config loads without the key.
|
|
7
|
+
* `secret("<name>")` in `hot-updater.config.ts`: called on the first
|
|
8
|
+
* request, so a config loads without the key.
|
|
9
9
|
*/
|
|
10
|
-
supabaseServiceRoleKey:
|
|
10
|
+
supabaseServiceRoleKey: Lazy<string>;
|
|
11
11
|
};
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/supabaseDatabase.d.ts
|
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.8",
|
|
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.
|
|
55
|
-
"@hot-updater/plugin-core": "1.2.0-rc.
|
|
56
|
-
"@hot-updater/
|
|
57
|
-
"@hot-updater/
|
|
54
|
+
"@hot-updater/protocol": "1.2.0-rc.8",
|
|
55
|
+
"@hot-updater/plugin-core": "1.2.0-rc.8",
|
|
56
|
+
"@hot-updater/server": "1.2.0-rc.8",
|
|
57
|
+
"@hot-updater/cli-tools": "1.2.0-rc.8"
|
|
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.8",
|
|
68
|
+
"@hot-updater/test-utils": "1.2.0-rc.8",
|
|
69
|
+
"@hot-updater/postgres": "1.2.0-rc.8"
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|
|
72
72
|
"build": "tsdown",
|