-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #334 from OpenFn/fail-on-type-errors
Fail on type errors
- Loading branch information
Showing
30 changed files
with
140 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
import yargs, { Arguments } from 'yargs'; | ||
import yargs, { ArgumentsCamelCase } from 'yargs'; | ||
import { Opts } from '../options'; | ||
|
||
const docgenCommand = { | ||
type DocGenOptions = Partial<Opts>; // TODO | ||
|
||
const docgenCommand: yargs.CommandModule<Opts> = { | ||
command: 'docgen <specifier>', | ||
// Hide this command as it's not really for public usage | ||
desc: false, // 'Generate documentation into the repo. Specifier must include a version number.' | ||
handler: (argv: Arguments<Opts>) => { | ||
describe: false, // 'Generate documentation into the repo. Specifier must include a version number.' | ||
handler: (argv: ArgumentsCamelCase<DocGenOptions>) => { | ||
argv.command = 'docgen'; | ||
}, | ||
builder: (yargs: yargs.Argv) => { | ||
return yargs.example('docgen @openfn/[email protected]', ''); | ||
}, | ||
} as yargs.CommandModule<Opts>; | ||
builder: (yargs: yargs.Argv) => | ||
yargs.example('docgen @openfn/[email protected]', ''), | ||
}; | ||
|
||
export default docgenCommand; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
import yargs, { Arguments } from 'yargs'; | ||
import yargs, { ArgumentsCamelCase } from 'yargs'; | ||
import { Opts } from '../options'; | ||
|
||
type DocsOptions = Partial<Opts>; // TODO | ||
|
||
export default { | ||
command: 'docs <adaptor> [operation]', | ||
desc: 'Print help for an adaptor function. You can use short-hand for adaptor names (ie, common instead of @openfn/language-common)', | ||
handler: (argv: Arguments<Opts>) => { | ||
describe: | ||
'Print help for an adaptor function. You can use short-hand for adaptor names (ie, common instead of @openfn/language-common)', | ||
handler: (argv: ArgumentsCamelCase<DocsOptions>) => { | ||
argv.command = 'docs'; | ||
}, | ||
builder: (yargs: yargs.Argv) => | ||
yargs.example('docs common fn', 'Print help for the common fn operation'), | ||
} as unknown as yargs.CommandModule<Opts>; | ||
} as yargs.CommandModule<DocsOptions>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.