@hot-updater/supabase 0.36.5 → 0.36.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/iac/index.cjs
CHANGED
|
@@ -7001,16 +7001,17 @@ const resolveBareSpecifierImportTarget = async (specifier, searchFrom) => {
|
|
|
7001
7001
|
};
|
|
7002
7002
|
const buildEdgeFunctionImports = async (targetDir) => {
|
|
7003
7003
|
const imports = {};
|
|
7004
|
-
const
|
|
7004
|
+
const vendoredWorkspacePackages = /* @__PURE__ */ new Map();
|
|
7005
7005
|
const addWorkspacePackage = async ({ importSpecifier, packageName, exportName }) => {
|
|
7006
7006
|
const visitKey = `${packageName}:${exportName}`;
|
|
7007
|
-
|
|
7008
|
-
|
|
7007
|
+
const existingPackage = vendoredWorkspacePackages.get(visitKey);
|
|
7008
|
+
if (existingPackage) return existingPackage;
|
|
7009
7009
|
const vendoredPackage = await prepareVendoredPackageImport({
|
|
7010
7010
|
targetDir,
|
|
7011
7011
|
packageName,
|
|
7012
7012
|
exportName
|
|
7013
7013
|
});
|
|
7014
|
+
vendoredWorkspacePackages.set(visitKey, vendoredPackage);
|
|
7014
7015
|
imports[importSpecifier] = vendoredPackage.importMapPath;
|
|
7015
7016
|
const nestedSpecifiers = await collectBareImportSpecifiers(vendoredPackage.sourceEntryPath);
|
|
7016
7017
|
for (const nestedSpecifier of nestedSpecifiers) {
|
|
@@ -7025,17 +7026,26 @@ const buildEdgeFunctionImports = async (targetDir) => {
|
|
|
7025
7026
|
}
|
|
7026
7027
|
imports[nestedSpecifier] = await resolveBareSpecifierImportTarget(nestedSpecifier, vendoredPackage.packageRoot);
|
|
7027
7028
|
}
|
|
7029
|
+
return vendoredPackage;
|
|
7028
7030
|
};
|
|
7029
7031
|
await addWorkspacePackage({
|
|
7030
7032
|
importSpecifier: "@hot-updater/server",
|
|
7031
7033
|
packageName: "@hot-updater/server",
|
|
7032
7034
|
exportName: "."
|
|
7033
7035
|
});
|
|
7034
|
-
await addWorkspacePackage({
|
|
7036
|
+
const supabasePackage = await addWorkspacePackage({
|
|
7035
7037
|
importSpecifier: "@hot-updater/supabase",
|
|
7036
7038
|
packageName: "@hot-updater/supabase",
|
|
7037
7039
|
exportName: "./edge"
|
|
7038
7040
|
});
|
|
7041
|
+
const edgeFunctionEntryPath = path.default.join(targetDir, "index.ts");
|
|
7042
|
+
if (await pathExists(edgeFunctionEntryPath)) {
|
|
7043
|
+
const edgeFunctionSpecifiers = await collectBareImportSpecifiers(edgeFunctionEntryPath);
|
|
7044
|
+
for (const specifier of edgeFunctionSpecifiers) {
|
|
7045
|
+
if (imports[specifier]) continue;
|
|
7046
|
+
imports[specifier] = await resolveBareSpecifierImportTarget(specifier, supabasePackage.packageRoot);
|
|
7047
|
+
}
|
|
7048
|
+
}
|
|
7039
7049
|
return imports;
|
|
7040
7050
|
};
|
|
7041
7051
|
const resolveEdgeFunctionDenoConfig = async (targetDir) => {
|
|
@@ -7182,9 +7192,9 @@ const deployEdgeFunction = async (accessToken, workdir, projectId, functionName)
|
|
|
7182
7192
|
const targetDir = path.default.resolve(functionsDir, functionName);
|
|
7183
7193
|
if (!targetDir.startsWith(`${functionsDir}${path.default.sep}`)) throw new Error("Supabase Edge Function path escaped its output directory.");
|
|
7184
7194
|
await fs_promises.default.mkdir(targetDir, { recursive: true });
|
|
7185
|
-
const denoConfig = await resolveEdgeFunctionDenoConfig(targetDir);
|
|
7186
7195
|
const targetPath = path.default.join(targetDir, "index.ts");
|
|
7187
7196
|
await fs_promises.default.writeFile(targetPath, edgeFunctionsCode);
|
|
7197
|
+
const denoConfig = await resolveEdgeFunctionDenoConfig(targetDir);
|
|
7188
7198
|
await fs_promises.default.writeFile(path.default.join(targetDir, "deno.json"), `${JSON.stringify(denoConfig, null, 2)}\n`);
|
|
7189
7199
|
await _hot_updater_cli_tools.p.tasks([{
|
|
7190
7200
|
title: "Supabase edge function deploy. This may take a few minutes.",
|
package/dist/iac/index.mjs
CHANGED
|
@@ -6996,16 +6996,17 @@ const resolveBareSpecifierImportTarget = async (specifier, searchFrom) => {
|
|
|
6996
6996
|
};
|
|
6997
6997
|
const buildEdgeFunctionImports = async (targetDir) => {
|
|
6998
6998
|
const imports = {};
|
|
6999
|
-
const
|
|
6999
|
+
const vendoredWorkspacePackages = /* @__PURE__ */ new Map();
|
|
7000
7000
|
const addWorkspacePackage = async ({ importSpecifier, packageName, exportName }) => {
|
|
7001
7001
|
const visitKey = `${packageName}:${exportName}`;
|
|
7002
|
-
|
|
7003
|
-
|
|
7002
|
+
const existingPackage = vendoredWorkspacePackages.get(visitKey);
|
|
7003
|
+
if (existingPackage) return existingPackage;
|
|
7004
7004
|
const vendoredPackage = await prepareVendoredPackageImport({
|
|
7005
7005
|
targetDir,
|
|
7006
7006
|
packageName,
|
|
7007
7007
|
exportName
|
|
7008
7008
|
});
|
|
7009
|
+
vendoredWorkspacePackages.set(visitKey, vendoredPackage);
|
|
7009
7010
|
imports[importSpecifier] = vendoredPackage.importMapPath;
|
|
7010
7011
|
const nestedSpecifiers = await collectBareImportSpecifiers(vendoredPackage.sourceEntryPath);
|
|
7011
7012
|
for (const nestedSpecifier of nestedSpecifiers) {
|
|
@@ -7020,17 +7021,26 @@ const buildEdgeFunctionImports = async (targetDir) => {
|
|
|
7020
7021
|
}
|
|
7021
7022
|
imports[nestedSpecifier] = await resolveBareSpecifierImportTarget(nestedSpecifier, vendoredPackage.packageRoot);
|
|
7022
7023
|
}
|
|
7024
|
+
return vendoredPackage;
|
|
7023
7025
|
};
|
|
7024
7026
|
await addWorkspacePackage({
|
|
7025
7027
|
importSpecifier: "@hot-updater/server",
|
|
7026
7028
|
packageName: "@hot-updater/server",
|
|
7027
7029
|
exportName: "."
|
|
7028
7030
|
});
|
|
7029
|
-
await addWorkspacePackage({
|
|
7031
|
+
const supabasePackage = await addWorkspacePackage({
|
|
7030
7032
|
importSpecifier: "@hot-updater/supabase",
|
|
7031
7033
|
packageName: "@hot-updater/supabase",
|
|
7032
7034
|
exportName: "./edge"
|
|
7033
7035
|
});
|
|
7036
|
+
const edgeFunctionEntryPath = path.join(targetDir, "index.ts");
|
|
7037
|
+
if (await pathExists(edgeFunctionEntryPath)) {
|
|
7038
|
+
const edgeFunctionSpecifiers = await collectBareImportSpecifiers(edgeFunctionEntryPath);
|
|
7039
|
+
for (const specifier of edgeFunctionSpecifiers) {
|
|
7040
|
+
if (imports[specifier]) continue;
|
|
7041
|
+
imports[specifier] = await resolveBareSpecifierImportTarget(specifier, supabasePackage.packageRoot);
|
|
7042
|
+
}
|
|
7043
|
+
}
|
|
7034
7044
|
return imports;
|
|
7035
7045
|
};
|
|
7036
7046
|
const resolveEdgeFunctionDenoConfig = async (targetDir) => {
|
|
@@ -7177,9 +7187,9 @@ const deployEdgeFunction = async (accessToken, workdir, projectId, functionName)
|
|
|
7177
7187
|
const targetDir = path.resolve(functionsDir, functionName);
|
|
7178
7188
|
if (!targetDir.startsWith(`${functionsDir}${path.sep}`)) throw new Error("Supabase Edge Function path escaped its output directory.");
|
|
7179
7189
|
await fs.mkdir(targetDir, { recursive: true });
|
|
7180
|
-
const denoConfig = await resolveEdgeFunctionDenoConfig(targetDir);
|
|
7181
7190
|
const targetPath = path.join(targetDir, "index.ts");
|
|
7182
7191
|
await fs.writeFile(targetPath, edgeFunctionsCode);
|
|
7192
|
+
const denoConfig = await resolveEdgeFunctionDenoConfig(targetDir);
|
|
7183
7193
|
await fs.writeFile(path.join(targetDir, "deno.json"), `${JSON.stringify(denoConfig, null, 2)}\n`);
|
|
7184
7194
|
await p.tasks([{
|
|
7185
7195
|
title: "Supabase edge function deploy. This may take a few minutes.",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/supabase",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.36.
|
|
4
|
+
"version": "0.36.6",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.mjs",
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
],
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@supabase/supabase-js": "2.76.1",
|
|
56
|
-
"hono": "4.12.
|
|
56
|
+
"hono": "4.12.34",
|
|
57
57
|
"uuidv7": "^1.0.2",
|
|
58
|
-
"@hot-updater/core": "0.36.
|
|
59
|
-
"@hot-updater/plugin-core": "0.36.
|
|
60
|
-
"@hot-updater/
|
|
61
|
-
"@hot-updater/
|
|
58
|
+
"@hot-updater/core": "0.36.6",
|
|
59
|
+
"@hot-updater/plugin-core": "0.36.6",
|
|
60
|
+
"@hot-updater/server": "0.36.6",
|
|
61
|
+
"@hot-updater/cli-tools": "0.36.6"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@electric-sql/pglite": "0.4.1",
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
"execa": "9.5.2",
|
|
69
69
|
"@types/node": "^20",
|
|
70
70
|
"mime": "^4.0.4",
|
|
71
|
-
"@hot-updater/js": "0.36.
|
|
72
|
-
"@hot-updater/mock": "0.36.
|
|
73
|
-
"@hot-updater/
|
|
74
|
-
"@hot-updater/
|
|
71
|
+
"@hot-updater/js": "0.36.6",
|
|
72
|
+
"@hot-updater/mock": "0.36.6",
|
|
73
|
+
"@hot-updater/postgres": "0.36.6",
|
|
74
|
+
"@hot-updater/test-utils": "0.36.6"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"build": "tsdown",
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import path from "node:path";
|
|
14
14
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
15
15
|
|
|
16
|
-
import { transformEnv } from "@hot-updater/cli-tools";
|
|
16
|
+
import { resolvePackageVersion, transformEnv } from "@hot-updater/cli-tools";
|
|
17
17
|
import {
|
|
18
18
|
type Bundle,
|
|
19
19
|
type GetBundlesArgs,
|
|
@@ -935,6 +935,9 @@ const writeSupabaseRuntimeFiles = async ({
|
|
|
935
935
|
"@hot-updater/supabase": pathToFileURL(
|
|
936
936
|
path.join(runtimeRoot, "hot-updater-supabase-edge.ts"),
|
|
937
937
|
).href,
|
|
938
|
+
hono: `npm:hono@${resolvePackageVersion("hono", {
|
|
939
|
+
searchFrom: path.join(WORKSPACE_ROOT, "plugins/supabase"),
|
|
940
|
+
})}`,
|
|
938
941
|
},
|
|
939
942
|
};
|
|
940
943
|
|