@featurevisor/core 1.11.1 → 1.13.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.
- package/.eslintcache +1 -1
- package/CHANGELOG.md +22 -0
- package/LICENSE +1 -1
- package/coverage/clover.xml +69 -69
- package/coverage/coverage-final.json +2 -2
- package/coverage/lcov-report/index.html +7 -7
- package/coverage/lcov-report/lib/builder/allocator.js.html +1 -1
- package/coverage/lcov-report/lib/builder/index.html +5 -5
- package/coverage/lcov-report/lib/builder/revision.js.html +1 -1
- package/coverage/lcov-report/lib/builder/traffic.js.html +5 -11
- package/coverage/lcov-report/lib/tester/checkIfObjectsAreEqual.js.html +1 -1
- package/coverage/lcov-report/lib/tester/index.html +1 -1
- package/coverage/lcov-report/lib/tester/matrix.js.html +1 -1
- package/coverage/lcov-report/src/builder/allocator.ts.html +1 -1
- package/coverage/lcov-report/src/builder/index.html +5 -5
- package/coverage/lcov-report/src/builder/revision.ts.html +1 -1
- package/coverage/lcov-report/src/builder/traffic.ts.html +6 -15
- package/coverage/lcov-report/src/tester/checkIfObjectsAreEqual.ts.html +1 -1
- package/coverage/lcov-report/src/tester/index.html +1 -1
- package/coverage/lcov-report/src/tester/matrix.ts.html +1 -1
- package/coverage/lcov.info +113 -117
- package/lib/builder/buildDatafile.js +23 -6
- package/lib/builder/buildDatafile.js.map +1 -1
- package/lib/builder/traffic.js +1 -3
- package/lib/builder/traffic.js.map +1 -1
- package/lib/config/projectConfig.d.ts +1 -0
- package/lib/config/projectConfig.js +3 -1
- package/lib/config/projectConfig.js.map +1 -1
- package/lib/find-usage/index.d.ts +17 -0
- package/lib/find-usage/index.js +379 -0
- package/lib/find-usage/index.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
- package/src/builder/buildDatafile.ts +16 -6
- package/src/builder/traffic.ts +2 -5
- package/src/config/projectConfig.ts +4 -1
- package/src/find-usage/index.ts +279 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,379 @@
|
|
|
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
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.findUsageInProject = exports.findUnusedAttributes = exports.findUnusedSegments = exports.findAttributeUsage = exports.findSegmentUsage = void 0;
|
|
40
|
+
var extractKeys_1 = require("../utils/extractKeys");
|
|
41
|
+
function findSegmentUsage(deps, segmentKey) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
43
|
+
var datasource, projectConfig, featureKeys, usedInFeatures, _loop_1, _i, featureKeys_1, featureKey;
|
|
44
|
+
return __generator(this, function (_a) {
|
|
45
|
+
switch (_a.label) {
|
|
46
|
+
case 0:
|
|
47
|
+
datasource = deps.datasource, projectConfig = deps.projectConfig;
|
|
48
|
+
return [4 /*yield*/, datasource.listFeatures()];
|
|
49
|
+
case 1:
|
|
50
|
+
featureKeys = _a.sent();
|
|
51
|
+
usedInFeatures = new Set();
|
|
52
|
+
_loop_1 = function (featureKey) {
|
|
53
|
+
var feature, segmentKeys;
|
|
54
|
+
return __generator(this, function (_b) {
|
|
55
|
+
switch (_b.label) {
|
|
56
|
+
case 0: return [4 /*yield*/, datasource.readFeature(featureKey)];
|
|
57
|
+
case 1:
|
|
58
|
+
feature = _b.sent();
|
|
59
|
+
segmentKeys = new Set();
|
|
60
|
+
// variable overrides inside variations
|
|
61
|
+
projectConfig.environments.forEach(function (environment) {
|
|
62
|
+
var _a, _b;
|
|
63
|
+
if (feature.variations) {
|
|
64
|
+
feature.variations.forEach(function (variation) {
|
|
65
|
+
if (variation.variables) {
|
|
66
|
+
variation.variables.forEach(function (variable) {
|
|
67
|
+
if (variable.overrides) {
|
|
68
|
+
variable.overrides.forEach(function (override) {
|
|
69
|
+
if (override.segments) {
|
|
70
|
+
(0, extractKeys_1.extractSegmentKeysFromGroupSegments)(override.segments).forEach(function (segmentKey) {
|
|
71
|
+
return segmentKeys.add(segmentKey);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
// force
|
|
81
|
+
if (feature.environments[environment].force) {
|
|
82
|
+
(_a = feature.environments[environment].force) === null || _a === void 0 ? void 0 : _a.forEach(function (force) {
|
|
83
|
+
if (force.segments) {
|
|
84
|
+
(0, extractKeys_1.extractSegmentKeysFromGroupSegments)(force.segments).forEach(function (segmentKey) {
|
|
85
|
+
return segmentKeys.add(segmentKey);
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
// rules
|
|
91
|
+
if (feature.environments[environment].rules) {
|
|
92
|
+
(_b = feature.environments[environment].rules) === null || _b === void 0 ? void 0 : _b.forEach(function (rule) {
|
|
93
|
+
(0, extractKeys_1.extractSegmentKeysFromGroupSegments)(rule.segments).forEach(function (segmentKey) {
|
|
94
|
+
return segmentKeys.add(segmentKey);
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
if (segmentKeys.has(segmentKey)) {
|
|
100
|
+
usedInFeatures.add(featureKey);
|
|
101
|
+
}
|
|
102
|
+
return [2 /*return*/];
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
_i = 0, featureKeys_1 = featureKeys;
|
|
107
|
+
_a.label = 2;
|
|
108
|
+
case 2:
|
|
109
|
+
if (!(_i < featureKeys_1.length)) return [3 /*break*/, 5];
|
|
110
|
+
featureKey = featureKeys_1[_i];
|
|
111
|
+
return [5 /*yield**/, _loop_1(featureKey)];
|
|
112
|
+
case 3:
|
|
113
|
+
_a.sent();
|
|
114
|
+
_a.label = 4;
|
|
115
|
+
case 4:
|
|
116
|
+
_i++;
|
|
117
|
+
return [3 /*break*/, 2];
|
|
118
|
+
case 5: return [2 /*return*/, usedInFeatures];
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
exports.findSegmentUsage = findSegmentUsage;
|
|
124
|
+
function findAttributeUsage(deps, attributeKey) {
|
|
125
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
126
|
+
var datasource, projectConfig, usedIn, featureKeys, _loop_2, _i, featureKeys_2, featureKey, segmentKeys, _loop_3, _a, segmentKeys_1, segmentKey;
|
|
127
|
+
return __generator(this, function (_b) {
|
|
128
|
+
switch (_b.label) {
|
|
129
|
+
case 0:
|
|
130
|
+
datasource = deps.datasource, projectConfig = deps.projectConfig;
|
|
131
|
+
usedIn = {
|
|
132
|
+
features: new Set(),
|
|
133
|
+
segments: new Set(),
|
|
134
|
+
};
|
|
135
|
+
return [4 /*yield*/, datasource.listFeatures()];
|
|
136
|
+
case 1:
|
|
137
|
+
featureKeys = _b.sent();
|
|
138
|
+
_loop_2 = function (featureKey) {
|
|
139
|
+
var feature, attributeKeys;
|
|
140
|
+
return __generator(this, function (_c) {
|
|
141
|
+
switch (_c.label) {
|
|
142
|
+
case 0: return [4 /*yield*/, datasource.readFeature(featureKey)];
|
|
143
|
+
case 1:
|
|
144
|
+
feature = _c.sent();
|
|
145
|
+
attributeKeys = new Set();
|
|
146
|
+
// variable overrides inside variations
|
|
147
|
+
projectConfig.environments.forEach(function (environment) {
|
|
148
|
+
var _a;
|
|
149
|
+
if (feature.variations) {
|
|
150
|
+
feature.variations.forEach(function (variation) {
|
|
151
|
+
if (variation.variables) {
|
|
152
|
+
variation.variables.forEach(function (variable) {
|
|
153
|
+
if (variable.overrides) {
|
|
154
|
+
variable.overrides.forEach(function (override) {
|
|
155
|
+
if (override.conditions) {
|
|
156
|
+
(0, extractKeys_1.extractAttributeKeysFromConditions)(override.conditions).forEach(function (attributeKey) { return attributeKeys.add(attributeKey); });
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
// force
|
|
165
|
+
if (feature.environments[environment].force) {
|
|
166
|
+
(_a = feature.environments[environment].force) === null || _a === void 0 ? void 0 : _a.forEach(function (force) {
|
|
167
|
+
if (force.conditions) {
|
|
168
|
+
(0, extractKeys_1.extractAttributeKeysFromConditions)(force.conditions).forEach(function (attributeKey) {
|
|
169
|
+
return attributeKeys.add(attributeKey);
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
if (attributeKeys.has(attributeKey)) {
|
|
176
|
+
usedIn.features.add(featureKey);
|
|
177
|
+
}
|
|
178
|
+
return [2 /*return*/];
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
_i = 0, featureKeys_2 = featureKeys;
|
|
183
|
+
_b.label = 2;
|
|
184
|
+
case 2:
|
|
185
|
+
if (!(_i < featureKeys_2.length)) return [3 /*break*/, 5];
|
|
186
|
+
featureKey = featureKeys_2[_i];
|
|
187
|
+
return [5 /*yield**/, _loop_2(featureKey)];
|
|
188
|
+
case 3:
|
|
189
|
+
_b.sent();
|
|
190
|
+
_b.label = 4;
|
|
191
|
+
case 4:
|
|
192
|
+
_i++;
|
|
193
|
+
return [3 /*break*/, 2];
|
|
194
|
+
case 5: return [4 /*yield*/, datasource.listSegments()];
|
|
195
|
+
case 6:
|
|
196
|
+
segmentKeys = _b.sent();
|
|
197
|
+
_loop_3 = function (segmentKey) {
|
|
198
|
+
var segment, attributeKeys;
|
|
199
|
+
return __generator(this, function (_d) {
|
|
200
|
+
switch (_d.label) {
|
|
201
|
+
case 0: return [4 /*yield*/, datasource.readSegment(segmentKey)];
|
|
202
|
+
case 1:
|
|
203
|
+
segment = _d.sent();
|
|
204
|
+
attributeKeys = new Set();
|
|
205
|
+
(0, extractKeys_1.extractAttributeKeysFromConditions)(segment.conditions).forEach(function (attributeKey) {
|
|
206
|
+
attributeKeys.add(attributeKey);
|
|
207
|
+
});
|
|
208
|
+
if (attributeKeys.has(attributeKey)) {
|
|
209
|
+
usedIn.segments.add(segmentKey);
|
|
210
|
+
}
|
|
211
|
+
return [2 /*return*/];
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
};
|
|
215
|
+
_a = 0, segmentKeys_1 = segmentKeys;
|
|
216
|
+
_b.label = 7;
|
|
217
|
+
case 7:
|
|
218
|
+
if (!(_a < segmentKeys_1.length)) return [3 /*break*/, 10];
|
|
219
|
+
segmentKey = segmentKeys_1[_a];
|
|
220
|
+
return [5 /*yield**/, _loop_3(segmentKey)];
|
|
221
|
+
case 8:
|
|
222
|
+
_b.sent();
|
|
223
|
+
_b.label = 9;
|
|
224
|
+
case 9:
|
|
225
|
+
_a++;
|
|
226
|
+
return [3 /*break*/, 7];
|
|
227
|
+
case 10: return [2 /*return*/, usedIn];
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
exports.findAttributeUsage = findAttributeUsage;
|
|
233
|
+
function findUnusedSegments(deps) {
|
|
234
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
235
|
+
var datasource, segmentKeys, unusedSegments, _i, segmentKeys_2, segmentKey, usedInFeatures;
|
|
236
|
+
return __generator(this, function (_a) {
|
|
237
|
+
switch (_a.label) {
|
|
238
|
+
case 0:
|
|
239
|
+
datasource = deps.datasource;
|
|
240
|
+
return [4 /*yield*/, datasource.listSegments()];
|
|
241
|
+
case 1:
|
|
242
|
+
segmentKeys = _a.sent();
|
|
243
|
+
unusedSegments = new Set();
|
|
244
|
+
_i = 0, segmentKeys_2 = segmentKeys;
|
|
245
|
+
_a.label = 2;
|
|
246
|
+
case 2:
|
|
247
|
+
if (!(_i < segmentKeys_2.length)) return [3 /*break*/, 5];
|
|
248
|
+
segmentKey = segmentKeys_2[_i];
|
|
249
|
+
return [4 /*yield*/, findSegmentUsage(deps, segmentKey)];
|
|
250
|
+
case 3:
|
|
251
|
+
usedInFeatures = _a.sent();
|
|
252
|
+
if (usedInFeatures.size === 0) {
|
|
253
|
+
unusedSegments.add(segmentKey);
|
|
254
|
+
}
|
|
255
|
+
_a.label = 4;
|
|
256
|
+
case 4:
|
|
257
|
+
_i++;
|
|
258
|
+
return [3 /*break*/, 2];
|
|
259
|
+
case 5: return [2 /*return*/, unusedSegments];
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
exports.findUnusedSegments = findUnusedSegments;
|
|
265
|
+
function findUnusedAttributes(deps) {
|
|
266
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
267
|
+
var datasource, attributeKeys, unusedAttributes, _i, attributeKeys_1, attributeKey, usedIn;
|
|
268
|
+
return __generator(this, function (_a) {
|
|
269
|
+
switch (_a.label) {
|
|
270
|
+
case 0:
|
|
271
|
+
datasource = deps.datasource;
|
|
272
|
+
return [4 /*yield*/, datasource.listAttributes()];
|
|
273
|
+
case 1:
|
|
274
|
+
attributeKeys = _a.sent();
|
|
275
|
+
unusedAttributes = new Set();
|
|
276
|
+
_i = 0, attributeKeys_1 = attributeKeys;
|
|
277
|
+
_a.label = 2;
|
|
278
|
+
case 2:
|
|
279
|
+
if (!(_i < attributeKeys_1.length)) return [3 /*break*/, 5];
|
|
280
|
+
attributeKey = attributeKeys_1[_i];
|
|
281
|
+
return [4 /*yield*/, findAttributeUsage(deps, attributeKey)];
|
|
282
|
+
case 3:
|
|
283
|
+
usedIn = _a.sent();
|
|
284
|
+
if (usedIn.features.size === 0 && usedIn.segments.size === 0) {
|
|
285
|
+
unusedAttributes.add(attributeKey);
|
|
286
|
+
}
|
|
287
|
+
_a.label = 4;
|
|
288
|
+
case 4:
|
|
289
|
+
_i++;
|
|
290
|
+
return [3 /*break*/, 2];
|
|
291
|
+
case 5: return [2 /*return*/, unusedAttributes];
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
exports.findUnusedAttributes = findUnusedAttributes;
|
|
297
|
+
function findUsageInProject(deps, options) {
|
|
298
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
299
|
+
var usedInFeatures, usedIn, unusedSegments, unusedAttributes;
|
|
300
|
+
return __generator(this, function (_a) {
|
|
301
|
+
switch (_a.label) {
|
|
302
|
+
case 0:
|
|
303
|
+
console.log("");
|
|
304
|
+
if (!options.segment) return [3 /*break*/, 2];
|
|
305
|
+
return [4 /*yield*/, findSegmentUsage(deps, options.segment)];
|
|
306
|
+
case 1:
|
|
307
|
+
usedInFeatures = _a.sent();
|
|
308
|
+
if (usedInFeatures.size === 0) {
|
|
309
|
+
console.log("Segment \"".concat(options.segment, "\" is not used in any features."));
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
console.log("Segment \"".concat(options.segment, "\" is used in the following features:\n"));
|
|
313
|
+
usedInFeatures.forEach(function (featureKey) {
|
|
314
|
+
console.log(" - ".concat(featureKey));
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
return [2 /*return*/];
|
|
318
|
+
case 2:
|
|
319
|
+
if (!options.attribute) return [3 /*break*/, 4];
|
|
320
|
+
return [4 /*yield*/, findAttributeUsage(deps, options.attribute)];
|
|
321
|
+
case 3:
|
|
322
|
+
usedIn = _a.sent();
|
|
323
|
+
if (usedIn.features.size === 0 && usedIn.segments.size === 0) {
|
|
324
|
+
console.log("Attribute \"".concat(options.attribute, "\" is not used in any features or segments."));
|
|
325
|
+
return [2 /*return*/];
|
|
326
|
+
}
|
|
327
|
+
if (usedIn.features.size > 0) {
|
|
328
|
+
console.log("Attribute \"".concat(options.attribute, "\" is used in the following features:\n"));
|
|
329
|
+
usedIn.features.forEach(function (featureKey) {
|
|
330
|
+
console.log(" - ".concat(featureKey));
|
|
331
|
+
});
|
|
332
|
+
console.log("");
|
|
333
|
+
}
|
|
334
|
+
if (usedIn.segments.size > 0) {
|
|
335
|
+
console.log("Attribute \"".concat(options.attribute, "\" is used in the following segments:\n"));
|
|
336
|
+
usedIn.segments.forEach(function (segmentKey) {
|
|
337
|
+
console.log(" - ".concat(segmentKey));
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
return [2 /*return*/];
|
|
341
|
+
case 4:
|
|
342
|
+
if (!options.unusedSegments) return [3 /*break*/, 6];
|
|
343
|
+
return [4 /*yield*/, findUnusedSegments(deps)];
|
|
344
|
+
case 5:
|
|
345
|
+
unusedSegments = _a.sent();
|
|
346
|
+
if (unusedSegments.size === 0) {
|
|
347
|
+
console.log("No unused segments found.");
|
|
348
|
+
}
|
|
349
|
+
else {
|
|
350
|
+
console.log("Unused segments:\n");
|
|
351
|
+
unusedSegments.forEach(function (segmentKey) {
|
|
352
|
+
console.log(" - ".concat(segmentKey));
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
return [2 /*return*/];
|
|
356
|
+
case 6:
|
|
357
|
+
if (!options.unusedAttributes) return [3 /*break*/, 8];
|
|
358
|
+
return [4 /*yield*/, findUnusedAttributes(deps)];
|
|
359
|
+
case 7:
|
|
360
|
+
unusedAttributes = _a.sent();
|
|
361
|
+
if (unusedAttributes.size === 0) {
|
|
362
|
+
console.log("No unused attributes found.");
|
|
363
|
+
}
|
|
364
|
+
else {
|
|
365
|
+
console.log("Unused attributes:\n");
|
|
366
|
+
unusedAttributes.forEach(function (attributeKey) {
|
|
367
|
+
console.log(" - ".concat(attributeKey));
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
return [2 /*return*/];
|
|
371
|
+
case 8:
|
|
372
|
+
console.log("Please specify a segment or attribute.");
|
|
373
|
+
return [2 /*return*/];
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
exports.findUsageInProject = findUsageInProject;
|
|
379
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/find-usage/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,oDAG8B;AAE9B,SAAsB,gBAAgB,CACpC,IAAkB,EAClB,UAAsB;;;;;;oBAEd,UAAU,GAAoB,IAAI,WAAxB,EAAE,aAAa,GAAK,IAAI,cAAT,CAAU;oBAEvB,qBAAM,UAAU,CAAC,YAAY,EAAE,EAAA;;oBAA7C,WAAW,GAAG,SAA+B;oBAE7C,cAAc,GAAG,IAAI,GAAG,EAAc,CAAC;wCAElC,UAAU;;;;wCACH,qBAAM,UAAU,CAAC,WAAW,CAAC,UAAU,CAAC,EAAA;;oCAAlD,OAAO,GAAG,SAAwC;oCAClD,WAAW,GAAG,IAAI,GAAG,EAAc,CAAC;oCAE1C,uCAAuC;oCACvC,aAAa,CAAC,YAAY,CAAC,OAAO,CAAC,UAAC,WAAW;;wCAC7C,IAAI,OAAO,CAAC,UAAU,EAAE;4CACtB,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,UAAC,SAAS;gDACnC,IAAI,SAAS,CAAC,SAAS,EAAE;oDACvB,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,UAAC,QAAQ;wDACnC,IAAI,QAAQ,CAAC,SAAS,EAAE;4DACtB,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,UAAC,QAAQ;gEAClC,IAAI,QAAQ,CAAC,QAAQ,EAAE;oEACrB,IAAA,iDAA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,GAAG,CAAC,wCAAwC,CAAC,CAAC;;;;;CACvD;AAtFD,gDAsFC"}
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __exportStar(require("./site"), exports);
|
|
|
23
23
|
__exportStar(require("./generate-code"), exports);
|
|
24
24
|
__exportStar(require("./restore"), exports);
|
|
25
25
|
__exportStar(require("./find-duplicate-segments"), exports);
|
|
26
|
+
__exportStar(require("./find-usage"), exports);
|
|
26
27
|
__exportStar(require("./dependencies"), exports);
|
|
27
28
|
__exportStar(require("./datasource"), exports);
|
|
28
29
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B;AAC1B,2CAAyB;AACzB,yCAAuB;AACvB,yCAAuB;AACvB,kDAAgC;AAChC,4CAA0B;AAC1B,4DAA0C;AAC1C,iDAA+B;AAC/B,+CAA6B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B;AAC1B,2CAAyB;AACzB,yCAAuB;AACvB,yCAAuB;AACvB,kDAAgC;AAChC,4CAA0B;AAC1B,4DAA0C;AAC1C,+CAA6B;AAC7B,iDAA+B;AAC/B,+CAA6B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@featurevisor/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Core package of Featurevisor for Node.js usage",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"@types/js-yaml": "^4.0.5",
|
|
58
58
|
"@types/tar": "^6.1.4"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "4958688cc7892edeb54583ef5920975a2e6674e7"
|
|
61
61
|
}
|
|
@@ -159,7 +159,9 @@ export async function buildDatafile(
|
|
|
159
159
|
);
|
|
160
160
|
|
|
161
161
|
return {
|
|
162
|
-
conditions:
|
|
162
|
+
conditions: projectConfig.stringify
|
|
163
|
+
? JSON.stringify(override.conditions)
|
|
164
|
+
: override.conditions,
|
|
163
165
|
value: override.value,
|
|
164
166
|
};
|
|
165
167
|
}
|
|
@@ -174,9 +176,9 @@ export async function buildDatafile(
|
|
|
174
176
|
|
|
175
177
|
return {
|
|
176
178
|
segments:
|
|
177
|
-
typeof override.segments
|
|
178
|
-
? override.segments
|
|
179
|
-
:
|
|
179
|
+
typeof override.segments !== "string" && projectConfig.stringify
|
|
180
|
+
? JSON.stringify(override.segments)
|
|
181
|
+
: override.segments,
|
|
180
182
|
value: override.value,
|
|
181
183
|
};
|
|
182
184
|
}
|
|
@@ -195,7 +197,15 @@ export async function buildDatafile(
|
|
|
195
197
|
parsedFeature.environments[options.environment].rules,
|
|
196
198
|
existingState.features[featureKey],
|
|
197
199
|
featureRanges.get(featureKey) || [],
|
|
198
|
-
)
|
|
200
|
+
).map((t: Traffic) => {
|
|
201
|
+
return {
|
|
202
|
+
...t,
|
|
203
|
+
segments:
|
|
204
|
+
typeof t.segments !== "string" && projectConfig.stringify
|
|
205
|
+
? JSON.stringify(t.segments)
|
|
206
|
+
: t.segments,
|
|
207
|
+
};
|
|
208
|
+
}),
|
|
199
209
|
ranges: featureRanges.get(featureKey) || undefined,
|
|
200
210
|
};
|
|
201
211
|
|
|
@@ -278,7 +288,7 @@ export async function buildDatafile(
|
|
|
278
288
|
const segment: Segment = {
|
|
279
289
|
key: segmentKey,
|
|
280
290
|
conditions:
|
|
281
|
-
typeof parsedSegment.conditions !== "string"
|
|
291
|
+
typeof parsedSegment.conditions !== "string" && projectConfig.stringify === true
|
|
282
292
|
? JSON.stringify(parsedSegment.conditions)
|
|
283
293
|
: parsedSegment.conditions,
|
|
284
294
|
};
|
package/src/builder/traffic.ts
CHANGED
|
@@ -79,11 +79,8 @@ export function getTraffic(
|
|
|
79
79
|
const rulePercentage = parsedRule.percentage; // 0 - 100
|
|
80
80
|
|
|
81
81
|
const traffic: Traffic = {
|
|
82
|
-
key: parsedRule.key,
|
|
83
|
-
segments:
|
|
84
|
-
typeof parsedRule.segments !== "string"
|
|
85
|
-
? JSON.stringify(parsedRule.segments)
|
|
86
|
-
: parsedRule.segments,
|
|
82
|
+
key: parsedRule.key,
|
|
83
|
+
segments: parsedRule.segments,
|
|
87
84
|
percentage: rulePercentage * (MAX_BUCKETED_NUMBER / 100),
|
|
88
85
|
allocation: [],
|
|
89
86
|
};
|
|
@@ -42,6 +42,7 @@ export interface ProjectConfig {
|
|
|
42
42
|
parser: Parser;
|
|
43
43
|
prettyState: boolean;
|
|
44
44
|
prettyDatafile: boolean;
|
|
45
|
+
stringify: boolean;
|
|
45
46
|
siteExportDirectoryPath: string;
|
|
46
47
|
adapter: any; // @TODO: type this properly later
|
|
47
48
|
}
|
|
@@ -66,6 +67,7 @@ export function getProjectConfig(rootDirectoryPath: string): ProjectConfig {
|
|
|
66
67
|
|
|
67
68
|
prettyState: DEFAULT_PRETTY_STATE,
|
|
68
69
|
prettyDatafile: DEFAULT_PRETTY_DATAFILE,
|
|
70
|
+
stringify: true,
|
|
69
71
|
|
|
70
72
|
siteExportDirectoryPath: path.join(rootDirectoryPath, SITE_EXPORT_DIRECTORY_NAME),
|
|
71
73
|
|
|
@@ -78,7 +80,8 @@ export function getProjectConfig(rootDirectoryPath: string): ProjectConfig {
|
|
|
78
80
|
const mergedConfig = {};
|
|
79
81
|
|
|
80
82
|
Object.keys(baseConfig).forEach((key) => {
|
|
81
|
-
mergedConfig[key] =
|
|
83
|
+
mergedConfig[key] =
|
|
84
|
+
typeof customConfig[key] !== "undefined" ? customConfig[key] : baseConfig[key];
|
|
82
85
|
|
|
83
86
|
if (key.endsWith("Path") && mergedConfig[key].indexOf(ROOT_DIR_PLACEHOLDER) !== -1) {
|
|
84
87
|
mergedConfig[key] = mergedConfig[key].replace(ROOT_DIR_PLACEHOLDER, rootDirectoryPath);
|