@rabbitqa/cli 0.0.0-stage → 1.0.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 (3) hide show
  1. package/README.md +5 -2
  2. package/package.json +29 -4
  3. package/run.cjs +33 -0
package/README.md CHANGED
@@ -1,3 +1,6 @@
1
- # Temporary Holding Version
1
+ # RabbitQA CLI
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Install: `npm install -g @rabbitqa/cli`. Run `rqcli --help`.
4
+ Native executable; optional platform packages must be enabled.
5
+ Tab completion: `rqcli completion --help` (bash, zsh, fish, PowerShell).
6
+ Use `rqcli skills print` for the agent guide.
package/package.json CHANGED
@@ -1,6 +1,31 @@
1
1
  {
2
2
  "name": "@rabbitqa/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "RabbitQA CLI",
5
+ "license": "UNLICENSED",
6
+ "engines": {
7
+ "node": ">=18"
8
+ },
9
+ "bin": {
10
+ "rqcli": "run.cjs"
11
+ },
12
+ "files": [
13
+ "run.cjs",
14
+ "README.md"
15
+ ],
16
+ "optionalDependencies": {
17
+ "@rabbitqa/cli-linux-x64": "1.0.0",
18
+ "@rabbitqa/cli-linux-arm64": "1.0.0",
19
+ "@rabbitqa/cli-darwin-x64": "1.0.0",
20
+ "@rabbitqa/cli-darwin-arm64": "1.0.0",
21
+ "@rabbitqa/cli-win32-x64": "1.0.0",
22
+ "@rabbitqa/cli-win32-arm64": "1.0.0"
23
+ },
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/RabbitQA/homebrew-tap.git"
30
+ }
31
+ }
package/run.cjs ADDED
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const path = require('node:path');
5
+ const { spawnSync } = require('node:child_process');
6
+ const target = `${process.platform}-${process.arch}`;
7
+ const supported = new Set(['darwin-arm64', 'darwin-x64', 'linux-arm64', 'linux-x64', 'win32-arm64', 'win32-x64']);
8
+ if (!supported.has(target)) {
9
+ console.error(`rqcli: unsupported platform ${target}`);
10
+ process.exit(1);
11
+ }
12
+ let binary;
13
+ try {
14
+ const manifest = require.resolve(`@rabbitqa/cli-${target}/package.json`);
15
+ binary = path.join(path.dirname(manifest), process.platform === 'win32' ? 'rqcli.exe' : 'rqcli');
16
+ } catch {
17
+ console.error(`rqcli: native package for ${target} is missing; reinstall with npm install -g @rabbitqa/cli --include=optional`);
18
+ process.exit(1);
19
+ }
20
+ const ephemeral = __dirname.split(path.sep).includes('_npx');
21
+ const result = spawnSync(binary, process.argv.slice(2), {
22
+ stdio: 'inherit',
23
+ env: { ...process.env, RQCLI_INSTALL_METHOD: ephemeral ? 'npx' : 'npm' },
24
+ });
25
+ if (result.error) {
26
+ console.error(`rqcli: could not start native executable: ${result.error.message}`);
27
+ process.exit(1);
28
+ }
29
+ if (result.signal) {
30
+ process.kill(process.pid, result.signal);
31
+ } else {
32
+ process.exit(result.status ?? 1);
33
+ }