@hesed/mysql 0.1.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/LICENSE +202 -0
- package/README.md +289 -0
- package/bin/dev.cmd +3 -0
- package/bin/dev.js +5 -0
- package/bin/run.cmd +3 -0
- package/bin/run.js +5 -0
- package/dist/commands/mysql/auth/add.d.ts +18 -0
- package/dist/commands/mysql/auth/add.js +57 -0
- package/dist/commands/mysql/auth/test.d.ts +12 -0
- package/dist/commands/mysql/auth/test.js +41 -0
- package/dist/commands/mysql/auth/update.d.ts +18 -0
- package/dist/commands/mysql/auth/update.js +74 -0
- package/dist/commands/mysql/describe-table.d.ts +11 -0
- package/dist/commands/mysql/describe-table.js +37 -0
- package/dist/commands/mysql/explain-query.d.ts +13 -0
- package/dist/commands/mysql/explain-query.js +39 -0
- package/dist/commands/mysql/list-databases.d.ts +9 -0
- package/dist/commands/mysql/list-databases.js +31 -0
- package/dist/commands/mysql/list-tables.d.ts +9 -0
- package/dist/commands/mysql/list-tables.js +31 -0
- package/dist/commands/mysql/query.d.ts +14 -0
- package/dist/commands/mysql/query.js +47 -0
- package/dist/commands/mysql/show-indexes.d.ts +11 -0
- package/dist/commands/mysql/show-indexes.js +37 -0
- package/dist/config.d.ts +13 -0
- package/dist/config.js +18 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/mysql/config-loader.d.ts +32 -0
- package/dist/mysql/config-loader.js +27 -0
- package/dist/mysql/database.d.ts +85 -0
- package/dist/mysql/database.js +5 -0
- package/dist/mysql/index.d.ts +3 -0
- package/dist/mysql/index.js +1 -0
- package/dist/mysql/mysql-client.d.ts +60 -0
- package/dist/mysql/mysql-client.js +131 -0
- package/dist/mysql/mysql-utils.d.ts +68 -0
- package/dist/mysql/mysql-utils.js +370 -0
- package/dist/mysql/query-validator.d.ts +38 -0
- package/dist/mysql/query-validator.js +103 -0
- package/oclif.manifest.json +527 -0
- package/package.json +102 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Query Validation and Safety Module
|
|
3
|
+
* Provides SQL query analysis and safety checks
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Check if query contains blacklisted operations
|
|
7
|
+
*/
|
|
8
|
+
export function checkBlacklist(query, blacklistedOperations) {
|
|
9
|
+
const normalizedQuery = query.trim().toUpperCase();
|
|
10
|
+
for (const operation of blacklistedOperations) {
|
|
11
|
+
const normalizedOp = operation.toUpperCase();
|
|
12
|
+
if (normalizedQuery.includes(normalizedOp)) {
|
|
13
|
+
return {
|
|
14
|
+
allowed: false,
|
|
15
|
+
reason: `Operation "${operation}" is blacklisted and not allowed`,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return { allowed: true };
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Check if query requires user confirmation
|
|
23
|
+
*/
|
|
24
|
+
export function requiresConfirmation(query, confirmationOperations) {
|
|
25
|
+
const normalizedQuery = query.trim().toUpperCase();
|
|
26
|
+
for (const operation of confirmationOperations) {
|
|
27
|
+
const normalizedOp = operation.toUpperCase();
|
|
28
|
+
if (normalizedQuery.startsWith(normalizedOp) || normalizedQuery.includes(` ${normalizedOp} `)) {
|
|
29
|
+
return {
|
|
30
|
+
message: `This query contains a destructive operation: ${operation}`,
|
|
31
|
+
required: true,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return { required: false };
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Get query type (SELECT, INSERT, UPDATE, etc.)
|
|
39
|
+
*/
|
|
40
|
+
export function getQueryType(query) {
|
|
41
|
+
const normalizedQuery = query.trim().toUpperCase();
|
|
42
|
+
const firstWord = normalizedQuery.split(/\s+/)[0];
|
|
43
|
+
const knownTypes = [
|
|
44
|
+
'SELECT',
|
|
45
|
+
'INSERT',
|
|
46
|
+
'UPDATE',
|
|
47
|
+
'DELETE',
|
|
48
|
+
'DROP',
|
|
49
|
+
'CREATE',
|
|
50
|
+
'ALTER',
|
|
51
|
+
'TRUNCATE',
|
|
52
|
+
'SHOW',
|
|
53
|
+
'DESCRIBE',
|
|
54
|
+
'EXPLAIN',
|
|
55
|
+
];
|
|
56
|
+
if (knownTypes.includes(firstWord)) {
|
|
57
|
+
return firstWord;
|
|
58
|
+
}
|
|
59
|
+
return 'UNKNOWN';
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Analyze query for potential issues and provide warnings
|
|
63
|
+
*/
|
|
64
|
+
export function analyzeQuery(query) {
|
|
65
|
+
const warnings = [];
|
|
66
|
+
const normalizedQuery = query.trim().toUpperCase();
|
|
67
|
+
// Check for missing WHERE clause in UPDATE/DELETE
|
|
68
|
+
if ((normalizedQuery.startsWith('UPDATE') || normalizedQuery.startsWith('DELETE')) &&
|
|
69
|
+
!normalizedQuery.includes('WHERE')) {
|
|
70
|
+
warnings.push({
|
|
71
|
+
level: 'warning',
|
|
72
|
+
message: 'Missing WHERE clause in UPDATE/DELETE query',
|
|
73
|
+
suggestion: 'This will affect all rows in the table. Add a WHERE clause to limit scope.',
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
// Check for SELECT * (potential performance issue)
|
|
77
|
+
if (normalizedQuery.includes('SELECT *')) {
|
|
78
|
+
warnings.push({
|
|
79
|
+
level: 'info',
|
|
80
|
+
message: 'Using SELECT * may impact performance',
|
|
81
|
+
suggestion: 'Consider selecting only the columns you need.',
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
// Check for missing LIMIT in SELECT
|
|
85
|
+
if (normalizedQuery.startsWith('SELECT') && !normalizedQuery.includes('LIMIT')) {
|
|
86
|
+
warnings.push({
|
|
87
|
+
level: 'info',
|
|
88
|
+
message: 'SELECT query without LIMIT',
|
|
89
|
+
suggestion: 'Consider adding a LIMIT clause to prevent large result sets.',
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
return warnings;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Apply default LIMIT to SELECT queries if not present
|
|
96
|
+
*/
|
|
97
|
+
export function applyDefaultLimit(query, defaultLimit) {
|
|
98
|
+
const normalizedQuery = query.trim().toUpperCase();
|
|
99
|
+
if (normalizedQuery.startsWith('SELECT') && !normalizedQuery.includes('LIMIT')) {
|
|
100
|
+
return `${query.trim()} LIMIT ${defaultLimit}`;
|
|
101
|
+
}
|
|
102
|
+
return query;
|
|
103
|
+
}
|
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
{
|
|
2
|
+
"commands": {
|
|
3
|
+
"mysql:describe-table": {
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"args": {},
|
|
6
|
+
"description": "Describe the structure of a MySQL table",
|
|
7
|
+
"examples": [
|
|
8
|
+
"<%= config.bin %> <%= command.id %> --table users",
|
|
9
|
+
"<%= config.bin %> <%= command.id %> --table orders --format json --profile prod"
|
|
10
|
+
],
|
|
11
|
+
"flags": {
|
|
12
|
+
"format": {
|
|
13
|
+
"description": "Output format",
|
|
14
|
+
"name": "format",
|
|
15
|
+
"default": "table",
|
|
16
|
+
"hasDynamicHelp": false,
|
|
17
|
+
"multiple": false,
|
|
18
|
+
"options": [
|
|
19
|
+
"table",
|
|
20
|
+
"json",
|
|
21
|
+
"toon"
|
|
22
|
+
],
|
|
23
|
+
"type": "option"
|
|
24
|
+
},
|
|
25
|
+
"profile": {
|
|
26
|
+
"description": "Database profile name from config",
|
|
27
|
+
"name": "profile",
|
|
28
|
+
"required": false,
|
|
29
|
+
"hasDynamicHelp": false,
|
|
30
|
+
"multiple": false,
|
|
31
|
+
"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
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"hasDynamicHelp": false,
|
|
44
|
+
"hiddenAliases": [],
|
|
45
|
+
"id": "mysql:describe-table",
|
|
46
|
+
"pluginAlias": "@hesed/mysql",
|
|
47
|
+
"pluginName": "@hesed/mysql",
|
|
48
|
+
"pluginType": "core",
|
|
49
|
+
"strict": true,
|
|
50
|
+
"enableJsonFlag": false,
|
|
51
|
+
"isESM": true,
|
|
52
|
+
"relativePath": [
|
|
53
|
+
"dist",
|
|
54
|
+
"commands",
|
|
55
|
+
"mysql",
|
|
56
|
+
"describe-table.js"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"mysql:explain-query": {
|
|
60
|
+
"aliases": [],
|
|
61
|
+
"args": {
|
|
62
|
+
"query": {
|
|
63
|
+
"description": "SQL query to explain",
|
|
64
|
+
"name": "query",
|
|
65
|
+
"required": true
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"description": "Show the execution plan for a MySQL query",
|
|
69
|
+
"examples": [
|
|
70
|
+
"<%= config.bin %> <%= command.id %> \"SELECT * FROM users WHERE id = 1\"",
|
|
71
|
+
"<%= config.bin %> <%= command.id %> \"SELECT * FROM orders JOIN users ON orders.user_id = users.id\" --format json"
|
|
72
|
+
],
|
|
73
|
+
"flags": {
|
|
74
|
+
"format": {
|
|
75
|
+
"description": "Output format",
|
|
76
|
+
"name": "format",
|
|
77
|
+
"default": "table",
|
|
78
|
+
"hasDynamicHelp": false,
|
|
79
|
+
"multiple": false,
|
|
80
|
+
"options": [
|
|
81
|
+
"table",
|
|
82
|
+
"json",
|
|
83
|
+
"toon"
|
|
84
|
+
],
|
|
85
|
+
"type": "option"
|
|
86
|
+
},
|
|
87
|
+
"profile": {
|
|
88
|
+
"description": "Database profile name from config",
|
|
89
|
+
"name": "profile",
|
|
90
|
+
"required": false,
|
|
91
|
+
"hasDynamicHelp": false,
|
|
92
|
+
"multiple": false,
|
|
93
|
+
"type": "option"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"hasDynamicHelp": false,
|
|
97
|
+
"hiddenAliases": [],
|
|
98
|
+
"id": "mysql:explain-query",
|
|
99
|
+
"pluginAlias": "@hesed/mysql",
|
|
100
|
+
"pluginName": "@hesed/mysql",
|
|
101
|
+
"pluginType": "core",
|
|
102
|
+
"strict": true,
|
|
103
|
+
"enableJsonFlag": false,
|
|
104
|
+
"isESM": true,
|
|
105
|
+
"relativePath": [
|
|
106
|
+
"dist",
|
|
107
|
+
"commands",
|
|
108
|
+
"mysql",
|
|
109
|
+
"explain-query.js"
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
"mysql:list-databases": {
|
|
113
|
+
"aliases": [],
|
|
114
|
+
"args": {},
|
|
115
|
+
"description": "List all databases accessible on the MySQL server",
|
|
116
|
+
"examples": [
|
|
117
|
+
"<%= config.bin %> <%= command.id %>",
|
|
118
|
+
"<%= config.bin %> <%= command.id %> --profile staging"
|
|
119
|
+
],
|
|
120
|
+
"flags": {
|
|
121
|
+
"profile": {
|
|
122
|
+
"description": "Database profile name from config",
|
|
123
|
+
"name": "profile",
|
|
124
|
+
"required": false,
|
|
125
|
+
"hasDynamicHelp": false,
|
|
126
|
+
"multiple": false,
|
|
127
|
+
"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": {
|
|
155
|
+
"profile": {
|
|
156
|
+
"description": "Database profile name from config",
|
|
157
|
+
"name": "profile",
|
|
158
|
+
"required": false,
|
|
159
|
+
"hasDynamicHelp": false,
|
|
160
|
+
"multiple": false,
|
|
161
|
+
"type": "option"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"hasDynamicHelp": false,
|
|
165
|
+
"hiddenAliases": [],
|
|
166
|
+
"id": "mysql:list-tables",
|
|
167
|
+
"pluginAlias": "@hesed/mysql",
|
|
168
|
+
"pluginName": "@hesed/mysql",
|
|
169
|
+
"pluginType": "core",
|
|
170
|
+
"strict": true,
|
|
171
|
+
"enableJsonFlag": false,
|
|
172
|
+
"isESM": true,
|
|
173
|
+
"relativePath": [
|
|
174
|
+
"dist",
|
|
175
|
+
"commands",
|
|
176
|
+
"mysql",
|
|
177
|
+
"list-tables.js"
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
"mysql:query": {
|
|
181
|
+
"aliases": [],
|
|
182
|
+
"args": {
|
|
183
|
+
"query": {
|
|
184
|
+
"description": "SQL query to execute",
|
|
185
|
+
"name": "query",
|
|
186
|
+
"required": true
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"description": "Execute a SQL query against a MySQL database",
|
|
190
|
+
"examples": [
|
|
191
|
+
"<%= config.bin %> <%= command.id %> \"SELECT * FROM users LIMIT 10\"",
|
|
192
|
+
"<%= config.bin %> <%= command.id %> \"UPDATE users SET email = 'user@email.com' WHERE id = 999\" --format json",
|
|
193
|
+
"<%= config.bin %> <%= command.id %> \"DELETE FROM sessions\" --profile prod --skip-confirmation"
|
|
194
|
+
],
|
|
195
|
+
"flags": {
|
|
196
|
+
"format": {
|
|
197
|
+
"description": "Output format",
|
|
198
|
+
"name": "format",
|
|
199
|
+
"default": "table",
|
|
200
|
+
"hasDynamicHelp": false,
|
|
201
|
+
"multiple": false,
|
|
202
|
+
"options": [
|
|
203
|
+
"table",
|
|
204
|
+
"json",
|
|
205
|
+
"csv",
|
|
206
|
+
"toon"
|
|
207
|
+
],
|
|
208
|
+
"type": "option"
|
|
209
|
+
},
|
|
210
|
+
"profile": {
|
|
211
|
+
"description": "Database profile name from config",
|
|
212
|
+
"name": "profile",
|
|
213
|
+
"required": false,
|
|
214
|
+
"hasDynamicHelp": false,
|
|
215
|
+
"multiple": false,
|
|
216
|
+
"type": "option"
|
|
217
|
+
},
|
|
218
|
+
"skip-confirmation": {
|
|
219
|
+
"description": "Skip confirmation prompt for destructive operations",
|
|
220
|
+
"name": "skip-confirmation",
|
|
221
|
+
"allowNo": false,
|
|
222
|
+
"type": "boolean"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"hasDynamicHelp": false,
|
|
226
|
+
"hiddenAliases": [],
|
|
227
|
+
"id": "mysql:query",
|
|
228
|
+
"pluginAlias": "@hesed/mysql",
|
|
229
|
+
"pluginName": "@hesed/mysql",
|
|
230
|
+
"pluginType": "core",
|
|
231
|
+
"strict": true,
|
|
232
|
+
"enableJsonFlag": false,
|
|
233
|
+
"isESM": true,
|
|
234
|
+
"relativePath": [
|
|
235
|
+
"dist",
|
|
236
|
+
"commands",
|
|
237
|
+
"mysql",
|
|
238
|
+
"query.js"
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
"mysql:show-indexes": {
|
|
242
|
+
"aliases": [],
|
|
243
|
+
"args": {},
|
|
244
|
+
"description": "Show indexes for a MySQL table",
|
|
245
|
+
"examples": [
|
|
246
|
+
"<%= config.bin %> <%= command.id %> --table users",
|
|
247
|
+
"<%= config.bin %> <%= command.id %> --table orders --format json --profile prod"
|
|
248
|
+
],
|
|
249
|
+
"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
|
+
"profile": {
|
|
264
|
+
"description": "Database profile name from config",
|
|
265
|
+
"name": "profile",
|
|
266
|
+
"required": false,
|
|
267
|
+
"hasDynamicHelp": false,
|
|
268
|
+
"multiple": false,
|
|
269
|
+
"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
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"hasDynamicHelp": false,
|
|
282
|
+
"hiddenAliases": [],
|
|
283
|
+
"id": "mysql:show-indexes",
|
|
284
|
+
"pluginAlias": "@hesed/mysql",
|
|
285
|
+
"pluginName": "@hesed/mysql",
|
|
286
|
+
"pluginType": "core",
|
|
287
|
+
"strict": true,
|
|
288
|
+
"enableJsonFlag": false,
|
|
289
|
+
"isESM": true,
|
|
290
|
+
"relativePath": [
|
|
291
|
+
"dist",
|
|
292
|
+
"commands",
|
|
293
|
+
"mysql",
|
|
294
|
+
"show-indexes.js"
|
|
295
|
+
]
|
|
296
|
+
},
|
|
297
|
+
"mysql:auth:add": {
|
|
298
|
+
"aliases": [],
|
|
299
|
+
"args": {},
|
|
300
|
+
"description": "Add a MySQL connection profile",
|
|
301
|
+
"examples": [
|
|
302
|
+
"<%= config.bin %> <%= command.id %>",
|
|
303
|
+
"<%= config.bin %> <%= command.id %> --no-ssl"
|
|
304
|
+
],
|
|
305
|
+
"flags": {
|
|
306
|
+
"json": {
|
|
307
|
+
"description": "Format output as json.",
|
|
308
|
+
"helpGroup": "GLOBAL",
|
|
309
|
+
"name": "json",
|
|
310
|
+
"allowNo": false,
|
|
311
|
+
"type": "boolean"
|
|
312
|
+
},
|
|
313
|
+
"database": {
|
|
314
|
+
"char": "d",
|
|
315
|
+
"description": "Database name",
|
|
316
|
+
"name": "database",
|
|
317
|
+
"required": false,
|
|
318
|
+
"hasDynamicHelp": false,
|
|
319
|
+
"multiple": false,
|
|
320
|
+
"type": "option"
|
|
321
|
+
},
|
|
322
|
+
"host": {
|
|
323
|
+
"description": "MySQL host",
|
|
324
|
+
"name": "host",
|
|
325
|
+
"required": false,
|
|
326
|
+
"hasDynamicHelp": false,
|
|
327
|
+
"multiple": false,
|
|
328
|
+
"type": "option"
|
|
329
|
+
},
|
|
330
|
+
"password": {
|
|
331
|
+
"char": "p",
|
|
332
|
+
"description": "Password",
|
|
333
|
+
"name": "password",
|
|
334
|
+
"required": false,
|
|
335
|
+
"hasDynamicHelp": false,
|
|
336
|
+
"multiple": false,
|
|
337
|
+
"type": "option"
|
|
338
|
+
},
|
|
339
|
+
"port": {
|
|
340
|
+
"char": "P",
|
|
341
|
+
"description": "MySQL port",
|
|
342
|
+
"name": "port",
|
|
343
|
+
"required": false,
|
|
344
|
+
"hasDynamicHelp": false,
|
|
345
|
+
"multiple": false,
|
|
346
|
+
"type": "option"
|
|
347
|
+
},
|
|
348
|
+
"profile": {
|
|
349
|
+
"description": "Profile name",
|
|
350
|
+
"name": "profile",
|
|
351
|
+
"required": false,
|
|
352
|
+
"hasDynamicHelp": false,
|
|
353
|
+
"multiple": false,
|
|
354
|
+
"type": "option"
|
|
355
|
+
},
|
|
356
|
+
"ssl": {
|
|
357
|
+
"description": "Use SSL",
|
|
358
|
+
"name": "ssl",
|
|
359
|
+
"required": false,
|
|
360
|
+
"allowNo": true,
|
|
361
|
+
"type": "boolean"
|
|
362
|
+
},
|
|
363
|
+
"user": {
|
|
364
|
+
"char": "u",
|
|
365
|
+
"description": "Username",
|
|
366
|
+
"name": "user",
|
|
367
|
+
"required": false,
|
|
368
|
+
"hasDynamicHelp": false,
|
|
369
|
+
"multiple": false,
|
|
370
|
+
"type": "option"
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
"hasDynamicHelp": false,
|
|
374
|
+
"hiddenAliases": [],
|
|
375
|
+
"id": "mysql:auth:add",
|
|
376
|
+
"pluginAlias": "@hesed/mysql",
|
|
377
|
+
"pluginName": "@hesed/mysql",
|
|
378
|
+
"pluginType": "core",
|
|
379
|
+
"strict": true,
|
|
380
|
+
"enableJsonFlag": true,
|
|
381
|
+
"isESM": true,
|
|
382
|
+
"relativePath": [
|
|
383
|
+
"dist",
|
|
384
|
+
"commands",
|
|
385
|
+
"mysql",
|
|
386
|
+
"auth",
|
|
387
|
+
"add.js"
|
|
388
|
+
]
|
|
389
|
+
},
|
|
390
|
+
"mysql:auth:test": {
|
|
391
|
+
"aliases": [],
|
|
392
|
+
"args": {},
|
|
393
|
+
"description": "Test MySQL database connection",
|
|
394
|
+
"examples": [
|
|
395
|
+
"<%= config.bin %> <%= command.id %>",
|
|
396
|
+
"<%= config.bin %> <%= command.id %> --profile staging"
|
|
397
|
+
],
|
|
398
|
+
"flags": {
|
|
399
|
+
"json": {
|
|
400
|
+
"description": "Format output as json.",
|
|
401
|
+
"helpGroup": "GLOBAL",
|
|
402
|
+
"name": "json",
|
|
403
|
+
"allowNo": false,
|
|
404
|
+
"type": "boolean"
|
|
405
|
+
},
|
|
406
|
+
"profile": {
|
|
407
|
+
"description": "Profile name to test",
|
|
408
|
+
"name": "profile",
|
|
409
|
+
"required": false,
|
|
410
|
+
"hasDynamicHelp": false,
|
|
411
|
+
"multiple": false,
|
|
412
|
+
"type": "option"
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"hasDynamicHelp": false,
|
|
416
|
+
"hiddenAliases": [],
|
|
417
|
+
"id": "mysql:auth:test",
|
|
418
|
+
"pluginAlias": "@hesed/mysql",
|
|
419
|
+
"pluginName": "@hesed/mysql",
|
|
420
|
+
"pluginType": "core",
|
|
421
|
+
"strict": true,
|
|
422
|
+
"enableJsonFlag": true,
|
|
423
|
+
"isESM": true,
|
|
424
|
+
"relativePath": [
|
|
425
|
+
"dist",
|
|
426
|
+
"commands",
|
|
427
|
+
"mysql",
|
|
428
|
+
"auth",
|
|
429
|
+
"test.js"
|
|
430
|
+
]
|
|
431
|
+
},
|
|
432
|
+
"mysql:auth:update": {
|
|
433
|
+
"aliases": [],
|
|
434
|
+
"args": {},
|
|
435
|
+
"description": "Update an existing MySQL connection profile",
|
|
436
|
+
"examples": [
|
|
437
|
+
"<%= config.bin %> <%= command.id %> --ssl",
|
|
438
|
+
"<%= config.bin %> <%= command.id %> --profile staging"
|
|
439
|
+
],
|
|
440
|
+
"flags": {
|
|
441
|
+
"json": {
|
|
442
|
+
"description": "Format output as json.",
|
|
443
|
+
"helpGroup": "GLOBAL",
|
|
444
|
+
"name": "json",
|
|
445
|
+
"allowNo": false,
|
|
446
|
+
"type": "boolean"
|
|
447
|
+
},
|
|
448
|
+
"database": {
|
|
449
|
+
"char": "d",
|
|
450
|
+
"description": "Database name",
|
|
451
|
+
"name": "database",
|
|
452
|
+
"required": false,
|
|
453
|
+
"hasDynamicHelp": false,
|
|
454
|
+
"multiple": false,
|
|
455
|
+
"type": "option"
|
|
456
|
+
},
|
|
457
|
+
"host": {
|
|
458
|
+
"description": "MySQL host",
|
|
459
|
+
"name": "host",
|
|
460
|
+
"required": false,
|
|
461
|
+
"hasDynamicHelp": false,
|
|
462
|
+
"multiple": false,
|
|
463
|
+
"type": "option"
|
|
464
|
+
},
|
|
465
|
+
"password": {
|
|
466
|
+
"char": "p",
|
|
467
|
+
"description": "Password",
|
|
468
|
+
"name": "password",
|
|
469
|
+
"required": false,
|
|
470
|
+
"hasDynamicHelp": false,
|
|
471
|
+
"multiple": false,
|
|
472
|
+
"type": "option"
|
|
473
|
+
},
|
|
474
|
+
"port": {
|
|
475
|
+
"char": "P",
|
|
476
|
+
"description": "MySQL port",
|
|
477
|
+
"name": "port",
|
|
478
|
+
"required": false,
|
|
479
|
+
"hasDynamicHelp": false,
|
|
480
|
+
"multiple": false,
|
|
481
|
+
"type": "option"
|
|
482
|
+
},
|
|
483
|
+
"profile": {
|
|
484
|
+
"description": "Profile name to update",
|
|
485
|
+
"name": "profile",
|
|
486
|
+
"required": false,
|
|
487
|
+
"hasDynamicHelp": false,
|
|
488
|
+
"multiple": false,
|
|
489
|
+
"type": "option"
|
|
490
|
+
},
|
|
491
|
+
"ssl": {
|
|
492
|
+
"description": "Use SSL",
|
|
493
|
+
"name": "ssl",
|
|
494
|
+
"required": false,
|
|
495
|
+
"allowNo": true,
|
|
496
|
+
"type": "boolean"
|
|
497
|
+
},
|
|
498
|
+
"user": {
|
|
499
|
+
"char": "u",
|
|
500
|
+
"description": "Username",
|
|
501
|
+
"name": "user",
|
|
502
|
+
"required": false,
|
|
503
|
+
"hasDynamicHelp": false,
|
|
504
|
+
"multiple": false,
|
|
505
|
+
"type": "option"
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
"hasDynamicHelp": false,
|
|
509
|
+
"hiddenAliases": [],
|
|
510
|
+
"id": "mysql:auth:update",
|
|
511
|
+
"pluginAlias": "@hesed/mysql",
|
|
512
|
+
"pluginName": "@hesed/mysql",
|
|
513
|
+
"pluginType": "core",
|
|
514
|
+
"strict": true,
|
|
515
|
+
"enableJsonFlag": true,
|
|
516
|
+
"isESM": true,
|
|
517
|
+
"relativePath": [
|
|
518
|
+
"dist",
|
|
519
|
+
"commands",
|
|
520
|
+
"mysql",
|
|
521
|
+
"auth",
|
|
522
|
+
"update.js"
|
|
523
|
+
]
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
"version": "0.1.0"
|
|
527
|
+
}
|