@shadowob/cli 1.1.3 → 1.1.5

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.
@@ -177,6 +177,10 @@ async function getClient(profile) {
177
177
  const config = await getConfig(profile);
178
178
  return new ShadowClient(config.serverUrl, config.token);
179
179
  }
180
+ async function getClientWithToken(token, profile) {
181
+ const config = await getConfig(profile);
182
+ return new ShadowClient(config.serverUrl, token);
183
+ }
180
184
  async function getSocket(profile) {
181
185
  const config = await getConfig(profile);
182
186
  return new ShadowSocket({ serverUrl: config.serverUrl, token: config.token });
@@ -248,6 +252,7 @@ async function handleCommand(fn, options, outputFn, errorFn) {
248
252
  export {
249
253
  configManager,
250
254
  getClient,
255
+ getClientWithToken,
251
256
  getSocket,
252
257
  formatError,
253
258
  parseLimit,
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  formatError,
3
3
  getClient,
4
+ getClientWithToken,
4
5
  getSocket,
5
6
  handleCommand,
6
7
  parseBoolean,
@@ -10,10 +11,11 @@ import {
10
11
  parsePositiveInt,
11
12
  parsePrice,
12
13
  requireOption
13
- } from "./chunk-T3BKMB7N.js";
14
+ } from "./chunk-E364BDQO.js";
14
15
  export {
15
16
  formatError,
16
17
  getClient,
18
+ getClientWithToken,
17
19
  getSocket,
18
20
  handleCommand,
19
21
  parseBoolean,