hot-updater 0.4.0 → 0.4.1-0
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 +10 -5
- package/dist/index.js +6 -5
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -10925,6 +10925,10 @@ var __webpack_modules__ = {
|
|
|
10925
10925
|
"use strict";
|
|
10926
10926
|
module.exports = require("util");
|
|
10927
10927
|
},
|
|
10928
|
+
"@hot-updater/supabase": function(module) {
|
|
10929
|
+
"use strict";
|
|
10930
|
+
module.exports = import("@hot-updater/supabase");
|
|
10931
|
+
},
|
|
10928
10932
|
"../../node_modules/.pnpm/@babel+code-frame@7.26.2/node_modules/@babel/code-frame/lib/index.js": function(__unused_webpack_module, exports1, __webpack_require__) {
|
|
10929
10933
|
"use strict";
|
|
10930
10934
|
var picocolors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
@@ -21903,7 +21907,6 @@ Instead, \`yield\` should either be called with a value, or not be called at all
|
|
|
21903
21907
|
}
|
|
21904
21908
|
return result;
|
|
21905
21909
|
}
|
|
21906
|
-
const supabase_namespaceObject = require("@hot-updater/supabase");
|
|
21907
21910
|
const CONFIG_TEMPLATE = `
|
|
21908
21911
|
import { metro } from "@hot-updater/metro";
|
|
21909
21912
|
import { supabaseDatabase, supabaseStorage } from "@hot-updater/supabase";
|
|
@@ -21972,8 +21975,8 @@ export default HotUpdater.wrap({
|
|
|
21972
21975
|
"list",
|
|
21973
21976
|
"--output",
|
|
21974
21977
|
"json"
|
|
21975
|
-
]);
|
|
21976
|
-
projectsProcess = JSON.parse(listProjects
|
|
21978
|
+
], {});
|
|
21979
|
+
projectsProcess = "null" === listProjects.stdout ? [] : JSON.parse(listProjects?.stdout ?? "[]");
|
|
21977
21980
|
} catch (err) {
|
|
21978
21981
|
spinner.stop();
|
|
21979
21982
|
console.error("Failed to list Supabase projects:", err);
|
|
@@ -22074,7 +22077,8 @@ export default HotUpdater.wrap({
|
|
|
22074
22077
|
const spinner = prompts_namespaceObject.spinner();
|
|
22075
22078
|
spinner.start("Linking Supabase...");
|
|
22076
22079
|
try {
|
|
22077
|
-
await
|
|
22080
|
+
const { supabaseConfigTomlTemplate } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "@hot-updater/supabase"));
|
|
22081
|
+
await promises_default().writeFile(external_path_default().join(supabasePath, "supabase", "config.toml"), transformTemplate(supabaseConfigTomlTemplate, {
|
|
22078
22082
|
projectId
|
|
22079
22083
|
}));
|
|
22080
22084
|
await execa("npx", [
|
|
@@ -22176,7 +22180,8 @@ export default HotUpdater.wrap({
|
|
|
22176
22180
|
spinner.stop();
|
|
22177
22181
|
const serviceRoleKey = apiKeys.find((key)=>"service_role" === key.name);
|
|
22178
22182
|
if (!serviceRoleKey) throw new Error("Service role key not found");
|
|
22179
|
-
const
|
|
22183
|
+
const { supabaseApi } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "@hot-updater/supabase"));
|
|
22184
|
+
const api = supabaseApi(`https://${project.id}.supabase.co`, serviceRoleKey.api_key);
|
|
22180
22185
|
const bucketId = await selectBucket(api);
|
|
22181
22186
|
const supabasePath = external_path_default().resolve(require.resolve("@hot-updater/supabase"), "..", "..");
|
|
22182
22187
|
await linkSupabase(supabasePath, project.id);
|
package/dist/index.js
CHANGED
|
@@ -37,7 +37,6 @@ import * as __WEBPACK_EXTERNAL_MODULE_node_events__ from "node:events";
|
|
|
37
37
|
import * as __WEBPACK_EXTERNAL_MODULE_node_v8__ from "node:v8";
|
|
38
38
|
import * as __WEBPACK_EXTERNAL_MODULE_node_stream__ from "node:stream";
|
|
39
39
|
import * as __WEBPACK_EXTERNAL_MODULE_node_stream_promises__ from "node:stream/promises";
|
|
40
|
-
import * as __WEBPACK_EXTERNAL_MODULE__hot_updater_supabase__ from "@hot-updater/supabase";
|
|
41
40
|
import * as __WEBPACK_EXTERNAL_MODULE_commander__ from "commander";
|
|
42
41
|
var __webpack_modules__ = {
|
|
43
42
|
"../../node_modules/.pnpm/ansi-align@3.0.1/node_modules/ansi-align/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
@@ -21873,8 +21872,8 @@ const selectProject = async ()=>{
|
|
|
21873
21872
|
"list",
|
|
21874
21873
|
"--output",
|
|
21875
21874
|
"json"
|
|
21876
|
-
]);
|
|
21877
|
-
projectsProcess = JSON.parse(listProjects
|
|
21875
|
+
], {});
|
|
21876
|
+
projectsProcess = "null" === listProjects.stdout ? [] : JSON.parse(listProjects?.stdout ?? "[]");
|
|
21878
21877
|
} catch (err) {
|
|
21879
21878
|
spinner.stop();
|
|
21880
21879
|
console.error("Failed to list Supabase projects:", err);
|
|
@@ -21975,7 +21974,8 @@ const linkSupabase = async (supabasePath, projectId)=>{
|
|
|
21975
21974
|
const spinner = __WEBPACK_EXTERNAL_MODULE__clack_prompts__.spinner();
|
|
21976
21975
|
spinner.start("Linking Supabase...");
|
|
21977
21976
|
try {
|
|
21978
|
-
await
|
|
21977
|
+
const { supabaseConfigTomlTemplate } = await import("@hot-updater/supabase");
|
|
21978
|
+
await __WEBPACK_EXTERNAL_MODULE_fs_promises__["default"].writeFile(external_path_["default"].join(supabasePath, "supabase", "config.toml"), transformTemplate(supabaseConfigTomlTemplate, {
|
|
21979
21979
|
projectId
|
|
21980
21980
|
}));
|
|
21981
21981
|
await execa("npx", [
|
|
@@ -22077,7 +22077,8 @@ const initSupabase = async ()=>{
|
|
|
22077
22077
|
spinner.stop();
|
|
22078
22078
|
const serviceRoleKey = apiKeys.find((key)=>"service_role" === key.name);
|
|
22079
22079
|
if (!serviceRoleKey) throw new Error("Service role key not found");
|
|
22080
|
-
const
|
|
22080
|
+
const { supabaseApi } = await import("@hot-updater/supabase");
|
|
22081
|
+
const api = supabaseApi(`https://${project.id}.supabase.co`, serviceRoleKey.api_key);
|
|
22081
22082
|
const bucketId = await selectBucket(api);
|
|
22082
22083
|
const supabasePath = external_path_["default"].resolve(require.resolve("@hot-updater/supabase"), "..", "..");
|
|
22083
22084
|
await linkSupabase(supabasePath, project.id);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hot-updater",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.4.0",
|
|
4
|
+
"version": "0.4.1-0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"hot-updater": "./dist/index.js"
|
|
7
7
|
},
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@clack/prompts": "^0.9.0",
|
|
42
|
-
"@hot-updater/console": "0.4.0",
|
|
43
|
-
"@hot-updater/core": "0.4.0",
|
|
44
|
-
"@hot-updater/plugin-core": "0.4.0",
|
|
42
|
+
"@hot-updater/console": "0.4.1-0",
|
|
43
|
+
"@hot-updater/core": "0.4.1-0",
|
|
44
|
+
"@hot-updater/plugin-core": "0.4.1-0",
|
|
45
45
|
"commander": "^11.1.0",
|
|
46
46
|
"cosmiconfig": "^9.0.0",
|
|
47
47
|
"cosmiconfig-typescript-loader": "^5.0.0"
|