@contrail/flexplm 1.0.1 → 1.0.3
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/flexplm-request.js +1 -1
- package/lib/index.js +6 -2
- package/package.json +2 -5
- package/lib/flexplm-utils.spec.d.ts +0 -1
- package/lib/flexplm-utils.spec.js +0 -35
package/lib/flexplm-request.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
8
12
|
}));
|
|
9
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
15
|
};
|
|
12
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
17
|
__exportStar(require("./flexplm-request"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrail/flexplm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Library used for integration with flexplm.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -13,9 +13,6 @@
|
|
|
13
13
|
"keywords": [],
|
|
14
14
|
"author": "",
|
|
15
15
|
"license": "ISC",
|
|
16
|
-
"files": [
|
|
17
|
-
"lib/**/*"
|
|
18
|
-
],
|
|
19
16
|
"devDependencies": {
|
|
20
17
|
"@types/jest": "^23.3.14",
|
|
21
18
|
"jest": "^23.6.0",
|
|
@@ -23,7 +20,7 @@
|
|
|
23
20
|
"ts-jest": "^23.10.5",
|
|
24
21
|
"tslint": "^5.11.0",
|
|
25
22
|
"tslint-config-prettier": "^1.18.0",
|
|
26
|
-
"typescript": "^
|
|
23
|
+
"typescript": "^4.0.0"
|
|
27
24
|
},
|
|
28
25
|
"jest": {
|
|
29
26
|
"moduleFileExtensions": [
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const flexplm_utils_1 = require("./flexplm-utils");
|
|
13
|
-
describe('Types Controller', () => {
|
|
14
|
-
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
-
}));
|
|
16
|
-
it('should convert a type path', () => {
|
|
17
|
-
expect(flexplm_utils_1.FlexPLMUtils.convertTypePath('Product')).toEqual('product');
|
|
18
|
-
expect(flexplm_utils_1.FlexPLMUtils.convertTypePath('Product\\Apparel')).toEqual('product:apparel');
|
|
19
|
-
expect(flexplm_utils_1.FlexPLMUtils.convertTypePath('Product\\Skin Care')).toEqual('product:skin_care');
|
|
20
|
-
expect(flexplm_utils_1.FlexPLMUtils.convertTypePath('Product\\Apparel\\Shirt')).toEqual('product:apparel:shirt');
|
|
21
|
-
expect(flexplm_utils_1.FlexPLMUtils.convertTypePath('Product\\Apparel\\[Shirt]')).toEqual('product:apparel:*shirt*');
|
|
22
|
-
expect(flexplm_utils_1.FlexPLMUtils.convertTypePath('')).toBeNull();
|
|
23
|
-
});
|
|
24
|
-
it('should compute level in tree', () => {
|
|
25
|
-
expect(flexplm_utils_1.FlexPLMUtils.computeLevelFromPath('product')).toEqual(1);
|
|
26
|
-
expect(flexplm_utils_1.FlexPLMUtils.computeLevelFromPath('product:apparel')).toEqual(2);
|
|
27
|
-
expect(flexplm_utils_1.FlexPLMUtils.computeLevelFromPath('product:apparel:dress:mini')).toEqual(4);
|
|
28
|
-
});
|
|
29
|
-
it('should get a parent type path', () => {
|
|
30
|
-
expect(flexplm_utils_1.FlexPLMUtils.getParentTypePath('product')).toBeNull();
|
|
31
|
-
expect(flexplm_utils_1.FlexPLMUtils.getParentTypePath('product:apparel')).toEqual('product');
|
|
32
|
-
expect(flexplm_utils_1.FlexPLMUtils.getParentTypePath('product:apparel:stuff')).toEqual('product:apparel');
|
|
33
|
-
expect(flexplm_utils_1.FlexPLMUtils.getParentTypePath('Product\\Apparel')).toEqual('product');
|
|
34
|
-
});
|
|
35
|
-
});
|