@proxy-checkout/cli 0.1.0-prx-128.108.1 → 0.1.0-prx-128.109.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { CliConfigStore } from "./config.js";
2
2
  import { type CliIo } from "./output.js";
3
- export declare const cliVersion = "0.1.0-prx-128.108.1";
3
+ export declare const cliVersion = "0.1.0-prx-128.109.1";
4
4
  export interface RunCliOptions {
5
5
  configStore?: CliConfigStore;
6
6
  environment?: NodeJS.ProcessEnv;
package/dist/cjs/cli.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { CliConfigStore } from "./config.js";
2
2
  import { type CliIo } from "./output.js";
3
- export declare const cliVersion = "0.1.0-prx-128.108.1";
3
+ export declare const cliVersion = "0.1.0-prx-128.109.1";
4
4
  export interface RunCliOptions {
5
5
  configStore?: CliConfigStore;
6
6
  environment?: NodeJS.ProcessEnv;
package/dist/cjs/cli.js CHANGED
@@ -9,7 +9,7 @@ const config_js_1 = require("./config.js");
9
9
  const errors_js_1 = require("./errors.js");
10
10
  const output_js_1 = require("./output.js");
11
11
  const webhooks_js_1 = require("./webhooks.js");
12
- exports.cliVersion = "0.1.0-prx-128.108.1";
12
+ exports.cliVersion = "0.1.0-prx-128.109.1";
13
13
  async function runCli(argv, options = {}) {
14
14
  const io = options.io ?? {
15
15
  isTTY: Boolean(process.stdin.isTTY && process.stdout.isTTY),
@@ -198,7 +198,13 @@ class CliConfigStore {
198
198
  "profile",
199
199
  profileName,
200
200
  ]);
201
- return result.code === 0 ? result.stdout.trim() : undefined;
201
+ if (result.code !== 0) {
202
+ if (result.stderr.trim()) {
203
+ throw credentialStoreError("Secret Service", result.stderr);
204
+ }
205
+ return undefined;
206
+ }
207
+ return result.stdout.trim();
202
208
  }
203
209
  return (await this.readFileCredentials()).tokens[profileName];
204
210
  }
@@ -211,13 +217,16 @@ class CliConfigStore {
211
217
  return;
212
218
  }
213
219
  if (store === "secret-service") {
214
- await runProcess("secret-tool", [
220
+ const result = await runProcess("secret-tool", [
215
221
  "clear",
216
222
  "service",
217
223
  keychainService,
218
224
  "profile",
219
225
  profileName,
220
226
  ]);
227
+ if (result.code !== 0 && result.stderr.trim()) {
228
+ throw credentialStoreError("Secret Service", result.stderr);
229
+ }
221
230
  return;
222
231
  }
223
232
  const credentials = await this.readFileCredentials();
package/dist/esm/cli.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { CliConfigStore } from "./config.js";
2
2
  import { type CliIo } from "./output.js";
3
- export declare const cliVersion = "0.1.0-prx-128.108.1";
3
+ export declare const cliVersion = "0.1.0-prx-128.109.1";
4
4
  export interface RunCliOptions {
5
5
  configStore?: CliConfigStore;
6
6
  environment?: NodeJS.ProcessEnv;
package/dist/esm/cli.js CHANGED
@@ -5,7 +5,7 @@ import { CliConfigStore } from "./config.js";
5
5
  import { asCliError, CliError, cliExitCodes, usageError } from "./errors.js";
6
6
  import { CliOutput } from "./output.js";
7
7
  import { forwardSelectedDelivery, ProxyWebhooksClient, runListener, } from "./webhooks.js";
8
- export const cliVersion = "0.1.0-prx-128.108.1";
8
+ export const cliVersion = "0.1.0-prx-128.109.1";
9
9
  export async function runCli(argv, options = {}) {
10
10
  const io = options.io ?? {
11
11
  isTTY: Boolean(process.stdin.isTTY && process.stdout.isTTY),
@@ -193,7 +193,13 @@ export class CliConfigStore {
193
193
  "profile",
194
194
  profileName,
195
195
  ]);
196
- return result.code === 0 ? result.stdout.trim() : undefined;
196
+ if (result.code !== 0) {
197
+ if (result.stderr.trim()) {
198
+ throw credentialStoreError("Secret Service", result.stderr);
199
+ }
200
+ return undefined;
201
+ }
202
+ return result.stdout.trim();
197
203
  }
198
204
  return (await this.readFileCredentials()).tokens[profileName];
199
205
  }
@@ -206,13 +212,16 @@ export class CliConfigStore {
206
212
  return;
207
213
  }
208
214
  if (store === "secret-service") {
209
- await runProcess("secret-tool", [
215
+ const result = await runProcess("secret-tool", [
210
216
  "clear",
211
217
  "service",
212
218
  keychainService,
213
219
  "profile",
214
220
  profileName,
215
221
  ]);
222
+ if (result.code !== 0 && result.stderr.trim()) {
223
+ throw credentialStoreError("Secret Service", result.stderr);
224
+ }
216
225
  return;
217
226
  }
218
227
  const credentials = await this.readFileCredentials();
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "sideEffects": false,
8
8
  "type": "module",
9
9
  "types": "./dist/esm/index.d.ts",
10
- "version": "0.1.0-prx-128.108.1",
10
+ "version": "0.1.0-prx-128.109.1",
11
11
  "bin": {
12
12
  "proxy": "./dist/esm/bin.js"
13
13
  },