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

stitch-cli

v0.0.19

Published

## Resources

Downloads

6

Readme

Stitch CLI

Resources

Commands like apply:resources expect resources in YAML files in a specific format:

kind: Schema
metadata:
  name: usersApi
  namespace: users
schema: |
  type Query {
      getUser(id: ID!): String
          @rest(url: "http://users-service/users/{args.id}")
  }

Or the schema resource can include file patterns of gql files.

kind: Schema
metadata:
  name: usersApi
  namespace: users
schemaFiles:
  - ./**/*.gql

Or both schema and schemaFiles properties can be defined. In this case schema property value will be considered as content of additional file.

kind: Upstream
metadata:
  name: usersApi
  namespace: users
host: 'users-service'
auth:
  type: ActiveDirectory
  activeDirectory:
    authority: https://login.microsoftonline.com/<TENANT_ID>
    resource: http://user-service-ad-resource
kind: UpstreamClientCredentials
metadata:
  name: activedirectoryTenant
  namespace: users
authType: ActiveDirectory
activeDirectory:
  authority: https://login.microsoftonline.com/<TENANT_ID>
  clientId: myAdClientId
  clientSecret: myAdClientSecret
kind: Policy
metadata:
  name: usersPolicy
  namespace: users
type: opa
code: |
  default allow = false
  allow {
      input.args.role == "admin"
  }
args:
  role: String

Commands

stitch apply:base-policy RESOURCEPATH

Apply base policy

USAGE
  $ stitch apply:base-policy RESOURCEPATH

OPTIONS
  --authorization-header=authorization-header  Custom authorization header
  --dry-run                                    Should perform a dry run
  --registry-url=registry-url                  (required) Url of the registry
  --timeout=timeout                            [default: 10000] Request timeout

EXAMPLE

         $ stitch apply:base-policy base-policy.yaml
         Uploaded successfully!

See code: src/commands/apply/base-policy.ts

stitch apply:introspection-query-policy RESOURCEPATH

Apply introspection query policy

USAGE
  $ stitch apply:introspection-query-policy RESOURCEPATH

OPTIONS
  --authorization-header=authorization-header  Custom authorization header
  --dry-run                                    Should perform a dry run
  --registry-url=registry-url                  (required) Url of the registry
  --timeout=timeout                            [default: 10000] Request timeout

EXAMPLE

         $ stitch apply:introspection-query-policy introspection-query-policy.yaml
         Uploaded successfully!

See code: src/commands/apply/introspection-query-policy.ts

stitch apply:resources RESOURCESPATH

Apply resources

USAGE
  $ stitch apply:resources RESOURCESPATH

OPTIONS
  --authorization-header=authorization-header  Custom authorization header
  --dry-run                                    Should perform a dry run
  --registry-url=registry-url                  (required) Url of the registry
  --skip-resource-types=skip-resource-types    Resource types to skip
  --timeout=timeout                            [default: 10000] Request timeout
  --verbose                                    Verbose mode

EXAMPLE
  $ stitch apply:resources schema.gql
  Uploaded successfully!

See code: src/commands/apply/resources.ts

stitch help [COMMAND]

display help for stitch

USAGE
  $ stitch help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

stitch refresh:remote-schema REMOTESERVERURL

Refresh remote schema

USAGE
  $ stitch refresh:remote-schema REMOTESERVERURL

OPTIONS
  --authorization-header=authorization-header  Custom authorization header
  --registry-url=registry-url                  (required) Url of the registry
  --timeout=timeout                            [default: 10000] Request timeout
  --verbose                                    Verbose mode

EXAMPLE
  $ stitch refresh:remote-schema http://remote-graphql-server/graphql
  Remote schema refreshed successfully!

See code: src/commands/refresh/remote-schema.ts