@contrail/flexplm 1.1.13 → 1.1.14

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.
Files changed (66) hide show
  1. package/.github/pull_request_template.md +30 -0
  2. package/.github/workflows/flexplm-lib.yml +27 -0
  3. package/lib/flexplm-utils.spec.d.ts +1 -0
  4. package/lib/flexplm-utils.spec.js +26 -0
  5. package/lib/publish/base-process-publish-assortment.spec.d.ts +1 -0
  6. package/lib/publish/base-process-publish-assortment.spec.js +1053 -0
  7. package/lib/util/config-defaults.spec.d.ts +1 -0
  8. package/lib/util/config-defaults.spec.js +264 -0
  9. package/lib/util/data-converter.spec.d.ts +1 -0
  10. package/lib/util/data-converter.spec.js +591 -0
  11. package/lib/util/map-utils.d.ts +2 -2
  12. package/lib/util/map-utils.js +5 -28
  13. package/lib/util/map-utils.spec.d.ts +1 -0
  14. package/lib/util/map-utils.spec.js +89 -0
  15. package/lib/util/thumbnail-util.spec.d.ts +1 -0
  16. package/lib/util/thumbnail-util.spec.js +132 -0
  17. package/lib/util/type-conversion-utils-spec-mockData.js +21 -0
  18. package/lib/util/type-conversion-utils.d.ts +7 -0
  19. package/lib/util/type-conversion-utils.js +88 -4
  20. package/lib/util/type-conversion-utils.spec.d.ts +1 -0
  21. package/lib/util/type-conversion-utils.spec.js +547 -0
  22. package/lib/util/type-defaults.d.ts +5 -0
  23. package/lib/util/type-defaults.js +66 -0
  24. package/lib/util/type-defaults.spec.d.ts +1 -0
  25. package/lib/util/type-defaults.spec.js +460 -0
  26. package/lib/util/type-utils.spec.d.ts +1 -0
  27. package/lib/util/type-utils.spec.js +190 -0
  28. package/package.json +2 -2
  29. package/publish.bat +5 -0
  30. package/publish.sh +5 -0
  31. package/src/entity-processor/base-entity-processor.ts +183 -0
  32. package/src/flexplm-request.ts +28 -0
  33. package/src/flexplm-utils.spec.ts +27 -0
  34. package/src/flexplm-utils.ts +29 -0
  35. package/src/index.ts +20 -0
  36. package/src/interfaces/interfaces.ts +120 -0
  37. package/src/interfaces/item-family-changes.ts +67 -0
  38. package/src/interfaces/publish-change-data.ts +43 -0
  39. package/src/publish/base-process-publish-assortment-callback.ts +23 -0
  40. package/src/publish/base-process-publish-assortment.spec.ts +1239 -0
  41. package/src/publish/base-process-publish-assortment.ts +1024 -0
  42. package/src/publish/mockData.ts +4561 -0
  43. package/src/transform/identifier-conversion.ts +226 -0
  44. package/src/util/config-defaults.spec.ts +315 -0
  45. package/src/util/config-defaults.ts +79 -0
  46. package/src/util/data-converter-spec-mockData.ts +231 -0
  47. package/src/util/data-converter.spec.ts +872 -0
  48. package/src/util/data-converter.ts +389 -0
  49. package/src/util/federation.ts +172 -0
  50. package/src/util/flexplm-connect.ts +169 -0
  51. package/src/util/logger-config.ts +20 -0
  52. package/src/util/map-util-spec-mockData.ts +231 -0
  53. package/src/util/map-utils.spec.ts +103 -0
  54. package/src/util/map-utils.ts +40 -0
  55. package/src/util/mockData.ts +98 -0
  56. package/src/util/thumbnail-util.spec.ts +152 -0
  57. package/src/util/thumbnail-util.ts +128 -0
  58. package/src/util/type-conversion-utils-spec-mockData.ts +238 -0
  59. package/src/util/type-conversion-utils.spec.ts +601 -0
  60. package/src/util/type-conversion-utils.ts +345 -0
  61. package/src/util/type-defaults.spec.ts +592 -0
  62. package/src/util/type-defaults.ts +261 -0
  63. package/src/util/type-utils.spec.ts +227 -0
  64. package/src/util/type-utils.ts +124 -0
  65. package/tsconfig.json +27 -0
  66. package/tslint.json +57 -0
@@ -0,0 +1,261 @@
1
+ import { MapFileUtil } from "@contrail/transform-data";
2
+
3
+
4
+ export class TypeDefaults {
5
+ static NO_ENTITY_TYPE = 'Not able to determine the entity type of the entity object';
6
+ constructor() {
7
+ }
8
+ /**Takes in full entity and returs the default FlexPLM
9
+ * object class.
10
+ *
11
+ * @param entity
12
+ * @returns string
13
+ */
14
+ static getDefaultObjectClass(entity): string {
15
+ const entityType = this.getEntityType(entity);
16
+ let objectClass = '';
17
+ if ('item' === entityType) {
18
+ if (entity.roles.includes('family')) {
19
+ objectClass = 'LCSProduct';
20
+ } else if (entity.roles.includes('color')) {
21
+ objectClass = 'LCSSKU';
22
+ }
23
+ } else if ('project-item' === entityType) {
24
+ if (entity.roles.includes('family')) {
25
+ objectClass = 'LCSProductSeasonLink';
26
+ } else if (entity.roles.includes('color')) {
27
+ objectClass = 'LCSSKUSeasonLink';
28
+ }
29
+ } else if ('color' === entityType) {
30
+ objectClass = 'LCSColor';
31
+ } else if ('custom-entity' === entityType) {
32
+ objectClass = 'LCSRevisableEntity';
33
+ } else if ('project' === entityType) {
34
+ objectClass = 'LCSSeason';
35
+ } else if ('assortment' === entityType) {
36
+ if('LCSSeason' === entity.flex2vibeMapKeyRoot || entity.publishToFlexPLM){
37
+ objectClass = 'LCSSeason';
38
+ }else{
39
+ objectClass = 'SeasonGroup';
40
+ }
41
+ }
42
+ return objectClass;
43
+
44
+ }
45
+
46
+ /**Takes in full entity and returns the default FlexPLM type path
47
+ * object class.
48
+ *
49
+ * @param entity
50
+ * @returns string
51
+ */
52
+ static getDefaultObjectTypePath(entity): string {
53
+ let typePath = '';
54
+ const entityType = this.getEntityType(entity);
55
+
56
+ switch (entityType) {
57
+ case 'item':
58
+ case 'project-item':
59
+ typePath = 'Product';
60
+ break;
61
+ case 'color':
62
+ typePath = 'Color';
63
+ break;
64
+ case 'custom-entity':
65
+ typePath = 'Revisable Entity';
66
+ break;
67
+ case 'project':
68
+ typePath = 'Season';
69
+ break;
70
+ case 'assortment':
71
+ if('LCSSeason' === entity.flex2vibeMapKeyRoot || entity.publishToFlexPLM){
72
+ typePath = 'Season';
73
+ }else{
74
+ typePath = 'Season Group';
75
+ }
76
+ break;
77
+ }
78
+
79
+ return typePath;
80
+ }
81
+
82
+ /**Takes in full entity and returns the slugs for the default identifier
83
+ * properties. These properties are used when searching for an entity
84
+ * object class.
85
+ *
86
+ * @param entity
87
+ * @returns string[]
88
+ */
89
+
90
+ static getDefaultIdentifierProperties(entity): string[] {
91
+ const identifierProps = [];
92
+ const entityType = this.getEntityType(entity);
93
+
94
+ switch (entityType) {
95
+ case 'item':
96
+ identifierProps.push('itemNumber');
97
+ break;
98
+ case 'project':
99
+ identifierProps.push('flexPLMSeasonName');
100
+ break;
101
+ case 'assortment':
102
+ if('LCSSeason' === entity.flex2vibeMapKeyRoot ||entity.publishToFlexPLM){
103
+ identifierProps.push('flexPLMSeasonName');
104
+ }else{
105
+ identifierProps.push('seasonGroupName');
106
+ }
107
+ break;
108
+ case 'color':
109
+ case 'custom-entity':
110
+ identifierProps.push('name');
111
+ break;
112
+ }
113
+
114
+ return identifierProps;
115
+ }
116
+
117
+ /** Takes in full entity and returns the slugs for informational
118
+ * properties. These properties are helpful when debugging issues
119
+ * where the identifier properties don't find a match.
120
+ *
121
+ * @param entity
122
+ * @returns string[]
123
+ */
124
+ static getDefaultInformationalProperties(entity): string[] {
125
+ const entityType = this.getEntityType(entity);
126
+ let properties:string[] = [];
127
+ if ('item' === entityType) {
128
+ if (entity.roles.includes('family')) {
129
+ properties.push('name');
130
+ } else if (entity.roles.includes('color')) {
131
+ properties.push('optionName');
132
+ }
133
+ } else if (['project', 'assortment'].includes(entityType)) {
134
+ properties.push('name');
135
+ }
136
+ return properties;
137
+
138
+ }
139
+
140
+ /** Returns the VibeIQ entity type from an entity.
141
+ * Throws error if it can't determine the entity type
142
+ *
143
+ * @param entity
144
+ * @returns string
145
+ */
146
+ static getEntityType(entity: any) {
147
+ let entityType = entity['entityType'];
148
+ if (!entityType) {
149
+ const typePath: string = entity['typePath'];
150
+ if (typePath) {
151
+ const types = typePath.split(':');
152
+ if (types && types[0]) {
153
+ entityType = types[0];
154
+ }
155
+ }
156
+ }
157
+ if (!entityType) {
158
+ throw Error(TypeDefaults.NO_ENTITY_TYPE);
159
+ }
160
+ return entityType;
161
+ }
162
+
163
+ /**Takes in full object and returns the default VibeIQ
164
+ * entity class.
165
+ *
166
+ * @param entity
167
+ * @returns string
168
+ */
169
+ static getDefaultEntityClass(object): string {
170
+ let entityClass = '';
171
+ let objectClass = TypeDefaults.getObjectClass(object);
172
+ if(['LCSProduct', 'LCSSKU'].includes(objectClass)){
173
+ entityClass = 'item';
174
+ } else if('LCSColor' === objectClass){
175
+ entityClass = 'color';
176
+ }
177
+
178
+ return entityClass;
179
+ }
180
+
181
+ /**Takes in full object and returns the default VibeIQ type path
182
+ * object class.
183
+ *
184
+ * @param object
185
+ * @returns string
186
+ */
187
+ static getDefaultEntityTypePath(object): string {
188
+ let typePath = '';
189
+ const objectClass = TypeDefaults.getObjectClass(object);
190
+
191
+ switch (objectClass) {
192
+ case 'LCSProduct':
193
+ case 'LCSSKU':
194
+ case 'LCSProductSeasonLink':
195
+ case 'LCSSKUSeasonLink':
196
+ typePath = 'item';
197
+ break;
198
+ case 'LCSColor':
199
+ typePath = 'color';
200
+ break;
201
+ }
202
+ return typePath;
203
+ }
204
+
205
+ /**Takes in full entity and returns the slugs for the default identifier
206
+ * properties. These properties are used when searching for an entity
207
+ * object class.
208
+ *
209
+ * @param entity
210
+ * @returns string[]
211
+ */
212
+
213
+ static getDefaultIdentifierPropertiesFromObject(object): string[] {
214
+ const identifierProps = [];
215
+ const objectClass = TypeDefaults.getObjectClass(object);
216
+
217
+ switch (objectClass) {
218
+ case 'LCSProduct':
219
+ case 'LCSSKU':
220
+ identifierProps.push('itemNumber');
221
+ break;
222
+ case 'LCSSeason':
223
+ identifierProps.push('flexPLMSeasonName');
224
+ break;
225
+ case 'SeasonGroup':
226
+ identifierProps.push('seasonGroupName');
227
+ break;
228
+ case 'LCSColor':
229
+ case 'LCSRevisableEntity':
230
+ case 'LCSLifecycleManaged':
231
+ identifierProps.push('name');
232
+ break;
233
+ }
234
+
235
+ return identifierProps;
236
+ }
237
+
238
+ /** Takes in full object and returns the slugs for informational
239
+ * properties. These properties are helpful when debugging issues
240
+ * where the identifier properties don't find a match.
241
+ *
242
+ * @param object
243
+ * @returns string[]
244
+ */
245
+ static getDefaultInformationalPropertiesFromObject(object): string[] {
246
+ const objectClass = TypeDefaults.getObjectClass(object);
247
+ let properties:string[] = [];
248
+ if ('LCSProduct' === objectClass) {
249
+ properties.push('name');
250
+ } else if ('LCSSKU' === objectClass) {
251
+ properties.push('optionName');
252
+ } else if (['LCSSeason', 'SeasonGroup'].includes(objectClass)) {
253
+ properties.push('name');
254
+ }
255
+ return properties;
256
+ }
257
+
258
+ static getObjectClass(object: any): string {
259
+ return (object)? object['objectClass']: '';
260
+ }
261
+ }
@@ -0,0 +1,227 @@
1
+ import { TypeUtils } from './type-utils';
2
+
3
+ describe('TypeUtils.getEventObjectClass() tests', () =>{
4
+
5
+ const tu = new TypeUtils();
6
+
7
+ it('LCSProduct', () =>{
8
+ const entityType = 'item';
9
+ const newData = {
10
+ roles: ['family']
11
+ };
12
+
13
+ const objectClass = tu.getEventObjectClass(entityType, newData);
14
+
15
+ expect(objectClass).toEqual('LCSProduct');
16
+ });
17
+
18
+ it('LCSSKU', () =>{
19
+ const entityType = 'item';
20
+ const newData = {
21
+ roles: ['color']
22
+ };
23
+
24
+ const objectClass = tu.getEventObjectClass(entityType, newData);
25
+
26
+ expect(objectClass).toEqual('LCSSKU');
27
+ });
28
+
29
+ it('LCSProductSeasonLink', () =>{
30
+ const entityType = 'project-item';
31
+ const newData = {
32
+ roles: ['family']
33
+ };
34
+
35
+ const objectClass = tu.getEventObjectClass(entityType, newData);
36
+
37
+ expect(objectClass).toEqual('LCSProductSeasonLink');
38
+ });
39
+
40
+ it('LCSSKUSeasonLink', () =>{
41
+ const entityType = 'project-item';
42
+ const newData = {
43
+ roles: ['color']
44
+ };
45
+
46
+ const objectClass = tu.getEventObjectClass(entityType, newData);
47
+
48
+ expect(objectClass).toEqual('LCSSKUSeasonLink');
49
+ });
50
+ it('LCSColor', () =>{
51
+ const entityType = 'color';
52
+ const newData = {};
53
+
54
+ const objectClass = tu.getEventObjectClass(entityType, newData);
55
+
56
+ expect(objectClass).toEqual('LCSColor');
57
+ });
58
+
59
+ it('LCSRevisableEntity', () =>{
60
+ const entityType = 'custom-entity';
61
+ const newData = {};
62
+
63
+ const objectClass = tu.getEventObjectClass(entityType, newData);
64
+
65
+ expect(objectClass).toEqual('LCSRevisableEntity');
66
+ });
67
+
68
+ });
69
+ describe('filterProperties-item', () => {
70
+
71
+ const itemType = {
72
+ typePath: 'item'
73
+ };
74
+ itemType['typeProperties'] = [
75
+ {
76
+ id: 'H4NazLloHdUVhc71',
77
+ slug: 'null',
78
+ propertyLevel: null
79
+ },
80
+ {
81
+ id: 'H4NazLloHdUVhc71',
82
+ slug: 'family',
83
+ propertyLevel: 'family'
84
+ },
85
+ {
86
+ id: 'H4NazLloHdUVhc71',
87
+ slug: 'option',
88
+ propertyLevel: 'option'
89
+ },
90
+ {
91
+ id: 'H4NazLloHdUVhc71',
92
+ slug: 'overridable',
93
+ propertyLevel: 'overridable'
94
+ },
95
+ {
96
+ id: 'H4NazLloHdUVhc71',
97
+ slug: 'all',
98
+ propertyLevel: 'all'
99
+ },
100
+ ];
101
+ const tu = new TypeUtils();
102
+
103
+ it('item-family', () =>{
104
+ const len = 4;
105
+ const newData = {
106
+ roles: ['family']
107
+ };
108
+
109
+ const filteredProps = tu.filterTypeProperties(itemType, newData);
110
+ expect(filteredProps.length).toEqual(len);
111
+ });
112
+
113
+ it('item-option', () =>{
114
+ const len = 4;
115
+ const newData = {
116
+ roles: ['option']
117
+ };
118
+
119
+ const filteredProps = tu.filterTypeProperties(itemType, newData);
120
+ expect(filteredProps.length).toEqual(len);
121
+ });
122
+
123
+ it('item-no-roles', () =>{
124
+ const len = 5;
125
+ const newData = {
126
+ };
127
+
128
+ const filteredProps = tu.filterTypeProperties(itemType, newData);
129
+ expect(filteredProps.length).toEqual(len);
130
+ });
131
+ });
132
+
133
+ //project-item
134
+ describe('filterProperties-project-item', () => {
135
+
136
+ const projectItemType = {
137
+ typePath: 'project-item'
138
+ };
139
+ projectItemType['typeProperties'] = [
140
+ {
141
+ id: 'H4NazLloHdUVhc71',
142
+ slug: 'null',
143
+ propertyLevel: null
144
+ },
145
+ {
146
+ id: 'H4NazLloHdUVhc71',
147
+ slug: 'family',
148
+ propertyLevel: 'family'
149
+ },
150
+ {
151
+ id: 'H4NazLloHdUVhc71',
152
+ slug: 'option',
153
+ propertyLevel: 'option'
154
+ },
155
+ {
156
+ id: 'H4NazLloHdUVhc71',
157
+ slug: 'overridable',
158
+ propertyLevel: 'overridable'
159
+ },
160
+ {
161
+ id: 'H4NazLloHdUVhc71',
162
+ slug: 'all',
163
+ propertyLevel: 'all'
164
+ },
165
+ ];
166
+ const tu = new TypeUtils();
167
+
168
+ it('item-family', () =>{
169
+ const len = 4;
170
+ const newData = {
171
+ roles: ['family']
172
+ };
173
+
174
+ const filteredProps = tu.filterTypeProperties(projectItemType, newData);
175
+ expect(filteredProps.length).toEqual(len);
176
+ });
177
+
178
+ it('item-option', () =>{
179
+ const len = 4;
180
+ const newData = {
181
+ roles: ['option']
182
+ };
183
+
184
+ const filteredProps = tu.filterTypeProperties(projectItemType, newData);
185
+ expect(filteredProps.length).toEqual(len);
186
+ });
187
+ });
188
+
189
+ //color
190
+ describe('filterProperties-color', () => {
191
+ const colorType = {
192
+ typePath: 'color'
193
+ };
194
+ colorType['typeProperties'] = [
195
+ {
196
+ id: 'H4NazLloHdUVhc71',
197
+ slug: 'null',
198
+ },
199
+ {
200
+ id: 'H4NazLloHdUVhc71',
201
+ slug: 'family',
202
+ },
203
+ {
204
+ id: 'H4NazLloHdUVhc71',
205
+ slug: 'option',
206
+ },
207
+ {
208
+ id: 'H4NazLloHdUVhc71',
209
+ slug: 'overridable',
210
+ },
211
+ {
212
+ id: 'H4NazLloHdUVhc71',
213
+ slug: 'all',
214
+ },
215
+ ];
216
+ const tu = new TypeUtils();
217
+
218
+ it('color', () =>{
219
+ const len = 5;
220
+ const newData = {
221
+ roles: ['family']
222
+ };
223
+
224
+ const filteredProps = tu.filterTypeProperties(colorType, newData);
225
+ expect(filteredProps.length).toEqual(len);
226
+ });
227
+ });
@@ -0,0 +1,124 @@
1
+ import { Logger } from '@contrail/app-framework';
2
+ import { TypeClientOptions, Types } from '@contrail/sdk';
3
+ import { TypeProperty } from '@contrail/types';
4
+
5
+ export class TypeUtils {
6
+ private typesObj: Types;
7
+ constructor() {
8
+ this.typesObj = new Types();
9
+ }
10
+
11
+ async getTypeById(id) {
12
+ // this.logger.log('!-getTypeById: ' + id);
13
+ const type = await this.typesObj.getType({
14
+ id,
15
+ relations: ['typeProperties', 'typeInterfaces']
16
+ });
17
+ return type;
18
+ }
19
+
20
+ async getByRootAndPath(options: TypeClientOptions) {
21
+ const type = await this.typesObj.getByRootAndPath(options);
22
+ return type;
23
+ }
24
+
25
+ static getFlexPLMTypePath(entity) {
26
+ return entity['flexPLMTypePath'] || entity['flexTypePath'] || '';
27
+ }
28
+
29
+ /** Gets the FlexPLM class for the entity data
30
+ *
31
+ * @param entityType
32
+ * @param newData
33
+ * @returns
34
+ */
35
+ getEventObjectClass(entityType: string, newData): string {
36
+ let objectClass = '';
37
+ if ('item' === entityType) {
38
+ if (newData.roles.includes('family')) {
39
+ objectClass = 'LCSProduct';
40
+ } else if (newData.roles.includes('color')) {
41
+ objectClass = 'LCSSKU';
42
+ }
43
+ } else if ('project-item' === entityType) {
44
+ if (newData.roles.includes('family')) {
45
+ objectClass = 'LCSProductSeasonLink';
46
+ } else if (newData.roles.includes('color')) {
47
+ objectClass = 'LCSSKUSeasonLink';
48
+ }
49
+ } else if ('color' === entityType) {
50
+ objectClass = 'LCSColor';
51
+ } else if ('custom-entity' === entityType) {
52
+ objectClass = 'LCSRevisableEntity';
53
+
54
+ }
55
+ return objectClass;
56
+ }
57
+
58
+ /** Gets the VibeIQ entity type for the object data
59
+ * @param objectClass: string object class
60
+ * @param data: object data
61
+ */
62
+ getEntityTypeClientOptions(objectClass: string, data): TypeClientOptions {
63
+ let tco: TypeClientOptions;
64
+ if (['LCSProduct', 'LCSSKU'].includes(objectClass)) {
65
+ tco = {
66
+ root: 'item'
67
+ };
68
+ } else if ('LCSSeason' === objectClass) {
69
+ tco = {
70
+ root: 'assortment'
71
+ };
72
+ } else if ('LCSColor' === objectClass) {
73
+ tco = {
74
+ root: 'color'
75
+ };
76
+ } else if (['LCSBusinessObject', 'LCSRevisableEntity', 'LCSLast'].includes(objectClass)) {
77
+ //TODO need to write logic using mapping file
78
+ tco = {
79
+ root: 'custom-entity'
80
+ };
81
+ console.log('data: ' + data);
82
+ }
83
+
84
+ return tco;
85
+ }
86
+ /** This will filter the properties based the newData entity.
87
+ * It is assumed the type is correct for the entity
88
+ *
89
+ * @param type entire type object
90
+ * @param newData the entity being processed
91
+ * @returns TypeProperty[] of applicable properties
92
+ */
93
+ filterTypeProperties(type, newData): TypeProperty[] {
94
+ let filteredProps: TypeProperty[] = type['typeProperties'];
95
+ const typePath = type['typePath'];
96
+ if (typePath && (typePath.startsWith('item') || typePath.startsWith('project-item'))) {
97
+ if (Logger.isDebugOn()) {
98
+ console.debug('typePath: ' + typePath);
99
+ console.debug('newData: ' + JSON.stringify(newData));
100
+ }
101
+ const roles = newData['roles'];
102
+ if (roles) {
103
+ const isFamily = roles.includes('family');
104
+ if (Logger.isDebugOn()) {
105
+ console.debug('isFamily: ' + isFamily);
106
+ }
107
+
108
+ filteredProps = filteredProps.filter(prop => {
109
+ const propertyLevel = prop.propertyLevel;
110
+ const applies =
111
+ (isFamily && 'option' != propertyLevel) ||
112
+ (!isFamily && 'family' != propertyLevel);
113
+ return applies;
114
+ });
115
+
116
+ } else {
117
+ console.error('filterTypeProperties():Entity missing role-id: ' + newData['id']);
118
+ }
119
+ }
120
+
121
+ return filteredProps;
122
+ }
123
+
124
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2020",
4
+ "module": "commonjs",
5
+ "declaration": true,
6
+ "outDir": "./lib",
7
+ "experimentalDecorators": true,
8
+ "esModuleInterop": true,
9
+ "strictPropertyInitialization": false,
10
+ "noImplicitAny": false,
11
+ "allowSyntheticDefaultImports": true,
12
+ "emitDecoratorMetadata": true,
13
+ "removeComments": true,
14
+ "skipLibCheck": true,
15
+ "lib": [
16
+ "es5",
17
+ "ES2015",
18
+ "ES2016",
19
+ "ES2017",
20
+ "ES2020",
21
+ "dom",
22
+ "esnext.asynciterable"
23
+ ],
24
+ },
25
+ "include": ["src"],
26
+ "exclude": ["node_modules", "**/__tests__/*"]
27
+ }
package/tslint.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "defaultSeverity": "error",
3
+ "extends": [
4
+ "tslint:recommended"
5
+ ],
6
+ "jsRules": {
7
+ "no-unused-expression": true
8
+ },
9
+ "rules": {
10
+ "eofline": false,
11
+ "quotemark": [
12
+ true,
13
+ "single"
14
+ ],
15
+ "no-shadowed-variable": false,
16
+ "indent": false,
17
+ "member-access": [
18
+ false
19
+ ],
20
+ "no-string-literal": false,
21
+ "ordered-imports": [
22
+ false
23
+ ],
24
+ "max-line-length": [
25
+ false,
26
+ 150
27
+ ],
28
+ "member-ordering": [
29
+ false
30
+ ],
31
+ "curly": false,
32
+ "interface-name": [
33
+ false
34
+ ],
35
+ "array-type": [
36
+ false
37
+ ],
38
+ "no-empty-interface": false,
39
+ "no-empty": false,
40
+ "arrow-parens": false,
41
+ "object-literal-sort-keys": false,
42
+ "no-unused-expression": false,
43
+ "max-classes-per-file": [
44
+ false
45
+ ],
46
+ "variable-name": [
47
+ false
48
+ ],
49
+ "one-line": [
50
+ false
51
+ ],
52
+ "one-variable-per-declaration": [
53
+ false
54
+ ]
55
+ },
56
+ "rulesDirectory": []
57
+ }