testdriverai 5.7.33 → 5.7.34

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/lib/init.js +67 -53
  2. package/package.json +1 -1
package/lib/init.js CHANGED
@@ -68,7 +68,9 @@ module.exports = async () => {
68
68
  logger.info("├── Local Runner:" + chalk.green(" Free"));
69
69
  logger.info("│ └── " + chalk.dim("Run tests on your computer"));
70
70
  logger.info("│");
71
- logger.info("└── Sandbox Runner:" + chalk.green(" 7 Day Trial then $20/month"));
71
+ logger.info(
72
+ "└── Sandbox Runner:" + chalk.green(" 7 Day Trial then $20/month"),
73
+ );
72
74
  logger.info(
73
75
  " └── " + chalk.dim("Run tests on private hosted ephemeral VMs"),
74
76
  );
@@ -78,61 +80,73 @@ module.exports = async () => {
78
80
  logger.info(" └── ✅ " + "Better DX");
79
81
  logger.info("");
80
82
 
81
- const response = await prompts([
82
- {
83
- type: "confirm",
84
- name: "TD_VM",
85
- message: "Use Sandbox Runners? (Recommended)",
86
- initial: true,
87
- },
88
- {
89
- type: (prev) => (prev ? "password" : null),
90
- name: "TD_API_KEY",
91
- message: "API KEY (from https://app.testdriver.ai/team)",
92
- },
93
- {
94
- type: (prev) => (prev ? null : "confirm"),
95
- name: "TD_MINIMIZE",
96
- message: "Minimize terminal app?",
97
- initial: false,
98
- },
99
- {
100
- type: (prev) => (prev ? null : "confirm"),
101
- name: "TD_NOTIFY",
102
- message: "Enable desktop notifications?",
103
- initial: true,
104
- },
105
- {
106
- type: (prev) => (prev ? null : "confirm"),
107
- name: "TD_SPEAK",
108
- message: "Enable text to speech narration?",
109
- initial: true,
110
- },
83
+ const response = await prompts(
84
+ [
85
+ {
86
+ type: "confirm",
87
+ name: "TD_VM",
88
+ message: "Use Sandbox Runners? (Recommended)",
89
+ initial: true,
90
+ },
91
+ {
92
+ type: (prev) => (prev ? "password" : null),
93
+ name: "TD_API_KEY",
94
+ message: "API KEY (from https://app.testdriver.ai/team)",
95
+ },
96
+ {
97
+ type: (prev) => (prev ? null : "confirm"),
98
+ name: "TD_MINIMIZE",
99
+ message: "Minimize terminal app?",
100
+ initial: false,
101
+ },
102
+ {
103
+ type: (prev) => (prev ? null : "confirm"),
104
+ name: "TD_NOTIFY",
105
+ message: "Enable desktop notifications?",
106
+ initial: true,
107
+ },
108
+ {
109
+ type: (prev) => (prev ? null : "confirm"),
110
+ name: "TD_SPEAK",
111
+ message: "Enable text to speech narration?",
112
+ initial: true,
113
+ },
111
114
 
115
+ {
116
+ type: "select",
117
+ name: "TD_TYPE",
118
+ message: "What type of app are you testing?",
119
+ choices: [
120
+ { title: "Website", value: "website" },
121
+ { title: "Mobile", value: "mobile" },
122
+ { title: "Desktop", value: "desktop" },
123
+ ],
124
+ initial: 0,
125
+ },
126
+ {
127
+ type: (prev) => (prev === "website" ? "text" : null),
128
+ name: "TD_WEBSITE",
129
+ message: "What is the root URL of your website?",
130
+ initial: "https://testdriver-sandbox.vercel.app",
131
+ },
132
+ {
133
+ type: "confirm",
134
+ name: "TD_ANALYTICS",
135
+ message: "Send anonymous analytics?",
136
+ initial: true,
137
+ },
138
+ ],
112
139
  {
113
- type: "select",
114
- name: "TD_TYPE",
115
- message: "What type of app are you testing?",
116
- choices: [
117
- { title: "Website", value: "website" },
118
- { title: "Mobile", value: "mobile" },
119
- { title: "Desktop", value: "desktop" },
120
- ],
121
- initial: 0,
122
- },
123
- {
124
- type: (prev) => (prev === "website" ? "text" : null),
125
- name: "TD_WEBSITE",
126
- message: "What is the root URL of your website?",
127
- initial: "https://testdriver-sandbox.vercel.app",
128
- },
129
- {
130
- type: "confirm",
131
- name: "TD_ANALYTICS",
132
- message: "Send anonymous analytics?",
133
- initial: true,
140
+ /**
141
+ * Exit if `ctrl+c`, `ctrl+d`, `esc`, or `abort`
142
+ *
143
+ * @see https://github.com/terkelg/prompts?tab=readme-ov-file#prompts
144
+ */
145
+ onCancel: () => {
146
+ process.exit(1);
147
+ },
134
148
  },
135
- ]);
149
+ );
136
150
 
137
151
  logger.info("");
138
152
  logger.info(chalk.dim(`Writing .env...`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "5.7.33",
3
+ "version": "5.7.34",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "index.js",
6
6
  "bin": {