testdriverai 4.0.9 → 4.0.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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/lib/init.js +15 -5
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Next generation autonomous AI agent for end-to-end testing of web & desktop
6
6
 
7
- [Docs](https://docs.testdriver.ai) | [Website](https://testdriver.ai) | [GitHub Action](https://github.com/marketplace/actions/testdriver-ai) | [Join our Discord](https://discord.gg/ZjhBsJc5)
7
+ [Docs](https://docs.testdriver.ai) | [Website](https://testdriver.ai) | [GitHub Action](https://github.com/marketplace/actions/testdriver-ai) | [Join our Discord](https://discord.gg/22RdN6tp)
8
8
 
9
9
  ----
10
10
 
package/lib/init.js CHANGED
@@ -35,11 +35,16 @@ async function getLatestRelease(owner, repo) {
35
35
  const dest = fs.createWriteStream(path2);
36
36
  downloadResponse.data.pipe(dest);
37
37
 
38
- dest.on('close', () => {
38
+ return new Promise((resolve, reject) => {
39
+ dest.on('finish', () => {
40
+ resolve(path2);
41
+ });
42
+
43
+ dest.on('error', (error) => {
44
+ reject(error);
45
+ });
39
46
  });
40
47
 
41
- return path2;
42
-
43
48
  } else {
44
49
  console.log('No valid release found.');
45
50
  return false;
@@ -56,7 +61,7 @@ module.exports = async () => {
56
61
  console.log('')
57
62
  console.log(chalk.dim('This is a preview of the Testdriver.ai'));
58
63
  console.log(chalk.dim('Please report any issues in our Discord server: '));
59
- console.log(chalk.dim('https://discord.gg/3Q3QkZ2'));
64
+ console.log(chalk.dim('https://discord.gg/22RdN6tp'));
60
65
  console.log('')
61
66
  console.log('Beginning setup...')
62
67
  console.log('')
@@ -96,7 +101,7 @@ module.exports = async () => {
96
101
  ]);
97
102
 
98
103
  console.log('');
99
- console.log(chalk.dim(`Writing ${response.APPEND}...`));
104
+ console.log(chalk.dim(`Writing ${response.APPEND}...`));
100
105
  console.log('');
101
106
  console.log(`Downloading latest workflow files...`);
102
107
  console.log('');
@@ -126,6 +131,11 @@ module.exports = async () => {
126
131
  }
127
132
  });
128
133
 
134
+ // Create a folder named "testdriver" if it doesn't exist
135
+ const testdriverFolder = path.join(process.cwd(), 'testdriver');
136
+ if (!fs.existsSync(testdriverFolder)) {
137
+ fs.mkdirSync(testdriverFolder);
138
+ }
129
139
  }
130
140
 
131
141
  console.log('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "4.0.9",
3
+ "version": "4.0.11",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "index.js",
6
6
  "bin": {