mishael_lotr_sdk
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -5,5 +5,7 @@ "use strict"; | ||
const axios_1 = require("axios"); | ||
const dotenv = require('dotenv'); | ||
dotenv.config(); | ||
class MovieApi { | ||
constructor(apiKey) { | ||
this.baseUrl = 'https://the-one-api.dev/v2'; | ||
this.baseUrl = process.env.BASE_URL; | ||
this.axiosInstance = axios_1.default.create({ | ||
@@ -10,0 +12,0 @@ headers: apiKey ? { Authorization: `Bearer ${apiKey}` } : undefined, |
@@ -5,5 +5,7 @@ "use strict"; | ||
const axios_1 = require("axios"); | ||
const dotenv = require('dotenv'); | ||
dotenv.config(); | ||
class QuoteApi { | ||
constructor(apiKey) { | ||
this.baseUrl = 'https://the-one-api.dev/v2'; | ||
this.baseUrl = process.env.BASE_URL; | ||
this.axiosInstance = axios_1.default.create({ | ||
@@ -10,0 +12,0 @@ headers: apiKey ? { Authorization: `Bearer ${apiKey}` } : undefined, |
@@ -40,3 +40,5 @@ "use strict"; | ||
var index_1 = require("./src/index"); | ||
var apiKey = 'UoaGdOMEwZ1f04rhN3q5'; | ||
var dotenv = require('dotenv'); | ||
dotenv.config(); | ||
var apiKey = process.env.API_KEY; | ||
var sdk = new index_1.LordOfTheRingsSDK(apiKey); | ||
@@ -43,0 +45,0 @@ function runSDK() { |
import { LordOfTheRingsSDK } from './src/index'; | ||
const dotenv = require('dotenv'); | ||
const apiKey = 'UoaGdOMEwZ1f04rhN3q5'; | ||
dotenv.config() | ||
const apiKey = process.env.API_KEY; | ||
const sdk = new LordOfTheRingsSDK(apiKey); | ||
@@ -5,0 +8,0 @@ |
{ | ||
"name": "mishael_lotr_sdk", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -9,3 +9,3 @@ "main": "index.js", | ||
"start": "node dist/index.js", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "jest" | ||
}, | ||
@@ -17,7 +17,9 @@ "author": "", | ||
"jest": "^29.5.0", | ||
"ts-jest": "^29.1.0", | ||
"typescript": "^5.0.4" | ||
}, | ||
"dependencies": { | ||
"axios": "^1.4.0" | ||
"axios": "^1.4.0", | ||
"dotenv": "^16.1.3" | ||
} | ||
} |
@@ -41,5 +41,7 @@ "use strict"; | ||
var axios_1 = require("axios"); | ||
var dotenv = require('dotenv'); | ||
dotenv.config(); | ||
var MovieApi = /** @class */ (function () { | ||
function MovieApi(apiKey) { | ||
this.baseUrl = 'https://the-one-api.dev/v2'; | ||
this.baseUrl = process.env.BASE_URL; | ||
this.axiosInstance = axios_1.default.create({ | ||
@@ -46,0 +48,0 @@ headers: apiKey ? { Authorization: "Bearer ".concat(apiKey) } : undefined, |
import axios, { AxiosInstance, AxiosResponse } from 'axios'; | ||
import { Movie } from '../models/movie'; | ||
const dotenv = require('dotenv'); | ||
dotenv.config() | ||
export class MovieApi { | ||
private baseUrl = 'https://the-one-api.dev/v2'; | ||
private baseUrl = process.env.BASE_URL; | ||
private axiosInstance: AxiosInstance; | ||
@@ -7,0 +10,0 @@ |
@@ -41,5 +41,7 @@ "use strict"; | ||
var axios_1 = require("axios"); | ||
var dotenv = require('dotenv'); | ||
dotenv.config(); | ||
var QuoteApi = /** @class */ (function () { | ||
function QuoteApi(apiKey) { | ||
this.baseUrl = 'https://the-one-api.dev/v2'; | ||
this.baseUrl = process.env.BASE_URL; | ||
this.axiosInstance = axios_1.default.create({ | ||
@@ -46,0 +48,0 @@ headers: apiKey ? { Authorization: "Bearer ".concat(apiKey) } : undefined, |
import axios, { AxiosInstance, AxiosResponse } from 'axios'; | ||
import { ListResponse } from '../models/listResponse'; | ||
import { Quote } from '../models/quote'; | ||
const dotenv = require('dotenv'); | ||
dotenv.config() | ||
export class QuoteApi { | ||
private baseUrl = 'https://the-one-api.dev/v2'; | ||
private baseUrl = process.env.BASE_URL; | ||
private axiosInstance: AxiosInstance; | ||
@@ -80,1 +83,2 @@ | ||
} | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
46780
36
972
1
1
84
0
2
4
6
+ Addeddotenv@^16.1.3
+ Addeddotenv@16.4.5(transitive)