ibm-cloud-sdk-core 2.4.1 → 2.4.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/CHANGELOG.md +7 -0
- package/auth/authenticators/authenticator.js +1 -0
- package/auth/authenticators/basic-authenticator.js +1 -0
- package/auth/authenticators/bearer-token-authenticator.js +1 -0
- package/auth/authenticators/cloud-pak-for-data-authenticator.js +1 -0
- package/auth/authenticators/iam-authenticator.js +1 -0
- package/auth/authenticators/index.js +7 -7
- package/auth/authenticators/no-auth-authenticator.js +1 -0
- package/auth/authenticators/token-request-based-authenticator.js +1 -0
- package/auth/index.js +13 -6
- package/auth/token-managers/cp4d-token-manager.js +1 -0
- package/auth/token-managers/iam-token-manager.js +1 -0
- package/auth/token-managers/index.js +4 -4
- package/auth/token-managers/jwt-token-manager.js +1 -0
- package/auth/token-managers/token-manager.js +1 -0
- package/auth/utils/get-authenticator-from-environment.js +1 -0
- package/auth/utils/helpers.js +1 -0
- package/auth/utils/index.js +14 -7
- package/auth/utils/read-credentials-file.browser.js +1 -0
- package/auth/utils/read-credentials-file.js +1 -0
- package/auth/utils/read-external-sources.js +1 -0
- package/index.d.ts +2 -1
- package/index.js +19 -10
- package/lib/base-service.js +1 -0
- package/lib/helper.js +1 -0
- package/lib/request-wrapper.js +1 -0
- package/{test/utils/unit-test-helpers.d.ts → lib/sdk-test-helpers.d.ts} +1 -4
- package/{test/utils/unit-test-helpers.js → lib/sdk-test-helpers.js} +3 -5
- package/lib/stream-to-promise.js +1 -0
- package/package.json +5 -5
- package/test/utils/index.d.ts +0 -17
- package/test/utils/index.js +0 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [2.4.2](https://github.com/IBM/node-sdk-core/compare/v2.4.1...v2.4.2) (2020-07-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* move test utilities to lib/ and rely directly on `expect` ([#101](https://github.com/IBM/node-sdk-core/issues/101)) ([57ca4c2](https://github.com/IBM/node-sdk-core/commit/57ca4c2edba31a39bae479a041b974ffd94f31a3))
|
|
7
|
+
|
|
1
8
|
## [2.4.1](https://github.com/IBM/node-sdk-core/compare/v2.4.0...v2.4.1) (2020-05-14)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.Authenticator = void 0;
|
|
18
19
|
/**
|
|
19
20
|
* Base Authenticator class for other Authenticators to extend. Not intended
|
|
20
21
|
* to be used as a stand-alone authenticator.
|
|
@@ -28,6 +28,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
28
28
|
};
|
|
29
29
|
})();
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.BasicAuthenticator = void 0;
|
|
31
32
|
var extend = require("extend");
|
|
32
33
|
var utils_1 = require("../utils");
|
|
33
34
|
var authenticator_1 = require("./authenticator");
|
|
@@ -28,6 +28,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
28
28
|
};
|
|
29
29
|
})();
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.BearerTokenAuthenticator = void 0;
|
|
31
32
|
var extend = require("extend");
|
|
32
33
|
var utils_1 = require("../utils");
|
|
33
34
|
var authenticator_1 = require("./authenticator");
|
|
@@ -28,6 +28,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
28
28
|
};
|
|
29
29
|
})();
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.CloudPakForDataAuthenticator = void 0;
|
|
31
32
|
var token_managers_1 = require("../token-managers");
|
|
32
33
|
var utils_1 = require("../utils");
|
|
33
34
|
var token_request_based_authenticator_1 = require("./token-request-based-authenticator");
|
|
@@ -28,6 +28,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
28
28
|
};
|
|
29
29
|
})();
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.IamAuthenticator = void 0;
|
|
31
32
|
var token_managers_1 = require("../token-managers");
|
|
32
33
|
var utils_1 = require("../utils");
|
|
33
34
|
var token_request_based_authenticator_1 = require("./token-request-based-authenticator");
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
var authenticator_1 = require("./authenticator");
|
|
19
|
-
exports
|
|
19
|
+
Object.defineProperty(exports, "Authenticator", { enumerable: true, get: function () { return authenticator_1.Authenticator; } });
|
|
20
20
|
var basic_authenticator_1 = require("./basic-authenticator");
|
|
21
|
-
exports
|
|
21
|
+
Object.defineProperty(exports, "BasicAuthenticator", { enumerable: true, get: function () { return basic_authenticator_1.BasicAuthenticator; } });
|
|
22
22
|
var bearer_token_authenticator_1 = require("./bearer-token-authenticator");
|
|
23
|
-
exports
|
|
23
|
+
Object.defineProperty(exports, "BearerTokenAuthenticator", { enumerable: true, get: function () { return bearer_token_authenticator_1.BearerTokenAuthenticator; } });
|
|
24
24
|
var cloud_pak_for_data_authenticator_1 = require("./cloud-pak-for-data-authenticator");
|
|
25
|
-
exports
|
|
25
|
+
Object.defineProperty(exports, "CloudPakForDataAuthenticator", { enumerable: true, get: function () { return cloud_pak_for_data_authenticator_1.CloudPakForDataAuthenticator; } });
|
|
26
26
|
var iam_authenticator_1 = require("./iam-authenticator");
|
|
27
|
-
exports
|
|
27
|
+
Object.defineProperty(exports, "IamAuthenticator", { enumerable: true, get: function () { return iam_authenticator_1.IamAuthenticator; } });
|
|
28
28
|
var no_auth_authenticator_1 = require("./no-auth-authenticator");
|
|
29
|
-
exports
|
|
29
|
+
Object.defineProperty(exports, "NoAuthAuthenticator", { enumerable: true, get: function () { return no_auth_authenticator_1.NoAuthAuthenticator; } });
|
|
30
30
|
var token_request_based_authenticator_1 = require("./token-request-based-authenticator");
|
|
31
|
-
exports
|
|
31
|
+
Object.defineProperty(exports, "TokenRequestBasedAuthenticator", { enumerable: true, get: function () { return token_request_based_authenticator_1.TokenRequestBasedAuthenticator; } });
|
|
@@ -28,6 +28,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
28
28
|
};
|
|
29
29
|
})();
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.NoAuthAuthenticator = void 0;
|
|
31
32
|
var authenticator_1 = require("./authenticator");
|
|
32
33
|
/**
|
|
33
34
|
* NoAuthAuthenticator is a placeholder authenticator implementation which
|
|
@@ -28,6 +28,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
28
28
|
};
|
|
29
29
|
})();
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.TokenRequestBasedAuthenticator = void 0;
|
|
31
32
|
var extend = require("extend");
|
|
32
33
|
var token_managers_1 = require("../token-managers");
|
|
33
34
|
var authenticator_1 = require("./authenticator");
|
package/auth/index.js
CHANGED
|
@@ -14,10 +14,17 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
}
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
26
|
+
};
|
|
20
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
__exportStar(require("./authenticators"), exports);
|
|
29
|
+
__exportStar(require("./token-managers"), exports);
|
|
30
|
+
__exportStar(require("./utils"), exports);
|
|
@@ -28,6 +28,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
28
28
|
};
|
|
29
29
|
})();
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.Cp4dTokenManager = void 0;
|
|
31
32
|
var extend = require("extend");
|
|
32
33
|
var utils_1 = require("../utils");
|
|
33
34
|
var jwt_token_manager_1 = require("./jwt-token-manager");
|
|
@@ -28,6 +28,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
28
28
|
};
|
|
29
29
|
})();
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.IamTokenManager = void 0;
|
|
31
32
|
var extend = require("extend");
|
|
32
33
|
var logger_1 = require("../../lib/logger");
|
|
33
34
|
var utils_1 = require("../utils");
|
|
@@ -31,10 +31,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
31
31
|
* JwtTokenManager: A class for shared functionality for parsing, storing, and requesting JWT tokens.
|
|
32
32
|
*/
|
|
33
33
|
var iam_token_manager_1 = require("./iam-token-manager");
|
|
34
|
-
exports
|
|
34
|
+
Object.defineProperty(exports, "IamTokenManager", { enumerable: true, get: function () { return iam_token_manager_1.IamTokenManager; } });
|
|
35
35
|
var cp4d_token_manager_1 = require("./cp4d-token-manager");
|
|
36
|
-
exports
|
|
36
|
+
Object.defineProperty(exports, "Cp4dTokenManager", { enumerable: true, get: function () { return cp4d_token_manager_1.Cp4dTokenManager; } });
|
|
37
37
|
var jwt_token_manager_1 = require("./jwt-token-manager");
|
|
38
|
-
exports
|
|
38
|
+
Object.defineProperty(exports, "JwtTokenManager", { enumerable: true, get: function () { return jwt_token_manager_1.JwtTokenManager; } });
|
|
39
39
|
var token_manager_1 = require("./token-manager");
|
|
40
|
-
exports
|
|
40
|
+
Object.defineProperty(exports, "TokenManager", { enumerable: true, get: function () { return token_manager_1.TokenManager; } });
|
|
@@ -28,6 +28,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
28
28
|
};
|
|
29
29
|
})();
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.JwtTokenManager = void 0;
|
|
31
32
|
var extend = require("extend");
|
|
32
33
|
var jwt = require("jsonwebtoken");
|
|
33
34
|
var logger_1 = require("../../lib/logger");
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.TokenManager = void 0;
|
|
18
19
|
var helper_1 = require("../../lib/helper");
|
|
19
20
|
var logger_1 = require("../../lib/logger");
|
|
20
21
|
var request_wrapper_1 = require("../../lib/request-wrapper");
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.getAuthenticatorFromEnvironment = void 0;
|
|
18
19
|
var authenticators_1 = require("../authenticators");
|
|
19
20
|
var read_external_sources_1 = require("./read-external-sources");
|
|
20
21
|
/**
|
package/auth/utils/helpers.js
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.getCurrentTime = exports.validateInput = exports.checkCredentials = exports.computeBasicAuthHeader = void 0;
|
|
18
19
|
var helper_1 = require("../../lib/helper");
|
|
19
20
|
/**
|
|
20
21
|
* Compute and return a Basic Authorization header from a username and password.
|
package/auth/utils/index.js
CHANGED
|
@@ -14,9 +14,16 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
}
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
26
|
+
};
|
|
20
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
28
|
/**
|
|
22
29
|
* @module utils
|
|
@@ -26,9 +33,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
33
|
* getAuthenticatorFromEnvironment: Get authenticator from external sources.
|
|
27
34
|
* readExternalSources: Get config object from external sources.
|
|
28
35
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
36
|
+
__exportStar(require("./helpers"), exports);
|
|
37
|
+
__exportStar(require("./read-credentials-file"), exports);
|
|
31
38
|
var get_authenticator_from_environment_1 = require("./get-authenticator-from-environment");
|
|
32
|
-
exports
|
|
39
|
+
Object.defineProperty(exports, "getAuthenticatorFromEnvironment", { enumerable: true, get: function () { return get_authenticator_from_environment_1.getAuthenticatorFromEnvironment; } });
|
|
33
40
|
var read_external_sources_1 = require("./read-external-sources");
|
|
34
|
-
exports
|
|
41
|
+
Object.defineProperty(exports, "readExternalSources", { enumerable: true, get: function () { return read_external_sources_1.readExternalSources; } });
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.readExternalSources = void 0;
|
|
18
19
|
var camelcase = require("camelcase");
|
|
19
20
|
var isEmpty = require("lodash.isempty");
|
|
20
21
|
var logger_1 = require("../../lib/logger");
|
package/index.d.ts
CHANGED
|
@@ -22,4 +22,5 @@ export * from './lib/helper';
|
|
|
22
22
|
export { default as qs } from './lib/querystring';
|
|
23
23
|
export { default as contentType } from './lib/content-type';
|
|
24
24
|
export * from './lib/stream-to-promise';
|
|
25
|
-
|
|
25
|
+
import * as unitTestUtils from './lib/sdk-test-helpers';
|
|
26
|
+
export { unitTestUtils };
|
package/index.js
CHANGED
|
@@ -14,20 +14,29 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
}
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
26
|
+
};
|
|
20
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.unitTestUtils = void 0;
|
|
21
29
|
/**
|
|
22
30
|
* @module ibm-cloud-sdk-core
|
|
23
31
|
*/
|
|
24
32
|
var base_service_1 = require("./lib/base-service");
|
|
25
|
-
exports
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
Object.defineProperty(exports, "BaseService", { enumerable: true, get: function () { return base_service_1.BaseService; } });
|
|
34
|
+
__exportStar(require("./auth"), exports);
|
|
35
|
+
__exportStar(require("./lib/helper"), exports);
|
|
28
36
|
var querystring_1 = require("./lib/querystring");
|
|
29
|
-
exports
|
|
37
|
+
Object.defineProperty(exports, "qs", { enumerable: true, get: function () { return querystring_1.default; } });
|
|
30
38
|
var content_type_1 = require("./lib/content-type");
|
|
31
|
-
exports
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
Object.defineProperty(exports, "contentType", { enumerable: true, get: function () { return content_type_1.default; } });
|
|
40
|
+
__exportStar(require("./lib/stream-to-promise"), exports);
|
|
41
|
+
var unitTestUtils = require("./lib/sdk-test-helpers");
|
|
42
|
+
exports.unitTestUtils = unitTestUtils;
|
package/lib/base-service.js
CHANGED
package/lib/helper.js
CHANGED
|
@@ -22,6 +22,7 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
|
22
22
|
return r;
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.toLowerKeys = exports.buildRequestFileObject = exports.getFormat = exports.isHTML = exports.getMissingParams = exports.stripTrailingSlash = exports.getContentType = exports.isEmptyObject = exports.isFileData = exports.isFileWithMetadata = void 0;
|
|
25
26
|
var extend = require("extend");
|
|
26
27
|
var fileType = require("file-type");
|
|
27
28
|
var isstream_1 = require("isstream");
|
package/lib/request-wrapper.js
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.RequestWrapper = void 0;
|
|
18
19
|
var axios_1 = require("axios");
|
|
19
20
|
var axios_cookiejar_support_1 = require("axios-cookiejar-support");
|
|
20
21
|
var extend = require("extend");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2019 IBM Corp. All Rights Reserved.
|
|
2
|
+
* Copyright 2019, 2020 IBM Corp. All Rights Reserved.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -17,9 +17,6 @@
|
|
|
17
17
|
* This module provides a set of helper methods used to reduce code duplication in the generated unit tests
|
|
18
18
|
* for the SDKs that depend on this core package. Note that these methods are not used by the tests for this
|
|
19
19
|
* package - they are meant to be exported and made available to dependent libraries.
|
|
20
|
-
*
|
|
21
|
-
* They are included in the `test` directory since they rely on `jest` globals (like `expect`) and this
|
|
22
|
-
* requires special linting rules that should not be configured in the rest of the source code.
|
|
23
20
|
*/
|
|
24
21
|
/**
|
|
25
22
|
* Takes the request options constructed by the SDK and checks that the `url` and `method` properties
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright 2019 IBM Corp. All Rights Reserved.
|
|
3
|
+
* Copyright 2019, 2020 IBM Corp. All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -15,14 +15,12 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
|
|
18
|
+
exports.expectToBePromise = exports.getOptions = exports.checkForSuccessfulExecution = exports.checkUserHeader = exports.checkMediaHeaders = exports.checkUrlAndMethod = void 0;
|
|
19
|
+
var expect = require("expect");
|
|
19
20
|
/**
|
|
20
21
|
* This module provides a set of helper methods used to reduce code duplication in the generated unit tests
|
|
21
22
|
* for the SDKs that depend on this core package. Note that these methods are not used by the tests for this
|
|
22
23
|
* package - they are meant to be exported and made available to dependent libraries.
|
|
23
|
-
*
|
|
24
|
-
* They are included in the `test` directory since they rely on `jest` globals (like `expect`) and this
|
|
25
|
-
* requires special linting rules that should not be configured in the rest of the source code.
|
|
26
24
|
*/
|
|
27
25
|
/**
|
|
28
26
|
* Takes the request options constructed by the SDK and checks that the `url` and `method` properties
|
package/lib/stream-to-promise.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.streamToPromise = void 0;
|
|
3
4
|
/**
|
|
4
5
|
* Helper method that can be bound to a stream - it sets the output to utf-8, captures all of the results, and returns a promise that resolves to the final text
|
|
5
6
|
* Essentially a smaller version of concat-stream wrapped in a promise
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ibm-cloud-sdk-core",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2",
|
|
4
4
|
"description": "Core functionality to support SDKs generated with IBM's OpenAPI 3 SDK Generator.",
|
|
5
5
|
"main": "index",
|
|
6
6
|
"repository": {
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"@types/extend": "~3.0.0",
|
|
33
33
|
"@types/file-type": "~5.2.1",
|
|
34
34
|
"@types/isstream": "^0.1.0",
|
|
35
|
-
"@types/jest": "^24.0.23",
|
|
36
35
|
"@types/node": "~10.14.19",
|
|
37
|
-
"axios": "^0.18.
|
|
38
|
-
"axios-cookiejar-support": "^0.
|
|
36
|
+
"axios": "^0.18.1",
|
|
37
|
+
"axios-cookiejar-support": "^1.0.0",
|
|
39
38
|
"camelcase": "^5.3.1",
|
|
40
39
|
"debug": "^4.1.1",
|
|
41
40
|
"dotenv": "^6.2.0",
|
|
41
|
+
"expect": "^26.1.0",
|
|
42
42
|
"extend": "~3.0.2",
|
|
43
43
|
"file-type": "^7.7.1",
|
|
44
44
|
"form-data": "^2.3.3",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"object.omit": "~3.0.0",
|
|
50
50
|
"object.pick": "~1.3.0",
|
|
51
51
|
"semver": "^6.2.0",
|
|
52
|
-
"
|
|
52
|
+
"tough-cookie": "^4.0.0"
|
|
53
53
|
},
|
|
54
54
|
"browser": {
|
|
55
55
|
"./auth/utils/read-credentials-file": "./auth/utils/read-credentials-file.browser"
|
package/test/utils/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2019 IBM Corp. All Rights Reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import * as unitTestUtils from './unit-test-helpers';
|
|
17
|
-
export { unitTestUtils };
|
package/test/utils/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright 2019 IBM Corp. All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
/*
|
|
19
|
-
* The utility methods in this directory are not to assist in the testing
|
|
20
|
-
* of the core, but to assist with the testing of the SDKs that depend on
|
|
21
|
-
* this core library. Specifically, the unit tests generated by the
|
|
22
|
-
* IBM OpenAPI SDK Gen project rely on these methods.
|
|
23
|
-
*/
|
|
24
|
-
var unitTestUtils = require("./unit-test-helpers");
|
|
25
|
-
exports.unitTestUtils = unitTestUtils;
|