hot-updater 0.4.0 → 0.4.1-1
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 +17 -7
- package/dist/index.js +13 -7
- 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");
|
|
@@ -21831,6 +21835,10 @@ Instead, \`yield\` should either be called with a value, or not be called at all
|
|
|
21831
21835
|
createExeca(mapNode);
|
|
21832
21836
|
createExeca(mapScriptAsync, {}, deepScriptOptions, setScriptSync);
|
|
21833
21837
|
const { sendMessage: execa_sendMessage, getOneMessage: execa_getOneMessage, getEachMessage: execa_getEachMessage, getCancelSignal: execa_getCancelSignal } = getIpcExport();
|
|
21838
|
+
const ensurePackageVersion = (pkg)=>{
|
|
21839
|
+
if ("hot-updater" === pkg || pkg.startsWith("@hot-updater/")) return `${pkg}@${packageJson_version}`;
|
|
21840
|
+
return pkg;
|
|
21841
|
+
};
|
|
21834
21842
|
const ensureInstallPackages = async (buildPluginPackages)=>{
|
|
21835
21843
|
const packages = await readPackageUp({
|
|
21836
21844
|
cwd: (0, plugin_core_namespaceObject.getCwd)()
|
|
@@ -21846,7 +21854,8 @@ Instead, \`yield\` should either be called with a value, or not be called at all
|
|
|
21846
21854
|
message(`Installing ${dependenciesToInstall.join(", ")}...`);
|
|
21847
21855
|
await execa(packageManager, [
|
|
21848
21856
|
"install",
|
|
21849
|
-
...dependenciesToInstall
|
|
21857
|
+
...dependenciesToInstall.map(ensurePackageVersion),
|
|
21858
|
+
"yarn" === packageManager ? "--dev" : "--save-dev"
|
|
21850
21859
|
]);
|
|
21851
21860
|
return `Installed ${dependenciesToInstall.join(", ")}`;
|
|
21852
21861
|
}
|
|
@@ -21858,7 +21867,7 @@ Instead, \`yield\` should either be called with a value, or not be called at all
|
|
|
21858
21867
|
message(`Installing ${devDependenciesToInstall.join(", ")}...`);
|
|
21859
21868
|
await execa(packageManager, [
|
|
21860
21869
|
"install",
|
|
21861
|
-
...devDependenciesToInstall,
|
|
21870
|
+
...devDependenciesToInstall.map(ensurePackageVersion),
|
|
21862
21871
|
"yarn" === packageManager ? "--dev" : "--save-dev"
|
|
21863
21872
|
]);
|
|
21864
21873
|
return `Installed ${devDependenciesToInstall.join(", ")}`;
|
|
@@ -21903,7 +21912,6 @@ Instead, \`yield\` should either be called with a value, or not be called at all
|
|
|
21903
21912
|
}
|
|
21904
21913
|
return result;
|
|
21905
21914
|
}
|
|
21906
|
-
const supabase_namespaceObject = require("@hot-updater/supabase");
|
|
21907
21915
|
const CONFIG_TEMPLATE = `
|
|
21908
21916
|
import { metro } from "@hot-updater/metro";
|
|
21909
21917
|
import { supabaseDatabase, supabaseStorage } from "@hot-updater/supabase";
|
|
@@ -21972,8 +21980,8 @@ export default HotUpdater.wrap({
|
|
|
21972
21980
|
"list",
|
|
21973
21981
|
"--output",
|
|
21974
21982
|
"json"
|
|
21975
|
-
]);
|
|
21976
|
-
projectsProcess = JSON.parse(listProjects
|
|
21983
|
+
], {});
|
|
21984
|
+
projectsProcess = "null" === listProjects.stdout ? [] : JSON.parse(listProjects?.stdout ?? "[]");
|
|
21977
21985
|
} catch (err) {
|
|
21978
21986
|
spinner.stop();
|
|
21979
21987
|
console.error("Failed to list Supabase projects:", err);
|
|
@@ -22074,7 +22082,8 @@ export default HotUpdater.wrap({
|
|
|
22074
22082
|
const spinner = prompts_namespaceObject.spinner();
|
|
22075
22083
|
spinner.start("Linking Supabase...");
|
|
22076
22084
|
try {
|
|
22077
|
-
await
|
|
22085
|
+
const { supabaseConfigTomlTemplate } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "@hot-updater/supabase"));
|
|
22086
|
+
await promises_default().writeFile(external_path_default().join(supabasePath, "supabase", "config.toml"), transformTemplate(supabaseConfigTomlTemplate, {
|
|
22078
22087
|
projectId
|
|
22079
22088
|
}));
|
|
22080
22089
|
await execa("npx", [
|
|
@@ -22176,7 +22185,8 @@ export default HotUpdater.wrap({
|
|
|
22176
22185
|
spinner.stop();
|
|
22177
22186
|
const serviceRoleKey = apiKeys.find((key)=>"service_role" === key.name);
|
|
22178
22187
|
if (!serviceRoleKey) throw new Error("Service role key not found");
|
|
22179
|
-
const
|
|
22188
|
+
const { supabaseApi } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "@hot-updater/supabase"));
|
|
22189
|
+
const api = supabaseApi(`https://${project.id}.supabase.co`, serviceRoleKey.api_key);
|
|
22180
22190
|
const bucketId = await selectBucket(api);
|
|
22181
22191
|
const supabasePath = external_path_default().resolve(require.resolve("@hot-updater/supabase"), "..", "..");
|
|
22182
22192
|
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__) {
|
|
@@ -21733,6 +21732,10 @@ createExeca(mapCommandSync);
|
|
|
21733
21732
|
createExeca(mapNode);
|
|
21734
21733
|
createExeca(mapScriptAsync, {}, deepScriptOptions, setScriptSync);
|
|
21735
21734
|
const { sendMessage: execa_sendMessage, getOneMessage: execa_getOneMessage, getEachMessage: execa_getEachMessage, getCancelSignal: execa_getCancelSignal } = getIpcExport();
|
|
21735
|
+
const ensurePackageVersion = (pkg)=>{
|
|
21736
|
+
if ("hot-updater" === pkg || pkg.startsWith("@hot-updater/")) return `${pkg}@${packageJson_version}`;
|
|
21737
|
+
return pkg;
|
|
21738
|
+
};
|
|
21736
21739
|
const ensureInstallPackages = async (buildPluginPackages)=>{
|
|
21737
21740
|
const packages = await readPackageUp({
|
|
21738
21741
|
cwd: (0, __WEBPACK_EXTERNAL_MODULE__hot_updater_plugin_core__.getCwd)()
|
|
@@ -21748,7 +21751,8 @@ const ensureInstallPackages = async (buildPluginPackages)=>{
|
|
|
21748
21751
|
message(`Installing ${dependenciesToInstall.join(", ")}...`);
|
|
21749
21752
|
await execa(packageManager, [
|
|
21750
21753
|
"install",
|
|
21751
|
-
...dependenciesToInstall
|
|
21754
|
+
...dependenciesToInstall.map(ensurePackageVersion),
|
|
21755
|
+
"yarn" === packageManager ? "--dev" : "--save-dev"
|
|
21752
21756
|
]);
|
|
21753
21757
|
return `Installed ${dependenciesToInstall.join(", ")}`;
|
|
21754
21758
|
}
|
|
@@ -21760,7 +21764,7 @@ const ensureInstallPackages = async (buildPluginPackages)=>{
|
|
|
21760
21764
|
message(`Installing ${devDependenciesToInstall.join(", ")}...`);
|
|
21761
21765
|
await execa(packageManager, [
|
|
21762
21766
|
"install",
|
|
21763
|
-
...devDependenciesToInstall,
|
|
21767
|
+
...devDependenciesToInstall.map(ensurePackageVersion),
|
|
21764
21768
|
"yarn" === packageManager ? "--dev" : "--save-dev"
|
|
21765
21769
|
]);
|
|
21766
21770
|
return `Installed ${devDependenciesToInstall.join(", ")}`;
|
|
@@ -21873,8 +21877,8 @@ const selectProject = async ()=>{
|
|
|
21873
21877
|
"list",
|
|
21874
21878
|
"--output",
|
|
21875
21879
|
"json"
|
|
21876
|
-
]);
|
|
21877
|
-
projectsProcess = JSON.parse(listProjects
|
|
21880
|
+
], {});
|
|
21881
|
+
projectsProcess = "null" === listProjects.stdout ? [] : JSON.parse(listProjects?.stdout ?? "[]");
|
|
21878
21882
|
} catch (err) {
|
|
21879
21883
|
spinner.stop();
|
|
21880
21884
|
console.error("Failed to list Supabase projects:", err);
|
|
@@ -21975,7 +21979,8 @@ const linkSupabase = async (supabasePath, projectId)=>{
|
|
|
21975
21979
|
const spinner = __WEBPACK_EXTERNAL_MODULE__clack_prompts__.spinner();
|
|
21976
21980
|
spinner.start("Linking Supabase...");
|
|
21977
21981
|
try {
|
|
21978
|
-
await
|
|
21982
|
+
const { supabaseConfigTomlTemplate } = await import("@hot-updater/supabase");
|
|
21983
|
+
await __WEBPACK_EXTERNAL_MODULE_fs_promises__["default"].writeFile(external_path_["default"].join(supabasePath, "supabase", "config.toml"), transformTemplate(supabaseConfigTomlTemplate, {
|
|
21979
21984
|
projectId
|
|
21980
21985
|
}));
|
|
21981
21986
|
await execa("npx", [
|
|
@@ -22077,7 +22082,8 @@ const initSupabase = async ()=>{
|
|
|
22077
22082
|
spinner.stop();
|
|
22078
22083
|
const serviceRoleKey = apiKeys.find((key)=>"service_role" === key.name);
|
|
22079
22084
|
if (!serviceRoleKey) throw new Error("Service role key not found");
|
|
22080
|
-
const
|
|
22085
|
+
const { supabaseApi } = await import("@hot-updater/supabase");
|
|
22086
|
+
const api = supabaseApi(`https://${project.id}.supabase.co`, serviceRoleKey.api_key);
|
|
22081
22087
|
const bucketId = await selectBucket(api);
|
|
22082
22088
|
const supabasePath = external_path_["default"].resolve(require.resolve("@hot-updater/supabase"), "..", "..");
|
|
22083
22089
|
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.
|
|
4
|
+
"version": "0.4.1-1",
|
|
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.
|
|
43
|
-
"@hot-updater/core": "0.4.
|
|
44
|
-
"@hot-updater/plugin-core": "0.4.
|
|
42
|
+
"@hot-updater/console": "0.4.1-1",
|
|
43
|
+
"@hot-updater/core": "0.4.1-1",
|
|
44
|
+
"@hot-updater/plugin-core": "0.4.1-1",
|
|
45
45
|
"commander": "^11.1.0",
|
|
46
46
|
"cosmiconfig": "^9.0.0",
|
|
47
47
|
"cosmiconfig-typescript-loader": "^5.0.0"
|