neonctl 1.19.0 → 1.19.1
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/commands/projects.js +5 -2
- package/package.json +1 -1
- package/utils/string.js +4 -0
- package/writer.js +3 -2
package/commands/projects.js
CHANGED
|
@@ -82,8 +82,11 @@ const create = async (props) => {
|
|
|
82
82
|
project,
|
|
83
83
|
});
|
|
84
84
|
const out = writer(props);
|
|
85
|
-
out.write(data.project, { fields: PROJECT_FIELDS });
|
|
86
|
-
out.write(data.connection_uris, {
|
|
85
|
+
out.write(data.project, { fields: PROJECT_FIELDS, title: 'Project' });
|
|
86
|
+
out.write(data.connection_uris, {
|
|
87
|
+
fields: ['connection_uri'],
|
|
88
|
+
title: 'Connection URIs',
|
|
89
|
+
});
|
|
87
90
|
out.end();
|
|
88
91
|
};
|
|
89
92
|
const deleteProject = async (props) => {
|
package/package.json
CHANGED
package/utils/string.js
ADDED
package/writer.js
CHANGED
|
@@ -2,6 +2,7 @@ import YAML from 'yaml';
|
|
|
2
2
|
import Table from 'cli-table';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import { isCi } from './env.js';
|
|
5
|
+
import { toSnakeCase } from './utils/string.js';
|
|
5
6
|
/**
|
|
6
7
|
*
|
|
7
8
|
* Parses the output format, takes data and writes the output to stdout.
|
|
@@ -32,7 +33,7 @@ export const writer = (props) => {
|
|
|
32
33
|
out.write(YAML.stringify(chunks.length === 1
|
|
33
34
|
? chunks[0].data
|
|
34
35
|
: Object.fromEntries(chunks.map(({ config, data }, idx) => [
|
|
35
|
-
config.title
|
|
36
|
+
config.title ? toSnakeCase(config.title) : idx,
|
|
36
37
|
data,
|
|
37
38
|
])), null, 2));
|
|
38
39
|
return;
|
|
@@ -41,7 +42,7 @@ export const writer = (props) => {
|
|
|
41
42
|
out.write(JSON.stringify(chunks.length === 1
|
|
42
43
|
? chunks[0].data
|
|
43
44
|
: Object.fromEntries(chunks.map(({ config, data }, idx) => [
|
|
44
|
-
config.title
|
|
45
|
+
config.title ? toSnakeCase(config.title) : idx,
|
|
45
46
|
data,
|
|
46
47
|
])), null, 2));
|
|
47
48
|
return;
|