regressify 1.0.2 → 1.0.3
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/.github/workflows/deploy.yml +2 -0
- package/cli.js +2 -4
- package/package.json +1 -1
- package/approve.js +0 -10
- package/init.js +0 -15
- package/ref.js +0 -8
- package/test.js +0 -9
package/cli.js
CHANGED
|
@@ -47,7 +47,7 @@ function runCommand(command) {
|
|
|
47
47
|
const args = process.argv.slice(2);
|
|
48
48
|
let commandBase = `tsx ${getLibraryPath()}/src/index.ts`;
|
|
49
49
|
|
|
50
|
-
if (args[0] === '
|
|
50
|
+
if (args[0] === 'init') {
|
|
51
51
|
const __filename = fileURLToPath(import.meta.url);
|
|
52
52
|
const __dirname = dirname(__filename);
|
|
53
53
|
const postInstallPath = pathToFileURL(path.join(__dirname, 'generate_tests.js'));
|
|
@@ -70,7 +70,5 @@ if (args[0] === 'generate') {
|
|
|
70
70
|
console.log(chalk.yellow(`Running command: ${command}`));
|
|
71
71
|
runCommand(command);
|
|
72
72
|
} else {
|
|
73
|
-
console.log(
|
|
74
|
-
chalk.red("Invalid command. Use one of the following: 'eshn-visual generate' 'eshn-visual ref', 'eshn-visual approve', 'eshn-visual test'.")
|
|
75
|
-
);
|
|
73
|
+
console.log(chalk.red("Invalid command. Use one of the following: 'regressify init' 'regressify ref', 'regressify approve', 'regressify test'."));
|
|
76
74
|
}
|
package/package.json
CHANGED
package/approve.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
import { runCommand } from './helpers';
|
|
4
|
-
|
|
5
|
-
const args = process.argv.slice(2);
|
|
6
|
-
let commandBase = `tsx ${getLibraryPath()}/src/index.ts`;
|
|
7
|
-
|
|
8
|
-
const command = `${commandBase} --command approve ${args.slice(1).join(' ')}`;
|
|
9
|
-
console.log(chalk.yellow(`Running command: ${command}`));
|
|
10
|
-
runCommand(command);
|
package/init.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import path, { dirname } from 'path';
|
|
4
|
-
import { fileURLToPath, pathToFileURL } from 'url';
|
|
5
|
-
import chalk from 'chalk';
|
|
6
|
-
|
|
7
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
-
const __dirname = dirname(__filename);
|
|
9
|
-
const postInstallPath = pathToFileURL(path.join(__dirname, 'generate_tests.js'));
|
|
10
|
-
if (fs.existsSync(postInstallPath)) {
|
|
11
|
-
console.log(chalk.yellow('generate folder visual_tests ...'));
|
|
12
|
-
await import(postInstallPath);
|
|
13
|
-
} else {
|
|
14
|
-
console.log(chalk.red('generate_tests.js not found!'));
|
|
15
|
-
}
|
package/ref.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
|
|
4
|
-
const args = process.argv.slice(2);
|
|
5
|
-
let commandBase = `tsx ${getLibraryPath()}/src/index.ts`;
|
|
6
|
-
|
|
7
|
-
const command = `${commandBase} --command test --ref ${args.slice(1).join(' ')}`;
|
|
8
|
-
console.log(chalk.yellow(`Running command: ${command}`));
|
package/test.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
|
|
4
|
-
const args = process.argv.slice(2);
|
|
5
|
-
let commandBase = `tsx ${getLibraryPath()}/src/index.ts`;
|
|
6
|
-
|
|
7
|
-
const command = `${commandBase} --command test ${args.slice(1).join(' ')}`;
|
|
8
|
-
console.log(chalk.yellow(`Running command: ${command}`));
|
|
9
|
-
runCommand(command);
|