@featurevisor/core 0.37.1 → 0.39.0

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.
@@ -47,22 +47,22 @@ end_of_record
47
47
  TN:
48
48
  SF:lib/traffic.js
49
49
  FN:6,detectIfVariationsChanged
50
- FN:11,(anonymous_1)
50
+ FN:12,(anonymous_1)
51
51
  FN:17,(anonymous_2)
52
- FN:23,getRulePercentageDiff
53
- FN:32,detectIfRangesChanged
54
- FN:43,getTraffic
55
- FN:53,(anonymous_6)
56
- FN:72,(anonymous_7)
57
- FN:83,(anonymous_8)
58
- FN:94,(anonymous_9)
59
- FN:101,(anonymous_10)
60
- FN:109,(anonymous_11)
52
+ FN:26,getRulePercentageDiff
53
+ FN:35,detectIfRangesChanged
54
+ FN:46,getTraffic
55
+ FN:56,(anonymous_6)
56
+ FN:75,(anonymous_7)
57
+ FN:86,(anonymous_8)
58
+ FN:98,(anonymous_9)
59
+ FN:105,(anonymous_10)
60
+ FN:114,(anonymous_11)
61
61
  FNF:12
62
62
  FNH:12
63
63
  FNDA:9,detectIfVariationsChanged
64
- FNDA:16,(anonymous_1)
65
- FNDA:15,(anonymous_2)
64
+ FNDA:15,(anonymous_1)
65
+ FNDA:16,(anonymous_2)
66
66
  FNDA:9,getRulePercentageDiff
67
67
  FNDA:9,detectIfRangesChanged
68
68
  FNDA:9,getTraffic
@@ -79,100 +79,108 @@ DA:5,1
79
79
  DA:8,9
80
80
  DA:9,3
81
81
  DA:11,6
82
- DA:12,16
83
- DA:13,16
84
- DA:18,15
85
- DA:19,15
86
- DA:22,1
87
- DA:25,9
88
- DA:26,3
89
- DA:28,6
90
- DA:29,6
91
- DA:31,1
92
- DA:34,9
93
- DA:35,3
94
- DA:37,6
95
- DA:38,6
96
- DA:40,0
97
- DA:42,1
98
- DA:50,9
99
- DA:52,9
82
+ DA:13,15
83
+ DA:14,15
84
+ DA:17,6
85
+ DA:18,16
86
+ DA:19,16
87
+ DA:25,1
88
+ DA:28,9
89
+ DA:29,3
90
+ DA:31,6
91
+ DA:32,6
92
+ DA:34,1
93
+ DA:37,9
94
+ DA:38,3
95
+ DA:40,6
96
+ DA:41,6
97
+ DA:43,0
98
+ DA:45,1
100
99
  DA:53,9
101
- DA:54,9
102
100
  DA:55,9
103
- DA:64,9
104
- DA:65,0
101
+ DA:56,9
102
+ DA:57,9
103
+ DA:58,9
105
104
  DA:67,9
106
105
  DA:68,0
107
- DA:71,9
108
- DA:72,9
109
- DA:73,9
106
+ DA:70,9
107
+ DA:71,0
110
108
  DA:74,9
111
109
  DA:75,9
112
- DA:79,9
113
- DA:80,9
114
- DA:82,1
115
- DA:83,1
116
- DA:84,2
117
- DA:85,2
118
- DA:89,2
119
- DA:90,2
120
- DA:92,1
121
- DA:94,9
122
- DA:95,22
123
- DA:96,22
124
- DA:97,22
110
+ DA:76,9
111
+ DA:77,9
112
+ DA:78,9
113
+ DA:82,9
114
+ DA:83,9
115
+ DA:85,1
116
+ DA:86,1
117
+ DA:87,2
118
+ DA:88,2
119
+ DA:92,2
120
+ DA:93,2
121
+ DA:95,1
122
+ DA:97,9
123
+ DA:98,9
124
+ DA:99,22
125
125
  DA:100,22
126
126
  DA:101,22
127
- DA:102,21
128
- DA:107,22
129
- DA:109,9
130
- DA:110,23
131
- DA:111,0
132
- DA:113,23
133
- DA:115,9
134
- DA:117,9
135
- DA:119,1
136
- LF:61
137
- LH:57
127
+ DA:104,22
128
+ DA:105,22
129
+ DA:106,21
130
+ DA:111,22
131
+ DA:114,9
132
+ DA:115,23
133
+ DA:116,0
134
+ DA:118,23
135
+ DA:120,9
136
+ DA:122,9
137
+ DA:124,1
138
+ LF:63
139
+ LH:59
138
140
  BRDA:8,0,0,3
139
141
  BRDA:8,0,1,6
140
- BRDA:25,1,0,3
141
- BRDA:25,1,1,6
142
- BRDA:34,2,0,3
143
- BRDA:34,2,1,6
144
- BRDA:37,3,0,6
145
- BRDA:37,3,1,0
146
- BRDA:52,4,0,0
147
- BRDA:52,4,1,9
148
- BRDA:52,5,0,9
149
- BRDA:52,5,1,0
150
- BRDA:57,6,0,0
151
- BRDA:57,6,1,9
152
- BRDA:64,7,0,0
153
- BRDA:64,7,1,9
154
- BRDA:67,8,0,0
155
- BRDA:67,8,1,9
156
- BRDA:72,9,0,3
157
- BRDA:72,9,1,6
158
- BRDA:72,10,0,9
159
- BRDA:72,10,1,9
160
- BRDA:75,11,0,9
142
+ BRDA:8,1,0,9
143
+ BRDA:8,1,1,6
144
+ BRDA:11,2,0,6
145
+ BRDA:11,2,1,0
146
+ BRDA:28,3,0,3
147
+ BRDA:28,3,1,6
148
+ BRDA:37,4,0,3
149
+ BRDA:37,4,1,6
150
+ BRDA:40,5,0,6
151
+ BRDA:40,5,1,0
152
+ BRDA:55,6,0,0
153
+ BRDA:55,6,1,9
154
+ BRDA:55,7,0,9
155
+ BRDA:55,7,1,0
156
+ BRDA:60,8,0,0
157
+ BRDA:60,8,1,9
158
+ BRDA:67,9,0,0
159
+ BRDA:67,9,1,9
160
+ BRDA:70,10,0,0
161
+ BRDA:70,10,1,9
162
+ BRDA:75,11,0,3
161
163
  BRDA:75,11,1,6
162
- BRDA:75,11,2,2
163
- BRDA:75,11,3,1
164
- BRDA:80,12,0,1
165
- BRDA:80,12,1,8
166
- BRDA:80,13,0,9
167
- BRDA:80,13,1,6
168
- BRDA:97,14,0,20
169
- BRDA:97,14,1,2
170
- BRDA:110,15,0,0
171
- BRDA:110,15,1,23
172
- BRDA:110,16,0,23
173
- BRDA:110,16,1,23
174
- BRF:36
175
- BRH:29
164
+ BRDA:75,12,0,9
165
+ BRDA:75,12,1,9
166
+ BRDA:78,13,0,9
167
+ BRDA:78,13,1,6
168
+ BRDA:78,13,2,2
169
+ BRDA:78,13,3,1
170
+ BRDA:83,14,0,1
171
+ BRDA:83,14,1,8
172
+ BRDA:83,15,0,9
173
+ BRDA:83,15,1,6
174
+ BRDA:97,16,0,9
175
+ BRDA:97,16,1,0
176
+ BRDA:101,17,0,20
177
+ BRDA:101,17,1,2
178
+ BRDA:115,18,0,0
179
+ BRDA:115,18,1,23
180
+ BRDA:115,19,0,23
181
+ BRDA:115,19,1,23
182
+ BRF:42
183
+ BRH:33
176
184
  end_of_record
177
185
  TN:
178
186
  SF:src/allocator.ts
@@ -220,22 +228,22 @@ end_of_record
220
228
  TN:
221
229
  SF:src/traffic.ts
222
230
  FN:6,detectIfVariationsChanged
223
- FN:16,(anonymous_1)
231
+ FN:15,(anonymous_1)
224
232
  FN:20,(anonymous_2)
225
- FN:24,getRulePercentageDiff
226
- FN:37,detectIfRangesChanged
227
- FN:52,getTraffic
228
- FN:67,(anonymous_6)
229
- FN:91,(anonymous_7)
230
- FN:107,(anonymous_8)
231
- FN:121,(anonymous_9)
232
- FN:130,(anonymous_10)
233
- FN:143,(anonymous_11)
233
+ FN:28,getRulePercentageDiff
234
+ FN:41,detectIfRangesChanged
235
+ FN:56,getTraffic
236
+ FN:71,(anonymous_6)
237
+ FN:95,(anonymous_7)
238
+ FN:111,(anonymous_8)
239
+ FN:126,(anonymous_9)
240
+ FN:135,(anonymous_10)
241
+ FN:149,(anonymous_11)
234
242
  FNF:12
235
243
  FNH:12
236
244
  FNDA:9,detectIfVariationsChanged
237
- FNDA:16,(anonymous_1)
238
- FNDA:15,(anonymous_2)
245
+ FNDA:15,(anonymous_1)
246
+ FNDA:16,(anonymous_2)
239
247
  FNDA:9,getRulePercentageDiff
240
248
  FNDA:9,detectIfRangesChanged
241
249
  FNDA:9,getTraffic
@@ -251,86 +259,93 @@ DA:6,1
251
259
  DA:10,9
252
260
  DA:11,3
253
261
  DA:14,6
254
- DA:16,16
255
- DA:20,15
256
- DA:24,1
257
- DA:28,9
258
- DA:29,3
259
- DA:32,6
260
- DA:34,6
261
- DA:37,1
262
- DA:41,9
263
- DA:42,3
264
- DA:45,6
265
- DA:46,6
266
- DA:49,0
267
- DA:52,1
268
- DA:61,9
262
+ DA:15,15
263
+ DA:18,6
264
+ DA:20,16
265
+ DA:28,1
266
+ DA:32,9
267
+ DA:33,3
268
+ DA:36,6
269
+ DA:38,6
270
+ DA:41,1
271
+ DA:45,9
272
+ DA:46,3
273
+ DA:49,6
274
+ DA:50,6
275
+ DA:53,0
276
+ DA:56,1
269
277
  DA:65,9
270
- DA:67,9
271
- DA:68,9
272
- DA:70,9
273
- DA:81,9
274
- DA:82,0
278
+ DA:69,9
279
+ DA:71,9
280
+ DA:72,9
281
+ DA:74,9
275
282
  DA:85,9
276
283
  DA:86,0
277
- DA:90,9
278
- DA:91,9
279
- DA:92,9
280
- DA:93,9
284
+ DA:89,9
285
+ DA:90,0
286
+ DA:94,9
287
+ DA:95,9
281
288
  DA:96,9
282
- DA:101,9
283
- DA:103,9
284
- DA:105,1
285
- DA:107,1
286
- DA:108,2
287
- DA:113,2
288
- DA:115,2
289
- DA:118,1
290
- DA:121,9
291
- DA:122,22
292
- DA:123,22
293
- DA:125,22
289
+ DA:97,9
290
+ DA:100,9
291
+ DA:105,9
292
+ DA:107,9
293
+ DA:109,1
294
+ DA:111,1
295
+ DA:112,2
296
+ DA:117,2
297
+ DA:119,2
298
+ DA:122,1
299
+ DA:125,9
300
+ DA:126,9
301
+ DA:127,22
294
302
  DA:128,22
295
303
  DA:130,22
296
- DA:131,21
297
- DA:137,22
298
- DA:143,9
299
- DA:144,23
300
- DA:145,0
301
- DA:148,23
302
- DA:151,9
303
- DA:154,9
304
- LF:56
305
- LH:52
304
+ DA:133,22
305
+ DA:135,22
306
+ DA:136,21
307
+ DA:142,22
308
+ DA:149,9
309
+ DA:150,23
310
+ DA:151,0
311
+ DA:154,23
312
+ DA:157,9
313
+ DA:160,9
314
+ LF:58
315
+ LH:54
306
316
  BRDA:10,0,0,3
307
- BRDA:28,1,0,3
308
- BRDA:41,2,0,3
309
- BRDA:45,3,0,6
310
- BRDA:65,4,0,0
311
- BRDA:65,4,1,9
312
- BRDA:65,5,0,9
313
- BRDA:65,5,1,0
314
- BRDA:73,6,0,0
315
- BRDA:73,6,1,9
316
- BRDA:81,7,0,0
317
- BRDA:85,8,0,0
318
- BRDA:91,9,0,3
319
- BRDA:91,9,1,6
320
- BRDA:91,10,0,9
321
- BRDA:91,10,1,9
322
- BRDA:96,11,0,9
323
- BRDA:96,11,1,6
324
- BRDA:96,11,2,2
325
- BRDA:96,11,3,1
326
- BRDA:103,12,0,1
327
- BRDA:103,13,0,9
328
- BRDA:103,13,1,6
329
- BRDA:125,14,0,20
330
- BRDA:125,14,1,2
331
- BRDA:144,15,0,0
332
- BRDA:144,16,0,23
333
- BRDA:144,16,1,23
334
- BRF:28
335
- BRH:22
317
+ BRDA:10,1,0,9
318
+ BRDA:10,1,1,6
319
+ BRDA:14,2,0,6
320
+ BRDA:14,2,1,0
321
+ BRDA:32,3,0,3
322
+ BRDA:45,4,0,3
323
+ BRDA:49,5,0,6
324
+ BRDA:69,6,0,0
325
+ BRDA:69,6,1,9
326
+ BRDA:69,7,0,9
327
+ BRDA:69,7,1,0
328
+ BRDA:77,8,0,0
329
+ BRDA:77,8,1,9
330
+ BRDA:85,9,0,0
331
+ BRDA:89,10,0,0
332
+ BRDA:95,11,0,3
333
+ BRDA:95,11,1,6
334
+ BRDA:95,12,0,9
335
+ BRDA:95,12,1,9
336
+ BRDA:100,13,0,9
337
+ BRDA:100,13,1,6
338
+ BRDA:100,13,2,2
339
+ BRDA:100,13,3,1
340
+ BRDA:107,14,0,1
341
+ BRDA:107,15,0,9
342
+ BRDA:107,15,1,6
343
+ BRDA:125,16,0,9
344
+ BRDA:130,17,0,20
345
+ BRDA:130,17,1,2
346
+ BRDA:150,18,0,0
347
+ BRDA:150,19,0,23
348
+ BRDA:150,19,1,23
349
+ BRF:33
350
+ BRH:26
336
351
  end_of_record
package/lib/builder.d.ts CHANGED
@@ -8,9 +8,17 @@ export interface BuildOptions {
8
8
  }
9
9
  export declare function getDatafilePath(projectConfig: ProjectConfig, environment: EnvironmentKey, tag: string): string;
10
10
  export declare function getExistingStateFilePath(projectConfig: ProjectConfig, environment: EnvironmentKey): string;
11
- export declare function getFeatureRanges(projectConfig: ProjectConfig): Map<FeatureKey, Range[]>;
11
+ export type FeatureRanges = Map<FeatureKey, Range[]>;
12
+ interface FeatureRangesResult {
13
+ featureRanges: FeatureRanges;
14
+ featureIsInGroup: {
15
+ [key: string]: boolean;
16
+ };
17
+ }
18
+ export declare function getFeatureRanges(projectConfig: ProjectConfig): FeatureRangesResult;
12
19
  export declare function buildDatafile(projectConfig: ProjectConfig, options: BuildOptions, existingState: ExistingState): DatafileContent;
13
20
  export interface BuildCLIOptions {
14
21
  revision?: string;
15
22
  }
16
23
  export declare function buildProject(rootDirectoryPath: any, projectConfig: ProjectConfig, cliOptions?: BuildCLIOptions): void;
24
+ export {};
package/lib/builder.js CHANGED
@@ -29,6 +29,7 @@ function getExistingStateFilePath(projectConfig, environment) {
29
29
  exports.getExistingStateFilePath = getExistingStateFilePath;
30
30
  function getFeatureRanges(projectConfig) {
31
31
  var featureRanges = new Map();
32
+ var featureIsInGroup = {}; // featureKey => boolean
32
33
  var groups = [];
33
34
  if (fs.existsSync(projectConfig.groupsDirectoryPath)) {
34
35
  var groupFiles = fs
@@ -44,6 +45,9 @@ function getFeatureRanges(projectConfig) {
44
45
  var isFirstSlot = slotIndex === 0;
45
46
  if (slot.feature) {
46
47
  var featureKey = slot.feature;
48
+ if (typeof featureKey === "string") {
49
+ featureIsInGroup[featureKey] = true;
50
+ }
47
51
  var featureRangesForFeature = featureRanges.get(featureKey) || [];
48
52
  var start = isFirstSlot ? accumulatedPercentage : accumulatedPercentage + 1;
49
53
  var end = accumulatedPercentage + slot.percentage * 1000;
@@ -58,7 +62,7 @@ function getFeatureRanges(projectConfig) {
58
62
  _loop_1(groupFile);
59
63
  }
60
64
  }
61
- return featureRanges;
65
+ return { featureRanges: featureRanges, featureIsInGroup: featureIsInGroup };
62
66
  }
63
67
  exports.getFeatureRanges = getFeatureRanges;
64
68
  function buildDatafile(projectConfig, options, existingState) {
@@ -71,7 +75,7 @@ function buildDatafile(projectConfig, options, existingState) {
71
75
  };
72
76
  var segmentKeysUsedByTag = new Set();
73
77
  var attributeKeysUsedByTag = new Set();
74
- var featureRanges = getFeatureRanges(projectConfig);
78
+ var _a = getFeatureRanges(projectConfig), featureRanges = _a.featureRanges, featureIsInGroup = _a.featureIsInGroup;
75
79
  // features
76
80
  var features = [];
77
81
  var featuresDirectory = projectConfig.featuresDirectoryPath;
@@ -91,66 +95,72 @@ function buildDatafile(projectConfig, options, existingState) {
91
95
  if (parsedFeature.environments[options.environment].expose === false) {
92
96
  continue;
93
97
  }
94
- for (var _a = 0, _b = parsedFeature.environments[options.environment].rules; _a < _b.length; _a++) {
95
- var parsedRule = _b[_a];
98
+ for (var _b = 0, _c = parsedFeature.environments[options.environment].rules; _b < _c.length; _b++) {
99
+ var parsedRule = _c[_b];
96
100
  var extractedSegmentKeys = (0, utils_1.extractSegmentKeysFromGroupSegments)(parsedRule.segments);
97
101
  extractedSegmentKeys.forEach(function (segmentKey) { return segmentKeysUsedByTag.add(segmentKey); });
98
102
  }
99
103
  var feature = {
100
104
  key: featureKey,
101
- defaultVariation: parsedFeature.defaultVariation,
102
105
  bucketBy: parsedFeature.bucketBy || projectConfig.defaultBucketBy,
103
- variations: parsedFeature.variations.map(function (variation) {
104
- var mappedVariation = {
105
- value: variation.value,
106
- weight: variation.weight, // @TODO: added so state files can maintain weight info, but datafiles don't need this. find a way to remove it from datafiles later
107
- };
108
- if (!variation.variables) {
109
- return mappedVariation;
110
- }
111
- mappedVariation.variables = variation.variables.map(function (variable) {
112
- var mappedVariable = {
113
- key: variable.key,
114
- value: variable.value,
106
+ variations: Array.isArray(parsedFeature.variations)
107
+ ? parsedFeature.variations.map(function (variation) {
108
+ var mappedVariation = {
109
+ value: variation.value,
110
+ weight: variation.weight, // @TODO: added so state files can maintain weight info, but datafiles don't need this. find a way to remove it from datafiles later
115
111
  };
116
- if (!variable.overrides) {
117
- return mappedVariable;
112
+ if (!variation.variables) {
113
+ return mappedVariation;
118
114
  }
119
- mappedVariable.overrides = variable.overrides.map(function (override) {
120
- if (typeof override.conditions !== "undefined") {
121
- var extractedAttributeKeys = (0, utils_1.extractAttributeKeysFromConditions)(override.conditions);
122
- extractedAttributeKeys.forEach(function (attributeKey) {
123
- return attributeKeysUsedByTag.add(attributeKey);
124
- });
125
- return {
126
- conditions: JSON.stringify(override.conditions),
127
- value: override.value,
128
- };
129
- }
130
- if (typeof override.segments !== "undefined") {
131
- var extractedSegmentKeys = (0, utils_1.extractSegmentKeysFromGroupSegments)(override.segments);
132
- extractedSegmentKeys.forEach(function (segmentKey) { return segmentKeysUsedByTag.add(segmentKey); });
133
- return {
134
- segments: JSON.stringify(override.segments),
135
- value: override.value,
136
- };
115
+ mappedVariation.variables = variation.variables.map(function (variable) {
116
+ var mappedVariable = {
117
+ key: variable.key,
118
+ value: variable.value,
119
+ };
120
+ if (!variable.overrides) {
121
+ return mappedVariable;
137
122
  }
138
- return override;
123
+ mappedVariable.overrides = variable.overrides.map(function (override) {
124
+ if (typeof override.conditions !== "undefined") {
125
+ var extractedAttributeKeys = (0, utils_1.extractAttributeKeysFromConditions)(override.conditions);
126
+ extractedAttributeKeys.forEach(function (attributeKey) {
127
+ return attributeKeysUsedByTag.add(attributeKey);
128
+ });
129
+ return {
130
+ conditions: JSON.stringify(override.conditions),
131
+ value: override.value,
132
+ };
133
+ }
134
+ if (typeof override.segments !== "undefined") {
135
+ var extractedSegmentKeys = (0, utils_1.extractSegmentKeysFromGroupSegments)(override.segments);
136
+ extractedSegmentKeys.forEach(function (segmentKey) {
137
+ return segmentKeysUsedByTag.add(segmentKey);
138
+ });
139
+ return {
140
+ segments: JSON.stringify(override.segments),
141
+ value: override.value,
142
+ };
143
+ }
144
+ return override;
145
+ });
146
+ return mappedVariable;
139
147
  });
140
- return mappedVariable;
141
- });
142
- return mappedVariation;
143
- }),
148
+ return mappedVariation;
149
+ })
150
+ : undefined,
144
151
  traffic: (0, traffic_1.getTraffic)(parsedFeature.variations, parsedFeature.environments[options.environment].rules, existingState.features[featureKey], featureRanges.get(featureKey) || []),
152
+ ranges: featureRanges.get(featureKey) || undefined,
145
153
  };
146
154
  // update state in memory, so that next datafile build can use it (in case it contains the same feature)
147
155
  existingState.features[featureKey] = {
148
- variations: feature.variations.map(function (v) {
149
- return {
150
- value: v.value,
151
- weight: v.weight || 0,
152
- };
153
- }),
156
+ variations: Array.isArray(feature.variations)
157
+ ? feature.variations.map(function (v) {
158
+ return {
159
+ value: v.value,
160
+ weight: v.weight || 0,
161
+ };
162
+ })
163
+ : undefined,
154
164
  traffic: feature.traffic.map(function (t) {
155
165
  return {
156
166
  key: t.key,
@@ -163,8 +173,10 @@ function buildDatafile(projectConfig, options, existingState) {
163
173
  }),
164
174
  };
165
175
  }),
166
- ranges: featureRanges.get(feature.key) || undefined,
167
176
  };
177
+ if (featureIsInGroup[featureKey] === true) {
178
+ feature.ranges = featureRanges.get(feature.key);
179
+ }
168
180
  if (parsedFeature.variablesSchema) {
169
181
  feature.variablesSchema = parsedFeature.variablesSchema;
170
182
  }
@@ -179,8 +191,8 @@ function buildDatafile(projectConfig, options, existingState) {
179
191
  var segmentsDirectory = projectConfig.segmentsDirectoryPath;
180
192
  if (fs.existsSync(segmentsDirectory)) {
181
193
  var segmentFiles = fs.readdirSync(segmentsDirectory).filter(function (f) { return f.endsWith(".yml"); });
182
- for (var _c = 0, segmentFiles_1 = segmentFiles; _c < segmentFiles_1.length; _c++) {
183
- var segmentFile = segmentFiles_1[_c];
194
+ for (var _d = 0, segmentFiles_1 = segmentFiles; _d < segmentFiles_1.length; _d++) {
195
+ var segmentFile = segmentFiles_1[_d];
184
196
  var segmentKey = path.basename(segmentFile, ".yml");
185
197
  var segmentFilePath = path.join(segmentsDirectory, segmentFile);
186
198
  var parsedSegment = (0, utils_1.parseYaml)(fs.readFileSync(segmentFilePath, "utf8"));
@@ -206,8 +218,8 @@ function buildDatafile(projectConfig, options, existingState) {
206
218
  var attributesDirectory = projectConfig.attributesDirectoryPath;
207
219
  if (fs.existsSync(attributesDirectory)) {
208
220
  var attributeFiles = fs.readdirSync(attributesDirectory).filter(function (f) { return f.endsWith(".yml"); });
209
- for (var _d = 0, attributeFiles_1 = attributeFiles; _d < attributeFiles_1.length; _d++) {
210
- var attributeFile = attributeFiles_1[_d];
221
+ for (var _e = 0, attributeFiles_1 = attributeFiles; _e < attributeFiles_1.length; _e++) {
222
+ var attributeFile = attributeFiles_1[_e];
211
223
  var attributeKey = path.basename(attributeFile, ".yml");
212
224
  var attributeFilePath = path.join(attributesDirectory, attributeFile);
213
225
  var parsedAttribute = (0, utils_1.parseYaml)(fs.readFileSync(attributeFilePath, "utf8"));