@contrail/flexplm 3.0.0 → 3.0.1-alpha.fb6f416
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/index.d.ts +0 -1
- package/lib/index.js +0 -1
- package/package.json +1 -2
- package/lib/flexplm-request.d.ts +0 -3
- package/lib/flexplm-request.js +0 -34
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./flexplm-request"), exports);
|
|
18
17
|
__exportStar(require("./flexplm-utils"), exports);
|
|
19
18
|
__exportStar(require("./util/config-defaults"), exports);
|
|
20
19
|
__exportStar(require("./util/data-converter"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrail/flexplm",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1-alpha.fb6f416",
|
|
4
4
|
"description": "Library used for integration with flexplm.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -66,7 +66,6 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@contrail/util": "^2.2.1",
|
|
69
|
-
"axios": "^1.4.0",
|
|
70
69
|
"p-limit": "^3.1.0"
|
|
71
70
|
},
|
|
72
71
|
"engines": {
|
package/lib/flexplm-request.d.ts
DELETED
package/lib/flexplm-request.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.FlexPLMRequest = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const BASE_URL = 'https://PP-2006031951wo.portal.ptc.io/Windchill/servlet/rest/cdee';
|
|
9
|
-
const BASE_CONFIG = {
|
|
10
|
-
method: 'POST',
|
|
11
|
-
headers: {
|
|
12
|
-
'Accept': 'application/json',
|
|
13
|
-
'Content-Type': 'application/json',
|
|
14
|
-
'CSRF_NONCE': '2OaLp+0dWNBtrkTwtdDC491zaacu6Hykvqi/lpl6bZgJ/QXBrK/B1J5FErMkmAmktr/I3thcbO1Xn3HJ7Ne/l9kpaedUmn7H75Xey4ZbNLsenW+anM3vxIZ7ELosk3k=',
|
|
15
|
-
'Authorization': 'Basic d2NhZG1pbjpSZXRhaWwyMDIwLQ==',
|
|
16
|
-
'Cookie': 'JSESSIONID=36D5B3C74C1F963C6C73E9AF5B6BDA78.tomcat1; JSESSIONID=B8090C802D8548EA773C97F5886FAB79.tomcat1',
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
class FlexPLMRequest {
|
|
20
|
-
static async request(path, data) {
|
|
21
|
-
const config = Object.assign({}, BASE_CONFIG);
|
|
22
|
-
config.url = BASE_URL + path;
|
|
23
|
-
config.data = data;
|
|
24
|
-
try {
|
|
25
|
-
const resp = await (0, axios_1.default)(config);
|
|
26
|
-
return Promise.resolve(resp.data);
|
|
27
|
-
}
|
|
28
|
-
catch (error) {
|
|
29
|
-
console.error(`${FlexPLMRequest} error: ${error.message}`);
|
|
30
|
-
return Promise.resolve(null);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.FlexPLMRequest = FlexPLMRequest;
|