qa 0.0.29 → 0.0.30
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.
- package/README.md +6 -6
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.js +2 -2
- package/dist/commands/login.d.ts +1 -1
- package/dist/commands/login.js +2 -2
- package/dist/commands/start.d.ts +1 -1
- package/dist/commands/start.js +1 -1
- package/dist/commands/test.d.ts +1 -1
- package/dist/commands/test.js +1 -1
- package/dist/commands/utils/index.d.ts +1 -1
- package/dist/commands/utils/index.js +1 -1
- package/dist/commands/utils/prompts.d.ts +1 -1
- package/dist/commands/utils/prompts.js +2 -2
- package/dist/constants.js +2 -2
- package/dist/ide/index.js +6 -6
- package/dist/index.js +3 -3
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
</center>
|
|
4
4
|
|
|
5
5
|
<center>
|
|
6
|
-
<h1>
|
|
6
|
+
<h1>VollQ CLI</h1>
|
|
7
7
|
</center>
|
|
8
8
|
|
|
9
9
|
<div align="center">
|
|
10
10
|
<a href="https://npmjs.com/package/qa"><img src="https://img.shields.io/npm/v/qa?style=flat&colorA=080f12&colorB=1fa669"></a>
|
|
11
11
|
<a href="https://npmjs.com/package/qa"><img src="https://img.shields.io/npm/dm/qa?style=flat&colorA=080f12&colorB=1fa669"></a>
|
|
12
12
|
<a href="https://bundlephobia.com/result?p=oat"><img src="https://img.shields.io/bundlephobia/minzip/qa?style=flat&colorA=080f12&colorB=1fa669&label=minzip"></a>
|
|
13
|
-
<!-- <a href="https://github.com/
|
|
13
|
+
<!-- <a href="https://github.com/vollq-ai/qa/blob/main/LICENSE"><img src="https://img.shields.io/github/license/vollq-ai/qa.svg?style=flat&colorA=080f12&colorB=1fa669"></a> -->
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
|
-
The
|
|
16
|
+
The VollQ provides a CLI tool that gives you access to all your tests within the VollQ platform.
|
|
17
17
|
|
|
18
18
|
## Install
|
|
19
19
|
|
|
20
|
-
To install the latest version of
|
|
20
|
+
To install the latest version of VollQ CLI, run this command:
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
23
|
npm i -g qa
|
|
@@ -28,11 +28,11 @@ npm i -g qa
|
|
|
28
28
|
To quickly start a new project, run the following commands:
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
|
-
qa login # login or register to the
|
|
31
|
+
qa login # login or register to the VollQ platform
|
|
32
32
|
qa init # initiate API or browser testing for your project
|
|
33
33
|
qa test <PROJECT> # run an API or browser test
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
## Documentation
|
|
37
37
|
|
|
38
|
-
For details on how to use
|
|
38
|
+
For details on how to use VollQ CLI, check out our [documentation](https://docs.vollq.ai/cli).
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Argv } from 'yargs';
|
|
2
2
|
export declare const command = "init [option]";
|
|
3
|
-
export declare const desc = "Create a new
|
|
3
|
+
export declare const desc = "Create a new VollQ project";
|
|
4
4
|
export declare const cmdArgs: {
|
|
5
5
|
readonly token: {
|
|
6
6
|
readonly alias: "t";
|
package/dist/commands/init.js
CHANGED
|
@@ -4,7 +4,7 @@ import { fetchProjectNames, generateTests, validateAuthToken, createSpecificatio
|
|
|
4
4
|
import { askTestingType, askSpecLocation, askProjectDetails, askSecurityParams, askServerParams, askForUserAuth } from './utils/prompts.js';
|
|
5
5
|
import { CLI_EPILOGUE } from '../constants.js';
|
|
6
6
|
export const command = 'init [option]';
|
|
7
|
-
export const desc = 'Create a new
|
|
7
|
+
export const desc = 'Create a new VollQ project';
|
|
8
8
|
export const cmdArgs = {
|
|
9
9
|
token: {
|
|
10
10
|
alias: 't',
|
|
@@ -22,7 +22,7 @@ export const builder = (yargs) => {
|
|
|
22
22
|
export const handler = async (argv) => {
|
|
23
23
|
let token = await getAccessToken(argv.token);
|
|
24
24
|
const s = spinner();
|
|
25
|
-
intro('Start new
|
|
25
|
+
intro('Start new VollQ project');
|
|
26
26
|
await askTestingType();
|
|
27
27
|
const { specPath, spec } = await askSpecLocation();
|
|
28
28
|
s.start('Looking up user account...');
|
package/dist/commands/login.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Argv } from 'yargs';
|
|
2
2
|
export declare const command = "login [option]";
|
|
3
|
-
export declare const desc = "Log in to the
|
|
3
|
+
export declare const desc = "Log in to the vollq.ai platform";
|
|
4
4
|
export declare const cmdArgs: {
|
|
5
5
|
readonly token: {
|
|
6
6
|
readonly alias: "t";
|
package/dist/commands/login.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import { execSync } from 'node:child_process';
|
|
3
3
|
import { v4 as uuidv4 } from 'uuid';
|
|
4
|
-
import { client } from '@
|
|
4
|
+
import { client } from '@vollq/contracts/client';
|
|
5
5
|
import { CLI_EPILOGUE, PLATFORM_URL, TOKEN_PATH } from '../constants.js';
|
|
6
6
|
const LOGIN_TIMEOUT = 1000 * 60; // 1 minute
|
|
7
7
|
const LOGIN_VERIFY_INTERVAL = 500;
|
|
8
8
|
export const command = 'login [option]';
|
|
9
|
-
export const desc = 'Log in to the
|
|
9
|
+
export const desc = 'Log in to the vollq.ai platform';
|
|
10
10
|
export const cmdArgs = {
|
|
11
11
|
token: {
|
|
12
12
|
alias: 't',
|
package/dist/commands/start.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Argv } from 'yargs';
|
|
2
2
|
export declare const command = "start [option]";
|
|
3
|
-
export declare const desc = "Start the
|
|
3
|
+
export declare const desc = "Start the VollQ IDE";
|
|
4
4
|
export declare const cmdArgs: {
|
|
5
5
|
readonly token: {
|
|
6
6
|
readonly alias: "t";
|
package/dist/commands/start.js
CHANGED
|
@@ -10,7 +10,7 @@ process.on('SIGINT', onShutdown);
|
|
|
10
10
|
process.on('SIGTERM', onShutdown);
|
|
11
11
|
process.on('beforeExit', onShutdown);
|
|
12
12
|
export const command = 'start [option]';
|
|
13
|
-
export const desc = 'Start the
|
|
13
|
+
export const desc = 'Start the VollQ IDE';
|
|
14
14
|
export const cmdArgs = {
|
|
15
15
|
token: {
|
|
16
16
|
alias: 't',
|
package/dist/commands/test.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Argv } from 'yargs';
|
|
2
2
|
import type { TestCommandParameters } from './types.js';
|
|
3
3
|
export declare const command = "test <type> <project> [option]";
|
|
4
|
-
export declare const desc = "Run a test on the
|
|
4
|
+
export declare const desc = "Run a test on the vollq.ai platform";
|
|
5
5
|
export declare const cmdArgs: {
|
|
6
6
|
readonly token: {
|
|
7
7
|
readonly alias: "t";
|
package/dist/commands/test.js
CHANGED
|
@@ -3,7 +3,7 @@ import { runUITest } from '../ui/index.js';
|
|
|
3
3
|
import { getAccessToken } from '../auth.js';
|
|
4
4
|
import { CLI_EPILOGUE } from '../constants.js';
|
|
5
5
|
export const command = 'test <type> <project> [option]';
|
|
6
|
-
export const desc = 'Run a test on the
|
|
6
|
+
export const desc = 'Run a test on the vollq.ai platform';
|
|
7
7
|
export const cmdArgs = {
|
|
8
8
|
token: {
|
|
9
9
|
alias: 't',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { outro } from '@clack/prompts';
|
|
2
|
-
import { getAuthenticatedClient } from '@
|
|
2
|
+
import { getAuthenticatedClient } from '@vollq/contracts/client';
|
|
3
3
|
export async function createSpecification(token, projectProps, file, spinner) {
|
|
4
4
|
const client = getAuthenticatedClient(token);
|
|
5
5
|
const resSpecCreation = await client.specification.create({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ServerObject, type SpecificationRequest } from '@
|
|
1
|
+
import { type ServerObject, type SpecificationRequest } from '@vollq/contracts';
|
|
2
2
|
import { type OpenAPIV3 } from 'openapi-types';
|
|
3
3
|
export declare function askTestingType(): Promise<string>;
|
|
4
4
|
export declare function askSpecLocation(): Promise<{
|
|
@@ -40,7 +40,7 @@ export async function askSpecLocation() {
|
|
|
40
40
|
if (specPath.startsWith('https://') || specPath.startsWith('http://')) {
|
|
41
41
|
try {
|
|
42
42
|
const origSpecString = await (await fetch(specPath)).text();
|
|
43
|
-
let filePath = `${os.tmpdir()}/
|
|
43
|
+
let filePath = `${os.tmpdir()}/vollq-${specPath.split('/').pop()}`;
|
|
44
44
|
/**
|
|
45
45
|
* make sure it is a json file
|
|
46
46
|
*/
|
|
@@ -205,7 +205,7 @@ export async function askServerParams(spec) {
|
|
|
205
205
|
outro('Bye!');
|
|
206
206
|
process.exit(0);
|
|
207
207
|
}
|
|
208
|
-
serverVars[name] = varPrompt;
|
|
208
|
+
serverVars[name] = { default: varPrompt };
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
let customServerUrl;
|
package/dist/constants.js
CHANGED
|
@@ -7,6 +7,6 @@ export const CLI_EPILOGUE = `Documentation: https://docs.vollq.ai/cli
|
|
|
7
7
|
qa (v${pkg.version})
|
|
8
8
|
© 2025 VollQ, Inc.
|
|
9
9
|
`;
|
|
10
|
-
export const PLATFORM_URL = process.env.
|
|
11
|
-
export const WORKER_URL = process.env.
|
|
10
|
+
export const PLATFORM_URL = process.env.VOLLQ_PLATFORM_URL || 'https://vollq.ai' || 'http://localhost:4000';
|
|
11
|
+
export const WORKER_URL = process.env.VOLLQ_WORKER_URL || 'wss://worker.vollq.ai' || 'ws://localhost:8080';
|
|
12
12
|
export const TOKEN_PATH = path.join(homedir(), '/.vollqrc');
|
package/dist/ide/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import staticServer from '@fastify/static';
|
|
|
7
7
|
import websocket from '@fastify/websocket';
|
|
8
8
|
import { v4 as uuidv4 } from 'uuid';
|
|
9
9
|
import { NeuralSpec } from 'neuralspec';
|
|
10
|
-
import { WebSocketClient } from '@
|
|
10
|
+
import { WebSocketClient } from '@vollq/contracts';
|
|
11
11
|
import { spinner, log } from '@clack/prompts';
|
|
12
12
|
import { setupBrowserEnvironment, attachTokenToWindow, getCacheDir } from './utils.js';
|
|
13
13
|
import { login } from '../commands/login.js';
|
|
@@ -59,7 +59,7 @@ export class IDE {
|
|
|
59
59
|
this.#isShuttingDown = true;
|
|
60
60
|
try {
|
|
61
61
|
this.#messager = undefined;
|
|
62
|
-
this.#fastify.log.info('Shutting down the
|
|
62
|
+
this.#fastify.log.info('Shutting down the VollQ IDE');
|
|
63
63
|
await Promise.all([
|
|
64
64
|
this.#ideSession?.deleteSession(),
|
|
65
65
|
this.#workbenchSession?.deleteSession(),
|
|
@@ -77,7 +77,7 @@ export class IDE {
|
|
|
77
77
|
}
|
|
78
78
|
async #startApplication() {
|
|
79
79
|
try {
|
|
80
|
-
const appPath = path.dirname(url.fileURLToPath(import.meta.resolve('@
|
|
80
|
+
const appPath = path.dirname(url.fileURLToPath(import.meta.resolve('@vollq/ide')));
|
|
81
81
|
/**
|
|
82
82
|
* do all this async work in parallel
|
|
83
83
|
*/
|
|
@@ -106,7 +106,7 @@ export class IDE {
|
|
|
106
106
|
return ideUrl;
|
|
107
107
|
}
|
|
108
108
|
catch (err) {
|
|
109
|
-
this.#fastify.log.error('Failed to start the
|
|
109
|
+
this.#fastify.log.error('Failed to start the VollQ IDE', err);
|
|
110
110
|
throw err;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
@@ -123,11 +123,11 @@ export class IDE {
|
|
|
123
123
|
}
|
|
124
124
|
await Promise.all([
|
|
125
125
|
this.#ideSession.url(url),
|
|
126
|
-
this.#workbenchSession.url('https://
|
|
126
|
+
this.#workbenchSession.url('https://vollq.ai'),
|
|
127
127
|
]);
|
|
128
128
|
}
|
|
129
129
|
catch (err) {
|
|
130
|
-
console.error('Failed to start the
|
|
130
|
+
console.error('Failed to start the VollQ IDE', err);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
#registerToken(token) {
|
package/dist/index.js
CHANGED
|
@@ -7,14 +7,14 @@ const DESCRIPTION = [
|
|
|
7
7
|
'',
|
|
8
8
|
'$ qa test my-test-project',
|
|
9
9
|
'',
|
|
10
|
-
'For more information, visit: https://
|
|
10
|
+
'For more information, visit: https://vollq.ai/docs/cli'
|
|
11
11
|
];
|
|
12
12
|
export async function run() {
|
|
13
13
|
const argv = yargs(hideBin(process.argv))
|
|
14
14
|
.command(commands)
|
|
15
|
-
.example('qa start', 'Starts the
|
|
15
|
+
.example('qa start', 'Starts the VollQ IDE')
|
|
16
16
|
.example('qa login', 'Logs you into the platform')
|
|
17
|
-
.example('qa init', 'Creates a new
|
|
17
|
+
.example('qa init', 'Creates a new VollQ project')
|
|
18
18
|
.example('qa test myAPI', 'Runs test on API named "myAPI"')
|
|
19
19
|
.updateStrings({ 'Commands:': `${DESCRIPTION.join('\n')}\n\nCommands:` })
|
|
20
20
|
.version(pkg.version)
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qa",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"author": "Christian Bromann <christian@
|
|
5
|
-
"description": "
|
|
3
|
+
"version": "0.0.30",
|
|
4
|
+
"author": "Christian Bromann <christian@vollq.ai>",
|
|
5
|
+
"description": "VollQ CLI",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"bin": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"ws": "^8.18.0",
|
|
26
26
|
"yargs": "^17.7.2",
|
|
27
27
|
"webdriverio": "^9.6.4",
|
|
28
|
-
"@
|
|
29
|
-
"@
|
|
28
|
+
"@vollq/contracts": "0.0.12",
|
|
29
|
+
"@vollq/ide": "0.0.7",
|
|
30
30
|
"localdriver": "0.0.4",
|
|
31
31
|
"neuralspec": "0.0.5"
|
|
32
32
|
},
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"build": "run-s build:*",
|
|
43
43
|
"build:ts": "tsc",
|
|
44
44
|
"build:replace": "run-s build:replace:*",
|
|
45
|
-
"build:replace:platform": "replace-in-files --string='process.env.PLATFORM_URL' --replacement=\"process.env.
|
|
46
|
-
"build:replace:worker": "replace-in-files --string='process.env.WORKER_URL' --replacement=\"process.env.
|
|
45
|
+
"build:replace:platform": "replace-in-files --string='process.env.PLATFORM_URL' --replacement=\"process.env.VOLLQ_PLATFORM_URL || '$PLATFORM_URL'\" ./dist/constants.js",
|
|
46
|
+
"build:replace:worker": "replace-in-files --string='process.env.WORKER_URL' --replacement=\"process.env.VOLLQ_WORKER_URL || '$WORKER_URL'\" ./dist/constants.js",
|
|
47
47
|
"start": "tsc --watch --preserveWatchOutput",
|
|
48
48
|
"test": "run-s test.*",
|
|
49
49
|
"test.unit": "echo \"Error: no test specified\" && exit 0"
|