New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@squareball/cfnspec

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@squareball/cfnspec

This package retrieves and validates the AWS CloudFormation Resource Specification, and provides TypeScript types for the specification.

  • 0.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

@squareball/cfnspec

This package retrieves and validates the AWS CloudFormation Resource Specification, and provides TypeScript types for the specification.

About the specification

From the official docs:

The AWS CloudFormation resource specification is a JSON-formatted text file that defines the resources and properties that AWS CloudFormation supports. The document is a machine-readable, strongly typed specification that you can use to build tools for creating AWS CloudFormation templates. For example, you can use the specification to build auto completion and validation functionality for AWS CloudFormation templates in your IDE (integrated development environment).

Specification format

See AWS CloudFormation Specification Format.

API

DefaultSpecUrl

The location of the specification for us-east-1 (N. Virginia) region.

export const DefaultSpecUrl: string;

getLatestSpec()

Get the latest specification from the specified URL (or us-east-1 if not specified). For other regions, see the docs. This will validate the specification by default unless false is passed as the second parameter.

function getLatestSpec(
  url = DefaultSpecUrl,
  validate = true,
): Promise<CloudFormationSpec>;

Interfaces

export interface CloudFormationSpec {
  PropertyTypes: Dictionary<TypeDefinition>;
  ResourceSpecificationVersion: string;
  ResourceTypes: Dictionary<ResourceDefinition>;
}

export interface TypeDefinition {
  AdditionalProperties?: boolean;
  Documentation?: string;
  DuplicatesAllowed?: boolean;
  ItemType?: string;
  PrimitiveItemType?: PrimitiveType;
  PrimitiveType?: PrimitiveType;
  Properties?: Dictionary<TypeDefinition>;
  Required?: boolean;
  Type?: string;
  UpdateType?: UpdateType;
}

export interface ResourceDefinition extends TypeDefinition {
  Attributes?: Dictionary<TypeDefinition>;
}

export interface Dictionary<T> {
  [key: string]: T;
}

export enum PrimitiveType {
  String = 'String',
  Long = 'Long',
  Integer = 'Integer',
  Double = 'Double',
  Boolean = 'Boolean',
  Timestamp = 'Timestamp',
  Json = 'Json',
}

export enum UpdateType {
  Mutable = 'Mutable',
  Immutable = 'Immutable',
  Conditional = 'Conditional',
}

FAQs

Package last updated on 17 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc