pulse-ts-sdk 0.0.60 → 0.0.61
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/cjs/BaseClient.js +2 -2
- package/dist/cjs/auth/HeaderAuthProvider.d.ts +1 -1
- package/dist/cjs/auth/HeaderAuthProvider.js +5 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/auth/HeaderAuthProvider.d.mts +1 -1
- package/dist/esm/auth/HeaderAuthProvider.mjs +5 -3
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "pulse-ts-sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "0.0.
|
|
47
|
-
"User-Agent": "pulse-ts-sdk/0.0.
|
|
46
|
+
"X-Fern-SDK-Version": "0.0.61",
|
|
47
|
+
"User-Agent": "pulse-ts-sdk/0.0.61",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -51,14 +51,16 @@ class HeaderAuthProvider {
|
|
|
51
51
|
this.headerValue = options.apiKey;
|
|
52
52
|
}
|
|
53
53
|
static canCreate(options) {
|
|
54
|
-
|
|
54
|
+
var _a;
|
|
55
|
+
return options.apiKey != null || ((_a = process.env) === null || _a === void 0 ? void 0 : _a.PULSE_API_KEY) != null;
|
|
55
56
|
}
|
|
56
57
|
getAuthRequest(_arg) {
|
|
57
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
|
|
59
|
+
var _a, _b;
|
|
60
|
+
const apiKey = (_a = (yield core.Supplier.get(this.headerValue))) !== null && _a !== void 0 ? _a : (_b = process.env) === null || _b === void 0 ? void 0 : _b.PULSE_API_KEY;
|
|
59
61
|
if (apiKey == null) {
|
|
60
62
|
throw new errors.PulseError({
|
|
61
|
-
message: "Please specify a apiKey by passing it in to the constructor",
|
|
63
|
+
message: "Please specify a apiKey by either passing it in to the constructor or initializing a PULSE_API_KEY environment variable",
|
|
62
64
|
});
|
|
63
65
|
}
|
|
64
66
|
const headerValue = apiKey;
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.61";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "pulse-ts-sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "0.0.
|
|
10
|
-
"User-Agent": "pulse-ts-sdk/0.0.
|
|
9
|
+
"X-Fern-SDK-Version": "0.0.61",
|
|
10
|
+
"User-Agent": "pulse-ts-sdk/0.0.61",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -15,14 +15,16 @@ export class HeaderAuthProvider {
|
|
|
15
15
|
this.headerValue = options.apiKey;
|
|
16
16
|
}
|
|
17
17
|
static canCreate(options) {
|
|
18
|
-
|
|
18
|
+
var _a;
|
|
19
|
+
return options.apiKey != null || ((_a = process.env) === null || _a === void 0 ? void 0 : _a.PULSE_API_KEY) != null;
|
|
19
20
|
}
|
|
20
21
|
getAuthRequest(_arg) {
|
|
21
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
|
|
23
|
+
var _a, _b;
|
|
24
|
+
const apiKey = (_a = (yield core.Supplier.get(this.headerValue))) !== null && _a !== void 0 ? _a : (_b = process.env) === null || _b === void 0 ? void 0 : _b.PULSE_API_KEY;
|
|
23
25
|
if (apiKey == null) {
|
|
24
26
|
throw new errors.PulseError({
|
|
25
|
-
message: "Please specify a apiKey by passing it in to the constructor",
|
|
27
|
+
message: "Please specify a apiKey by either passing it in to the constructor or initializing a PULSE_API_KEY environment variable",
|
|
26
28
|
});
|
|
27
29
|
}
|
|
28
30
|
const headerValue = apiKey;
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.61";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.
|
|
1
|
+
export const SDK_VERSION = "0.0.61";
|