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

cody-music

Package Overview
Dependencies
Maintainers
7
Versions
234
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cody-music - npm Package Compare versions

Comparing version 2.10.6 to 2.10.7

5

dist/lib/client.js

@@ -321,3 +321,3 @@ "use strict";

async refreshSpotifyToken(optionalRefreshToken = "") {
if (!musicStore.spotifyRefreshToken) {
if (!musicStore.spotifyClientSecret || !musicStore.spotifyRefreshToken) {
return {

@@ -327,3 +327,3 @@ status: "failed",

data: "",
message: "Missing Spotify Credentials",
message: "Missing Spotify token refresh information",
};

@@ -392,3 +392,2 @@ }

spotifyClient.defaults.headers.common["Authorization"] = `Bearer ${musicStore.spotifyAccessToken}`;
// console.log(`PUT ${api} - ${moment().format()}`);
return spotifyClient

@@ -395,0 +394,0 @@ .put(api, payload)

2

dist/test/apis/test.js

@@ -27,3 +27,3 @@ "use strict";

describe("refreshSpotifyAccessToken()", () => {
let configFile = __dirname + "/../config.json";
let configFile = __dirname + "/../../config.json";
let data = testUtil.getJsonFromFile(configFile);

@@ -30,0 +30,0 @@ before(function () {

@@ -39,3 +39,3 @@ "use strict";

before(async () => {
let configFile = __dirname + "/../config.json";
let configFile = __dirname + "/../../config.json";
let data = testUtil.getJsonFromFile(configFile);

@@ -42,0 +42,0 @@ CodyMusic.setCredentials({

@@ -36,3 +36,3 @@ "use strict";

before(async () => {
let configFile = __dirname + "/../config.json";
let configFile = __dirname + "/../../config.json";
let data = testUtil.getJsonFromFile(configFile);

@@ -39,0 +39,0 @@ CodyMusic.setCredentials({

@@ -37,3 +37,3 @@ "use strict";

before(() => {
let configFile = __dirname + "/../config.json";
let configFile = __dirname + "/../../config.json";
let data = testUtil.getJsonFromFile(configFile);

@@ -40,0 +40,0 @@ CodyMusic.setCredentials({

@@ -36,3 +36,3 @@ "use strict";

it("Validate getting expired access token response", async () => {
let configFile = __dirname + "/../config.json";
let configFile = __dirname + "/../../config.json";
let data = testUtil.getJsonFromFile(configFile);

@@ -49,3 +49,3 @@ CodyMusic.setCredentials({

it("Validate getting non-expired token response", async () => {
let configFile = __dirname + "/../config.json";
let configFile = __dirname + "/../../config.json";
let data = testUtil.getJsonFromFile(configFile);

@@ -52,0 +52,0 @@ CodyMusic.setCredentials({

@@ -358,3 +358,3 @@ import axios, { AxiosInstance } from "axios";

async refreshSpotifyToken(optionalRefreshToken: string = "") {
if (!musicStore.spotifyRefreshToken) {
if (!musicStore.spotifyClientSecret || !musicStore.spotifyRefreshToken) {
return {

@@ -364,3 +364,3 @@ status: "failed",

data: "",
message: "Missing Spotify Credentials",
message: "Missing Spotify token refresh information",
};

@@ -454,3 +454,2 @@ }

// console.log(`PUT ${api} - ${moment().format()}`);
return spotifyClient

@@ -457,0 +456,0 @@ .put(api, payload)

{
"name": "cody-music",
"version": "2.10.6",
"version": "2.10.7",
"description": "mac osx spotify and itunes music player controller, spotify audio features, itunes and spotify genre, and playlist control",

@@ -49,4 +49,4 @@ "main": "dist/index.js",

"dependencies": {
"axios": "^0.26.0",
"dotenv": "^16.0.0",
"axios": "^0.27.2",
"dotenv": "^16.0.1",
"moment-timezone": "^0.5.34",

@@ -53,0 +53,0 @@ "open": "^8.4.0"

@@ -8,3 +8,3 @@ const expect = require("chai").expect;

describe("refreshSpotifyAccessToken()", () => {
let configFile = __dirname + "/../config.json";
let configFile = __dirname + "/../../config.json";
let data = testUtil.getJsonFromFile(configFile);

@@ -11,0 +11,0 @@

@@ -23,3 +23,3 @@ const expect = require("chai").expect;

before(async () => {
let configFile = __dirname + "/../config.json";
let configFile = __dirname + "/../../config.json";
let data = testUtil.getJsonFromFile(configFile);

@@ -26,0 +26,0 @@ CodyMusic.setCredentials({

@@ -17,3 +17,3 @@ const expect = require("chai").expect;

before(async () => {
let configFile = __dirname + "/../config.json";
let configFile = __dirname + "/../../config.json";
let data = testUtil.getJsonFromFile(configFile);

@@ -20,0 +20,0 @@ CodyMusic.setCredentials({

@@ -20,3 +20,3 @@ const expect = require("chai").expect;

before(() => {
let configFile = __dirname + "/../config.json";
let configFile = __dirname + "/../../config.json";
let data = testUtil.getJsonFromFile(configFile);

@@ -23,0 +23,0 @@ CodyMusic.setCredentials({

@@ -17,3 +17,3 @@ const expect = require("chai").expect;

it("Validate getting expired access token response", async () => {
let configFile = __dirname + "/../config.json";
let configFile = __dirname + "/../../config.json";
let data = testUtil.getJsonFromFile(configFile);

@@ -31,3 +31,3 @@ CodyMusic.setCredentials({

it("Validate getting non-expired token response", async () => {
let configFile = __dirname + "/../config.json";
let configFile = __dirname + "/../../config.json";
let data = testUtil.getJsonFromFile(configFile);

@@ -34,0 +34,0 @@ CodyMusic.setCredentials({

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