@hot-updater/console 0.18.4 → 0.19.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 CHANGED
@@ -1911,10 +1911,12 @@ const prepareConfig = async () => {
1911
1911
  try {
1912
1912
  const config = await (0, __hot_updater_plugin_core.loadConfig)(null);
1913
1913
  const databasePlugin = await config?.database({ cwd: (0, __hot_updater_plugin_core.getCwd)() }) ?? null;
1914
+ const storagePlugin = await config?.storage({ cwd: (0, __hot_updater_plugin_core.getCwd)() }) ?? null;
1914
1915
  if (!databasePlugin) throw new Error("Database plugin initialization failed");
1915
1916
  return {
1916
1917
  config,
1917
- databasePlugin
1918
+ databasePlugin,
1919
+ storagePlugin
1918
1920
  };
1919
1921
  } catch (error) {
1920
1922
  console.error("Error during configuration initialization:", error);
@@ -1995,6 +1997,21 @@ const rpc = new Hono().get("/config", async (c) => {
1995
1997
  if (error && typeof error === "object" && "message" in error) return c.json({ error: error.message }, 500);
1996
1998
  return c.json({ error: "Unknown error" }, 500);
1997
1999
  }
2000
+ }).delete("/bundles/:bundleId", typiaValidator("param", paramBundleIdSchema), async (c) => {
2001
+ try {
2002
+ const { bundleId } = c.req.valid("param");
2003
+ const { databasePlugin, storagePlugin } = await prepareConfig();
2004
+ const deleteBundle = await databasePlugin.getBundleById(bundleId);
2005
+ if (!deleteBundle) return c.json({ error: "Bundle not found" }, 404);
2006
+ await databasePlugin.deleteBundle(deleteBundle);
2007
+ await databasePlugin.commitBundle();
2008
+ await storagePlugin.deleteBundle(bundleId);
2009
+ return c.json({ success: true });
2010
+ } catch (error) {
2011
+ console.error("Error during bundle deletion:", error);
2012
+ if (error && typeof error === "object" && "message" in error) return c.json({ error: error.message }, 500);
2013
+ return c.json({ error: "Unknown error" }, 500);
2014
+ }
1998
2015
  });
1999
2016
 
2000
2017
  //#endregion
package/dist/index.d.cts CHANGED
@@ -143,6 +143,40 @@ declare const app: Hono<{}, {
143
143
  outputFormat: "json";
144
144
  status: 500;
145
145
  };
146
+ $delete: {
147
+ input: {
148
+ param: {
149
+ bundleId: string;
150
+ };
151
+ };
152
+ output: {
153
+ error: string;
154
+ };
155
+ outputFormat: "json";
156
+ status: 404;
157
+ } | {
158
+ input: {
159
+ param: {
160
+ bundleId: string;
161
+ };
162
+ };
163
+ output: {
164
+ success: boolean;
165
+ };
166
+ outputFormat: "json";
167
+ status: hono_utils_http_status0.StatusCode;
168
+ } | {
169
+ input: {
170
+ param: {
171
+ bundleId: string;
172
+ };
173
+ };
174
+ output: {
175
+ error: string;
176
+ };
177
+ outputFormat: "json";
178
+ status: 500;
179
+ };
146
180
  };
147
181
  } & {
148
182
  "*": {
package/dist/index.d.ts CHANGED
@@ -143,6 +143,40 @@ declare const app: Hono<{}, {
143
143
  outputFormat: "json";
144
144
  status: 500;
145
145
  };
146
+ $delete: {
147
+ input: {
148
+ param: {
149
+ bundleId: string;
150
+ };
151
+ };
152
+ output: {
153
+ error: string;
154
+ };
155
+ outputFormat: "json";
156
+ status: 404;
157
+ } | {
158
+ input: {
159
+ param: {
160
+ bundleId: string;
161
+ };
162
+ };
163
+ output: {
164
+ success: boolean;
165
+ };
166
+ outputFormat: "json";
167
+ status: hono_utils_http_status0.StatusCode;
168
+ } | {
169
+ input: {
170
+ param: {
171
+ bundleId: string;
172
+ };
173
+ };
174
+ output: {
175
+ error: string;
176
+ };
177
+ outputFormat: "json";
178
+ status: 500;
179
+ };
146
180
  };
147
181
  } & {
148
182
  "*": {
package/dist/index.html CHANGED
@@ -5,8 +5,8 @@
5
5
  <link rel="icon" type="image/x-icon" href="/assets/favicon-BkwcEHsj.ico" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Hot Updater Console</title>
8
- <script type="module" crossorigin src="/assets/index-BFsYBw_S.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-Q65436jZ.css">
8
+ <script type="module" crossorigin src="/assets/index-B7wIrWdR.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-9iY4CVPq.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
package/dist/index.js CHANGED
@@ -1911,10 +1911,12 @@ const prepareConfig = async () => {
1911
1911
  try {
1912
1912
  const config = await loadConfig(null);
1913
1913
  const databasePlugin = await config?.database({ cwd: getCwd() }) ?? null;
1914
+ const storagePlugin = await config?.storage({ cwd: getCwd() }) ?? null;
1914
1915
  if (!databasePlugin) throw new Error("Database plugin initialization failed");
1915
1916
  return {
1916
1917
  config,
1917
- databasePlugin
1918
+ databasePlugin,
1919
+ storagePlugin
1918
1920
  };
1919
1921
  } catch (error) {
1920
1922
  console.error("Error during configuration initialization:", error);
@@ -1995,6 +1997,21 @@ const rpc = new Hono().get("/config", async (c) => {
1995
1997
  if (error && typeof error === "object" && "message" in error) return c.json({ error: error.message }, 500);
1996
1998
  return c.json({ error: "Unknown error" }, 500);
1997
1999
  }
2000
+ }).delete("/bundles/:bundleId", typiaValidator("param", paramBundleIdSchema), async (c) => {
2001
+ try {
2002
+ const { bundleId } = c.req.valid("param");
2003
+ const { databasePlugin, storagePlugin } = await prepareConfig();
2004
+ const deleteBundle = await databasePlugin.getBundleById(bundleId);
2005
+ if (!deleteBundle) return c.json({ error: "Bundle not found" }, 404);
2006
+ await databasePlugin.deleteBundle(deleteBundle);
2007
+ await databasePlugin.commitBundle();
2008
+ await storagePlugin.deleteBundle(bundleId);
2009
+ return c.json({ success: true });
2010
+ } catch (error) {
2011
+ console.error("Error during bundle deletion:", error);
2012
+ if (error && typeof error === "object" && "message" in error) return c.json({ error: error.message }, 500);
2013
+ return c.json({ error: "Unknown error" }, 500);
2014
+ }
1998
2015
  });
1999
2016
 
2000
2017
  //#endregion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hot-updater/console",
3
3
  "type": "module",
4
- "version": "0.18.4",
4
+ "version": "0.19.0",
5
5
  "files": [
6
6
  "dist",
7
7
  "package.json"
@@ -21,13 +21,13 @@
21
21
  "@hono/node-server": "^1.13.4",
22
22
  "@hono/typia-validator": "^0.1.2",
23
23
  "@hono/vite-dev-server": "^0.18.1",
24
- "@kobalte/core": "^0.13.7",
24
+ "@kobalte/core": "^0.13.10",
25
25
  "@ryoppippi/unplugin-typia": "^2.0.3",
26
26
  "@solidjs/meta": "^0.29.4",
27
27
  "@solidjs/router": "^0.14.10",
28
- "@tanstack/solid-form": "^0.34.0",
29
- "@tanstack/solid-query": "^5.66.4",
30
- "@tanstack/solid-table": "^8.20.5",
28
+ "@tanstack/solid-form": "^1.12.2",
29
+ "@tanstack/solid-query": "^5.80.6",
30
+ "@tanstack/solid-table": "^8.21.3",
31
31
  "@types/node": "^22.8.6",
32
32
  "@types/semver": "^7.5.8",
33
33
  "autoprefixer": "^10.4.19",
@@ -48,12 +48,12 @@
48
48
  "vite": "^6.1.0",
49
49
  "vite-plugin-solid": "^2.11.1",
50
50
  "vite-tsconfig-paths": "^5.1.4",
51
- "@hot-updater/mock": "0.18.4"
51
+ "@hot-updater/mock": "0.19.0"
52
52
  },
53
53
  "dependencies": {
54
54
  "solid-icons": "^1.1.0",
55
- "@hot-updater/core": "0.18.4",
56
- "@hot-updater/plugin-core": "0.18.4"
55
+ "@hot-updater/core": "0.19.0",
56
+ "@hot-updater/plugin-core": "0.19.0"
57
57
  },
58
58
  "scripts": {
59
59
  "build": "vite build --mode client && tsdown",