ensend 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +6 -2
- package/package.json +3 -2
package/dist/client.js
CHANGED
|
@@ -2,8 +2,12 @@ import fetch from "node-fetch-native";
|
|
|
2
2
|
import { SendApi } from "./apis/SendApi";
|
|
3
3
|
export class Client {
|
|
4
4
|
constructor(options) {
|
|
5
|
-
this.ENSEND_BASE_URL = process
|
|
6
|
-
|
|
5
|
+
this.ENSEND_BASE_URL = typeof process !== "undefined"
|
|
6
|
+
? process.env.ENSEND_BASE_URL
|
|
7
|
+
: "https://api.ensend.co";
|
|
8
|
+
this.PROJECT_SECRET = typeof process !== "undefined"
|
|
9
|
+
? process?.env?.ENSEND_PROJECT_SECRET
|
|
10
|
+
: undefined;
|
|
7
11
|
this.http = async (options) => {
|
|
8
12
|
let data = null;
|
|
9
13
|
let error = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ensend",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.02",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Official Typescript/Javascript SDK for the new Ensend API. See completed documentation at https://docs.ensend.co",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"typecheck": "tsc --noEmit",
|
|
17
|
-
"build": "tsc"
|
|
17
|
+
"build": "tsc",
|
|
18
|
+
"prepublishOnly": "bun run build"
|
|
18
19
|
},
|
|
19
20
|
"keywords": [
|
|
20
21
|
"Email",
|