Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ellipsis-api

Package Overview
Dependencies
Maintainers
3
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ellipsis-api - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

26

__tests__/test.js

@@ -215,2 +215,28 @@ "use strict";

describe("generateToken", () => {
it("sends an appropriate api request", () => {
expect.assertions(2);
const expirySeconds = 300;
const isOneTime = true;
const options = Object.assign({}, {
expirySeconds: expirySeconds,
isOneTime: isOneTime
});
return actionsApi.generateToken(options).then(body => {
const form = body.form;
const expectedForm = Object.assign({}, { token: ellipsis.token }, {
expirySeconds: options.expirySeconds,
isOneTime: options.isOneTime
});
expect(form).toEqual(expectedForm);
expect(request.post.mock.calls[0][0].url).toEqual(actionsApi.urlFor("v1/tokens"));
});
});
});
});

@@ -217,0 +243,0 @@

@@ -172,2 +172,20 @@ const request = require('request');

generateToken(options) {
return new Promise((resolve, reject) => {
const mergedOptions = Object.assign({}, options, {
success: resolve,
error: reject
});
const formData = {
expirySeconds: mergedOptions.expirySeconds,
isOneTime: mergedOptions.isOneTime,
token: this.token()
};
request.post({
url: this.urlFor("v1/tokens"),
form: formData
}, (error, response, body) => this.handleResponse(mergedOptions, error, response, body));
});
}
}

@@ -174,0 +192,0 @@

2

package.json
{
"name": "ellipsis-api",
"version": "0.0.11",
"version": "0.0.12",
"description": "Interact with Ellipsis skills & actions",

@@ -5,0 +5,0 @@ "main": "index.js",

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