@agent-ix/quire-cli 0.32.0 → 0.35.0

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/bin/quire.js +10 -9
  2. package/package.json +25 -25
package/bin/quire.js CHANGED
@@ -7,26 +7,27 @@
7
7
 
8
8
  const { spawnSync } = require("node:child_process");
9
9
  const fs = require("node:fs");
10
+ const packageJson = require("../package.json");
10
11
 
11
12
  const PLATFORM = process.platform; // 'linux' | 'darwin' | 'win32' | ...
12
13
  const ARCH = process.arch; // 'x64' | 'arm64' | ...
13
- const SUPPORTED = [
14
- "linux-x64",
15
- "linux-arm64",
16
- "darwin-arm64",
17
- "win32-x64",
18
- ];
14
+ const PACKAGE_PREFIX = "@agent-ix/quire-cli-";
15
+ const OPTIONAL_DEPENDENCIES = packageJson.optionalDependencies || {};
19
16
 
20
17
  function resolveBinary() {
21
18
  const key = `${PLATFORM}-${ARCH}`;
22
- if (!SUPPORTED.includes(key)) {
19
+ const pkg = `${PACKAGE_PREFIX}${key}`;
20
+ if (!Object.prototype.hasOwnProperty.call(OPTIONAL_DEPENDENCIES, pkg)) {
21
+ const supported = Object.keys(OPTIONAL_DEPENDENCIES)
22
+ .filter((name) => name.startsWith(PACKAGE_PREFIX))
23
+ .map((name) => name.slice(PACKAGE_PREFIX.length))
24
+ .sort();
23
25
  throw new Error(
24
26
  `quire-cli: unsupported platform "${key}".\n` +
25
- `Prebuilt binaries exist for: ${SUPPORTED.join(", ")}.\n` +
27
+ `Prebuilt binaries exist for: ${supported.join(", ")}.\n` +
26
28
  `Build from source instead: https://github.com/agent-ix/quire-cli`
27
29
  );
28
30
  }
29
- const pkg = `@agent-ix/quire-cli-${key}`;
30
31
  const binName = PLATFORM === "win32" ? "quire.exe" : "quire";
31
32
  try {
32
33
  return require.resolve(`${pkg}/bin/${binName}`);
package/package.json CHANGED
@@ -1,7 +1,17 @@
1
1
  {
2
- "name": "@agent-ix/quire-cli",
3
- "version": "0.32.0",
2
+ "author": "Agent IX <kreneskyp@gmail.com>",
3
+ "bin": {
4
+ "quire": "bin/quire.js"
5
+ },
4
6
  "description": "Static CLI over quire-rs (parse, extract, lookup, edit, validate, schema, lint) for Markdown artifacts.",
7
+ "engines": {
8
+ "node": ">=16"
9
+ },
10
+ "files": [
11
+ "bin/",
12
+ "LICENSE"
13
+ ],
14
+ "homepage": "https://github.com/agent-ix/quire-cli#readme",
5
15
  "keywords": [
6
16
  "quire",
7
17
  "cli",
@@ -10,32 +20,22 @@
10
20
  "filament",
11
21
  "agent-ix"
12
22
  ],
13
- "homepage": "https://github.com/agent-ix/quire-cli#readme",
23
+ "license": "AGPL-3.0-or-later",
24
+ "name": "@agent-ix/quire-cli",
25
+ "optionalDependencies": {
26
+ "@agent-ix/quire-cli-darwin-arm64": "0.35.0",
27
+ "@agent-ix/quire-cli-linux-arm64": "0.35.0",
28
+ "@agent-ix/quire-cli-linux-x64": "0.35.0",
29
+ "@agent-ix/quire-cli-win32-x64": "0.35.0"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public",
33
+ "registry": "https://registry.npmjs.org/"
34
+ },
14
35
  "repository": {
15
36
  "type": "git",
16
37
  "url": "git+https://github.com/agent-ix/quire-cli.git"
17
38
  },
18
- "license": "AGPL-3.0-or-later",
19
- "author": "Agent IX <kreneskyp@gmail.com>",
20
39
  "type": "commonjs",
21
- "bin": {
22
- "quire": "bin/quire.js"
23
- },
24
- "files": [
25
- "bin/",
26
- "LICENSE"
27
- ],
28
- "engines": {
29
- "node": ">=16"
30
- },
31
- "optionalDependencies": {
32
- "@agent-ix/quire-cli-linux-x64": "0.32.0",
33
- "@agent-ix/quire-cli-linux-arm64": "0.32.0",
34
- "@agent-ix/quire-cli-darwin-arm64": "0.32.0",
35
- "@agent-ix/quire-cli-win32-x64": "0.32.0"
36
- },
37
- "publishConfig": {
38
- "registry": "https://registry.npmjs.org/",
39
- "access": "public"
40
- }
40
+ "version": "0.35.0"
41
41
  }