@hesed/mysql 0.1.0 → 0.2.0
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/README.md +70 -68
- package/dist/commands/mysql/describe-table.d.ts +3 -1
- package/dist/commands/mysql/describe-table.js +8 -6
- package/dist/commands/mysql/{show-indexes.d.ts → indexes.d.ts} +3 -1
- package/dist/commands/mysql/{show-indexes.js → indexes.js} +8 -6
- package/oclif.manifest.json +84 -90
- package/package.json +1 -1
- /package/dist/commands/mysql/{list-databases.d.ts → databases.d.ts} +0 -0
- /package/dist/commands/mysql/{list-databases.js → databases.js} +0 -0
- /package/dist/commands/mysql/{list-tables.d.ts → tables.d.ts} +0 -0
- /package/dist/commands/mysql/{list-tables.js → tables.js} +0 -0
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ $ npm install -g @hesed/mysql
|
|
|
26
26
|
$ mq COMMAND
|
|
27
27
|
running command...
|
|
28
28
|
$ mq (--version)
|
|
29
|
-
@hesed/mysql/0.
|
|
29
|
+
@hesed/mysql/0.2.0 linux-x64 node-v22.22.0
|
|
30
30
|
$ mq --help [COMMAND]
|
|
31
31
|
USAGE
|
|
32
32
|
$ mq COMMAND
|
|
@@ -40,12 +40,12 @@ USAGE
|
|
|
40
40
|
* [`mq mysql auth add`](#mq-mysql-auth-add)
|
|
41
41
|
* [`mq mysql auth test`](#mq-mysql-auth-test)
|
|
42
42
|
* [`mq mysql auth update`](#mq-mysql-auth-update)
|
|
43
|
-
* [`mq mysql
|
|
43
|
+
* [`mq mysql databases`](#mq-mysql-databases)
|
|
44
|
+
* [`mq mysql describe-table TABLE`](#mq-mysql-describe-table-table)
|
|
44
45
|
* [`mq mysql explain-query QUERY`](#mq-mysql-explain-query-query)
|
|
45
|
-
* [`mq mysql
|
|
46
|
-
* [`mq mysql list-tables`](#mq-mysql-list-tables)
|
|
46
|
+
* [`mq mysql indexes TABLE`](#mq-mysql-indexes-table)
|
|
47
47
|
* [`mq mysql query QUERY`](#mq-mysql-query-query)
|
|
48
|
-
* [`mq mysql
|
|
48
|
+
* [`mq mysql tables`](#mq-mysql-tables)
|
|
49
49
|
|
|
50
50
|
## `mq mysql auth add`
|
|
51
51
|
|
|
@@ -53,16 +53,15 @@ Add a MySQL connection profile
|
|
|
53
53
|
|
|
54
54
|
```
|
|
55
55
|
USAGE
|
|
56
|
-
$ mq mysql auth add
|
|
57
|
-
[-u <value>]
|
|
56
|
+
$ mq mysql auth add -d <value> --host <value> -p <value> -P <value> --profile <value> -u <value> [--json] [--ssl]
|
|
58
57
|
|
|
59
58
|
FLAGS
|
|
60
|
-
-P, --port=<value> MySQL port
|
|
61
|
-
-d, --database=<value> Database name
|
|
62
|
-
-p, --password=<value> Password
|
|
63
|
-
-u, --user=<value> Username
|
|
64
|
-
--host=<value> MySQL host
|
|
65
|
-
--profile=<value> Profile name
|
|
59
|
+
-P, --port=<value> (required) MySQL port
|
|
60
|
+
-d, --database=<value> (required) Database name
|
|
61
|
+
-p, --password=<value> (required) Password
|
|
62
|
+
-u, --user=<value> (required) Username
|
|
63
|
+
--host=<value> (required) MySQL host
|
|
64
|
+
--profile=<value> (required) Profile name
|
|
66
65
|
--[no-]ssl Use SSL
|
|
67
66
|
|
|
68
67
|
GLOBAL FLAGS
|
|
@@ -77,7 +76,7 @@ EXAMPLES
|
|
|
77
76
|
$ mq mysql auth add --no-ssl
|
|
78
77
|
```
|
|
79
78
|
|
|
80
|
-
_See code: [src/commands/mysql/auth/add.ts](https://github.com/hesedcasa/mysql/blob/v0.
|
|
79
|
+
_See code: [src/commands/mysql/auth/add.ts](https://github.com/hesedcasa/mysql/blob/v0.2.0/src/commands/mysql/auth/add.ts)_
|
|
81
80
|
|
|
82
81
|
## `mq mysql auth test`
|
|
83
82
|
|
|
@@ -102,7 +101,7 @@ EXAMPLES
|
|
|
102
101
|
$ mq mysql auth test --profile staging
|
|
103
102
|
```
|
|
104
103
|
|
|
105
|
-
_See code: [src/commands/mysql/auth/test.ts](https://github.com/hesedcasa/mysql/blob/v0.
|
|
104
|
+
_See code: [src/commands/mysql/auth/test.ts](https://github.com/hesedcasa/mysql/blob/v0.2.0/src/commands/mysql/auth/test.ts)_
|
|
106
105
|
|
|
107
106
|
## `mq mysql auth update`
|
|
108
107
|
|
|
@@ -110,15 +109,14 @@ Update an existing MySQL connection profile
|
|
|
110
109
|
|
|
111
110
|
```
|
|
112
111
|
USAGE
|
|
113
|
-
$ mq mysql auth update
|
|
114
|
-
[-u <value>]
|
|
112
|
+
$ mq mysql auth update -d <value> --host <value> -p <value> -P <value> -u <value> [--json] [--profile <value>] [--ssl]
|
|
115
113
|
|
|
116
114
|
FLAGS
|
|
117
|
-
-P, --port=<value> MySQL port
|
|
118
|
-
-d, --database=<value> Database name
|
|
119
|
-
-p, --password=<value> Password
|
|
120
|
-
-u, --user=<value> Username
|
|
121
|
-
--host=<value> MySQL host
|
|
115
|
+
-P, --port=<value> (required) MySQL port
|
|
116
|
+
-d, --database=<value> (required) Database name
|
|
117
|
+
-p, --password=<value> (required) Password
|
|
118
|
+
-u, --user=<value> (required) Username
|
|
119
|
+
--host=<value> (required) MySQL host
|
|
122
120
|
--profile=<value> Profile name to update
|
|
123
121
|
--[no-]ssl Use SSL
|
|
124
122
|
|
|
@@ -134,43 +132,40 @@ EXAMPLES
|
|
|
134
132
|
$ mq mysql auth update --profile staging
|
|
135
133
|
```
|
|
136
134
|
|
|
137
|
-
_See code: [src/commands/mysql/auth/update.ts](https://github.com/hesedcasa/mysql/blob/v0.
|
|
135
|
+
_See code: [src/commands/mysql/auth/update.ts](https://github.com/hesedcasa/mysql/blob/v0.2.0/src/commands/mysql/auth/update.ts)_
|
|
138
136
|
|
|
139
|
-
## `mq mysql
|
|
137
|
+
## `mq mysql databases`
|
|
140
138
|
|
|
141
|
-
|
|
139
|
+
List all databases accessible on the MySQL server
|
|
142
140
|
|
|
143
141
|
```
|
|
144
142
|
USAGE
|
|
145
|
-
$ mq mysql
|
|
143
|
+
$ mq mysql databases [--profile <value>]
|
|
146
144
|
|
|
147
145
|
FLAGS
|
|
148
|
-
|
|
149
|
-
--format=<option> [default: table] Output format
|
|
150
|
-
<options: table|json|toon>
|
|
151
|
-
--profile=<value> Database profile name from config
|
|
146
|
+
--profile=<value> Database profile name from config
|
|
152
147
|
|
|
153
148
|
DESCRIPTION
|
|
154
|
-
|
|
149
|
+
List all databases accessible on the MySQL server
|
|
155
150
|
|
|
156
151
|
EXAMPLES
|
|
157
|
-
$ mq mysql
|
|
152
|
+
$ mq mysql databases
|
|
158
153
|
|
|
159
|
-
$ mq mysql
|
|
154
|
+
$ mq mysql databases --profile staging
|
|
160
155
|
```
|
|
161
156
|
|
|
162
|
-
_See code: [src/commands/mysql/
|
|
157
|
+
_See code: [src/commands/mysql/databases.ts](https://github.com/hesedcasa/mysql/blob/v0.2.0/src/commands/mysql/databases.ts)_
|
|
163
158
|
|
|
164
|
-
## `mq mysql
|
|
159
|
+
## `mq mysql describe-table TABLE`
|
|
165
160
|
|
|
166
|
-
|
|
161
|
+
Describe the structure of a MySQL table
|
|
167
162
|
|
|
168
163
|
```
|
|
169
164
|
USAGE
|
|
170
|
-
$ mq mysql
|
|
165
|
+
$ mq mysql describe-table TABLE [--format table|json|toon] [--profile <value>]
|
|
171
166
|
|
|
172
167
|
ARGUMENTS
|
|
173
|
-
|
|
168
|
+
TABLE Table name to describe
|
|
174
169
|
|
|
175
170
|
FLAGS
|
|
176
171
|
--format=<option> [default: table] Output format
|
|
@@ -178,59 +173,69 @@ FLAGS
|
|
|
178
173
|
--profile=<value> Database profile name from config
|
|
179
174
|
|
|
180
175
|
DESCRIPTION
|
|
181
|
-
|
|
176
|
+
Describe the structure of a MySQL table
|
|
182
177
|
|
|
183
178
|
EXAMPLES
|
|
184
|
-
$ mq mysql
|
|
179
|
+
$ mq mysql describe-table users
|
|
185
180
|
|
|
186
|
-
$ mq mysql
|
|
181
|
+
$ mq mysql describe-table orders --format json --profile prod
|
|
187
182
|
```
|
|
188
183
|
|
|
189
|
-
_See code: [src/commands/mysql/
|
|
184
|
+
_See code: [src/commands/mysql/describe-table.ts](https://github.com/hesedcasa/mysql/blob/v0.2.0/src/commands/mysql/describe-table.ts)_
|
|
190
185
|
|
|
191
|
-
## `mq mysql
|
|
186
|
+
## `mq mysql explain-query QUERY`
|
|
192
187
|
|
|
193
|
-
|
|
188
|
+
Show the execution plan for a MySQL query
|
|
194
189
|
|
|
195
190
|
```
|
|
196
191
|
USAGE
|
|
197
|
-
$ mq mysql
|
|
192
|
+
$ mq mysql explain-query QUERY [--format table|json|toon] [--profile <value>]
|
|
193
|
+
|
|
194
|
+
ARGUMENTS
|
|
195
|
+
QUERY SQL query to explain
|
|
198
196
|
|
|
199
197
|
FLAGS
|
|
198
|
+
--format=<option> [default: table] Output format
|
|
199
|
+
<options: table|json|toon>
|
|
200
200
|
--profile=<value> Database profile name from config
|
|
201
201
|
|
|
202
202
|
DESCRIPTION
|
|
203
|
-
|
|
203
|
+
Show the execution plan for a MySQL query
|
|
204
204
|
|
|
205
205
|
EXAMPLES
|
|
206
|
-
$ mq mysql
|
|
206
|
+
$ mq mysql explain-query "SELECT * FROM users WHERE id = 1"
|
|
207
207
|
|
|
208
|
-
$ mq mysql
|
|
208
|
+
$ mq mysql explain-query "SELECT * FROM orders JOIN users ON orders.user_id = users.id" --format json
|
|
209
209
|
```
|
|
210
210
|
|
|
211
|
-
_See code: [src/commands/mysql/
|
|
211
|
+
_See code: [src/commands/mysql/explain-query.ts](https://github.com/hesedcasa/mysql/blob/v0.2.0/src/commands/mysql/explain-query.ts)_
|
|
212
212
|
|
|
213
|
-
## `mq mysql
|
|
213
|
+
## `mq mysql indexes TABLE`
|
|
214
214
|
|
|
215
|
-
|
|
215
|
+
Show indexes for a MySQL table
|
|
216
216
|
|
|
217
217
|
```
|
|
218
218
|
USAGE
|
|
219
|
-
$ mq mysql
|
|
219
|
+
$ mq mysql indexes TABLE [--format table|json|toon] [--profile <value>]
|
|
220
|
+
|
|
221
|
+
ARGUMENTS
|
|
222
|
+
TABLE Table name to show indexes for
|
|
220
223
|
|
|
221
224
|
FLAGS
|
|
225
|
+
--format=<option> [default: table] Output format
|
|
226
|
+
<options: table|json|toon>
|
|
222
227
|
--profile=<value> Database profile name from config
|
|
223
228
|
|
|
224
229
|
DESCRIPTION
|
|
225
|
-
|
|
230
|
+
Show indexes for a MySQL table
|
|
226
231
|
|
|
227
232
|
EXAMPLES
|
|
228
|
-
$ mq mysql
|
|
233
|
+
$ mq mysql indexes users
|
|
229
234
|
|
|
230
|
-
$ mq mysql
|
|
235
|
+
$ mq mysql indexes orders --format json --profile prod
|
|
231
236
|
```
|
|
232
237
|
|
|
233
|
-
_See code: [src/commands/mysql/
|
|
238
|
+
_See code: [src/commands/mysql/indexes.ts](https://github.com/hesedcasa/mysql/blob/v0.2.0/src/commands/mysql/indexes.ts)_
|
|
234
239
|
|
|
235
240
|
## `mq mysql query QUERY`
|
|
236
241
|
|
|
@@ -260,30 +265,27 @@ EXAMPLES
|
|
|
260
265
|
$ mq mysql query "DELETE FROM sessions" --profile prod --skip-confirmation
|
|
261
266
|
```
|
|
262
267
|
|
|
263
|
-
_See code: [src/commands/mysql/query.ts](https://github.com/hesedcasa/mysql/blob/v0.
|
|
268
|
+
_See code: [src/commands/mysql/query.ts](https://github.com/hesedcasa/mysql/blob/v0.2.0/src/commands/mysql/query.ts)_
|
|
264
269
|
|
|
265
|
-
## `mq mysql
|
|
270
|
+
## `mq mysql tables`
|
|
266
271
|
|
|
267
|
-
|
|
272
|
+
List all tables in the current MySQL database
|
|
268
273
|
|
|
269
274
|
```
|
|
270
275
|
USAGE
|
|
271
|
-
$ mq mysql
|
|
276
|
+
$ mq mysql tables [--profile <value>]
|
|
272
277
|
|
|
273
278
|
FLAGS
|
|
274
|
-
|
|
275
|
-
--format=<option> [default: table] Output format
|
|
276
|
-
<options: table|json|toon>
|
|
277
|
-
--profile=<value> Database profile name from config
|
|
279
|
+
--profile=<value> Database profile name from config
|
|
278
280
|
|
|
279
281
|
DESCRIPTION
|
|
280
|
-
|
|
282
|
+
List all tables in the current MySQL database
|
|
281
283
|
|
|
282
284
|
EXAMPLES
|
|
283
|
-
$ mq mysql
|
|
285
|
+
$ mq mysql tables
|
|
284
286
|
|
|
285
|
-
$ mq mysql
|
|
287
|
+
$ mq mysql tables --profile local
|
|
286
288
|
```
|
|
287
289
|
|
|
288
|
-
_See code: [src/commands/mysql/
|
|
290
|
+
_See code: [src/commands/mysql/tables.ts](https://github.com/hesedcasa/mysql/blob/v0.2.0/src/commands/mysql/tables.ts)_
|
|
289
291
|
<!-- commandsstop -->
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Command } from '@oclif/core';
|
|
2
2
|
export default class MySQLDescribeTable extends Command {
|
|
3
|
+
static args: {
|
|
4
|
+
table: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
3
6
|
static description: string;
|
|
4
7
|
static examples: string[];
|
|
5
8
|
static flags: {
|
|
6
9
|
format: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
10
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
-
table: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
11
|
};
|
|
10
12
|
run(): Promise<void>;
|
|
11
13
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { Command, Flags } from '@oclif/core';
|
|
1
|
+
import { Args, Command, Flags } from '@oclif/core';
|
|
2
2
|
import { closeConnections, describeTable, getMySQLConfig, setConfigDir } from '../../mysql/index.js';
|
|
3
3
|
export default class MySQLDescribeTable extends Command {
|
|
4
|
+
static args = {
|
|
5
|
+
table: Args.string({ description: 'Table name to describe', required: true }),
|
|
6
|
+
};
|
|
4
7
|
static description = 'Describe the structure of a MySQL table';
|
|
5
8
|
static examples = [
|
|
6
|
-
'<%= config.bin %> <%= command.id %>
|
|
7
|
-
'<%= config.bin %> <%= command.id %>
|
|
9
|
+
'<%= config.bin %> <%= command.id %> users',
|
|
10
|
+
'<%= config.bin %> <%= command.id %> orders --format json --profile prod',
|
|
8
11
|
];
|
|
9
12
|
static flags = {
|
|
10
13
|
format: Flags.string({
|
|
@@ -13,10 +16,9 @@ export default class MySQLDescribeTable extends Command {
|
|
|
13
16
|
options: ['table', 'json', 'toon'],
|
|
14
17
|
}),
|
|
15
18
|
profile: Flags.string({ description: 'Database profile name from config', required: false }),
|
|
16
|
-
table: Flags.string({ char: 't', description: 'Table name to describe', required: true }),
|
|
17
19
|
};
|
|
18
20
|
async run() {
|
|
19
|
-
const { flags } = await this.parse(MySQLDescribeTable);
|
|
21
|
+
const { args, flags } = await this.parse(MySQLDescribeTable);
|
|
20
22
|
setConfigDir(this.config.configDir);
|
|
21
23
|
let profile;
|
|
22
24
|
try {
|
|
@@ -25,7 +27,7 @@ export default class MySQLDescribeTable extends Command {
|
|
|
25
27
|
catch (error) {
|
|
26
28
|
this.error(error instanceof Error ? error.message : String(error));
|
|
27
29
|
}
|
|
28
|
-
const result = await describeTable(profile,
|
|
30
|
+
const result = await describeTable(profile, args.table, flags.format);
|
|
29
31
|
await closeConnections();
|
|
30
32
|
if (result.success) {
|
|
31
33
|
this.log(result.result ?? '');
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Command } from '@oclif/core';
|
|
2
2
|
export default class MySQLIndexes extends Command {
|
|
3
|
+
static args: {
|
|
4
|
+
table: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
3
6
|
static description: string;
|
|
4
7
|
static examples: string[];
|
|
5
8
|
static flags: {
|
|
6
9
|
format: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
10
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
-
table: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
11
|
};
|
|
10
12
|
run(): Promise<void>;
|
|
11
13
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { Command, Flags } from '@oclif/core';
|
|
1
|
+
import { Args, Command, Flags } from '@oclif/core';
|
|
2
2
|
import { closeConnections, getMySQLConfig, setConfigDir, showIndexes } from '../../mysql/index.js';
|
|
3
3
|
export default class MySQLIndexes extends Command {
|
|
4
|
+
static args = {
|
|
5
|
+
table: Args.string({ description: 'Table name to show indexes for', required: true }),
|
|
6
|
+
};
|
|
4
7
|
static description = 'Show indexes for a MySQL table';
|
|
5
8
|
static examples = [
|
|
6
|
-
'<%= config.bin %> <%= command.id %>
|
|
7
|
-
'<%= config.bin %> <%= command.id %>
|
|
9
|
+
'<%= config.bin %> <%= command.id %> users',
|
|
10
|
+
'<%= config.bin %> <%= command.id %> orders --format json --profile prod',
|
|
8
11
|
];
|
|
9
12
|
static flags = {
|
|
10
13
|
format: Flags.string({
|
|
@@ -13,10 +16,9 @@ export default class MySQLIndexes extends Command {
|
|
|
13
16
|
options: ['table', 'json', 'toon'],
|
|
14
17
|
}),
|
|
15
18
|
profile: Flags.string({ description: 'Database profile name from config', required: false }),
|
|
16
|
-
table: Flags.string({ char: 't', description: 'Table name to show indexes for', required: true }),
|
|
17
19
|
};
|
|
18
20
|
async run() {
|
|
19
|
-
const { flags } = await this.parse(MySQLIndexes);
|
|
21
|
+
const { args, flags } = await this.parse(MySQLIndexes);
|
|
20
22
|
setConfigDir(this.config.configDir);
|
|
21
23
|
let profile;
|
|
22
24
|
try {
|
|
@@ -25,7 +27,7 @@ export default class MySQLIndexes extends Command {
|
|
|
25
27
|
catch (error) {
|
|
26
28
|
this.error(error instanceof Error ? error.message : String(error));
|
|
27
29
|
}
|
|
28
|
-
const result = await showIndexes(profile,
|
|
30
|
+
const result = await showIndexes(profile, args.table, flags.format);
|
|
29
31
|
await closeConnections();
|
|
30
32
|
if (result.success) {
|
|
31
33
|
this.log(result.result ?? '');
|
package/oclif.manifest.json
CHANGED
|
@@ -1,12 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
-
"mysql:
|
|
3
|
+
"mysql:databases": {
|
|
4
4
|
"aliases": [],
|
|
5
5
|
"args": {},
|
|
6
|
+
"description": "List all databases accessible on the MySQL server",
|
|
7
|
+
"examples": [
|
|
8
|
+
"<%= config.bin %> <%= command.id %>",
|
|
9
|
+
"<%= config.bin %> <%= command.id %> --profile staging"
|
|
10
|
+
],
|
|
11
|
+
"flags": {
|
|
12
|
+
"profile": {
|
|
13
|
+
"description": "Database profile name from config",
|
|
14
|
+
"name": "profile",
|
|
15
|
+
"required": false,
|
|
16
|
+
"hasDynamicHelp": false,
|
|
17
|
+
"multiple": false,
|
|
18
|
+
"type": "option"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"hasDynamicHelp": false,
|
|
22
|
+
"hiddenAliases": [],
|
|
23
|
+
"id": "mysql:databases",
|
|
24
|
+
"pluginAlias": "@hesed/mysql",
|
|
25
|
+
"pluginName": "@hesed/mysql",
|
|
26
|
+
"pluginType": "core",
|
|
27
|
+
"strict": true,
|
|
28
|
+
"enableJsonFlag": false,
|
|
29
|
+
"isESM": true,
|
|
30
|
+
"relativePath": [
|
|
31
|
+
"dist",
|
|
32
|
+
"commands",
|
|
33
|
+
"mysql",
|
|
34
|
+
"databases.js"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"mysql:describe-table": {
|
|
38
|
+
"aliases": [],
|
|
39
|
+
"args": {
|
|
40
|
+
"table": {
|
|
41
|
+
"description": "Table name to describe",
|
|
42
|
+
"name": "table",
|
|
43
|
+
"required": true
|
|
44
|
+
}
|
|
45
|
+
},
|
|
6
46
|
"description": "Describe the structure of a MySQL table",
|
|
7
47
|
"examples": [
|
|
8
|
-
"<%= config.bin %> <%= command.id %>
|
|
9
|
-
"<%= config.bin %> <%= command.id %>
|
|
48
|
+
"<%= config.bin %> <%= command.id %> users",
|
|
49
|
+
"<%= config.bin %> <%= command.id %> orders --format json --profile prod"
|
|
10
50
|
],
|
|
11
51
|
"flags": {
|
|
12
52
|
"format": {
|
|
@@ -29,15 +69,6 @@
|
|
|
29
69
|
"hasDynamicHelp": false,
|
|
30
70
|
"multiple": false,
|
|
31
71
|
"type": "option"
|
|
32
|
-
},
|
|
33
|
-
"table": {
|
|
34
|
-
"char": "t",
|
|
35
|
-
"description": "Table name to describe",
|
|
36
|
-
"name": "table",
|
|
37
|
-
"required": true,
|
|
38
|
-
"hasDynamicHelp": false,
|
|
39
|
-
"multiple": false,
|
|
40
|
-
"type": "option"
|
|
41
72
|
}
|
|
42
73
|
},
|
|
43
74
|
"hasDynamicHelp": false,
|
|
@@ -109,49 +140,34 @@
|
|
|
109
140
|
"explain-query.js"
|
|
110
141
|
]
|
|
111
142
|
},
|
|
112
|
-
"mysql:
|
|
143
|
+
"mysql:indexes": {
|
|
113
144
|
"aliases": [],
|
|
114
|
-
"args": {
|
|
115
|
-
|
|
145
|
+
"args": {
|
|
146
|
+
"table": {
|
|
147
|
+
"description": "Table name to show indexes for",
|
|
148
|
+
"name": "table",
|
|
149
|
+
"required": true
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"description": "Show indexes for a MySQL table",
|
|
116
153
|
"examples": [
|
|
117
|
-
"<%= config.bin %> <%= command.id %>",
|
|
118
|
-
"<%= config.bin %> <%= command.id %> --profile
|
|
154
|
+
"<%= config.bin %> <%= command.id %> users",
|
|
155
|
+
"<%= config.bin %> <%= command.id %> orders --format json --profile prod"
|
|
119
156
|
],
|
|
120
157
|
"flags": {
|
|
121
|
-
"
|
|
122
|
-
"description": "
|
|
123
|
-
"name": "
|
|
124
|
-
"
|
|
158
|
+
"format": {
|
|
159
|
+
"description": "Output format",
|
|
160
|
+
"name": "format",
|
|
161
|
+
"default": "table",
|
|
125
162
|
"hasDynamicHelp": false,
|
|
126
163
|
"multiple": false,
|
|
164
|
+
"options": [
|
|
165
|
+
"table",
|
|
166
|
+
"json",
|
|
167
|
+
"toon"
|
|
168
|
+
],
|
|
127
169
|
"type": "option"
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
"hasDynamicHelp": false,
|
|
131
|
-
"hiddenAliases": [],
|
|
132
|
-
"id": "mysql:list-databases",
|
|
133
|
-
"pluginAlias": "@hesed/mysql",
|
|
134
|
-
"pluginName": "@hesed/mysql",
|
|
135
|
-
"pluginType": "core",
|
|
136
|
-
"strict": true,
|
|
137
|
-
"enableJsonFlag": false,
|
|
138
|
-
"isESM": true,
|
|
139
|
-
"relativePath": [
|
|
140
|
-
"dist",
|
|
141
|
-
"commands",
|
|
142
|
-
"mysql",
|
|
143
|
-
"list-databases.js"
|
|
144
|
-
]
|
|
145
|
-
},
|
|
146
|
-
"mysql:list-tables": {
|
|
147
|
-
"aliases": [],
|
|
148
|
-
"args": {},
|
|
149
|
-
"description": "List all tables in the current MySQL database",
|
|
150
|
-
"examples": [
|
|
151
|
-
"<%= config.bin %> <%= command.id %>",
|
|
152
|
-
"<%= config.bin %> <%= command.id %> --profile local"
|
|
153
|
-
],
|
|
154
|
-
"flags": {
|
|
170
|
+
},
|
|
155
171
|
"profile": {
|
|
156
172
|
"description": "Database profile name from config",
|
|
157
173
|
"name": "profile",
|
|
@@ -163,7 +179,7 @@
|
|
|
163
179
|
},
|
|
164
180
|
"hasDynamicHelp": false,
|
|
165
181
|
"hiddenAliases": [],
|
|
166
|
-
"id": "mysql:
|
|
182
|
+
"id": "mysql:indexes",
|
|
167
183
|
"pluginAlias": "@hesed/mysql",
|
|
168
184
|
"pluginName": "@hesed/mysql",
|
|
169
185
|
"pluginType": "core",
|
|
@@ -174,7 +190,7 @@
|
|
|
174
190
|
"dist",
|
|
175
191
|
"commands",
|
|
176
192
|
"mysql",
|
|
177
|
-
"
|
|
193
|
+
"indexes.js"
|
|
178
194
|
]
|
|
179
195
|
},
|
|
180
196
|
"mysql:query": {
|
|
@@ -238,28 +254,15 @@
|
|
|
238
254
|
"query.js"
|
|
239
255
|
]
|
|
240
256
|
},
|
|
241
|
-
"mysql:
|
|
257
|
+
"mysql:tables": {
|
|
242
258
|
"aliases": [],
|
|
243
259
|
"args": {},
|
|
244
|
-
"description": "
|
|
260
|
+
"description": "List all tables in the current MySQL database",
|
|
245
261
|
"examples": [
|
|
246
|
-
"<%= config.bin %> <%= command.id %>
|
|
247
|
-
"<%= config.bin %> <%= command.id %> --
|
|
262
|
+
"<%= config.bin %> <%= command.id %>",
|
|
263
|
+
"<%= config.bin %> <%= command.id %> --profile local"
|
|
248
264
|
],
|
|
249
265
|
"flags": {
|
|
250
|
-
"format": {
|
|
251
|
-
"description": "Output format",
|
|
252
|
-
"name": "format",
|
|
253
|
-
"default": "table",
|
|
254
|
-
"hasDynamicHelp": false,
|
|
255
|
-
"multiple": false,
|
|
256
|
-
"options": [
|
|
257
|
-
"table",
|
|
258
|
-
"json",
|
|
259
|
-
"toon"
|
|
260
|
-
],
|
|
261
|
-
"type": "option"
|
|
262
|
-
},
|
|
263
266
|
"profile": {
|
|
264
267
|
"description": "Database profile name from config",
|
|
265
268
|
"name": "profile",
|
|
@@ -267,20 +270,11 @@
|
|
|
267
270
|
"hasDynamicHelp": false,
|
|
268
271
|
"multiple": false,
|
|
269
272
|
"type": "option"
|
|
270
|
-
},
|
|
271
|
-
"table": {
|
|
272
|
-
"char": "t",
|
|
273
|
-
"description": "Table name to show indexes for",
|
|
274
|
-
"name": "table",
|
|
275
|
-
"required": true,
|
|
276
|
-
"hasDynamicHelp": false,
|
|
277
|
-
"multiple": false,
|
|
278
|
-
"type": "option"
|
|
279
273
|
}
|
|
280
274
|
},
|
|
281
275
|
"hasDynamicHelp": false,
|
|
282
276
|
"hiddenAliases": [],
|
|
283
|
-
"id": "mysql:
|
|
277
|
+
"id": "mysql:tables",
|
|
284
278
|
"pluginAlias": "@hesed/mysql",
|
|
285
279
|
"pluginName": "@hesed/mysql",
|
|
286
280
|
"pluginType": "core",
|
|
@@ -291,7 +285,7 @@
|
|
|
291
285
|
"dist",
|
|
292
286
|
"commands",
|
|
293
287
|
"mysql",
|
|
294
|
-
"
|
|
288
|
+
"tables.js"
|
|
295
289
|
]
|
|
296
290
|
},
|
|
297
291
|
"mysql:auth:add": {
|
|
@@ -314,7 +308,7 @@
|
|
|
314
308
|
"char": "d",
|
|
315
309
|
"description": "Database name",
|
|
316
310
|
"name": "database",
|
|
317
|
-
"required":
|
|
311
|
+
"required": true,
|
|
318
312
|
"hasDynamicHelp": false,
|
|
319
313
|
"multiple": false,
|
|
320
314
|
"type": "option"
|
|
@@ -322,7 +316,7 @@
|
|
|
322
316
|
"host": {
|
|
323
317
|
"description": "MySQL host",
|
|
324
318
|
"name": "host",
|
|
325
|
-
"required":
|
|
319
|
+
"required": true,
|
|
326
320
|
"hasDynamicHelp": false,
|
|
327
321
|
"multiple": false,
|
|
328
322
|
"type": "option"
|
|
@@ -331,7 +325,7 @@
|
|
|
331
325
|
"char": "p",
|
|
332
326
|
"description": "Password",
|
|
333
327
|
"name": "password",
|
|
334
|
-
"required":
|
|
328
|
+
"required": true,
|
|
335
329
|
"hasDynamicHelp": false,
|
|
336
330
|
"multiple": false,
|
|
337
331
|
"type": "option"
|
|
@@ -340,7 +334,7 @@
|
|
|
340
334
|
"char": "P",
|
|
341
335
|
"description": "MySQL port",
|
|
342
336
|
"name": "port",
|
|
343
|
-
"required":
|
|
337
|
+
"required": true,
|
|
344
338
|
"hasDynamicHelp": false,
|
|
345
339
|
"multiple": false,
|
|
346
340
|
"type": "option"
|
|
@@ -348,7 +342,7 @@
|
|
|
348
342
|
"profile": {
|
|
349
343
|
"description": "Profile name",
|
|
350
344
|
"name": "profile",
|
|
351
|
-
"required":
|
|
345
|
+
"required": true,
|
|
352
346
|
"hasDynamicHelp": false,
|
|
353
347
|
"multiple": false,
|
|
354
348
|
"type": "option"
|
|
@@ -364,7 +358,7 @@
|
|
|
364
358
|
"char": "u",
|
|
365
359
|
"description": "Username",
|
|
366
360
|
"name": "user",
|
|
367
|
-
"required":
|
|
361
|
+
"required": true,
|
|
368
362
|
"hasDynamicHelp": false,
|
|
369
363
|
"multiple": false,
|
|
370
364
|
"type": "option"
|
|
@@ -449,7 +443,7 @@
|
|
|
449
443
|
"char": "d",
|
|
450
444
|
"description": "Database name",
|
|
451
445
|
"name": "database",
|
|
452
|
-
"required":
|
|
446
|
+
"required": true,
|
|
453
447
|
"hasDynamicHelp": false,
|
|
454
448
|
"multiple": false,
|
|
455
449
|
"type": "option"
|
|
@@ -457,7 +451,7 @@
|
|
|
457
451
|
"host": {
|
|
458
452
|
"description": "MySQL host",
|
|
459
453
|
"name": "host",
|
|
460
|
-
"required":
|
|
454
|
+
"required": true,
|
|
461
455
|
"hasDynamicHelp": false,
|
|
462
456
|
"multiple": false,
|
|
463
457
|
"type": "option"
|
|
@@ -466,7 +460,7 @@
|
|
|
466
460
|
"char": "p",
|
|
467
461
|
"description": "Password",
|
|
468
462
|
"name": "password",
|
|
469
|
-
"required":
|
|
463
|
+
"required": true,
|
|
470
464
|
"hasDynamicHelp": false,
|
|
471
465
|
"multiple": false,
|
|
472
466
|
"type": "option"
|
|
@@ -475,7 +469,7 @@
|
|
|
475
469
|
"char": "P",
|
|
476
470
|
"description": "MySQL port",
|
|
477
471
|
"name": "port",
|
|
478
|
-
"required":
|
|
472
|
+
"required": true,
|
|
479
473
|
"hasDynamicHelp": false,
|
|
480
474
|
"multiple": false,
|
|
481
475
|
"type": "option"
|
|
@@ -499,7 +493,7 @@
|
|
|
499
493
|
"char": "u",
|
|
500
494
|
"description": "Username",
|
|
501
495
|
"name": "user",
|
|
502
|
-
"required":
|
|
496
|
+
"required": true,
|
|
503
497
|
"hasDynamicHelp": false,
|
|
504
498
|
"multiple": false,
|
|
505
499
|
"type": "option"
|
|
@@ -523,5 +517,5 @@
|
|
|
523
517
|
]
|
|
524
518
|
}
|
|
525
519
|
},
|
|
526
|
-
"version": "0.
|
|
520
|
+
"version": "0.2.0"
|
|
527
521
|
}
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|