percher 0.2.3 → 0.2.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.
@@ -9420,11 +9420,15 @@ class Http {
9420
9420
  async postBinary(path, body) {
9421
9421
  const headers = this.buildHeaders();
9422
9422
  headers["Content-Type"] = "application/octet-stream";
9423
- const res = await this.fetchImpl(`${this.apiUrl}${path}`, {
9423
+ const init = {
9424
9424
  method: "POST",
9425
9425
  headers,
9426
9426
  body
9427
- });
9427
+ };
9428
+ if (body instanceof ReadableStream) {
9429
+ init.duplex = "half";
9430
+ }
9431
+ const res = await this.fetchImpl(`${this.apiUrl}${path}`, init);
9428
9432
  if (!res.ok)
9429
9433
  throw await this.parseError(res);
9430
9434
  return await res.json();
@@ -11956,7 +11960,7 @@ async function prompt(question, options) {
11956
11960
 
11957
11961
  // src/context.ts
11958
11962
  async function createCliContext() {
11959
- const client = new PercherClient({ clientVersion: "percher-cli/0.2.3" });
11963
+ const client = new PercherClient({ clientVersion: "percher-cli/0.2.5" });
11960
11964
  const encoder = new TextEncoder;
11961
11965
  const stdout = new WritableStream({
11962
11966
  write(chunk) {
@@ -12026,7 +12030,7 @@ async function renderError(stderr, error) {
12026
12030
  }
12027
12031
 
12028
12032
  // src/telemetry.ts
12029
- var VERSION = "0.2.3";
12033
+ var VERSION = "0.2.5";
12030
12034
  var API_URL = "https://api.percher.run";
12031
12035
  function isDisabled() {
12032
12036
  return process.env.PERCHER_NO_TELEMETRY === "1" || process.env.PERCHER_NO_TELEMETRY === "true" || process.env.DO_NOT_TRACK === "1";
@@ -12089,7 +12093,7 @@ Update available: ${VERSION} → ${latest}`));
12089
12093
  }
12090
12094
 
12091
12095
  // src/index.ts
12092
- var VERSION2 = "0.2.3";
12096
+ var VERSION2 = "0.2.5";
12093
12097
 
12094
12098
  class SilentExitError {
12095
12099
  exitCode;
@@ -12434,4 +12438,4 @@ async function run(argv, ctxOverride) {
12434
12438
 
12435
12439
  // bin/percher.ts
12436
12440
  var code = await run(process.argv.slice(2));
12437
- process.exit(code);
12441
+ process.exitCode = code;
@@ -1 +1 @@
1
- {"version":3,"file":"percher.js","sourceRoot":"","sources":["../../bin/percher.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"percher.js","sourceRoot":"","sources":["../../bin/percher.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC"}
@@ -2,7 +2,7 @@ import { PercherClient } from "@percher/client";
2
2
  import { openUrl } from "./open";
3
3
  import { prompt } from "./prompt";
4
4
  export async function createCliContext() {
5
- const client = new PercherClient({ clientVersion: "percher-cli/0.2.3" });
5
+ const client = new PercherClient({ clientVersion: "percher-cli/0.2.5" });
6
6
  const encoder = new TextEncoder();
7
7
  const stdout = new WritableStream({
8
8
  write(chunk) {
package/dist/src/index.js CHANGED
@@ -5,7 +5,7 @@ import { createCliContext } from "./context";
5
5
  import { renderError } from "./output";
6
6
  import { showTelemetryNotice, trackEvent } from "./telemetry";
7
7
  import { checkForUpdates } from "./version-check";
8
- const VERSION = "0.2.3";
8
+ const VERSION = "0.2.5";
9
9
  /** Thrown after output is already printed, to signal non-zero exit without an error message. */
10
10
  class SilentExitError {
11
11
  exitCode;
@@ -1,4 +1,4 @@
1
- export declare const VERSION = "0.2.3";
1
+ export declare const VERSION = "0.2.5";
2
2
  /**
3
3
  * Send a telemetry event. Fire-and-forget — never blocks, never throws.
4
4
  * Respects PERCHER_NO_TELEMETRY=1 and DO_NOT_TRACK=1.
@@ -1,4 +1,4 @@
1
- export const VERSION = "0.2.3";
1
+ export const VERSION = "0.2.5";
2
2
  const API_URL = "https://api.percher.run";
3
3
  /** Check if telemetry is disabled via env var. */
4
4
  function isDisabled() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "percher",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "CLI for the Percher hosting platform — publish apps with one command",
5
5
  "type": "module",
6
6
  "bin": {