@featurevisor/core 1.34.2 → 1.35.1
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/CHANGELOG.md +22 -0
- package/coverage/clover.xml +2 -2
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/lib/builder/allocator.js.html +1 -1
- package/coverage/lcov-report/lib/builder/index.html +1 -1
- package/coverage/lcov-report/lib/builder/revision.js.html +1 -1
- package/coverage/lcov-report/lib/builder/traffic.js.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/src/builder/revision.ts.html +1 -1
- package/coverage/lcov-report/src/builder/traffic.ts.html +1 -1
- 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/lib/cli/plugins.js +2 -0
- package/lib/cli/plugins.js.map +1 -1
- package/lib/datasource/filesystemAdapter.js +6 -2
- package/lib/datasource/filesystemAdapter.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/list/index.d.ts +4 -0
- package/lib/list/index.js +555 -0
- package/lib/list/index.js.map +1 -0
- package/lib/tester/index.d.ts +1 -0
- package/lib/tester/index.js +1 -0
- package/lib/tester/index.js.map +1 -1
- package/package.json +5 -5
- package/src/cli/plugins.ts +2 -0
- package/src/datasource/filesystemAdapter.ts +7 -1
- package/src/index.ts +1 -0
- package/src/list/index.ts +496 -0
- package/src/tester/index.ts +1 -0
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
24
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
+
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;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
+
exports.listPlugin = void 0;
|
|
51
|
+
exports.listProject = listProject;
|
|
52
|
+
var tester_1 = require("../tester");
|
|
53
|
+
function getEntitiesWithTests(deps) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
55
|
+
var datasource, featuresWithTests, segmentsWithTests, tests, _i, tests_1, testKey, test_1;
|
|
56
|
+
return __generator(this, function (_a) {
|
|
57
|
+
switch (_a.label) {
|
|
58
|
+
case 0:
|
|
59
|
+
datasource = deps.datasource;
|
|
60
|
+
featuresWithTests = new Set();
|
|
61
|
+
segmentsWithTests = new Set();
|
|
62
|
+
return [4 /*yield*/, datasource.listTests()];
|
|
63
|
+
case 1:
|
|
64
|
+
tests = _a.sent();
|
|
65
|
+
_i = 0, tests_1 = tests;
|
|
66
|
+
_a.label = 2;
|
|
67
|
+
case 2:
|
|
68
|
+
if (!(_i < tests_1.length)) return [3 /*break*/, 5];
|
|
69
|
+
testKey = tests_1[_i];
|
|
70
|
+
return [4 /*yield*/, datasource.readTest(testKey)];
|
|
71
|
+
case 3:
|
|
72
|
+
test_1 = _a.sent();
|
|
73
|
+
if (test_1.feature) {
|
|
74
|
+
featuresWithTests.add(test_1.feature);
|
|
75
|
+
}
|
|
76
|
+
if (test_1.segment) {
|
|
77
|
+
segmentsWithTests.add(test_1.segment);
|
|
78
|
+
}
|
|
79
|
+
_a.label = 4;
|
|
80
|
+
case 4:
|
|
81
|
+
_i++;
|
|
82
|
+
return [3 /*break*/, 2];
|
|
83
|
+
case 5: return [2 /*return*/, {
|
|
84
|
+
features: Array.from(featuresWithTests),
|
|
85
|
+
segments: Array.from(segmentsWithTests),
|
|
86
|
+
}];
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function listEntities(deps, entityType) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
93
|
+
function initializeEntitiesWithTests() {
|
|
94
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
95
|
+
return __generator(this, function (_a) {
|
|
96
|
+
switch (_a.label) {
|
|
97
|
+
case 0:
|
|
98
|
+
if (entitiesWithTestsInitialized) {
|
|
99
|
+
return [2 /*return*/];
|
|
100
|
+
}
|
|
101
|
+
return [4 /*yield*/, getEntitiesWithTests(deps)];
|
|
102
|
+
case 1:
|
|
103
|
+
entitiesWithTests = _a.sent();
|
|
104
|
+
entitiesWithTestsInitialized = true;
|
|
105
|
+
return [2 /*return*/];
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
var datasource, options, result, entityKeys, entitiesWithTests, entitiesWithTestsInitialized, _loop_1, _i, entityKeys_1, key;
|
|
111
|
+
return __generator(this, function (_a) {
|
|
112
|
+
switch (_a.label) {
|
|
113
|
+
case 0:
|
|
114
|
+
datasource = deps.datasource, options = deps.options;
|
|
115
|
+
result = [];
|
|
116
|
+
entityKeys = [];
|
|
117
|
+
if (!(entityType === "feature")) return [3 /*break*/, 2];
|
|
118
|
+
return [4 /*yield*/, datasource.listFeatures()];
|
|
119
|
+
case 1:
|
|
120
|
+
entityKeys = _a.sent();
|
|
121
|
+
return [3 /*break*/, 8];
|
|
122
|
+
case 2:
|
|
123
|
+
if (!(entityType === "segment")) return [3 /*break*/, 4];
|
|
124
|
+
return [4 /*yield*/, datasource.listSegments()];
|
|
125
|
+
case 3:
|
|
126
|
+
entityKeys = _a.sent();
|
|
127
|
+
return [3 /*break*/, 8];
|
|
128
|
+
case 4:
|
|
129
|
+
if (!(entityType === "attribute")) return [3 /*break*/, 6];
|
|
130
|
+
return [4 /*yield*/, datasource.listAttributes()];
|
|
131
|
+
case 5:
|
|
132
|
+
entityKeys = _a.sent();
|
|
133
|
+
return [3 /*break*/, 8];
|
|
134
|
+
case 6:
|
|
135
|
+
if (!(entityType === "test")) return [3 /*break*/, 8];
|
|
136
|
+
return [4 /*yield*/, datasource.listTests()];
|
|
137
|
+
case 7:
|
|
138
|
+
entityKeys = _a.sent();
|
|
139
|
+
_a.label = 8;
|
|
140
|
+
case 8:
|
|
141
|
+
if (entityKeys.length === 0) {
|
|
142
|
+
return [2 /*return*/, result];
|
|
143
|
+
}
|
|
144
|
+
entitiesWithTests = {
|
|
145
|
+
features: [],
|
|
146
|
+
segments: [],
|
|
147
|
+
};
|
|
148
|
+
entitiesWithTestsInitialized = false;
|
|
149
|
+
_loop_1 = function (key) {
|
|
150
|
+
var entity, parsedFeature_1, archivedStatus, description, regex, disabledInEnvironment, enabledInEnvironment, regex, tags, hasTags, lookForVariables, variablesInFeature_1, hasVariables, lookForVariations, variationsInFeature_1, hasVariations, hasVariables, hasVariations, hasVariables, hasVariations, segment, archivedStatus, description, regex, regex, attribute, archivedStatus, description, regex, regex, test_2, testEntityKey, testEntityType, testAssertions, assertionsAfterApplyingMatrix, aIndex, processedAssertions, assertionsAfterApplyingMatrix, aIndex, processedAssertions, regex, regex_1;
|
|
151
|
+
return __generator(this, function (_b) {
|
|
152
|
+
switch (_b.label) {
|
|
153
|
+
case 0:
|
|
154
|
+
entity = {};
|
|
155
|
+
if (!(entityType === "feature")) return [3 /*break*/, 2];
|
|
156
|
+
return [4 /*yield*/, datasource.readFeature(key)];
|
|
157
|
+
case 1:
|
|
158
|
+
entity = (_b.sent());
|
|
159
|
+
return [3 /*break*/, 8];
|
|
160
|
+
case 2:
|
|
161
|
+
if (!(entityType === "segment")) return [3 /*break*/, 4];
|
|
162
|
+
return [4 /*yield*/, datasource.readSegment(key)];
|
|
163
|
+
case 3:
|
|
164
|
+
entity = (_b.sent());
|
|
165
|
+
return [3 /*break*/, 8];
|
|
166
|
+
case 4:
|
|
167
|
+
if (!(entityType === "attribute")) return [3 /*break*/, 6];
|
|
168
|
+
return [4 /*yield*/, datasource.readAttribute(key)];
|
|
169
|
+
case 5:
|
|
170
|
+
entity = (_b.sent());
|
|
171
|
+
return [3 /*break*/, 8];
|
|
172
|
+
case 6:
|
|
173
|
+
if (!(entityType === "test")) return [3 /*break*/, 8];
|
|
174
|
+
return [4 /*yield*/, datasource.readTest(key)];
|
|
175
|
+
case 7:
|
|
176
|
+
entity = (_b.sent());
|
|
177
|
+
_b.label = 8;
|
|
178
|
+
case 8:
|
|
179
|
+
if (!(entityType === "feature")) return [3 /*break*/, 13];
|
|
180
|
+
parsedFeature_1 = entity;
|
|
181
|
+
// --archived=true|false
|
|
182
|
+
if (parsedFeature_1.archived) {
|
|
183
|
+
archivedStatus = options.archived === "false";
|
|
184
|
+
if (parsedFeature_1.archived !== archivedStatus) {
|
|
185
|
+
return [2 /*return*/, "continue"];
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
// --description=<pattern>
|
|
189
|
+
if (options.description) {
|
|
190
|
+
description = parsedFeature_1.description || "";
|
|
191
|
+
regex = new RegExp(options.description, "i");
|
|
192
|
+
if (!regex.test(description)) {
|
|
193
|
+
return [2 /*return*/, "continue"];
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
// --disabledIn=<environment>
|
|
197
|
+
if (options.disabledIn &&
|
|
198
|
+
parsedFeature_1.environments &&
|
|
199
|
+
parsedFeature_1.environments[options.disabledIn]) {
|
|
200
|
+
disabledInEnvironment = parsedFeature_1.environments[options.disabledIn].rules.every(function (rule) {
|
|
201
|
+
return rule.percentage === 0;
|
|
202
|
+
});
|
|
203
|
+
if (!disabledInEnvironment) {
|
|
204
|
+
return [2 /*return*/, "continue"];
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
// --enabledIn=<environment>
|
|
208
|
+
if (options.enabledIn &&
|
|
209
|
+
parsedFeature_1.environments &&
|
|
210
|
+
parsedFeature_1.environments[options.enabledIn]) {
|
|
211
|
+
enabledInEnvironment = parsedFeature_1.environments[options.enabledIn].rules.some(function (rule) {
|
|
212
|
+
return rule.percentage > 0;
|
|
213
|
+
});
|
|
214
|
+
if (!enabledInEnvironment) {
|
|
215
|
+
return [2 /*return*/, "continue"];
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
// --keyPattern=<pattern>
|
|
219
|
+
if (options.keyPattern) {
|
|
220
|
+
regex = new RegExp(options.keyPattern, "i");
|
|
221
|
+
if (!regex.test(key)) {
|
|
222
|
+
return [2 /*return*/, "continue"];
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
// --tag=<tag>
|
|
226
|
+
if (options.tag) {
|
|
227
|
+
tags = Array.isArray(options.tag) ? options.tag : [options.tag];
|
|
228
|
+
hasTags = tags.every(function (tag) { return parsedFeature_1.tags.includes(tag); });
|
|
229
|
+
if (!hasTags) {
|
|
230
|
+
return [2 /*return*/, "continue"];
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
// --variable=<variableKey>
|
|
234
|
+
if (options.variable) {
|
|
235
|
+
lookForVariables = Array.isArray(options.variable)
|
|
236
|
+
? options.variable
|
|
237
|
+
: [options.variable];
|
|
238
|
+
variablesInFeature_1 = [];
|
|
239
|
+
if (Array.isArray(parsedFeature_1.variablesSchema)) {
|
|
240
|
+
variablesInFeature_1 = parsedFeature_1.variablesSchema.map(function (variable) { return variable.key; });
|
|
241
|
+
}
|
|
242
|
+
else if (parsedFeature_1.variablesSchema) {
|
|
243
|
+
variablesInFeature_1 = Object.keys(parsedFeature_1.variablesSchema);
|
|
244
|
+
}
|
|
245
|
+
hasVariables = lookForVariables.every(function (variable) {
|
|
246
|
+
return variablesInFeature_1.includes(variable);
|
|
247
|
+
});
|
|
248
|
+
if (!hasVariables) {
|
|
249
|
+
return [2 /*return*/, "continue"];
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
// --variation=<variationValue>
|
|
253
|
+
if (options.variation) {
|
|
254
|
+
lookForVariations = Array.isArray(options.variation)
|
|
255
|
+
? options.variation
|
|
256
|
+
: [options.variation];
|
|
257
|
+
variationsInFeature_1 = parsedFeature_1.variations
|
|
258
|
+
? parsedFeature_1.variations.map(function (v) { return v.value; })
|
|
259
|
+
: [];
|
|
260
|
+
hasVariations = lookForVariations.every(function (variation) {
|
|
261
|
+
return variationsInFeature_1.includes(variation);
|
|
262
|
+
});
|
|
263
|
+
if (!hasVariations) {
|
|
264
|
+
return [2 /*return*/, "continue"];
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
if (!options.withTests) return [3 /*break*/, 10];
|
|
268
|
+
return [4 /*yield*/, initializeEntitiesWithTests()];
|
|
269
|
+
case 9:
|
|
270
|
+
_b.sent();
|
|
271
|
+
if (!entitiesWithTests.features.includes(key)) {
|
|
272
|
+
return [2 /*return*/, "continue"];
|
|
273
|
+
}
|
|
274
|
+
_b.label = 10;
|
|
275
|
+
case 10:
|
|
276
|
+
// --with-variables
|
|
277
|
+
if (options.withVariables) {
|
|
278
|
+
hasVariables = parsedFeature_1.variablesSchema;
|
|
279
|
+
if (!hasVariables) {
|
|
280
|
+
return [2 /*return*/, "continue"];
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
// --with-variations
|
|
284
|
+
if (options.withVariations) {
|
|
285
|
+
hasVariations = parsedFeature_1.variations;
|
|
286
|
+
if (!hasVariations) {
|
|
287
|
+
return [2 /*return*/, "continue"];
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
if (!options.withoutTests) return [3 /*break*/, 12];
|
|
291
|
+
return [4 /*yield*/, initializeEntitiesWithTests()];
|
|
292
|
+
case 11:
|
|
293
|
+
_b.sent();
|
|
294
|
+
if (entitiesWithTests.features.includes(key)) {
|
|
295
|
+
return [2 /*return*/, "continue"];
|
|
296
|
+
}
|
|
297
|
+
_b.label = 12;
|
|
298
|
+
case 12:
|
|
299
|
+
// --without-variables
|
|
300
|
+
if (options.withoutVariables) {
|
|
301
|
+
hasVariables = parsedFeature_1.variablesSchema;
|
|
302
|
+
if (hasVariables) {
|
|
303
|
+
return [2 /*return*/, "continue"];
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
// --without-variations
|
|
307
|
+
if (options.withoutVariations) {
|
|
308
|
+
hasVariations = parsedFeature_1.variations;
|
|
309
|
+
if (hasVariations) {
|
|
310
|
+
return [2 /*return*/, "continue"];
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
return [3 /*break*/, 19];
|
|
314
|
+
case 13:
|
|
315
|
+
if (!(entityType === "segment")) return [3 /*break*/, 18];
|
|
316
|
+
segment = entity;
|
|
317
|
+
// --archived=true|false
|
|
318
|
+
if (segment.archived) {
|
|
319
|
+
archivedStatus = options.archived === "false";
|
|
320
|
+
if (segment.archived !== archivedStatus) {
|
|
321
|
+
return [2 /*return*/, "continue"];
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
// --description=<pattern>
|
|
325
|
+
if (options.description) {
|
|
326
|
+
description = segment.description || "";
|
|
327
|
+
regex = new RegExp(options.description, "i");
|
|
328
|
+
if (!regex.test(description)) {
|
|
329
|
+
return [2 /*return*/, "continue"];
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
// --keyPattern=<pattern>
|
|
333
|
+
if (options.keyPattern) {
|
|
334
|
+
regex = new RegExp(options.keyPattern, "i");
|
|
335
|
+
if (!regex.test(key)) {
|
|
336
|
+
return [2 /*return*/, "continue"];
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
if (!options.withTests) return [3 /*break*/, 15];
|
|
340
|
+
return [4 /*yield*/, initializeEntitiesWithTests()];
|
|
341
|
+
case 14:
|
|
342
|
+
_b.sent();
|
|
343
|
+
if (!entitiesWithTests.segments.includes(key)) {
|
|
344
|
+
return [2 /*return*/, "continue"];
|
|
345
|
+
}
|
|
346
|
+
_b.label = 15;
|
|
347
|
+
case 15:
|
|
348
|
+
if (!options.withoutTests) return [3 /*break*/, 17];
|
|
349
|
+
return [4 /*yield*/, initializeEntitiesWithTests()];
|
|
350
|
+
case 16:
|
|
351
|
+
_b.sent();
|
|
352
|
+
if (entitiesWithTests.segments.includes(key)) {
|
|
353
|
+
return [2 /*return*/, "continue"];
|
|
354
|
+
}
|
|
355
|
+
_b.label = 17;
|
|
356
|
+
case 17: return [3 /*break*/, 19];
|
|
357
|
+
case 18:
|
|
358
|
+
if (entityType === "attribute") {
|
|
359
|
+
attribute = entity;
|
|
360
|
+
// --archived=true|false
|
|
361
|
+
if (options.archived) {
|
|
362
|
+
archivedStatus = options.archived === "false";
|
|
363
|
+
if (attribute.archived !== archivedStatus) {
|
|
364
|
+
return [2 /*return*/, "continue"];
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
// --description=<pattern>
|
|
368
|
+
if (options.description) {
|
|
369
|
+
description = attribute.description || "";
|
|
370
|
+
regex = new RegExp(options.description, "i");
|
|
371
|
+
if (!regex.test(description)) {
|
|
372
|
+
return [2 /*return*/, "continue"];
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
// --keyPattern=<pattern>
|
|
376
|
+
if (options.keyPattern) {
|
|
377
|
+
regex = new RegExp(options.keyPattern, "i");
|
|
378
|
+
if (!regex.test(key)) {
|
|
379
|
+
return [2 /*return*/, "continue"];
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
else if (entityType === "test") {
|
|
384
|
+
test_2 = entity;
|
|
385
|
+
testEntityKey = test_2.feature || test_2.segment;
|
|
386
|
+
testEntityType = test_2.segment ? "segment" : "feature";
|
|
387
|
+
testAssertions = test_2.assertions;
|
|
388
|
+
// --apply-matrix
|
|
389
|
+
if (options.applyMatrix) {
|
|
390
|
+
if (testEntityType === "feature") {
|
|
391
|
+
assertionsAfterApplyingMatrix = [];
|
|
392
|
+
for (aIndex = 0; aIndex < testAssertions.length; aIndex++) {
|
|
393
|
+
processedAssertions = (0, tester_1.getFeatureAssertionsFromMatrix)(aIndex, testAssertions[aIndex]);
|
|
394
|
+
assertionsAfterApplyingMatrix =
|
|
395
|
+
assertionsAfterApplyingMatrix.concat(processedAssertions);
|
|
396
|
+
}
|
|
397
|
+
testAssertions = assertionsAfterApplyingMatrix;
|
|
398
|
+
}
|
|
399
|
+
else if (testEntityType === "segment") {
|
|
400
|
+
assertionsAfterApplyingMatrix = [];
|
|
401
|
+
for (aIndex = 0; aIndex < testAssertions.length; aIndex++) {
|
|
402
|
+
processedAssertions = (0, tester_1.getSegmentAssertionsFromMatrix)(aIndex, testAssertions[aIndex]);
|
|
403
|
+
assertionsAfterApplyingMatrix =
|
|
404
|
+
assertionsAfterApplyingMatrix.concat(processedAssertions);
|
|
405
|
+
}
|
|
406
|
+
testAssertions = assertionsAfterApplyingMatrix;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
// --keyPattern=<pattern>
|
|
410
|
+
if (options.keyPattern) {
|
|
411
|
+
regex = new RegExp(options.keyPattern, "i");
|
|
412
|
+
if (!regex.test(testEntityKey)) {
|
|
413
|
+
return [2 /*return*/, "continue"];
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
// --assertionPattern=<pattern>
|
|
417
|
+
if (options.assertionPattern) {
|
|
418
|
+
regex_1 = new RegExp(options.assertionPattern, "i");
|
|
419
|
+
testAssertions = testAssertions.filter(function (assertion) {
|
|
420
|
+
if (!assertion.description) {
|
|
421
|
+
return false;
|
|
422
|
+
}
|
|
423
|
+
return regex_1.test(assertion.description);
|
|
424
|
+
});
|
|
425
|
+
if (testAssertions.length === 0) {
|
|
426
|
+
return [2 /*return*/, "continue"];
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
entity.assertions = testAssertions;
|
|
430
|
+
}
|
|
431
|
+
_b.label = 19;
|
|
432
|
+
case 19:
|
|
433
|
+
result.push(__assign(__assign({}, entity), { key: key }));
|
|
434
|
+
return [2 /*return*/];
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
};
|
|
438
|
+
_i = 0, entityKeys_1 = entityKeys;
|
|
439
|
+
_a.label = 9;
|
|
440
|
+
case 9:
|
|
441
|
+
if (!(_i < entityKeys_1.length)) return [3 /*break*/, 12];
|
|
442
|
+
key = entityKeys_1[_i];
|
|
443
|
+
return [5 /*yield**/, _loop_1(key)];
|
|
444
|
+
case 10:
|
|
445
|
+
_a.sent();
|
|
446
|
+
_a.label = 11;
|
|
447
|
+
case 11:
|
|
448
|
+
_i++;
|
|
449
|
+
return [3 /*break*/, 9];
|
|
450
|
+
case 12: return [2 /*return*/, result];
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
function ucfirst(str) {
|
|
456
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
457
|
+
}
|
|
458
|
+
function printResult(_a) {
|
|
459
|
+
var result = _a.result, entityType = _a.entityType, options = _a.options;
|
|
460
|
+
if (options.json) {
|
|
461
|
+
console.log(options.pretty ? JSON.stringify(result, null, 2) : JSON.stringify(result));
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
if (result.length === 0) {
|
|
465
|
+
console.log("No ".concat(entityType, "s found."));
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
console.log("\n".concat(ucfirst(entityType), "s:\n"));
|
|
469
|
+
for (var _i = 0, result_1 = result; _i < result_1.length; _i++) {
|
|
470
|
+
var item = result_1[_i];
|
|
471
|
+
console.log("- ".concat(item.key));
|
|
472
|
+
}
|
|
473
|
+
console.log("\n\nFound ".concat(result.length, " ").concat(entityType, "s."));
|
|
474
|
+
}
|
|
475
|
+
function listProject(deps) {
|
|
476
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
477
|
+
var rootDirectoryPath, projectConfig, datasource, options, result, result, result, result;
|
|
478
|
+
return __generator(this, function (_a) {
|
|
479
|
+
switch (_a.label) {
|
|
480
|
+
case 0:
|
|
481
|
+
rootDirectoryPath = deps.rootDirectoryPath, projectConfig = deps.projectConfig, datasource = deps.datasource, options = deps.options;
|
|
482
|
+
if (!options.features) return [3 /*break*/, 2];
|
|
483
|
+
return [4 /*yield*/, listEntities(deps, "feature")];
|
|
484
|
+
case 1:
|
|
485
|
+
result = _a.sent();
|
|
486
|
+
return [2 /*return*/, printResult({
|
|
487
|
+
result: result,
|
|
488
|
+
entityType: "feature",
|
|
489
|
+
options: options,
|
|
490
|
+
})];
|
|
491
|
+
case 2:
|
|
492
|
+
if (!options.segments) return [3 /*break*/, 4];
|
|
493
|
+
return [4 /*yield*/, listEntities(deps, "segment")];
|
|
494
|
+
case 3:
|
|
495
|
+
result = _a.sent();
|
|
496
|
+
return [2 /*return*/, printResult({
|
|
497
|
+
result: result,
|
|
498
|
+
entityType: "segment",
|
|
499
|
+
options: options,
|
|
500
|
+
})];
|
|
501
|
+
case 4:
|
|
502
|
+
if (!options.attributes) return [3 /*break*/, 6];
|
|
503
|
+
return [4 /*yield*/, listEntities(deps, "attribute")];
|
|
504
|
+
case 5:
|
|
505
|
+
result = _a.sent();
|
|
506
|
+
return [2 /*return*/, printResult({
|
|
507
|
+
result: result,
|
|
508
|
+
entityType: "attribute",
|
|
509
|
+
options: options,
|
|
510
|
+
})];
|
|
511
|
+
case 6:
|
|
512
|
+
if (!options.tests) return [3 /*break*/, 8];
|
|
513
|
+
return [4 /*yield*/, listEntities(deps, "test")];
|
|
514
|
+
case 7:
|
|
515
|
+
result = _a.sent();
|
|
516
|
+
return [2 /*return*/, printResult({
|
|
517
|
+
result: result,
|
|
518
|
+
entityType: "test",
|
|
519
|
+
options: options,
|
|
520
|
+
})];
|
|
521
|
+
case 8:
|
|
522
|
+
console.log("\nNothing to list. \n\nPlease pass `--features`, `--segments`, or `--attributes`.");
|
|
523
|
+
return [2 /*return*/];
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
exports.listPlugin = {
|
|
529
|
+
command: "list",
|
|
530
|
+
handler: function (_a) {
|
|
531
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
532
|
+
var rootDirectoryPath = _b.rootDirectoryPath, projectConfig = _b.projectConfig, datasource = _b.datasource, parsed = _b.parsed;
|
|
533
|
+
return __generator(this, function (_c) {
|
|
534
|
+
switch (_c.label) {
|
|
535
|
+
case 0: return [4 /*yield*/, listProject({
|
|
536
|
+
rootDirectoryPath: rootDirectoryPath,
|
|
537
|
+
projectConfig: projectConfig,
|
|
538
|
+
datasource: datasource,
|
|
539
|
+
options: parsed,
|
|
540
|
+
})];
|
|
541
|
+
case 1:
|
|
542
|
+
_c.sent();
|
|
543
|
+
return [2 /*return*/];
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
});
|
|
547
|
+
},
|
|
548
|
+
examples: [
|
|
549
|
+
{
|
|
550
|
+
command: "list",
|
|
551
|
+
description: "list entities",
|
|
552
|
+
},
|
|
553
|
+
],
|
|
554
|
+
};
|
|
555
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/list/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;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ACf,OAAO,EAAE;4DAAgB,EAAwD;gBAAtD,iBAAiB,uBAAA,EAAE,aAAa,mBAAA,EAAE,UAAU,gBAAA,EAAE,MAAM,YAAA;;;4BAC7E,qBAAM,WAAW,CAAC;4BAChB,iBAAiB,mBAAA;4BACjB,aAAa,eAAA;4BACb,UAAU,YAAA;4BACV,OAAO,EAAE,MAAM;yBAChB,CAAC,EAAA;;wBALF,SAKE,CAAC;;;;;KACJ;IACD,QAAQ,EAAE;QACR;YACE,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,eAAe;SAC7B;KACF;CACF,CAAC"}
|
package/lib/tester/index.d.ts
CHANGED
package/lib/tester/index.js
CHANGED
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./testProject"), exports);
|
|
18
18
|
__exportStar(require("./testFeature"), exports);
|
|
19
|
+
__exportStar(require("./matrix"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
package/lib/tester/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tester/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,gDAA8B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tester/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,gDAA8B;AAC9B,2CAAyB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@featurevisor/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.35.1",
|
|
4
4
|
"description": "Core package of Featurevisor for Node.js usage",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
},
|
|
41
41
|
"license": "MIT",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@featurevisor/sdk": "1.
|
|
44
|
-
"@featurevisor/site": "1.
|
|
45
|
-
"@featurevisor/types": "1.
|
|
43
|
+
"@featurevisor/sdk": "1.35.0",
|
|
44
|
+
"@featurevisor/site": "1.35.0",
|
|
45
|
+
"@featurevisor/types": "1.35.0",
|
|
46
46
|
"axios": "^1.3.4",
|
|
47
47
|
"js-yaml": "^4.1.0",
|
|
48
48
|
"mkdirp": "^2.1.3",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"@types/js-yaml": "^4.0.5",
|
|
55
55
|
"@types/tar": "^6.1.4"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "9e900582e475ad8df9b65cc0b2e2282c28a5e25a"
|
|
58
58
|
}
|
package/src/cli/plugins.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { configPlugin } from "../config";
|
|
|
13
13
|
import { evaluatePlugin } from "../evaluate";
|
|
14
14
|
import { assessDistributionPlugin } from "../assess-distribution";
|
|
15
15
|
import { infoPlugin } from "../info";
|
|
16
|
+
import { listPlugin } from "../list";
|
|
16
17
|
import { sitePlugin } from "../site";
|
|
17
18
|
|
|
18
19
|
// that do not require an existing project
|
|
@@ -32,6 +33,7 @@ export const projectBasedPlugins: Plugin[] = [
|
|
|
32
33
|
evaluatePlugin,
|
|
33
34
|
assessDistributionPlugin,
|
|
34
35
|
infoPlugin,
|
|
36
|
+
listPlugin,
|
|
35
37
|
sitePlugin,
|
|
36
38
|
];
|
|
37
39
|
|