@featurevisor/core 2.12.0 → 2.14.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.
Files changed (92) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/coverage/clover.xml +1663 -596
  3. package/coverage/coverage-final.json +24 -6
  4. package/coverage/lcov-report/builder/allocator.ts.html +1 -1
  5. package/coverage/lcov-report/builder/buildScopedConditions.ts.html +1 -1
  6. package/coverage/lcov-report/builder/buildScopedDatafile.ts.html +1 -1
  7. package/coverage/lcov-report/builder/buildScopedSegments.ts.html +1 -1
  8. package/coverage/lcov-report/builder/index.html +38 -8
  9. package/coverage/lcov-report/builder/mutateVariables.ts.html +400 -0
  10. package/coverage/lcov-report/builder/mutator.ts.html +796 -0
  11. package/coverage/lcov-report/builder/revision.ts.html +1 -1
  12. package/coverage/lcov-report/builder/traffic.ts.html +1 -1
  13. package/coverage/lcov-report/config/index.html +116 -0
  14. package/coverage/lcov-report/config/projectConfig.ts.html +676 -0
  15. package/coverage/lcov-report/datasource/adapter.ts.html +235 -0
  16. package/coverage/lcov-report/datasource/datasource.ts.html +862 -0
  17. package/coverage/lcov-report/datasource/filesystemAdapter.ts.html +1354 -0
  18. package/coverage/lcov-report/datasource/index.html +161 -0
  19. package/coverage/lcov-report/datasource/index.ts.html +94 -0
  20. package/coverage/lcov-report/index.html +83 -38
  21. package/coverage/lcov-report/linter/attributeSchema.ts.html +175 -0
  22. package/coverage/lcov-report/linter/checkCircularDependency.ts.html +220 -0
  23. package/coverage/lcov-report/linter/checkPercentageExceedingSlot.ts.html +268 -0
  24. package/coverage/lcov-report/linter/conditionSchema.ts.html +38 -38
  25. package/coverage/lcov-report/linter/featureSchema.ts.html +956 -485
  26. package/coverage/lcov-report/linter/groupSchema.ts.html +226 -0
  27. package/coverage/lcov-report/linter/index.html +139 -19
  28. package/coverage/lcov-report/linter/lintProject.ts.html +1840 -0
  29. package/coverage/lcov-report/linter/mutationNotation.ts.html +1309 -0
  30. package/coverage/lcov-report/linter/printError.ts.html +238 -0
  31. package/coverage/lcov-report/linter/schema.ts.html +116 -116
  32. package/coverage/lcov-report/linter/segmentSchema.ts.html +5 -5
  33. package/coverage/lcov-report/linter/testSchema.ts.html +550 -0
  34. package/coverage/lcov-report/list/index.html +1 -1
  35. package/coverage/lcov-report/list/matrix.ts.html +1 -1
  36. package/coverage/lcov-report/parsers/index.html +20 -5
  37. package/coverage/lcov-report/parsers/index.ts.html +151 -0
  38. package/coverage/lcov-report/parsers/json.ts.html +2 -2
  39. package/coverage/lcov-report/parsers/yml.ts.html +6 -6
  40. package/coverage/lcov-report/tester/cliFormat.ts.html +103 -0
  41. package/coverage/lcov-report/tester/helpers.ts.html +1 -1
  42. package/coverage/lcov-report/tester/index.html +20 -5
  43. package/coverage/lcov-report/utils/git.ts.html +481 -0
  44. package/coverage/lcov-report/utils/index.html +116 -0
  45. package/coverage/lcov.info +3253 -1214
  46. package/lib/builder/buildDatafile.js +8 -3
  47. package/lib/builder/buildDatafile.js.map +1 -1
  48. package/lib/builder/mutateVariables.d.ts +14 -0
  49. package/lib/builder/mutateVariables.js +90 -0
  50. package/lib/builder/mutateVariables.js.map +1 -0
  51. package/lib/builder/mutateVariables.spec.d.ts +1 -0
  52. package/lib/builder/mutateVariables.spec.js +1045 -0
  53. package/lib/builder/mutateVariables.spec.js.map +1 -0
  54. package/lib/builder/mutator.d.ts +20 -0
  55. package/lib/builder/mutator.js +223 -0
  56. package/lib/builder/mutator.js.map +1 -0
  57. package/lib/builder/mutator.spec.d.ts +1 -0
  58. package/lib/builder/mutator.spec.js +368 -0
  59. package/lib/builder/mutator.spec.js.map +1 -0
  60. package/lib/linter/featureSchema.d.ts +7 -7
  61. package/lib/linter/featureSchema.js +138 -62
  62. package/lib/linter/featureSchema.js.map +1 -1
  63. package/lib/linter/featureSchema.spec.js +150 -0
  64. package/lib/linter/featureSchema.spec.js.map +1 -1
  65. package/lib/linter/lintProject.d.ts +17 -1
  66. package/lib/linter/lintProject.js +191 -198
  67. package/lib/linter/lintProject.js.map +1 -1
  68. package/lib/linter/lintProject.spec.d.ts +1 -0
  69. package/lib/linter/lintProject.spec.js +86 -0
  70. package/lib/linter/lintProject.spec.js.map +1 -0
  71. package/lib/linter/mutationNotation.d.ts +47 -0
  72. package/lib/linter/mutationNotation.js +381 -0
  73. package/lib/linter/mutationNotation.js.map +1 -0
  74. package/lib/linter/mutationNotation.spec.d.ts +1 -0
  75. package/lib/linter/mutationNotation.spec.js +549 -0
  76. package/lib/linter/mutationNotation.spec.js.map +1 -0
  77. package/lib/linter/printError.d.ts +7 -0
  78. package/lib/linter/printError.js +30 -15
  79. package/lib/linter/printError.js.map +1 -1
  80. package/package.json +2 -2
  81. package/src/builder/buildDatafile.ts +29 -3
  82. package/src/builder/mutateVariables.spec.ts +1134 -0
  83. package/src/builder/mutateVariables.ts +105 -0
  84. package/src/builder/mutator.spec.ts +413 -0
  85. package/src/builder/mutator.ts +237 -0
  86. package/src/linter/featureSchema.spec.ts +182 -0
  87. package/src/linter/featureSchema.ts +254 -97
  88. package/src/linter/lintProject.spec.ts +115 -0
  89. package/src/linter/lintProject.ts +256 -254
  90. package/src/linter/mutationNotation.spec.ts +642 -0
  91. package/src/linter/mutationNotation.ts +408 -0
  92. package/src/linter/printError.ts +40 -16
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const fs = require("fs");
4
+ const os = require("os");
5
+ const path = require("path");
6
+ const projectConfig_1 = require("../config/projectConfig");
7
+ const datasource_1 = require("../datasource");
8
+ const lintProject_1 = require("./lintProject");
9
+ function createTempProjectFromExample1() {
10
+ const fixturePath = path.resolve(__dirname, "../../../../examples/example-1");
11
+ const tempRoot = fs.mkdtempSync(path.join(os.tmpdir(), "featurevisor-lint-"));
12
+ fs.cpSync(fixturePath, tempRoot, { recursive: true });
13
+ return tempRoot;
14
+ }
15
+ function getDeps(rootDirectoryPath) {
16
+ const projectConfig = (0, projectConfig_1.getProjectConfig)(rootDirectoryPath);
17
+ const datasource = new datasource_1.Datasource(projectConfig, rootDirectoryPath);
18
+ return {
19
+ rootDirectoryPath,
20
+ projectConfig,
21
+ datasource,
22
+ options: {},
23
+ };
24
+ }
25
+ describe("core: lintProject", function () {
26
+ let tempProjectPath;
27
+ beforeEach(() => {
28
+ tempProjectPath = createTempProjectFromExample1();
29
+ });
30
+ afterEach(() => {
31
+ fs.rmSync(tempProjectPath, { recursive: true, force: true });
32
+ jest.restoreAllMocks();
33
+ });
34
+ it("returns JSON-friendly empty errors array for a valid project", async () => {
35
+ const result = await (0, lintProject_1.lintProject)(getDeps(tempProjectPath), { json: true });
36
+ expect(result).toEqual({
37
+ hasError: false,
38
+ errors: [],
39
+ });
40
+ });
41
+ it("returns structured errors in JSON mode", async () => {
42
+ fs.writeFileSync(path.join(tempProjectPath, "attributes", "invalid name.yml"), "description: this has an invalid key name\ntype: string\n", "utf8");
43
+ const result = await (0, lintProject_1.lintProject)(getDeps(tempProjectPath), {
44
+ json: true,
45
+ entityType: "attribute",
46
+ });
47
+ expect(result.hasError).toBe(true);
48
+ expect(result.errors.length).toBeGreaterThan(0);
49
+ expect(result.errors[0]).toMatchObject({
50
+ entityType: "attribute",
51
+ key: "invalid name",
52
+ message: 'Invalid name: "invalid name"',
53
+ code: "invalid_name",
54
+ path: [],
55
+ });
56
+ expect(result.errors[0].filePath).toContain("attributes");
57
+ });
58
+ it("plugin prints pretty JSON only once in --json --pretty mode", async () => {
59
+ const consoleLogSpy = jest.spyOn(console, "log").mockImplementation(() => { });
60
+ const pluginResult = await lintProject_1.lintPlugin.handler({
61
+ ...getDeps(tempProjectPath),
62
+ parsed: {
63
+ json: true,
64
+ pretty: true,
65
+ },
66
+ });
67
+ expect(pluginResult).toBeUndefined();
68
+ expect(consoleLogSpy).toHaveBeenCalledTimes(1);
69
+ const output = consoleLogSpy.mock.calls[0][0];
70
+ expect(output).toContain('\n "errors": []\n');
71
+ });
72
+ it("does not call process.exit for zod validation errors while linting tests", async () => {
73
+ fs.writeFileSync(path.join(tempProjectPath, "tests", "broken.spec.yml"), "feature: foo\n", "utf8");
74
+ const processExitSpy = jest
75
+ .spyOn(process, "exit")
76
+ .mockImplementation((() => undefined));
77
+ const result = await (0, lintProject_1.lintProject)(getDeps(tempProjectPath), {
78
+ json: true,
79
+ entityType: "test",
80
+ });
81
+ expect(result.hasError).toBe(true);
82
+ expect(result.errors.length).toBeGreaterThan(0);
83
+ expect(processExitSpy).not.toHaveBeenCalled();
84
+ });
85
+ });
86
+ //# sourceMappingURL=lintProject.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lintProject.spec.js","sourceRoot":"","sources":["../../src/linter/lintProject.spec.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AACzB,yBAAyB;AACzB,6BAA6B;AAE7B,2DAA2D;AAC3D,8CAA2C;AAC3C,+CAAyE;AAEzE,SAAS,6BAA6B;IACpC,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,gCAAgC,CAAC,CAAC;IAC9E,MAAM,QAAQ,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAE9E,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEtD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,OAAO,CAAC,iBAAyB;IACxC,MAAM,aAAa,GAAG,IAAA,gCAAgB,EAAC,iBAAiB,CAAC,CAAC;IAC1D,MAAM,UAAU,GAAG,IAAI,uBAAU,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;IAEpE,OAAO;QACL,iBAAiB;QACjB,aAAa;QACb,UAAU;QACV,OAAO,EAAE,EAAE;KACZ,CAAC;AACJ,CAAC;AAED,QAAQ,CAAC,mBAAmB,EAAE;IA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AC,CAAC;QAE3E,MAAM,MAAM,GAAe,MAAM,IAAA,yBAAW,EAAC,OAAO,CAAC,eAAe,CAAQ,EAAE;YAC5E,IAAI,EAAE,IAAI;YACV,UAAU,EAAE,MAAM;SACnB,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QAChD,MAAM,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,47 @@
1
+ import type { Schema } from "@featurevisor/types";
2
+ import { type MutationOperation, type PathPart } from "../builder/mutator";
3
+ export type { MutationOperation, PathPart };
4
+ export type PathSegment = PathPart;
5
+ export interface ParsedMutationKey {
6
+ rootKey: string;
7
+ pathSegments: PathSegment[];
8
+ allSegments: PathSegment[];
9
+ operation: MutationOperation;
10
+ }
11
+ /**
12
+ * Returns true if the key looks like mutation notation (contains path or operation).
13
+ */
14
+ export declare function isMutationKey(key: string): boolean;
15
+ /**
16
+ * Parse a full variable key (e.g. "config.width", "items[1].name", "tags:append")
17
+ * into root variable name, path segments within the variable, and operation.
18
+ * Uses the shared parseNotation from the mutator.
19
+ */
20
+ export declare function parseMutationKey(key: string): ParsedMutationKey | null;
21
+ /**
22
+ * Resolve the schema at a path within a variable schema.
23
+ * pathSegments are the path *within* the variable (e.g. for variable "config", path [ {key:"width"} ];
24
+ * for variable "items", path [ {index:0}, {key:"name"} ]).
25
+ * Returns the schema at that path, or null if the path is invalid.
26
+ * Does not descend through oneOf (path through oneOf is considered invalid for mutation targets).
27
+ */
28
+ export declare function resolveSchemaAtPath(variableSchema: Schema | null, pathSegments: PathSegment[], schemasByKey?: Record<string, Schema>): Schema | null;
29
+ export interface MutationValidationResult {
30
+ valid: boolean;
31
+ rootKey: string;
32
+ pathSegments: PathSegment[];
33
+ operation: MutationOperation;
34
+ valueSchema: Schema | null;
35
+ error?: string;
36
+ }
37
+ /**
38
+ * Validate mutation key against variable schema: root exists, path valid, operation allowed.
39
+ * Returns valueSchema to validate the value against (for set: schema at path; for append/prepend/after/before: item schema).
40
+ * Uses Schema from @featurevisor/types; validates required (no :remove on required props) and does not allow path through oneOf.
41
+ */
42
+ export declare function validateMutationKey(key: string, variableSchemaByKey: Record<string, Schema>, schemasByKey?: Record<string, Schema>): MutationValidationResult;
43
+ /**
44
+ * Parse a path-map key (relative to a variable) into path segments for resolveSchemaAtPath.
45
+ * e.g. "display.fontSize" -> [{key:"display"},{key:"fontSize"}], "[0].name" -> [{key:"",index:0},{key:"name"}].
46
+ */
47
+ export declare function parsePathMapKey(relativePath: string): PathSegment[] | null;
@@ -0,0 +1,381 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isMutationKey = isMutationKey;
4
+ exports.parseMutationKey = parseMutationKey;
5
+ exports.resolveSchemaAtPath = resolveSchemaAtPath;
6
+ exports.validateMutationKey = validateMutationKey;
7
+ exports.parsePathMapKey = parsePathMapKey;
8
+ const mutator_1 = require("../builder/mutator");
9
+ const OPERATION_SUFFIX = /:((?:append|prepend|after|before|remove))$/;
10
+ /**
11
+ * Returns true if the key looks like mutation notation (contains path or operation).
12
+ */
13
+ function isMutationKey(key) {
14
+ const k = key.trim();
15
+ return k.includes(".") || k.includes("[") || OPERATION_SUFFIX.test(k);
16
+ }
17
+ /**
18
+ * Parse a full variable key (e.g. "config.width", "items[1].name", "tags:append")
19
+ * into root variable name, path segments within the variable, and operation.
20
+ * Uses the shared parseNotation from the mutator.
21
+ */
22
+ function parseMutationKey(key) {
23
+ const rest = key.trim();
24
+ if (!rest)
25
+ return null;
26
+ const { segments, operation } = (0, mutator_1.parseNotation)(rest);
27
+ const rootKey = segments.length > 0 && "key" in segments[0] ? segments[0].key : "";
28
+ const first = segments[0];
29
+ const firstPathPart = first && ("index" in first || "selector" in first)
30
+ ? [
31
+ "index" in first
32
+ ? { key: "", index: first.index }
33
+ : { key: "", selector: first.selector },
34
+ ]
35
+ : [];
36
+ const pathWithinVariable = firstPathPart.concat(segments.slice(1));
37
+ return { rootKey, pathSegments: pathWithinVariable, allSegments: segments, operation };
38
+ }
39
+ /**
40
+ * Resolve a schema reference (schema.schema -> schemasByKey[name]).
41
+ * Follows one level of reference; the resolved schema may itself have oneOf or another ref.
42
+ */
43
+ function resolveSchemaRef(schema, schemasByKey) {
44
+ if (!schema || typeof schema !== "object")
45
+ return null;
46
+ if (schema.schema && schemasByKey?.[schema.schema]) {
47
+ return resolveSchemaRef(schemasByKey[schema.schema], schemasByKey);
48
+ }
49
+ return schema;
50
+ }
51
+ /**
52
+ * Return true if the schema is a oneOf (multiple possible shapes); path resolution cannot descend through oneOf.
53
+ */
54
+ function isOneOfSchema(schema) {
55
+ return Array.isArray(schema.oneOf) && schema.oneOf.length > 0;
56
+ }
57
+ /**
58
+ * Resolve the schema at a path within a variable schema.
59
+ * pathSegments are the path *within* the variable (e.g. for variable "config", path [ {key:"width"} ];
60
+ * for variable "items", path [ {index:0}, {key:"name"} ]).
61
+ * Returns the schema at that path, or null if the path is invalid.
62
+ * Does not descend through oneOf (path through oneOf is considered invalid for mutation targets).
63
+ */
64
+ function resolveSchemaAtPath(variableSchema, pathSegments, schemasByKey) {
65
+ let current = resolveSchemaRef(variableSchema, schemasByKey);
66
+ if (!current)
67
+ return null;
68
+ for (const seg of pathSegments) {
69
+ if (isOneOfSchema(current))
70
+ return null;
71
+ if (seg.key) {
72
+ if (current.type !== "object")
73
+ return null;
74
+ const props = current.properties;
75
+ if (!props || typeof props !== "object")
76
+ return null;
77
+ const next = props[seg.key];
78
+ if (next === undefined)
79
+ return null;
80
+ current = resolveSchemaRef(next, schemasByKey);
81
+ if (!current)
82
+ return null;
83
+ }
84
+ if ("index" in seg || "selector" in seg) {
85
+ if (current.type !== "array")
86
+ return null;
87
+ const itemSchema = current.items;
88
+ if (!itemSchema || typeof itemSchema !== "object")
89
+ return null;
90
+ current = resolveSchemaRef(itemSchema, schemasByKey);
91
+ if (!current)
92
+ return null;
93
+ }
94
+ }
95
+ return current;
96
+ }
97
+ /**
98
+ * Return the schema of the container at the end of path (object or array) and the last segment.
99
+ * Used to check if we can do append/prepend (must be array) or remove (object key or array element).
100
+ * Does not descend through oneOf.
101
+ */
102
+ function getContainerSchemaAtPath(variableSchema, pathSegments, schemasByKey) {
103
+ if (pathSegments.length === 0) {
104
+ const resolved = variableSchema ? resolveSchemaRef(variableSchema, schemasByKey) : null;
105
+ return resolved
106
+ ? { containerSchema: resolved, lastSegment: { key: "" }, parentSchema: resolved }
107
+ : null;
108
+ }
109
+ let current = resolveSchemaRef(variableSchema, schemasByKey);
110
+ if (!current)
111
+ return null;
112
+ const pathWithoutLast = pathSegments.slice(0, -1);
113
+ const lastSegment = pathSegments[pathSegments.length - 1];
114
+ for (const seg of pathWithoutLast) {
115
+ if (isOneOfSchema(current))
116
+ return null;
117
+ if ("index" in seg || "selector" in seg) {
118
+ if (current.type !== "array")
119
+ return null;
120
+ const itemSchema = current.items;
121
+ if (!itemSchema || typeof itemSchema !== "object")
122
+ return null;
123
+ current = resolveSchemaRef(itemSchema, schemasByKey);
124
+ }
125
+ else {
126
+ if (current.type !== "object")
127
+ return null;
128
+ const props = current.properties;
129
+ if (!props || typeof props !== "object")
130
+ return null;
131
+ const next = props[seg.key];
132
+ if (next === undefined)
133
+ return null;
134
+ current = resolveSchemaRef(next, schemasByKey);
135
+ }
136
+ if (!current)
137
+ return null;
138
+ }
139
+ if (!current)
140
+ return null;
141
+ const parentSchema = current;
142
+ if ("index" in lastSegment || "selector" in lastSegment) {
143
+ return { containerSchema: parentSchema, lastSegment, parentSchema };
144
+ }
145
+ const propSchema = parentSchema.properties?.[lastSegment.key];
146
+ const resolvedProp = propSchema && typeof propSchema === "object"
147
+ ? resolveSchemaRef(propSchema, schemasByKey)
148
+ : null;
149
+ return resolvedProp ? { containerSchema: resolvedProp, lastSegment, parentSchema } : null;
150
+ }
151
+ /**
152
+ * Validate mutation key against variable schema: root exists, path valid, operation allowed.
153
+ * Returns valueSchema to validate the value against (for set: schema at path; for append/prepend/after/before: item schema).
154
+ * Uses Schema from @featurevisor/types; validates required (no :remove on required props) and does not allow path through oneOf.
155
+ */
156
+ function validateMutationKey(key, variableSchemaByKey, schemasByKey) {
157
+ const parsed = parseMutationKey(key);
158
+ if (!parsed) {
159
+ return {
160
+ valid: false,
161
+ rootKey: "",
162
+ pathSegments: [],
163
+ operation: "set",
164
+ valueSchema: null,
165
+ error: `Invalid mutation notation: "${key}"`,
166
+ };
167
+ }
168
+ const { rootKey, pathSegments, operation } = parsed;
169
+ if (!rootKey) {
170
+ return {
171
+ valid: false,
172
+ rootKey: "",
173
+ pathSegments: [],
174
+ operation,
175
+ valueSchema: null,
176
+ error: `Mutation key must start with a variable name: "${key}"`,
177
+ };
178
+ }
179
+ const variableSchema = variableSchemaByKey[rootKey];
180
+ if (!variableSchema) {
181
+ return {
182
+ valid: false,
183
+ rootKey,
184
+ pathSegments,
185
+ operation,
186
+ valueSchema: null,
187
+ error: `Variable "${rootKey}" is not defined in \`variablesSchema\`.`,
188
+ };
189
+ }
190
+ const resolvedRoot = resolveSchemaRef(variableSchema, schemasByKey);
191
+ if (!resolvedRoot) {
192
+ const refName = variableSchema && typeof variableSchema === "object" && "schema" in variableSchema
193
+ ? variableSchema.schema
194
+ : undefined;
195
+ return {
196
+ valid: false,
197
+ rootKey,
198
+ pathSegments,
199
+ operation,
200
+ valueSchema: null,
201
+ error: refName != null
202
+ ? `Schema "${refName}" could not be loaded for variable "${rootKey}".`
203
+ : `Could not resolve schema for variable "${rootKey}".`,
204
+ };
205
+ }
206
+ if (pathSegments.length > 0 && isOneOfSchema(resolvedRoot)) {
207
+ return {
208
+ valid: false,
209
+ rootKey,
210
+ pathSegments,
211
+ operation,
212
+ valueSchema: null,
213
+ error: `Cannot mutate path into variable "${rootKey}" (root schema is \`oneOf\`; path resolution not defined).`,
214
+ };
215
+ }
216
+ const container = getContainerSchemaAtPath(variableSchema, pathSegments, schemasByKey);
217
+ const valueSchemaAtPath = resolveSchemaAtPath(variableSchema, pathSegments, schemasByKey);
218
+ switch (operation) {
219
+ case "append":
220
+ case "prepend": {
221
+ if (!container) {
222
+ return {
223
+ valid: false,
224
+ rootKey,
225
+ pathSegments,
226
+ operation,
227
+ valueSchema: null,
228
+ error: `Path "${key}" is invalid for variable "${rootKey}" (path does not exist in schema).`,
229
+ };
230
+ }
231
+ const arrResolved = container.containerSchema;
232
+ if (!arrResolved || arrResolved.type !== "array") {
233
+ return {
234
+ valid: false,
235
+ rootKey,
236
+ pathSegments,
237
+ operation,
238
+ valueSchema: null,
239
+ error: `Operation ":${operation}" is only allowed on array variables or object properties of type array; path "${key}" does not point to an array.`,
240
+ };
241
+ }
242
+ if (isOneOfSchema(arrResolved)) {
243
+ return {
244
+ valid: false,
245
+ rootKey,
246
+ pathSegments,
247
+ operation,
248
+ valueSchema: null,
249
+ error: `Operation ":${operation}" is not allowed when array \`items\` is \`oneOf\` (path "${key}").`,
250
+ };
251
+ }
252
+ const itemSchema = arrResolved.items && typeof arrResolved.items === "object"
253
+ ? resolveSchemaRef(arrResolved.items, schemasByKey)
254
+ : null;
255
+ return {
256
+ valid: true,
257
+ rootKey,
258
+ pathSegments,
259
+ operation,
260
+ valueSchema: itemSchema,
261
+ };
262
+ }
263
+ case "after":
264
+ case "before":
265
+ case "remove": {
266
+ if (!container) {
267
+ return {
268
+ valid: false,
269
+ rootKey,
270
+ pathSegments,
271
+ operation,
272
+ valueSchema: null,
273
+ error: `Path "${key}" is invalid for variable "${rootKey}" (path does not exist in schema).`,
274
+ };
275
+ }
276
+ const last = container.lastSegment;
277
+ if ("index" in last || "selector" in last) {
278
+ if (container.parentSchema.type !== "array") {
279
+ return {
280
+ valid: false,
281
+ rootKey,
282
+ pathSegments,
283
+ operation,
284
+ valueSchema: null,
285
+ error: `Operation ":${operation}" with array index/selector is only allowed on arrays; path "${key}" does not point to an array element.`,
286
+ };
287
+ }
288
+ if (operation === "after" || operation === "before") {
289
+ const parentItems = container.parentSchema.items;
290
+ if (parentItems && typeof parentItems === "object" && isOneOfSchema(parentItems)) {
291
+ return {
292
+ valid: false,
293
+ rootKey,
294
+ pathSegments,
295
+ operation,
296
+ valueSchema: null,
297
+ error: `Operation ":${operation}" is not allowed when array \`items\` is \`oneOf\` (path "${key}").`,
298
+ };
299
+ }
300
+ const itemSchema = parentItems && typeof parentItems === "object"
301
+ ? resolveSchemaRef(parentItems, schemasByKey)
302
+ : null;
303
+ return { valid: true, rootKey, pathSegments, operation, valueSchema: itemSchema };
304
+ }
305
+ return { valid: true, rootKey, pathSegments, operation, valueSchema: null };
306
+ }
307
+ if (container.parentSchema.type !== "object") {
308
+ return {
309
+ valid: false,
310
+ rootKey,
311
+ pathSegments,
312
+ operation,
313
+ valueSchema: null,
314
+ error: `Operation ":${operation}" on a property is only allowed on objects; path "${key}" does not point to an object property.`,
315
+ };
316
+ }
317
+ const requiredKeys = container.parentSchema.required;
318
+ if (operation === "remove" &&
319
+ Array.isArray(requiredKeys) &&
320
+ requiredKeys.includes(last.key)) {
321
+ return {
322
+ valid: false,
323
+ rootKey,
324
+ pathSegments,
325
+ operation,
326
+ valueSchema: null,
327
+ error: `Cannot remove required property "${last.key}" from variable "${rootKey}" (listed in schema \`required\`).`,
328
+ };
329
+ }
330
+ return { valid: true, rootKey, pathSegments, operation, valueSchema: null };
331
+ }
332
+ case "set": {
333
+ if (valueSchemaAtPath === null && pathSegments.length > 0) {
334
+ return {
335
+ valid: false,
336
+ rootKey,
337
+ pathSegments,
338
+ operation,
339
+ valueSchema: null,
340
+ error: `Path "${key}" is invalid for variable "${rootKey}" (path does not exist in schema).`,
341
+ };
342
+ }
343
+ if (valueSchemaAtPath && isOneOfSchema(valueSchemaAtPath)) {
344
+ return {
345
+ valid: false,
346
+ rootKey,
347
+ pathSegments,
348
+ operation,
349
+ valueSchema: null,
350
+ error: `Cannot set value at path "${key}" (target schema is \`oneOf\`; mutation target must be a single schema).`,
351
+ };
352
+ }
353
+ return {
354
+ valid: true,
355
+ rootKey,
356
+ pathSegments,
357
+ operation,
358
+ valueSchema: valueSchemaAtPath,
359
+ };
360
+ }
361
+ default:
362
+ return {
363
+ valid: true,
364
+ rootKey,
365
+ pathSegments,
366
+ operation,
367
+ valueSchema: valueSchemaAtPath,
368
+ };
369
+ }
370
+ }
371
+ /**
372
+ * Parse a path-map key (relative to a variable) into path segments for resolveSchemaAtPath.
373
+ * e.g. "display.fontSize" -> [{key:"display"},{key:"fontSize"}], "[0].name" -> [{key:"",index:0},{key:"name"}].
374
+ */
375
+ function parsePathMapKey(relativePath) {
376
+ const parsed = parseMutationKey(relativePath);
377
+ if (!parsed)
378
+ return null;
379
+ return parsed.allSegments.length > 0 ? parsed.allSegments : null;
380
+ }
381
+ //# sourceMappingURL=mutationNotation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutationNotation.js","sourceRoot":"","sources":["../../src/linter/mutationNotation.ts"],"names":[],"mappings":";;AAmBA,sCAGC;AAOD,4CAiBC;AA+BD,kDA4BC;AAkED,kDAkOC;AAMD,0CAIC;AArZD,gDAA0F;AAK1F,MAAM,gBAAgB,GAAG,4CAA4C,CAAC;AAStE;;GAEG;AACH,SAAgB,aAAa,CAAC,GAAW;IACvC,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IACrB,OAAO,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACxE,CAAC;AAED;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,GAAW;IAC1C,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IACxB,IAAI,CAAC,IAAI;QAAE,OA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