UNPKG

1.13 kBTypeScriptView Raw
1/// <reference types="node" />
2import { flags } from '@oclif/command';
3import * as http from 'http';
4import * as knex from 'knex';
5import { TAuthContext } from '@bearer/functions/lib/declaration';
6import BaseCommand from '../base-command';
7export default class Invoke extends BaseCommand {
8 static description: string;
9 static flags: {
10 data: flags.IOptionFlag<string | undefined>;
11 file: flags.IOptionFlag<string | undefined>;
12 help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
13 path: flags.IOptionFlag<string | undefined>;
14 silent: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
15 };
16 static args: {
17 name: string;
18 required: boolean;
19 }[];
20 run(): Promise<void>;
21 ensureJson: (maybeJson: string) => void;
22 getFileContent: (filePath: string) => string | undefined;
23 getFunctionContext(): TAuthContext;
24 _startServer: (port: number) => Promise<http.Server>;
25 private _db;
26 db(): Promise<knex.QueryInterface>;
27 getData: (referenceId: string) => Promise<any>;
28 putData: (referenceId: string, data: any) => Promise<void>;
29}