Comparing version 3.0.15 to 3.0.16
# Changelog | ||
## 3.0.16 | ||
* updated test library versions | ||
* switched from nconf to dotenv for configuration loading for tests | ||
## 3.0.15 | ||
@@ -4,0 +9,0 @@ |
@@ -12,3 +12,3 @@ { | ||
], | ||
"version": "3.0.15", | ||
"version": "3.0.16", | ||
"author": "Igor Balos", | ||
@@ -68,3 +68,3 @@ "contributors": [ | ||
"@types/mocha": "^5.2.5", | ||
"@types/nconf": "0.0.37", | ||
"@types/dotenv": "^4.0.3", | ||
"@types/node": "^4.0.29", | ||
@@ -74,5 +74,5 @@ "@types/sinon": "^7.5.0", | ||
"mocha": "5.2.0", | ||
"nconf": "^0.10.0", | ||
"dotenv": "^4.0.0", | ||
"sinon": "^7.5.0", | ||
"pre-commit": "1.2.2", | ||
"sinon": "^7.5.0", | ||
"ts-node": "^7.0.1", | ||
@@ -79,0 +79,0 @@ "tslint": "^6.1.3", |
@@ -5,8 +5,7 @@ import * as postmark from "../../src/index"; | ||
import "mocha"; | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
import * as nconf from "nconf"; | ||
const testingKeys = nconf.env().file({ file: __dirname + "/../../testing_keys.json" }); | ||
describe("Bounce", () => { | ||
const serverToken: string = testingKeys.get("SERVER_API_TOKEN"); | ||
const serverToken: any = process.env.SERVER_API_TOKEN; | ||
const client = new postmark.ServerClient(serverToken); | ||
@@ -13,0 +12,0 @@ |
@@ -6,7 +6,7 @@ import * as postmark from "../../src/index"; | ||
import * as nconf from "nconf"; | ||
const testingKeys = nconf.env().file({ file: __dirname + "/../../testing_keys.json" }); | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
describe("Client - Click Statistics", () => { | ||
const serverToken: string = testingKeys.get("SERVER_API_TOKEN"); | ||
const serverToken: any = process.env.SERVER_API_TOKEN; | ||
const client = new postmark.ServerClient(serverToken); | ||
@@ -13,0 +13,0 @@ |
@@ -7,9 +7,9 @@ import * as postmark from "../../src/index"; | ||
import * as nconf from "nconf"; | ||
const testingKeys = nconf.env().file({ file: __dirname + "/../../testing_keys.json" }); | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
describe("Client - Domains", () => { | ||
const accountToken: string = testingKeys.get("ACCOUNT_API_TOKEN"); | ||
const accountToken: any = process.env.ACCOUNT_API_TOKEN | ||
const client = new postmark.AccountClient(accountToken); | ||
const domainName: string = testingKeys.get("DOMAIN_NAME"); | ||
const domainName: string = process.env.DOMAIN_NAME || ""; | ||
@@ -16,0 +16,0 @@ function returnPathToTest(domainNameForReturnPath: string) { |
@@ -7,7 +7,7 @@ import * as postmark from "../../src/index"; | ||
import * as nconf from "nconf"; | ||
const testingKeys = nconf.env().file({ file: __dirname + "/../../testing_keys.json" }); | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
describe("Client - Message Statistics", () => { | ||
const serverToken: string = testingKeys.get("SERVER_API_TOKEN"); | ||
const serverToken: any = process.env.SERVER_API_TOKEN; | ||
const client = new postmark.ServerClient(serverToken); | ||
@@ -14,0 +14,0 @@ const filter = new OutboundMessagesFilteringParameters(1, 0); |
@@ -6,7 +6,7 @@ import * as postmark from "../../src/index"; | ||
import * as nconf from "nconf"; | ||
const testingKeys = nconf.env().file({ file: __dirname + "/../../testing_keys.json" }); | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
describe("Client - Message Statistics", () => { | ||
const serverToken: string = testingKeys.get("SERVER_API_TOKEN"); | ||
const serverToken: any = process.env.SERVER_API_TOKEN | ||
const client = new postmark.ServerClient(serverToken); | ||
@@ -13,0 +13,0 @@ |
@@ -6,7 +6,7 @@ import * as postmark from "../../src/index"; | ||
import * as nconf from "nconf"; | ||
const testingKeys = nconf.env().file({ file: __dirname + "/../../testing_keys.json" }); | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
describe("Client - Message Statistics", () => { | ||
const serverToken: string = testingKeys.get("SERVER_API_TOKEN"); | ||
const serverToken: any = process.env.SERVER_API_TOKEN | ||
const client = new postmark.ServerClient(serverToken); | ||
@@ -13,0 +13,0 @@ |
@@ -6,8 +6,8 @@ import { expect } from "chai"; | ||
import * as nconf from "nconf"; | ||
const testingKeys = nconf.env().file({ file: __dirname + "/../../testing_keys.json" }); | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
describe("Servers - Message Streams", () => { | ||
const serverNamePrefix: string = "node-js-test-message-streams"; | ||
const accountToken: string = testingKeys.get("ACCOUNT_API_TOKEN"); | ||
const accountToken: any = process.env.ACCOUNT_API_TOKEN; | ||
const accountClient = new postmark.AccountClient(accountToken); | ||
@@ -14,0 +14,0 @@ |
@@ -6,11 +6,11 @@ import * as postmark from "../../src/index"; | ||
import * as nconf from "nconf"; | ||
const testingKeys = nconf.env().file({ file: __dirname + "/../../testing_keys.json" }); | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
describe("Sending", () => { | ||
const serverToken: string = testingKeys.get("SERVER_API_TOKEN"); | ||
const serverToken: any = process.env.SERVER_API_TOKEN; | ||
const client = new postmark.ServerClient(serverToken); | ||
const fromAddress: string = testingKeys.get("SENDER_EMAIL_ADDRESS"); | ||
const toAddress: string = testingKeys.get("RECIPIENT_EMAIL_ADDRESS"); | ||
const fromAddress: any = process.env.SENDER_EMAIL_ADDRESS; | ||
const toAddress: any = process.env.RECIPIENT_EMAIL_ADDRESS; | ||
@@ -17,0 +17,0 @@ function messageToSend() { |
@@ -6,7 +6,7 @@ import * as postmark from "../../src/index"; | ||
import * as nconf from "nconf"; | ||
const testingKeys = nconf.env().file({ file: __dirname + "/../../testing_keys.json" }); | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
describe("Server", () => { | ||
const serverToken: string = testingKeys.get("SERVER_API_TOKEN"); | ||
const serverToken: any = process.env.SERVER_API_TOKEN; | ||
const client: postmark.ServerClient = new postmark.ServerClient(serverToken); | ||
@@ -13,0 +13,0 @@ |
import {expect} from "chai"; | ||
import "mocha"; | ||
import * as nconf from "nconf"; | ||
import {CreateServerRequest, ServerDeliveryTypes, UpdateServerRequest} from "../../src/client/models"; | ||
import * as postmark from "../../src/index"; | ||
const testingKeys = nconf.env().file({ file: __dirname + "/../../testing_keys.json" }); | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
describe("Servers", () => { | ||
const accountToken: string = testingKeys.get("ACCOUNT_API_TOKEN"); | ||
const accountToken: any = process.env.ACCOUNT_API_TOKEN; | ||
const client = new postmark.AccountClient(accountToken); | ||
@@ -13,0 +13,0 @@ const serverNamePrefix: string = "node-js-test-server"; |
@@ -6,8 +6,8 @@ import { expect } from "chai"; | ||
import * as nconf from "nconf"; | ||
const testingKeys = nconf.env().file({ file: __dirname + "/../../testing_keys.json" }); | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
describe("Client - Signatures", () => { | ||
const accountToken: string = testingKeys.get("ACCOUNT_API_TOKEN"); | ||
const testDomainName: string = testingKeys.get("DOMAIN_NAME"); | ||
const accountToken: any = process.env.ACCOUNT_API_TOKEN; | ||
const testDomainName: any = process.env.DOMAIN_NAME; | ||
const client: postmark.AccountClient = new postmark.AccountClient(accountToken); | ||
@@ -14,0 +14,0 @@ const domainName: string = testDomainName; |
@@ -6,8 +6,8 @@ import * as postmark from "../../src/index"; | ||
import * as nconf from "nconf"; | ||
import {Suppression, Suppressions, SuppressionStatuses} from "../../src/client/models"; | ||
const testingKeys = nconf.env().file({ file: __dirname + "/../../testing_keys.json" }); | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
describe("Client - Suppressions", () => { | ||
const serverToken: string = testingKeys.get("SERVER_API_TOKEN"); | ||
const serverToken: any = process.env.SERVER_API_TOKEN; | ||
const client = new postmark.ServerClient(serverToken); | ||
@@ -14,0 +14,0 @@ const suppression_email_domain:string = 'supression.example.com'; |
@@ -7,8 +7,8 @@ import * as postmark from "../../src/index"; | ||
import * as nconf from "nconf"; | ||
const testingKeys = nconf.env().file({ file: __dirname + "/../../testing_keys.json" }); | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
describe("Client - Templates", () => { | ||
const serverToken: string = testingKeys.get("SERVER_API_TOKEN"); | ||
const accountToken: string = testingKeys.get("ACCOUNT_API_TOKEN"); | ||
const serverToken: any = process.env.SERVER_API_TOKEN; | ||
const accountToken: any = process.env.ACCOUNT_API_TOKEN; | ||
const client = new postmark.ServerClient(serverToken); | ||
@@ -146,4 +146,4 @@ const accountClient = new postmark.AccountClient(accountToken); | ||
describe("sending", () => { | ||
const fromAddress = testingKeys.get("SENDER_EMAIL_ADDRESS"); | ||
const toAddress = testingKeys.get("RECIPIENT_EMAIL_ADDRESS"); | ||
const fromAddress: any = process.env.SENDER_EMAIL_ADDRESS; | ||
const toAddress: any = process.env.RECIPIENT_EMAIL_ADDRESS; | ||
@@ -150,0 +150,0 @@ it("sendEmailWithTemplate", async () => { |
@@ -6,7 +6,7 @@ import { expect } from "chai"; | ||
import * as nconf from "nconf"; | ||
const testingKeys = nconf.env().file({ file: __dirname + "/../../testing_keys.json" }); | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
describe("Client - Triggers", () => { | ||
const serverToken: string = testingKeys.get("SERVER_API_TOKEN"); | ||
const serverToken: any = process.env.SERVER_API_TOKEN; | ||
const client = new postmark.ServerClient(serverToken); | ||
@@ -35,3 +35,3 @@ const triggerName: string = "node-js"; | ||
after(cleanup); | ||
it("createInboundRuleTrigger", async () => { | ||
@@ -38,0 +38,0 @@ const inboundRuleTriggerOptions = inboundRuleTriggerToTest(); |
@@ -6,7 +6,7 @@ import * as postmark from "../../src/index"; | ||
import * as nconf from "nconf"; | ||
const testingKeys = nconf.env().file({ file: __dirname + "/../../testing_keys.json" }); | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
describe("Client - Webhooks", () => { | ||
const serverToken: string = testingKeys.get("SERVER_API_TOKEN"); | ||
const serverToken: any = process.env.SERVER_API_TOKEN; | ||
const client = new postmark.ServerClient(serverToken); | ||
@@ -13,0 +13,0 @@ |
@@ -6,6 +6,6 @@ import * as postmark from "../../src/index"; | ||
import * as nconf from "nconf"; | ||
import * as sinon from "sinon"; | ||
import {InternalServerError} from "../../src/client/errors/Errors"; | ||
const testingKeys = nconf.env().file({ file: __dirname + "/../../testing_keys.json" }); | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
@@ -17,4 +17,4 @@ const packageJson = require("../../package.json"); | ||
let client: postmark.AccountClient; | ||
const accountToken: string = testingKeys.get("ACCOUNT_API_TOKEN"); | ||
const serverToken: string = testingKeys.get("SERVER_API_TOKEN"); | ||
const accountToken: any = process.env.ACCOUNT_API_TOKEN; | ||
const serverToken: any = process.env.SERVER_API_TOKEN; | ||
@@ -21,0 +21,0 @@ beforeEach(() => { |
@@ -6,7 +6,7 @@ import * as postmark from "../../src/index"; | ||
import * as nconf from "nconf"; | ||
const testingKeys = nconf.env().file({ file: __dirname + "/../../testing_keys.json" }); | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
describe("Clients initialization", () => { | ||
const serverToken: string = testingKeys.get("SERVER_API_TOKEN"); | ||
const serverToken: any = process.env.SERVER_API_TOKEN; | ||
@@ -13,0 +13,0 @@ it("#new ServerClient", () => { |
@@ -6,4 +6,4 @@ import * as postmark from "../../src/index"; | ||
import * as nconf from "nconf"; | ||
const testingKeys = nconf.env().file({file: __dirname + "/../../testing_keys.json"}); | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
@@ -17,3 +17,3 @@ const packageJson = require("../../package.json"); | ||
let client: postmark.ServerClient; | ||
const serverToken: string = testingKeys.get("SERVER_API_TOKEN"); | ||
const serverToken: any = process.env.SERVER_API_TOKEN; | ||
@@ -20,0 +20,0 @@ beforeEach(() => { |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance 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
313109
1