Socket
Book a DemoInstallSign in
Socket

@skedulo/function-utilities

Package Overview
Dependencies
Maintainers
33
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@skedulo/function-utilities

Connected Function utilities library

latest
npmnpm
Version
0.0.7
Version published
Maintainers
33
Created
Source

Skedulo Function Utilities

External development utilities for Skedulo Connected Function. This project includes utilities to parse Skedulo specific header to extract Custom Settings, User Context, and Authorization Info. This project is intended to be used only as a dev dependency in package projects because of its dependency on Node and the filesystem.

To develop both the dev public package and the Connected Function template, it's recommended that yarn link is used across projects to test changes locally. For the package, this involves running yarn link at the root and for each boilerplate running yarn link @skedulo/function-header-helper.

Package Development

  • Dependency Installation: yarn
  • Compile the package: yarn compile
  • Release package for local version to NPM: yarn release-package ${versionNumber}

How to use this package in your project

const { method, path, headers, body, querystring } = payload
const skedContext:SkedContext = createSkedContext(headers);

// Get access token and Skedulo API base URL
const token: string = skedContext.auth.apiToken;
const baseUrl: string = skedConText.auth.baseUrl;

// Get the username of the user triggering the function
const userName: string = skedContext.userContext.username;

// Configuration Variables
// This will return the value of TEST_CONFIG variable in your Skedulo configuration. If the variable is not set, the function will return undefined.
const configVar = skedContext.configVars.getVariableValue("TEST_CONFIG")

FAQs

Package last updated on 29 May 2025

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