@schema-hub/stryker-zod-mutator 0.0.12 → 0.0.13

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 (38) hide show
  1. package/package.json +1 -1
  2. package/sbom.cdx.json +5 -5
  3. package/stryker-zod-mutator/ast.d.ts +25 -0
  4. package/stryker-zod-mutator/ast.d.ts.map +1 -0
  5. package/stryker-zod-mutator/behavior-mutations.d.ts +3 -0
  6. package/stryker-zod-mutator/behavior-mutations.d.ts.map +1 -0
  7. package/stryker-zod-mutator/binding-resolution.d.ts +18 -0
  8. package/stryker-zod-mutator/binding-resolution.d.ts.map +1 -0
  9. package/stryker-zod-mutator/check-mutations.d.ts +3 -0
  10. package/stryker-zod-mutator/check-mutations.d.ts.map +1 -0
  11. package/stryker-zod-mutator/collection-mutations.d.ts +3 -0
  12. package/stryker-zod-mutator/collection-mutations.d.ts.map +1 -0
  13. package/stryker-zod-mutator/declarator-init-id.d.ts +5 -0
  14. package/stryker-zod-mutator/declarator-init-id.d.ts.map +1 -0
  15. package/stryker-zod-mutator/filesystem-module-loader.d.ts +3 -0
  16. package/stryker-zod-mutator/filesystem-module-loader.d.ts.map +1 -0
  17. package/stryker-zod-mutator/masked-schema-references.d.ts +4 -0
  18. package/stryker-zod-mutator/masked-schema-references.d.ts.map +1 -0
  19. package/stryker-zod-mutator/mutation-catalog.d.ts +3 -0
  20. package/stryker-zod-mutator/mutation-catalog.d.ts.map +1 -0
  21. package/stryker-zod-mutator/mutation-definition.d.ts +17 -0
  22. package/stryker-zod-mutator/mutation-definition.d.ts.map +1 -0
  23. package/stryker-zod-mutator/mutations.d.ts +6 -0
  24. package/stryker-zod-mutator/mutations.d.ts.map +1 -0
  25. package/stryker-zod-mutator/object-mutations.d.ts +3 -0
  26. package/stryker-zod-mutator/object-mutations.d.ts.map +1 -0
  27. package/stryker-zod-mutator/presence-mutations.d.ts +3 -0
  28. package/stryker-zod-mutator/presence-mutations.d.ts.map +1 -0
  29. package/stryker-zod-mutator/primitive-mutations.d.ts +3 -0
  30. package/stryker-zod-mutator/primitive-mutations.d.ts.map +1 -0
  31. package/stryker-zod-mutator/reference-mutations.d.ts +3 -0
  32. package/stryker-zod-mutator/reference-mutations.d.ts.map +1 -0
  33. package/stryker-zod-mutator/registry.d.ts +21 -0
  34. package/stryker-zod-mutator/registry.d.ts.map +1 -0
  35. package/stryker-zod-mutator/schema-call-mutations.d.ts +8 -0
  36. package/stryker-zod-mutator/schema-call-mutations.d.ts.map +1 -0
  37. package/stryker-zod-mutator/zod-bindings.d.ts +42 -0
  38. package/stryker-zod-mutator/zod-bindings.d.ts.map +1 -0
package/package.json CHANGED
@@ -47,5 +47,5 @@
47
47
  "./stryker-zod-mutator/zod-bindings.js"
48
48
  ],
49
49
  "type": "module",
50
- "version": "0.0.12"
50
+ "version": "0.0.13"
51
51
  }
package/sbom.cdx.json CHANGED
@@ -9,16 +9,16 @@
9
9
  {
10
10
  "type": "application",
11
11
  "name": "packtory",
12
- "version": "0.0.67"
12
+ "version": "0.0.80"
13
13
  }
14
14
  ]
15
15
  },
16
16
  "component": {
17
17
  "type": "library",
18
18
  "name": "@schema-hub/stryker-zod-mutator",
19
- "version": "0.0.12",
20
- "bom-ref": "pkg:npm/@schema-hub/stryker-zod-mutator@0.0.12",
21
- "purl": "pkg:npm/@schema-hub/stryker-zod-mutator@0.0.12"
19
+ "version": "0.0.13",
20
+ "bom-ref": "pkg:npm/@schema-hub/stryker-zod-mutator@0.0.13",
21
+ "purl": "pkg:npm/@schema-hub/stryker-zod-mutator@0.0.13"
22
22
  }
23
23
  },
24
24
  "components": [
@@ -96,7 +96,7 @@
96
96
  "ref": "pkg:npm/@babel/types@8.0.4"
97
97
  },
98
98
  {
99
- "ref": "pkg:npm/@schema-hub/stryker-zod-mutator@0.0.12",
99
+ "ref": "pkg:npm/@schema-hub/stryker-zod-mutator@0.0.13",
100
100
  "dependsOn": [
101
101
  "pkg:npm/@babel/parser@8.0.4",
102
102
  "pkg:npm/@babel/types@8.0.4",
@@ -0,0 +1,25 @@
1
+ import * as babel from '@babel/types';
2
+ import type { Node as BabelNode } from '@babel/types';
3
+ export type SchemaExpression = Exclude<babel.Expression, babel.V8IntrinsicIdentifier>;
4
+ export type ArrayExpression = Readonly<babel.ArrayExpression>;
5
+ export type CallExpression = Readonly<babel.CallExpression>;
6
+ export type ObjectExpression = Readonly<babel.ObjectExpression>;
7
+ export type PropertyValueExpression = Readonly<babel.Expression>;
8
+ export type MutationPath = {
9
+ readonly node: BabelNode;
10
+ readonly parentPath: MutationPath | null;
11
+ };
12
+ export declare function isExpressionNode(node: BabelNode | null | undefined): node is SchemaExpression;
13
+ export declare function cloneExpression<Expression extends SchemaExpression>(expression: Expression): Expression;
14
+ export declare function findProgram(path: MutationPath): babel.Program | null;
15
+ export declare function fileNameOf(path: MutationPath): string | null;
16
+ export declare function namedIdentifier(name: string): babel.Identifier;
17
+ export declare function callExpression(callee: SchemaExpression, args: readonly SchemaExpression[]): babel.CallExpression;
18
+ export declare function memberCall(object: SchemaExpression, methodName: string, args: readonly SchemaExpression[]): babel.CallExpression;
19
+ export declare function replaceArrayItem(arrayExpression: ArrayExpression, indexToRemove: number): babel.ArrayExpression;
20
+ export declare function replaceObjectProperty(objectExpression: ObjectExpression, indexToReplace: number, value: PropertyValueExpression): babel.ObjectExpression;
21
+ export declare function removeObjectProperty(objectExpression: ObjectExpression, indexToRemove: number): babel.ObjectExpression;
22
+ export declare function getMemberName(expression: BabelNode): string | null;
23
+ export declare function getCallName(callee: BabelNode): string | null;
24
+ export declare function numericArgumentMutations(call: CallExpression, argumentIndex: number): readonly babel.CallExpression[];
25
+ //# sourceMappingURL=ast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/ast.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,EAAE,IAAI,IAA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AAE,GAClC,KAAK,CAAC,cAAc,CAEtB;AAED,wBAAgB,gBAAgB,CAC5B,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,MAAM,GACtB,KAAK,CAAC,eAAe,CAIvB;AAED,wBAAgB,qBAAqB,CACjC,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,uBAAuB,GAC/B,KAAK,CAAC,gBAAgB,CAUxB;AAED,wBAAgB,oBAAoB,CAChC,gBAAgB,EAAE,gBAAgB,EAClC,aAAa,EAAE,MAAM,GACtB,KAAK,CAAC,gBAAgB,CAWxB;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAMlE;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAM5D;AAED,wBAAgB,wBAAwB,CACpC,IAAI,EAAE,cAAc,EACpB,aAAa,EAAE,MAAM,GACtB,SAAS,KAAK,CAAC,cAAc,EAAE,CAYjC"}
@@ -0,0 +1,3 @@
1
+ import { type MutationDefinition } from './mutation-definition.ts';
2
+ export declare const behaviorMutationDefinitions: readonly MutationDefinition[];
3
+ //# sourceMappingURL=behavior-mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"behavior-mutations.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/behavior-mutations.ts"],"names":[],"mappings":"AAGA,OAAO,EAA8B,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AA0F/F,eAAO,MAAM,2BAA2B,EAAE,SAAS,kBAAkB,EAIpE,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { Program } from '@babel/types';
2
+ import { type SchemaExpression } from './ast.ts';
3
+ import { type ZodBindings } from './zod-bindings.ts';
4
+ export type ResolvedModule = {
5
+ readonly program: Program;
6
+ readonly fileName: string;
7
+ };
8
+ export type ResolverEnv = {
9
+ readonly loadModule: (specifier: string, fromFileName: string) => ResolvedModule | null;
10
+ };
11
+ export declare const inertResolverEnv: ResolverEnv;
12
+ export declare function producesFreezableValue(bindings: ZodBindings, expression: SchemaExpression): boolean;
13
+ export declare function resolvesToZodSchema(bindings: ZodBindings, expression: SchemaExpression): boolean;
14
+ export declare function isZodSchemaOrReference(bindings: ZodBindings, expression: SchemaExpression): boolean;
15
+ export declare function chainAppliesReadonly(bindings: ZodBindings, expression: SchemaExpression): boolean;
16
+ export declare function resolvesToAcceptAnything(bindings: ZodBindings, expression: SchemaExpression): boolean;
17
+ export declare function addingWrapperHasNoEffect(bindings: ZodBindings, expression: SchemaExpression, wrapperName: string): boolean;
18
+ //# sourceMappingURL=binding-resolution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"binding-resolution.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/binding-resolution.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAqB,OAAO,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAwD,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACvG,OAAO,EAMH,KAAK,WAAW,EACnB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,MAAM,cAAc,GAAG;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACtB,QAAQ,CAAC,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,cAAc,GAAG,IAAI,CAAC;CAC3F,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,WAI9B,CAAC;AAyYF,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,GAAG,OAAO,CAEnG;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,GAAG,OAAO,CAIhG;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,GAAG,OAAO,CAEnG;AAMD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,GAAG,OAAO,CAEjG;AAqED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,GAAG,OAAO,CAOrG;AAED,wBAAgB,wBAAwB,CACpC,QAAQ,EAAE,WAAW,EACrB,UAAU,EAAE,gBAAgB,EAC5B,WAAW,EAAE,MAAM,GACpB,OAAO,CAKT"}
@@ -0,0 +1,3 @@
1
+ import { type MutationDefinition } from './mutation-definition.ts';
2
+ export declare const checkMutationDefinitions: readonly MutationDefinition[];
3
+ //# sourceMappingURL=check-mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-mutations.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/check-mutations.ts"],"names":[],"mappings":"AAQA,OAAO,EAA8B,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAoQ/F,eAAO,MAAM,wBAAwB,EAAE,SAAS,kBAAkB,EAqBjE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type MutationDefinition } from './mutation-definition.ts';
2
+ export declare const collectionMutationDefinitions: readonly MutationDefinition[];
3
+ //# sourceMappingURL=collection-mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collection-mutations.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/collection-mutations.ts"],"names":[],"mappings":"AAYA,OAAO,EAA8B,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAiM/F,eAAO,MAAM,6BAA6B,EAAE,SAAS,kBAAkB,EA6BtE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import * as babel from '@babel/types';
2
+ import type { Node as BabelNode } from '@babel/types';
3
+ import { type MutationPath } from './ast.ts';
4
+ export declare function declaratorInitId(declaratorPath: MutationPath | null, node: BabelNode): babel.Identifier | null;
5
+ //# sourceMappingURL=declarator-init-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declarator-init-id.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/declarator-init-id.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAE/D,wBAAgB,gBAAgB,CAAC,cAAc,EAAE,YAAY,GAAG,IAAI,EAAE,IAAI,EAAE,SAAS,GAAG,KAAK,CAAC,UAAU,GAAG,IAAI,CAY9G"}
@@ -0,0 +1,3 @@
1
+ import type { ResolverEnv } from './binding-resolution.ts';
2
+ export declare const filesystemResolverEnv: ResolverEnv;
3
+ //# sourceMappingURL=filesystem-module-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filesystem-module-loader.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/filesystem-module-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAkB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AA0F3E,eAAO,MAAM,qBAAqB,EAAE,WAA4B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type MutationPath } from './ast.ts';
2
+ import { type ZodBindings } from './zod-bindings.ts';
3
+ export declare function presenceWrapperMaskedByEveryUse(path: MutationPath, bindings: ZodBindings, wrapperName: string): boolean;
4
+ //# sourceMappingURL=masked-schema-references.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"masked-schema-references.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/masked-schema-references.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgD,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAE3F,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAqJrE,wBAAgB,+BAA+B,CAC3C,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,WAAW,EACrB,WAAW,EAAE,MAAM,GACpB,OAAO,CAqBT"}
@@ -0,0 +1,3 @@
1
+ import type { MutationDefinition } from './mutation-definition.ts';
2
+ export declare const mutationDefinitions: readonly MutationDefinition[];
3
+ //# sourceMappingURL=mutation-catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutation-catalog.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/mutation-catalog.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAMnE,eAAO,MAAM,mBAAmB,EAAE,SAAS,kBAAkB,EAQ5D,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { Node as BabelNode } from '@babel/types';
2
+ import type { CallExpression, MutationPath } from './ast.ts';
3
+ import type { ZodMutationOperator } from './operator.ts';
4
+ import { type ZodBindings } from './zod-bindings.ts';
5
+ import type { ResolverEnv } from './binding-resolution.ts';
6
+ export type ZodMutator = {
7
+ readonly name: ZodMutationOperator;
8
+ readonly mutate: (path: MutationPath) => Iterable<BabelNode>;
9
+ };
10
+ export type MutationDefinition = {
11
+ readonly name: ZodMutationOperator;
12
+ readonly mutate: (path: MutationPath, bindings: ZodBindings) => readonly BabelNode[];
13
+ };
14
+ export declare function createDefinition(name: ZodMutationOperator, mutate: (path: MutationPath, bindings: ZodBindings) => readonly BabelNode[]): MutationDefinition;
15
+ export declare function callNode(path: MutationPath): CallExpression | null;
16
+ export declare function createZodMutator(definition: MutationDefinition, env: ResolverEnv): ZodMutator;
17
+ //# sourceMappingURL=mutation-definition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutation-definition.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/mutation-definition.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,MAAM,UAAU,GAAG;IACrB,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,QAAQ,CAAC,SAAS,CAAC,CAAC;CAChE,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC7B,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,KAAK,SAAS,SAAS,EAAE,CAAC;CACxF,CAAC;AAEF,wBAAgB,gBAAgB,CAC5B,IAAI,EAAE,mBAAmB,EACzB,MAAM,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,KAAK,SAAS,SAAS,EAAE,GAC5E,kBAAkB,CAEpB;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,cAAc,GAAG,IAAI,CAElE;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,kBAAkB,EAAE,GAAG,EAAE,WAAW,GAAG,UAAU,CAO7F"}
@@ -0,0 +1,6 @@
1
+ import { type ZodMutator } from './mutation-definition.ts';
2
+ import type { ZodMutationOperator } from './operator.ts';
3
+ import type { ResolverEnv } from './binding-resolution.ts';
4
+ export declare function createZodMutatorsWithResolver(operators: readonly ZodMutationOperator[], env: ResolverEnv): readonly ZodMutator[];
5
+ export declare function createZodMutators(operators: readonly ZodMutationOperator[]): readonly ZodMutator[];
6
+ //# sourceMappingURL=mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG3D,wBAAgB,6BAA6B,CACzC,SAAS,EAAE,SAAS,mBAAmB,EAAE,EACzC,GAAG,EAAE,WAAW,GACjB,SAAS,UAAU,EAAE,CAUvB;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,mBAAmB,EAAE,GAAG,SAAS,UAAU,EAAE,CAElG"}
@@ -0,0 +1,3 @@
1
+ import { type MutationDefinition } from './mutation-definition.ts';
2
+ export declare const objectMutationDefinitions: readonly MutationDefinition[];
3
+ //# sourceMappingURL=object-mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object-mutations.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/object-mutations.ts"],"names":[],"mappings":"AAYA,OAAO,EAA8B,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AA6J/F,eAAO,MAAM,yBAAyB,EAAE,SAAS,kBAAkB,EAsBlE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type MutationDefinition } from './mutation-definition.ts';
2
+ export declare const presenceMutationDefinitions: readonly MutationDefinition[];
3
+ //# sourceMappingURL=presence-mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presence-mutations.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/presence-mutations.ts"],"names":[],"mappings":"AAQA,OAAO,EAAoB,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAgFrF,eAAO,MAAM,2BAA2B,EAAE,SAAS,kBAAkB,EA2BpE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type MutationDefinition } from './mutation-definition.ts';
2
+ export declare const primitiveMutationDefinitions: readonly MutationDefinition[];
3
+ //# sourceMappingURL=primitive-mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitive-mutations.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/primitive-mutations.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AA4D/F,eAAO,MAAM,4BAA4B,EAAE,SAAS,kBAAkB,EAErE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type MutationDefinition } from './mutation-definition.ts';
2
+ export declare const referenceMutationDefinitions: readonly MutationDefinition[];
3
+ //# sourceMappingURL=reference-mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference-mutations.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/reference-mutations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AA4FrF,eAAO,MAAM,4BAA4B,EAAE,SAAS,kBAAkB,EAErE,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { Node as BabelNode } from '@babel/types';
2
+ import type { ZodMutatorSettings } from './entry-point.ts';
3
+ type MutatorRegistryModule = {
4
+ readonly allMutators: MutableMutatorList;
5
+ };
6
+ type MutableMutatorList = {
7
+ readonly [Symbol.iterator]: () => Iterator<NodeMutator>;
8
+ readonly push: (...mutators: readonly NodeMutator[]) => number;
9
+ };
10
+ type NodePath = {
11
+ readonly node: BabelNode;
12
+ readonly parentPath: NodePath | null;
13
+ };
14
+ type NodeMutator = {
15
+ readonly name: string;
16
+ mutate: (path: NodePath) => Iterable<BabelNode>;
17
+ };
18
+ export declare function readMutatorRegistryModule(registry: unknown): MutatorRegistryModule;
19
+ export declare function installZodMutators(settings: ZodMutatorSettings): Promise<void>;
20
+ export {};
21
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AAOtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,KAAK,qBAAqB,GAAG;IACzB,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC;CAC5C,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACtB,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,QAAQ,CAAC,WAAW,CAAC,CAAC;IACxD,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,QAAQ,EAAE,SAAS,WAAW,EAAE,KAAK,MAAM,CAAC;CAClE,CAAC;AAEF,KAAK,QAAQ,GAAG;IACZ,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,QAAQ,GAAG,IAAI,CAAC;CACxC,CAAC;AAEF,KAAK,WAAW,GAAG;IACf,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,QAAQ,CAAC,SAAS,CAAC,CAAC;CACnD,CAAC;AA0BF,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,OAAO,GAAG,qBAAqB,CAclF;AAUD,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAWpF"}
@@ -0,0 +1,8 @@
1
+ import type { Node as BabelNode } from '@babel/types';
2
+ import { type CallExpression, type MutationPath } from './ast.ts';
3
+ import { type ZodBindings } from './zod-bindings.ts';
4
+ export declare function removeMethod(call: CallExpression, bindings: ZodBindings, methodNames: ReadonlySet<string>): readonly BabelNode[];
5
+ export declare function removeMethodOrWrapper(path: MutationPath, bindings: ZodBindings, names: ReadonlySet<string>): readonly BabelNode[];
6
+ export declare function addWrapperOrMethod(path: MutationPath, bindings: ZodBindings, name: string): readonly BabelNode[];
7
+ export declare function replaceNullish(path: MutationPath, bindings: ZodBindings, replacementName: string): readonly BabelNode[];
8
+ //# sourceMappingURL=schema-call-mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-call-mutations.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/schema-call-mutations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAMH,KAAK,cAAc,EACnB,KAAK,YAAY,EAEpB,MAAM,UAAU,CAAC;AAGlB,OAAO,EASH,KAAK,WAAW,EACnB,MAAM,mBAAmB,CAAC;AAG3B,wBAAgB,YAAY,CACxB,IAAI,EAAE,cAAc,EACpB,QAAQ,EAAE,WAAW,EACrB,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,GACjC,SAAS,SAAS,EAAE,CAatB;AAiBD,wBAAgB,qBAAqB,CACjC,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,WAAW,EACrB,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,GAC3B,SAAS,SAAS,EAAE,CAQtB;AAwCD,wBAAgB,kBAAkB,CAC9B,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,WAAW,EACrB,IAAI,EAAE,MAAM,GACb,SAAS,SAAS,EAAE,CAatB;AAmCD,wBAAgB,cAAc,CAC1B,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,WAAW,EACrB,eAAe,EAAE,MAAM,GACxB,SAAS,SAAS,EAAE,CAYtB"}
@@ -0,0 +1,42 @@
1
+ import type { Node as BabelNode, Program } from '@babel/types';
2
+ import { type CallExpression, type MutationPath, type SchemaExpression } from './ast.ts';
3
+ import type { ResolverEnv } from './binding-resolution.ts';
4
+ export type ZodApiStyle = 'classic' | 'mini';
5
+ type NamespaceBinding = {
6
+ readonly name: string;
7
+ readonly style: ZodApiStyle;
8
+ };
9
+ type DirectBinding = {
10
+ readonly localName: string;
11
+ readonly importedName: string;
12
+ readonly style: ZodApiStyle;
13
+ };
14
+ export type ZodBindings = {
15
+ readonly namespaces: readonly NamespaceBinding[];
16
+ readonly directBindings: readonly DirectBinding[];
17
+ readonly program: Program;
18
+ readonly fileName: string | null;
19
+ readonly env: ResolverEnv;
20
+ };
21
+ export declare const primitiveFactoryNames: readonly ["string", "number", "bigint", "boolean", "date", "symbol", "null", "undefined", "void", "never", "any", "unknown"];
22
+ export declare function buildZodBindings(program: Program, fileName: string | null, env: ResolverEnv): ZodBindings;
23
+ export declare function readZodBindings(path: MutationPath, env: ResolverEnv): ZodBindings;
24
+ export declare function getDirectBinding(bindings: ZodBindings, localName: string): DirectBinding | null;
25
+ export declare function getNamespaceStyle(bindings: ZodBindings, localName: string): ZodApiStyle | null;
26
+ export declare function isZodNamespaceMember(bindings: ZodBindings, expression: BabelNode): boolean;
27
+ export declare function isCoerceCall(bindings: ZodBindings, call: CallExpression): boolean;
28
+ export declare function getZodCallName(bindings: ZodBindings, call: CallExpression): string | null;
29
+ export declare function getZodCallStyle(bindings: ZodBindings, call: CallExpression): ZodApiStyle | null;
30
+ export declare function isZodSchemaExpression(bindings: ZodBindings, expression: SchemaExpression): boolean;
31
+ export declare function expressionStyle(bindings: ZodBindings, expression: SchemaExpression): ZodApiStyle | null;
32
+ export declare function moduleStyle(bindings: ZodBindings): ZodApiStyle;
33
+ export declare function buildZodCall(bindings: ZodBindings, style: ZodApiStyle, name: string, args: readonly SchemaExpression[]): CallExpression | null;
34
+ export declare function replaceZodCallee(bindings: ZodBindings, call: CallExpression, replacementName: string): CallExpression | null;
35
+ export declare function firstExpressionArgument(call: CallExpression): SchemaExpression | null;
36
+ export declare function isObjectLikeFactory(name: string): boolean;
37
+ export declare const valuePreservingWrapperNames: Set<string>;
38
+ export declare function isSchemaValueChainRoot(path: MutationPath, bindings: ZodBindings): boolean;
39
+ export declare function isRecordKeyPosition(path: MutationPath, bindings: ZodBindings): boolean;
40
+ export declare function isStringTemplateLiteralPart(path: MutationPath, bindings: ZodBindings): boolean;
41
+ export {};
42
+ //# sourceMappingURL=zod-bindings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zod-bindings.d.ts","sourceRoot":"","sources":["../../../../source/stryker-zod-mutator/zod-bindings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAKH,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACxB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;AAE7C,KAAK,gBAAgB,GAAG;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC/B,CAAC;AAEF,KAAK,aAAa,GAAG;IACjB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC/B,CAAC;AAYF,MAAM,MAAM,WAAW,GAAG;IACtB,QAAQ,CAAC,UAAU,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACjD,QAAQ,CAAC,cAAc,EAAE,SAAS,aAAa,EAAE,CAAC;IAClD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC;CAC7B,CAAC;AAUF,eAAO,MAAM,qBAAqB,8HAaxB,CAAC;AAoFX,wBAAgB,gBAAgB,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