@donezone/cli 0.1.36 → 0.1.38

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 (2) hide show
  1. package/dist/index.js +14 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -25979,7 +25979,7 @@ var require_dist3 = __commonJS((exports) => {
25979
25979
  // src/index.ts
25980
25980
  var import_chokidar = __toESM(require_chokidar(), 1);
25981
25981
  var import_picocolors = __toESM(require_picocolors(), 1);
25982
- import { spawn } from "node:child_process";
25982
+ import { spawn, spawnSync } from "node:child_process";
25983
25983
  import { existsSync as existsSync2 } from "node:fs";
25984
25984
  import * as fs from "node:fs/promises";
25985
25985
  import path from "node:path";
@@ -26448,7 +26448,7 @@ class DoneBackendClient {
26448
26448
  fetchImpl;
26449
26449
  constructor(config) {
26450
26450
  this.baseUrl = config.baseUrl.replace(/\/$/, "");
26451
- this.fetchImpl = config.fetch ?? fetch;
26451
+ this.fetchImpl = (config.fetch ?? fetch).bind(globalThis);
26452
26452
  }
26453
26453
  contract(address) {
26454
26454
  return new DoneContractHandle(this, address);
@@ -43031,6 +43031,18 @@ function openBrowser(url) {
43031
43031
  }
43032
43032
  });
43033
43033
  }
43034
+ var bunRuntime = globalThis.Bun;
43035
+ if (typeof bunRuntime === "undefined") {
43036
+ const bunExecutable = process.env.BUN ?? "bun";
43037
+ const rerun = spawnSync(bunExecutable, [process.argv[1], ...process.argv.slice(2)], {
43038
+ stdio: "inherit"
43039
+ });
43040
+ if (rerun.error) {
43041
+ console.error("Bun runtime is required to run done CLI. Install Bun from https://bun.sh.");
43042
+ console.error(rerun.error.message);
43043
+ }
43044
+ process.exit(rerun.status ?? 1);
43045
+ }
43034
43046
  var DEFAULT_TEMPLATE_REPO = "https://github.com/mccallofthewild/done-template.git";
43035
43047
  var program2 = new Command;
43036
43048
  program2.name("done").description("Done developer toolkit (spec-first stub)").version("0.0.0-spec");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donezone/cli",
3
- "version": "0.1.36",
3
+ "version": "0.1.38",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {