aptunnel 1.1.1 → 1.1.2
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/package.json +1 -1
- package/src/commands/init.js +5 -6
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import readline from 'readline';
|
|
2
1
|
import { createInterface } from 'readline';
|
|
3
2
|
import { logger } from '../lib/logger.js';
|
|
4
3
|
import { isInstalled, login, listEnvironments, listDatabases } from '../lib/aptible.js';
|
|
5
|
-
import { installInstructions
|
|
4
|
+
import { installInstructions } from '../lib/platform.js';
|
|
6
5
|
import {
|
|
7
6
|
exists, save, savePassword, getConfigDir, getConfigPath, nextAvailablePort,
|
|
8
7
|
} from '../lib/config-manager.js';
|
|
@@ -50,9 +49,9 @@ export async function runInit(args) {
|
|
|
50
49
|
console.log('');
|
|
51
50
|
|
|
52
51
|
// 5. Discover environments
|
|
53
|
-
|
|
52
|
+
process.stdout.write('Discovering environments…\n');
|
|
54
53
|
const environments = listEnvironments();
|
|
55
|
-
|
|
54
|
+
logger.success(`Found ${environments.length} environment(s).`);
|
|
56
55
|
|
|
57
56
|
if (environments.length === 0) {
|
|
58
57
|
logger.warn('No environments found for this account.');
|
|
@@ -109,9 +108,9 @@ export async function runInit(args) {
|
|
|
109
108
|
|
|
110
109
|
for (const env of selectedEnvs) {
|
|
111
110
|
console.log('');
|
|
112
|
-
|
|
111
|
+
process.stdout.write(`Fetching databases for ${env.handle}…\n`);
|
|
113
112
|
const databases = listDatabases(env.handle);
|
|
114
|
-
|
|
113
|
+
logger.success(`Found ${databases.length} database(s) in ${env.handle}.`);
|
|
115
114
|
|
|
116
115
|
if (databases.length === 0) continue;
|
|
117
116
|
|