@venizia/dev-configs 0.5.0-11 → 0.5.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 (47) hide show
  1. package/README.md +2 -2
  2. package/dist/cli/codemod/binding-keys.js +2 -0
  3. package/dist/cli/codemod/binding-keys.js.map +1 -1
  4. package/dist/cli/codemod/class-renames.d.ts +9 -2
  5. package/dist/cli/codemod/class-renames.js +92 -17
  6. package/dist/cli/codemod/class-renames.js.map +1 -1
  7. package/dist/cli/codemod/index.js +7 -0
  8. package/dist/cli/codemod/index.js.map +1 -1
  9. package/dist/cli/codemod/namespace-functions/mapping.d.ts +6 -0
  10. package/dist/cli/codemod/namespace-functions/mapping.js.map +1 -1
  11. package/dist/cli/codemod/namespace-functions/mappings/connectors.d.ts +2 -0
  12. package/dist/cli/codemod/namespace-functions/mappings/connectors.js +19 -1
  13. package/dist/cli/codemod/namespace-functions/mappings/connectors.js.map +1 -1
  14. package/dist/cli/codemod/namespace-functions/mappings/guards.d.ts +4 -0
  15. package/dist/cli/codemod/namespace-functions/mappings/guards.js +15 -0
  16. package/dist/cli/codemod/namespace-functions/mappings/guards.js.map +1 -0
  17. package/dist/cli/codemod/namespace-functions/mappings/helpers.d.ts +3 -2
  18. package/dist/cli/codemod/namespace-functions/mappings/helpers.js +24 -3
  19. package/dist/cli/codemod/namespace-functions/mappings/helpers.js.map +1 -1
  20. package/dist/cli/codemod/namespace-functions/mappings/inversion.d.ts +6 -2
  21. package/dist/cli/codemod/namespace-functions/mappings/inversion.js +42 -3
  22. package/dist/cli/codemod/namespace-functions/mappings/inversion.js.map +1 -1
  23. package/dist/cli/codemod/namespace-functions/mappings/kernel.d.ts +4 -2
  24. package/dist/cli/codemod/namespace-functions/mappings/kernel.js +16 -3
  25. package/dist/cli/codemod/namespace-functions/mappings/kernel.js.map +1 -1
  26. package/dist/cli/codemod/namespace-functions/rewriter.d.ts +7 -0
  27. package/dist/cli/codemod/namespace-functions/rewriter.js +75 -8
  28. package/dist/cli/codemod/namespace-functions/rewriter.js.map +1 -1
  29. package/dist/cli/codemod/public-names.d.ts +25 -0
  30. package/dist/cli/codemod/public-names.js +140 -0
  31. package/dist/cli/codemod/public-names.js.map +1 -0
  32. package/dist/cli/codemod/typed-route-context-satisfies.d.ts +85 -0
  33. package/dist/cli/codemod/typed-route-context-satisfies.js +910 -0
  34. package/dist/cli/codemod/typed-route-context-satisfies.js.map +1 -0
  35. package/dist/cli/codemod/typed-route-context.d.ts +17 -2
  36. package/dist/cli/codemod/typed-route-context.js +148 -37
  37. package/dist/cli/codemod/typed-route-context.js.map +1 -1
  38. package/dist/cli/index.js +1 -0
  39. package/dist/cli/index.js.map +1 -1
  40. package/dist/linters/house/framework-api-patterns.js +1 -1
  41. package/dist/linters/house/framework-api-patterns.js.map +1 -1
  42. package/dist/linters/house/no-shadow-framework-type.rule.d.ts +1 -1
  43. package/dist/linters/house/no-shadow-framework-type.rule.js +1 -1
  44. package/dist/linters/house/no-shadow-framework-type.rule.js.map +1 -1
  45. package/dist/linters/rules/naming-convention.rule.js +1 -1
  46. package/dist/linters/rules/naming-convention.rule.js.map +1 -1
  47. package/package.json +1 -1
@@ -0,0 +1,85 @@
1
+ import type TypeScript from 'typescript';
2
+ type TTypeScript = typeof TypeScript;
3
+ export interface ITextEdit {
4
+ start: number;
5
+ end: number;
6
+ text: string;
7
+ }
8
+ /** A config the codemod leaves declared wide, and why. */
9
+ export interface ILeftConfig {
10
+ file: string;
11
+ line: number;
12
+ name: string;
13
+ reason: string;
14
+ }
15
+ /** One annotation or assertion that can become `satisfies`, as far as its own file tells. */
16
+ export interface ISatisfiesCandidate {
17
+ file: string;
18
+ line: number;
19
+ name: string;
20
+ /** The span of the declaration (or of the assertion, outside one) in the source. */
21
+ start: number;
22
+ end: number;
23
+ /** Where the name of the declared binding starts; `undefined` for an assertion that declares none. */
24
+ binding: number | undefined;
25
+ /** Whether code outside the file can reach the declaration. */
26
+ isExported: boolean;
27
+ /** For a `Record`: the keys its literal writes. */
28
+ recordKeys: ReadonlySet<string> | undefined;
29
+ edits: ITextEdit[];
30
+ }
31
+ /** One round of the proof, as it starts. */
32
+ export interface IProofRound {
33
+ round: number;
34
+ limit: number;
35
+ /** The configs neither proved nor left yet. */
36
+ inDoubt: number;
37
+ }
38
+ export interface IProof {
39
+ accepted: ISatisfiesCandidate[];
40
+ left: ILeftConfig[];
41
+ /** The configs the round limit left unchecked: they are not written. */
42
+ untried: ISatisfiesCandidate[];
43
+ }
44
+ export interface IScannedFile {
45
+ candidates: ISatisfiesCandidate[];
46
+ left: ILeftConfig[];
47
+ }
48
+ /** Applies edits to a text, and moves positions between the text before and after them. */
49
+ export declare class TextEdits {
50
+ /** The text of each file once the candidates are written, and the edits that make it. */
51
+ static writeAll(opts: {
52
+ sources: ReadonlyMap<string, string>;
53
+ candidates: ISatisfiesCandidate[];
54
+ }): {
55
+ edits: Map<string, ITextEdit[]>;
56
+ contents: Map<string, string>;
57
+ };
58
+ static apply(opts: {
59
+ source: string;
60
+ edits: ITextEdit[];
61
+ }): string;
62
+ static toSource(opts: {
63
+ edits: ITextEdit[];
64
+ position: number;
65
+ }): number;
66
+ }
67
+ /** Writes a config declared as `IAuthRouteConfig` (or a `Record` of it) with `satisfies`, which keeps its schemas. */
68
+ export declare class SatisfiesRewrite {
69
+ static scan(opts: {
70
+ typescript: TTypeScript;
71
+ fileName: string;
72
+ source: string;
73
+ }): IScannedFile;
74
+ static prove(opts: {
75
+ typescript: TTypeScript;
76
+ root: string;
77
+ sources: ReadonlyMap<string, string>;
78
+ candidates: ISatisfiesCandidate[];
79
+ programs: (contents: ReadonlyMap<string, string>) => TypeScript.Program[];
80
+ roundLimit?: number;
81
+ onRound?: (round: IProofRound) => void;
82
+ }): IProof;
83
+ }
84
+ export {};
85
+ //# sourceMappingURL=typed-route-context-satisfies.d.ts.map