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

@ciscospark/test-users-legacy

Package Overview
Dependencies
Maintainers
7
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ciscospark/test-users-legacy - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

25

dist/index.js

@@ -126,2 +126,14 @@ "use strict";

options = options || {};
var body = _.defaultsDeep({}, options, {
// The four characters on the end are to hit all the password requirements
password: generateRandomString(10) + "zA1*",
displayName: randomName(),
clientId: process.env.CISCOSPARK_CLIENT_ID,
clientSecret: process.env.CISCOSPARK_CLIENT_SECRET,
emailTemplate: options.email || options.emailAddress,
// defaultsDeep doesn't seem to handle arrays
entitlements: options.entitlements || ["spark", "squaredCallInitiation", "squaredRoomModeration", "squaredInviter", "webExSquared"],
scopes: options.scope || process.env.CISCOSPARK_SCOPE
});
return requestWithAuth({

@@ -131,15 +143,6 @@ method: "POST",

json: true,
body: _.defaultsDeep(options, {
// The four characters on the end are to hit all the password requirements
password: generateRandomString(10) + "zA1*",
displayName: randomName(),
clientId: process.env.CISCOSPARK_CLIENT_ID,
clientSecret: process.env.CISCOSPARK_CLIENT_SECRET,
emailTemplate: options.email || options.emailAddress,
entitlements: ["spark", "squaredCallInitiation", "squaredRoomModeration", "squaredInviter", "webExSquared"],
scopes: options.scope || process.env.CISCOSPARK_CLIENT_SCOPE
})
body: body
}).then(function (res) {
return (0, _assign2.default)({
password: options.password,
password: JSON.parse(res.request.body).password,
emailAddress: res.body.user.email,

@@ -146,0 +149,0 @@ displayName: res.body.user.name

{
"name": "@ciscospark/test-users-legacy",
"version": "1.0.1",
"version": "1.0.2",
"description": "",

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

@@ -117,2 +117,20 @@ const assert = require(`assert`);

options = options || {};
const body = _.defaultsDeep({}, options, {
// The four characters on the end are to hit all the password requirements
password: `${generateRandomString(10)}zA1*`,
displayName: randomName(),
clientId: process.env.CISCOSPARK_CLIENT_ID,
clientSecret: process.env.CISCOSPARK_CLIENT_SECRET,
emailTemplate: options.email || options.emailAddress,
// defaultsDeep doesn't seem to handle arrays
entitlements: options.entitlements || [
`spark`,
`squaredCallInitiation`,
`squaredRoomModeration`,
`squaredInviter`,
`webExSquared`
],
scopes: options.scope || process.env.CISCOSPARK_SCOPE
});
return requestWithAuth({

@@ -122,21 +140,6 @@ method: `POST`,

json: true,
body: _.defaultsDeep(options, {
// The four characters on the end are to hit all the password requirements
password: `${generateRandomString(10)}zA1*`,
displayName: randomName(),
clientId: process.env.CISCOSPARK_CLIENT_ID,
clientSecret: process.env.CISCOSPARK_CLIENT_SECRET,
emailTemplate: options.email || options.emailAddress,
entitlements: [
`spark`,
`squaredCallInitiation`,
`squaredRoomModeration`,
`squaredInviter`,
`webExSquared`
],
scopes: options.scope || process.env.CISCOSPARK_CLIENT_SCOPE
})
body
})
.then((res) => Object.assign({
password: options.password,
password: JSON.parse(res.request.body).password,
emailAddress: res.body.user.email,

@@ -143,0 +146,0 @@ displayName: res.body.user.name

@@ -113,2 +113,7 @@ const TestUsers = require(`../../..`);

it(`creates a test user in another org`, () => assert.isFulfilled(TestUsers.create({
orgId: `kmsFederation`,
entitlements: [`webExSquared`]
})));
});

@@ -115,0 +120,0 @@

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