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

@aws-cdk/service-spec-importers

v0.0.61

Published

Import service sources into a service model database

Downloads

13,394

Readme

Service Spec Importers

Imports various service specification sources into a service database.

Usage

Programmatic

declare const db: SpecDatabase;

new DatabaseBuilder(db, options)
  // Import (modern) CloudFormation Registry Resources from a directory structure: <region>/<resource>.json
  .importCloudFormationRegistryResources('data/CloudFormationSchema/')

  // Import the (modern) JSON schema spec from SAM
  .importSamJsonSchema('data/sam.schema.json')

  // Import (legacy) CloudFormation Resource Specification from a directory structure containing a patch set: <region>/000_cloudformation/*.json
  .importCloudFormationResourceSpec('data/CloudFormationResourceSpecification/')

  // Import (legacy) SAM Resource Specification from a directory structure containing a patch set: *.json
  .importSamResourceSpec('data/SAMResourceSpecification/')

  // Import GetAtt'able attributes with the same name as properties
  .importGetAttAllowList('data/GetAttAllowlist/GetAttAllowlist.json')

  // Import various model enhancements
  .importCloudFormationDocs('data/CloudFormationDocumentation.json')
  .importStatefulResources('data/StatefulResources/StatefulResources.json')
  .importCannedMetrics('data/CloudWatchConsoleServiceDirectory.json'),

  // Apply the imports to the database
  .build();

CLI

Usage: import-db [options] [database]

Import service specification sources into a service model database

Arguments:
  database                         The database file (default: "db.json")

Options:
  -s, --source <definition...>     Import sources into the database. Use the format <source>:<path> to define sources.
  -l, --load <database>            Load an existing database as base, imported sources become additive
  -c, --gzip                       Compress the database file using gzip
  -f, --force                      Force overwriting an existing file (default: false)
  -d, --debug                      Print additional debug output during import (default: false)
  -r, --report <report-directory>  Create a detailed build report in the specified directory
  -v, --validate                   Validate imported sources and fail if any data is invalid (default: false)
  -h, --help                       display help for command

Sources

| CLI source name | DatabaseBuilder method | Path parameter | | ------------------- | --------------------------------------- | ------------------------------------------------------------------------------- | | cfnSchemaDir | importCloudFormationRegistryResources | Directory of structure <region>/<resource>.json | | samSchema | importSamJsonSchema | SAM Registry Schema file | | cfnSpecDir | importCloudFormationResourceSpec | Directory structure containing a patch set <region>/000_cloudformation/*.json | | samSpec | importSamResourceSpec | SAM Resource Specification file file | | cfnDocs | importCloudFormationDocs | CloudFormation Documentation file file | | statefulResources | importStatefulResources | Stateful Resources file | | cannedMetrics | importCannedMetrics | CloudWatch Console Service Directory file |

CloudFormation Registry Schema

CLI: cfnSchemaDir
Code: importCloudFormationRegistryResources(schemaDir: string)

Import (modern) CloudFormation Registry Resources from a directory structure. The directory MUST contain a directory for per region, each containing a registry schema file per resource.

CloudFormationSchema/
├─ us-east-1/
│  ├─ aws-s3-bucket.json
├─ eu-west-1/
│  ├─ aws-s3-bucket.json

SAM Registry Schema

CLI: samSchema
Code: importSamJsonSchema(filePath: string)

Import the (modern) JSON schema spec from SAM. Path to a single file containing a SAM Registry Schema.