@grekt/cli 6.37.0 → 6.38.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.
Files changed (2) hide show
  1. package/dist/index.js +40 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5,42 +5,61 @@ var __getProtoOf = Object.getPrototypeOf;
5
5
  var __defProp = Object.defineProperty;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ function __accessProp(key) {
9
+ return this[key];
10
+ }
8
11
  var __reExport = (target, mod, secondTarget) => {
9
- for (let key of __getOwnPropNames(mod))
12
+ var keys = __getOwnPropNames(mod);
13
+ for (let key of keys)
10
14
  if (!__hasOwnProp.call(target, key) && key !== "default")
11
15
  __defProp(target, key, {
12
- get: () => mod[key],
16
+ get: __accessProp.bind(mod, key),
13
17
  enumerable: true
14
18
  });
15
19
  if (secondTarget) {
16
- for (let key of __getOwnPropNames(mod))
20
+ for (let key of keys)
17
21
  if (!__hasOwnProp.call(secondTarget, key) && key !== "default")
18
22
  __defProp(secondTarget, key, {
19
- get: () => mod[key],
23
+ get: __accessProp.bind(mod, key),
20
24
  enumerable: true
21
25
  });
22
26
  return secondTarget;
23
27
  }
24
28
  };
29
+ var __toESMCache_node;
30
+ var __toESMCache_esm;
25
31
  var __toESM = (mod, isNodeMode, target) => {
32
+ var canCache = mod != null && typeof mod === "object";
33
+ if (canCache) {
34
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
35
+ var cached = cache.get(mod);
36
+ if (cached)
37
+ return cached;
38
+ }
26
39
  target = mod != null ? __create(__getProtoOf(mod)) : {};
27
40
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
28
41
  for (let key of __getOwnPropNames(mod))
29
42
  if (!__hasOwnProp.call(to, key))
30
43
  __defProp(to, key, {
31
- get: () => mod[key],
44
+ get: __accessProp.bind(mod, key),
32
45
  enumerable: true
33
46
  });
47
+ if (canCache)
48
+ cache.set(mod, to);
34
49
  return to;
35
50
  };
36
51
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
52
+ var __returnValue = (v) => v;
53
+ function __exportSetter(name, newValue) {
54
+ this[name] = __returnValue.bind(null, newValue);
55
+ }
37
56
  var __export = (target, all) => {
38
57
  for (var name in all)
39
58
  __defProp(target, name, {
40
59
  get: all[name],
41
60
  enumerable: true,
42
61
  configurable: true,
43
- set: (newValue) => all[name] = () => newValue
62
+ set: __exportSetter.bind(all, name)
44
63
  });
45
64
  };
46
65
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
@@ -103753,19 +103772,30 @@ var untrustCommand = new Command("untrust").description("Remove trusted status f
103753
103772
  });
103754
103773
 
103755
103774
  // src/auth/oauth/oauth.ts
103775
+ import { spawn } from "child_process";
103756
103776
  import { randomUUID as randomUUID3 } from "crypto";
103757
103777
  var LOGIN_TIMEOUT_MS = 5 * 60 * 1000;
103758
103778
  var POLL_INTERVAL_MS = 2000;
103759
103779
  function openBrowser(url) {
103760
103780
  const platform5 = process.platform;
103761
103781
  try {
103782
+ let command;
103783
+ let args;
103762
103784
  if (platform5 === "darwin") {
103763
- shell.execFile("open", [url]);
103785
+ command = "open";
103786
+ args = [url];
103764
103787
  } else if (platform5 === "win32") {
103765
- shell.execFile("rundll32", ["url.dll,FileProtocolHandler", url]);
103788
+ command = "rundll32";
103789
+ args = ["url.dll,FileProtocolHandler", url];
103766
103790
  } else {
103767
- shell.execFile("xdg-open", [url]);
103791
+ command = "xdg-open";
103792
+ args = [url];
103768
103793
  }
103794
+ const child = spawn(command, args, {
103795
+ detached: true,
103796
+ stdio: "ignore"
103797
+ });
103798
+ child.unref();
103769
103799
  return true;
103770
103800
  } catch {
103771
103801
  return false;
@@ -103966,7 +103996,7 @@ var whoamiCommand = new Command("whoami").description("Show current user").actio
103966
103996
  // package.json
103967
103997
  var package_default = {
103968
103998
  name: "@grekt/cli",
103969
- version: "6.37.0",
103999
+ version: "6.38.1",
103970
104000
  description: "AI tools versioned, synced, and shared across tools and teams",
103971
104001
  type: "module",
103972
104002
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grekt/cli",
3
- "version": "6.37.0",
3
+ "version": "6.38.1",
4
4
  "description": "AI tools versioned, synced, and shared across tools and teams",
5
5
  "type": "module",
6
6
  "bin": {