@distinction-dev/serverless-lambda-recursiveloop

中文文档
1.0.0发布于 2024/09/03MITCommonJS近 30 天下载 2.3万

A Serverless Framework Plugin allowing to set RecursiveLoop property of lambda functions

原始使用文档
文档目录4 节
  1. Getting started
  2. Installation
  3. Functionality
  4. Installation

Getting started

Installation

npm install --save-dev @distinction-dev/serverless-lambda-recursiveloop

Serverless RecursiveLoop Plugin

A Serverless Framework plugin that adds a RecursiveLoop property to AWS Lambda function configurations. This property controls the recursive loop detection behavior for Lambda functions.

Functionality

The RecursiveLoop property allows you to configure how AWS Lambda handles recursive loop detections for your functions.

  • Allowed Values:

    • Allow: No action is taken if a recursive loop is detected.
    • Terminate: The function invocation is stopped, and a notification is sent when a recursive loop is detected.
  • Type: String

  • Required: No

  • Resource Type: AWS::Lambda::Function

Installation

To use this plugin in your Serverless project, follow these steps:

  1. Create the Plugin File: Create a file named serverless-recursive-loop-plugin.js in the root directory of your Serverless project and paste the plugin code into it.

  2. Add the Plugin to Your Serverless Configuration: In your serverless.yml file, add the plugin under the plugins section.

    service: my-service
    
    provider:
      name: aws
      runtime: nodejs14.x
    
    plugins:
      - "@distinction-dev/serverless-lambda-recursiveloop"
    
    functions:
      myFunction:
        handler: handler.myFunction
        recursiveLoop: Terminate
    
      anotherFunction:
        handler: handler.anotherFunction
        recursiveLoop: Allow
    

版本与发布记录

@distinction-dev/serverless-lambda-recursiveloop 共发布 1 个版本,首次发布于 2024/09/03;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.0latest2024/09/032 年前

关于 @distinction-dev/serverless-lambda-recursiveloop 的常见问题

@distinction-dev/serverless-lambda-recursiveloop 是什么?

A Serverless Framework Plugin allowing to set RecursiveLoop property of lambda functions

如何安装 @distinction-dev/serverless-lambda-recursiveloop?

在项目目录运行 npm install @distinction-dev/serverless-lambda-recursiveloop,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:serverless(<4.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@distinction-dev/serverless-lambda-recursiveloop 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/distinction-dev__serverless-lambda-recursiveloop 是否存在。

@distinction-dev/serverless-lambda-recursiveloop 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@distinction-dev/serverless-lambda-recursiveloop 可以商用吗?

@distinction-dev/serverless-lambda-recursiveloop 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@distinction-dev/serverless-lambda-recursiveloop 的下载量有多少?

根据 npm 官方下载统计,@distinction-dev/serverless-lambda-recursiveloop 在 2026/10/13 – 2026/11/11 这 30 天内被下载 23,132 次,日均约 771 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@distinction-dev/serverless-lambda-recursiveloop 还在维护吗?

最新版本 1.0.0 发布于 2024/09/03(2 年前);至今共发布 1 个版本,其中过去 12 个月发布了 0 个;首次发布于 2024/09/03。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。