@featurevisor/core 2.20.0 → 2.22.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.
Files changed (87) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/coverage/clover.xml +1286 -515
  3. package/coverage/coverage-final.json +17 -16
  4. package/coverage/lcov-report/builder/allocator.ts.html +1 -1
  5. package/coverage/lcov-report/builder/buildDatafile.ts.html +1 -1
  6. package/coverage/lcov-report/builder/buildScopedConditions.ts.html +1 -1
  7. package/coverage/lcov-report/builder/buildScopedDatafile.ts.html +1 -1
  8. package/coverage/lcov-report/builder/buildScopedSegments.ts.html +1 -1
  9. package/coverage/lcov-report/builder/convertToV1.ts.html +1 -1
  10. package/coverage/lcov-report/builder/getFeatureRanges.ts.html +1 -1
  11. package/coverage/lcov-report/builder/hashes.ts.html +1 -1
  12. package/coverage/lcov-report/builder/index.html +1 -1
  13. package/coverage/lcov-report/builder/mutateVariables.ts.html +1 -1
  14. package/coverage/lcov-report/builder/mutator.ts.html +1 -1
  15. package/coverage/lcov-report/builder/revision.ts.html +1 -1
  16. package/coverage/lcov-report/builder/traffic.ts.html +1 -1
  17. package/coverage/lcov-report/config/index.html +1 -1
  18. package/coverage/lcov-report/config/index.ts.html +1 -1
  19. package/coverage/lcov-report/config/projectConfig.ts.html +42 -42
  20. package/coverage/lcov-report/datasource/adapter.ts.html +2 -2
  21. package/coverage/lcov-report/datasource/datasource.ts.html +43 -43
  22. package/coverage/lcov-report/datasource/filesystemAdapter.ts.html +48 -48
  23. package/coverage/lcov-report/datasource/index.html +19 -19
  24. package/coverage/lcov-report/datasource/index.ts.html +4 -4
  25. package/coverage/lcov-report/generate-code/index.html +116 -0
  26. package/coverage/lcov-report/generate-code/typescript.ts.html +3004 -0
  27. package/coverage/lcov-report/index.html +44 -29
  28. package/coverage/lcov-report/linter/attributeSchema.ts.html +1815 -30
  29. package/coverage/lcov-report/linter/checkCircularDependency.ts.html +1 -1
  30. package/coverage/lcov-report/linter/checkPercentageExceedingSlot.ts.html +1 -1
  31. package/coverage/lcov-report/linter/conditionSchema.ts.html +1606 -157
  32. package/coverage/lcov-report/linter/featureSchema.ts.html +56 -56
  33. package/coverage/lcov-report/linter/groupSchema.ts.html +1 -1
  34. package/coverage/lcov-report/linter/index.html +39 -39
  35. package/coverage/lcov-report/linter/lintProject.ts.html +189 -78
  36. package/coverage/lcov-report/linter/mutationNotation.ts.html +1 -1
  37. package/coverage/lcov-report/linter/printError.ts.html +1 -1
  38. package/coverage/lcov-report/linter/schema.ts.html +59 -59
  39. package/coverage/lcov-report/linter/segmentSchema.ts.html +3 -3
  40. package/coverage/lcov-report/linter/testSchema.ts.html +6 -6
  41. package/coverage/lcov-report/list/index.html +1 -1
  42. package/coverage/lcov-report/list/matrix.ts.html +1 -1
  43. package/coverage/lcov-report/parsers/index.html +1 -1
  44. package/coverage/lcov-report/parsers/index.ts.html +4 -4
  45. package/coverage/lcov-report/parsers/json.ts.html +2 -2
  46. package/coverage/lcov-report/parsers/yml.ts.html +6 -6
  47. package/coverage/lcov-report/tester/cliFormat.ts.html +1 -1
  48. package/coverage/lcov-report/tester/helpers.ts.html +1 -1
  49. package/coverage/lcov-report/tester/index.html +1 -1
  50. package/coverage/lcov-report/utils/extractKeys.ts.html +1 -1
  51. package/coverage/lcov-report/utils/git.ts.html +3 -3
  52. package/coverage/lcov-report/utils/index.html +1 -1
  53. package/coverage/lcov-report/utils/index.ts.html +1 -1
  54. package/coverage/lcov-report/utils/pretty.ts.html +1 -1
  55. package/coverage/lcov.info +2624 -926
  56. package/lib/generate-code/typescript.js +57 -29
  57. package/lib/generate-code/typescript.js.map +1 -1
  58. package/lib/generate-code/typescript.spec.d.ts +1 -0
  59. package/lib/generate-code/typescript.spec.js +78 -0
  60. package/lib/generate-code/typescript.spec.js.map +1 -0
  61. package/lib/linter/attributeSchema.d.ts +352 -20
  62. package/lib/linter/attributeSchema.js +426 -16
  63. package/lib/linter/attributeSchema.js.map +1 -1
  64. package/lib/linter/attributeSchema.spec.d.ts +1 -0
  65. package/lib/linter/attributeSchema.spec.js +266 -0
  66. package/lib/linter/attributeSchema.spec.js.map +1 -0
  67. package/lib/linter/conditionSchema.d.ts +2 -1
  68. package/lib/linter/conditionSchema.js +370 -100
  69. package/lib/linter/conditionSchema.js.map +1 -1
  70. package/lib/linter/conditionSchema.spec.js +200 -153
  71. package/lib/linter/conditionSchema.spec.js.map +1 -1
  72. package/lib/linter/featureSchema.spec.js +114 -3
  73. package/lib/linter/featureSchema.spec.js.map +1 -1
  74. package/lib/linter/lintProject.js +45 -14
  75. package/lib/linter/lintProject.js.map +1 -1
  76. package/lib/linter/segmentSchema.spec.js +71 -1
  77. package/lib/linter/segmentSchema.spec.js.map +1 -1
  78. package/package.json +5 -5
  79. package/src/generate-code/typescript.spec.ts +108 -0
  80. package/src/generate-code/typescript.ts +80 -34
  81. package/src/linter/attributeSchema.spec.ts +342 -0
  82. package/src/linter/attributeSchema.ts +613 -18
  83. package/src/linter/conditionSchema.spec.ts +231 -189
  84. package/src/linter/conditionSchema.ts +582 -99
  85. package/src/linter/featureSchema.spec.ts +129 -4
  86. package/src/linter/lintProject.ts +55 -18
  87. package/src/linter/segmentSchema.spec.ts +82 -1
@@ -0,0 +1,266 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const attributeSchema_1 = require("./attributeSchema");
4
+ function parseAttribute(input) {
5
+ return (0, attributeSchema_1.getAttributeZodSchema)().safeParse(input);
6
+ }
7
+ function expectAttributeSuccess(input) {
8
+ const result = parseAttribute(input);
9
+ expect(result.success).toBe(true);
10
+ if (!result.success) {
11
+ const error = result.error;
12
+ const msg = error.issues.map((issue) => issue.message).join("; ");
13
+ throw new Error(`Expected attribute to pass: ${msg}`);
14
+ }
15
+ }
16
+ function expectAttributeFailure(input, messageSubstring) {
17
+ const result = parseAttribute(input);
18
+ expect(result.success).toBe(false);
19
+ if (result.success) {
20
+ throw new Error("Expected attribute to fail");
21
+ }
22
+ const error = result.error;
23
+ if (messageSubstring) {
24
+ const messages = error.issues.map((issue) => issue.message).join(" ");
25
+ expect(messages).toContain(messageSubstring);
26
+ }
27
+ return error;
28
+ }
29
+ describe("attributeSchema.ts :: getAttributeZodSchema", () => {
30
+ it("accepts flat object attributes without additional schema details", () => {
31
+ expectAttributeSuccess({
32
+ description: "Traits",
33
+ type: "object",
34
+ });
35
+ });
36
+ it("accepts flat object properties and typed arrays", () => {
37
+ expectAttributeSuccess({
38
+ description: "Account",
39
+ type: "object",
40
+ required: ["plan"],
41
+ properties: {
42
+ plan: {
43
+ type: "string",
44
+ enum: ["free", "pro"],
45
+ },
46
+ locale: {
47
+ type: "string",
48
+ },
49
+ permissions: {
50
+ type: "array",
51
+ items: {
52
+ type: "string",
53
+ enum: ["read", "write", "admin"],
54
+ },
55
+ },
56
+ },
57
+ });
58
+ });
59
+ it("accepts array attributes without items when they stay flat", () => {
60
+ expectAttributeSuccess({
61
+ description: "Tags",
62
+ type: "array",
63
+ });
64
+ });
65
+ it("accepts string-array enums on array attributes", () => {
66
+ expectAttributeSuccess({
67
+ description: "Permissions",
68
+ type: "array",
69
+ items: {
70
+ type: "string",
71
+ },
72
+ enum: [["read"], ["write", "admin"]],
73
+ });
74
+ });
75
+ it("accepts top-level oneOf attributes without type", () => {
76
+ expectAttributeSuccess({
77
+ description: "Version number of the app",
78
+ oneOf: [{ type: "string" }, { type: "double" }],
79
+ });
80
+ });
81
+ it("accepts top-level oneOf attributes with branch-specific enums", () => {
82
+ expectAttributeSuccess({
83
+ description: "Plan or score",
84
+ oneOf: [
85
+ { type: "string", enum: ["free", "pro"] },
86
+ { type: "double", minimum: 0 },
87
+ ],
88
+ });
89
+ });
90
+ it("requires items when array schema adds extra constraints", () => {
91
+ expectAttributeFailure({
92
+ description: "Permissions",
93
+ type: "array",
94
+ enum: [["read"], ["write"]],
95
+ }, "`items` is required");
96
+ });
97
+ it("rejects attributes without top-level type or oneOf", () => {
98
+ expectAttributeFailure({
99
+ description: "Country",
100
+ }, "either `type` or `oneOf`");
101
+ });
102
+ it("rejects attributes with both top-level type and oneOf", () => {
103
+ expectAttributeFailure({
104
+ description: "Version number of the app",
105
+ type: "string",
106
+ oneOf: [{ type: "string" }, { type: "double" }],
107
+ }, "cannot have both `type` and `oneOf`");
108
+ });
109
+ it("rejects top-level oneOf attributes when a branch enum does not match its type", () => {
110
+ expectAttributeFailure({
111
+ description: "Plan or score",
112
+ oneOf: [{ type: "string", enum: ["free", 1] }, { type: "double" }],
113
+ }, 'does not match type "string"');
114
+ });
115
+ it("rejects nested object properties inside object attributes", () => {
116
+ expectAttributeFailure({
117
+ description: "Account",
118
+ type: "object",
119
+ properties: {
120
+ metadata: {
121
+ type: "object",
122
+ properties: {
123
+ locale: {
124
+ type: "string",
125
+ },
126
+ },
127
+ },
128
+ },
129
+ }, "must stay flat");
130
+ });
131
+ it("rejects object additionalProperties that allow nested objects", () => {
132
+ expectAttributeFailure({
133
+ description: "Labels",
134
+ type: "object",
135
+ additionalProperties: {
136
+ type: "object",
137
+ properties: {
138
+ locale: {
139
+ type: "string",
140
+ },
141
+ },
142
+ },
143
+ }, "must stay flat");
144
+ });
145
+ it("rejects object properties whose oneOf allows nested objects", () => {
146
+ expectAttributeFailure({
147
+ description: "Account",
148
+ type: "object",
149
+ properties: {
150
+ metadata: {
151
+ oneOf: [
152
+ { type: "string" },
153
+ {
154
+ type: "object",
155
+ properties: {
156
+ locale: {
157
+ type: "string",
158
+ },
159
+ },
160
+ },
161
+ ],
162
+ },
163
+ },
164
+ }, "must stay flat");
165
+ });
166
+ it("rejects object additionalProperties whose oneOf allows nested objects", () => {
167
+ expectAttributeFailure({
168
+ description: "Labels",
169
+ type: "object",
170
+ additionalProperties: {
171
+ oneOf: [
172
+ { type: "string" },
173
+ {
174
+ type: "object",
175
+ properties: {
176
+ locale: {
177
+ type: "string",
178
+ },
179
+ },
180
+ },
181
+ ],
182
+ },
183
+ }, "must stay flat");
184
+ });
185
+ it("rejects non-string item types for array attributes", () => {
186
+ expectAttributeFailure({
187
+ description: "Scores",
188
+ type: "array",
189
+ items: {
190
+ type: "integer",
191
+ },
192
+ }, "items.type");
193
+ });
194
+ it("rejects non-string enum values for array attributes", () => {
195
+ expectAttributeFailure({
196
+ description: "Scores",
197
+ type: "array",
198
+ enum: [[1, 2]],
199
+ }, "array of strings");
200
+ });
201
+ it("rejects non-string const values for array attributes", () => {
202
+ expectAttributeFailure({
203
+ description: "Scores",
204
+ type: "array",
205
+ items: {
206
+ type: "string",
207
+ },
208
+ const: [1, 2],
209
+ }, "array of strings");
210
+ });
211
+ it("rejects required keys that are not declared in properties", () => {
212
+ expectAttributeFailure({
213
+ description: "Account",
214
+ type: "object",
215
+ required: ["plan", "tier"],
216
+ properties: {
217
+ plan: {
218
+ type: "string",
219
+ },
220
+ },
221
+ }, "Unknown required field");
222
+ });
223
+ it("accepts required keys on flat object attributes without declared properties", () => {
224
+ expectAttributeSuccess({
225
+ description: "Traits",
226
+ type: "object",
227
+ required: ["plan"],
228
+ });
229
+ });
230
+ it("rejects enum values that do not match semver/date string-like types", () => {
231
+ expectAttributeFailure({
232
+ description: "Browser version",
233
+ type: "semver",
234
+ enum: ["1.0.0", 2],
235
+ }, 'does not match type "semver"');
236
+ });
237
+ it("rejects minimum values greater than maximum for numeric attributes", () => {
238
+ expectAttributeFailure({
239
+ description: "Score",
240
+ type: "double",
241
+ minimum: 10,
242
+ maximum: 5,
243
+ }, "minimum");
244
+ });
245
+ it("rejects minLength values greater than maxLength for string attributes", () => {
246
+ expectAttributeFailure({
247
+ description: "Country",
248
+ type: "string",
249
+ minLength: 5,
250
+ maxLength: 2,
251
+ }, "minLength");
252
+ });
253
+ it("rejects invalid string patterns nested under object properties", () => {
254
+ expectAttributeFailure({
255
+ description: "Profile",
256
+ type: "object",
257
+ properties: {
258
+ email: {
259
+ type: "string",
260
+ pattern: "[",
261
+ },
262
+ },
263
+ }, "valid ECMA-262");
264
+ });
265
+ });
266
+ //# sourceMappingURL=attributeSchema.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attributeSchema.spec.js","sourceRoot":"","sources":["../../src/linter/attributeSchema.spec.ts"],"names":[],"mappings":";;AAEA,uDAA0D;AAE1D,SAAS,cAAc,CAAC,KAAc;IACpC,OAAO,IAAA,uCAAqB,GAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,sBAAsB,CAAC,KAAc;IAC5C,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACrC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,KAAK,GAAI,MAAoC,CAAC,KAAK,CAAC;QAC1D,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClE,MAAM,IAAI,KAAK,CAAC,+BAA+B,GAAG,EAAE,CAAC,CAAC;IACxD,CAAC;AACH,CAAC;AAED,SAAS,sBAAsB,CAAC,KAAc,EAAE,gBAAyB;IACvE,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACrC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,KAAK,GAAI,MAAoC,CAAC,KAAK,CAAC;IAE1D,IAAI,gBAAgB,EAAE,CAAC;QACrB,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,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BACd,OAAO,EAAE,GAAG;iBACb;aACF;SACF,EACD,gBAAgB,CACjB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type { Attribute, Schema } from "@featurevisor/types";
1
2
  import { z } from "zod";
2
3
  import { ProjectConfig } from "../config";
3
- export declare function getConditionsZodSchema(projectConfig: ProjectConfig, availableAttributeKeys: [string, ...string[]]): z.ZodUnion<[any, z.ZodArray<any, "many">, z.ZodLiteral<"*">]>;
4
+ export declare function getConditionsZodSchema(projectConfig: ProjectConfig, attributesByKey: Record<string, Attribute>, schemasByKey?: Record<string, Schema>): z.ZodUnion<[any, z.ZodArray<any, "many">, z.ZodLiteral<"*">]>;