@unraid-toolkit/cli 0.2.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.
Files changed (51) hide show
  1. package/LICENSE +21 -0
  2. package/dist/.tsbuildinfo +1 -0
  3. package/dist/cli.d.ts +48 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +65 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/commands/array.d.ts +8 -0
  8. package/dist/commands/array.d.ts.map +1 -0
  9. package/dist/commands/array.js +129 -0
  10. package/dist/commands/array.js.map +1 -0
  11. package/dist/commands/disks.d.ts +8 -0
  12. package/dist/commands/disks.d.ts.map +1 -0
  13. package/dist/commands/disks.js +19 -0
  14. package/dist/commands/disks.js.map +1 -0
  15. package/dist/commands/docker.d.ts +8 -0
  16. package/dist/commands/docker.d.ts.map +1 -0
  17. package/dist/commands/docker.js +85 -0
  18. package/dist/commands/docker.js.map +1 -0
  19. package/dist/commands/notifications.d.ts +8 -0
  20. package/dist/commands/notifications.d.ts.map +1 -0
  21. package/dist/commands/notifications.js +67 -0
  22. package/dist/commands/notifications.js.map +1 -0
  23. package/dist/commands/run.d.ts +33 -0
  24. package/dist/commands/run.d.ts.map +1 -0
  25. package/dist/commands/run.js +67 -0
  26. package/dist/commands/run.js.map +1 -0
  27. package/dist/commands/shares.d.ts +8 -0
  28. package/dist/commands/shares.d.ts.map +1 -0
  29. package/dist/commands/shares.js +19 -0
  30. package/dist/commands/shares.js.map +1 -0
  31. package/dist/commands/system.d.ts +17 -0
  32. package/dist/commands/system.d.ts.map +1 -0
  33. package/dist/commands/system.js +37 -0
  34. package/dist/commands/system.js.map +1 -0
  35. package/dist/commands/ups.d.ts +8 -0
  36. package/dist/commands/ups.d.ts.map +1 -0
  37. package/dist/commands/ups.js +19 -0
  38. package/dist/commands/ups.js.map +1 -0
  39. package/dist/commands/vm.d.ts +8 -0
  40. package/dist/commands/vm.d.ts.map +1 -0
  41. package/dist/commands/vm.js +56 -0
  42. package/dist/commands/vm.js.map +1 -0
  43. package/dist/index.d.ts +11 -0
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +20 -0
  46. package/dist/index.js.map +1 -0
  47. package/dist/output.d.ts +23 -0
  48. package/dist/output.d.ts.map +1 -0
  49. package/dist/output.js +36 -0
  50. package/dist/output.js.map +1 -0
  51. package/package.json +29 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mike North
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.float16.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/typings/index.d.ts","../../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/typings/esm.d.mts","../../sdk/dist/config.d.ts","../../sdk/dist/client.d.ts","../../sdk/dist/errors.d.ts","../../sdk/dist/result.d.ts","../../sdk/dist/constants.d.ts","../../sdk/dist/pagination.d.ts","../../sdk/dist/types.d.ts","../../sdk/dist/unraid/generated.d.ts","../../sdk/dist/operations/system.d.ts","../../sdk/dist/operations/array.d.ts","../../sdk/dist/operations/disks.d.ts","../../sdk/dist/operations/docker.d.ts","../../sdk/dist/operations/vm.d.ts","../../sdk/dist/operations/shares.d.ts","../../sdk/dist/operations/notifications.d.ts","../../sdk/dist/operations/ups.d.ts","../../sdk/dist/index.d.ts","../src/output.ts","../src/commands/run.ts","../src/commands/system.ts","../src/commands/array.ts","../src/commands/disks.ts","../src/commands/docker.ts","../src/commands/vm.ts","../src/commands/shares.ts","../src/commands/notifications.ts","../src/commands/ups.ts","../src/cli.ts","../src/index.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/web-globals/crypto.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/utility.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/client-stats.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/h2c-client.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/mock-call-history.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/snapshot-agent.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/cache-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@7.16.0/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/web-globals/streams.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@24.12.4/node_modules/@types/node/index.d.ts"],"fileIdsList":[[105,157,158,160,177,178],[105,159,160,177,178],[160,177,178],[105,160,165,177,178,195],[105,160,161,166,171,177,178,180,192,203],[105,160,161,162,171,177,178,180],[105,160,177,178],[105,160,163,177,178,204],[105,160,164,165,172,177,178,181],[105,160,165,177,178,192,200],[105,160,166,168,171,177,178,180],[105,159,160,167,177,178],[105,160,168,169,177,178],[105,160,170,171,177,178],[105,159,160,171,177,178],[105,160,171,172,173,177,178,192,203],[105,160,171,172,173,177,178,187,192,195],[105,152,160,168,171,174,177,178,180,192,203],[105,160,171,172,174,175,177,178,180,192,200,203],[105,160,174,176,177,178,192,200,203],[103,104,105,106,107,108,109,110,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209],[105,160,171,177,178],[105,160,177,178,179,203],[105,160,168,171,177,178,180,192],[105,160,177,178,181],[105,160,177,178,182],[105,159,160,177,178,183],[105,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209],[105,160,177,178,185],[105,160,177,178,186],[105,160,171,177,178,187,188],[105,160,177,178,187,189,204,206],[105,160,172,177,178],[105,160,171,177,178,192,193,195],[105,160,177,178,194,195],[105,160,177,178,192,193],[105,160,177,178,195],[105,160,177,178,196],[105,157,160,177,178,192,197,203],[105,160,171,177,178,198,199],[105,160,177,178,198,199],[105,160,165,177,178,180,192,200],[105,160,177,178,201],[105,160,177,178,180,202],[105,160,174,177,178,186,203],[105,160,165,177,178,204],[105,160,177,178,192,205],[105,160,177,178,179,206],[105,160,177,178,207],[105,160,165,177,178],[105,152,160,177,178],[105,160,177,178,208],[105,152,160,171,173,177,178,183,192,195,203,205,206,208],[105,160,177,178,192,209],[72,105,160,177,178],[105,118,121,124,125,160,177,178,203],[105,121,160,177,178,192,203],[105,121,125,160,177,178,203],[105,160,177,178,192],[105,115,160,177,178],[105,119,160,177,178],[105,117,118,121,160,177,178,203],[105,160,177,178,180,200],[105,160,177,178,210],[105,115,160,177,178,210],[105,117,121,160,177,178,180,203],[105,112,113,114,116,120,160,171,177,178,192,203],[105,121,129,137,160,177,178],[105,113,119,160,177,178],[105,121,146,147,160,177,178],[105,113,116,121,160,177,178,195,203,210],[105,121,160,177,178],[105,117,121,160,177,178,203],[105,112,160,177,178],[105,115,116,117,119,120,121,122,123,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,147,148,149,150,151,160,177,178],[105,121,139,142,160,168,177,178],[105,121,129,130,131,160,177,178],[105,119,121,130,132,160,177,178],[105,120,160,177,178],[105,113,115,121,160,177,178],[105,121,125,130,132,160,177,178],[105,125,160,177,178],[105,119,121,124,160,177,178,203],[105,113,117,121,129,160,177,178],[105,121,139,160,177,178],[105,132,160,177,178],[105,115,121,146,160,177,178,195,208,210],[73,93,94,95,96,97,98,99,100,105,160,177,178],[73,90,92,101,105,160,177,178],[73,90,91,101,105,160,177,178],[101,105,160,177,178,182,203],[90,105,160,177,178],[74,105,160,177,178],[74,75,76,77,78,79,80,82,83,84,85,86,87,88,89,105,160,177,178],[75,77,79,81,105,160,177,178],[75,77,80,81,105,160,177,178],[76,105,160,177,178]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"196cb558a13d4533a5163286f30b0509ce0210e4b316c56c38d4c0fd2fb38405","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"0237580177f1a858ab125992af8a6dfc29268fe7d4bac5308b9f462f88b0cd31","impliedFormat":1},{"version":"b124c0624b15412ace7d54644ade38d7a69db7e25488a1a4d2a8df6e11696538","impliedFormat":99},{"version":"35d400e3b47a671e90283bdc62b7811c9f86d1a3edb4d167654e4dfd8c5889f7","impliedFormat":99},{"version":"a1bed00cacdced229ff2a784db6dcc452604f482e331a328704cd2d2d41c32ee","impliedFormat":99},{"version":"b906f3ad6dd466947b07f5663a1123e5bcdc91309815c334ad26bece99750f69","impliedFormat":99},{"version":"568e35c72df3c025bd50829e6599779b9b9102d85181290fcbd01fc906aba543","impliedFormat":99},{"version":"78e294010f990439953306b88a5f64714e495f04c6de2fa18e842f9e318d632b","impliedFormat":99},{"version":"be41341eb4ad2064b37c901724d8a2863468841005936b045e8e9f978b1a7ba8","impliedFormat":99},{"version":"bbd3d577b8b1d08d5110ee6ef6a0e5f3ea7c36c3ca5aea25227f439eacc8a6c4","impliedFormat":99},{"version":"2703aeba54b917bdde5a47bc4c5530239d45268aebb77e46c168c44e21dd0b46","impliedFormat":99},{"version":"9a314e5d2ae8b0dab8faf6990d88ee34428a8606ceeff875ec980214ccfa678e","impliedFormat":99},{"version":"a87e87c258504cb8bc63156e800efbe74504b8aaa089bc06a1c850ebafc2c7df","impliedFormat":99},{"version":"084a6db24aae4d984a51823d2f947b568b2203f0d875fb1b0eece2a1f2503bdb","impliedFormat":99},{"version":"c68af0a8bc841154f11ad20d05533ba180660be37d1ecfa9f96a005452515401","impliedFormat":99},{"version":"055f7b9e62a611cb487e9e5d31e791ec563f8e7053771a2459f8a5aac1342e46","impliedFormat":99},{"version":"41611c709bf584f66755e2537a210003cd810400f0c97188d2a46e07901e97f0","impliedFormat":99},{"version":"e2d2c29b218a83cb789501f5fa1e03e5567b2065c976081c9e1ab789c37a0cfe","impliedFormat":99},{"version":"6c989ec322e8cdb437dc427ce846a510d1fa3b08545e6a07f610294e931a453c","impliedFormat":99},{"version":"de87a9041f4e15c7da5fcb7fc73b7bc98cfc76227cf39e2bf59a20b94b8de55e","impliedFormat":99},{"version":"d044d79a851349653cac2acf1cb1b706598b339127ead8732a66605ead516762","signature":"a1f53cac1372cb087813238193717c793d16f3789673a173180f7c9afdccddf6","impliedFormat":99},{"version":"85010df75cc4f2aad6970ff99d0de01d8614669f0ec1da8a43d0259f5c08877c","signature":"f6b3b62b20d4482364ba79f76d8be6188067211eb443d932a146505ae99232dd","impliedFormat":99},{"version":"07b774576246e39ab1bc82654eb3245c4416af5a61b918a7ca85209f4671dd1f","signature":"87d04dd104db8908b9442a77ae45ab3b9652fd8395acd16ade136e1791565724","impliedFormat":99},{"version":"1d1e43a92f1d552e268f9da3630347f7b19f05dea853b51d8541278dd8d92004","signature":"180bd43de783b1ea00559b1e76dab116d15bbc0112e1d5f1d4ca7eb8e18a755f","impliedFormat":99},{"version":"3cbdb3856f266b391cd63ce7d95d8e98ce839ff8c75ac13f9b09846263401fa9","signature":"34a439a38c93c47878afcfdc93c5f74bae31880e4fb44054c4e7826bfbfda5e3","impliedFormat":99},{"version":"1ed65f94dcdd33413e01f6a0e3bc03137b18c339089f0d33bf1fecf95c78418a","signature":"cd7f00bf90348d5bffdba9169217d494e55776439b1dda0707f3f2a551e4ee3b","impliedFormat":99},{"version":"4c79cae56874b9b9667948ce33cd96f702854e4e35e886222ff97a948a91a793","signature":"9ab7bcb5d396c53cc46fdcb19f40453a11a26554f274ffdc663d27a4aee2491f","impliedFormat":99},{"version":"1e9995026f00b6066491f04e50c89e52e578424761445f214b17af7c029e1eb2","signature":"a0bbd1c25cf11e478dbb8669b0c9f30b9ed10cb0b20243a39e0fbbffc93041dd","impliedFormat":99},{"version":"df1d0da1214664c665489be286ff38fa8e0f041fecaa6bc87648eb07e80c5136","signature":"f869f0edddef13fef5d5f6087ebdc3af3e5d19af730798aca95b41e1e557a322","impliedFormat":99},{"version":"d7168249fdcc6696bdb628e4e2961409111224b051c3bb3e14eb356a52463f8f","signature":"614886639c539462f3a9e6d932018eb235c21b92e089338df5ca13c7f9845242","impliedFormat":99},{"version":"5167dae5dbb68445cb7b78935e802b479ee0d8529938c21445a4123402a49614","signature":"ecb57b499a2026ff8a96024890c082dae0198987fa13398053161a8fe1f9e78c","impliedFormat":99},{"version":"80f45718422c10b0ac9535283c2890adfaa9dc53b03a2030b06a4ba08f9b646e","signature":"63bb6d7c2d2e7d0c5122331537d94dd403b4058fd4ce368ba4d95105f8227ee8","impliedFormat":99},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"378281aa35786c27d5811af7e6bcaa492eebd0c7013d48137c35bbc69a2b9751","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"1b2dd1cbeb0cc6ae20795958ba5950395ebb2849b7c8326853dd15530c77ab0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"387a023d363f755eb63450a66c28b14cdd7bc30a104565e2dbf0a8988bb4a56c","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"cdcf9ea426ad970f96ac930cd176d5c69c6c24eebd9fc580e1572d6c6a88f62c","impliedFormat":1},{"version":"23cd712e2ce083d68afe69224587438e5914b457b8acf87073c22494d706a3d0","impliedFormat":1},{"version":"487b694c3de27ddf4ad107d4007ad304d29effccf9800c8ae23c2093638d906a","impliedFormat":1},{"version":"3a80bc85f38526ca3b08007ee80712e7bb0601df178b23fbf0bf87036fce40ce","impliedFormat":1},{"version":"ccf4552357ce3c159ef75f0f0114e80401702228f1898bdc9402214c9499e8c0","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"68834d631c8838c715f225509cfc3927913b9cc7a4870460b5b60c8dbdb99baf","impliedFormat":1},{"version":"2931540c47ee0ff8a62860e61782eb17b155615db61e36986e54645ec67f67c2","impliedFormat":1},{"version":"ccab02f3920fc75c01174c47fcf67882a11daf16baf9e81701d0a94636e94556","impliedFormat":1},{"version":"f6faf5f74e4c4cc309a6c6a6c4da02dbb840be5d3e92905a23dcd7b2b0bd1986","impliedFormat":1},{"version":"ea6bc8de8b59f90a7a3960005fd01988f98fd0784e14bc6922dde2e93305ec7d","impliedFormat":1},{"version":"36107995674b29284a115e21a0618c4c2751b32a8766dd4cb3ba740308b16d59","impliedFormat":1},{"version":"914a0ae30d96d71915fc519ccb4efbf2b62c0ddfb3a3fc6129151076bc01dc60","impliedFormat":1},{"version":"33e981bf6376e939f99bd7f89abec757c64897d33c005036b9a10d9587d80187","impliedFormat":1},{"version":"7fd1b31fd35876b0aa650811c25ec2c97a3c6387e5473eb18004bed86cdd76b6","impliedFormat":1},{"version":"b41767d372275c154c7ea6c9d5449d9a741b8ce080f640155cc88ba1763e35b3","impliedFormat":1},{"version":"3bacf516d686d08682751a3bd2519ea3b8041a164bfb4f1d35728993e70a2426","impliedFormat":1},{"version":"7fb266686238369442bd1719bc0d7edd0199da4fb8540354e1ff7f16669b4323","impliedFormat":1},{"version":"0a60a292b89ca7218b8616f78e5bbd1c96b87e048849469cccb4355e98af959a","impliedFormat":1},{"version":"0b6e25234b4eec6ed96ab138d96eb70b135690d7dd01f3dd8a8ab291c35a683a","impliedFormat":1},{"version":"9666f2f84b985b62400d2e5ab0adae9ff44de9b2a34803c2c5bd3c8325b17dc0","impliedFormat":1},{"version":"40cd35c95e9cf22cfa5bd84e96408b6fcbca55295f4ff822390abb11afbc3dca","impliedFormat":1},{"version":"b1616b8959bf557feb16369c6124a97a0e74ed6f49d1df73bb4b9ddf68acf3f3","impliedFormat":1},{"version":"5b03a034c72146b61573aab280f295b015b9168470f2df05f6080a2122f9b4df","impliedFormat":1},{"version":"40b463c6766ca1b689bfcc46d26b5e295954f32ad43e37ee6953c0a677e4ae2b","impliedFormat":1},{"version":"249b9cab7f5d628b71308c7d9bb0a808b50b091e640ba3ed6e2d0516f4a8d91d","impliedFormat":1},{"version":"80aae6afc67faa5ac0b32b5b8bc8cc9f7fa299cff15cf09cc2e11fd28c6ae29e","impliedFormat":1},{"version":"f473cd2288991ff3221165dcf73cd5d24da30391f87e85b3dd4d0450c787a391","impliedFormat":1},{"version":"499e5b055a5aba1e1998f7311a6c441a369831c70905cc565ceac93c28083d53","impliedFormat":1},{"version":"54c3e2371e3d016469ad959697fd257e5621e16296fa67082c2575d0bf8eced0","impliedFormat":1},{"version":"beb8233b2c220cfa0feea31fbe9218d89fa02faa81ef744be8dce5acb89bb1fd","impliedFormat":1},{"version":"c183b931b68ad184bc8e8372bf663f3d33304772fb482f29fb91b3c391031f3e","impliedFormat":1},{"version":"5d0375ca7310efb77e3ef18d068d53784faf62705e0ad04569597ae0e755c401","impliedFormat":1},{"version":"59af37caec41ecf7b2e76059c9672a49e682c1a2aa6f9d7dc78878f53aa284d6","impliedFormat":1},{"version":"addf417b9eb3f938fddf8d81e96393a165e4be0d4a8b6402292f9c634b1cb00d","impliedFormat":1},{"version":"48cc3ec153b50985fb95153258a710782b25975b10dd4ac8a4f3920632d10790","impliedFormat":1},{"version":"adf27937dba6af9f08a68c5b1d3fce0ca7d4b960c57e6d6c844e7d1a8e53adae","impliedFormat":1},{"version":"e1528ca65ac90f6fa0e4a247eb656b4263c470bb22d9033e466463e13395e599","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"866078923a56d026e39243b4392e282c1c63159723996fa89243140e1388a98d","impliedFormat":1},{"version":"f724236417941ea77ec8d38c6b7021f5fb7f8521c7f8c1538e87661f2c6a0774","affectsGlobalScope":true,"impliedFormat":1},{"version":"1cf059eaf468efcc649f8cf6075d3cb98e9a35a0fe9c44419ec3d2f5428d7123","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d97fb21da858fb18b8ae72c314e9743fd52f73ebe2764e12af1db32fc03f853f","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ea15fd99b2e34cb25fe8346c955000bb70c8b423ae4377a972ef46bfb37f595","impliedFormat":1},{"version":"7cf69dd5502c41644c9e5106210b5da7144800670cbe861f66726fa209e231c4","impliedFormat":1},{"version":"72c1f5e0a28e473026074817561d1bc9647909cf253c8d56c41d1df8d95b85f7","impliedFormat":1},{"version":"f9b4137a0d285bd77dba2e6e895530112264310ae47e07bf311feae428fb8b61","affectsGlobalScope":true,"impliedFormat":1},{"version":"c06b2652ffeb89afd0f1c52c165ced77032f9cd09bc481153fbd6b5504c69494","impliedFormat":1},{"version":"51aecd2df90a3cffea1eb4696b33b2d78594ea2aa2138e6b9471ec4841c6c2ee","impliedFormat":1},{"version":"9d8f9e63e29a3396285620908e7f14d874d066caea747dc4b2c378f0599166b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"612422d5ba6b4a5c4537f423e9199645468ad80a689801da63ab7edb43f7b835","impliedFormat":1},{"version":"db9ada976f9e52e13f7ae8b9a320f4b67b87685938c5879187d8864b2fbe97f3","impliedFormat":1},{"version":"9f39e70a354d0fba29ac3cdf6eca00b7f9e96f64b2b2780c432e8ea27f133743","impliedFormat":1},{"version":"0dace96cc0f7bc6d0ee2044921bdf19fe42d16284dbcc8ae200800d1c9579335","impliedFormat":1},{"version":"a2e2bbde231b65c53c764c12313897ffdfb6c49183dd31823ee2405f2f7b5378","impliedFormat":1},{"version":"ad1cc0ed328f3f708771272021be61ab146b32ecf2b78f3224959ff1e2cd2a5c","impliedFormat":1},{"version":"c64e1888baaa3253ca4405b455e4bf44f76357868a1bd0a52998ade9a092ad78","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc8c6f5322961b56d9906601b20798725df60baeab45ec014fba9f795d5596fd","impliedFormat":1},{"version":"0904660ae854e6d41f6ff25356db1d654436c6305b0f0aa89d1532df0253486e","impliedFormat":1},{"version":"060d305fe4494d8cb2b99d620928d369d1ee55c1645f5e729a2aca07d0f108cb","impliedFormat":1},{"version":"a016b2a26863dd6acb1f18c4ff37363c2b51e27ca7b3374dc6342aff1ddead2d","impliedFormat":1},{"version":"0c50296ee73dae94efc3f0da4936b1146ca6ce2217acfabb44c19c9a33fa30e5","impliedFormat":1},{"version":"bbf42f98a5819f4f06e18c8b669a994afe9a17fe520ae3454a195e6eabf7700d","impliedFormat":1},{"version":"0e5974dfff7a97181c7c376545f126b20acf2f1341db7d3fccea4977bf3ce19c","impliedFormat":1},{"version":"c7f977ea78a1b060a30554c1c4ec0e2269c6e305a349ca2ada14931ac27ecc0b","affectsGlobalScope":true,"impliedFormat":1},{"version":"3806cdd6b48ba01a9198134e62a384ec217a98f316d4baef74dd46d62c947a63","impliedFormat":1},{"version":"ff65b8a8bd380c6d129becc35de02f7c29ad7ce03300331ca91311fb4044d1a9","impliedFormat":1},{"version":"04bf1aa481d1adfb16d93d76e44ce71c51c8ef68039d849926551199489637f6","impliedFormat":1},{"version":"2c9adcc85574b002c9a6311ff2141055769e0071856ec979d92ff989042b1f1b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b8bf3fe89ec8baa335f6370b9fa36308e1bc7a72e2eb2dad1e94f31e27fa28b5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a58a15da4c5ba3df60c910a043281256fa52d36a0fcdef9b9100c646282e88dd","impliedFormat":1},{"version":"b36beffbf8acdc3ebc58c8bb4b75574b31a2169869c70fc03f82895b93950a12","impliedFormat":1},{"version":"de263f0089aefbfd73c89562fb7254a7468b1f33b61839aafc3f035d60766cb4","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"8c81fd4a110490c43d7c578e8c6f69b3af01717189196899a6a44f93daa57a3a","impliedFormat":1},{"version":"5fb39858b2459864b139950a09adae4f38dad87c25bf572ce414f10e4bd7baab","impliedFormat":1},{"version":"35390d6fa94bdb432c5d0bcb6547bdd11406c2692a6b90b9e47be2105ea19bd6","impliedFormat":1},{"version":"3910dab597c40e173bf0e0d419d3ce9682c54ebf6ae84849f9b829b1451a17ec","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"486c074a5c0f2254345c0d1c9540380f5463999e42d7e1a159305ea823d3c4b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"c119835edf36415081dfd9ed15fc0cd37aaa28d232be029ad073f15f3d88c323","impliedFormat":1},{"version":"8e7c3bed5f19ade8f911677ddc83052e2283e25b0a8654cd89db9079d4b323c7","impliedFormat":1},{"version":"9705cd157ffbb91c5cab48bdd2de5a437a372e63f870f8a8472e72ff634d47c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"ae86f30d5d10e4f75ce8dcb6e1bd3a12ecec3d071a21e8f462c5c85c678efb41","impliedFormat":1},{"version":"ccf3afaeebbeee4ca9092101e99fd6abd681116b6e5ec23e381bbb1e1f32262c","impliedFormat":1},{"version":"e03460fe72b259f6d25ad029f085e4bedc3f90477da4401d8fbc1efa9793230e","impliedFormat":1},{"version":"4286a3a6619514fca656089aee160bb6f2e77f4dd53dc5a96b26a0b4fc778055","impliedFormat":1},{"version":"ab7818a9d57a9297b90e456fc68b77f84d74395a9210a3cfa9d87db33aff8b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb08062718a5470cd864c1fae0eb5b3a3adc5bcd05dcf87608d6f60b65eca3f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"3a815b7d1aebc0646b91548eab2fc19dada09ff255d04c71ced00bbd3058c8eb","impliedFormat":1},{"version":"255d948f87f24ffd57bcb2fdf95792fd418a2e1f712a98cf2cce88744d75085c","impliedFormat":1},{"version":"0d5b085f36e6dc55bc6332ecb9c733be3a534958c238fb8d8d18d4a2b6f2a15a","impliedFormat":1},{"version":"836b36913830645ac3b28fe33731aac3fdb3524ee8adbb4cdab9a5c189f41943","affectsGlobalScope":true,"impliedFormat":1},{"version":"bfd3b3c21a56104693183942e221c1896ee23bcb8f8d91ab0b941f7b32985411","impliedFormat":1},{"version":"d7e9ab1b0996639047c61c1e62f85c620e4382206b3abb430d9a21fb7bc23c77","impliedFormat":1}],"root":[[91,102]],"options":{"composite":true,"declaration":true,"declarationMap":true,"exactOptionalPropertyTypes":true,"module":199,"noEmitOnError":true,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noImplicitReturns":true,"noPropertyAccessFromIndexSignature":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../src","skipLibCheck":false,"sourceMap":true,"strict":true,"target":11,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[157,1],[158,1],[159,2],[105,3],[160,4],[161,5],[162,6],[103,7],[163,8],[164,9],[165,10],[166,11],[167,12],[168,13],[169,13],[170,14],[171,15],[172,16],[173,17],[106,7],[104,7],[174,18],[175,19],[176,20],[210,21],[177,22],[178,7],[179,23],[180,24],[181,25],[182,26],[183,27],[184,28],[185,29],[186,30],[187,31],[188,31],[189,32],[190,7],[191,33],[192,34],[194,35],[193,36],[195,37],[196,38],[197,39],[198,40],[199,41],[200,42],[201,43],[202,44],[203,45],[204,46],[205,47],[206,48],[207,49],[107,7],[108,50],[109,7],[110,7],[153,51],[154,52],[155,7],[156,37],[208,53],[209,54],[111,7],[73,55],[72,7],[70,7],[71,7],[13,7],[12,7],[2,7],[14,7],[15,7],[16,7],[17,7],[18,7],[19,7],[20,7],[21,7],[3,7],[22,7],[23,7],[4,7],[24,7],[28,7],[25,7],[26,7],[27,7],[29,7],[30,7],[31,7],[5,7],[32,7],[33,7],[34,7],[35,7],[6,7],[39,7],[36,7],[37,7],[38,7],[40,7],[7,7],[41,7],[46,7],[47,7],[42,7],[43,7],[44,7],[45,7],[8,7],[51,7],[48,7],[49,7],[50,7],[52,7],[9,7],[53,7],[54,7],[55,7],[57,7],[56,7],[58,7],[59,7],[10,7],[60,7],[61,7],[62,7],[11,7],[63,7],[64,7],[65,7],[66,7],[67,7],[1,7],[68,7],[69,7],[129,56],[141,57],[127,58],[142,59],[151,60],[118,61],[119,62],[117,63],[150,64],[145,65],[149,66],[121,67],[138,68],[120,69],[148,70],[115,71],[116,65],[122,72],[123,7],[128,73],[126,72],[113,74],[152,75],[143,76],[132,77],[131,72],[133,78],[136,79],[130,80],[134,81],[146,64],[124,82],[125,83],[137,84],[114,59],[140,85],[139,72],[135,86],[144,7],[112,7],[147,87],[101,88],[94,89],[95,89],[96,89],[99,89],[92,90],[98,89],[93,89],[100,89],[97,89],[102,91],[91,92],[75,93],[74,7],[78,7],[76,7],[90,94],[83,95],[84,95],[85,95],[88,95],[87,95],[82,96],[89,95],[86,95],[79,97],[77,97],[80,7],[81,7]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
package/dist/cli.d.ts ADDED
@@ -0,0 +1,48 @@
1
+ /**
2
+ * CLI factory for the Unraid CLI — builds the root Commander program.
3
+ *
4
+ * This module wires global options (URL, API key, output format) and delegates
5
+ * subcommand registration to the commands/ layer. It contains no business logic;
6
+ * all SDK interaction happens in command action handlers.
7
+ */
8
+ import { Command } from 'commander';
9
+ /**
10
+ * Fully resolved global options derived from Commander flags.
11
+ * Passed by value into every command action via {@link getGlobals}.
12
+ */
13
+ export interface GlobalOptions {
14
+ url?: string | undefined;
15
+ apiKey?: string | undefined;
16
+ /**
17
+ * Skip TLS verification. `true` when `--insecure` is passed, otherwise
18
+ * `undefined` so the SDK falls through to `UNRAID_TLS_SKIP_VERIFY`. Never a
19
+ * concrete `false`, which would shadow the env var.
20
+ */
21
+ insecure?: boolean | undefined;
22
+ json: boolean;
23
+ }
24
+ /**
25
+ * Raw option bag read from the root program via `program.opts()`.
26
+ * All fields are optional because Commander omits absent flags entirely.
27
+ */
28
+ export interface RawGlobalOpts {
29
+ url?: string | undefined;
30
+ apiKey?: string | undefined;
31
+ insecure?: boolean | undefined;
32
+ human?: boolean | undefined;
33
+ }
34
+ /**
35
+ * Map Commander's raw option bag to resolved {@link GlobalOptions}.
36
+ *
37
+ * `insecure` becomes `true` only when `--insecure` is present, otherwise
38
+ * `undefined` — never a concrete `false` — so the SDK's connection resolver can
39
+ * fall through to `UNRAID_TLS_SKIP_VERIFY` instead of being shadowed.
40
+ */
41
+ export declare function resolveGlobalOptions(raw: RawGlobalOpts): GlobalOptions;
42
+ /**
43
+ * Build and configure the root Commander program for the `unraid` CLI.
44
+ *
45
+ * @returns The configured Commander {@link Command} instance, ready for `.parse()`.
46
+ */
47
+ export declare function createCli(): Command;
48
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,aAAa,CAOtE;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAkCnC"}
package/dist/cli.js ADDED
@@ -0,0 +1,65 @@
1
+ /**
2
+ * CLI factory for the Unraid CLI — builds the root Commander program.
3
+ *
4
+ * This module wires global options (URL, API key, output format) and delegates
5
+ * subcommand registration to the commands/ layer. It contains no business logic;
6
+ * all SDK interaction happens in command action handlers.
7
+ */
8
+ import { Command } from 'commander';
9
+ import { registerSystemCommands } from './commands/system.js';
10
+ import { registerArrayCommands } from './commands/array.js';
11
+ import { registerDiskCommands } from './commands/disks.js';
12
+ import { registerDockerCommands } from './commands/docker.js';
13
+ import { registerVmCommands } from './commands/vm.js';
14
+ import { registerShareCommands } from './commands/shares.js';
15
+ import { registerNotificationCommands } from './commands/notifications.js';
16
+ import { registerUpsCommands } from './commands/ups.js';
17
+ /**
18
+ * Map Commander's raw option bag to resolved {@link GlobalOptions}.
19
+ *
20
+ * `insecure` becomes `true` only when `--insecure` is present, otherwise
21
+ * `undefined` — never a concrete `false` — so the SDK's connection resolver can
22
+ * fall through to `UNRAID_TLS_SKIP_VERIFY` instead of being shadowed.
23
+ */
24
+ export function resolveGlobalOptions(raw) {
25
+ return {
26
+ url: raw.url,
27
+ apiKey: raw.apiKey,
28
+ insecure: raw.insecure === true ? true : undefined,
29
+ json: raw.human !== true,
30
+ };
31
+ }
32
+ /**
33
+ * Build and configure the root Commander program for the `unraid` CLI.
34
+ *
35
+ * @returns The configured Commander {@link Command} instance, ready for `.parse()`.
36
+ */
37
+ export function createCli() {
38
+ const program = new Command();
39
+ program
40
+ .name('unraid')
41
+ .description('Unraid CLI — observe and control an Unraid server via its GraphQL API')
42
+ .version('0.1.0')
43
+ .option('--url <url>', 'Unraid GraphQL endpoint (env: UNRAID_API_URL)')
44
+ .option('--api-key <key>', 'Unraid API key (env: UNRAID_API_KEY)')
45
+ .option('--insecure', 'Skip TLS verification for self-signed certs (env: UNRAID_TLS_SKIP_VERIFY)')
46
+ .option('--json', 'Output JSON', true)
47
+ .option('--human', 'Output human-readable text');
48
+ /**
49
+ * Extract resolved {@link GlobalOptions} from the command instance available
50
+ * inside an action handler. Reads root-program opts via a closure over `program`.
51
+ */
52
+ function getGlobals(_cmd) {
53
+ return resolveGlobalOptions(program.opts());
54
+ }
55
+ registerSystemCommands(program, getGlobals);
56
+ registerArrayCommands(program, getGlobals);
57
+ registerDiskCommands(program, getGlobals);
58
+ registerDockerCommands(program, getGlobals);
59
+ registerVmCommands(program, getGlobals);
60
+ registerShareCommands(program, getGlobals);
61
+ registerNotificationCommands(program, getGlobals);
62
+ registerUpsCommands(program, getGlobals);
63
+ return program;
64
+ }
65
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAA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sBAAsB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC5C,kBAAkB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACxC,qBAAqB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC3C,4BAA4B,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAClD,mBAAmB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAEzC,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Array & parity command group for the Unraid CLI.
3
+ */
4
+ import type { Command } from 'commander';
5
+ import type { GlobalOptions } from '../cli.js';
6
+ /** Register `array status` and `array parity-history` commands. */
7
+ export declare function registerArrayCommands(program: Command, getGlobals: (cmd: Command) => GlobalOptions): void;
8
+ //# sourceMappingURL=array.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/commands/array.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAczC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG/C,mEAAmE;AACnE,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,aAAa,GAC1C,IAAI,CAuIN"}
@@ -0,0 +1,129 @@
1
+ /**
2
+ * Array & parity command group for the Unraid CLI.
3
+ */
4
+ import { getArrayStatus, getParityHistory, setArrayState, addDiskToArray, removeDiskFromArray, mountArrayDisk, unmountArrayDisk, startParityCheck, pauseParityCheck, resumeParityCheck, cancelParityCheck, } from '@unraid-toolkit/sdk';
5
+ import { runAction, parseIntFlag, confirmDestructive } from './run.js';
6
+ /** Register `array status` and `array parity-history` commands. */
7
+ export function registerArrayCommands(program, getGlobals) {
8
+ const array = program.command('array').description('Array and parity operations');
9
+ array
10
+ .command('status')
11
+ .description('Show array state, capacity, parity status, and member disks.')
12
+ .action(async function () {
13
+ await runAction(getGlobals(this), (client) => getArrayStatus(client));
14
+ });
15
+ array
16
+ .command('parity-history')
17
+ .description('List past parity checks.')
18
+ .option('--limit <n>', 'Maximum number of entries to return', parseIntFlag)
19
+ .option('--offset <n>', 'Number of entries to skip', parseIntFlag)
20
+ .action(async function () {
21
+ const opts = this.opts();
22
+ await runAction(getGlobals(this), (client) => getParityHistory(client, { limit: opts.limit, offset: opts.offset }));
23
+ });
24
+ // --- Phase 3: destructive array control (each requires --yes) ---
25
+ array
26
+ .command('start')
27
+ .description('Start the array. (destructive)')
28
+ .option('--yes', 'Confirm this destructive operation')
29
+ .action(async function () {
30
+ const { yes } = this.opts();
31
+ if (!confirmDestructive('start the array', yes))
32
+ return;
33
+ await runAction(getGlobals(this), (client) => setArrayState(client, 'START'));
34
+ });
35
+ array
36
+ .command('stop')
37
+ .description('Stop the array (takes shares and Docker/VMs offline). (destructive)')
38
+ .option('--yes', 'Confirm this destructive operation')
39
+ .action(async function () {
40
+ const { yes } = this.opts();
41
+ if (!confirmDestructive('stop the array', yes))
42
+ return;
43
+ await runAction(getGlobals(this), (client) => setArrayState(client, 'STOP'));
44
+ });
45
+ array
46
+ .command('add-disk')
47
+ .description('Add a disk to the array. (destructive)')
48
+ .argument('<id>', 'The disk id')
49
+ .option('--slot <n>', 'Target array slot', parseIntFlag)
50
+ .option('--yes', 'Confirm this destructive operation')
51
+ .action(async function (id) {
52
+ const opts = this.opts();
53
+ if (!confirmDestructive(`add disk ${id} to the array`, opts.yes))
54
+ return;
55
+ await runAction(getGlobals(this), (client) => addDiskToArray(client, id, opts.slot));
56
+ });
57
+ array
58
+ .command('remove-disk')
59
+ .description('Remove a disk from the array (array must be stopped). (destructive)')
60
+ .argument('<id>', 'The disk id')
61
+ .option('--slot <n>', 'The disk slot', parseIntFlag)
62
+ .option('--yes', 'Confirm this destructive operation')
63
+ .action(async function (id) {
64
+ const opts = this.opts();
65
+ if (!confirmDestructive(`remove disk ${id} from the array`, opts.yes))
66
+ return;
67
+ await runAction(getGlobals(this), (client) => removeDiskFromArray(client, id, opts.slot));
68
+ });
69
+ array
70
+ .command('mount-disk')
71
+ .description('Mount an array disk. (destructive)')
72
+ .argument('<id>', 'The disk id')
73
+ .option('--yes', 'Confirm this destructive operation')
74
+ .action(async function (id) {
75
+ const { yes } = this.opts();
76
+ if (!confirmDestructive(`mount disk ${id}`, yes))
77
+ return;
78
+ await runAction(getGlobals(this), (client) => mountArrayDisk(client, id));
79
+ });
80
+ array
81
+ .command('unmount-disk')
82
+ .description('Unmount an array disk. (destructive)')
83
+ .argument('<id>', 'The disk id')
84
+ .option('--yes', 'Confirm this destructive operation')
85
+ .action(async function (id) {
86
+ const { yes } = this.opts();
87
+ if (!confirmDestructive(`unmount disk ${id}`, yes))
88
+ return;
89
+ await runAction(getGlobals(this), (client) => unmountArrayDisk(client, id));
90
+ });
91
+ // Parity-check lifecycle.
92
+ const parity = program.command('parity').description('Parity-check control');
93
+ parity
94
+ .command('start')
95
+ .description('Start a parity check. (destructive)')
96
+ .option('--correct', 'Write corrections to parity (correcting check)')
97
+ .option('--yes', 'Confirm this destructive operation')
98
+ .action(async function () {
99
+ const opts = this.opts();
100
+ const correcting = opts.correct === true;
101
+ if (!confirmDestructive(`start a ${correcting ? 'correcting' : 'read-only'} parity check`, opts.yes))
102
+ return;
103
+ await runAction(getGlobals(this), (client) => startParityCheck(client, correcting));
104
+ });
105
+ // Pause/resume are reversible toggles — no confirmation gate.
106
+ parity
107
+ .command('pause')
108
+ .description('Pause a running parity check.')
109
+ .action(async function () {
110
+ await runAction(getGlobals(this), (client) => pauseParityCheck(client));
111
+ });
112
+ parity
113
+ .command('resume')
114
+ .description('Resume a paused parity check.')
115
+ .action(async function () {
116
+ await runAction(getGlobals(this), (client) => resumeParityCheck(client));
117
+ });
118
+ parity
119
+ .command('cancel')
120
+ .description('Cancel a running parity check. (destructive)')
121
+ .option('--yes', 'Confirm this destructive operation')
122
+ .action(async function () {
123
+ const { yes } = this.opts();
124
+ if (!confirmDestructive('cancel the parity check', yes))
125
+ return;
126
+ await runAction(getGlobals(this), (client) => cancelParityCheck(client));
127
+ });
128
+ }
129
+ //# sourceMappingURL=array.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array.js","sourceRoot":"","sources":["../../src/commands/array.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEvE,mEAAmE;AACnE,MAAM,UAAU,qBAAqB,CACnC,OAAgB,EAChB,UAA2C;IAE3C,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,6BAA6B,CAAC,CAAC;IAElF,KAAK;SACF,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,8DAA8D,CAAC;SAC3E,MAAM,CAAC,KAAK;QACX,MAAM,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;IAEL,KAAK;SACF,OAAO,CAAC,gBAAgB,CAAC;SACzB,WAAW,CAAC,0BAA0B,CAAC;SACvC,MAAM,CAAC,aAAa,EAAE,qCAAqC,EAAE,YAAY,CAAC;SAC1E,MAAM,CAAC,cAAc,EAAE,2BAA2B,EAAE,YAAY,CAAC;SACjE,MAAM,CAAC,KAAK;QACX,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAuC,CAAC;QAC9D,MAAM,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE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AAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Disk command group for the Unraid CLI.
3
+ */
4
+ import type { Command } from 'commander';
5
+ import type { GlobalOptions } from '../cli.js';
6
+ /** Register the `disks list` command. */
7
+ export declare function registerDiskCommands(program: Command, getGlobals: (cmd: Command) => GlobalOptions): void;
8
+ //# sourceMappingURL=disks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disks.d.ts","sourceRoot":"","sources":["../../src/commands/disks.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG/C,yCAAyC;AACzC,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,aAAa,GAC1C,IAAI,CAcN"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Disk command group for the Unraid CLI.
3
+ */
4
+ import { listDisks } from '@unraid-toolkit/sdk';
5
+ import { runAction, parseIntFlag } from './run.js';
6
+ /** Register the `disks list` command. */
7
+ export function registerDiskCommands(program, getGlobals) {
8
+ const disks = program.command('disks').description('Physical disk operations');
9
+ disks
10
+ .command('list')
11
+ .description('List physical disks (model, size, SMART status, temperature).')
12
+ .option('--limit <n>', 'Maximum number of disks to return', parseIntFlag)
13
+ .option('--offset <n>', 'Number of disks to skip', parseIntFlag)
14
+ .action(async function () {
15
+ const opts = this.opts();
16
+ await runAction(getGlobals(this), (client) => listDisks(client, { limit: opts.limit, offset: opts.offset }));
17
+ });
18
+ }
19
+ //# sourceMappingURL=disks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disks.js","sourceRoot":"","sources":["../../src/commands/disks.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEnD,yCAAyC;AACzC,MAAM,UAAU,oBAAoB,CAClC,OAAgB,EAChB,UAA2C;IAE3C,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,0BAA0B,CAAC,CAAC;IAE/E,KAAK;SACF,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,+DAA+D,CAAC;SAC5E,MAAM,CAAC,aAAa,EAAE,mCAAmC,EAAE,YAAY,CAAC;SACxE,MAAM,CAAC,cAAc,EAAE,yBAAyB,EAAE,YAAY,CAAC;SAC/D,MAAM,CAAC,KAAK;QACX,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAuC,CAAC;QAC9D,MAAM,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAC3C,SAAS,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAC9D,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Docker command group for the Unraid CLI.
3
+ */
4
+ import type { Command } from 'commander';
5
+ import type { GlobalOptions } from '../cli.js';
6
+ /** Register `docker containers|container|logs|update-status` commands. */
7
+ export declare function registerDockerCommands(program: Command, getGlobals: (cmd: Command) => GlobalOptions): void;
8
+ //# sourceMappingURL=docker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../src/commands/docker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAczC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAgB/C,0EAA0E;AAC1E,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,aAAa,GAC1C,IAAI,CAgFN"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Docker command group for the Unraid CLI.
3
+ */
4
+ import { listContainers, getContainer, getContainerLogs, getUpdateStatuses, startContainer, stopContainer, pauseContainer, unpauseContainer, updateContainer, updateAllContainers, removeContainer, } from '@unraid-toolkit/sdk';
5
+ import { runAction, parseIntFlag, confirmDestructive } from './run.js';
6
+ /** Single-container lifecycle subcommands: `docker <action> <id>`. */
7
+ const CONTAINER_ACTIONS = [
8
+ { name: 'start', desc: 'Start a stopped container.', op: startContainer },
9
+ { name: 'stop', desc: 'Stop a running container.', op: stopContainer },
10
+ { name: 'pause', desc: 'Pause (suspend) a running container.', op: pauseContainer },
11
+ { name: 'unpause', desc: 'Unpause (resume) a paused container.', op: unpauseContainer },
12
+ {
13
+ name: 'update',
14
+ desc: 'Pull the latest image and recreate the container.',
15
+ op: updateContainer,
16
+ },
17
+ ];
18
+ /** Register `docker containers|container|logs|update-status` commands. */
19
+ export function registerDockerCommands(program, getGlobals) {
20
+ const docker = program.command('docker').description('Docker container operations');
21
+ docker
22
+ .command('containers')
23
+ .description('List Docker containers.')
24
+ .option('--limit <n>', 'Maximum number of containers to return', parseIntFlag)
25
+ .option('--offset <n>', 'Number of containers to skip', parseIntFlag)
26
+ .action(async function () {
27
+ const opts = this.opts();
28
+ await runAction(getGlobals(this), (client) => listContainers(client, { limit: opts.limit, offset: opts.offset }));
29
+ });
30
+ docker
31
+ .command('container')
32
+ .description('Show details for a single container by id.')
33
+ .argument('<id>', 'The container id')
34
+ .action(async function (id) {
35
+ await runAction(getGlobals(this), (client) => getContainer(client, id));
36
+ });
37
+ docker
38
+ .command('logs')
39
+ .description('Show recent log lines for a container.')
40
+ .argument('<id>', 'The container id')
41
+ .option('--tail <n>', 'Return only the last N lines', parseIntFlag)
42
+ .option('--since <ts>', 'Only return lines after this ISO timestamp / cursor')
43
+ .action(async function (id) {
44
+ const opts = this.opts();
45
+ await runAction(getGlobals(this), (client) => getContainerLogs(client, { id, tail: opts.tail, since: opts.since }));
46
+ });
47
+ docker
48
+ .command('update-status')
49
+ .description('Show per-container update availability.')
50
+ .option('--limit <n>', 'Maximum number of containers to return', parseIntFlag)
51
+ .option('--offset <n>', 'Number of containers to skip', parseIntFlag)
52
+ .action(async function () {
53
+ const opts = this.opts();
54
+ await runAction(getGlobals(this), (client) => getUpdateStatuses(client, { limit: opts.limit, offset: opts.offset }));
55
+ });
56
+ for (const { name, desc, op } of CONTAINER_ACTIONS) {
57
+ docker
58
+ .command(name)
59
+ .description(desc)
60
+ .argument('<id>', 'The container id')
61
+ .action(async function (id) {
62
+ await runAction(getGlobals(this), (client) => op(client, id));
63
+ });
64
+ }
65
+ docker
66
+ .command('update-all')
67
+ .description('Update every container that has an available image update.')
68
+ .action(async function () {
69
+ await runAction(getGlobals(this), (client) => updateAllContainers(client));
70
+ });
71
+ docker
72
+ .command('remove')
73
+ .description('Remove a container, optionally its image. (destructive)')
74
+ .argument('<id>', 'The container id')
75
+ .option('--with-image', 'Also remove the backing image')
76
+ .option('--yes', 'Confirm this destructive operation')
77
+ .action(async function (id) {
78
+ const opts = this.opts();
79
+ const withImage = opts.withImage === true;
80
+ if (!confirmDestructive(`remove container ${id}${withImage ? ' and its image' : ''}`, opts.yes))
81
+ return;
82
+ await runAction(getGlobals(this), (client) => removeContainer(client, id, withImage));
83
+ });
84
+ }
85
+ //# sourceMappingURL=docker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docker.js","sourceRoot":"","sources":["../../src/commands/docker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE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E,IAAI,CAAC,GAAG,CAAC;YAE3F,OAAO;QACT,MAAM,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,eAAe,CAAC,MAAM,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC;IACxF,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Notification command group for the Unraid CLI.
3
+ */
4
+ import { type Command } from 'commander';
5
+ import type { GlobalOptions } from '../cli.js';
6
+ /** Register `notifications list` and `notifications overview` commands. */
7
+ export declare function registerNotificationCommands(program: Command, getGlobals: (cmd: Command) => GlobalOptions): void;
8
+ //# sourceMappingURL=notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/commands/notifications.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAU,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAUjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG/C,2EAA2E;AAC3E,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,aAAa,GAC1C,IAAI,CAgFN"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Notification command group for the Unraid CLI.
3
+ */
4
+ import { Option } from 'commander';
5
+ import { listNotifications, getNotificationOverview, createNotification, archiveNotification, unarchiveNotification, } from '@unraid-toolkit/sdk';
6
+ import { runAction, parseIntFlag } from './run.js';
7
+ /** Register `notifications list` and `notifications overview` commands. */
8
+ export function registerNotificationCommands(program, getGlobals) {
9
+ const notifications = program.command('notifications').description('Notification operations');
10
+ notifications
11
+ .command('list')
12
+ .description('List notifications by queue and severity.')
13
+ .option('--type <type>', 'Queue to read: UNREAD (default) or ARCHIVE')
14
+ .option('--importance <level>', 'Filter to a severity: INFO, WARNING, or ALERT')
15
+ .option('--limit <n>', 'Maximum number of notifications to return', parseIntFlag)
16
+ .option('--offset <n>', 'Number of notifications to skip', parseIntFlag)
17
+ .action(async function () {
18
+ const opts = this.opts();
19
+ await runAction(getGlobals(this), (client) => listNotifications(client, {
20
+ type: opts.type,
21
+ importance: opts.importance,
22
+ limit: opts.limit,
23
+ offset: opts.offset,
24
+ }));
25
+ });
26
+ notifications
27
+ .command('overview')
28
+ .description('Show unread/archived notification counts by severity.')
29
+ .action(async function () {
30
+ await runAction(getGlobals(this), (client) => getNotificationOverview(client));
31
+ });
32
+ notifications
33
+ .command('create')
34
+ .description('Create a notification.')
35
+ .requiredOption('--title <title>', 'Short event title')
36
+ .requiredOption('--subject <subject>', 'Notification subject line')
37
+ .requiredOption('--description <text>', 'Body text')
38
+ .addOption(new Option('--importance <level>', 'Severity')
39
+ .choices(['INFO', 'WARNING', 'ALERT'])
40
+ .makeOptionMandatory())
41
+ .option('--link <url>', 'Optional link to more detail')
42
+ .action(async function () {
43
+ const opts = this.opts();
44
+ await runAction(getGlobals(this), (client) => createNotification(client, {
45
+ title: opts.title,
46
+ subject: opts.subject,
47
+ description: opts.description,
48
+ importance: opts.importance,
49
+ link: opts.link,
50
+ }));
51
+ });
52
+ notifications
53
+ .command('archive')
54
+ .description('Archive a notification by id.')
55
+ .argument('<id>', 'The notification id')
56
+ .action(async function (id) {
57
+ await runAction(getGlobals(this), (client) => archiveNotification(client, id));
58
+ });
59
+ notifications
60
+ .command('unarchive')
61
+ .description('Unarchive (mark unread) a notification by id.')
62
+ .argument('<id>', 'The notification id')
63
+ .action(async function (id) {
64
+ await runAction(getGlobals(this), (client) => unarchiveNotification(client, id));
65
+ });
66
+ }
67
+ //# sourceMappingURL=notifications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../src/commands/notifications.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAgB,MAAM,WAAW,CAAC;AACjD,OAAO,EAC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,CAAC,MAAM,EAAE,qBAAqB,CAAC;SACvC,MAAM,CAAC,KAAK,WAA0B,EAAU;QAC/C,MAAM,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;IACnF,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Shared command-action plumbing for the CLI.
3
+ *
4
+ * Every subcommand resolves connection config from global options, builds a
5
+ * client, runs one SDK operation, and renders the resulting envelope. This
6
+ * helper centralizes that glue so command modules stay declarative — it holds
7
+ * no domain logic of its own.
8
+ */
9
+ import { type UnraidClient, type UnraidResult } from '@unraid-toolkit/sdk';
10
+ import type { GlobalOptions } from '../cli.js';
11
+ /**
12
+ * Resolve config, build a client, run `op`, and render the result.
13
+ *
14
+ * Sets `process.exitCode = 1` when config resolution fails or the operation
15
+ * returns a failure envelope.
16
+ */
17
+ export declare function runAction<T>(globals: GlobalOptions, op: (client: UnraidClient) => Promise<UnraidResult<T>>): Promise<void>;
18
+ /**
19
+ * Commander option parser for integer flags (`--limit`, `--offset`).
20
+ *
21
+ * Rejects non-integer input at the CLI boundary (input *shape*) with a clear
22
+ * Commander error. Semantic validation (e.g. positivity) remains the SDK's
23
+ * responsibility, which returns a structured `VALIDATION_ERROR` envelope.
24
+ */
25
+ export declare function parseIntFlag(value: string): number;
26
+ /**
27
+ * Confirmation gate for destructive CLI commands (the CLI's human-in-the-loop
28
+ * equivalent of the MCP approval layer). Returns `true` when the caller passed
29
+ * `--yes`; otherwise prints the impact and how to confirm, sets a failure exit
30
+ * code, and returns `false` so the command aborts without calling the SDK.
31
+ */
32
+ export declare function confirmDestructive(impact: string, yes: boolean | undefined): boolean;
33
+ //# sourceMappingURL=run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG/C;;;;;GAKG;AACH,wBAAsB,SAAS,CAAC,CAAC,EAC/B,OAAO,EAAE,aAAa,EACtB,EAAE,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GACrD,OAAO,CAAC,IAAI,CAAC,CAoBf;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMlD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAQpF"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Shared command-action plumbing for the CLI.
3
+ *
4
+ * Every subcommand resolves connection config from global options, builds a
5
+ * client, runs one SDK operation, and renders the resulting envelope. This
6
+ * helper centralizes that glue so command modules stay declarative — it holds
7
+ * no domain logic of its own.
8
+ */
9
+ import { InvalidArgumentError } from 'commander';
10
+ import { resolveConnectionConfig, createClient, } from '@unraid-toolkit/sdk';
11
+ import { output } from '../output.js';
12
+ /**
13
+ * Resolve config, build a client, run `op`, and render the result.
14
+ *
15
+ * Sets `process.exitCode = 1` when config resolution fails or the operation
16
+ * returns a failure envelope.
17
+ */
18
+ export async function runAction(globals, op) {
19
+ let config;
20
+ try {
21
+ config = resolveConnectionConfig({
22
+ url: globals.url,
23
+ apiKey: globals.apiKey,
24
+ tlsSkipVerify: globals.insecure,
25
+ });
26
+ }
27
+ catch (err) {
28
+ console.error(`Error: ${err instanceof Error ? err.message : String(err)}`);
29
+ process.exitCode = 1;
30
+ return;
31
+ }
32
+ const client = createClient(config);
33
+ const result = await op(client);
34
+ output(result, globals.json);
35
+ if (!result.success) {
36
+ process.exitCode = 1;
37
+ }
38
+ }
39
+ /**
40
+ * Commander option parser for integer flags (`--limit`, `--offset`).
41
+ *
42
+ * Rejects non-integer input at the CLI boundary (input *shape*) with a clear
43
+ * Commander error. Semantic validation (e.g. positivity) remains the SDK's
44
+ * responsibility, which returns a structured `VALIDATION_ERROR` envelope.
45
+ */
46
+ export function parseIntFlag(value) {
47
+ const parsed = Number(value);
48
+ if (!Number.isInteger(parsed)) {
49
+ throw new InvalidArgumentError('must be an integer.');
50
+ }
51
+ return parsed;
52
+ }
53
+ /**
54
+ * Confirmation gate for destructive CLI commands (the CLI's human-in-the-loop
55
+ * equivalent of the MCP approval layer). Returns `true` when the caller passed
56
+ * `--yes`; otherwise prints the impact and how to confirm, sets a failure exit
57
+ * code, and returns `false` so the command aborts without calling the SDK.
58
+ */
59
+ export function confirmDestructive(impact, yes) {
60
+ if (yes === true)
61
+ return true;
62
+ console.error(`Refusing destructive operation without confirmation: ${impact}\n` +
63
+ `This cannot be undone. Re-run with --yes to proceed.`);
64
+ process.exitCode = 1;
65
+ return false;
66
+ }
67
+ //# sourceMappingURL=run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EACL,uBAAuB,EACvB,YAAY,GAGb,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,OAAsB,EACtB,EAAsD;IAEtD,IAAI,MAAM,CAAC;IACX,IAAI,CAAC;QACH,MAAM,GAAG,uBAAuB,CAAC;YAC/B,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,aAAa,EAAE,OAAO,CAAC,QAAQ;SAChC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC5E,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO;IACT,CAAC;IAED,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC;IAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,oBAAoB,CAAC,qBAAqB,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAc,EAAE,GAAwB;IACzE,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC9B,OAAO,CAAC,KAAK,CACX,wDAAwD,MAAM,IAAI;QAChE,sDAAsD,CACzD,CAAC;IACF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACrB,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * User-share command group for the Unraid CLI.
3
+ */
4
+ import type { Command } from 'commander';
5
+ import type { GlobalOptions } from '../cli.js';
6
+ /** Register the `shares list` command. */
7
+ export declare function registerShareCommands(program: Command, getGlobals: (cmd: Command) => GlobalOptions): void;
8
+ //# sourceMappingURL=shares.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shares.d.ts","sourceRoot":"","sources":["../../src/commands/shares.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG/C,0CAA0C;AAC1C,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,aAAa,GAC1C,IAAI,CAcN"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * User-share command group for the Unraid CLI.
3
+ */
4
+ import { listShares } from '@unraid-toolkit/sdk';
5
+ import { runAction, parseIntFlag } from './run.js';
6
+ /** Register the `shares list` command. */
7
+ export function registerShareCommands(program, getGlobals) {
8
+ const shares = program.command('shares').description('User share operations');
9
+ shares
10
+ .command('list')
11
+ .description('List user shares with capacity and allocation settings.')
12
+ .option('--limit <n>', 'Maximum number of shares to return', parseIntFlag)
13
+ .option('--offset <n>', 'Number of shares to skip', parseIntFlag)
14
+ .action(async function () {
15
+ const opts = this.opts();
16
+ await runAction(getGlobals(this), (client) => listShares(client, { limit: opts.limit, offset: opts.offset }));
17
+ });
18
+ }
19
+ //# sourceMappingURL=shares.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shares.js","sourceRoot":"","sources":["../../src/commands/shares.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEnD,0CAA0C;AAC1C,MAAM,UAAU,qBAAqB,CACnC,OAAgB,EAChB,UAA2C;IAE3C,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,uBAAuB,CAAC,CAAC;IAE9E,MAAM;SACH,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,yDAAyD,CAAC;SACtE,MAAM,CAAC,aAAa,EAAE,oCAAoC,EAAE,YAAY,CAAC;SACzE,MAAM,CAAC,cAAc,EAAE,0BAA0B,EAAE,YAAY,CAAC;SAChE,MAAM,CAAC,KAAK;QACX,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAuC,CAAC;QAC9D,MAAM,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAC3C,UAAU,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAC/D,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * System command group for the Unraid CLI.
3
+ *
4
+ * Registers the top-level `health` probe plus the `system` subcommands
5
+ * (`info`, `metrics`). Contains no business logic — it delegates to
6
+ * `@unraid-toolkit/sdk` and renders results via the shared {@link runAction} helper.
7
+ */
8
+ import type { Command } from 'commander';
9
+ import type { GlobalOptions } from '../cli.js';
10
+ /**
11
+ * Register system-related commands onto `program`:
12
+ * - `health` — connection and auth probe (top-level).
13
+ * - `system info` — static OS/CPU/memory/version information.
14
+ * - `system metrics` — live CPU/memory utilization.
15
+ */
16
+ export declare function registerSystemCommands(program: Command, getGlobals: (cmd: Command) => GlobalOptions): void;
17
+ //# sourceMappingURL=system.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../src/commands/system.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG/C;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,aAAa,GAC1C,IAAI,CAuBN"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * System command group for the Unraid CLI.
3
+ *
4
+ * Registers the top-level `health` probe plus the `system` subcommands
5
+ * (`info`, `metrics`). Contains no business logic — it delegates to
6
+ * `@unraid-toolkit/sdk` and renders results via the shared {@link runAction} helper.
7
+ */
8
+ import { getHealth, getSystemInfo, getSystemMetrics } from '@unraid-toolkit/sdk';
9
+ import { runAction } from './run.js';
10
+ /**
11
+ * Register system-related commands onto `program`:
12
+ * - `health` — connection and auth probe (top-level).
13
+ * - `system info` — static OS/CPU/memory/version information.
14
+ * - `system metrics` — live CPU/memory utilization.
15
+ */
16
+ export function registerSystemCommands(program, getGlobals) {
17
+ program
18
+ .command('health')
19
+ .description('Check that the Unraid API is reachable and the API key is accepted.')
20
+ .action(async function () {
21
+ await runAction(getGlobals(this), (client) => getHealth(client));
22
+ });
23
+ const system = program.command('system').description('System information and metrics');
24
+ system
25
+ .command('info')
26
+ .description('Show static system information (OS, CPU, memory, versions).')
27
+ .action(async function () {
28
+ await runAction(getGlobals(this), (client) => getSystemInfo(client));
29
+ });
30
+ system
31
+ .command('metrics')
32
+ .description('Show live CPU and memory utilization.')
33
+ .action(async function () {
34
+ await runAction(getGlobals(this), (client) => getSystemMetrics(client));
35
+ });
36
+ }
37
+ //# sourceMappingURL=system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system.js","sourceRoot":"","sources":["../../src/commands/system.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEjF,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CACpC,OAAgB,EAChB,UAA2C;IAE3C,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,qEAAqE,CAAC;SAClF,MAAM,CAAC,KAAK;QACX,MAAM,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;IAEL,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,gCAAgC,CAAC,CAAC;IAEvF,MAAM;SACH,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,6DAA6D,CAAC;SAC1E,MAAM,CAAC,KAAK;QACX,MAAM,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;IAEL,MAAM;SACH,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,uCAAuC,CAAC;SACpD,MAAM,CAAC,KAAK;QACX,MAAM,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * UPS command group for the Unraid CLI.
3
+ */
4
+ import type { Command } from 'commander';
5
+ import type { GlobalOptions } from '../cli.js';
6
+ /** Register the `ups status` command. */
7
+ export declare function registerUpsCommands(program: Command, getGlobals: (cmd: Command) => GlobalOptions): void;
8
+ //# sourceMappingURL=ups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ups.d.ts","sourceRoot":"","sources":["../../src/commands/ups.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG/C,yCAAyC;AACzC,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,aAAa,GAC1C,IAAI,CAcN"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * UPS command group for the Unraid CLI.
3
+ */
4
+ import { getUpsStatus } from '@unraid-toolkit/sdk';
5
+ import { runAction, parseIntFlag } from './run.js';
6
+ /** Register the `ups status` command. */
7
+ export function registerUpsCommands(program, getGlobals) {
8
+ const ups = program.command('ups').description('UPS (power) operations');
9
+ ups
10
+ .command('status')
11
+ .description('Show connected UPS devices with battery and power telemetry.')
12
+ .option('--limit <n>', 'Maximum number of UPS devices to return', parseIntFlag)
13
+ .option('--offset <n>', 'Number of UPS devices to skip', parseIntFlag)
14
+ .action(async function () {
15
+ const opts = this.opts();
16
+ await runAction(getGlobals(this), (client) => getUpsStatus(client, { limit: opts.limit, offset: opts.offset }));
17
+ });
18
+ }
19
+ //# sourceMappingURL=ups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ups.js","sourceRoot":"","sources":["../../src/commands/ups.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEnD,yCAAyC;AACzC,MAAM,UAAU,mBAAmB,CACjC,OAAgB,EAChB,UAA2C;IAE3C,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;IAEzE,GAAG;SACA,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,8DAA8D,CAAC;SAC3E,MAAM,CAAC,aAAa,EAAE,yCAAyC,EAAE,YAAY,CAAC;SAC9E,MAAM,CAAC,cAAc,EAAE,+BAA+B,EAAE,YAAY,CAAC;SACrE,MAAM,CAAC,KAAK;QACX,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAuC,CAAC;QAC9D,MAAM,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAC3C,YAAY,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CACjE,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Virtual machine command group for the Unraid CLI.
3
+ */
4
+ import type { Command } from 'commander';
5
+ import type { GlobalOptions } from '../cli.js';
6
+ /** Register the `vm list` command. */
7
+ export declare function registerVmCommands(program: Command, getGlobals: (cmd: Command) => GlobalOptions): void;
8
+ //# sourceMappingURL=vm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vm.d.ts","sourceRoot":"","sources":["../../src/commands/vm.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAsB/C,sCAAsC;AACtC,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,aAAa,GAC1C,IAAI,CAmCN"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Virtual machine command group for the Unraid CLI.
3
+ */
4
+ import { listVms, startVm, stopVm, pauseVm, resumeVm, forceStopVm, rebootVm, resetVm, } from '@unraid-toolkit/sdk';
5
+ import { runAction, parseIntFlag, confirmDestructive } from './run.js';
6
+ /** Safe VM lifecycle subcommands: `vm <action> <id>`. */
7
+ const VM_ACTIONS = [
8
+ { name: 'start', desc: 'Start a virtual machine.', op: startVm },
9
+ { name: 'stop', desc: 'Gracefully stop a virtual machine.', op: stopVm },
10
+ { name: 'pause', desc: 'Pause a running virtual machine.', op: pauseVm },
11
+ { name: 'resume', desc: 'Resume a paused virtual machine.', op: resumeVm },
12
+ ];
13
+ /** Destructive VM subcommands (ungraceful; each requires --yes). */
14
+ const VM_DESTRUCTIVE_ACTIONS = [
15
+ {
16
+ name: 'force-stop',
17
+ desc: 'Force-stop a virtual machine (ungraceful). (destructive)',
18
+ op: forceStopVm,
19
+ },
20
+ { name: 'reboot', desc: 'Reboot a virtual machine. (destructive)', op: rebootVm },
21
+ { name: 'reset', desc: 'Hard-reset a virtual machine. (destructive)', op: resetVm },
22
+ ];
23
+ /** Register the `vm list` command. */
24
+ export function registerVmCommands(program, getGlobals) {
25
+ const vm = program.command('vm').description('Virtual machine operations');
26
+ vm.command('list')
27
+ .description('List virtual machines and their run state.')
28
+ .option('--limit <n>', 'Maximum number of VMs to return', parseIntFlag)
29
+ .option('--offset <n>', 'Number of VMs to skip', parseIntFlag)
30
+ .action(async function () {
31
+ const opts = this.opts();
32
+ await runAction(getGlobals(this), (client) => listVms(client, { limit: opts.limit, offset: opts.offset }));
33
+ });
34
+ for (const { name, desc, op } of VM_ACTIONS) {
35
+ vm.command(name)
36
+ .description(desc)
37
+ .argument('<id>', 'The VM id')
38
+ .action(async function (id) {
39
+ await runAction(getGlobals(this), (client) => op(client, id));
40
+ });
41
+ }
42
+ // --- Phase 3: destructive VM control (each requires --yes) ---
43
+ for (const { name, desc, op } of VM_DESTRUCTIVE_ACTIONS) {
44
+ vm.command(name)
45
+ .description(desc)
46
+ .argument('<id>', 'The VM id')
47
+ .option('--yes', 'Confirm this destructive operation')
48
+ .action(async function (id) {
49
+ const { yes } = this.opts();
50
+ if (!confirmDestructive(`${name} VM ${id}`, yes))
51
+ return;
52
+ await runAction(getGlobals(this), (client) => op(client, id));
53
+ });
54
+ }
55
+ }
56
+ //# sourceMappingURL=vm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vm.js","sourceRoot":"","sources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E,EAAE,GAAG,CAAC;gBAAE,OAAO;YACzD,MAAM,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;QAChE,CAAC,CAAC,CAAC;IACP,CAAC;AACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Entry point for the `unraid` binary.
4
+ *
5
+ * When executed as the main module (i.e. `node dist/index.js` or via the `bin`
6
+ * entry), the Commander program is parsed against `process.argv`. When imported
7
+ * as a library, only {@link createCli} is re-exported so callers can build and
8
+ * test the program without side effects.
9
+ */
10
+ export { createCli } from './cli.js';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAMH,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Entry point for the `unraid` binary.
4
+ *
5
+ * When executed as the main module (i.e. `node dist/index.js` or via the `bin`
6
+ * entry), the Commander program is parsed against `process.argv`. When imported
7
+ * as a library, only {@link createCli} is re-exported so callers can build and
8
+ * test the program without side effects.
9
+ */
10
+ import { resolve } from 'node:path';
11
+ import { pathToFileURL } from 'node:url';
12
+ import { createCli } from './cli.js';
13
+ export { createCli } from './cli.js';
14
+ const entryPath = process.argv[1];
15
+ // Resolve to an absolute path first so the comparison holds when the script is
16
+ // launched via a relative path (e.g. `node packages/cli/dist/index.js`).
17
+ if (entryPath !== undefined && import.meta.url === pathToFileURL(resolve(entryPath)).href) {
18
+ createCli().parse();
19
+ }
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClC,+EAA+E;AAC/E,yEAAyE;AACzE,IAAI,SAAS,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC1F,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC;AACtB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Output formatting for the Unraid CLI — a thin wrapper over `console.log`/`console.error`.
3
+ *
4
+ * This module owns the single decision point between JSON and human-readable output.
5
+ * It contains no business logic; it only adapts an {@link UnraidResult} envelope into
6
+ * text. All domain knowledge stays in `@unraid-toolkit/sdk`.
7
+ */
8
+ import type { UnraidResult } from '@unraid-toolkit/sdk';
9
+ /**
10
+ * Write a {@link UnraidResult} to stdout (success) or stderr (failure).
11
+ *
12
+ * - **JSON mode** (`json: true`): always writes the full envelope to stdout via
13
+ * `console.log`, regardless of success or failure. The caller is responsible
14
+ * for setting `process.exitCode` on failure.
15
+ * - **Human mode** (`json: false`): on success, pretty-prints `result.data` to
16
+ * stdout; on failure, writes `Error: <message>` (and `Details: <details>` if
17
+ * present) to stderr.
18
+ *
19
+ * @param result - The SDK result envelope to render.
20
+ * @param json - When `true`, emit JSON; when `false`, emit human-readable text.
21
+ */
22
+ export declare function output<T>(result: UnraidResult<T>, json: boolean): void;
23
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CActE"}
package/dist/output.js ADDED
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Output formatting for the Unraid CLI — a thin wrapper over `console.log`/`console.error`.
3
+ *
4
+ * This module owns the single decision point between JSON and human-readable output.
5
+ * It contains no business logic; it only adapts an {@link UnraidResult} envelope into
6
+ * text. All domain knowledge stays in `@unraid-toolkit/sdk`.
7
+ */
8
+ /**
9
+ * Write a {@link UnraidResult} to stdout (success) or stderr (failure).
10
+ *
11
+ * - **JSON mode** (`json: true`): always writes the full envelope to stdout via
12
+ * `console.log`, regardless of success or failure. The caller is responsible
13
+ * for setting `process.exitCode` on failure.
14
+ * - **Human mode** (`json: false`): on success, pretty-prints `result.data` to
15
+ * stdout; on failure, writes `Error: <message>` (and `Details: <details>` if
16
+ * present) to stderr.
17
+ *
18
+ * @param result - The SDK result envelope to render.
19
+ * @param json - When `true`, emit JSON; when `false`, emit human-readable text.
20
+ */
21
+ export function output(result, json) {
22
+ if (json) {
23
+ console.log(JSON.stringify(result, null, 2));
24
+ return;
25
+ }
26
+ if (result.success) {
27
+ console.log(JSON.stringify(result.data, null, 2));
28
+ }
29
+ else {
30
+ console.error(`Error: ${result.error.message}`);
31
+ if (result.error.details !== undefined) {
32
+ console.error(`Details: ${result.error.details}`);
33
+ }
34
+ }
35
+ }
36
+ //# sourceMappingURL=output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.js","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,MAAM,CAAI,MAAuB,EAAE,IAAa;IAC9D,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC7C,OAAO;IACT,CAAC;IAED,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,UAAU,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAChD,IAAI,MAAM,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YACvC,OAAO,CAAC,KAAK,CAAC,YAAY,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;AACH,CAAC"}
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@unraid-toolkit/cli",
3
+ "version": "0.2.0",
4
+ "description": "Command-line interface for the Unraid GraphQL API, built on @unraid-toolkit/sdk.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/mike-north/unraid-toolkit.git",
9
+ "directory": "packages/cli"
10
+ },
11
+ "homepage": "https://github.com/mike-north/unraid-toolkit#readme",
12
+ "bugs": "https://github.com/mike-north/unraid-toolkit/issues",
13
+ "type": "module",
14
+ "main": "dist/index.js",
15
+ "types": "dist/index.d.ts",
16
+ "bin": {
17
+ "unraid": "./dist/index.js"
18
+ },
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "dependencies": {
23
+ "commander": "^14.0.3",
24
+ "@unraid-toolkit/sdk": "0.2.0"
25
+ },
26
+ "scripts": {
27
+ "test": "vitest run --passWithNoTests"
28
+ }
29
+ }