@contrail/flexplm 1.3.0 → 1.3.1-alpha.585afc1
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/cli/commands/compile.d.ts +1 -0
- package/lib/cli/commands/compile.js +71 -0
- package/lib/cli/commands/compile.spec.d.ts +1 -0
- package/lib/cli/commands/compile.spec.js +80 -0
- package/lib/cli/commands/create.d.ts +1 -0
- package/lib/cli/commands/create.js +75 -0
- package/lib/cli/commands/create.spec.d.ts +1 -0
- package/lib/cli/commands/create.spec.js +78 -0
- package/lib/cli/commands/upload.d.ts +10 -0
- package/lib/cli/commands/upload.js +219 -0
- package/lib/cli/commands/upload.spec.d.ts +1 -0
- package/lib/cli/commands/upload.spec.js +88 -0
- package/lib/cli/index.d.ts +2 -0
- package/lib/cli/index.js +64 -0
- package/lib/cli/index.spec.d.ts +1 -0
- package/lib/cli/index.spec.js +79 -0
- package/lib/cli/template/mapping-template.ts.template +18 -0
- package/lib/entity-processor/base-entity-processor.d.ts +89 -42
- package/lib/entity-processor/base-entity-processor.js +438 -385
- package/lib/entity-processor/base-entity-processor.spec.d.ts +1 -1
- package/lib/entity-processor/base-entity-processor.spec.js +398 -397
- package/lib/flexplm-request.d.ts +3 -3
- package/lib/flexplm-request.js +34 -34
- package/lib/flexplm-utils.d.ts +5 -5
- package/lib/flexplm-utils.js +33 -33
- package/lib/flexplm-utils.spec.d.ts +1 -1
- package/lib/flexplm-utils.spec.js +26 -26
- package/lib/index.d.ts +23 -22
- package/lib/index.js +39 -38
- package/lib/interfaces/interfaces.d.ts +105 -105
- package/lib/interfaces/interfaces.js +2 -2
- package/lib/interfaces/item-family-changes.d.ts +20 -20
- package/lib/interfaces/item-family-changes.js +56 -56
- package/lib/interfaces/mapping-file.d.ts +429 -0
- package/lib/interfaces/mapping-file.js +2 -0
- package/lib/interfaces/publish-change-data.d.ts +19 -19
- package/lib/interfaces/publish-change-data.js +32 -32
- package/lib/publish/base-process-publish-assortment-callback.d.ts +9 -9
- package/lib/publish/base-process-publish-assortment-callback.js +38 -38
- package/lib/publish/base-process-publish-assortment.d.ts +118 -93
- package/lib/publish/base-process-publish-assortment.js +998 -944
- package/lib/publish/base-process-publish-assortment.spec.d.ts +1 -1
- package/lib/publish/base-process-publish-assortment.spec.js +1688 -1670
- package/lib/publish/mockData.d.ts +1389 -1389
- package/lib/publish/mockData.js +4524 -4519
- package/lib/transform/identifier-conversion-spec-mockData.js +472 -444
- package/lib/transform/identifier-conversion.d.ts +51 -15
- package/lib/transform/identifier-conversion.js +248 -212
- package/lib/transform/identifier-conversion.spec.d.ts +1 -1
- package/lib/transform/identifier-conversion.spec.js +343 -339
- package/lib/util/config-defaults.d.ts +8 -8
- package/lib/util/config-defaults.js +88 -85
- package/lib/util/config-defaults.spec.d.ts +1 -1
- package/lib/util/config-defaults.spec.js +302 -293
- package/lib/util/data-converter-spec-mockData.js +219 -205
- package/lib/util/data-converter.d.ts +136 -39
- package/lib/util/data-converter.js +718 -592
- package/lib/util/data-converter.spec.d.ts +1 -1
- package/lib/util/data-converter.spec.js +906 -904
- package/lib/util/error-response-object.d.ts +9 -4
- package/lib/util/error-response-object.js +54 -47
- package/lib/util/error-response-object.spec.d.ts +1 -1
- package/lib/util/error-response-object.spec.js +99 -99
- package/lib/util/event-short-message-status.d.ts +19 -19
- package/lib/util/event-short-message-status.js +24 -23
- package/lib/util/federation.d.ts +15 -15
- package/lib/util/federation.js +157 -149
- package/lib/util/flexplm-connect.d.ts +29 -22
- package/lib/util/flexplm-connect.js +190 -176
- package/lib/util/flexplm-connect.spec.d.ts +1 -1
- package/lib/util/flexplm-connect.spec.js +88 -88
- package/lib/util/logger-config.d.ts +1 -1
- package/lib/util/logger-config.js +27 -26
- package/lib/util/map-util-spec-mockData.js +219 -205
- package/lib/util/map-utils.d.ts +33 -6
- package/lib/util/map-utils.js +42 -15
- package/lib/util/map-utils.spec.d.ts +1 -1
- package/lib/util/map-utils.spec.js +89 -89
- package/lib/util/mockData.d.ts +80 -80
- package/lib/util/mockData.js +103 -103
- package/lib/util/thumbnail-util.d.ts +55 -34
- package/lib/util/thumbnail-util.js +242 -215
- package/lib/util/thumbnail-util.spec.d.ts +1 -1
- package/lib/util/thumbnail-util.spec.js +440 -434
- package/lib/util/type-conversion-utils-spec-mockData.js +259 -259
- package/lib/util/type-conversion-utils.d.ts +163 -23
- package/lib/util/type-conversion-utils.js +408 -265
- package/lib/util/type-conversion-utils.spec.d.ts +1 -1
- package/lib/util/type-conversion-utils.spec.js +868 -868
- package/lib/util/type-defaults.d.ts +74 -16
- package/lib/util/type-defaults.js +279 -221
- package/lib/util/type-defaults.spec.d.ts +1 -1
- package/lib/util/type-defaults.spec.js +516 -516
- package/lib/util/type-utils.d.ts +34 -13
- package/lib/util/type-utils.js +137 -114
- package/lib/util/type-utils.spec.d.ts +1 -1
- package/lib/util/type-utils.spec.js +192 -190
- package/package.json +21 -6
- package/scripts/copy-template.js +10 -0
- package/.claude/settings.local.json +0 -8
- package/.github/pull_request_template.md +0 -31
- package/.github/workflows/flexplm-lib.yml +0 -27
- package/.github/workflows/publish-to-npm.yml +0 -124
- package/CHANGELOG.md +0 -32
- package/publish.bat +0 -5
- package/publish.sh +0 -5
- package/src/entity-processor/base-entity-processor.spec.ts +0 -460
- package/src/entity-processor/base-entity-processor.ts +0 -515
- package/src/flexplm-request.ts +0 -28
- package/src/flexplm-utils.spec.ts +0 -27
- package/src/flexplm-utils.ts +0 -29
- package/src/index.ts +0 -22
- package/src/interfaces/interfaces.ts +0 -122
- package/src/interfaces/item-family-changes.ts +0 -67
- package/src/interfaces/publish-change-data.ts +0 -43
- package/src/publish/base-process-publish-assortment-callback.ts +0 -50
- package/src/publish/base-process-publish-assortment.spec.ts +0 -1992
- package/src/publish/base-process-publish-assortment.ts +0 -1134
- package/src/publish/mockData.ts +0 -4561
- package/src/transform/identifier-conversion-spec-mockData.ts +0 -496
- package/src/transform/identifier-conversion.spec.ts +0 -354
- package/src/transform/identifier-conversion.ts +0 -282
- package/src/util/config-defaults.spec.ts +0 -350
- package/src/util/config-defaults.ts +0 -93
- package/src/util/data-converter-spec-mockData.ts +0 -231
- package/src/util/data-converter.spec.ts +0 -1041
- package/src/util/data-converter.ts +0 -762
- package/src/util/error-response-object.spec.ts +0 -116
- package/src/util/error-response-object.ts +0 -50
- package/src/util/event-short-message-status.ts +0 -22
- package/src/util/federation.ts +0 -172
- package/src/util/flexplm-connect.spec.ts +0 -132
- package/src/util/flexplm-connect.ts +0 -208
- package/src/util/logger-config.ts +0 -20
- package/src/util/map-util-spec-mockData.ts +0 -231
- package/src/util/map-utils.spec.ts +0 -103
- package/src/util/map-utils.ts +0 -41
- package/src/util/mockData.ts +0 -101
- package/src/util/thumbnail-util.spec.ts +0 -508
- package/src/util/thumbnail-util.ts +0 -272
- package/src/util/type-conversion-utils-spec-mockData.ts +0 -271
- package/src/util/type-conversion-utils.spec.ts +0 -968
- package/src/util/type-conversion-utils.ts +0 -460
- package/src/util/type-defaults.spec.ts +0 -669
- package/src/util/type-defaults.ts +0 -281
- package/src/util/type-utils.spec.ts +0 -227
- package/src/util/type-utils.ts +0 -144
- package/tsconfig.json +0 -29
- package/tslint.json +0 -57
|
@@ -1,205 +1,219 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
-
exports.mapping = {
|
|
4
|
-
typeConversion: {
|
|
5
|
-
vibe2flex: {
|
|
6
|
-
'custom-entity': {
|
|
7
|
-
getMapKey: (entity) => {
|
|
8
|
-
const typePath = entity['typePath'];
|
|
9
|
-
let mapKey = '';
|
|
10
|
-
switch (typePath) {
|
|
11
|
-
case 'custom-entity:pack':
|
|
12
|
-
mapKey = 'packaging';
|
|
13
|
-
break;
|
|
14
|
-
case 'custom-entity:prefix':
|
|
15
|
-
mapKey = 'prefix';
|
|
16
|
-
break;
|
|
17
|
-
case 'custom-entity:catName':
|
|
18
|
-
mapKey = 'catName';
|
|
19
|
-
break;
|
|
20
|
-
case 'custom-entity:partnerOrg':
|
|
21
|
-
mapKey = 'partnerOrg';
|
|
22
|
-
break;
|
|
23
|
-
case 'custom-entity:catFamily':
|
|
24
|
-
mapKey = 'catFamily';
|
|
25
|
-
break;
|
|
26
|
-
case 'custom-entity:formName':
|
|
27
|
-
mapKey = 'formName';
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
return mapKey;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
rekey:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
getClass: () => 'custom-entity',
|
|
166
|
-
getSoftType: () => 'custom-entity:
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
+
exports.mapping = {
|
|
4
|
+
typeConversion: {
|
|
5
|
+
vibe2flex: {
|
|
6
|
+
'custom-entity': {
|
|
7
|
+
getMapKey: (entity) => {
|
|
8
|
+
const typePath = entity['typePath'];
|
|
9
|
+
let mapKey = '';
|
|
10
|
+
switch (typePath) {
|
|
11
|
+
case 'custom-entity:pack':
|
|
12
|
+
mapKey = 'packaging';
|
|
13
|
+
break;
|
|
14
|
+
case 'custom-entity:prefix':
|
|
15
|
+
mapKey = 'prefix';
|
|
16
|
+
break;
|
|
17
|
+
case 'custom-entity:catName':
|
|
18
|
+
mapKey = 'catName';
|
|
19
|
+
break;
|
|
20
|
+
case 'custom-entity:partnerOrg':
|
|
21
|
+
mapKey = 'partnerOrg';
|
|
22
|
+
break;
|
|
23
|
+
case 'custom-entity:catFamily':
|
|
24
|
+
mapKey = 'catFamily';
|
|
25
|
+
break;
|
|
26
|
+
case 'custom-entity:formName':
|
|
27
|
+
mapKey = 'formName';
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
return mapKey;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// flex2vibe: {
|
|
35
|
+
// LCSRevisableEntity: {
|
|
36
|
+
// getMapKey: (object) =>{ return object;}
|
|
37
|
+
// },
|
|
38
|
+
// LCSLast: {
|
|
39
|
+
// getMapKey: (object) => {return object;}
|
|
40
|
+
// },
|
|
41
|
+
// LCSMaterial: {
|
|
42
|
+
// getMapKey: (object) =>{ return object;}
|
|
43
|
+
// },
|
|
44
|
+
// LCSBusinessObject: {
|
|
45
|
+
// getMapKey: (object) => {return object;}
|
|
46
|
+
// }
|
|
47
|
+
// },
|
|
48
|
+
},
|
|
49
|
+
LCSProduct: {
|
|
50
|
+
vibeOwningKeys: ['itemNumber', 'lifecycleStage'],
|
|
51
|
+
vibe2flex: {
|
|
52
|
+
getClass: () => 'LCSProduct',
|
|
53
|
+
getSoftType: (entity /*, dependencies*/) => {
|
|
54
|
+
const prodType = entity['prodType'];
|
|
55
|
+
let val = '';
|
|
56
|
+
switch (prodType) {
|
|
57
|
+
case 'acc':
|
|
58
|
+
val = 'Product\\Accesories';
|
|
59
|
+
break;
|
|
60
|
+
case 'app':
|
|
61
|
+
val = 'Product\\Apparel';
|
|
62
|
+
break;
|
|
63
|
+
case 'eqp':
|
|
64
|
+
val = 'Product\\Equipment';
|
|
65
|
+
break;
|
|
66
|
+
case 'foot':
|
|
67
|
+
val = 'Product\\Footwear';
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
return val;
|
|
71
|
+
},
|
|
72
|
+
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }, { processor: 'VALUE_TRANSFORM', functionTransformersKey: 'valueTransform' }],
|
|
73
|
+
rekey: {
|
|
74
|
+
productName: 'name',
|
|
75
|
+
vibeIQIdentifier: 'itemNumber'
|
|
76
|
+
},
|
|
77
|
+
valueTransform: {
|
|
78
|
+
transformEx: (row /*, dependencies*/) => {
|
|
79
|
+
return row['otherProp'] + 'xxx';
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
flex2vibe: {
|
|
84
|
+
getClass: () => 'item',
|
|
85
|
+
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
86
|
+
rekey: {
|
|
87
|
+
itemNumber: 'vibeIQIdentifier',
|
|
88
|
+
name: 'productName',
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
LCSSKU: {
|
|
93
|
+
vibeOwningKeys: ['itemNumber', 'lifecycleStage'],
|
|
94
|
+
vibe2flex: {
|
|
95
|
+
getClass: () => 'LCSSKU',
|
|
96
|
+
getSoftType: (entity /*, dependencies*/) => {
|
|
97
|
+
const prodType = entity['prodType'];
|
|
98
|
+
let val = '';
|
|
99
|
+
switch (prodType) {
|
|
100
|
+
case 'acc':
|
|
101
|
+
val = 'Product\\Accesories';
|
|
102
|
+
break;
|
|
103
|
+
case 'app':
|
|
104
|
+
val = 'Product\\Apparel';
|
|
105
|
+
break;
|
|
106
|
+
case 'eqp':
|
|
107
|
+
val = 'Product\\Equipment';
|
|
108
|
+
break;
|
|
109
|
+
case 'foot':
|
|
110
|
+
val = 'Product\\Footwear';
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
return val;
|
|
114
|
+
},
|
|
115
|
+
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
116
|
+
rekey: {
|
|
117
|
+
skuName: 'optionName',
|
|
118
|
+
vibeIQIdentifier: 'itemNumber'
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
flex2vibe: {
|
|
122
|
+
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
123
|
+
rekey: {
|
|
124
|
+
itemNumber: 'vibeIQIdentifier',
|
|
125
|
+
optionName: 'skuName',
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
packaging: {
|
|
130
|
+
vibe2flex: {
|
|
131
|
+
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
132
|
+
rekey: {
|
|
133
|
+
retailPackType: 'packType',
|
|
134
|
+
retailIntroDate: 'introDate'
|
|
135
|
+
},
|
|
136
|
+
getSoftType: () => 'Revisable Entity\\packaging',
|
|
137
|
+
getClass: () => 'LCSRevisableEntity'
|
|
138
|
+
},
|
|
139
|
+
flex2vibe: {
|
|
140
|
+
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
141
|
+
rekey: {
|
|
142
|
+
packType: 'retailPackType',
|
|
143
|
+
introDate: 'retailIntroDate'
|
|
144
|
+
},
|
|
145
|
+
getClass: () => 'custom-entity',
|
|
146
|
+
getSoftType: () => 'custom-entity:pack',
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
prefix: {
|
|
150
|
+
vibe2flex: {
|
|
151
|
+
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
152
|
+
rekey: {
|
|
153
|
+
retailOwner: 'owner',
|
|
154
|
+
retailIntroDate: 'introDate'
|
|
155
|
+
},
|
|
156
|
+
getSoftType: () => 'Revisable Entity\\prefix',
|
|
157
|
+
getClass: () => 'LCSRevisableEntity'
|
|
158
|
+
},
|
|
159
|
+
flex2vibe: {
|
|
160
|
+
transformOrder: [{ processor: 'REKEY', rekeyDelete: true, rekeyTransformersKey: 'rekey' }],
|
|
161
|
+
rekey: {
|
|
162
|
+
owner: 'retailOwner',
|
|
163
|
+
introDate: 'retailIntroDate'
|
|
164
|
+
},
|
|
165
|
+
getClass: () => 'custom-entity',
|
|
166
|
+
getSoftType: () => 'custom-entity:prefix',
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
catName: {
|
|
170
|
+
getIdentifierProperties: () => ['catName', 'catNumber'],
|
|
171
|
+
getInformationalProperties: () => ['longName'],
|
|
172
|
+
vibe2flex: {
|
|
173
|
+
transformOrder: [],
|
|
174
|
+
getSoftType: () => 'Revisable Entity\\catName',
|
|
175
|
+
getClass: () => 'LCSLast'
|
|
176
|
+
},
|
|
177
|
+
flex2vibe: {
|
|
178
|
+
transformOrder: [],
|
|
179
|
+
getClass: () => 'custom-entity',
|
|
180
|
+
getSoftType: () => 'custom-entity:catName',
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
partnerOrg: {
|
|
184
|
+
vibe2flex: {
|
|
185
|
+
transformOrder: [],
|
|
186
|
+
getSoftType: () => 'Business Object\\partnerOrg',
|
|
187
|
+
getClass: () => 'LCSLifecycleManaged'
|
|
188
|
+
},
|
|
189
|
+
flex2vibe: {
|
|
190
|
+
transformOrder: [],
|
|
191
|
+
getClass: () => 'custom-entity',
|
|
192
|
+
getSoftType: () => 'custom-entity:partnerOrg',
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
catFamily: {
|
|
196
|
+
vibe2flex: {
|
|
197
|
+
transformOrder: [],
|
|
198
|
+
getSoftType: () => 'Revisable Entity\\catFamily',
|
|
199
|
+
getClass: () => 'LCSRevisableEntity'
|
|
200
|
+
},
|
|
201
|
+
flex2vibe: {
|
|
202
|
+
transformOrder: [],
|
|
203
|
+
getClass: () => 'custom-entity',
|
|
204
|
+
getSoftType: () => 'custom-entity:catFamily',
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
formName: {
|
|
208
|
+
vibe2flex: {
|
|
209
|
+
transformOrder: [],
|
|
210
|
+
getSoftType: () => 'Material\\form',
|
|
211
|
+
getClass: () => 'LCSMaterial'
|
|
212
|
+
},
|
|
213
|
+
flex2vibe: {
|
|
214
|
+
transformOrder: [],
|
|
215
|
+
getClass: () => 'custom-entity',
|
|
216
|
+
getSoftType: () => 'custom-entity:formName',
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
};
|
package/lib/util/map-utils.d.ts
CHANGED
|
@@ -1,6 +1,33 @@
|
|
|
1
|
-
import { MapFileUtil } from '@contrail/transform-data';
|
|
2
|
-
export declare class MapUtil {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { MapFileUtil } from '@contrail/transform-data';
|
|
2
|
+
export declare class MapUtil {
|
|
3
|
+
/** Transforms the data, assumes mapSectionKey has been correctly determined.
|
|
4
|
+
*
|
|
5
|
+
* @param transformMapFile id of map file
|
|
6
|
+
* @param mapFileUtil
|
|
7
|
+
* @param data
|
|
8
|
+
* @param mapSectionKey key for section of map file
|
|
9
|
+
* @param direction vibe2flex or flex2vibe
|
|
10
|
+
* @param transformTaskOrderKey key for the list of tasks to be processed. default is 'transformOrder'
|
|
11
|
+
* @returns The converted data
|
|
12
|
+
*/
|
|
13
|
+
static applyTransformMap(transformMapFile: any, mapFileUtil: any, data: any, mapSectionKey: string, direction: string, transformTaskOrderKey?: string): Promise<any>;
|
|
14
|
+
/** Returns the mapKey based on the 'typeConversion' section of the map file.
|
|
15
|
+
* If the map file doesn't have a section for the type in question, 'undefined' is returned.
|
|
16
|
+
*
|
|
17
|
+
* @param fileId
|
|
18
|
+
* @param mapFileUtil
|
|
19
|
+
* @param data The full object
|
|
20
|
+
* @param type The entity or object class of the object. The functions are keyed based on this.
|
|
21
|
+
* @param direction
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
static getMapKey(transformMapFile: any, mapFileUtil: MapFileUtil, data: any, type: string, direction: string): Promise<string>;
|
|
25
|
+
/** Returns the full map section with both directions; identifier and informational properties; etc.
|
|
26
|
+
*
|
|
27
|
+
* @param transformMapFile id if map file
|
|
28
|
+
* @param mapFileUtil
|
|
29
|
+
* @param mapSectionKey key of the map section
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
static getFullMapSection(transformMapFile: string, mapFileUtil: MapFileUtil, mapSectionKey: string): Promise<any>;
|
|
33
|
+
}
|
package/lib/util/map-utils.js
CHANGED
|
@@ -1,15 +1,42 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MapUtil = void 0;
|
|
4
|
-
class MapUtil {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MapUtil = void 0;
|
|
4
|
+
class MapUtil {
|
|
5
|
+
/** Transforms the data, assumes mapSectionKey has been correctly determined.
|
|
6
|
+
*
|
|
7
|
+
* @param transformMapFile id of map file
|
|
8
|
+
* @param mapFileUtil
|
|
9
|
+
* @param data
|
|
10
|
+
* @param mapSectionKey key for section of map file
|
|
11
|
+
* @param direction vibe2flex or flex2vibe
|
|
12
|
+
* @param transformTaskOrderKey key for the list of tasks to be processed. default is 'transformOrder'
|
|
13
|
+
* @returns The converted data
|
|
14
|
+
*/
|
|
15
|
+
static async applyTransformMap(transformMapFile, mapFileUtil, data, mapSectionKey, direction, transformTaskOrderKey = 'transformOrder') {
|
|
16
|
+
return await mapFileUtil.applyTransformMap(transformMapFile, data, mapSectionKey, direction, transformTaskOrderKey);
|
|
17
|
+
}
|
|
18
|
+
/** Returns the mapKey based on the 'typeConversion' section of the map file.
|
|
19
|
+
* If the map file doesn't have a section for the type in question, 'undefined' is returned.
|
|
20
|
+
*
|
|
21
|
+
* @param fileId
|
|
22
|
+
* @param mapFileUtil
|
|
23
|
+
* @param data The full object
|
|
24
|
+
* @param type The entity or object class of the object. The functions are keyed based on this.
|
|
25
|
+
* @param direction
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
static async getMapKey(transformMapFile, mapFileUtil, data, type, direction) {
|
|
29
|
+
return await mapFileUtil.getMapKey(transformMapFile, data, type, direction);
|
|
30
|
+
}
|
|
31
|
+
/** Returns the full map section with both directions; identifier and informational properties; etc.
|
|
32
|
+
*
|
|
33
|
+
* @param transformMapFile id if map file
|
|
34
|
+
* @param mapFileUtil
|
|
35
|
+
* @param mapSectionKey key of the map section
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
static async getFullMapSection(transformMapFile, mapFileUtil, mapSectionKey) {
|
|
39
|
+
return await mapFileUtil.getFullMapSection(transformMapFile, mapSectionKey);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.MapUtil = MapUtil;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|