@telpin-sistemas/orqen-desktop 0.1.9 → 0.1.11

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,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // `orqen-desktop [folder]`: opens the orqen desktop app installed with npm (npm i -g @telpin-sistemas/orqen-desktop).
2
+ // Opens orqen Studio with the command exposed by the installed npm package.
3
3
  // The app itself is a native binary that npm brings in the package of this platform (@telpin-sistemas/orqen-desktop-<os>-<cpu>);
4
4
  // the orqen CLI comes as a dependency, so nothing else has to be downloaded or put in the PATH by hand.
5
5
  import { spawn } from "node:child_process";
@@ -9,12 +9,15 @@ import { homedir, tmpdir } from "node:os";
9
9
  import { delimiter, dirname, join } from "node:path";
10
10
 
11
11
  const require = createRequire(import.meta.url);
12
+ const manifest = require.resolve("../package.json");
13
+ const { name: packageName, version, bin: commands } = require(manifest);
14
+ const [command] = Object.keys(commands);
12
15
  const SUPPORTED = ["win32-x64", "darwin-arm64", "darwin-x64", "linux-x64"];
13
16
  const platform = `${process.platform}-${process.arch}`;
14
17
  const args = process.argv.slice(2);
15
18
 
16
19
  function fail(msg) {
17
- console.error(`orqen-desktop: ${msg}`);
20
+ console.error(`${command}: ${msg}`);
18
21
  process.exit(1);
19
22
  }
20
23
 
@@ -25,15 +28,14 @@ try {
25
28
  bin = join(dirname(pkg), "bin", process.platform === "win32" ? "orqen-desktop.exe" : "orqen-desktop");
26
29
  } catch {
27
30
  if (!SUPPORTED.includes(platform)) fail(`there is no build for ${platform} yet (available: ${SUPPORTED.join(", ")}).`);
28
- fail(`the package @telpin-sistemas/orqen-desktop-${platform} is missing. Reinstall without --omit=optional / --no-optional: npm i -g @telpin-sistemas/orqen-desktop`);
31
+ fail(`the package @telpin-sistemas/orqen-desktop-${platform} is missing. Reinstall without --omit=optional / --no-optional: npm i -g ${packageName}`);
29
32
  }
30
- if (!existsSync(bin)) fail(`${bin} is missing. Reinstall: npm i -g @telpin-sistemas/orqen-desktop`);
33
+ if (!existsSync(bin)) fail(`${bin} is missing. Reinstall: npm i -g ${packageName}`);
31
34
  if (process.platform !== "win32") { try { chmodSync(bin, 0o755); } catch { /* read-only install: it already has the bit */ } }
32
35
 
33
36
  // 2. the orqen CLI that came with it: the app runs it, and so do the agents inside the app (`orqen` in their PATH)
34
37
  const env = { ...process.env };
35
38
  const extra = [];
36
- const manifest = require.resolve("../package.json");
37
39
  delete env.ORQEN_DESKTOP_NPM_MANIFEST;
38
40
  let cli;
39
41
  try { cli = join(dirname(require.resolve("@telpin-sistemas/orqen/package.json")), "dist", "index.js"); } catch { cli = undefined; }
@@ -56,7 +58,7 @@ const finalArgs = [...extra, ...args.filter((a) => a !== "--wait")];
56
58
  // Windows locks a running executable. Keep the npm copy free for an in-app update.
57
59
  if (process.platform === "win32") {
58
60
  try {
59
- const cache = join(env.LOCALAPPDATA || tmpdir(), "orqen", "npm-desktop", require(manifest).version);
61
+ const cache = join(env.LOCALAPPDATA || tmpdir(), "orqen", "npm-desktop", version);
60
62
  const cachedBin = join(cache, "orqen-desktop.exe");
61
63
  if (!existsSync(cachedBin)) {
62
64
  mkdirSync(cache, { recursive: true });
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@telpin-sistemas/orqen-desktop",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "license": "MIT",
5
5
  "homepage": "https://github.com/sistemas-telpin/orqen-gui",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/sistemas-telpin/orqen-gui.git"
9
9
  },
10
- "description": "orqen — AI Software Factory Kit: the desktop app (requests, agents, terminals, Git and specs)",
10
+ "description": "orqen Studio — AI Software Factory Kit for requests, agents, terminals, Git and specs",
11
11
  "type": "module",
12
12
  "bin": {
13
13
  "orqen-desktop": "bin/orqen-desktop.js"
@@ -23,10 +23,10 @@
23
23
  "@telpin-sistemas/orqen": ">=0.1.7"
24
24
  },
25
25
  "optionalDependencies": {
26
- "@telpin-sistemas/orqen-desktop-win32-x64": "0.1.9",
27
- "@telpin-sistemas/orqen-desktop-darwin-arm64": "0.1.9",
28
- "@telpin-sistemas/orqen-desktop-darwin-x64": "0.1.9",
29
- "@telpin-sistemas/orqen-desktop-linux-x64": "0.1.9"
26
+ "@telpin-sistemas/orqen-desktop-win32-x64": "0.1.11",
27
+ "@telpin-sistemas/orqen-desktop-darwin-arm64": "0.1.11",
28
+ "@telpin-sistemas/orqen-desktop-darwin-x64": "0.1.11",
29
+ "@telpin-sistemas/orqen-desktop-linux-x64": "0.1.11"
30
30
  },
31
31
  "keywords": [
32
32
  "orqen",