forked from fauna/fauna-shell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-queries.js
More file actions
35 lines (28 loc) · 827 Bytes
/
run-queries.js
File metadata and controls
35 lines (28 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const { flags } = require('@oclif/command')
const FaunaCommand = require('../lib/fauna-command.js')
const EvalCommand = require('./eval')
const DEPRECATED_MSG =
'Deprecated: fauna run-queries is deprecated. Use eval instead'
class RunQueriesCommand extends EvalCommand {
async run() {
this.warn(DEPRECATED_MSG)
this.warn('Run `fauna eval --help`')
await super.run()
}
}
EvalCommand.description = `
${DEPRECATED_MSG}
Runs the queries found on the file passed to the command.
`
RunQueriesCommand.examples = [
'$ fauna run-queries dbname --file=/path/to/queries.fql',
]
RunQueriesCommand.flags = {
...FaunaCommand.flags,
file: flags.string({
description: 'File where to read queries from',
required: true,
}),
}
RunQueriesCommand.args = EvalCommand.args
module.exports = RunQueriesCommand