Socket
Socket
Sign inDemoInstall

@servisbot/npm-sb-srn

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @servisbot/npm-sb-srn

SRN generation SDK for ServisBot


Version published
Weekly downloads
2.5K
decreased by-16.12%
Maintainers
1
Install size
41.5 kB
Created
Weekly downloads
 

Readme

Source

npm-sb-srn

SRN generation SDK

Overview

npm module to make SRNs "painless"

install

npm install --save @servisbot/npm-sb-srn

Usage

const SRN = require('@servisbot/npm-sb-srn');

const srn = new SRN(args);  // see Environment variables section
assert(srn.isValid());

const srn = SRN.fromString('srn:vault:global:myorg:secretdoc:my-secret-doc-name:78');
assert.equal(srn.getService(), 'vault');
assert.equal(srn.getRegion(), 'global');
assert.equal(srn.getOrganization(), 'myorg');
assert.equal(srn.getResourcetype(), 'secretdoc');
assert.equal(srn.getResource(), 'my-secret-doc-name');
assert.equal(srn.getQualifier(), '78');
assert.equal(srn.generateSRN(), 'srn:vault:global:myorg:secretdoc:my-secret-doc-name:78');

Environment variables

The following environemnt variables will be used if present

SB_SERVICE;
SB_REGION;
SB_RESOURCE_TYPE;
SB_ORGANIZATION;
SB_RESOURCE;
SB_QUALIFIER;

The SRN class will read from the args passed into the constructure and take precidence over env vars if they exist

{
    service,
    region,
    resourcetype,
    organization,
    resource,
    qualifier
}

FAQs

Last updated on 10 Jul 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc