@featurevisor/core 0.53.2 → 0.53.4
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 +16 -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/traffic.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/traffic.ts.html +1 -1
- package/lib/builder/buildDatafile.d.ts +1 -1
- package/lib/builder/buildDatafile.js +241 -168
- package/lib/builder/buildDatafile.js.map +1 -1
- package/lib/builder/buildProject.d.ts +1 -2
- package/lib/builder/buildProject.js +95 -45
- package/lib/builder/buildProject.js.map +1 -1
- package/lib/builder/getFeatureRanges.d.ts +1 -1
- package/lib/builder/getFeatureRanges.js +92 -31
- package/lib/builder/getFeatureRanges.js.map +1 -1
- package/lib/datasource/datasource.d.ts +23 -17
- package/lib/datasource/datasource.js +166 -69
- package/lib/datasource/datasource.js.map +1 -1
- package/lib/datasource/parsers.js +2 -2
- package/lib/datasource/parsers.js.map +1 -1
- package/lib/find-duplicate-segments/findDuplicateSegments.d.ts +1 -1
- package/lib/find-duplicate-segments/findDuplicateSegments.js +75 -18
- package/lib/find-duplicate-segments/findDuplicateSegments.js.map +1 -1
- package/lib/find-duplicate-segments/index.d.ts +1 -1
- package/lib/find-duplicate-segments/index.js +56 -9
- package/lib/find-duplicate-segments/index.js.map +1 -1
- package/lib/generate-code/index.d.ts +1 -1
- package/lib/generate-code/index.js +67 -23
- package/lib/generate-code/index.js.map +1 -1
- package/lib/generate-code/typescript.d.ts +1 -1
- package/lib/generate-code/typescript.js +139 -72
- package/lib/generate-code/typescript.js.map +1 -1
- package/lib/linter/checkCircularDependency.d.ts +1 -1
- package/lib/linter/checkCircularDependency.js +78 -22
- package/lib/linter/checkCircularDependency.js.map +1 -1
- package/lib/linter/groupSchema.js +79 -28
- package/lib/linter/groupSchema.js.map +1 -1
- package/lib/linter/lintProject.js +119 -103
- package/lib/linter/lintProject.js.map +1 -1
- package/lib/restore.d.ts +1 -1
- package/lib/restore.js +53 -11
- package/lib/restore.js.map +1 -1
- package/lib/site/exportSite.d.ts +1 -1
- package/lib/site/exportSite.js +64 -21
- package/lib/site/exportSite.js.map +1 -1
- package/lib/site/generateSiteSearchIndex.d.ts +1 -1
- package/lib/site/generateSiteSearchIndex.js +203 -111
- package/lib/site/generateSiteSearchIndex.js.map +1 -1
- package/lib/tester/testFeature.d.ts +1 -1
- package/lib/tester/testFeature.js +130 -60
- package/lib/tester/testFeature.js.map +1 -1
- package/lib/tester/testProject.d.ts +1 -1
- package/lib/tester/testProject.js +105 -48
- package/lib/tester/testProject.js.map +1 -1
- package/lib/tester/testSegment.d.ts +1 -1
- package/lib/tester/testSegment.js +69 -21
- package/lib/tester/testSegment.js.map +1 -1
- package/lib/utils.d.ts +0 -2
- package/lib/utils.js +1 -15
- package/lib/utils.js.map +1 -1
- package/package.json +2 -2
- package/src/builder/buildDatafile.ts +9 -9
- package/src/builder/buildProject.ts +4 -24
- package/src/builder/getFeatureRanges.ts +4 -4
- package/src/datasource/datasource.ts +66 -60
- package/src/datasource/parsers.ts +2 -2
- package/src/find-duplicate-segments/findDuplicateSegments.ts +9 -6
- package/src/find-duplicate-segments/index.ts +5 -2
- package/src/generate-code/index.ts +2 -2
- package/src/generate-code/typescript.ts +42 -25
- package/src/linter/checkCircularDependency.ts +4 -4
- package/src/linter/groupSchema.ts +3 -3
- package/src/linter/lintProject.ts +53 -60
- package/src/restore.ts +1 -1
- package/src/site/exportSite.ts +2 -2
- package/src/site/generateSiteSearchIndex.ts +14 -14
- package/src/tester/testFeature.ts +12 -13
- package/src/tester/testProject.ts +8 -5
- package/src/tester/testSegment.ts +3 -3
- package/src/utils.ts +0 -18
|
@@ -1,4 +1,40 @@
|
|
|
1
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
|
+
};
|
|
2
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
39
|
exports.generateCodeForProject = exports.ALLOWED_LANGUAGES_FOR_CODE_GENERATION = void 0;
|
|
4
40
|
var fs = require("fs");
|
|
@@ -8,29 +44,37 @@ var datasource_1 = require("../datasource");
|
|
|
8
44
|
var typescript_1 = require("./typescript");
|
|
9
45
|
exports.ALLOWED_LANGUAGES_FOR_CODE_GENERATION = ["typescript"];
|
|
10
46
|
function generateCodeForProject(rootDirectoryPath, projectConfig, cliOptions) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
47
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
+
var datasource, absolutePath;
|
|
49
|
+
return __generator(this, function (_a) {
|
|
50
|
+
switch (_a.label) {
|
|
51
|
+
case 0:
|
|
52
|
+
if (!cliOptions.language) {
|
|
53
|
+
throw new Error("Option `--language` is required");
|
|
54
|
+
}
|
|
55
|
+
if (!cliOptions.outDir) {
|
|
56
|
+
throw new Error("Option `--out-dir` is required");
|
|
57
|
+
}
|
|
58
|
+
datasource = new datasource_1.Datasource(projectConfig);
|
|
59
|
+
absolutePath = path.resolve(rootDirectoryPath, cliOptions.outDir);
|
|
60
|
+
if (!fs.existsSync(absolutePath)) {
|
|
61
|
+
console.log("Creating output directory: ".concat(absolutePath));
|
|
62
|
+
mkdirp.sync(absolutePath);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
console.log("Output directory already exists at: ".concat(absolutePath));
|
|
66
|
+
}
|
|
67
|
+
if (!exports.ALLOWED_LANGUAGES_FOR_CODE_GENERATION.includes(cliOptions.language)) {
|
|
68
|
+
console.log("Only these languages are supported: ".concat(exports.ALLOWED_LANGUAGES_FOR_CODE_GENERATION.join(", ")));
|
|
69
|
+
throw new Error("Language ".concat(cliOptions.language, " is not supported for code generation"));
|
|
70
|
+
}
|
|
71
|
+
if (!(cliOptions.language === "typescript")) return [3 /*break*/, 2];
|
|
72
|
+
return [4 /*yield*/, (0, typescript_1.generateTypeScriptCodeForProject)(rootDirectoryPath, projectConfig, datasource, absolutePath)];
|
|
73
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
74
|
+
case 2: throw new Error("Language ".concat(cliOptions.language, " is not supported"));
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
});
|
|
34
78
|
}
|
|
35
79
|
exports.generateCodeForProject = generateCodeForProject;
|
|
36
80
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generate-code/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generate-code/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAyB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AAC;wBAGJ,MAAM,IAAI,KAAK,CAAC,mBAAY,UAAU,CAAC,QAAQ,sBAAmB,CAAC,CAAC;;;;CACrE;AA1CD,wDA0CC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ProjectConfig } from "../config";
|
|
2
2
|
import { Datasource } from "../datasource";
|
|
3
|
-
export declare function generateTypeScriptCodeForProject(rootDirectoryPath: string, projectConfig: ProjectConfig, datasource: Datasource, outputPath: string): void
|
|
3
|
+
export declare function generateTypeScriptCodeForProject(rootDirectoryPath: string, projectConfig: ProjectConfig, datasource: Datasource, outputPath: string): Promise<void>;
|
|
@@ -1,4 +1,40 @@
|
|
|
1
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
|
+
};
|
|
2
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
39
|
exports.generateTypeScriptCodeForProject = void 0;
|
|
4
40
|
var fs = require("fs");
|
|
@@ -32,6 +68,13 @@ function getPascalCase(str) {
|
|
|
32
68
|
var pascalCased = words.map(function (word) { return word.charAt(0).toUpperCase() + word.slice(1); }).join("");
|
|
33
69
|
return pascalCased;
|
|
34
70
|
}
|
|
71
|
+
function getRelativePath(from, to) {
|
|
72
|
+
var relativePath = path.relative(from, to);
|
|
73
|
+
if (relativePath.startsWith("..")) {
|
|
74
|
+
return path.join(".", relativePath);
|
|
75
|
+
}
|
|
76
|
+
return relativePath;
|
|
77
|
+
}
|
|
35
78
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
36
79
|
function getFeaturevisorTypeFromValue(value) {
|
|
37
80
|
if (typeof value === "boolean") {
|
|
@@ -53,79 +96,103 @@ function getFeaturevisorTypeFromValue(value) {
|
|
|
53
96
|
}
|
|
54
97
|
var instanceSnippet = "\nimport { FeaturevisorInstance } from \"@featurevisor/sdk\";\n\nlet _instance: FeaturevisorInstance;\n\nexport function setInstance(instance: FeaturevisorInstance) {\n _instance = instance;\n}\n\nexport function getInstance(): FeaturevisorInstance {\n return _instance as FeaturevisorInstance;\n}\n".trimStart();
|
|
55
98
|
function generateTypeScriptCodeForProject(rootDirectoryPath, projectConfig, datasource, outputPath) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
99
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
+
var instanceFilePath, attributeFiles, attributes, _i, attributeFiles_1, attributeKey, parsedAttribute, attributeProperties, contextContent, contextTypeFilePath, featureNamespaces, featureFiles, _a, featureFiles_1, featureKey, parsedFeature, namespaceValue, variableMethods, _b, _c, variableSchema, variableKey, variableType, internalMethodName, featureContent, featureNamespaceFilePath, indexContent, indexFilePath;
|
|
101
|
+
return __generator(this, function (_d) {
|
|
102
|
+
switch (_d.label) {
|
|
103
|
+
case 0:
|
|
104
|
+
console.log("\nGenerating TypeScript code...\n");
|
|
105
|
+
instanceFilePath = path.join(outputPath, "instance.ts");
|
|
106
|
+
fs.writeFileSync(instanceFilePath, instanceSnippet);
|
|
107
|
+
console.log("Instance file written at: ".concat(getRelativePath(rootDirectoryPath, instanceFilePath)));
|
|
108
|
+
return [4 /*yield*/, datasource.listAttributes()];
|
|
109
|
+
case 1:
|
|
110
|
+
attributeFiles = _d.sent();
|
|
111
|
+
attributes = [];
|
|
112
|
+
_i = 0, attributeFiles_1 = attributeFiles;
|
|
113
|
+
_d.label = 2;
|
|
114
|
+
case 2:
|
|
115
|
+
if (!(_i < attributeFiles_1.length)) return [3 /*break*/, 5];
|
|
116
|
+
attributeKey = attributeFiles_1[_i];
|
|
117
|
+
return [4 /*yield*/, datasource.readAttribute(attributeKey)];
|
|
118
|
+
case 3:
|
|
119
|
+
parsedAttribute = _d.sent();
|
|
120
|
+
if (typeof parsedAttribute.archived === "undefined") {
|
|
121
|
+
return [3 /*break*/, 4];
|
|
122
|
+
}
|
|
123
|
+
attributes.push({
|
|
124
|
+
archived: parsedAttribute.archived,
|
|
125
|
+
key: attributeKey,
|
|
126
|
+
type: parsedAttribute.type,
|
|
127
|
+
typescriptType: convertFeaturevisorTypeToTypeScriptType(parsedAttribute.type),
|
|
128
|
+
});
|
|
129
|
+
_d.label = 4;
|
|
130
|
+
case 4:
|
|
131
|
+
_i++;
|
|
132
|
+
return [3 /*break*/, 2];
|
|
133
|
+
case 5:
|
|
134
|
+
attributeProperties = attributes
|
|
135
|
+
.map(function (attribute) {
|
|
136
|
+
return " ".concat(attribute.key, "?: ").concat(attribute.typescriptType, ";");
|
|
137
|
+
})
|
|
138
|
+
.join("\n");
|
|
139
|
+
contextContent = "\nimport { AttributeKey, AttributeValue } from \"@featurevisor/types\";\n\nexport interface Context {\n".concat(attributeProperties, "\n [key: AttributeKey]: AttributeValue;\n}\n").trimStart();
|
|
140
|
+
contextTypeFilePath = path.join(outputPath, "Context.ts");
|
|
141
|
+
fs.writeFileSync(contextTypeFilePath, contextContent);
|
|
142
|
+
console.log("Context type file written at: ".concat(getRelativePath(rootDirectoryPath, contextTypeFilePath)));
|
|
143
|
+
featureNamespaces = [];
|
|
144
|
+
return [4 /*yield*/, datasource.listFeatures()];
|
|
145
|
+
case 6:
|
|
146
|
+
featureFiles = _d.sent();
|
|
147
|
+
_a = 0, featureFiles_1 = featureFiles;
|
|
148
|
+
_d.label = 7;
|
|
149
|
+
case 7:
|
|
150
|
+
if (!(_a < featureFiles_1.length)) return [3 /*break*/, 10];
|
|
151
|
+
featureKey = featureFiles_1[_a];
|
|
152
|
+
return [4 /*yield*/, datasource.readFeature(featureKey)];
|
|
153
|
+
case 8:
|
|
154
|
+
parsedFeature = _d.sent();
|
|
155
|
+
if (typeof parsedFeature.archived !== "undefined" && parsedFeature.archived) {
|
|
156
|
+
return [3 /*break*/, 9];
|
|
157
|
+
}
|
|
158
|
+
namespaceValue = getPascalCase(featureKey) + "Feature";
|
|
159
|
+
featureNamespaces.push(namespaceValue);
|
|
160
|
+
variableMethods = "";
|
|
161
|
+
if (parsedFeature.variablesSchema) {
|
|
162
|
+
for (_b = 0, _c = parsedFeature.variablesSchema; _b < _c.length; _b++) {
|
|
163
|
+
variableSchema = _c[_b];
|
|
164
|
+
variableKey = variableSchema.key;
|
|
165
|
+
variableType = variableSchema.type;
|
|
166
|
+
internalMethodName = "getVariable".concat(variableType === "json" ? "JSON" : getPascalCase(variableType));
|
|
167
|
+
if (variableType === "json" || variableType === "object") {
|
|
168
|
+
variableMethods += "\n\n export function get".concat(getPascalCase(variableKey), "<T>(context: Context = {}) {\n return getInstance().").concat(internalMethodName, "<T>(key, \"").concat(variableKey, "\", context);\n }");
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
variableMethods += "\n\n export function get".concat(getPascalCase(variableKey), "(context: Context = {}) {\n return getInstance().").concat(internalMethodName, "(key, \"").concat(variableKey, "\", context);\n }");
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
featureContent = "\nimport { Context } from \"./Context\";\nimport { getInstance } from \"./instance\";\n\nexport namespace ".concat(namespaceValue, " {\n export const key = \"").concat(featureKey, "\";\n\n export function isEnabled(context: Context = {}) {\n return getInstance().isEnabled(key, context);\n }\n\n export function getVariation(context: Context = {}) {\n return getInstance().getVariation(key, context);\n }").concat(variableMethods, "\n}\n").trimStart();
|
|
176
|
+
featureNamespaceFilePath = path.join(outputPath, "".concat(namespaceValue, ".ts"));
|
|
177
|
+
fs.writeFileSync(featureNamespaceFilePath, featureContent);
|
|
178
|
+
console.log("Feature ".concat(featureKey, " file written at: ").concat(getRelativePath(rootDirectoryPath, featureNamespaceFilePath)));
|
|
179
|
+
_d.label = 9;
|
|
180
|
+
case 9:
|
|
181
|
+
_a++;
|
|
182
|
+
return [3 /*break*/, 7];
|
|
183
|
+
case 10:
|
|
184
|
+
indexContent = ["export * from \"./Context\";", "export * from \"./instance\";"]
|
|
185
|
+
.concat(featureNamespaces.map(function (featureNamespace) {
|
|
186
|
+
return "export * from \"./".concat(featureNamespace, "\";");
|
|
187
|
+
}))
|
|
188
|
+
.join("\n") + "\n";
|
|
189
|
+
indexFilePath = path.join(outputPath, "index.ts");
|
|
190
|
+
fs.writeFileSync(indexFilePath, indexContent);
|
|
191
|
+
console.log("Index file written at: ".concat(getRelativePath(rootDirectoryPath, indexFilePath)));
|
|
192
|
+
return [2 /*return*/];
|
|
113
193
|
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
var featureNamespaceFilePath = path.join(outputPath, "".concat(namespaceValue, ".ts"));
|
|
117
|
-
fs.writeFileSync(featureNamespaceFilePath, featureContent);
|
|
118
|
-
console.log("Feature ".concat(featureKey, " file written at: ").concat(featureNamespaceFilePath));
|
|
119
|
-
}
|
|
120
|
-
// index
|
|
121
|
-
var indexContent = ["export * from \"./Context\";", "export * from \"./instance\";"]
|
|
122
|
-
.concat(featureNamespaces.map(function (featureNamespace) {
|
|
123
|
-
return "export * from \"./".concat(featureNamespace, "\";");
|
|
124
|
-
}))
|
|
125
|
-
.join("\n") + "\n";
|
|
126
|
-
var indexFilePath = path.join(outputPath, "index.ts");
|
|
127
|
-
fs.writeFileSync(indexFilePath, indexContent);
|
|
128
|
-
console.log("Index file written at: ".concat(indexFilePath));
|
|
194
|
+
});
|
|
195
|
+
});
|
|
129
196
|
}
|
|
130
197
|
exports.generateTypeScriptCodeForProject = generateTypeScriptCodeForProject;
|
|
131
198
|
//# sourceMappingURL=typescript.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../src/generate-code/typescript.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../src/generate-code/typescript.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAyB;AACzB,2BAA6B;AAM7B,SAAS,uCAAuC,CAAC,gBAAwB;IACvE,QAAQ,gBAAgB,EAAE;QACxB,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC;QAClB,KAAK,SAAS;YACZ,OAAO,QAAQ,CAAC;QAClB,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC;QAClB,KAAK,MAAM;YACT,OAAO,eAAe,CAAC;QACzB,KAAK,OAAO;YACV,OAAO,UAAU,CAAC;QACpB,KAAK,QAAQ;YACX,OAAO,KAAK,CAAC,CAAC,8BAA8B;QAC9C,KA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export declare function checkForCircularDependencyInRequired(datasource: Datasource, featureKey: FeatureKey, required?: Required[], chain?: FeatureKey[]): void
|
|
3
|
+
export declare function checkForCircularDependencyInRequired(datasource: Datasource, featureKey: FeatureKey, required?: Required[], chain?: FeatureKey[]): Promise<void>;
|
|
@@ -1,30 +1,86 @@
|
|
|
1
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
|
+
};
|
|
2
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
39
|
exports.checkForCircularDependencyInRequired = void 0;
|
|
4
40
|
function checkForCircularDependencyInRequired(datasource, featureKey, required, chain) {
|
|
5
41
|
if (chain === void 0) { chain = []; }
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
42
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
43
|
+
var requiredKeys, _i, requiredKeys_1, requiredKey, requiredFeatureExists, requiredParsedFeature;
|
|
44
|
+
return __generator(this, function (_a) {
|
|
45
|
+
switch (_a.label) {
|
|
46
|
+
case 0:
|
|
47
|
+
if (!required) {
|
|
48
|
+
return [2 /*return*/];
|
|
49
|
+
}
|
|
50
|
+
requiredKeys = required.map(function (r) { return (typeof r === "string" ? r : r.key); });
|
|
51
|
+
if (requiredKeys.length === 0) {
|
|
52
|
+
return [2 /*return*/];
|
|
53
|
+
}
|
|
54
|
+
_i = 0, requiredKeys_1 = requiredKeys;
|
|
55
|
+
_a.label = 1;
|
|
56
|
+
case 1:
|
|
57
|
+
if (!(_i < requiredKeys_1.length)) return [3 /*break*/, 6];
|
|
58
|
+
requiredKey = requiredKeys_1[_i];
|
|
59
|
+
chain.push(requiredKey);
|
|
60
|
+
if (chain.indexOf(featureKey) > -1) {
|
|
61
|
+
throw new Error("circular dependency found: ".concat(chain.join(" -> ")));
|
|
62
|
+
}
|
|
63
|
+
return [4 /*yield*/, datasource.entityExists("feature", requiredKey)];
|
|
64
|
+
case 2:
|
|
65
|
+
requiredFeatureExists = _a.sent();
|
|
66
|
+
if (!requiredFeatureExists) {
|
|
67
|
+
throw new Error("required feature \"".concat(requiredKey, "\" not found"));
|
|
68
|
+
}
|
|
69
|
+
return [4 /*yield*/, datasource.readFeature(requiredKey)];
|
|
70
|
+
case 3:
|
|
71
|
+
requiredParsedFeature = _a.sent();
|
|
72
|
+
if (!requiredParsedFeature.required) return [3 /*break*/, 5];
|
|
73
|
+
return [4 /*yield*/, checkForCircularDependencyInRequired(datasource, featureKey, requiredParsedFeature.required, chain)];
|
|
74
|
+
case 4:
|
|
75
|
+
_a.sent();
|
|
76
|
+
_a.label = 5;
|
|
77
|
+
case 5:
|
|
78
|
+
_i++;
|
|
79
|
+
return [3 /*break*/, 1];
|
|
80
|
+
case 6: return [2 /*return*/];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
});
|
|
28
84
|
}
|
|
29
85
|
exports.checkForCircularDependencyInRequired = checkForCircularDependencyInRequired;
|
|
30
86
|
//# sourceMappingURL=checkCircularDependency.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkCircularDependency.js","sourceRoot":"","sources":["../../src/linter/checkCircularDependency.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"checkCircularDependency.js","sourceRoot":"","sources":["../../src/linter/checkCircularDependency.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAAsB,oCAAoC,CACxD,UAAsB,EACtB,UAAsB,EACtB,QAAqB,EACrB,KAAwB;IAAxB,sBAAA,EAAA,UAAwB;;;;;;oBAExB,IAAI,CAAC,QAAQ,EAAE;wBACb,sBAAO;qBACR;oBAEK,YAAY,GAAG,QAAQ,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAnC,CAAmC,CAAC,CAAC;oBAE9E,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE;wBAC7B,sBAAO;qBACR;0BAEqC,EAAZ,6BAAY;;;yBAAZ,CAAA,0BAAY,CAAA;oBAA3B,WAAW;oBACpB,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;oBAExB,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE;wBAClC,MAAM,IAAI,KAAK,CAAC,qCAA8B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAE,CAAC,CAAC;qBACrE;oBAE6B,qBAAM,UAAU,CAAC,YAAY,CAAC,SAAS,EAAE,WAAW,CAAC,EAAA;;oBAA7E,qBAAqB,GAAG,SAAqD;oBAEnF,IAAI,CAAC,qBAAqB,EAAE;wBAC1B,MAAM,IAAI,KAAK,CAAC,6BAAqB,WAAW,iBAAa,CAAC,CAAC;qBAChE;oBAE6B,qBAAM,UAAU,CAAC,WAAW,CAAC,WAAW,CAAC,EAAA;;oBAAjE,qBAAqB,GAAG,SAA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