npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ikonintegration/serverless-ikcomponents-plugin

v1.2.4

Published

A plugin with a collection of components that are preprocessed to expand more complex and structure components with predefined best pratice rules.

Downloads

150

Readme

IKComponents Node.js Package

Overall

  • npm npm npm (tag) Libraries.io dependency status for latest release, scoped npm package
  • GitHub commit activity
  • GitHub last commit

installation:

in webpack.config.js

 const slsikcomponents = require('@ikonintegration/serverless-ikcomponents-plugin');
  // Important step for ikcomponents
  entry: {
    ...slsw.lib.entries,
    ...slsikcomponents.getWebpackEntries()
  },

serverless.yml

  • add the plugin into the list

  • install the module

  • write the component :)

  • plugin will output errors and not allow deployment if additional dependecies are required

    Now done automatically

Options

custom:
  cognito: true || .... (This will enable cognito principal to be added to IAM role)
  apigateway: true || ... (This will enable api gateway principal to be added to IAM role)
stepFunctions: true || .... (This will enable step functions principal to be added to IAM role)
....(your serverless.yml)
ikcomponents:
  tags: Array<{
    key: value
  }>;
  functions?: Array<{
    handler?: string;
    vpc?: OVPCOptions;
    elbListenerArn?: string;
    //Indicates if the cluster will not be created and an shared ECS cluster should be used instead
    ecsClusterArn?: string; //ecs shared cluster ARN
    ecsIngressSecGroupId?: string; //ecs shared cluster ingress vpc group
    timeout?: number; //Only works with lambda based
    memory?: number; //defaults to 1024
    newRelicKey?: string;//
    events?: Array<{
      eventType: 'process' | 'httpd' | 'lambda;
      handler?: string; //this, takes precende over function handler - Usefulll for multi-purpose clusters
      enabled?: boolean; //defaults to true
      <!-- Only available for process and httpd types -->
      runtime?: 'nodejs10' | 'nodejs13' | 'php5' | 'php7';
      concurrency?: number; //defaults to 1
      shouldUseEC2?: boolean; //defaults to false, if true will laucnh task into EC2
      cpu?: number; //defaults to 512
      memory?: number; //defaults to 1024 - takes precedence over OFunction.memory
      role?: string;
      hostname?: string | string[];
      limitSourceIPs?: string | string[];
      <!-- Only available for httpd type -->
      port?: number; // HTTPD port (the port exposed on the container image) - if not specified random port will be used - usefull for busy private subnets - If port is not specified, it will use 80 for non SSL and 443 for SSL
      certificateArns?: string[]; //certificateArn - if present it will use HTTPS
      priority?: number; //Router priority, usefull for leaving wildcard routes to be the last resort
      cognitoAuthorizer? {
          poolDomain: string;
          poolArn: string;
          clientId: string;
      }
      //AS
      autoScale?: {
          min?: number; //default to 1
          max?: number; //default to 1
          metric: string;
          cooldown?: number; //defaults to 30
          cooldownIn?: number; //defaults to cooldown but has priority over it
          cooldownOut?: number; //defaults to cooldown but has priority over it
          targetValue: number;
      }
      //health check
      healthCheckInterval?: number; //defaults to 15,
      healthCheckTimeout?: number; //defaults to 10
      healthCheckHealthyCount?: number; //defaults to 2
      healthCheckUnhealthyCount?: number; //defaults to 5
      <!-- httpd or lambda -->
      routes?: Array<{ //required if on lambda (http) or httpd -- if sqs or other stream type this is desconsidered
        path: string;
        method: string;
      }>;
      cors?: {
        origin: string;
        headers: string[];
        allowCredentials: boolean;
      }
      <!-- Lambda only -->
      layers?: string[];
      protocol?: 'http | 'dynamostreams' | 'sqs' | 'sqs | 'scheduler'; //defaults to HTTP 
      prototocolArn?: any; //Only used when protocol is dynamostreams or sqs
      queueBatchSize?: number; //Only used when protocol is sqs
      schedulerRate?: string; //Only used when protocol is scheduler
      schedulerInput?: string; //Only used when protocol is scheduler
      reservedConcurrency?: number;
      filterPolicy?: object; //Only used when protocol is sns
    }>;
  }>

Example

ikcomponents:
  tags:
    workload: Sample
  functions:
    Proc: #CLUSTER
      handler: src/queue/PROCESS.handler
      vpc: ${self:custom.esvpc}
      events:
        - eventType: process
          runtime: nodejs13
          # memory: 1024 -- default/min for long running
    Httpd: #CLUSTER
      handler: src/router.handler
      vpc: ${self:custom.esvpc}
      events:
        - eventType: httpd
          runtime: nodejs13
          routes:
            - method: ANY
              path: *
    MultiPurp: #CLUSTER
      vpc: ${self:custom.esvpc}
      events:
        - eventType: httpd
          runtime: nodejs13
          handler: src/router.handler
          routes:
            - method: ANY
              path: *
        - eventType: httpd
          runtime: nodejs13
          handler: src/router.handler
          routes:
            - method: GET
              path: /test
      - eventType: process
          runtime: nodejs13
          handler: src/queue/PROCESS.handler