@workos-inc/node 6.0.0-rc.1 → 6.0.0
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/lib/workos.js +5 -3
- package/package.json +1 -2
package/lib/workos.js
CHANGED
|
@@ -24,7 +24,7 @@ const audit_logs_1 = require("./audit-logs/audit-logs");
|
|
|
24
24
|
const user_management_1 = require("./user-management/user-management");
|
|
25
25
|
const bad_request_exception_1 = require("./common/exceptions/bad-request.exception");
|
|
26
26
|
const fetch_client_1 = require("./common/utils/fetch-client");
|
|
27
|
-
const VERSION = '6.0.0
|
|
27
|
+
const VERSION = '6.0.0';
|
|
28
28
|
const DEFAULT_HOSTNAME = 'api.workos.com';
|
|
29
29
|
class WorkOS {
|
|
30
30
|
constructor(key, options = {}) {
|
|
@@ -43,7 +43,8 @@ class WorkOS {
|
|
|
43
43
|
this.events = new events_1.Events(this);
|
|
44
44
|
this.userManagement = new user_management_1.UserManagement(this);
|
|
45
45
|
if (!key) {
|
|
46
|
-
|
|
46
|
+
// process might be undefined in some environments
|
|
47
|
+
this.key = process === null || process === void 0 ? void 0 : process.env.WORKOS_API_KEY;
|
|
47
48
|
if (!this.key) {
|
|
48
49
|
throw new exceptions_1.NoApiKeyProvidedException();
|
|
49
50
|
}
|
|
@@ -130,7 +131,8 @@ class WorkOS {
|
|
|
130
131
|
});
|
|
131
132
|
}
|
|
132
133
|
emitWarning(warning) {
|
|
133
|
-
|
|
134
|
+
// process might be undefined in some environments
|
|
135
|
+
if (typeof (process === null || process === void 0 ? void 0 : process.emitWarning) !== 'function') {
|
|
134
136
|
// tslint:disable:no-console
|
|
135
137
|
return console.warn(`WorkOS: ${warning}`);
|
|
136
138
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "6.0.0
|
|
2
|
+
"version": "6.0.0",
|
|
3
3
|
"name": "@workos-inc/node",
|
|
4
4
|
"author": "WorkOS",
|
|
5
5
|
"description": "A Node wrapper for the WorkOS API",
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
"@types/jest": "29.5.3",
|
|
42
42
|
"@types/node": "14.18.54",
|
|
43
43
|
"@types/pluralize": "0.0.30",
|
|
44
|
-
"axios-mock-adapter": "1.21.5",
|
|
45
44
|
"jest": "29.6.2",
|
|
46
45
|
"jest-fetch-mock": "^3.0.3",
|
|
47
46
|
"prettier": "2.8.8",
|