How to use twilio-run - 10 common examples

To help you get started, we’ve selected a few twilio-run examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github twilio-labs / plugin-serverless / src / commands / serverless / activate.js View on Github external
let { flags, args } = this.parse(FunctionsActivate);
    flags = normalizeFlags(flags);

    const externalOptions = createExternalCliOptions(flags, this.twilioClient);

    const opts = Object.assign({}, flags, args);
    return handler(opts, externalOptions);
  }
}

FunctionsActivate.description = describe;

FunctionsActivate.flags = Object.assign(
  {},
  convertYargsOptionsToOclifFlags(cliInfo.options),
  { profile: TwilioClientCommand.flags.profile }
);

module.exports = FunctionsActivate;
github twilio-labs / plugin-serverless / src / commands / serverless / activate.js View on Github external
async run() {
    await super.run();

    let { flags, args } = this.parse(FunctionsActivate);
    flags = normalizeFlags(flags);

    const externalOptions = createExternalCliOptions(flags, this.twilioClient);

    const opts = Object.assign({}, flags, args);
    return handler(opts, externalOptions);
  }
}
github twilio-labs / plugin-serverless / src / commands / serverless / deploy.js View on Github external
await super.run();

    let { flags, args } = this.parse(FunctionsDeploy);
    flags = normalizeFlags(flags);

    const externalOptions = createExternalCliOptions(flags, this.twilioClient);

    const opts = Object.assign({}, flags, args);
    return handler(opts, externalOptions);
  }
}

FunctionsDeploy.description = describe;

FunctionsDeploy.flags = Object.assign(
  convertYargsOptionsToOclifFlags(cliInfo.options),
  { profile: TwilioClientCommand.flags.profile }
);

module.exports = FunctionsDeploy;
github twilio-labs / plugin-serverless / src / commands / serverless / deploy.js View on Github external
async run() {
    await super.run();

    let { flags, args } = this.parse(FunctionsDeploy);
    flags = normalizeFlags(flags);

    const externalOptions = createExternalCliOptions(flags, this.twilioClient);

    const opts = Object.assign({}, flags, args);
    return handler(opts, externalOptions);
  }
}
github twilio-labs / plugin-serverless / src / commands / serverless / list-templates.js View on Github external
class FunctionsListTemplates extends Command {
  async run() {
    let { flags, args } = this.parse(FunctionsListTemplates);
    flags = normalizeFlags(flags);

    const opts = Object.assign({}, flags, args);
    return handler(opts, undefined);
  }
}

FunctionsListTemplates.description = describe;

FunctionsListTemplates.args = [];

FunctionsListTemplates.flags = Object.assign(
  convertYargsOptionsToOclifFlags(cliInfo.options)
);

module.exports = FunctionsListTemplates;
github twilio-labs / plugin-serverless / src / commands / serverless / list-templates.js View on Github external
async run() {
    let { flags, args } = this.parse(FunctionsListTemplates);
    flags = normalizeFlags(flags);

    const opts = Object.assign({}, flags, args);
    return handler(opts, undefined);
  }
}
github twilio-labs / plugin-serverless / src / commands / serverless / list.js View on Github external
flags = normalizeFlags(flags);

    const externalOptions = createExternalCliOptions(flags, this.twilioClient);

    const opts = Object.assign({}, flags, args);
    return handler(opts, externalOptions);
  }
}

FunctionsList.description = describe;

FunctionsList.args = [
  {
    name: 'types',
    required: false,
    default: cliInfo.argsDefaults.types,
    description:
      'Comma separated list of things to list (services,environments,functions,assets,variables)',
  },
];

FunctionsList.flags = Object.assign(
  convertYargsOptionsToOclifFlags(cliInfo.options),
  { profile: TwilioClientCommand.flags.profile }
);

module.exports = FunctionsList;
github twilio-labs / plugin-serverless / src / commands / serverless / list.js View on Github external
}

FunctionsList.description = describe;

FunctionsList.args = [
  {
    name: 'types',
    required: false,
    default: cliInfo.argsDefaults.types,
    description:
      'Comma separated list of things to list (services,environments,functions,assets,variables)',
  },
];

FunctionsList.flags = Object.assign(
  convertYargsOptionsToOclifFlags(cliInfo.options),
  { profile: TwilioClientCommand.flags.profile }
);

module.exports = FunctionsList;
github twilio-labs / plugin-serverless / src / commands / serverless / list.js View on Github external
async run() {
    await super.run();

    let { flags, args } = this.parse(FunctionsList);
    flags = normalizeFlags(flags);

    const externalOptions = createExternalCliOptions(flags, this.twilioClient);

    const opts = Object.assign({}, flags, args);
    return handler(opts, externalOptions);
  }
}
github twilio-labs / plugin-serverless / src / commands / serverless / new.js View on Github external
return handler(opts, undefined);
  }
}

FunctionsNew.description = describe;

FunctionsNew.args = [
  {
    name: 'namespace',
    required: false,
    description: 'The namespace your assets/functions should be grouped under',
  },
];

FunctionsNew.flags = Object.assign(
  convertYargsOptionsToOclifFlags(cliInfo.options)
);

module.exports = FunctionsNew;