@midwayjs/serverless-scf-spec
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

SFC spec generator

根据 scf spec 描述

地址:https://cloud.tencent.com/document/product/583/36198

API

scf 发布支持多函数,所以直接将 spec 转换为固定的 template.yml,示例见 /resource 目录。

generateFunctionsSpecFile

根据传入的标准 spec 文件,生成 scf 类型的 spec 文件。

import { generateFunctionsSpecFile } from '@midwayjs/scf-spec-generator';
import * as path from 'path';

generateFunctionsSpecFile(path.join(__dirname, './fixtures/serverless.yml'));

generateFunctionsSpec

根据传入的标准 spec 文件,生成 scf 类型的 spec JSON。

import { generateFunctionsSpec } from '@midwayjs/scf-spec-generator';
import * as path from 'path';

const result = generateFunctionsSpec(path.join(__dirname, './fixtures/fun.yml'));
console.log(result);  // scf spec 的 json

Readme

Keywords

none

Package Sidebar

Install

npm i @midwayjs/serverless-scf-spec

Weekly Downloads

1

Version

0.1.5

License

none

Unpacked Size

25.9 kB

Total Files

14

Last publish

Collaborators

  • mariodu
  • czy88840616
  • legendecas
  • echosoar
  • lellansin
  • lxxyx
  • stone-jin