kubernetes-fluent-client 3.5.6 → 3.6.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.
- package/dist/cli.js +9 -16
- package/dist/fetch.js +5 -8
- package/dist/fluent/index.d.ts +2 -1
- package/dist/fluent/index.d.ts.map +1 -1
- package/dist/fluent/index.js +27 -29
- package/dist/fluent/shared-types.d.ts +49 -0
- package/dist/fluent/shared-types.d.ts.map +1 -0
- package/dist/fluent/shared-types.js +23 -0
- package/dist/fluent/types.d.ts +2 -37
- package/dist/fluent/types.d.ts.map +1 -1
- package/dist/fluent/types.js +1 -14
- package/dist/fluent/utils.d.ts +1 -1
- package/dist/fluent/utils.d.ts.map +1 -1
- package/dist/fluent/utils.js +25 -35
- package/dist/fluent/watch.d.ts +1 -8
- package/dist/fluent/watch.d.ts.map +1 -1
- package/dist/fluent/watch.js +23 -43
- package/dist/generate.js +22 -65
- package/dist/helpers.js +5 -10
- package/dist/index.js +13 -60
- package/dist/kinds.js +2 -7
- package/dist/normalization.d.ts +97 -0
- package/dist/normalization.d.ts.map +1 -0
- package/dist/normalization.js +152 -0
- package/dist/patch.js +1 -2
- package/dist/postProcessing.d.ts +6 -127
- package/dist/postProcessing.d.ts.map +1 -1
- package/dist/postProcessing.js +24 -279
- package/dist/types.d.ts +3 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -5
- package/dist/upstream.js +2 -53
- package/package.json +11 -8
- package/src/cli.ts +1 -3
- package/src/fluent/index.ts +12 -11
- package/src/fluent/shared-types.ts +55 -0
- package/src/fluent/types.ts +3 -54
- package/src/fluent/utils.ts +2 -2
- package/src/fluent/watch.ts +2 -21
- package/src/normalization.ts +181 -0
- package/src/postProcessing.ts +11 -239
- package/src/types.ts +3 -4
- package/dist/fileSystem.d.ts +0 -11
- package/dist/fileSystem.d.ts.map +0 -1
- package/dist/fileSystem.js +0 -52
- package/src/fileSystem.ts +0 -25
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalizes indentation for TypeScript lines to a consistent format.
|
|
3
|
+
*
|
|
4
|
+
* @param lines The generated TypeScript lines.
|
|
5
|
+
* @returns The lines with normalized indentation.
|
|
6
|
+
*/
|
|
7
|
+
export function normalizeIndentation(lines) {
|
|
8
|
+
return lines.map(line => line.replace(/^ {4}/, " "));
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Normalizes the indentation of a single line to use two spaces instead of four.
|
|
12
|
+
*
|
|
13
|
+
* @param line The line of code to normalize.
|
|
14
|
+
* @returns The line with normalized indentation.
|
|
15
|
+
*/
|
|
16
|
+
export function normalizeLineIndentation(line) {
|
|
17
|
+
return line.replace(/^ {4}/, " ");
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Normalizes spacing between property names and types in TypeScript lines.
|
|
21
|
+
*
|
|
22
|
+
* @param lines The generated TypeScript lines.
|
|
23
|
+
* @returns The lines with normalized property spacing.
|
|
24
|
+
*/
|
|
25
|
+
export function normalizePropertySpacing(lines) {
|
|
26
|
+
// https://regex101.com/r/XEv3pL/1
|
|
27
|
+
return lines.map(line => line.replace(/\s*\?\s*:\s*/, "?: "));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Processes a single line inside a class extending `GenericKind`.
|
|
31
|
+
*
|
|
32
|
+
* @param line The current line of code.
|
|
33
|
+
* @param genericKindProperties The list of properties from `GenericKind`.
|
|
34
|
+
* @param foundInterfaces The set of found interfaces in the file.
|
|
35
|
+
* @returns The modified line.
|
|
36
|
+
*/
|
|
37
|
+
export function modifyAndNormalizeClassProperties(line, genericKindProperties, foundInterfaces) {
|
|
38
|
+
line = modifyPropertiesAndAddEslintDirective(line, genericKindProperties, foundInterfaces);
|
|
39
|
+
line = normalizeLineIndentation(line);
|
|
40
|
+
return line;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Normalizes lines after processing, including indentation, spacing, and removing unnecessary lines.
|
|
44
|
+
*
|
|
45
|
+
* @param lines The lines of the file content.
|
|
46
|
+
* @param opts The options for processing.
|
|
47
|
+
* @returns The normalized lines.
|
|
48
|
+
*/
|
|
49
|
+
export function normalizeIndentationAndSpacing(lines, opts) {
|
|
50
|
+
let normalizedLines = normalizeIndentation(lines);
|
|
51
|
+
normalizedLines = normalizePropertySpacing(normalizedLines);
|
|
52
|
+
return removePropertyStringAny(normalizedLines, opts);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Removes lines containing `[property: string]: any;` from TypeScript files.
|
|
56
|
+
*
|
|
57
|
+
* @param lines The generated TypeScript lines.
|
|
58
|
+
* @param opts The options for processing.
|
|
59
|
+
* @returns The lines with `[property: string]: any;` removed.
|
|
60
|
+
*/
|
|
61
|
+
export function removePropertyStringAny(lines, opts) {
|
|
62
|
+
if (opts.language === "ts" || opts.language === "typescript") {
|
|
63
|
+
return lines.filter(line => !line.includes("[property: string]: any;"));
|
|
64
|
+
}
|
|
65
|
+
return lines;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Applies ESLint and property modifiers to a line of code.
|
|
69
|
+
*
|
|
70
|
+
* @param line - The current line of code.
|
|
71
|
+
* @param genericKindProperties - The list of properties from `GenericKind`.
|
|
72
|
+
* @param foundInterfaces - The set of found interfaces in the file.
|
|
73
|
+
* @returns The modified line.
|
|
74
|
+
*/
|
|
75
|
+
export function modifyPropertiesAndAddEslintDirective(line, genericKindProperties, foundInterfaces) {
|
|
76
|
+
line = addDeclareAndOptionalModifiersToProperties(line, genericKindProperties, foundInterfaces);
|
|
77
|
+
line = processEslintDisable(line, genericKindProperties);
|
|
78
|
+
return line;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Adds an ESLint disable comment for `[key: string]: any` if it's not part of `GenericKind`.
|
|
82
|
+
*
|
|
83
|
+
* @param line The current line of code.
|
|
84
|
+
* @param genericKindProperties The list of properties from `GenericKind`.
|
|
85
|
+
* @returns The modified line with the ESLint disable comment.
|
|
86
|
+
*/
|
|
87
|
+
export function processEslintDisable(line, genericKindProperties) {
|
|
88
|
+
if (line.includes("[key: string]: any") && !genericKindProperties.includes("[key: string]")) {
|
|
89
|
+
return ` // eslint-disable-next-line @typescript-eslint/no-explicit-any\n${line}`;
|
|
90
|
+
}
|
|
91
|
+
return line;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Applies property modifiers to a line of code.
|
|
95
|
+
*
|
|
96
|
+
* @param line The current line of code.
|
|
97
|
+
* @param genericKindProperties The list of properties from `GenericKind`.
|
|
98
|
+
* @param foundInterfaces The set of found interfaces in the file.
|
|
99
|
+
* @returns The modified line.
|
|
100
|
+
*/
|
|
101
|
+
export function addDeclareAndOptionalModifiersToProperties(line, genericKindProperties, foundInterfaces) {
|
|
102
|
+
line = addDeclareToGenericKindProperties(line, genericKindProperties);
|
|
103
|
+
line = makePropertiesOptional(line, foundInterfaces);
|
|
104
|
+
line = normalizeLineIndentation(line);
|
|
105
|
+
return line;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Adds the `declare` keyword to `GenericKind` properties.
|
|
109
|
+
*
|
|
110
|
+
* @param line The current line of code.
|
|
111
|
+
* @param genericKindProperties The list of properties from `GenericKind`.
|
|
112
|
+
* @returns The modified line with the `declare` keyword, if applicable.
|
|
113
|
+
*/
|
|
114
|
+
export function addDeclareToGenericKindProperties(line, genericKindProperties) {
|
|
115
|
+
for (const prop of genericKindProperties) {
|
|
116
|
+
const propertyPattern = getPropertyPattern(prop);
|
|
117
|
+
if (propertyPattern.test(line)) {
|
|
118
|
+
return line.replace(prop, `declare ${prop}`);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return line;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Makes a property optional if its type matches one of the found interfaces and it is not already optional.
|
|
125
|
+
*
|
|
126
|
+
* @param line The current line of code.
|
|
127
|
+
* @param foundInterfaces The set of found interfaces in the file.
|
|
128
|
+
* @returns The modified line with the optional `?` symbol.
|
|
129
|
+
*/
|
|
130
|
+
export function makePropertiesOptional(line, foundInterfaces) {
|
|
131
|
+
// https://regex101.com/r/kX8TCj/1
|
|
132
|
+
const propertyTypePattern = /:\s*(?<propertyType>\w+)\s*;/;
|
|
133
|
+
const match = line.match(propertyTypePattern);
|
|
134
|
+
if (match?.groups?.propertyType) {
|
|
135
|
+
const { propertyType } = match.groups;
|
|
136
|
+
if (foundInterfaces.has(propertyType) && !line.includes("?")) {
|
|
137
|
+
return line.replace(":", "?:");
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return line;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Generates a regular expression to match a property pattern in TypeScript.
|
|
144
|
+
*
|
|
145
|
+
* @param prop The property name to match.
|
|
146
|
+
* @returns A regular expression to match the property pattern.
|
|
147
|
+
*/
|
|
148
|
+
export function getPropertyPattern(prop) {
|
|
149
|
+
// For prop="kind", the pattern will match "kind ? :" or "kind :"
|
|
150
|
+
// https://regex101.com/r/mF8kXn/1
|
|
151
|
+
return new RegExp(`\\b${prop}\\b\\s*\\?\\s*:|\\b${prop}\\b\\s*:`);
|
|
152
|
+
}
|
package/dist/patch.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/postProcessing.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { GenerateOptions } from "./generate";
|
|
2
2
|
import { CustomResourceDefinition } from "./upstream";
|
|
3
|
-
import { FileSystem } from "./fileSystem";
|
|
4
3
|
type CRDResult = {
|
|
5
4
|
name: string;
|
|
6
5
|
crd: CustomResourceDefinition;
|
|
7
6
|
version: string;
|
|
8
7
|
};
|
|
9
|
-
type CodeLines = string[];
|
|
10
8
|
type ClassContextResult = {
|
|
11
9
|
line: string;
|
|
12
10
|
insideClass: boolean;
|
|
@@ -17,9 +15,8 @@ type ClassContextResult = {
|
|
|
17
15
|
*
|
|
18
16
|
* @param allResults The array of CRD results.
|
|
19
17
|
* @param opts The options for post-processing.
|
|
20
|
-
* @param fileSystem The file system interface for reading and writing files.
|
|
21
18
|
*/
|
|
22
|
-
export declare function postProcessing(allResults: CRDResult[], opts: GenerateOptions
|
|
19
|
+
export declare function postProcessing(allResults: CRDResult[], opts: GenerateOptions): Promise<void>;
|
|
23
20
|
/**
|
|
24
21
|
* Creates a map linking each file to its corresponding CRD result.
|
|
25
22
|
*
|
|
@@ -33,9 +30,8 @@ export declare function mapFilesToCRD(allResults: CRDResult[]): Record<string, C
|
|
|
33
30
|
* @param files - The list of file names to process.
|
|
34
31
|
* @param fileResultMap - A map linking file names to their corresponding CRD results.
|
|
35
32
|
* @param opts - Options for the generation process.
|
|
36
|
-
* @param fileSystem - The file system interface for reading and writing files.
|
|
37
33
|
*/
|
|
38
|
-
export declare function processFiles(files: string[], fileResultMap: Record<string, CRDResult>, opts: GenerateOptions
|
|
34
|
+
export declare function processFiles(files: string[], fileResultMap: Record<string, CRDResult>, opts: GenerateOptions): Promise<void>;
|
|
39
35
|
/**
|
|
40
36
|
* Handles the processing of a single file: reading, modifying, and writing back to disk.
|
|
41
37
|
*
|
|
@@ -45,9 +41,8 @@ export declare function processFiles(files: string[], fileResultMap: Record<stri
|
|
|
45
41
|
* @param fileResult.crd - The CustomResourceDefinition object.
|
|
46
42
|
* @param fileResult.version - The version of the CRD.
|
|
47
43
|
* @param opts - Options for the generation process.
|
|
48
|
-
* @param fileSystem - The file system interface for reading and writing files.
|
|
49
44
|
*/
|
|
50
|
-
export declare function processAndModifySingleFile(filePath: string, fileResult: CRDResult, opts: GenerateOptions
|
|
45
|
+
export declare function processAndModifySingleFile(filePath: string, fileResult: CRDResult, opts: GenerateOptions): void;
|
|
51
46
|
/**
|
|
52
47
|
* Processes the TypeScript file content, applying wrapping and property modifications.
|
|
53
48
|
*
|
|
@@ -59,20 +54,6 @@ export declare function processAndModifySingleFile(filePath: string, fileResult:
|
|
|
59
54
|
* @returns The processed TypeScript file content.
|
|
60
55
|
*/
|
|
61
56
|
export declare function applyCRDPostProcessing(content: string, name: string, crd: CustomResourceDefinition, version: string, opts: GenerateOptions): string;
|
|
62
|
-
/**
|
|
63
|
-
* Reads the content of a file from disk.
|
|
64
|
-
*
|
|
65
|
-
* @param filePath The path to the file.
|
|
66
|
-
* @returns The file contents as a string.
|
|
67
|
-
*/
|
|
68
|
-
export declare function readFile(filePath: string): string;
|
|
69
|
-
/**
|
|
70
|
-
* Writes the modified content back to the file.
|
|
71
|
-
*
|
|
72
|
-
* @param filePath The path to the file.
|
|
73
|
-
* @param content The modified content to write.
|
|
74
|
-
*/
|
|
75
|
-
export declare function writeFile(filePath: string, content: string): void;
|
|
76
57
|
/**
|
|
77
58
|
* Retrieves the properties of the `GenericKind` class, excluding dynamic properties like `[key: string]: any`.
|
|
78
59
|
*
|
|
@@ -85,7 +66,7 @@ export declare function getGenericKindProperties(): string[];
|
|
|
85
66
|
* @param lines The lines of the file content.
|
|
86
67
|
* @returns A set of found interface names.
|
|
87
68
|
*/
|
|
88
|
-
export declare function collectInterfaceNames(lines:
|
|
69
|
+
export declare function collectInterfaceNames(lines: string[]): Set<string>;
|
|
89
70
|
/**
|
|
90
71
|
* Identifies whether a line declares a class that extends `GenericKind`.
|
|
91
72
|
*
|
|
@@ -101,55 +82,6 @@ export declare function isClassExtendingGenericKind(line: string): boolean;
|
|
|
101
82
|
* @returns The updated brace balance.
|
|
102
83
|
*/
|
|
103
84
|
export declare function updateBraceBalance(line: string, braceBalance: number): number;
|
|
104
|
-
/**
|
|
105
|
-
* Generates a regular expression to match a property pattern in TypeScript.
|
|
106
|
-
*
|
|
107
|
-
* @param prop The property name to match.
|
|
108
|
-
* @returns A regular expression to match the property pattern.
|
|
109
|
-
*/
|
|
110
|
-
export declare function getPropertyPattern(prop: string): RegExp;
|
|
111
|
-
/**
|
|
112
|
-
* Applies ESLint and property modifiers to a line of code.
|
|
113
|
-
*
|
|
114
|
-
* @param line - The current line of code.
|
|
115
|
-
* @param genericKindProperties - The list of properties from `GenericKind`.
|
|
116
|
-
* @param foundInterfaces - The set of found interfaces in the file.
|
|
117
|
-
* @returns The modified line.
|
|
118
|
-
*/
|
|
119
|
-
export declare function modifyPropertiesAndAddEslintDirective(line: string, genericKindProperties: string[], foundInterfaces: Set<string>): string;
|
|
120
|
-
/**
|
|
121
|
-
* Applies property modifiers to a line of code.
|
|
122
|
-
*
|
|
123
|
-
* @param line The current line of code.
|
|
124
|
-
* @param genericKindProperties The list of properties from `GenericKind`.
|
|
125
|
-
* @param foundInterfaces The set of found interfaces in the file.
|
|
126
|
-
* @returns The modified line.
|
|
127
|
-
*/
|
|
128
|
-
export declare function addDeclareAndOptionalModifiersToProperties(line: string, genericKindProperties: string[], foundInterfaces: Set<string>): string;
|
|
129
|
-
/**
|
|
130
|
-
* Adds the `declare` keyword to `GenericKind` properties.
|
|
131
|
-
*
|
|
132
|
-
* @param line The current line of code.
|
|
133
|
-
* @param genericKindProperties The list of properties from `GenericKind`.
|
|
134
|
-
* @returns The modified line with the `declare` keyword, if applicable.
|
|
135
|
-
*/
|
|
136
|
-
export declare function addDeclareToGenericKindProperties(line: string, genericKindProperties: string[]): string;
|
|
137
|
-
/**
|
|
138
|
-
* Makes a property optional if its type matches one of the found interfaces and it is not already optional.
|
|
139
|
-
*
|
|
140
|
-
* @param line The current line of code.
|
|
141
|
-
* @param foundInterfaces The set of found interfaces in the file.
|
|
142
|
-
* @returns The modified line with the optional `?` symbol.
|
|
143
|
-
*/
|
|
144
|
-
export declare function makePropertiesOptional(line: string, foundInterfaces: Set<string>): string;
|
|
145
|
-
/**
|
|
146
|
-
* Adds an ESLint disable comment for `[key: string]: any` if it's not part of `GenericKind`.
|
|
147
|
-
*
|
|
148
|
-
* @param line The current line of code.
|
|
149
|
-
* @param genericKindProperties The list of properties from `GenericKind`.
|
|
150
|
-
* @returns The modified line with the ESLint disable comment.
|
|
151
|
-
*/
|
|
152
|
-
export declare function processEslintDisable(line: string, genericKindProperties: string[]): string;
|
|
153
85
|
/**
|
|
154
86
|
* Wraps the generated TypeScript file with fluent client elements (`GenericKind` and `RegisterKind`).
|
|
155
87
|
*
|
|
@@ -160,43 +92,7 @@ export declare function processEslintDisable(line: string, genericKindProperties
|
|
|
160
92
|
* @param npmPackage The NPM package name for the fluent client.
|
|
161
93
|
* @returns The processed TypeScript lines.
|
|
162
94
|
*/
|
|
163
|
-
export declare function wrapWithFluentClient(lines:
|
|
164
|
-
/**
|
|
165
|
-
* Normalizes indentation for TypeScript lines to a consistent format.
|
|
166
|
-
*
|
|
167
|
-
* @param lines The generated TypeScript lines.
|
|
168
|
-
* @returns The lines with normalized indentation.
|
|
169
|
-
*/
|
|
170
|
-
export declare function normalizeIndentation(lines: CodeLines): string[];
|
|
171
|
-
/**
|
|
172
|
-
* Normalizes the indentation of a single line to use two spaces instead of four.
|
|
173
|
-
*
|
|
174
|
-
* @param line The line of code to normalize.
|
|
175
|
-
* @returns The line with normalized indentation.
|
|
176
|
-
*/
|
|
177
|
-
export declare function normalizeLineIndentation(line: string): string;
|
|
178
|
-
/**
|
|
179
|
-
* Normalizes spacing between property names and types in TypeScript lines.
|
|
180
|
-
*
|
|
181
|
-
* @param lines The generated TypeScript lines.
|
|
182
|
-
* @returns The lines with normalized property spacing.
|
|
183
|
-
*/
|
|
184
|
-
export declare function normalizePropertySpacing(lines: CodeLines): string[];
|
|
185
|
-
/**
|
|
186
|
-
* Removes lines containing `[property: string]: any;` from TypeScript files.
|
|
187
|
-
*
|
|
188
|
-
* @param lines The generated TypeScript lines.
|
|
189
|
-
* @param opts The options for processing.
|
|
190
|
-
* @returns The lines with `[property: string]: any;` removed.
|
|
191
|
-
*/
|
|
192
|
-
export declare function removePropertyStringAny(lines: CodeLines, opts: GenerateOptions): string[];
|
|
193
|
-
/**
|
|
194
|
-
* Determines if the content should be wrapped with the fluent client.
|
|
195
|
-
*
|
|
196
|
-
* @param opts The options for generating the content.
|
|
197
|
-
* @returns True if the content should be wrapped with the fluent client, false otherwise.
|
|
198
|
-
*/
|
|
199
|
-
export declare function shouldWrapWithFluentClient(opts: GenerateOptions): boolean;
|
|
95
|
+
export declare function wrapWithFluentClient(lines: string[], name: string, crd: CustomResourceDefinition, version: string, npmPackage?: string): string[];
|
|
200
96
|
/**
|
|
201
97
|
* Processes the lines of the TypeScript file, focusing on classes extending `GenericKind`.
|
|
202
98
|
*
|
|
@@ -205,7 +101,7 @@ export declare function shouldWrapWithFluentClient(opts: GenerateOptions): boole
|
|
|
205
101
|
* @param foundInterfaces The set of found interfaces in the file.
|
|
206
102
|
* @returns The processed lines.
|
|
207
103
|
*/
|
|
208
|
-
export declare function processLines(lines:
|
|
104
|
+
export declare function processLines(lines: string[], genericKindProperties: string[], foundInterfaces: Set<string>): string[];
|
|
209
105
|
/**
|
|
210
106
|
* Processes a single line inside a class extending `GenericKind`.
|
|
211
107
|
*
|
|
@@ -217,23 +113,6 @@ export declare function processLines(lines: CodeLines, genericKindProperties: st
|
|
|
217
113
|
* @returns An object containing the updated line, updated insideClass flag, and braceBalance.
|
|
218
114
|
*/
|
|
219
115
|
export declare function processClassContext(line: string, insideClass: boolean, braceBalance: number, genericKindProperties: string[], foundInterfaces: Set<string>): ClassContextResult;
|
|
220
|
-
/**
|
|
221
|
-
* Processes a single line inside a class extending `GenericKind`.
|
|
222
|
-
*
|
|
223
|
-
* @param line The current line of code.
|
|
224
|
-
* @param genericKindProperties The list of properties from `GenericKind`.
|
|
225
|
-
* @param foundInterfaces The set of found interfaces in the file.
|
|
226
|
-
* @returns The modified line.
|
|
227
|
-
*/
|
|
228
|
-
export declare function modifyAndNormalizeClassProperties(line: string, genericKindProperties: string[], foundInterfaces: Set<string>): string;
|
|
229
|
-
/**
|
|
230
|
-
* Normalizes lines after processing, including indentation, spacing, and removing unnecessary lines.
|
|
231
|
-
*
|
|
232
|
-
* @param lines The lines of the file content.
|
|
233
|
-
* @param opts The options for processing.
|
|
234
|
-
* @returns The normalized lines.
|
|
235
|
-
*/
|
|
236
|
-
export declare function normalizeIndentationAndSpacing(lines: CodeLines, opts: GenerateOptions): string[];
|
|
237
116
|
/**
|
|
238
117
|
* Handles logging for errors with stack trace.
|
|
239
118
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postProcessing.d.ts","sourceRoot":"","sources":["../src/postProcessing.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"postProcessing.d.ts","sourceRoot":"","sources":["../src/postProcessing.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAGtD,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,wBAAwB,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,kBAAkB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAIvF;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,eAAe,iBAalF;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAahF;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,KAAK,EAAE,MAAM,EAAE,EACf,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,EACxC,IAAI,EAAE,eAAe,iBAoBtB;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,SAAS,EACrB,IAAI,EAAE,eAAe,QA2BtB;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,wBAAwB,EAC7B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,eAAe,GACpB,MAAM,CAoBR;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,EAAE,CAGnD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAalE;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,wBAAwB,EAC7B,OAAO,EAAE,MAAM,EACf,UAAU,GAAE,MAAmC,GAC9C,MAAM,EAAE,CAoBV;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EAAE,EACf,qBAAqB,EAAE,MAAM,EAAE,EAC/B,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,GAC3B,MAAM,EAAE,CAiBV;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,EACpB,YAAY,EAAE,MAAM,EACpB,qBAAqB,EAAE,MAAM,EAAE,EAC/B,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,GAC3B,kBAAkB,CAgBpB;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,QAGpF"}
|